@wordpress/compose 5.17.0 → 5.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +4 -1
  3. package/build/hooks/use-dialog/index.js.map +1 -1
  4. package/build/hooks/use-disabled/index.js +10 -98
  5. package/build/hooks/use-disabled/index.js.map +1 -1
  6. package/build/hooks/use-focus-outside/index.js +15 -56
  7. package/build/hooks/use-focus-outside/index.js.map +1 -1
  8. package/build/hooks/use-focusable-iframe/index.js +5 -2
  9. package/build/hooks/use-focusable-iframe/index.js.map +1 -1
  10. package/build/hooks/use-resize-observer/index.native.js +1 -0
  11. package/build/hooks/use-resize-observer/index.native.js.map +1 -1
  12. package/build-module/hooks/use-dialog/index.js.map +1 -1
  13. package/build-module/hooks/use-disabled/index.js +10 -97
  14. package/build-module/hooks/use-disabled/index.js.map +1 -1
  15. package/build-module/hooks/use-focus-outside/index.js +15 -56
  16. package/build-module/hooks/use-focus-outside/index.js.map +1 -1
  17. package/build-module/hooks/use-focusable-iframe/index.js +5 -2
  18. package/build-module/hooks/use-focusable-iframe/index.js.map +1 -1
  19. package/build-module/hooks/use-resize-observer/index.native.js +1 -0
  20. package/build-module/hooks/use-resize-observer/index.native.js.map +1 -1
  21. package/build-types/hooks/use-dialog/index.d.ts +2 -2
  22. package/build-types/hooks/use-dialog/index.d.ts.map +1 -1
  23. package/build-types/hooks/use-disabled/index.d.ts +4 -1
  24. package/build-types/hooks/use-disabled/index.d.ts.map +1 -1
  25. package/build-types/hooks/use-focus-outside/index.d.ts +16 -63
  26. package/build-types/hooks/use-focus-outside/index.d.ts.map +1 -1
  27. package/build-types/hooks/use-focusable-iframe/index.d.ts +6 -2
  28. package/build-types/hooks/use-focusable-iframe/index.d.ts.map +1 -1
  29. package/package.json +8 -8
  30. package/src/higher-order/with-global-events/test/index.js +18 -29
  31. package/src/higher-order/with-state/test/index.js +13 -26
  32. package/src/hooks/use-dialog/index.ts +3 -4
  33. package/src/hooks/use-disabled/index.ts +81 -0
  34. package/src/hooks/use-disabled/test/index.js +4 -36
  35. package/src/hooks/use-focus-outside/{index.js → index.ts} +55 -62
  36. package/src/hooks/use-focus-outside/test/index.js +112 -84
  37. package/src/hooks/use-focusable-iframe/{index.js → index.ts} +8 -3
  38. package/src/hooks/use-instance-id/test/index.js +9 -16
  39. package/src/hooks/use-media-query/test/index.js +33 -53
  40. package/src/hooks/use-resize-observer/index.native.js +5 -1
  41. package/src/hooks/use-resize-observer/test/index.native.js +18 -22
  42. package/src/hooks/use-viewport-match/test/index.js +78 -78
  43. package/tsconfig.tsbuildinfo +1 -1
  44. package/src/hooks/use-disabled/index.js +0 -197
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { create, act } from 'react-test-renderer';
4
+ import { render } from '@testing-library/react';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
@@ -25,105 +25,105 @@ describe( 'useViewportMatch', () => {
25
25
  };
26
26
 
27
27
  it( 'should return true when the viewport matches', async () => {
28
- let root;
29
28
  useMediaQueryMock.mockReturnValue( true );
30
29
 
31
- await act( async () => {
32
- root = create( <TestComponent breakpoint="wide" operator="<" /> );
33
- } );
34
- expect( root.toJSON() ).toBe( 'useViewportMatch: true' );
30
+ const { container, rerender } = render(
31
+ <TestComponent breakpoint="wide" operator="<" />
32
+ );
35
33
 
36
- await act( async () => {
37
- root.update( <TestComponent breakpoint="medium" operator=">=" /> );
38
- } );
39
- expect( root.toJSON() ).toBe( 'useViewportMatch: true' );
34
+ expect( container ).toHaveTextContent( 'useViewportMatch: true' );
40
35
 
41
- await act( async () => {
42
- root.update( <TestComponent breakpoint="small" operator=">=" /> );
43
- } );
44
- expect( root.toJSON() ).toBe( 'useViewportMatch: true' );
36
+ rerender( <TestComponent breakpoint="medium" operator=">=" /> );
45
37
 
46
- expect( useMediaQueryMock.mock.calls ).toEqual( [
47
- [ '(max-width: 1280px)' ],
48
- [ '(min-width: 782px)' ],
49
- [ '(min-width: 600px)' ],
50
- ] );
38
+ expect( container ).toHaveTextContent( 'useViewportMatch: true' );
51
39
 
52
- root.unmount();
40
+ rerender( <TestComponent breakpoint="small" operator=">=" /> );
41
+
42
+ expect( container ).toHaveTextContent( 'useViewportMatch: true' );
43
+
44
+ expect( useMediaQueryMock ).toHaveBeenCalledTimes( 3 );
45
+ expect( useMediaQueryMock ).toHaveBeenNthCalledWith(
46
+ 1,
47
+ '(max-width: 1280px)'
48
+ );
49
+ expect( useMediaQueryMock ).toHaveBeenNthCalledWith(
50
+ 2,
51
+ '(min-width: 782px)'
52
+ );
53
+ expect( useMediaQueryMock ).toHaveBeenNthCalledWith(
54
+ 3,
55
+ '(min-width: 600px)'
56
+ );
53
57
  } );
54
58
 
55
59
  it( 'should return false when the viewport matches', async () => {
56
- let root;
57
60
  useMediaQueryMock.mockReturnValue( false );
58
61
 
59
- await act( async () => {
60
- root = create( <TestComponent breakpoint="huge" operator=">=" /> );
61
- } );
62
- expect( root.toJSON() ).toBe( 'useViewportMatch: false' );
62
+ const { container, rerender } = render(
63
+ <TestComponent breakpoint="huge" operator=">=" />
64
+ );
65
+
66
+ expect( container ).toHaveTextContent( 'useViewportMatch: false' );
63
67
 
64
- await act( async () => {
65
- root.update( <TestComponent breakpoint="large" operator="<" /> );
66
- } );
67
- expect( root.toJSON() ).toBe( 'useViewportMatch: false' );
68
+ rerender( <TestComponent breakpoint="large" operator="<" /> );
68
69
 
69
- await act( async () => {
70
- root.update( <TestComponent breakpoint="mobile" operator="<" /> );
71
- } );
72
- expect( root.toJSON() ).toBe( 'useViewportMatch: false' );
70
+ expect( container ).toHaveTextContent( 'useViewportMatch: false' );
73
71
 
74
- expect( useMediaQueryMock.mock.calls ).toEqual( [
75
- [ '(min-width: 1440px)' ],
76
- [ '(max-width: 960px)' ],
77
- [ '(max-width: 480px)' ],
78
- ] );
72
+ rerender( <TestComponent breakpoint="mobile" operator="<" /> );
79
73
 
80
- root.unmount();
74
+ expect( container ).toHaveTextContent( 'useViewportMatch: false' );
75
+
76
+ expect( useMediaQueryMock ).toHaveBeenCalledTimes( 3 );
77
+ expect( useMediaQueryMock ).toHaveBeenNthCalledWith(
78
+ 1,
79
+ '(min-width: 1440px)'
80
+ );
81
+ expect( useMediaQueryMock ).toHaveBeenNthCalledWith(
82
+ 2,
83
+ '(max-width: 960px)'
84
+ );
85
+ expect( useMediaQueryMock ).toHaveBeenNthCalledWith(
86
+ 3,
87
+ '(max-width: 480px)'
88
+ );
81
89
  } );
82
90
 
83
91
  it( 'should correctly simulate a value', async () => {
84
- let root;
85
92
  useMediaQueryMock.mockReturnValue( true );
86
93
 
87
94
  const innerElement = <TestComponent breakpoint="wide" operator=">=" />;
88
95
  const WidthProvider = useViewportMatch.__experimentalWidthProvider;
89
96
 
90
- await act( async () => {
91
- root = create(
92
- <WidthProvider value={ 300 }>{ innerElement }</WidthProvider>
93
- );
94
- } );
95
- expect( root.toJSON() ).toBe( 'useViewportMatch: false' );
96
-
97
- await act( async () => {
98
- root.update(
99
- <WidthProvider value={ 1200 }>{ innerElement }</WidthProvider>
100
- );
101
- } );
102
- expect( root.toJSON() ).toBe( 'useViewportMatch: false' );
103
-
104
- await act( async () => {
105
- root.update(
106
- <WidthProvider value={ 1300 }>{ innerElement }</WidthProvider>
107
- );
108
- } );
109
- expect( root.toJSON() ).toBe( 'useViewportMatch: true' );
110
-
111
- await act( async () => {
112
- root.update(
113
- <WidthProvider value={ 1300 }>
114
- <TestComponent breakpoint="wide" operator="<" />
115
- </WidthProvider>
116
- );
117
- } );
118
- expect( root.toJSON() ).toBe( 'useViewportMatch: false' );
119
-
120
- expect( useMediaQueryMock.mock.calls ).toEqual( [
121
- [ undefined ],
122
- [ undefined ],
123
- [ undefined ],
124
- [ undefined ],
125
- ] );
126
-
127
- root.unmount();
97
+ const { container, rerender } = render(
98
+ <WidthProvider value={ 300 }>{ innerElement }</WidthProvider>
99
+ );
100
+ expect( container ).toHaveTextContent( 'useViewportMatch: false' );
101
+
102
+ rerender(
103
+ <WidthProvider value={ 1200 }>{ innerElement }</WidthProvider>
104
+ );
105
+
106
+ expect( container ).toHaveTextContent( 'useViewportMatch: false' );
107
+
108
+ rerender(
109
+ <WidthProvider value={ 1300 }>{ innerElement }</WidthProvider>
110
+ );
111
+
112
+ expect( container ).toHaveTextContent( 'useViewportMatch: true' );
113
+
114
+ rerender(
115
+ <WidthProvider value={ 1300 }>
116
+ <TestComponent breakpoint="wide" operator="<" />
117
+ </WidthProvider>
118
+ );
119
+
120
+ expect( container ).toHaveTextContent( 'useViewportMatch: false' );
121
+
122
+ expect( useMediaQueryMock ).toHaveBeenCalledTimes( 4 );
123
+ // `useMediaQuery` is expected to receive `undefined` when simulating width.
124
+ expect( useMediaQueryMock ).toHaveBeenNthCalledWith( 1, undefined );
125
+ expect( useMediaQueryMock ).toHaveBeenNthCalledWith( 2, undefined );
126
+ expect( useMediaQueryMock ).toHaveBeenNthCalledWith( 3, undefined );
127
+ expect( useMediaQueryMock ).toHaveBeenNthCalledWith( 4, undefined );
128
128
  } );
129
129
  } );
@@ -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.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.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.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.es2020.bigint.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.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.esnext.intl.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/@types/react/node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.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/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/react.d.ts","../element/build-types/create-interpolate-element.d.ts","../../node_modules/@types/react-dom/index.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","../keycodes/build-types/platform.d.ts","../keycodes/build-types/index.d.ts","../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/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","./src/hooks/use-focus-on-mount/index.js","./src/hooks/use-focus-return/index.js","./src/hooks/use-focus-outside/index.js","./src/hooks/use-merge-refs/index.js","./src/hooks/use-dialog/index.ts","./src/hooks/use-disabled/index.js","./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","./src/hooks/use-viewport-match/index.js","./src/hooks/use-resize-observer/index.tsx","../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-throttle/index.js","./src/hooks/use-drop-zone/index.js","./src/hooks/use-focusable-iframe/index.js","./src/hooks/use-fixed-window-list/index.js","./src/index.js","../../typings/gutenberg-env/index.d.ts"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"b4e123af1af6049685c93073a15868b50aebdad666d422edc72fa2b585fa8a37","f86c04a744ebcede96bac376f9a2c90f2bd3c422740d91dda4ca6233199d4977","6ae1bddee5c790439bd992abd063b9b46e0cadd676c2a8562268d1869213ff60","606244fc97a6a74b877f2e924ba7e55b233bc6acb57d7bf40ba84a5be2d9adb0","4a1cabac71036b8a14f5db1b753b579f0c901c7d7b9227e6872dadf6efb104e8","062959a1d825b96639d87be35fe497cbd3f89544bf06fdad577bbfb85fcf604c","4c3672dc8f4e4fdd3d18525b22b31f1b5481f5a415db96550d3ac5163a6c3dd3","f9a69ca445010b91fe08f08c06e0f86d79c0d776905f9bdb828477cb2a1eb7fc","ad7fd0e7ee457d4884b3aaecbcbd2a80b6803407c4ce2540c296170d4c7918ef","a50ef21605f41c6acad6c3ef0307e5311b94963c846ca093c764b80cdb5318d6","74b4035dd26d09a417c44ca23ab5ee69b173f8c2f6b2e47350ab0795cf2d4a17","918f86ee2b19cc38cb8b1a4cf8f223eb228aaa39df3604c42f700fac2f0b3ea1",{"version":"ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"1bc82f5b3bb93df76d19730c84467b0b346187198537135d63a672956f323720","affectsGlobalScope":true},"a411d5c6b281a3820b7b16f4183e7b992e3afe0942d233ec9d25c641fd53476b","f0b28b3d6882f5e1d938ca97e5f33d1b3bd2d0fcf275a95a1ed6e4aae8db3d98","ec17a33de0166cd47421642635272df2893f5aca9e84bf8d08c4af617a6dbe9e","db829c3ac876762865ad7fd84ea0ed5be54823518399db1ca3af4572b6649e87","a41403e55f0a8b7d5b50dd7d1adac61caa18f69d7591c95cbe7e7d5bcaf37177","f9fd6e3ade5a1179d67ba174b2f4219ba5afa7c0b8817cd07e398f0ebccefbe7","5190f1a110a789c2f8ed8dcf2da6ce122dcb74249d0c01d19d1ed0b1c6bb02a1","3650bbe137c9c44bc6b8f44a56353b00eba9654e41a9355e6228f7f0f464c648","9c4f32d2fa2b6efeed4f9fbd98254121b17982110b48edcede96e2dc2af0894d","e59d00012fb20e6746def2f4bc94650526aa6c574c49ad6a50a992f61a3ee675","e47b8ec56eb49bc1c53c9012daa9874de14ad0c5da442485aec333571c74b526","45a63e17814c570ea59407f231ef9c561510bd6edb36f17479b09b44619496c6","5d7018910750d9cb4a912577ad2951fc3fad83c30d637689b69ffc6bbb0c9f5a","d2d9e98a2b167079474768593e1e7125fc3db055add8fbdb5977e3d05a8a3696","6462da67490105ba7d98cf312c2faf8794c425781128b161ea8394d66502eec8","62359da52b6c8d00c50c2e50738fac82e902f916fdf458d8159e7edb1c60c3a8","1e0ac21bc775686383ea8c8e48bd98b385e6195b25c85525a7affd08a2cd38b9","0449615e1ed03c7d54fc435a63b7ef0cb4e5cea5ac40c9a63280a46f7eeae0ff","1dd3d421923d8f03af788abb7e9585e2cf2fe7365958e727928cbab8f691a9e8","bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","b192606574769a5566620f9bf19358a3994bc2726ecdeaad9c66f3333b2687c8","cafd444fa9429538f39b36d19967735f4ddd68afdf595ce8d6526b9535a32967","8da8943f5709102a1a172e59ad9ef8efcfad939c3fc3ce0931cee0e74b746415","06344dc54bd683361d1265df562bf28310dee42631351cbc73ec0662067a2662","5cc991dfbc9af88d5fad5edf08593065d9eefea81cd07a8277b28198645db0b6","bfa7ee495d0975bbeeaa6f005db167b9db4f1f92896f0669f2f124f9fb9cbed9","04960fe91185fc317b9f8d2d2604b4547c8ea3ec49563062c28ae95c89e06e3a","e6523d2db6e2ae8cf35fdc53199538d6817add78536b1a986c3a08513b7202e1","ce845faff6db3eb0e1d62ff1c6337f0bb1202b312dde69efd5addd5aa0389b07","cbf4ee77c80de53d71a1d076ea25eddd23541685119a67c43bd4aeaad8533b1f","215f6d27f88aeaa56a4e0fe358a6fe3b8b5f7c76a2f83663035028b0c2595b1f","f8d84deeb6367b306c78f83111f36b14a7cb786af0c3a93168ffc97a2e0916c9","c307c0c1d2a162347fe19da27d37ee9f333617a23686649acbe4190848225970","6bcfd3b6f61aedc9734a19729a0d1a8e7de6aa02621bf519d0a1276601fb1a74","fe43e4fd566293aee946e5db5b055db1215602498d315e468c6adaf1e6917fb4","ea912b91fed2f873b87e24180399baad37c43019b6f51b210e1d9f1d1d0135ba","a1cd2b1943db96616abf3a3f939dfd0eb69fab8149725d195a8acc7f5672a1f9","ddf5e2dd1897b3271acd68a587d43996e18c63ccc51b17f9149763a7d4bbadb7","1466691ae57846e0280465b012fd01aed3c4a4e0b39fcc11276833fbfc72ade7","b3ceffa2a65a5d7a6f0d6daf429d23dd301df58718ad07e397bfa28f7d8a2688","cfa03019dd5cdd18ff1b5f00b3cb37ac762faf9eca2e86ea2c718502285cf67b","4d8d7075a3381162b4ae5147f84b4d2a2ae49398d98bef7c4437b8db0fefb194","a8b1a9f91ecb89faabb130af767e007ee28ac6ca794565d856759bb87e42feb1","1b1c43c378278f5dfea558337b0e3d57944a806eb4f55330baba592967253350","5ad070af2f7e4b7a676a63137c6a6cf670144ee5f23a9a30b21c19e70bb077f3","df060b3639c427e1c09bcf5cc14975f00b296e53192c710ea76e4a658a382aa0","4dd037aee1fed84d54490818e9a32d12e3e2f75d1dd9816d25fb9a0ecacee3b9","ca84eb7ffe779cb8812ee0a6aa151adac3dd25c4dc877767f37d079e5b62151f","f1d5239e0cdfb4ddd24a47727b88871802d3d2b3fda70229b158525753ad643e","af89d09746be737e24c50de49f035f3afea14c11be30ad5d2764d142daaa4078","5422948be7ac69dd13078af8ce2a8d9ea4d79eb510bfc54b75586573185183f9","246fc68fbf5c3ae2fded7eebcc38e6c5bb0f2cb796096916d0e65505cfbe850f","fc35e9bf454dcd7c42bab9e51bdedd4c9a5662b8d9964b1204913e268cb1fe6f","6e278ba8dbcf2617a2c5f5805e3addd1cf1c35b75b7dde3cbdabbccbf926b6fe","a2e36dad616090f5bcb99c4491b8b34bf8f2b5bf2fdcd6b5a43ddfd23f1b8433","c9d56f52ca68c2c86ec5ba05d927ef3892dca4923bd3cebe6593ebbcdd7e70c3","419dd7c5f46e04ddc2a390070fe19423200334f464bcd41a8bac56007127a13d","067b19c3d1fde05a39e5b769cbb5f44e0f6cf201f52fa2cafedc3943ea2e9052","e3ea09f9ea097b88c98df19c52694ac83daab0692e90cea9cf3faff00087899f","02e1dfd21586ad4379dc0d0ab88283694734f786ed4dcffaf5fbe25b23cd4b62","e8764e82f28e0a7acb1edf0cd502de3c667ce0597ec8deefab4bddcb2273e4c7","4a43623f49489a0e0359e905dc2eaeb88c9bc5dce62819b9c04c8c60d79d2782","82e37f3013111a0a7abf743e89b074261bb92655bea624bb07ac77c6f0a94657","0529cc464f3dcf6322b23f37cb2a35bcc52baccb9afe128b38485cda9ea5db7d","d7865f701e0b27e883babea23a4aa1d1a8f37ccc502f7834b81d117401d689f4","2290ccf854da4cabed41ff4013869e463b16772b3f16ae308e382f91d516c895","198ebdc9a229972b281bb98bc86528dbbe00a91f6fd7b1a2d987f0f3f52157d8","50c61f235257b1c9068c41a5a50baeb4274ea5dfc07d2f86c4032617e30d0732","bc4724a288bcb43fb7248fdc5dc371c3faf8fced20033e4bb75f4eb09cfdf01d","65c10b2d675fc30d50f78e9135a8c89706b5d7347abb1f3094025d402427187b","fa277bbe15a3e2945be2608ccb159208ef50ae95b5059acc01d8c453b1683fff","d5d51e991634d1d8a4993e5d36d7d356d52edf181fb7ca4b9b7c8c803cd611b5","419a2db28ab95ae163fc6825a1180a422189bd7f7c0173c2e111ed55cb35ff0b","98d019534dd7c963b013eed9a2a2e8a96618e70a40730f6920614be6d410ef80","774f781a28c56874e245eadff141e5e52af54e5555d7e083fca45f06348841ed","96520a873073a2f39f922d0a422498cdcc28be9066a769000cdd07ecaba7b645","135aa6d18002bfec723f8697aa80a59648cf0582752d5e089b6eb0770b63a02d","b6eb8e23f4145ddbe22639779de710af7a554c9592f69f257b7ec5c487eb0695","831d99b85c6ced631649a70014e1288d3f927fa262e4009ba1fbcd11b965ce58","38fef887c5b2cae9d244172fe72957e61c3393bacc2be3ae5e2c1bf1e8a69e71","e064325c76ef07fec4cd69a91dabe717fae011bba5e15d81a2486ce25e80a91e","914d7cdcd8c7ebff500b43e8a878164ef0f93168eea0e5246747484a160d730b",{"version":"4169be501cd57005d1c910fa24cef850c2922596632b00096063f58d649ba85a","affectsGlobalScope":true},"abb6d9adcc79c591f712e79c55f769b48690ec66a55b6f6189569a0d357c7e58","e7669752758ae96e591040a264669535d7e65a8ce01f86812211fe39dc7bef6c","8ebd5899eefab0ba9bb82ae4cdd18aca44564a25cebfa51ea5d92db4252b49dd","62540abf0bac8bf8c13c183db0457c5495a2bdad157f9eb03916c3953feb765e","7fe68b17d28662b4c1232c578a3bce0532f2628b443ad541a196b124e4d93087","89eae3e00b2fbde1af73eab56e0ca7960c2dbc02c2ef89f98104ceb75526311b","88d3d5b21760947695c7d812e5992c5a80d938cafaf8ecf687e350bd230f5d25","6dd661da9a47bde2190abb41b215af59eb3f5161ea91d827dc7192bb8d071273","2d78a397234d9b3325910135668cffba83af759074ceadc0afd281795ca8b9fc","22f67790611304c6726a7e333265c1b64e472e78bb661f734a4cd715402d3e9f",{"version":"f254c1abf6bb4c92633159831f924588908da902aa5e04ae45c39bd001f62e2e","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[141],[61],[57,58,59,60],[46],[45],[45,46,47,48,49,50,51,52,53,54,55],[48],[50],[81,82,83,84],[81],[82],[65],[61,62],[61,62,70,79],[62,79,86,87],[62,89],[62,79],[62,79,86],[79,149],[61,94,127,128],[61,79,86,130],[61,79,128,130],[63,79,152],[61,79,94,129,133,134,135,136],[61,63,127,128],[61,79,139],[61,79,128],[61,63,79,94,127],[61,79,127],[61,79],[128],[79],[61,79,94,141,142],[144],[63,64,79,152],[79,144],[145],[62,63,64,65,66,67,80,88,89,90,91,92,128,129,131,132,133,134,135,136,137,138,139,140,143,144,145,146,147,148,150,151,153,154,155,156,157],[56,61],[63],[85],[95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,119,120,121],[118],[122,123,124,125,126],[71],[71,72,74,75,76,77,78],[73],[61,71],[68,69],[70],[93]],"referencedMap":[[142,1],[73,2],[61,3],[47,4],[48,5],[56,6],[49,5],[50,5],[51,7],[52,8],[46,5],[53,8],[54,5],[55,8],[85,9],[82,10],[83,11],[66,12],[67,13],[80,14],[88,15],[90,16],[91,17],[92,18],[150,19],[129,20],[131,21],[132,22],[153,23],[137,24],[138,25],[140,26],[155,27],[157,28],[133,29],[135,30],[134,30],[156,31],[89,32],[139,32],[143,33],[144,32],[136,30],[145,32],[146,34],[128,30],[148,30],[154,35],[147,36],[151,37],[158,38],[62,39],[64,40],[86,41],[122,42],[119,43],[127,44],[72,45],[79,46],[78,2],[74,47],[71,2],[77,48],[70,49],[68,50],[94,51]],"exportedModulesMap":[[142,1],[73,2],[61,3],[47,4],[48,5],[56,6],[49,5],[50,5],[51,7],[52,8],[46,5],[53,8],[54,5],[55,8],[85,9],[82,10],[83,11],[66,12],[67,13],[80,14],[88,15],[90,16],[91,17],[92,18],[150,19],[129,20],[131,21],[132,22],[153,23],[137,24],[138,25],[140,26],[155,27],[157,28],[133,29],[135,30],[134,30],[156,31],[89,32],[139,32],[143,33],[144,32],[136,30],[145,32],[146,34],[128,30],[148,30],[154,35],[147,36],[151,37],[158,38],[62,39],[64,40],[86,41],[122,42],[119,43],[127,44],[72,45],[79,46],[78,2],[74,47],[71,2],[77,48],[70,49],[68,50],[94,51]],"semanticDiagnosticsPerFile":[141,142,59,73,57,61,58,60,47,48,56,130,49,50,51,45,52,46,53,54,55,10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,41,42,43,1,9,44,152,81,84,85,82,83,66,67,65,80,88,87,90,91,92,150,129,131,132,153,137,138,140,155,157,133,135,134,156,89,139,143,144,136,145,146,128,148,154,147,151,158,62,63,64,86,124,118,95,98,96,97,101,99,100,122,112,117,102,103,104,105,120,106,107,108,109,119,111,114,110,121,116,113,115,125,127,123,126,72,79,76,78,74,71,77,75,69,70,68,94,93,149,159]},"version":"4.4.2"}
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.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.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.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.es2020.bigint.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.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.esnext.intl.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/@types/react/node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.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/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/react.d.ts","../element/build-types/create-interpolate-element.d.ts","../../node_modules/@types/react-dom/index.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","../keycodes/build-types/platform.d.ts","../keycodes/build-types/index.d.ts","../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/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","./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-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","./src/hooks/use-viewport-match/index.js","./src/hooks/use-resize-observer/index.tsx","../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-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/index.js","../../typings/gutenberg-env/index.d.ts"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"b4e123af1af6049685c93073a15868b50aebdad666d422edc72fa2b585fa8a37","f86c04a744ebcede96bac376f9a2c90f2bd3c422740d91dda4ca6233199d4977","6ae1bddee5c790439bd992abd063b9b46e0cadd676c2a8562268d1869213ff60","606244fc97a6a74b877f2e924ba7e55b233bc6acb57d7bf40ba84a5be2d9adb0","4a1cabac71036b8a14f5db1b753b579f0c901c7d7b9227e6872dadf6efb104e8","062959a1d825b96639d87be35fe497cbd3f89544bf06fdad577bbfb85fcf604c","4c3672dc8f4e4fdd3d18525b22b31f1b5481f5a415db96550d3ac5163a6c3dd3","f9a69ca445010b91fe08f08c06e0f86d79c0d776905f9bdb828477cb2a1eb7fc","ad7fd0e7ee457d4884b3aaecbcbd2a80b6803407c4ce2540c296170d4c7918ef","a50ef21605f41c6acad6c3ef0307e5311b94963c846ca093c764b80cdb5318d6","74b4035dd26d09a417c44ca23ab5ee69b173f8c2f6b2e47350ab0795cf2d4a17","918f86ee2b19cc38cb8b1a4cf8f223eb228aaa39df3604c42f700fac2f0b3ea1",{"version":"ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"1bc82f5b3bb93df76d19730c84467b0b346187198537135d63a672956f323720","affectsGlobalScope":true},"a411d5c6b281a3820b7b16f4183e7b992e3afe0942d233ec9d25c641fd53476b","f0b28b3d6882f5e1d938ca97e5f33d1b3bd2d0fcf275a95a1ed6e4aae8db3d98","ec17a33de0166cd47421642635272df2893f5aca9e84bf8d08c4af617a6dbe9e","db829c3ac876762865ad7fd84ea0ed5be54823518399db1ca3af4572b6649e87","a41403e55f0a8b7d5b50dd7d1adac61caa18f69d7591c95cbe7e7d5bcaf37177","f9fd6e3ade5a1179d67ba174b2f4219ba5afa7c0b8817cd07e398f0ebccefbe7","5190f1a110a789c2f8ed8dcf2da6ce122dcb74249d0c01d19d1ed0b1c6bb02a1","3650bbe137c9c44bc6b8f44a56353b00eba9654e41a9355e6228f7f0f464c648","9c4f32d2fa2b6efeed4f9fbd98254121b17982110b48edcede96e2dc2af0894d","e59d00012fb20e6746def2f4bc94650526aa6c574c49ad6a50a992f61a3ee675","e47b8ec56eb49bc1c53c9012daa9874de14ad0c5da442485aec333571c74b526","45a63e17814c570ea59407f231ef9c561510bd6edb36f17479b09b44619496c6","5d7018910750d9cb4a912577ad2951fc3fad83c30d637689b69ffc6bbb0c9f5a","d2d9e98a2b167079474768593e1e7125fc3db055add8fbdb5977e3d05a8a3696","6462da67490105ba7d98cf312c2faf8794c425781128b161ea8394d66502eec8","62359da52b6c8d00c50c2e50738fac82e902f916fdf458d8159e7edb1c60c3a8","1e0ac21bc775686383ea8c8e48bd98b385e6195b25c85525a7affd08a2cd38b9","0449615e1ed03c7d54fc435a63b7ef0cb4e5cea5ac40c9a63280a46f7eeae0ff","1dd3d421923d8f03af788abb7e9585e2cf2fe7365958e727928cbab8f691a9e8","bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","b192606574769a5566620f9bf19358a3994bc2726ecdeaad9c66f3333b2687c8","cafd444fa9429538f39b36d19967735f4ddd68afdf595ce8d6526b9535a32967","8da8943f5709102a1a172e59ad9ef8efcfad939c3fc3ce0931cee0e74b746415","06344dc54bd683361d1265df562bf28310dee42631351cbc73ec0662067a2662","5cc991dfbc9af88d5fad5edf08593065d9eefea81cd07a8277b28198645db0b6","bfa7ee495d0975bbeeaa6f005db167b9db4f1f92896f0669f2f124f9fb9cbed9","04960fe91185fc317b9f8d2d2604b4547c8ea3ec49563062c28ae95c89e06e3a","e6523d2db6e2ae8cf35fdc53199538d6817add78536b1a986c3a08513b7202e1","ce845faff6db3eb0e1d62ff1c6337f0bb1202b312dde69efd5addd5aa0389b07","cbf4ee77c80de53d71a1d076ea25eddd23541685119a67c43bd4aeaad8533b1f","215f6d27f88aeaa56a4e0fe358a6fe3b8b5f7c76a2f83663035028b0c2595b1f","f8d84deeb6367b306c78f83111f36b14a7cb786af0c3a93168ffc97a2e0916c9","c307c0c1d2a162347fe19da27d37ee9f333617a23686649acbe4190848225970","6bcfd3b6f61aedc9734a19729a0d1a8e7de6aa02621bf519d0a1276601fb1a74","fe43e4fd566293aee946e5db5b055db1215602498d315e468c6adaf1e6917fb4","ea912b91fed2f873b87e24180399baad37c43019b6f51b210e1d9f1d1d0135ba","a1cd2b1943db96616abf3a3f939dfd0eb69fab8149725d195a8acc7f5672a1f9","ddf5e2dd1897b3271acd68a587d43996e18c63ccc51b17f9149763a7d4bbadb7","1466691ae57846e0280465b012fd01aed3c4a4e0b39fcc11276833fbfc72ade7","b3ceffa2a65a5d7a6f0d6daf429d23dd301df58718ad07e397bfa28f7d8a2688","cfa03019dd5cdd18ff1b5f00b3cb37ac762faf9eca2e86ea2c718502285cf67b","4d8d7075a3381162b4ae5147f84b4d2a2ae49398d98bef7c4437b8db0fefb194","a8b1a9f91ecb89faabb130af767e007ee28ac6ca794565d856759bb87e42feb1","1b1c43c378278f5dfea558337b0e3d57944a806eb4f55330baba592967253350","5ad070af2f7e4b7a676a63137c6a6cf670144ee5f23a9a30b21c19e70bb077f3","df060b3639c427e1c09bcf5cc14975f00b296e53192c710ea76e4a658a382aa0","4dd037aee1fed84d54490818e9a32d12e3e2f75d1dd9816d25fb9a0ecacee3b9","ca84eb7ffe779cb8812ee0a6aa151adac3dd25c4dc877767f37d079e5b62151f","f1d5239e0cdfb4ddd24a47727b88871802d3d2b3fda70229b158525753ad643e","af89d09746be737e24c50de49f035f3afea14c11be30ad5d2764d142daaa4078","5422948be7ac69dd13078af8ce2a8d9ea4d79eb510bfc54b75586573185183f9","246fc68fbf5c3ae2fded7eebcc38e6c5bb0f2cb796096916d0e65505cfbe850f","fc35e9bf454dcd7c42bab9e51bdedd4c9a5662b8d9964b1204913e268cb1fe6f","6e278ba8dbcf2617a2c5f5805e3addd1cf1c35b75b7dde3cbdabbccbf926b6fe","a2e36dad616090f5bcb99c4491b8b34bf8f2b5bf2fdcd6b5a43ddfd23f1b8433","c9d56f52ca68c2c86ec5ba05d927ef3892dca4923bd3cebe6593ebbcdd7e70c3","419dd7c5f46e04ddc2a390070fe19423200334f464bcd41a8bac56007127a13d","067b19c3d1fde05a39e5b769cbb5f44e0f6cf201f52fa2cafedc3943ea2e9052","e3ea09f9ea097b88c98df19c52694ac83daab0692e90cea9cf3faff00087899f","02e1dfd21586ad4379dc0d0ab88283694734f786ed4dcffaf5fbe25b23cd4b62","e8764e82f28e0a7acb1edf0cd502de3c667ce0597ec8deefab4bddcb2273e4c7","4a43623f49489a0e0359e905dc2eaeb88c9bc5dce62819b9c04c8c60d79d2782","82e37f3013111a0a7abf743e89b074261bb92655bea624bb07ac77c6f0a94657","0529cc464f3dcf6322b23f37cb2a35bcc52baccb9afe128b38485cda9ea5db7d","d7865f701e0b27e883babea23a4aa1d1a8f37ccc502f7834b81d117401d689f4","2290ccf854da4cabed41ff4013869e463b16772b3f16ae308e382f91d516c895","198ebdc9a229972b281bb98bc86528dbbe00a91f6fd7b1a2d987f0f3f52157d8","50c61f235257b1c9068c41a5a50baeb4274ea5dfc07d2f86c4032617e30d0732","bc4724a288bcb43fb7248fdc5dc371c3faf8fced20033e4bb75f4eb09cfdf01d","5891e1e9e7e581597fe3706134cfefb059d2abea5617bccc5eb973e4be93fa03","fa277bbe15a3e2945be2608ccb159208ef50ae95b5059acc01d8c453b1683fff","2ce70b0c8a1d1babeb3e7eb19b34ed0ecd8f935c26bbd0e8d6affc3fb46b22c3","de3f48d4ddc159b324db68d27fc8fdee4d0153ac872d292ecc05af01b4302d65","98d019534dd7c963b013eed9a2a2e8a96618e70a40730f6920614be6d410ef80","774f781a28c56874e245eadff141e5e52af54e5555d7e083fca45f06348841ed","96520a873073a2f39f922d0a422498cdcc28be9066a769000cdd07ecaba7b645","135aa6d18002bfec723f8697aa80a59648cf0582752d5e089b6eb0770b63a02d","b6eb8e23f4145ddbe22639779de710af7a554c9592f69f257b7ec5c487eb0695","831d99b85c6ced631649a70014e1288d3f927fa262e4009ba1fbcd11b965ce58","38fef887c5b2cae9d244172fe72957e61c3393bacc2be3ae5e2c1bf1e8a69e71","e064325c76ef07fec4cd69a91dabe717fae011bba5e15d81a2486ce25e80a91e","914d7cdcd8c7ebff500b43e8a878164ef0f93168eea0e5246747484a160d730b",{"version":"4169be501cd57005d1c910fa24cef850c2922596632b00096063f58d649ba85a","affectsGlobalScope":true},"abb6d9adcc79c591f712e79c55f769b48690ec66a55b6f6189569a0d357c7e58","e7669752758ae96e591040a264669535d7e65a8ce01f86812211fe39dc7bef6c","8ebd5899eefab0ba9bb82ae4cdd18aca44564a25cebfa51ea5d92db4252b49dd","62540abf0bac8bf8c13c183db0457c5495a2bdad157f9eb03916c3953feb765e","7fe68b17d28662b4c1232c578a3bce0532f2628b443ad541a196b124e4d93087","89eae3e00b2fbde1af73eab56e0ca7960c2dbc02c2ef89f98104ceb75526311b","88d3d5b21760947695c7d812e5992c5a80d938cafaf8ecf687e350bd230f5d25","11fb82c3644a70cf226676762f39dc6de87ef9dc11ed83e5ca52e013425cfd89","2d78a397234d9b3325910135668cffba83af759074ceadc0afd281795ca8b9fc","22f67790611304c6726a7e333265c1b64e472e78bb661f734a4cd715402d3e9f",{"version":"f254c1abf6bb4c92633159831f924588908da902aa5e04ae45c39bd001f62e2e","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[141],[61],[57,58,59,60],[46],[45],[45,46,47,48,49,50,51,52,53,54,55],[48],[50],[81,82,83,84],[81],[82],[65],[61,62],[61,62,70,79],[62,79,86,87],[62,89],[62,79],[62,79,86],[79,149],[61,94,127,128],[61,79,86,130],[61,79,128,130],[63,79,152],[61,79,94,129,133,134,135,136],[63,128],[61,79,139],[61,79,128],[61,63,79,94,127],[61,79,127],[61,79],[61,128],[79],[61,79,94,141,142],[144],[63,64,79,152],[79,144],[145],[62,63,64,65,66,67,80,88,89,90,91,92,128,129,131,132,133,134,135,136,137,138,139,140,143,144,145,146,147,148,150,151,153,154,155,156,157],[56,61],[63],[85],[95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,119,120,121],[118],[122,123,124,125,126],[71],[71,72,74,75,76,77,78],[73],[61,71],[68,69],[70],[93]],"referencedMap":[[142,1],[73,2],[61,3],[47,4],[48,5],[56,6],[49,5],[50,5],[51,7],[52,8],[46,5],[53,8],[54,5],[55,8],[85,9],[82,10],[83,11],[66,12],[67,13],[80,14],[88,15],[90,16],[91,17],[92,18],[150,19],[129,20],[131,21],[132,22],[153,23],[137,24],[138,25],[140,26],[155,27],[157,28],[133,29],[135,30],[134,30],[156,31],[89,32],[139,32],[143,33],[144,32],[136,30],[145,32],[146,34],[128,30],[148,30],[154,35],[147,36],[151,37],[158,38],[62,39],[64,40],[86,41],[122,42],[119,43],[127,44],[72,45],[79,46],[78,2],[74,47],[71,2],[77,48],[70,49],[68,50],[94,51]],"exportedModulesMap":[[142,1],[73,2],[61,3],[47,4],[48,5],[56,6],[49,5],[50,5],[51,7],[52,8],[46,5],[53,8],[54,5],[55,8],[85,9],[82,10],[83,11],[66,12],[67,13],[80,14],[88,15],[90,16],[91,17],[92,18],[150,19],[129,20],[131,21],[132,22],[153,23],[137,24],[138,25],[140,26],[155,27],[157,28],[133,29],[135,30],[134,30],[156,31],[89,32],[139,32],[143,33],[144,32],[136,30],[145,32],[146,34],[128,30],[148,30],[154,35],[147,36],[151,37],[158,38],[62,39],[64,40],[86,41],[122,42],[119,43],[127,44],[72,45],[79,46],[78,2],[74,47],[71,2],[77,48],[70,49],[68,50],[94,51]],"semanticDiagnosticsPerFile":[141,142,59,73,57,61,58,60,47,48,56,130,49,50,51,45,52,46,53,54,55,10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,41,42,43,1,9,44,152,81,84,85,82,83,66,67,65,80,88,87,90,91,92,150,129,131,132,153,137,138,140,155,157,133,135,134,156,89,139,143,144,136,145,146,128,148,154,147,151,158,62,63,64,86,124,118,95,98,96,97,101,99,100,122,112,117,102,103,104,105,120,106,107,108,109,119,111,114,110,121,116,113,115,125,127,123,126,72,79,76,78,74,71,77,75,69,70,68,94,93,149,159]},"version":"4.4.2"}
@@ -1,197 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { focus } from '@wordpress/dom';
5
-
6
- /**
7
- * Internal dependencies
8
- */
9
- import { debounce } from '../../utils/debounce';
10
- import useRefEffect from '../use-ref-effect';
11
-
12
- /**
13
- * Names of control nodes which qualify for disabled behavior.
14
- *
15
- * See WHATWG HTML Standard: 4.10.18.5: "Enabling and disabling form controls: the disabled attribute".
16
- *
17
- * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#enabling-and-disabling-form-controls:-the-disabled-attribute
18
- *
19
- * @type {string[]}
20
- */
21
- const DISABLED_ELIGIBLE_NODE_NAMES = [
22
- 'BUTTON',
23
- 'FIELDSET',
24
- 'INPUT',
25
- 'OPTGROUP',
26
- 'OPTION',
27
- 'SELECT',
28
- 'TEXTAREA',
29
- ];
30
-
31
- /**
32
- * In some circumstances, such as block previews, all focusable DOM elements
33
- * (input fields, links, buttons, etc.) need to be disabled. This hook adds the
34
- * behavior to disable nested DOM elements to the returned ref.
35
- *
36
- * @param {Object} config Configuration object.
37
- * @param {boolean=} config.isDisabled Whether the element should be disabled.
38
- * @return {import('react').RefCallback<HTMLElement>} Element Ref.
39
- *
40
- * @example
41
- * ```js
42
- * import { useDisabled } from '@wordpress/compose';
43
- * const DisabledExample = () => {
44
- * const disabledRef = useDisabled();
45
- * return (
46
- * <div ref={ disabledRef }>
47
- * <a href="#">This link will have tabindex set to -1</a>
48
- * <input placeholder="This input will have the disabled attribute added to it." type="text" />
49
- * </div>
50
- * );
51
- * };
52
- * ```
53
- */
54
- export default function useDisabled( {
55
- isDisabled: isDisabledProp = false,
56
- } = {} ) {
57
- return useRefEffect(
58
- ( node ) => {
59
- if ( isDisabledProp ) {
60
- return;
61
- }
62
-
63
- /** A variable keeping track of the previous updates in order to restore them. */
64
- /** @type {Function[]} */
65
- const updates = [];
66
-
67
- const disable = () => {
68
- if ( node.style.getPropertyValue( 'user-select' ) !== 'none' ) {
69
- const previousValue =
70
- node.style.getPropertyValue( 'user-select' );
71
- node.style.setProperty( 'user-select', 'none' );
72
- node.style.setProperty( '-webkit-user-select', 'none' );
73
- updates.push( () => {
74
- if ( ! node.isConnected ) {
75
- return;
76
- }
77
- node.style.setProperty( 'user-select', previousValue );
78
- node.style.setProperty(
79
- '-webkit-user-select',
80
- previousValue
81
- );
82
- } );
83
- }
84
-
85
- focus.focusable.find( node ).forEach( ( focusable ) => {
86
- if (
87
- DISABLED_ELIGIBLE_NODE_NAMES.includes(
88
- focusable.nodeName
89
- ) &&
90
- // @ts-ignore
91
- ! focusable.disabled
92
- ) {
93
- focusable.setAttribute( 'disabled', '' );
94
- updates.push( () => {
95
- if ( ! focusable.isConnected ) {
96
- return;
97
- }
98
- // @ts-ignore
99
- focusable.disabled = false;
100
- } );
101
- }
102
-
103
- if (
104
- focusable.nodeName === 'A' &&
105
- focusable.getAttribute( 'tabindex' ) !== '-1'
106
- ) {
107
- const previousValue =
108
- focusable.getAttribute( 'tabindex' );
109
- focusable.setAttribute( 'tabindex', '-1' );
110
- updates.push( () => {
111
- if ( ! focusable.isConnected ) {
112
- return;
113
- }
114
- if ( ! previousValue ) {
115
- focusable.removeAttribute( 'tabindex' );
116
- } else {
117
- focusable.setAttribute(
118
- 'tabindex',
119
- previousValue
120
- );
121
- }
122
- } );
123
- }
124
-
125
- const tabIndex = focusable.getAttribute( 'tabindex' );
126
- if ( tabIndex !== null && tabIndex !== '-1' ) {
127
- focusable.removeAttribute( 'tabindex' );
128
- updates.push( () => {
129
- if ( ! focusable.isConnected ) {
130
- return;
131
- }
132
- focusable.setAttribute( 'tabindex', tabIndex );
133
- } );
134
- }
135
-
136
- if (
137
- focusable.hasAttribute( 'contenteditable' ) &&
138
- focusable.getAttribute( 'contenteditable' ) !== 'false'
139
- ) {
140
- focusable.setAttribute( 'contenteditable', 'false' );
141
- updates.push( () => {
142
- if ( ! focusable.isConnected ) {
143
- return;
144
- }
145
- focusable.setAttribute( 'contenteditable', 'true' );
146
- } );
147
- }
148
-
149
- if (
150
- node.ownerDocument.defaultView?.HTMLElement &&
151
- focusable instanceof
152
- node.ownerDocument.defaultView.HTMLElement
153
- ) {
154
- const previousValue =
155
- focusable.style.getPropertyValue(
156
- 'pointer-events'
157
- );
158
- focusable.style.setProperty( 'pointer-events', 'none' );
159
- updates.push( () => {
160
- if ( ! focusable.isConnected ) {
161
- return;
162
- }
163
- focusable.style.setProperty(
164
- 'pointer-events',
165
- previousValue
166
- );
167
- } );
168
- }
169
- } );
170
- };
171
-
172
- // Debounce re-disable since disabling process itself will incur
173
- // additional mutations which should be ignored.
174
- const debouncedDisable = debounce( disable, 0, {
175
- leading: true,
176
- } );
177
- disable();
178
-
179
- /** @type {MutationObserver | undefined} */
180
- const observer = new window.MutationObserver( debouncedDisable );
181
- observer.observe( node, {
182
- childList: true,
183
- attributes: true,
184
- subtree: true,
185
- } );
186
-
187
- return () => {
188
- if ( observer ) {
189
- observer.disconnect();
190
- }
191
- debouncedDisable.cancel();
192
- updates.forEach( ( update ) => update() );
193
- };
194
- },
195
- [ isDisabledProp ]
196
- );
197
- }