author | ymh <ymh.work@gmail.com> |
Fri, 05 Sep 2025 18:52:52 +0200 | |
changeset 22 | 8c2e4d02f4ef |
parent 21 | 48c4eec2b7e6 |
permissions | -rw-r--r-- |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1 |
/******/ (() => { // webpackBootstrap |
19 | 2 |
/******/ "use strict"; |
3 |
/******/ // The require scope |
|
4 |
/******/ var __webpack_require__ = {}; |
|
5 |
/******/ |
|
6 |
/************************************************************************/ |
|
7 |
/******/ /* webpack/runtime/compat get default export */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
8 |
/******/ (() => { |
19 | 9 |
/******/ // getDefaultExport function for compatibility with non-harmony modules |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
10 |
/******/ __webpack_require__.n = (module) => { |
19 | 11 |
/******/ var getter = module && module.__esModule ? |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
12 |
/******/ () => (module['default']) : |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
13 |
/******/ () => (module); |
19 | 14 |
/******/ __webpack_require__.d(getter, { a: getter }); |
15 |
/******/ return getter; |
|
16 |
/******/ }; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
17 |
/******/ })(); |
19 | 18 |
/******/ |
19 |
/******/ /* webpack/runtime/define property getters */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
20 |
/******/ (() => { |
19 | 21 |
/******/ // define getter functions for harmony exports |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
22 |
/******/ __webpack_require__.d = (exports, definition) => { |
19 | 23 |
/******/ for(var key in definition) { |
24 |
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
|
25 |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
|
26 |
/******/ } |
|
27 |
/******/ } |
|
16 | 28 |
/******/ }; |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
29 |
/******/ })(); |
19 | 30 |
/******/ |
31 |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
32 |
/******/ (() => { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
33 |
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
34 |
/******/ })(); |
19 | 35 |
/******/ |
36 |
/******/ /* webpack/runtime/make namespace object */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
37 |
/******/ (() => { |
19 | 38 |
/******/ // define __esModule on exports |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
39 |
/******/ __webpack_require__.r = (exports) => { |
19 | 40 |
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
41 |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
|
42 |
/******/ } |
|
43 |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); |
|
44 |
/******/ }; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
45 |
/******/ })(); |
19 | 46 |
/******/ |
16 | 47 |
/************************************************************************/ |
19 | 48 |
var __webpack_exports__ = {}; |
49 |
// ESM COMPAT FLAG |
|
50 |
__webpack_require__.r(__webpack_exports__); |
|
16 | 51 |
|
19 | 52 |
// EXPORTS |
53 |
__webpack_require__.d(__webpack_exports__, { |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
54 |
__unstableAwaitPromise: () => (/* binding */ __unstableAwaitPromise), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
55 |
apiFetch: () => (/* binding */ apiFetch), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
56 |
controls: () => (/* binding */ controls), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
57 |
dispatch: () => (/* binding */ dispatch), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
58 |
select: () => (/* binding */ build_module_select), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
59 |
syncSelect: () => (/* binding */ syncSelect) |
19 | 60 |
}); |
61 |
||
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
62 |
;// external ["wp","apiFetch"] |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
63 |
const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"]; |
19 | 64 |
var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject); |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
65 |
;// external ["wp","data"] |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
66 |
const external_wp_data_namespaceObject = window["wp"]["data"]; |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
67 |
;// external ["wp","deprecated"] |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
68 |
const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"]; |
19 | 69 |
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject); |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
70 |
;// ./node_modules/@wordpress/data-controls/build-module/index.js |
16 | 71 |
/** |
72 |
* WordPress dependencies |
|
73 |
*/ |
|
74 |
||
75 |
||
18 | 76 |
|
16 | 77 |
/** |
78 |
* Dispatches a control action for triggering an api fetch call. |
|
79 |
* |
|
80 |
* @param {Object} request Arguments for the fetch request. |
|
81 |
* |
|
82 |
* @example |
|
83 |
* ```js |
|
84 |
* import { apiFetch } from '@wordpress/data-controls'; |
|
85 |
* |
|
86 |
* // Action generator using apiFetch |
|
87 |
* export function* myAction() { |
|
88 |
* const path = '/v2/my-api/items'; |
|
89 |
* const items = yield apiFetch( { path } ); |
|
90 |
* // do something with the items. |
|
91 |
* } |
|
92 |
* ``` |
|
93 |
* |
|
94 |
* @return {Object} The control descriptor. |
|
95 |
*/ |
|
18 | 96 |
function apiFetch(request) { |
16 | 97 |
return { |
98 |
type: 'API_FETCH', |
|
18 | 99 |
request |
16 | 100 |
}; |
18 | 101 |
} |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
102 |
|
16 | 103 |
/** |
18 | 104 |
* Control for resolving a selector in a registered data store. |
105 |
* Alias for the `resolveSelect` built-in control in the `@wordpress/data` package. |
|
106 |
* |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
107 |
* @param storeNameOrDescriptor The store object or identifier. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
108 |
* @param selectorName The selector name. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
109 |
* @param args Arguments passed without change to the `@wordpress/data` control. |
18 | 110 |
*/ |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
111 |
function build_module_select(storeNameOrDescriptor, selectorName, ...args) { |
19 | 112 |
external_wp_deprecated_default()('`select` control in `@wordpress/data-controls`', { |
18 | 113 |
since: '5.7', |
114 |
alternative: 'built-in `resolveSelect` control in `@wordpress/data`' |
|
115 |
}); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
116 |
return external_wp_data_namespaceObject.controls.resolveSelect(storeNameOrDescriptor, selectorName, ...args); |
18 | 117 |
} |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
118 |
|
18 | 119 |
/** |
120 |
* Control for calling a selector in a registered data store. |
|
121 |
* Alias for the `select` built-in control in the `@wordpress/data` package. |
|
16 | 122 |
* |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
123 |
* @param storeNameOrDescriptor The store object or identifier. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
124 |
* @param selectorName The selector name. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
125 |
* @param args Arguments passed without change to the `@wordpress/data` control. |
18 | 126 |
*/ |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
127 |
function syncSelect(storeNameOrDescriptor, selectorName, ...args) { |
19 | 128 |
external_wp_deprecated_default()('`syncSelect` control in `@wordpress/data-controls`', { |
18 | 129 |
since: '5.7', |
130 |
alternative: 'built-in `select` control in `@wordpress/data`' |
|
131 |
}); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
132 |
return external_wp_data_namespaceObject.controls.select(storeNameOrDescriptor, selectorName, ...args); |
18 | 133 |
} |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
134 |
|
18 | 135 |
/** |
136 |
* Control for dispatching an action in a registered data store. |
|
137 |
* Alias for the `dispatch` control in the `@wordpress/data` package. |
|
16 | 138 |
* |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
139 |
* @param storeNameOrDescriptor The store object or identifier. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
140 |
* @param actionName The action name. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
141 |
* @param args Arguments passed without change to the `@wordpress/data` control. |
18 | 142 |
*/ |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
143 |
function dispatch(storeNameOrDescriptor, actionName, ...args) { |
19 | 144 |
external_wp_deprecated_default()('`dispatch` control in `@wordpress/data-controls`', { |
18 | 145 |
since: '5.7', |
146 |
alternative: 'built-in `dispatch` control in `@wordpress/data`' |
|
147 |
}); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
148 |
return external_wp_data_namespaceObject.controls.dispatch(storeNameOrDescriptor, actionName, ...args); |
18 | 149 |
} |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
150 |
|
18 | 151 |
/** |
152 |
* Dispatches a control action for awaiting on a promise to be resolved. |
|
153 |
* |
|
154 |
* @param {Object} promise Promise to wait for. |
|
16 | 155 |
* |
156 |
* @example |
|
157 |
* ```js |
|
18 | 158 |
* import { __unstableAwaitPromise } from '@wordpress/data-controls'; |
16 | 159 |
* |
18 | 160 |
* // Action generator using apiFetch |
16 | 161 |
* export function* myAction() { |
18 | 162 |
* const promise = getItemsAsync(); |
163 |
* const items = yield __unstableAwaitPromise( promise ); |
|
164 |
* // do something with the items. |
|
16 | 165 |
* } |
166 |
* ``` |
|
167 |
* |
|
168 |
* @return {Object} The control descriptor. |
|
169 |
*/ |
|
18 | 170 |
const __unstableAwaitPromise = function (promise) { |
16 | 171 |
return { |
18 | 172 |
type: 'AWAIT_PROMISE', |
173 |
promise |
|
16 | 174 |
}; |
18 | 175 |
}; |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
176 |
|
16 | 177 |
/** |
178 |
* The default export is what you use to register the controls with your custom |
|
179 |
* store. |
|
180 |
* |
|
181 |
* @example |
|
182 |
* ```js |
|
183 |
* // WordPress dependencies |
|
184 |
* import { controls } from '@wordpress/data-controls'; |
|
185 |
* import { registerStore } from '@wordpress/data'; |
|
186 |
* |
|
187 |
* // Internal dependencies |
|
188 |
* import reducer from './reducer'; |
|
189 |
* import * as selectors from './selectors'; |
|
190 |
* import * as actions from './actions'; |
|
191 |
* import * as resolvers from './resolvers'; |
|
192 |
* |
|
193 |
* registerStore( 'my-custom-store', { |
|
18 | 194 |
* reducer, |
195 |
* controls, |
|
196 |
* actions, |
|
197 |
* selectors, |
|
198 |
* resolvers, |
|
16 | 199 |
* } ); |
200 |
* ``` |
|
201 |
* @return {Object} An object for registering the default controls with the |
|
18 | 202 |
* store. |
16 | 203 |
*/ |
18 | 204 |
const controls = { |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
205 |
AWAIT_PROMISE({ |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
206 |
promise |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
207 |
}) { |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
208 |
return promise; |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
209 |
}, |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
210 |
API_FETCH({ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
211 |
request |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
212 |
}) { |
19 | 213 |
return external_wp_apiFetch_default()(request); |
18 | 214 |
} |
16 | 215 |
}; |
216 |
||
19 | 217 |
(window.wp = window.wp || {}).dataControls = __webpack_exports__; |
218 |
/******/ })() |
|
219 |
; |