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 |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2 |
/******/ "use strict"; |
19 | 3 |
/******/ var __webpack_modules__ = ({ |
4 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
5 |
/***/ 7734: |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
6 |
/***/ ((module) => { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
7 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
8 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
9 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
10 |
// do not edit .js files directly - edit src/index.jst |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
11 |
|
19 | 12 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
13 |
var envHasBigInt64Array = typeof BigInt64Array !== 'undefined'; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
14 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
15 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
16 |
module.exports = function equal(a, b) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
17 |
if (a === b) return true; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
18 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
19 |
if (a && b && typeof a == 'object' && typeof b == 'object') { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
20 |
if (a.constructor !== b.constructor) return false; |
19 | 21 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
22 |
var length, i, keys; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
23 |
if (Array.isArray(a)) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
24 |
length = a.length; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
25 |
if (length != b.length) return false; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
26 |
for (i = length; i-- !== 0;) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
27 |
if (!equal(a[i], b[i])) return false; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
28 |
return true; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
29 |
} |
19 | 30 |
|
31 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
32 |
if ((a instanceof Map) && (b instanceof Map)) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
33 |
if (a.size !== b.size) return false; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
34 |
for (i of a.entries()) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
35 |
if (!b.has(i[0])) return false; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
36 |
for (i of a.entries()) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
37 |
if (!equal(i[1], b.get(i[0]))) return false; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
38 |
return true; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
39 |
} |
19 | 40 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
41 |
if ((a instanceof Set) && (b instanceof Set)) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
42 |
if (a.size !== b.size) return false; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
43 |
for (i of a.entries()) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
44 |
if (!b.has(i[0])) return false; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
45 |
return true; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
46 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
47 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
48 |
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
49 |
length = a.length; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
50 |
if (length != b.length) return false; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
51 |
for (i = length; i-- !== 0;) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
52 |
if (a[i] !== b[i]) return false; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
53 |
return true; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
54 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
55 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
56 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
57 |
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
58 |
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
59 |
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); |
19 | 60 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
61 |
keys = Object.keys(a); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
62 |
length = keys.length; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
63 |
if (length !== Object.keys(b).length) return false; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
64 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
65 |
for (i = length; i-- !== 0;) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
66 |
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
67 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
68 |
for (i = length; i-- !== 0;) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
69 |
var key = keys[i]; |
19 | 70 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
71 |
if (!equal(a[key], b[key])) return false; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
72 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
73 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
74 |
return true; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
75 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
76 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
77 |
// true if both NaN, false otherwise |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
78 |
return a!==a && b!==b; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
79 |
}; |
19 | 80 |
|
81 |
||
82 |
/***/ }) |
|
83 |
||
84 |
/******/ }); |
|
85 |
/************************************************************************/ |
|
18 | 86 |
/******/ // The module cache |
19 | 87 |
/******/ var __webpack_module_cache__ = {}; |
88 |
/******/ |
|
18 | 89 |
/******/ // The require function |
90 |
/******/ function __webpack_require__(moduleId) { |
|
91 |
/******/ // Check if module is in cache |
|
19 | 92 |
/******/ var cachedModule = __webpack_module_cache__[moduleId]; |
93 |
/******/ if (cachedModule !== undefined) { |
|
94 |
/******/ return cachedModule.exports; |
|
18 | 95 |
/******/ } |
96 |
/******/ // Create a new module (and put it into the cache) |
|
19 | 97 |
/******/ var module = __webpack_module_cache__[moduleId] = { |
98 |
/******/ // no module.id needed |
|
99 |
/******/ // no module.loaded needed |
|
18 | 100 |
/******/ exports: {} |
101 |
/******/ }; |
|
19 | 102 |
/******/ |
18 | 103 |
/******/ // Execute the module function |
19 | 104 |
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
105 |
/******/ |
|
18 | 106 |
/******/ // Return the exports of the module |
107 |
/******/ return module.exports; |
|
108 |
/******/ } |
|
19 | 109 |
/******/ |
18 | 110 |
/************************************************************************/ |
19 | 111 |
/******/ /* 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
|
112 |
/******/ (() => { |
19 | 113 |
/******/ // 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
|
114 |
/******/ __webpack_require__.n = (module) => { |
19 | 115 |
/******/ 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
|
116 |
/******/ () => (module['default']) : |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
117 |
/******/ () => (module); |
19 | 118 |
/******/ __webpack_require__.d(getter, { a: getter }); |
119 |
/******/ return getter; |
|
120 |
/******/ }; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
121 |
/******/ })(); |
19 | 122 |
/******/ |
123 |
/******/ /* 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
|
124 |
/******/ (() => { |
19 | 125 |
/******/ // 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
|
126 |
/******/ __webpack_require__.d = (exports, definition) => { |
19 | 127 |
/******/ for(var key in definition) { |
128 |
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
|
129 |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
|
130 |
/******/ } |
|
131 |
/******/ } |
|
132 |
/******/ }; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
133 |
/******/ })(); |
19 | 134 |
/******/ |
135 |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
136 |
/******/ (() => { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
137 |
/******/ __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
|
138 |
/******/ })(); |
19 | 139 |
/******/ |
140 |
/******/ /* 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
|
141 |
/******/ (() => { |
19 | 142 |
/******/ // define __esModule on exports |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
143 |
/******/ __webpack_require__.r = (exports) => { |
19 | 144 |
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
145 |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
|
146 |
/******/ } |
|
147 |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); |
|
148 |
/******/ }; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
149 |
/******/ })(); |
19 | 150 |
/******/ |
151 |
/************************************************************************/ |
|
152 |
var __webpack_exports__ = {}; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
153 |
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
154 |
(() => { |
18 | 155 |
// ESM COMPAT FLAG |
156 |
__webpack_require__.r(__webpack_exports__); |
|
157 |
||
158 |
// EXPORTS |
|
19 | 159 |
__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
|
160 |
initialize: () => (/* binding */ initialize), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
161 |
store: () => (/* reexport */ store) |
19 | 162 |
}); |
18 | 163 |
|
164 |
// NAMESPACE OBJECT: ./node_modules/@wordpress/customize-widgets/build-module/store/selectors.js |
|
165 |
var selectors_namespaceObject = {}; |
|
166 |
__webpack_require__.r(selectors_namespaceObject); |
|
19 | 167 |
__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
|
168 |
__experimentalGetInsertionPoint: () => (__experimentalGetInsertionPoint), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
169 |
isInserterOpened: () => (isInserterOpened) |
19 | 170 |
}); |
18 | 171 |
|
172 |
// NAMESPACE OBJECT: ./node_modules/@wordpress/customize-widgets/build-module/store/actions.js |
|
173 |
var actions_namespaceObject = {}; |
|
174 |
__webpack_require__.r(actions_namespaceObject); |
|
19 | 175 |
__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
|
176 |
setIsInserterOpened: () => (setIsInserterOpened) |
19 | 177 |
}); |
178 |
||
179 |
;// CONCATENATED MODULE: external ["wp","element"] |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
180 |
const external_wp_element_namespaceObject = window["wp"]["element"]; |
19 | 181 |
;// CONCATENATED MODULE: external ["wp","blockLibrary"] |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
182 |
const external_wp_blockLibrary_namespaceObject = window["wp"]["blockLibrary"]; |
19 | 183 |
;// CONCATENATED MODULE: external ["wp","widgets"] |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
184 |
const external_wp_widgets_namespaceObject = window["wp"]["widgets"]; |
19 | 185 |
;// CONCATENATED MODULE: external ["wp","blocks"] |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
186 |
const external_wp_blocks_namespaceObject = window["wp"]["blocks"]; |
19 | 187 |
;// 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
|
188 |
const external_wp_data_namespaceObject = window["wp"]["data"]; |
19 | 189 |
;// CONCATENATED MODULE: external ["wp","preferences"] |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
190 |
const external_wp_preferences_namespaceObject = window["wp"]["preferences"]; |
19 | 191 |
;// 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
|
192 |
const external_wp_components_namespaceObject = window["wp"]["components"]; |
19 | 193 |
;// 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
|
194 |
const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; |
19 | 195 |
;// CONCATENATED MODULE: external ["wp","blockEditor"] |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
196 |
const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"]; |
19 | 197 |
;// 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
|
198 |
const external_wp_compose_namespaceObject = window["wp"]["compose"]; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
199 |
;// CONCATENATED MODULE: external ["wp","hooks"] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
200 |
const external_wp_hooks_namespaceObject = window["wp"]["hooks"]; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
201 |
;// CONCATENATED MODULE: external "ReactJSXRuntime" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
202 |
const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; |
19 | 203 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/error-boundary/index.js |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
204 |
/** |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
205 |
* WordPress dependencies |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
206 |
*/ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
207 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
208 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
209 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
210 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
211 |
|
18 | 212 |
|
213 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
214 |
function CopyButton({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
215 |
text, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
216 |
children |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
217 |
}) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
218 |
const ref = (0,external_wp_compose_namespaceObject.useCopyToClipboard)(text); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
219 |
return /*#__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
|
220 |
variant: "secondary", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
221 |
ref: ref, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
222 |
children: children |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
223 |
}); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
224 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
225 |
class ErrorBoundary extends external_wp_element_namespaceObject.Component { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
226 |
constructor() { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
227 |
super(...arguments); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
228 |
this.state = { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
229 |
error: null |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
230 |
}; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
231 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
232 |
componentDidCatch(error) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
233 |
this.setState({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
234 |
error |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
235 |
}); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
236 |
(0,external_wp_hooks_namespaceObject.doAction)('editor.ErrorBoundary.errorLogged', error); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
237 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
238 |
render() { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
239 |
const { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
240 |
error |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
241 |
} = this.state; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
242 |
if (!error) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
243 |
return this.props.children; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
244 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
245 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
246 |
className: "customize-widgets-error-boundary", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
247 |
actions: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CopyButton, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
248 |
text: error.stack, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
249 |
children: (0,external_wp_i18n_namespaceObject.__)('Copy Error') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
250 |
}, "copy-error")], |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
251 |
children: (0,external_wp_i18n_namespaceObject.__)('The editor has encountered an unexpected error.') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
252 |
}); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
253 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
254 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
255 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
256 |
;// CONCATENATED MODULE: external ["wp","coreData"] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
257 |
const external_wp_coreData_namespaceObject = window["wp"]["coreData"]; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
258 |
;// CONCATENATED MODULE: external ["wp","mediaUtils"] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
259 |
const external_wp_mediaUtils_namespaceObject = window["wp"]["mediaUtils"]; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
260 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-inspector-button/index.js |
18 | 261 |
/** |
262 |
* WordPress dependencies |
|
263 |
*/ |
|
264 |
||
265 |
||
266 |
||
267 |
||
268 |
||
269 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
270 |
function BlockInspectorButton({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
271 |
inspector, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
272 |
closeMenu, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
273 |
...props |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
274 |
}) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
275 |
const selectedBlockClientId = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getSelectedBlockClientId(), []); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
276 |
const selectedBlock = (0,external_wp_element_namespaceObject.useMemo)(() => document.getElementById(`block-${selectedBlockClientId}`), [selectedBlockClientId]); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
277 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
278 |
onClick: () => { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
279 |
// Open the inspector. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
280 |
inspector.open({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
281 |
returnFocusWhenClose: selectedBlock |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
282 |
}); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
283 |
// Then close the dropdown menu. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
284 |
closeMenu(); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
285 |
}, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
286 |
...props, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
287 |
children: (0,external_wp_i18n_namespaceObject.__)('Show more settings') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
288 |
}); |
18 | 289 |
} |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
290 |
/* harmony default export */ const block_inspector_button = (BlockInspectorButton); |
18 | 291 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
292 |
;// CONCATENATED MODULE: ./node_modules/clsx/dist/clsx.mjs |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
293 |
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
294 |
;// CONCATENATED MODULE: external ["wp","keycodes"] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
295 |
const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"]; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
296 |
;// CONCATENATED MODULE: external ["wp","primitives"] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
297 |
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
|
298 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js |
18 | 299 |
/** |
300 |
* WordPress dependencies |
|
301 |
*/ |
|
302 |
||
303 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
304 |
const undo = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
305 |
xmlns: "http://www.w3.org/2000/svg", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
306 |
viewBox: "0 0 24 24", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
307 |
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
|
308 |
d: "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
309 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
310 |
}); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
311 |
/* harmony default export */ const library_undo = (undo); |
18 | 312 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
313 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js |
18 | 314 |
/** |
19 | 315 |
* WordPress dependencies |
18 | 316 |
*/ |
317 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
318 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
319 |
const redo = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { |
19 | 320 |
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
|
321 |
viewBox: "0 0 24 24", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
322 |
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
|
323 |
d: "M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
324 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
325 |
}); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
326 |
/* harmony default export */ const library_redo = (redo); |
19 | 327 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
328 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js |
18 | 329 |
/** |
330 |
* WordPress dependencies |
|
331 |
*/ |
|
332 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
333 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
334 |
const plus = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { |
19 | 335 |
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
|
336 |
viewBox: "0 0 24 24", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
337 |
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
|
338 |
d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
339 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
340 |
}); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
341 |
/* harmony default export */ const library_plus = (plus); |
19 | 342 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
343 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js |
18 | 344 |
/** |
19 | 345 |
* WordPress dependencies |
18 | 346 |
*/ |
347 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
348 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
349 |
const closeSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { |
19 | 350 |
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
|
351 |
viewBox: "0 0 24 24", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
352 |
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
|
353 |
d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
354 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
355 |
}); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
356 |
/* harmony default export */ const close_small = (closeSmall); |
19 | 357 |
|
358 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/reducer.js |
|
359 |
/** |
|
360 |
* WordPress dependencies |
|
361 |
*/ |
|
362 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
363 |
|
18 | 364 |
/** |
365 |
* Reducer tracking whether the inserter is open. |
|
366 |
* |
|
367 |
* @param {boolean|Object} state |
|
368 |
* @param {Object} action |
|
369 |
*/ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
370 |
function blockInserterPanel(state = false, action) { |
18 | 371 |
switch (action.type) { |
372 |
case 'SET_IS_INSERTER_OPENED': |
|
373 |
return action.value; |
|
374 |
} |
|
375 |
return state; |
|
376 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
377 |
/* harmony default export */ const reducer = ((0,external_wp_data_namespaceObject.combineReducers)({ |
19 | 378 |
blockInserterPanel |
18 | 379 |
})); |
380 |
||
19 | 381 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/selectors.js |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
382 |
const EMPTY_INSERTION_POINT = { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
383 |
rootClientId: undefined, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
384 |
insertionIndex: undefined |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
385 |
}; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
386 |
|
18 | 387 |
/** |
388 |
* Returns true if the inserter is opened. |
|
389 |
* |
|
390 |
* @param {Object} state Global application state. |
|
391 |
* |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
392 |
* @example |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
393 |
* ```js |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
394 |
* import { store as customizeWidgetsStore } from '@wordpress/customize-widgets'; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
395 |
* import { __ } from '@wordpress/i18n'; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
396 |
* import { useSelect } from '@wordpress/data'; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
397 |
* |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
398 |
* const ExampleComponent = () => { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
399 |
* const { isInserterOpened } = useSelect( |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
400 |
* ( select ) => select( customizeWidgetsStore ), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
401 |
* [] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
402 |
* ); |
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 |
* return isInserterOpened() |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
405 |
* ? __( 'Inserter is open' ) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
406 |
* : __( 'Inserter is closed.' ); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
407 |
* }; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
408 |
* ``` |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
409 |
* |
18 | 410 |
* @return {boolean} Whether the inserter is opened. |
411 |
*/ |
|
19 | 412 |
function isInserterOpened(state) { |
18 | 413 |
return !!state.blockInserterPanel; |
414 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
415 |
|
18 | 416 |
/** |
417 |
* Get the insertion point for the inserter. |
|
418 |
* |
|
419 |
* @param {Object} state Global application state. |
|
420 |
* |
|
421 |
* @return {Object} The root client ID and index to insert at. |
|
422 |
*/ |
|
423 |
function __experimentalGetInsertionPoint(state) { |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
424 |
if (typeof state.blockInserterPanel === 'boolean') { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
425 |
return EMPTY_INSERTION_POINT; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
426 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
427 |
return state.blockInserterPanel; |
18 | 428 |
} |
429 |
||
19 | 430 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/actions.js |
18 | 431 |
/** |
432 |
* Returns an action object used to open/close the inserter. |
|
433 |
* |
|
434 |
* @param {boolean|Object} value Whether the inserter should be |
|
435 |
* opened (true) or closed (false). |
|
436 |
* To specify an insertion point, |
|
437 |
* use an object. |
|
438 |
* @param {string} value.rootClientId The root client ID to insert at. |
|
439 |
* @param {number} value.insertionIndex The index to insert at. |
|
440 |
* |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
441 |
* @example |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
442 |
* ```js |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
443 |
* import { useState } from 'react'; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
444 |
* import { store as customizeWidgetsStore } from '@wordpress/customize-widgets'; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
445 |
* import { __ } from '@wordpress/i18n'; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
446 |
* import { useDispatch } from '@wordpress/data'; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
447 |
* import { Button } from '@wordpress/components'; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
448 |
* |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
449 |
* const ExampleComponent = () => { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
450 |
* const { setIsInserterOpened } = useDispatch( customizeWidgetsStore ); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
451 |
* const [ isOpen, setIsOpen ] = useState( false ); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
452 |
* |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
453 |
* return ( |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
454 |
* <Button |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
455 |
* onClick={ () => { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
456 |
* setIsInserterOpened( ! isOpen ); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
457 |
* setIsOpen( ! isOpen ); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
458 |
* } } |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
459 |
* > |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
460 |
* { __( 'Open/close inserter' ) } |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
461 |
* </Button> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
462 |
* ); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
463 |
* }; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
464 |
* ``` |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
465 |
* |
18 | 466 |
* @return {Object} Action object. |
467 |
*/ |
|
19 | 468 |
function setIsInserterOpened(value) { |
18 | 469 |
return { |
470 |
type: 'SET_IS_INSERTER_OPENED', |
|
471 |
value |
|
472 |
}; |
|
473 |
} |
|
474 |
||
19 | 475 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/constants.js |
18 | 476 |
/** |
477 |
* Module Constants |
|
478 |
*/ |
|
479 |
const STORE_NAME = 'core/customize-widgets'; |
|
480 |
||
19 | 481 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/index.js |
18 | 482 |
/** |
483 |
* WordPress dependencies |
|
484 |
*/ |
|
485 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
486 |
|
18 | 487 |
/** |
488 |
* Internal dependencies |
|
489 |
*/ |
|
490 |
||
491 |
||
492 |
||
493 |
||
494 |
||
495 |
/** |
|
496 |
* Block editor data store configuration. |
|
497 |
* |
|
19 | 498 |
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registering-a-store |
18 | 499 |
* |
500 |
* @type {Object} |
|
501 |
*/ |
|
502 |
const storeConfig = { |
|
503 |
reducer: reducer, |
|
504 |
selectors: selectors_namespaceObject, |
|
19 | 505 |
actions: actions_namespaceObject |
18 | 506 |
}; |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
507 |
|
18 | 508 |
/** |
509 |
* Store definition for the edit widgets namespace. |
|
510 |
* |
|
511 |
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore |
|
512 |
* |
|
513 |
* @type {Object} |
|
514 |
*/ |
|
19 | 515 |
const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, storeConfig); |
516 |
(0,external_wp_data_namespaceObject.register)(store); |
|
517 |
||
518 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/inserter/index.js |
|
18 | 519 |
/** |
520 |
* WordPress dependencies |
|
521 |
*/ |
|
522 |
||
523 |
||
524 |
||
525 |
||
526 |
||
527 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
528 |
|
18 | 529 |
/** |
530 |
* Internal dependencies |
|
531 |
*/ |
|
532 |
||
533 |
||
534 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
535 |
function Inserter({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
536 |
setIsOpened |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
537 |
}) { |
19 | 538 |
const inserterTitleId = (0,external_wp_compose_namespaceObject.useInstanceId)(Inserter, 'customize-widget-layout__inserter-panel-title'); |
539 |
const insertionPoint = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).__experimentalGetInsertionPoint(), []); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
540 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
18 | 541 |
className: "customize-widgets-layout__inserter-panel", |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
542 |
"aria-labelledby": inserterTitleId, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
543 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
544 |
className: "customize-widgets-layout__inserter-panel-header", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
545 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
546 |
id: inserterTitleId, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
547 |
className: "customize-widgets-layout__inserter-panel-header-title", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
548 |
children: (0,external_wp_i18n_namespaceObject.__)('Add a block') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
549 |
}), /*#__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
|
550 |
className: "customize-widgets-layout__inserter-panel-header-close-button", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
551 |
icon: close_small, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
552 |
onClick: () => setIsOpened(false), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
553 |
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Close inserter') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
554 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
555 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
556 |
className: "customize-widgets-layout__inserter-panel-content", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
557 |
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalLibrary, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
558 |
rootClientId: insertionPoint.rootClientId, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
559 |
__experimentalInsertionIndex: insertionPoint.insertionIndex, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
560 |
showInserterHelpPanel: true, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
561 |
onSelect: () => setIsOpened(false) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
562 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
563 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
564 |
}); |
18 | 565 |
} |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
566 |
/* harmony default export */ const components_inserter = (Inserter); |
19 | 567 |
|
568 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js |
|
569 |
/** |
|
570 |
* WordPress dependencies |
|
571 |
*/ |
|
572 |
||
573 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
574 |
const moreVertical = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
575 |
xmlns: "http://www.w3.org/2000/svg", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
576 |
viewBox: "0 0 24 24", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
577 |
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
|
578 |
d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
579 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
580 |
}); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
581 |
/* harmony default export */ const more_vertical = (moreVertical); |
19 | 582 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
583 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js |
19 | 584 |
/** |
585 |
* WordPress dependencies |
|
586 |
*/ |
|
587 |
||
588 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
589 |
const external = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
590 |
xmlns: "http://www.w3.org/2000/svg", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
591 |
viewBox: "0 0 24 24", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
592 |
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
|
593 |
d: "M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
594 |
}) |
19 | 595 |
}); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
596 |
/* harmony default export */ const library_external = (external); |
19 | 597 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
598 |
;// CONCATENATED MODULE: external ["wp","keyboardShortcuts"] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
599 |
const external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"]; |
19 | 600 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/config.js |
18 | 601 |
/** |
602 |
* WordPress dependencies |
|
603 |
*/ |
|
604 |
||
605 |
const textFormattingShortcuts = [{ |
|
606 |
keyCombination: { |
|
607 |
modifier: 'primary', |
|
608 |
character: 'b' |
|
609 |
}, |
|
19 | 610 |
description: (0,external_wp_i18n_namespaceObject.__)('Make the selected text bold.') |
18 | 611 |
}, { |
612 |
keyCombination: { |
|
613 |
modifier: 'primary', |
|
614 |
character: 'i' |
|
615 |
}, |
|
19 | 616 |
description: (0,external_wp_i18n_namespaceObject.__)('Make the selected text italic.') |
18 | 617 |
}, { |
618 |
keyCombination: { |
|
619 |
modifier: 'primary', |
|
620 |
character: 'k' |
|
621 |
}, |
|
19 | 622 |
description: (0,external_wp_i18n_namespaceObject.__)('Convert the selected text into a link.') |
18 | 623 |
}, { |
624 |
keyCombination: { |
|
625 |
modifier: 'primaryShift', |
|
626 |
character: 'k' |
|
627 |
}, |
|
19 | 628 |
description: (0,external_wp_i18n_namespaceObject.__)('Remove a link.') |
18 | 629 |
}, { |
630 |
keyCombination: { |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
631 |
character: '[[' |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
632 |
}, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
633 |
description: (0,external_wp_i18n_namespaceObject.__)('Insert a link to a post or page.') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
634 |
}, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
635 |
keyCombination: { |
18 | 636 |
modifier: 'primary', |
637 |
character: 'u' |
|
638 |
}, |
|
19 | 639 |
description: (0,external_wp_i18n_namespaceObject.__)('Underline the selected text.') |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
640 |
}, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
641 |
keyCombination: { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
642 |
modifier: 'access', |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
643 |
character: 'd' |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
644 |
}, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
645 |
description: (0,external_wp_i18n_namespaceObject.__)('Strikethrough the selected text.') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
646 |
}, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
647 |
keyCombination: { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
648 |
modifier: 'access', |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
649 |
character: 'x' |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
650 |
}, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
651 |
description: (0,external_wp_i18n_namespaceObject.__)('Make the selected text inline code.') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
652 |
}, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
653 |
keyCombination: { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
654 |
modifier: 'access', |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
655 |
character: '0' |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
656 |
}, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
657 |
aliases: [{ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
658 |
modifier: 'access', |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
659 |
character: '7' |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
660 |
}], |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
661 |
description: (0,external_wp_i18n_namespaceObject.__)('Convert the current heading to a paragraph.') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
662 |
}, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
663 |
keyCombination: { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
664 |
modifier: 'access', |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
665 |
character: '1-6' |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
666 |
}, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
667 |
description: (0,external_wp_i18n_namespaceObject.__)('Convert the current paragraph or heading to a heading of level 1 to 6.') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
668 |
}, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
669 |
keyCombination: { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
670 |
modifier: 'primaryShift', |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
671 |
character: 'SPACE' |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
672 |
}, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
673 |
description: (0,external_wp_i18n_namespaceObject.__)('Add non breaking space.') |
18 | 674 |
}]; |
675 |
||
19 | 676 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/shortcut.js |
18 | 677 |
/** |
678 |
* WordPress dependencies |
|
679 |
*/ |
|
680 |
||
681 |
||
682 |
||
683 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
684 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
685 |
function KeyCombination({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
686 |
keyCombination, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
687 |
forceAriaLabel |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
688 |
}) { |
19 | 689 |
const shortcut = keyCombination.modifier ? external_wp_keycodes_namespaceObject.displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character; |
690 |
const ariaLabel = keyCombination.modifier ? external_wp_keycodes_namespaceObject.shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
691 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("kbd", { |
18 | 692 |
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination", |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
693 |
"aria-label": forceAriaLabel || ariaLabel, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
694 |
children: (Array.isArray(shortcut) ? shortcut : [shortcut]).map((character, index) => { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
695 |
if (character === '+') { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
696 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.Fragment, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
697 |
children: character |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
698 |
}, index); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
699 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
700 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("kbd", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
701 |
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
702 |
children: character |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
703 |
}, index); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
704 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
705 |
}); |
18 | 706 |
} |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
707 |
function Shortcut({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
708 |
description, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
709 |
keyCombination, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
710 |
aliases = [], |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
711 |
ariaLabel |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
712 |
}) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
713 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
714 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
715 |
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-description", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
716 |
children: description |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
717 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
718 |
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-term", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
719 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(KeyCombination, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
720 |
keyCombination: keyCombination, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
721 |
forceAriaLabel: ariaLabel |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
722 |
}), aliases.map((alias, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(KeyCombination, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
723 |
keyCombination: alias, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
724 |
forceAriaLabel: ariaLabel |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
725 |
}, index))] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
726 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
727 |
}); |
18 | 728 |
} |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
729 |
/* harmony default export */ const keyboard_shortcut_help_modal_shortcut = (Shortcut); |
18 | 730 |
|
19 | 731 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js |
18 | 732 |
/** |
733 |
* WordPress dependencies |
|
734 |
*/ |
|
735 |
||
736 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
737 |
|
18 | 738 |
/** |
739 |
* Internal dependencies |
|
740 |
*/ |
|
741 |
||
742 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
743 |
function DynamicShortcut({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
744 |
name |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
745 |
}) { |
18 | 746 |
const { |
747 |
keyCombination, |
|
748 |
description, |
|
749 |
aliases |
|
19 | 750 |
} = (0,external_wp_data_namespaceObject.useSelect)(select => { |
18 | 751 |
const { |
752 |
getShortcutKeyCombination, |
|
753 |
getShortcutDescription, |
|
754 |
getShortcutAliases |
|
19 | 755 |
} = select(external_wp_keyboardShortcuts_namespaceObject.store); |
18 | 756 |
return { |
757 |
keyCombination: getShortcutKeyCombination(name), |
|
758 |
aliases: getShortcutAliases(name), |
|
759 |
description: getShortcutDescription(name) |
|
760 |
}; |
|
19 | 761 |
}, [name]); |
18 | 762 |
if (!keyCombination) { |
763 |
return null; |
|
764 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
765 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcut_help_modal_shortcut, { |
18 | 766 |
keyCombination: keyCombination, |
767 |
description: description, |
|
768 |
aliases: aliases |
|
769 |
}); |
|
770 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
771 |
/* harmony default export */ const dynamic_shortcut = (DynamicShortcut); |
18 | 772 |
|
19 | 773 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/index.js |
18 | 774 |
/** |
775 |
* External dependencies |
|
776 |
*/ |
|
777 |
||
778 |
||
779 |
/** |
|
780 |
* WordPress dependencies |
|
781 |
*/ |
|
782 |
||
783 |
||
784 |
||
785 |
||
786 |
||
787 |
/** |
|
788 |
* Internal dependencies |
|
789 |
*/ |
|
790 |
||
791 |
||
792 |
||
793 |
||
794 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
795 |
const ShortcutList = ({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
796 |
shortcuts |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
797 |
}) => |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
798 |
/*#__PURE__*/ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
799 |
/* |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
800 |
* Disable reason: The `list` ARIA role is redundant but |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
801 |
* Safari+VoiceOver won't announce the list otherwise. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
802 |
*/ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
803 |
/* eslint-disable jsx-a11y/no-redundant-roles */ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
804 |
(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
805 |
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
806 |
role: "list", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
807 |
children: shortcuts.map((shortcut, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
808 |
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
809 |
children: typeof shortcut === 'string' ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(dynamic_shortcut, { |
19 | 810 |
name: shortcut |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
811 |
}) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcut_help_modal_shortcut, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
812 |
...shortcut |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
813 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
814 |
}, index)) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
815 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
816 |
/* eslint-enable jsx-a11y/no-redundant-roles */; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
817 |
const ShortcutSection = ({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
818 |
title, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
819 |
shortcuts, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
820 |
className |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
821 |
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("section", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
822 |
className: dist_clsx('customize-widgets-keyboard-shortcut-help-modal__section', className), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
823 |
children: [!!title && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
824 |
className: "customize-widgets-keyboard-shortcut-help-modal__section-title", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
825 |
children: title |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
826 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutList, { |
19 | 827 |
shortcuts: shortcuts |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
828 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
829 |
}); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
830 |
const ShortcutCategorySection = ({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
831 |
title, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
832 |
categoryName, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
833 |
additionalShortcuts = [] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
834 |
}) => { |
19 | 835 |
const categoryShortcuts = (0,external_wp_data_namespaceObject.useSelect)(select => { |
836 |
return select(external_wp_keyboardShortcuts_namespaceObject.store).getCategoryShortcuts(categoryName); |
|
18 | 837 |
}, [categoryName]); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
838 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutSection, { |
18 | 839 |
title: title, |
840 |
shortcuts: categoryShortcuts.concat(additionalShortcuts) |
|
841 |
}); |
|
842 |
}; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
843 |
function KeyboardShortcutHelpModal({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
844 |
isModalActive, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
845 |
toggleModal |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
846 |
}) { |
18 | 847 |
const { |
848 |
registerShortcut |
|
19 | 849 |
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store); |
18 | 850 |
registerShortcut({ |
851 |
name: 'core/customize-widgets/keyboard-shortcuts', |
|
852 |
category: 'main', |
|
19 | 853 |
description: (0,external_wp_i18n_namespaceObject.__)('Display these keyboard shortcuts.'), |
18 | 854 |
keyCombination: { |
855 |
modifier: 'access', |
|
856 |
character: 'h' |
|
857 |
} |
|
858 |
}); |
|
19 | 859 |
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/keyboard-shortcuts', toggleModal); |
18 | 860 |
if (!isModalActive) { |
861 |
return null; |
|
862 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
863 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Modal, { |
18 | 864 |
className: "customize-widgets-keyboard-shortcut-help-modal", |
19 | 865 |
title: (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts'), |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
866 |
onRequestClose: toggleModal, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
867 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutSection, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
868 |
className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
869 |
shortcuts: ['core/customize-widgets/keyboard-shortcuts'] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
870 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutCategorySection, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
871 |
title: (0,external_wp_i18n_namespaceObject.__)('Global shortcuts'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
872 |
categoryName: "global" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
873 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutCategorySection, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
874 |
title: (0,external_wp_i18n_namespaceObject.__)('Selection shortcuts'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
875 |
categoryName: "selection" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
876 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutCategorySection, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
877 |
title: (0,external_wp_i18n_namespaceObject.__)('Block shortcuts'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
878 |
categoryName: "block", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
879 |
additionalShortcuts: [{ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
880 |
keyCombination: { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
881 |
character: '/' |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
882 |
}, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
883 |
description: (0,external_wp_i18n_namespaceObject.__)('Change the block type after adding a new paragraph.'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
884 |
/* translators: The forward-slash character. e.g. '/'. */ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
885 |
ariaLabel: (0,external_wp_i18n_namespaceObject.__)('Forward-slash') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
886 |
}] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
887 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutSection, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
888 |
title: (0,external_wp_i18n_namespaceObject.__)('Text formatting'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
889 |
shortcuts: textFormattingShortcuts |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
890 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
891 |
}); |
18 | 892 |
} |
893 |
||
19 | 894 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/more-menu/index.js |
18 | 895 |
/** |
896 |
* WordPress dependencies |
|
897 |
*/ |
|
898 |
||
899 |
||
900 |
||
901 |
||
902 |
||
903 |
||
19 | 904 |
|
905 |
||
18 | 906 |
/** |
907 |
* Internal dependencies |
|
908 |
*/ |
|
909 |
||
910 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
911 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
912 |
|
18 | 913 |
function MoreMenu() { |
19 | 914 |
const [isKeyboardShortcutsModalActive, setIsKeyboardShortcutsModalVisible] = (0,external_wp_element_namespaceObject.useState)(false); |
18 | 915 |
const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive); |
19 | 916 |
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/keyboard-shortcuts', toggleKeyboardShortcutsModal); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
917 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
918 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarDropdownMenu, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
919 |
icon: more_vertical, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
920 |
label: (0,external_wp_i18n_namespaceObject.__)('Options'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
921 |
popoverProps: { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
922 |
placement: 'bottom-end', |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
923 |
className: 'more-menu-dropdown__content' |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
924 |
}, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
925 |
toggleProps: { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
926 |
tooltipPosition: 'bottom', |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
927 |
size: 'compact' |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
928 |
}, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
929 |
children: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
930 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
931 |
label: (0,external_wp_i18n_namespaceObject._x)('View', 'noun'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
932 |
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
933 |
scope: "core/customize-widgets", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
934 |
name: "fixedToolbar", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
935 |
label: (0,external_wp_i18n_namespaceObject.__)('Top toolbar'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
936 |
info: (0,external_wp_i18n_namespaceObject.__)('Access all block and document tools in a single place'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
937 |
messageActivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar activated'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
938 |
messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar deactivated') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
939 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
940 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuGroup, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
941 |
label: (0,external_wp_i18n_namespaceObject.__)('Tools'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
942 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
943 |
onClick: () => { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
944 |
setIsKeyboardShortcutsModalVisible(true); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
945 |
}, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
946 |
shortcut: external_wp_keycodes_namespaceObject.displayShortcut.access('h'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
947 |
children: (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
948 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
949 |
scope: "core/customize-widgets", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
950 |
name: "welcomeGuide", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
951 |
label: (0,external_wp_i18n_namespaceObject.__)('Welcome Guide') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
952 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuItem, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
953 |
role: "menuitem", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
954 |
icon: library_external, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
955 |
href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/block-based-widgets-editor/'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
956 |
target: "_blank", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
957 |
rel: "noopener noreferrer", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
958 |
children: [(0,external_wp_i18n_namespaceObject.__)('Help'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
959 |
as: "span", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
960 |
children: /* translators: accessibility text */ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
961 |
(0,external_wp_i18n_namespaceObject.__)('(opens in a new tab)') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
962 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
963 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
964 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
965 |
label: (0,external_wp_i18n_namespaceObject.__)('Preferences'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
966 |
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
967 |
scope: "core/customize-widgets", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
968 |
name: "keepCaretInsideBlock", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
969 |
label: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
970 |
info: (0,external_wp_i18n_namespaceObject.__)('Aids screen readers by stopping text caret from leaving blocks.'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
971 |
messageActivated: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block activated'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
972 |
messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block deactivated') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
973 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
974 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
975 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
976 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(KeyboardShortcutHelpModal, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
977 |
isModalActive: isKeyboardShortcutsModalActive, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
978 |
toggleModal: toggleKeyboardShortcutsModal |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
979 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
980 |
}); |
18 | 981 |
} |
982 |
||
19 | 983 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/header/index.js |
18 | 984 |
/** |
985 |
* External dependencies |
|
986 |
*/ |
|
987 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
988 |
|
18 | 989 |
/** |
990 |
* WordPress dependencies |
|
991 |
*/ |
|
992 |
||
993 |
||
994 |
||
995 |
||
996 |
||
997 |
||
998 |
||
999 |
/** |
|
1000 |
* Internal dependencies |
|
1001 |
*/ |
|
1002 |
||
1003 |
||
1004 |
||
1005 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1006 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1007 |
function Header({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1008 |
sidebar, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1009 |
inserter, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1010 |
isInserterOpened, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1011 |
setIsInserterOpened, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1012 |
isFixedToolbarActive |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1013 |
}) { |
19 | 1014 |
const [[hasUndo, hasRedo], setUndoRedo] = (0,external_wp_element_namespaceObject.useState)([sidebar.hasUndo(), sidebar.hasRedo()]); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1015 |
const shortcut = (0,external_wp_keycodes_namespaceObject.isAppleOS)() ? external_wp_keycodes_namespaceObject.displayShortcut.primaryShift('z') : external_wp_keycodes_namespaceObject.displayShortcut.primary('y'); |
19 | 1016 |
(0,external_wp_element_namespaceObject.useEffect)(() => { |
18 | 1017 |
return sidebar.subscribeHistory(() => { |
1018 |
setUndoRedo([sidebar.hasUndo(), sidebar.hasRedo()]); |
|
1019 |
}); |
|
1020 |
}, [sidebar]); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1021 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1022 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1023 |
className: dist_clsx('customize-widgets-header', { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1024 |
'is-fixed-toolbar-active': isFixedToolbarActive |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1025 |
}), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1026 |
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.NavigableToolbar, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1027 |
className: "customize-widgets-header-toolbar", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1028 |
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Document tools'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1029 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1030 |
icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_undo : library_redo |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1031 |
/* translators: button label text should, if possible, be under 16 characters. */, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1032 |
label: (0,external_wp_i18n_namespaceObject.__)('Undo'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1033 |
shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary('z') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1034 |
// If there are no undo levels we don't want to actually disable this |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1035 |
// button, because it will remove focus for keyboard users. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1036 |
// See: https://github.com/WordPress/gutenberg/issues/3486 |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1037 |
, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1038 |
"aria-disabled": !hasUndo, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1039 |
onClick: sidebar.undo, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1040 |
className: "customize-widgets-editor-history-button undo-button" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1041 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1042 |
icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_redo : library_undo |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1043 |
/* translators: button label text should, if possible, be under 16 characters. */, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1044 |
label: (0,external_wp_i18n_namespaceObject.__)('Redo'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1045 |
shortcut: shortcut |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1046 |
// If there are no undo levels we don't want to actually disable this |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1047 |
// button, because it will remove focus for keyboard users. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1048 |
// See: https://github.com/WordPress/gutenberg/issues/3486 |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1049 |
, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1050 |
"aria-disabled": !hasRedo, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1051 |
onClick: sidebar.redo, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1052 |
className: "customize-widgets-editor-history-button redo-button" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1053 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1054 |
className: "customize-widgets-header-toolbar__inserter-toggle", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1055 |
isPressed: isInserterOpened, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1056 |
variant: "primary", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1057 |
icon: library_plus, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1058 |
label: (0,external_wp_i18n_namespaceObject._x)('Add block', 'Generic label for block inserter button'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1059 |
onClick: () => { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1060 |
setIsInserterOpened(isOpen => !isOpen); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1061 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1062 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MoreMenu, {})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1063 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1064 |
}), (0,external_wp_element_namespaceObject.createPortal)( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(components_inserter, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1065 |
setIsOpened: setIsInserterOpened |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1066 |
}), inserter.contentContainer[0])] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1067 |
}); |
18 | 1068 |
} |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1069 |
/* harmony default export */ const header = (Header); |
18 | 1070 |
|
19 | 1071 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/inserter/use-inserter.js |
18 | 1072 |
/** |
1073 |
* WordPress dependencies |
|
1074 |
*/ |
|
1075 |
||
1076 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1077 |
|
18 | 1078 |
/** |
1079 |
* Internal dependencies |
|
1080 |
*/ |
|
1081 |
||
1082 |
function useInserter(inserter) { |
|
19 | 1083 |
const isInserterOpened = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).isInserterOpened(), []); |
18 | 1084 |
const { |
1085 |
setIsInserterOpened |
|
19 | 1086 |
} = (0,external_wp_data_namespaceObject.useDispatch)(store); |
1087 |
(0,external_wp_element_namespaceObject.useEffect)(() => { |
|
18 | 1088 |
if (isInserterOpened) { |
1089 |
inserter.open(); |
|
1090 |
} else { |
|
1091 |
inserter.close(); |
|
1092 |
} |
|
1093 |
}, [inserter, isInserterOpened]); |
|
19 | 1094 |
return [isInserterOpened, (0,external_wp_element_namespaceObject.useCallback)(updater => { |
18 | 1095 |
let isOpen = updater; |
1096 |
if (typeof updater === 'function') { |
|
19 | 1097 |
isOpen = updater((0,external_wp_data_namespaceObject.select)(store).isInserterOpened()); |
18 | 1098 |
} |
1099 |
setIsInserterOpened(isOpen); |
|
1100 |
}, [setIsInserterOpened])]; |
|
1101 |
} |
|
1102 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1103 |
// EXTERNAL MODULE: ./node_modules/fast-deep-equal/es6/index.js |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1104 |
var es6 = __webpack_require__(7734); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1105 |
var es6_default = /*#__PURE__*/__webpack_require__.n(es6); |
19 | 1106 |
;// CONCATENATED MODULE: external ["wp","isShallowEqual"] |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1107 |
const external_wp_isShallowEqual_namespaceObject = window["wp"]["isShallowEqual"]; |
19 | 1108 |
var external_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_wp_isShallowEqual_namespaceObject); |
1109 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/utils.js |
|
18 | 1110 |
// @ts-check |
1111 |
/** |
|
1112 |
* WordPress dependencies |
|
1113 |
*/ |
|
1114 |
||
1115 |
||
1116 |
||
1117 |
/** |
|
1118 |
* Convert settingId to widgetId. |
|
1119 |
* |
|
1120 |
* @param {string} settingId The setting id. |
|
1121 |
* @return {string} The widget id. |
|
1122 |
*/ |
|
1123 |
function settingIdToWidgetId(settingId) { |
|
1124 |
const matches = settingId.match(/^widget_(.+)(?:\[(\d+)\])$/); |
|
1125 |
if (matches) { |
|
1126 |
const idBase = matches[1]; |
|
1127 |
const number = parseInt(matches[2], 10); |
|
1128 |
return `${idBase}-${number}`; |
|
1129 |
} |
|
1130 |
return settingId; |
|
1131 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1132 |
|
18 | 1133 |
/** |
1134 |
* Transform a block to a customizable widget. |
|
1135 |
* |
|
1136 |
* @param {WPBlock} block The block to be transformed from. |
|
1137 |
* @param {Object} existingWidget The widget to be extended from. |
|
1138 |
* @return {Object} The transformed widget. |
|
1139 |
*/ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1140 |
function blockToWidget(block, existingWidget = null) { |
18 | 1141 |
let widget; |
1142 |
const isValidLegacyWidgetBlock = block.name === 'core/legacy-widget' && (block.attributes.id || block.attributes.instance); |
|
1143 |
if (isValidLegacyWidgetBlock) { |
|
1144 |
if (block.attributes.id) { |
|
1145 |
// Widget that does not extend WP_Widget. |
|
1146 |
widget = { |
|
1147 |
id: block.attributes.id |
|
1148 |
}; |
|
1149 |
} else { |
|
1150 |
const { |
|
1151 |
encoded, |
|
1152 |
hash, |
|
1153 |
raw, |
|
1154 |
...rest |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1155 |
} = block.attributes.instance; |
18 | 1156 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1157 |
// Widget that extends WP_Widget. |
18 | 1158 |
widget = { |
1159 |
idBase: block.attributes.idBase, |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1160 |
instance: { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1161 |
...existingWidget?.instance, |
18 | 1162 |
// Required only for the customizer. |
1163 |
is_widget_customizer_js_value: true, |
|
1164 |
encoded_serialized_instance: encoded, |
|
1165 |
instance_hash_key: hash, |
|
1166 |
raw_instance: raw, |
|
1167 |
...rest |
|
1168 |
} |
|
1169 |
}; |
|
1170 |
} |
|
1171 |
} else { |
|
1172 |
const instance = { |
|
19 | 1173 |
content: (0,external_wp_blocks_namespaceObject.serialize)(block) |
18 | 1174 |
}; |
1175 |
widget = { |
|
1176 |
idBase: 'block', |
|
1177 |
widgetClass: 'WP_Widget_Block', |
|
1178 |
instance: { |
|
1179 |
raw_instance: instance |
|
1180 |
} |
|
1181 |
}; |
|
1182 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1183 |
const { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1184 |
form, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1185 |
rendered, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1186 |
...restExistingWidget |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1187 |
} = existingWidget || {}; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1188 |
return { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1189 |
...restExistingWidget, |
18 | 1190 |
...widget |
1191 |
}; |
|
1192 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1193 |
|
18 | 1194 |
/** |
1195 |
* Transform a widget to a block. |
|
1196 |
* |
|
1197 |
* @param {Object} widget The widget to be transformed from. |
|
1198 |
* @param {string} widget.id The widget id. |
|
1199 |
* @param {string} widget.idBase The id base of the widget. |
|
1200 |
* @param {number} widget.number The number/index of the widget. |
|
1201 |
* @param {Object} widget.instance The instance of the widget. |
|
1202 |
* @return {WPBlock} The transformed block. |
|
1203 |
*/ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1204 |
function widgetToBlock({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1205 |
id, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1206 |
idBase, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1207 |
number, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1208 |
instance |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1209 |
}) { |
18 | 1210 |
let block; |
1211 |
const { |
|
1212 |
encoded_serialized_instance: encoded, |
|
1213 |
instance_hash_key: hash, |
|
1214 |
raw_instance: raw, |
|
1215 |
...rest |
|
1216 |
} = instance; |
|
1217 |
if (idBase === 'block') { |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1218 |
var _raw$content; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1219 |
const parsedBlocks = (0,external_wp_blocks_namespaceObject.parse)((_raw$content = raw.content) !== null && _raw$content !== void 0 ? _raw$content : '', { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1220 |
__unstableSkipAutop: true |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1221 |
}); |
19 | 1222 |
block = parsedBlocks.length ? parsedBlocks[0] : (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', {}); |
18 | 1223 |
} else if (number) { |
1224 |
// Widget that extends WP_Widget. |
|
19 | 1225 |
block = (0,external_wp_blocks_namespaceObject.createBlock)('core/legacy-widget', { |
18 | 1226 |
idBase, |
1227 |
instance: { |
|
1228 |
encoded, |
|
1229 |
hash, |
|
1230 |
raw, |
|
1231 |
...rest |
|
1232 |
} |
|
1233 |
}); |
|
1234 |
} else { |
|
1235 |
// Widget that does not extend WP_Widget. |
|
19 | 1236 |
block = (0,external_wp_blocks_namespaceObject.createBlock)('core/legacy-widget', { |
18 | 1237 |
id |
1238 |
}); |
|
1239 |
} |
|
19 | 1240 |
return (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)(block, id); |
18 | 1241 |
} |
1242 |
||
19 | 1243 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/use-sidebar-block-editor.js |
18 | 1244 |
/** |
1245 |
* External dependencies |
|
1246 |
*/ |
|
1247 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1248 |
|
18 | 1249 |
/** |
1250 |
* WordPress dependencies |
|
1251 |
*/ |
|
1252 |
||
1253 |
||
1254 |
||
1255 |
||
1256 |
/** |
|
1257 |
* Internal dependencies |
|
1258 |
*/ |
|
1259 |
||
1260 |
function widgetsToBlocks(widgets) { |
|
1261 |
return widgets.map(widget => widgetToBlock(widget)); |
|
1262 |
} |
|
1263 |
function useSidebarBlockEditor(sidebar) { |
|
19 | 1264 |
const [blocks, setBlocks] = (0,external_wp_element_namespaceObject.useState)(() => widgetsToBlocks(sidebar.getWidgets())); |
1265 |
(0,external_wp_element_namespaceObject.useEffect)(() => { |
|
18 | 1266 |
return sidebar.subscribe((prevWidgets, nextWidgets) => { |
1267 |
setBlocks(prevBlocks => { |
|
1268 |
const prevWidgetsMap = new Map(prevWidgets.map(widget => [widget.id, widget])); |
|
19 | 1269 |
const prevBlocksMap = new Map(prevBlocks.map(block => [(0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block), block])); |
18 | 1270 |
const nextBlocks = nextWidgets.map(nextWidget => { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1271 |
const prevWidget = prevWidgetsMap.get(nextWidget.id); |
18 | 1272 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1273 |
// Bail out updates. |
18 | 1274 |
if (prevWidget && prevWidget === nextWidget) { |
1275 |
return prevBlocksMap.get(nextWidget.id); |
|
1276 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1277 |
return widgetToBlock(nextWidget); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1278 |
}); |
18 | 1279 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1280 |
// Bail out updates. |
18 | 1281 |
if (external_wp_isShallowEqual_default()(prevBlocks, nextBlocks)) { |
1282 |
return prevBlocks; |
|
1283 |
} |
|
1284 |
return nextBlocks; |
|
1285 |
}); |
|
1286 |
}); |
|
1287 |
}, [sidebar]); |
|
19 | 1288 |
const onChangeBlocks = (0,external_wp_element_namespaceObject.useCallback)(nextBlocks => { |
18 | 1289 |
setBlocks(prevBlocks => { |
1290 |
if (external_wp_isShallowEqual_default()(prevBlocks, nextBlocks)) { |
|
1291 |
return prevBlocks; |
|
1292 |
} |
|
19 | 1293 |
const prevBlocksMap = new Map(prevBlocks.map(block => [(0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block), block])); |
18 | 1294 |
const nextWidgets = nextBlocks.map(nextBlock => { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1295 |
const widgetId = (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(nextBlock); |
18 | 1296 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1297 |
// Update existing widgets. |
18 | 1298 |
if (widgetId && prevBlocksMap.has(widgetId)) { |
1299 |
const prevBlock = prevBlocksMap.get(widgetId); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1300 |
const prevWidget = sidebar.getWidget(widgetId); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1301 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1302 |
// Bail out updates by returning the previous widgets. |
18 | 1303 |
// Deep equality is necessary until the block editor's internals changes. |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1304 |
if (es6_default()(nextBlock, prevBlock) && prevWidget) { |
18 | 1305 |
return prevWidget; |
1306 |
} |
|
1307 |
return blockToWidget(nextBlock, prevWidget); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1308 |
} |
18 | 1309 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1310 |
// Add a new widget. |
18 | 1311 |
return blockToWidget(nextBlock); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1312 |
}); |
18 | 1313 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1314 |
// Bail out updates if the updated widgets are the same. |
18 | 1315 |
if (external_wp_isShallowEqual_default()(sidebar.getWidgets(), nextWidgets)) { |
1316 |
return prevBlocks; |
|
1317 |
} |
|
1318 |
const addedWidgetIds = sidebar.setWidgets(nextWidgets); |
|
1319 |
return nextBlocks.reduce((updatedNextBlocks, nextBlock, index) => { |
|
1320 |
const addedWidgetId = addedWidgetIds[index]; |
|
1321 |
if (addedWidgetId !== null) { |
|
1322 |
// Only create a new instance if necessary to prevent |
|
1323 |
// the whole editor from re-rendering on every edit. |
|
1324 |
if (updatedNextBlocks === nextBlocks) { |
|
1325 |
updatedNextBlocks = nextBlocks.slice(); |
|
1326 |
} |
|
19 | 1327 |
updatedNextBlocks[index] = (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)(nextBlock, addedWidgetId); |
18 | 1328 |
} |
1329 |
return updatedNextBlocks; |
|
1330 |
}, nextBlocks); |
|
1331 |
}); |
|
1332 |
}, [sidebar]); |
|
1333 |
return [blocks, onChangeBlocks, onChangeBlocks]; |
|
1334 |
} |
|
1335 |
||
19 | 1336 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/focus-control/index.js |
18 | 1337 |
/** |
1338 |
* WordPress dependencies |
|
1339 |
*/ |
|
1340 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1341 |
|
18 | 1342 |
/** |
1343 |
* Internal dependencies |
|
1344 |
*/ |
|
1345 |
||
1346 |
||
19 | 1347 |
const FocusControlContext = (0,external_wp_element_namespaceObject.createContext)(); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1348 |
function FocusControl({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1349 |
api, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1350 |
sidebarControls, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1351 |
children |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1352 |
}) { |
19 | 1353 |
const [focusedWidgetIdRef, setFocusedWidgetIdRef] = (0,external_wp_element_namespaceObject.useState)({ |
18 | 1354 |
current: null |
1355 |
}); |
|
19 | 1356 |
const focusWidget = (0,external_wp_element_namespaceObject.useCallback)(widgetId => { |
18 | 1357 |
for (const sidebarControl of sidebarControls) { |
1358 |
const widgets = sidebarControl.setting.get(); |
|
1359 |
if (widgets.includes(widgetId)) { |
|
1360 |
sidebarControl.sectionInstance.expand({ |
|
1361 |
// Schedule it after the complete callback so that |
|
1362 |
// it won't be overridden by the "Back" button focus. |
|
1363 |
completeCallback() { |
|
1364 |
// Create a "ref-like" object every time to ensure |
|
1365 |
// the same widget id can also triggers the focus control. |
|
1366 |
setFocusedWidgetIdRef({ |
|
1367 |
current: widgetId |
|
1368 |
}); |
|
1369 |
} |
|
1370 |
}); |
|
1371 |
break; |
|
1372 |
} |
|
1373 |
} |
|
1374 |
}, [sidebarControls]); |
|
19 | 1375 |
(0,external_wp_element_namespaceObject.useEffect)(() => { |
18 | 1376 |
function handleFocus(settingId) { |
1377 |
const widgetId = settingIdToWidgetId(settingId); |
|
1378 |
focusWidget(widgetId); |
|
1379 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1380 |
let previewBound = false; |
18 | 1381 |
function handleReady() { |
1382 |
api.previewer.preview.bind('focus-control-for-setting', handleFocus); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1383 |
previewBound = true; |
18 | 1384 |
} |
1385 |
api.previewer.bind('ready', handleReady); |
|
1386 |
return () => { |
|
1387 |
api.previewer.unbind('ready', handleReady); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1388 |
if (previewBound) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1389 |
api.previewer.preview.unbind('focus-control-for-setting', handleFocus); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1390 |
} |
18 | 1391 |
}; |
1392 |
}, [api, focusWidget]); |
|
19 | 1393 |
const context = (0,external_wp_element_namespaceObject.useMemo)(() => [focusedWidgetIdRef, focusWidget], [focusedWidgetIdRef, focusWidget]); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1394 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FocusControlContext.Provider, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1395 |
value: context, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1396 |
children: children |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1397 |
}); |
18 | 1398 |
} |
19 | 1399 |
const useFocusControl = () => (0,external_wp_element_namespaceObject.useContext)(FocusControlContext); |
1400 |
||
1401 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/focus-control/use-blocks-focus-control.js |
|
18 | 1402 |
/** |
1403 |
* WordPress dependencies |
|
1404 |
*/ |
|
1405 |
||
1406 |
||
1407 |
||
1408 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1409 |
|
18 | 1410 |
/** |
1411 |
* Internal dependencies |
|
1412 |
*/ |
|
1413 |
||
1414 |
function useBlocksFocusControl(blocks) { |
|
1415 |
const { |
|
1416 |
selectBlock |
|
19 | 1417 |
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); |
18 | 1418 |
const [focusedWidgetIdRef] = useFocusControl(); |
19 | 1419 |
const blocksRef = (0,external_wp_element_namespaceObject.useRef)(blocks); |
1420 |
(0,external_wp_element_namespaceObject.useEffect)(() => { |
|
18 | 1421 |
blocksRef.current = blocks; |
1422 |
}, [blocks]); |
|
19 | 1423 |
(0,external_wp_element_namespaceObject.useEffect)(() => { |
18 | 1424 |
if (focusedWidgetIdRef.current) { |
19 | 1425 |
const focusedBlock = blocksRef.current.find(block => (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block) === focusedWidgetIdRef.current); |
18 | 1426 |
if (focusedBlock) { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1427 |
selectBlock(focusedBlock.clientId); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1428 |
// If the block is already being selected, the DOM node won't |
18 | 1429 |
// get focused again automatically. |
1430 |
// We select the DOM and focus it manually here. |
|
1431 |
const blockNode = document.querySelector(`[data-block="${focusedBlock.clientId}"]`); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1432 |
blockNode?.focus(); |
18 | 1433 |
} |
1434 |
} |
|
1435 |
}, [focusedWidgetIdRef, selectBlock]); |
|
1436 |
} |
|
1437 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1438 |
;// CONCATENATED MODULE: external ["wp","privateApis"] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1439 |
const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"]; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1440 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/lock-unlock.js |
18 | 1441 |
/** |
1442 |
* WordPress dependencies |
|
1443 |
*/ |
|
1444 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1445 |
const { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1446 |
lock, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1447 |
unlock |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1448 |
} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/customize-widgets'); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1449 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1450 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/sidebar-editor-provider.js |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1451 |
/** |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1452 |
* WordPress dependencies |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1453 |
*/ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1454 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1455 |
|
18 | 1456 |
/** |
1457 |
* Internal dependencies |
|
1458 |
*/ |
|
1459 |
||
1460 |
||
1461 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1462 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1463 |
const { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1464 |
ExperimentalBlockEditorProvider |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1465 |
} = unlock(external_wp_blockEditor_namespaceObject.privateApis); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1466 |
function SidebarEditorProvider({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1467 |
sidebar, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1468 |
settings, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1469 |
children |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1470 |
}) { |
18 | 1471 |
const [blocks, onInput, onChange] = useSidebarBlockEditor(sidebar); |
1472 |
useBlocksFocusControl(blocks); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1473 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ExperimentalBlockEditorProvider, { |
18 | 1474 |
value: blocks, |
1475 |
onInput: onInput, |
|
1476 |
onChange: onChange, |
|
1477 |
settings: settings, |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1478 |
useSubRegistry: false, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1479 |
children: children |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1480 |
}); |
18 | 1481 |
} |
1482 |
||
19 | 1483 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/welcome-guide/index.js |
18 | 1484 |
/** |
1485 |
* WordPress dependencies |
|
1486 |
*/ |
|
1487 |
||
1488 |
||
1489 |
||
19 | 1490 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1491 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1492 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1493 |
function WelcomeGuide({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1494 |
sidebar |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1495 |
}) { |
18 | 1496 |
const { |
19 | 1497 |
toggle |
1498 |
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store); |
|
18 | 1499 |
const isEntirelyBlockWidgets = sidebar.getWidgets().every(widget => widget.id.startsWith('block-')); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1500 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1501 |
className: "customize-widgets-welcome-guide", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1502 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1503 |
className: "customize-widgets-welcome-guide__image__wrapper", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1504 |
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("picture", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1505 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("source", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1506 |
srcSet: "https://s.w.org/images/block-editor/welcome-editor.svg", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1507 |
media: "(prefers-reduced-motion: reduce)" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1508 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1509 |
className: "customize-widgets-welcome-guide__image", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1510 |
src: "https://s.w.org/images/block-editor/welcome-editor.gif", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1511 |
width: "312", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1512 |
height: "240", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1513 |
alt: "" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1514 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1515 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1516 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1517 |
className: "customize-widgets-welcome-guide__heading", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1518 |
children: (0,external_wp_i18n_namespaceObject.__)('Welcome to block Widgets') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1519 |
}), /*#__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
|
1520 |
className: "customize-widgets-welcome-guide__text", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1521 |
children: isEntirelyBlockWidgets ? (0,external_wp_i18n_namespaceObject.__)('Your theme provides different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.') : (0,external_wp_i18n_namespaceObject.__)('You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1522 |
}), /*#__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
|
1523 |
className: "customize-widgets-welcome-guide__button", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1524 |
variant: "primary", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1525 |
onClick: () => toggle('core/customize-widgets', 'welcomeGuide'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1526 |
children: (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
|
1527 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("hr", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1528 |
className: "customize-widgets-welcome-guide__separator" |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1529 |
}), !isEntirelyBlockWidgets && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1530 |
className: "customize-widgets-welcome-guide__more-info", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1531 |
children: [(0,external_wp_i18n_namespaceObject.__)('Want to stick with the old widgets?'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1532 |
href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/plugins/classic-widgets/'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1533 |
children: (0,external_wp_i18n_namespaceObject.__)('Get the Classic Widgets plugin.') |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1534 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1535 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1536 |
className: "customize-widgets-welcome-guide__more-info", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1537 |
children: [(0,external_wp_i18n_namespaceObject.__)('New to the block editor?'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1538 |
href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/wordpress-block-editor/'), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1539 |
children: (0,external_wp_i18n_namespaceObject.__)("Here's a detailed guide.") |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1540 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1541 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1542 |
}); |
18 | 1543 |
} |
1544 |
||
19 | 1545 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcuts/index.js |
18 | 1546 |
/** |
1547 |
* WordPress dependencies |
|
1548 |
*/ |
|
1549 |
||
1550 |
||
1551 |
||
1552 |
||
1553 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1554 |
function KeyboardShortcuts({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1555 |
undo, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1556 |
redo, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1557 |
save |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1558 |
}) { |
19 | 1559 |
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/undo', event => { |
18 | 1560 |
undo(); |
1561 |
event.preventDefault(); |
|
1562 |
}); |
|
19 | 1563 |
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/redo', event => { |
18 | 1564 |
redo(); |
1565 |
event.preventDefault(); |
|
1566 |
}); |
|
19 | 1567 |
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/save', event => { |
18 | 1568 |
event.preventDefault(); |
1569 |
save(); |
|
1570 |
}); |
|
1571 |
return null; |
|
1572 |
} |
|
1573 |
function KeyboardShortcutsRegister() { |
|
1574 |
const { |
|
1575 |
registerShortcut, |
|
1576 |
unregisterShortcut |
|
19 | 1577 |
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store); |
1578 |
(0,external_wp_element_namespaceObject.useEffect)(() => { |
|
18 | 1579 |
registerShortcut({ |
1580 |
name: 'core/customize-widgets/undo', |
|
1581 |
category: 'global', |
|
19 | 1582 |
description: (0,external_wp_i18n_namespaceObject.__)('Undo your last changes.'), |
18 | 1583 |
keyCombination: { |
1584 |
modifier: 'primary', |
|
1585 |
character: 'z' |
|
1586 |
} |
|
1587 |
}); |
|
1588 |
registerShortcut({ |
|
1589 |
name: 'core/customize-widgets/redo', |
|
1590 |
category: 'global', |
|
19 | 1591 |
description: (0,external_wp_i18n_namespaceObject.__)('Redo your last undo.'), |
18 | 1592 |
keyCombination: { |
1593 |
modifier: 'primaryShift', |
|
1594 |
character: 'z' |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1595 |
}, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1596 |
// Disable on Apple OS because it conflicts with the browser's |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1597 |
// history shortcut. It's a fine alias for both Windows and Linux. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1598 |
// Since there's no conflict for Ctrl+Shift+Z on both Windows and |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1599 |
// Linux, we keep it as the default for consistency. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1600 |
aliases: (0,external_wp_keycodes_namespaceObject.isAppleOS)() ? [] : [{ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1601 |
modifier: 'primary', |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1602 |
character: 'y' |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1603 |
}] |
18 | 1604 |
}); |
1605 |
registerShortcut({ |
|
1606 |
name: 'core/customize-widgets/save', |
|
1607 |
category: 'global', |
|
19 | 1608 |
description: (0,external_wp_i18n_namespaceObject.__)('Save your changes.'), |
18 | 1609 |
keyCombination: { |
1610 |
modifier: 'primary', |
|
1611 |
character: 's' |
|
1612 |
} |
|
1613 |
}); |
|
1614 |
return () => { |
|
1615 |
unregisterShortcut('core/customize-widgets/undo'); |
|
1616 |
unregisterShortcut('core/customize-widgets/redo'); |
|
1617 |
unregisterShortcut('core/customize-widgets/save'); |
|
1618 |
}; |
|
1619 |
}, [registerShortcut]); |
|
1620 |
return null; |
|
1621 |
} |
|
1622 |
KeyboardShortcuts.Register = KeyboardShortcutsRegister; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1623 |
/* harmony default export */ const keyboard_shortcuts = (KeyboardShortcuts); |
18 | 1624 |
|
19 | 1625 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-appender/index.js |
18 | 1626 |
/** |
1627 |
* WordPress dependencies |
|
1628 |
*/ |
|
1629 |
||
1630 |
||
1631 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1632 |
|
18 | 1633 |
function BlockAppender(props) { |
19 | 1634 |
const ref = (0,external_wp_element_namespaceObject.useRef)(); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1635 |
const isBlocksListEmpty = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getBlockCount() === 0); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1636 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1637 |
// Move the focus to the block appender to prevent focus from |
18 | 1638 |
// being lost when emptying the widget area. |
19 | 1639 |
(0,external_wp_element_namespaceObject.useEffect)(() => { |
18 | 1640 |
if (isBlocksListEmpty && ref.current) { |
1641 |
const { |
|
1642 |
ownerDocument |
|
1643 |
} = ref.current; |
|
1644 |
if (!ownerDocument.activeElement || ownerDocument.activeElement === ownerDocument.body) { |
|
1645 |
ref.current.focus(); |
|
1646 |
} |
|
1647 |
} |
|
1648 |
}, [isBlocksListEmpty]); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1649 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.ButtonBlockAppender, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1650 |
...props, |
18 | 1651 |
ref: ref |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1652 |
}); |
18 | 1653 |
} |
1654 |
||
19 | 1655 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/index.js |
18 | 1656 |
/** |
1657 |
* WordPress dependencies |
|
1658 |
*/ |
|
1659 |
||
1660 |
||
1661 |
||
1662 |
||
1663 |
||
1664 |
||
19 | 1665 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1666 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1667 |
|
18 | 1668 |
/** |
1669 |
* Internal dependencies |
|
1670 |
*/ |
|
1671 |
||
1672 |
||
1673 |
||
1674 |
||
1675 |
||
1676 |
||
1677 |
||
1678 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1679 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1680 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1681 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1682 |
const { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1683 |
ExperimentalBlockCanvas: BlockCanvas |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1684 |
} = unlock(external_wp_blockEditor_namespaceObject.privateApis); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1685 |
const { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1686 |
BlockKeyboardShortcuts |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1687 |
} = unlock(external_wp_blockLibrary_namespaceObject.privateApis); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1688 |
function SidebarBlockEditor({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1689 |
blockEditorSettings, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1690 |
sidebar, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1691 |
inserter, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1692 |
inspector |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1693 |
}) { |
18 | 1694 |
const [isInserterOpened, setIsInserterOpened] = useInserter(inserter); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1695 |
const isMediumViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('small'); |
18 | 1696 |
const { |
1697 |
hasUploadPermissions, |
|
1698 |
isFixedToolbarActive, |
|
1699 |
keepCaretInsideBlock, |
|
1700 |
isWelcomeGuideActive |
|
19 | 1701 |
} = (0,external_wp_data_namespaceObject.useSelect)(select => { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1702 |
var _select$canUser; |
19 | 1703 |
const { |
1704 |
get |
|
1705 |
} = select(external_wp_preferences_namespaceObject.store); |
|
18 | 1706 |
return { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1707 |
hasUploadPermissions: (_select$canUser = select(external_wp_coreData_namespaceObject.store).canUser('create', 'media')) !== null && _select$canUser !== void 0 ? _select$canUser : true, |
19 | 1708 |
isFixedToolbarActive: !!get('core/customize-widgets', 'fixedToolbar'), |
1709 |
keepCaretInsideBlock: !!get('core/customize-widgets', 'keepCaretInsideBlock'), |
|
1710 |
isWelcomeGuideActive: !!get('core/customize-widgets', 'welcomeGuide') |
|
18 | 1711 |
}; |
1712 |
}, []); |
|
19 | 1713 |
const settings = (0,external_wp_element_namespaceObject.useMemo)(() => { |
18 | 1714 |
let mediaUploadBlockEditor; |
1715 |
if (hasUploadPermissions) { |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1716 |
mediaUploadBlockEditor = ({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1717 |
onError, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1718 |
...argumentsObject |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1719 |
}) => { |
19 | 1720 |
(0,external_wp_mediaUtils_namespaceObject.uploadMedia)({ |
18 | 1721 |
wpAllowedMimeTypes: blockEditorSettings.allowedMimeTypes, |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1722 |
onError: ({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1723 |
message |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1724 |
}) => onError(message), |
18 | 1725 |
...argumentsObject |
1726 |
}); |
|
1727 |
}; |
|
1728 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1729 |
return { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1730 |
...blockEditorSettings, |
18 | 1731 |
__experimentalSetIsInserterOpened: setIsInserterOpened, |
1732 |
mediaUpload: mediaUploadBlockEditor, |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1733 |
hasFixedToolbar: isFixedToolbarActive || !isMediumViewport, |
18 | 1734 |
keepCaretInsideBlock, |
1735 |
__unstableHasCustomAppender: true |
|
1736 |
}; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1737 |
}, [hasUploadPermissions, blockEditorSettings, isFixedToolbarActive, isMediumViewport, keepCaretInsideBlock, setIsInserterOpened]); |
18 | 1738 |
if (isWelcomeGuideActive) { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1739 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuide, { |
18 | 1740 |
sidebar: sidebar |
1741 |
}); |
|
1742 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1743 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1744 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcuts.Register, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockKeyboardShortcuts, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(SidebarEditorProvider, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1745 |
sidebar: sidebar, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1746 |
settings: settings, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1747 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcuts, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1748 |
undo: sidebar.undo, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1749 |
redo: sidebar.redo, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1750 |
save: sidebar.save |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1751 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1752 |
sidebar: sidebar, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1753 |
inserter: inserter, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1754 |
isInserterOpened: isInserterOpened, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1755 |
setIsInserterOpened: setIsInserterOpened, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1756 |
isFixedToolbarActive: isFixedToolbarActive || !isMediumViewport |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1757 |
}), (isFixedToolbarActive || !isMediumViewport) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockToolbar, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1758 |
hideDragHandle: true |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1759 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockCanvas, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1760 |
shouldIframe: false, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1761 |
styles: settings.defaultEditorStyles, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1762 |
height: "100%", |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1763 |
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockList, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1764 |
renderAppender: BlockAppender |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1765 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1766 |
}), (0,external_wp_element_namespaceObject.createPortal)( |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1767 |
/*#__PURE__*/ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1768 |
// This is a temporary hack to prevent button component inside <BlockInspector> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1769 |
// from submitting form when type="button" is not specified. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1770 |
(0,external_ReactJSXRuntime_namespaceObject.jsx)("form", { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1771 |
onSubmit: event => event.preventDefault(), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1772 |
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockInspector, {}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1773 |
}), inspector.contentContainer[0])] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1774 |
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__unstableBlockSettingsMenuFirstItem, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1775 |
children: ({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1776 |
onClose |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1777 |
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_inspector_button, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1778 |
inspector: inspector, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1779 |
closeMenu: onClose |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1780 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1781 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1782 |
}); |
18 | 1783 |
} |
1784 |
||
19 | 1785 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-controls/index.js |
18 | 1786 |
/** |
1787 |
* WordPress dependencies |
|
1788 |
*/ |
|
1789 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1790 |
|
19 | 1791 |
const SidebarControlsContext = (0,external_wp_element_namespaceObject.createContext)(); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1792 |
function SidebarControls({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1793 |
sidebarControls, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1794 |
activeSidebarControl, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1795 |
children |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1796 |
}) { |
19 | 1797 |
const context = (0,external_wp_element_namespaceObject.useMemo)(() => ({ |
18 | 1798 |
sidebarControls, |
1799 |
activeSidebarControl |
|
1800 |
}), [sidebarControls, activeSidebarControl]); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1801 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarControlsContext.Provider, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1802 |
value: context, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1803 |
children: children |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1804 |
}); |
18 | 1805 |
} |
1806 |
function useSidebarControls() { |
|
1807 |
const { |
|
1808 |
sidebarControls |
|
19 | 1809 |
} = (0,external_wp_element_namespaceObject.useContext)(SidebarControlsContext); |
18 | 1810 |
return sidebarControls; |
1811 |
} |
|
1812 |
function useActiveSidebarControl() { |
|
1813 |
const { |
|
1814 |
activeSidebarControl |
|
19 | 1815 |
} = (0,external_wp_element_namespaceObject.useContext)(SidebarControlsContext); |
18 | 1816 |
return activeSidebarControl; |
1817 |
} |
|
1818 |
||
19 | 1819 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/customize-widgets/use-clear-selected-block.js |
18 | 1820 |
/** |
1821 |
* WordPress dependencies |
|
1822 |
*/ |
|
1823 |
||
1824 |
||
1825 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1826 |
|
18 | 1827 |
/** |
1828 |
* We can't just use <BlockSelectionClearer> because the customizer has |
|
1829 |
* many root nodes rather than just one in the post editor. |
|
1830 |
* We need to listen to the focus events in all those roots, and also in |
|
1831 |
* the preview iframe. |
|
1832 |
* This hook will clear the selected block when focusing outside the editor, |
|
1833 |
* with a few exceptions: |
|
1834 |
* 1. Focusing on popovers. |
|
1835 |
* 2. Focusing on the inspector. |
|
1836 |
* 3. Focusing on any modals/dialogs. |
|
1837 |
* These cases are normally triggered by user interactions from the editor, |
|
1838 |
* not by explicitly focusing outside the editor, hence no need for clearing. |
|
1839 |
* |
|
1840 |
* @param {Object} sidebarControl The sidebar control instance. |
|
19 | 1841 |
* @param {Object} popoverRef The ref object of the popover node container. |
18 | 1842 |
*/ |
1843 |
function useClearSelectedBlock(sidebarControl, popoverRef) { |
|
1844 |
const { |
|
1845 |
hasSelectedBlock, |
|
1846 |
hasMultiSelection |
|
19 | 1847 |
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); |
18 | 1848 |
const { |
1849 |
clearSelectedBlock |
|
19 | 1850 |
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); |
1851 |
(0,external_wp_element_namespaceObject.useEffect)(() => { |
|
18 | 1852 |
if (popoverRef.current && sidebarControl) { |
1853 |
const inspector = sidebarControl.inspector; |
|
1854 |
const container = sidebarControl.container[0]; |
|
1855 |
const ownerDocument = container.ownerDocument; |
|
1856 |
const ownerWindow = ownerDocument.defaultView; |
|
1857 |
function handleClearSelectedBlock(element) { |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1858 |
if ( |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1859 |
// 1. Make sure there are blocks being selected. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1860 |
(hasSelectedBlock() || hasMultiSelection()) && |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1861 |
// 2. The element should exist in the DOM (not deleted). |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1862 |
element && ownerDocument.contains(element) && |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1863 |
// 3. It should also not exist in the container, the popover, nor the dialog. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1864 |
!container.contains(element) && !popoverRef.current.contains(element) && !element.closest('[role="dialog"]') && |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1865 |
// 4. The inspector should not be opened. |
18 | 1866 |
!inspector.expanded()) { |
1867 |
clearSelectedBlock(); |
|
1868 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1869 |
} |
18 | 1870 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1871 |
// Handle mouse down in the same document. |
18 | 1872 |
function handleMouseDown(event) { |
1873 |
handleClearSelectedBlock(event.target); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1874 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1875 |
// Handle focusing outside the current document, like to iframes. |
18 | 1876 |
function handleBlur() { |
1877 |
handleClearSelectedBlock(ownerDocument.activeElement); |
|
1878 |
} |
|
1879 |
ownerDocument.addEventListener('mousedown', handleMouseDown); |
|
1880 |
ownerWindow.addEventListener('blur', handleBlur); |
|
1881 |
return () => { |
|
1882 |
ownerDocument.removeEventListener('mousedown', handleMouseDown); |
|
1883 |
ownerWindow.removeEventListener('blur', handleBlur); |
|
1884 |
}; |
|
1885 |
} |
|
1886 |
}, [popoverRef, sidebarControl, hasSelectedBlock, hasMultiSelection, clearSelectedBlock]); |
|
1887 |
} |
|
1888 |
||
19 | 1889 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/customize-widgets/index.js |
18 | 1890 |
/** |
1891 |
* WordPress dependencies |
|
1892 |
*/ |
|
1893 |
||
1894 |
||
19 | 1895 |
|
18 | 1896 |
/** |
1897 |
* Internal dependencies |
|
1898 |
*/ |
|
1899 |
||
1900 |
||
1901 |
||
1902 |
||
1903 |
||
1904 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1905 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1906 |
function CustomizeWidgets({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1907 |
api, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1908 |
sidebarControls, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1909 |
blockEditorSettings |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1910 |
}) { |
19 | 1911 |
const [activeSidebarControl, setActiveSidebarControl] = (0,external_wp_element_namespaceObject.useState)(null); |
18 | 1912 |
const parentContainer = document.getElementById('customize-theme-controls'); |
19 | 1913 |
const popoverRef = (0,external_wp_element_namespaceObject.useRef)(); |
18 | 1914 |
useClearSelectedBlock(activeSidebarControl, popoverRef); |
19 | 1915 |
(0,external_wp_element_namespaceObject.useEffect)(() => { |
18 | 1916 |
const unsubscribers = sidebarControls.map(sidebarControl => sidebarControl.subscribe(expanded => { |
1917 |
if (expanded) { |
|
1918 |
setActiveSidebarControl(sidebarControl); |
|
1919 |
} |
|
1920 |
})); |
|
1921 |
return () => { |
|
1922 |
unsubscribers.forEach(unsubscriber => unsubscriber()); |
|
1923 |
}; |
|
1924 |
}, [sidebarControls]); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1925 |
const activeSidebar = activeSidebarControl && (0,external_wp_element_namespaceObject.createPortal)( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ErrorBoundary, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1926 |
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarBlockEditor, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1927 |
blockEditorSettings: blockEditorSettings, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1928 |
sidebar: activeSidebarControl.sidebarAdapter, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1929 |
inserter: activeSidebarControl.inserter, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1930 |
inspector: activeSidebarControl.inspector |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1931 |
}, activeSidebarControl.id) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1932 |
}), activeSidebarControl.container[0]); |
18 | 1933 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1934 |
// We have to portal this to the parent of both the editor and the inspector, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1935 |
// so that the popovers will appear above both of them. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1936 |
const popover = parentContainer && (0,external_wp_element_namespaceObject.createPortal)( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { |
18 | 1937 |
className: "customize-widgets-popover", |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1938 |
ref: popoverRef, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1939 |
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Popover.Slot, {}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1940 |
}), parentContainer); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1941 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SlotFillProvider, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1942 |
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarControls, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1943 |
sidebarControls: sidebarControls, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1944 |
activeSidebarControl: activeSidebarControl, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1945 |
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(FocusControl, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1946 |
api: api, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1947 |
sidebarControls: sidebarControls, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1948 |
children: [activeSidebar, popover] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1949 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1950 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1951 |
}); |
18 | 1952 |
} |
1953 |
||
19 | 1954 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/inspector-section.js |
18 | 1955 |
function getInspectorSection() { |
1956 |
const { |
|
1957 |
wp: { |
|
1958 |
customize |
|
1959 |
} |
|
1960 |
} = window; |
|
1961 |
return class InspectorSection extends customize.Section { |
|
1962 |
constructor(id, options) { |
|
1963 |
super(id, options); |
|
1964 |
this.parentSection = options.parentSection; |
|
1965 |
this.returnFocusWhenClose = null; |
|
19 | 1966 |
this._isOpen = false; |
1967 |
} |
|
1968 |
get isOpen() { |
|
1969 |
return this._isOpen; |
|
1970 |
} |
|
1971 |
set isOpen(value) { |
|
1972 |
this._isOpen = value; |
|
1973 |
this.triggerActiveCallbacks(); |
|
18 | 1974 |
} |
1975 |
ready() { |
|
1976 |
this.contentContainer[0].classList.add('customize-widgets-layout__inspector'); |
|
1977 |
} |
|
19 | 1978 |
isContextuallyActive() { |
1979 |
return this.isOpen; |
|
1980 |
} |
|
18 | 1981 |
onChangeExpanded(expanded, args) { |
1982 |
super.onChangeExpanded(expanded, args); |
|
1983 |
if (this.parentSection && !args.unchanged) { |
|
1984 |
if (expanded) { |
|
1985 |
this.parentSection.collapse({ |
|
1986 |
manualTransition: true |
|
1987 |
}); |
|
1988 |
} else { |
|
1989 |
this.parentSection.expand({ |
|
1990 |
manualTransition: true, |
|
1991 |
completeCallback: () => { |
|
1992 |
// Return focus after finishing the transition. |
|
1993 |
if (this.returnFocusWhenClose && !this.contentContainer[0].contains(this.returnFocusWhenClose)) { |
|
1994 |
this.returnFocusWhenClose.focus(); |
|
1995 |
} |
|
1996 |
} |
|
1997 |
}); |
|
1998 |
} |
|
1999 |
} |
|
2000 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2001 |
open({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2002 |
returnFocusWhenClose |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2003 |
} = {}) { |
19 | 2004 |
this.isOpen = true; |
18 | 2005 |
this.returnFocusWhenClose = returnFocusWhenClose; |
2006 |
this.expand({ |
|
2007 |
allowMultiple: true |
|
2008 |
}); |
|
2009 |
} |
|
2010 |
close() { |
|
2011 |
this.collapse({ |
|
2012 |
allowMultiple: true |
|
2013 |
}); |
|
2014 |
} |
|
19 | 2015 |
collapse(options) { |
2016 |
// Overridden collapse() function. Mostly call the parent collapse(), but also |
|
2017 |
// move our .isOpen to false. |
|
2018 |
// Initially, I tried tracking this with onChangeExpanded(), but it doesn't work |
|
2019 |
// because the block settings sidebar is a layer "on top of" the G editor sidebar. |
|
2020 |
// |
|
2021 |
// For example, when closing the block settings sidebar, the G |
|
2022 |
// editor sidebar would display, and onChangeExpanded in |
|
2023 |
// inspector-section would run with expanded=true, but I want |
|
2024 |
// isOpen to be false when the block settings is closed. |
|
2025 |
this.isOpen = false; |
|
2026 |
super.collapse(options); |
|
2027 |
} |
|
2028 |
triggerActiveCallbacks() { |
|
2029 |
// Manually fire the callbacks associated with moving this.active |
|
2030 |
// from false to true. "active" is always true for this section, |
|
2031 |
// and "isContextuallyActive" reflects if the block settings |
|
2032 |
// sidebar is currently visible, that is, it has replaced the main |
|
2033 |
// Gutenberg view. |
|
2034 |
// The WP customizer only checks ".isContextuallyActive()" when |
|
2035 |
// ".active" changes values. But our ".active" never changes value. |
|
2036 |
// The WP customizer never foresaw a section being used a way we |
|
2037 |
// fit the block settings sidebar into a section. By manually |
|
2038 |
// triggering the "this.active" callbacks, we force the WP |
|
2039 |
// customizer to query our .isContextuallyActive() function and |
|
2040 |
// update its view of our status. |
|
2041 |
this.active.callbacks.fireWith(this.active, [false, true]); |
|
2042 |
} |
|
18 | 2043 |
}; |
2044 |
} |
|
2045 |
||
19 | 2046 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/sidebar-section.js |
18 | 2047 |
/** |
2048 |
* WordPress dependencies |
|
2049 |
*/ |
|
2050 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2051 |
|
18 | 2052 |
/** |
2053 |
* Internal dependencies |
|
2054 |
*/ |
|
2055 |
||
2056 |
const getInspectorSectionId = sidebarId => `widgets-inspector-${sidebarId}`; |
|
2057 |
function getSidebarSection() { |
|
2058 |
const { |
|
2059 |
wp: { |
|
2060 |
customize |
|
2061 |
} |
|
2062 |
} = window; |
|
19 | 2063 |
const reduceMotionMediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)'); |
2064 |
let isReducedMotion = reduceMotionMediaQuery.matches; |
|
2065 |
reduceMotionMediaQuery.addEventListener('change', event => { |
|
2066 |
isReducedMotion = event.matches; |
|
2067 |
}); |
|
18 | 2068 |
return class SidebarSection extends customize.Section { |
2069 |
ready() { |
|
2070 |
const InspectorSection = getInspectorSection(); |
|
2071 |
this.inspector = new InspectorSection(getInspectorSectionId(this.id), { |
|
19 | 2072 |
title: (0,external_wp_i18n_namespaceObject.__)('Block Settings'), |
18 | 2073 |
parentSection: this, |
19 | 2074 |
customizeAction: [(0,external_wp_i18n_namespaceObject.__)('Customizing'), (0,external_wp_i18n_namespaceObject.__)('Widgets'), this.params.title].join(' ▸ ') |
18 | 2075 |
}); |
2076 |
customize.section.add(this.inspector); |
|
2077 |
this.contentContainer[0].classList.add('customize-widgets__sidebar-section'); |
|
2078 |
} |
|
2079 |
hasSubSectionOpened() { |
|
2080 |
return this.inspector.expanded(); |
|
2081 |
} |
|
2082 |
onChangeExpanded(expanded, _args) { |
|
2083 |
const controls = this.controls(); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2084 |
const args = { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2085 |
..._args, |
18 | 2086 |
completeCallback() { |
2087 |
controls.forEach(control => { |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2088 |
control.onChangeSectionExpanded?.(expanded, args); |
18 | 2089 |
}); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2090 |
_args.completeCallback?.(); |
18 | 2091 |
} |
2092 |
}; |
|
2093 |
if (args.manualTransition) { |
|
2094 |
if (expanded) { |
|
2095 |
this.contentContainer.addClass(['busy', 'open']); |
|
2096 |
this.contentContainer.removeClass('is-sub-section-open'); |
|
2097 |
this.contentContainer.closest('.wp-full-overlay').addClass('section-open'); |
|
2098 |
} else { |
|
2099 |
this.contentContainer.addClass(['busy', 'is-sub-section-open']); |
|
2100 |
this.contentContainer.closest('.wp-full-overlay').addClass('section-open'); |
|
2101 |
this.contentContainer.removeClass('open'); |
|
19 | 2102 |
} |
2103 |
const handleTransitionEnd = () => { |
|
2104 |
this.contentContainer.removeClass('busy'); |
|
2105 |
args.completeCallback(); |
|
2106 |
}; |
|
2107 |
if (isReducedMotion) { |
|
2108 |
handleTransitionEnd(); |
|
2109 |
} else { |
|
2110 |
this.contentContainer.one('transitionend', handleTransitionEnd); |
|
18 | 2111 |
} |
2112 |
} else { |
|
2113 |
super.onChangeExpanded(expanded, args); |
|
2114 |
} |
|
2115 |
} |
|
2116 |
}; |
|
2117 |
} |
|
2118 |
||
19 | 2119 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/sidebar-adapter.js |
18 | 2120 |
/** |
2121 |
* Internal dependencies |
|
2122 |
*/ |
|
2123 |
||
2124 |
const { |
|
2125 |
wp |
|
2126 |
} = window; |
|
2127 |
function parseWidgetId(widgetId) { |
|
2128 |
const matches = widgetId.match(/^(.+)-(\d+)$/); |
|
2129 |
if (matches) { |
|
2130 |
return { |
|
2131 |
idBase: matches[1], |
|
2132 |
number: parseInt(matches[2], 10) |
|
2133 |
}; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2134 |
} |
18 | 2135 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2136 |
// Likely an old single widget. |
18 | 2137 |
return { |
2138 |
idBase: widgetId |
|
2139 |
}; |
|
2140 |
} |
|
2141 |
function widgetIdToSettingId(widgetId) { |
|
2142 |
const { |
|
2143 |
idBase, |
|
2144 |
number |
|
2145 |
} = parseWidgetId(widgetId); |
|
2146 |
if (number) { |
|
2147 |
return `widget_${idBase}[${number}]`; |
|
2148 |
} |
|
2149 |
return `widget_${idBase}`; |
|
2150 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2151 |
|
18 | 2152 |
/** |
2153 |
* This is a custom debounce function to call different callbacks depending on |
|
2154 |
* whether it's the _leading_ call or not. |
|
2155 |
* |
|
2156 |
* @param {Function} leading The callback that gets called first. |
|
2157 |
* @param {Function} callback The callback that gets called after the first time. |
|
2158 |
* @param {number} timeout The debounced time in milliseconds. |
|
2159 |
* @return {Function} The debounced function. |
|
2160 |
*/ |
|
2161 |
function debounce(leading, callback, timeout) { |
|
2162 |
let isLeading = false; |
|
2163 |
let timerID; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2164 |
function debounced(...args) { |
18 | 2165 |
const result = (isLeading ? callback : leading).apply(this, args); |
2166 |
isLeading = true; |
|
2167 |
clearTimeout(timerID); |
|
2168 |
timerID = setTimeout(() => { |
|
2169 |
isLeading = false; |
|
2170 |
}, timeout); |
|
2171 |
return result; |
|
2172 |
} |
|
2173 |
debounced.cancel = () => { |
|
2174 |
isLeading = false; |
|
2175 |
clearTimeout(timerID); |
|
2176 |
}; |
|
2177 |
return debounced; |
|
2178 |
} |
|
19 | 2179 |
class SidebarAdapter { |
18 | 2180 |
constructor(setting, api) { |
2181 |
this.setting = setting; |
|
2182 |
this.api = api; |
|
2183 |
this.locked = false; |
|
2184 |
this.widgetsCache = new WeakMap(); |
|
2185 |
this.subscribers = new Set(); |
|
2186 |
this.history = [this._getWidgetIds().map(widgetId => this.getWidget(widgetId))]; |
|
2187 |
this.historyIndex = 0; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2188 |
this.historySubscribers = new Set(); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2189 |
// Debounce the input for 1 second. |
18 | 2190 |
this._debounceSetHistory = debounce(this._pushHistory, this._replaceHistory, 1000); |
2191 |
this.setting.bind(this._handleSettingChange.bind(this)); |
|
2192 |
this.api.bind('change', this._handleAllSettingsChange.bind(this)); |
|
2193 |
this.undo = this.undo.bind(this); |
|
2194 |
this.redo = this.redo.bind(this); |
|
2195 |
this.save = this.save.bind(this); |
|
2196 |
} |
|
2197 |
subscribe(callback) { |
|
2198 |
this.subscribers.add(callback); |
|
2199 |
return () => { |
|
2200 |
this.subscribers.delete(callback); |
|
2201 |
}; |
|
2202 |
} |
|
2203 |
getWidgets() { |
|
2204 |
return this.history[this.historyIndex]; |
|
2205 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2206 |
_emit(...args) { |
18 | 2207 |
for (const callback of this.subscribers) { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2208 |
callback(...args); |
18 | 2209 |
} |
2210 |
} |
|
2211 |
_getWidgetIds() { |
|
2212 |
return this.setting.get(); |
|
2213 |
} |
|
2214 |
_pushHistory() { |
|
2215 |
this.history = [...this.history.slice(0, this.historyIndex + 1), this._getWidgetIds().map(widgetId => this.getWidget(widgetId))]; |
|
2216 |
this.historyIndex += 1; |
|
2217 |
this.historySubscribers.forEach(listener => listener()); |
|
2218 |
} |
|
2219 |
_replaceHistory() { |
|
2220 |
this.history[this.historyIndex] = this._getWidgetIds().map(widgetId => this.getWidget(widgetId)); |
|
2221 |
} |
|
2222 |
_handleSettingChange() { |
|
2223 |
if (this.locked) { |
|
2224 |
return; |
|
2225 |
} |
|
2226 |
const prevWidgets = this.getWidgets(); |
|
2227 |
this._pushHistory(); |
|
2228 |
this._emit(prevWidgets, this.getWidgets()); |
|
2229 |
} |
|
2230 |
_handleAllSettingsChange(setting) { |
|
2231 |
if (this.locked) { |
|
2232 |
return; |
|
2233 |
} |
|
2234 |
if (!setting.id.startsWith('widget_')) { |
|
2235 |
return; |
|
2236 |
} |
|
2237 |
const widgetId = settingIdToWidgetId(setting.id); |
|
2238 |
if (!this.setting.get().includes(widgetId)) { |
|
2239 |
return; |
|
2240 |
} |
|
2241 |
const prevWidgets = this.getWidgets(); |
|
2242 |
this._pushHistory(); |
|
2243 |
this._emit(prevWidgets, this.getWidgets()); |
|
2244 |
} |
|
2245 |
_createWidget(widget) { |
|
2246 |
const widgetModel = wp.customize.Widgets.availableWidgets.findWhere({ |
|
2247 |
id_base: widget.idBase |
|
2248 |
}); |
|
2249 |
let number = widget.number; |
|
2250 |
if (widgetModel.get('is_multi') && !number) { |
|
2251 |
widgetModel.set('multi_number', widgetModel.get('multi_number') + 1); |
|
2252 |
number = widgetModel.get('multi_number'); |
|
2253 |
} |
|
2254 |
const settingId = number ? `widget_${widget.idBase}[${number}]` : `widget_${widget.idBase}`; |
|
2255 |
const settingArgs = { |
|
2256 |
transport: wp.customize.Widgets.data.selectiveRefreshableWidgets[widgetModel.get('id_base')] ? 'postMessage' : 'refresh', |
|
2257 |
previewer: this.setting.previewer |
|
2258 |
}; |
|
2259 |
const setting = this.api.create(settingId, settingId, '', settingArgs); |
|
2260 |
setting.set(widget.instance); |
|
2261 |
const widgetId = settingIdToWidgetId(settingId); |
|
2262 |
return widgetId; |
|
2263 |
} |
|
2264 |
_removeWidget(widget) { |
|
2265 |
const settingId = widgetIdToSettingId(widget.id); |
|
2266 |
const setting = this.api(settingId); |
|
2267 |
if (setting) { |
|
2268 |
const instance = setting.get(); |
|
2269 |
this.widgetsCache.delete(instance); |
|
2270 |
} |
|
2271 |
this.api.remove(settingId); |
|
2272 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2273 |
_updateWidget(widget) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2274 |
const prevWidget = this.getWidget(widget.id); |
18 | 2275 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2276 |
// Bail out update if nothing changed. |
18 | 2277 |
if (prevWidget === widget) { |
2278 |
return widget.id; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2279 |
} |
18 | 2280 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2281 |
// Update existing setting if only the widget's instance changed. |
18 | 2282 |
if (prevWidget.idBase && widget.idBase && prevWidget.idBase === widget.idBase) { |
2283 |
const settingId = widgetIdToSettingId(widget.id); |
|
2284 |
this.api(settingId).set(widget.instance); |
|
2285 |
return widget.id; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2286 |
} |
18 | 2287 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2288 |
// Otherwise delete and re-create. |
18 | 2289 |
this._removeWidget(widget); |
2290 |
return this._createWidget(widget); |
|
2291 |
} |
|
2292 |
getWidget(widgetId) { |
|
2293 |
if (!widgetId) { |
|
2294 |
return null; |
|
2295 |
} |
|
2296 |
const { |
|
2297 |
idBase, |
|
2298 |
number |
|
2299 |
} = parseWidgetId(widgetId); |
|
2300 |
const settingId = widgetIdToSettingId(widgetId); |
|
2301 |
const setting = this.api(settingId); |
|
2302 |
if (!setting) { |
|
2303 |
return null; |
|
2304 |
} |
|
2305 |
const instance = setting.get(); |
|
2306 |
if (this.widgetsCache.has(instance)) { |
|
2307 |
return this.widgetsCache.get(instance); |
|
2308 |
} |
|
2309 |
const widget = { |
|
2310 |
id: widgetId, |
|
2311 |
idBase, |
|
2312 |
number, |
|
2313 |
instance |
|
2314 |
}; |
|
2315 |
this.widgetsCache.set(instance, widget); |
|
2316 |
return widget; |
|
2317 |
} |
|
2318 |
_updateWidgets(nextWidgets) { |
|
2319 |
this.locked = true; |
|
2320 |
const addedWidgetIds = []; |
|
2321 |
const nextWidgetIds = nextWidgets.map(nextWidget => { |
|
2322 |
if (nextWidget.id && this.getWidget(nextWidget.id)) { |
|
2323 |
addedWidgetIds.push(null); |
|
2324 |
return this._updateWidget(nextWidget); |
|
2325 |
} |
|
2326 |
const widgetId = this._createWidget(nextWidget); |
|
2327 |
addedWidgetIds.push(widgetId); |
|
2328 |
return widgetId; |
|
2329 |
}); |
|
2330 |
const deletedWidgets = this.getWidgets().filter(widget => !nextWidgetIds.includes(widget.id)); |
|
2331 |
deletedWidgets.forEach(widget => this._removeWidget(widget)); |
|
2332 |
this.setting.set(nextWidgetIds); |
|
2333 |
this.locked = false; |
|
2334 |
return addedWidgetIds; |
|
2335 |
} |
|
2336 |
setWidgets(nextWidgets) { |
|
2337 |
const addedWidgetIds = this._updateWidgets(nextWidgets); |
|
2338 |
this._debounceSetHistory(); |
|
2339 |
return addedWidgetIds; |
|
2340 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2341 |
|
18 | 2342 |
/** |
2343 |
* Undo/Redo related features |
|
2344 |
*/ |
|
2345 |
hasUndo() { |
|
2346 |
return this.historyIndex > 0; |
|
2347 |
} |
|
2348 |
hasRedo() { |
|
2349 |
return this.historyIndex < this.history.length - 1; |
|
2350 |
} |
|
2351 |
_seek(historyIndex) { |
|
2352 |
const currentWidgets = this.getWidgets(); |
|
2353 |
this.historyIndex = historyIndex; |
|
2354 |
const widgets = this.history[this.historyIndex]; |
|
2355 |
this._updateWidgets(widgets); |
|
2356 |
this._emit(currentWidgets, this.getWidgets()); |
|
2357 |
this.historySubscribers.forEach(listener => listener()); |
|
2358 |
this._debounceSetHistory.cancel(); |
|
2359 |
} |
|
2360 |
undo() { |
|
2361 |
if (!this.hasUndo()) { |
|
2362 |
return; |
|
2363 |
} |
|
2364 |
this._seek(this.historyIndex - 1); |
|
2365 |
} |
|
2366 |
redo() { |
|
2367 |
if (!this.hasRedo()) { |
|
2368 |
return; |
|
2369 |
} |
|
2370 |
this._seek(this.historyIndex + 1); |
|
2371 |
} |
|
2372 |
subscribeHistory(listener) { |
|
2373 |
this.historySubscribers.add(listener); |
|
2374 |
return () => { |
|
2375 |
this.historySubscribers.delete(listener); |
|
2376 |
}; |
|
2377 |
} |
|
2378 |
save() { |
|
2379 |
this.api.previewer.save(); |
|
2380 |
} |
|
2381 |
} |
|
2382 |
||
19 | 2383 |
;// CONCATENATED MODULE: external ["wp","dom"] |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2384 |
const external_wp_dom_namespaceObject = window["wp"]["dom"]; |
19 | 2385 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/inserter-outer-section.js |
18 | 2386 |
/** |
2387 |
* WordPress dependencies |
|
2388 |
*/ |
|
2389 |
||
2390 |
||
2391 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2392 |
|
18 | 2393 |
/** |
2394 |
* Internal dependencies |
|
2395 |
*/ |
|
2396 |
||
2397 |
function getInserterOuterSection() { |
|
2398 |
const { |
|
2399 |
wp: { |
|
2400 |
customize |
|
2401 |
} |
|
2402 |
} = window; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2403 |
const OuterSection = customize.OuterSection; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2404 |
// Override the OuterSection class to handle multiple outer sections. |
18 | 2405 |
// It closes all the other outer sections whenever one is opened. |
2406 |
// The result is that at most one outer section can be opened at the same time. |
|
2407 |
customize.OuterSection = class extends OuterSection { |
|
2408 |
onChangeExpanded(expanded, args) { |
|
2409 |
if (expanded) { |
|
2410 |
customize.section.each(section => { |
|
2411 |
if (section.params.type === 'outer' && section.id !== this.id) { |
|
2412 |
if (section.expanded()) { |
|
2413 |
section.collapse(); |
|
2414 |
} |
|
2415 |
} |
|
2416 |
}); |
|
2417 |
} |
|
2418 |
return super.onChangeExpanded(expanded, args); |
|
2419 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2420 |
}; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2421 |
// Handle constructor so that "params.type" can be correctly pointed to "outer". |
18 | 2422 |
customize.sectionConstructor.outer = customize.OuterSection; |
2423 |
return class InserterOuterSection extends customize.OuterSection { |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2424 |
constructor(...args) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2425 |
super(...args); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2426 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2427 |
// This is necessary since we're creating a new class which is not identical to the original OuterSection. |
18 | 2428 |
// @See https://github.com/WordPress/wordpress-develop/blob/42b05c397c50d9dc244083eff52991413909d4bd/src/js/_enqueues/wp/customize/controls.js#L1427-L1436 |
2429 |
this.params.type = 'outer'; |
|
2430 |
this.activeElementBeforeExpanded = null; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2431 |
const ownerWindow = this.contentContainer[0].ownerDocument.defaultView; |
18 | 2432 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2433 |
// Handle closing the inserter when pressing the Escape key. |
18 | 2434 |
ownerWindow.addEventListener('keydown', event => { |
19 | 2435 |
if (this.expanded() && (event.keyCode === external_wp_keycodes_namespaceObject.ESCAPE || event.code === 'Escape') && !event.defaultPrevented) { |
2436 |
event.preventDefault(); |
|
18 | 2437 |
event.stopPropagation(); |
19 | 2438 |
(0,external_wp_data_namespaceObject.dispatch)(store).setIsInserterOpened(false); |
18 | 2439 |
} |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2440 |
}, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2441 |
// Use capture mode to make this run before other event listeners. |
18 | 2442 |
true); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2443 |
this.contentContainer.addClass('widgets-inserter'); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2444 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2445 |
// Set a flag if the state is being changed from open() or close(). |
18 | 2446 |
// Don't propagate the event if it's an internal action to prevent infinite loop. |
2447 |
this.isFromInternalAction = false; |
|
2448 |
this.expanded.bind(() => { |
|
2449 |
if (!this.isFromInternalAction) { |
|
2450 |
// Propagate the event to React to sync the state. |
|
19 | 2451 |
(0,external_wp_data_namespaceObject.dispatch)(store).setIsInserterOpened(this.expanded()); |
18 | 2452 |
} |
2453 |
this.isFromInternalAction = false; |
|
2454 |
}); |
|
2455 |
} |
|
2456 |
open() { |
|
2457 |
if (!this.expanded()) { |
|
2458 |
const contentContainer = this.contentContainer[0]; |
|
2459 |
this.activeElementBeforeExpanded = contentContainer.ownerDocument.activeElement; |
|
2460 |
this.isFromInternalAction = true; |
|
2461 |
this.expand({ |
|
2462 |
completeCallback() { |
|
2463 |
// We have to do this in a "completeCallback" or else the elements will not yet be visible/tabbable. |
|
2464 |
// The first one should be the close button, |
|
2465 |
// we want to skip it and choose the second one instead, which is the search box. |
|
19 | 2466 |
const searchBox = external_wp_dom_namespaceObject.focus.tabbable.find(contentContainer)[1]; |
18 | 2467 |
if (searchBox) { |
2468 |
searchBox.focus(); |
|
2469 |
} |
|
2470 |
} |
|
2471 |
}); |
|
2472 |
} |
|
2473 |
} |
|
2474 |
close() { |
|
2475 |
if (this.expanded()) { |
|
2476 |
const contentContainer = this.contentContainer[0]; |
|
2477 |
const activeElement = contentContainer.ownerDocument.activeElement; |
|
2478 |
this.isFromInternalAction = true; |
|
2479 |
this.collapse({ |
|
2480 |
completeCallback() { |
|
2481 |
// Return back the focus when closing the inserter. |
|
2482 |
// Only do this if the active element which triggers the action is inside the inserter, |
|
2483 |
// (the close button for instance). In that case the focus will be lost. |
|
2484 |
// Otherwise, we don't hijack the focus when the user is focusing on other elements |
|
2485 |
// (like the quick inserter). |
|
2486 |
if (contentContainer.contains(activeElement)) { |
|
2487 |
// Return back the focus when closing the inserter. |
|
2488 |
if (this.activeElementBeforeExpanded) { |
|
2489 |
this.activeElementBeforeExpanded.focus(); |
|
2490 |
} |
|
2491 |
} |
|
2492 |
} |
|
2493 |
}); |
|
2494 |
} |
|
2495 |
} |
|
2496 |
}; |
|
2497 |
} |
|
2498 |
||
19 | 2499 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/sidebar-control.js |
18 | 2500 |
/** |
2501 |
* WordPress dependencies |
|
2502 |
*/ |
|
2503 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2504 |
|
18 | 2505 |
/** |
2506 |
* Internal dependencies |
|
2507 |
*/ |
|
2508 |
||
2509 |
||
2510 |
||
2511 |
const getInserterId = controlId => `widgets-inserter-${controlId}`; |
|
2512 |
function getSidebarControl() { |
|
2513 |
const { |
|
2514 |
wp: { |
|
2515 |
customize |
|
2516 |
} |
|
2517 |
} = window; |
|
2518 |
return class SidebarControl extends customize.Control { |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2519 |
constructor(...args) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2520 |
super(...args); |
18 | 2521 |
this.subscribers = new Set(); |
2522 |
} |
|
2523 |
ready() { |
|
2524 |
const InserterOuterSection = getInserterOuterSection(); |
|
2525 |
this.inserter = new InserterOuterSection(getInserterId(this.id), {}); |
|
2526 |
customize.section.add(this.inserter); |
|
2527 |
this.sectionInstance = customize.section(this.section()); |
|
2528 |
this.inspector = this.sectionInstance.inspector; |
|
19 | 2529 |
this.sidebarAdapter = new SidebarAdapter(this.setting, customize); |
18 | 2530 |
} |
2531 |
subscribe(callback) { |
|
2532 |
this.subscribers.add(callback); |
|
2533 |
return () => { |
|
2534 |
this.subscribers.delete(callback); |
|
2535 |
}; |
|
2536 |
} |
|
2537 |
onChangeSectionExpanded(expanded, args) { |
|
2538 |
if (!args.unchanged) { |
|
2539 |
// Close the inserter when the section collapses. |
|
2540 |
if (!expanded) { |
|
19 | 2541 |
(0,external_wp_data_namespaceObject.dispatch)(store).setIsInserterOpened(false); |
18 | 2542 |
} |
2543 |
this.subscribers.forEach(subscriber => subscriber(expanded, args)); |
|
2544 |
} |
|
2545 |
} |
|
2546 |
}; |
|
2547 |
} |
|
2548 |
||
19 | 2549 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/move-to-sidebar.js |
18 | 2550 |
/** |
2551 |
* WordPress dependencies |
|
2552 |
*/ |
|
2553 |
||
2554 |
||
2555 |
||
2556 |
||
2557 |
||
2558 |
||
2559 |
/** |
|
2560 |
* Internal dependencies |
|
2561 |
*/ |
|
2562 |
||
2563 |
||
2564 |
||
2565 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2566 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2567 |
|
19 | 2568 |
const withMoveToSidebarToolbarItem = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => props => { |
2569 |
let widgetId = (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(props); |
|
18 | 2570 |
const sidebarControls = useSidebarControls(); |
2571 |
const activeSidebarControl = useActiveSidebarControl(); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2572 |
const hasMultipleSidebars = sidebarControls?.length > 1; |
18 | 2573 |
const blockName = props.name; |
2574 |
const clientId = props.clientId; |
|
19 | 2575 |
const canInsertBlockInSidebar = (0,external_wp_data_namespaceObject.useSelect)(select => { |
18 | 2576 |
// Use an empty string to represent the root block list, which |
2577 |
// in the customizer editor represents a sidebar/widget area. |
|
19 | 2578 |
return select(external_wp_blockEditor_namespaceObject.store).canInsertBlockType(blockName, ''); |
18 | 2579 |
}, [blockName]); |
19 | 2580 |
const block = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getBlock(clientId), [clientId]); |
18 | 2581 |
const { |
2582 |
removeBlock |
|
19 | 2583 |
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); |
18 | 2584 |
const [, focusWidget] = useFocusControl(); |
2585 |
function moveToSidebar(sidebarControlId) { |
|
2586 |
const newSidebarControl = sidebarControls.find(sidebarControl => sidebarControl.id === sidebarControlId); |
|
2587 |
if (widgetId) { |
|
2588 |
/** |
|
2589 |
* If there's a widgetId, move it to the other sidebar. |
|
2590 |
*/ |
|
2591 |
const oldSetting = activeSidebarControl.setting; |
|
2592 |
const newSetting = newSidebarControl.setting; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2593 |
oldSetting(oldSetting().filter(id => id !== widgetId)); |
18 | 2594 |
newSetting([...newSetting(), widgetId]); |
2595 |
} else { |
|
2596 |
/** |
|
2597 |
* If there isn't a widgetId, it's most likely a inner block. |
|
2598 |
* First, remove the block in the original sidebar, |
|
2599 |
* then, create a new widget in the new sidebar and get back its widgetId. |
|
2600 |
*/ |
|
2601 |
const sidebarAdapter = newSidebarControl.sidebarAdapter; |
|
2602 |
removeBlock(clientId); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2603 |
const addedWidgetIds = sidebarAdapter.setWidgets([...sidebarAdapter.getWidgets(), blockToWidget(block)]); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2604 |
// The last non-null id is the added widget's id. |
18 | 2605 |
widgetId = addedWidgetIds.reverse().find(id => !!id); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2606 |
} |
18 | 2607 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2608 |
// Move focus to the moved widget and expand the sidebar. |
18 | 2609 |
focusWidget(widgetId); |
2610 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2611 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2612 |
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockEdit, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2613 |
...props |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2614 |
}), hasMultipleSidebars && canInsertBlockInSidebar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2615 |
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_widgets_namespaceObject.MoveToWidgetArea, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2616 |
widgetAreas: sidebarControls.map(sidebarControl => ({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2617 |
id: sidebarControl.id, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2618 |
name: sidebarControl.params.label, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2619 |
description: sidebarControl.params.description |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2620 |
})), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2621 |
currentWidgetAreaId: activeSidebarControl?.id, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2622 |
onSelect: moveToSidebar |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2623 |
}) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2624 |
})] |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2625 |
}); |
18 | 2626 |
}, 'withMoveToSidebarToolbarItem'); |
19 | 2627 |
(0,external_wp_hooks_namespaceObject.addFilter)('editor.BlockEdit', 'core/customize-widgets/block-edit', withMoveToSidebarToolbarItem); |
2628 |
||
2629 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/replace-media-upload.js |
|
18 | 2630 |
/** |
2631 |
* WordPress dependencies |
|
2632 |
*/ |
|
2633 |
||
2634 |
||
19 | 2635 |
const replaceMediaUpload = () => external_wp_mediaUtils_namespaceObject.MediaUpload; |
2636 |
(0,external_wp_hooks_namespaceObject.addFilter)('editor.MediaUpload', 'core/edit-widgets/replace-media-upload', replaceMediaUpload); |
|
2637 |
||
2638 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/wide-widget-display.js |
|
18 | 2639 |
/** |
2640 |
* WordPress dependencies |
|
2641 |
*/ |
|
2642 |
||
2643 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2644 |
|
18 | 2645 |
const { |
2646 |
wp: wide_widget_display_wp |
|
2647 |
} = window; |
|
19 | 2648 |
const withWideWidgetDisplay = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => props => { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2649 |
var _wp$customize$Widgets; |
18 | 2650 |
const { |
2651 |
idBase |
|
2652 |
} = props.attributes; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2653 |
const isWide = (_wp$customize$Widgets = wide_widget_display_wp.customize.Widgets.data.availableWidgets.find(widget => widget.id_base === idBase)?.is_wide) !== null && _wp$customize$Widgets !== void 0 ? _wp$customize$Widgets : false; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2654 |
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockEdit, { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2655 |
...props, |
18 | 2656 |
isWide: isWide |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2657 |
}); |
18 | 2658 |
}, 'withWideWidgetDisplay'); |
19 | 2659 |
(0,external_wp_hooks_namespaceObject.addFilter)('editor.BlockEdit', 'core/customize-widgets/wide-widget-display', withWideWidgetDisplay); |
2660 |
||
2661 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/index.js |
|
18 | 2662 |
/** |
2663 |
* Internal dependencies |
|
2664 |
*/ |
|
2665 |
||
2666 |
||
2667 |
||
2668 |
||
19 | 2669 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/index.js |
18 | 2670 |
/** |
2671 |
* WordPress dependencies |
|
2672 |
*/ |
|
2673 |
||
2674 |
||
2675 |
||
2676 |
||
19 | 2677 |
|
2678 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2679 |
|
18 | 2680 |
/** |
2681 |
* Internal dependencies |
|
2682 |
*/ |
|
2683 |
||
2684 |
||
2685 |
||
2686 |
||
2687 |
||
2688 |
const { |
|
2689 |
wp: build_module_wp |
|
2690 |
} = window; |
|
19 | 2691 |
const DISABLED_BLOCKS = ['core/more', 'core/block', 'core/freeform', 'core/template-part']; |
18 | 2692 |
const ENABLE_EXPERIMENTAL_FSE_BLOCKS = false; |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2693 |
|
18 | 2694 |
/** |
2695 |
* Initializes the widgets block editor in the customizer. |
|
2696 |
* |
|
2697 |
* @param {string} editorName The editor name. |
|
2698 |
* @param {Object} blockEditorSettings Block editor settings. |
|
2699 |
*/ |
|
2700 |
function initialize(editorName, blockEditorSettings) { |
|
19 | 2701 |
(0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults('core/customize-widgets', { |
2702 |
fixedToolbar: false, |
|
2703 |
welcomeGuide: true |
|
18 | 2704 |
}); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2705 |
(0,external_wp_data_namespaceObject.dispatch)(external_wp_blocks_namespaceObject.store).reapplyBlockTypeFilters(); |
19 | 2706 |
const coreBlocks = (0,external_wp_blockLibrary_namespaceObject.__experimentalGetCoreBlocks)().filter(block => { |
2707 |
return !(DISABLED_BLOCKS.includes(block.name) || block.name.startsWith('core/post') || block.name.startsWith('core/query') || block.name.startsWith('core/site') || block.name.startsWith('core/navigation')); |
|
2708 |
}); |
|
2709 |
(0,external_wp_blockLibrary_namespaceObject.registerCoreBlocks)(coreBlocks); |
|
2710 |
(0,external_wp_widgets_namespaceObject.registerLegacyWidgetBlock)(); |
|
18 | 2711 |
if (false) {} |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2712 |
(0,external_wp_widgets_namespaceObject.registerLegacyWidgetVariations)(blockEditorSettings); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2713 |
(0,external_wp_widgets_namespaceObject.registerWidgetGroupBlock)(); |
18 | 2714 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2715 |
// As we are unregistering `core/freeform` to avoid the Classic block, we must |
18 | 2716 |
// replace it with something as the default freeform content handler. Failure to |
2717 |
// do this will result in errors in the default block parser. |
|
2718 |
// see: https://github.com/WordPress/gutenberg/issues/33097 |
|
19 | 2719 |
(0,external_wp_blocks_namespaceObject.setFreeformContentHandlerName)('core/html'); |
18 | 2720 |
const SidebarControl = getSidebarControl(blockEditorSettings); |
2721 |
build_module_wp.customize.sectionConstructor.sidebar = getSidebarSection(); |
|
2722 |
build_module_wp.customize.controlConstructor.sidebar_block_editor = SidebarControl; |
|
2723 |
const container = document.createElement('div'); |
|
2724 |
document.body.appendChild(container); |
|
2725 |
build_module_wp.customize.bind('ready', () => { |
|
2726 |
const sidebarControls = []; |
|
2727 |
build_module_wp.customize.control.each(control => { |
|
2728 |
if (control instanceof SidebarControl) { |
|
2729 |
sidebarControls.push(control); |
|
2730 |
} |
|
2731 |
}); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2732 |
(0,external_wp_element_namespaceObject.createRoot)(container).render( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CustomizeWidgets, { |
18 | 2733 |
api: build_module_wp.customize, |
2734 |
sidebarControls: sidebarControls, |
|
2735 |
blockEditorSettings: blockEditorSettings |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2736 |
})); |
18 | 2737 |
}); |
2738 |
} |
|
2739 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2740 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2741 |
})(); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
2742 |
|
19 | 2743 |
(window.wp = window.wp || {}).customizeWidgets = __webpack_exports__; |
2744 |
/******/ })() |
|
2745 |
; |