@wordpress/compose 7.8.1 → 7.8.2

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.
Files changed (34) hide show
  1. package/build/hooks/use-resize-observer/index.js +3 -42
  2. package/build/hooks/use-resize-observer/index.js.map +1 -1
  3. package/build/hooks/use-resize-observer/{_legacy → legacy}/index.js +2 -3
  4. package/build/hooks/use-resize-observer/legacy/index.js.map +1 -0
  5. package/build/hooks/use-resize-observer/legacy/index.native.js.map +1 -0
  6. package/build/hooks/use-resize-observer/use-resize-observer.js +51 -0
  7. package/build/hooks/use-resize-observer/use-resize-observer.js.map +1 -0
  8. package/build-module/hooks/use-resize-observer/index.js +2 -40
  9. package/build-module/hooks/use-resize-observer/index.js.map +1 -1
  10. package/build-module/hooks/use-resize-observer/{_legacy → legacy}/index.js +1 -1
  11. package/build-module/hooks/use-resize-observer/legacy/index.js.map +1 -0
  12. package/build-module/hooks/use-resize-observer/legacy/index.native.js.map +1 -0
  13. package/build-module/hooks/use-resize-observer/use-resize-observer.js +43 -0
  14. package/build-module/hooks/use-resize-observer/use-resize-observer.js.map +1 -0
  15. package/build-types/hooks/use-resize-observer/index.d.ts +1 -1
  16. package/build-types/hooks/use-resize-observer/index.d.ts.map +1 -1
  17. package/build-types/hooks/use-resize-observer/legacy/index.d.ts.map +1 -0
  18. package/build-types/hooks/use-resize-observer/use-resize-observer.d.ts +2 -0
  19. package/build-types/hooks/use-resize-observer/use-resize-observer.d.ts.map +1 -0
  20. package/package.json +2 -2
  21. package/src/hooks/use-resize-observer/index.ts +3 -42
  22. package/src/hooks/use-resize-observer/{_legacy → legacy}/index.tsx +1 -1
  23. package/src/hooks/use-resize-observer/use-resize-observer.ts +43 -0
  24. package/tsconfig.tsbuildinfo +1 -1
  25. package/build/hooks/use-resize-observer/_legacy/index.js.map +0 -1
  26. package/build/hooks/use-resize-observer/_legacy/index.native.js.map +0 -1
  27. package/build-module/hooks/use-resize-observer/_legacy/index.js.map +0 -1
  28. package/build-module/hooks/use-resize-observer/_legacy/index.native.js.map +0 -1
  29. package/build-types/hooks/use-resize-observer/_legacy/index.d.ts.map +0 -1
  30. /package/build/hooks/use-resize-observer/{_legacy → legacy}/index.native.js +0 -0
  31. /package/build-module/hooks/use-resize-observer/{_legacy → legacy}/index.native.js +0 -0
  32. /package/build-types/hooks/use-resize-observer/{_legacy → legacy}/index.d.ts +0 -0
  33. /package/src/hooks/use-resize-observer/{_legacy → legacy}/index.native.js +0 -0
  34. /package/src/hooks/use-resize-observer/{_legacy → legacy}/test/index.native.js +0 -0
@@ -5,13 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = useResizeObserver;
8
- var _element = require("@wordpress/element");
9
- var _useEvent = _interopRequireDefault(require("../use-event"));
10
- var _legacy = _interopRequireDefault(require("./_legacy"));
11
- /**
12
- * WordPress dependencies
13
- */
14
-
8
+ var _useResizeObserver2 = require("./use-resize-observer");
9
+ var _legacy = _interopRequireDefault(require("./legacy"));
15
10
  /**
16
11
  * Internal dependencies
17
12
  */
@@ -20,40 +15,6 @@ var _legacy = _interopRequireDefault(require("./_legacy"));
20
15
  * External dependencies
21
16
  */
22
17
 
23
- // This is the current implementation of `useResizeObserver`.
24
- //
25
- // The legacy implementation is still supported for backwards compatibility.
26
- // This is achieved by overloading the exported function with both signatures,
27
- // and detecting which API is being used at runtime.
28
- function _useResizeObserver(callback, resizeObserverOptions = {}) {
29
- const callbackEvent = (0, _useEvent.default)(callback);
30
- const observedElementRef = (0, _element.useRef)();
31
- const resizeObserverRef = (0, _element.useRef)();
32
- return (0, _useEvent.default)(element => {
33
- var _resizeObserverRef$cu;
34
- if (element === observedElementRef.current) {
35
- return;
36
- }
37
- observedElementRef.current = element;
38
-
39
- // Set up `ResizeObserver`.
40
- (_resizeObserverRef$cu = resizeObserverRef.current) !== null && _resizeObserverRef$cu !== void 0 ? _resizeObserverRef$cu : resizeObserverRef.current = new ResizeObserver(callbackEvent);
41
- const {
42
- current: resizeObserver
43
- } = resizeObserverRef;
44
-
45
- // Unobserve previous element.
46
- if (observedElementRef.current) {
47
- resizeObserver.unobserve(observedElementRef.current);
48
- }
49
-
50
- // Observe new element.
51
- if (element) {
52
- resizeObserver.observe(element, resizeObserverOptions);
53
- }
54
- });
55
- }
56
-
57
18
  /**
58
19
  * Sets up a [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/Resize_Observer_API)
59
20
  * for an HTML or SVG element.
@@ -105,6 +66,6 @@ function _useResizeObserver(callback, resizeObserverOptions = {}) {
105
66
  */
106
67
 
107
68
  function useResizeObserver(callback, options = {}) {
108
- return callback ? _useResizeObserver(callback, options) : (0, _legacy.default)();
69
+ return callback ? (0, _useResizeObserver2.useResizeObserver)(callback, options) : (0, _legacy.default)();
109
70
  }
110
71
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_useEvent","_interopRequireDefault","_legacy","_useResizeObserver","callback","resizeObserverOptions","callbackEvent","useEvent","observedElementRef","useRef","resizeObserverRef","element","_resizeObserverRef$cu","current","ResizeObserver","resizeObserver","unobserve","observe","useResizeObserver","options","_useLegacyResizeObserver"],"sources":["@wordpress/compose/src/hooks/use-resize-observer/index.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport useEvent from '../use-event';\nimport type { ObservedSize } from './_legacy';\nimport _useLegacyResizeObserver from './_legacy';\n/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\n\n// This is the current implementation of `useResizeObserver`.\n//\n// The legacy implementation is still supported for backwards compatibility.\n// This is achieved by overloading the exported function with both signatures,\n// and detecting which API is being used at runtime.\nfunction _useResizeObserver< T extends HTMLElement >(\n\tcallback: ResizeObserverCallback,\n\tresizeObserverOptions: ResizeObserverOptions = {}\n): ( element?: T | null ) => void {\n\tconst callbackEvent = useEvent( callback );\n\n\tconst observedElementRef = useRef< T | null >();\n\tconst resizeObserverRef = useRef< ResizeObserver >();\n\treturn useEvent( ( element?: T | null ) => {\n\t\tif ( element === observedElementRef.current ) {\n\t\t\treturn;\n\t\t}\n\t\tobservedElementRef.current = element;\n\n\t\t// Set up `ResizeObserver`.\n\t\tresizeObserverRef.current ??= new ResizeObserver( callbackEvent );\n\t\tconst { current: resizeObserver } = resizeObserverRef;\n\n\t\t// Unobserve previous element.\n\t\tif ( observedElementRef.current ) {\n\t\t\tresizeObserver.unobserve( observedElementRef.current );\n\t\t}\n\n\t\t// Observe new element.\n\t\tif ( element ) {\n\t\t\tresizeObserver.observe( element, resizeObserverOptions );\n\t\t}\n\t} );\n}\n\n/**\n * Sets up a [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/Resize_Observer_API)\n * for an HTML or SVG element.\n *\n * Pass the returned setter as a callback ref to the React element you want\n * to observe, or use it in layout effects for advanced use cases.\n *\n * @example\n *\n * ```tsx\n * const setElement = useResizeObserver(\n * \t( resizeObserverEntries ) => console.log( resizeObserverEntries ),\n * \t{ box: 'border-box' }\n * );\n * <div ref={ setElement } />;\n *\n * // The setter can be used in other ways, for example:\n * useLayoutEffect( () => {\n * \tsetElement( document.querySelector( `data-element-id=\"${ elementId }\"` ) );\n * }, [ elementId ] );\n * ```\n *\n * @param callback The `ResizeObserver` callback - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback).\n * @param options Options passed to `ResizeObserver.observe` when called - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe#options). Changes will be ignored.\n */\nexport default function useResizeObserver< T extends Element >(\n\t/**\n\t * The `ResizeObserver` callback - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback).\n\t */\n\tcallback: ResizeObserverCallback,\n\t/**\n\t * Options passed to `ResizeObserver.observe` when called - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe#options). Changes will be ignored.\n\t */\n\toptions?: ResizeObserverOptions\n): ( element?: T | null ) => void;\n\n/**\n * **This is a legacy API and should not be used.**\n *\n * @deprecated Use the other `useResizeObserver` API instead: `const ref = useResizeObserver( ( entries ) => { ... } )`.\n *\n * Hook which allows to listen to the resize event of any target element when it changes size.\n * _Note: `useResizeObserver` will report `null` sizes until after first render.\n *\n * @example\n *\n * ```js\n * const App = () => {\n * \tconst [ resizeListener, sizes ] = useResizeObserver();\n *\n * \treturn (\n * \t\t<div>\n * \t\t\t{ resizeListener }\n * \t\t\tYour content here\n * \t\t</div>\n * \t);\n * };\n * ```\n */\nexport default function useResizeObserver(): [ ReactElement, ObservedSize ];\n\nexport default function useResizeObserver< T extends HTMLElement >(\n\tcallback?: ResizeObserverCallback,\n\toptions: ResizeObserverOptions = {}\n): ( ( element?: T | null ) => void ) | [ ReactElement, ObservedSize ] {\n\treturn callback\n\t\t? _useResizeObserver( callback, options )\n\t\t: _useLegacyResizeObserver();\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAIA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAD,sBAAA,CAAAF,OAAA;AATA;AACA;AACA;;AAEA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA,SAASI,kBAAkBA,CAC1BC,QAAgC,EAChCC,qBAA4C,GAAG,CAAC,CAAC,EAChB;EACjC,MAAMC,aAAa,GAAG,IAAAC,iBAAQ,EAAEH,QAAS,CAAC;EAE1C,MAAMI,kBAAkB,GAAG,IAAAC,eAAM,EAAa,CAAC;EAC/C,MAAMC,iBAAiB,GAAG,IAAAD,eAAM,EAAmB,CAAC;EACpD,OAAO,IAAAF,iBAAQ,EAAII,OAAkB,IAAM;IAAA,IAAAC,qBAAA;IAC1C,IAAKD,OAAO,KAAKH,kBAAkB,CAACK,OAAO,EAAG;MAC7C;IACD;IACAL,kBAAkB,CAACK,OAAO,GAAGF,OAAO;;IAEpC;IACA,CAAAC,qBAAA,GAAAF,iBAAiB,CAACG,OAAO,cAAAD,qBAAA,cAAAA,qBAAA,GAAzBF,iBAAiB,CAACG,OAAO,GAAK,IAAIC,cAAc,CAAER,aAAc,CAAC;IACjE,MAAM;MAAEO,OAAO,EAAEE;IAAe,CAAC,GAAGL,iBAAiB;;IAErD;IACA,IAAKF,kBAAkB,CAACK,OAAO,EAAG;MACjCE,cAAc,CAACC,SAAS,CAAER,kBAAkB,CAACK,OAAQ,CAAC;IACvD;;IAEA;IACA,IAAKF,OAAO,EAAG;MACdI,cAAc,CAACE,OAAO,CAAEN,OAAO,EAAEN,qBAAsB,CAAC;IACzD;EACD,CAAE,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGe,SAASa,iBAAiBA,CACxCd,QAAiC,EACjCe,OAA8B,GAAG,CAAC,CAAC,EACmC;EACtE,OAAOf,QAAQ,GACZD,kBAAkB,CAAEC,QAAQ,EAAEe,OAAQ,CAAC,GACvC,IAAAC,eAAwB,EAAC,CAAC;AAC9B","ignoreList":[]}
1
+ {"version":3,"names":["_useResizeObserver2","require","_legacy","_interopRequireDefault","useResizeObserver","callback","options","_useResizeObserver","_useLegacyResizeObserver"],"sources":["@wordpress/compose/src/hooks/use-resize-observer/index.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { useResizeObserver as _useResizeObserver } from './use-resize-observer';\nimport type { ObservedSize } from './legacy';\nimport _useLegacyResizeObserver from './legacy';\n/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\n\n/**\n * Sets up a [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/Resize_Observer_API)\n * for an HTML or SVG element.\n *\n * Pass the returned setter as a callback ref to the React element you want\n * to observe, or use it in layout effects for advanced use cases.\n *\n * @example\n *\n * ```tsx\n * const setElement = useResizeObserver(\n * \t( resizeObserverEntries ) => console.log( resizeObserverEntries ),\n * \t{ box: 'border-box' }\n * );\n * <div ref={ setElement } />;\n *\n * // The setter can be used in other ways, for example:\n * useLayoutEffect( () => {\n * \tsetElement( document.querySelector( `data-element-id=\"${ elementId }\"` ) );\n * }, [ elementId ] );\n * ```\n *\n * @param callback The `ResizeObserver` callback - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback).\n * @param options Options passed to `ResizeObserver.observe` when called - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe#options). Changes will be ignored.\n */\nexport default function useResizeObserver< T extends Element >(\n\t/**\n\t * The `ResizeObserver` callback - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback).\n\t */\n\tcallback: ResizeObserverCallback,\n\t/**\n\t * Options passed to `ResizeObserver.observe` when called - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe#options). Changes will be ignored.\n\t */\n\toptions?: ResizeObserverOptions\n): ( element?: T | null ) => void;\n\n/**\n * **This is a legacy API and should not be used.**\n *\n * @deprecated Use the other `useResizeObserver` API instead: `const ref = useResizeObserver( ( entries ) => { ... } )`.\n *\n * Hook which allows to listen to the resize event of any target element when it changes size.\n * _Note: `useResizeObserver` will report `null` sizes until after first render.\n *\n * @example\n *\n * ```js\n * const App = () => {\n * \tconst [ resizeListener, sizes ] = useResizeObserver();\n *\n * \treturn (\n * \t\t<div>\n * \t\t\t{ resizeListener }\n * \t\t\tYour content here\n * \t\t</div>\n * \t);\n * };\n * ```\n */\nexport default function useResizeObserver(): [ ReactElement, ObservedSize ];\n\nexport default function useResizeObserver< T extends HTMLElement >(\n\tcallback?: ResizeObserverCallback,\n\toptions: ResizeObserverOptions = {}\n): ( ( element?: T | null ) => void ) | [ ReactElement, ObservedSize ] {\n\treturn callback\n\t\t? _useResizeObserver( callback, options )\n\t\t: _useLegacyResizeObserver();\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AALA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGe,SAASG,iBAAiBA,CACxCC,QAAiC,EACjCC,OAA8B,GAAG,CAAC,CAAC,EACmC;EACtE,OAAOD,QAAQ,GACZ,IAAAE,qCAAkB,EAAEF,QAAQ,EAAEC,OAAQ,CAAC,GACvC,IAAAE,eAAwB,EAAC,CAAC;AAC9B","ignoreList":[]}
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.default = useLegacyResizeObserver;
8
7
  var _element = require("@wordpress/element");
9
- var _index = _interopRequireDefault(require("../index"));
8
+ var _useResizeObserver = require("../use-resize-observer");
10
9
  var _jsxRuntime = require("react/jsx-runtime");
11
10
  /**
12
11
  * External dependencies
@@ -83,7 +82,7 @@ const RESIZE_ELEMENT_STYLES = {
83
82
  function ResizeElement({
84
83
  onResize
85
84
  }) {
86
- const resizeElementRef = (0, _index.default)(entries => {
85
+ const resizeElementRef = (0, _useResizeObserver.useResizeObserver)(entries => {
87
86
  const newSize = extractSize(entries.at(-1)); // Entries are never empty.
88
87
  onResize(newSize);
89
88
  });
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_element","require","_useResizeObserver","_jsxRuntime","extractSize","entry","entrySize","contentBoxSize","contentRect","width","height","inlineSize","blockSize","map","d","Math","round","RESIZE_ELEMENT_STYLES","position","top","left","right","bottom","pointerEvents","opacity","overflow","zIndex","ResizeElement","onResize","resizeElementRef","useResizeObserver","entries","newSize","at","jsx","ref","style","sizeEquals","a","b","NULL_SIZE","useLegacyResizeObserver","size","setSize","useState","previousSizeRef","useRef","handleResize","useCallback","current","resizeElement"],"sources":["@wordpress/compose/src/hooks/use-resize-observer/legacy/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useRef, useState } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { useResizeObserver } from '../use-resize-observer';\n\nexport type ObservedSize = {\n\twidth: number | null;\n\theight: number | null;\n};\n\n// We're only using the first element of the size sequences, until future versions of the spec solidify on how\n// exactly it'll be used for fragments in multi-column scenarios:\n// From the spec:\n// > The box size properties are exposed as FrozenArray in order to support elements that have multiple fragments,\n// > which occur in multi-column scenarios. However the current definitions of content rect and border box do not\n// > mention how those boxes are affected by multi-column layout. In this spec, there will only be a single\n// > ResizeObserverSize returned in the FrozenArray, which will correspond to the dimensions of the first column.\n// > A future version of this spec will extend the returned FrozenArray to contain the per-fragment size information.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-entry-interface)\n//\n// Also, testing these new box options revealed that in both Chrome and FF everything is returned in the callback,\n// regardless of the \"box\" option.\n// The spec states the following on this:\n// > This does not have any impact on which box dimensions are returned to the defined callback when the event\n// > is fired, it solely defines which box the author wishes to observe layout changes on.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-interface)\n// I'm not exactly clear on what this means, especially when you consider a later section stating the following:\n// > This section is non-normative. An author may desire to observe more than one CSS box.\n// > In this case, author will need to use multiple ResizeObservers.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-interface)\n// Which is clearly not how current browser implementations behave, and seems to contradict the previous quote.\n// For this reason I decided to only return the requested size,\n// even though it seems we have access to results for all box types.\n// This also means that we get to keep the current api, being able to return a simple { width, height } pair,\n// regardless of box option.\nconst extractSize = ( entry: ResizeObserverEntry ): ObservedSize => {\n\tlet entrySize;\n\tif ( ! entry.contentBoxSize ) {\n\t\t// The dimensions in `contentBoxSize` and `contentRect` are equivalent according to the spec.\n\t\t// See the 6th step in the description for the RO algorithm:\n\t\t// https://drafts.csswg.org/resize-observer/#create-and-populate-resizeobserverentry-h\n\t\t// > Set this.contentRect to logical this.contentBoxSize given target and observedBox of \"content-box\".\n\t\t// In real browser implementations of course these objects differ, but the width/height values should be equivalent.\n\t\tentrySize = [ entry.contentRect.width, entry.contentRect.height ];\n\t} else if ( entry.contentBoxSize[ 0 ] ) {\n\t\tconst contentBoxSize = entry.contentBoxSize[ 0 ];\n\t\tentrySize = [ contentBoxSize.inlineSize, contentBoxSize.blockSize ];\n\t} else {\n\t\t// TS complains about this, because the RO entry type follows the spec and does not reflect Firefox's buggy\n\t\t// behaviour of returning objects instead of arrays for `borderBoxSize` and `contentBoxSize`.\n\t\tconst contentBoxSize =\n\t\t\tentry.contentBoxSize as unknown as ResizeObserverSize;\n\t\tentrySize = [ contentBoxSize.inlineSize, contentBoxSize.blockSize ];\n\t}\n\n\tconst [ width, height ] = entrySize.map( ( d ) => Math.round( d ) );\n\treturn { width, height };\n};\n\nconst RESIZE_ELEMENT_STYLES = {\n\tposition: 'absolute',\n\ttop: 0,\n\tleft: 0,\n\tright: 0,\n\tbottom: 0,\n\tpointerEvents: 'none',\n\topacity: 0,\n\toverflow: 'hidden',\n\tzIndex: -1,\n} as const;\n\ntype ResizeElementProps = {\n\tonResize: ( s: ObservedSize ) => void;\n};\n\nfunction ResizeElement( { onResize }: ResizeElementProps ) {\n\tconst resizeElementRef = useResizeObserver( ( entries ) => {\n\t\tconst newSize = extractSize( entries.at( -1 )! ); // Entries are never empty.\n\t\tonResize( newSize );\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\tref={ resizeElementRef }\n\t\t\tstyle={ RESIZE_ELEMENT_STYLES }\n\t\t\taria-hidden=\"true\"\n\t\t/>\n\t);\n}\n\nfunction sizeEquals( a: ObservedSize, b: ObservedSize ) {\n\treturn a.width === b.width && a.height === b.height;\n}\n\nconst NULL_SIZE: ObservedSize = { width: null, height: null };\n\n/**\n * Hook which allows to listen to the resize event of any target element when it changes size.\n * _Note: `useResizeObserver` will report `null` sizes until after first render.\n *\n * @example\n *\n * ```js\n * const App = () => {\n * \tconst [ resizeListener, sizes ] = useResizeObserver();\n *\n * \treturn (\n * \t\t<div>\n * \t\t\t{ resizeListener }\n * \t\t\tYour content here\n * \t\t</div>\n * \t);\n * };\n * ```\n */\nexport default function useLegacyResizeObserver(): [\n\tReactElement,\n\tObservedSize,\n] {\n\tconst [ size, setSize ] = useState( NULL_SIZE );\n\n\t// Using a ref to track the previous width / height to avoid unnecessary renders.\n\tconst previousSizeRef = useRef( NULL_SIZE );\n\n\tconst handleResize = useCallback( ( newSize: ObservedSize ) => {\n\t\tif ( ! sizeEquals( previousSizeRef.current, newSize ) ) {\n\t\t\tpreviousSizeRef.current = newSize;\n\t\t\tsetSize( newSize );\n\t\t}\n\t}, [] );\n\n\tconst resizeElement = <ResizeElement onResize={ handleResize } />;\n\treturn [ resizeElement, size ];\n}\n"],"mappings":";;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAIA,IAAAC,kBAAA,GAAAD,OAAA;AAA2D,IAAAE,WAAA,GAAAF,OAAA;AAZ3D;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,WAAW,GAAKC,KAA0B,IAAoB;EACnE,IAAIC,SAAS;EACb,IAAK,CAAED,KAAK,CAACE,cAAc,EAAG;IAC7B;IACA;IACA;IACA;IACA;IACAD,SAAS,GAAG,CAAED,KAAK,CAACG,WAAW,CAACC,KAAK,EAAEJ,KAAK,CAACG,WAAW,CAACE,MAAM,CAAE;EAClE,CAAC,MAAM,IAAKL,KAAK,CAACE,cAAc,CAAE,CAAC,CAAE,EAAG;IACvC,MAAMA,cAAc,GAAGF,KAAK,CAACE,cAAc,CAAE,CAAC,CAAE;IAChDD,SAAS,GAAG,CAAEC,cAAc,CAACI,UAAU,EAAEJ,cAAc,CAACK,SAAS,CAAE;EACpE,CAAC,MAAM;IACN;IACA;IACA,MAAML,cAAc,GACnBF,KAAK,CAACE,cAA+C;IACtDD,SAAS,GAAG,CAAEC,cAAc,CAACI,UAAU,EAAEJ,cAAc,CAACK,SAAS,CAAE;EACpE;EAEA,MAAM,CAAEH,KAAK,EAAEC,MAAM,CAAE,GAAGJ,SAAS,CAACO,GAAG,CAAIC,CAAC,IAAMC,IAAI,CAACC,KAAK,CAAEF,CAAE,CAAE,CAAC;EACnE,OAAO;IAAEL,KAAK;IAAEC;EAAO,CAAC;AACzB,CAAC;AAED,MAAMO,qBAAqB,GAAG;EAC7BC,QAAQ,EAAE,UAAU;EACpBC,GAAG,EAAE,CAAC;EACNC,IAAI,EAAE,CAAC;EACPC,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE,CAAC;EACTC,aAAa,EAAE,MAAM;EACrBC,OAAO,EAAE,CAAC;EACVC,QAAQ,EAAE,QAAQ;EAClBC,MAAM,EAAE,CAAC;AACV,CAAU;AAMV,SAASC,aAAaA,CAAE;EAAEC;AAA6B,CAAC,EAAG;EAC1D,MAAMC,gBAAgB,GAAG,IAAAC,oCAAiB,EAAIC,OAAO,IAAM;IAC1D,MAAMC,OAAO,GAAG5B,WAAW,CAAE2B,OAAO,CAACE,EAAE,CAAE,CAAC,CAAE,CAAG,CAAC,CAAC,CAAC;IAClDL,QAAQ,CAAEI,OAAQ,CAAC;EACpB,CAAE,CAAC;EAEH,oBACC,IAAA7B,WAAA,CAAA+B,GAAA;IACCC,GAAG,EAAGN,gBAAkB;IACxBO,KAAK,EAAGnB,qBAAuB;IAC/B,eAAY;EAAM,CAClB,CAAC;AAEJ;AAEA,SAASoB,UAAUA,CAAEC,CAAe,EAAEC,CAAe,EAAG;EACvD,OAAOD,CAAC,CAAC7B,KAAK,KAAK8B,CAAC,CAAC9B,KAAK,IAAI6B,CAAC,CAAC5B,MAAM,KAAK6B,CAAC,CAAC7B,MAAM;AACpD;AAEA,MAAM8B,SAAuB,GAAG;EAAE/B,KAAK,EAAE,IAAI;EAAEC,MAAM,EAAE;AAAK,CAAC;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAS+B,uBAAuBA,CAAA,EAG7C;EACD,MAAM,CAAEC,IAAI,EAAEC,OAAO,CAAE,GAAG,IAAAC,iBAAQ,EAAEJ,SAAU,CAAC;;EAE/C;EACA,MAAMK,eAAe,GAAG,IAAAC,eAAM,EAAEN,SAAU,CAAC;EAE3C,MAAMO,YAAY,GAAG,IAAAC,oBAAW,EAAIhB,OAAqB,IAAM;IAC9D,IAAK,CAAEK,UAAU,CAAEQ,eAAe,CAACI,OAAO,EAAEjB,OAAQ,CAAC,EAAG;MACvDa,eAAe,CAACI,OAAO,GAAGjB,OAAO;MACjCW,OAAO,CAAEX,OAAQ,CAAC;IACnB;EACD,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMkB,aAAa,gBAAG,IAAA/C,WAAA,CAAA+B,GAAA,EAACP,aAAa;IAACC,QAAQ,EAAGmB;EAAc,CAAE,CAAC;EACjE,OAAO,CAAEG,aAAa,EAAER,IAAI,CAAE;AAC/B","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_element","_jsxRuntime","useResizeObserver","measurements","setMeasurements","useState","onLayout","useCallback","nativeEvent","width","height","layout","prevState","Math","floor","observer","jsx","View","testID","style","StyleSheet","absoluteFill","_default","exports","default"],"sources":["@wordpress/compose/src/hooks/use-resize-observer/legacy/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, StyleSheet } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { useState, useCallback } from '@wordpress/element';\n\n/**\n * Hook which allows to listen the resize event of any target element when it changes sizes.\n *\n * @example\n *\n * ```js\n * const App = () => {\n * \tconst [ resizeListener, sizes ] = useResizeObserver();\n *\n * \treturn (\n * \t\t<View>\n * \t\t\t{ resizeListener }\n * \t\t\tYour content here\n * \t\t</View>\n * \t);\n * };\n * ```\n */\nconst useResizeObserver = () => {\n\tconst [ measurements, setMeasurements ] = useState( null );\n\n\tconst onLayout = useCallback( ( { nativeEvent } ) => {\n\t\tconst { width, height } = nativeEvent.layout;\n\t\tsetMeasurements( ( prevState ) => {\n\t\t\tif (\n\t\t\t\t! prevState ||\n\t\t\t\tprevState.width !== width ||\n\t\t\t\tprevState.height !== height\n\t\t\t) {\n\t\t\t\treturn {\n\t\t\t\t\twidth: Math.floor( width ),\n\t\t\t\t\theight: Math.floor( height ),\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn prevState;\n\t\t} );\n\t}, [] );\n\n\tconst observer = (\n\t\t<View\n\t\t\ttestID=\"resize-observer\"\n\t\t\tstyle={ StyleSheet.absoluteFill }\n\t\t\tonLayout={ onLayout }\n\t\t/>\n\t);\n\n\treturn [ observer, measurements ];\n};\n\nexport default useResizeObserver;\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAAC,QAAA,GAAAD,OAAA;AAA2D,IAAAE,WAAA,GAAAF,OAAA;AAP3D;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,MAAMG,iBAAiB,GAAGA,CAAA,KAAM;EAC/B,MAAM,CAAEC,YAAY,EAAEC,eAAe,CAAE,GAAG,IAAAC,iBAAQ,EAAE,IAAK,CAAC;EAE1D,MAAMC,QAAQ,GAAG,IAAAC,oBAAW,EAAE,CAAE;IAAEC;EAAY,CAAC,KAAM;IACpD,MAAM;MAAEC,KAAK;MAAEC;IAAO,CAAC,GAAGF,WAAW,CAACG,MAAM;IAC5CP,eAAe,CAAIQ,SAAS,IAAM;MACjC,IACC,CAAEA,SAAS,IACXA,SAAS,CAACH,KAAK,KAAKA,KAAK,IACzBG,SAAS,CAACF,MAAM,KAAKA,MAAM,EAC1B;QACD,OAAO;UACND,KAAK,EAAEI,IAAI,CAACC,KAAK,CAAEL,KAAM,CAAC;UAC1BC,MAAM,EAAEG,IAAI,CAACC,KAAK,CAAEJ,MAAO;QAC5B,CAAC;MACF;MACA,OAAOE,SAAS;IACjB,CAAE,CAAC;EACJ,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMG,QAAQ,gBACb,IAAAd,WAAA,CAAAe,GAAA,EAAClB,YAAA,CAAAmB,IAAI;IACJC,MAAM,EAAC,iBAAiB;IACxBC,KAAK,EAAGC,uBAAU,CAACC,YAAc;IACjCf,QAAQ,EAAGA;EAAU,CACrB,CACD;EAED,OAAO,CAAES,QAAQ,EAAEZ,YAAY,CAAE;AAClC,CAAC;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEatB,iBAAiB","ignoreList":[]}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useResizeObserver = useResizeObserver;
8
+ var _element = require("@wordpress/element");
9
+ var _useEvent = _interopRequireDefault(require("../use-event"));
10
+ /**
11
+ * WordPress dependencies
12
+ */
13
+
14
+ /**
15
+ * Internal dependencies
16
+ */
17
+
18
+ // This is the current implementation of `useResizeObserver`.
19
+ //
20
+ // The legacy implementation is still supported for backwards compatibility.
21
+ // This is achieved by overloading the exported function with both signatures,
22
+ // and detecting which API is being used at runtime.
23
+ function useResizeObserver(callback, resizeObserverOptions = {}) {
24
+ const callbackEvent = (0, _useEvent.default)(callback);
25
+ const observedElementRef = (0, _element.useRef)();
26
+ const resizeObserverRef = (0, _element.useRef)();
27
+ return (0, _useEvent.default)(element => {
28
+ var _resizeObserverRef$cu;
29
+ if (element === observedElementRef.current) {
30
+ return;
31
+ }
32
+
33
+ // Set up `ResizeObserver`.
34
+ (_resizeObserverRef$cu = resizeObserverRef.current) !== null && _resizeObserverRef$cu !== void 0 ? _resizeObserverRef$cu : resizeObserverRef.current = new ResizeObserver(callbackEvent);
35
+ const {
36
+ current: resizeObserver
37
+ } = resizeObserverRef;
38
+
39
+ // Unobserve previous element.
40
+ if (observedElementRef.current) {
41
+ resizeObserver.unobserve(observedElementRef.current);
42
+ }
43
+
44
+ // Observe new element.
45
+ observedElementRef.current = element;
46
+ if (element) {
47
+ resizeObserver.observe(element, resizeObserverOptions);
48
+ }
49
+ });
50
+ }
51
+ //# sourceMappingURL=use-resize-observer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_element","require","_useEvent","_interopRequireDefault","useResizeObserver","callback","resizeObserverOptions","callbackEvent","useEvent","observedElementRef","useRef","resizeObserverRef","element","_resizeObserverRef$cu","current","ResizeObserver","resizeObserver","unobserve","observe"],"sources":["@wordpress/compose/src/hooks/use-resize-observer/use-resize-observer.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport useEvent from '../use-event';\n\n// This is the current implementation of `useResizeObserver`.\n//\n// The legacy implementation is still supported for backwards compatibility.\n// This is achieved by overloading the exported function with both signatures,\n// and detecting which API is being used at runtime.\nexport function useResizeObserver< T extends HTMLElement >(\n\tcallback: ResizeObserverCallback,\n\tresizeObserverOptions: ResizeObserverOptions = {}\n): ( element?: T | null ) => void {\n\tconst callbackEvent = useEvent( callback );\n\n\tconst observedElementRef = useRef< T | null >();\n\tconst resizeObserverRef = useRef< ResizeObserver >();\n\treturn useEvent( ( element?: T | null ) => {\n\t\tif ( element === observedElementRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Set up `ResizeObserver`.\n\t\tresizeObserverRef.current ??= new ResizeObserver( callbackEvent );\n\t\tconst { current: resizeObserver } = resizeObserverRef;\n\n\t\t// Unobserve previous element.\n\t\tif ( observedElementRef.current ) {\n\t\t\tresizeObserver.unobserve( observedElementRef.current );\n\t\t}\n\n\t\t// Observe new element.\n\t\tobservedElementRef.current = element;\n\t\tif ( element ) {\n\t\t\tresizeObserver.observe( element, resizeObserverOptions );\n\t\t}\n\t} );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAIA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AAPA;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,SAASG,iBAAiBA,CAChCC,QAAgC,EAChCC,qBAA4C,GAAG,CAAC,CAAC,EAChB;EACjC,MAAMC,aAAa,GAAG,IAAAC,iBAAQ,EAAEH,QAAS,CAAC;EAE1C,MAAMI,kBAAkB,GAAG,IAAAC,eAAM,EAAa,CAAC;EAC/C,MAAMC,iBAAiB,GAAG,IAAAD,eAAM,EAAmB,CAAC;EACpD,OAAO,IAAAF,iBAAQ,EAAII,OAAkB,IAAM;IAAA,IAAAC,qBAAA;IAC1C,IAAKD,OAAO,KAAKH,kBAAkB,CAACK,OAAO,EAAG;MAC7C;IACD;;IAEA;IACA,CAAAD,qBAAA,GAAAF,iBAAiB,CAACG,OAAO,cAAAD,qBAAA,cAAAA,qBAAA,GAAzBF,iBAAiB,CAACG,OAAO,GAAK,IAAIC,cAAc,CAAER,aAAc,CAAC;IACjE,MAAM;MAAEO,OAAO,EAAEE;IAAe,CAAC,GAAGL,iBAAiB;;IAErD;IACA,IAAKF,kBAAkB,CAACK,OAAO,EAAG;MACjCE,cAAc,CAACC,SAAS,CAAER,kBAAkB,CAACK,OAAQ,CAAC;IACvD;;IAEA;IACAL,kBAAkB,CAACK,OAAO,GAAGF,OAAO;IACpC,IAAKA,OAAO,EAAG;MACdI,cAAc,CAACE,OAAO,CAAEN,OAAO,EAAEN,qBAAsB,CAAC;IACzD;EACD,CAAE,CAAC;AACJ","ignoreList":[]}
@@ -1,50 +1,12 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { useRef } from '@wordpress/element';
5
1
  /**
6
2
  * Internal dependencies
7
3
  */
8
- import useEvent from '../use-event';
9
- import _useLegacyResizeObserver from './_legacy';
4
+ import { useResizeObserver as _useResizeObserver } from './use-resize-observer';
5
+ import _useLegacyResizeObserver from './legacy';
10
6
  /**
11
7
  * External dependencies
12
8
  */
13
9
 
14
- // This is the current implementation of `useResizeObserver`.
15
- //
16
- // The legacy implementation is still supported for backwards compatibility.
17
- // This is achieved by overloading the exported function with both signatures,
18
- // and detecting which API is being used at runtime.
19
- function _useResizeObserver(callback, resizeObserverOptions = {}) {
20
- const callbackEvent = useEvent(callback);
21
- const observedElementRef = useRef();
22
- const resizeObserverRef = useRef();
23
- return useEvent(element => {
24
- var _resizeObserverRef$cu;
25
- if (element === observedElementRef.current) {
26
- return;
27
- }
28
- observedElementRef.current = element;
29
-
30
- // Set up `ResizeObserver`.
31
- (_resizeObserverRef$cu = resizeObserverRef.current) !== null && _resizeObserverRef$cu !== void 0 ? _resizeObserverRef$cu : resizeObserverRef.current = new ResizeObserver(callbackEvent);
32
- const {
33
- current: resizeObserver
34
- } = resizeObserverRef;
35
-
36
- // Unobserve previous element.
37
- if (observedElementRef.current) {
38
- resizeObserver.unobserve(observedElementRef.current);
39
- }
40
-
41
- // Observe new element.
42
- if (element) {
43
- resizeObserver.observe(element, resizeObserverOptions);
44
- }
45
- });
46
- }
47
-
48
10
  /**
49
11
  * Sets up a [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/Resize_Observer_API)
50
12
  * for an HTML or SVG element.
@@ -1 +1 @@
1
- {"version":3,"names":["useRef","useEvent","_useLegacyResizeObserver","_useResizeObserver","callback","resizeObserverOptions","callbackEvent","observedElementRef","resizeObserverRef","element","_resizeObserverRef$cu","current","ResizeObserver","resizeObserver","unobserve","observe","useResizeObserver","options"],"sources":["@wordpress/compose/src/hooks/use-resize-observer/index.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport useEvent from '../use-event';\nimport type { ObservedSize } from './_legacy';\nimport _useLegacyResizeObserver from './_legacy';\n/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\n\n// This is the current implementation of `useResizeObserver`.\n//\n// The legacy implementation is still supported for backwards compatibility.\n// This is achieved by overloading the exported function with both signatures,\n// and detecting which API is being used at runtime.\nfunction _useResizeObserver< T extends HTMLElement >(\n\tcallback: ResizeObserverCallback,\n\tresizeObserverOptions: ResizeObserverOptions = {}\n): ( element?: T | null ) => void {\n\tconst callbackEvent = useEvent( callback );\n\n\tconst observedElementRef = useRef< T | null >();\n\tconst resizeObserverRef = useRef< ResizeObserver >();\n\treturn useEvent( ( element?: T | null ) => {\n\t\tif ( element === observedElementRef.current ) {\n\t\t\treturn;\n\t\t}\n\t\tobservedElementRef.current = element;\n\n\t\t// Set up `ResizeObserver`.\n\t\tresizeObserverRef.current ??= new ResizeObserver( callbackEvent );\n\t\tconst { current: resizeObserver } = resizeObserverRef;\n\n\t\t// Unobserve previous element.\n\t\tif ( observedElementRef.current ) {\n\t\t\tresizeObserver.unobserve( observedElementRef.current );\n\t\t}\n\n\t\t// Observe new element.\n\t\tif ( element ) {\n\t\t\tresizeObserver.observe( element, resizeObserverOptions );\n\t\t}\n\t} );\n}\n\n/**\n * Sets up a [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/Resize_Observer_API)\n * for an HTML or SVG element.\n *\n * Pass the returned setter as a callback ref to the React element you want\n * to observe, or use it in layout effects for advanced use cases.\n *\n * @example\n *\n * ```tsx\n * const setElement = useResizeObserver(\n * \t( resizeObserverEntries ) => console.log( resizeObserverEntries ),\n * \t{ box: 'border-box' }\n * );\n * <div ref={ setElement } />;\n *\n * // The setter can be used in other ways, for example:\n * useLayoutEffect( () => {\n * \tsetElement( document.querySelector( `data-element-id=\"${ elementId }\"` ) );\n * }, [ elementId ] );\n * ```\n *\n * @param callback The `ResizeObserver` callback - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback).\n * @param options Options passed to `ResizeObserver.observe` when called - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe#options). Changes will be ignored.\n */\nexport default function useResizeObserver< T extends Element >(\n\t/**\n\t * The `ResizeObserver` callback - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback).\n\t */\n\tcallback: ResizeObserverCallback,\n\t/**\n\t * Options passed to `ResizeObserver.observe` when called - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe#options). Changes will be ignored.\n\t */\n\toptions?: ResizeObserverOptions\n): ( element?: T | null ) => void;\n\n/**\n * **This is a legacy API and should not be used.**\n *\n * @deprecated Use the other `useResizeObserver` API instead: `const ref = useResizeObserver( ( entries ) => { ... } )`.\n *\n * Hook which allows to listen to the resize event of any target element when it changes size.\n * _Note: `useResizeObserver` will report `null` sizes until after first render.\n *\n * @example\n *\n * ```js\n * const App = () => {\n * \tconst [ resizeListener, sizes ] = useResizeObserver();\n *\n * \treturn (\n * \t\t<div>\n * \t\t\t{ resizeListener }\n * \t\t\tYour content here\n * \t\t</div>\n * \t);\n * };\n * ```\n */\nexport default function useResizeObserver(): [ ReactElement, ObservedSize ];\n\nexport default function useResizeObserver< T extends HTMLElement >(\n\tcallback?: ResizeObserverCallback,\n\toptions: ResizeObserverOptions = {}\n): ( ( element?: T | null ) => void ) | [ ReactElement, ObservedSize ] {\n\treturn callback\n\t\t? _useResizeObserver( callback, options )\n\t\t: _useLegacyResizeObserver();\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,QAAQ,oBAAoB;AAC3C;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,cAAc;AAEnC,OAAOC,wBAAwB,MAAM,WAAW;AAChD;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA,SAASC,kBAAkBA,CAC1BC,QAAgC,EAChCC,qBAA4C,GAAG,CAAC,CAAC,EAChB;EACjC,MAAMC,aAAa,GAAGL,QAAQ,CAAEG,QAAS,CAAC;EAE1C,MAAMG,kBAAkB,GAAGP,MAAM,CAAa,CAAC;EAC/C,MAAMQ,iBAAiB,GAAGR,MAAM,CAAmB,CAAC;EACpD,OAAOC,QAAQ,CAAIQ,OAAkB,IAAM;IAAA,IAAAC,qBAAA;IAC1C,IAAKD,OAAO,KAAKF,kBAAkB,CAACI,OAAO,EAAG;MAC7C;IACD;IACAJ,kBAAkB,CAACI,OAAO,GAAGF,OAAO;;IAEpC;IACA,CAAAC,qBAAA,GAAAF,iBAAiB,CAACG,OAAO,cAAAD,qBAAA,cAAAA,qBAAA,GAAzBF,iBAAiB,CAACG,OAAO,GAAK,IAAIC,cAAc,CAAEN,aAAc,CAAC;IACjE,MAAM;MAAEK,OAAO,EAAEE;IAAe,CAAC,GAAGL,iBAAiB;;IAErD;IACA,IAAKD,kBAAkB,CAACI,OAAO,EAAG;MACjCE,cAAc,CAACC,SAAS,CAAEP,kBAAkB,CAACI,OAAQ,CAAC;IACvD;;IAEA;IACA,IAAKF,OAAO,EAAG;MACdI,cAAc,CAACE,OAAO,CAAEN,OAAO,EAAEJ,qBAAsB,CAAC;IACzD;EACD,CAAE,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,eAAe,SAASW,iBAAiBA,CACxCZ,QAAiC,EACjCa,OAA8B,GAAG,CAAC,CAAC,EACmC;EACtE,OAAOb,QAAQ,GACZD,kBAAkB,CAAEC,QAAQ,EAAEa,OAAQ,CAAC,GACvCf,wBAAwB,CAAC,CAAC;AAC9B","ignoreList":[]}
1
+ {"version":3,"names":["useResizeObserver","_useResizeObserver","_useLegacyResizeObserver","callback","options"],"sources":["@wordpress/compose/src/hooks/use-resize-observer/index.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { useResizeObserver as _useResizeObserver } from './use-resize-observer';\nimport type { ObservedSize } from './legacy';\nimport _useLegacyResizeObserver from './legacy';\n/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\n\n/**\n * Sets up a [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/Resize_Observer_API)\n * for an HTML or SVG element.\n *\n * Pass the returned setter as a callback ref to the React element you want\n * to observe, or use it in layout effects for advanced use cases.\n *\n * @example\n *\n * ```tsx\n * const setElement = useResizeObserver(\n * \t( resizeObserverEntries ) => console.log( resizeObserverEntries ),\n * \t{ box: 'border-box' }\n * );\n * <div ref={ setElement } />;\n *\n * // The setter can be used in other ways, for example:\n * useLayoutEffect( () => {\n * \tsetElement( document.querySelector( `data-element-id=\"${ elementId }\"` ) );\n * }, [ elementId ] );\n * ```\n *\n * @param callback The `ResizeObserver` callback - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback).\n * @param options Options passed to `ResizeObserver.observe` when called - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe#options). Changes will be ignored.\n */\nexport default function useResizeObserver< T extends Element >(\n\t/**\n\t * The `ResizeObserver` callback - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback).\n\t */\n\tcallback: ResizeObserverCallback,\n\t/**\n\t * Options passed to `ResizeObserver.observe` when called - [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe#options). Changes will be ignored.\n\t */\n\toptions?: ResizeObserverOptions\n): ( element?: T | null ) => void;\n\n/**\n * **This is a legacy API and should not be used.**\n *\n * @deprecated Use the other `useResizeObserver` API instead: `const ref = useResizeObserver( ( entries ) => { ... } )`.\n *\n * Hook which allows to listen to the resize event of any target element when it changes size.\n * _Note: `useResizeObserver` will report `null` sizes until after first render.\n *\n * @example\n *\n * ```js\n * const App = () => {\n * \tconst [ resizeListener, sizes ] = useResizeObserver();\n *\n * \treturn (\n * \t\t<div>\n * \t\t\t{ resizeListener }\n * \t\t\tYour content here\n * \t\t</div>\n * \t);\n * };\n * ```\n */\nexport default function useResizeObserver(): [ ReactElement, ObservedSize ];\n\nexport default function useResizeObserver< T extends HTMLElement >(\n\tcallback?: ResizeObserverCallback,\n\toptions: ResizeObserverOptions = {}\n): ( ( element?: T | null ) => void ) | [ ReactElement, ObservedSize ] {\n\treturn callback\n\t\t? _useResizeObserver( callback, options )\n\t\t: _useLegacyResizeObserver();\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,iBAAiB,IAAIC,kBAAkB,QAAQ,uBAAuB;AAE/E,OAAOC,wBAAwB,MAAM,UAAU;AAC/C;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,eAAe,SAASF,iBAAiBA,CACxCG,QAAiC,EACjCC,OAA8B,GAAG,CAAC,CAAC,EACmC;EACtE,OAAOD,QAAQ,GACZF,kBAAkB,CAAEE,QAAQ,EAAEC,OAAQ,CAAC,GACvCF,wBAAwB,CAAC,CAAC;AAC9B","ignoreList":[]}
@@ -9,7 +9,7 @@ import { useCallback, useRef, useState } from '@wordpress/element';
9
9
  /**
10
10
  * Internal dependencies
11
11
  */
12
- import useResizeObserver from '../index';
12
+ import { useResizeObserver } from '../use-resize-observer';
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  // We're only using the first element of the size sequences, until future versions of the spec solidify on how
15
15
  // exactly it'll be used for fragments in multi-column scenarios:
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useCallback","useRef","useState","useResizeObserver","jsx","_jsx","extractSize","entry","entrySize","contentBoxSize","contentRect","width","height","inlineSize","blockSize","map","d","Math","round","RESIZE_ELEMENT_STYLES","position","top","left","right","bottom","pointerEvents","opacity","overflow","zIndex","ResizeElement","onResize","resizeElementRef","entries","newSize","at","ref","style","sizeEquals","a","b","NULL_SIZE","useLegacyResizeObserver","size","setSize","previousSizeRef","handleResize","current","resizeElement"],"sources":["@wordpress/compose/src/hooks/use-resize-observer/legacy/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useRef, useState } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { useResizeObserver } from '../use-resize-observer';\n\nexport type ObservedSize = {\n\twidth: number | null;\n\theight: number | null;\n};\n\n// We're only using the first element of the size sequences, until future versions of the spec solidify on how\n// exactly it'll be used for fragments in multi-column scenarios:\n// From the spec:\n// > The box size properties are exposed as FrozenArray in order to support elements that have multiple fragments,\n// > which occur in multi-column scenarios. However the current definitions of content rect and border box do not\n// > mention how those boxes are affected by multi-column layout. In this spec, there will only be a single\n// > ResizeObserverSize returned in the FrozenArray, which will correspond to the dimensions of the first column.\n// > A future version of this spec will extend the returned FrozenArray to contain the per-fragment size information.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-entry-interface)\n//\n// Also, testing these new box options revealed that in both Chrome and FF everything is returned in the callback,\n// regardless of the \"box\" option.\n// The spec states the following on this:\n// > This does not have any impact on which box dimensions are returned to the defined callback when the event\n// > is fired, it solely defines which box the author wishes to observe layout changes on.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-interface)\n// I'm not exactly clear on what this means, especially when you consider a later section stating the following:\n// > This section is non-normative. An author may desire to observe more than one CSS box.\n// > In this case, author will need to use multiple ResizeObservers.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-interface)\n// Which is clearly not how current browser implementations behave, and seems to contradict the previous quote.\n// For this reason I decided to only return the requested size,\n// even though it seems we have access to results for all box types.\n// This also means that we get to keep the current api, being able to return a simple { width, height } pair,\n// regardless of box option.\nconst extractSize = ( entry: ResizeObserverEntry ): ObservedSize => {\n\tlet entrySize;\n\tif ( ! entry.contentBoxSize ) {\n\t\t// The dimensions in `contentBoxSize` and `contentRect` are equivalent according to the spec.\n\t\t// See the 6th step in the description for the RO algorithm:\n\t\t// https://drafts.csswg.org/resize-observer/#create-and-populate-resizeobserverentry-h\n\t\t// > Set this.contentRect to logical this.contentBoxSize given target and observedBox of \"content-box\".\n\t\t// In real browser implementations of course these objects differ, but the width/height values should be equivalent.\n\t\tentrySize = [ entry.contentRect.width, entry.contentRect.height ];\n\t} else if ( entry.contentBoxSize[ 0 ] ) {\n\t\tconst contentBoxSize = entry.contentBoxSize[ 0 ];\n\t\tentrySize = [ contentBoxSize.inlineSize, contentBoxSize.blockSize ];\n\t} else {\n\t\t// TS complains about this, because the RO entry type follows the spec and does not reflect Firefox's buggy\n\t\t// behaviour of returning objects instead of arrays for `borderBoxSize` and `contentBoxSize`.\n\t\tconst contentBoxSize =\n\t\t\tentry.contentBoxSize as unknown as ResizeObserverSize;\n\t\tentrySize = [ contentBoxSize.inlineSize, contentBoxSize.blockSize ];\n\t}\n\n\tconst [ width, height ] = entrySize.map( ( d ) => Math.round( d ) );\n\treturn { width, height };\n};\n\nconst RESIZE_ELEMENT_STYLES = {\n\tposition: 'absolute',\n\ttop: 0,\n\tleft: 0,\n\tright: 0,\n\tbottom: 0,\n\tpointerEvents: 'none',\n\topacity: 0,\n\toverflow: 'hidden',\n\tzIndex: -1,\n} as const;\n\ntype ResizeElementProps = {\n\tonResize: ( s: ObservedSize ) => void;\n};\n\nfunction ResizeElement( { onResize }: ResizeElementProps ) {\n\tconst resizeElementRef = useResizeObserver( ( entries ) => {\n\t\tconst newSize = extractSize( entries.at( -1 )! ); // Entries are never empty.\n\t\tonResize( newSize );\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\tref={ resizeElementRef }\n\t\t\tstyle={ RESIZE_ELEMENT_STYLES }\n\t\t\taria-hidden=\"true\"\n\t\t/>\n\t);\n}\n\nfunction sizeEquals( a: ObservedSize, b: ObservedSize ) {\n\treturn a.width === b.width && a.height === b.height;\n}\n\nconst NULL_SIZE: ObservedSize = { width: null, height: null };\n\n/**\n * Hook which allows to listen to the resize event of any target element when it changes size.\n * _Note: `useResizeObserver` will report `null` sizes until after first render.\n *\n * @example\n *\n * ```js\n * const App = () => {\n * \tconst [ resizeListener, sizes ] = useResizeObserver();\n *\n * \treturn (\n * \t\t<div>\n * \t\t\t{ resizeListener }\n * \t\t\tYour content here\n * \t\t</div>\n * \t);\n * };\n * ```\n */\nexport default function useLegacyResizeObserver(): [\n\tReactElement,\n\tObservedSize,\n] {\n\tconst [ size, setSize ] = useState( NULL_SIZE );\n\n\t// Using a ref to track the previous width / height to avoid unnecessary renders.\n\tconst previousSizeRef = useRef( NULL_SIZE );\n\n\tconst handleResize = useCallback( ( newSize: ObservedSize ) => {\n\t\tif ( ! sizeEquals( previousSizeRef.current, newSize ) ) {\n\t\t\tpreviousSizeRef.current = newSize;\n\t\t\tsetSize( newSize );\n\t\t}\n\t}, [] );\n\n\tconst resizeElement = <ResizeElement onResize={ handleResize } />;\n\treturn [ resizeElement, size ];\n}\n"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"names":["View","StyleSheet","useState","useCallback","jsx","_jsx","useResizeObserver","measurements","setMeasurements","onLayout","nativeEvent","width","height","layout","prevState","Math","floor","observer","testID","style","absoluteFill"],"sources":["@wordpress/compose/src/hooks/use-resize-observer/legacy/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, StyleSheet } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { useState, useCallback } from '@wordpress/element';\n\n/**\n * Hook which allows to listen the resize event of any target element when it changes sizes.\n *\n * @example\n *\n * ```js\n * const App = () => {\n * \tconst [ resizeListener, sizes ] = useResizeObserver();\n *\n * \treturn (\n * \t\t<View>\n * \t\t\t{ resizeListener }\n * \t\t\tYour content here\n * \t\t</View>\n * \t);\n * };\n * ```\n */\nconst useResizeObserver = () => {\n\tconst [ measurements, setMeasurements ] = useState( null );\n\n\tconst onLayout = useCallback( ( { nativeEvent } ) => {\n\t\tconst { width, height } = nativeEvent.layout;\n\t\tsetMeasurements( ( prevState ) => {\n\t\t\tif (\n\t\t\t\t! prevState ||\n\t\t\t\tprevState.width !== width ||\n\t\t\t\tprevState.height !== height\n\t\t\t) {\n\t\t\t\treturn {\n\t\t\t\t\twidth: Math.floor( width ),\n\t\t\t\t\theight: Math.floor( height ),\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn prevState;\n\t\t} );\n\t}, [] );\n\n\tconst observer = (\n\t\t<View\n\t\t\ttestID=\"resize-observer\"\n\t\t\tstyle={ StyleSheet.absoluteFill }\n\t\t\tonLayout={ onLayout }\n\t\t/>\n\t);\n\n\treturn [ observer, measurements ];\n};\n\nexport default useResizeObserver;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,WAAW,QAAQ,oBAAoB;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjBA,SAAAC,GAAA,IAAAC,IAAA;AAkBA,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;EAC/B,MAAM,CAAEC,YAAY,EAAEC,eAAe,CAAE,GAAGN,QAAQ,CAAE,IAAK,CAAC;EAE1D,MAAMO,QAAQ,GAAGN,WAAW,CAAE,CAAE;IAAEO;EAAY,CAAC,KAAM;IACpD,MAAM;MAAEC,KAAK;MAAEC;IAAO,CAAC,GAAGF,WAAW,CAACG,MAAM;IAC5CL,eAAe,CAAIM,SAAS,IAAM;MACjC,IACC,CAAEA,SAAS,IACXA,SAAS,CAACH,KAAK,KAAKA,KAAK,IACzBG,SAAS,CAACF,MAAM,KAAKA,MAAM,EAC1B;QACD,OAAO;UACND,KAAK,EAAEI,IAAI,CAACC,KAAK,CAAEL,KAAM,CAAC;UAC1BC,MAAM,EAAEG,IAAI,CAACC,KAAK,CAAEJ,MAAO;QAC5B,CAAC;MACF;MACA,OAAOE,SAAS;IACjB,CAAE,CAAC;EACJ,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMG,QAAQ,gBACbZ,IAAA,CAACL,IAAI;IACJkB,MAAM,EAAC,iBAAiB;IACxBC,KAAK,EAAGlB,UAAU,CAACmB,YAAc;IACjCX,QAAQ,EAAGA;EAAU,CACrB,CACD;EAED,OAAO,CAAEQ,QAAQ,EAAEV,YAAY,CAAE;AAClC,CAAC;AAED,eAAeD,iBAAiB","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useRef } from '@wordpress/element';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import useEvent from '../use-event';
9
+
10
+ // This is the current implementation of `useResizeObserver`.
11
+ //
12
+ // The legacy implementation is still supported for backwards compatibility.
13
+ // This is achieved by overloading the exported function with both signatures,
14
+ // and detecting which API is being used at runtime.
15
+ export function useResizeObserver(callback, resizeObserverOptions = {}) {
16
+ const callbackEvent = useEvent(callback);
17
+ const observedElementRef = useRef();
18
+ const resizeObserverRef = useRef();
19
+ return useEvent(element => {
20
+ var _resizeObserverRef$cu;
21
+ if (element === observedElementRef.current) {
22
+ return;
23
+ }
24
+
25
+ // Set up `ResizeObserver`.
26
+ (_resizeObserverRef$cu = resizeObserverRef.current) !== null && _resizeObserverRef$cu !== void 0 ? _resizeObserverRef$cu : resizeObserverRef.current = new ResizeObserver(callbackEvent);
27
+ const {
28
+ current: resizeObserver
29
+ } = resizeObserverRef;
30
+
31
+ // Unobserve previous element.
32
+ if (observedElementRef.current) {
33
+ resizeObserver.unobserve(observedElementRef.current);
34
+ }
35
+
36
+ // Observe new element.
37
+ observedElementRef.current = element;
38
+ if (element) {
39
+ resizeObserver.observe(element, resizeObserverOptions);
40
+ }
41
+ });
42
+ }
43
+ //# sourceMappingURL=use-resize-observer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useRef","useEvent","useResizeObserver","callback","resizeObserverOptions","callbackEvent","observedElementRef","resizeObserverRef","element","_resizeObserverRef$cu","current","ResizeObserver","resizeObserver","unobserve","observe"],"sources":["@wordpress/compose/src/hooks/use-resize-observer/use-resize-observer.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport useEvent from '../use-event';\n\n// This is the current implementation of `useResizeObserver`.\n//\n// The legacy implementation is still supported for backwards compatibility.\n// This is achieved by overloading the exported function with both signatures,\n// and detecting which API is being used at runtime.\nexport function useResizeObserver< T extends HTMLElement >(\n\tcallback: ResizeObserverCallback,\n\tresizeObserverOptions: ResizeObserverOptions = {}\n): ( element?: T | null ) => void {\n\tconst callbackEvent = useEvent( callback );\n\n\tconst observedElementRef = useRef< T | null >();\n\tconst resizeObserverRef = useRef< ResizeObserver >();\n\treturn useEvent( ( element?: T | null ) => {\n\t\tif ( element === observedElementRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Set up `ResizeObserver`.\n\t\tresizeObserverRef.current ??= new ResizeObserver( callbackEvent );\n\t\tconst { current: resizeObserver } = resizeObserverRef;\n\n\t\t// Unobserve previous element.\n\t\tif ( observedElementRef.current ) {\n\t\t\tresizeObserver.unobserve( observedElementRef.current );\n\t\t}\n\n\t\t// Observe new element.\n\t\tobservedElementRef.current = element;\n\t\tif ( element ) {\n\t\t\tresizeObserver.observe( element, resizeObserverOptions );\n\t\t}\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,QAAQ,oBAAoB;AAC3C;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,cAAc;;AAEnC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAChCC,QAAgC,EAChCC,qBAA4C,GAAG,CAAC,CAAC,EAChB;EACjC,MAAMC,aAAa,GAAGJ,QAAQ,CAAEE,QAAS,CAAC;EAE1C,MAAMG,kBAAkB,GAAGN,MAAM,CAAa,CAAC;EAC/C,MAAMO,iBAAiB,GAAGP,MAAM,CAAmB,CAAC;EACpD,OAAOC,QAAQ,CAAIO,OAAkB,IAAM;IAAA,IAAAC,qBAAA;IAC1C,IAAKD,OAAO,KAAKF,kBAAkB,CAACI,OAAO,EAAG;MAC7C;IACD;;IAEA;IACA,CAAAD,qBAAA,GAAAF,iBAAiB,CAACG,OAAO,cAAAD,qBAAA,cAAAA,qBAAA,GAAzBF,iBAAiB,CAACG,OAAO,GAAK,IAAIC,cAAc,CAAEN,aAAc,CAAC;IACjE,MAAM;MAAEK,OAAO,EAAEE;IAAe,CAAC,GAAGL,iBAAiB;;IAErD;IACA,IAAKD,kBAAkB,CAACI,OAAO,EAAG;MACjCE,cAAc,CAACC,SAAS,CAAEP,kBAAkB,CAACI,OAAQ,CAAC;IACvD;;IAEA;IACAJ,kBAAkB,CAACI,OAAO,GAAGF,OAAO;IACpC,IAAKA,OAAO,EAAG;MACdI,cAAc,CAACE,OAAO,CAAEN,OAAO,EAAEJ,qBAAsB,CAAC;IACzD;EACD,CAAE,CAAC;AACJ","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import type { ObservedSize } from './_legacy';
1
+ import type { ObservedSize } from './legacy';
2
2
  /**
3
3
  * External dependencies
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-resize-observer/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAqC1C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAE,CAAC,SAAS,OAAO;AAC3D;;GAEG;AACH,QAAQ,EAAE,sBAAsB;AAChC;;GAEG;AACH,OAAO,CAAC,EAAE,qBAAqB,GAC7B,CAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,KAAM,IAAI,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,IAAI,CAAE,YAAY,EAAE,YAAY,CAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-resize-observer/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAE,CAAC,SAAS,OAAO;AAC3D;;GAEG;AACH,QAAQ,EAAE,sBAAsB;AAChC;;GAEG;AACH,OAAO,CAAC,EAAE,qBAAqB,GAC7B,CAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,KAAM,IAAI,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,IAAI,CAAE,YAAY,EAAE,YAAY,CAAE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-resize-observer/legacy/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAW1C,MAAM,MAAM,YAAY,GAAG;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,CAAC;AAwFF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,IAAI;IAClD,YAAY;IACZ,YAAY;CACZ,CAeA"}
@@ -0,0 +1,2 @@
1
+ export declare function useResizeObserver<T extends HTMLElement>(callback: ResizeObserverCallback, resizeObserverOptions?: ResizeObserverOptions): (element?: T | null) => void;
2
+ //# sourceMappingURL=use-resize-observer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-resize-observer.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-resize-observer/use-resize-observer.ts"],"names":[],"mappings":"AAcA,wBAAgB,iBAAiB,CAAE,CAAC,SAAS,WAAW,EACvD,QAAQ,EAAE,sBAAsB,EAChC,qBAAqB,GAAE,qBAA0B,GAC/C,CAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,KAAM,IAAI,CAyBhC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/compose",
3
- "version": "7.8.1",
3
+ "version": "7.8.2",
4
4
  "description": "WordPress higher-order components (HOCs).",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -50,5 +50,5 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "cf707c1f25a2716e310cc8f9afcc8554405c79ac"
53
+ "gitHead": "51204ac9382d0551d8fdebd3c8d4623dabfa9f3c"
54
54
  }
@@ -1,53 +1,14 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { useRef } from '@wordpress/element';
5
1
  /**
6
2
  * Internal dependencies
7
3
  */
8
- import useEvent from '../use-event';
9
- import type { ObservedSize } from './_legacy';
10
- import _useLegacyResizeObserver from './_legacy';
4
+ import { useResizeObserver as _useResizeObserver } from './use-resize-observer';
5
+ import type { ObservedSize } from './legacy';
6
+ import _useLegacyResizeObserver from './legacy';
11
7
  /**
12
8
  * External dependencies
13
9
  */
14
10
  import type { ReactElement } from 'react';
15
11
 
16
- // This is the current implementation of `useResizeObserver`.
17
- //
18
- // The legacy implementation is still supported for backwards compatibility.
19
- // This is achieved by overloading the exported function with both signatures,
20
- // and detecting which API is being used at runtime.
21
- function _useResizeObserver< T extends HTMLElement >(
22
- callback: ResizeObserverCallback,
23
- resizeObserverOptions: ResizeObserverOptions = {}
24
- ): ( element?: T | null ) => void {
25
- const callbackEvent = useEvent( callback );
26
-
27
- const observedElementRef = useRef< T | null >();
28
- const resizeObserverRef = useRef< ResizeObserver >();
29
- return useEvent( ( element?: T | null ) => {
30
- if ( element === observedElementRef.current ) {
31
- return;
32
- }
33
- observedElementRef.current = element;
34
-
35
- // Set up `ResizeObserver`.
36
- resizeObserverRef.current ??= new ResizeObserver( callbackEvent );
37
- const { current: resizeObserver } = resizeObserverRef;
38
-
39
- // Unobserve previous element.
40
- if ( observedElementRef.current ) {
41
- resizeObserver.unobserve( observedElementRef.current );
42
- }
43
-
44
- // Observe new element.
45
- if ( element ) {
46
- resizeObserver.observe( element, resizeObserverOptions );
47
- }
48
- } );
49
- }
50
-
51
12
  /**
52
13
  * Sets up a [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/Resize_Observer_API)
53
14
  * for an HTML or SVG element.
@@ -10,7 +10,7 @@ import { useCallback, useRef, useState } from '@wordpress/element';
10
10
  /**
11
11
  * Internal dependencies
12
12
  */
13
- import useResizeObserver from '../index';
13
+ import { useResizeObserver } from '../use-resize-observer';
14
14
 
15
15
  export type ObservedSize = {
16
16
  width: number | null;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useRef } from '@wordpress/element';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import useEvent from '../use-event';
9
+
10
+ // This is the current implementation of `useResizeObserver`.
11
+ //
12
+ // The legacy implementation is still supported for backwards compatibility.
13
+ // This is achieved by overloading the exported function with both signatures,
14
+ // and detecting which API is being used at runtime.
15
+ export function useResizeObserver< T extends HTMLElement >(
16
+ callback: ResizeObserverCallback,
17
+ resizeObserverOptions: ResizeObserverOptions = {}
18
+ ): ( element?: T | null ) => void {
19
+ const callbackEvent = useEvent( callback );
20
+
21
+ const observedElementRef = useRef< T | null >();
22
+ const resizeObserverRef = useRef< ResizeObserver >();
23
+ return useEvent( ( element?: T | null ) => {
24
+ if ( element === observedElementRef.current ) {
25
+ return;
26
+ }
27
+
28
+ // Set up `ResizeObserver`.
29
+ resizeObserverRef.current ??= new ResizeObserver( callbackEvent );
30
+ const { current: resizeObserver } = resizeObserverRef;
31
+
32
+ // Unobserve previous element.
33
+ if ( observedElementRef.current ) {
34
+ resizeObserver.unobserve( observedElementRef.current );
35
+ }
36
+
37
+ // Observe new element.
38
+ observedElementRef.current = element;
39
+ if ( element ) {
40
+ resizeObserver.observe( element, resizeObserverOptions );
41
+ }
42
+ } );
43
+ }
@@ -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/_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":"7992ad9b0dfc87b890ad2b098d88c1bac24397a9c24ae140f369355b4e2c6793","signature":"04bca515d6a12b2764e0bd38ea5f374dce3ff5dcccfc14be78acdb67a4ecc3a5"},{"version":"4d866b2724c60de154814d3cc6f701019b91474792a58a452b028c0172610854","signature":"a909cafb121454f5c5cc4f85f488b4a20c56c5326f68eaa5b4daff33d9653f2f"},"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,184],186,187,[189,196]],"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,185],[89,156,157],[89,109,116,159],[89,109,157,159],[91,109,188],[109,189],[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,109,184],[89,109,170,183],[109,180],[91,92,109,188],[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,184,186,187,189,190,191,192,193,194,195],[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],[186,19],[158,20],[160,21],[161,22],[189,23],[190,24],[168,25],[169,26],[172,27],[192,28],[170,29],[194,30],[164,31],[166,29],[165,32],[193,33],[119,29],[171,29],[175,34],[176,29],[167,32],[195,35],[177,29],[178,36],[157,32],[183,37],[184,38],[181,39],[191,40],[182,41],[187,42],[196,43],[90,44],[92,45],[116,46],[151,47],[147,48],[156,49],[100,2],[109,50],[108,2],[104,51],[101,2],[107,2],[99,52],[97,53],[163,54],[180,55]],"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":"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 +0,0 @@
1
- {"version":3,"names":["_element","require","_index","_interopRequireDefault","_jsxRuntime","extractSize","entry","entrySize","contentBoxSize","contentRect","width","height","inlineSize","blockSize","map","d","Math","round","RESIZE_ELEMENT_STYLES","position","top","left","right","bottom","pointerEvents","opacity","overflow","zIndex","ResizeElement","onResize","resizeElementRef","useResizeObserver","entries","newSize","at","jsx","ref","style","sizeEquals","a","b","NULL_SIZE","useLegacyResizeObserver","size","setSize","useState","previousSizeRef","useRef","handleResize","useCallback","current","resizeElement"],"sources":["@wordpress/compose/src/hooks/use-resize-observer/_legacy/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useRef, useState } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport useResizeObserver from '../index';\n\nexport type ObservedSize = {\n\twidth: number | null;\n\theight: number | null;\n};\n\n// We're only using the first element of the size sequences, until future versions of the spec solidify on how\n// exactly it'll be used for fragments in multi-column scenarios:\n// From the spec:\n// > The box size properties are exposed as FrozenArray in order to support elements that have multiple fragments,\n// > which occur in multi-column scenarios. However the current definitions of content rect and border box do not\n// > mention how those boxes are affected by multi-column layout. In this spec, there will only be a single\n// > ResizeObserverSize returned in the FrozenArray, which will correspond to the dimensions of the first column.\n// > A future version of this spec will extend the returned FrozenArray to contain the per-fragment size information.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-entry-interface)\n//\n// Also, testing these new box options revealed that in both Chrome and FF everything is returned in the callback,\n// regardless of the \"box\" option.\n// The spec states the following on this:\n// > This does not have any impact on which box dimensions are returned to the defined callback when the event\n// > is fired, it solely defines which box the author wishes to observe layout changes on.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-interface)\n// I'm not exactly clear on what this means, especially when you consider a later section stating the following:\n// > This section is non-normative. An author may desire to observe more than one CSS box.\n// > In this case, author will need to use multiple ResizeObservers.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-interface)\n// Which is clearly not how current browser implementations behave, and seems to contradict the previous quote.\n// For this reason I decided to only return the requested size,\n// even though it seems we have access to results for all box types.\n// This also means that we get to keep the current api, being able to return a simple { width, height } pair,\n// regardless of box option.\nconst extractSize = ( entry: ResizeObserverEntry ): ObservedSize => {\n\tlet entrySize;\n\tif ( ! entry.contentBoxSize ) {\n\t\t// The dimensions in `contentBoxSize` and `contentRect` are equivalent according to the spec.\n\t\t// See the 6th step in the description for the RO algorithm:\n\t\t// https://drafts.csswg.org/resize-observer/#create-and-populate-resizeobserverentry-h\n\t\t// > Set this.contentRect to logical this.contentBoxSize given target and observedBox of \"content-box\".\n\t\t// In real browser implementations of course these objects differ, but the width/height values should be equivalent.\n\t\tentrySize = [ entry.contentRect.width, entry.contentRect.height ];\n\t} else if ( entry.contentBoxSize[ 0 ] ) {\n\t\tconst contentBoxSize = entry.contentBoxSize[ 0 ];\n\t\tentrySize = [ contentBoxSize.inlineSize, contentBoxSize.blockSize ];\n\t} else {\n\t\t// TS complains about this, because the RO entry type follows the spec and does not reflect Firefox's buggy\n\t\t// behaviour of returning objects instead of arrays for `borderBoxSize` and `contentBoxSize`.\n\t\tconst contentBoxSize =\n\t\t\tentry.contentBoxSize as unknown as ResizeObserverSize;\n\t\tentrySize = [ contentBoxSize.inlineSize, contentBoxSize.blockSize ];\n\t}\n\n\tconst [ width, height ] = entrySize.map( ( d ) => Math.round( d ) );\n\treturn { width, height };\n};\n\nconst RESIZE_ELEMENT_STYLES = {\n\tposition: 'absolute',\n\ttop: 0,\n\tleft: 0,\n\tright: 0,\n\tbottom: 0,\n\tpointerEvents: 'none',\n\topacity: 0,\n\toverflow: 'hidden',\n\tzIndex: -1,\n} as const;\n\ntype ResizeElementProps = {\n\tonResize: ( s: ObservedSize ) => void;\n};\n\nfunction ResizeElement( { onResize }: ResizeElementProps ) {\n\tconst resizeElementRef = useResizeObserver( ( entries ) => {\n\t\tconst newSize = extractSize( entries.at( -1 )! ); // Entries are never empty.\n\t\tonResize( newSize );\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\tref={ resizeElementRef }\n\t\t\tstyle={ RESIZE_ELEMENT_STYLES }\n\t\t\taria-hidden=\"true\"\n\t\t/>\n\t);\n}\n\nfunction sizeEquals( a: ObservedSize, b: ObservedSize ) {\n\treturn a.width === b.width && a.height === b.height;\n}\n\nconst NULL_SIZE: ObservedSize = { width: null, height: null };\n\n/**\n * Hook which allows to listen to the resize event of any target element when it changes size.\n * _Note: `useResizeObserver` will report `null` sizes until after first render.\n *\n * @example\n *\n * ```js\n * const App = () => {\n * \tconst [ resizeListener, sizes ] = useResizeObserver();\n *\n * \treturn (\n * \t\t<div>\n * \t\t\t{ resizeListener }\n * \t\t\tYour content here\n * \t\t</div>\n * \t);\n * };\n * ```\n */\nexport default function useLegacyResizeObserver(): [\n\tReactElement,\n\tObservedSize,\n] {\n\tconst [ size, setSize ] = useState( NULL_SIZE );\n\n\t// Using a ref to track the previous width / height to avoid unnecessary renders.\n\tconst previousSizeRef = useRef( NULL_SIZE );\n\n\tconst handleResize = useCallback( ( newSize: ObservedSize ) => {\n\t\tif ( ! sizeEquals( previousSizeRef.current, newSize ) ) {\n\t\t\tpreviousSizeRef.current = newSize;\n\t\t\tsetSize( newSize );\n\t\t}\n\t}, [] );\n\n\tconst resizeElement = <ResizeElement onResize={ handleResize } />;\n\treturn [ resizeElement, size ];\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_element","_jsxRuntime","useResizeObserver","measurements","setMeasurements","useState","onLayout","useCallback","nativeEvent","width","height","layout","prevState","Math","floor","observer","jsx","View","testID","style","StyleSheet","absoluteFill","_default","exports","default"],"sources":["@wordpress/compose/src/hooks/use-resize-observer/_legacy/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, StyleSheet } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { useState, useCallback } from '@wordpress/element';\n\n/**\n * Hook which allows to listen the resize event of any target element when it changes sizes.\n *\n * @example\n *\n * ```js\n * const App = () => {\n * \tconst [ resizeListener, sizes ] = useResizeObserver();\n *\n * \treturn (\n * \t\t<View>\n * \t\t\t{ resizeListener }\n * \t\t\tYour content here\n * \t\t</View>\n * \t);\n * };\n * ```\n */\nconst useResizeObserver = () => {\n\tconst [ measurements, setMeasurements ] = useState( null );\n\n\tconst onLayout = useCallback( ( { nativeEvent } ) => {\n\t\tconst { width, height } = nativeEvent.layout;\n\t\tsetMeasurements( ( prevState ) => {\n\t\t\tif (\n\t\t\t\t! prevState ||\n\t\t\t\tprevState.width !== width ||\n\t\t\t\tprevState.height !== height\n\t\t\t) {\n\t\t\t\treturn {\n\t\t\t\t\twidth: Math.floor( width ),\n\t\t\t\t\theight: Math.floor( height ),\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn prevState;\n\t\t} );\n\t}, [] );\n\n\tconst observer = (\n\t\t<View\n\t\t\ttestID=\"resize-observer\"\n\t\t\tstyle={ StyleSheet.absoluteFill }\n\t\t\tonLayout={ onLayout }\n\t\t/>\n\t);\n\n\treturn [ observer, measurements ];\n};\n\nexport default useResizeObserver;\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAAC,QAAA,GAAAD,OAAA;AAA2D,IAAAE,WAAA,GAAAF,OAAA;AAP3D;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,MAAMG,iBAAiB,GAAGA,CAAA,KAAM;EAC/B,MAAM,CAAEC,YAAY,EAAEC,eAAe,CAAE,GAAG,IAAAC,iBAAQ,EAAE,IAAK,CAAC;EAE1D,MAAMC,QAAQ,GAAG,IAAAC,oBAAW,EAAE,CAAE;IAAEC;EAAY,CAAC,KAAM;IACpD,MAAM;MAAEC,KAAK;MAAEC;IAAO,CAAC,GAAGF,WAAW,CAACG,MAAM;IAC5CP,eAAe,CAAIQ,SAAS,IAAM;MACjC,IACC,CAAEA,SAAS,IACXA,SAAS,CAACH,KAAK,KAAKA,KAAK,IACzBG,SAAS,CAACF,MAAM,KAAKA,MAAM,EAC1B;QACD,OAAO;UACND,KAAK,EAAEI,IAAI,CAACC,KAAK,CAAEL,KAAM,CAAC;UAC1BC,MAAM,EAAEG,IAAI,CAACC,KAAK,CAAEJ,MAAO;QAC5B,CAAC;MACF;MACA,OAAOE,SAAS;IACjB,CAAE,CAAC;EACJ,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMG,QAAQ,gBACb,IAAAd,WAAA,CAAAe,GAAA,EAAClB,YAAA,CAAAmB,IAAI;IACJC,MAAM,EAAC,iBAAiB;IACxBC,KAAK,EAAGC,uBAAU,CAACC,YAAc;IACjCf,QAAQ,EAAGA;EAAU,CACrB,CACD;EAED,OAAO,CAAES,QAAQ,EAAEZ,YAAY,CAAE;AAClC,CAAC;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEatB,iBAAiB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["useCallback","useRef","useState","useResizeObserver","jsx","_jsx","extractSize","entry","entrySize","contentBoxSize","contentRect","width","height","inlineSize","blockSize","map","d","Math","round","RESIZE_ELEMENT_STYLES","position","top","left","right","bottom","pointerEvents","opacity","overflow","zIndex","ResizeElement","onResize","resizeElementRef","entries","newSize","at","ref","style","sizeEquals","a","b","NULL_SIZE","useLegacyResizeObserver","size","setSize","previousSizeRef","handleResize","current","resizeElement"],"sources":["@wordpress/compose/src/hooks/use-resize-observer/_legacy/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useRef, useState } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport useResizeObserver from '../index';\n\nexport type ObservedSize = {\n\twidth: number | null;\n\theight: number | null;\n};\n\n// We're only using the first element of the size sequences, until future versions of the spec solidify on how\n// exactly it'll be used for fragments in multi-column scenarios:\n// From the spec:\n// > The box size properties are exposed as FrozenArray in order to support elements that have multiple fragments,\n// > which occur in multi-column scenarios. However the current definitions of content rect and border box do not\n// > mention how those boxes are affected by multi-column layout. In this spec, there will only be a single\n// > ResizeObserverSize returned in the FrozenArray, which will correspond to the dimensions of the first column.\n// > A future version of this spec will extend the returned FrozenArray to contain the per-fragment size information.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-entry-interface)\n//\n// Also, testing these new box options revealed that in both Chrome and FF everything is returned in the callback,\n// regardless of the \"box\" option.\n// The spec states the following on this:\n// > This does not have any impact on which box dimensions are returned to the defined callback when the event\n// > is fired, it solely defines which box the author wishes to observe layout changes on.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-interface)\n// I'm not exactly clear on what this means, especially when you consider a later section stating the following:\n// > This section is non-normative. An author may desire to observe more than one CSS box.\n// > In this case, author will need to use multiple ResizeObservers.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-interface)\n// Which is clearly not how current browser implementations behave, and seems to contradict the previous quote.\n// For this reason I decided to only return the requested size,\n// even though it seems we have access to results for all box types.\n// This also means that we get to keep the current api, being able to return a simple { width, height } pair,\n// regardless of box option.\nconst extractSize = ( entry: ResizeObserverEntry ): ObservedSize => {\n\tlet entrySize;\n\tif ( ! entry.contentBoxSize ) {\n\t\t// The dimensions in `contentBoxSize` and `contentRect` are equivalent according to the spec.\n\t\t// See the 6th step in the description for the RO algorithm:\n\t\t// https://drafts.csswg.org/resize-observer/#create-and-populate-resizeobserverentry-h\n\t\t// > Set this.contentRect to logical this.contentBoxSize given target and observedBox of \"content-box\".\n\t\t// In real browser implementations of course these objects differ, but the width/height values should be equivalent.\n\t\tentrySize = [ entry.contentRect.width, entry.contentRect.height ];\n\t} else if ( entry.contentBoxSize[ 0 ] ) {\n\t\tconst contentBoxSize = entry.contentBoxSize[ 0 ];\n\t\tentrySize = [ contentBoxSize.inlineSize, contentBoxSize.blockSize ];\n\t} else {\n\t\t// TS complains about this, because the RO entry type follows the spec and does not reflect Firefox's buggy\n\t\t// behaviour of returning objects instead of arrays for `borderBoxSize` and `contentBoxSize`.\n\t\tconst contentBoxSize =\n\t\t\tentry.contentBoxSize as unknown as ResizeObserverSize;\n\t\tentrySize = [ contentBoxSize.inlineSize, contentBoxSize.blockSize ];\n\t}\n\n\tconst [ width, height ] = entrySize.map( ( d ) => Math.round( d ) );\n\treturn { width, height };\n};\n\nconst RESIZE_ELEMENT_STYLES = {\n\tposition: 'absolute',\n\ttop: 0,\n\tleft: 0,\n\tright: 0,\n\tbottom: 0,\n\tpointerEvents: 'none',\n\topacity: 0,\n\toverflow: 'hidden',\n\tzIndex: -1,\n} as const;\n\ntype ResizeElementProps = {\n\tonResize: ( s: ObservedSize ) => void;\n};\n\nfunction ResizeElement( { onResize }: ResizeElementProps ) {\n\tconst resizeElementRef = useResizeObserver( ( entries ) => {\n\t\tconst newSize = extractSize( entries.at( -1 )! ); // Entries are never empty.\n\t\tonResize( newSize );\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\tref={ resizeElementRef }\n\t\t\tstyle={ RESIZE_ELEMENT_STYLES }\n\t\t\taria-hidden=\"true\"\n\t\t/>\n\t);\n}\n\nfunction sizeEquals( a: ObservedSize, b: ObservedSize ) {\n\treturn a.width === b.width && a.height === b.height;\n}\n\nconst NULL_SIZE: ObservedSize = { width: null, height: null };\n\n/**\n * Hook which allows to listen to the resize event of any target element when it changes size.\n * _Note: `useResizeObserver` will report `null` sizes until after first render.\n *\n * @example\n *\n * ```js\n * const App = () => {\n * \tconst [ resizeListener, sizes ] = useResizeObserver();\n *\n * \treturn (\n * \t\t<div>\n * \t\t\t{ resizeListener }\n * \t\t\tYour content here\n * \t\t</div>\n * \t);\n * };\n * ```\n */\nexport default function useLegacyResizeObserver(): [\n\tReactElement,\n\tObservedSize,\n] {\n\tconst [ size, setSize ] = useState( NULL_SIZE );\n\n\t// Using a ref to track the previous width / height to avoid unnecessary renders.\n\tconst previousSizeRef = useRef( NULL_SIZE );\n\n\tconst handleResize = useCallback( ( newSize: ObservedSize ) => {\n\t\tif ( ! sizeEquals( previousSizeRef.current, newSize ) ) {\n\t\t\tpreviousSizeRef.current = newSize;\n\t\t\tsetSize( newSize );\n\t\t}\n\t}, [] );\n\n\tconst resizeElement = <ResizeElement onResize={ handleResize } />;\n\treturn [ resizeElement, size ];\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["View","StyleSheet","useState","useCallback","jsx","_jsx","useResizeObserver","measurements","setMeasurements","onLayout","nativeEvent","width","height","layout","prevState","Math","floor","observer","testID","style","absoluteFill"],"sources":["@wordpress/compose/src/hooks/use-resize-observer/_legacy/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, StyleSheet } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { useState, useCallback } from '@wordpress/element';\n\n/**\n * Hook which allows to listen the resize event of any target element when it changes sizes.\n *\n * @example\n *\n * ```js\n * const App = () => {\n * \tconst [ resizeListener, sizes ] = useResizeObserver();\n *\n * \treturn (\n * \t\t<View>\n * \t\t\t{ resizeListener }\n * \t\t\tYour content here\n * \t\t</View>\n * \t);\n * };\n * ```\n */\nconst useResizeObserver = () => {\n\tconst [ measurements, setMeasurements ] = useState( null );\n\n\tconst onLayout = useCallback( ( { nativeEvent } ) => {\n\t\tconst { width, height } = nativeEvent.layout;\n\t\tsetMeasurements( ( prevState ) => {\n\t\t\tif (\n\t\t\t\t! prevState ||\n\t\t\t\tprevState.width !== width ||\n\t\t\t\tprevState.height !== height\n\t\t\t) {\n\t\t\t\treturn {\n\t\t\t\t\twidth: Math.floor( width ),\n\t\t\t\t\theight: Math.floor( height ),\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn prevState;\n\t\t} );\n\t}, [] );\n\n\tconst observer = (\n\t\t<View\n\t\t\ttestID=\"resize-observer\"\n\t\t\tstyle={ StyleSheet.absoluteFill }\n\t\t\tonLayout={ onLayout }\n\t\t/>\n\t);\n\n\treturn [ observer, measurements ];\n};\n\nexport default useResizeObserver;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,WAAW,QAAQ,oBAAoB;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjBA,SAAAC,GAAA,IAAAC,IAAA;AAkBA,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;EAC/B,MAAM,CAAEC,YAAY,EAAEC,eAAe,CAAE,GAAGN,QAAQ,CAAE,IAAK,CAAC;EAE1D,MAAMO,QAAQ,GAAGN,WAAW,CAAE,CAAE;IAAEO;EAAY,CAAC,KAAM;IACpD,MAAM;MAAEC,KAAK;MAAEC;IAAO,CAAC,GAAGF,WAAW,CAACG,MAAM;IAC5CL,eAAe,CAAIM,SAAS,IAAM;MACjC,IACC,CAAEA,SAAS,IACXA,SAAS,CAACH,KAAK,KAAKA,KAAK,IACzBG,SAAS,CAACF,MAAM,KAAKA,MAAM,EAC1B;QACD,OAAO;UACND,KAAK,EAAEI,IAAI,CAACC,KAAK,CAAEL,KAAM,CAAC;UAC1BC,MAAM,EAAEG,IAAI,CAACC,KAAK,CAAEJ,MAAO;QAC5B,CAAC;MACF;MACA,OAAOE,SAAS;IACjB,CAAE,CAAC;EACJ,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMG,QAAQ,gBACbZ,IAAA,CAACL,IAAI;IACJkB,MAAM,EAAC,iBAAiB;IACxBC,KAAK,EAAGlB,UAAU,CAACmB,YAAc;IACjCX,QAAQ,EAAGA;EAAU,CACrB,CACD;EAED,OAAO,CAAEQ,QAAQ,EAAEV,YAAY,CAAE;AAClC,CAAC;AAED,eAAeD,iBAAiB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-resize-observer/_legacy/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAW1C,MAAM,MAAM,YAAY,GAAG;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,CAAC;AAwFF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,IAAI;IAClD,YAAY;IACZ,YAAY;CACZ,CAeA"}