@siberiacancode/reactuse 0.0.72 → 0.0.74
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/LICENSE +21 -21
- package/dist/cjs/_rollupPluginBabelHelpers-_zWC8AOE.js +3 -0
- package/dist/cjs/_rollupPluginBabelHelpers-_zWC8AOE.js.map +1 -0
- package/dist/cjs/hooks/index.js +2 -2
- package/dist/cjs/hooks/useActiveElement/useActiveElement.js +2 -2
- package/dist/cjs/hooks/useActiveElement/useActiveElement.js.map +1 -1
- package/dist/cjs/hooks/useAsync/useAsync.js +2 -2
- package/dist/cjs/hooks/useAsync/useAsync.js.map +1 -1
- package/dist/cjs/hooks/useBattery/useBattery.js +2 -2
- package/dist/cjs/hooks/useBattery/useBattery.js.map +1 -1
- package/dist/cjs/hooks/useBoolean/useBoolean.js +2 -2
- package/dist/cjs/hooks/useBreakpoints/constants/breakpoints.js +1 -1
- package/dist/cjs/hooks/useBreakpoints/useBreakpoints.js +2 -2
- package/dist/cjs/hooks/useBreakpoints/useBreakpoints.js.map +1 -1
- package/dist/cjs/hooks/useBrowserLanguage/useBrowserLanguage.js +1 -1
- package/dist/cjs/hooks/useClickOutside/useClickOutside.js +2 -2
- package/dist/cjs/hooks/useClickOutside/useClickOutside.js.map +1 -1
- package/dist/cjs/hooks/useClipboard/useClipboard.js +2 -2
- package/dist/cjs/hooks/useClipboard/useClipboard.js.map +1 -1
- package/dist/cjs/hooks/useCounter/useCounter.js +2 -2
- package/dist/cjs/hooks/useCounter/useCounter.js.map +1 -1
- package/dist/cjs/hooks/useCssVar/useCssVar.js +2 -2
- package/dist/cjs/hooks/useCssVar/useCssVar.js.map +1 -1
- package/dist/cjs/hooks/useDebounceCallback/useDebounceCallback.js +2 -2
- package/dist/cjs/hooks/useDebounceCallback/useDebounceCallback.js.map +1 -1
- package/dist/cjs/hooks/useDebounceValue/useDebounceValue.js +2 -2
- package/dist/cjs/hooks/useDebounceValue/useDebounceValue.js.map +1 -1
- package/dist/cjs/hooks/useDefault/useDefault.js +2 -2
- package/dist/cjs/hooks/useDefault/useDefault.js.map +1 -1
- package/dist/cjs/hooks/useDeviceMotion/useDeviceMotion.js +2 -2
- package/dist/cjs/hooks/useDeviceMotion/useDeviceMotion.js.map +1 -1
- package/dist/cjs/hooks/useDeviceOrientation/useDeviceOrientation.js +2 -2
- package/dist/cjs/hooks/useDeviceOrientation/useDeviceOrientation.js.map +1 -1
- package/dist/cjs/hooks/useDidUpdate/useDidUpdate.js +1 -1
- package/dist/cjs/hooks/useDidUpdate/useDidUpdate.js.map +1 -1
- package/dist/cjs/hooks/useDisclosure/useDisclosure.js +2 -2
- package/dist/cjs/hooks/useDisclosure/useDisclosure.js.map +1 -1
- package/dist/cjs/hooks/useDocumentEvent/useDocumentEvent.js +2 -2
- package/dist/cjs/hooks/useDocumentEvent/useDocumentEvent.js.map +1 -1
- package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
- package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js.map +1 -1
- package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
- package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.js.map +1 -1
- package/dist/cjs/hooks/useElementSize/useElementSize.js +3 -0
- package/dist/cjs/hooks/useElementSize/useElementSize.js.map +1 -0
- package/dist/cjs/hooks/useEvent/useEvent.js +1 -1
- package/dist/cjs/hooks/useEvent/useEvent.js.map +1 -1
- package/dist/cjs/hooks/useEventListener/useEventListener.js +2 -2
- package/dist/cjs/hooks/useEventListener/useEventListener.js.map +1 -1
- package/dist/cjs/hooks/useEyeDropper/useEyeDropper.js +2 -2
- package/dist/cjs/hooks/useEyeDropper/useEyeDropper.js.map +1 -1
- package/dist/cjs/hooks/useFavicon/useFavicon.js +2 -2
- package/dist/cjs/hooks/useFavicon/useFavicon.js.map +1 -1
- package/dist/cjs/hooks/useField/useField.js +2 -2
- package/dist/cjs/hooks/useField/useField.js.map +1 -1
- package/dist/cjs/hooks/useFileDialog/useFileDialog.js +2 -2
- package/dist/cjs/hooks/useFileDialog/useFileDialog.js.map +1 -1
- package/dist/cjs/hooks/useFocus/useFocus.js +2 -2
- package/dist/cjs/hooks/useFocus/useFocus.js.map +1 -1
- package/dist/cjs/hooks/useFps/useFps.js +2 -2
- package/dist/cjs/hooks/useFps/useFps.js.map +1 -1
- package/dist/cjs/hooks/useFullscreen/useFullscreen.js +2 -2
- package/dist/cjs/hooks/useFullscreen/useFullscreen.js.map +1 -1
- package/dist/cjs/hooks/useGamepad/helpers/mapGamepadToXbox360Controller.js +1 -1
- package/dist/cjs/hooks/useGamepad/useGamepad.js +2 -2
- package/dist/cjs/hooks/useGamepad/useGamepad.js.map +1 -1
- package/dist/cjs/hooks/useGeolocation/useGeolocation.js +2 -2
- package/dist/cjs/hooks/useGeolocation/useGeolocation.js.map +1 -1
- package/dist/cjs/hooks/useHash/useHash.js +2 -2
- package/dist/cjs/hooks/useHash/useHash.js.map +1 -1
- package/dist/cjs/hooks/useHotkeys/useHotkeys.js +2 -2
- package/dist/cjs/hooks/useHotkeys/useHotkeys.js.map +1 -1
- package/dist/cjs/hooks/useHover/useHover.js +2 -2
- package/dist/cjs/hooks/useHover/useHover.js.map +1 -1
- package/dist/cjs/hooks/useIdle/useIdle.js +2 -2
- package/dist/cjs/hooks/useIdle/useIdle.js.map +1 -1
- package/dist/cjs/hooks/useImage/useImage.js +2 -2
- package/dist/cjs/hooks/useImage/useImage.js.map +1 -1
- package/dist/cjs/hooks/useInfiniteScroll/useInfiniteScroll.js +2 -2
- package/dist/cjs/hooks/useInfiniteScroll/useInfiniteScroll.js.map +1 -1
- package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
- package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js.map +1 -1
- package/dist/cjs/hooks/useInterval/useInterval.js +2 -2
- package/dist/cjs/hooks/useInterval/useInterval.js.map +1 -1
- package/dist/cjs/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
- package/dist/cjs/hooks/useIsFirstRender/useIsFirstRender.js.map +1 -1
- package/dist/cjs/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
- package/dist/cjs/hooks/useKeyPress/useKeyPress.js +2 -2
- package/dist/cjs/hooks/useKeyPress/useKeyPress.js.map +1 -1
- package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.js +2 -2
- package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.js.map +1 -1
- package/dist/cjs/hooks/useKeyboard/useKeyboard.js +2 -2
- package/dist/cjs/hooks/useKeyboard/useKeyboard.js.map +1 -1
- package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js +2 -2
- package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js.map +1 -1
- package/dist/cjs/hooks/useLastChanged/useLastChanged.js +2 -2
- package/dist/cjs/hooks/useList/useList.js +2 -2
- package/dist/cjs/hooks/useList/useList.js.map +1 -1
- package/dist/cjs/hooks/useLocalStorage/useLocalStorage.js +2 -2
- package/dist/cjs/hooks/useLocalStorage/useLocalStorage.js.map +1 -1
- package/dist/cjs/hooks/useLogger/useLogger.js +2 -2
- package/dist/cjs/hooks/useLongPress/useLongPress.js +2 -2
- package/dist/cjs/hooks/useLongPress/useLongPress.js.map +1 -1
- package/dist/cjs/hooks/useMap/useMap.js +2 -2
- package/dist/cjs/hooks/useMap/useMap.js.map +1 -1
- package/dist/cjs/hooks/useMeasure/useMeasure.js +2 -2
- package/dist/cjs/hooks/useMeasure/useMeasure.js.map +1 -1
- package/dist/cjs/hooks/useMediaQuery/useMediaQuery.js +1 -1
- package/dist/cjs/hooks/useMediaQuery/useMediaQuery.js.map +1 -1
- package/dist/cjs/hooks/useMemory/useMemory.js +2 -2
- package/dist/cjs/hooks/useMount/useMount.js +1 -1
- package/dist/cjs/hooks/useMount/useMount.js.map +1 -1
- package/dist/cjs/hooks/useMouse/useMouse.js +2 -2
- package/dist/cjs/hooks/useMouse/useMouse.js.map +1 -1
- package/dist/cjs/hooks/useMutation/useMutation.js +2 -2
- package/dist/cjs/hooks/useMutation/useMutation.js.map +1 -1
- package/dist/cjs/hooks/useMutationObserver/useMutationObserver.js +2 -2
- package/dist/cjs/hooks/useMutationObserver/useMutationObserver.js.map +1 -1
- package/dist/cjs/hooks/useNetwork/useNetwork.js +2 -2
- package/dist/cjs/hooks/useNetwork/useNetwork.js.map +1 -1
- package/dist/cjs/hooks/useOffsetPagination/useOffsetPagination.js +2 -2
- package/dist/cjs/hooks/useOffsetPagination/useOffsetPagination.js.map +1 -1
- package/dist/cjs/hooks/useOnline/useOnline.js +1 -1
- package/dist/cjs/hooks/useOnline/useOnline.js.map +1 -1
- package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
- package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.js.map +1 -1
- package/dist/cjs/hooks/useOptimistic/useOptimistic.js +2 -2
- package/dist/cjs/hooks/useOptimistic/useOptimistic.js.map +1 -1
- package/dist/cjs/hooks/useOrientation/useOrientation.js +2 -2
- package/dist/cjs/hooks/useOrientation/useOrientation.js.map +1 -1
- package/dist/cjs/hooks/useOtpCredential/useOtpCredential.js +2 -2
- package/dist/cjs/hooks/useOtpCredential/useOtpCredential.js.map +1 -1
- package/dist/cjs/hooks/usePageLeave/usePageLeave.js +2 -2
- package/dist/cjs/hooks/usePageLeave/usePageLeave.js.map +1 -1
- package/dist/cjs/hooks/usePaint/helpers/Paint.js +2 -2
- package/dist/cjs/hooks/usePaint/helpers/Paint.js.map +1 -1
- package/dist/cjs/hooks/usePaint/helpers/Pointer.js +2 -2
- package/dist/cjs/hooks/usePaint/helpers/Pointer.js.map +1 -1
- package/dist/cjs/hooks/usePaint/usePaint.js +2 -2
- package/dist/cjs/hooks/usePaint/usePaint.js.map +1 -1
- package/dist/cjs/hooks/useParallax/useParallax.js +2 -2
- package/dist/cjs/hooks/useParallax/useParallax.js.map +1 -1
- package/dist/cjs/hooks/usePermission/usePermission.js +2 -2
- package/dist/cjs/hooks/usePermission/usePermission.js.map +1 -1
- package/dist/cjs/hooks/usePointerLock/usePointerLock.js +3 -0
- package/dist/cjs/hooks/usePointerLock/usePointerLock.js.map +1 -0
- package/dist/cjs/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
- package/dist/cjs/hooks/usePreferredColorScheme/usePreferredColorScheme.js.map +1 -1
- package/dist/cjs/hooks/usePreferredContrast/usePreferredContrast.js +1 -1
- package/dist/cjs/hooks/usePreferredContrast/usePreferredContrast.js.map +1 -1
- package/dist/cjs/hooks/usePreferredDark/usePreferredDark.js +1 -1
- package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.js +1 -1
- package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.js.map +1 -1
- package/dist/cjs/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js +1 -1
- package/dist/cjs/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js.map +1 -1
- package/dist/cjs/hooks/usePrevious/usePrevious.js +1 -1
- package/dist/cjs/hooks/useQuery/useQuery.js +2 -2
- package/dist/cjs/hooks/useQuery/useQuery.js.map +1 -1
- package/dist/cjs/hooks/useQueue/useQueue.js +2 -2
- package/dist/cjs/hooks/useQueue/useQueue.js.map +1 -1
- package/dist/cjs/hooks/useRaf/useRaf.js +2 -2
- package/dist/cjs/hooks/useRaf/useRaf.js.map +1 -1
- package/dist/cjs/hooks/useRafValue/useRafValue.js +2 -2
- package/dist/cjs/hooks/useRafValue/useRafValue.js.map +1 -1
- package/dist/cjs/hooks/useRenderCount/useRenderCount.js +1 -1
- package/dist/cjs/hooks/useRenderCount/useRenderCount.js.map +1 -1
- package/dist/cjs/hooks/useRenderInfo/useRenderInfo.js +1 -1
- package/dist/cjs/hooks/useRenderInfo/useRenderInfo.js.map +1 -1
- package/dist/cjs/hooks/useRerender/useRerender.js +2 -2
- package/dist/cjs/hooks/useRerender/useRerender.js.map +1 -1
- package/dist/cjs/hooks/useResizeObserver/useResizeObserver.js +2 -2
- package/dist/cjs/hooks/useResizeObserver/useResizeObserver.js.map +1 -1
- package/dist/cjs/hooks/useScreenOrientation/useScreenOrientation.js +2 -2
- package/dist/cjs/hooks/useScreenOrientation/useScreenOrientation.js.map +1 -1
- package/dist/cjs/hooks/useScript/useScript.js +2 -2
- package/dist/cjs/hooks/useScript/useScript.js.map +1 -1
- package/dist/cjs/hooks/useSessionStorage/useSessionStorage.js +2 -2
- package/dist/cjs/hooks/useSessionStorage/useSessionStorage.js.map +1 -1
- package/dist/cjs/hooks/useSet/useSet.js +2 -2
- package/dist/cjs/hooks/useSet/useSet.js.map +1 -1
- package/dist/cjs/hooks/useShare/useShare.js +2 -2
- package/dist/cjs/hooks/useShare/useShare.js.map +1 -1
- package/dist/cjs/hooks/useStep/useStep.js +2 -2
- package/dist/cjs/hooks/useStep/useStep.js.map +1 -1
- package/dist/cjs/hooks/useStopwatch/useStopwatch.js +2 -2
- package/dist/cjs/hooks/useStopwatch/useStopwatch.js.map +1 -1
- package/dist/cjs/hooks/useStorage/useStorage.js +2 -2
- package/dist/cjs/hooks/useStorage/useStorage.js.map +1 -1
- package/dist/cjs/hooks/useTextSelection/useTextSelection.js +2 -2
- package/dist/cjs/hooks/useTextSelection/useTextSelection.js.map +1 -1
- package/dist/cjs/hooks/useTime/useTime.js +2 -2
- package/dist/cjs/hooks/useTime/useTime.js.map +1 -1
- package/dist/cjs/hooks/useTimeout/useTimeout.js +2 -2
- package/dist/cjs/hooks/useTimeout/useTimeout.js.map +1 -1
- package/dist/cjs/hooks/useTimer/useTimer.js +2 -2
- package/dist/cjs/hooks/useTimer/useTimer.js.map +1 -1
- package/dist/cjs/hooks/useToggle/useToggle.js +2 -2
- package/dist/cjs/hooks/useToggle/useToggle.js.map +1 -1
- package/dist/cjs/hooks/useUnmount/useUnmount.js +1 -1
- package/dist/cjs/hooks/useUnmount/useUnmount.js.map +1 -1
- package/dist/cjs/hooks/useWebSocket/useWebSocket.js +2 -2
- package/dist/cjs/hooks/useWebSocket/useWebSocket.js.map +1 -1
- package/dist/cjs/hooks/useWindowEvent/useWindowEvent.js +2 -2
- package/dist/cjs/hooks/useWindowEvent/useWindowEvent.js.map +1 -1
- package/dist/cjs/hooks/useWindowFocus/useWindowFocus.js +2 -2
- package/dist/cjs/hooks/useWindowFocus/useWindowFocus.js.map +1 -1
- package/dist/cjs/hooks/useWindowScroll/useWindowScroll.js +2 -2
- package/dist/cjs/hooks/useWindowScroll/useWindowScroll.js.map +1 -1
- package/dist/cjs/hooks/useWindowSize/useWindowSize.js +2 -2
- package/dist/cjs/hooks/useWindowSize/useWindowSize.js.map +1 -1
- package/dist/cjs/hooks/useWizard/useWizard.js +2 -2
- package/dist/cjs/hooks/useWizard/useWizard.js.map +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/utils/helpers/debounce.js +1 -1
- package/dist/cjs/utils/helpers/debounce.js.map +1 -1
- package/dist/cjs/utils/helpers/getElement.js +1 -1
- package/dist/cjs/utils/helpers/getElement.js.map +1 -1
- package/dist/cjs/utils/helpers/getRetry.js +1 -1
- package/dist/cjs/utils/helpers/getRetry.js.map +1 -1
- package/dist/cjs/utils/helpers/index.js +1 -1
- package/dist/cjs/utils/helpers/isClient.js +1 -1
- package/dist/cjs/utils/helpers/throttle.js +1 -1
- package/dist/cjs/utils/helpers/throttle.js.map +1 -1
- package/dist/cjs/utils/helpers/time/getDate.js +1 -1
- package/dist/esm/_rollupPluginBabelHelpers-BU-eHJr3.js +3 -0
- package/dist/esm/_rollupPluginBabelHelpers-BU-eHJr3.js.map +1 -0
- package/dist/esm/hooks/index.js +2 -2
- package/dist/esm/hooks/useActiveElement/useActiveElement.js +2 -2
- package/dist/esm/hooks/useActiveElement/useActiveElement.js.map +1 -1
- package/dist/esm/hooks/useAsync/useAsync.js +2 -2
- package/dist/esm/hooks/useAsync/useAsync.js.map +1 -1
- package/dist/esm/hooks/useBattery/useBattery.js +2 -2
- package/dist/esm/hooks/useBattery/useBattery.js.map +1 -1
- package/dist/esm/hooks/useBoolean/useBoolean.js +2 -2
- package/dist/esm/hooks/useBreakpoints/constants/breakpoints.js +1 -1
- package/dist/esm/hooks/useBreakpoints/useBreakpoints.js +2 -2
- package/dist/esm/hooks/useBreakpoints/useBreakpoints.js.map +1 -1
- package/dist/esm/hooks/useBrowserLanguage/useBrowserLanguage.js +1 -1
- package/dist/esm/hooks/useClickOutside/useClickOutside.js +2 -2
- package/dist/esm/hooks/useClickOutside/useClickOutside.js.map +1 -1
- package/dist/esm/hooks/useClipboard/useClipboard.js +2 -2
- package/dist/esm/hooks/useClipboard/useClipboard.js.map +1 -1
- package/dist/esm/hooks/useCounter/useCounter.js +2 -2
- package/dist/esm/hooks/useCounter/useCounter.js.map +1 -1
- package/dist/esm/hooks/useCssVar/useCssVar.js +2 -2
- package/dist/esm/hooks/useCssVar/useCssVar.js.map +1 -1
- package/dist/esm/hooks/useDebounceCallback/useDebounceCallback.js +2 -2
- package/dist/esm/hooks/useDebounceCallback/useDebounceCallback.js.map +1 -1
- package/dist/esm/hooks/useDebounceValue/useDebounceValue.js +2 -2
- package/dist/esm/hooks/useDebounceValue/useDebounceValue.js.map +1 -1
- package/dist/esm/hooks/useDefault/useDefault.js +2 -2
- package/dist/esm/hooks/useDefault/useDefault.js.map +1 -1
- package/dist/esm/hooks/useDeviceMotion/useDeviceMotion.js +2 -2
- package/dist/esm/hooks/useDeviceMotion/useDeviceMotion.js.map +1 -1
- package/dist/esm/hooks/useDeviceOrientation/useDeviceOrientation.js +2 -2
- package/dist/esm/hooks/useDeviceOrientation/useDeviceOrientation.js.map +1 -1
- package/dist/esm/hooks/useDidUpdate/useDidUpdate.js +1 -1
- package/dist/esm/hooks/useDidUpdate/useDidUpdate.js.map +1 -1
- package/dist/esm/hooks/useDisclosure/useDisclosure.js +2 -2
- package/dist/esm/hooks/useDisclosure/useDisclosure.js.map +1 -1
- package/dist/esm/hooks/useDocumentEvent/useDocumentEvent.js +2 -2
- package/dist/esm/hooks/useDocumentEvent/useDocumentEvent.js.map +1 -1
- package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
- package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js.map +1 -1
- package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
- package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.js.map +1 -1
- package/dist/esm/hooks/useElementSize/useElementSize.js +3 -0
- package/dist/esm/hooks/useElementSize/useElementSize.js.map +1 -0
- package/dist/esm/hooks/useEvent/useEvent.js +1 -1
- package/dist/esm/hooks/useEventListener/useEventListener.js +2 -2
- package/dist/esm/hooks/useEventListener/useEventListener.js.map +1 -1
- package/dist/esm/hooks/useEyeDropper/useEyeDropper.js +2 -2
- package/dist/esm/hooks/useEyeDropper/useEyeDropper.js.map +1 -1
- package/dist/esm/hooks/useFavicon/useFavicon.js +2 -2
- package/dist/esm/hooks/useFavicon/useFavicon.js.map +1 -1
- package/dist/esm/hooks/useField/useField.js +2 -2
- package/dist/esm/hooks/useField/useField.js.map +1 -1
- package/dist/esm/hooks/useFileDialog/useFileDialog.js +2 -2
- package/dist/esm/hooks/useFileDialog/useFileDialog.js.map +1 -1
- package/dist/esm/hooks/useFocus/useFocus.js +2 -2
- package/dist/esm/hooks/useFocus/useFocus.js.map +1 -1
- package/dist/esm/hooks/useFps/useFps.js +2 -2
- package/dist/esm/hooks/useFps/useFps.js.map +1 -1
- package/dist/esm/hooks/useFullscreen/useFullscreen.js +2 -2
- package/dist/esm/hooks/useFullscreen/useFullscreen.js.map +1 -1
- package/dist/esm/hooks/useGamepad/helpers/mapGamepadToXbox360Controller.js +1 -1
- package/dist/esm/hooks/useGamepad/useGamepad.js +2 -2
- package/dist/esm/hooks/useGamepad/useGamepad.js.map +1 -1
- package/dist/esm/hooks/useGeolocation/useGeolocation.js +2 -2
- package/dist/esm/hooks/useGeolocation/useGeolocation.js.map +1 -1
- package/dist/esm/hooks/useHash/useHash.js +2 -2
- package/dist/esm/hooks/useHash/useHash.js.map +1 -1
- package/dist/esm/hooks/useHotkeys/useHotkeys.js +2 -2
- package/dist/esm/hooks/useHotkeys/useHotkeys.js.map +1 -1
- package/dist/esm/hooks/useHover/useHover.js +2 -2
- package/dist/esm/hooks/useHover/useHover.js.map +1 -1
- package/dist/esm/hooks/useIdle/useIdle.js +2 -2
- package/dist/esm/hooks/useIdle/useIdle.js.map +1 -1
- package/dist/esm/hooks/useImage/useImage.js +2 -2
- package/dist/esm/hooks/useImage/useImage.js.map +1 -1
- package/dist/esm/hooks/useInfiniteScroll/useInfiniteScroll.js +2 -2
- package/dist/esm/hooks/useInfiniteScroll/useInfiniteScroll.js.map +1 -1
- package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
- package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js.map +1 -1
- package/dist/esm/hooks/useInterval/useInterval.js +2 -2
- package/dist/esm/hooks/useInterval/useInterval.js.map +1 -1
- package/dist/esm/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
- package/dist/esm/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
- package/dist/esm/hooks/useKeyPress/useKeyPress.js +2 -2
- package/dist/esm/hooks/useKeyPress/useKeyPress.js.map +1 -1
- package/dist/esm/hooks/useKeyPressEvent/useKeyPressEvent.js +2 -2
- package/dist/esm/hooks/useKeyPressEvent/useKeyPressEvent.js.map +1 -1
- package/dist/esm/hooks/useKeyboard/useKeyboard.js +2 -2
- package/dist/esm/hooks/useKeyboard/useKeyboard.js.map +1 -1
- package/dist/esm/hooks/useKeysPressed/useKeysPressed.js +2 -2
- package/dist/esm/hooks/useKeysPressed/useKeysPressed.js.map +1 -1
- package/dist/esm/hooks/useLastChanged/useLastChanged.js +2 -2
- package/dist/esm/hooks/useList/useList.js +2 -2
- package/dist/esm/hooks/useList/useList.js.map +1 -1
- package/dist/esm/hooks/useLocalStorage/useLocalStorage.js +2 -2
- package/dist/esm/hooks/useLocalStorage/useLocalStorage.js.map +1 -1
- package/dist/esm/hooks/useLogger/useLogger.js +2 -2
- package/dist/esm/hooks/useLongPress/useLongPress.js +2 -2
- package/dist/esm/hooks/useLongPress/useLongPress.js.map +1 -1
- package/dist/esm/hooks/useMap/useMap.js +2 -2
- package/dist/esm/hooks/useMap/useMap.js.map +1 -1
- package/dist/esm/hooks/useMeasure/useMeasure.js +2 -2
- package/dist/esm/hooks/useMeasure/useMeasure.js.map +1 -1
- package/dist/esm/hooks/useMediaQuery/useMediaQuery.js +1 -1
- package/dist/esm/hooks/useMediaQuery/useMediaQuery.js.map +1 -1
- package/dist/esm/hooks/useMemory/useMemory.js +2 -2
- package/dist/esm/hooks/useMount/useMount.js +1 -1
- package/dist/esm/hooks/useMount/useMount.js.map +1 -1
- package/dist/esm/hooks/useMouse/useMouse.js +2 -2
- package/dist/esm/hooks/useMouse/useMouse.js.map +1 -1
- package/dist/esm/hooks/useMutation/useMutation.js +2 -2
- package/dist/esm/hooks/useMutation/useMutation.js.map +1 -1
- package/dist/esm/hooks/useMutationObserver/useMutationObserver.js +2 -2
- package/dist/esm/hooks/useMutationObserver/useMutationObserver.js.map +1 -1
- package/dist/esm/hooks/useNetwork/useNetwork.js +2 -2
- package/dist/esm/hooks/useNetwork/useNetwork.js.map +1 -1
- package/dist/esm/hooks/useOffsetPagination/useOffsetPagination.js +2 -2
- package/dist/esm/hooks/useOffsetPagination/useOffsetPagination.js.map +1 -1
- package/dist/esm/hooks/useOnline/useOnline.js +1 -1
- package/dist/esm/hooks/useOnline/useOnline.js.map +1 -1
- package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
- package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.js.map +1 -1
- package/dist/esm/hooks/useOptimistic/useOptimistic.js +2 -2
- package/dist/esm/hooks/useOptimistic/useOptimistic.js.map +1 -1
- package/dist/esm/hooks/useOrientation/useOrientation.js +2 -2
- package/dist/esm/hooks/useOrientation/useOrientation.js.map +1 -1
- package/dist/esm/hooks/useOtpCredential/useOtpCredential.js +2 -2
- package/dist/esm/hooks/useOtpCredential/useOtpCredential.js.map +1 -1
- package/dist/esm/hooks/usePageLeave/usePageLeave.js +2 -2
- package/dist/esm/hooks/usePageLeave/usePageLeave.js.map +1 -1
- package/dist/esm/hooks/usePaint/helpers/Paint.js +2 -2
- package/dist/esm/hooks/usePaint/helpers/Paint.js.map +1 -1
- package/dist/esm/hooks/usePaint/helpers/Pointer.js +2 -2
- package/dist/esm/hooks/usePaint/usePaint.js +2 -2
- package/dist/esm/hooks/usePaint/usePaint.js.map +1 -1
- package/dist/esm/hooks/useParallax/useParallax.js +2 -2
- package/dist/esm/hooks/useParallax/useParallax.js.map +1 -1
- package/dist/esm/hooks/usePermission/usePermission.js +2 -2
- package/dist/esm/hooks/usePermission/usePermission.js.map +1 -1
- package/dist/esm/hooks/usePointerLock/usePointerLock.js +3 -0
- package/dist/esm/hooks/usePointerLock/usePointerLock.js.map +1 -0
- package/dist/esm/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
- package/dist/esm/hooks/usePreferredContrast/usePreferredContrast.js +1 -1
- package/dist/esm/hooks/usePreferredContrast/usePreferredContrast.js.map +1 -1
- package/dist/esm/hooks/usePreferredDark/usePreferredDark.js +1 -1
- package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.js +1 -1
- package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.js.map +1 -1
- package/dist/esm/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js +1 -1
- package/dist/esm/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js.map +1 -1
- package/dist/esm/hooks/usePrevious/usePrevious.js +1 -1
- package/dist/esm/hooks/useQuery/useQuery.js +2 -2
- package/dist/esm/hooks/useQuery/useQuery.js.map +1 -1
- package/dist/esm/hooks/useQueue/useQueue.js +2 -2
- package/dist/esm/hooks/useQueue/useQueue.js.map +1 -1
- package/dist/esm/hooks/useRaf/useRaf.js +2 -2
- package/dist/esm/hooks/useRaf/useRaf.js.map +1 -1
- package/dist/esm/hooks/useRafValue/useRafValue.js +2 -2
- package/dist/esm/hooks/useRafValue/useRafValue.js.map +1 -1
- package/dist/esm/hooks/useRenderCount/useRenderCount.js +1 -1
- package/dist/esm/hooks/useRenderInfo/useRenderInfo.js +1 -1
- package/dist/esm/hooks/useRenderInfo/useRenderInfo.js.map +1 -1
- package/dist/esm/hooks/useRerender/useRerender.js +2 -2
- package/dist/esm/hooks/useRerender/useRerender.js.map +1 -1
- package/dist/esm/hooks/useResizeObserver/useResizeObserver.js +2 -2
- package/dist/esm/hooks/useResizeObserver/useResizeObserver.js.map +1 -1
- package/dist/esm/hooks/useScreenOrientation/useScreenOrientation.js +2 -2
- package/dist/esm/hooks/useScreenOrientation/useScreenOrientation.js.map +1 -1
- package/dist/esm/hooks/useScript/useScript.js +2 -2
- package/dist/esm/hooks/useScript/useScript.js.map +1 -1
- package/dist/esm/hooks/useSessionStorage/useSessionStorage.js +2 -2
- package/dist/esm/hooks/useSessionStorage/useSessionStorage.js.map +1 -1
- package/dist/esm/hooks/useSet/useSet.js +2 -2
- package/dist/esm/hooks/useSet/useSet.js.map +1 -1
- package/dist/esm/hooks/useShare/useShare.js +2 -2
- package/dist/esm/hooks/useShare/useShare.js.map +1 -1
- package/dist/esm/hooks/useStep/useStep.js +2 -2
- package/dist/esm/hooks/useStep/useStep.js.map +1 -1
- package/dist/esm/hooks/useStopwatch/useStopwatch.js +2 -2
- package/dist/esm/hooks/useStopwatch/useStopwatch.js.map +1 -1
- package/dist/esm/hooks/useStorage/useStorage.js +2 -2
- package/dist/esm/hooks/useStorage/useStorage.js.map +1 -1
- package/dist/esm/hooks/useTextSelection/useTextSelection.js +2 -2
- package/dist/esm/hooks/useTextSelection/useTextSelection.js.map +1 -1
- package/dist/esm/hooks/useTime/useTime.js +2 -2
- package/dist/esm/hooks/useTime/useTime.js.map +1 -1
- package/dist/esm/hooks/useTimeout/useTimeout.js +2 -2
- package/dist/esm/hooks/useTimeout/useTimeout.js.map +1 -1
- package/dist/esm/hooks/useTimer/useTimer.js +2 -2
- package/dist/esm/hooks/useTimer/useTimer.js.map +1 -1
- package/dist/esm/hooks/useToggle/useToggle.js +2 -2
- package/dist/esm/hooks/useToggle/useToggle.js.map +1 -1
- package/dist/esm/hooks/useUnmount/useUnmount.js +1 -1
- package/dist/esm/hooks/useUnmount/useUnmount.js.map +1 -1
- package/dist/esm/hooks/useWebSocket/useWebSocket.js +2 -2
- package/dist/esm/hooks/useWebSocket/useWebSocket.js.map +1 -1
- package/dist/esm/hooks/useWindowEvent/useWindowEvent.js +2 -2
- package/dist/esm/hooks/useWindowEvent/useWindowEvent.js.map +1 -1
- package/dist/esm/hooks/useWindowFocus/useWindowFocus.js +2 -2
- package/dist/esm/hooks/useWindowFocus/useWindowFocus.js.map +1 -1
- package/dist/esm/hooks/useWindowScroll/useWindowScroll.js +2 -2
- package/dist/esm/hooks/useWindowScroll/useWindowScroll.js.map +1 -1
- package/dist/esm/hooks/useWindowSize/useWindowSize.js +2 -2
- package/dist/esm/hooks/useWindowSize/useWindowSize.js.map +1 -1
- package/dist/esm/hooks/useWizard/useWizard.js +2 -2
- package/dist/esm/hooks/useWizard/useWizard.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/utils/helpers/debounce.js +1 -1
- package/dist/esm/utils/helpers/debounce.js.map +1 -1
- package/dist/esm/utils/helpers/getElement.js +1 -1
- package/dist/esm/utils/helpers/getElement.js.map +1 -1
- package/dist/esm/utils/helpers/getRetry.js +1 -1
- package/dist/esm/utils/helpers/getRetry.js.map +1 -1
- package/dist/esm/utils/helpers/index.js +1 -1
- package/dist/esm/utils/helpers/isClient.js +1 -1
- package/dist/esm/utils/helpers/throttle.js +1 -1
- package/dist/esm/utils/helpers/throttle.js.map +1 -1
- package/dist/esm/utils/helpers/time/getDate.js +1 -1
- package/dist/index.d.ts +368 -259
- package/package.json +15 -14
- package/dist/cjs/_rollupPluginBabelHelpers-We1VD7hv.js +0 -3
- package/dist/cjs/_rollupPluginBabelHelpers-We1VD7hv.js.map +0 -1
- package/dist/cjs/index-CgoC48JK.js +0 -3
- package/dist/cjs/index-CgoC48JK.js.map +0 -1
- package/dist/esm/_rollupPluginBabelHelpers-DKveiPYY.js +0 -3
- package/dist/esm/_rollupPluginBabelHelpers-DKveiPYY.js.map +0 -1
- package/dist/esm/index-C0eyELV9.js +0 -3
- package/dist/esm/index-C0eyELV9.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { DependencyList, RefObject, Dispatch, SetStateAction, EffectCallback, ComponentProps, useEffect, MouseEventHandler, TouchEventHandler } from 'react';
|
|
2
|
+
import { DependencyList, RefObject, Dispatch, SetStateAction, EffectCallback, ComponentProps, useEffect, MouseEventHandler, TouchEventHandler, MouseEvent as MouseEvent$1 } from 'react';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @name useActiveElement
|
|
@@ -15,9 +15,9 @@ declare const useActiveElement: <ActiveElement extends HTMLElement>() => ActiveE
|
|
|
15
15
|
|
|
16
16
|
interface UseAsyncReturn<Data> {
|
|
17
17
|
data?: Data;
|
|
18
|
-
isLoading: boolean;
|
|
19
|
-
isError: boolean;
|
|
20
18
|
error?: Error;
|
|
19
|
+
isError: boolean;
|
|
20
|
+
isLoading: boolean;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* @name useAsync
|
|
@@ -44,12 +44,8 @@ declare global {
|
|
|
44
44
|
readonly getBattery: () => Promise<BatteryManager>;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
/**
|
|
48
|
-
interface
|
|
49
|
-
/** Is battery API supported? */
|
|
50
|
-
supported: boolean;
|
|
51
|
-
/** Is battery information loading? */
|
|
52
|
-
loading: boolean;
|
|
47
|
+
/** The use battery value type */
|
|
48
|
+
interface UseBatteryValue {
|
|
53
49
|
/** Is charging battery? */
|
|
54
50
|
charging: boolean;
|
|
55
51
|
/** Time until the battery is fully charged */
|
|
@@ -58,6 +54,15 @@ interface UseBatteryStateReturn {
|
|
|
58
54
|
dischargingTime: number;
|
|
59
55
|
/** Battery charge level from 0 to 1 */
|
|
60
56
|
level: number;
|
|
57
|
+
/** Is battery information loading? */
|
|
58
|
+
loading: boolean;
|
|
59
|
+
}
|
|
60
|
+
/** The use battery return type */
|
|
61
|
+
interface UseBatteryStateReturn {
|
|
62
|
+
/** Battery API support */
|
|
63
|
+
supported: boolean;
|
|
64
|
+
/** The use battery value type */
|
|
65
|
+
value: UseBatteryValue;
|
|
61
66
|
}
|
|
62
67
|
/**
|
|
63
68
|
* @name useBattery
|
|
@@ -175,7 +180,7 @@ declare const BREAKPOINTS_PRIME_FLEX: {
|
|
|
175
180
|
/** The breakpoints type */
|
|
176
181
|
type Breakpoints<Breakpoint extends string = string> = Record<Breakpoint, number>;
|
|
177
182
|
/** The use breakpoints strategy */
|
|
178
|
-
type UseBreakpointsStrategy = '
|
|
183
|
+
type UseBreakpointsStrategy = 'desktop-first' | 'mobile-first';
|
|
179
184
|
/** The use breakpoints return type */
|
|
180
185
|
type UseBreakpointsReturn<Breakpoint extends string = string> = {
|
|
181
186
|
/** The function that checks if the current breakpoint is greater than to the given breakpoint */
|
|
@@ -231,7 +236,7 @@ declare const useBreakpoints: <Breakpoint extends string>(breakpoints: Breakpoin
|
|
|
231
236
|
declare const useBrowserLanguage: () => string;
|
|
232
237
|
|
|
233
238
|
/** The use click outside target element type */
|
|
234
|
-
type UseClickOutsideTarget =
|
|
239
|
+
type UseClickOutsideTarget = (() => Element) | Element | RefObject<Element | null | undefined>;
|
|
235
240
|
interface UseClickOutside {
|
|
236
241
|
<Target extends UseClickOutsideTarget | UseClickOutsideTarget[]>(target: Target, callback: (event: Event) => void): void;
|
|
237
242
|
<Target extends UseClickOutsideTarget | UseClickOutsideTarget[]>(callback: (event: Event) => void, target?: never): (node: Target) => void;
|
|
@@ -264,12 +269,12 @@ declare const isPermissionAllowed: (status: PermissionState) => status is "promp
|
|
|
264
269
|
declare const legacyCopyToClipboard: (value: string) => void;
|
|
265
270
|
/** The use copy to clipboard return type */
|
|
266
271
|
interface UseCopyToClipboardReturn {
|
|
272
|
+
/** Whether the copy to clipboard is supported */
|
|
273
|
+
supported: boolean;
|
|
267
274
|
/** The copied value */
|
|
268
275
|
value: string | null;
|
|
269
276
|
/** Function to copy to clipboard */
|
|
270
277
|
copy: (value: string) => Promise<void>;
|
|
271
|
-
/** Whether the copy to clipboard is supported */
|
|
272
|
-
supported: boolean;
|
|
273
278
|
}
|
|
274
279
|
/** The use copy to clipboard params type */
|
|
275
280
|
interface UseCopyToClipboardParams {
|
|
@@ -291,23 +296,23 @@ declare const useClipboard: (params?: UseCopyToClipboardParams) => UseCopyToClip
|
|
|
291
296
|
|
|
292
297
|
/** The use counter options */
|
|
293
298
|
interface UseCounterOptions {
|
|
294
|
-
/** The min of count value */
|
|
295
|
-
min?: number;
|
|
296
299
|
/** The max of count value */
|
|
297
300
|
max?: number;
|
|
301
|
+
/** The min of count value */
|
|
302
|
+
min?: number;
|
|
298
303
|
}
|
|
299
304
|
/** The use counter return type */
|
|
300
305
|
interface UseCounterReturn {
|
|
301
|
-
/** The current count value */
|
|
302
|
-
value: number;
|
|
303
306
|
/** Function to set a specific value to the counter */
|
|
304
307
|
set: Dispatch<SetStateAction<number>>;
|
|
305
|
-
/**
|
|
306
|
-
|
|
307
|
-
/** Function to increment the counter */
|
|
308
|
-
inc: (value?: number) => void;
|
|
308
|
+
/** The current count value */
|
|
309
|
+
value: number;
|
|
309
310
|
/** Function to decrement the counter */
|
|
310
311
|
dec: (value?: number) => void;
|
|
312
|
+
/** Function to increment the counter */
|
|
313
|
+
inc: (value?: number) => void;
|
|
314
|
+
/** Function to reset the counter to its initial value. */
|
|
315
|
+
reset: () => void;
|
|
311
316
|
}
|
|
312
317
|
interface UseCounter {
|
|
313
318
|
(initialValue?: number, options?: UseCounterOptions): UseCounterReturn;
|
|
@@ -341,7 +346,7 @@ interface UseCounter {
|
|
|
341
346
|
declare const useCounter: UseCounter;
|
|
342
347
|
|
|
343
348
|
/** The css variable target element type */
|
|
344
|
-
type UseCssVarTarget =
|
|
349
|
+
type UseCssVarTarget = (() => Element) | Element | RefObject<Element | null | undefined>;
|
|
345
350
|
/** The css variable return type */
|
|
346
351
|
interface UseCssVarReturn {
|
|
347
352
|
/** The value of the CSS variable */
|
|
@@ -422,21 +427,21 @@ declare const useDebounceValue: <Value>(value: Value, delay: number) => Value;
|
|
|
422
427
|
* @example
|
|
423
428
|
* const [value, setValue] = useDefault(initialValue, defaultValue);
|
|
424
429
|
*/
|
|
425
|
-
declare const useDefault: <Value>(initialValue:
|
|
430
|
+
declare const useDefault: <Value>(initialValue: (() => Value) | Value, defaultValue: Value) => readonly [Value, react.Dispatch<react.SetStateAction<Value | null | undefined>>];
|
|
426
431
|
|
|
427
432
|
interface UseDeviceMotionReturn {
|
|
428
|
-
interval: DeviceMotionEvent['interval'];
|
|
429
433
|
acceleration: DeviceMotionEventAcceleration;
|
|
430
434
|
accelerationIncludingGravity: DeviceMotionEventAcceleration;
|
|
435
|
+
interval: DeviceMotionEvent['interval'];
|
|
431
436
|
rotationRate: DeviceMotionEventRotationRate;
|
|
432
437
|
}
|
|
433
438
|
interface UseDeviceMotionParams {
|
|
434
439
|
/** The delay in milliseconds */
|
|
435
440
|
delay?: number;
|
|
436
|
-
/** The callback function to be invoked */
|
|
437
|
-
callback?: (event: DeviceMotionEvent) => void;
|
|
438
441
|
/** Whether to enable the hook */
|
|
439
442
|
enabled?: boolean;
|
|
443
|
+
/** The callback function to be invoked */
|
|
444
|
+
callback?: (event: DeviceMotionEvent) => void;
|
|
440
445
|
}
|
|
441
446
|
/**
|
|
442
447
|
* @name useDeviceMotion
|
|
@@ -454,14 +459,14 @@ interface UseDeviceMotionParams {
|
|
|
454
459
|
declare const useDeviceMotion: (params?: UseDeviceMotionParams) => UseDeviceMotionReturn;
|
|
455
460
|
|
|
456
461
|
interface UseDeviceOrientationValue {
|
|
462
|
+
/** The current absolute value */
|
|
463
|
+
absolute: boolean;
|
|
457
464
|
/** A number representing the motion of the device around the z axis, express in degrees with values ranging from 0 to 360 */
|
|
458
465
|
alpha: number | null;
|
|
459
466
|
/** A number representing the motion of the device around the x axis, express in degrees with values ranging from -180 to 180 */
|
|
460
467
|
beta: number | null;
|
|
461
468
|
/** A number representing the motion of the device around the y axis, express in degrees with values ranging from -90 to 90 */
|
|
462
469
|
gamma: number | null;
|
|
463
|
-
/** The current absolute value */
|
|
464
|
-
absolute: boolean;
|
|
465
470
|
}
|
|
466
471
|
interface UseDeviceOrientationReturn {
|
|
467
472
|
/** Whether the device orientation is supported */
|
|
@@ -496,19 +501,19 @@ declare const useDidUpdate: (effect: EffectCallback, deps?: DependencyList) => v
|
|
|
496
501
|
|
|
497
502
|
/** The use disclosure options type */
|
|
498
503
|
interface UseDisclosureOptions {
|
|
499
|
-
/** The callback function to be invoked on open */
|
|
500
|
-
onOpen?: () => void;
|
|
501
504
|
/** The callback function to be invoked on close */
|
|
502
505
|
onClose?: () => void;
|
|
506
|
+
/** The callback function to be invoked on open */
|
|
507
|
+
onOpen?: () => void;
|
|
503
508
|
}
|
|
504
509
|
/** The use disclosure return type */
|
|
505
510
|
interface UseDisclosureReturn {
|
|
506
511
|
/** The opened value */
|
|
507
512
|
opened: boolean;
|
|
508
|
-
/** Function to open the modal */
|
|
509
|
-
open: () => void;
|
|
510
513
|
/** Function to close the modal */
|
|
511
514
|
close: () => void;
|
|
515
|
+
/** Function to open the modal */
|
|
516
|
+
open: () => void;
|
|
512
517
|
/** Function to toggle the modal */
|
|
513
518
|
toggle: () => void;
|
|
514
519
|
}
|
|
@@ -527,7 +532,7 @@ interface UseDisclosureReturn {
|
|
|
527
532
|
*/
|
|
528
533
|
declare const useDisclosure: (initialValue?: boolean, options?: UseDisclosureOptions) => UseDisclosureReturn;
|
|
529
534
|
|
|
530
|
-
type UseEventListenerTarget =
|
|
535
|
+
type UseEventListenerTarget = (() => Element) | Document | Element | RefObject<Element | null | undefined> | Window;
|
|
531
536
|
type UseEventListenerOptions = boolean | AddEventListenerOptions;
|
|
532
537
|
type UseEventListenerReturn<Target extends UseEventListenerTarget> = RefObject<Target>;
|
|
533
538
|
interface UseEventListener {
|
|
@@ -593,6 +598,44 @@ declare function useDocumentTitle(value?: string, options?: UseDocumentTitleOpti
|
|
|
593
598
|
*/
|
|
594
599
|
declare const useDocumentVisibility: () => DocumentVisibilityState;
|
|
595
600
|
|
|
601
|
+
interface ElementSize {
|
|
602
|
+
height: number;
|
|
603
|
+
width: number;
|
|
604
|
+
}
|
|
605
|
+
/** The use element size target element type */
|
|
606
|
+
type UseElementSizeTarget = (() => Element) | Element | RefObject<Element | null | undefined>;
|
|
607
|
+
interface UseElementSizeReturn {
|
|
608
|
+
value: ElementSize;
|
|
609
|
+
}
|
|
610
|
+
interface UseElementSize {
|
|
611
|
+
<Target extends UseElementSizeTarget>(target: Target, initialSize?: ElementSize): UseElementSizeReturn;
|
|
612
|
+
<Target extends UseElementSizeTarget>(initialSize?: ElementSize, target?: never): {
|
|
613
|
+
ref: (node: Target) => void;
|
|
614
|
+
} & UseElementSizeReturn;
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* @name useElementSize
|
|
618
|
+
* @description - Hook that observes and returns the width and height of element
|
|
619
|
+
* @category Elements
|
|
620
|
+
*
|
|
621
|
+
* @overload
|
|
622
|
+
* @template Target The target element type.
|
|
623
|
+
* @param {UseElementSizeTarget} target The target element to observe.
|
|
624
|
+
* @param {ElementSize} [initialSize = { width: 0, height: 0 }]
|
|
625
|
+
* @returns {UseElementSizeReturn} An object containing the current width and height of the element.
|
|
626
|
+
*
|
|
627
|
+
* @example
|
|
628
|
+
* const { value } = useElementSize(elementRef);
|
|
629
|
+
*
|
|
630
|
+
* @overload
|
|
631
|
+
* @param {ElementSize} [initialSize = { width: 0, height: 0 }] The initial size of the element.
|
|
632
|
+
* @returns { { ref: (node: Target) => void } & UseElementSizeReturn } A reference function to attach to the element to observe size changes.
|
|
633
|
+
*
|
|
634
|
+
* @example
|
|
635
|
+
* const { ref, value } = useElementSize({ width: 100, height: 100 });
|
|
636
|
+
*/
|
|
637
|
+
declare const useElementSize: UseElementSize;
|
|
638
|
+
|
|
596
639
|
/**
|
|
597
640
|
* @name useEvent
|
|
598
641
|
* @description - Hook that creates an event and returns a stable reference of it
|
|
@@ -667,35 +710,37 @@ declare const useFavicon: (initialHref?: string) => {
|
|
|
667
710
|
|
|
668
711
|
/** The use field params type */
|
|
669
712
|
interface UseFieldParams<Value> {
|
|
670
|
-
/** The initial value */
|
|
671
|
-
initialValue?: Value;
|
|
672
|
-
/** The initial touched */
|
|
673
|
-
initialTouched?: boolean;
|
|
674
713
|
/** The auto focus */
|
|
675
714
|
autoFocus?: boolean;
|
|
676
|
-
/** The
|
|
677
|
-
|
|
715
|
+
/** The initial touched */
|
|
716
|
+
initialTouched?: boolean;
|
|
717
|
+
/** The initial value */
|
|
718
|
+
initialValue?: Value;
|
|
678
719
|
/** The validate on blur */
|
|
679
720
|
validateOnBlur?: boolean;
|
|
680
721
|
/** The validate on mount */
|
|
722
|
+
validateOnChange?: boolean;
|
|
723
|
+
/** The validate on mount */
|
|
681
724
|
validateOnMount?: boolean;
|
|
682
725
|
}
|
|
683
726
|
/** The use field register params type */
|
|
684
727
|
interface UseFieldRegisterParams {
|
|
685
728
|
/** The required validation */
|
|
686
729
|
required?: string;
|
|
730
|
+
/** The custom validation */
|
|
731
|
+
validate?: (value: string) => Promise<string | true>;
|
|
687
732
|
/** The min value validation */
|
|
688
733
|
max?: {
|
|
689
734
|
value: number;
|
|
690
735
|
message: string;
|
|
691
736
|
};
|
|
692
|
-
/** The max
|
|
693
|
-
|
|
737
|
+
/** The max length validation */
|
|
738
|
+
maxLength?: {
|
|
694
739
|
value: number;
|
|
695
740
|
message: string;
|
|
696
741
|
};
|
|
697
|
-
/** The max
|
|
698
|
-
|
|
742
|
+
/** The max value validation */
|
|
743
|
+
min?: {
|
|
699
744
|
value: number;
|
|
700
745
|
message: string;
|
|
701
746
|
};
|
|
@@ -709,37 +754,35 @@ interface UseFieldRegisterParams {
|
|
|
709
754
|
value: RegExp;
|
|
710
755
|
message: string;
|
|
711
756
|
};
|
|
712
|
-
/** The custom validation */
|
|
713
|
-
validate?: (value: string) => Promise<string | true>;
|
|
714
757
|
}
|
|
715
758
|
/** The use field return type */
|
|
716
759
|
interface UseFieldReturn<Value> {
|
|
717
|
-
/** The register function */
|
|
718
|
-
register: (params?: UseFieldRegisterParams) => {
|
|
719
|
-
onBlur: () => void;
|
|
720
|
-
onChange: () => void;
|
|
721
|
-
ref: (node: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null | undefined) => void;
|
|
722
|
-
};
|
|
723
|
-
/** The get value function */
|
|
724
|
-
getValue: () => Value;
|
|
725
|
-
/** The set value function */
|
|
726
|
-
setValue: (value: Value) => void;
|
|
727
760
|
/** The dirty state */
|
|
728
761
|
dirty: boolean;
|
|
729
762
|
/** The error state */
|
|
730
763
|
error?: string;
|
|
731
764
|
/** The set error function */
|
|
732
765
|
touched: boolean;
|
|
766
|
+
/** The set error function */
|
|
767
|
+
clearError: () => void;
|
|
733
768
|
/** The focus function */
|
|
734
769
|
focus: () => void;
|
|
735
|
-
/** The
|
|
736
|
-
|
|
770
|
+
/** The get value function */
|
|
771
|
+
getValue: () => Value;
|
|
772
|
+
/** The register function */
|
|
773
|
+
register: (params?: UseFieldRegisterParams) => {
|
|
774
|
+
onBlur: () => void;
|
|
775
|
+
onChange: () => void;
|
|
776
|
+
ref: (node: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | null | undefined) => void;
|
|
777
|
+
};
|
|
737
778
|
/** The reset function */
|
|
738
779
|
reset: () => void;
|
|
739
780
|
/** The set error function */
|
|
740
781
|
setError: (error: string) => void;
|
|
741
|
-
/** The
|
|
742
|
-
|
|
782
|
+
/** The set value function */
|
|
783
|
+
setValue: (value: Value) => void;
|
|
784
|
+
/** The watch function */
|
|
785
|
+
watch: () => Value;
|
|
743
786
|
}
|
|
744
787
|
/**
|
|
745
788
|
* @name useField
|
|
@@ -759,9 +802,9 @@ interface UseFieldReturn<Value> {
|
|
|
759
802
|
* @example
|
|
760
803
|
* const { register, getValue, setValue, reset, dirty, error, setError, clearError, touched, focus, watch } = useField();
|
|
761
804
|
*/
|
|
762
|
-
declare const useField: <Value extends
|
|
805
|
+
declare const useField: <Value extends boolean | string = string, Type = Value extends string ? string : boolean>(params?: UseFieldParams<Value>) => UseFieldReturn<Type>;
|
|
763
806
|
|
|
764
|
-
interface UseFileDialogOptions extends Pick<ComponentProps<'input'>, '
|
|
807
|
+
interface UseFileDialogOptions extends Pick<ComponentProps<'input'>, 'accept' | 'multiple'> {
|
|
765
808
|
/** The capture value */
|
|
766
809
|
capture?: string;
|
|
767
810
|
/** The reset value */
|
|
@@ -807,7 +850,7 @@ interface UseFileDialog {
|
|
|
807
850
|
*/
|
|
808
851
|
declare const useFileDialog: UseFileDialog;
|
|
809
852
|
|
|
810
|
-
type UseFocusTarget =
|
|
853
|
+
type UseFocusTarget = (() => Element) | Element | RefObject<Element | null | undefined>;
|
|
811
854
|
/** The use focus options type */
|
|
812
855
|
interface UseFocusOptions {
|
|
813
856
|
/** The initial focus state of the target */
|
|
@@ -815,12 +858,12 @@ interface UseFocusOptions {
|
|
|
815
858
|
}
|
|
816
859
|
/** The use focus return type */
|
|
817
860
|
interface UseFocusReturn {
|
|
818
|
-
/** Is the target focused */
|
|
819
|
-
focus: () => void;
|
|
820
|
-
/** Is the target focused */
|
|
821
|
-
blur: () => void;
|
|
822
861
|
/** The boolean state value of the target */
|
|
823
862
|
focused: boolean;
|
|
863
|
+
/** Is the target focused */
|
|
864
|
+
blur: () => void;
|
|
865
|
+
/** Is the target focused */
|
|
866
|
+
focus: () => void;
|
|
824
867
|
}
|
|
825
868
|
interface UseFocus {
|
|
826
869
|
<Target extends UseFocusTarget>(target: Target, options?: UseFocusOptions): UseFocusReturn;
|
|
@@ -864,7 +907,7 @@ declare const useFocus: UseFocus;
|
|
|
864
907
|
declare const useFps: () => number;
|
|
865
908
|
|
|
866
909
|
/** The use fullscreen target element type */
|
|
867
|
-
type UseFullScreenTarget =
|
|
910
|
+
type UseFullScreenTarget = (() => Element) | Element | RefObject<Element | null | undefined>;
|
|
868
911
|
/** The use fullscreen options type */
|
|
869
912
|
interface UseFullScreenOptions {
|
|
870
913
|
/** initial value */
|
|
@@ -876,10 +919,10 @@ interface UseFullScreenOptions {
|
|
|
876
919
|
}
|
|
877
920
|
/** The use click outside return type */
|
|
878
921
|
interface UseFullScreenReturn {
|
|
922
|
+
value: boolean;
|
|
879
923
|
enter: () => void;
|
|
880
924
|
exit: () => void;
|
|
881
925
|
toggle: () => void;
|
|
882
|
-
value: boolean;
|
|
883
926
|
}
|
|
884
927
|
interface UseFullScreen {
|
|
885
928
|
<Target extends UseFullScreenTarget>(target: Target, options?: UseFullScreenOptions): UseFullScreenReturn;
|
|
@@ -959,12 +1002,12 @@ declare global {
|
|
|
959
1002
|
}
|
|
960
1003
|
/** The use gamepad return type */
|
|
961
1004
|
interface UseGamepadStateReturn {
|
|
962
|
-
/** The gamepad supported status */
|
|
963
|
-
supported: boolean;
|
|
964
|
-
/** The gamepad state */
|
|
965
|
-
gamepads: Gamepad[];
|
|
966
1005
|
/** The gamepad active status */
|
|
967
1006
|
active: boolean;
|
|
1007
|
+
/** The gamepad state */
|
|
1008
|
+
gamepads: Gamepad[];
|
|
1009
|
+
/** The gamepad supported status */
|
|
1010
|
+
supported: boolean;
|
|
968
1011
|
}
|
|
969
1012
|
/**
|
|
970
1013
|
* @name useGamepad
|
|
@@ -984,26 +1027,26 @@ declare const useGamepad: () => {
|
|
|
984
1027
|
|
|
985
1028
|
/** The use geolocation return type */
|
|
986
1029
|
interface UseGeolocationReturn {
|
|
987
|
-
/** The loading state */
|
|
988
|
-
loading: boolean;
|
|
989
|
-
/** The error of the last position update */
|
|
990
|
-
error: GeolocationPositionError | null;
|
|
991
|
-
/** The timestamp of the last position update */
|
|
992
|
-
timestamp: number | null;
|
|
993
1030
|
/** The accuracy of the last position update */
|
|
994
1031
|
accuracy: number | null;
|
|
995
|
-
/** The latitude of the last position update */
|
|
996
|
-
latitude: number | null;
|
|
997
|
-
/** The longitude of the last position update */
|
|
998
|
-
longitude: number | null;
|
|
999
1032
|
/** The altitude of the last position update */
|
|
1000
1033
|
altitude: number | null;
|
|
1001
1034
|
/** The altitude accuracy of the last position update */
|
|
1002
1035
|
altitudeAccuracy: number | null;
|
|
1036
|
+
/** The error of the last position update */
|
|
1037
|
+
error: GeolocationPositionError | null;
|
|
1003
1038
|
/** The heading of the last position update */
|
|
1004
1039
|
heading: number | null;
|
|
1040
|
+
/** The latitude of the last position update */
|
|
1041
|
+
latitude: number | null;
|
|
1042
|
+
/** The loading state */
|
|
1043
|
+
loading: boolean;
|
|
1044
|
+
/** The longitude of the last position update */
|
|
1045
|
+
longitude: number | null;
|
|
1005
1046
|
/** The speed of the last position update */
|
|
1006
1047
|
speed: number | null;
|
|
1048
|
+
/** The timestamp of the last position update */
|
|
1049
|
+
timestamp: number | null;
|
|
1007
1050
|
}
|
|
1008
1051
|
/** The use geolocation params type */
|
|
1009
1052
|
type UseGeolocationParams = PositionOptions;
|
|
@@ -1038,21 +1081,21 @@ declare const useHash: () => UseHashReturn;
|
|
|
1038
1081
|
|
|
1039
1082
|
/** The use hotkeys params type */
|
|
1040
1083
|
interface UseHotkeysOptions {
|
|
1041
|
-
/**
|
|
1042
|
-
|
|
1084
|
+
/** Alias map for hotkeys */
|
|
1085
|
+
aliasMap?: Record<string, string>;
|
|
1043
1086
|
/** Enable or disable the event listeners */
|
|
1044
1087
|
enabled?: boolean;
|
|
1045
1088
|
/** Whether to prevent the default behavior of the event */
|
|
1046
1089
|
preventDefault?: boolean;
|
|
1047
|
-
/**
|
|
1048
|
-
|
|
1090
|
+
/** The target to attach the event listeners to */
|
|
1091
|
+
target?: UseEventListenerTarget;
|
|
1049
1092
|
}
|
|
1050
1093
|
declare const isHotkeyMatch: (hotkey: string, keys: UseHotkeysKey[]) => boolean;
|
|
1051
|
-
type UseHotkeysHotkeys = string
|
|
1094
|
+
type UseHotkeysHotkeys = string | string[];
|
|
1052
1095
|
interface UseHotkeysKey {
|
|
1053
|
-
key: string;
|
|
1054
|
-
code: string;
|
|
1055
1096
|
alias: string;
|
|
1097
|
+
code: string;
|
|
1098
|
+
key: string;
|
|
1056
1099
|
}
|
|
1057
1100
|
/**
|
|
1058
1101
|
* @name useHotkeys
|
|
@@ -1079,7 +1122,7 @@ interface UseHoverOptions {
|
|
|
1079
1122
|
onEntry?: () => void;
|
|
1080
1123
|
onLeave?: () => void;
|
|
1081
1124
|
}
|
|
1082
|
-
type UseHoverTarget = RefObject<Element | null | undefined
|
|
1125
|
+
type UseHoverTarget = Element | RefObject<Element | null | undefined>;
|
|
1083
1126
|
interface UseHover {
|
|
1084
1127
|
<Target extends UseHoverTarget>(target: Target, callback?: () => void): boolean;
|
|
1085
1128
|
<Target extends UseHoverTarget>(target: Target, options?: UseHoverOptions): boolean;
|
|
@@ -1136,8 +1179,8 @@ interface UseHover {
|
|
|
1136
1179
|
declare const useHover: UseHover;
|
|
1137
1180
|
|
|
1138
1181
|
interface UseIdleOptions {
|
|
1139
|
-
initialValue?: boolean;
|
|
1140
1182
|
events?: Array<keyof DocumentEventMap>;
|
|
1183
|
+
initialValue?: boolean;
|
|
1141
1184
|
}
|
|
1142
1185
|
interface UseIdleReturn {
|
|
1143
1186
|
idle: boolean;
|
|
@@ -1159,30 +1202,30 @@ interface UseIdleReturn {
|
|
|
1159
1202
|
declare const useIdle: (milliseconds?: number, { initialValue, events }?: UseIdleOptions) => UseIdleReturn;
|
|
1160
1203
|
|
|
1161
1204
|
interface UseQueryOptions<QueryData, Data> {
|
|
1205
|
+
enabled?: boolean;
|
|
1206
|
+
initialData?: (() => Data) | Data;
|
|
1162
1207
|
keys?: DependencyList;
|
|
1163
|
-
|
|
1208
|
+
placeholderData?: (() => Data) | Data;
|
|
1209
|
+
refetchInterval?: number;
|
|
1210
|
+
retry?: boolean | number;
|
|
1164
1211
|
onError?: (error: Error) => void;
|
|
1212
|
+
onSuccess?: (data: Data) => void;
|
|
1165
1213
|
select?: (data: QueryData) => Data;
|
|
1166
|
-
initialData?: Data | (() => Data);
|
|
1167
|
-
placeholderData?: Data | (() => Data);
|
|
1168
|
-
retry?: boolean | number;
|
|
1169
|
-
refetchInterval?: number;
|
|
1170
|
-
enabled?: boolean;
|
|
1171
1214
|
}
|
|
1172
1215
|
interface UseQueryCallbackParams {
|
|
1173
|
-
signal: AbortSignal;
|
|
1174
1216
|
keys: DependencyList;
|
|
1217
|
+
signal: AbortSignal;
|
|
1175
1218
|
}
|
|
1176
1219
|
interface UseQueryReturn<Data> {
|
|
1220
|
+
abort: AbortController['abort'];
|
|
1221
|
+
aborted: boolean;
|
|
1177
1222
|
data?: Data;
|
|
1178
|
-
|
|
1223
|
+
error?: Error;
|
|
1179
1224
|
isError: boolean;
|
|
1225
|
+
isLoading: boolean;
|
|
1226
|
+
isRefetching: boolean;
|
|
1180
1227
|
isSuccess: boolean;
|
|
1181
|
-
error?: Error;
|
|
1182
1228
|
refetch: () => void;
|
|
1183
|
-
isRefetching: boolean;
|
|
1184
|
-
abort: AbortController['abort'];
|
|
1185
|
-
aborted: boolean;
|
|
1186
1229
|
}
|
|
1187
1230
|
/**
|
|
1188
1231
|
* @name useQuery
|
|
@@ -1208,20 +1251,20 @@ declare const useQuery: <QueryData, Data = QueryData>(callback: (params: UseQuer
|
|
|
1208
1251
|
|
|
1209
1252
|
/** The use image options */
|
|
1210
1253
|
interface UseImageOptions {
|
|
1211
|
-
/** The srcset of the image */
|
|
1212
|
-
srcset?: string;
|
|
1213
|
-
/** The sizes of the image */
|
|
1214
|
-
sizes?: string;
|
|
1215
1254
|
/** The alt of the image */
|
|
1216
1255
|
alt?: string;
|
|
1217
1256
|
/** The class of the image */
|
|
1218
1257
|
class?: string;
|
|
1219
|
-
/** The loading of the image */
|
|
1220
|
-
loading?: HTMLImageElement['loading'];
|
|
1221
1258
|
/** The crossorigin of the image */
|
|
1222
1259
|
crossorigin?: string;
|
|
1260
|
+
/** The loading of the image */
|
|
1261
|
+
loading?: HTMLImageElement['loading'];
|
|
1223
1262
|
/** The referrer policy of the image */
|
|
1224
1263
|
referrerPolicy?: HTMLImageElement['referrerPolicy'];
|
|
1264
|
+
/** The sizes of the image */
|
|
1265
|
+
sizes?: string;
|
|
1266
|
+
/** The srcset of the image */
|
|
1267
|
+
srcset?: string;
|
|
1225
1268
|
}
|
|
1226
1269
|
/** The use image return type */
|
|
1227
1270
|
type UseImageReturn = UseQueryReturn<HTMLImageElement>;
|
|
@@ -1248,16 +1291,16 @@ type UseImageReturn = UseQueryReturn<HTMLImageElement>;
|
|
|
1248
1291
|
* @example
|
|
1249
1292
|
* const { data, isLoading, isError, isSuccess, error, refetch, isRefetching } = useImage('https://example.com/image.png');
|
|
1250
1293
|
*/
|
|
1251
|
-
declare const useImage: (src: string, options?: UseImageOptions, useQueryOptions?: Omit<UseQueryOptions<HTMLImageElement, HTMLImageElement>, "
|
|
1294
|
+
declare const useImage: (src: string, options?: UseImageOptions, useQueryOptions?: Omit<UseQueryOptions<HTMLImageElement, HTMLImageElement>, "initialData" | "placeholderData" | "select">) => UseQueryReturn<HTMLImageElement>;
|
|
1252
1295
|
|
|
1253
1296
|
/** The use infinite scroll target element type */
|
|
1254
|
-
type UseInfiniteScrollTarget =
|
|
1297
|
+
type UseInfiniteScrollTarget = (() => Element) | Element | RefObject<Element | null>;
|
|
1255
1298
|
/** The use infinite scroll options type */
|
|
1256
1299
|
interface UseInfiniteScrollOptions {
|
|
1300
|
+
/** The direction to trigger the callback */
|
|
1301
|
+
direction?: 'bottom' | 'left' | 'right' | 'top';
|
|
1257
1302
|
/** The distance in pixels to trigger the callback */
|
|
1258
1303
|
distance?: number;
|
|
1259
|
-
/** The direction to trigger the callback */
|
|
1260
|
-
direction?: 'top' | 'bottom' | 'left' | 'right';
|
|
1261
1304
|
}
|
|
1262
1305
|
interface UseInfiniteScroll {
|
|
1263
1306
|
<Target extends UseInfiniteScrollTarget>(target: Target, callback: (event: Event) => void, options?: UseInfiniteScrollOptions): boolean;
|
|
@@ -1295,17 +1338,17 @@ interface UseInfiniteScroll {
|
|
|
1295
1338
|
declare const useInfiniteScroll: UseInfiniteScroll;
|
|
1296
1339
|
|
|
1297
1340
|
/** The intersection observer target element type */
|
|
1298
|
-
type UseIntersectionObserverTarget =
|
|
1341
|
+
type UseIntersectionObserverTarget = (() => Element) | Element | RefObject<Element | null | undefined>;
|
|
1299
1342
|
/** The intersection observer options type */
|
|
1300
1343
|
interface UseIntersectionObserverOptions extends Omit<IntersectionObserverInit, 'root'> {
|
|
1301
1344
|
enabled?: boolean;
|
|
1302
|
-
onChange?: (entry: IntersectionObserverEntry) => void;
|
|
1303
1345
|
root?: IntersectionObserverInit['root'] | RefObject<Element | null | undefined>;
|
|
1346
|
+
onChange?: (entry: IntersectionObserverEntry) => void;
|
|
1304
1347
|
}
|
|
1305
1348
|
/** The intersection observer return type */
|
|
1306
1349
|
interface UseIntersectionObserverReturn {
|
|
1307
|
-
inView: boolean;
|
|
1308
1350
|
entry?: IntersectionObserverEntry;
|
|
1351
|
+
inView: boolean;
|
|
1309
1352
|
}
|
|
1310
1353
|
interface UseIntersectionObserver {
|
|
1311
1354
|
<Target extends UseIntersectionObserverTarget>(target: Target, options?: UseIntersectionObserverOptions): UseIntersectionObserverReturn;
|
|
@@ -1458,14 +1501,60 @@ interface UseKeyPressEvent {
|
|
|
1458
1501
|
<Target extends UseEventListenerTarget>(key: UseKeyPressEventKey, target: Target, listener: (this: Target, event: HTMLElementEventMap['keydown']) => void, options?: UseEventListenerOptions): void;
|
|
1459
1502
|
<Target extends Element>(key: UseKeyPressEventKey, listener: (this: Target, event: HTMLElementEventMap['keydown']) => void, options?: UseEventListenerOptions, target?: never): void;
|
|
1460
1503
|
}
|
|
1504
|
+
/**
|
|
1505
|
+
* @name useKeyPressEvent
|
|
1506
|
+
* @description - Hook that listens for key press events on specified targets
|
|
1507
|
+
* @category Sensors
|
|
1508
|
+
*
|
|
1509
|
+
* @overload
|
|
1510
|
+
* @param {UseKeyPressEventKey} key The key or array of keys to listen for.
|
|
1511
|
+
* @param {Window} target The window object to attach the event listener to.
|
|
1512
|
+
* @param {(event: KeyboardEvent) => void} listener The callback function to be executed when the specified key or keys are pressed.
|
|
1513
|
+
* @param {UseEventListenerOptions} [options] The options for the event listener.
|
|
1514
|
+
* @returns {void}
|
|
1515
|
+
*
|
|
1516
|
+
* @example
|
|
1517
|
+
* useKeyPressEvent('Enter', window, () => console.log('Enter key pressed'));
|
|
1518
|
+
*
|
|
1519
|
+
* @overload
|
|
1520
|
+
* @param {UseKeyPressEventKey} key The key or array of keys to listen for.
|
|
1521
|
+
* @param {Document} target The document object to attach the event listener to.
|
|
1522
|
+
* @param {(event: KeyboardEvent) => void} listener The callback function to be executed when the specified key or keys are pressed.
|
|
1523
|
+
* @param {UseEventListenerOptions} [options] The options for the event listener.
|
|
1524
|
+
* @returns {void}
|
|
1525
|
+
*
|
|
1526
|
+
* @example
|
|
1527
|
+
* useKeyPressEvent('Enter', document, () => console.log('Enter key pressed'));
|
|
1528
|
+
*
|
|
1529
|
+
* @overload
|
|
1530
|
+
* @template Target The target element type.
|
|
1531
|
+
* @param {UseKeyPressEventKey} key The key or array of keys to listen for.
|
|
1532
|
+
* @param {Target} target The target element to attach the event listener to.
|
|
1533
|
+
* @param {(event: KeyboardEvent) => void} listener The callback function to be executed when the specified key or keys are pressed.
|
|
1534
|
+
* @param {UseEventListenerOptions} [options] The options for the event listener.
|
|
1535
|
+
* @returns {void}
|
|
1536
|
+
*
|
|
1537
|
+
* @example
|
|
1538
|
+
* useKeyPressEvent('Enter', ref, () => console.log('Enter key pressed'));
|
|
1539
|
+
*
|
|
1540
|
+
* @overload
|
|
1541
|
+
* @template Target extends Element
|
|
1542
|
+
* @param {UseKeyPressEventKey} key The key or array of keys to listen for.
|
|
1543
|
+
* @param {(event: KeyboardEvent) => void} listener The callback function to be executed when the specified key or keys are pressed.
|
|
1544
|
+
* @param {UseEventListenerOptions} [options] The options for the event listener.
|
|
1545
|
+
* @returns {void}
|
|
1546
|
+
*
|
|
1547
|
+
* @example
|
|
1548
|
+
* useKeyPressEvent('Enter', (event) => console.log('Enter key pressed'));
|
|
1549
|
+
*/
|
|
1461
1550
|
declare const useKeyPressEvent: UseKeyPressEvent;
|
|
1462
1551
|
|
|
1463
1552
|
/** The use keys pressed params type */
|
|
1464
1553
|
interface UseKeysPressedParams {
|
|
1465
|
-
/** The target to attach the event listeners to */
|
|
1466
|
-
target?: UseEventListenerTarget;
|
|
1467
1554
|
/** Enable or disable the event listeners */
|
|
1468
1555
|
enabled?: boolean;
|
|
1556
|
+
/** The target to attach the event listeners to */
|
|
1557
|
+
target?: UseEventListenerTarget;
|
|
1469
1558
|
}
|
|
1470
1559
|
/**
|
|
1471
1560
|
* @name useKeysPressed
|
|
@@ -1506,18 +1595,18 @@ declare const useLastChanged: (source: any, options?: UseLastChangedOptions) =>
|
|
|
1506
1595
|
interface UseListReturn<Item> {
|
|
1507
1596
|
/** The current list of items */
|
|
1508
1597
|
value: Item[];
|
|
1509
|
-
/**
|
|
1510
|
-
|
|
1598
|
+
/** Clears the list */
|
|
1599
|
+
clear: () => void;
|
|
1600
|
+
/** Inserts an item at the specified index */
|
|
1601
|
+
insertAt: (insertAtIndex: number, item: Item) => void;
|
|
1511
1602
|
/** Adds an item to the list */
|
|
1512
1603
|
push: (item: Item) => void;
|
|
1513
1604
|
/** Removes an item from the list */
|
|
1514
1605
|
removeAt: (removeAtIndex: number) => void;
|
|
1515
|
-
/**
|
|
1516
|
-
|
|
1606
|
+
/** Sets the list of items */
|
|
1607
|
+
set: (list: Item[]) => void;
|
|
1517
1608
|
/** Updates an item at the specified index */
|
|
1518
1609
|
updateAt: (updateAtIndex: number, item: Item) => void;
|
|
1519
|
-
/** Clears the list */
|
|
1520
|
-
clear: () => void;
|
|
1521
1610
|
}
|
|
1522
1611
|
/**
|
|
1523
1612
|
* @name useList
|
|
@@ -1542,17 +1631,17 @@ declare const useList: <Item>(initialList?: Item[]) => {
|
|
|
1542
1631
|
reset: () => void;
|
|
1543
1632
|
};
|
|
1544
1633
|
|
|
1545
|
-
type UseStorageInitialValue<Value> =
|
|
1634
|
+
type UseStorageInitialValue<Value> = (() => Value) | Value;
|
|
1546
1635
|
interface UseStorageOptions<Value> {
|
|
1547
|
-
serializer?: (value: Value) => string;
|
|
1548
|
-
deserializer?: (value: string) => Value;
|
|
1549
|
-
storage?: Storage;
|
|
1550
1636
|
initialValue?: UseStorageInitialValue<Value>;
|
|
1637
|
+
storage?: Storage;
|
|
1638
|
+
deserializer?: (value: string) => Value;
|
|
1639
|
+
serializer?: (value: Value) => string;
|
|
1551
1640
|
}
|
|
1552
1641
|
interface UseStorageReturn<Value> {
|
|
1553
1642
|
value: Value;
|
|
1554
|
-
set: (value: Value) => void;
|
|
1555
1643
|
remove: () => void;
|
|
1644
|
+
set: (value: Value) => void;
|
|
1556
1645
|
}
|
|
1557
1646
|
declare const dispatchStorageEvent: (params: Partial<StorageEvent>) => boolean;
|
|
1558
1647
|
/**
|
|
@@ -1608,23 +1697,23 @@ declare const useLocalStorage: <Value>(key: string, initialValue?: UseStorageIni
|
|
|
1608
1697
|
*/
|
|
1609
1698
|
declare const useLogger: (name: string, params: unknown[]) => void;
|
|
1610
1699
|
|
|
1611
|
-
type UseLongPressTarget =
|
|
1700
|
+
type UseLongPressTarget = (() => Element) | Element | RefObject<Element | null | undefined>;
|
|
1612
1701
|
type LongPressReactEvents<Target extends Element = Element> = MouseEventHandler<Target> | TouchEventHandler<Target>;
|
|
1613
1702
|
interface UseLongPressOptions {
|
|
1614
1703
|
threshold?: number;
|
|
1615
|
-
onStart?: (event: LongPressReactEvents) => void;
|
|
1616
|
-
onFinish?: (event: LongPressReactEvents) => void;
|
|
1617
1704
|
onCancel?: (event: LongPressReactEvents) => void;
|
|
1705
|
+
onFinish?: (event: LongPressReactEvents) => void;
|
|
1706
|
+
onStart?: (event: LongPressReactEvents) => void;
|
|
1618
1707
|
}
|
|
1619
1708
|
interface UseLongPressBind {
|
|
1620
1709
|
/** The callback function to be invoked on mouse down */
|
|
1621
1710
|
onMouseDown: MouseEventHandler<Element>;
|
|
1622
|
-
/** The callback function to be invoked on touch start */
|
|
1623
|
-
onTouchStart: TouchEventHandler<Element>;
|
|
1624
1711
|
/** The callback function to be invoked on mouse up */
|
|
1625
1712
|
onMouseUp: MouseEventHandler<Element>;
|
|
1626
1713
|
/** The callback function to be invoked on touch end */
|
|
1627
1714
|
onTouchEnd: TouchEventHandler<Element>;
|
|
1715
|
+
/** The callback function to be invoked on touch start */
|
|
1716
|
+
onTouchStart: TouchEventHandler<Element>;
|
|
1628
1717
|
}
|
|
1629
1718
|
type UseLongPressReturn = [UseLongPressBind, boolean];
|
|
1630
1719
|
/**
|
|
@@ -1648,20 +1737,20 @@ declare const useLongPress: (callback: (event: LongPressReactEvents) => void, op
|
|
|
1648
1737
|
|
|
1649
1738
|
/** The use map return type */
|
|
1650
1739
|
interface UseMapReturn<Key, Value> {
|
|
1651
|
-
/** The current map */
|
|
1652
|
-
value: Map<Key, Value>;
|
|
1653
1740
|
/** The size of the map */
|
|
1654
1741
|
size: number;
|
|
1742
|
+
/** The current map */
|
|
1743
|
+
value: Map<Key, Value>;
|
|
1744
|
+
/** Function to clear the map */
|
|
1745
|
+
clear: () => void;
|
|
1655
1746
|
/** Function to check if a value exists in the map */
|
|
1656
1747
|
has: (key: Key) => boolean;
|
|
1657
|
-
/** Function to add a value to the map */
|
|
1658
|
-
set: (key: Key, value: Value) => void;
|
|
1659
1748
|
/** Function to remove a value from the map */
|
|
1660
1749
|
remove: (key: Key) => void;
|
|
1661
|
-
/** Function to clear the map */
|
|
1662
|
-
clear: () => void;
|
|
1663
1750
|
/** Function to toggle a value in the map */
|
|
1664
1751
|
reset: () => void;
|
|
1752
|
+
/** Function to add a value to the map */
|
|
1753
|
+
set: (key: Key, value: Value) => void;
|
|
1665
1754
|
}
|
|
1666
1755
|
/**
|
|
1667
1756
|
* @name useMap
|
|
@@ -1678,9 +1767,9 @@ interface UseMapReturn<Key, Value> {
|
|
|
1678
1767
|
declare const useMap: <Key, Value>(values?: [Key, Value][]) => UseMapReturn<Key, Value>;
|
|
1679
1768
|
|
|
1680
1769
|
/** The use measure target element type */
|
|
1681
|
-
type UseMeasureTarget =
|
|
1770
|
+
type UseMeasureTarget = (() => Element) | Element | RefObject<Element | null | undefined>;
|
|
1682
1771
|
/** The use measure return type */
|
|
1683
|
-
type UseMeasureReturn = Pick<DOMRectReadOnly, '
|
|
1772
|
+
type UseMeasureReturn = Pick<DOMRectReadOnly, 'bottom' | 'height' | 'left' | 'right' | 'top' | 'width' | 'x' | 'y'>;
|
|
1684
1773
|
interface UseMeasureScreen {
|
|
1685
1774
|
<Target extends UseMeasureTarget>(target: Target): UseMeasureReturn;
|
|
1686
1775
|
<Target extends UseMeasureTarget>(target?: never): UseMeasureReturn & {
|
|
@@ -1763,23 +1852,23 @@ declare const useMemory: () => UseMemoryReturn;
|
|
|
1763
1852
|
declare const useMount: (effect: EffectCallback) => void;
|
|
1764
1853
|
|
|
1765
1854
|
/** The use mouse target element type */
|
|
1766
|
-
type UseMouseTarget =
|
|
1855
|
+
type UseMouseTarget = (() => Element) | Element | RefObject<Element | null | undefined>;
|
|
1767
1856
|
/** The use mouse return type */
|
|
1768
1857
|
interface UseMouseReturn {
|
|
1769
|
-
/** The current mouse x position */
|
|
1770
|
-
x: number;
|
|
1771
|
-
/** The current mouse y position */
|
|
1772
|
-
y: number;
|
|
1773
1858
|
/** The current element */
|
|
1774
1859
|
element: Element;
|
|
1775
|
-
/** The current element x position */
|
|
1776
|
-
elementX: number;
|
|
1777
|
-
/** The current element y position */
|
|
1778
|
-
elementY: number;
|
|
1779
1860
|
/** The current element position x */
|
|
1780
1861
|
elementPositionX: number;
|
|
1781
1862
|
/** The current element position y */
|
|
1782
1863
|
elementPositionY: number;
|
|
1864
|
+
/** The current element x position */
|
|
1865
|
+
elementX: number;
|
|
1866
|
+
/** The current element y position */
|
|
1867
|
+
elementY: number;
|
|
1868
|
+
/** The current mouse x position */
|
|
1869
|
+
x: number;
|
|
1870
|
+
/** The current mouse y position */
|
|
1871
|
+
y: number;
|
|
1783
1872
|
}
|
|
1784
1873
|
interface UseMouse {
|
|
1785
1874
|
<Target extends UseMouseTarget>(target: Target): UseMouseReturn;
|
|
@@ -1810,19 +1899,19 @@ interface UseMouse {
|
|
|
1810
1899
|
declare const useMouse: UseMouse;
|
|
1811
1900
|
|
|
1812
1901
|
interface UseMutationOptions<Data> {
|
|
1813
|
-
retry?:
|
|
1814
|
-
retryDelay?:
|
|
1815
|
-
onSuccess?: (data: Data) => void;
|
|
1902
|
+
retry?: ((failureCount: number, error: Error) => boolean) | boolean | number;
|
|
1903
|
+
retryDelay?: ((retry: number, error: Error) => number) | number;
|
|
1816
1904
|
onError?: (error: Error) => void;
|
|
1905
|
+
onSuccess?: (data: Data) => void;
|
|
1817
1906
|
}
|
|
1818
1907
|
interface UseMutationReturn<Body, Data> {
|
|
1819
1908
|
data: Data | null;
|
|
1820
1909
|
error: Error | null;
|
|
1821
|
-
mutate: (body?: Body, options?: UseMutationOptions<Data>) => void;
|
|
1822
|
-
mutateAsync: (body?: Body, options?: UseMutationOptions<Data>) => Promise<Data>;
|
|
1823
|
-
isLoading: boolean;
|
|
1824
1910
|
isError: boolean;
|
|
1911
|
+
isLoading: boolean;
|
|
1825
1912
|
isSuccess: boolean;
|
|
1913
|
+
mutate: (body?: Body, options?: UseMutationOptions<Data>) => void;
|
|
1914
|
+
mutateAsync: (body?: Body, options?: UseMutationOptions<Data>) => Promise<Data>;
|
|
1826
1915
|
}
|
|
1827
1916
|
interface RequestOptions<Data> extends UseMutationOptions<Data> {
|
|
1828
1917
|
attempt?: number;
|
|
@@ -1846,13 +1935,13 @@ interface RequestOptions<Data> extends UseMutationOptions<Data> {
|
|
|
1846
1935
|
declare const useMutation: <Body, Data>(callback: (body: Body) => Promise<Data>, options?: UseMutationOptions<Data>) => UseMutationReturn<Body, Data>;
|
|
1847
1936
|
|
|
1848
1937
|
/** The mutation observer target element type */
|
|
1849
|
-
type UseMutationObserverTarget =
|
|
1938
|
+
type UseMutationObserverTarget = (() => Element) | Document | Element | RefObject<Element | null | undefined> | Window;
|
|
1850
1939
|
/** The mutation observer return type */
|
|
1851
1940
|
interface UseMutationObserverReturn {
|
|
1852
|
-
/** The mutation observer entries */
|
|
1853
|
-
stop: () => void;
|
|
1854
1941
|
/** The mutation observer instance */
|
|
1855
1942
|
observer: MutationObserver;
|
|
1943
|
+
/** The mutation observer entries */
|
|
1944
|
+
stop: () => void;
|
|
1856
1945
|
}
|
|
1857
1946
|
/** The mutation observer options type */
|
|
1858
1947
|
interface UseMutationObserverOptions extends MutationObserverInit {
|
|
@@ -1908,11 +1997,11 @@ declare const useMutationObserver: UseMutationObserver;
|
|
|
1908
1997
|
interface Connection extends EventTarget {
|
|
1909
1998
|
readonly downlink: number;
|
|
1910
1999
|
readonly downlinkMax: number;
|
|
1911
|
-
readonly effectiveType: '
|
|
2000
|
+
readonly effectiveType: '2g' | '3g' | '4g' | 'slow-2g';
|
|
1912
2001
|
readonly rtt: number;
|
|
1913
2002
|
readonly saveData: boolean;
|
|
1914
|
-
readonly type: 'bluetooth' | 'cellular' | 'ethernet' | 'mixed' | 'none' | 'other' | 'unknown' | 'wifi' | 'wimax';
|
|
1915
2003
|
onChange: (event: Event) => void;
|
|
2004
|
+
readonly type: 'bluetooth' | 'cellular' | 'ethernet' | 'mixed' | 'none' | 'other' | 'unknown' | 'wifi' | 'wimax';
|
|
1916
2005
|
}
|
|
1917
2006
|
declare global {
|
|
1918
2007
|
interface Navigator {
|
|
@@ -1927,14 +2016,14 @@ type ConnectionType = Connection['type'];
|
|
|
1927
2016
|
type ConnectionEffectiveType = Connection['effectiveType'];
|
|
1928
2017
|
/** The use network return type */
|
|
1929
2018
|
interface UseNetworkReturn {
|
|
1930
|
-
/** Indicates if the device is currently online */
|
|
1931
|
-
online: boolean;
|
|
1932
2019
|
/** The estimated downlink speed in megabits per seconds */
|
|
1933
2020
|
downlink?: Connection['downlink'];
|
|
1934
2021
|
/** The maximum downlink speed, if available */
|
|
1935
2022
|
downlinkMax?: Connection['downlinkMax'];
|
|
1936
2023
|
/** The effective type of connection (e.g., '2g', '3g', '4g') */
|
|
1937
2024
|
effectiveType?: Connection['effectiveType'];
|
|
2025
|
+
/** Indicates if the device is currently online */
|
|
2026
|
+
online: boolean;
|
|
1938
2027
|
/** The estimated round-trip time in milliseconds */
|
|
1939
2028
|
rtt?: Connection['rtt'];
|
|
1940
2029
|
/** Indicates if the user has enabled data saving mode */
|
|
@@ -1957,44 +2046,44 @@ declare const useNetwork: () => UseNetworkReturn;
|
|
|
1957
2046
|
|
|
1958
2047
|
/** The use offset pagination return type */
|
|
1959
2048
|
interface UseOffsetPaginationOptions {
|
|
1960
|
-
/** The total number of items */
|
|
1961
|
-
total?: number;
|
|
1962
|
-
/** The number of items per page */
|
|
1963
|
-
pageSize?: number;
|
|
1964
2049
|
/** The initial page number */
|
|
1965
2050
|
initialPage?: number;
|
|
2051
|
+
/** The number of items per page */
|
|
2052
|
+
pageSize?: number;
|
|
2053
|
+
/** The total number of items */
|
|
2054
|
+
total?: number;
|
|
1966
2055
|
/** The callback function to be invoked when page changes */
|
|
1967
2056
|
onPageChange?: ({ page, pageSize }: {
|
|
1968
2057
|
page: number;
|
|
1969
2058
|
pageSize: number;
|
|
1970
2059
|
}) => void;
|
|
1971
|
-
/** The callback function to be invoked when page
|
|
1972
|
-
|
|
2060
|
+
/** The callback function to be invoked when page count changes */
|
|
2061
|
+
onPageCountChange?: ({ page, pageSize }: {
|
|
1973
2062
|
page: number;
|
|
1974
2063
|
pageSize: number;
|
|
1975
2064
|
}) => void;
|
|
1976
|
-
/** The callback function to be invoked when page
|
|
1977
|
-
|
|
2065
|
+
/** The callback function to be invoked when page size changes */
|
|
2066
|
+
onPageSizeChange?: ({ page, pageSize }: {
|
|
1978
2067
|
page: number;
|
|
1979
2068
|
pageSize: number;
|
|
1980
2069
|
}) => void;
|
|
1981
2070
|
}
|
|
1982
2071
|
/** The use offset pagination return type */
|
|
1983
2072
|
interface UseOffsetPaginationReturn {
|
|
1984
|
-
/** The current page number */
|
|
1985
|
-
page: number;
|
|
1986
2073
|
/** The number of items per page */
|
|
1987
2074
|
currentPageSize: number;
|
|
1988
|
-
/** The total number of pages */
|
|
1989
|
-
pageCount: number;
|
|
1990
2075
|
/** Whether the current page is the first page */
|
|
1991
2076
|
isFirstPage: boolean;
|
|
1992
2077
|
/** Whether the current page is the last page */
|
|
1993
2078
|
isLastPage: boolean;
|
|
1994
|
-
/** The
|
|
1995
|
-
|
|
2079
|
+
/** The current page number */
|
|
2080
|
+
page: number;
|
|
2081
|
+
/** The total number of pages */
|
|
2082
|
+
pageCount: number;
|
|
1996
2083
|
/** The callback function to go to the next page */
|
|
1997
2084
|
next: () => void;
|
|
2085
|
+
/** The callback function to go to the previous page */
|
|
2086
|
+
prev: () => void;
|
|
1998
2087
|
/** The callback function to set the current page */
|
|
1999
2088
|
set: (page: number) => void;
|
|
2000
2089
|
}
|
|
@@ -2037,7 +2126,7 @@ declare const useOffsetPagination: ({ total, pageSize, initialPage, onPageChange
|
|
|
2037
2126
|
declare const useOnline: () => boolean;
|
|
2038
2127
|
|
|
2039
2128
|
/** The operating system type */
|
|
2040
|
-
type OperatingSystem = '
|
|
2129
|
+
type OperatingSystem = 'android' | 'ios' | 'linux' | 'macos' | 'undetermined' | 'windows';
|
|
2041
2130
|
declare const getOperatingSystem: () => OperatingSystem;
|
|
2042
2131
|
/**
|
|
2043
2132
|
* @name useOperatingSystem
|
|
@@ -2102,14 +2191,14 @@ declare global {
|
|
|
2102
2191
|
}
|
|
2103
2192
|
type UseOtpCredentialCallback = (otp: Credential | null) => void;
|
|
2104
2193
|
interface UseOtpCredentialParams {
|
|
2105
|
-
onSuccess: (credential: Credential | null) => void;
|
|
2106
2194
|
onError: (error: any) => void;
|
|
2195
|
+
onSuccess: (credential: Credential | null) => void;
|
|
2107
2196
|
}
|
|
2108
2197
|
interface UseOtpCredentialReturn {
|
|
2109
|
-
supported: boolean;
|
|
2110
|
-
get: () => Promise<Credential | null>;
|
|
2111
2198
|
abort: AbortController['abort'];
|
|
2112
2199
|
aborted: boolean;
|
|
2200
|
+
supported: boolean;
|
|
2201
|
+
get: () => Promise<Credential | null>;
|
|
2113
2202
|
}
|
|
2114
2203
|
interface UseOtpCredential {
|
|
2115
2204
|
(callback?: UseOtpCredentialCallback): UseOtpCredentialReturn;
|
|
@@ -2198,14 +2287,14 @@ declare class Paint {
|
|
|
2198
2287
|
interface UsePaintOptions {
|
|
2199
2288
|
/** Brush color */
|
|
2200
2289
|
color?: string;
|
|
2290
|
+
/** Initial lines */
|
|
2291
|
+
initialLines?: Paint['lines'];
|
|
2292
|
+
/** Brush opacity */
|
|
2293
|
+
opacity?: number;
|
|
2201
2294
|
/** Brush radius */
|
|
2202
2295
|
radius?: number;
|
|
2203
2296
|
/** Smooth brush movement */
|
|
2204
2297
|
smooth?: boolean;
|
|
2205
|
-
/** Brush opacity */
|
|
2206
|
-
opacity?: number;
|
|
2207
|
-
/** Initial lines */
|
|
2208
|
-
initialLines?: Paint['lines'];
|
|
2209
2298
|
/** Callback when the mouse is down */
|
|
2210
2299
|
onMouseDown?: (event: MouseEvent, paint: Paint) => void;
|
|
2211
2300
|
/** Callback when the mouse is moved */
|
|
@@ -2215,13 +2304,13 @@ interface UsePaintOptions {
|
|
|
2215
2304
|
}
|
|
2216
2305
|
interface UsePaintReturn {
|
|
2217
2306
|
drawing: boolean;
|
|
2307
|
+
lines: Paint['lines'];
|
|
2218
2308
|
clear: () => void;
|
|
2219
|
-
undo: () => void;
|
|
2220
2309
|
draw: (points: Point[], color: string, opacity: number, radius: number) => void;
|
|
2221
|
-
|
|
2310
|
+
undo: () => void;
|
|
2222
2311
|
}
|
|
2223
2312
|
/** The use paint return type */
|
|
2224
|
-
type UsePaintTarget =
|
|
2313
|
+
type UsePaintTarget = (() => HTMLCanvasElement) | HTMLCanvasElement | RefObject<HTMLCanvasElement>;
|
|
2225
2314
|
interface UsePaint {
|
|
2226
2315
|
<Target extends UsePaintTarget>(target: Target, options?: UsePaintOptions): UsePaintReturn;
|
|
2227
2316
|
(options?: UsePaintOptions, target?: never): {
|
|
@@ -2255,21 +2344,21 @@ declare const usePaint: UsePaint;
|
|
|
2255
2344
|
interface UseParallaxValue {
|
|
2256
2345
|
/** Roll value. Scaled to `-0.5 ~ 0.5` */
|
|
2257
2346
|
roll: number;
|
|
2258
|
-
/** Tilt value. Scaled to `-0.5 ~ 0.5` */
|
|
2259
|
-
tilt: number;
|
|
2260
2347
|
/** Sensor source, can be `mouse` or `deviceOrientation` */
|
|
2261
2348
|
source: 'deviceOrientation' | 'mouse';
|
|
2349
|
+
/** Tilt value. Scaled to `-0.5 ~ 0.5` */
|
|
2350
|
+
tilt: number;
|
|
2262
2351
|
}
|
|
2263
2352
|
/** The use parallax options type */
|
|
2264
2353
|
interface UseParallaxOptions {
|
|
2265
|
-
/** Device orientation tilt adjust function */
|
|
2266
|
-
deviceOrientationTiltAdjust?: (value: number) => number;
|
|
2267
2354
|
/** Device orientation roll adjust function */
|
|
2268
2355
|
deviceOrientationRollAdjust?: (value: number) => number;
|
|
2269
|
-
/**
|
|
2270
|
-
|
|
2356
|
+
/** Device orientation tilt adjust function */
|
|
2357
|
+
deviceOrientationTiltAdjust?: (value: number) => number;
|
|
2271
2358
|
/** Mouse roll adjust function */
|
|
2272
2359
|
mouseRollAdjust?: (value: number) => number;
|
|
2360
|
+
/** Mouse tilt adjust function */
|
|
2361
|
+
mouseTiltAdjust?: (value: number) => number;
|
|
2273
2362
|
}
|
|
2274
2363
|
interface UseParallaxReturn {
|
|
2275
2364
|
value: UseParallaxValue;
|
|
@@ -2304,7 +2393,7 @@ interface UseParallax {
|
|
|
2304
2393
|
declare const useParallax: UseParallax;
|
|
2305
2394
|
|
|
2306
2395
|
/** The permission name */
|
|
2307
|
-
type UsePermissionName =
|
|
2396
|
+
type UsePermissionName = 'accelerometer' | 'accessibility-events' | 'ambient-light-sensor' | 'background-sync' | 'camera' | 'clipboard-read' | 'clipboard-write' | 'gyroscope' | 'magnetometer' | 'microphone' | 'notifications' | 'payment-handler' | 'persistent-storage' | 'push' | 'speaker' | PermissionName;
|
|
2308
2397
|
/** The use permission options type */
|
|
2309
2398
|
interface UsePermissionOptions {
|
|
2310
2399
|
/** Whether the permission is enabled */
|
|
@@ -2337,6 +2426,26 @@ declare const usePermission: (permissionDescriptorName: UsePermissionName, optio
|
|
|
2337
2426
|
query: () => Promise<PermissionState>;
|
|
2338
2427
|
};
|
|
2339
2428
|
|
|
2429
|
+
type UsePointerLockTarget = RefObject<Element | null | undefined>;
|
|
2430
|
+
interface UsePointerLockReturn {
|
|
2431
|
+
element?: Element;
|
|
2432
|
+
supported: boolean;
|
|
2433
|
+
lock: (event: Event | MouseEvent$1<Element>) => void;
|
|
2434
|
+
unlock: () => boolean;
|
|
2435
|
+
}
|
|
2436
|
+
/**
|
|
2437
|
+
* @name usePointerLock
|
|
2438
|
+
* @description - Hook that provides reactive pointer lock
|
|
2439
|
+
* @category Sensors
|
|
2440
|
+
*
|
|
2441
|
+
* @param {UsePointerLockTarget} target The target element for the pointer lock
|
|
2442
|
+
* @returns {UsePointerLockReturn} An object containing the pointer lock element and functions to interact with the pointer lock
|
|
2443
|
+
*
|
|
2444
|
+
* @example
|
|
2445
|
+
* const { supported, lock, unlock, element } = usePointerLock();
|
|
2446
|
+
*/
|
|
2447
|
+
declare const usePointerLock: (target?: UsePointerLockTarget) => UsePointerLockReturn;
|
|
2448
|
+
|
|
2340
2449
|
/** The use preferred color scheme return type */
|
|
2341
2450
|
type UsePreferredColorSchemeReturn = 'dark' | 'light' | 'no-preference';
|
|
2342
2451
|
/**
|
|
@@ -2352,7 +2461,7 @@ type UsePreferredColorSchemeReturn = 'dark' | 'light' | 'no-preference';
|
|
|
2352
2461
|
declare const usePreferredColorScheme: () => UsePreferredColorSchemeReturn;
|
|
2353
2462
|
|
|
2354
2463
|
/** The use preferred contrast return type */
|
|
2355
|
-
type UsePreferredContrastReturn = '
|
|
2464
|
+
type UsePreferredContrastReturn = 'custom' | 'less' | 'more' | 'no-preference';
|
|
2356
2465
|
/**
|
|
2357
2466
|
* @name usePreferredContrast
|
|
2358
2467
|
* @description - Hook that returns the contrast preference
|
|
@@ -2388,7 +2497,7 @@ declare const usePreferredDark: () => boolean;
|
|
|
2388
2497
|
declare const usePreferredLanguages: () => readonly string[];
|
|
2389
2498
|
|
|
2390
2499
|
/** The use preferred reduced motion return type */
|
|
2391
|
-
type UsePreferredReducedMotionReturn = '
|
|
2500
|
+
type UsePreferredReducedMotionReturn = 'no-preference' | 'reduce';
|
|
2392
2501
|
/**
|
|
2393
2502
|
* @name usePreferredReducedMotion
|
|
2394
2503
|
* @description - Hook that returns the reduced motion preference
|
|
@@ -2417,20 +2526,20 @@ declare const usePrevious: <Value>(value: Value) => Value | undefined;
|
|
|
2417
2526
|
|
|
2418
2527
|
/** The use queue return type */
|
|
2419
2528
|
interface UseQueueReturn<Value> {
|
|
2420
|
-
/** The current queue */
|
|
2421
|
-
queue: Value[];
|
|
2422
|
-
/** Add an element to the queue */
|
|
2423
|
-
add: (element: Value) => void;
|
|
2424
|
-
/** Remove an element from the queue */
|
|
2425
|
-
remove: () => Value;
|
|
2426
|
-
/** Clear the queue */
|
|
2427
|
-
clear: () => void;
|
|
2428
2529
|
/** Get the first element of the queue */
|
|
2429
2530
|
first: Value;
|
|
2430
2531
|
/** Get the last element of the queue */
|
|
2431
2532
|
last: Value;
|
|
2533
|
+
/** The current queue */
|
|
2534
|
+
queue: Value[];
|
|
2432
2535
|
/** Get the size of the queue */
|
|
2433
2536
|
size: number;
|
|
2537
|
+
/** Add an element to the queue */
|
|
2538
|
+
add: (element: Value) => void;
|
|
2539
|
+
/** Clear the queue */
|
|
2540
|
+
clear: () => void;
|
|
2541
|
+
/** Remove an element from the queue */
|
|
2542
|
+
remove: () => Value;
|
|
2434
2543
|
}
|
|
2435
2544
|
/**
|
|
2436
2545
|
* @name useQueue
|
|
@@ -2495,7 +2604,7 @@ type UseRafValueReturn<Value> = [Value, (value: Value) => void];
|
|
|
2495
2604
|
* @example
|
|
2496
2605
|
* const [value, setValue] = useRafValue(initialValue);
|
|
2497
2606
|
*/
|
|
2498
|
-
declare const useRafValue: <Value>(initialValue:
|
|
2607
|
+
declare const useRafValue: <Value>(initialValue: (() => Value) | Value) => readonly [Value, (value: Value) => void];
|
|
2499
2608
|
|
|
2500
2609
|
/**
|
|
2501
2610
|
* @name useRenderCount
|
|
@@ -2512,8 +2621,8 @@ declare const useRenderCount: () => number;
|
|
|
2512
2621
|
interface UseRenderInfoReturn {
|
|
2513
2622
|
component: string;
|
|
2514
2623
|
renders: number;
|
|
2515
|
-
timestamp: null | number;
|
|
2516
2624
|
sinceLast: number;
|
|
2625
|
+
timestamp: number | null;
|
|
2517
2626
|
}
|
|
2518
2627
|
/**
|
|
2519
2628
|
* @name useRenderInfo
|
|
@@ -2549,7 +2658,7 @@ interface UseRerenderReturns {
|
|
|
2549
2658
|
declare const useRerender: () => UseRerenderReturns;
|
|
2550
2659
|
|
|
2551
2660
|
/** The resize observer target element type */
|
|
2552
|
-
type UseResizeObserverTarget =
|
|
2661
|
+
type UseResizeObserverTarget = (() => Element) | Element | RefObject<Element | null | undefined>;
|
|
2553
2662
|
/** The resize observer options type */
|
|
2554
2663
|
interface UseResizeObserverOptions extends ResizeObserverOptions {
|
|
2555
2664
|
enabled?: boolean;
|
|
@@ -2604,7 +2713,7 @@ interface UseScreenOrientationValue {
|
|
|
2604
2713
|
/** The current orientation type */
|
|
2605
2714
|
orientationType: OrientationType;
|
|
2606
2715
|
}
|
|
2607
|
-
type OrientationLockType = 'any' | '
|
|
2716
|
+
type OrientationLockType = 'any' | 'landscape-primary' | 'landscape-secondary' | 'landscape' | 'natural' | 'portrait-primary' | 'portrait-secondary' | 'portrait';
|
|
2608
2717
|
interface useScreenOrientationReturn {
|
|
2609
2718
|
/** Whether the screen orientation is supported */
|
|
2610
2719
|
supported: boolean;
|
|
@@ -2628,7 +2737,7 @@ interface useScreenOrientationReturn {
|
|
|
2628
2737
|
declare const useScreenOrientation: () => useScreenOrientationReturn;
|
|
2629
2738
|
|
|
2630
2739
|
/** The use script status */
|
|
2631
|
-
type UseScriptStatus = '
|
|
2740
|
+
type UseScriptStatus = 'error' | 'loading' | 'ready' | 'unknown';
|
|
2632
2741
|
declare const SCRIPT_STATUS_ATTRIBUTE_NAME = "script-status";
|
|
2633
2742
|
/** The use script options extends from attributes script tag */
|
|
2634
2743
|
interface UseScriptOptions extends ComponentProps<'script'> {
|
|
@@ -2672,30 +2781,30 @@ declare const useSessionStorage: <Value>(key: string, initialValue?: UseStorageI
|
|
|
2672
2781
|
|
|
2673
2782
|
/** The use set return type */
|
|
2674
2783
|
interface UseSetReturn<Value> {
|
|
2675
|
-
/** The current set */
|
|
2676
|
-
value: Set<Value>;
|
|
2677
2784
|
/** The size of the set */
|
|
2678
2785
|
size: number;
|
|
2679
|
-
/**
|
|
2680
|
-
|
|
2786
|
+
/** The current set */
|
|
2787
|
+
value: Set<Value>;
|
|
2681
2788
|
/** Function to add a value to the set */
|
|
2682
2789
|
add: (value: Value) => void;
|
|
2683
|
-
/** Function to remove a value from the set */
|
|
2684
|
-
remove: (value: Value) => void;
|
|
2685
2790
|
/** Function to clear the set */
|
|
2686
2791
|
clear: () => void;
|
|
2792
|
+
/** Function to get the symmetric difference of two sets */
|
|
2793
|
+
difference: (other: Set<Value>) => void;
|
|
2794
|
+
/** Function to check if a value exists in the set */
|
|
2795
|
+
has: (value: Value) => boolean;
|
|
2796
|
+
/** Function to get the difference of two sets */
|
|
2797
|
+
intersection: (other: Set<Value>) => void;
|
|
2798
|
+
/** Function to remove a value from the set */
|
|
2799
|
+
remove: (value: Value) => void;
|
|
2687
2800
|
/** Function to toggle a value in the set */
|
|
2688
2801
|
reset: () => void;
|
|
2802
|
+
/** Function to get the symmetric difference of two sets */
|
|
2803
|
+
symmetricDifference: (other: Set<Value>) => void;
|
|
2689
2804
|
/** Function to toggle a value in the set */
|
|
2690
2805
|
toggle: (value: Value) => void;
|
|
2691
2806
|
/** Function to get the union of two sets */
|
|
2692
2807
|
union: (other: Set<Value>) => void;
|
|
2693
|
-
/** Function to get the difference of two sets */
|
|
2694
|
-
intersection: (other: Set<Value>) => void;
|
|
2695
|
-
/** Function to get the symmetric difference of two sets */
|
|
2696
|
-
difference: (other: Set<Value>) => void;
|
|
2697
|
-
/** Function to get the symmetric difference of two sets */
|
|
2698
|
-
symmetricDifference: (other: Set<Value>) => void;
|
|
2699
2808
|
}
|
|
2700
2809
|
/**
|
|
2701
2810
|
* @name useSet
|
|
@@ -2713,21 +2822,21 @@ declare const useSet: <Value>(values?: Value[]) => UseSetReturn<Value>;
|
|
|
2713
2822
|
|
|
2714
2823
|
/** The use share options type */
|
|
2715
2824
|
interface UseShareParams {
|
|
2716
|
-
/** The title of the share */
|
|
2717
|
-
title?: string;
|
|
2718
2825
|
/** The files of the share */
|
|
2719
2826
|
files?: File[];
|
|
2720
2827
|
/** The text of the share */
|
|
2721
2828
|
text?: string;
|
|
2829
|
+
/** The title of the share */
|
|
2830
|
+
title?: string;
|
|
2722
2831
|
/** The url of the share */
|
|
2723
2832
|
url?: string;
|
|
2724
2833
|
}
|
|
2725
2834
|
/** The use share return type */
|
|
2726
2835
|
interface UseShareReturn {
|
|
2727
|
-
/** The share function */
|
|
2728
|
-
share: (shareParams: ShareData) => Promise<void>;
|
|
2729
2836
|
/** The share supported status */
|
|
2730
2837
|
supported: boolean;
|
|
2838
|
+
/** The share function */
|
|
2839
|
+
share: (shareParams: ShareData) => Promise<void>;
|
|
2731
2840
|
}
|
|
2732
2841
|
/**
|
|
2733
2842
|
* @name useShare
|
|
@@ -2762,14 +2871,14 @@ interface UseStepReturn {
|
|
|
2762
2871
|
isFirst: boolean;
|
|
2763
2872
|
/** Boolean value if current step is last */
|
|
2764
2873
|
isLast: boolean;
|
|
2765
|
-
/** Go to next step */
|
|
2766
|
-
next: () => void;
|
|
2767
2874
|
/** Go to back step */
|
|
2768
2875
|
back: () => void;
|
|
2876
|
+
/** Go to next step */
|
|
2877
|
+
next: () => void;
|
|
2769
2878
|
/** Reset current step to initial value */
|
|
2770
2879
|
reset: () => void;
|
|
2771
2880
|
/** Go to custom step */
|
|
2772
|
-
set: (value: number | '
|
|
2881
|
+
set: (value: number | 'first' | 'last') => void;
|
|
2773
2882
|
}
|
|
2774
2883
|
/**
|
|
2775
2884
|
* @name useStep
|
|
@@ -2795,26 +2904,26 @@ declare const useStep: (params: number | UseStepParams) => UseStepReturn;
|
|
|
2795
2904
|
|
|
2796
2905
|
/** The use stopwatch return type */
|
|
2797
2906
|
interface UseStopwatchReturn {
|
|
2798
|
-
/** The
|
|
2799
|
-
|
|
2800
|
-
/** The over state of the stopwatch */
|
|
2801
|
-
over: boolean;
|
|
2907
|
+
/** The total count of the stopwatch */
|
|
2908
|
+
count: number;
|
|
2802
2909
|
/** The day count of the stopwatch */
|
|
2803
2910
|
days: number;
|
|
2804
2911
|
/** The hour count of the stopwatch */
|
|
2805
2912
|
hours: number;
|
|
2806
2913
|
/** The minute count of the stopwatch */
|
|
2807
2914
|
minutes: number;
|
|
2915
|
+
/** The over state of the stopwatch */
|
|
2916
|
+
over: boolean;
|
|
2917
|
+
/** The paused state of the stopwatch */
|
|
2918
|
+
paused: boolean;
|
|
2808
2919
|
/** The second count of the stopwatch */
|
|
2809
2920
|
seconds: number;
|
|
2810
|
-
/** The total count of the stopwatch */
|
|
2811
|
-
count: number;
|
|
2812
2921
|
/** The function to pause the stopwatch */
|
|
2813
2922
|
pause: () => void;
|
|
2814
|
-
/** The function to start the stopwatch */
|
|
2815
|
-
start: () => void;
|
|
2816
2923
|
/** The function to reset the stopwatch */
|
|
2817
2924
|
reset: () => void;
|
|
2925
|
+
/** The function to start the stopwatch */
|
|
2926
|
+
start: () => void;
|
|
2818
2927
|
/** The function to toggle the stopwatch */
|
|
2819
2928
|
toggle: () => void;
|
|
2820
2929
|
}
|
|
@@ -2855,14 +2964,14 @@ declare const useStopwatch: UseStopwatch;
|
|
|
2855
2964
|
declare const getRangesSelection: (selection: Selection) => Range[];
|
|
2856
2965
|
/** The use text selection return type */
|
|
2857
2966
|
interface UseTextSelectionReturn {
|
|
2858
|
-
/** The current selection text */
|
|
2859
|
-
text: string;
|
|
2860
2967
|
/** The current selection ranges */
|
|
2861
2968
|
ranges: Range[];
|
|
2862
2969
|
/** The current selection rects */
|
|
2863
2970
|
rects: DOMRect[];
|
|
2864
2971
|
/** The current selection */
|
|
2865
2972
|
selection: Selection | null;
|
|
2973
|
+
/** The current selection text */
|
|
2974
|
+
text: string;
|
|
2866
2975
|
}
|
|
2867
2976
|
/**
|
|
2868
2977
|
* @name useTextSelection
|
|
@@ -2877,17 +2986,17 @@ interface UseTextSelectionReturn {
|
|
|
2877
2986
|
declare const useTextSelection: () => UseTextSelectionReturn;
|
|
2878
2987
|
|
|
2879
2988
|
interface UseTimeReturn {
|
|
2880
|
-
|
|
2881
|
-
minutes: number;
|
|
2989
|
+
day: number;
|
|
2882
2990
|
hours: number;
|
|
2883
2991
|
meridiemHours: {
|
|
2884
2992
|
value: number;
|
|
2885
2993
|
type: string;
|
|
2886
2994
|
};
|
|
2887
|
-
|
|
2995
|
+
minutes: number;
|
|
2888
2996
|
month: number;
|
|
2889
|
-
|
|
2997
|
+
seconds: number;
|
|
2890
2998
|
timestamp: number;
|
|
2999
|
+
year: number;
|
|
2891
3000
|
}
|
|
2892
3001
|
/**
|
|
2893
3002
|
* @name useTime
|
|
@@ -2937,22 +3046,22 @@ interface UseTimerOptions {
|
|
|
2937
3046
|
}
|
|
2938
3047
|
/** The use timer return type */
|
|
2939
3048
|
interface UseTimerReturn {
|
|
2940
|
-
/** flag to indicate if timer is running or not */
|
|
2941
|
-
running: boolean;
|
|
2942
3049
|
/** The day count of the timer */
|
|
2943
3050
|
days: number;
|
|
2944
3051
|
/** The hour count of the timer */
|
|
2945
3052
|
hours: number;
|
|
2946
3053
|
/** The minute count of the timer */
|
|
2947
3054
|
minutes: number;
|
|
3055
|
+
/** flag to indicate if timer is running or not */
|
|
3056
|
+
running: boolean;
|
|
2948
3057
|
/** The second count of the timer */
|
|
2949
3058
|
seconds: number;
|
|
2950
3059
|
/** The function to pause the timer */
|
|
2951
3060
|
pause: () => void;
|
|
2952
|
-
/** The function to start the timer */
|
|
2953
|
-
start: () => void;
|
|
2954
3061
|
/** The function to restart the timer */
|
|
2955
3062
|
restart: (time: number, autostart?: boolean) => void;
|
|
3063
|
+
/** The function to start the timer */
|
|
3064
|
+
start: () => void;
|
|
2956
3065
|
/** The function to toggle the timer */
|
|
2957
3066
|
toggle: () => void;
|
|
2958
3067
|
}
|
|
@@ -3002,22 +3111,22 @@ declare const useToggle: <Value = boolean>(values?: readonly Value[]) => readonl
|
|
|
3002
3111
|
*/
|
|
3003
3112
|
declare const useUnmount: (callback: () => void) => void;
|
|
3004
3113
|
|
|
3005
|
-
type UseWebSocketUrl =
|
|
3114
|
+
type UseWebSocketUrl = (() => string) | string;
|
|
3006
3115
|
interface UseWebSocketOptions {
|
|
3116
|
+
protocols?: Array<'soap' | 'wasm'>;
|
|
3117
|
+
retry?: boolean | number;
|
|
3007
3118
|
onConnected?: (webSocket: WebSocket) => void;
|
|
3008
3119
|
onDisconnected?: (event: CloseEvent, webSocket: WebSocket) => void;
|
|
3009
3120
|
onError?: (event: Event, webSocket: WebSocket) => void;
|
|
3010
3121
|
onMessage?: (event: MessageEvent, webSocket: WebSocket) => void;
|
|
3011
|
-
retry?: boolean | number;
|
|
3012
|
-
protocols?: Array<'soap' | 'wasm'>;
|
|
3013
3122
|
}
|
|
3014
|
-
type UseWebSocketStatus = '
|
|
3123
|
+
type UseWebSocketStatus = 'connected' | 'connecting' | 'disconnected' | 'failed';
|
|
3015
3124
|
interface UseWebSocketReturn {
|
|
3016
|
-
|
|
3125
|
+
client?: WebSocket;
|
|
3017
3126
|
close: WebSocket['close'];
|
|
3018
3127
|
send: WebSocket['send'];
|
|
3128
|
+
status: UseWebSocketStatus;
|
|
3019
3129
|
open: () => void;
|
|
3020
|
-
client?: WebSocket;
|
|
3021
3130
|
}
|
|
3022
3131
|
/**
|
|
3023
3132
|
* @name useWebSocket
|
|
@@ -3093,10 +3202,10 @@ interface UseWindowSizeParams {
|
|
|
3093
3202
|
}
|
|
3094
3203
|
/** The use window size return type */
|
|
3095
3204
|
interface UseWindowSizeReturn {
|
|
3096
|
-
/** The current window width */
|
|
3097
|
-
width: number;
|
|
3098
3205
|
/** The current window height */
|
|
3099
3206
|
height: number;
|
|
3207
|
+
/** The current window width */
|
|
3208
|
+
width: number;
|
|
3100
3209
|
}
|
|
3101
3210
|
/**
|
|
3102
3211
|
* @name useWindowSize
|
|
@@ -3145,10 +3254,10 @@ declare const useWizard: <WizardStepId extends string>(map: WizardItem<WizardSte
|
|
|
3145
3254
|
|
|
3146
3255
|
declare function debounce<Params extends unknown[]>(callback: (...args: Params) => void, delay: number): (...args: Params) => void;
|
|
3147
3256
|
|
|
3148
|
-
type GetElementTarget =
|
|
3257
|
+
type GetElementTarget = (() => Element) | Document | Element | RefObject<Element | null | undefined> | Window;
|
|
3149
3258
|
declare const getElement: <Target extends GetElementTarget>(target: Target) => Element | (Target & Document) | (Target & Window) | null | undefined;
|
|
3150
3259
|
|
|
3151
|
-
declare const getRetry: (retry:
|
|
3260
|
+
declare const getRetry: (retry: boolean | number) => number;
|
|
3152
3261
|
|
|
3153
3262
|
declare const isClient: boolean;
|
|
3154
3263
|
|
|
@@ -3168,4 +3277,4 @@ declare const getDate: (now?: Date) => {
|
|
|
3168
3277
|
timestamp: number;
|
|
3169
3278
|
};
|
|
3170
3279
|
|
|
3171
|
-
export { BREAKPOINTS_ANT_DESIGN, BREAKPOINTS_BOOTSTRAP_V5, BREAKPOINTS_MANTINE, BREAKPOINTS_MASTER_CSS, BREAKPOINTS_MATERIAL_UI, BREAKPOINTS_PRIME_FLEX, BREAKPOINTS_QUASAR_V2, BREAKPOINTS_SEMANTIC, BREAKPOINTS_TAILWIND, type BatteryManager, type Breakpoints, type ColorSelectionOptions, type ColorSelectionResult, type Connection, type ConnectionEffectiveType, type ConnectionType, type EyeDropper, type EyeDropperConstructor, type GetElementTarget, type LongPressReactEvents, type OperatingSystem, type OrientationLockType, type RequestOptions, SCRIPT_STATUS_ATTRIBUTE_NAME, type ScrollPosition, type UseAsyncReturn, type UseBatteryStateReturn, type UseBooleanReturn, type UseBreakpointsReturn, type UseBreakpointsStrategy, type UseClickOutside, type UseClickOutsideTarget, type UseCopyToClipboardParams, type UseCopyToClipboardReturn, type UseCounter, type UseCounterOptions, type UseCounterReturn, type UseCssVar, type UseCssVarReturn, type UseCssVarTarget, type UseDeviceMotionParams, type UseDeviceMotionReturn, type UseDeviceOrientationReturn, type UseDeviceOrientationValue, type UseDisclosureOptions, type UseDisclosureReturn, type UseDocumentTitleOptions, type UseDocumentTitleReturn, type UseEventListener, type UseEventListenerOptions, type UseEventListenerReturn, type UseEventListenerTarget, type UseEyeDropperReturn, type UseFaviconReturn, type UseFieldParams, type UseFieldRegisterParams, type UseFieldReturn, type UseFileDialog, type UseFileDialogOptions, type UseFileDialogReturn, type UseFocus, type UseFocusOptions, type UseFocusReturn, type UseFocusTarget, type UseFullScreen, type UseFullScreenOptions, type UseFullScreenReturn, type UseFullScreenTarget, type UseGamepadStateReturn, type UseGeolocationParams, type UseGeolocationReturn, type UseHotkeysHotkeys, type UseHotkeysKey, type UseHotkeysOptions, type UseHover, type UseHoverOptions, type UseHoverTarget, type UseIdleOptions, type UseIdleReturn, type UseImageOptions, type UseImageReturn, type UseInfiniteScroll, type UseInfiniteScrollOptions, type UseInfiniteScrollTarget, type UseIntersectionObserver, type UseIntersectionObserverOptions, type UseIntersectionObserverReturn, type UseIntersectionObserverTarget, type UseIntervalOptions, type UseIntervalReturn, type UseKeyPressEvent, type UseKeyPressEventKey, type UseKeyPressKey, type UseKeyPressOptions, type UseKeyboardParams, type UseKeysPressedParams, type UseLastChangedOptions, type UseListReturn, type UseLongPressBind, type UseLongPressOptions, type UseLongPressReturn, type UseLongPressTarget, type UseMapReturn, type UseMeasureReturn, type UseMeasureScreen, type UseMeasureTarget, type UseMemoryReturn, type UseMouse, type UseMouseReturn, type UseMouseTarget, type UseMutationObserver, type UseMutationObserverOptions, type UseMutationObserverReturn, type UseMutationObserverTarget, type UseNetworkReturn, type UseOffsetPaginationOptions, type UseOffsetPaginationReturn, type UseOptimisticReturn, type UseOrientationReturn, type UseOtpCredential, type UseOtpCredentialCallback, type UseOtpCredentialParams, type UseOtpCredentialReturn, type UsePaint, type UsePaintOptions, type UsePaintReturn, type UsePaintTarget, type UseParallax, type UseParallaxOptions, type UseParallaxValue, type UsePermissionName, type UsePermissionOptions, type UsePermissionReturn, type UsePreferredColorSchemeReturn, type UsePreferredContrastReturn, type UsePreferredReducedMotionReturn, type UseQueryOptions, type UseQueryReturn, type UseQueueReturn, type UseRafCallback, type UseRafOptions, type UseRafParams, type UseRafReturn, type UseRafValueReturn, type UseRenderInfoReturn, type UseResizeObserver, type UseResizeObserverOptions, type UseResizeObserverReturn, type UseResizeObserverTarget, type UseScreenOrientationValue, type UseScriptOptions, type UseScriptStatus, type UseShareParams, type UseShareReturn, type UseStopwatchOptions, type UseStopwatchReturn, type UseStorageInitialValue, type UseStorageOptions, type UseStorageReturn, type UseTextSelectionReturn, type UseTimeReturn, type UseTimerOptions, type UseTimerReturn, type UseToggleReturn, type UseWebSocketOptions, type UseWebSocketReturn, type UseWebSocketStatus, type UseWebSocketUrl, type UseWindowSizeReturn, type WizardItem, debounce, dispatchStorageEvent, getConnection, getDate, getElement, getOperatingSystem, getRangesSelection, getRetry, getTimeFromSeconds, isClient, isHotkeyMatch, isPermissionAllowed, legacyCopyToClipboard, mapGamepadToXbox360Controller, scrollTo, throttle, useActiveElement, useAsync, useBattery, useBoolean, useBreakpoints, useBrowserLanguage, useClickOutside, useClipboard, useCounter, useCssVar, useDebounceCallback, useDebounceValue, useDefault, useDeviceMotion, useDeviceOrientation, useDidUpdate, useDisclosure, useDocumentEvent, useDocumentTitle, useDocumentVisibility, useEvent, useEventListener, useEyeDropper, useFavicon, useField, useFileDialog, useFocus, useFps, useFullscreen, useGamepad, useGeolocation, useHash, useHotkeys, useHover, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useInterval, useIsFirstRender, useIsomorphicLayoutEffect, useKeyPress, useKeyPressEvent, useKeyboard, useKeysPressed, useLastChanged, useList, useLocalStorage, useLogger, useLongPress, useMap, useMeasure, useMediaQuery, useMemory, useMount, useMouse, useMutation, useMutationObserver, useNetwork, useOffsetPagination, useOnline, useOperatingSystem, useOptimistic, useOrientation, useOtpCredential, usePageLeave, usePaint, useParallax, usePermission, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useQuery, useQueue, useRaf, useRafValue, useRenderCount, useRenderInfo, useRerender, useResizeObserver, useScreenOrientation, type useScreenOrientationReturn, useScript, useSessionStorage, useSet, useShare, useStep, useStopwatch, useStorage, useTextSelection, useTime, useTimeout, useTimer, useToggle, useUnmount, useWebSocket, useWindowEvent, useWindowFocus, useWindowScroll, useWindowSize, useWizard };
|
|
3280
|
+
export { BREAKPOINTS_ANT_DESIGN, BREAKPOINTS_BOOTSTRAP_V5, BREAKPOINTS_MANTINE, BREAKPOINTS_MASTER_CSS, BREAKPOINTS_MATERIAL_UI, BREAKPOINTS_PRIME_FLEX, BREAKPOINTS_QUASAR_V2, BREAKPOINTS_SEMANTIC, BREAKPOINTS_TAILWIND, type BatteryManager, type Breakpoints, type ColorSelectionOptions, type ColorSelectionResult, type Connection, type ConnectionEffectiveType, type ConnectionType, type EyeDropper, type EyeDropperConstructor, type GetElementTarget, type LongPressReactEvents, type OperatingSystem, type OrientationLockType, type RequestOptions, SCRIPT_STATUS_ATTRIBUTE_NAME, type ScrollPosition, type UseAsyncReturn, type UseBatteryStateReturn, type UseBatteryValue, type UseBooleanReturn, type UseBreakpointsReturn, type UseBreakpointsStrategy, type UseClickOutside, type UseClickOutsideTarget, type UseCopyToClipboardParams, type UseCopyToClipboardReturn, type UseCounter, type UseCounterOptions, type UseCounterReturn, type UseCssVar, type UseCssVarReturn, type UseCssVarTarget, type UseDeviceMotionParams, type UseDeviceMotionReturn, type UseDeviceOrientationReturn, type UseDeviceOrientationValue, type UseDisclosureOptions, type UseDisclosureReturn, type UseDocumentTitleOptions, type UseDocumentTitleReturn, type UseElementSize, type UseElementSizeReturn, type UseElementSizeTarget, type UseEventListener, type UseEventListenerOptions, type UseEventListenerReturn, type UseEventListenerTarget, type UseEyeDropperReturn, type UseFaviconReturn, type UseFieldParams, type UseFieldRegisterParams, type UseFieldReturn, type UseFileDialog, type UseFileDialogOptions, type UseFileDialogReturn, type UseFocus, type UseFocusOptions, type UseFocusReturn, type UseFocusTarget, type UseFullScreen, type UseFullScreenOptions, type UseFullScreenReturn, type UseFullScreenTarget, type UseGamepadStateReturn, type UseGeolocationParams, type UseGeolocationReturn, type UseHotkeysHotkeys, type UseHotkeysKey, type UseHotkeysOptions, type UseHover, type UseHoverOptions, type UseHoverTarget, type UseIdleOptions, type UseIdleReturn, type UseImageOptions, type UseImageReturn, type UseInfiniteScroll, type UseInfiniteScrollOptions, type UseInfiniteScrollTarget, type UseIntersectionObserver, type UseIntersectionObserverOptions, type UseIntersectionObserverReturn, type UseIntersectionObserverTarget, type UseIntervalOptions, type UseIntervalReturn, type UseKeyPressEvent, type UseKeyPressEventKey, type UseKeyPressKey, type UseKeyPressOptions, type UseKeyboardParams, type UseKeysPressedParams, type UseLastChangedOptions, type UseListReturn, type UseLongPressBind, type UseLongPressOptions, type UseLongPressReturn, type UseLongPressTarget, type UseMapReturn, type UseMeasureReturn, type UseMeasureScreen, type UseMeasureTarget, type UseMemoryReturn, type UseMouse, type UseMouseReturn, type UseMouseTarget, type UseMutationObserver, type UseMutationObserverOptions, type UseMutationObserverReturn, type UseMutationObserverTarget, type UseNetworkReturn, type UseOffsetPaginationOptions, type UseOffsetPaginationReturn, type UseOptimisticReturn, type UseOrientationReturn, type UseOtpCredential, type UseOtpCredentialCallback, type UseOtpCredentialParams, type UseOtpCredentialReturn, type UsePaint, type UsePaintOptions, type UsePaintReturn, type UsePaintTarget, type UseParallax, type UseParallaxOptions, type UseParallaxValue, type UsePermissionName, type UsePermissionOptions, type UsePermissionReturn, type UsePreferredColorSchemeReturn, type UsePreferredContrastReturn, type UsePreferredReducedMotionReturn, type UseQueryOptions, type UseQueryReturn, type UseQueueReturn, type UseRafCallback, type UseRafOptions, type UseRafParams, type UseRafReturn, type UseRafValueReturn, type UseRenderInfoReturn, type UseResizeObserver, type UseResizeObserverOptions, type UseResizeObserverReturn, type UseResizeObserverTarget, type UseScreenOrientationValue, type UseScriptOptions, type UseScriptStatus, type UseShareParams, type UseShareReturn, type UseStopwatchOptions, type UseStopwatchReturn, type UseStorageInitialValue, type UseStorageOptions, type UseStorageReturn, type UseTextSelectionReturn, type UseTimeReturn, type UseTimerOptions, type UseTimerReturn, type UseToggleReturn, type UseWebSocketOptions, type UseWebSocketReturn, type UseWebSocketStatus, type UseWebSocketUrl, type UseWindowSizeReturn, type WizardItem, debounce, dispatchStorageEvent, getConnection, getDate, getElement, getOperatingSystem, getRangesSelection, getRetry, getTimeFromSeconds, isClient, isHotkeyMatch, isPermissionAllowed, legacyCopyToClipboard, mapGamepadToXbox360Controller, scrollTo, throttle, useActiveElement, useAsync, useBattery, useBoolean, useBreakpoints, useBrowserLanguage, useClickOutside, useClipboard, useCounter, useCssVar, useDebounceCallback, useDebounceValue, useDefault, useDeviceMotion, useDeviceOrientation, useDidUpdate, useDisclosure, useDocumentEvent, useDocumentTitle, useDocumentVisibility, useElementSize, useEvent, useEventListener, useEyeDropper, useFavicon, useField, useFileDialog, useFocus, useFps, useFullscreen, useGamepad, useGeolocation, useHash, useHotkeys, useHover, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useInterval, useIsFirstRender, useIsomorphicLayoutEffect, useKeyPress, useKeyPressEvent, useKeyboard, useKeysPressed, useLastChanged, useList, useLocalStorage, useLogger, useLongPress, useMap, useMeasure, useMediaQuery, useMemory, useMount, useMouse, useMutation, useMutationObserver, useNetwork, useOffsetPagination, useOnline, useOperatingSystem, useOptimistic, useOrientation, useOtpCredential, usePageLeave, usePaint, useParallax, usePermission, usePointerLock, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useQuery, useQueue, useRaf, useRafValue, useRenderCount, useRenderInfo, useRerender, useResizeObserver, useScreenOrientation, type useScreenOrientationReturn, useScript, useSessionStorage, useSet, useShare, useStep, useStopwatch, useStorage, useTextSelection, useTime, useTimeout, useTimer, useToggle, useUnmount, useWebSocket, useWindowEvent, useWindowFocus, useWindowScroll, useWindowSize, useWizard };
|