@wordpress/compose 7.10.0 → 7.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 7.11.0 (2024-10-30)
6
+
5
7
  ## 7.10.0 (2024-10-16)
6
8
 
7
9
  ## 7.9.0 (2024-10-03)
@@ -27,7 +27,9 @@ var _useRefEffect = _interopRequireDefault(require("../use-ref-effect"));
27
27
  */
28
28
  function useUpdatedRef(value) {
29
29
  const ref = (0, _element.useRef)(value);
30
- ref.current = value;
30
+ (0, _element.useLayoutEffect)(() => {
31
+ ref.current = value;
32
+ }, [value]);
31
33
  return ref;
32
34
  }
33
35
 
@@ -1 +1 @@
1
- {"version":3,"names":["_clipboard","_interopRequireDefault","require","_element","_useRefEffect","useUpdatedRef","value","ref","useRef","current","useCopyToClipboard","text","onSuccess","textRef","onSuccessRef","useRefEffect","node","clipboard","Clipboard","on","clearSelection","destroy"],"sources":["@wordpress/compose/src/hooks/use-copy-to-clipboard/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport Clipboard from 'clipboard';\n\n/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useRefEffect from '../use-ref-effect';\n\n/**\n * @template T\n * @param {T} value\n * @return {import('react').RefObject<T>} The updated ref\n */\nfunction useUpdatedRef( value ) {\n\tconst ref = useRef( value );\n\tref.current = value;\n\treturn ref;\n}\n\n/**\n * Copies the given text to the clipboard when the element is clicked.\n *\n * @template {HTMLElement} TElementType\n * @param {string | (() => string)} text The text to copy. Use a function if not\n * already available and expensive to compute.\n * @param {Function} onSuccess Called when to text is copied.\n *\n * @return {import('react').Ref<TElementType>} A ref to assign to the target element.\n */\nexport default function useCopyToClipboard( text, onSuccess ) {\n\t// Store the dependencies as refs and continuously update them so they're\n\t// fresh when the callback is called.\n\tconst textRef = useUpdatedRef( text );\n\tconst onSuccessRef = useUpdatedRef( onSuccess );\n\treturn useRefEffect( ( node ) => {\n\t\t// Clipboard listens to click events.\n\t\tconst clipboard = new Clipboard( node, {\n\t\t\ttext() {\n\t\t\t\treturn typeof textRef.current === 'function'\n\t\t\t\t\t? textRef.current()\n\t\t\t\t\t: textRef.current || '';\n\t\t\t},\n\t\t} );\n\n\t\tclipboard.on( 'success', ( { clearSelection } ) => {\n\t\t\t// Clearing selection will move focus back to the triggering\n\t\t\t// button, ensuring that it is not reset to the body, and\n\t\t\t// further that it is kept within the rendered node.\n\t\t\tclearSelection();\n\n\t\t\tif ( onSuccessRef.current ) {\n\t\t\t\tonSuccessRef.current();\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tclipboard.destroy();\n\t\t};\n\t}, [] );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA,SAASG,aAAaA,CAAEC,KAAK,EAAG;EAC/B,MAAMC,GAAG,GAAG,IAAAC,eAAM,EAAEF,KAAM,CAAC;EAC3BC,GAAG,CAACE,OAAO,GAAGH,KAAK;EACnB,OAAOC,GAAG;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASG,kBAAkBA,CAAEC,IAAI,EAAEC,SAAS,EAAG;EAC7D;EACA;EACA,MAAMC,OAAO,GAAGR,aAAa,CAAEM,IAAK,CAAC;EACrC,MAAMG,YAAY,GAAGT,aAAa,CAAEO,SAAU,CAAC;EAC/C,OAAO,IAAAG,qBAAY,EAAIC,IAAI,IAAM;IAChC;IACA,MAAMC,SAAS,GAAG,IAAIC,kBAAS,CAAEF,IAAI,EAAE;MACtCL,IAAIA,CAAA,EAAG;QACN,OAAO,OAAOE,OAAO,CAACJ,OAAO,KAAK,UAAU,GACzCI,OAAO,CAACJ,OAAO,CAAC,CAAC,GACjBI,OAAO,CAACJ,OAAO,IAAI,EAAE;MACzB;IACD,CAAE,CAAC;IAEHQ,SAAS,CAACE,EAAE,CAAE,SAAS,EAAE,CAAE;MAAEC;IAAe,CAAC,KAAM;MAClD;MACA;MACA;MACAA,cAAc,CAAC,CAAC;MAEhB,IAAKN,YAAY,CAACL,OAAO,EAAG;QAC3BK,YAAY,CAACL,OAAO,CAAC,CAAC;MACvB;IACD,CAAE,CAAC;IAEH,OAAO,MAAM;MACZQ,SAAS,CAACI,OAAO,CAAC,CAAC;IACpB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;AACR","ignoreList":[]}
1
+ {"version":3,"names":["_clipboard","_interopRequireDefault","require","_element","_useRefEffect","useUpdatedRef","value","ref","useRef","useLayoutEffect","current","useCopyToClipboard","text","onSuccess","textRef","onSuccessRef","useRefEffect","node","clipboard","Clipboard","on","clearSelection","destroy"],"sources":["@wordpress/compose/src/hooks/use-copy-to-clipboard/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport Clipboard from 'clipboard';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useLayoutEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useRefEffect from '../use-ref-effect';\n\n/**\n * @template T\n * @param {T} value\n * @return {import('react').RefObject<T>} The updated ref\n */\nfunction useUpdatedRef( value ) {\n\tconst ref = useRef( value );\n\tuseLayoutEffect( () => {\n\t\tref.current = value;\n\t}, [ value ] );\n\treturn ref;\n}\n\n/**\n * Copies the given text to the clipboard when the element is clicked.\n *\n * @template {HTMLElement} TElementType\n * @param {string | (() => string)} text The text to copy. Use a function if not\n * already available and expensive to compute.\n * @param {Function} onSuccess Called when to text is copied.\n *\n * @return {import('react').Ref<TElementType>} A ref to assign to the target element.\n */\nexport default function useCopyToClipboard( text, onSuccess ) {\n\t// Store the dependencies as refs and continuously update them so they're\n\t// fresh when the callback is called.\n\tconst textRef = useUpdatedRef( text );\n\tconst onSuccessRef = useUpdatedRef( onSuccess );\n\treturn useRefEffect( ( node ) => {\n\t\t// Clipboard listens to click events.\n\t\tconst clipboard = new Clipboard( node, {\n\t\t\ttext() {\n\t\t\t\treturn typeof textRef.current === 'function'\n\t\t\t\t\t? textRef.current()\n\t\t\t\t\t: textRef.current || '';\n\t\t\t},\n\t\t} );\n\n\t\tclipboard.on( 'success', ( { clearSelection } ) => {\n\t\t\t// Clearing selection will move focus back to the triggering\n\t\t\t// button, ensuring that it is not reset to the body, and\n\t\t\t// further that it is kept within the rendered node.\n\t\t\tclearSelection();\n\n\t\t\tif ( onSuccessRef.current ) {\n\t\t\t\tonSuccessRef.current();\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tclipboard.destroy();\n\t\t};\n\t}, [] );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA,SAASG,aAAaA,CAAEC,KAAK,EAAG;EAC/B,MAAMC,GAAG,GAAG,IAAAC,eAAM,EAAEF,KAAM,CAAC;EAC3B,IAAAG,wBAAe,EAAE,MAAM;IACtBF,GAAG,CAACG,OAAO,GAAGJ,KAAK;EACpB,CAAC,EAAE,CAAEA,KAAK,CAAG,CAAC;EACd,OAAOC,GAAG;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASI,kBAAkBA,CAAEC,IAAI,EAAEC,SAAS,EAAG;EAC7D;EACA;EACA,MAAMC,OAAO,GAAGT,aAAa,CAAEO,IAAK,CAAC;EACrC,MAAMG,YAAY,GAAGV,aAAa,CAAEQ,SAAU,CAAC;EAC/C,OAAO,IAAAG,qBAAY,EAAIC,IAAI,IAAM;IAChC;IACA,MAAMC,SAAS,GAAG,IAAIC,kBAAS,CAAEF,IAAI,EAAE;MACtCL,IAAIA,CAAA,EAAG;QACN,OAAO,OAAOE,OAAO,CAACJ,OAAO,KAAK,UAAU,GACzCI,OAAO,CAACJ,OAAO,CAAC,CAAC,GACjBI,OAAO,CAACJ,OAAO,IAAI,EAAE;MACzB;IACD,CAAE,CAAC;IAEHQ,SAAS,CAACE,EAAE,CAAE,SAAS,EAAE,CAAE;MAAEC;IAAe,CAAC,KAAM;MAClD;MACA;MACA;MACAA,cAAc,CAAC,CAAC;MAEhB,IAAKN,YAAY,CAACL,OAAO,EAAG;QAC3BK,YAAY,CAACL,OAAO,CAAC,CAAC;MACvB;IACD,CAAE,CAAC;IAEH,OAAO,MAAM;MACZQ,SAAS,CAACI,OAAO,CAAC,CAAC;IACpB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;AACR","ignoreList":[]}
@@ -5,38 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = useDropZone;
8
- var _element = require("@wordpress/element");
9
8
  var _useRefEffect = _interopRequireDefault(require("../use-ref-effect"));
10
- /**
11
- * WordPress dependencies
12
- */
13
-
9
+ var _useEvent = _interopRequireDefault(require("../use-event"));
14
10
  /**
15
11
  * Internal dependencies
16
12
  */
17
13
 
18
- /* eslint-disable jsdoc/valid-types */
19
- /**
20
- * @template T
21
- * @param {T} value
22
- * @return {import('react').MutableRefObject<T|null>} A ref with the value.
23
- */
24
- function useFreshRef(value) {
25
- /* eslint-enable jsdoc/valid-types */
26
- /* eslint-disable jsdoc/no-undefined-types */
27
- /** @type {import('react').MutableRefObject<T>} */
28
- /* eslint-enable jsdoc/no-undefined-types */
29
- // Disable reason: We're doing something pretty JavaScript-y here where the
30
- // ref will always have a current value that is not null or undefined but it
31
- // needs to start as undefined. We don't want to change the return type so
32
- // it's easier to just ts-ignore this specific line that's complaining about
33
- // undefined not being part of T.
34
- // @ts-ignore
35
- const ref = (0, _element.useRef)();
36
- ref.current = value;
37
- return ref;
38
- }
39
-
40
14
  /**
41
15
  * A hook to facilitate drag and drop handling.
42
16
  *
@@ -62,12 +36,12 @@ function useDropZone({
62
36
  onDragEnd: _onDragEnd,
63
37
  onDragOver: _onDragOver
64
38
  }) {
65
- const onDropRef = useFreshRef(_onDrop);
66
- const onDragStartRef = useFreshRef(_onDragStart);
67
- const onDragEnterRef = useFreshRef(_onDragEnter);
68
- const onDragLeaveRef = useFreshRef(_onDragLeave);
69
- const onDragEndRef = useFreshRef(_onDragEnd);
70
- const onDragOverRef = useFreshRef(_onDragOver);
39
+ const onDropEvent = (0, _useEvent.default)(_onDrop);
40
+ const onDragStartEvent = (0, _useEvent.default)(_onDragStart);
41
+ const onDragEnterEvent = (0, _useEvent.default)(_onDragEnter);
42
+ const onDragLeaveEvent = (0, _useEvent.default)(_onDragLeave);
43
+ const onDragEndEvent = (0, _useEvent.default)(_onDragEnd);
44
+ const onDragOverEvent = (0, _useEvent.default)(_onDragOver);
71
45
  return (0, _useRefEffect.default)(elem => {
72
46
  if (isDisabled) {
73
47
  return;
@@ -118,8 +92,8 @@ function useDropZone({
118
92
  // node is removed.
119
93
  ownerDocument.addEventListener('dragend', maybeDragEnd);
120
94
  ownerDocument.addEventListener('mousemove', maybeDragEnd);
121
- if (onDragStartRef.current) {
122
- onDragStartRef.current(event);
95
+ if (_onDragStart) {
96
+ onDragStartEvent(event);
123
97
  }
124
98
  }
125
99
  function onDragEnter(/** @type {DragEvent} */event) {
@@ -132,14 +106,14 @@ function useDropZone({
132
106
  if (element.contains(/** @type {Node} */event.relatedTarget)) {
133
107
  return;
134
108
  }
135
- if (onDragEnterRef.current) {
136
- onDragEnterRef.current(event);
109
+ if (_onDragEnter) {
110
+ onDragEnterEvent(event);
137
111
  }
138
112
  }
139
113
  function onDragOver(/** @type {DragEvent} */event) {
140
114
  // Only call onDragOver for the innermost hovered drop zones.
141
- if (!event.defaultPrevented && onDragOverRef.current) {
142
- onDragOverRef.current(event);
115
+ if (!event.defaultPrevented && _onDragOver) {
116
+ onDragOverEvent(event);
143
117
  }
144
118
 
145
119
  // Prevent the browser default while also signalling to parent
@@ -158,8 +132,8 @@ function useDropZone({
158
132
  if (isElementInZone(event.relatedTarget)) {
159
133
  return;
160
134
  }
161
- if (onDragLeaveRef.current) {
162
- onDragLeaveRef.current(event);
135
+ if (_onDragLeave) {
136
+ onDragLeaveEvent(event);
163
137
  }
164
138
  }
165
139
  function onDrop(/** @type {DragEvent} */event) {
@@ -177,8 +151,8 @@ function useDropZone({
177
151
  // not recognized.
178
152
  // eslint-disable-next-line no-unused-expressions
179
153
  event.dataTransfer && event.dataTransfer.files.length;
180
- if (onDropRef.current) {
181
- onDropRef.current(event);
154
+ if (_onDrop) {
155
+ onDropEvent(event);
182
156
  }
183
157
  maybeDragEnd(event);
184
158
  }
@@ -189,11 +163,11 @@ function useDropZone({
189
163
  isDragging = false;
190
164
  ownerDocument.removeEventListener('dragend', maybeDragEnd);
191
165
  ownerDocument.removeEventListener('mousemove', maybeDragEnd);
192
- if (onDragEndRef.current) {
193
- onDragEndRef.current(event);
166
+ if (_onDragEnd) {
167
+ onDragEndEvent(event);
194
168
  }
195
169
  }
196
- element.dataset.isDropZone = 'true';
170
+ element.setAttribute('data-is-drop-zone', 'true');
197
171
  element.addEventListener('drop', onDrop);
198
172
  element.addEventListener('dragenter', onDragEnter);
199
173
  element.addEventListener('dragover', onDragOver);
@@ -202,7 +176,7 @@ function useDropZone({
202
176
  // the document.
203
177
  ownerDocument.addEventListener('dragenter', maybeDragStart);
204
178
  return () => {
205
- delete element.dataset.isDropZone;
179
+ element.removeAttribute('data-is-drop-zone');
206
180
  element.removeEventListener('drop', onDrop);
207
181
  element.removeEventListener('dragenter', onDragEnter);
208
182
  element.removeEventListener('dragover', onDragOver);
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_useRefEffect","_interopRequireDefault","useFreshRef","value","ref","useRef","current","useDropZone","dropZoneElement","isDisabled","onDrop","_onDrop","onDragStart","_onDragStart","onDragEnter","_onDragEnter","onDragLeave","_onDragLeave","onDragEnd","_onDragEnd","onDragOver","_onDragOver","onDropRef","onDragStartRef","onDragEnterRef","onDragLeaveRef","onDragEndRef","onDragOverRef","useRefEffect","elem","element","isDragging","ownerDocument","isElementInZone","targetToCheck","defaultView","HTMLElement","contains","elementToCheck","dataset","isDropZone","parentElement","maybeDragStart","event","addEventListener","maybeDragEnd","preventDefault","relatedTarget","defaultPrevented","dataTransfer","files","length","removeEventListener"],"sources":["@wordpress/compose/src/hooks/use-drop-zone/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useRefEffect from '../use-ref-effect';\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * @template T\n * @param {T} value\n * @return {import('react').MutableRefObject<T|null>} A ref with the value.\n */\nfunction useFreshRef( value ) {\n\t/* eslint-enable jsdoc/valid-types */\n\t/* eslint-disable jsdoc/no-undefined-types */\n\t/** @type {import('react').MutableRefObject<T>} */\n\t/* eslint-enable jsdoc/no-undefined-types */\n\t// Disable reason: We're doing something pretty JavaScript-y here where the\n\t// ref will always have a current value that is not null or undefined but it\n\t// needs to start as undefined. We don't want to change the return type so\n\t// it's easier to just ts-ignore this specific line that's complaining about\n\t// undefined not being part of T.\n\t// @ts-ignore\n\tconst ref = useRef();\n\tref.current = value;\n\treturn ref;\n}\n\n/**\n * A hook to facilitate drag and drop handling.\n *\n * @param {Object} props Named parameters.\n * @param {?HTMLElement} [props.dropZoneElement] Optional element to be used as the drop zone.\n * @param {boolean} [props.isDisabled] Whether or not to disable the drop zone.\n * @param {(e: DragEvent) => void} [props.onDragStart] Called when dragging has started.\n * @param {(e: DragEvent) => void} [props.onDragEnter] Called when the zone is entered.\n * @param {(e: DragEvent) => void} [props.onDragOver] Called when the zone is moved within.\n * @param {(e: DragEvent) => void} [props.onDragLeave] Called when the zone is left.\n * @param {(e: MouseEvent) => void} [props.onDragEnd] Called when dragging has ended.\n * @param {(e: DragEvent) => void} [props.onDrop] Called when dropping in the zone.\n *\n * @return {import('react').RefCallback<HTMLElement>} Ref callback to be passed to the drop zone element.\n */\nexport default function useDropZone( {\n\tdropZoneElement,\n\tisDisabled,\n\tonDrop: _onDrop,\n\tonDragStart: _onDragStart,\n\tonDragEnter: _onDragEnter,\n\tonDragLeave: _onDragLeave,\n\tonDragEnd: _onDragEnd,\n\tonDragOver: _onDragOver,\n} ) {\n\tconst onDropRef = useFreshRef( _onDrop );\n\tconst onDragStartRef = useFreshRef( _onDragStart );\n\tconst onDragEnterRef = useFreshRef( _onDragEnter );\n\tconst onDragLeaveRef = useFreshRef( _onDragLeave );\n\tconst onDragEndRef = useFreshRef( _onDragEnd );\n\tconst onDragOverRef = useFreshRef( _onDragOver );\n\n\treturn useRefEffect(\n\t\t( elem ) => {\n\t\t\tif ( isDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a custom dropZoneRef is passed, use that instead of the element.\n\t\t\t// This allows the dropzone to cover an expanded area, rather than\n\t\t\t// be restricted to the area of the ref returned by this hook.\n\t\t\tconst element = dropZoneElement ?? elem;\n\n\t\t\tlet isDragging = false;\n\n\t\t\tconst { ownerDocument } = element;\n\n\t\t\t/**\n\t\t\t * Checks if an element is in the drop zone.\n\t\t\t *\n\t\t\t * @param {EventTarget|null} targetToCheck\n\t\t\t *\n\t\t\t * @return {boolean} True if in drop zone, false if not.\n\t\t\t */\n\t\t\tfunction isElementInZone( targetToCheck ) {\n\t\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\t\tif (\n\t\t\t\t\t! targetToCheck ||\n\t\t\t\t\t! defaultView ||\n\t\t\t\t\t! ( targetToCheck instanceof defaultView.HTMLElement ) ||\n\t\t\t\t\t! element.contains( targetToCheck )\n\t\t\t\t) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t/** @type {HTMLElement|null} */\n\t\t\t\tlet elementToCheck = targetToCheck;\n\n\t\t\t\tdo {\n\t\t\t\t\tif ( elementToCheck.dataset.isDropZone ) {\n\t\t\t\t\t\treturn elementToCheck === element;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elementToCheck = elementToCheck.parentElement ) );\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfunction maybeDragStart( /** @type {DragEvent} */ event ) {\n\t\t\t\tif ( isDragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tisDragging = true;\n\n\t\t\t\t// Note that `dragend` doesn't fire consistently for file and\n\t\t\t\t// HTML drag events where the drag origin is outside the browser\n\t\t\t\t// window. In Firefox it may also not fire if the originating\n\t\t\t\t// node is removed.\n\t\t\t\townerDocument.addEventListener( 'dragend', maybeDragEnd );\n\t\t\t\townerDocument.addEventListener( 'mousemove', maybeDragEnd );\n\n\t\t\t\tif ( onDragStartRef.current ) {\n\t\t\t\t\tonDragStartRef.current( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction onDragEnter( /** @type {DragEvent} */ event ) {\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// The `dragenter` event will also fire when entering child\n\t\t\t\t// elements, but we only want to call `onDragEnter` when\n\t\t\t\t// entering the drop zone, which means the `relatedTarget`\n\t\t\t\t// (element that has been left) should be outside the drop zone.\n\t\t\t\tif (\n\t\t\t\t\telement.contains(\n\t\t\t\t\t\t/** @type {Node} */ ( event.relatedTarget )\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( onDragEnterRef.current ) {\n\t\t\t\t\tonDragEnterRef.current( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction onDragOver( /** @type {DragEvent} */ event ) {\n\t\t\t\t// Only call onDragOver for the innermost hovered drop zones.\n\t\t\t\tif ( ! event.defaultPrevented && onDragOverRef.current ) {\n\t\t\t\t\tonDragOverRef.current( event );\n\t\t\t\t}\n\n\t\t\t\t// Prevent the browser default while also signalling to parent\n\t\t\t\t// drop zones that `onDragOver` is already handled.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\n\t\t\tfunction onDragLeave( /** @type {DragEvent} */ event ) {\n\t\t\t\t// The `dragleave` event will also fire when leaving child\n\t\t\t\t// elements, but we only want to call `onDragLeave` when\n\t\t\t\t// leaving the drop zone, which means the `relatedTarget`\n\t\t\t\t// (element that has been entered) should be outside the drop\n\t\t\t\t// zone.\n\t\t\t\t// Note: This is not entirely reliable in Safari due to this bug\n\t\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=66547\n\n\t\t\t\tif ( isElementInZone( event.relatedTarget ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( onDragLeaveRef.current ) {\n\t\t\t\t\tonDragLeaveRef.current( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction onDrop( /** @type {DragEvent} */ event ) {\n\t\t\t\t// Don't handle drop if an inner drop zone already handled it.\n\t\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Prevent the browser default while also signalling to parent\n\t\t\t\t// drop zones that `onDrop` is already handled.\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// This seemingly useless line has been shown to resolve a\n\t\t\t\t// Safari issue where files dragged directly from the dock are\n\t\t\t\t// not recognized.\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\tevent.dataTransfer && event.dataTransfer.files.length;\n\n\t\t\t\tif ( onDropRef.current ) {\n\t\t\t\t\tonDropRef.current( event );\n\t\t\t\t}\n\n\t\t\t\tmaybeDragEnd( event );\n\t\t\t}\n\n\t\t\tfunction maybeDragEnd( /** @type {MouseEvent} */ event ) {\n\t\t\t\tif ( ! isDragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tisDragging = false;\n\n\t\t\t\townerDocument.removeEventListener( 'dragend', maybeDragEnd );\n\t\t\t\townerDocument.removeEventListener( 'mousemove', maybeDragEnd );\n\n\t\t\t\tif ( onDragEndRef.current ) {\n\t\t\t\t\tonDragEndRef.current( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telement.dataset.isDropZone = 'true';\n\t\t\telement.addEventListener( 'drop', onDrop );\n\t\t\telement.addEventListener( 'dragenter', onDragEnter );\n\t\t\telement.addEventListener( 'dragover', onDragOver );\n\t\t\telement.addEventListener( 'dragleave', onDragLeave );\n\t\t\t// The `dragstart` event doesn't fire if the drag started outside\n\t\t\t// the document.\n\t\t\townerDocument.addEventListener( 'dragenter', maybeDragStart );\n\n\t\t\treturn () => {\n\t\t\t\tdelete element.dataset.isDropZone;\n\t\t\t\telement.removeEventListener( 'drop', onDrop );\n\t\t\t\telement.removeEventListener( 'dragenter', onDragEnter );\n\t\t\t\telement.removeEventListener( 'dragover', onDragOver );\n\t\t\t\telement.removeEventListener( 'dragleave', onDragLeave );\n\t\t\t\townerDocument.removeEventListener( 'dragend', maybeDragEnd );\n\t\t\t\townerDocument.removeEventListener( 'mousemove', maybeDragEnd );\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'dragenter',\n\t\t\t\t\tmaybeDragStart\n\t\t\t\t);\n\t\t\t};\n\t\t},\n\t\t[ isDisabled, dropZoneElement ] // Refresh when the passed in dropZoneElement changes.\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,SAASG,WAAWA,CAAEC,KAAK,EAAG;EAC7B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,MAAMC,GAAG,GAAG,IAAAC,eAAM,EAAC,CAAC;EACpBD,GAAG,CAACE,OAAO,GAAGH,KAAK;EACnB,OAAOC,GAAG;AAC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AE1C,MAAO,CAAC;MAC7CoB,OAAO,CAACsB,mBAAmB,CAAE,WAAW,EAAEtC,WAAY,CAAC;MACvDgB,OAAO,CAACsB,mBAAmB,CAAE,UAAU,EAAEhC,UAAW,CAAC;MACrDU,OAAO,CAACsB,mBAAmB,CAAE,WAAW,EAAEpC,WAAY,CAAC;MACvDgB,aAAa,CAACoB,mBAAmB,CAAE,SAAS,EAAEP,YAAa,CAAC;MAC5Db,aAAa,CAACoB,mBAAmB,CAAE,WAAW,EAAEP,YAAa,CAAC;MAC9Db,aAAa,CAACoB,mBAAmB,CAChC,WAAW,EACXV,cACD,CAAC;IACF,CAAC;EACF,CAAC,EACD,CAAEjC,UAAU,EAAED,eAAe,CAAE,CAAC;EACjC,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_useRefEffect","_interopRequireDefault","require","_useEvent","useDropZone","dropZoneElement","isDisabled","onDrop","_onDrop","onDragStart","_onDragStart","onDragEnter","_onDragEnter","onDragLeave","_onDragLeave","onDragEnd","_onDragEnd","onDragOver","_onDragOver","onDropEvent","useEvent","onDragStartEvent","onDragEnterEvent","onDragLeaveEvent","onDragEndEvent","onDragOverEvent","useRefEffect","elem","element","isDragging","ownerDocument","isElementInZone","targetToCheck","defaultView","HTMLElement","contains","elementToCheck","dataset","isDropZone","parentElement","maybeDragStart","event","addEventListener","maybeDragEnd","preventDefault","relatedTarget","defaultPrevented","dataTransfer","files","length","removeEventListener","setAttribute","removeAttribute"],"sources":["@wordpress/compose/src/hooks/use-drop-zone/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport useRefEffect from '../use-ref-effect';\nimport useEvent from '../use-event';\n\n/**\n * A hook to facilitate drag and drop handling.\n *\n * @param {Object} props Named parameters.\n * @param {?HTMLElement} [props.dropZoneElement] Optional element to be used as the drop zone.\n * @param {boolean} [props.isDisabled] Whether or not to disable the drop zone.\n * @param {(e: DragEvent) => void} [props.onDragStart] Called when dragging has started.\n * @param {(e: DragEvent) => void} [props.onDragEnter] Called when the zone is entered.\n * @param {(e: DragEvent) => void} [props.onDragOver] Called when the zone is moved within.\n * @param {(e: DragEvent) => void} [props.onDragLeave] Called when the zone is left.\n * @param {(e: MouseEvent) => void} [props.onDragEnd] Called when dragging has ended.\n * @param {(e: DragEvent) => void} [props.onDrop] Called when dropping in the zone.\n *\n * @return {import('react').RefCallback<HTMLElement>} Ref callback to be passed to the drop zone element.\n */\nexport default function useDropZone( {\n\tdropZoneElement,\n\tisDisabled,\n\tonDrop: _onDrop,\n\tonDragStart: _onDragStart,\n\tonDragEnter: _onDragEnter,\n\tonDragLeave: _onDragLeave,\n\tonDragEnd: _onDragEnd,\n\tonDragOver: _onDragOver,\n} ) {\n\tconst onDropEvent = useEvent( _onDrop );\n\tconst onDragStartEvent = useEvent( _onDragStart );\n\tconst onDragEnterEvent = useEvent( _onDragEnter );\n\tconst onDragLeaveEvent = useEvent( _onDragLeave );\n\tconst onDragEndEvent = useEvent( _onDragEnd );\n\tconst onDragOverEvent = useEvent( _onDragOver );\n\n\treturn useRefEffect(\n\t\t( elem ) => {\n\t\t\tif ( isDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a custom dropZoneRef is passed, use that instead of the element.\n\t\t\t// This allows the dropzone to cover an expanded area, rather than\n\t\t\t// be restricted to the area of the ref returned by this hook.\n\t\t\tconst element = dropZoneElement ?? elem;\n\n\t\t\tlet isDragging = false;\n\n\t\t\tconst { ownerDocument } = element;\n\n\t\t\t/**\n\t\t\t * Checks if an element is in the drop zone.\n\t\t\t *\n\t\t\t * @param {EventTarget|null} targetToCheck\n\t\t\t *\n\t\t\t * @return {boolean} True if in drop zone, false if not.\n\t\t\t */\n\t\t\tfunction isElementInZone( targetToCheck ) {\n\t\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\t\tif (\n\t\t\t\t\t! targetToCheck ||\n\t\t\t\t\t! defaultView ||\n\t\t\t\t\t! ( targetToCheck instanceof defaultView.HTMLElement ) ||\n\t\t\t\t\t! element.contains( targetToCheck )\n\t\t\t\t) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t/** @type {HTMLElement|null} */\n\t\t\t\tlet elementToCheck = targetToCheck;\n\n\t\t\t\tdo {\n\t\t\t\t\tif ( elementToCheck.dataset.isDropZone ) {\n\t\t\t\t\t\treturn elementToCheck === element;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elementToCheck = elementToCheck.parentElement ) );\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfunction maybeDragStart( /** @type {DragEvent} */ event ) {\n\t\t\t\tif ( isDragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tisDragging = true;\n\n\t\t\t\t// Note that `dragend` doesn't fire consistently for file and\n\t\t\t\t// HTML drag events where the drag origin is outside the browser\n\t\t\t\t// window. In Firefox it may also not fire if the originating\n\t\t\t\t// node is removed.\n\t\t\t\townerDocument.addEventListener( 'dragend', maybeDragEnd );\n\t\t\t\townerDocument.addEventListener( 'mousemove', maybeDragEnd );\n\n\t\t\t\tif ( _onDragStart ) {\n\t\t\t\t\tonDragStartEvent( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction onDragEnter( /** @type {DragEvent} */ event ) {\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// The `dragenter` event will also fire when entering child\n\t\t\t\t// elements, but we only want to call `onDragEnter` when\n\t\t\t\t// entering the drop zone, which means the `relatedTarget`\n\t\t\t\t// (element that has been left) should be outside the drop zone.\n\t\t\t\tif (\n\t\t\t\t\telement.contains(\n\t\t\t\t\t\t/** @type {Node} */ ( event.relatedTarget )\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( _onDragEnter ) {\n\t\t\t\t\tonDragEnterEvent( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction onDragOver( /** @type {DragEvent} */ event ) {\n\t\t\t\t// Only call onDragOver for the innermost hovered drop zones.\n\t\t\t\tif ( ! event.defaultPrevented && _onDragOver ) {\n\t\t\t\t\tonDragOverEvent( event );\n\t\t\t\t}\n\n\t\t\t\t// Prevent the browser default while also signalling to parent\n\t\t\t\t// drop zones that `onDragOver` is already handled.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\n\t\t\tfunction onDragLeave( /** @type {DragEvent} */ event ) {\n\t\t\t\t// The `dragleave` event will also fire when leaving child\n\t\t\t\t// elements, but we only want to call `onDragLeave` when\n\t\t\t\t// leaving the drop zone, which means the `relatedTarget`\n\t\t\t\t// (element that has been entered) should be outside the drop\n\t\t\t\t// zone.\n\t\t\t\t// Note: This is not entirely reliable in Safari due to this bug\n\t\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=66547\n\n\t\t\t\tif ( isElementInZone( event.relatedTarget ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( _onDragLeave ) {\n\t\t\t\t\tonDragLeaveEvent( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction onDrop( /** @type {DragEvent} */ event ) {\n\t\t\t\t// Don't handle drop if an inner drop zone already handled it.\n\t\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Prevent the browser default while also signalling to parent\n\t\t\t\t// drop zones that `onDrop` is already handled.\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// This seemingly useless line has been shown to resolve a\n\t\t\t\t// Safari issue where files dragged directly from the dock are\n\t\t\t\t// not recognized.\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\tevent.dataTransfer && event.dataTransfer.files.length;\n\n\t\t\t\tif ( _onDrop ) {\n\t\t\t\t\tonDropEvent( event );\n\t\t\t\t}\n\n\t\t\t\tmaybeDragEnd( event );\n\t\t\t}\n\n\t\t\tfunction maybeDragEnd( /** @type {MouseEvent} */ event ) {\n\t\t\t\tif ( ! isDragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tisDragging = false;\n\n\t\t\t\townerDocument.removeEventListener( 'dragend', maybeDragEnd );\n\t\t\t\townerDocument.removeEventListener( 'mousemove', maybeDragEnd );\n\n\t\t\t\tif ( _onDragEnd ) {\n\t\t\t\t\tonDragEndEvent( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telement.setAttribute( 'data-is-drop-zone', 'true' );\n\t\t\telement.addEventListener( 'drop', onDrop );\n\t\t\telement.addEventListener( 'dragenter', onDragEnter );\n\t\t\telement.addEventListener( 'dragover', onDragOver );\n\t\t\telement.addEventListener( 'dragleave', onDragLeave );\n\t\t\t// The `dragstart` event doesn't fire if the drag started outside\n\t\t\t// the document.\n\t\t\townerDocument.addEventListener( 'dragenter', maybeDragStart );\n\n\t\t\treturn () => {\n\t\t\t\telement.removeAttribute( 'data-is-drop-zone' );\n\t\t\t\telement.removeEventListener( 'drop', onDrop );\n\t\t\t\telement.removeEventListener( 'dragenter', onDragEnter );\n\t\t\t\telement.removeEventListener( 'dragover', onDragOver );\n\t\t\t\telement.removeEventListener( 'dragleave', onDragLeave );\n\t\t\t\townerDocument.removeEventListener( 'dragend', maybeDragEnd );\n\t\t\t\townerDocument.removeEventListener( 'mousemove', maybeDragEnd );\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'dragenter',\n\t\t\t\t\tmaybeDragStart\n\t\t\t\t);\n\t\t\t};\n\t\t},\n\t\t[ isDisabled, dropZoneElement ] // Refresh when the passed in dropZoneElement changes.\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAF,sBAAA,CAAAC,OAAA;AAJA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASE,WAAWA,CAAE;EACpCC,eAAe;EACfC,UAAU;EACVC,MAAM,EAAEC,OAAO;EACfC,WAAW,EAAEC,YA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MAC5Db,aAAa,CAACoB,mBAAmB,CAAE,WAAW,EAAEP,YAAa,CAAC;MAC9Db,aAAa,CAACoB,mBAAmB,CAChC,WAAW,EACXV,cACD,CAAC;IACF,CAAC;EACF,CAAC,EACD,CAAElC,UAAU,EAAED,eAAe,CAAE,CAAC;EACjC,CAAC;AACF","ignoreList":[]}
@@ -6,7 +6,7 @@ import Clipboard from 'clipboard';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
9
- import { useRef } from '@wordpress/element';
9
+ import { useRef, useLayoutEffect } from '@wordpress/element';
10
10
 
11
11
  /**
12
12
  * Internal dependencies
@@ -20,7 +20,9 @@ import useRefEffect from '../use-ref-effect';
20
20
  */
21
21
  function useUpdatedRef(value) {
22
22
  const ref = useRef(value);
23
- ref.current = value;
23
+ useLayoutEffect(() => {
24
+ ref.current = value;
25
+ }, [value]);
24
26
  return ref;
25
27
  }
26
28
 
@@ -1 +1 @@
1
- {"version":3,"names":["Clipboard","useRef","useRefEffect","useUpdatedRef","value","ref","current","useCopyToClipboard","text","onSuccess","textRef","onSuccessRef","node","clipboard","on","clearSelection","destroy"],"sources":["@wordpress/compose/src/hooks/use-copy-to-clipboard/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport Clipboard from 'clipboard';\n\n/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useRefEffect from '../use-ref-effect';\n\n/**\n * @template T\n * @param {T} value\n * @return {import('react').RefObject<T>} The updated ref\n */\nfunction useUpdatedRef( value ) {\n\tconst ref = useRef( value );\n\tref.current = value;\n\treturn ref;\n}\n\n/**\n * Copies the given text to the clipboard when the element is clicked.\n *\n * @template {HTMLElement} TElementType\n * @param {string | (() => string)} text The text to copy. Use a function if not\n * already available and expensive to compute.\n * @param {Function} onSuccess Called when to text is copied.\n *\n * @return {import('react').Ref<TElementType>} A ref to assign to the target element.\n */\nexport default function useCopyToClipboard( text, onSuccess ) {\n\t// Store the dependencies as refs and continuously update them so they're\n\t// fresh when the callback is called.\n\tconst textRef = useUpdatedRef( text );\n\tconst onSuccessRef = useUpdatedRef( onSuccess );\n\treturn useRefEffect( ( node ) => {\n\t\t// Clipboard listens to click events.\n\t\tconst clipboard = new Clipboard( node, {\n\t\t\ttext() {\n\t\t\t\treturn typeof textRef.current === 'function'\n\t\t\t\t\t? textRef.current()\n\t\t\t\t\t: textRef.current || '';\n\t\t\t},\n\t\t} );\n\n\t\tclipboard.on( 'success', ( { clearSelection } ) => {\n\t\t\t// Clearing selection will move focus back to the triggering\n\t\t\t// button, ensuring that it is not reset to the body, and\n\t\t\t// further that it is kept within the rendered node.\n\t\t\tclearSelection();\n\n\t\t\tif ( onSuccessRef.current ) {\n\t\t\t\tonSuccessRef.current();\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tclipboard.destroy();\n\t\t};\n\t}, [] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,SAAS,MAAM,WAAW;;AAEjC;AACA;AACA;AACA,SAASC,MAAM,QAAQ,oBAAoB;;AAE3C;AACA;AACA;AACA,OAAOC,YAAY,MAAM,mBAAmB;;AAE5C;AACA;AACA;AACA;AACA;AACA,SAASC,aAAaA,CAAEC,KAAK,EAAG;EAC/B,MAAMC,GAAG,GAAGJ,MAAM,CAAEG,KAAM,CAAC;EAC3BC,GAAG,CAACC,OAAO,GAAGF,KAAK;EACnB,OAAOC,GAAG;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASE,kBAAkBA,CAAEC,IAAI,EAAEC,SAAS,EAAG;EAC7D;EACA;EACA,MAAMC,OAAO,GAAGP,aAAa,CAAEK,IAAK,CAAC;EACrC,MAAMG,YAAY,GAAGR,aAAa,CAAEM,SAAU,CAAC;EAC/C,OAAOP,YAAY,CAAIU,IAAI,IAAM;IAChC;IACA,MAAMC,SAAS,GAAG,IAAIb,SAAS,CAAEY,IAAI,EAAE;MACtCJ,IAAIA,CAAA,EAAG;QACN,OAAO,OAAOE,OAAO,CAACJ,OAAO,KAAK,UAAU,GACzCI,OAAO,CAACJ,OAAO,CAAC,CAAC,GACjBI,OAAO,CAACJ,OAAO,IAAI,EAAE;MACzB;IACD,CAAE,CAAC;IAEHO,SAAS,CAACC,EAAE,CAAE,SAAS,EAAE,CAAE;MAAEC;IAAe,CAAC,KAAM;MAClD;MACA;MACA;MACAA,cAAc,CAAC,CAAC;MAEhB,IAAKJ,YAAY,CAACL,OAAO,EAAG;QAC3BK,YAAY,CAACL,OAAO,CAAC,CAAC;MACvB;IACD,CAAE,CAAC;IAEH,OAAO,MAAM;MACZO,SAAS,CAACG,OAAO,CAAC,CAAC;IACpB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;AACR","ignoreList":[]}
1
+ {"version":3,"names":["Clipboard","useRef","useLayoutEffect","useRefEffect","useUpdatedRef","value","ref","current","useCopyToClipboard","text","onSuccess","textRef","onSuccessRef","node","clipboard","on","clearSelection","destroy"],"sources":["@wordpress/compose/src/hooks/use-copy-to-clipboard/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport Clipboard from 'clipboard';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useLayoutEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useRefEffect from '../use-ref-effect';\n\n/**\n * @template T\n * @param {T} value\n * @return {import('react').RefObject<T>} The updated ref\n */\nfunction useUpdatedRef( value ) {\n\tconst ref = useRef( value );\n\tuseLayoutEffect( () => {\n\t\tref.current = value;\n\t}, [ value ] );\n\treturn ref;\n}\n\n/**\n * Copies the given text to the clipboard when the element is clicked.\n *\n * @template {HTMLElement} TElementType\n * @param {string | (() => string)} text The text to copy. Use a function if not\n * already available and expensive to compute.\n * @param {Function} onSuccess Called when to text is copied.\n *\n * @return {import('react').Ref<TElementType>} A ref to assign to the target element.\n */\nexport default function useCopyToClipboard( text, onSuccess ) {\n\t// Store the dependencies as refs and continuously update them so they're\n\t// fresh when the callback is called.\n\tconst textRef = useUpdatedRef( text );\n\tconst onSuccessRef = useUpdatedRef( onSuccess );\n\treturn useRefEffect( ( node ) => {\n\t\t// Clipboard listens to click events.\n\t\tconst clipboard = new Clipboard( node, {\n\t\t\ttext() {\n\t\t\t\treturn typeof textRef.current === 'function'\n\t\t\t\t\t? textRef.current()\n\t\t\t\t\t: textRef.current || '';\n\t\t\t},\n\t\t} );\n\n\t\tclipboard.on( 'success', ( { clearSelection } ) => {\n\t\t\t// Clearing selection will move focus back to the triggering\n\t\t\t// button, ensuring that it is not reset to the body, and\n\t\t\t// further that it is kept within the rendered node.\n\t\t\tclearSelection();\n\n\t\t\tif ( onSuccessRef.current ) {\n\t\t\t\tonSuccessRef.current();\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tclipboard.destroy();\n\t\t};\n\t}, [] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,SAAS,MAAM,WAAW;;AAEjC;AACA;AACA;AACA,SAASC,MAAM,EAAEC,eAAe,QAAQ,oBAAoB;;AAE5D;AACA;AACA;AACA,OAAOC,YAAY,MAAM,mBAAmB;;AAE5C;AACA;AACA;AACA;AACA;AACA,SAASC,aAAaA,CAAEC,KAAK,EAAG;EAC/B,MAAMC,GAAG,GAAGL,MAAM,CAAEI,KAAM,CAAC;EAC3BH,eAAe,CAAE,MAAM;IACtBI,GAAG,CAACC,OAAO,GAAGF,KAAK;EACpB,CAAC,EAAE,CAAEA,KAAK,CAAG,CAAC;EACd,OAAOC,GAAG;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASE,kBAAkBA,CAAEC,IAAI,EAAEC,SAAS,EAAG;EAC7D;EACA;EACA,MAAMC,OAAO,GAAGP,aAAa,CAAEK,IAAK,CAAC;EACrC,MAAMG,YAAY,GAAGR,aAAa,CAAEM,SAAU,CAAC;EAC/C,OAAOP,YAAY,CAAIU,IAAI,IAAM;IAChC;IACA,MAAMC,SAAS,GAAG,IAAId,SAAS,CAAEa,IAAI,EAAE;MACtCJ,IAAIA,CAAA,EAAG;QACN,OAAO,OAAOE,OAAO,CAACJ,OAAO,KAAK,UAAU,GACzCI,OAAO,CAACJ,OAAO,CAAC,CAAC,GACjBI,OAAO,CAACJ,OAAO,IAAI,EAAE;MACzB;IACD,CAAE,CAAC;IAEHO,SAAS,CAACC,EAAE,CAAE,SAAS,EAAE,CAAE;MAAEC;IAAe,CAAC,KAAM;MAClD;MACA;MACA;MACAA,cAAc,CAAC,CAAC;MAEhB,IAAKJ,YAAY,CAACL,OAAO,EAAG;QAC3BK,YAAY,CAACL,OAAO,CAAC,CAAC;MACvB;IACD,CAAE,CAAC;IAEH,OAAO,MAAM;MACZO,SAAS,CAACG,OAAO,CAAC,CAAC;IACpB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;AACR","ignoreList":[]}
@@ -1,34 +1,8 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { useRef } from '@wordpress/element';
5
-
6
1
  /**
7
2
  * Internal dependencies
8
3
  */
9
4
  import useRefEffect from '../use-ref-effect';
10
-
11
- /* eslint-disable jsdoc/valid-types */
12
- /**
13
- * @template T
14
- * @param {T} value
15
- * @return {import('react').MutableRefObject<T|null>} A ref with the value.
16
- */
17
- function useFreshRef(value) {
18
- /* eslint-enable jsdoc/valid-types */
19
- /* eslint-disable jsdoc/no-undefined-types */
20
- /** @type {import('react').MutableRefObject<T>} */
21
- /* eslint-enable jsdoc/no-undefined-types */
22
- // Disable reason: We're doing something pretty JavaScript-y here where the
23
- // ref will always have a current value that is not null or undefined but it
24
- // needs to start as undefined. We don't want to change the return type so
25
- // it's easier to just ts-ignore this specific line that's complaining about
26
- // undefined not being part of T.
27
- // @ts-ignore
28
- const ref = useRef();
29
- ref.current = value;
30
- return ref;
31
- }
5
+ import useEvent from '../use-event';
32
6
 
33
7
  /**
34
8
  * A hook to facilitate drag and drop handling.
@@ -55,12 +29,12 @@ export default function useDropZone({
55
29
  onDragEnd: _onDragEnd,
56
30
  onDragOver: _onDragOver
57
31
  }) {
58
- const onDropRef = useFreshRef(_onDrop);
59
- const onDragStartRef = useFreshRef(_onDragStart);
60
- const onDragEnterRef = useFreshRef(_onDragEnter);
61
- const onDragLeaveRef = useFreshRef(_onDragLeave);
62
- const onDragEndRef = useFreshRef(_onDragEnd);
63
- const onDragOverRef = useFreshRef(_onDragOver);
32
+ const onDropEvent = useEvent(_onDrop);
33
+ const onDragStartEvent = useEvent(_onDragStart);
34
+ const onDragEnterEvent = useEvent(_onDragEnter);
35
+ const onDragLeaveEvent = useEvent(_onDragLeave);
36
+ const onDragEndEvent = useEvent(_onDragEnd);
37
+ const onDragOverEvent = useEvent(_onDragOver);
64
38
  return useRefEffect(elem => {
65
39
  if (isDisabled) {
66
40
  return;
@@ -111,8 +85,8 @@ export default function useDropZone({
111
85
  // node is removed.
112
86
  ownerDocument.addEventListener('dragend', maybeDragEnd);
113
87
  ownerDocument.addEventListener('mousemove', maybeDragEnd);
114
- if (onDragStartRef.current) {
115
- onDragStartRef.current(event);
88
+ if (_onDragStart) {
89
+ onDragStartEvent(event);
116
90
  }
117
91
  }
118
92
  function onDragEnter(/** @type {DragEvent} */event) {
@@ -125,14 +99,14 @@ export default function useDropZone({
125
99
  if (element.contains(/** @type {Node} */event.relatedTarget)) {
126
100
  return;
127
101
  }
128
- if (onDragEnterRef.current) {
129
- onDragEnterRef.current(event);
102
+ if (_onDragEnter) {
103
+ onDragEnterEvent(event);
130
104
  }
131
105
  }
132
106
  function onDragOver(/** @type {DragEvent} */event) {
133
107
  // Only call onDragOver for the innermost hovered drop zones.
134
- if (!event.defaultPrevented && onDragOverRef.current) {
135
- onDragOverRef.current(event);
108
+ if (!event.defaultPrevented && _onDragOver) {
109
+ onDragOverEvent(event);
136
110
  }
137
111
 
138
112
  // Prevent the browser default while also signalling to parent
@@ -151,8 +125,8 @@ export default function useDropZone({
151
125
  if (isElementInZone(event.relatedTarget)) {
152
126
  return;
153
127
  }
154
- if (onDragLeaveRef.current) {
155
- onDragLeaveRef.current(event);
128
+ if (_onDragLeave) {
129
+ onDragLeaveEvent(event);
156
130
  }
157
131
  }
158
132
  function onDrop(/** @type {DragEvent} */event) {
@@ -170,8 +144,8 @@ export default function useDropZone({
170
144
  // not recognized.
171
145
  // eslint-disable-next-line no-unused-expressions
172
146
  event.dataTransfer && event.dataTransfer.files.length;
173
- if (onDropRef.current) {
174
- onDropRef.current(event);
147
+ if (_onDrop) {
148
+ onDropEvent(event);
175
149
  }
176
150
  maybeDragEnd(event);
177
151
  }
@@ -182,11 +156,11 @@ export default function useDropZone({
182
156
  isDragging = false;
183
157
  ownerDocument.removeEventListener('dragend', maybeDragEnd);
184
158
  ownerDocument.removeEventListener('mousemove', maybeDragEnd);
185
- if (onDragEndRef.current) {
186
- onDragEndRef.current(event);
159
+ if (_onDragEnd) {
160
+ onDragEndEvent(event);
187
161
  }
188
162
  }
189
- element.dataset.isDropZone = 'true';
163
+ element.setAttribute('data-is-drop-zone', 'true');
190
164
  element.addEventListener('drop', onDrop);
191
165
  element.addEventListener('dragenter', onDragEnter);
192
166
  element.addEventListener('dragover', onDragOver);
@@ -195,7 +169,7 @@ export default function useDropZone({
195
169
  // the document.
196
170
  ownerDocument.addEventListener('dragenter', maybeDragStart);
197
171
  return () => {
198
- delete element.dataset.isDropZone;
172
+ element.removeAttribute('data-is-drop-zone');
199
173
  element.removeEventListener('drop', onDrop);
200
174
  element.removeEventListener('dragenter', onDragEnter);
201
175
  element.removeEventListener('dragover', onDragOver);
@@ -1 +1 @@
1
- {"version":3,"names":["useRef","useRefEffect","useFreshRef","value","ref","current","useDropZone","dropZoneElement","isDisabled","onDrop","_onDrop","onDragStart","_onDragStart","onDragEnter","_onDragEnter","onDragLeave","_onDragLeave","onDragEnd","_onDragEnd","onDragOver","_onDragOver","onDropRef","onDragStartRef","onDragEnterRef","onDragLeaveRef","onDragEndRef","onDragOverRef","elem","element","isDragging","ownerDocument","isElementInZone","targetToCheck","defaultView","HTMLElement","contains","elementToCheck","dataset","isDropZone","parentElement","maybeDragStart","event","addEventListener","maybeDragEnd","preventDefault","relatedTarget","defaultPrevented","dataTransfer","files","length","removeEventListener"],"sources":["@wordpress/compose/src/hooks/use-drop-zone/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useRefEffect from '../use-ref-effect';\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * @template T\n * @param {T} value\n * @return {import('react').MutableRefObject<T|null>} A ref with the value.\n */\nfunction useFreshRef( value ) {\n\t/* eslint-enable jsdoc/valid-types */\n\t/* eslint-disable jsdoc/no-undefined-types */\n\t/** @type {import('react').MutableRefObject<T>} */\n\t/* eslint-enable jsdoc/no-undefined-types */\n\t// Disable reason: We're doing something pretty JavaScript-y here where the\n\t// ref will always have a current value that is not null or undefined but it\n\t// needs to start as undefined. We don't want to change the return type so\n\t// it's easier to just ts-ignore this specific line that's complaining about\n\t// undefined not being part of T.\n\t// @ts-ignore\n\tconst ref = useRef();\n\tref.current = value;\n\treturn ref;\n}\n\n/**\n * A hook to facilitate drag and drop handling.\n *\n * @param {Object} props Named parameters.\n * @param {?HTMLElement} [props.dropZoneElement] Optional element to be used as the drop zone.\n * @param {boolean} [props.isDisabled] Whether or not to disable the drop zone.\n * @param {(e: DragEvent) => void} [props.onDragStart] Called when dragging has started.\n * @param {(e: DragEvent) => void} [props.onDragEnter] Called when the zone is entered.\n * @param {(e: DragEvent) => void} [props.onDragOver] Called when the zone is moved within.\n * @param {(e: DragEvent) => void} [props.onDragLeave] Called when the zone is left.\n * @param {(e: MouseEvent) => void} [props.onDragEnd] Called when dragging has ended.\n * @param {(e: DragEvent) => void} [props.onDrop] Called when dropping in the zone.\n *\n * @return {import('react').RefCallback<HTMLElement>} Ref callback to be passed to the drop zone element.\n */\nexport default function useDropZone( {\n\tdropZoneElement,\n\tisDisabled,\n\tonDrop: _onDrop,\n\tonDragStart: _onDragStart,\n\tonDragEnter: _onDragEnter,\n\tonDragLeave: _onDragLeave,\n\tonDragEnd: _onDragEnd,\n\tonDragOver: _onDragOver,\n} ) {\n\tconst onDropRef = useFreshRef( _onDrop );\n\tconst onDragStartRef = useFreshRef( _onDragStart );\n\tconst onDragEnterRef = useFreshRef( _onDragEnter );\n\tconst onDragLeaveRef = useFreshRef( _onDragLeave );\n\tconst onDragEndRef = useFreshRef( _onDragEnd );\n\tconst onDragOverRef = useFreshRef( _onDragOver );\n\n\treturn useRefEffect(\n\t\t( elem ) => {\n\t\t\tif ( isDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a custom dropZoneRef is passed, use that instead of the element.\n\t\t\t// This allows the dropzone to cover an expanded area, rather than\n\t\t\t// be restricted to the area of the ref returned by this hook.\n\t\t\tconst element = dropZoneElement ?? elem;\n\n\t\t\tlet isDragging = false;\n\n\t\t\tconst { ownerDocument } = element;\n\n\t\t\t/**\n\t\t\t * Checks if an element is in the drop zone.\n\t\t\t *\n\t\t\t * @param {EventTarget|null} targetToCheck\n\t\t\t *\n\t\t\t * @return {boolean} True if in drop zone, false if not.\n\t\t\t */\n\t\t\tfunction isElementInZone( targetToCheck ) {\n\t\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\t\tif (\n\t\t\t\t\t! targetToCheck ||\n\t\t\t\t\t! defaultView ||\n\t\t\t\t\t! ( targetToCheck instanceof defaultView.HTMLElement ) ||\n\t\t\t\t\t! element.contains( targetToCheck )\n\t\t\t\t) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t/** @type {HTMLElement|null} */\n\t\t\t\tlet elementToCheck = targetToCheck;\n\n\t\t\t\tdo {\n\t\t\t\t\tif ( elementToCheck.dataset.isDropZone ) {\n\t\t\t\t\t\treturn elementToCheck === element;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elementToCheck = elementToCheck.parentElement ) );\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfunction maybeDragStart( /** @type {DragEvent} */ event ) {\n\t\t\t\tif ( isDragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tisDragging = true;\n\n\t\t\t\t// Note that `dragend` doesn't fire consistently for file and\n\t\t\t\t// HTML drag events where the drag origin is outside the browser\n\t\t\t\t// window. In Firefox it may also not fire if the originating\n\t\t\t\t// node is removed.\n\t\t\t\townerDocument.addEventListener( 'dragend', maybeDragEnd );\n\t\t\t\townerDocument.addEventListener( 'mousemove', maybeDragEnd );\n\n\t\t\t\tif ( onDragStartRef.current ) {\n\t\t\t\t\tonDragStartRef.current( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction onDragEnter( /** @type {DragEvent} */ event ) {\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// The `dragenter` event will also fire when entering child\n\t\t\t\t// elements, but we only want to call `onDragEnter` when\n\t\t\t\t// entering the drop zone, which means the `relatedTarget`\n\t\t\t\t// (element that has been left) should be outside the drop zone.\n\t\t\t\tif (\n\t\t\t\t\telement.contains(\n\t\t\t\t\t\t/** @type {Node} */ ( event.relatedTarget )\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( onDragEnterRef.current ) {\n\t\t\t\t\tonDragEnterRef.current( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction onDragOver( /** @type {DragEvent} */ event ) {\n\t\t\t\t// Only call onDragOver for the innermost hovered drop zones.\n\t\t\t\tif ( ! event.defaultPrevented && onDragOverRef.current ) {\n\t\t\t\t\tonDragOverRef.current( event );\n\t\t\t\t}\n\n\t\t\t\t// Prevent the browser default while also signalling to parent\n\t\t\t\t// drop zones that `onDragOver` is already handled.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\n\t\t\tfunction onDragLeave( /** @type {DragEvent} */ event ) {\n\t\t\t\t// The `dragleave` event will also fire when leaving child\n\t\t\t\t// elements, but we only want to call `onDragLeave` when\n\t\t\t\t// leaving the drop zone, which means the `relatedTarget`\n\t\t\t\t// (element that has been entered) should be outside the drop\n\t\t\t\t// zone.\n\t\t\t\t// Note: This is not entirely reliable in Safari due to this bug\n\t\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=66547\n\n\t\t\t\tif ( isElementInZone( event.relatedTarget ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( onDragLeaveRef.current ) {\n\t\t\t\t\tonDragLeaveRef.current( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction onDrop( /** @type {DragEvent} */ event ) {\n\t\t\t\t// Don't handle drop if an inner drop zone already handled it.\n\t\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Prevent the browser default while also signalling to parent\n\t\t\t\t// drop zones that `onDrop` is already handled.\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// This seemingly useless line has been shown to resolve a\n\t\t\t\t// Safari issue where files dragged directly from the dock are\n\t\t\t\t// not recognized.\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\tevent.dataTransfer && event.dataTransfer.files.length;\n\n\t\t\t\tif ( onDropRef.current ) {\n\t\t\t\t\tonDropRef.current( event );\n\t\t\t\t}\n\n\t\t\t\tmaybeDragEnd( event );\n\t\t\t}\n\n\t\t\tfunction maybeDragEnd( /** @type {MouseEvent} */ event ) {\n\t\t\t\tif ( ! isDragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tisDragging = false;\n\n\t\t\t\townerDocument.removeEventListener( 'dragend', maybeDragEnd );\n\t\t\t\townerDocument.removeEventListener( 'mousemove', maybeDragEnd );\n\n\t\t\t\tif ( onDragEndRef.current ) {\n\t\t\t\t\tonDragEndRef.current( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telement.dataset.isDropZone = 'true';\n\t\t\telement.addEventListener( 'drop', onDrop );\n\t\t\telement.addEventListener( 'dragenter', onDragEnter );\n\t\t\telement.addEventListener( 'dragover', onDragOver );\n\t\t\telement.addEventListener( 'dragleave', onDragLeave );\n\t\t\t// The `dragstart` event doesn't fire if the drag started outside\n\t\t\t// the document.\n\t\t\townerDocument.addEventListener( 'dragenter', maybeDragStart );\n\n\t\t\treturn () => {\n\t\t\t\tdelete element.dataset.isDropZone;\n\t\t\t\telement.removeEventListener( 'drop', onDrop );\n\t\t\t\telement.removeEventListener( 'dragenter', onDragEnter );\n\t\t\t\telement.removeEventListener( 'dragover', onDragOver );\n\t\t\t\telement.removeEventListener( 'dragleave', onDragLeave );\n\t\t\t\townerDocument.removeEventListener( 'dragend', maybeDragEnd );\n\t\t\t\townerDocument.removeEventListener( 'mousemove', maybeDragEnd );\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'dragenter',\n\t\t\t\t\tmaybeDragStart\n\t\t\t\t);\n\t\t\t};\n\t\t},\n\t\t[ isDisabled, dropZoneElement ] // Refresh when the passed in dropZoneElement changes.\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,QAAQ,oBAAoB;;AAE3C;AACA;AACA;AACA,OAAOC,YAAY,MAAM,mBAAmB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,WAAWA,CAAEC,KAAK,EAAG;EAC7B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,MAAMC,GAAG,GAAGJ,MAAM,CAAC,CAAC;EACpBI,GAAG,CAACC,OAAO,GAAGF,KAAK;EACnB,OAAOC,GAAG;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASE,WAAWA,CAAE;EACpCC,eAAe;EACfC,UAAU;EACVC,MAAM,EAAEC,OAAO;EACfC,WAAW,EAAEC,YAAY;EACzBC,WAAW,EAAEC,YAAY;EACzBC,WAAW,EAAEC,YAAY;EACzBC,SAAS,EAAEC,UAAU;EACrBC,UAAU,EAAEC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CAACoB,mBAAmB,CAAE,WAAW,EAAEP,YAAa,CAAC;MAC9Db,aAAa,CAACoB,mBAAmB,CAChC,WAAW,EACXV,cACD,CAAC;IACF,CAAC;EACF,CAAC,EACD,CAAEhC,UAAU,EAAED,eAAe,CAAE,CAAC;EACjC,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["useRefEffect","useEvent","useDropZone","dropZoneElement","isDisabled","onDrop","_onDrop","onDragStart","_onDragStart","onDragEnter","_onDragEnter","onDragLeave","_onDragLeave","onDragEnd","_onDragEnd","onDragOver","_onDragOver","onDropEvent","onDragStartEvent","onDragEnterEvent","onDragLeaveEvent","onDragEndEvent","onDragOverEvent","elem","element","isDragging","ownerDocument","isElementInZone","targetToCheck","defaultView","HTMLElement","contains","elementToCheck","dataset","isDropZone","parentElement","maybeDragStart","event","addEventListener","maybeDragEnd","preventDefault","relatedTarget","defaultPrevented","dataTransfer","files","length","removeEventListener","setAttribute","removeAttribute"],"sources":["@wordpress/compose/src/hooks/use-drop-zone/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport useRefEffect from '../use-ref-effect';\nimport useEvent from '../use-event';\n\n/**\n * A hook to facilitate drag and drop handling.\n *\n * @param {Object} props Named parameters.\n * @param {?HTMLElement} [props.dropZoneElement] Optional element to be used as the drop zone.\n * @param {boolean} [props.isDisabled] Whether or not to disable the drop zone.\n * @param {(e: DragEvent) => void} [props.onDragStart] Called when dragging has started.\n * @param {(e: DragEvent) => void} [props.onDragEnter] Called when the zone is entered.\n * @param {(e: DragEvent) => void} [props.onDragOver] Called when the zone is moved within.\n * @param {(e: DragEvent) => void} [props.onDragLeave] Called when the zone is left.\n * @param {(e: MouseEvent) => void} [props.onDragEnd] Called when dragging has ended.\n * @param {(e: DragEvent) => void} [props.onDrop] Called when dropping in the zone.\n *\n * @return {import('react').RefCallback<HTMLElement>} Ref callback to be passed to the drop zone element.\n */\nexport default function useDropZone( {\n\tdropZoneElement,\n\tisDisabled,\n\tonDrop: _onDrop,\n\tonDragStart: _onDragStart,\n\tonDragEnter: _onDragEnter,\n\tonDragLeave: _onDragLeave,\n\tonDragEnd: _onDragEnd,\n\tonDragOver: _onDragOver,\n} ) {\n\tconst onDropEvent = useEvent( _onDrop );\n\tconst onDragStartEvent = useEvent( _onDragStart );\n\tconst onDragEnterEvent = useEvent( _onDragEnter );\n\tconst onDragLeaveEvent = useEvent( _onDragLeave );\n\tconst onDragEndEvent = useEvent( _onDragEnd );\n\tconst onDragOverEvent = useEvent( _onDragOver );\n\n\treturn useRefEffect(\n\t\t( elem ) => {\n\t\t\tif ( isDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a custom dropZoneRef is passed, use that instead of the element.\n\t\t\t// This allows the dropzone to cover an expanded area, rather than\n\t\t\t// be restricted to the area of the ref returned by this hook.\n\t\t\tconst element = dropZoneElement ?? elem;\n\n\t\t\tlet isDragging = false;\n\n\t\t\tconst { ownerDocument } = element;\n\n\t\t\t/**\n\t\t\t * Checks if an element is in the drop zone.\n\t\t\t *\n\t\t\t * @param {EventTarget|null} targetToCheck\n\t\t\t *\n\t\t\t * @return {boolean} True if in drop zone, false if not.\n\t\t\t */\n\t\t\tfunction isElementInZone( targetToCheck ) {\n\t\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\t\tif (\n\t\t\t\t\t! targetToCheck ||\n\t\t\t\t\t! defaultView ||\n\t\t\t\t\t! ( targetToCheck instanceof defaultView.HTMLElement ) ||\n\t\t\t\t\t! element.contains( targetToCheck )\n\t\t\t\t) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t/** @type {HTMLElement|null} */\n\t\t\t\tlet elementToCheck = targetToCheck;\n\n\t\t\t\tdo {\n\t\t\t\t\tif ( elementToCheck.dataset.isDropZone ) {\n\t\t\t\t\t\treturn elementToCheck === element;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elementToCheck = elementToCheck.parentElement ) );\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfunction maybeDragStart( /** @type {DragEvent} */ event ) {\n\t\t\t\tif ( isDragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tisDragging = true;\n\n\t\t\t\t// Note that `dragend` doesn't fire consistently for file and\n\t\t\t\t// HTML drag events where the drag origin is outside the browser\n\t\t\t\t// window. In Firefox it may also not fire if the originating\n\t\t\t\t// node is removed.\n\t\t\t\townerDocument.addEventListener( 'dragend', maybeDragEnd );\n\t\t\t\townerDocument.addEventListener( 'mousemove', maybeDragEnd );\n\n\t\t\t\tif ( _onDragStart ) {\n\t\t\t\t\tonDragStartEvent( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction onDragEnter( /** @type {DragEvent} */ event ) {\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// The `dragenter` event will also fire when entering child\n\t\t\t\t// elements, but we only want to call `onDragEnter` when\n\t\t\t\t// entering the drop zone, which means the `relatedTarget`\n\t\t\t\t// (element that has been left) should be outside the drop zone.\n\t\t\t\tif (\n\t\t\t\t\telement.contains(\n\t\t\t\t\t\t/** @type {Node} */ ( event.relatedTarget )\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( _onDragEnter ) {\n\t\t\t\t\tonDragEnterEvent( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction onDragOver( /** @type {DragEvent} */ event ) {\n\t\t\t\t// Only call onDragOver for the innermost hovered drop zones.\n\t\t\t\tif ( ! event.defaultPrevented && _onDragOver ) {\n\t\t\t\t\tonDragOverEvent( event );\n\t\t\t\t}\n\n\t\t\t\t// Prevent the browser default while also signalling to parent\n\t\t\t\t// drop zones that `onDragOver` is already handled.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\n\t\t\tfunction onDragLeave( /** @type {DragEvent} */ event ) {\n\t\t\t\t// The `dragleave` event will also fire when leaving child\n\t\t\t\t// elements, but we only want to call `onDragLeave` when\n\t\t\t\t// leaving the drop zone, which means the `relatedTarget`\n\t\t\t\t// (element that has been entered) should be outside the drop\n\t\t\t\t// zone.\n\t\t\t\t// Note: This is not entirely reliable in Safari due to this bug\n\t\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=66547\n\n\t\t\t\tif ( isElementInZone( event.relatedTarget ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( _onDragLeave ) {\n\t\t\t\t\tonDragLeaveEvent( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction onDrop( /** @type {DragEvent} */ event ) {\n\t\t\t\t// Don't handle drop if an inner drop zone already handled it.\n\t\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Prevent the browser default while also signalling to parent\n\t\t\t\t// drop zones that `onDrop` is already handled.\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// This seemingly useless line has been shown to resolve a\n\t\t\t\t// Safari issue where files dragged directly from the dock are\n\t\t\t\t// not recognized.\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\tevent.dataTransfer && event.dataTransfer.files.length;\n\n\t\t\t\tif ( _onDrop ) {\n\t\t\t\t\tonDropEvent( event );\n\t\t\t\t}\n\n\t\t\t\tmaybeDragEnd( event );\n\t\t\t}\n\n\t\t\tfunction maybeDragEnd( /** @type {MouseEvent} */ event ) {\n\t\t\t\tif ( ! isDragging ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tisDragging = false;\n\n\t\t\t\townerDocument.removeEventListener( 'dragend', maybeDragEnd );\n\t\t\t\townerDocument.removeEventListener( 'mousemove', maybeDragEnd );\n\n\t\t\t\tif ( _onDragEnd ) {\n\t\t\t\t\tonDragEndEvent( event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telement.setAttribute( 'data-is-drop-zone', 'true' );\n\t\t\telement.addEventListener( 'drop', onDrop );\n\t\t\telement.addEventListener( 'dragenter', onDragEnter );\n\t\t\telement.addEventListener( 'dragover', onDragOver );\n\t\t\telement.addEventListener( 'dragleave', onDragLeave );\n\t\t\t// The `dragstart` event doesn't fire if the drag started outside\n\t\t\t// the document.\n\t\t\townerDocument.addEventListener( 'dragenter', maybeDragStart );\n\n\t\t\treturn () => {\n\t\t\t\telement.removeAttribute( 'data-is-drop-zone' );\n\t\t\t\telement.removeEventListener( 'drop', onDrop );\n\t\t\t\telement.removeEventListener( 'dragenter', onDragEnter );\n\t\t\t\telement.removeEventListener( 'dragover', onDragOver );\n\t\t\t\telement.removeEventListener( 'dragleave', onDragLeave );\n\t\t\t\townerDocument.removeEventListener( 'dragend', maybeDragEnd );\n\t\t\t\townerDocument.removeEventListener( 'mousemove', maybeDragEnd );\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'dragenter',\n\t\t\t\t\tmaybeDragStart\n\t\t\t\t);\n\t\t\t};\n\t\t},\n\t\t[ isDisabled, dropZoneElement ] // Refresh when the passed in dropZoneElement changes.\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,YAAY,MAAM,mBAAmB;AAC5C,OAAOC,QAAQ,MAAM,cAAc;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,WAAWA,CAAE;EACpCC,eAAe;EACfC,UAAU;EACVC,MAAM,EAAEC,OAAO;EACfC,WAAW,EAAEC,YAAY;EACzBC,WAAW,EAAEC,YAAY;EACzBC,WAAW,EAAEC,YAAY;EACzBC,SAAS,EAAEC,UAAU;EACrBC,UAAU,EAAEC;AACb,CAAC,EAAG;EACH,MAAMC,WAAW,GAAGhB,QAAQ,CAAEK,OAAQ,CAAC;EACvC,MAAMY,gBAAgB,GAAGjB,QAAQ,CAAEO,YAAa,CAAC;EACjD,MAAMW,gBAAgB,GAAGlB,QAAQ,CAAES,YAAa,CAAC;EACjD,MAAMU,gBAAgB,GAAGnB,QAAQ,CAAEW,YAAa,CA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AW,EAAEP,YAAa,CAAC;MAE9D,IAAKzB,UAAU,EAAG;QACjBO,cAAc,CAAEgB,KAAM,CAAC;MACxB;IACD;IAEAb,OAAO,CAACuB,YAAY,CAAE,mBAAmB,EAAE,MAAO,CAAC;IACnDvB,OAAO,CAACc,gBAAgB,CAAE,MAAM,EAAEjC,MAAO,CAAC;IAC1CmB,OAAO,CAACc,gBAAgB,CAAE,WAAW,EAAE7B,WAAY,CAAC;IACpDe,OAAO,CAACc,gBAAgB,CAAE,UAAU,EAAEvB,UAAW,CAAC;IAClDS,OAAO,CAACc,gBAAgB,CAAE,WAAW,EAAE3B,WAAY,CAAC;IACpD;IACA;IACAe,aAAa,CAACY,gBAAgB,CAAE,WAAW,EAAEF,cAAe,CAAC;IAE7D,OAAO,MAAM;MACZZ,OAAO,CAACwB,eAAe,CAAE,mBAAoB,CAAC;MAC9CxB,OAAO,CAACsB,mBAAmB,CAAE,MAAM,EAAEzC,MAAO,CAAC;MAC7CmB,OAAO,CAACsB,mBAAmB,CAAE,WAAW,EAAErC,WAAY,CAAC;MACvDe,OAAO,CAACsB,mBAAmB,CAAE,UAAU,EAAE/B,UAAW,CAAC;MACrDS,OAAO,CAACsB,mBAAmB,CAAE,WAAW,EAAEnC,WAAY,CAAC;MACvDe,aAAa,CAACoB,mBAAmB,CAAE,SAAS,EAAEP,YAAa,CAAC;MAC5Db,aAAa,CAACoB,mBAAmB,CAAE,WAAW,EAAEP,YAAa,CAAC;MAC9Db,aAAa,CAACoB,mBAAmB,CAChC,WAAW,EACXV,cACD,CAAC;IACF,CAAC;EACF,CAAC,EACD,CAAEhC,UAAU,EAAED,eAAe,CAAE,CAAC;EACjC,CAAC;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-copy-to-clipboard/index.js"],"names":[],"mappings":"AA0BA;;;;;;;;;GASG;AACH,2CAP2B,YAAY,SAAzB,WAAY,QACf,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,wBAItB,OAAO,OAAO,EAAE,GAAG,CAAC,YAAY,CAAC,CAgC5C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-copy-to-clipboard/index.js"],"names":[],"mappings":"AA4BA;;;;;;;;;GASG;AACH,2CAP2B,YAAY,SAAzB,WAAY,QACf,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,wBAItB,OAAO,OAAO,EAAE,GAAG,CAAC,YAAY,CAAC,CAgC5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-drop-zone/index.js"],"names":[],"mappings":"AAgCA;;;;;;;;;;;;;;GAcG;AACH,wNAXG;IAAwC,eAAe;IACf,UAAU;IACV,WAAW,QAAvC,SAAS,KAAK,IAAI;IACU,WAAW,QAAvC,SAAS,KAAK,IAAI;IACU,UAAU,QAAtC,SAAS,KAAK,IAAI;IACU,WAAW,QAAvC,SAAS,KAAK,IAAI;IACU,SAAS,QAArC,UAAU,KAAK,IAAI;IACS,MAAM,QAAlC,SAAS,KAAK,IAAI;CAE9B,GAAS,OAAO,OAAO,EAAE,WAAW,CAAC,WAAW,CAAC,CAoMnD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-drop-zone/index.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;GAcG;AACH,wNAXG;IAAwC,eAAe;IACf,UAAU;IACV,WAAW,QAAvC,SAAS,KAAK,IAAI;IACU,WAAW,QAAvC,SAAS,KAAK,IAAI;IACU,UAAU,QAAtC,SAAS,KAAK,IAAI;IACU,WAAW,QAAvC,SAAS,KAAK,IAAI;IACU,SAAS,QAArC,UAAU,KAAK,IAAI;IACS,MAAM,QAAlC,SAAS,KAAK,IAAI;CAE9B,GAAS,OAAO,OAAO,EAAE,WAAW,CAAC,WAAW,CAAC,CAoMnD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/compose",
3
- "version": "7.10.0",
3
+ "version": "7.11.0",
4
4
  "description": "WordPress higher-order components (HOCs).",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -32,13 +32,13 @@
32
32
  "dependencies": {
33
33
  "@babel/runtime": "7.25.7",
34
34
  "@types/mousetrap": "^1.6.8",
35
- "@wordpress/deprecated": "^4.10.0",
36
- "@wordpress/dom": "^4.10.0",
37
- "@wordpress/element": "^6.10.0",
38
- "@wordpress/is-shallow-equal": "^5.10.0",
39
- "@wordpress/keycodes": "^4.10.0",
40
- "@wordpress/priority-queue": "^3.10.0",
41
- "@wordpress/undo-manager": "^1.10.0",
35
+ "@wordpress/deprecated": "*",
36
+ "@wordpress/dom": "*",
37
+ "@wordpress/element": "*",
38
+ "@wordpress/is-shallow-equal": "*",
39
+ "@wordpress/keycodes": "*",
40
+ "@wordpress/priority-queue": "*",
41
+ "@wordpress/undo-manager": "*",
42
42
  "change-case": "^4.1.2",
43
43
  "clipboard": "^2.0.11",
44
44
  "mousetrap": "^1.6.5",
@@ -50,5 +50,6 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "ab34a7ac935fd1478eac63b596242d83270897ee"
53
+ "wpScript": true,
54
+ "gitHead": "dcf4613b33b0eda14e203ac30f700ed0db70347f"
54
55
  }
@@ -6,7 +6,7 @@ import Clipboard from 'clipboard';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
9
- import { useRef } from '@wordpress/element';
9
+ import { useRef, useLayoutEffect } from '@wordpress/element';
10
10
 
11
11
  /**
12
12
  * Internal dependencies
@@ -20,7 +20,9 @@ import useRefEffect from '../use-ref-effect';
20
20
  */
21
21
  function useUpdatedRef( value ) {
22
22
  const ref = useRef( value );
23
- ref.current = value;
23
+ useLayoutEffect( () => {
24
+ ref.current = value;
25
+ }, [ value ] );
24
26
  return ref;
25
27
  }
26
28
 
@@ -1,34 +1,8 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { useRef } from '@wordpress/element';
5
-
6
1
  /**
7
2
  * Internal dependencies
8
3
  */
9
4
  import useRefEffect from '../use-ref-effect';
10
-
11
- /* eslint-disable jsdoc/valid-types */
12
- /**
13
- * @template T
14
- * @param {T} value
15
- * @return {import('react').MutableRefObject<T|null>} A ref with the value.
16
- */
17
- function useFreshRef( value ) {
18
- /* eslint-enable jsdoc/valid-types */
19
- /* eslint-disable jsdoc/no-undefined-types */
20
- /** @type {import('react').MutableRefObject<T>} */
21
- /* eslint-enable jsdoc/no-undefined-types */
22
- // Disable reason: We're doing something pretty JavaScript-y here where the
23
- // ref will always have a current value that is not null or undefined but it
24
- // needs to start as undefined. We don't want to change the return type so
25
- // it's easier to just ts-ignore this specific line that's complaining about
26
- // undefined not being part of T.
27
- // @ts-ignore
28
- const ref = useRef();
29
- ref.current = value;
30
- return ref;
31
- }
5
+ import useEvent from '../use-event';
32
6
 
33
7
  /**
34
8
  * A hook to facilitate drag and drop handling.
@@ -55,12 +29,12 @@ export default function useDropZone( {
55
29
  onDragEnd: _onDragEnd,
56
30
  onDragOver: _onDragOver,
57
31
  } ) {
58
- const onDropRef = useFreshRef( _onDrop );
59
- const onDragStartRef = useFreshRef( _onDragStart );
60
- const onDragEnterRef = useFreshRef( _onDragEnter );
61
- const onDragLeaveRef = useFreshRef( _onDragLeave );
62
- const onDragEndRef = useFreshRef( _onDragEnd );
63
- const onDragOverRef = useFreshRef( _onDragOver );
32
+ const onDropEvent = useEvent( _onDrop );
33
+ const onDragStartEvent = useEvent( _onDragStart );
34
+ const onDragEnterEvent = useEvent( _onDragEnter );
35
+ const onDragLeaveEvent = useEvent( _onDragLeave );
36
+ const onDragEndEvent = useEvent( _onDragEnd );
37
+ const onDragOverEvent = useEvent( _onDragOver );
64
38
 
65
39
  return useRefEffect(
66
40
  ( elem ) => {
@@ -122,8 +96,8 @@ export default function useDropZone( {
122
96
  ownerDocument.addEventListener( 'dragend', maybeDragEnd );
123
97
  ownerDocument.addEventListener( 'mousemove', maybeDragEnd );
124
98
 
125
- if ( onDragStartRef.current ) {
126
- onDragStartRef.current( event );
99
+ if ( _onDragStart ) {
100
+ onDragStartEvent( event );
127
101
  }
128
102
  }
129
103
 
@@ -142,15 +116,15 @@ export default function useDropZone( {
142
116
  return;
143
117
  }
144
118
 
145
- if ( onDragEnterRef.current ) {
146
- onDragEnterRef.current( event );
119
+ if ( _onDragEnter ) {
120
+ onDragEnterEvent( event );
147
121
  }
148
122
  }
149
123
 
150
124
  function onDragOver( /** @type {DragEvent} */ event ) {
151
125
  // Only call onDragOver for the innermost hovered drop zones.
152
- if ( ! event.defaultPrevented && onDragOverRef.current ) {
153
- onDragOverRef.current( event );
126
+ if ( ! event.defaultPrevented && _onDragOver ) {
127
+ onDragOverEvent( event );
154
128
  }
155
129
 
156
130
  // Prevent the browser default while also signalling to parent
@@ -171,8 +145,8 @@ export default function useDropZone( {
171
145
  return;
172
146
  }
173
147
 
174
- if ( onDragLeaveRef.current ) {
175
- onDragLeaveRef.current( event );
148
+ if ( _onDragLeave ) {
149
+ onDragLeaveEvent( event );
176
150
  }
177
151
  }
178
152
 
@@ -192,8 +166,8 @@ export default function useDropZone( {
192
166
  // eslint-disable-next-line no-unused-expressions
193
167
  event.dataTransfer && event.dataTransfer.files.length;
194
168
 
195
- if ( onDropRef.current ) {
196
- onDropRef.current( event );
169
+ if ( _onDrop ) {
170
+ onDropEvent( event );
197
171
  }
198
172
 
199
173
  maybeDragEnd( event );
@@ -209,12 +183,12 @@ export default function useDropZone( {
209
183
  ownerDocument.removeEventListener( 'dragend', maybeDragEnd );
210
184
  ownerDocument.removeEventListener( 'mousemove', maybeDragEnd );
211
185
 
212
- if ( onDragEndRef.current ) {
213
- onDragEndRef.current( event );
186
+ if ( _onDragEnd ) {
187
+ onDragEndEvent( event );
214
188
  }
215
189
  }
216
190
 
217
- element.dataset.isDropZone = 'true';
191
+ element.setAttribute( 'data-is-drop-zone', 'true' );
218
192
  element.addEventListener( 'drop', onDrop );
219
193
  element.addEventListener( 'dragenter', onDragEnter );
220
194
  element.addEventListener( 'dragover', onDragOver );
@@ -224,7 +198,7 @@ export default function useDropZone( {
224
198
  ownerDocument.addEventListener( 'dragenter', maybeDragStart );
225
199
 
226
200
  return () => {
227
- delete element.dataset.isDropZone;
201
+ element.removeAttribute( 'data-is-drop-zone' );
228
202
  element.removeEventListener( 'drop', onDrop );
229
203
  element.removeEventListener( 'dragenter', onDragEnter );
230
204
  element.removeEventListener( 'dragover', onDragOver );
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.string.d.ts","../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.object.d.ts","../../node_modules/typescript/lib/lib.esnext.regexp.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/no-case/dist/index.d.ts","../../node_modules/pascal-case/dist/index.d.ts","../../node_modules/camel-case/dist/index.d.ts","../../node_modules/capital-case/dist/index.d.ts","../../node_modules/constant-case/dist/index.d.ts","../../node_modules/dot-case/dist/index.d.ts","../../node_modules/header-case/dist/index.d.ts","../../node_modules/param-case/dist/index.d.ts","../../node_modules/path-case/dist/index.d.ts","../../node_modules/sentence-case/dist/index.d.ts","../../node_modules/snake-case/dist/index.d.ts","../../node_modules/change-case/dist/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/react/index.d.ts","./src/utils/create-higher-order-component/index.ts","./src/utils/debounce/index.ts","./src/utils/throttle/index.ts","./src/utils/observable-map/index.ts","./src/higher-order/pipe.ts","./src/higher-order/compose.ts","./src/higher-order/if-condition/index.tsx","../is-shallow-equal/build-types/objects.d.ts","../is-shallow-equal/build-types/arrays.d.ts","../is-shallow-equal/build-types/index.d.ts","../element/build-types/create-interpolate-element.d.ts","../element/build-types/react.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-dom/client.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","./src/higher-order/pure/index.tsx","../../node_modules/utility-types/dist/aliases-and-guards.d.ts","../../node_modules/utility-types/dist/mapped-types.d.ts","../../node_modules/utility-types/dist/utility-types.d.ts","../../node_modules/utility-types/dist/functional-helpers.d.ts","../../node_modules/utility-types/dist/index.d.ts","../deprecated/build-types/index.d.ts","./src/higher-order/with-global-events/listener.js","./src/higher-order/with-global-events/index.js","./src/hooks/use-instance-id/index.ts","./src/higher-order/with-instance-id/index.tsx","./src/higher-order/with-safe-timeout/index.tsx","./src/higher-order/with-state/index.js","../dom/build-types/dom/compute-caret-rect.d.ts","../dom/build-types/dom/document-has-text-selection.d.ts","../dom/build-types/dom/document-has-uncollapsed-selection.d.ts","../dom/build-types/dom/document-has-selection.d.ts","../dom/build-types/dom/get-rectangle-from-range.d.ts","../dom/build-types/dom/get-scroll-container.d.ts","../dom/build-types/dom/get-offset-parent.d.ts","../dom/build-types/dom/is-entirely-selected.d.ts","../dom/build-types/dom/is-form-element.d.ts","../dom/build-types/dom/is-horizontal-edge.d.ts","../dom/build-types/dom/is-number-input.d.ts","../dom/build-types/dom/is-text-field.d.ts","../dom/build-types/dom/is-vertical-edge.d.ts","../dom/build-types/dom/place-caret-at-horizontal-edge.d.ts","../dom/build-types/dom/place-caret-at-vertical-edge.d.ts","../dom/build-types/dom/replace.d.ts","../dom/build-types/dom/remove.d.ts","../dom/build-types/dom/insert-after.d.ts","../dom/build-types/dom/unwrap.d.ts","../dom/build-types/dom/replace-tag.d.ts","../dom/build-types/dom/wrap.d.ts","../dom/build-types/dom/strip-html.d.ts","../dom/build-types/dom/is-empty.d.ts","../dom/build-types/dom/clean-node-list.d.ts","../dom/build-types/dom/remove-invalid-html.d.ts","../dom/build-types/dom/is-rtl.d.ts","../dom/build-types/dom/safe-html.d.ts","../dom/build-types/dom/is-selection-forward.d.ts","../dom/build-types/dom/index.d.ts","../dom/build-types/phrasing-content.d.ts","../dom/build-types/data-transfer.d.ts","../dom/build-types/focusable.d.ts","../dom/build-types/tabbable.d.ts","../dom/build-types/index.d.ts","./src/hooks/use-ref-effect/index.ts","./src/hooks/use-constrained-tabbing/index.js","./node_modules/clipboard/src/clipboard.d.ts","./src/hooks/use-copy-on-click/index.js","./src/hooks/use-copy-to-clipboard/index.js","../keycodes/build-types/platform.d.ts","../keycodes/build-types/index.d.ts","./src/hooks/use-focus-on-mount/index.js","./src/hooks/use-focus-return/index.js","./src/hooks/use-focus-outside/index.ts","./src/hooks/use-merge-refs/index.js","./src/hooks/use-dialog/index.ts","./src/hooks/use-disabled/index.ts","./src/hooks/use-event/index.ts","./src/hooks/use-isomorphic-layout-effect/index.js","./src/hooks/use-dragging/index.js","../../node_modules/@types/mousetrap/index.d.ts","../../node_modules/@types/mousetrap/plugins/global-bind/mousetrap-global-bind.d.ts","./src/hooks/use-keyboard-shortcut/index.js","./src/hooks/use-media-query/index.js","./src/hooks/use-previous/index.ts","./src/hooks/use-reduced-motion/index.js","../undo-manager/build-types/types.d.ts","../undo-manager/build-types/index.d.ts","./src/hooks/use-state-with-history/index.ts","./src/hooks/use-viewport-match/index.js","./src/hooks/use-resize-observer/use-resize-observer.ts","./src/hooks/use-resize-observer/legacy/index.tsx","./src/hooks/use-resize-observer/index.ts","../priority-queue/build-types/index.d.ts","./src/hooks/use-async-list/index.ts","./src/hooks/use-warn-on-change/index.js","../../node_modules/use-memo-one/index.d.ts","./src/hooks/use-debounce/index.js","./src/hooks/use-debounced-input/index.ts","./src/hooks/use-throttle/index.js","./src/hooks/use-drop-zone/index.js","./src/hooks/use-focusable-iframe/index.ts","./src/hooks/use-fixed-window-list/index.js","./src/hooks/use-observable-value/index.ts","./src/index.js","../../typings/gutenberg-env/index.d.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","17edc026abf73c5c2dd508652d63f68ec4efd9d4856e3469890d27598209feb5",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"9c00a480825408b6a24c63c1b71362232927247595d7c97659bc24dc68ae0757","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"b4e123af1af6049685c93073a15868b50aebdad666d422edc72fa2b585fa8a37","f86c04a744ebcede96bac376f9a2c90f2bd3c422740d91dda4ca6233199d4977","6ae1bddee5c790439bd992abd063b9b46e0cadd676c2a8562268d1869213ff60","606244fc97a6a74b877f2e924ba7e55b233bc6acb57d7bf40ba84a5be2d9adb0","4a1cabac71036b8a14f5db1b753b579f0c901c7d7b9227e6872dadf6efb104e8","062959a1d825b96639d87be35fe497cbd3f89544bf06fdad577bbfb85fcf604c","4c3672dc8f4e4fdd3d18525b22b31f1b5481f5a415db96550d3ac5163a6c3dd3","f9a69ca445010b91fe08f08c06e0f86d79c0d776905f9bdb828477cb2a1eb7fc","ad7fd0e7ee457d4884b3aaecbcbd2a80b6803407c4ce2540c296170d4c7918ef","a50ef21605f41c6acad6c3ef0307e5311b94963c846ca093c764b80cdb5318d6","74b4035dd26d09a417c44ca23ab5ee69b173f8c2f6b2e47350ab0795cf2d4a17","918f86ee2b19cc38cb8b1a4cf8f223eb228aaa39df3604c42f700fac2f0b3ea1",{"version":"55461596dc873b866911ef4e640fae4c39da7ac1fbc7ef5e649cb2f2fb42c349","affectsGlobalScope":true},"4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380",{"version":"8ca4709dbd22a34bcc1ebf93e1877645bdb02ebd3f3d9a211a299a8db2ee4ba1","affectsGlobalScope":true},{"version":"984cb478e53b9540445f8346a75a6c0516dcaad3443b7366f415ce2761bbfaa5","signature":"33ac93038bb0401ec8d626b8e9283233a83e185b72de6af25e2be198c142af7c"},{"version":"8e5d1fa9a8db34de1fa9f655695fa00f2c7c8497f185bd4b5cb3b4771c30a375","signature":"b07c8d5d19d005d8062f2cfe086c5dcd22db81bf02873c0328811c793e93845f"},{"version":"ec17a33de0166cd47421642635272df2893f5aca9e84bf8d08c4af617a6dbe9e","signature":"49f44b9e32a9d528a264cc9cf1caeb63fb8e784ad6593ae4db97b8d55958487e"},{"version":"d44945054f88ab5a7fef6def49673884accaf8c3f624d525f79fe5b7156552a0","signature":"8fd8fef00ad97dc6647f93aa3e44b1b38bea2d08448fe90072c1728d6feee6be"},{"version":"a30eb0894e7698ba171e6ef7110539794dc09fd34823cea256719bf6fafd7257","signature":"19cc3a25b30b069eab1e2988980044843b86f5e983d9d0fa1265b372418a33f5"},{"version":"d40b5b4bf9a7fdefed2bb088b80ab797193fa0415dc26fd77120b54f64d4343a","signature":"f23d93a062f31926ef28c3c2e0e133ec4e02dd6297addfdf2fd2702268d45c96"},{"version":"3bfe59e1dc5dc9b6d143b7278236dfb7276f93b649bc223e5329b49e219008ac","signature":"3da4f8f58705325012c3995afe0f9dc5aeaf711fcfd2e15c667626ddd4adf788"},"6a14238e7b4acceb7151fb2383c380d91ad7f9635e28b5977ff96c9e315cc866","f2418af0b544a141cfb8f320b8b6599a4de8031d04554ae5b5a8f5f74983c99d","8de77521349d45f032ccb921923625d7c44116ad1a281ac331beda3197df59c2","4c506b14512049dfe6f4ceb172b13c6af03663f85ba61fc57efbe6c2e7be9f44","4405cd67ec5f7f748fd793be0ce5842fa0808955b8e37518c011abfa5ab63ba5","adb17fea4d847e1267ae1241fa1ac3917c7e332999ebdab388a24d82d4f58240","05321b823dd3781d0b6aac8700bfdc0c9181d56479fe52ba6a40c9196fd661a8","472c14cdec534a465e866b6e1feee2d4e0d89c15fdc33ba80ff034fa0e80f3c1","4d807d55c784b72f71c092c34c84d09b95c29500c30252538fd5cf9a0a788c0e","df43a3968118d4b16618d7a0ac8ba89337fcce3c39e39984087ac34bf0cf250c","4714d89e7ea47b8f79a4d448a11674b2a724f93ab03cfa6879dafbab0f0c5a15","cb9a03b327570c1eae5c82a48604ef697ad1a6264ed0490743a3449de61a4fff","af88a0b0f808a6721401550621bfe67c46c6fd55000305058e7c73600d119a9b",{"version":"f6360bce69ffff8a59112379af90ae9a925609e0744b3b7511b0d921bd389393","signature":"0848142b6b710fbacb6ebe61f27eb0f9e998dfc1f8fc8564a5391576b67eabae"},"bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","1032b6aba205cad9dc80b333286f2c4e78a405bf183d08852ebc380f9e18082a",{"version":"cafd444fa9429538f39b36d19967735f4ddd68afdf595ce8d6526b9535a32967","signature":"391e49c9b3108e423103efa8ae052a982419caa7b0f4cac69fc6c3a1e003d361"},{"version":"8da8943f5709102a1a172e59ad9ef8efcfad939c3fc3ce0931cee0e74b746415","signature":"1d2894af65430564ba12842214a8384c3edc94b9cf0e64538474d28acb288ab0"},{"version":"fa2e37a78ebf31b49bf2165b9fc557db87078ec2d49919c2cc069a587bf0bdf0","signature":"202ca9254496f06eb5fc5b14e7386a800579d34808ee327f43e97596d8845c1e"},{"version":"7c6ad741384099acf91309754e42316fbcdb88ec198d81fd09692d409c668fb7","signature":"9f40fa8ba1a3d00ff414458c18727a576328b2d4cedd7af736a58b38e9f5a2fb"},{"version":"51cd1f3b9de98a927a6a6ffeae4de7573b8aa140de5e1367d3320be0fb38b411","signature":"9be88cae31c4bee5fd9af4497786e84220977f08409bcc3162032b20f02f4264"},{"version":"04960fe91185fc317b9f8d2d2604b4547c8ea3ec49563062c28ae95c89e06e3a","signature":"ae51096d7e513de636260729cce1c8cab0f03417bf7fd4a5fc3bc1e13066a3e0"},"4b9d249b7c9f8418d9bc3ab4cde84f55f4bf046335db8ff3b81a278944fe3ed2","e72b2bb70a4d9a82306da71d399dcf1a5e80d9e3ebcf59b0fa83b217b9a5f428","c6952de66e05d6b17f86e48f4c891f1bfb181707b382f8a1c5b7ae57cb56281d","c7e465ccc49c73ed7fc13097fe714e0839083efe7293a73b1dd86184079eecec","2b9a80ad6b2c9899c48146638854914c517eaa4b03d1da735949f038c3f68ca0","b3cad4b66b48560eb79b276c2013bef744d530f84fec04e169ec33dd9bf01c35","1e95ca15e810ae4867f8639d8c49d3840c0f6a5ae8c4abfa0174be803a67cfcf","a02177379b2fbf723210e7eca2454b38a8a430165eaa6560a560f7e803c04a38","45d291fca62fcc1ace9499ef71a7b37a2ffbe437ea6f176faaf22e461fb194bc","6c3693f28bbf6fb06ceab50425d93a6f352b143ee6c441379403addca32ac492","e4956b273081c74d1dba8d2f28889922c7feec072e6c7b789d23d385438ee87a","bc8a4e85be3fdf875aabdd8d2ca17eb785972050808bd795c173e532a7aac79c","dcc847cd5a1a58bc949d80d8686d8136f9de019c4cb232b24b43c8c6bbc93cf5","7e3b07bc511efd17b152e0774bc75fdf58a0ec6dc9cbc0d9a5ec524b32d8597c","5c3efc0b48a9ffaebcb92d80764bf511efdc1da294545f048b388f1eb0e776dd","303140abf8cd05a38a4c80b0093f3eed7f08338f8d7d8835c7673dee2f30c278","551c9be5f02d3f690b8ca4e0b6de31a01144fadae4fd78efffdd1a74975605d8","e9ad4e8f8d4cdf4868ed849477eb52c1fcc8202a0eae09a285044247fa34b3d7","99ff0aa192cb6b3a49c33a945cefeb06cb974fb1e5093af322bd5650d23459ff","4888c8bf45b44cba6310f105f461bcd1c68339d1223fa9eba4220d634b037779","c0f29d2aa16258e0ca3a269bee4bd423b36db42589f373148d86660d33925059","dc72c8a5f4dd64a562574eaa4868e415b522b29112a7febec2ab256367b15f0c","a3f9a69ff1d069d459a47330207aab3e49cabb1930118c7a1e33ab373c22cdbc","6cc47928de7798cab399c6bde512a071c571376b1d8939e86c6153b7c789b904","d91f44462a1982e997851776cf8e4a0f51a92787879098e24fb25b2436602d3b","a280e9e4bc79c5d5fe000c17409673106ad971e18cf357d3bf8c1896031653a8","02b01edc9185b431c83c3529460329623644045a55bf0d2816b270e6654a0d6e","d2fc8442cba54a7d9981be7ec77ce1a9442bd8c858162f455d702776cd2804d8","a9ea87aa97206821d4c4dce3381632cb01aceff0203d20b7b0451df099842d7c","4ab84c99c2d8de9ed09d8cec1d5ebe7dc69b0d14ffbb6f35a08aad635a467459","cccc56d5be56aefb6a65bb2d27dede6fab002419984d46dd8b0ed11f408ed972","76440ec58b976c2e975139c5b67a9ce7249189c8324dc4675923570314720c44","9984f7554f75aea5256bcccaa0692a497da23c904049c3bfb6f89a3d6973e231","98c5be1140870c0579a5ad587c6208a96647338f5b022b6c82c570aa5bbc5fb5",{"version":"94d7ac3e19a72dd87ee83e882c52f2e6f2336dd4bff4da8f550cd589ad142634","signature":"c728ed4d9edd0dadc4acf47b491683872bc24c1394d948139f718fdfdc3d8073"},{"version":"05deab5f627b5fca3b3bbec26bbf671280350e87554acec679df4393f9e709ec","signature":"18470dac2cdc935855f128c65c92e22d8b818e5b51d1ebb95e1e7d393d10a8e1"},"c67b8642902d9f878094e781c06e0cdf8a4cea6f1a3f76cfa506b508700a5ec9",{"version":"4d90872d6ba216c36501edc3eee9810501baecdd895ff28acfb81f97c2b2607b","signature":"7a57e5cff09f2a1ad5ee9d22300d9bfa4dc7b518d682aef6dfd2e10276fe2394"},{"version":"f66992ddd7c0f55193945d9ee7d6ad5e49944cb68b0f29af1cde95e433e8b505","signature":"903129fde008533775b06a5ebdf00698e5fde5bf5652ff6c29c3f7e432c7378c"},"6270f21b52d381dda2ca953a728f44b5ceb9edf965c97cb55f77ba7a477d77f0","079ae7b7b7e8717e26b6823b7595a91470479aed7be955e3cc55e9e51487a655",{"version":"70c112aaba56d45f9a9695b09d4b8c8c706473913b4ee81bcbff5368f7b2d87d","signature":"b2cacb03cb5b991c266f9107f1f7a6b75abac14396653057f6a5b48fafd89bcf"},{"version":"458770f591bff40884722f8a1706bbb8eae50f1abf220d37225693b61864b6b9","signature":"9a1dcd1b6dd1363070c55a173f3bbe311eb94ad77e6be39b3f4973379e8b803e"},{"version":"a13bc6432d4440ebc8b5b651b8db51b4723409890eba7a0e65d48b8354777317","signature":"28701b1e705eafec432aa5e8581e689c9bb9341bba6616f6d1f681025d32f221"},{"version":"c6791d590d7897be190f22200c5b39f3efda228485e72dd2b40fc3a519c748fe","signature":"22695a1626d67591afae4fd6ccec1cba61f4d171b195e7b4d58d894121e67923"},{"version":"827e0433b2334897f18d457d95efe92b02ce636d34be3acda84bea3fbf2f75e8","signature":"22cce1f627cfdb8417142fea99e6b9ad129a9c25cf231a2340773c50e4d39026"},{"version":"c34925abafd06d280f2387015bc79ffaee0ea30f35c0da56a7e1de57701eb1f6","signature":"f30b5c4f3570832ada75cb2c06e668934f9b9b9d437a10780b01effb53e2a9a2"},{"version":"44afce35818a908ab0013dba60c364acb73099e44bf9fdb4ad29577f96693d80","signature":"74b840e04c51b5a1f7250ad4631ce7aa563bab10c1bbf5825af676ecd4aaee44"},{"version":"98d019534dd7c963b013eed9a2a2e8a96618e70a40730f6920614be6d410ef80","signature":"35bde1eadd47ade9e8fdad3888485ccbdcb27f718e4b1ad80241437c521f5ff8"},{"version":"774f781a28c56874e245eadff141e5e52af54e5555d7e083fca45f06348841ed","signature":"e393aeb0b998a157a6008ba310cd808d07c7e079c0d0ddc47b83b20e254fc8c6"},"96520a873073a2f39f922d0a422498cdcc28be9066a769000cdd07ecaba7b645","135aa6d18002bfec723f8697aa80a59648cf0582752d5e089b6eb0770b63a02d",{"version":"663ec106f7e3c06d083da22426d7f02caa672f7ced73875759c3ada96e12b2b3","signature":"465bcce0de024e96c36c4dd9f25d5b30e59c1ff003ec49f323e46a313401833d"},{"version":"da4065194333c1cd79d120d9cbf3bbef66119210edb7c371717ab13816629d5b","signature":"f1d2d2c3278068da7558b0e56945caf3716d63663da66d2d3fa1d5ba1672122f"},{"version":"d3d3afbd4050e936bafa7edc302cfb8fd025859b6b79e354fd04f87cd0c1d39b","signature":"35e96b392c3b0e1134be3c6e7c0c75f42daf09a1ed172f979d93078050a04645"},{"version":"e064325c76ef07fec4cd69a91dabe717fae011bba5e15d81a2486ce25e80a91e","signature":"ca4c88ef756cb9c6abd4b9ee2db0ee816f68484200f9e0c8a53363e44ab47374"},"0f60659a2d51aede4c60eb6f65e7a06a6f40b473d4e7d43ce3b1c4c6423ab63c","d22334ac67b99f744db59207cd4c06a3a390d5120d7990d58c3b9c6c1df5a02a",{"version":"8a7ebb78d3e73068117a096c92d97a7a337668e41ab553a6e2e51811c7607f52","signature":"a65a75f828f15734b92b18842c561b5dc8052ee2bf955aa8d8ce452bc7906cb1"},{"version":"bba5296d2237f0a125c2f5c091c67d6c388c4ad12d022700fc0e76762b149ea2","signature":"5151e536370ae67670211ecfd2f1736c126d15719bb3c149dabea3ac5243d9f0"},{"version":"47153166bceff00476ae3336c9a18569eba7f0f7c029d2931d0592eb9783d267","signature":"4047e242f8c7ff9154d26a382d05d9fbbf480986852221d0e37edfd960172aad"},{"version":"9214b7fd54897112ed6f4a2af4d6bd0939f07bb266fac0ed973b50d6049672dc","signature":"04bca515d6a12b2764e0bd38ea5f374dce3ff5dcccfc14be78acdb67a4ecc3a5"},{"version":"efef5e272190e11605fc07f9fcca89d51496f2c8d81fd1da663b9ec925f75d96","signature":"7d4175a71c0cc793641a6828499e2e2d9f4923f69aa4f2ec7ef6da3bbc9ff635"},"2a57cbf1f516e1a2da6e22644f4517479c3ea3f28ff13aefcb1999c0d31c23f0",{"version":"373f114e75a3f85f438ed91f438d780981d72241216e15f2de8b6186a05f3962","signature":"4b34ff3543e7b99f7b8f2125d0dc6ccacc11e9fa9f8e6de7a9cbd5d11a1ddd79"},{"version":"8ebd5899eefab0ba9bb82ae4cdd18aca44564a25cebfa51ea5d92db4252b49dd","signature":"90358612694ff8f39093016eac40ee2fcd0fe2d98ec495463a23822f9498ef50"},"62540abf0bac8bf8c13c183db0457c5495a2bdad157f9eb03916c3953feb765e",{"version":"a932da304cfa82e136c864d2ba3f12cd2ebaa93b7867c5efd052d66a9fdcb790","signature":"f420b588b80b78dbfded5557138ac26fcc1686989b6e980a812ac99dce84c0b7"},{"version":"509026b7ec8d17618587ac2f8ad80ff40f4a012edb6ce9765267881e37b7f9ef","signature":"d17c206046ccc9f785662df8894551184ec513018644e41402b8ebb634aaf0ac"},{"version":"54ecef44ff71b90d19e17070c0f025041c49e60e52022bd025c80eee798aa1c8","signature":"8176a7f5a2e4898cf4e798ad9198df1e702eb3d5989b0c77a0bd4450236ac8f7"},{"version":"4fa9176bf0e5f9286539c7838e4a9e7d9e33b55f354991e84fd4078df6ac6349","signature":"83035c297623ea249439bc568ed15e764c380c90dbd6ab75f5dd9bbeec1818ef"},{"version":"323a50e120dce900c227a13a475c2de2c76e57fd26fdd5e1867bfc01c98378e9","signature":"fc2cb49e13333ce31695f24728e80eb1bd2e12f89936f618f122389d9b7598dc"},{"version":"56ec971ff44515a642872c9ff9dc89a9156d118b05eb36f60853572a4ded3dab","signature":"6b58ba45fddffe811e27b09c203a9e5e0e74088c31f0139492bccd80437613b2"},{"version":"741161c629f6bcc3f0fac43b97cfed42acc1efcccf7b06388fdb3c4e1498038c","signature":"c58daf5a5a0c7bf9d9c4c8af95e211fd856eaf58b4e69922592ce5676d2a1720"},{"version":"5cad8c541871c8625f577f2d5378566fd64e6fc646e209bf6c7217e5fe72534a","signature":"5fa2dcd5cd40cd814b19d54bdab540fec0250009c9bd9074d6e78cf51bcbbbae"},{"version":"cd62baba8e325afe998a6537894fcc0420146c242e1b6fdfdaaadfd21dc0d969","affectsGlobalScope":true}],"root":[[90,96],110,[117,122],157,158,160,161,[164,172],[175,178],[181,185],187,188,[190,197]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"checkJs":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"rootDir":"./src","skipDefaultLibCheck":true,"strict":true,"target":99},"fileIdsList":[[173],[89],[86,87,88],[75],[74],[74,75,76,77,78,79,80,81,82,83,84],[77],[79],[111,112,113,114],[111],[112],[94],[89,90],[89,90,99,109],[90,109,116,117],[90,119],[90,109],[90,109,116],[109,186],[89,156,157],[89,109,116,159],[89,109,157,159],[91,109,189],[109,190],[89,109,158,163,164,165,166,167],[91,157],[89,109,171],[89,109,157],[109],[89,91,109,156,163],[89,109,156,157],[89,109],[89,157],[89,109,163,173,174],[93,109],[176],[89,183,184],[89,109,183],[109,170],[109,180],[91,92,109,189],[109,176],[177],[90,91,92,93,94,95,96,110,118,119,120,121,122,157,158,160,161,164,165,166,167,168,169,170,171,172,175,176,177,178,181,182,185,187,188,190,191,192,193,194,195,196],[85,89],[91],[115],[123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,147,148,149,150],[146],[151,152,153,154,155],[100,101,104,105,106,107,108],[102,103],[97,98],[99],[89,162],[179]],"referencedMap":[[174,1],[103,2],[102,2],[89,3],[76,4],[77,5],[85,6],[78,5],[79,5],[80,7],[81,8],[75,5],[82,8],[83,5],[84,8],[115,9],[112,10],[113,11],[95,12],[96,13],[110,14],[118,15],[120,16],[121,17],[122,18],[187,19],[158,20],[160,21],[161,22],[190,23],[191,24],[168,25],[169,26],[172,27],[193,28],[170,29],[195,30],[164,31],[166,29],[165,32],[194,33],[119,29],[171,29],[175,34],[176,29],[167,32],[196,35],[177,29],[178,36],[157,32],[185,37],[184,38],[183,39],[181,40],[192,41],[182,42],[188,43],[197,44],[90,45],[92,46],[116,47],[151,48],[147,49],[156,50],[100,2],[109,51],[108,2],[104,52],[101,2],[107,2],[99,53],[97,54],[163,55],[180,56]],"latestChangedDtsFile":"./build-types/index.d.ts"},"version":"5.5.3"}
1
+ {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.string.d.ts","../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.object.d.ts","../../node_modules/typescript/lib/lib.esnext.regexp.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/no-case/dist/index.d.ts","../../node_modules/pascal-case/dist/index.d.ts","../../node_modules/camel-case/dist/index.d.ts","../../node_modules/capital-case/dist/index.d.ts","../../node_modules/constant-case/dist/index.d.ts","../../node_modules/dot-case/dist/index.d.ts","../../node_modules/header-case/dist/index.d.ts","../../node_modules/param-case/dist/index.d.ts","../../node_modules/path-case/dist/index.d.ts","../../node_modules/sentence-case/dist/index.d.ts","../../node_modules/snake-case/dist/index.d.ts","../../node_modules/change-case/dist/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/react/index.d.ts","./src/utils/create-higher-order-component/index.ts","./src/utils/debounce/index.ts","./src/utils/throttle/index.ts","./src/utils/observable-map/index.ts","./src/higher-order/pipe.ts","./src/higher-order/compose.ts","./src/higher-order/if-condition/index.tsx","../is-shallow-equal/build-types/objects.d.ts","../is-shallow-equal/build-types/arrays.d.ts","../is-shallow-equal/build-types/index.d.ts","../element/build-types/create-interpolate-element.d.ts","../element/build-types/react.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-dom/client.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","./src/higher-order/pure/index.tsx","../../node_modules/utility-types/dist/aliases-and-guards.d.ts","../../node_modules/utility-types/dist/mapped-types.d.ts","../../node_modules/utility-types/dist/utility-types.d.ts","../../node_modules/utility-types/dist/functional-helpers.d.ts","../../node_modules/utility-types/dist/index.d.ts","../deprecated/build-types/index.d.ts","./src/higher-order/with-global-events/listener.js","./src/higher-order/with-global-events/index.js","./src/hooks/use-instance-id/index.ts","./src/higher-order/with-instance-id/index.tsx","./src/higher-order/with-safe-timeout/index.tsx","./src/higher-order/with-state/index.js","../dom/build-types/dom/compute-caret-rect.d.ts","../dom/build-types/dom/document-has-text-selection.d.ts","../dom/build-types/dom/document-has-uncollapsed-selection.d.ts","../dom/build-types/dom/document-has-selection.d.ts","../dom/build-types/dom/get-rectangle-from-range.d.ts","../dom/build-types/dom/get-scroll-container.d.ts","../dom/build-types/dom/get-offset-parent.d.ts","../dom/build-types/dom/is-entirely-selected.d.ts","../dom/build-types/dom/is-form-element.d.ts","../dom/build-types/dom/is-horizontal-edge.d.ts","../dom/build-types/dom/is-number-input.d.ts","../dom/build-types/dom/is-text-field.d.ts","../dom/build-types/dom/is-vertical-edge.d.ts","../dom/build-types/dom/place-caret-at-horizontal-edge.d.ts","../dom/build-types/dom/place-caret-at-vertical-edge.d.ts","../dom/build-types/dom/replace.d.ts","../dom/build-types/dom/remove.d.ts","../dom/build-types/dom/insert-after.d.ts","../dom/build-types/dom/unwrap.d.ts","../dom/build-types/dom/replace-tag.d.ts","../dom/build-types/dom/wrap.d.ts","../dom/build-types/dom/strip-html.d.ts","../dom/build-types/dom/is-empty.d.ts","../dom/build-types/dom/clean-node-list.d.ts","../dom/build-types/dom/remove-invalid-html.d.ts","../dom/build-types/dom/is-rtl.d.ts","../dom/build-types/dom/safe-html.d.ts","../dom/build-types/dom/is-selection-forward.d.ts","../dom/build-types/dom/index.d.ts","../dom/build-types/phrasing-content.d.ts","../dom/build-types/data-transfer.d.ts","../dom/build-types/focusable.d.ts","../dom/build-types/tabbable.d.ts","../dom/build-types/index.d.ts","./src/hooks/use-ref-effect/index.ts","./src/hooks/use-constrained-tabbing/index.js","./node_modules/clipboard/src/clipboard.d.ts","./src/hooks/use-copy-on-click/index.js","./src/hooks/use-copy-to-clipboard/index.js","../keycodes/build-types/platform.d.ts","../keycodes/build-types/index.d.ts","./src/hooks/use-focus-on-mount/index.js","./src/hooks/use-focus-return/index.js","./src/hooks/use-focus-outside/index.ts","./src/hooks/use-merge-refs/index.js","./src/hooks/use-dialog/index.ts","./src/hooks/use-disabled/index.ts","./src/hooks/use-event/index.ts","./src/hooks/use-isomorphic-layout-effect/index.js","./src/hooks/use-dragging/index.js","../../node_modules/@types/mousetrap/index.d.ts","../../node_modules/@types/mousetrap/plugins/global-bind/mousetrap-global-bind.d.ts","./src/hooks/use-keyboard-shortcut/index.js","./src/hooks/use-media-query/index.js","./src/hooks/use-previous/index.ts","./src/hooks/use-reduced-motion/index.js","../undo-manager/build-types/types.d.ts","../undo-manager/build-types/index.d.ts","./src/hooks/use-state-with-history/index.ts","./src/hooks/use-viewport-match/index.js","./src/hooks/use-resize-observer/use-resize-observer.ts","./src/hooks/use-resize-observer/legacy/index.tsx","./src/hooks/use-resize-observer/index.ts","../priority-queue/build-types/index.d.ts","./src/hooks/use-async-list/index.ts","./src/hooks/use-warn-on-change/index.js","../../node_modules/use-memo-one/index.d.ts","./src/hooks/use-debounce/index.js","./src/hooks/use-debounced-input/index.ts","./src/hooks/use-throttle/index.js","./src/hooks/use-drop-zone/index.js","./src/hooks/use-focusable-iframe/index.ts","./src/hooks/use-fixed-window-list/index.js","./src/hooks/use-observable-value/index.ts","./src/index.js","../../typings/gutenberg-env/index.d.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","17edc026abf73c5c2dd508652d63f68ec4efd9d4856e3469890d27598209feb5",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"9c00a480825408b6a24c63c1b71362232927247595d7c97659bc24dc68ae0757","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"b4e123af1af6049685c93073a15868b50aebdad666d422edc72fa2b585fa8a37","f86c04a744ebcede96bac376f9a2c90f2bd3c422740d91dda4ca6233199d4977","6ae1bddee5c790439bd992abd063b9b46e0cadd676c2a8562268d1869213ff60","606244fc97a6a74b877f2e924ba7e55b233bc6acb57d7bf40ba84a5be2d9adb0","4a1cabac71036b8a14f5db1b753b579f0c901c7d7b9227e6872dadf6efb104e8","062959a1d825b96639d87be35fe497cbd3f89544bf06fdad577bbfb85fcf604c","4c3672dc8f4e4fdd3d18525b22b31f1b5481f5a415db96550d3ac5163a6c3dd3","f9a69ca445010b91fe08f08c06e0f86d79c0d776905f9bdb828477cb2a1eb7fc","ad7fd0e7ee457d4884b3aaecbcbd2a80b6803407c4ce2540c296170d4c7918ef","a50ef21605f41c6acad6c3ef0307e5311b94963c846ca093c764b80cdb5318d6","74b4035dd26d09a417c44ca23ab5ee69b173f8c2f6b2e47350ab0795cf2d4a17","918f86ee2b19cc38cb8b1a4cf8f223eb228aaa39df3604c42f700fac2f0b3ea1",{"version":"55461596dc873b866911ef4e640fae4c39da7ac1fbc7ef5e649cb2f2fb42c349","affectsGlobalScope":true},"4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380",{"version":"8ca4709dbd22a34bcc1ebf93e1877645bdb02ebd3f3d9a211a299a8db2ee4ba1","affectsGlobalScope":true},{"version":"984cb478e53b9540445f8346a75a6c0516dcaad3443b7366f415ce2761bbfaa5","signature":"33ac93038bb0401ec8d626b8e9283233a83e185b72de6af25e2be198c142af7c"},{"version":"8e5d1fa9a8db34de1fa9f655695fa00f2c7c8497f185bd4b5cb3b4771c30a375","signature":"b07c8d5d19d005d8062f2cfe086c5dcd22db81bf02873c0328811c793e93845f"},{"version":"ec17a33de0166cd47421642635272df2893f5aca9e84bf8d08c4af617a6dbe9e","signature":"49f44b9e32a9d528a264cc9cf1caeb63fb8e784ad6593ae4db97b8d55958487e"},{"version":"d44945054f88ab5a7fef6def49673884accaf8c3f624d525f79fe5b7156552a0","signature":"8fd8fef00ad97dc6647f93aa3e44b1b38bea2d08448fe90072c1728d6feee6be"},{"version":"a30eb0894e7698ba171e6ef7110539794dc09fd34823cea256719bf6fafd7257","signature":"19cc3a25b30b069eab1e2988980044843b86f5e983d9d0fa1265b372418a33f5"},{"version":"d40b5b4bf9a7fdefed2bb088b80ab797193fa0415dc26fd77120b54f64d4343a","signature":"f23d93a062f31926ef28c3c2e0e133ec4e02dd6297addfdf2fd2702268d45c96"},{"version":"3bfe59e1dc5dc9b6d143b7278236dfb7276f93b649bc223e5329b49e219008ac","signature":"3da4f8f58705325012c3995afe0f9dc5aeaf711fcfd2e15c667626ddd4adf788"},"6a14238e7b4acceb7151fb2383c380d91ad7f9635e28b5977ff96c9e315cc866","f2418af0b544a141cfb8f320b8b6599a4de8031d04554ae5b5a8f5f74983c99d","8de77521349d45f032ccb921923625d7c44116ad1a281ac331beda3197df59c2","4c506b14512049dfe6f4ceb172b13c6af03663f85ba61fc57efbe6c2e7be9f44","4405cd67ec5f7f748fd793be0ce5842fa0808955b8e37518c011abfa5ab63ba5","adb17fea4d847e1267ae1241fa1ac3917c7e332999ebdab388a24d82d4f58240","05321b823dd3781d0b6aac8700bfdc0c9181d56479fe52ba6a40c9196fd661a8","472c14cdec534a465e866b6e1feee2d4e0d89c15fdc33ba80ff034fa0e80f3c1","4d807d55c784b72f71c092c34c84d09b95c29500c30252538fd5cf9a0a788c0e","df43a3968118d4b16618d7a0ac8ba89337fcce3c39e39984087ac34bf0cf250c","4714d89e7ea47b8f79a4d448a11674b2a724f93ab03cfa6879dafbab0f0c5a15","cb9a03b327570c1eae5c82a48604ef697ad1a6264ed0490743a3449de61a4fff","af88a0b0f808a6721401550621bfe67c46c6fd55000305058e7c73600d119a9b",{"version":"f6360bce69ffff8a59112379af90ae9a925609e0744b3b7511b0d921bd389393","signature":"0848142b6b710fbacb6ebe61f27eb0f9e998dfc1f8fc8564a5391576b67eabae"},"bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","1032b6aba205cad9dc80b333286f2c4e78a405bf183d08852ebc380f9e18082a",{"version":"cafd444fa9429538f39b36d19967735f4ddd68afdf595ce8d6526b9535a32967","signature":"391e49c9b3108e423103efa8ae052a982419caa7b0f4cac69fc6c3a1e003d361"},{"version":"8da8943f5709102a1a172e59ad9ef8efcfad939c3fc3ce0931cee0e74b746415","signature":"1d2894af65430564ba12842214a8384c3edc94b9cf0e64538474d28acb288ab0"},{"version":"fa2e37a78ebf31b49bf2165b9fc557db87078ec2d49919c2cc069a587bf0bdf0","signature":"202ca9254496f06eb5fc5b14e7386a800579d34808ee327f43e97596d8845c1e"},{"version":"7c6ad741384099acf91309754e42316fbcdb88ec198d81fd09692d409c668fb7","signature":"9f40fa8ba1a3d00ff414458c18727a576328b2d4cedd7af736a58b38e9f5a2fb"},{"version":"51cd1f3b9de98a927a6a6ffeae4de7573b8aa140de5e1367d3320be0fb38b411","signature":"9be88cae31c4bee5fd9af4497786e84220977f08409bcc3162032b20f02f4264"},{"version":"04960fe91185fc317b9f8d2d2604b4547c8ea3ec49563062c28ae95c89e06e3a","signature":"ae51096d7e513de636260729cce1c8cab0f03417bf7fd4a5fc3bc1e13066a3e0"},"4b9d249b7c9f8418d9bc3ab4cde84f55f4bf046335db8ff3b81a278944fe3ed2","e72b2bb70a4d9a82306da71d399dcf1a5e80d9e3ebcf59b0fa83b217b9a5f428","c6952de66e05d6b17f86e48f4c891f1bfb181707b382f8a1c5b7ae57cb56281d","c7e465ccc49c73ed7fc13097fe714e0839083efe7293a73b1dd86184079eecec","2b9a80ad6b2c9899c48146638854914c517eaa4b03d1da735949f038c3f68ca0","b3cad4b66b48560eb79b276c2013bef744d530f84fec04e169ec33dd9bf01c35","1e95ca15e810ae4867f8639d8c49d3840c0f6a5ae8c4abfa0174be803a67cfcf","a02177379b2fbf723210e7eca2454b38a8a430165eaa6560a560f7e803c04a38","45d291fca62fcc1ace9499ef71a7b37a2ffbe437ea6f176faaf22e461fb194bc","6c3693f28bbf6fb06ceab50425d93a6f352b143ee6c441379403addca32ac492","e4956b273081c74d1dba8d2f28889922c7feec072e6c7b789d23d385438ee87a","bc8a4e85be3fdf875aabdd8d2ca17eb785972050808bd795c173e532a7aac79c","dcc847cd5a1a58bc949d80d8686d8136f9de019c4cb232b24b43c8c6bbc93cf5","7e3b07bc511efd17b152e0774bc75fdf58a0ec6dc9cbc0d9a5ec524b32d8597c","5c3efc0b48a9ffaebcb92d80764bf511efdc1da294545f048b388f1eb0e776dd","303140abf8cd05a38a4c80b0093f3eed7f08338f8d7d8835c7673dee2f30c278","551c9be5f02d3f690b8ca4e0b6de31a01144fadae4fd78efffdd1a74975605d8","e9ad4e8f8d4cdf4868ed849477eb52c1fcc8202a0eae09a285044247fa34b3d7","99ff0aa192cb6b3a49c33a945cefeb06cb974fb1e5093af322bd5650d23459ff","4888c8bf45b44cba6310f105f461bcd1c68339d1223fa9eba4220d634b037779","c0f29d2aa16258e0ca3a269bee4bd423b36db42589f373148d86660d33925059","dc72c8a5f4dd64a562574eaa4868e415b522b29112a7febec2ab256367b15f0c","a3f9a69ff1d069d459a47330207aab3e49cabb1930118c7a1e33ab373c22cdbc","6cc47928de7798cab399c6bde512a071c571376b1d8939e86c6153b7c789b904","d91f44462a1982e997851776cf8e4a0f51a92787879098e24fb25b2436602d3b","a280e9e4bc79c5d5fe000c17409673106ad971e18cf357d3bf8c1896031653a8","02b01edc9185b431c83c3529460329623644045a55bf0d2816b270e6654a0d6e","d2fc8442cba54a7d9981be7ec77ce1a9442bd8c858162f455d702776cd2804d8","a9ea87aa97206821d4c4dce3381632cb01aceff0203d20b7b0451df099842d7c","4ab84c99c2d8de9ed09d8cec1d5ebe7dc69b0d14ffbb6f35a08aad635a467459","cccc56d5be56aefb6a65bb2d27dede6fab002419984d46dd8b0ed11f408ed972","76440ec58b976c2e975139c5b67a9ce7249189c8324dc4675923570314720c44","9984f7554f75aea5256bcccaa0692a497da23c904049c3bfb6f89a3d6973e231","98c5be1140870c0579a5ad587c6208a96647338f5b022b6c82c570aa5bbc5fb5",{"version":"94d7ac3e19a72dd87ee83e882c52f2e6f2336dd4bff4da8f550cd589ad142634","signature":"c728ed4d9edd0dadc4acf47b491683872bc24c1394d948139f718fdfdc3d8073"},{"version":"05deab5f627b5fca3b3bbec26bbf671280350e87554acec679df4393f9e709ec","signature":"18470dac2cdc935855f128c65c92e22d8b818e5b51d1ebb95e1e7d393d10a8e1"},"c67b8642902d9f878094e781c06e0cdf8a4cea6f1a3f76cfa506b508700a5ec9",{"version":"4d90872d6ba216c36501edc3eee9810501baecdd895ff28acfb81f97c2b2607b","signature":"7a57e5cff09f2a1ad5ee9d22300d9bfa4dc7b518d682aef6dfd2e10276fe2394"},{"version":"4c56600a7f42052d232de82050e162f07bb5990799c658cd0a1cb9bf5deddf8b","signature":"903129fde008533775b06a5ebdf00698e5fde5bf5652ff6c29c3f7e432c7378c"},"6270f21b52d381dda2ca953a728f44b5ceb9edf965c97cb55f77ba7a477d77f0","079ae7b7b7e8717e26b6823b7595a91470479aed7be955e3cc55e9e51487a655",{"version":"70c112aaba56d45f9a9695b09d4b8c8c706473913b4ee81bcbff5368f7b2d87d","signature":"b2cacb03cb5b991c266f9107f1f7a6b75abac14396653057f6a5b48fafd89bcf"},{"version":"458770f591bff40884722f8a1706bbb8eae50f1abf220d37225693b61864b6b9","signature":"9a1dcd1b6dd1363070c55a173f3bbe311eb94ad77e6be39b3f4973379e8b803e"},{"version":"a13bc6432d4440ebc8b5b651b8db51b4723409890eba7a0e65d48b8354777317","signature":"28701b1e705eafec432aa5e8581e689c9bb9341bba6616f6d1f681025d32f221"},{"version":"c6791d590d7897be190f22200c5b39f3efda228485e72dd2b40fc3a519c748fe","signature":"22695a1626d67591afae4fd6ccec1cba61f4d171b195e7b4d58d894121e67923"},{"version":"827e0433b2334897f18d457d95efe92b02ce636d34be3acda84bea3fbf2f75e8","signature":"22cce1f627cfdb8417142fea99e6b9ad129a9c25cf231a2340773c50e4d39026"},{"version":"c34925abafd06d280f2387015bc79ffaee0ea30f35c0da56a7e1de57701eb1f6","signature":"f30b5c4f3570832ada75cb2c06e668934f9b9b9d437a10780b01effb53e2a9a2"},{"version":"44afce35818a908ab0013dba60c364acb73099e44bf9fdb4ad29577f96693d80","signature":"74b840e04c51b5a1f7250ad4631ce7aa563bab10c1bbf5825af676ecd4aaee44"},{"version":"98d019534dd7c963b013eed9a2a2e8a96618e70a40730f6920614be6d410ef80","signature":"35bde1eadd47ade9e8fdad3888485ccbdcb27f718e4b1ad80241437c521f5ff8"},{"version":"774f781a28c56874e245eadff141e5e52af54e5555d7e083fca45f06348841ed","signature":"e393aeb0b998a157a6008ba310cd808d07c7e079c0d0ddc47b83b20e254fc8c6"},"96520a873073a2f39f922d0a422498cdcc28be9066a769000cdd07ecaba7b645","135aa6d18002bfec723f8697aa80a59648cf0582752d5e089b6eb0770b63a02d",{"version":"663ec106f7e3c06d083da22426d7f02caa672f7ced73875759c3ada96e12b2b3","signature":"465bcce0de024e96c36c4dd9f25d5b30e59c1ff003ec49f323e46a313401833d"},{"version":"da4065194333c1cd79d120d9cbf3bbef66119210edb7c371717ab13816629d5b","signature":"f1d2d2c3278068da7558b0e56945caf3716d63663da66d2d3fa1d5ba1672122f"},{"version":"d3d3afbd4050e936bafa7edc302cfb8fd025859b6b79e354fd04f87cd0c1d39b","signature":"35e96b392c3b0e1134be3c6e7c0c75f42daf09a1ed172f979d93078050a04645"},{"version":"e064325c76ef07fec4cd69a91dabe717fae011bba5e15d81a2486ce25e80a91e","signature":"ca4c88ef756cb9c6abd4b9ee2db0ee816f68484200f9e0c8a53363e44ab47374"},"0f60659a2d51aede4c60eb6f65e7a06a6f40b473d4e7d43ce3b1c4c6423ab63c","d22334ac67b99f744db59207cd4c06a3a390d5120d7990d58c3b9c6c1df5a02a",{"version":"8a7ebb78d3e73068117a096c92d97a7a337668e41ab553a6e2e51811c7607f52","signature":"a65a75f828f15734b92b18842c561b5dc8052ee2bf955aa8d8ce452bc7906cb1"},{"version":"bba5296d2237f0a125c2f5c091c67d6c388c4ad12d022700fc0e76762b149ea2","signature":"5151e536370ae67670211ecfd2f1736c126d15719bb3c149dabea3ac5243d9f0"},{"version":"47153166bceff00476ae3336c9a18569eba7f0f7c029d2931d0592eb9783d267","signature":"4047e242f8c7ff9154d26a382d05d9fbbf480986852221d0e37edfd960172aad"},{"version":"9214b7fd54897112ed6f4a2af4d6bd0939f07bb266fac0ed973b50d6049672dc","signature":"04bca515d6a12b2764e0bd38ea5f374dce3ff5dcccfc14be78acdb67a4ecc3a5"},{"version":"efef5e272190e11605fc07f9fcca89d51496f2c8d81fd1da663b9ec925f75d96","signature":"7d4175a71c0cc793641a6828499e2e2d9f4923f69aa4f2ec7ef6da3bbc9ff635"},"2a57cbf1f516e1a2da6e22644f4517479c3ea3f28ff13aefcb1999c0d31c23f0",{"version":"373f114e75a3f85f438ed91f438d780981d72241216e15f2de8b6186a05f3962","signature":"4b34ff3543e7b99f7b8f2125d0dc6ccacc11e9fa9f8e6de7a9cbd5d11a1ddd79"},{"version":"8ebd5899eefab0ba9bb82ae4cdd18aca44564a25cebfa51ea5d92db4252b49dd","signature":"90358612694ff8f39093016eac40ee2fcd0fe2d98ec495463a23822f9498ef50"},"62540abf0bac8bf8c13c183db0457c5495a2bdad157f9eb03916c3953feb765e",{"version":"a932da304cfa82e136c864d2ba3f12cd2ebaa93b7867c5efd052d66a9fdcb790","signature":"f420b588b80b78dbfded5557138ac26fcc1686989b6e980a812ac99dce84c0b7"},{"version":"509026b7ec8d17618587ac2f8ad80ff40f4a012edb6ce9765267881e37b7f9ef","signature":"d17c206046ccc9f785662df8894551184ec513018644e41402b8ebb634aaf0ac"},{"version":"54ecef44ff71b90d19e17070c0f025041c49e60e52022bd025c80eee798aa1c8","signature":"8176a7f5a2e4898cf4e798ad9198df1e702eb3d5989b0c77a0bd4450236ac8f7"},{"version":"ba27065d8ce806616e164248d93e7bf0793c68ef4709b197ccf25815cd349d88","signature":"83035c297623ea249439bc568ed15e764c380c90dbd6ab75f5dd9bbeec1818ef"},{"version":"323a50e120dce900c227a13a475c2de2c76e57fd26fdd5e1867bfc01c98378e9","signature":"fc2cb49e13333ce31695f24728e80eb1bd2e12f89936f618f122389d9b7598dc"},{"version":"56ec971ff44515a642872c9ff9dc89a9156d118b05eb36f60853572a4ded3dab","signature":"6b58ba45fddffe811e27b09c203a9e5e0e74088c31f0139492bccd80437613b2"},{"version":"741161c629f6bcc3f0fac43b97cfed42acc1efcccf7b06388fdb3c4e1498038c","signature":"c58daf5a5a0c7bf9d9c4c8af95e211fd856eaf58b4e69922592ce5676d2a1720"},{"version":"5cad8c541871c8625f577f2d5378566fd64e6fc646e209bf6c7217e5fe72534a","signature":"5fa2dcd5cd40cd814b19d54bdab540fec0250009c9bd9074d6e78cf51bcbbbae"},{"version":"cd62baba8e325afe998a6537894fcc0420146c242e1b6fdfdaaadfd21dc0d969","affectsGlobalScope":true}],"root":[[90,96],110,[117,122],157,158,160,161,[164,172],[175,178],[181,185],187,188,[190,197]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"checkJs":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"rootDir":"./src","skipDefaultLibCheck":true,"strict":true,"target":99},"fileIdsList":[[173],[89],[86,87,88],[75],[74],[74,75,76,77,78,79,80,81,82,83,84],[77],[79],[111,112,113,114],[111],[112],[94],[89,90],[89,90,99,109],[90,109,116,117],[90,119],[90,109],[90,109,116],[109,186],[89,156,157],[89,109,116,159],[89,109,157,159],[91,109,189],[109,190],[89,109,158,163,164,165,166,167],[91,157],[89,109,171],[89,157,170],[109],[89,91,109,156,163],[89,109,156,157],[89,109],[89,157],[89,109,163,173,174],[93,109],[176],[89,183,184],[89,109,183],[109,170],[109,180],[91,92,109,189],[109,176],[177],[90,91,92,93,94,95,96,110,118,119,120,121,122,157,158,160,161,164,165,166,167,168,169,170,171,172,175,176,177,178,181,182,185,187,188,190,191,192,193,194,195,196],[85,89],[91],[115],[123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,147,148,149,150],[146],[151,152,153,154,155],[100,101,104,105,106,107,108],[102,103],[97,98],[99],[89,162],[179]],"referencedMap":[[174,1],[103,2],[102,2],[89,3],[76,4],[77,5],[85,6],[78,5],[79,5],[80,7],[81,8],[75,5],[82,8],[83,5],[84,8],[115,9],[112,10],[113,11],[95,12],[96,13],[110,14],[118,15],[120,16],[121,17],[122,18],[187,19],[158,20],[160,21],[161,22],[190,23],[191,24],[168,25],[169,26],[172,27],[193,28],[170,29],[195,30],[164,31],[166,29],[165,32],[194,33],[119,29],[171,29],[175,34],[176,29],[167,32],[196,35],[177,29],[178,36],[157,32],[185,37],[184,38],[183,39],[181,40],[192,41],[182,42],[188,43],[197,44],[90,45],[92,46],[116,47],[151,48],[147,49],[156,50],[100,2],[109,51],[108,2],[104,52],[101,2],[107,2],[99,53],[97,54],[163,55],[180,56]],"latestChangedDtsFile":"./build-types/index.d.ts"},"version":"5.5.3"}