author | ymh <ymh.work@gmail.com> |
Fri, 05 Sep 2025 18:40:08 +0200 | |
changeset 21 | 48c4eec2b7e6 |
parent 19 | 3d72ae0968f4 |
child 22 | 8c2e4d02f4ef |
permissions | -rw-r--r-- |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1 |
/******/ (() => { // webpackBootstrap |
19 | 2 |
/******/ "use strict"; |
3 |
/******/ // The require scope |
|
4 |
/******/ var __webpack_require__ = {}; |
|
5 |
/******/ |
|
6 |
/************************************************************************/ |
|
7 |
/******/ /* webpack/runtime/compat get default export */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
8 |
/******/ (() => { |
19 | 9 |
/******/ // getDefaultExport function for compatibility with non-harmony modules |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
10 |
/******/ __webpack_require__.n = (module) => { |
19 | 11 |
/******/ var getter = module && module.__esModule ? |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
12 |
/******/ () => (module['default']) : |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
13 |
/******/ () => (module); |
19 | 14 |
/******/ __webpack_require__.d(getter, { a: getter }); |
15 |
/******/ return getter; |
|
9 | 16 |
/******/ }; |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
17 |
/******/ })(); |
19 | 18 |
/******/ |
19 |
/******/ /* webpack/runtime/define property getters */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
20 |
/******/ (() => { |
19 | 21 |
/******/ // define getter functions for harmony exports |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
22 |
/******/ __webpack_require__.d = (exports, definition) => { |
19 | 23 |
/******/ for(var key in definition) { |
24 |
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
|
25 |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
|
26 |
/******/ } |
|
27 |
/******/ } |
|
28 |
/******/ }; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
29 |
/******/ })(); |
19 | 30 |
/******/ |
31 |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
32 |
/******/ (() => { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
33 |
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
34 |
/******/ })(); |
19 | 35 |
/******/ |
36 |
/******/ /* webpack/runtime/make namespace object */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
37 |
/******/ (() => { |
19 | 38 |
/******/ // define __esModule on exports |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
39 |
/******/ __webpack_require__.r = (exports) => { |
19 | 40 |
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
41 |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
|
42 |
/******/ } |
|
43 |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); |
|
44 |
/******/ }; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
45 |
/******/ })(); |
19 | 46 |
/******/ |
9 | 47 |
/************************************************************************/ |
19 | 48 |
var __webpack_exports__ = {}; |
18 | 49 |
// ESM COMPAT FLAG |
50 |
__webpack_require__.r(__webpack_exports__); |
|
9 | 51 |
|
16 | 52 |
// EXPORTS |
19 | 53 |
__webpack_require__.d(__webpack_exports__, { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
54 |
DotTip: () => (/* reexport */ dot_tip), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
55 |
store: () => (/* reexport */ store) |
19 | 56 |
}); |
18 | 57 |
|
58 |
// NAMESPACE OBJECT: ./node_modules/@wordpress/nux/build-module/store/actions.js |
|
59 |
var actions_namespaceObject = {}; |
|
60 |
__webpack_require__.r(actions_namespaceObject); |
|
19 | 61 |
__webpack_require__.d(actions_namespaceObject, { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
62 |
disableTips: () => (disableTips), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
63 |
dismissTip: () => (dismissTip), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
64 |
enableTips: () => (enableTips), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
65 |
triggerGuide: () => (triggerGuide) |
19 | 66 |
}); |
18 | 67 |
|
68 |
// NAMESPACE OBJECT: ./node_modules/@wordpress/nux/build-module/store/selectors.js |
|
69 |
var selectors_namespaceObject = {}; |
|
70 |
__webpack_require__.r(selectors_namespaceObject); |
|
19 | 71 |
__webpack_require__.d(selectors_namespaceObject, { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
72 |
areTipsEnabled: () => (selectors_areTipsEnabled), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
73 |
getAssociatedGuide: () => (getAssociatedGuide), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
74 |
isTipVisible: () => (isTipVisible) |
19 | 75 |
}); |
9 | 76 |
|
19 | 77 |
;// CONCATENATED MODULE: external ["wp","deprecated"] |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
78 |
const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"]; |
19 | 79 |
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject); |
80 |
;// CONCATENATED MODULE: external ["wp","data"] |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
81 |
const external_wp_data_namespaceObject = window["wp"]["data"]; |
19 | 82 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/reducer.js |
18 | 83 |
/** |
84 |
* WordPress dependencies |
|
85 |
*/ |
|
86 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
87 |
|
18 | 88 |
/** |
89 |
* Reducer that tracks which tips are in a guide. Each guide is represented by |
|
90 |
* an array which contains the tip identifiers contained within that guide. |
|
91 |
* |
|
19 | 92 |
* @param {Array} state Current state. |
18 | 93 |
* @param {Object} action Dispatched action. |
94 |
* |
|
95 |
* @return {Array} Updated state. |
|
96 |
*/ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
97 |
function guides(state = [], action) { |
18 | 98 |
switch (action.type) { |
99 |
case 'TRIGGER_GUIDE': |
|
100 |
return [...state, action.tipIds]; |
|
101 |
} |
|
102 |
return state; |
|
103 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
104 |
|
18 | 105 |
/** |
106 |
* Reducer that tracks whether or not tips are globally enabled. |
|
107 |
* |
|
19 | 108 |
* @param {boolean} state Current state. |
109 |
* @param {Object} action Dispatched action. |
|
18 | 110 |
* |
111 |
* @return {boolean} Updated state. |
|
112 |
*/ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
113 |
function areTipsEnabled(state = true, action) { |
18 | 114 |
switch (action.type) { |
115 |
case 'DISABLE_TIPS': |
|
116 |
return false; |
|
117 |
case 'ENABLE_TIPS': |
|
118 |
return true; |
|
119 |
} |
|
120 |
return state; |
|
121 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
122 |
|
18 | 123 |
/** |
124 |
* Reducer that tracks which tips have been dismissed. If the state object |
|
125 |
* contains a tip identifier, then that tip is dismissed. |
|
126 |
* |
|
127 |
* @param {Object} state Current state. |
|
128 |
* @param {Object} action Dispatched action. |
|
129 |
* |
|
130 |
* @return {Object} Updated state. |
|
131 |
*/ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
132 |
function dismissedTips(state = {}, action) { |
18 | 133 |
switch (action.type) { |
134 |
case 'DISMISS_TIP': |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
135 |
return { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
136 |
...state, |
18 | 137 |
[action.id]: true |
138 |
}; |
|
139 |
case 'ENABLE_TIPS': |
|
140 |
return {}; |
|
141 |
} |
|
142 |
return state; |
|
143 |
} |
|
19 | 144 |
const preferences = (0,external_wp_data_namespaceObject.combineReducers)({ |
18 | 145 |
areTipsEnabled, |
146 |
dismissedTips |
|
147 |
}); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
148 |
/* harmony default export */ const reducer = ((0,external_wp_data_namespaceObject.combineReducers)({ |
18 | 149 |
guides, |
150 |
preferences |
|
151 |
})); |
|
152 |
||
19 | 153 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/actions.js |
18 | 154 |
/** |
155 |
* Returns an action object that, when dispatched, presents a guide that takes |
|
156 |
* the user through a series of tips step by step. |
|
157 |
* |
|
158 |
* @param {string[]} tipIds Which tips to show in the guide. |
|
159 |
* |
|
160 |
* @return {Object} Action object. |
|
161 |
*/ |
|
162 |
function triggerGuide(tipIds) { |
|
163 |
return { |
|
164 |
type: 'TRIGGER_GUIDE', |
|
165 |
tipIds |
|
166 |
}; |
|
167 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
168 |
|
18 | 169 |
/** |
170 |
* Returns an action object that, when dispatched, dismisses the given tip. A |
|
171 |
* dismissed tip will not show again. |
|
172 |
* |
|
173 |
* @param {string} id The tip to dismiss. |
|
174 |
* |
|
175 |
* @return {Object} Action object. |
|
176 |
*/ |
|
177 |
function dismissTip(id) { |
|
178 |
return { |
|
179 |
type: 'DISMISS_TIP', |
|
180 |
id |
|
181 |
}; |
|
182 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
183 |
|
18 | 184 |
/** |
185 |
* Returns an action object that, when dispatched, prevents all tips from |
|
186 |
* showing again. |
|
187 |
* |
|
188 |
* @return {Object} Action object. |
|
189 |
*/ |
|
190 |
function disableTips() { |
|
191 |
return { |
|
192 |
type: 'DISABLE_TIPS' |
|
193 |
}; |
|
194 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
195 |
|
18 | 196 |
/** |
197 |
* Returns an action object that, when dispatched, makes all tips show again. |
|
198 |
* |
|
199 |
* @return {Object} Action object. |
|
200 |
*/ |
|
201 |
function enableTips() { |
|
202 |
return { |
|
203 |
type: 'ENABLE_TIPS' |
|
204 |
}; |
|
205 |
} |
|
206 |
||
19 | 207 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/selectors.js |
208 |
/** |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
209 |
* WordPress dependencies |
19 | 210 |
*/ |
9 | 211 |
|
212 |
||
19 | 213 |
/** |
214 |
* An object containing information about a guide. |
|
215 |
* |
|
216 |
* @typedef {Object} NUXGuideInfo |
|
217 |
* @property {string[]} tipIds Which tips the guide contains. |
|
218 |
* @property {?string} currentTipId The guide's currently showing tip. |
|
219 |
* @property {?string} nextTipId The guide's next tip to show. |
|
220 |
*/ |
|
221 |
||
222 |
/** |
|
223 |
* Returns an object describing the guide, if any, that the given tip is a part |
|
224 |
* of. |
|
225 |
* |
|
226 |
* @param {Object} state Global application state. |
|
227 |
* @param {string} tipId The tip to query. |
|
228 |
* |
|
229 |
* @return {?NUXGuideInfo} Information about the associated guide. |
|
230 |
*/ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
231 |
const getAssociatedGuide = (0,external_wp_data_namespaceObject.createSelector)((state, tipId) => { |
19 | 232 |
for (const tipIds of state.guides) { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
233 |
if (tipIds.includes(tipId)) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
234 |
const nonDismissedTips = tipIds.filter(tId => !Object.keys(state.preferences.dismissedTips).includes(tId)); |
19 | 235 |
const [currentTipId = null, nextTipId = null] = nonDismissedTips; |
236 |
return { |
|
237 |
tipIds, |
|
238 |
currentTipId, |
|
239 |
nextTipId |
|
240 |
}; |
|
241 |
} |
|
242 |
} |
|
243 |
return null; |
|
244 |
}, state => [state.guides, state.preferences.dismissedTips]); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
245 |
|
19 | 246 |
/** |
247 |
* Determines whether or not the given tip is showing. Tips are hidden if they |
|
248 |
* are disabled, have been dismissed, or are not the current tip in any |
|
249 |
* guide that they have been added to. |
|
250 |
* |
|
251 |
* @param {Object} state Global application state. |
|
252 |
* @param {string} tipId The tip to query. |
|
253 |
* |
|
254 |
* @return {boolean} Whether or not the given tip is showing. |
|
255 |
*/ |
|
256 |
function isTipVisible(state, tipId) { |
|
257 |
if (!state.preferences.areTipsEnabled) { |
|
258 |
return false; |
|
259 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
260 |
if (state.preferences.dismissedTips?.hasOwnProperty(tipId)) { |
19 | 261 |
return false; |
262 |
} |
|
263 |
const associatedGuide = getAssociatedGuide(state, tipId); |
|
264 |
if (associatedGuide && associatedGuide.currentTipId !== tipId) { |
|
265 |
return false; |
|
266 |
} |
|
267 |
return true; |
|
268 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
269 |
|
19 | 270 |
/** |
271 |
* Returns whether or not tips are globally enabled. |
|
272 |
* |
|
273 |
* @param {Object} state Global application state. |
|
274 |
* |
|
275 |
* @return {boolean} Whether tips are globally enabled. |
|
276 |
*/ |
|
277 |
function selectors_areTipsEnabled(state) { |
|
278 |
return state.preferences.areTipsEnabled; |
|
279 |
} |
|
280 |
||
281 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/store/index.js |
|
282 |
/** |
|
283 |
* WordPress dependencies |
|
284 |
*/ |
|
285 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
286 |
|
19 | 287 |
/** |
288 |
* Internal dependencies |
|
289 |
*/ |
|
290 |
||
291 |
||
292 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
293 |
const STORE_NAME = 'core/nux'; |
9 | 294 |
|
19 | 295 |
/** |
296 |
* Store definition for the nux namespace. |
|
297 |
* |
|
298 |
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore |
|
299 |
* |
|
300 |
* @type {Object} |
|
301 |
*/ |
|
302 |
const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, { |
|
303 |
reducer: reducer, |
|
304 |
actions: actions_namespaceObject, |
|
305 |
selectors: selectors_namespaceObject, |
|
306 |
persist: ['preferences'] |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
307 |
}); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
308 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
309 |
// Once we build a more generic persistence plugin that works across types of stores |
19 | 310 |
// we'd be able to replace this with a register call. |
311 |
(0,external_wp_data_namespaceObject.registerStore)(STORE_NAME, { |
|
312 |
reducer: reducer, |
|
313 |
actions: actions_namespaceObject, |
|
314 |
selectors: selectors_namespaceObject, |
|
315 |
persist: ['preferences'] |
|
316 |
}); |
|
317 |
||
318 |
;// CONCATENATED MODULE: external ["wp","compose"] |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
319 |
const external_wp_compose_namespaceObject = window["wp"]["compose"]; |
19 | 320 |
;// CONCATENATED MODULE: external ["wp","components"] |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
321 |
const external_wp_components_namespaceObject = window["wp"]["components"]; |
19 | 322 |
;// CONCATENATED MODULE: external ["wp","i18n"] |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
323 |
const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
324 |
;// CONCATENATED MODULE: external ["wp","element"] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
325 |
const external_wp_element_namespaceObject = window["wp"]["element"]; |
19 | 326 |
;// CONCATENATED MODULE: external ["wp","primitives"] |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
327 |
const external_wp_primitives_namespaceObject = window["wp"]["primitives"]; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
328 |
;// CONCATENATED MODULE: external "ReactJSXRuntime" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
329 |
const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; |
19 | 330 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js |
9 | 331 |
/** |
332 |
* WordPress dependencies |
|
333 |
*/ |
|
334 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
335 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
336 |
const close_close = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { |
18 | 337 |
xmlns: "http://www.w3.org/2000/svg", |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
338 |
viewBox: "0 0 24 24", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
339 |
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
340 |
d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
341 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
342 |
}); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
343 |
/* harmony default export */ const library_close = (close_close); |
19 | 344 |
|
345 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/components/dot-tip/index.js |
|
346 |
/** |
|
347 |
* WordPress dependencies |
|
348 |
*/ |
|
349 |
||
350 |
||
351 |
||
352 |
||
353 |
||
354 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
355 |
|
19 | 356 |
/** |
357 |
* Internal dependencies |
|
358 |
*/ |
|
359 |
||
9 | 360 |
|
361 |
||
19 | 362 |
function onClick(event) { |
363 |
// Tips are often nested within buttons. We stop propagation so that clicking |
|
364 |
// on a tip doesn't result in the button being clicked. |
|
365 |
event.stopPropagation(); |
|
366 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
367 |
function DotTip({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
368 |
position = 'middle right', |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
369 |
children, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
370 |
isVisible, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
371 |
hasNextTip, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
372 |
onDismiss, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
373 |
onDisable |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
374 |
}) { |
19 | 375 |
const anchorParent = (0,external_wp_element_namespaceObject.useRef)(null); |
376 |
const onFocusOutsideCallback = (0,external_wp_element_namespaceObject.useCallback)(event => { |
|
377 |
if (!anchorParent.current) { |
|
378 |
return; |
|
379 |
} |
|
380 |
if (anchorParent.current.contains(event.relatedTarget)) { |
|
381 |
return; |
|
382 |
} |
|
383 |
onDisable(); |
|
384 |
}, [onDisable, anchorParent]); |
|
385 |
if (!isVisible) { |
|
386 |
return null; |
|
387 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
388 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Popover, { |
19 | 389 |
className: "nux-dot-tip", |
390 |
position: position, |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
391 |
focusOnMount: true, |
19 | 392 |
role: "dialog", |
393 |
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Editor tips'), |
|
394 |
onClick: onClick, |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
395 |
onFocusOutside: onFocusOutsideCallback, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
396 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
397 |
children: children |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
398 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
399 |
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
400 |
variant: "link", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
401 |
onClick: onDismiss, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
402 |
children: hasNextTip ? (0,external_wp_i18n_namespaceObject.__)('See next tip') : (0,external_wp_i18n_namespaceObject.__)('Got it') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
403 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
404 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
405 |
className: "nux-dot-tip__disable", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
406 |
icon: library_close, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
407 |
label: (0,external_wp_i18n_namespaceObject.__)('Disable tips'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
408 |
onClick: onDisable |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
409 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
410 |
}); |
19 | 411 |
} |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
412 |
/* harmony default export */ const dot_tip = ((0,external_wp_compose_namespaceObject.compose)((0,external_wp_data_namespaceObject.withSelect)((select, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
413 |
tipId |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
414 |
}) => { |
19 | 415 |
const { |
416 |
isTipVisible, |
|
417 |
getAssociatedGuide |
|
418 |
} = select(store); |
|
419 |
const associatedGuide = getAssociatedGuide(tipId); |
|
420 |
return { |
|
421 |
isVisible: isTipVisible(tipId), |
|
422 |
hasNextTip: !!(associatedGuide && associatedGuide.nextTipId) |
|
423 |
}; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
424 |
}), (0,external_wp_data_namespaceObject.withDispatch)((dispatch, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
425 |
tipId |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
426 |
}) => { |
19 | 427 |
const { |
428 |
dismissTip, |
|
429 |
disableTips |
|
430 |
} = dispatch(store); |
|
431 |
return { |
|
432 |
onDismiss() { |
|
433 |
dismissTip(tipId); |
|
434 |
}, |
|
435 |
onDisable() { |
|
436 |
disableTips(); |
|
437 |
} |
|
438 |
}; |
|
439 |
}))(DotTip)); |
|
440 |
||
441 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/nux/build-module/index.js |
|
442 |
/** |
|
443 |
* WordPress dependencies |
|
444 |
*/ |
|
445 |
||
446 |
||
447 |
||
448 |
external_wp_deprecated_default()('wp.nux', { |
|
449 |
since: '5.4', |
|
450 |
hint: 'wp.components.Guide can be used to show a user guide.', |
|
451 |
version: '6.2' |
|
452 |
}); |
|
453 |
||
454 |
(window.wp = window.wp || {}).nux = __webpack_exports__; |
|
455 |
/******/ })() |
|
456 |
; |