@contember/react-utils 2.1.0-alpha.36 → 2.1.0-alpha.39
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/dist/development/index.cjs +86 -0
- package/dist/development/index.cjs.map +1 -0
- package/dist/development/index.js +86 -0
- package/dist/development/index.js.map +1 -0
- package/dist/development/src/context/createContext.cjs +10 -0
- package/dist/development/src/context/createContext.cjs.map +1 -0
- package/dist/development/src/context/createContext.js +10 -0
- package/dist/development/src/context/createContext.js.map +1 -0
- package/dist/development/src/context/createRequiredContext.cjs +18 -0
- package/dist/development/src/context/createRequiredContext.cjs.map +1 -0
- package/dist/development/src/context/createRequiredContext.js +18 -0
- package/dist/development/src/context/createRequiredContext.js.map +1 -0
- package/dist/development/src/debug-context/Constants.cjs +25 -0
- package/dist/development/src/debug-context/Constants.cjs.map +1 -0
- package/dist/development/src/debug-context/Constants.js +25 -0
- package/dist/development/src/debug-context/Constants.js.map +1 -0
- package/dist/development/src/debug-context/Context.cjs +72 -0
- package/dist/development/src/debug-context/Context.cjs.map +1 -0
- package/dist/development/src/debug-context/Context.js +72 -0
- package/dist/development/src/debug-context/Context.js.map +1 -0
- package/dist/development/src/hooks/unwrapRefValue.cjs +11 -0
- package/dist/development/src/hooks/unwrapRefValue.cjs.map +1 -0
- package/dist/development/src/hooks/unwrapRefValue.js +11 -0
- package/dist/development/src/hooks/unwrapRefValue.js.map +1 -0
- package/dist/development/src/hooks/useAbortController.cjs +17 -0
- package/dist/development/src/hooks/useAbortController.cjs.map +1 -0
- package/dist/development/src/hooks/useAbortController.js +17 -0
- package/dist/development/src/hooks/useAbortController.js.map +1 -0
- package/dist/development/src/hooks/useArrayMapMemo.cjs +11 -0
- package/dist/development/src/hooks/useArrayMapMemo.cjs.map +1 -0
- package/dist/development/src/hooks/useArrayMapMemo.js +11 -0
- package/dist/development/src/hooks/useArrayMapMemo.js.map +1 -0
- package/dist/development/src/hooks/useAutoHeightTextArea.cjs +43 -0
- package/dist/development/src/hooks/useAutoHeightTextArea.cjs.map +1 -0
- package/dist/development/src/hooks/useAutoHeightTextArea.js +43 -0
- package/dist/development/src/hooks/useAutoHeightTextArea.js.map +1 -0
- package/dist/development/src/hooks/useChildrenAsLabel.cjs +53 -0
- package/dist/development/src/hooks/useChildrenAsLabel.cjs.map +1 -0
- package/dist/development/src/hooks/useChildrenAsLabel.js +53 -0
- package/dist/development/src/hooks/useChildrenAsLabel.js.map +1 -0
- package/dist/development/src/hooks/useComposeRef.cjs +31 -0
- package/dist/development/src/hooks/useComposeRef.cjs.map +1 -0
- package/dist/development/src/hooks/useComposeRef.js +31 -0
- package/dist/development/src/hooks/useComposeRef.js.map +1 -0
- package/dist/development/src/hooks/useConstantLengthInvariant.cjs +15 -0
- package/dist/development/src/hooks/useConstantLengthInvariant.cjs.map +1 -0
- package/dist/development/src/hooks/useConstantLengthInvariant.js +15 -0
- package/dist/development/src/hooks/useConstantLengthInvariant.js.map +1 -0
- package/dist/development/src/hooks/useConstantValueInvariant.cjs +15 -0
- package/dist/development/src/hooks/useConstantValueInvariant.cjs.map +1 -0
- package/dist/development/src/hooks/useConstantValueInvariant.js +15 -0
- package/dist/development/src/hooks/useConstantValueInvariant.js.map +1 -0
- package/dist/development/src/hooks/useDebounce.cjs +15 -0
- package/dist/development/src/hooks/useDebounce.cjs.map +1 -0
- package/dist/development/src/hooks/useDebounce.js +15 -0
- package/dist/development/src/hooks/useDebounce.js.map +1 -0
- package/dist/development/src/hooks/useDebounceCallback.cjs +19 -0
- package/dist/development/src/hooks/useDebounceCallback.cjs.map +1 -0
- package/dist/development/src/hooks/useDebounceCallback.js +19 -0
- package/dist/development/src/hooks/useDebounceCallback.js.map +1 -0
- package/dist/development/src/hooks/useDocumentTitle.cjs +22 -0
- package/dist/development/src/hooks/useDocumentTitle.cjs.map +1 -0
- package/dist/development/src/hooks/useDocumentTitle.js +22 -0
- package/dist/development/src/hooks/useDocumentTitle.js.map +1 -0
- package/dist/development/src/hooks/useExpectSameValueReference.cjs +24 -0
- package/dist/development/src/hooks/useExpectSameValueReference.cjs.map +1 -0
- package/dist/development/src/hooks/useExpectSameValueReference.js +24 -0
- package/dist/development/src/hooks/useExpectSameValueReference.js.map +1 -0
- package/dist/development/src/hooks/useForceRender.cjs +9 -0
- package/dist/development/src/hooks/useForceRender.cjs.map +1 -0
- package/dist/development/src/hooks/useForceRender.js +9 -0
- package/dist/development/src/hooks/useForceRender.js.map +1 -0
- package/dist/development/src/hooks/useId.cjs +13 -0
- package/dist/development/src/hooks/useId.cjs.map +1 -0
- package/dist/development/src/hooks/useId.js +13 -0
- package/dist/development/src/hooks/useId.js.map +1 -0
- package/dist/development/src/hooks/useIsMounted.cjs +18 -0
- package/dist/development/src/hooks/useIsMounted.cjs.map +1 -0
- package/dist/development/src/hooks/useIsMounted.js +18 -0
- package/dist/development/src/hooks/useIsMounted.js.map +1 -0
- package/dist/development/src/hooks/useObjectMemo.cjs +27 -0
- package/dist/development/src/hooks/useObjectMemo.cjs.map +1 -0
- package/dist/development/src/hooks/useObjectMemo.js +27 -0
- package/dist/development/src/hooks/useObjectMemo.js.map +1 -0
- package/dist/development/src/hooks/useOnElementClickOutsideCallback.cjs +20 -0
- package/dist/development/src/hooks/useOnElementClickOutsideCallback.cjs.map +1 -0
- package/dist/development/src/hooks/useOnElementClickOutsideCallback.js +20 -0
- package/dist/development/src/hooks/useOnElementClickOutsideCallback.js.map +1 -0
- package/dist/development/src/hooks/useOnElementMouseEnterDelayedCallback.cjs +33 -0
- package/dist/development/src/hooks/useOnElementMouseEnterDelayedCallback.cjs.map +1 -0
- package/dist/development/src/hooks/useOnElementMouseEnterDelayedCallback.js +33 -0
- package/dist/development/src/hooks/useOnElementMouseEnterDelayedCallback.js.map +1 -0
- package/dist/development/src/hooks/useOnElementResize.cjs +42 -0
- package/dist/development/src/hooks/useOnElementResize.cjs.map +1 -0
- package/dist/development/src/hooks/useOnElementResize.js +42 -0
- package/dist/development/src/hooks/useOnElementResize.js.map +1 -0
- package/dist/development/src/hooks/useOnWindowResize.cjs +36 -0
- package/dist/development/src/hooks/useOnWindowResize.cjs.map +1 -0
- package/dist/development/src/hooks/useOnWindowResize.js +36 -0
- package/dist/development/src/hooks/useOnWindowResize.js.map +1 -0
- package/dist/development/src/hooks/usePreviousValue.cjs +12 -0
- package/dist/development/src/hooks/usePreviousValue.cjs.map +1 -0
- package/dist/development/src/hooks/usePreviousValue.js +12 -0
- package/dist/development/src/hooks/usePreviousValue.js.map +1 -0
- package/dist/development/src/hooks/useStoredState.cjs +100 -0
- package/dist/development/src/hooks/useStoredState.cjs.map +1 -0
- package/dist/development/src/hooks/useStoredState.js +100 -0
- package/dist/development/src/hooks/useStoredState.js.map +1 -0
- package/dist/development/src/hooks/useUpdatedRef.cjs +10 -0
- package/dist/development/src/hooks/useUpdatedRef.cjs.map +1 -0
- package/dist/development/src/hooks/useUpdatedRef.js +10 -0
- package/dist/development/src/hooks/useUpdatedRef.js.map +1 -0
- package/dist/development/src/hooks/useWindowSize.cjs +20 -0
- package/dist/development/src/hooks/useWindowSize.cjs.map +1 -0
- package/dist/development/src/hooks/useWindowSize.js +20 -0
- package/dist/development/src/hooks/useWindowSize.js.map +1 -0
- package/dist/development/src/referentiallyStable/emptyArray.cjs +5 -0
- package/dist/development/src/referentiallyStable/emptyArray.cjs.map +1 -0
- package/dist/development/src/referentiallyStable/emptyArray.js +5 -0
- package/dist/development/src/referentiallyStable/emptyArray.js.map +1 -0
- package/dist/development/src/referentiallyStable/emptyObject.cjs +5 -0
- package/dist/development/src/referentiallyStable/emptyObject.cjs.map +1 -0
- package/dist/development/src/referentiallyStable/emptyObject.js +5 -0
- package/dist/development/src/referentiallyStable/emptyObject.js.map +1 -0
- package/dist/development/src/referentiallyStable/identityFunction.cjs +5 -0
- package/dist/development/src/referentiallyStable/identityFunction.cjs.map +1 -0
- package/dist/development/src/referentiallyStable/identityFunction.js +5 -0
- package/dist/development/src/referentiallyStable/identityFunction.js.map +1 -0
- package/dist/development/src/referentiallyStable/noop.cjs +5 -0
- package/dist/development/src/referentiallyStable/noop.cjs.map +1 -0
- package/dist/development/src/referentiallyStable/noop.js +5 -0
- package/dist/development/src/referentiallyStable/noop.js.map +1 -0
- package/dist/development/src/referentiallyStable/returnFalse.cjs +5 -0
- package/dist/development/src/referentiallyStable/returnFalse.cjs.map +1 -0
- package/dist/development/src/referentiallyStable/returnFalse.js +5 -0
- package/dist/development/src/referentiallyStable/returnFalse.js.map +1 -0
- package/dist/development/src/referentiallyStable/returnTrue.cjs +5 -0
- package/dist/development/src/referentiallyStable/returnTrue.cjs.map +1 -0
- package/dist/development/src/referentiallyStable/returnTrue.js +5 -0
- package/dist/development/src/referentiallyStable/returnTrue.js.map +1 -0
- package/dist/development/src/referentiallyStable/useReferentiallyStableCallback.cjs +15 -0
- package/dist/development/src/referentiallyStable/useReferentiallyStableCallback.cjs.map +1 -0
- package/dist/development/src/referentiallyStable/useReferentiallyStableCallback.js +15 -0
- package/dist/development/src/referentiallyStable/useReferentiallyStableCallback.js.map +1 -0
- package/dist/production/index.cjs +86 -0
- package/dist/production/index.cjs.map +1 -0
- package/dist/production/index.js +86 -0
- package/dist/production/index.js.map +1 -0
- package/dist/production/src/context/createContext.cjs +10 -0
- package/dist/production/src/context/createContext.cjs.map +1 -0
- package/dist/production/src/context/createContext.js +10 -0
- package/dist/production/src/context/createContext.js.map +1 -0
- package/dist/production/src/context/createRequiredContext.cjs +18 -0
- package/dist/production/src/context/createRequiredContext.cjs.map +1 -0
- package/dist/production/src/context/createRequiredContext.js +18 -0
- package/dist/production/src/context/createRequiredContext.js.map +1 -0
- package/dist/production/src/debug-context/Constants.cjs +25 -0
- package/dist/production/src/debug-context/Constants.cjs.map +1 -0
- package/dist/production/src/debug-context/Constants.js +25 -0
- package/dist/production/src/debug-context/Constants.js.map +1 -0
- package/dist/production/src/debug-context/Context.cjs +68 -0
- package/dist/production/src/debug-context/Context.cjs.map +1 -0
- package/dist/production/src/debug-context/Context.js +68 -0
- package/dist/production/src/debug-context/Context.js.map +1 -0
- package/dist/production/src/hooks/unwrapRefValue.cjs +11 -0
- package/dist/production/src/hooks/unwrapRefValue.cjs.map +1 -0
- package/dist/production/src/hooks/unwrapRefValue.js +11 -0
- package/dist/production/src/hooks/unwrapRefValue.js.map +1 -0
- package/dist/production/src/hooks/useAbortController.cjs +17 -0
- package/dist/production/src/hooks/useAbortController.cjs.map +1 -0
- package/dist/production/src/hooks/useAbortController.js +17 -0
- package/dist/production/src/hooks/useAbortController.js.map +1 -0
- package/dist/production/src/hooks/useArrayMapMemo.cjs +9 -0
- package/dist/production/src/hooks/useArrayMapMemo.cjs.map +1 -0
- package/dist/production/src/hooks/useArrayMapMemo.js +9 -0
- package/dist/production/src/hooks/useArrayMapMemo.js.map +1 -0
- package/dist/production/src/hooks/useAutoHeightTextArea.cjs +43 -0
- package/dist/production/src/hooks/useAutoHeightTextArea.cjs.map +1 -0
- package/dist/production/src/hooks/useAutoHeightTextArea.js +43 -0
- package/dist/production/src/hooks/useAutoHeightTextArea.js.map +1 -0
- package/dist/production/src/hooks/useChildrenAsLabel.cjs +51 -0
- package/dist/production/src/hooks/useChildrenAsLabel.cjs.map +1 -0
- package/dist/production/src/hooks/useChildrenAsLabel.js +51 -0
- package/dist/production/src/hooks/useChildrenAsLabel.js.map +1 -0
- package/dist/production/src/hooks/useComposeRef.cjs +31 -0
- package/dist/production/src/hooks/useComposeRef.cjs.map +1 -0
- package/dist/production/src/hooks/useComposeRef.js +31 -0
- package/dist/production/src/hooks/useComposeRef.js.map +1 -0
- package/dist/production/src/hooks/useConstantLengthInvariant.cjs +6 -0
- package/dist/production/src/hooks/useConstantLengthInvariant.cjs.map +1 -0
- package/dist/production/src/hooks/useConstantLengthInvariant.js +6 -0
- package/dist/production/src/hooks/useConstantLengthInvariant.js.map +1 -0
- package/dist/production/src/hooks/useConstantValueInvariant.cjs +6 -0
- package/dist/production/src/hooks/useConstantValueInvariant.cjs.map +1 -0
- package/dist/production/src/hooks/useConstantValueInvariant.js +6 -0
- package/dist/production/src/hooks/useConstantValueInvariant.js.map +1 -0
- package/dist/production/src/hooks/useDebounce.cjs +15 -0
- package/dist/production/src/hooks/useDebounce.cjs.map +1 -0
- package/dist/production/src/hooks/useDebounce.js +15 -0
- package/dist/production/src/hooks/useDebounce.js.map +1 -0
- package/dist/production/src/hooks/useDebounceCallback.cjs +19 -0
- package/dist/production/src/hooks/useDebounceCallback.cjs.map +1 -0
- package/dist/production/src/hooks/useDebounceCallback.js +19 -0
- package/dist/production/src/hooks/useDebounceCallback.js.map +1 -0
- package/dist/production/src/hooks/useDocumentTitle.cjs +22 -0
- package/dist/production/src/hooks/useDocumentTitle.cjs.map +1 -0
- package/dist/production/src/hooks/useDocumentTitle.js +22 -0
- package/dist/production/src/hooks/useDocumentTitle.js.map +1 -0
- package/dist/production/src/hooks/useExpectSameValueReference.cjs +15 -0
- package/dist/production/src/hooks/useExpectSameValueReference.cjs.map +1 -0
- package/dist/production/src/hooks/useExpectSameValueReference.js +15 -0
- package/dist/production/src/hooks/useExpectSameValueReference.js.map +1 -0
- package/dist/production/src/hooks/useForceRender.cjs +9 -0
- package/dist/production/src/hooks/useForceRender.cjs.map +1 -0
- package/dist/production/src/hooks/useForceRender.js +9 -0
- package/dist/production/src/hooks/useForceRender.js.map +1 -0
- package/dist/production/src/hooks/useId.cjs +13 -0
- package/dist/production/src/hooks/useId.cjs.map +1 -0
- package/dist/production/src/hooks/useId.js +13 -0
- package/dist/production/src/hooks/useId.js.map +1 -0
- package/dist/production/src/hooks/useIsMounted.cjs +18 -0
- package/dist/production/src/hooks/useIsMounted.cjs.map +1 -0
- package/dist/production/src/hooks/useIsMounted.js +18 -0
- package/dist/production/src/hooks/useIsMounted.js.map +1 -0
- package/dist/production/src/hooks/useObjectMemo.cjs +27 -0
- package/dist/production/src/hooks/useObjectMemo.cjs.map +1 -0
- package/dist/production/src/hooks/useObjectMemo.js +27 -0
- package/dist/production/src/hooks/useObjectMemo.js.map +1 -0
- package/dist/production/src/hooks/useOnElementClickOutsideCallback.cjs +20 -0
- package/dist/production/src/hooks/useOnElementClickOutsideCallback.cjs.map +1 -0
- package/dist/production/src/hooks/useOnElementClickOutsideCallback.js +20 -0
- package/dist/production/src/hooks/useOnElementClickOutsideCallback.js.map +1 -0
- package/dist/production/src/hooks/useOnElementMouseEnterDelayedCallback.cjs +33 -0
- package/dist/production/src/hooks/useOnElementMouseEnterDelayedCallback.cjs.map +1 -0
- package/dist/production/src/hooks/useOnElementMouseEnterDelayedCallback.js +33 -0
- package/dist/production/src/hooks/useOnElementMouseEnterDelayedCallback.js.map +1 -0
- package/dist/production/src/hooks/useOnElementResize.cjs +42 -0
- package/dist/production/src/hooks/useOnElementResize.cjs.map +1 -0
- package/dist/production/src/hooks/useOnElementResize.js +42 -0
- package/dist/production/src/hooks/useOnElementResize.js.map +1 -0
- package/dist/production/src/hooks/useOnWindowResize.cjs +36 -0
- package/dist/production/src/hooks/useOnWindowResize.cjs.map +1 -0
- package/dist/production/src/hooks/useOnWindowResize.js +36 -0
- package/dist/production/src/hooks/useOnWindowResize.js.map +1 -0
- package/dist/production/src/hooks/usePreviousValue.cjs +12 -0
- package/dist/production/src/hooks/usePreviousValue.cjs.map +1 -0
- package/dist/production/src/hooks/usePreviousValue.js +12 -0
- package/dist/production/src/hooks/usePreviousValue.js.map +1 -0
- package/dist/production/src/hooks/useStoredState.cjs +100 -0
- package/dist/production/src/hooks/useStoredState.cjs.map +1 -0
- package/dist/production/src/hooks/useStoredState.js +100 -0
- package/dist/production/src/hooks/useStoredState.js.map +1 -0
- package/dist/production/src/hooks/useUpdatedRef.cjs +10 -0
- package/dist/production/src/hooks/useUpdatedRef.cjs.map +1 -0
- package/dist/production/src/hooks/useUpdatedRef.js +10 -0
- package/dist/production/src/hooks/useUpdatedRef.js.map +1 -0
- package/dist/production/src/hooks/useWindowSize.cjs +20 -0
- package/dist/production/src/hooks/useWindowSize.cjs.map +1 -0
- package/dist/production/src/hooks/useWindowSize.js +20 -0
- package/dist/production/src/hooks/useWindowSize.js.map +1 -0
- package/dist/production/src/referentiallyStable/emptyArray.cjs +5 -0
- package/dist/production/src/referentiallyStable/emptyArray.cjs.map +1 -0
- package/dist/production/src/referentiallyStable/emptyArray.js +5 -0
- package/dist/production/src/referentiallyStable/emptyArray.js.map +1 -0
- package/dist/production/src/referentiallyStable/emptyObject.cjs +5 -0
- package/dist/production/src/referentiallyStable/emptyObject.cjs.map +1 -0
- package/dist/production/src/referentiallyStable/emptyObject.js +5 -0
- package/dist/production/src/referentiallyStable/emptyObject.js.map +1 -0
- package/dist/production/src/referentiallyStable/identityFunction.cjs +5 -0
- package/dist/production/src/referentiallyStable/identityFunction.cjs.map +1 -0
- package/dist/production/src/referentiallyStable/identityFunction.js +5 -0
- package/dist/production/src/referentiallyStable/identityFunction.js.map +1 -0
- package/dist/production/src/referentiallyStable/noop.cjs +5 -0
- package/dist/production/src/referentiallyStable/noop.cjs.map +1 -0
- package/dist/production/src/referentiallyStable/noop.js +5 -0
- package/dist/production/src/referentiallyStable/noop.js.map +1 -0
- package/dist/production/src/referentiallyStable/returnFalse.cjs +5 -0
- package/dist/production/src/referentiallyStable/returnFalse.cjs.map +1 -0
- package/dist/production/src/referentiallyStable/returnFalse.js +5 -0
- package/dist/production/src/referentiallyStable/returnFalse.js.map +1 -0
- package/dist/production/src/referentiallyStable/returnTrue.cjs +5 -0
- package/dist/production/src/referentiallyStable/returnTrue.cjs.map +1 -0
- package/dist/production/src/referentiallyStable/returnTrue.js +5 -0
- package/dist/production/src/referentiallyStable/returnTrue.js.map +1 -0
- package/dist/production/src/referentiallyStable/useReferentiallyStableCallback.cjs +15 -0
- package/dist/production/src/referentiallyStable/useReferentiallyStableCallback.cjs.map +1 -0
- package/dist/production/src/referentiallyStable/useReferentiallyStableCallback.js +15 -0
- package/dist/production/src/referentiallyStable/useReferentiallyStableCallback.js.map +1 -0
- package/dist/types/context/createContext.d.ts +3 -0
- package/dist/types/context/createContext.d.ts.map +1 -0
- package/dist/types/context/createRequiredContext.d.ts +3 -0
- package/dist/types/context/createRequiredContext.d.ts.map +1 -0
- package/dist/types/context/index.d.ts +3 -0
- package/dist/types/context/index.d.ts.map +1 -0
- package/dist/types/debug-context/Constants.d.ts +6 -0
- package/dist/types/debug-context/Constants.d.ts.map +1 -0
- package/dist/types/debug-context/Context.d.ts +15 -0
- package/dist/types/debug-context/Context.d.ts.map +1 -0
- package/dist/types/debug-context/Types.d.ts +13 -0
- package/dist/types/debug-context/Types.d.ts.map +1 -0
- package/dist/types/debug-context/index.d.ts +4 -0
- package/dist/types/debug-context/index.d.ts.map +1 -0
- package/dist/types/hooks/index.d.ts +25 -0
- package/dist/types/hooks/index.d.ts.map +1 -0
- package/dist/types/hooks/unwrapRefValue.d.ts +9 -0
- package/dist/types/hooks/unwrapRefValue.d.ts.map +1 -0
- package/dist/types/hooks/useAbortController.d.ts +2 -0
- package/dist/types/hooks/useAbortController.d.ts.map +1 -0
- package/dist/types/hooks/useArrayMapMemo.d.ts +10 -0
- package/dist/types/hooks/useArrayMapMemo.d.ts.map +1 -0
- package/dist/types/hooks/useAutoHeightTextArea.d.ts +3 -0
- package/dist/types/hooks/useAutoHeightTextArea.d.ts.map +1 -0
- package/dist/types/hooks/useChildrenAsLabel.d.ts +16 -0
- package/dist/types/hooks/useChildrenAsLabel.d.ts.map +1 -0
- package/dist/types/hooks/useComposeRef.d.ts +16 -0
- package/dist/types/hooks/useComposeRef.d.ts.map +1 -0
- package/dist/types/hooks/useConstantLengthInvariant.d.ts +2 -0
- package/dist/types/hooks/useConstantLengthInvariant.d.ts.map +1 -0
- package/dist/types/hooks/useConstantValueInvariant.d.ts +2 -0
- package/dist/types/hooks/useConstantValueInvariant.d.ts.map +1 -0
- package/dist/types/hooks/useDebounce.d.ts +2 -0
- package/dist/types/hooks/useDebounce.d.ts.map +1 -0
- package/dist/types/hooks/useDebounceCallback.d.ts +2 -0
- package/dist/types/hooks/useDebounceCallback.d.ts.map +1 -0
- package/dist/types/hooks/useDocumentTitle.d.ts +2 -0
- package/dist/types/hooks/useDocumentTitle.d.ts.map +1 -0
- package/dist/types/hooks/useExpectSameValueReference.d.ts +24 -0
- package/dist/types/hooks/useExpectSameValueReference.d.ts.map +1 -0
- package/dist/types/hooks/useForceRender.d.ts +2 -0
- package/dist/types/hooks/useForceRender.d.ts.map +1 -0
- package/dist/types/hooks/useId.d.ts +10 -0
- package/dist/types/hooks/useId.d.ts.map +1 -0
- package/dist/types/hooks/useIsMounted.d.ts +2 -0
- package/dist/types/hooks/useIsMounted.d.ts.map +1 -0
- package/dist/types/hooks/useObjectMemo.d.ts +2 -0
- package/dist/types/hooks/useObjectMemo.d.ts.map +1 -0
- package/dist/types/hooks/useOnElementClickOutsideCallback.d.ts +3 -0
- package/dist/types/hooks/useOnElementClickOutsideCallback.d.ts.map +1 -0
- package/dist/types/hooks/useOnElementMouseEnterDelayedCallback.d.ts +14 -0
- package/dist/types/hooks/useOnElementMouseEnterDelayedCallback.d.ts.map +1 -0
- package/dist/types/hooks/useOnElementResize.d.ts +3 -0
- package/dist/types/hooks/useOnElementResize.d.ts.map +1 -0
- package/dist/types/hooks/useOnWindowResize.d.ts +2 -0
- package/dist/types/hooks/useOnWindowResize.d.ts.map +1 -0
- package/dist/types/hooks/usePreviousValue.d.ts +2 -0
- package/dist/types/hooks/usePreviousValue.d.ts.map +1 -0
- package/dist/types/hooks/useStoredState.d.ts +18 -0
- package/dist/types/hooks/useStoredState.d.ts.map +1 -0
- package/dist/types/hooks/useUpdatedRef.d.ts +8 -0
- package/dist/types/hooks/useUpdatedRef.d.ts.map +1 -0
- package/dist/types/hooks/useWindowSize.d.ts +5 -0
- package/dist/types/hooks/useWindowSize.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/referentiallyStable/emptyArray.d.ts +2 -0
- package/dist/types/referentiallyStable/emptyArray.d.ts.map +1 -0
- package/dist/types/referentiallyStable/emptyObject.d.ts +2 -0
- package/dist/types/referentiallyStable/emptyObject.d.ts.map +1 -0
- package/dist/types/referentiallyStable/identityFunction.d.ts +2 -0
- package/dist/types/referentiallyStable/identityFunction.d.ts.map +1 -0
- package/dist/types/referentiallyStable/index.d.ts +8 -0
- package/dist/types/referentiallyStable/index.d.ts.map +1 -0
- package/dist/types/referentiallyStable/noop.d.ts +2 -0
- package/dist/types/referentiallyStable/noop.d.ts.map +1 -0
- package/dist/types/referentiallyStable/returnFalse.d.ts +2 -0
- package/dist/types/referentiallyStable/returnFalse.d.ts.map +1 -0
- package/dist/types/referentiallyStable/returnTrue.d.ts +2 -0
- package/dist/types/referentiallyStable/returnTrue.d.ts.map +1 -0
- package/dist/types/referentiallyStable/useReferentiallyStableCallback.d.ts +3 -0
- package/dist/types/referentiallyStable/useReferentiallyStableCallback.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/dist/types/types/PropsWithRequiredChildren.d.ts +5 -0
- package/dist/types/types/PropsWithRequiredChildren.d.ts.map +1 -0
- package/dist/types/types/Serializable.d.ts +4 -0
- package/dist/types/types/Serializable.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +3 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
function useUpdatedRef(value) {
|
|
5
|
+
const ref = React.useRef(value);
|
|
6
|
+
ref.current = value;
|
|
7
|
+
return ref;
|
|
8
|
+
}
|
|
9
|
+
exports.useUpdatedRef = useUpdatedRef;
|
|
10
|
+
//# sourceMappingURL=useUpdatedRef.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUpdatedRef.cjs","sources":["../../../../../packages/react-utils/src/hooks/useUpdatedRef.ts"],"sourcesContent":["import { useRef } from 'react'\n\n/**\n * Returns a stable mutable object with value that is updated upon each call\n *\n * @param value - Value that could update after initial call\n * @returns Mutable ref object with updated value\n */\nexport function useUpdatedRef<T>(value: T) {\n\tconst ref = useRef(value)\n\tref.current = value\n\n\treturn ref\n}\n"],"names":["useRef"],"mappings":";;;AAQO,SAAS,cAAiB,OAAU;AAC1C,QAAM,MAAMA,MAAAA,OAAO,KAAK;AACxB,MAAI,UAAU;AAEd,SAAO;AACR;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUpdatedRef.js","sources":["../../../../../packages/react-utils/src/hooks/useUpdatedRef.ts"],"sourcesContent":["import { useRef } from 'react'\n\n/**\n * Returns a stable mutable object with value that is updated upon each call\n *\n * @param value - Value that could update after initial call\n * @returns Mutable ref object with updated value\n */\nexport function useUpdatedRef<T>(value: T) {\n\tconst ref = useRef(value)\n\tref.current = value\n\n\treturn ref\n}\n"],"names":[],"mappings":";AAQO,SAAS,cAAiB,OAAU;AAC1C,QAAM,MAAM,OAAO,KAAK;AACxB,MAAI,UAAU;AAEd,SAAO;AACR;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const useOnWindowResize = require("./useOnWindowResize.cjs");
|
|
5
|
+
function useWindowSize() {
|
|
6
|
+
const [width, setWidth] = React.useState(window.innerWidth);
|
|
7
|
+
const [height, setHeight] = React.useState(window.innerHeight);
|
|
8
|
+
useOnWindowResize.useOnWindowResize(() => {
|
|
9
|
+
const { innerHeight, innerWidth } = window;
|
|
10
|
+
if (innerHeight !== height) {
|
|
11
|
+
setHeight(innerHeight);
|
|
12
|
+
}
|
|
13
|
+
if (innerWidth !== width) {
|
|
14
|
+
setWidth(innerWidth);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
return React.useMemo(() => ({ height, width }), [height, width]);
|
|
18
|
+
}
|
|
19
|
+
exports.useWindowSize = useWindowSize;
|
|
20
|
+
//# sourceMappingURL=useWindowSize.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWindowSize.cjs","sources":["../../../../../packages/react-utils/src/hooks/useWindowSize.ts"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { useOnWindowResize } from './useOnWindowResize'\n\nexport function useWindowSize() {\n\tconst [width, setWidth] = useState(window.innerWidth)\n\tconst [height, setHeight] = useState(window.innerHeight)\n\n\tuseOnWindowResize(() => {\n\t\tconst { innerHeight, innerWidth } = window\n\t\tif (innerHeight !== height) {\n\t\t\tsetHeight(innerHeight)\n\t\t}\n\n\t\tif (innerWidth !== width) {\n\t\t\tsetWidth(innerWidth)\n\t\t}\n\t})\n\n\treturn useMemo(() => ({ height, width }), [height, width])\n}\n"],"names":["useState","useOnWindowResize","useMemo"],"mappings":";;;;AAGO,SAAS,gBAAgB;AAC/B,QAAM,CAAC,OAAO,QAAQ,IAAIA,MAAAA,SAAS,OAAO,UAAU;AACpD,QAAM,CAAC,QAAQ,SAAS,IAAIA,MAAAA,SAAS,OAAO,WAAW;AAEvDC,oBAAAA,kBAAkB,MAAM;AACvB,UAAM,EAAE,aAAa,WAAA,IAAe;AACpC,QAAI,gBAAgB,QAAQ;AAC3B,gBAAU,WAAW;AAAA,IACtB;AAEA,QAAI,eAAe,OAAO;AACzB,eAAS,UAAU;AAAA,IACpB;AAAA,EACD,CAAC;AAED,SAAOC,MAAAA,QAAQ,OAAO,EAAE,QAAQ,UAAU,CAAC,QAAQ,KAAK,CAAC;AAC1D;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useState, useMemo } from "react";
|
|
2
|
+
import { useOnWindowResize } from "./useOnWindowResize.js";
|
|
3
|
+
function useWindowSize() {
|
|
4
|
+
const [width, setWidth] = useState(window.innerWidth);
|
|
5
|
+
const [height, setHeight] = useState(window.innerHeight);
|
|
6
|
+
useOnWindowResize(() => {
|
|
7
|
+
const { innerHeight, innerWidth } = window;
|
|
8
|
+
if (innerHeight !== height) {
|
|
9
|
+
setHeight(innerHeight);
|
|
10
|
+
}
|
|
11
|
+
if (innerWidth !== width) {
|
|
12
|
+
setWidth(innerWidth);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return useMemo(() => ({ height, width }), [height, width]);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
useWindowSize
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=useWindowSize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWindowSize.js","sources":["../../../../../packages/react-utils/src/hooks/useWindowSize.ts"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { useOnWindowResize } from './useOnWindowResize'\n\nexport function useWindowSize() {\n\tconst [width, setWidth] = useState(window.innerWidth)\n\tconst [height, setHeight] = useState(window.innerHeight)\n\n\tuseOnWindowResize(() => {\n\t\tconst { innerHeight, innerWidth } = window\n\t\tif (innerHeight !== height) {\n\t\t\tsetHeight(innerHeight)\n\t\t}\n\n\t\tif (innerWidth !== width) {\n\t\t\tsetWidth(innerWidth)\n\t\t}\n\t})\n\n\treturn useMemo(() => ({ height, width }), [height, width])\n}\n"],"names":[],"mappings":";;AAGO,SAAS,gBAAgB;AAC/B,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,OAAO,UAAU;AACpD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,OAAO,WAAW;AAEvD,oBAAkB,MAAM;AACvB,UAAM,EAAE,aAAa,WAAA,IAAe;AACpC,QAAI,gBAAgB,QAAQ;AAC3B,gBAAU,WAAW;AAAA,IACtB;AAEA,QAAI,eAAe,OAAO;AACzB,eAAS,UAAU;AAAA,IACpB;AAAA,EACD,CAAC;AAED,SAAO,QAAQ,OAAO,EAAE,QAAQ,UAAU,CAAC,QAAQ,KAAK,CAAC;AAC1D;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emptyArray.cjs","sources":["../../../../../packages/react-utils/src/referentiallyStable/emptyArray.ts"],"sourcesContent":["export const emptyArray = Object.freeze<any>([]) as any[]\n"],"names":[],"mappings":";;AAAO,MAAM,aAAa,OAAO,OAAY,CAAA,CAAE;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emptyArray.js","sources":["../../../../../packages/react-utils/src/referentiallyStable/emptyArray.ts"],"sourcesContent":["export const emptyArray = Object.freeze<any>([]) as any[]\n"],"names":[],"mappings":"AAAO,MAAM,aAAa,OAAO,OAAY,CAAA,CAAE;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emptyObject.cjs","sources":["../../../../../packages/react-utils/src/referentiallyStable/emptyObject.ts"],"sourcesContent":["export const emptyObject = Object.freeze({})\n"],"names":[],"mappings":";;AAAO,MAAM,cAAc,OAAO,OAAO,CAAA,CAAE;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emptyObject.js","sources":["../../../../../packages/react-utils/src/referentiallyStable/emptyObject.ts"],"sourcesContent":["export const emptyObject = Object.freeze({})\n"],"names":[],"mappings":"AAAO,MAAM,cAAc,OAAO,OAAO,CAAA,CAAE;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identityFunction.cjs","sources":["../../../../../packages/react-utils/src/referentiallyStable/identityFunction.ts"],"sourcesContent":["export const identityFunction = <Value>(value: Value) => value\n"],"names":[],"mappings":";;AAAO,MAAM,mBAAmB,CAAQ,UAAiB;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identityFunction.js","sources":["../../../../../packages/react-utils/src/referentiallyStable/identityFunction.ts"],"sourcesContent":["export const identityFunction = <Value>(value: Value) => value\n"],"names":[],"mappings":"AAAO,MAAM,mBAAmB,CAAQ,UAAiB;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noop.cjs","sources":["../../../../../packages/react-utils/src/referentiallyStable/noop.ts"],"sourcesContent":["export const noop = () => undefined\n"],"names":[],"mappings":";;AAAO,MAAM,OAAO,MAAM;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noop.js","sources":["../../../../../packages/react-utils/src/referentiallyStable/noop.ts"],"sourcesContent":["export const noop = () => undefined\n"],"names":[],"mappings":"AAAO,MAAM,OAAO,MAAM;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"returnFalse.cjs","sources":["../../../../../packages/react-utils/src/referentiallyStable/returnFalse.ts"],"sourcesContent":["export const returnFalse = () => false\n"],"names":[],"mappings":";;AAAO,MAAM,cAAc,MAAM;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"returnFalse.js","sources":["../../../../../packages/react-utils/src/referentiallyStable/returnFalse.ts"],"sourcesContent":["export const returnFalse = () => false\n"],"names":[],"mappings":"AAAO,MAAM,cAAc,MAAM;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"returnTrue.cjs","sources":["../../../../../packages/react-utils/src/referentiallyStable/returnTrue.ts"],"sourcesContent":["export const returnTrue = () => true\n"],"names":[],"mappings":";;AAAO,MAAM,aAAa,MAAM;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"returnTrue.js","sources":["../../../../../packages/react-utils/src/referentiallyStable/returnTrue.ts"],"sourcesContent":["export const returnTrue = () => true\n"],"names":[],"mappings":"AAAO,MAAM,aAAa,MAAM;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const useReferentiallyStableCallback = (callback) => {
|
|
5
|
+
const ref = React.useRef(callback);
|
|
6
|
+
ref.current = callback;
|
|
7
|
+
return React.useCallback(
|
|
8
|
+
((...args) => {
|
|
9
|
+
return ref.current(...args);
|
|
10
|
+
}),
|
|
11
|
+
[]
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
exports.useReferentiallyStableCallback = useReferentiallyStableCallback;
|
|
15
|
+
//# sourceMappingURL=useReferentiallyStableCallback.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useReferentiallyStableCallback.cjs","sources":["../../../../../packages/react-utils/src/referentiallyStable/useReferentiallyStableCallback.ts"],"sourcesContent":["import { useCallback, useRef } from 'react'\n\nexport type NoConstructor<T extends Function> = T extends new(...args: unknown[]) => unknown ? never\n\t: T\n// TODO: Should be possible to remove when React.useEvent() lands\nexport const useReferentiallyStableCallback = <T extends Function>(callback: NoConstructor<T>): T => {\n\tconst ref = useRef(callback)\n\tref.current = callback\n\treturn useCallback<T>(\n\t\t((...args: any[]) => {\n\t\t\treturn ref.current(...args)\n\t\t}) as unknown as T,\n\t\t[],\n\t)\n}\n"],"names":["useRef","useCallback"],"mappings":";;;AAKO,MAAM,iCAAiC,CAAqB,aAAkC;AACpG,QAAM,MAAMA,MAAAA,OAAO,QAAQ;AAC3B,MAAI,UAAU;AACd,SAAOC,MAAAA;AAAAA,KACL,IAAI,SAAgB;AACpB,aAAO,IAAI,QAAQ,GAAG,IAAI;AAAA,IAC3B;AAAA,IACA,CAAA;AAAA,EAAC;AAEH;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useRef, useCallback } from "react";
|
|
2
|
+
const useReferentiallyStableCallback = (callback) => {
|
|
3
|
+
const ref = useRef(callback);
|
|
4
|
+
ref.current = callback;
|
|
5
|
+
return useCallback(
|
|
6
|
+
((...args) => {
|
|
7
|
+
return ref.current(...args);
|
|
8
|
+
}),
|
|
9
|
+
[]
|
|
10
|
+
);
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
useReferentiallyStableCallback
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useReferentiallyStableCallback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useReferentiallyStableCallback.js","sources":["../../../../../packages/react-utils/src/referentiallyStable/useReferentiallyStableCallback.ts"],"sourcesContent":["import { useCallback, useRef } from 'react'\n\nexport type NoConstructor<T extends Function> = T extends new(...args: unknown[]) => unknown ? never\n\t: T\n// TODO: Should be possible to remove when React.useEvent() lands\nexport const useReferentiallyStableCallback = <T extends Function>(callback: NoConstructor<T>): T => {\n\tconst ref = useRef(callback)\n\tref.current = callback\n\treturn useCallback<T>(\n\t\t((...args: any[]) => {\n\t\t\treturn ref.current(...args)\n\t\t}) as unknown as T,\n\t\t[],\n\t)\n}\n"],"names":[],"mappings":";AAKO,MAAM,iCAAiC,CAAqB,aAAkC;AACpG,QAAM,MAAM,OAAO,QAAQ;AAC3B,MAAI,UAAU;AACd,SAAO;AAAA,KACL,IAAI,SAAgB;AACpB,aAAO,IAAI,QAAQ,GAAG,IAAI;AAAA,IAC3B;AAAA,IACA,CAAA;AAAA,EAAC;AAEH;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createContext.d.ts","sourceRoot":"","sources":["../../../src/context/createContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAG9C,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAKlG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRequiredContext.d.ts","sourceRoot":"","sources":["../../../src/context/createRequiredContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAK9C,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAehG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ScopedConsoleContextType } from './Types';
|
|
2
|
+
export declare function noopLog(...parameters: any[]): void;
|
|
3
|
+
export declare function noopLogged<T>(message: string, value: T): T;
|
|
4
|
+
export declare const noopScopedConsole: ScopedConsoleContextType;
|
|
5
|
+
export declare function isNoopScopedConsole(value: unknown): boolean;
|
|
6
|
+
//# sourceMappingURL=Constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../src/debug-context/Constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAEvD,wBAAgB,OAAO,CAAC,GAAG,UAAU,EAAE,GAAG,EAAE,QAAI;AAEhD,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAE1D;AAED,eAAO,MAAM,iBAAiB,EAAE,wBAS9B,CAAA;AAEF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE3D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ScopedConsoleContextType } from './Types';
|
|
3
|
+
export declare const ScopedConsoleContext: import("react").Context<ScopedConsoleContextType>;
|
|
4
|
+
export declare const useScopedConsoleRef: (prefix: string, override?: boolean) => import("react").RefObject<ScopedConsoleContextType>;
|
|
5
|
+
export type DebugChildrenProps = {
|
|
6
|
+
active?: true;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
id: string;
|
|
9
|
+
} | {
|
|
10
|
+
active?: false;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
id?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const DebugChildren: import("react").NamedExoticComponent<DebugChildrenProps>;
|
|
15
|
+
//# sourceMappingURL=Context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../src/debug-context/Context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,SAAS,EAA+B,MAAM,OAAO,CAAA;AAEnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAmClD,eAAO,MAAM,oBAAoB,mDAAiD,CAAA;AAOlF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,EAAE,WAAW,OAAO,wDAkBrE,CAAA;AAED,MAAM,MAAM,kBAAkB,GAC3B;IAAE,MAAM,CAAC,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,MAAM,CAAC,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvD,eAAO,MAAM,aAAa,0DAYxB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type DebugMethod = (...parameters: any[]) => void;
|
|
2
|
+
export type ResultDebuggedMethod = <T>(message: string, value: T) => T;
|
|
3
|
+
export type ScopedConsoleContextType = {
|
|
4
|
+
log: DebugMethod;
|
|
5
|
+
logged: ResultDebuggedMethod;
|
|
6
|
+
warn: DebugMethod;
|
|
7
|
+
warned: ResultDebuggedMethod;
|
|
8
|
+
error: DebugMethod;
|
|
9
|
+
errored: ResultDebuggedMethod;
|
|
10
|
+
trace: DebugMethod;
|
|
11
|
+
traced: ResultDebuggedMethod;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=Types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["../../../src/debug-context/Types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,UAAU,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;AACxD,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,CAAA;AAEtE,MAAM,MAAM,wBAAwB,GAAG;IACtC,GAAG,EAAE,WAAW,CAAA;IAChB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,KAAK,EAAE,WAAW,CAAA;IAClB,OAAO,EAAE,oBAAoB,CAAA;IAC7B,KAAK,EAAE,WAAW,CAAA;IAClB,MAAM,EAAE,oBAAoB,CAAA;CAC5B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/debug-context/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from './unwrapRefValue';
|
|
2
|
+
export * from './useAbortController';
|
|
3
|
+
export * from './useArrayMapMemo';
|
|
4
|
+
export * from './useAutoHeightTextArea';
|
|
5
|
+
export * from './useChildrenAsLabel';
|
|
6
|
+
export * from './useComposeRef';
|
|
7
|
+
export * from './useConstantLengthInvariant';
|
|
8
|
+
export * from './useConstantValueInvariant';
|
|
9
|
+
export * from './useDebounce';
|
|
10
|
+
export * from './useDebounceCallback';
|
|
11
|
+
export * from './useDocumentTitle';
|
|
12
|
+
export * from './useExpectSameValueReference';
|
|
13
|
+
export * from './useForceRender';
|
|
14
|
+
export * from './useId';
|
|
15
|
+
export * from './useIsMounted';
|
|
16
|
+
export * from './useObjectMemo';
|
|
17
|
+
export * from './useOnElementClickOutsideCallback';
|
|
18
|
+
export * from './useOnElementMouseEnterDelayedCallback';
|
|
19
|
+
export * from './useOnElementResize';
|
|
20
|
+
export * from './useOnWindowResize';
|
|
21
|
+
export * from './usePreviousValue';
|
|
22
|
+
export * from './useStoredState';
|
|
23
|
+
export * from './useUpdatedRef';
|
|
24
|
+
export * from './useWindowSize';
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,kBAAkB,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oCAAoC,CAAA;AAClD,cAAc,yCAAyC,CAAA;AACvD,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export type RefObjectOrElement<T> = T | RefObject<T | null>;
|
|
3
|
+
/**
|
|
4
|
+
* Unwraps a ref object or returns the value if it is not a ref object.
|
|
5
|
+
* @param value - Value to unwrap
|
|
6
|
+
* @returns Unwrapped value
|
|
7
|
+
*/
|
|
8
|
+
export declare function unwrapRefValue<T>(value: RefObjectOrElement<T>): T | null;
|
|
9
|
+
//# sourceMappingURL=unwrapRefValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unwrapRefValue.d.ts","sourceRoot":"","sources":["../../../src/hooks/unwrapRefValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;AAE3D;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAMxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAbortController.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAbortController.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,cAKP,WAOvB,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ⚠️ ONLY USE THIS IF YOU *REALLY* KNOW WHAT YOU'RE DOING! ⚠️
|
|
3
|
+
* ⚠ HERE BE DRAGONS THAT KNOW WHERE YOU LIVE! ⚠
|
|
4
|
+
*
|
|
5
|
+
* This is a bit of React naughtiness that allows us to memoize outputs of Array.prototype.map() based on the contents
|
|
6
|
+
* of the original array, and not its referential equality. That way, if we create a new array with identical items,
|
|
7
|
+
* we get an array that is referentially equal to the previous one.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useArrayMapMemo: <Item, OutputItem>(items: Item[], map: (value: Item, index: number, array: Item[]) => OutputItem) => OutputItem[];
|
|
10
|
+
//# sourceMappingURL=useArrayMapMemo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useArrayMapMemo.d.ts","sourceRoot":"","sources":["../../../src/hooks/useArrayMapMemo.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,IAAI,EAAE,UAAU,EAC/C,OAAO,IAAI,EAAE,EACb,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,UAAU,KAC5D,UAAU,EAaZ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAutoHeightTextArea.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAutoHeightTextArea.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAkB,MAAM,kBAAkB,CAAA;AAOrE,eAAO,MAAM,qBAAqB,GACjC,aAAa,kBAAkB,CAAC,mBAAmB,CAAC,EACpD,OAAO,MAAM,EACb,SAAS,MAAM,EACf,SAAS,MAAM,SA0Cf,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Walks through the children and returns a string representation of the text content.
|
|
4
|
+
*
|
|
5
|
+
* @param node - The children to walk through.
|
|
6
|
+
* @returns String representation of the text content or undefined if there is no text content.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getChildrenAsLabel(node: ReactNode): string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Walks through the children and returns a string representation of the text content.
|
|
11
|
+
*
|
|
12
|
+
* @param node - The children to walk through.
|
|
13
|
+
* @returns String representation of the text content or undefined if there is no text content.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useChildrenAsLabel(node: ReactNode): string | undefined;
|
|
16
|
+
//# sourceMappingURL=useChildrenAsLabel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChildrenAsLabel.d.ts","sourceRoot":"","sources":["../../../src/hooks/useChildrenAsLabel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAW,MAAM,OAAO,CAAA;AAQpD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CA8CtE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAEtE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MutableRefObject, RefCallback } from 'react';
|
|
2
|
+
export type MaybeRef<T> = ((instance: T | null) => void) | MutableRefObject<T | null> | null | undefined;
|
|
3
|
+
export type ComposedRefCallback<T> = RefCallback<T> & {
|
|
4
|
+
current: T | null;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Fills any number of refs with an instance
|
|
8
|
+
*
|
|
9
|
+
* Useful when you need to use outer ref and inner in the same time, e.g. passing element
|
|
10
|
+
* back to forwardedRef an also using the same value within the component locally.
|
|
11
|
+
*
|
|
12
|
+
* @param refs - Rest parameter of refs to fill with instance
|
|
13
|
+
* @returns Returns a function similar to a RefCallback
|
|
14
|
+
*/
|
|
15
|
+
export declare function useComposeRef<T>(...refs: MaybeRef<T>[]): ComposedRefCallback<T>;
|
|
16
|
+
//# sourceMappingURL=useComposeRef.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useComposeRef.d.ts","sourceRoot":"","sources":["../../../src/hooks/useComposeRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAmB,MAAM,OAAO,CAAA;AAEtE,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC,GAAG,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,CAAA;AACxG,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,GAAG,IAAI,CAAA;CAAE,CAAA;AAY3E;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAqB/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConstantLengthInvariant.d.ts","sourceRoot":"","sources":["../../../src/hooks/useConstantLengthInvariant.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,0BAA0B,GAAI,IAAI,EAAE,OAAO,IAAI,EAAE,EAAE,UAAU,MAAM,SAS/E,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConstantValueInvariant.d.ts","sourceRoot":"","sources":["../../../src/hooks/useConstantValueInvariant.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,yBAAyB,GAAI,KAAK,EAAE,OAAO,KAAK,EAAE,UAAU,MAAM,SAS9E,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDebounce.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDebounce.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,OAAO,CAAC,EAAE,YAAY,MAAM,KAAG,CAS7D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDebounceCallback.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDebounceCallback.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,GAAI,IAAI,MAAM,GAAG,EAAE,YAAY,MAAM,eAgBpE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDocumentTitle.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDocumentTitle.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,MAAM,QAkB7H"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks whether the next value is the same reference as the previous one
|
|
3
|
+
*
|
|
4
|
+
* If not, it checks whether the values are deeply equal. If not, it logs an error.
|
|
5
|
+
*
|
|
6
|
+
* @param next - Value to be checked.
|
|
7
|
+
* @param shouldThrow - If true, it throws an error instead of logging it. Defaults to false.
|
|
8
|
+
* @returns void
|
|
9
|
+
* -
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* useExpectSameValueReference(style)
|
|
13
|
+
* ```
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* useExpectSameValueReference(style, true)
|
|
17
|
+
* ```
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* useExpectSameValueReference(style, import.meta.env.DEV)
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function useExpectSameValueReference<T>(next: T, shouldThrow?: boolean): void;
|
|
24
|
+
//# sourceMappingURL=useExpectSameValueReference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExpectSameValueReference.d.ts","sourceRoot":"","sources":["../../../src/hooks/useExpectSameValueReference.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,GAAE,OAAe,QA4BnF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useForceRender.d.ts","sourceRoot":"","sources":["../../../src/hooks/useForceRender.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,0CAG1B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useId.d.ts","sourceRoot":"","sources":["../../../src/hooks/useId.ts"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,wBAAgB,KAAK,WAEpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsMounted.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIsMounted.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,0CAYxB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useObjectMemo.d.ts","sourceRoot":"","sources":["../../../src/hooks/useObjectMemo.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,MAAM,EAAE,OAAO,CAAC,KAAG,CAM1D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnElementClickOutsideCallback.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOnElementClickOutsideCallback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAkB,MAAM,kBAAkB,CAAA;AAErE,wBAAgB,gCAAgC,CAC/C,YAAY,EAAE,kBAAkB,CAAC,WAAW,CAAC,EAC7C,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GACnC,IAAI,CAgBN"}
|