summaryrefslogtreecommitdiffstats
path: root/wp-includes/js/dist/compose.js
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/js/dist/compose.js')
-rw-r--r--wp-includes/js/dist/compose.js267
1 files changed, 148 insertions, 119 deletions
diff --git a/wp-includes/js/dist/compose.js b/wp-includes/js/dist/compose.js
index a107935..ad81bed 100644
--- a/wp-includes/js/dist/compose.js
+++ b/wp-includes/js/dist/compose.js
@@ -1,14 +1,14 @@
-/******/ (function() { // webpackBootstrap
+/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
-/***/ 5360:
-/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
+/***/ 6689:
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ createUndoManager: function() { return /* binding */ createUndoManager; }
+/* harmony export */ createUndoManager: () => (/* binding */ createUndoManager)
/* harmony export */ });
-/* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9127);
+/* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(923);
/* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_0__);
/**
* WordPress dependencies
@@ -184,7 +184,7 @@ function createUndoManager() {
/***/ }),
-/***/ 8294:
+/***/ 3758:
/***/ (function(module) {
/*!
@@ -1075,8 +1075,8 @@ module.exports.TinyEmitter = E;
/***/ }),
-/***/ 7973:
-/***/ (function(module, exports, __webpack_require__) {
+/***/ 1933:
+/***/ ((module, exports, __webpack_require__) => {
var __WEBPACK_AMD_DEFINE_RESULT__;/*global define:false */
/**
@@ -2141,8 +2141,8 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/*global define:false */
/***/ }),
-/***/ 5538:
-/***/ (function() {
+/***/ 5760:
+/***/ (() => {
/**
* adds a bindGlobal method to Mousetrap that allows you to
@@ -2194,8 +2194,8 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/*global define:false */
/***/ }),
-/***/ 9127:
-/***/ (function(module) {
+/***/ 923:
+/***/ ((module) => {
"use strict";
module.exports = window["wp"]["isShallowEqual"];
@@ -2230,93 +2230,94 @@ module.exports = window["wp"]["isShallowEqual"];
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
-/******/ !function() {
+/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
+/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
-/******/ function() { return module['default']; } :
-/******/ function() { return module; };
+/******/ () => (module['default']) :
+/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
-/******/ }();
+/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
-/******/ !function() {
+/******/ (() => {
/******/ // define getter functions for harmony exports
-/******/ __webpack_require__.d = function(exports, definition) {
+/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
-/******/ }();
+/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
-/******/ !function() {
-/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
-/******/ }();
+/******/ (() => {
+/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
+/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
-/******/ !function() {
+/******/ (() => {
/******/ // define __esModule on exports
-/******/ __webpack_require__.r = function(exports) {
+/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
-/******/ }();
+/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
-!function() {
+(() => {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
- __experimentalUseDialog: function() { return /* reexport */ use_dialog; },
- __experimentalUseDragging: function() { return /* reexport */ useDragging; },
- __experimentalUseDropZone: function() { return /* reexport */ useDropZone; },
- __experimentalUseFixedWindowList: function() { return /* reexport */ useFixedWindowList; },
- __experimentalUseFocusOutside: function() { return /* reexport */ useFocusOutside; },
- compose: function() { return /* reexport */ higher_order_compose; },
- createHigherOrderComponent: function() { return /* reexport */ createHigherOrderComponent; },
- debounce: function() { return /* reexport */ debounce; },
- ifCondition: function() { return /* reexport */ if_condition; },
- pipe: function() { return /* reexport */ higher_order_pipe; },
- pure: function() { return /* reexport */ higher_order_pure; },
- throttle: function() { return /* reexport */ throttle; },
- useAsyncList: function() { return /* reexport */ use_async_list; },
- useConstrainedTabbing: function() { return /* reexport */ use_constrained_tabbing; },
- useCopyOnClick: function() { return /* reexport */ useCopyOnClick; },
- useCopyToClipboard: function() { return /* reexport */ useCopyToClipboard; },
- useDebounce: function() { return /* reexport */ useDebounce; },
- useDisabled: function() { return /* reexport */ useDisabled; },
- useFocusOnMount: function() { return /* reexport */ useFocusOnMount; },
- useFocusReturn: function() { return /* reexport */ use_focus_return; },
- useFocusableIframe: function() { return /* reexport */ useFocusableIframe; },
- useInstanceId: function() { return /* reexport */ use_instance_id; },
- useIsomorphicLayoutEffect: function() { return /* reexport */ use_isomorphic_layout_effect; },
- useKeyboardShortcut: function() { return /* reexport */ use_keyboard_shortcut; },
- useMediaQuery: function() { return /* reexport */ useMediaQuery; },
- useMergeRefs: function() { return /* reexport */ useMergeRefs; },
- usePrevious: function() { return /* reexport */ usePrevious; },
- useReducedMotion: function() { return /* reexport */ use_reduced_motion; },
- useRefEffect: function() { return /* reexport */ useRefEffect; },
- useResizeObserver: function() { return /* reexport */ useResizeAware; },
- useStateWithHistory: function() { return /* reexport */ useStateWithHistory; },
- useThrottle: function() { return /* reexport */ useThrottle; },
- useViewportMatch: function() { return /* reexport */ use_viewport_match; },
- useWarnOnChange: function() { return /* reexport */ use_warn_on_change; },
- withGlobalEvents: function() { return /* reexport */ withGlobalEvents; },
- withInstanceId: function() { return /* reexport */ with_instance_id; },
- withSafeTimeout: function() { return /* reexport */ with_safe_timeout; },
- withState: function() { return /* reexport */ withState; }
+ __experimentalUseDialog: () => (/* reexport */ use_dialog),
+ __experimentalUseDragging: () => (/* reexport */ useDragging),
+ __experimentalUseDropZone: () => (/* reexport */ useDropZone),
+ __experimentalUseFixedWindowList: () => (/* reexport */ useFixedWindowList),
+ __experimentalUseFocusOutside: () => (/* reexport */ useFocusOutside),
+ compose: () => (/* reexport */ higher_order_compose),
+ createHigherOrderComponent: () => (/* reexport */ createHigherOrderComponent),
+ debounce: () => (/* reexport */ debounce),
+ ifCondition: () => (/* reexport */ if_condition),
+ pipe: () => (/* reexport */ higher_order_pipe),
+ pure: () => (/* reexport */ higher_order_pure),
+ throttle: () => (/* reexport */ throttle),
+ useAsyncList: () => (/* reexport */ use_async_list),
+ useConstrainedTabbing: () => (/* reexport */ use_constrained_tabbing),
+ useCopyOnClick: () => (/* reexport */ useCopyOnClick),
+ useCopyToClipboard: () => (/* reexport */ useCopyToClipboard),
+ useDebounce: () => (/* reexport */ useDebounce),
+ useDebouncedInput: () => (/* reexport */ useDebouncedInput),
+ useDisabled: () => (/* reexport */ useDisabled),
+ useFocusOnMount: () => (/* reexport */ useFocusOnMount),
+ useFocusReturn: () => (/* reexport */ use_focus_return),
+ useFocusableIframe: () => (/* reexport */ useFocusableIframe),
+ useInstanceId: () => (/* reexport */ use_instance_id),
+ useIsomorphicLayoutEffect: () => (/* reexport */ use_isomorphic_layout_effect),
+ useKeyboardShortcut: () => (/* reexport */ use_keyboard_shortcut),
+ useMediaQuery: () => (/* reexport */ useMediaQuery),
+ useMergeRefs: () => (/* reexport */ useMergeRefs),
+ usePrevious: () => (/* reexport */ usePrevious),
+ useReducedMotion: () => (/* reexport */ use_reduced_motion),
+ useRefEffect: () => (/* reexport */ useRefEffect),
+ useResizeObserver: () => (/* reexport */ useResizeAware),
+ useStateWithHistory: () => (/* reexport */ useStateWithHistory),
+ useThrottle: () => (/* reexport */ useThrottle),
+ useViewportMatch: () => (/* reexport */ use_viewport_match),
+ useWarnOnChange: () => (/* reexport */ use_warn_on_change),
+ withGlobalEvents: () => (/* reexport */ withGlobalEvents),
+ withInstanceId: () => (/* reexport */ with_instance_id),
+ withSafeTimeout: () => (/* reexport */ with_safe_timeout),
+ withState: () => (/* reexport */ withState)
});
;// CONCATENATED MODULE: ./node_modules/tslib/tslib.es6.mjs
@@ -2661,7 +2662,7 @@ function __disposeResources(env) {
return next();
}
-/* harmony default export */ var tslib_es6 = ({
+/* harmony default export */ const tslib_es6 = ({
__extends,
__assign,
__rest,
@@ -3178,7 +3179,7 @@ const basePipe = (reverse = false) => (...funcs) => (...args) => {
*/
const pipe = basePipe();
-/* harmony default export */ var higher_order_pipe = (pipe);
+/* harmony default export */ const higher_order_pipe = (pipe);
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/compose.js
/**
@@ -3195,10 +3196,10 @@ const pipe = basePipe();
* @see https://docs-lodash.com/v4/flow-right/
*/
const compose = basePipe(true);
-/* harmony default export */ var higher_order_compose = (compose);
+/* harmony default export */ const higher_order_compose = (compose);
-;// CONCATENATED MODULE: external ["wp","element"]
-var external_wp_element_namespaceObject = window["wp"]["element"];
+;// CONCATENATED MODULE: external "React"
+const external_React_namespaceObject = window["React"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/if-condition/index.js
/**
@@ -3232,16 +3233,18 @@ function ifCondition(predicate) {
if (!predicate(props)) {
return null;
}
- return (0,external_wp_element_namespaceObject.createElement)(WrappedComponent, {
+ return (0,external_React_namespaceObject.createElement)(WrappedComponent, {
...props
});
}, 'ifCondition');
}
-/* harmony default export */ var if_condition = (ifCondition);
+/* harmony default export */ const if_condition = (ifCondition);
// EXTERNAL MODULE: external ["wp","isShallowEqual"]
-var external_wp_isShallowEqual_ = __webpack_require__(9127);
+var external_wp_isShallowEqual_ = __webpack_require__(923);
var external_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_wp_isShallowEqual_);
+;// CONCATENATED MODULE: external ["wp","element"]
+const external_wp_element_namespaceObject = window["wp"]["element"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/pure/index.js
/**
@@ -3262,6 +3265,8 @@ var external_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(exte
/**
* Given a component returns the enhanced component augmented with a component
* only re-rendering when its props/state change
+ *
+ * @deprecated Use `memo` or `PureComponent` instead.
*/
const pure = createHigherOrderComponent(function (WrappedComponent) {
if (WrappedComponent.prototype instanceof external_wp_element_namespaceObject.Component) {
@@ -3276,16 +3281,16 @@ const pure = createHigherOrderComponent(function (WrappedComponent) {
return !external_wp_isShallowEqual_default()(nextProps, this.props);
}
render() {
- return (0,external_wp_element_namespaceObject.createElement)(WrappedComponent, {
+ return (0,external_React_namespaceObject.createElement)(WrappedComponent, {
...this.props
});
}
};
}, 'pure');
-/* harmony default export */ var higher_order_pure = (pure);
+/* harmony default export */ const higher_order_pure = (pure);
;// CONCATENATED MODULE: external ["wp","deprecated"]
-var external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
+const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-global-events/listener.js
/**
@@ -3324,7 +3329,7 @@ class Listener {
});
}
}
-/* harmony default export */ var listener = (Listener);
+/* harmony default export */ const listener = (Listener);
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-global-events/index.js
@@ -3390,11 +3395,10 @@ function withGlobalEvents(eventTypesToHandlers) {
});
}
handleEvent( /** @type {any} */event) {
- const handler = eventTypesToHandlers[/** @type {keyof GlobalEventHandlersEventMap} */
+ const handler = eventTypesToHandlers[( /** @type {keyof GlobalEventHandlersEventMap} */
event.type
- /* eslint-enable jsdoc/no-undefined-types */];
-
+ /* eslint-enable jsdoc/no-undefined-types */)];
if (typeof this.wrappedRef[handler] === 'function') {
this.wrappedRef[handler](event);
}
@@ -3409,14 +3413,14 @@ function withGlobalEvents(eventTypesToHandlers) {
}
}
render() {
- return (0,external_wp_element_namespaceObject.createElement)(WrappedComponent, {
+ return (0,external_React_namespaceObject.createElement)(WrappedComponent, {
...this.props.ownProps,
ref: this.handleRef
});
}
}
return (0,external_wp_element_namespaceObject.forwardRef)((props, ref) => {
- return (0,external_wp_element_namespaceObject.createElement)(Wrapper, {
+ return (0,external_React_namespaceObject.createElement)(Wrapper, {
ownProps: props,
forwardedRef: ref
});
@@ -3471,7 +3475,7 @@ function useInstanceId(object, prefix, preferredId) {
return prefix ? `${prefix}-${id}` : id;
}, [object, preferredId, prefix]);
}
-/* harmony default export */ var use_instance_id = (useInstanceId);
+/* harmony default export */ const use_instance_id = (useInstanceId);
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-instance-id/index.js
@@ -3489,13 +3493,13 @@ const withInstanceId = createHigherOrderComponent(WrappedComponent => {
return props => {
const instanceId = use_instance_id(WrappedComponent);
// @ts-ignore
- return (0,external_wp_element_namespaceObject.createElement)(WrappedComponent, {
+ return (0,external_React_namespaceObject.createElement)(WrappedComponent, {
...props,
instanceId: instanceId
});
};
}, 'instanceId');
-/* harmony default export */ var with_instance_id = (withInstanceId);
+/* harmony default export */ const with_instance_id = (withInstanceId);
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-safe-timeout/index.js
@@ -3549,7 +3553,7 @@ const withSafeTimeout = createHigherOrderComponent(OriginalComponent => {
render() {
return (
// @ts-ignore
- (0,external_wp_element_namespaceObject.createElement)(OriginalComponent, {
+ (0,external_React_namespaceObject.createElement)(OriginalComponent, {
...this.props,
setTimeout: this.setTimeout,
clearTimeout: this.clearTimeout
@@ -3558,7 +3562,7 @@ const withSafeTimeout = createHigherOrderComponent(OriginalComponent => {
}
};
}, 'withSafeTimeout');
-/* harmony default export */ var with_safe_timeout = (withSafeTimeout);
+/* harmony default export */ const with_safe_timeout = (withSafeTimeout);
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-state/index.js
@@ -3596,7 +3600,7 @@ function withState(initialState = {}) {
this.state = initialState;
}
render() {
- return (0,external_wp_element_namespaceObject.createElement)(OriginalComponent, {
+ return (0,external_React_namespaceObject.createElement)(OriginalComponent, {
...this.props,
...this.state,
setState: this.setState
@@ -3606,10 +3610,8 @@ function withState(initialState = {}) {
}, 'withState');
}
-;// CONCATENATED MODULE: external ["wp","keycodes"]
-var external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
;// CONCATENATED MODULE: external ["wp","dom"]
-var external_wp_dom_namespaceObject = window["wp"]["dom"];
+const external_wp_dom_namespaceObject = window["wp"]["dom"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-ref-effect/index.js
/**
* External dependencies
@@ -3656,7 +3658,6 @@ function useRefEffect(callback, dependencies) {
*/
-
/**
* Internal dependencies
*/
@@ -3687,11 +3688,11 @@ function useConstrainedTabbing() {
return useRefEffect(( /** @type {HTMLElement} */node) => {
function onKeyDown( /** @type {KeyboardEvent} */event) {
const {
- keyCode,
+ key,
shiftKey,
target
} = event;
- if (keyCode !== external_wp_keycodes_namespaceObject.TAB) {
+ if (key !== 'Tab') {
return;
}
const action = shiftKey ? 'findPrevious' : 'findNext';
@@ -3739,10 +3740,10 @@ function useConstrainedTabbing() {
};
}, []);
}
-/* harmony default export */ var use_constrained_tabbing = (useConstrainedTabbing);
+/* harmony default export */ const use_constrained_tabbing = (useConstrainedTabbing);
// EXTERNAL MODULE: ./node_modules/clipboard/dist/clipboard.js
-var dist_clipboard = __webpack_require__(8294);
+var dist_clipboard = __webpack_require__(3758);
var clipboard_default = /*#__PURE__*/__webpack_require__.n(dist_clipboard);
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-copy-on-click/index.js
/**
@@ -3876,9 +3877,6 @@ function useCopyToClipboard(text, onSuccess) {
// button, ensuring that it is not reset to the body, and
// further that it is kept within the rendered node.
clearSelection();
- // Handle ClipboardJS focus bug, see
- // https://github.com/zenorocha/clipboard.js/issues/680
- node.focus();
if (onSuccessRef.current) {
onSuccessRef.current();
}
@@ -3889,6 +3887,8 @@ function useCopyToClipboard(text, onSuccess) {
}, []);
}
+;// CONCATENATED MODULE: external ["wp","keycodes"]
+const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-focus-on-mount/index.js
/**
* WordPress dependencies
@@ -4039,7 +4039,7 @@ function useFocusReturn(onFocusReturn) {
}
}, []);
}
-/* harmony default export */ var use_focus_return = (useFocusReturn);
+/* harmony default export */ const use_focus_return = (useFocusReturn);
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-focus-outside/index.js
/**
@@ -4351,6 +4351,9 @@ function useMergeRefs(refs) {
*/
function useDialog(options) {
const currentOptions = (0,external_wp_element_namespaceObject.useRef)();
+ const {
+ constrainTabbing = options.focusOnMount !== false
+ } = options;
(0,external_wp_element_namespaceObject.useEffect)(() => {
currentOptions.current = options;
}, Object.values(options));
@@ -4378,12 +4381,12 @@ function useDialog(options) {
}
});
}, []);
- return [useMergeRefs([options.focusOnMount !== false ? constrainedTabbingRef : null, options.focusOnMount !== false ? focusReturnRef : null, options.focusOnMount !== false ? focusOnMountRef : null, closeOnEscapeRef]), {
+ return [useMergeRefs([constrainTabbing ? constrainedTabbingRef : null, options.focusOnMount !== false ? focusReturnRef : null, options.focusOnMount !== false ? focusOnMountRef : null, closeOnEscapeRef]), {
...focusOutsideProps,
tabIndex: -1
}];
}
-/* harmony default export */ var use_dialog = (useDialog);
+/* harmony default export */ const use_dialog = (useDialog);
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-disabled/index.js
/**
@@ -4480,7 +4483,7 @@ function useDisabled({
* throws a warning when using useLayoutEffect in that environment.
*/
const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? external_wp_element_namespaceObject.useLayoutEffect : external_wp_element_namespaceObject.useEffect;
-/* harmony default export */ var use_isomorphic_layout_effect = (useIsomorphicLayoutEffect);
+/* harmony default export */ const use_isomorphic_layout_effect = (useIsomorphicLayoutEffect);
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-dragging/index.js
/**
@@ -4556,10 +4559,10 @@ function useDragging({
}
// EXTERNAL MODULE: ./node_modules/mousetrap/mousetrap.js
-var mousetrap_mousetrap = __webpack_require__(7973);
+var mousetrap_mousetrap = __webpack_require__(1933);
var mousetrap_default = /*#__PURE__*/__webpack_require__.n(mousetrap_mousetrap);
// EXTERNAL MODULE: ./node_modules/mousetrap/plugins/global-bind/mousetrap-global-bind.js
-var mousetrap_global_bind = __webpack_require__(5538);
+var mousetrap_global_bind = __webpack_require__(5760);
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-keyboard-shortcut/index.js
/**
* External dependencies
@@ -4641,7 +4644,7 @@ shortcuts, callback, {
};
}, [shortcuts, bindGlobal, eventName, target, isDisabled]);
}
-/* harmony default export */ var use_keyboard_shortcut = (useKeyboardShortcut);
+/* harmony default export */ const use_keyboard_shortcut = (useKeyboardShortcut);
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-media-query/index.js
/**
@@ -4731,10 +4734,10 @@ function usePrevious(value) {
* @return {boolean} Reduced motion preference value.
*/
const useReducedMotion = () => useMediaQuery('(prefers-reduced-motion: reduce)');
-/* harmony default export */ var use_reduced_motion = (useReducedMotion);
+/* harmony default export */ const use_reduced_motion = (useReducedMotion);
// EXTERNAL MODULE: ./node_modules/@wordpress/undo-manager/build-module/index.js
-var build_module = __webpack_require__(5360);
+var build_module = __webpack_require__(6689);
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-state-with-history/index.js
/**
* WordPress dependencies
@@ -4904,7 +4907,7 @@ const useViewportMatch = (breakpoint, operator = '>=') => {
return mediaQueryResult;
};
useViewportMatch.__experimentalWidthProvider = ViewportMatchWidthContext.Provider;
-/* harmony default export */ var use_viewport_match = (useViewportMatch);
+/* harmony default export */ const use_viewport_match = (useViewportMatch);
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-resize-observer/index.js
@@ -5130,7 +5133,7 @@ function useResizeAware() {
height: height !== null && height !== void 0 ? height : null
};
}, [width, height]);
- const resizeListener = (0,external_wp_element_namespaceObject.createElement)("div", {
+ const resizeListener = (0,external_React_namespaceObject.createElement)("div", {
style: {
position: 'absolute',
top: 0,
@@ -5149,7 +5152,7 @@ function useResizeAware() {
}
;// CONCATENATED MODULE: external ["wp","priorityQueue"]
-var external_wp_priorityQueue_namespaceObject = window["wp"]["priorityQueue"];
+const external_wp_priorityQueue_namespaceObject = window["wp"]["priorityQueue"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-async-list/index.js
/**
* WordPress dependencies
@@ -5210,7 +5213,7 @@ function useAsyncList(list, config = {
}, [list]);
return current;
}
-/* harmony default export */ var use_async_list = (useAsyncList);
+/* harmony default export */ const use_async_list = (useAsyncList);
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-warn-on-change/index.js
/**
@@ -5242,18 +5245,15 @@ function useAsyncList(list, config = {
function useWarnOnChange(object, prefix = 'Change detection') {
const previousValues = usePrevious(object);
Object.entries(previousValues !== null && previousValues !== void 0 ? previousValues : []).forEach(([key, value]) => {
- if (value !== object[/** @type {keyof typeof object} */key]) {
+ if (value !== object[( /** @type {keyof typeof object} */key)]) {
// eslint-disable-next-line no-console
- console.warn(`${prefix}: ${key} key changed:`, value, object[/** @type {keyof typeof object} */key]
+ console.warn(`${prefix}: ${key} key changed:`, value, object[( /** @type {keyof typeof object} */key)]
/* eslint-enable jsdoc/check-types */);
}
});
}
+/* harmony default export */ const use_warn_on_change = (useWarnOnChange);
-/* harmony default export */ var use_warn_on_change = (useWarnOnChange);
-
-;// CONCATENATED MODULE: external "React"
-var external_React_namespaceObject = window["React"];
;// CONCATENATED MODULE: ./node_modules/use-memo-one/dist/use-memo-one.esm.js
@@ -5338,6 +5338,33 @@ function useDebounce(fn, wait, options) {
return debounced;
}
+;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-debounced-input/index.js
+/**
+ * WordPress dependencies
+ */
+
+
+/**
+ * Internal dependencies
+ */
+
+
+/**
+ * Helper hook for input fields that need to debounce the value before using it.
+ *
+ * @param {any} defaultValue The default value to use.
+ * @return {[string, Function, string]} The input value, the setter and the debounced input value.
+ */
+function useDebouncedInput(defaultValue = '') {
+ const [input, setInput] = (0,external_wp_element_namespaceObject.useState)(defaultValue);
+ const [debouncedInput, setDebouncedState] = (0,external_wp_element_namespaceObject.useState)(defaultValue);
+ const setDebouncedInput = useDebounce(setDebouncedState, 250);
+ (0,external_wp_element_namespaceObject.useEffect)(() => {
+ setDebouncedInput(input);
+ }, [input]);
+ return [input, setInput, debouncedInput];
+}
+
;// CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-throttle/index.js
/**
* External dependencies
@@ -5813,7 +5840,9 @@ function useFixedWindowList(elementRef, itemHeight, totalItems, options) {
-}();
+
+})();
+
(window.wp = window.wp || {}).compose = __webpack_exports__;
/******/ })()
; \ No newline at end of file