@wordpress/compose 7.45.0 → 7.45.1-next.v.202605131006.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/build/hooks/use-copy-to-clipboard/index.cjs.map +2 -2
- package/build-module/hooks/use-copy-to-clipboard/index.mjs.map +2 -2
- package/build-types/higher-order/compose.d.ts.map +1 -1
- package/build-types/higher-order/if-condition/index.d.ts.map +1 -1
- package/build-types/higher-order/pipe.d.ts.map +1 -1
- package/build-types/higher-order/pure/index.d.ts.map +1 -1
- package/build-types/higher-order/with-global-events/index.d.ts.map +1 -1
- package/build-types/higher-order/with-global-events/listener.d.ts +5 -6
- package/build-types/higher-order/with-global-events/listener.d.ts.map +1 -1
- package/build-types/higher-order/with-instance-id/index.d.ts.map +1 -1
- package/build-types/higher-order/with-safe-timeout/index.d.ts +1 -1
- package/build-types/higher-order/with-safe-timeout/index.d.ts.map +1 -1
- package/build-types/higher-order/with-state/index.d.ts.map +1 -1
- package/build-types/hooks/use-async-list/index.d.ts.map +1 -1
- package/build-types/hooks/use-constrained-tabbing/index.d.ts +1 -1
- package/build-types/hooks/use-constrained-tabbing/index.d.ts.map +1 -1
- package/build-types/hooks/use-copy-to-clipboard/index.d.ts.map +1 -1
- package/build-types/hooks/use-debounce/index.d.ts +1 -1
- package/build-types/hooks/use-debounce/index.d.ts.map +1 -1
- package/build-types/hooks/use-dialog/index.d.ts.map +1 -1
- package/build-types/hooks/use-disabled/index.d.ts +1 -1
- package/build-types/hooks/use-disabled/index.d.ts.map +1 -1
- package/build-types/hooks/use-dragging/index.d.ts.map +1 -1
- package/build-types/hooks/use-drop-zone/index.d.ts +9 -9
- package/build-types/hooks/use-drop-zone/index.d.ts.map +1 -1
- package/build-types/hooks/use-fixed-window-list/index.d.ts +12 -36
- package/build-types/hooks/use-fixed-window-list/index.d.ts.map +1 -1
- package/build-types/hooks/use-focus-on-mount/index.d.ts.map +1 -1
- package/build-types/hooks/use-focus-return/index.d.ts +1 -1
- package/build-types/hooks/use-focus-return/index.d.ts.map +1 -1
- package/build-types/hooks/use-instance-id/index.d.ts.map +1 -1
- package/build-types/hooks/use-isomorphic-layout-effect/index.d.ts +5 -2
- package/build-types/hooks/use-isomorphic-layout-effect/index.d.ts.map +1 -1
- package/build-types/hooks/use-keyboard-shortcut/index.d.ts +10 -20
- package/build-types/hooks/use-keyboard-shortcut/index.d.ts.map +1 -1
- package/build-types/hooks/use-reduced-motion/index.d.ts +2 -2
- package/build-types/hooks/use-reduced-motion/index.d.ts.map +1 -1
- package/build-types/hooks/use-state-with-history/index.d.ts.map +1 -1
- package/build-types/hooks/use-throttle/index.d.ts +1 -1
- package/build-types/hooks/use-throttle/index.d.ts.map +1 -1
- package/build-types/hooks/use-viewport-match/index.d.ts +2 -18
- package/build-types/hooks/use-viewport-match/index.d.ts.map +1 -1
- package/build-types/hooks/use-warn-on-change/index.d.ts +1 -1
- package/build-types/hooks/use-warn-on-change/index.d.ts.map +1 -1
- package/build-types/index.d.ts +42 -42
- package/build-types/index.d.ts.map +1 -1
- package/build-types/utils/create-higher-order-component/index.d.ts.map +1 -1
- package/build-types/utils/debounce/index.d.ts.map +1 -1
- package/build-types/utils/throttle/index.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/hooks/use-copy-to-clipboard/index.ts +0 -1
package/README.md
CHANGED
|
@@ -394,17 +394,17 @@ _Returns_
|
|
|
394
394
|
|
|
395
395
|
### useInstanceId
|
|
396
396
|
|
|
397
|
-
|
|
397
|
+
Specify the useInstanceId _function_ signatures.
|
|
398
398
|
|
|
399
|
-
|
|
399
|
+
More accurately, useInstanceId distinguishes between three different signatures:
|
|
400
400
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
401
|
+
1. When only object is given, the returned value is a number
|
|
402
|
+
2. When object and prefix is given, the returned value is a string
|
|
403
|
+
3. When preferredId is given, the returned value is the type of preferredId
|
|
404
404
|
|
|
405
|
-
|
|
405
|
+
_Parameters_
|
|
406
406
|
|
|
407
|
-
- `
|
|
407
|
+
- _object_ `object`: Object reference to create an id for.
|
|
408
408
|
|
|
409
409
|
### useIsomorphicLayoutEffect
|
|
410
410
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/use-copy-to-clipboard/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRef, useLayoutEffect } from '@wordpress/element';\nimport type { MutableRefObject, RefCallback } from 'react';\n\n/**\n * Internal dependencies\n */\nimport useRefEffect from '../use-ref-effect';\n\n/**\n * Copies text to the clipboard using the Clipboard API when available,\n * with a fallback for non-secure contexts (e.g. HTTP) and older browsers.\n *\n * @param text The text to copy.\n * @param trigger The element that triggered the copy.\n * @return Resolves to true if successful, false otherwise.\n */\nexport async function copyToClipboard(\n\ttext: string,\n\ttrigger: Element | null\n): Promise< boolean > {\n\tif ( ! trigger ) {\n\t\treturn false;\n\t}\n\tconst { ownerDocument } = trigger;\n\tif ( ! ownerDocument ) {\n\t\treturn false;\n\t}\n\tconst { defaultView } = ownerDocument;\n\ttry {\n\t\tif ( defaultView?.navigator?.clipboard?.writeText ) {\n\t\t\tawait defaultView.navigator.clipboard.writeText( text );\n\t\t\treturn true;\n\t\t}\n\t\t// Fallback for non-secure contexts (HTTP) and older browsers.\n\t\tconst textarea = ownerDocument.createElement( 'textarea' );\n\t\ttextarea.value = text;\n\t\ttextarea.setAttribute( 'readonly', '' );\n\t\ttextarea.style.position = 'fixed';\n\t\ttextarea.style.left = '-9999px';\n\t\ttextarea.style.top = '-9999px';\n\t\townerDocument.body.appendChild( textarea );\n\t\ttextarea.select();\n\t\tconst success = ownerDocument.execCommand( 'copy' );\n\t\ttextarea.remove();\n\t\treturn success;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n/**\n * Clears the current selection and restores focus to the trigger element.\n *\n * @param trigger The element that triggered the copy.\n */\nexport function clearSelection( trigger: Element ): void {\n\tif ( 'focus' in trigger && typeof trigger.focus === 'function' ) {\n\t\ttrigger.focus();\n\t}\n\ttrigger.ownerDocument?.defaultView?.getSelection()?.removeAllRanges();\n}\n\n/**\n * @template T\n * @param value\n * @return A ref to assign to the target element.\n */\nfunction useUpdatedRef< T >( value: T ): MutableRefObject< T > {\n\tconst ref = useRef< T >( value );\n\tuseLayoutEffect( () => {\n\t\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAwC;AAMxC,4BAAyB;AAUzB,eAAsB,gBACrB,MACA,SACqB;AACrB,MAAK,CAAE,SAAU;AAChB,WAAO;AAAA,EACR;AACA,QAAM,EAAE,cAAc,IAAI;AAC1B,MAAK,CAAE,eAAgB;AACtB,WAAO;AAAA,EACR;AACA,QAAM,EAAE,YAAY,IAAI;AACxB,MAAI;AACH,QAAK,aAAa,WAAW,WAAW,WAAY;AACnD,YAAM,YAAY,UAAU,UAAU,UAAW,IAAK;AACtD,aAAO;AAAA,IACR;AAEA,UAAM,WAAW,cAAc,cAAe,UAAW;AACzD,aAAS,QAAQ;AACjB,aAAS,aAAc,YAAY,EAAG;AACtC,aAAS,MAAM,WAAW;AAC1B,aAAS,MAAM,OAAO;AACtB,aAAS,MAAM,MAAM;AACrB,kBAAc,KAAK,YAAa,QAAS;AACzC,aAAS,OAAO;AAChB,UAAM,UAAU,cAAc,YAAa,MAAO;AAClD,aAAS,OAAO;AAChB,WAAO;AAAA,EACR,QAAQ;AACP,WAAO;AAAA,EACR;AACD;AAOO,SAAS,eAAgB,SAAyB;AACxD,MAAK,WAAW,WAAW,OAAO,QAAQ,UAAU,YAAa;AAChE,YAAQ,MAAM;AAAA,EACf;AACA,UAAQ,eAAe,aAAa,aAAa,GAAG,gBAAgB;AACrE;AAOA,SAAS,cAAoB,OAAkC;AAC9D,QAAM,UAAM,uBAAa,KAAM;AAC/B,sCAAiB,MAAM;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRef, useLayoutEffect } from '@wordpress/element';\nimport type { MutableRefObject, RefCallback } from 'react';\n\n/**\n * Internal dependencies\n */\nimport useRefEffect from '../use-ref-effect';\n\n/**\n * Copies text to the clipboard using the Clipboard API when available,\n * with a fallback for non-secure contexts (e.g. HTTP) and older browsers.\n *\n * @param text The text to copy.\n * @param trigger The element that triggered the copy.\n * @return Resolves to true if successful, false otherwise.\n */\nexport async function copyToClipboard(\n\ttext: string,\n\ttrigger: Element | null\n): Promise< boolean > {\n\tif ( ! trigger ) {\n\t\treturn false;\n\t}\n\tconst { ownerDocument } = trigger;\n\tif ( ! ownerDocument ) {\n\t\treturn false;\n\t}\n\tconst { defaultView } = ownerDocument;\n\ttry {\n\t\tif ( defaultView?.navigator?.clipboard?.writeText ) {\n\t\t\tawait defaultView.navigator.clipboard.writeText( text );\n\t\t\treturn true;\n\t\t}\n\t\t// Fallback for non-secure contexts (HTTP) and older browsers.\n\t\tconst textarea = ownerDocument.createElement( 'textarea' );\n\t\ttextarea.value = text;\n\t\ttextarea.setAttribute( 'readonly', '' );\n\t\ttextarea.style.position = 'fixed';\n\t\ttextarea.style.left = '-9999px';\n\t\ttextarea.style.top = '-9999px';\n\t\townerDocument.body.appendChild( textarea );\n\t\ttextarea.select();\n\t\tconst success = ownerDocument.execCommand( 'copy' );\n\t\ttextarea.remove();\n\t\treturn success;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n/**\n * Clears the current selection and restores focus to the trigger element.\n *\n * @param trigger The element that triggered the copy.\n */\nexport function clearSelection( trigger: Element ): void {\n\tif ( 'focus' in trigger && typeof trigger.focus === 'function' ) {\n\t\ttrigger.focus();\n\t}\n\ttrigger.ownerDocument?.defaultView?.getSelection()?.removeAllRanges();\n}\n\n/**\n * @template T\n * @param value\n * @return A ref to assign to the target element.\n */\nfunction useUpdatedRef< T >( value: T ): MutableRefObject< T > {\n\tconst ref = useRef< T >( value );\n\tuseLayoutEffect( () => {\n\t\tref.current = value;\n\t}, [ value ] );\n\treturn ref;\n}\n\n/**\n * Copies the given text to the clipboard when the element is clicked.\n *\n * @template T\n * @param text The text to copy. Use a function if not\n * already available and expensive to compute.\n * @param onSuccess Called when to text is copied.\n *\n * @return A ref to assign to the target element.\n */\nexport default function useCopyToClipboard< T extends HTMLElement >(\n\ttext: string | ( () => string ),\n\tonSuccess?: () => void\n): RefCallback< T > {\n\tconst textRef = useUpdatedRef( text );\n\tconst onSuccessRef = useUpdatedRef( onSuccess );\n\treturn useRefEffect( ( node ) => {\n\t\t// Flag to prevent callbacks after unmount when the Promise resolves.\n\t\tlet isActive = true;\n\t\tconst handleClick = async () => {\n\t\t\tconst textToCopy =\n\t\t\t\ttypeof textRef.current === 'function'\n\t\t\t\t\t? textRef.current()\n\t\t\t\t\t: textRef.current || '';\n\t\t\tconst success = await copyToClipboard( textToCopy, node );\n\t\t\tif ( ! isActive ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( success ) {\n\t\t\t\tclearSelection( node );\n\t\t\t\tif ( onSuccessRef.current ) {\n\t\t\t\t\tonSuccessRef.current();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tnode.addEventListener( 'click', handleClick );\n\t\treturn () => {\n\t\t\tisActive = false;\n\t\t\tnode.removeEventListener( 'click', handleClick );\n\t\t};\n\t}, [] );\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAwC;AAMxC,4BAAyB;AAUzB,eAAsB,gBACrB,MACA,SACqB;AACrB,MAAK,CAAE,SAAU;AAChB,WAAO;AAAA,EACR;AACA,QAAM,EAAE,cAAc,IAAI;AAC1B,MAAK,CAAE,eAAgB;AACtB,WAAO;AAAA,EACR;AACA,QAAM,EAAE,YAAY,IAAI;AACxB,MAAI;AACH,QAAK,aAAa,WAAW,WAAW,WAAY;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;AAAA,IAChD;AAAA,EACD,GAAG,CAAC,CAAE;AACP;",
|
|
6
6
|
"names": ["useRefEffect"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/use-copy-to-clipboard/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRef, useLayoutEffect } from '@wordpress/element';\nimport type { MutableRefObject, RefCallback } from 'react';\n\n/**\n * Internal dependencies\n */\nimport useRefEffect from '../use-ref-effect';\n\n/**\n * Copies text to the clipboard using the Clipboard API when available,\n * with a fallback for non-secure contexts (e.g. HTTP) and older browsers.\n *\n * @param text The text to copy.\n * @param trigger The element that triggered the copy.\n * @return Resolves to true if successful, false otherwise.\n */\nexport async function copyToClipboard(\n\ttext: string,\n\ttrigger: Element | null\n): Promise< boolean > {\n\tif ( ! trigger ) {\n\t\treturn false;\n\t}\n\tconst { ownerDocument } = trigger;\n\tif ( ! ownerDocument ) {\n\t\treturn false;\n\t}\n\tconst { defaultView } = ownerDocument;\n\ttry {\n\t\tif ( defaultView?.navigator?.clipboard?.writeText ) {\n\t\t\tawait defaultView.navigator.clipboard.writeText( text );\n\t\t\treturn true;\n\t\t}\n\t\t// Fallback for non-secure contexts (HTTP) and older browsers.\n\t\tconst textarea = ownerDocument.createElement( 'textarea' );\n\t\ttextarea.value = text;\n\t\ttextarea.setAttribute( 'readonly', '' );\n\t\ttextarea.style.position = 'fixed';\n\t\ttextarea.style.left = '-9999px';\n\t\ttextarea.style.top = '-9999px';\n\t\townerDocument.body.appendChild( textarea );\n\t\ttextarea.select();\n\t\tconst success = ownerDocument.execCommand( 'copy' );\n\t\ttextarea.remove();\n\t\treturn success;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n/**\n * Clears the current selection and restores focus to the trigger element.\n *\n * @param trigger The element that triggered the copy.\n */\nexport function clearSelection( trigger: Element ): void {\n\tif ( 'focus' in trigger && typeof trigger.focus === 'function' ) {\n\t\ttrigger.focus();\n\t}\n\ttrigger.ownerDocument?.defaultView?.getSelection()?.removeAllRanges();\n}\n\n/**\n * @template T\n * @param value\n * @return A ref to assign to the target element.\n */\nfunction useUpdatedRef< T >( value: T ): MutableRefObject< T > {\n\tconst ref = useRef< T >( value );\n\tuseLayoutEffect( () => {\n\t\
|
|
5
|
-
"mappings": ";AAGA,SAAS,QAAQ,uBAAuB;AAMxC,OAAO,kBAAkB;AAUzB,eAAsB,gBACrB,MACA,SACqB;AACrB,MAAK,CAAE,SAAU;AAChB,WAAO;AAAA,EACR;AACA,QAAM,EAAE,cAAc,IAAI;AAC1B,MAAK,CAAE,eAAgB;AACtB,WAAO;AAAA,EACR;AACA,QAAM,EAAE,YAAY,IAAI;AACxB,MAAI;AACH,QAAK,aAAa,WAAW,WAAW,WAAY;AACnD,YAAM,YAAY,UAAU,UAAU,UAAW,IAAK;AACtD,aAAO;AAAA,IACR;AAEA,UAAM,WAAW,cAAc,cAAe,UAAW;AACzD,aAAS,QAAQ;AACjB,aAAS,aAAc,YAAY,EAAG;AACtC,aAAS,MAAM,WAAW;AAC1B,aAAS,MAAM,OAAO;AACtB,aAAS,MAAM,MAAM;AACrB,kBAAc,KAAK,YAAa,QAAS;AACzC,aAAS,OAAO;AAChB,UAAM,UAAU,cAAc,YAAa,MAAO;AAClD,aAAS,OAAO;AAChB,WAAO;AAAA,EACR,QAAQ;AACP,WAAO;AAAA,EACR;AACD;AAOO,SAAS,eAAgB,SAAyB;AACxD,MAAK,WAAW,WAAW,OAAO,QAAQ,UAAU,YAAa;AAChE,YAAQ,MAAM;AAAA,EACf;AACA,UAAQ,eAAe,aAAa,aAAa,GAAG,gBAAgB;AACrE;AAOA,SAAS,cAAoB,OAAkC;AAC9D,QAAM,MAAM,OAAa,KAAM;AAC/B,kBAAiB,MAAM;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRef, useLayoutEffect } from '@wordpress/element';\nimport type { MutableRefObject, RefCallback } from 'react';\n\n/**\n * Internal dependencies\n */\nimport useRefEffect from '../use-ref-effect';\n\n/**\n * Copies text to the clipboard using the Clipboard API when available,\n * with a fallback for non-secure contexts (e.g. HTTP) and older browsers.\n *\n * @param text The text to copy.\n * @param trigger The element that triggered the copy.\n * @return Resolves to true if successful, false otherwise.\n */\nexport async function copyToClipboard(\n\ttext: string,\n\ttrigger: Element | null\n): Promise< boolean > {\n\tif ( ! trigger ) {\n\t\treturn false;\n\t}\n\tconst { ownerDocument } = trigger;\n\tif ( ! ownerDocument ) {\n\t\treturn false;\n\t}\n\tconst { defaultView } = ownerDocument;\n\ttry {\n\t\tif ( defaultView?.navigator?.clipboard?.writeText ) {\n\t\t\tawait defaultView.navigator.clipboard.writeText( text );\n\t\t\treturn true;\n\t\t}\n\t\t// Fallback for non-secure contexts (HTTP) and older browsers.\n\t\tconst textarea = ownerDocument.createElement( 'textarea' );\n\t\ttextarea.value = text;\n\t\ttextarea.setAttribute( 'readonly', '' );\n\t\ttextarea.style.position = 'fixed';\n\t\ttextarea.style.left = '-9999px';\n\t\ttextarea.style.top = '-9999px';\n\t\townerDocument.body.appendChild( textarea );\n\t\ttextarea.select();\n\t\tconst success = ownerDocument.execCommand( 'copy' );\n\t\ttextarea.remove();\n\t\treturn success;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n/**\n * Clears the current selection and restores focus to the trigger element.\n *\n * @param trigger The element that triggered the copy.\n */\nexport function clearSelection( trigger: Element ): void {\n\tif ( 'focus' in trigger && typeof trigger.focus === 'function' ) {\n\t\ttrigger.focus();\n\t}\n\ttrigger.ownerDocument?.defaultView?.getSelection()?.removeAllRanges();\n}\n\n/**\n * @template T\n * @param value\n * @return A ref to assign to the target element.\n */\nfunction useUpdatedRef< T >( value: T ): MutableRefObject< T > {\n\tconst ref = useRef< T >( value );\n\tuseLayoutEffect( () => {\n\t\tref.current = value;\n\t}, [ value ] );\n\treturn ref;\n}\n\n/**\n * Copies the given text to the clipboard when the element is clicked.\n *\n * @template T\n * @param text The text to copy. Use a function if not\n * already available and expensive to compute.\n * @param onSuccess Called when to text is copied.\n *\n * @return A ref to assign to the target element.\n */\nexport default function useCopyToClipboard< T extends HTMLElement >(\n\ttext: string | ( () => string ),\n\tonSuccess?: () => void\n): RefCallback< T > {\n\tconst textRef = useUpdatedRef( text );\n\tconst onSuccessRef = useUpdatedRef( onSuccess );\n\treturn useRefEffect( ( node ) => {\n\t\t// Flag to prevent callbacks after unmount when the Promise resolves.\n\t\tlet isActive = true;\n\t\tconst handleClick = async () => {\n\t\t\tconst textToCopy =\n\t\t\t\ttypeof textRef.current === 'function'\n\t\t\t\t\t? textRef.current()\n\t\t\t\t\t: textRef.current || '';\n\t\t\tconst success = await copyToClipboard( textToCopy, node );\n\t\t\tif ( ! isActive ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( success ) {\n\t\t\t\tclearSelection( node );\n\t\t\t\tif ( onSuccessRef.current ) {\n\t\t\t\t\tonSuccessRef.current();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tnode.addEventListener( 'click', handleClick );\n\t\treturn () => {\n\t\t\tisActive = false;\n\t\t\tnode.removeEventListener( 'click', handleClick );\n\t\t};\n\t}, [] );\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,QAAQ,uBAAuB;AAMxC,OAAO,kBAAkB;AAUzB,eAAsB,gBACrB,MACA,SACqB;AACrB,MAAK,CAAE,SAAU;AAChB,WAAO;AAAA,EACR;AACA,QAAM,EAAE,cAAc,IAAI;AAC1B,MAAK,CAAE,eAAgB;AACtB,WAAO;AAAA,EACR;AACA,QAAM,EAAE,YAAY,IAAI;AACxB,MAAI;AACH,QAAK,aAAa,WAAW,WAAW,WAAY;AACnD,YAAM,YAAY,UAAU,UAAU,UAAW,IAAK;AACtD,aAAO;AAAA,IACR;AAEA,UAAM,WAAW,cAAc,cAAe,UAAW;AACzD,aAAS,QAAQ;AACjB,aAAS,aAAc,YAAY,EA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/higher-order/compose.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,QAAA,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/higher-order/compose.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,QAAA,MAAM,OAAO,2DAAmB,CAAC;eAElB,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/higher-order/if-condition/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAO3C;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,WAAW,CAAE,KAAK,SAAS,EAAE,EACrC,SAAS,EAAE,CAAE,KAAK,EAAE,KAAK,KAAM,OAAO,4CAGoB,KAAK,wCAS/D;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/higher-order/if-condition/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAO3C;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,WAAW,CAAE,KAAK,SAAS,EAAE,EACrC,SAAS,EAAE,CAAE,KAAK,EAAE,KAAK,KAAM,OAAO,4CAGoB,KAAK,wCAS/D;eAEc,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipe.d.ts","sourceRoot":"","sources":["../../src/higher-order/pipe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;GAQG;AACH,QAAA,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"pipe.d.ts","sourceRoot":"","sources":["../../src/higher-order/pipe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;GAQG;AACH,QAAA,MAAM,QAAQ,aACF,OAAO,gBACN,QAAQ,EAAE,eACX,OAAO,EAAE,YASnB,CAAC;AAEH;;;;;;;GAOG;AACH,QAAA,MAAM,IAAI,aApBG,QAAQ,EAAE,eACX,OAAO,EAAE,YAmBE,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,CAAC;eAEL,IAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/higher-order/pure/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAkB,MAAM,OAAO,CAAC;AAa3D;;;;;GAKG;AACH,QAAA,MAAM,IAAI,GAA0C,KAAK,SAAS,EAAE,sDAuBzD,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/higher-order/pure/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAkB,MAAM,OAAO,CAAC;AAa3D;;;;;GAKG;AACH,QAAA,MAAM,IAAI,GAA0C,KAAK,SAAS,EAAE,sDAuBzD,CAAC;eAEG,IAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/higher-order/with-global-events/index.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;;;;GAkBG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/higher-order/with-global-events/index.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAE,oBAAoB,EATnD,MAAM,CAAC,MAAM,2BAA2B,EAAE,MAAM,CASG,GAFlD,GAAG,CAkEd"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
export default Listener;
|
|
2
1
|
/**
|
|
3
2
|
* Class responsible for orchestrating event handling on the global window,
|
|
4
3
|
* binding a single event to be shared across all handling instances, and
|
|
5
4
|
* removing the handler when no instances are listening for the event.
|
|
6
5
|
*/
|
|
7
6
|
declare class Listener {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
remove(eventType: any, instance: any): void;
|
|
7
|
+
constructor();
|
|
8
|
+
add(/** @type {any} */ eventType: any, /** @type {any} */ instance: any): void;
|
|
9
|
+
remove(/** @type {any} */ eventType: any, /** @type {any} */ instance: any): void;
|
|
10
|
+
handleEvent(/** @type {any} */ event: any): void;
|
|
13
11
|
}
|
|
12
|
+
export default Listener;
|
|
14
13
|
//# sourceMappingURL=listener.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../src/higher-order/with-global-events/listener.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../src/higher-order/with-global-events/listener.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAM,QAAQ;IACb,cAKC;IAED,GAAG,CAAE,kBAAkB,CAAC,SAAS,EAAjB,GAAiB,EAAE,kBAAkB,CAAC,QAAQ,EAAhB,GAAgB,QAQ7D;IAED,MAAM,CAAE,kBAAkB,CAAC,SAAS,EAAjB,GAAiB,EAAE,kBAAkB,CAAC,QAAQ,EAAhB,GAAgB,QAchE;IAED,WAAW,CAAE,kBAAkB,CAAC,KAAK,EAAb,GAAa,QAMpC;CACD;eAEc,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/higher-order/with-instance-id/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EACX,iBAAiB,EACjB,oBAAoB,EACpB,MAAM,2CAA2C,CAAC;AAInD,KAAK,eAAe,GAAG;IAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAEvD;;GAEG;AACH,QAAA,MAAM,cAAc,GACjB,CAAC,SAAS,iBAAiB,CAAE,CAAC,EAAE,eAAe,CAAE,uBAGlC,oBAAoB,CAAE,CAAC,EAAE,eAAe,CAAE,gCAO3D,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/higher-order/with-instance-id/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EACX,iBAAiB,EACjB,oBAAoB,EACpB,MAAM,2CAA2C,CAAC;AAInD,KAAK,eAAe,GAAG;IAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAEvD;;GAEG;AACH,QAAA,MAAM,cAAc,GACjB,CAAC,SAAS,iBAAiB,CAAE,CAAC,EAAE,eAAe,CAAE,uBAGlC,oBAAoB,CAAE,CAAC,EAAE,eAAe,CAAE,gCAO3D,CAAC;eAEa,cAAc"}
|
|
@@ -26,7 +26,7 @@ declare const withSafeTimeout: <C extends WithInjectedProps<C, TimeoutProps>>(In
|
|
|
26
26
|
clearTimeout(id: number): void;
|
|
27
27
|
render(): import("react").JSX.Element;
|
|
28
28
|
context: unknown;
|
|
29
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<WithoutInjectedProps<C, TimeoutProps>>) =>
|
|
29
|
+
setState<K extends never>(state: Pick<{}, K> | ((prevState: Readonly<{}>, props: Readonly<WithoutInjectedProps<C, TimeoutProps>>) => Pick<{}, K> | {} | null) | {} | null, callback?: (() => void) | undefined): void;
|
|
30
30
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
31
31
|
readonly props: Readonly<WithoutInjectedProps<C, TimeoutProps>>;
|
|
32
32
|
state: Readonly<{}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/higher-order/with-safe-timeout/index.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EACX,iBAAiB,EACjB,oBAAoB,EACpB,MAAM,2CAA2C,CAAC;AAGnD;;;;;;;GAOG;AACH,UAAU,YAAY;IACrB,UAAU,EAAE,CAAE,EAAE,EAAE,MAAM,IAAI,EAAE,KAAK,EAAE,MAAM,KAAM,MAAM,CAAC;IACxD,YAAY,EAAE,CAAE,EAAE,EAAE,MAAM,KAAM,IAAI,CAAC;CACrC;AAED;;;GAGG;AACH,QAAA,MAAM,eAAe,GAClB,CAAC,SAAS,iBAAiB,CAAE,CAAC,EAAE,YAAY,CAAE;;kBAKpC,MAAM,EAAE;;uBAaF,MAAM,IAAI,SAAS,MAAM;yBASvB,MAAM;;;;;;;;;;;;;;;;;;;;;;;CAoB1B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/higher-order/with-safe-timeout/index.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EACX,iBAAiB,EACjB,oBAAoB,EACpB,MAAM,2CAA2C,CAAC;AAGnD;;;;;;;GAOG;AACH,UAAU,YAAY;IACrB,UAAU,EAAE,CAAE,EAAE,EAAE,MAAM,IAAI,EAAE,KAAK,EAAE,MAAM,KAAM,MAAM,CAAC;IACxD,YAAY,EAAE,CAAE,EAAE,EAAE,MAAM,KAAM,IAAI,CAAC;CACrC;AAED;;;GAGG;AACH,QAAA,MAAM,eAAe,GAClB,CAAC,SAAS,iBAAiB,CAAE,CAAC,EAAE,YAAY,CAAE;;kBAKpC,MAAM,EAAE;;uBAaF,MAAM,IAAI,SAAS,MAAM;yBASvB,MAAM;;;;;;;;;;;;;;;;;;;;;;;CAoB1B,CAAC;eAEa,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/higher-order/with-state/index.js"],"names":[],"mappings":"AAWA;;;;;;;;;GASG;AACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/higher-order/with-state/index.js"],"names":[],"mappings":"AAWA;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAE,YAAY,GAJpC,GAIyC,GAFxC,GAAG,CA6Bd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-async-list/index.ts"],"names":[],"mappings":"AAMA,KAAK,eAAe,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAwBF;;;;;;;;GAQG;AACH,iBAAS,YAAY,CAAE,CAAC,EACvB,IAAI,EAAE,CAAC,EAAE,EACT,MAAM,GAAE,eAA6B,GACnC,CAAC,EAAE,CA8BL;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-async-list/index.ts"],"names":[],"mappings":"AAMA,KAAK,eAAe,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAwBF;;;;;;;;GAQG;AACH,iBAAS,YAAY,CAAE,CAAC,EACvB,IAAI,EAAE,CAAC,EAAE,EACT,MAAM,GAAE,eAA6B,GACnC,CAAC,EAAE,CA8BL;eAEc,YAAY"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export default useConstrainedTabbing;
|
|
2
1
|
/**
|
|
3
2
|
* In Dialogs/modals, the tabbing must be constrained to the content of
|
|
4
3
|
* the wrapper element. This hook adds the behavior to the returned ref.
|
|
@@ -21,4 +20,5 @@ export default useConstrainedTabbing;
|
|
|
21
20
|
* ```
|
|
22
21
|
*/
|
|
23
22
|
declare function useConstrainedTabbing(): React.RefCallback<Element>;
|
|
23
|
+
export default useConstrainedTabbing;
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-constrained-tabbing/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-constrained-tabbing/index.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,iBAAS,qBAAqB,IAjBlB,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CA2ErC;eAEc,qBAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-copy-to-clipboard/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAoB,WAAW,EAAE,MAAM,OAAO,CAAC;AAO3D;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACpC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,GAAG,IAAI,GACrB,OAAO,CAAE,OAAO,CAAE,CA6BpB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAE,OAAO,EAAE,OAAO,GAAI,IAAI,CAKvD;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-copy-to-clipboard/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAoB,WAAW,EAAE,MAAM,OAAO,CAAC;AAO3D;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACpC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,GAAG,IAAI,GACrB,OAAO,CAAE,OAAO,CAAE,CA6BpB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAE,OAAO,EAAE,OAAO,GAAI,IAAI,CAKvD;AAeD;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAE,CAAC,SAAS,WAAW,EAChE,IAAI,EAAE,MAAM,GAAG,CAAE,MAAM,MAAM,CAAE,EAC/B,SAAS,CAAC,EAAE,MAAM,IAAI,GACpB,WAAW,CAAE,CAAC,CAAE,CA4BlB"}
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* @param {import('../../utils/debounce').DebounceOptions} [options] The options object.
|
|
14
14
|
* @return {import('../../utils/debounce').DebouncedFunc<TFunc>} Debounced function.
|
|
15
15
|
*/
|
|
16
|
-
export default function useDebounce<TFunc extends (...args: any[]) => void>(fn: TFunc, wait?: number, options?: import(
|
|
16
|
+
export default function useDebounce<TFunc extends (...args: any[]) => void>(fn: TFunc, wait?: number, options?: import('../../utils/debounce').DebounceOptions): import('../../utils/debounce').DebouncedFunc<TFunc>;
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-debounce/index.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;GAcG;AACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-debounce/index.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAPK,KAAK,SAA/B,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAW,EAOR,EAAE,EAL5B,KAK4B,EAAE,IAAI,AAJ1C,CACA,EADQ,MAIkC,EAAE,OAAO,AAHnD,CACA,EADQ,OAAO,sBAAsB,EAAE,eAGY,GAF1C,OAAO,sBAAsB,EAAE,aAAa,CAAC,KAAK,CAAC,CAS9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-dialog/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAYzD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,eAAe,MAAM,sBAAsB,CAAC;AAGnD,KAAK,aAAa,GAAG;IACpB;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC;IACpC;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC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
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* };
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
export default function useDisabled({ isDisabled: isDisabledProp
|
|
27
|
+
export default function useDisabled({ isDisabled: isDisabledProp }?: {
|
|
28
28
|
isDisabled?: boolean | undefined;
|
|
29
29
|
}): import("react").RefCallback<Node | null>;
|
|
30
30
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-disabled/index.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,EACpC,UAAU,EAAE,cAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-disabled/index.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,EACpC,UAAU,EAAE,cAAsB,EAClC;;CAAK,4CAmDL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-dragging/index.js"],"names":[],"mappings":"AAYA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-dragging/index.js"],"names":[],"mappings":"AAYA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,EAJxE;IAA6C,WAAW,EAAhD,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CACrC;IAA6C,UAAU,EAA/C,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAC/B;IAA6C,SAAS,EAA9C,CAAC,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAClC;CAC0E;mBA8B3D,KAAK,CAAC,UAAU,KAAK,IAAI;kBATxB,UAAU,KAAK,IAAI;;EAkCnC"}
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @return {React.RefCallback<HTMLElement>} Ref callback to be passed to the drop zone element.
|
|
15
15
|
*/
|
|
16
|
-
export default function useDropZone({ dropZoneElement, isDisabled, onDrop: _onDrop, onDragStart: _onDragStart, onDragEnter: _onDragEnter, onDragLeave: _onDragLeave, onDragEnd: _onDragEnd, onDragOver: _onDragOver
|
|
17
|
-
dropZoneElement?: HTMLElement | null
|
|
18
|
-
isDisabled?: boolean
|
|
19
|
-
onDragStart?: (
|
|
20
|
-
onDragEnter?: (
|
|
21
|
-
onDragOver?: (
|
|
22
|
-
onDragLeave?: (
|
|
23
|
-
onDragEnd?: (
|
|
24
|
-
onDrop?: (
|
|
16
|
+
export default function useDropZone({ dropZoneElement, isDisabled, onDrop: _onDrop, onDragStart: _onDragStart, onDragEnter: _onDragEnter, onDragLeave: _onDragLeave, onDragEnd: _onDragEnd, onDragOver: _onDragOver }: {
|
|
17
|
+
dropZoneElement?: HTMLElement | null;
|
|
18
|
+
isDisabled?: boolean;
|
|
19
|
+
onDragStart?: (e: DragEvent) => void;
|
|
20
|
+
onDragEnter?: (e: DragEvent) => void;
|
|
21
|
+
onDragOver?: (e: DragEvent) => void;
|
|
22
|
+
onDragLeave?: (e: DragEvent) => void;
|
|
23
|
+
onDragEnd?: (e: MouseEvent) => void;
|
|
24
|
+
onDrop?: (e: DragEvent) => void;
|
|
25
25
|
}): React.RefCallback<HTMLElement>;
|
|
26
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-drop-zone/index.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;GAcG;AACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-drop-zone/index.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,EACpC,eAAe,EACf,UAAU,EACV,MAAM,EAAE,OAAO,EACf,WAAW,EAAE,YAAY,EACzB,WAAW,EAAE,YAAY,EACzB,WAAW,EAAE,YAAY,EACzB,SAAS,EAAE,UAAU,EACrB,UAAU,EAAE,WAAW,EACvB,EApBE;IAAwC,eAAe,AAAvD,CACA,EADS,WAAW,OAAA,CACpB;IAAwC,UAAU,AAAlD,CACA,EADQ,OAAO,CACf;IAAwC,WAAW,AAAnD,CACA,EADQ,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAC9B;IAAwC,WAAW,AAAnD,CACA,EADQ,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAC9B;IAAwC,UAAU,AAAlD,CACA,EADQ,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAC9B;IAAwC,WAAW,AAAnD,CACA,EADQ,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAC9B;IAAwC,SAAS,AAAjD,CACA,EADQ,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAC/B;IAAwC,MAAM,AAA9C,CAEA,EAFQ,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAE9B;CAWF,GAXW,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,CAoMzC"}
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
export type WPFixedWindowList = {
|
|
2
|
+
visibleItems: number;
|
|
3
|
+
start: number;
|
|
4
|
+
end: number;
|
|
5
|
+
itemInView: (index: number) => boolean;
|
|
6
|
+
};
|
|
7
|
+
export type WPFixedWindowListOptions = {
|
|
8
|
+
windowOverscan?: number;
|
|
9
|
+
useWindowing?: boolean;
|
|
10
|
+
initWindowSize?: number;
|
|
11
|
+
expandedState?: any;
|
|
12
|
+
};
|
|
1
13
|
/**
|
|
2
14
|
* @typedef {Object} WPFixedWindowList
|
|
3
15
|
*
|
|
@@ -23,40 +35,4 @@
|
|
|
23
35
|
* @return {[ WPFixedWindowList, setFixedListWindow:(nextWindow:WPFixedWindowList)=>void]} Array with the fixed window list and setter
|
|
24
36
|
*/
|
|
25
37
|
export default function useFixedWindowList(elementRef: React.RefObject<HTMLElement>, itemHeight: number, totalItems: number, options?: WPFixedWindowListOptions): [WPFixedWindowList, setFixedListWindow: (nextWindow: WPFixedWindowList) => void];
|
|
26
|
-
export type WPFixedWindowList = {
|
|
27
|
-
/**
|
|
28
|
-
* Items visible in the current viewport
|
|
29
|
-
*/
|
|
30
|
-
visibleItems: number;
|
|
31
|
-
/**
|
|
32
|
-
* Start index of the window
|
|
33
|
-
*/
|
|
34
|
-
start: number;
|
|
35
|
-
/**
|
|
36
|
-
* End index of the window
|
|
37
|
-
*/
|
|
38
|
-
end: number;
|
|
39
|
-
/**
|
|
40
|
-
* Returns true if item is in the window
|
|
41
|
-
*/
|
|
42
|
-
itemInView: (index: number) => boolean;
|
|
43
|
-
};
|
|
44
|
-
export type WPFixedWindowListOptions = {
|
|
45
|
-
/**
|
|
46
|
-
* Renders windowOverscan number of items before and after the calculated visible window.
|
|
47
|
-
*/
|
|
48
|
-
windowOverscan?: number | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* When false avoids calculating the window size
|
|
51
|
-
*/
|
|
52
|
-
useWindowing?: boolean | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* Initial window size to use on first render before we can calculate the window size.
|
|
55
|
-
*/
|
|
56
|
-
initWindowSize?: number | undefined;
|
|
57
|
-
/**
|
|
58
|
-
* Used to recalculate the window size when the expanded state of a list changes.
|
|
59
|
-
*/
|
|
60
|
-
expandedState?: any;
|
|
61
|
-
};
|
|
62
38
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-fixed-window-list/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-fixed-window-list/index.js"],"names":[],"mappings":"AAeG,YAAkB,iBAAiB,GAEnC;IAAoC,YAAY,EAArC,MAAM,CACjB;IAAoC,KAAK,EAA9B,MAAM,CACjB;IAAoC,GAAG,EAA5B,MAAM,CACjB;IAAoC,UAAU,EAAnC,CAAC,KAAK,EAAC,MAAM,KAAG,OAAO,CACpC;CAAA,CAAA;AAGE,YAAkB,wBAAwB,GAE1C;IAAqB,cAAc,AAAnC,CACA,EADW,MAAM,CACjB;IAAqB,YAAY,AAAjC,CACA,EADW,OAAO,CAClB;IAAqB,cAAc,AAAnC,CACA,EADW,MAAM,CACjB;IAAqB,aAAa,AAAlC,CACF,EADa,GAAG,CAChB;CAAA,CAAA;AAhBD;;;;;;;GAOG;AAEH;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACzC,UAAU,EAPA,KAAK,CAAC,SAAS,CAAC,WAAW,CAO3B,EACV,UAAU,EAPC,MAOD,EACV,UAAU,EAPC,MAOD,EACV,OAAO,AAPL,CACA,EADS,wBAOJ,GANI,CAAE,iBAAiB,EAAE,kBAAkB,EAAC,CAAC,UAAU,EAAC,iBAAiB,KAAG,IAAI,CAAC,CA0JxF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-focus-on-mount/index.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,eAAe,CAC9B,YAAY,GAAE,eAAe,CAAC,IAAqB,mDA+DnD;AAED,yBAAiB,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-focus-on-mount/index.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,eAAe,CAC9B,YAAY,GAAE,eAAe,CAAC,IAAqB,mDA+DnD;AAED,yBAAiB,eAAe,CAAC,CAAC;IACjC,KAAY,IAAI,GAAG,OAAO,GAAG,cAAc,GAAG,mBAAmB,CAAC;CAClE"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export default useFocusReturn;
|
|
2
1
|
/**
|
|
3
2
|
* Adds the unmount behavior of returning focus to the element which had it
|
|
4
3
|
* previously as is expected for roles like menus or dialogs.
|
|
@@ -22,4 +21,5 @@ export default useFocusReturn;
|
|
|
22
21
|
* ```
|
|
23
22
|
*/
|
|
24
23
|
declare function useFocusReturn(onFocusReturn?: () => void): React.RefCallback<HTMLElement>;
|
|
24
|
+
export default useFocusReturn;
|
|
25
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-focus-return/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-focus-return/index.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,iBAAS,cAAc,CAAE,aAAa,AAlBnC,CACA,EADQ,MAAM,IAkBqB,GAjB1B,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,CAsEzC;eAEc,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-instance-id/index.ts"],"names":[],"mappings":"AAmBA;;;;;;;;;;;GAWG;AACH,iBAAS,aAAa,CAAE,MAAM,EAAE,MAAM,GAAI,MAAM,CAAC;AACjD,iBAAS,aAAa,CAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAI,MAAM,CAAC;AACjE,iBAAS,aAAa,CAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAChD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,CAAC,GACb,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-instance-id/index.ts"],"names":[],"mappings":"AAmBA;;;;;;;;;;;GAWG;AACH,iBAAS,aAAa,CAAE,MAAM,EAAE,MAAM,GAAI,MAAM,CAAC;AACjD,iBAAS,aAAa,CAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAI,MAAM,CAAC;AACjE,iBAAS,aAAa,CAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAChD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,CAAC,GACb,CAAC,CAAC;eAyBU,aAAa"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useLayoutEffect } from '@wordpress/element';
|
|
2
5
|
/**
|
|
3
6
|
* Preferred over direct usage of `useLayoutEffect` when supporting
|
|
4
7
|
* server rendered components (SSR) because currently React
|
|
5
8
|
* throws a warning when using useLayoutEffect in that environment.
|
|
6
9
|
*/
|
|
7
10
|
declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
8
|
-
|
|
11
|
+
export default useIsomorphicLayoutEffect;
|
|
9
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-isomorphic-layout-effect/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-isomorphic-layout-effect/index.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAa,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEhE;;;;GAIG;AACH,QAAA,MAAM,yBAAyB,wBAC6B,CAAC;eAE9C,yBAAyB"}
|
|
@@ -1,24 +1,13 @@
|
|
|
1
|
-
export default useKeyboardShortcut;
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
2
|
+
* External dependencies
|
|
4
3
|
*/
|
|
4
|
+
import Mousetrap from 'mousetrap';
|
|
5
|
+
import 'mousetrap/plugins/global-bind/mousetrap-global-bind.js';
|
|
5
6
|
export type WPKeyboardShortcutConfig = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Event name used to trigger the handler, defaults to keydown.
|
|
12
|
-
*/
|
|
13
|
-
eventName?: string | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Disables the keyboard handler if the value is true.
|
|
16
|
-
*/
|
|
17
|
-
isDisabled?: boolean | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* React reference to the DOM element used to catch the keyboard event.
|
|
20
|
-
*/
|
|
21
|
-
target?: import("react").RefObject<HTMLElement | null> | undefined;
|
|
7
|
+
bindGlobal?: boolean;
|
|
8
|
+
eventName?: string;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
target?: React.RefObject<HTMLElement | null>;
|
|
22
11
|
};
|
|
23
12
|
/**
|
|
24
13
|
* A block selection object.
|
|
@@ -39,6 +28,7 @@ export type WPKeyboardShortcutConfig = {
|
|
|
39
28
|
* @param {(e: Mousetrap.ExtendedKeyboardEvent, combo: string) => void} callback Shortcut callback.
|
|
40
29
|
* @param {WPKeyboardShortcutConfig} options Shortcut options.
|
|
41
30
|
*/
|
|
42
|
-
declare function useKeyboardShortcut(shortcuts: string[] | string, callback: (e: Mousetrap.ExtendedKeyboardEvent, combo: string) => void, { bindGlobal, eventName, isDisabled,
|
|
43
|
-
|
|
31
|
+
declare function useKeyboardShortcut(shortcuts: string[] | string, callback: (e: Mousetrap.ExtendedKeyboardEvent, combo: string) => void, { bindGlobal, eventName, isDisabled, // This is important for performance considerations.
|
|
32
|
+
target }?: WPKeyboardShortcutConfig): void;
|
|
33
|
+
export default useKeyboardShortcut;
|
|
44
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-keyboard-shortcut/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-keyboard-shortcut/index.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,wDAAwD,CAAC;AAW7D,YAAkB,wBAAwB,GAE1C;IAAiD,UAAU,AAA3D,CACA,EADW,OAAO,CAClB;IAAiD,SAAS,AAA1D,CACA,EADW,MAAM,CACjB;IAAiD,UAAU,AAA3D,CACA,EADW,OAAO,CAClB;IAAiD,MAAM,AAAvD,CACF,EADa,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAChD;CAAA,CAAA;AATD;;;;;;;;;GASG;AAEH;;;;;;;;GAQG;AACH,iBAAS,mBAAmB,CAC3B,SAAS,EALC,MAAM,EAAE,GAAC,MAKV,EACT,QAAQ,EALE,CAAC,CAAC,EAAE,SAAS,CAAC,qBAAqB,EAAE,KAAK,EAAE,MAAM,KAAK,IAKzD,EACR,EACC,UAAkB,EAClB,SAAqB,EACrB,UAAkB,EAAE,oDAAoD;AACxE,MAAM,EACN,GAVS,wBAUJ,QA2DN;eAEc,mBAAmB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export default useReducedMotion;
|
|
2
1
|
/**
|
|
3
2
|
* Hook returning whether the user has a preference for reduced motion.
|
|
4
3
|
*
|
|
5
4
|
* @return {boolean} Reduced motion preference value.
|
|
6
5
|
*/
|
|
7
|
-
declare
|
|
6
|
+
declare const useReducedMotion: () => boolean;
|
|
7
|
+
export default useReducedMotion;
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-reduced-motion/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-reduced-motion/index.js"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,QAAA,MAAM,gBAAgB,QAFV,OAGwC,CAAC;eAEtC,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-state-with-history/index.ts"],"names":[],"mappings":"AAqEA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAE,CAAC,EAAI,YAAY,EAAE,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-state-with-history/index.ts"],"names":[],"mappings":"AAqEA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAE,CAAC,EAAI,YAAY,EAAE,CAAC;IAQ/D,KAAK;IACL,QAAQ,aAA2B,CAAC,YAAY,OAAO;IAOvD,OAAO;IACP,OAAO;IACP,IAAI;IAGJ,IAAI;EAIL"}
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* @param {import('../../utils/throttle').ThrottleOptions} [options] The options object. See linked documentation for details.
|
|
14
14
|
* @return {import('../../utils/debounce').DebouncedFunc<TFunc>} Throttled function.
|
|
15
15
|
*/
|
|
16
|
-
export default function useThrottle<TFunc extends (...args: any[]) => void>(fn: TFunc, wait?: number, options?: import(
|
|
16
|
+
export default function useThrottle<TFunc extends (...args: any[]) => void>(fn: TFunc, wait?: number, options?: import('../../utils/throttle').ThrottleOptions): import('../../utils/debounce').DebouncedFunc<TFunc>;
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-throttle/index.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;GAcG;AACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-throttle/index.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAPK,KAAK,SAA/B,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAW,EAOR,EAAE,EAL5B,KAK4B,EAAE,IAAI,AAJ1C,CACA,EADQ,MAIkC,EAAE,OAAO,AAHnD,CACA,EADQ,OAAO,sBAAsB,EAAE,eAGY,GAF1C,OAAO,sBAAsB,EAAE,aAAa,CAAC,KAAK,CAAC,CAS9D"}
|
|
@@ -1,24 +1,8 @@
|
|
|
1
|
-
export default useViewportMatch;
|
|
2
1
|
export type WPBreakpoint = "xhuge" | "huge" | "wide" | "xlarge" | "large" | "medium" | "small" | "mobile";
|
|
3
2
|
export type WPViewportOperator = ">=" | "<";
|
|
4
|
-
/**
|
|
5
|
-
* Returns true if the viewport matches the given query, or false otherwise.
|
|
6
|
-
*
|
|
7
|
-
* @param {WPBreakpoint} breakpoint Breakpoint size name.
|
|
8
|
-
* @param {WPViewportOperator} [operator=">="] Viewport operator.
|
|
9
|
-
* @param {Window} [view=window] Window instance in which to perform viewport matching.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
*
|
|
13
|
-
* ```js
|
|
14
|
-
* useViewportMatch( 'huge', '<' );
|
|
15
|
-
* useViewportMatch( 'medium' );
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
* @return {boolean} Whether viewport matches query.
|
|
19
|
-
*/
|
|
20
3
|
declare function useViewportMatch(breakpoint: WPBreakpoint, operator?: WPViewportOperator, view?: Window): boolean;
|
|
21
4
|
declare namespace useViewportMatch {
|
|
22
|
-
|
|
5
|
+
var __experimentalWidthProvider: import("react").Provider<number | null>;
|
|
23
6
|
}
|
|
7
|
+
export default useViewportMatch;
|
|
24
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-viewport-match/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-viewport-match/index.js"],"names":[],"mappings":"AAWG,YAA0F,YAAY,GAA5F,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAc;AAsBtG,YAAsB,kBAAkB,GAA9B,IAAI,GAAG,GAAG,CAAoB;kCA4ChB,UAAU,EAb1B,YAa0B,EAAE,QAAQ,GAZpC,kBAY2C,EAAE,IAAI,GAXjD,MAW0D,GAFzD,OAAO;;;;eAoBJ,gBAAgB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export default useWarnOnChange;
|
|
2
1
|
/**
|
|
3
2
|
* Hook that performs a shallow comparison between the preview value of an object
|
|
4
3
|
* and the new one, if there's a difference, it prints it to the console.
|
|
@@ -18,4 +17,5 @@ export default useWarnOnChange;
|
|
|
18
17
|
* @param {string} prefix Just a prefix to show when console logging.
|
|
19
18
|
*/
|
|
20
19
|
declare function useWarnOnChange(object: object, prefix?: string): void;
|
|
20
|
+
export default useWarnOnChange;
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-warn-on-change/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-warn-on-change/index.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;GAiBG;AACH,iBAAS,eAAe,CAAE,MAAM,EAHrB,MAGqB,EAAE,MAAM,GAF7B,MAEkD,QAc5D;eAEc,eAAe"}
|
package/build-types/index.d.ts
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export { default as compose } from
|
|
6
|
-
export { default as pipe } from
|
|
7
|
-
export { default as ifCondition } from
|
|
8
|
-
export { default as pure } from
|
|
9
|
-
export { default as withGlobalEvents } from
|
|
10
|
-
export { default as withInstanceId } from
|
|
11
|
-
export { default as withSafeTimeout } from
|
|
12
|
-
export { default as withState } from
|
|
13
|
-
export { default as useConstrainedTabbing } from
|
|
14
|
-
export { default as useCopyOnClick } from
|
|
15
|
-
export { default as useCopyToClipboard } from
|
|
16
|
-
export { default as __experimentalUseDialog } from
|
|
17
|
-
export { default as useDisabled } from
|
|
18
|
-
export { default as useEvent } from
|
|
19
|
-
export { default as __experimentalUseDragging } from
|
|
20
|
-
export { useFocusOnMount } from
|
|
21
|
-
export { default as __experimentalUseFocusOutside } from
|
|
22
|
-
export { default as useFocusReturn } from
|
|
23
|
-
export { default as useInstanceId } from
|
|
24
|
-
export { default as useIsomorphicLayoutEffect } from
|
|
25
|
-
export { default as useKeyboardShortcut } from
|
|
26
|
-
export { default as useMediaQuery } from
|
|
27
|
-
export { default as usePrevious } from
|
|
28
|
-
export { default as useReducedMotion } from
|
|
29
|
-
export { default as useStateWithHistory } from
|
|
30
|
-
export { default as useViewportMatch } from
|
|
31
|
-
export { default as useResizeObserver } from
|
|
32
|
-
export { default as useAsyncList } from
|
|
33
|
-
export { default as useWarnOnChange } from
|
|
34
|
-
export { default as useDebounce } from
|
|
35
|
-
export { default as useDebouncedInput } from
|
|
36
|
-
export { default as useThrottle } from
|
|
37
|
-
export { default as useMergeRefs } from
|
|
38
|
-
export { default as useRefEffect } from
|
|
39
|
-
export { default as __experimentalUseDropZone } from
|
|
40
|
-
export { default as useFocusableIframe } from
|
|
41
|
-
export { default as __experimentalUseFixedWindowList } from
|
|
42
|
-
export { default as useObservableValue } from
|
|
1
|
+
export * from './utils/create-higher-order-component';
|
|
2
|
+
export * from './utils/debounce';
|
|
3
|
+
export * from './utils/throttle';
|
|
4
|
+
export * from './utils/observable-map';
|
|
5
|
+
export { default as compose } from './higher-order/compose';
|
|
6
|
+
export { default as pipe } from './higher-order/pipe';
|
|
7
|
+
export { default as ifCondition } from './higher-order/if-condition';
|
|
8
|
+
export { default as pure } from './higher-order/pure';
|
|
9
|
+
export { default as withGlobalEvents } from './higher-order/with-global-events';
|
|
10
|
+
export { default as withInstanceId } from './higher-order/with-instance-id';
|
|
11
|
+
export { default as withSafeTimeout } from './higher-order/with-safe-timeout';
|
|
12
|
+
export { default as withState } from './higher-order/with-state';
|
|
13
|
+
export { default as useConstrainedTabbing } from './hooks/use-constrained-tabbing';
|
|
14
|
+
export { default as useCopyOnClick } from './hooks/use-copy-on-click';
|
|
15
|
+
export { default as useCopyToClipboard } from './hooks/use-copy-to-clipboard';
|
|
16
|
+
export { default as __experimentalUseDialog } from './hooks/use-dialog';
|
|
17
|
+
export { default as useDisabled } from './hooks/use-disabled';
|
|
18
|
+
export { default as useEvent } from './hooks/use-event';
|
|
19
|
+
export { default as __experimentalUseDragging } from './hooks/use-dragging';
|
|
20
|
+
export { useFocusOnMount } from './hooks/use-focus-on-mount';
|
|
21
|
+
export { default as __experimentalUseFocusOutside } from './hooks/use-focus-outside';
|
|
22
|
+
export { default as useFocusReturn } from './hooks/use-focus-return';
|
|
23
|
+
export { default as useInstanceId } from './hooks/use-instance-id';
|
|
24
|
+
export { default as useIsomorphicLayoutEffect } from './hooks/use-isomorphic-layout-effect';
|
|
25
|
+
export { default as useKeyboardShortcut } from './hooks/use-keyboard-shortcut';
|
|
26
|
+
export { default as useMediaQuery } from './hooks/use-media-query';
|
|
27
|
+
export { default as usePrevious } from './hooks/use-previous';
|
|
28
|
+
export { default as useReducedMotion } from './hooks/use-reduced-motion';
|
|
29
|
+
export { default as useStateWithHistory } from './hooks/use-state-with-history';
|
|
30
|
+
export { default as useViewportMatch } from './hooks/use-viewport-match';
|
|
31
|
+
export { default as useResizeObserver } from './hooks/use-resize-observer';
|
|
32
|
+
export { default as useAsyncList } from './hooks/use-async-list';
|
|
33
|
+
export { default as useWarnOnChange } from './hooks/use-warn-on-change';
|
|
34
|
+
export { default as useDebounce } from './hooks/use-debounce';
|
|
35
|
+
export { default as useDebouncedInput } from './hooks/use-debounced-input';
|
|
36
|
+
export { default as useThrottle } from './hooks/use-throttle';
|
|
37
|
+
export { default as useMergeRefs } from './hooks/use-merge-refs';
|
|
38
|
+
export { default as useRefEffect } from './hooks/use-ref-effect';
|
|
39
|
+
export { default as __experimentalUseDropZone } from './hooks/use-drop-zone';
|
|
40
|
+
export { default as useFocusableIframe } from './hooks/use-focusable-iframe';
|
|
41
|
+
export { default as __experimentalUseFixedWindowList } from './hooks/use-fixed-window-list';
|
|
42
|
+
export { default as useObservableValue } from './hooks/use-observable-value';
|
|
43
43
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"AACA,cAAc,uCAAuC,CAAC;AAEtD,cAAc,kBAAkB,CAAC;AAEjC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,wBAAwB,CAAC;AAGvC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAA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AAC,EAAE,CAAC,CAAE,GAAG,CAAC,CAChC,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACzC,MAAM,SAAS,aAAa,CAAE,GAAG,CAAE,EACnC,MAAM,SAAS,aAAa,CAAE,GAAG,CAAE,EACjC,YAAY,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,MAAM,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/create-higher-order-component/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,KAAK,QAAQ,CAAE,CAAC,IAAK,CAAC,SAAS,aAAa,CAAE,MAAM,CAAC,CAAE,GAAG,CAAC,GAAG,KAAK,CAAC;AAEpE,MAAM,MAAM,oBAAoB,CAAE,CAAC,EAAE,CAAC,IAAK,IAAI,CAAE,QAAQ,CAAE,CAAC,CAAE,EAAE,MAAM,CAAC,CAAE,CAAC;AAE1E,MAAM,MAAM,iBAAiB,CAAE,CAAC,EAAE,CAAC,IAAK,aAAa,CACpD,oBAAoB,CAAE,CAAC,EAAE,CAAC,CAAE,GAAG,CAAC,CAChC,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACzC,MAAM,SAAS,aAAa,CAAE,GAAG,CAAE,EACnC,MAAM,SAAS,aAAa,CAAE,GAAG,CAAE,EACjC,YAAY,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,MAAM,EAAE,YAAY,EAAE,MAAM,WACjD,MAAM,YAKtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/debounce/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,MAAM,WAAW,eAAe;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,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AE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAM,OAAO,QACtE,SAAS,QACT,MAAM,YACF,OAAO,CAAE,eAAe,CAAE;WA+HV,OAAO,WAAW,UAAU,CAAE,SAAS,CAAE;;;;CA2BnE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/throttle/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAOH,MAAM,WAAW,eAAe;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,QAAQ,GAAK,SAAS,SAAS,CAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/throttle/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAOH,MAAM,WAAW,eAAe;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,QAAQ,GAAK,SAAS,SAAS,CAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAM,OAAO,QACtE,SAAS,QACT,MAAM,YACF,eAAe;;;;;CAczB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/compose",
|
|
3
|
-
"version": "7.45.0",
|
|
3
|
+
"version": "7.45.1-next.v.202605131006.0+2a3d07cab",
|
|
4
4
|
"description": "WordPress higher-order components (HOCs).",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"sideEffects": false,
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@types/mousetrap": "^1.6.8",
|
|
50
|
-
"@wordpress/deprecated": "^4.45.0",
|
|
51
|
-
"@wordpress/dom": "^4.45.0",
|
|
52
|
-
"@wordpress/element": "^6.45.0",
|
|
53
|
-
"@wordpress/is-shallow-equal": "^5.45.0",
|
|
54
|
-
"@wordpress/keycodes": "^4.45.0",
|
|
55
|
-
"@wordpress/priority-queue": "^3.45.0",
|
|
56
|
-
"@wordpress/undo-manager": "^1.45.0",
|
|
50
|
+
"@wordpress/deprecated": "^4.45.1-next.v.202605131006.0+2a3d07cab",
|
|
51
|
+
"@wordpress/dom": "^4.45.1-next.v.202605131006.0+2a3d07cab",
|
|
52
|
+
"@wordpress/element": "^6.45.1-next.v.202605131006.0+2a3d07cab",
|
|
53
|
+
"@wordpress/is-shallow-equal": "^5.45.1-next.v.202605131006.0+2a3d07cab",
|
|
54
|
+
"@wordpress/keycodes": "^4.45.1-next.v.202605131006.0+2a3d07cab",
|
|
55
|
+
"@wordpress/priority-queue": "^3.45.1-next.v.202605131006.0+2a3d07cab",
|
|
56
|
+
"@wordpress/undo-manager": "^1.45.1-next.v.202605131006.0+2a3d07cab",
|
|
57
57
|
"change-case": "^4.1.2",
|
|
58
58
|
"mousetrap": "^1.6.5",
|
|
59
59
|
"use-memo-one": "^1.1.1"
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "8804fa29bc78a1d98e5a4d40c3e180ddd907016c"
|
|
71
71
|
}
|
|
@@ -71,7 +71,6 @@ export function clearSelection( trigger: Element ): void {
|
|
|
71
71
|
function useUpdatedRef< T >( value: T ): MutableRefObject< T > {
|
|
72
72
|
const ref = useRef< T >( value );
|
|
73
73
|
useLayoutEffect( () => {
|
|
74
|
-
// eslint-disable-next-line react-compiler/react-compiler -- false positive, see https://github.com/facebook/react/issues/29196
|
|
75
74
|
ref.current = value;
|
|
76
75
|
}, [ value ] );
|
|
77
76
|
return ref;
|