@siberiacancode/reactuse 0.0.71 → 0.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{_rollupPluginBabelHelpers-mppFXOYB.js → _rollupPluginBabelHelpers-We1VD7hv.js} +2 -2
- package/dist/cjs/_rollupPluginBabelHelpers-We1VD7hv.js.map +1 -0
- package/dist/cjs/hooks/index.js +2 -2
- package/dist/cjs/hooks/useActiveElement/useActiveElement.js +3 -0
- package/dist/cjs/hooks/useActiveElement/useActiveElement.js.map +1 -0
- 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/useBoolean/useBoolean.js +2 -2
- package/dist/cjs/hooks/useBoolean/useBoolean.js.map +1 -1
- 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/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/useDebounceCallback/useDebounceCallback.js +1 -1
- package/dist/cjs/hooks/useDebounceValue/useDebounceValue.js +2 -2
- package/dist/cjs/hooks/useDefault/useDefault.js +2 -2
- 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/useDidUpdate/useDidUpdate.js +1 -1
- package/dist/cjs/hooks/useDisclosure/useDisclosure.js +2 -2
- package/dist/cjs/hooks/useDocumentEvent/useDocumentEvent.js +2 -2
- package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
- package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
- package/dist/cjs/hooks/useEvent/useEvent.js +1 -1
- package/dist/cjs/hooks/useEventListener/useEventListener.js +2 -2
- 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/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/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/useGeolocation/useGeolocation.js +2 -2
- package/dist/cjs/hooks/useHash/useHash.js +2 -2
- 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/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/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/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/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/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/useLastChanged/useLastChanged.js.map +1 -1
- package/dist/cjs/hooks/useList/useList.js +2 -2
- package/dist/cjs/hooks/useLocalStorage/useLocalStorage.js +2 -2
- 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/useMeasure/useMeasure.js +2 -2
- package/dist/cjs/hooks/useMediaQuery/useMediaQuery.js +1 -1
- package/dist/cjs/hooks/useMemory/useMemory.js +2 -2
- package/dist/cjs/hooks/useMount/useMount.js +1 -1
- package/dist/cjs/hooks/useMouse/useMouse.js +2 -2
- package/dist/cjs/hooks/useMutation/useMutation.js +2 -2
- 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/useOffsetPagination/useOffsetPagination.js +2 -2
- package/dist/cjs/hooks/useOnline/useOnline.js +1 -1
- package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
- package/dist/cjs/hooks/useOptimistic/useOptimistic.js +2 -2
- package/dist/cjs/hooks/useOrientation/useOrientation.js +2 -2
- package/dist/cjs/hooks/useOtpCredential/useOtpCredential.js +2 -2
- package/dist/cjs/hooks/usePageLeave/usePageLeave.js +2 -2
- package/dist/cjs/hooks/usePaint/helpers/Paint.js +2 -2
- package/dist/cjs/hooks/usePaint/helpers/Pointer.js +2 -2
- package/dist/cjs/hooks/usePaint/usePaint.js +2 -2
- package/dist/cjs/hooks/useParallax/useParallax.js +2 -2
- package/dist/cjs/hooks/usePermission/usePermission.js +2 -2
- package/dist/cjs/hooks/usePermission/usePermission.js.map +1 -1
- package/dist/cjs/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
- package/dist/cjs/hooks/usePreferredContrast/usePreferredContrast.js +1 -1
- package/dist/cjs/hooks/usePreferredDark/usePreferredDark.js +1 -1
- package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.js +1 -1
- package/dist/cjs/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js +1 -1
- package/dist/cjs/hooks/usePrevious/usePrevious.js +1 -1
- package/dist/cjs/hooks/useQuery/useQuery.js +2 -2
- 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/useRenderCount/useRenderCount.js +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/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/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/useSet/useSet.js +2 -2
- package/dist/cjs/hooks/useShare/useShare.js +2 -2
- package/dist/cjs/hooks/useStep/useStep.js +2 -2
- 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/useTextSelection/useTextSelection.js +2 -2
- package/dist/cjs/hooks/useTime/useTime.js +2 -2
- package/dist/cjs/hooks/useTimeout/useTimeout.js +2 -2
- package/dist/cjs/hooks/useTimer/useTimer.js +2 -2
- 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/useWebSocket/useWebSocket.js +2 -2
- package/dist/cjs/hooks/useWindowEvent/useWindowEvent.js +2 -2
- package/dist/cjs/hooks/useWindowFocus/useWindowFocus.js +3 -0
- package/dist/cjs/hooks/useWindowFocus/useWindowFocus.js.map +1 -0
- package/dist/cjs/hooks/useWindowScroll/useWindowScroll.js +2 -2
- 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/{index-Bi1s-nNB.js → index-CgoC48JK.js} +2 -2
- package/dist/cjs/{index-Bi1s-nNB.js.map → index-CgoC48JK.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/getRetry.js +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-DnmVbpNy.js → _rollupPluginBabelHelpers-DKveiPYY.js} +2 -2
- package/dist/esm/_rollupPluginBabelHelpers-DKveiPYY.js.map +1 -0
- package/dist/esm/hooks/index.js +2 -2
- package/dist/esm/hooks/useActiveElement/useActiveElement.js +3 -0
- package/dist/esm/hooks/useActiveElement/useActiveElement.js.map +1 -0
- 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/useBoolean/useBoolean.js +2 -2
- package/dist/esm/hooks/useBoolean/useBoolean.js.map +1 -1
- 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/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/useDebounceCallback/useDebounceCallback.js +1 -1
- package/dist/esm/hooks/useDebounceValue/useDebounceValue.js +2 -2
- package/dist/esm/hooks/useDefault/useDefault.js +2 -2
- 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/useDidUpdate/useDidUpdate.js +1 -1
- package/dist/esm/hooks/useDisclosure/useDisclosure.js +2 -2
- package/dist/esm/hooks/useDocumentEvent/useDocumentEvent.js +2 -2
- package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
- package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
- package/dist/esm/hooks/useEvent/useEvent.js +1 -1
- package/dist/esm/hooks/useEventListener/useEventListener.js +2 -2
- 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/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/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/useGeolocation/useGeolocation.js +2 -2
- package/dist/esm/hooks/useHash/useHash.js +2 -2
- 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/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/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/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/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/useLastChanged/useLastChanged.js.map +1 -1
- package/dist/esm/hooks/useList/useList.js +2 -2
- package/dist/esm/hooks/useLocalStorage/useLocalStorage.js +2 -2
- 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/useMeasure/useMeasure.js +2 -2
- package/dist/esm/hooks/useMediaQuery/useMediaQuery.js +1 -1
- package/dist/esm/hooks/useMemory/useMemory.js +2 -2
- package/dist/esm/hooks/useMount/useMount.js +1 -1
- package/dist/esm/hooks/useMouse/useMouse.js +2 -2
- package/dist/esm/hooks/useMutation/useMutation.js +2 -2
- 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/useOffsetPagination/useOffsetPagination.js +2 -2
- package/dist/esm/hooks/useOnline/useOnline.js +1 -1
- package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
- package/dist/esm/hooks/useOptimistic/useOptimistic.js +2 -2
- package/dist/esm/hooks/useOrientation/useOrientation.js +2 -2
- package/dist/esm/hooks/useOtpCredential/useOtpCredential.js +2 -2
- package/dist/esm/hooks/usePageLeave/usePageLeave.js +2 -2
- package/dist/esm/hooks/usePaint/helpers/Paint.js +2 -2
- package/dist/esm/hooks/usePaint/helpers/Pointer.js +2 -2
- package/dist/esm/hooks/usePaint/usePaint.js +2 -2
- package/dist/esm/hooks/useParallax/useParallax.js +2 -2
- package/dist/esm/hooks/usePermission/usePermission.js +2 -2
- package/dist/esm/hooks/usePermission/usePermission.js.map +1 -1
- package/dist/esm/hooks/usePreferredColorScheme/usePreferredColorScheme.js +1 -1
- package/dist/esm/hooks/usePreferredContrast/usePreferredContrast.js +1 -1
- package/dist/esm/hooks/usePreferredDark/usePreferredDark.js +1 -1
- package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.js +1 -1
- package/dist/esm/hooks/usePreferredReducedMotion/usePreferredReducedMotion.js +1 -1
- package/dist/esm/hooks/usePrevious/usePrevious.js +1 -1
- package/dist/esm/hooks/useQuery/useQuery.js +2 -2
- 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/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/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/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/useSet/useSet.js +2 -2
- package/dist/esm/hooks/useShare/useShare.js +2 -2
- package/dist/esm/hooks/useStep/useStep.js +2 -2
- 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/useTextSelection/useTextSelection.js +2 -2
- package/dist/esm/hooks/useTime/useTime.js +2 -2
- package/dist/esm/hooks/useTimeout/useTimeout.js +2 -2
- package/dist/esm/hooks/useTimer/useTimer.js +2 -2
- 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/useWebSocket/useWebSocket.js +2 -2
- package/dist/esm/hooks/useWindowEvent/useWindowEvent.js +2 -2
- package/dist/esm/hooks/useWindowFocus/useWindowFocus.js +3 -0
- package/dist/esm/hooks/useWindowFocus/useWindowFocus.js.map +1 -0
- package/dist/esm/hooks/useWindowScroll/useWindowScroll.js +2 -2
- 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/{index-DaDsOQsh.js → index-C0eyELV9.js} +2 -2
- package/dist/esm/{index-DaDsOQsh.js.map → index-C0eyELV9.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/getRetry.js +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 +28 -2
- package/package.json +1 -1
- package/dist/cjs/_rollupPluginBabelHelpers-mppFXOYB.js.map +0 -1
- package/dist/esm/_rollupPluginBabelHelpers-DnmVbpNy.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRaf.js","sources":["../../../../src/hooks/useRaf/useRaf.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\
|
|
1
|
+
{"version":3,"file":"useRaf.js","sources":["../../../../src/hooks/useRaf/useRaf.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\n/* The use raf params type */\nexport interface UseRafParams {\n /** The delta between each frame in milliseconds */\n delta: number;\n /** The timestamp of the current frame in milliseconds */\n timestamp: DOMHighResTimeStamp;\n}\n\n/* The use raf type */\nexport type UseRafCallback = (params: UseRafParams) => void;\n\n/* The use raf options type */\nexport interface UseRafOptions {\n /** The delay between each frame in milliseconds */\n delay?: number;\n /** Whether the callback should be enabled */\n enabled?: boolean;\n}\n\n/* The use raf return type */\nexport interface UseRafReturn {\n /** Whether the callback is active */\n active: boolean;\n /** Function to pause the callback */\n pause: () => void;\n /** Function to resume the callback */\n resume: () => void;\n}\n\n/**\n * @name useRaf\n * @description - Hook that defines the logic for raf callback\n * @category Utilities\n *\n * @param {UseRafCallback} callback The callback to execute\n * @param {number} [options.delay] The delay between each frame in milliseconds\n * @param {boolean} [options.enabled=true] Whether the callback should be enabled\n * @returns {UseRafCallbackReturn} An object of raf callback functions\n *\n * @example\n * useRaf(() => console.log('callback'));\n */\nexport const useRaf = (callback: UseRafCallback, options?: UseRafOptions): UseRafReturn => {\n const rafIdRef = useRef<number | null>(null);\n const previousFrameTimestampRef = useRef(0);\n const [active, setActive] = useState(false);\n const enabled = options?.enabled ?? true;\n\n const internalCallbackRef = useRef(callback);\n internalCallbackRef.current = callback;\n\n const loop = (timestamp: DOMHighResTimeStamp) => {\n const delta = timestamp - previousFrameTimestampRef.current;\n\n if (options?.delay && delta < options?.delay) {\n rafIdRef.current = window.requestAnimationFrame(loop);\n return;\n }\n\n previousFrameTimestampRef.current = timestamp;\n internalCallbackRef.current({ delta, timestamp });\n rafIdRef.current = window.requestAnimationFrame(loop);\n };\n\n const resume = () => {\n if (active) return;\n setActive(true);\n previousFrameTimestampRef.current = 0;\n rafIdRef.current = window.requestAnimationFrame(loop);\n };\n\n function pause() {\n if (!rafIdRef.current) return;\n\n setActive(false);\n window.cancelAnimationFrame(rafIdRef.current);\n rafIdRef.current = null;\n }\n\n useEffect(() => {\n if (!enabled) return;\n resume();\n\n return pause;\n }, [enabled, options?.delay]);\n\n return {\n active,\n pause,\n resume\n };\n};\n"],"names":["useRaf","callback","options","_options$enabled","rafIdRef","useRef","previousFrameTimestampRef","_useState","useState","_useState2","_slicedToArray","active","setActive","enabled","internalCallbackRef","current","loop","timestamp","delta","delay","window","requestAnimationFrame","resume","pause","cancelAnimationFrame","useEffect"],"mappings":";4HA4CO,IAAMA,EAAS,SAACC,EAA0BC,GAA0C,IAAAC,EACnFC,EAAWC,EAAsB,MACjCC,EAA4BD,EAAO,GACzCE,EAA4BC,GAAS,GAAMC,EAAAC,EAAAH,EAAA,GAApCI,EAAMF,EAAA,GAAEG,EAASH,EAAA,GAClBI,EAA0BV,QAAnBA,EAAGD,aAAO,EAAPA,EAASW,eAAOV,IAAAA,GAAAA,EAE1BW,EAAsBT,EAAOJ,GACnCa,EAAoBC,QAAUd,EAE9B,IAAMe,EAAO,SAAPA,EAAQC,GACZ,IAAMC,EAAQD,EAAYX,EAA0BS,QAEhDb,SAAAA,EAASiB,OAASD,GAAQhB,eAAAA,EAASiB,SAKvCb,EAA0BS,QAAUE,EACpCH,EAAoBC,QAAQ,CAAEG,MAAAA,EAAOD,UAAAA,KALnCb,EAASW,QAAUK,OAAOC,sBAAsBL,IAS9CM,EAAS,WACTX,IACJC,GAAU,GACVN,EAA0BS,QAAU,EACpCX,EAASW,QAAUK,OAAOC,sBAAsBL,KAGlD,SAASO,IACFnB,EAASW,UAEdH,GAAU,GACVQ,OAAOI,qBAAqBpB,EAASW,SACrCX,EAASW,QAAU,KACrB,CASA,OAPAU,GAAU,WACR,GAAKZ,EAGL,OAFAS,IAEOC,CACR,GAAE,CAACV,EAASX,aAAO,EAAPA,EAASiB,QAEf,CACLR,OAAAA,EACAY,MAAAA,EACAD,OAAAA,EAEJ"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as r}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useRef as n,useState as t}from"react";import{useUnmount as e}from"../useUnmount/useUnmount.js";var o=function(o){var u=n(0),i=t(o),m=r(i,2),a=m[0],c=m[1];return e((function(){return cancelAnimationFrame(u.current)})),[a,function(r){cancelAnimationFrame(u.current),u.current=requestAnimationFrame((function(){return c(r)}))}]};export{o as useRafValue};
|
|
3
3
|
//# sourceMappingURL=useRafValue.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
2
|
import{useRef as r,useEffect as t}from"react";var n=function(){var n=r(0);return t((function(){n.current+=1})),n.current};export{n as useRenderCount};
|
|
3
3
|
//# sourceMappingURL=useRenderCount.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
2
|
import{useRef as e}from"react";var n=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unknown",r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=e({component:n,renders:0,timestamp:Date.now(),sinceLast:0}),c=Date.now();return t.current.renders+=1,t.current.sinceLast=t.current.timestamp?c-t.current.timestamp:0,t.current.timestamp=c,r&&(console.group("".concat(n," info, render number: ").concat(t.current.renders)),console.log("Timestamp: ".concat(t.current.timestamp)),console.log("Since last render: ".concat(t.current.sinceLast)),console.log("Renders: ".concat(t.current.renders)),console.dir(t.current),console.groupEnd()),t.current};export{n as useRenderInfo};
|
|
3
3
|
//# sourceMappingURL=useRenderInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRenderInfo.js","sources":["../../../../src/hooks/useRenderInfo/useRenderInfo.ts"],"sourcesContent":["import { useRef } from 'react';\
|
|
1
|
+
{"version":3,"file":"useRenderInfo.js","sources":["../../../../src/hooks/useRenderInfo/useRenderInfo.ts"],"sourcesContent":["import { useRef } from 'react';\n\nexport interface UseRenderInfoReturn {\n component: string;\n renders: number;\n timestamp: null | number;\n sinceLast: number;\n}\n\n/**\n * @name useRenderInfo\n * @description - Hook for getting information about component rerender\n * @category Lifecycle\n *\n * @param {string} [name='Unknown'] Component name\n * @param {boolean} [log=true] Toggle logging\n * @returns {UseRenderInfoReturn} An object containing rerender information\n *\n * @example\n * const rerenderInfo = useRenderInfo('Component');\n */\nexport const useRenderInfo = (name: string = 'Unknown', log: boolean = true) => {\n const renderInfoRef = useRef<UseRenderInfoReturn>({\n component: name,\n renders: 0,\n timestamp: Date.now(),\n sinceLast: 0\n });\n const now = Date.now();\n\n renderInfoRef.current.renders += 1;\n renderInfoRef.current.sinceLast = renderInfoRef.current.timestamp\n ? now - renderInfoRef.current.timestamp\n : 0;\n renderInfoRef.current.timestamp = now;\n\n if (log) {\n console.group(`${name} info, render number: ${renderInfoRef.current.renders}`);\n console.log(`Timestamp: ${renderInfoRef.current.timestamp}`);\n console.log(`Since last render: ${renderInfoRef.current.sinceLast}`);\n console.log(`Renders: ${renderInfoRef.current.renders}`);\n console.dir(renderInfoRef.current);\n console.groupEnd();\n }\n\n return renderInfoRef.current;\n};\n"],"names":["useRenderInfo","name","arguments","length","undefined","log","renderInfoRef","useRef","component","renders","timestamp","Date","now","sinceLast","current","console","group","concat","dir","groupEnd"],"mappings":";mCAqBaA,EAAgB,WAAmD,IAAlDC,EAAYC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,UAAWG,IAAYH,UAAAC,OAAA,QAAAC,IAAAF,UAAA,KAAAA,UAAA,GAC5DI,EAAgBC,EAA4B,CAChDC,UAAWP,EACXQ,QAAS,EACTC,UAAWC,KAAKC,MAChBC,UAAW,IAEPD,EAAMD,KAAKC,MAiBjB,OAfAN,EAAcQ,QAAQL,SAAW,EACjCH,EAAcQ,QAAQD,UAAYP,EAAcQ,QAAQJ,UACpDE,EAAMN,EAAcQ,QAAQJ,UAC5B,EACJJ,EAAcQ,QAAQJ,UAAYE,EAE9BP,IACFU,QAAQC,MAAKC,GAAAA,OAAIhB,EAAI,0BAAAgB,OAAyBX,EAAcQ,QAAQL,UACpEM,QAAQV,IAAG,cAAAY,OAAeX,EAAcQ,QAAQJ,YAChDK,QAAQV,IAAG,sBAAAY,OAAuBX,EAAcQ,QAAQD,YACxDE,QAAQV,IAAG,YAAAY,OAAaX,EAAcQ,QAAQL,UAC9CM,QAAQG,IAAIZ,EAAcQ,SAC1BC,QAAQI,YAGHb,EAAcQ,OACvB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as r}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useId as t,useState as o}from"react";var n=function(){var n=t(),a=o(n),e=r(a,2),i=e[0],u=e[1];return{id:i,update:function(){return u(Math.random().toString())}}};export{n as useRerender};
|
|
3
3
|
//# sourceMappingURL=useRerender.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{c as e,_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{c as e,_ as r}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as n,useRef as i,useEffect as t}from"react";import{getElement as o}from"../../utils/helpers/getElement.js";import"../../utils/helpers/isClient.js";var l=function(){var l,u="object"!==e(arguments.length<=0?void 0:arguments[0])||"current"in(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,v=u?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],s=null===(l=null==v?void 0:v.enabled)||void 0===l||l,c=n([]),a=r(c,2),f=a[0],d=a[1],h=n(),g=r(h,2),p=g[0],b=g[1],m=i();return m.current=null==v?void 0:v.onChange,t((function(){if(s||u||p){if(Array.isArray(u)){if(!u.length)return;var e=new ResizeObserver((function(r){var n;d(r),null===(n=m.current)||void 0===n||n.call(m,r,e)}));return u.forEach((function(r){var n=o(r);n&&e.observe(n,v)})),function(){e.disconnect()}}var r=u?o(u):p;if(r){var n=new ResizeObserver((function(e){var r;d(e),null===(r=m.current)||void 0===r||r.call(m,e,n)}));return n.observe(r,v),function(){n.disconnect()}}}}),[p,u,null==v?void 0:v.box,s]),u?{entries:f}:{ref:b,entries:f}};export{l as useResizeObserver};
|
|
3
3
|
//# sourceMappingURL=useResizeObserver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResizeObserver.js","sources":["../../../../src/hooks/useResizeObserver/useResizeObserver.ts"],"sourcesContent":["import type { RefObject } from 'react';\
|
|
1
|
+
{"version":3,"file":"useResizeObserver.js","sources":["../../../../src/hooks/useResizeObserver/useResizeObserver.ts"],"sourcesContent":["import type { RefObject } from 'react';\nimport { useEffect, useRef, useState } from 'react';\n\nimport { getElement } from '@/utils/helpers';\n\n/** The resize observer target element type */\nexport type UseResizeObserverTarget =\n | RefObject<Element | null | undefined>\n | (() => Element)\n | Element;\n\n/** The resize observer options type */\nexport interface UseResizeObserverOptions extends ResizeObserverOptions {\n enabled?: boolean;\n onChange?: (entries: ResizeObserverEntry[], observer: ResizeObserver) => void;\n}\n\n/** The resize observer return type */\nexport interface UseResizeObserverReturn {\n entries: ResizeObserverEntry[];\n}\n\nexport interface UseResizeObserver {\n <Target extends UseResizeObserverTarget | UseResizeObserverTarget[]>(\n target: Target,\n options?: UseResizeObserverOptions\n ): UseResizeObserverReturn;\n\n <Target extends UseResizeObserverTarget | UseResizeObserverTarget[]>(\n options?: UseResizeObserverOptions,\n target?: never\n ): UseResizeObserverReturn & { ref: (node: Target) => void };\n}\n\n/**\n * @name useResizeObserver\n * @description - Hook that gives you resize observer state\n * @category Browser\n *\n * @overload\n * @template Target The target element\n * @param {boolean} [options.enabled=true] The IntersectionObserver options\n * @param {boolean} [options.box] The IntersectionObserver options\n * @param {(entries: ResizeObserverEntry[], observer: ResizeObserver) => void} [options.onChange] The callback to execute when resize is detected\n * @returns {UseResizeObserverReturn & { ref: (node: Target) => void }} An object containing the resize observer state\n *\n * @example\n * const { ref, entries } = useResizeObserver();\n *\n * @overload\n * @template Target The target element\n * @param {Target} target The target element to observe\n * @param {boolean} [options.enabled=true] The IntersectionObserver options\n * @param {boolean} [options.box] The IntersectionObserver options\n * @param {(entries: ResizeObserverEntry[], observer: ResizeObserver) => void} [options.onChange] The callback to execute when resize is detected\n * @returns {UseResizeObserverReturn} An object containing the resize observer state\n *\n * @example\n * const { entries } = useResizeObserver(ref);\n */\nexport const useResizeObserver = ((...params: any[]) => {\n const target = (\n typeof params[0] === 'object' && !('current' in params[0]) ? undefined : params[0]\n ) as UseResizeObserverTarget | UseResizeObserverTarget[] | undefined;\n const options = (target ? params[1] : params[0]) as UseResizeObserverOptions | undefined;\n const enabled = options?.enabled ?? true;\n\n const [entries, setEntries] = useState<ResizeObserverEntry[]>([]);\n\n const [internalRef, setInternalRef] = useState<Element>();\n const internalOnChangeRef = useRef<UseResizeObserverOptions['onChange']>();\n internalOnChangeRef.current = options?.onChange;\n\n useEffect(() => {\n if (!enabled && !target && !internalRef) return;\n\n if (Array.isArray(target)) {\n if (!target.length) return;\n const observer = new ResizeObserver((entries) => {\n setEntries(entries);\n internalOnChangeRef.current?.(entries, observer);\n });\n\n target.forEach((target) => {\n const element = getElement(target);\n if (!element) return;\n observer.observe(element as Element, options);\n });\n\n return () => {\n observer.disconnect();\n };\n }\n\n const element = target ? getElement(target) : internalRef;\n if (!element) return;\n\n const observer = new ResizeObserver((entries) => {\n setEntries(entries);\n internalOnChangeRef.current?.(entries, observer);\n });\n observer.observe(element as Element, options);\n\n return () => {\n observer.disconnect();\n };\n }, [internalRef, target, options?.box, enabled]);\n\n if (target) return { entries };\n return {\n ref: setInternalRef,\n entries\n };\n}) as UseResizeObserver;\n"],"names":["useResizeObserver","_options$enabled","target","_typeof","arguments","length","undefined","options","enabled","_useState","useState","_useState2","_slicedToArray","entries","setEntries","_useState3","_useState4","internalRef","setInternalRef","internalOnChangeRef","useRef","current","onChange","useEffect","Array","isArray","observer","ResizeObserver","_internalOnChangeRef$","call","forEach","element","getElement","observe","disconnect","_internalOnChangeRef$2","box","ref"],"mappings":";8OA4DaA,EAAqB,WAAsB,IAAAC,EAChDC,EACiB,WAArBC,EAAAC,UAAAC,QAAA,OAAAC,EAAAF,UAAqB,KAAc,YAASA,UAAAC,eAAAC,EAAAF,UAAA,IAA0BA,UAAAC,QAAA,OAAAC,EAAAF,UACJ,QADLE,EAEzDC,EAAWL,EAAME,UAAAC,QAAAC,OAAAA,EAAAF,UAAA,GAAAA,UAAAC,eAAAC,EAAAF,UAAiE,GAClFI,EAA0BP,QAAnBA,EAAGM,aAAO,EAAPA,EAASC,eAAOP,IAAAA,GAAAA,EAEhCQ,EAA8BC,EAAgC,IAAGC,EAAAC,EAAAH,EAAA,GAA1DI,EAAOF,EAAA,GAAEG,EAAUH,EAAA,GAE1BI,EAAsCL,IAAmBM,EAAAJ,EAAAG,EAAA,GAAlDE,EAAWD,EAAA,GAAEE,EAAcF,EAAA,GAC5BG,EAAsBC,IAsC5B,OArCAD,EAAoBE,QAAUd,aAAO,EAAPA,EAASe,SAEvCC,GAAU,WACR,GAAKf,GAAYN,GAAWe,EAA5B,CAEA,GAAIO,MAAMC,QAAQvB,GAAS,CACzB,IAAKA,EAAOG,OAAQ,OACpB,IAAMqB,EAAW,IAAIC,gBAAe,SAACd,GAAY,IAAAe,EAC/Cd,EAAWD,WACXe,EAAAT,EAAoBE,eAAO,IAAAO,GAA3BA,EAAAC,KAAAV,EAA8BN,EAASa,EACzC,IAQA,OANAxB,EAAO4B,SAAQ,SAAC5B,GACd,IAAM6B,EAAUC,EAAW9B,GACtB6B,GACLL,EAASO,QAAQF,EAAoBxB,EACvC,IAEO,WACLmB,EAASQ,aAEb,CAEA,IAAMH,EAAU7B,EAAS8B,EAAW9B,GAAUe,EAC9C,GAAKc,EAAL,CAEA,IAAML,EAAW,IAAIC,gBAAe,SAACd,GAAY,IAAAsB,EAC/CrB,EAAWD,WACXsB,EAAAhB,EAAoBE,eAAO,IAAAc,GAA3BA,EAAAN,KAAAV,EAA8BN,EAASa,EACzC,IAGA,OAFAA,EAASO,QAAQF,EAAoBxB,GAE9B,WACLmB,EAASQ,aATG,CArB2B,CAgC1C,GAAE,CAACjB,EAAaf,EAAQK,aAAO,EAAPA,EAAS6B,IAAK5B,IAEnCN,EAAe,CAAEW,QAAAA,GACd,CACLwB,IAAKnB,EACLL,QAAAA,EAEJ"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as n}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as n}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as o,useEffect as e}from"react";var i=function(){var i=window&&"screen"in window&&"orientation"in window.screen,t=i?window.screen.orientation:{},r=o((function(){var n;return{angle:null!==(n=null==t?void 0:t.angle)&&void 0!==n?n:0,orientationType:null==t?void 0:t.type}})),u=n(r,2),l=u[0],a=u[1];e((function(){if(i){var n=function(){return a({angle:t.angle,orientationType:t.type})};return window.addEventListener("orientationchange",n),function(){window.removeEventListener("orientationchange",n)}}}));return{supported:i,value:l,lock:function(n){if(i&&"function"==typeof t.lock)return t.lock(n)},unlock:function(){i&&"function"==typeof t.unlock&&t.unlock()}}};export{i as useScreenOrientation};
|
|
3
3
|
//# sourceMappingURL=useScreenOrientation.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as r}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as t,useEffect as e}from"react";var n="script-status",o=function(o){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=t((function(){var r=document.querySelector('script[src="'.concat(o,'"]')),t=null==r?void 0:r.getAttribute(n);return t||(r?"unknown":"loading")})),c=r(u,2),a=c[0],s=c[1],d=i.removeOnUnmount,v=void 0===d||d,l=i.async,m=void 0===l||l;return e((function(){var t=document.querySelector('script[src="'.concat(o,'"]')),e=null==t?void 0:t.getAttribute(n);if(e)return s(e);if(t)return s("unknown");var u=document.createElement("script");u.src=o,u.async=m;for(var c=0,a=Object.entries(i);c<a.length;c++){var d=r(a[c],2),l=d[0],f=d[1];u.setAttribute(l,String(f))}u.setAttribute(n,"loading"),document.body.appendChild(u);var p=function(){u.setAttribute(n,"ready"),s("ready")},b=function(){u.setAttribute(n,"error"),s("error")};return u.addEventListener("load",p),u.addEventListener("error",b),function(){v&&u.remove(),u.removeEventListener("load",p),u.removeEventListener("error",b)}}),[o,v]),a};export{n as SCRIPT_STATUS_ATTRIBUTE_NAME,o as useScript};
|
|
3
3
|
//# sourceMappingURL=useScript.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScript.js","sources":["../../../../src/hooks/useScript/useScript.ts"],"sourcesContent":["import type { ComponentProps } from 'react';\
|
|
1
|
+
{"version":3,"file":"useScript.js","sources":["../../../../src/hooks/useScript/useScript.ts"],"sourcesContent":["import type { ComponentProps } from 'react';\nimport { useEffect, useState } from 'react';\n\n/** The use script status */\nexport type UseScriptStatus = 'loading' | 'ready' | 'error' | 'unknown';\nexport const SCRIPT_STATUS_ATTRIBUTE_NAME = 'script-status';\n\n/** The use script options extends from attributes script tag */\nexport interface UseScriptOptions extends ComponentProps<'script'> {\n /** Whether to remove the script on unmount */\n removeOnUnmount?: boolean;\n}\n\n/**\n * @name useScript\n * @description - Hook that manages a script with onLoad, onError, and removeOnUnmount functionalities\n * @category Browser\n *\n * @param {string} src The source of the script\n * @param {UseScriptOptions} [options] The options of the script extends from attributes script tag\n * @param {boolean} [options.removeOnUnmount=true] Whether to remove the script on unmount\n * @param {boolean} [options.async=true] Whether to load the script asynchronously\n * @returns {UseScriptStatus} The status of the script\n *\n * @example\n * const status = useScript('https://example.com/script.js');\n */\nexport const useScript = (src: string, options: UseScriptOptions = {}) => {\n const [status, setStatus] = useState<UseScriptStatus>(() => {\n const script = document.querySelector(`script[src=\"${src}\"]`) as HTMLScriptElement;\n const scriptStatus = script?.getAttribute(SCRIPT_STATUS_ATTRIBUTE_NAME) as UseScriptStatus;\n if (scriptStatus) return scriptStatus;\n if (script) return 'unknown';\n\n return 'loading';\n });\n const { removeOnUnmount = true, async = true } = options;\n\n useEffect(() => {\n const existedScript = document.querySelector(`script[src=\"${src}\"]`) as HTMLScriptElement;\n const scriptStatus = existedScript?.getAttribute(\n SCRIPT_STATUS_ATTRIBUTE_NAME\n ) as UseScriptStatus;\n if (scriptStatus) return setStatus(scriptStatus);\n if (existedScript) return setStatus('unknown');\n\n const script = document.createElement('script');\n script.src = src;\n script.async = async;\n\n for (const [key, value] of Object.entries(options)) {\n script.setAttribute(key, String(value));\n }\n\n script.setAttribute(SCRIPT_STATUS_ATTRIBUTE_NAME, 'loading');\n document.body.appendChild(script);\n\n const onLoad = () => {\n script.setAttribute(SCRIPT_STATUS_ATTRIBUTE_NAME, 'ready');\n setStatus('ready');\n };\n\n const onError = () => {\n script.setAttribute(SCRIPT_STATUS_ATTRIBUTE_NAME, 'error');\n setStatus('error');\n };\n\n script.addEventListener('load', onLoad);\n script.addEventListener('error', onError);\n\n return () => {\n if (removeOnUnmount) script.remove();\n script.removeEventListener('load', onLoad);\n script.removeEventListener('error', onError);\n };\n }, [src, removeOnUnmount]);\n\n return status;\n};\n"],"names":["SCRIPT_STATUS_ATTRIBUTE_NAME","useScript","src","options","arguments","length","undefined","_useState","useState","script","document","querySelector","concat","scriptStatus","getAttribute","_useState2","_slicedToArray","status","setStatus","_options$removeOnUnmo","removeOnUnmount","_options$async","async","useEffect","existedScript","createElement","_i","_Object$entries","Object","entries","_Object$entries$_i","key","value","setAttribute","String","body","appendChild","onLoad","onError","addEventListener","remove","removeEventListener"],"mappings":";gHAKO,IAAMA,EAA+B,gBAsB/BC,EAAY,SAACC,GAAgD,IAAnCC,EAAyBC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,CAAA,EACjEG,EAA4BC,GAA0B,WACpD,IAAMC,EAASC,SAASC,6BAAaC,OAAgBV,EAAG,OAClDW,EAAeJ,aAAAA,EAAAA,EAAQK,aAAad,GAC1C,OAAIa,IACAJ,EAAe,UAEZ,UACT,IAAEM,EAAAC,EAAAT,EAAA,GAPKU,EAAMF,EAAA,GAAEG,EAASH,EAAA,GAQxBI,EAAiDhB,EAAzCiB,gBAAAA,OAAkB,IAAHD,GAAOA,EAAAE,EAAmBlB,EAAjBmB,MAAAA,OAAQ,IAAHD,GAAOA,EAyC5C,OAvCAE,GAAU,WACR,IAAMC,EAAgBd,SAASC,6BAAaC,OAAgBV,EAAG,OACzDW,EAAeW,aAAAA,EAAAA,EAAeV,aAClCd,GAEF,GAAIa,EAAc,OAAOK,EAAUL,GACnC,GAAIW,EAAe,OAAON,EAAU,WAEpC,IAAMT,EAASC,SAASe,cAAc,UACtChB,EAAOP,IAAMA,EACbO,EAAOa,MAAQA,EAEf,IAAA,IAAAI,EAAAC,EAAAA,EAA2BC,OAAOC,QAAQ1B,GAAQuB,EAAAC,EAAAtB,OAAAqB,IAAE,CAA/C,IAAAI,EAAAd,EAAAW,EAAAD,GAAA,GAAOK,EAAGD,EAAA,GAAEE,EAAKF,EAAA,GACpBrB,EAAOwB,aAAaF,EAAKG,OAAOF,GAClC,CAEAvB,EAAOwB,aAAajC,EAA8B,WAClDU,SAASyB,KAAKC,YAAY3B,GAE1B,IAAM4B,EAAS,WACb5B,EAAOwB,aAAajC,EAA8B,SAClDkB,EAAU,UAGNoB,EAAU,WACd7B,EAAOwB,aAAajC,EAA8B,SAClDkB,EAAU,UAMZ,OAHAT,EAAO8B,iBAAiB,OAAQF,GAChC5B,EAAO8B,iBAAiB,QAASD,GAE1B,WACDlB,GAAiBX,EAAO+B,SAC5B/B,EAAOgC,oBAAoB,OAAQJ,GACnC5B,EAAOgC,oBAAoB,QAASH,GAExC,GAAG,CAACpC,EAAKkB,IAEFH,CACT"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{b as o}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{b as o}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useStorage as e}from"../useStorage/useStorage.js";import"react";import"../../utils/helpers/isClient.js";import"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var r=function(r,t,s){return e(r,o({initialValue:t,storage:window.sessionStorage},s))};export{r as useSessionStorage};
|
|
3
3
|
//# sourceMappingURL=useSessionStorage.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as n}from"react";var r=function(r){var t=n(new Set(r)),u=e(t,2),i=u[0],f=u[1];return{value:i,size:i.size,has:function(e){return i.has(e)},add:function(e){return f((function(n){return new Set(n).add(e)}))},remove:function(e){return f((function(n){if(!n.has(e))return n;var r=new Set(n);return r.delete(e),r}))},clear:function(){return f(new Set)},reset:function(){return f(new Set(r))},toggle:function(e){return f((function(n){if(!n.has(e))return new Set(n).add(e);var r=new Set(n);return r.delete(e),r}))},union:function(e){return f(i.union(e))},difference:function(e){return f(i.difference(e))},symmetricDifference:function(e){return f(i.symmetricDifference(e))},intersection:function(e){return f(i.intersection(e))}}};export{r as useSet};
|
|
3
3
|
//# sourceMappingURL=useSet.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{d as r,e as a,b as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{d as r,e as a,b as e}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";var n=function(n){var t=navigator&&"share"in navigator,s=function(){var s=r(a().mark((function r(s){var i;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t){r.next=2;break}return r.abrupt("return");case 2:return(i=e(e({},n),s)).files&&navigator.canShare({files:i.files})&&navigator.share(i),r.abrupt("return",navigator.share(i));case 5:case"end":return r.stop()}}),r)})));return function(r){return s.apply(this,arguments)}}();return{share:s,supported:t}};export{n as useShare};
|
|
3
3
|
//# sourceMappingURL=useShare.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{c as t,_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{c as t,_ as r}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useRef as n,useState as e}from"react";var i=function(i){var u="object"===t(i)?i.max:i,o="object"===t(i)?i.initial:1,c=n(o>u||o<1?1:o),s=e(o),a=r(s,2),f=a[0],l=a[1],p=1===f,m=f===u;return{counts:u,currentStep:f,isFirst:p,isLast:m,next:function(){m||l((function(t){return t+1}))},back:function(){p||l((function(t){return t-1}))},reset:function(){return l(c.current)},set:function(t){return"first"===t?l(c.current):"last"===t||t>=u?l(u):t<=1?l(1):void l(t)}}};export{i as useStep};
|
|
3
3
|
//# sourceMappingURL=useStep.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as n,b as t}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as n,b as t}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as r,useEffect as o}from"react";import"../../utils/helpers/isClient.js";import{useEvent as e}from"../useEvent/useEvent.js";import"../../index-C0eyELV9.js";import"react-dom";var u=function(n){return n?{days:Math.floor(n/86400),hours:Math.floor(n%86400/3600),minutes:Math.floor(n%3600/60),seconds:Math.floor(n%60),count:n}:{days:0,hours:0,minutes:0,seconds:0,count:0}},s=function(){for(var s,i,c=arguments.length,a=new Array(c),l=0;l<c;l++)a[l]=arguments[l];var f=null!==(s="number"==typeof a[0]?a[0]:null===(i=a[0])||void 0===i?void 0:i.initialTime)&&void 0!==s?s:0,d="number"==typeof a[0]?a[1]:a[0],m=r(u(f)),p=n(m,2),v=p[0],h=p[1],y=r(!(null!=d&&d.enabled)),b=n(y,2),g=b[0],j=b[1],M=e((function(){var n=v.count+1;return n%60==0?h(t(t({},v),{},{minutes:v.minutes+1,seconds:0,count:n})):n%3600==0?h(t(t({},v),{},{hours:v.hours+1,minutes:0,seconds:0,count:n})):n%86400==0?h(t(t({},v),{},{days:v.days+1,hours:0,minutes:0,seconds:0,count:n})):void h(t(t({},v),{},{seconds:v.seconds+1,count:n}))}));return o((function(){if(!g){var n=setInterval((function(){return M()}),1e3);return function(){return clearInterval(n)}}}),[g]),t(t({},v),{},{paused:g,pause:function(){return j(!0)},start:function(){return j(!1)},reset:function(){return h(u(f))},toggle:function(){return j((function(n){return!n}))}})};export{s as useStopwatch};
|
|
3
3
|
//# sourceMappingURL=useStopwatch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStopwatch.js","sources":["../../../../src/hooks/useStopwatch/useStopwatch.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\
|
|
1
|
+
{"version":3,"file":"useStopwatch.js","sources":["../../../../src/hooks/useStopwatch/useStopwatch.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { useEvent } from '@/hooks';\n\nconst getStopwatchTime = (time: number) => {\n if (!time)\n return {\n days: 0,\n hours: 0,\n minutes: 0,\n seconds: 0,\n count: 0\n };\n\n const days = Math.floor(time / 86400);\n const hours = Math.floor((time % 86400) / 3600);\n const minutes = Math.floor((time % 3600) / 60);\n const seconds = Math.floor(time % 60);\n\n return { days, hours, minutes, seconds, count: time };\n};\n\n/** The use stopwatch return type */\nexport interface UseStopwatchReturn {\n /** The paused state of the stopwatch */\n paused: boolean;\n /** The over state of the stopwatch */\n over: boolean;\n /** The day count of the stopwatch */\n days: number;\n /** The hour count of the stopwatch */\n hours: number;\n /** The minute count of the stopwatch */\n minutes: number;\n /** The second count of the stopwatch */\n seconds: number;\n /** The total count of the stopwatch */\n count: number;\n /** The function to pause the stopwatch */\n pause: () => void;\n /** The function to start the stopwatch */\n start: () => void;\n /** The function to reset the stopwatch */\n reset: () => void;\n /** The function to toggle the stopwatch */\n toggle: () => void;\n}\n\n/** The use stopwatch options */\nexport interface UseStopwatchOptions {\n /** The enabled state of the timer */\n enabled?: boolean;\n}\n\ninterface UseStopwatch {\n (initialTime?: number, options?: UseStopwatchOptions): UseStopwatchReturn;\n (options?: UseStopwatchOptions & { initialTime?: number }): UseStopwatchReturn;\n}\n/**\n * @name useStopwatch\n * @description - Hook that creates a stopwatch functionality\n * @category Time\n *\n * @overload\n * @param {number} [initialTime=0] The initial time of the timer\n * @param {boolean} [options.enabled=true] The enabled state of the timer\n * @returns {UseStopwatchReturn} An object containing the current time and functions to interact with the timer\n *\n * @example\n * const { seconds, minutes, start, pause, reset } = useStopwatch(1000, { enabled: false });\n *\n * @overload\n * @param {number} [options.initialTime=0] -The initial time of the timer\n * @param {boolean} [options.enabled=true] The enabled state of the timer\n * @returns {UseStopwatchReturn} An object containing the current time and functions to interact with the timer\n *\n * @example\n * const { seconds, minutes, start, pause, reset } = useStopwatch({ initialTime: 1000, enabled: false });\n */\nexport const useStopwatch = ((...params: any[]) => {\n const initialTime =\n (typeof params[0] === 'number'\n ? (params[0] as number | undefined)\n : (params[0] as UseStopwatchOptions & { initialTime?: number })?.initialTime) ?? 0;\n\n const options =\n typeof params[0] === 'number'\n ? (params[1] as UseStopwatchOptions | undefined)\n : (params[0] as (UseStopwatchOptions & { initialTime?: number }) | undefined);\n\n const [time, setTime] = useState(getStopwatchTime(initialTime));\n const [paused, setPaused] = useState(!options?.enabled);\n\n const onInterval = useEvent(() => {\n const updatedCount = time.count + 1;\n\n if (updatedCount % 60 === 0) {\n return setTime({\n ...time,\n minutes: time.minutes + 1,\n seconds: 0,\n count: updatedCount\n });\n }\n\n if (updatedCount % (60 * 60) === 0) {\n return setTime({\n ...time,\n hours: time.hours + 1,\n minutes: 0,\n seconds: 0,\n count: updatedCount\n });\n }\n\n if (updatedCount % (60 * 60 * 24) === 0) {\n return setTime({\n ...time,\n days: time.days + 1,\n hours: 0,\n minutes: 0,\n seconds: 0,\n count: updatedCount\n });\n }\n\n setTime({\n ...time,\n seconds: time.seconds + 1,\n count: updatedCount\n });\n });\n\n useEffect(() => {\n if (paused) return;\n const interval = setInterval(() => onInterval(), 1000);\n return () => clearInterval(interval);\n }, [paused]);\n\n return {\n ...time,\n paused,\n pause: () => setPaused(true),\n start: () => setPaused(false),\n reset: () => setTime(getStopwatchTime(initialTime)),\n toggle: () => setPaused((prevPause) => !prevPause)\n };\n}) as UseStopwatch;\n"],"names":["getStopwatchTime","time","days","Math","floor","hours","minutes","seconds","count","useStopwatch","_ref","_params$","_len","arguments","length","params","Array","_key","initialTime","options","_useState","useState","_useState2","_slicedToArray","setTime","_useState3","enabled","_useState4","paused","setPaused","onInterval","useEvent","updatedCount","_objectSpread","useEffect","interval","setInterval","clearInterval","pause","start","reset","toggle","prevPause"],"mappings":";oQAIA,IAAMA,EAAmB,SAACC,GACxB,OAAKA,EAcE,CAAEC,KALIC,KAAKC,MAAMH,EAAO,OAKhBI,MAJDF,KAAKC,MAAOH,EAAO,MAAS,MAIpBK,QAHNH,KAAKC,MAAOH,EAAO,KAAQ,IAGZM,QAFfJ,KAAKC,MAAMH,EAAO,IAEMO,MAAOP,GAbtC,CACLC,KAAM,EACNG,MAAO,EACPC,QAAS,EACTC,QAAS,EACTC,MAAO,EASb,EA2DaC,EAAgB,WAAsB,IAAA,IAAAC,EAAAC,EAAAC,EAAAC,UAAAC,OAAlBC,EAAMC,IAAAA,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAANF,EAAME,GAAAJ,UAAAI,GACrC,IAAMC,EAG0ER,QAH/DA,EACO,iBAAdK,EAAO,GACVA,EAAO,WAAEJ,EACTI,EAAO,UAAE,IAAAJ,OAAA,EAAVA,EAA+DO,mBAAWR,IAAAA,EAAAA,EAAK,EAE/ES,EACiB,iBAAdJ,EAAO,GACTA,EAAO,GACPA,EAAO,GAEdK,EAAwBC,EAASrB,EAAiBkB,IAAaI,EAAAC,EAAAH,EAAA,GAAxDnB,EAAIqB,EAAA,GAAEE,EAAOF,EAAA,GACpBG,EAA4BJ,IAAUF,SAAAA,EAASO,UAAQC,EAAAJ,EAAAE,EAAA,GAAhDG,EAAMD,EAAA,GAAEE,EAASF,EAAA,GAElBG,EAAaC,GAAS,WAC1B,IAAMC,EAAe/B,EAAKO,MAAQ,EAElC,OAAIwB,EAAe,IAAO,EACjBR,EAAOS,EAAAA,KACThC,GAAI,GAAA,CACPK,QAASL,EAAKK,QAAU,EACxBC,QAAS,EACTC,MAAOwB,KAIPA,EAAgB,MAAa,EACxBR,EAAOS,EAAAA,KACThC,GAAI,GAAA,CACPI,MAAOJ,EAAKI,MAAQ,EACpBC,QAAS,EACTC,QAAS,EACTC,MAAOwB,KAIPA,EAAY,OAAsB,EAC7BR,EAAOS,EAAAA,KACThC,GAAI,GAAA,CACPC,KAAMD,EAAKC,KAAO,EAClBG,MAAO,EACPC,QAAS,EACTC,QAAS,EACTC,MAAOwB,UAIXR,EAAOS,EAAAA,KACFhC,GAAI,CAAA,EAAA,CACPM,QAASN,EAAKM,QAAU,EACxBC,MAAOwB,IAEX,IAQA,OANAE,GAAU,WACR,IAAIN,EAAJ,CACA,IAAMO,EAAWC,aAAY,WAAA,OAAMN,GAAY,GAAE,KACjD,OAAO,WAAA,OAAMO,cAAcF,EAAS,CAFxB,CAGd,GAAG,CAACP,IAEJK,EAAAA,EAAA,CAAA,EACKhC,GAAI,CAAA,EAAA,CACP2B,OAAAA,EACAU,MAAO,WAAA,OAAMT,GAAU,EAAK,EAC5BU,MAAO,WAAA,OAAMV,GAAU,EAAM,EAC7BW,MAAO,WAAA,OAAMhB,EAAQxB,EAAiBkB,GAAa,EACnDuB,OAAQ,WAAA,OAAMZ,GAAU,SAACa,GAAS,OAAMA,IAAU,GAEtD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{c as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{c as e}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useSyncExternalStore as n}from"react";import{isClient as r}from"../../utils/helpers/isClient.js";import{useIsomorphicLayoutEffect as t}from"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";var i=function(e){return window.dispatchEvent(new StorageEvent("storage",e))},o=function(e,n,r){var t=e.getItem(n);e.setItem(n,r),i({key:n,oldValue:t,newValue:r,storageArea:e})},u=function(e,n){var r=e.getItem(n);e.removeItem(n),i({key:n,oldValue:r,newValue:null,storageArea:e})},a=function(e,n){var r=e.getItem(n);if(r)return r},l=function(e){return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}},s=function(){},f=function(i,f){var c,v,d="object"===e(f)?f:void 0,m=d?null==d?void 0:d.initialValue:f,g=function(e){if(null===e)return u(w,i);o(w,i,I(e))},p=function(){return u(w,i)};if(!r)return{value:m instanceof Function?m():m,set:g,remove:p};var w=null!==(c=null==d?void 0:d.storage)&&void 0!==c?c:null===(v=window)||void 0===v?void 0:v.localStorage,I=function(e){return null!=d&&d.serializer?d.serializer(e):JSON.stringify(e)},y=n(l,(function(){return a(w,i)}),s);return t((function(){void 0===a(w,i)&&void 0!==m&&o(w,i,I(m instanceof Function?m():m))}),[i]),{value:y?function(e){if(null!=d&&d.deserializer)return d.deserializer(e);if("undefined"!==e)try{return JSON.parse(e)}catch(n){return e}}(y):void 0,set:g,remove:p}};export{i as dispatchStorageEvent,f as useStorage};
|
|
3
3
|
//# sourceMappingURL=useStorage.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as n,useEffect as t}from"react";import{isClient as r}from"../../utils/helpers/isClient.js";import{useRerender as o}from"../useRerender/useRerender.js";var u=function(e){var n,t=null!==(n=e.rangeCount)&&void 0!==n?n:0;return Array.from({length:t},(function(n,t){return e.getRangeAt(t)}))},i=function(){var i,l=o(),c=n(r?document.getSelection():null),a=e(c,2),s=a[0],m=a[1];t((function(){var e=function(){m(document.getSelection()),l.update()};return document.addEventListener("selectionchange",e),function(){return document.removeEventListener("selectionchange",e)}}),[]);var d=null!==(i=null==s?void 0:s.toString())&&void 0!==i?i:"",g=s?u(s):[],f=g.map((function(e){return e.getBoundingClientRect()}));return{text:d,ranges:g,rects:f,selection:s}};export{u as getRangesSelection,i as useTextSelection};
|
|
3
3
|
//# sourceMappingURL=useTextSelection.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as r}from"react";import"../../utils/helpers/isClient.js";import{getDate as t}from"../../utils/helpers/time/getDate.js";import{useInterval as s}from"../useInterval/useInterval.js";import"../useEvent/useEvent.js";var i=function(){var i=r(t()),o=e(i,2),l=o[0],n=o[1];return s((function(){return n(t())}),1e3),l};export{i as useTime};
|
|
3
3
|
//# sourceMappingURL=useTime.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as r}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as e,useRef as t,useEffect as n}from"react";import{useEvent as u}from"../useEvent/useEvent.js";function o(o,c){var i=e(!1),m=r(i,2),a=m[0],f=m[1],l=t(),s=u(o);n((function(){return l.current=setTimeout((function(){s(),f(!0)}),c),function(){clearTimeout(l.current)}}),[c]);return{ready:a,clear:function(){clearTimeout(l.current),f(!0)}}}export{o as useTimeout};
|
|
3
3
|
//# sourceMappingURL=useTimeout.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as t,b as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as t,b as r}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as n}from"react";import{useInterval as e}from"../useInterval/useInterval.js";import"../useEvent/useEvent.js";var o=function(t){var r=Math.ceil(t),n=Math.floor(r/86400),e=Math.floor(r%86400/3600),o=Math.floor(r%3600/60);return{seconds:Math.floor(r%60),minutes:o,hours:e,days:n}},l=function(l,a,u){var i,s=null===(i=null==u?void 0:u.autostart)||void 0===i||i,c=n(Math.ceil(l/1e3)),f=t(c,2),v=f[0],h=f[1],m=n(s),p=t(m,2),M=p[0],d=p[1];return e((function(){var t,r=v-1;null==u||null===(t=u.onTick)||void 0===t||t.call(u,v),h(r),0===r&&(d(!1),a())}),1e3,{enabled:M}),r(r({},o(v)),{},{pause:function(){return d(!1)},toggle:function(){return d(!M)},start:function(){d(!0),h(Math.ceil(l/1e3))},restart:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];h(Math.ceil(t/1e3)),d(r)},running:M})};export{o as getTimeFromSeconds,l as useTimer};
|
|
3
3
|
//# sourceMappingURL=useTimer.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as r}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useReducer as n}from"react";var t=function(){var t=n((function(r,n){var t=n instanceof Function?n(r[0]):n,e=Math.abs(r.indexOf(t));return r.slice(e).concat(r.slice(0,e))}),arguments.length>0&&void 0!==arguments[0]?arguments[0]:[!1,!0]),e=r(t,2);return[r(e[0],1)[0],e[1]]};export{t as useToggle};
|
|
3
3
|
//# sourceMappingURL=useToggle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToggle.js","sources":["../../../../src/hooks/useToggle/useToggle.ts"],"sourcesContent":["import type { SetStateAction } from 'react';\
|
|
1
|
+
{"version":3,"file":"useToggle.js","sources":["../../../../src/hooks/useToggle/useToggle.ts"],"sourcesContent":["import type { SetStateAction } from 'react';\nimport { useReducer } from 'react';\n\n/** The use toggle return type */\nexport type UseToggleReturn<Value> = readonly [Value, (value?: Value) => void];\n\n/**\n * @name useToggle\n * @description - Hook that create toggle\n * @category Utilities\n *\n * @template Value The type of the value\n * @param {Value[]} [values=[false, true]] The values to toggle\n *\n * @example\n * const [on, toggle] = useToggle();\n *\n * @example\n * const [value, toggle] = useToggle(['light', 'dark'] as const);\n */\nexport const useToggle = <Value = boolean>(values: readonly Value[] = [false, true] as any) => {\n const [[option], toggle] = useReducer((state: Value[], action: SetStateAction<Value>) => {\n const value = action instanceof Function ? action(state[0]) : action;\n const index = Math.abs(state.indexOf(value));\n return state.slice(index).concat(state.slice(0, index));\n }, values as Value[]);\n\n return [option, toggle as (value?: SetStateAction<Value>) => void] as const;\n};\n"],"names":["useToggle","_useReducer","useReducer","state","action","value","Function","index","Math","abs","indexOf","slice","concat","arguments","length","undefined","_useReducer2","_slicedToArray"],"mappings":";uGAoBaA,EAAY,WAAsE,IAC7FC,EAA2BC,GAAW,SAACC,EAAgBC,GACrD,IAAMC,EAAQD,aAAkBE,SAAWF,EAAOD,EAAM,IAAMC,EACxDG,EAAQC,KAAKC,IAAIN,EAAMO,QAAQL,IACrC,OAAOF,EAAMQ,MAAMJ,GAAOK,OAAOT,EAAMQ,MAAM,EAAGJ,GACjD,GALgEM,UAAAC,eAAAC,IAAAF,UAAA,GAAAA,UAAG,GAAA,EAAC,GAAO,IAKvDG,EAAAC,EAAAhB,EAAA,GAErB,MAAO,CAFcgB,EAAAD,EAAA,GAAA,GAJP,GAASA,EAAA,GAOzB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
2
|
import{useRef as r,useEffect as n}from"react";var t=function(t){var c=r(t);c.current=t,n((function(){return function(){c.current()}}),[])};export{t as useUnmount};
|
|
3
3
|
//# sourceMappingURL=useUnmount.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as n}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as n}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useRef as r,useState as e,useEffect as o}from"react";import{getRetry as t}from"../../utils/helpers/getRetry.js";import"../../utils/helpers/isClient.js";import{useEvent as l}from"../useEvent/useEvent.js";var u=function(u,c){var i=r(),s=r(null!=c&&c.retry?t(c.retry):0),v=r(!1),a=e("connecting"),d=n(a,2),f=d[0],p=d[1],m=l((function(){i.current=new WebSocket("function"==typeof u?u():u,null==c?void 0:c.protocols),p("connecting");var n=i.current;n&&(n.onopen=function(){var r;p("connected"),null==c||null===(r=c.onConnected)||void 0===r||r.call(c,n)},n.onerror=function(r){var e;p("failed"),null==c||null===(e=c.onError)||void 0===e||e.call(c,r,n)},n.onmessage=function(r){var e;return null==c||null===(e=c.onMessage)||void 0===e?void 0:e.call(c,r,n)},n.onclose=function(r){var e;if(p("disconnected"),null==c||null===(e=c.onDisconnected)||void 0===e||e.call(c,r,n),!v.current)return s.current>0?(s.current-=1,m()):void(s.current=null!=c&&c.retry?t(c.retry):0)})}));o((function(){return m(),function(){i.current&&(i.current.close(),i.current=void 0)}}),[u]);return{client:i.current,close:function(){var n;v.current=!0,null===(n=i.current)||void 0===n||n.close()},open:function(){v.current=!1,m()},send:function(n){var r;return null===(r=i.current)||void 0===r?void 0:r.send(n)},status:f}};export{u as useWebSocket};
|
|
3
3
|
//# sourceMappingURL=useWebSocket.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{useEventListener as e}from"../useEventListener/useEventListener.js";import"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{useEventListener as e}from"../useEventListener/useEventListener.js";import"../../_rollupPluginBabelHelpers-DKveiPYY.js";import"react";import"../../utils/helpers/getElement.js";import"../../utils/helpers/isClient.js";import"../useEvent/useEvent.js";var t=function(t,r,s){return e(window,t,r,s)};export{t as useWindowEvent};
|
|
3
3
|
//# sourceMappingURL=useWindowEvent.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as n}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as r,useEffect as e}from"react";var t=function(){var t=r(!1),o=n(t,2),i=o[0],u=o[1];return e((function(){var n=function(){return u(!0)},r=function(){return u(!1)};return window.addEventListener("focus",n),window.addEventListener("blur",r),function(){window.removeEventListener("focus",n),window.removeEventListener("blur",r)}})),i};export{t as useWindowFocus};
|
|
3
|
+
//# sourceMappingURL=useWindowFocus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWindowFocus.js","sources":["../../../../src/hooks/useWindowFocus/useWindowFocus.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\n/**\n * @name useWindowFocus\n * @description - Hook that provides the current focus state of the window\n * @category Elements\n *\n * @returns {boolean} The current focus state of the window\n *\n * @example\n * const focused = useWindowFocus();\n */\nexport const useWindowFocus = () => {\n const [focused, setFocused] = useState(false);\n\n useEffect(() => {\n const onFocus = () => setFocused(true);\n const onBlur = () => setFocused(false);\n\n window.addEventListener('focus', onFocus);\n window.addEventListener('blur', onBlur);\n\n return () => {\n window.removeEventListener('focus', onFocus);\n window.removeEventListener('blur', onBlur);\n };\n });\n\n return focused;\n};\n"],"names":["useWindowFocus","_useState","useState","_useState2","_slicedToArray","focused","setFocused","useEffect","onFocus","onBlur","window","addEventListener","removeEventListener"],"mappings":";oHAYaA,EAAiB,WAC5B,IAAAC,EAA8BC,GAAS,GAAMC,EAAAC,EAAAH,EAAA,GAAtCI,EAAOF,EAAA,GAAEG,EAAUH,EAAA,GAe1B,OAbAI,GAAU,WACR,IAAMC,EAAU,WAAH,OAASF,GAAW,EAAK,EAChCG,EAAS,WAAH,OAASH,GAAW,EAAM,EAKtC,OAHAI,OAAOC,iBAAiB,QAASH,GACjCE,OAAOC,iBAAiB,OAAQF,GAEzB,WACLC,OAAOE,oBAAoB,QAASJ,GACpCE,OAAOE,oBAAoB,OAAQH,GAEvC,IAEOJ,CACT"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as r}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as o,useEffect as e}from"react";import{isClient as n}from"../../utils/helpers/isClient.js";var i=function(r){var o=r.x,e=r.y,n=r.behavior,i={behavior:void 0===n?"smooth":n};"number"==typeof o&&(i.left=o),"number"==typeof e&&(i.top=e),window.scrollTo(i)},t=function(){var t=o({x:n?window.scrollX:Number.POSITIVE_INFINITY,y:n?window.scrollY:Number.POSITIVE_INFINITY}),l=r(t,2),s=l[0],w=l[1];return e((function(){var r=function(){return w({x:window.scrollX,y:window.scrollY})};return window.addEventListener("scroll",r),window.addEventListener("resize",r),function(){window.removeEventListener("scroll",r),window.removeEventListener("resize",r)}}),[]),{value:s,scrollTo:i}};export{i as scrollTo,t as useWindowScroll};
|
|
3
3
|
//# sourceMappingURL=useWindowScroll.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as n,useEffect as i}from"react";import{isClient as t}from"../../utils/helpers/isClient.js";var o=function(o){var r,d=null===(r=null==o?void 0:o.includeScrollbar)||void 0===r||r,l=n((function(){return t?{width:d?window.innerWidth:window.document.documentElement.clientWidth,height:d?window.innerHeight:window.document.documentElement.clientHeight}:{width:Number.POSITIVE_INFINITY,height:Number.POSITIVE_INFINITY}})),u=e(l,2),w=u[0],c=u[1];return i((function(){var e=function(){c(d?{width:window.innerWidth,height:window.innerHeight}:{width:window.document.documentElement.clientWidth,height:window.document.documentElement.clientHeight})};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[null==o?void 0:o.includeScrollbar]),w};export{o as useWindowSize};
|
|
3
3
|
//# sourceMappingURL=useWindowSize.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWindowSize.js","sources":["../../../../src/hooks/useWindowSize/useWindowSize.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\
|
|
1
|
+
{"version":3,"file":"useWindowSize.js","sources":["../../../../src/hooks/useWindowSize/useWindowSize.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { isClient } from '@/utils/helpers';\n\n/** The use window size return type */\ninterface UseWindowSizeParams {\n /** Whether to include the scrollbar in the window size calculation */\n includeScrollbar?: boolean;\n}\n\n/** The use window size return type */\nexport interface UseWindowSizeReturn {\n /** The current window width */\n width: number;\n /** The current window height */\n height: number;\n}\n\n/**\n * @name useWindowSize\n * @description - Hook that manages a window size\n * @category Elements\n *\n * @param {number} [params.initialWidth=Number.POSITIVE_INFINITY] The initial window width\n * @param {number} [params.initialHeight=Number.POSITIVE_INFINITY] The initial window height\n * @returns {UseWindowSizeReturn} An object containing the current window width and height\n *\n * @example\n * const { width, height } = useWindowSize();\n */\nexport const useWindowSize = (params?: UseWindowSizeParams) => {\n const includeScrollbar = params?.includeScrollbar ?? true;\n const [size, setSize] = useState(() => {\n if (!isClient) {\n return {\n width: Number.POSITIVE_INFINITY,\n height: Number.POSITIVE_INFINITY\n };\n }\n\n return {\n width: includeScrollbar ? window.innerWidth : window.document.documentElement.clientWidth,\n height: includeScrollbar ? window.innerHeight : window.document.documentElement.clientHeight\n };\n });\n\n useEffect(() => {\n const onResize = () => {\n if (includeScrollbar) {\n setSize({\n width: window.innerWidth,\n height: window.innerHeight\n });\n } else {\n setSize({\n width: window.document.documentElement.clientWidth,\n height: window.document.documentElement.clientHeight\n });\n }\n };\n\n window.addEventListener('resize', onResize);\n return () => {\n window.removeEventListener('resize', onResize);\n };\n }, [params?.includeScrollbar]);\n\n return size;\n};\n"],"names":["useWindowSize","params","_params$includeScroll","includeScrollbar","_useState","useState","isClient","width","window","innerWidth","document","documentElement","clientWidth","height","innerHeight","clientHeight","Number","POSITIVE_INFINITY","_useState2","_slicedToArray","size","setSize","useEffect","onResize","addEventListener","removeEventListener"],"mappings":";+KA8BaA,EAAgB,SAACC,GAAiC,IAAAC,EACvDC,EAA2CD,QAA3BA,EAAGD,aAAM,EAANA,EAAQE,wBAAgBD,IAAAA,GAAAA,EACjDE,EAAwBC,GAAS,WAC/B,OAAKC,EAOE,CACLC,MAAOJ,EAAmBK,OAAOC,WAAaD,OAAOE,SAASC,gBAAgBC,YAC9EC,OAAQV,EAAmBK,OAAOM,YAAcN,OAAOE,SAASC,gBAAgBI,cARzE,CACLR,MAAOS,OAAOC,kBACdJ,OAAQG,OAAOC,kBAQrB,IAAEC,EAAAC,EAAAf,EAAA,GAZKgB,EAAIF,EAAA,GAAEG,EAAOH,EAAA,GAmCpB,OArBAI,GAAU,WACR,IAAMC,EAAW,WAEbF,EADElB,EACM,CACNI,MAAOC,OAAOC,WACdI,OAAQL,OAAOM,aAGT,CACNP,MAAOC,OAAOE,SAASC,gBAAgBC,YACvCC,OAAQL,OAAOE,SAASC,gBAAgBI,gBAM9C,OADAP,OAAOgB,iBAAiB,SAAUD,GAC3B,WACLf,OAAOiB,oBAAoB,SAAUF,MAEtC,CAACtB,eAAAA,EAAQE,mBAELiB,CACT"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as n,a as o}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as n,a as o}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as t}from"react";var r=function(r,e){var c=null!=e?e:r[0].id,i=new Map(r.map((function(n){return[n.id,n]}))),l=t(c),a=n(l,2),u=a[0],f=a[1],s=t([c]),d=n(s,2),v=d[0],g=d[1];return{currentStepId:u,set:function(n){var t;if(null===(t=i.get(u))||void 0===t||null===(t=t.nodes)||void 0===t||!t.includes(n))throw new Error("Can't go to ".concat(n," from ").concat(u));g([].concat(o(v),[n])),f(n)},reset:function(){f(c),g([c])},back:function(){var n;if(1!==v.length){var o=v[v.length-2];if(null===(n=i.get(u))||void 0===n||null===(n=n.nodes)||void 0===n||!n.includes(o))throw new Error("Can't go to ".concat(o," from ").concat(u));g(v.slice(0,-1)),f(v[v.length-2])}},history:v}};export{r as useWizard};
|
|
3
3
|
//# sourceMappingURL=useWizard.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
2
|
const e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=(()=>{if("undefined"==typeof document)return!1;const n=e[0],l={};for(const r of e){const e=r?.[1];if(e in document){for(const[e,c]of r.entries())l[n[e]]=c;return l}}return!1})(),l={change:n.fullscreenchange,error:n.fullscreenerror};let r={request:(e=document.documentElement,l)=>new Promise(((c,t)=>{const s=()=>{r.off("change",s),c()};r.on("change",s);const o=e[n.requestFullscreen](l);o instanceof Promise&&o.then(s).catch(t)})),exit:()=>new Promise(((e,l)=>{if(!r.isFullscreen)return void e();const c=()=>{r.off("change",c),e()};r.on("change",c);const t=document[n.exitFullscreen]();t instanceof Promise&&t.then(c).catch(l)})),toggle:(e,n)=>r.isFullscreen?r.exit():r.request(e,n),onchange(e){r.on("change",e)},onerror(e){r.on("error",e)},on(e,n){const r=l[e];r&&document.addEventListener(r,n,!1)},off(e,n){const r=l[e];r&&document.removeEventListener(r,n,!1)},raw:n};Object.defineProperties(r,{isFullscreen:{get:()=>Boolean(document[n.fullscreenElement])},element:{enumerable:!0,get:()=>document[n.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[n.fullscreenEnabled])}}),n||(r={isEnabled:!1});var c=r;export{c as s};
|
|
3
|
-
//# sourceMappingURL=index-
|
|
3
|
+
//# sourceMappingURL=index-C0eyELV9.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-C0eyELV9.js","sources":["../../node_modules/screenfull/index.js"],"sourcesContent":["/* eslint-disable promise/prefer-await-to-then */\n\nconst methodMap = [\n\t[\n\t\t'requestFullscreen',\n\t\t'exitFullscreen',\n\t\t'fullscreenElement',\n\t\t'fullscreenEnabled',\n\t\t'fullscreenchange',\n\t\t'fullscreenerror',\n\t],\n\t// New WebKit\n\t[\n\t\t'webkitRequestFullscreen',\n\t\t'webkitExitFullscreen',\n\t\t'webkitFullscreenElement',\n\t\t'webkitFullscreenEnabled',\n\t\t'webkitfullscreenchange',\n\t\t'webkitfullscreenerror',\n\n\t],\n\t// Old WebKit\n\t[\n\t\t'webkitRequestFullScreen',\n\t\t'webkitCancelFullScreen',\n\t\t'webkitCurrentFullScreenElement',\n\t\t'webkitCancelFullScreen',\n\t\t'webkitfullscreenchange',\n\t\t'webkitfullscreenerror',\n\n\t],\n\t[\n\t\t'mozRequestFullScreen',\n\t\t'mozCancelFullScreen',\n\t\t'mozFullScreenElement',\n\t\t'mozFullScreenEnabled',\n\t\t'mozfullscreenchange',\n\t\t'mozfullscreenerror',\n\t],\n\t[\n\t\t'msRequestFullscreen',\n\t\t'msExitFullscreen',\n\t\t'msFullscreenElement',\n\t\t'msFullscreenEnabled',\n\t\t'MSFullscreenChange',\n\t\t'MSFullscreenError',\n\t],\n];\n\nconst nativeAPI = (() => {\n\tif (typeof document === 'undefined') {\n\t\treturn false;\n\t}\n\n\tconst unprefixedMethods = methodMap[0];\n\tconst returnValue = {};\n\n\tfor (const methodList of methodMap) {\n\t\tconst exitFullscreenMethod = methodList?.[1];\n\t\tif (exitFullscreenMethod in document) {\n\t\t\tfor (const [index, method] of methodList.entries()) {\n\t\t\t\treturnValue[unprefixedMethods[index]] = method;\n\t\t\t}\n\n\t\t\treturn returnValue;\n\t\t}\n\t}\n\n\treturn false;\n})();\n\nconst eventNameMap = {\n\tchange: nativeAPI.fullscreenchange,\n\terror: nativeAPI.fullscreenerror,\n};\n\n// eslint-disable-next-line import/no-mutable-exports\nlet screenfull = {\n\t// eslint-disable-next-line default-param-last\n\trequest(element = document.documentElement, options) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst onFullScreenEntered = () => {\n\t\t\t\tscreenfull.off('change', onFullScreenEntered);\n\t\t\t\tresolve();\n\t\t\t};\n\n\t\t\tscreenfull.on('change', onFullScreenEntered);\n\n\t\t\tconst returnPromise = element[nativeAPI.requestFullscreen](options);\n\n\t\t\tif (returnPromise instanceof Promise) {\n\t\t\t\treturnPromise.then(onFullScreenEntered).catch(reject);\n\t\t\t}\n\t\t});\n\t},\n\texit() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (!screenfull.isFullscreen) {\n\t\t\t\tresolve();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst onFullScreenExit = () => {\n\t\t\t\tscreenfull.off('change', onFullScreenExit);\n\t\t\t\tresolve();\n\t\t\t};\n\n\t\t\tscreenfull.on('change', onFullScreenExit);\n\n\t\t\tconst returnPromise = document[nativeAPI.exitFullscreen]();\n\n\t\t\tif (returnPromise instanceof Promise) {\n\t\t\t\treturnPromise.then(onFullScreenExit).catch(reject);\n\t\t\t}\n\t\t});\n\t},\n\ttoggle(element, options) {\n\t\treturn screenfull.isFullscreen ? screenfull.exit() : screenfull.request(element, options);\n\t},\n\tonchange(callback) {\n\t\tscreenfull.on('change', callback);\n\t},\n\tonerror(callback) {\n\t\tscreenfull.on('error', callback);\n\t},\n\ton(event, callback) {\n\t\tconst eventName = eventNameMap[event];\n\t\tif (eventName) {\n\t\t\tdocument.addEventListener(eventName, callback, false);\n\t\t}\n\t},\n\toff(event, callback) {\n\t\tconst eventName = eventNameMap[event];\n\t\tif (eventName) {\n\t\t\tdocument.removeEventListener(eventName, callback, false);\n\t\t}\n\t},\n\traw: nativeAPI,\n};\n\nObject.defineProperties(screenfull, {\n\tisFullscreen: {\n\t\tget: () => Boolean(document[nativeAPI.fullscreenElement]),\n\t},\n\telement: {\n\t\tenumerable: true,\n\t\tget: () => document[nativeAPI.fullscreenElement] ?? undefined,\n\t},\n\tisEnabled: {\n\t\tenumerable: true,\n\t\t// Coerce to boolean in case of old WebKit.\n\t\tget: () => Boolean(document[nativeAPI.fullscreenEnabled]),\n\t},\n});\n\nif (!nativeAPI) {\n\tscreenfull = {isEnabled: false};\n}\n\nexport default screenfull;\n"],"names":["methodMap","nativeAPI","document","unprefixedMethods","returnValue","methodList","exitFullscreenMethod","index","method","entries","eventNameMap","change","fullscreenchange","error","fullscreenerror","screenfull","request","element","documentElement","options","Promise","resolve","reject","onFullScreenEntered","off","on","returnPromise","requestFullscreen","then","catch","exit","isFullscreen","onFullScreenExit","exitFullscreen","toggle","onchange","callback","onerror","event","eventName","addEventListener","removeEventListener","raw","Object","defineProperties","get","Boolean","fullscreenElement","enumerable","undefined","isEnabled","fullscreenEnabled","screenfull$1"],"mappings":";AAEA,MAAMA,EAAY,CACjB,CACC,oBACA,iBACA,oBACA,oBACA,mBACA,mBAGD,CACC,0BACA,uBACA,0BACA,0BACA,yBACA,yBAID,CACC,0BACA,yBACA,iCACA,yBACA,yBACA,yBAGD,CACC,uBACA,sBACA,uBACA,uBACA,sBACA,sBAED,CACC,sBACA,mBACA,sBACA,sBACA,qBACA,sBAIIC,EAAY,MACjB,GAAwB,oBAAbC,SACV,OAAO,EAGR,MAAMC,EAAoBH,EAAU,GAC9BI,EAAc,CAAA,EAEpB,IAAK,MAAMC,KAAcL,EAAW,CACnC,MAAMM,EAAuBD,IAAa,GAC1C,GAAIC,KAAwBJ,SAAU,CACrC,IAAK,MAAOK,EAAOC,KAAWH,EAAWI,UACxCL,EAAYD,EAAkBI,IAAUC,EAGzC,OAAOJ,CACP,CACD,CAED,OAAO,CACP,EApBiB,GAsBZM,EAAe,CACpBC,OAAQV,EAAUW,iBAClBC,MAAOZ,EAAUa,iBAIlB,IAAIC,EAAa,CAEhBC,QAAO,CAACC,EAAUf,SAASgB,gBAAiBC,IACpC,IAAIC,SAAQ,CAACC,EAASC,KAC5B,MAAMC,EAAsB,KAC3BR,EAAWS,IAAI,SAAUD,GACzBF,GAAS,EAGVN,EAAWU,GAAG,SAAUF,GAExB,MAAMG,EAAgBT,EAAQhB,EAAU0B,mBAAmBR,GAEvDO,aAAyBN,SAC5BM,EAAcE,KAAKL,GAAqBM,MAAMP,EAC9C,IAGHQ,KAAI,IACI,IAAIV,SAAQ,CAACC,EAASC,KAC5B,IAAKP,EAAWgB,aAEf,YADAV,IAID,MAAMW,EAAmB,KACxBjB,EAAWS,IAAI,SAAUQ,GACzBX,GAAS,EAGVN,EAAWU,GAAG,SAAUO,GAExB,MAAMN,EAAgBxB,SAASD,EAAUgC,kBAErCP,aAAyBN,SAC5BM,EAAcE,KAAKI,GAAkBH,MAAMP,EAC3C,IAGHY,OAAM,CAACjB,EAASE,IACRJ,EAAWgB,aAAehB,EAAWe,OAASf,EAAWC,QAAQC,EAASE,GAElF,QAAAgB,CAASC,GACRrB,EAAWU,GAAG,SAAUW,EACxB,EACD,OAAAC,CAAQD,GACPrB,EAAWU,GAAG,QAASW,EACvB,EACD,EAAAX,CAAGa,EAAOF,GACT,MAAMG,EAAY7B,EAAa4B,GAC3BC,GACHrC,SAASsC,iBAAiBD,EAAWH,GAAU,EAEhD,EACD,GAAAZ,CAAIc,EAAOF,GACV,MAAMG,EAAY7B,EAAa4B,GAC3BC,GACHrC,SAASuC,oBAAoBF,EAAWH,GAAU,EAEnD,EACDM,IAAKzC,GAGN0C,OAAOC,iBAAiB7B,EAAY,CACnCgB,aAAc,CACbc,IAAK,IAAMC,QAAQ5C,SAASD,EAAU8C,qBAEvC9B,QAAS,CACR+B,YAAY,EACZH,IAAK,IAAM3C,SAASD,EAAU8C,yBAAsBE,GAErDC,UAAW,CACVF,YAAY,EAEZH,IAAK,IAAMC,QAAQ5C,SAASD,EAAUkD,uBAInClD,IACJc,EAAa,CAACmC,WAAW,IAG1B,IAAAE,EAAerC","x_google_ignoreList":[0]}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
export{useAsync}from"./hooks/useAsync/useAsync.js";export{useBattery}from"./hooks/useBattery/useBattery.js";export{useBoolean}from"./hooks/useBoolean/useBoolean.js";export{useBreakpoints}from"./hooks/useBreakpoints/useBreakpoints.js";export{useBrowserLanguage}from"./hooks/useBrowserLanguage/useBrowserLanguage.js";export{useClickOutside}from"./hooks/useClickOutside/useClickOutside.js";export{isPermissionAllowed,legacyCopyToClipboard,useClipboard}from"./hooks/useClipboard/useClipboard.js";export{useCounter}from"./hooks/useCounter/useCounter.js";export{useCssVar}from"./hooks/useCssVar/useCssVar.js";export{useDebounceCallback}from"./hooks/useDebounceCallback/useDebounceCallback.js";export{useDebounceValue}from"./hooks/useDebounceValue/useDebounceValue.js";export{useDefault}from"./hooks/useDefault/useDefault.js";export{useDeviceMotion}from"./hooks/useDeviceMotion/useDeviceMotion.js";export{useDeviceOrientation}from"./hooks/useDeviceOrientation/useDeviceOrientation.js";export{useDidUpdate}from"./hooks/useDidUpdate/useDidUpdate.js";export{useDisclosure}from"./hooks/useDisclosure/useDisclosure.js";export{useDocumentEvent}from"./hooks/useDocumentEvent/useDocumentEvent.js";export{useDocumentTitle}from"./hooks/useDocumentTitle/useDocumentTitle.js";export{useDocumentVisibility}from"./hooks/useDocumentVisibility/useDocumentVisibility.js";export{useEvent}from"./hooks/useEvent/useEvent.js";export{useEventListener}from"./hooks/useEventListener/useEventListener.js";export{useEyeDropper}from"./hooks/useEyeDropper/useEyeDropper.js";export{useFavicon}from"./hooks/useFavicon/useFavicon.js";export{useField}from"./hooks/useField/useField.js";export{useFileDialog}from"./hooks/useFileDialog/useFileDialog.js";export{useFocus}from"./hooks/useFocus/useFocus.js";export{useFps}from"./hooks/useFps/useFps.js";export{useFullscreen}from"./hooks/useFullscreen/useFullscreen.js";export{useGamepad}from"./hooks/useGamepad/useGamepad.js";export{useGeolocation}from"./hooks/useGeolocation/useGeolocation.js";export{useHash}from"./hooks/useHash/useHash.js";export{isHotkeyMatch,useHotkeys}from"./hooks/useHotkeys/useHotkeys.js";export{useHover}from"./hooks/useHover/useHover.js";export{useIdle}from"./hooks/useIdle/useIdle.js";export{useImage}from"./hooks/useImage/useImage.js";export{useInfiniteScroll}from"./hooks/useInfiniteScroll/useInfiniteScroll.js";export{useIntersectionObserver}from"./hooks/useIntersectionObserver/useIntersectionObserver.js";export{useInterval}from"./hooks/useInterval/useInterval.js";export{useIsFirstRender}from"./hooks/useIsFirstRender/useIsFirstRender.js";export{useIsomorphicLayoutEffect}from"./hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";export{useKeyboard}from"./hooks/useKeyboard/useKeyboard.js";export{useKeyPress}from"./hooks/useKeyPress/useKeyPress.js";export{useKeyPressEvent}from"./hooks/useKeyPressEvent/useKeyPressEvent.js";export{useKeysPressed}from"./hooks/useKeysPressed/useKeysPressed.js";export{useLastChanged}from"./hooks/useLastChanged/useLastChanged.js";export{useList}from"./hooks/useList/useList.js";export{useLocalStorage}from"./hooks/useLocalStorage/useLocalStorage.js";export{useLogger}from"./hooks/useLogger/useLogger.js";export{useLongPress}from"./hooks/useLongPress/useLongPress.js";export{useMap}from"./hooks/useMap/useMap.js";export{useMeasure}from"./hooks/useMeasure/useMeasure.js";export{useMediaQuery}from"./hooks/useMediaQuery/useMediaQuery.js";export{useMemory}from"./hooks/useMemory/useMemory.js";export{useMount}from"./hooks/useMount/useMount.js";export{useMouse}from"./hooks/useMouse/useMouse.js";export{useMutation}from"./hooks/useMutation/useMutation.js";export{useMutationObserver}from"./hooks/useMutationObserver/useMutationObserver.js";export{getConnection,useNetwork}from"./hooks/useNetwork/useNetwork.js";export{useOffsetPagination}from"./hooks/useOffsetPagination/useOffsetPagination.js";export{useOnline}from"./hooks/useOnline/useOnline.js";export{getOperatingSystem,useOperatingSystem}from"./hooks/useOperatingSystem/useOperatingSystem.js";export{useOptimistic}from"./hooks/useOptimistic/useOptimistic.js";export{useOrientation}from"./hooks/useOrientation/useOrientation.js";export{useOtpCredential}from"./hooks/useOtpCredential/useOtpCredential.js";export{usePageLeave}from"./hooks/usePageLeave/usePageLeave.js";export{usePaint}from"./hooks/usePaint/usePaint.js";export{useParallax}from"./hooks/useParallax/useParallax.js";export{usePermission}from"./hooks/usePermission/usePermission.js";export{usePreferredColorScheme}from"./hooks/usePreferredColorScheme/usePreferredColorScheme.js";export{usePreferredContrast}from"./hooks/usePreferredContrast/usePreferredContrast.js";export{usePreferredDark}from"./hooks/usePreferredDark/usePreferredDark.js";export{usePreferredLanguages}from"./hooks/usePreferredLanguages/usePreferredLanguages.js";export{usePreferredReducedMotion}from"./hooks/usePreferredReducedMotion/usePreferredReducedMotion.js";export{usePrevious}from"./hooks/usePrevious/usePrevious.js";export{useQuery}from"./hooks/useQuery/useQuery.js";export{useQueue}from"./hooks/useQueue/useQueue.js";export{useRaf}from"./hooks/useRaf/useRaf.js";export{useRafValue}from"./hooks/useRafValue/useRafValue.js";export{useRenderCount}from"./hooks/useRenderCount/useRenderCount.js";export{useRenderInfo}from"./hooks/useRenderInfo/useRenderInfo.js";export{useRerender}from"./hooks/useRerender/useRerender.js";export{useResizeObserver}from"./hooks/useResizeObserver/useResizeObserver.js";export{useScreenOrientation}from"./hooks/useScreenOrientation/useScreenOrientation.js";export{SCRIPT_STATUS_ATTRIBUTE_NAME,useScript}from"./hooks/useScript/useScript.js";export{useSessionStorage}from"./hooks/useSessionStorage/useSessionStorage.js";export{useSet}from"./hooks/useSet/useSet.js";export{useShare}from"./hooks/useShare/useShare.js";export{useStep}from"./hooks/useStep/useStep.js";export{useStopwatch}from"./hooks/useStopwatch/useStopwatch.js";export{dispatchStorageEvent,useStorage}from"./hooks/useStorage/useStorage.js";export{getRangesSelection,useTextSelection}from"./hooks/useTextSelection/useTextSelection.js";export{useTime}from"./hooks/useTime/useTime.js";export{useTimeout}from"./hooks/useTimeout/useTimeout.js";export{getTimeFromSeconds,useTimer}from"./hooks/useTimer/useTimer.js";export{useToggle}from"./hooks/useToggle/useToggle.js";export{useUnmount}from"./hooks/useUnmount/useUnmount.js";export{useWebSocket}from"./hooks/useWebSocket/useWebSocket.js";export{useWindowEvent}from"./hooks/useWindowEvent/useWindowEvent.js";export{scrollTo,useWindowScroll}from"./hooks/useWindowScroll/useWindowScroll.js";export{useWindowSize}from"./hooks/useWindowSize/useWindowSize.js";export{useWizard}from"./hooks/useWizard/useWizard.js";export{debounce}from"./utils/helpers/debounce.js";export{getElement}from"./utils/helpers/getElement.js";export{getRetry}from"./utils/helpers/getRetry.js";export{isClient}from"./utils/helpers/isClient.js";export{throttle}from"./utils/helpers/throttle.js";export{getDate}from"./utils/helpers/time/getDate.js";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}from"./hooks/useBreakpoints/constants/breakpoints.js";export{mapGamepadToXbox360Controller}from"./hooks/useGamepad/helpers/mapGamepadToXbox360Controller.js";import"./_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
export{useActiveElement}from"./hooks/useActiveElement/useActiveElement.js";export{useAsync}from"./hooks/useAsync/useAsync.js";export{useBattery}from"./hooks/useBattery/useBattery.js";export{useBoolean}from"./hooks/useBoolean/useBoolean.js";export{useBreakpoints}from"./hooks/useBreakpoints/useBreakpoints.js";export{useBrowserLanguage}from"./hooks/useBrowserLanguage/useBrowserLanguage.js";export{useClickOutside}from"./hooks/useClickOutside/useClickOutside.js";export{isPermissionAllowed,legacyCopyToClipboard,useClipboard}from"./hooks/useClipboard/useClipboard.js";export{useCounter}from"./hooks/useCounter/useCounter.js";export{useCssVar}from"./hooks/useCssVar/useCssVar.js";export{useDebounceCallback}from"./hooks/useDebounceCallback/useDebounceCallback.js";export{useDebounceValue}from"./hooks/useDebounceValue/useDebounceValue.js";export{useDefault}from"./hooks/useDefault/useDefault.js";export{useDeviceMotion}from"./hooks/useDeviceMotion/useDeviceMotion.js";export{useDeviceOrientation}from"./hooks/useDeviceOrientation/useDeviceOrientation.js";export{useDidUpdate}from"./hooks/useDidUpdate/useDidUpdate.js";export{useDisclosure}from"./hooks/useDisclosure/useDisclosure.js";export{useDocumentEvent}from"./hooks/useDocumentEvent/useDocumentEvent.js";export{useDocumentTitle}from"./hooks/useDocumentTitle/useDocumentTitle.js";export{useDocumentVisibility}from"./hooks/useDocumentVisibility/useDocumentVisibility.js";export{useEvent}from"./hooks/useEvent/useEvent.js";export{useEventListener}from"./hooks/useEventListener/useEventListener.js";export{useEyeDropper}from"./hooks/useEyeDropper/useEyeDropper.js";export{useFavicon}from"./hooks/useFavicon/useFavicon.js";export{useField}from"./hooks/useField/useField.js";export{useFileDialog}from"./hooks/useFileDialog/useFileDialog.js";export{useFocus}from"./hooks/useFocus/useFocus.js";export{useFps}from"./hooks/useFps/useFps.js";export{useFullscreen}from"./hooks/useFullscreen/useFullscreen.js";export{useGamepad}from"./hooks/useGamepad/useGamepad.js";export{useGeolocation}from"./hooks/useGeolocation/useGeolocation.js";export{useHash}from"./hooks/useHash/useHash.js";export{isHotkeyMatch,useHotkeys}from"./hooks/useHotkeys/useHotkeys.js";export{useHover}from"./hooks/useHover/useHover.js";export{useIdle}from"./hooks/useIdle/useIdle.js";export{useImage}from"./hooks/useImage/useImage.js";export{useInfiniteScroll}from"./hooks/useInfiniteScroll/useInfiniteScroll.js";export{useIntersectionObserver}from"./hooks/useIntersectionObserver/useIntersectionObserver.js";export{useInterval}from"./hooks/useInterval/useInterval.js";export{useIsFirstRender}from"./hooks/useIsFirstRender/useIsFirstRender.js";export{useIsomorphicLayoutEffect}from"./hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";export{useKeyboard}from"./hooks/useKeyboard/useKeyboard.js";export{useKeyPress}from"./hooks/useKeyPress/useKeyPress.js";export{useKeyPressEvent}from"./hooks/useKeyPressEvent/useKeyPressEvent.js";export{useKeysPressed}from"./hooks/useKeysPressed/useKeysPressed.js";export{useLastChanged}from"./hooks/useLastChanged/useLastChanged.js";export{useList}from"./hooks/useList/useList.js";export{useLocalStorage}from"./hooks/useLocalStorage/useLocalStorage.js";export{useLogger}from"./hooks/useLogger/useLogger.js";export{useLongPress}from"./hooks/useLongPress/useLongPress.js";export{useMap}from"./hooks/useMap/useMap.js";export{useMeasure}from"./hooks/useMeasure/useMeasure.js";export{useMediaQuery}from"./hooks/useMediaQuery/useMediaQuery.js";export{useMemory}from"./hooks/useMemory/useMemory.js";export{useMount}from"./hooks/useMount/useMount.js";export{useMouse}from"./hooks/useMouse/useMouse.js";export{useMutation}from"./hooks/useMutation/useMutation.js";export{useMutationObserver}from"./hooks/useMutationObserver/useMutationObserver.js";export{getConnection,useNetwork}from"./hooks/useNetwork/useNetwork.js";export{useOffsetPagination}from"./hooks/useOffsetPagination/useOffsetPagination.js";export{useOnline}from"./hooks/useOnline/useOnline.js";export{getOperatingSystem,useOperatingSystem}from"./hooks/useOperatingSystem/useOperatingSystem.js";export{useOptimistic}from"./hooks/useOptimistic/useOptimistic.js";export{useOrientation}from"./hooks/useOrientation/useOrientation.js";export{useOtpCredential}from"./hooks/useOtpCredential/useOtpCredential.js";export{usePageLeave}from"./hooks/usePageLeave/usePageLeave.js";export{usePaint}from"./hooks/usePaint/usePaint.js";export{useParallax}from"./hooks/useParallax/useParallax.js";export{usePermission}from"./hooks/usePermission/usePermission.js";export{usePreferredColorScheme}from"./hooks/usePreferredColorScheme/usePreferredColorScheme.js";export{usePreferredContrast}from"./hooks/usePreferredContrast/usePreferredContrast.js";export{usePreferredDark}from"./hooks/usePreferredDark/usePreferredDark.js";export{usePreferredLanguages}from"./hooks/usePreferredLanguages/usePreferredLanguages.js";export{usePreferredReducedMotion}from"./hooks/usePreferredReducedMotion/usePreferredReducedMotion.js";export{usePrevious}from"./hooks/usePrevious/usePrevious.js";export{useQuery}from"./hooks/useQuery/useQuery.js";export{useQueue}from"./hooks/useQueue/useQueue.js";export{useRaf}from"./hooks/useRaf/useRaf.js";export{useRafValue}from"./hooks/useRafValue/useRafValue.js";export{useRenderCount}from"./hooks/useRenderCount/useRenderCount.js";export{useRenderInfo}from"./hooks/useRenderInfo/useRenderInfo.js";export{useRerender}from"./hooks/useRerender/useRerender.js";export{useResizeObserver}from"./hooks/useResizeObserver/useResizeObserver.js";export{useScreenOrientation}from"./hooks/useScreenOrientation/useScreenOrientation.js";export{SCRIPT_STATUS_ATTRIBUTE_NAME,useScript}from"./hooks/useScript/useScript.js";export{useSessionStorage}from"./hooks/useSessionStorage/useSessionStorage.js";export{useSet}from"./hooks/useSet/useSet.js";export{useShare}from"./hooks/useShare/useShare.js";export{useStep}from"./hooks/useStep/useStep.js";export{useStopwatch}from"./hooks/useStopwatch/useStopwatch.js";export{dispatchStorageEvent,useStorage}from"./hooks/useStorage/useStorage.js";export{getRangesSelection,useTextSelection}from"./hooks/useTextSelection/useTextSelection.js";export{useTime}from"./hooks/useTime/useTime.js";export{useTimeout}from"./hooks/useTimeout/useTimeout.js";export{getTimeFromSeconds,useTimer}from"./hooks/useTimer/useTimer.js";export{useToggle}from"./hooks/useToggle/useToggle.js";export{useUnmount}from"./hooks/useUnmount/useUnmount.js";export{useWebSocket}from"./hooks/useWebSocket/useWebSocket.js";export{useWindowEvent}from"./hooks/useWindowEvent/useWindowEvent.js";export{useWindowFocus}from"./hooks/useWindowFocus/useWindowFocus.js";export{scrollTo,useWindowScroll}from"./hooks/useWindowScroll/useWindowScroll.js";export{useWindowSize}from"./hooks/useWindowSize/useWindowSize.js";export{useWizard}from"./hooks/useWizard/useWizard.js";export{debounce}from"./utils/helpers/debounce.js";export{getElement}from"./utils/helpers/getElement.js";export{getRetry}from"./utils/helpers/getRetry.js";export{isClient}from"./utils/helpers/isClient.js";export{throttle}from"./utils/helpers/throttle.js";export{getDate}from"./utils/helpers/time/getDate.js";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}from"./hooks/useBreakpoints/constants/breakpoints.js";export{mapGamepadToXbox360Controller}from"./hooks/useGamepad/helpers/mapGamepadToXbox360Controller.js";import"./_rollupPluginBabelHelpers-DKveiPYY.js";import"react";import"./index-C0eyELV9.js";import"./hooks/usePaint/helpers/Paint.js";import"./hooks/usePaint/helpers/Pointer.js";import"react-dom";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
2
|
function r(r,t){var n;return function(){for(var e=this,o=arguments.length,u=new Array(o),i=0;i<o;i++)u[i]=arguments[i];clearTimeout(n),n=setTimeout((function(){return r.apply(e,u)}),t)}}export{r as debounce};
|
|
3
3
|
//# sourceMappingURL=debounce.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.js","sources":["../../../../src/utils/helpers/debounce.ts"],"sourcesContent":["export function debounce<Params extends unknown[]>(\
|
|
1
|
+
{"version":3,"file":"debounce.js","sources":["../../../../src/utils/helpers/debounce.ts"],"sourcesContent":["export function debounce<Params extends unknown[]>(\n callback: (...args: Params) => void,\n delay: number\n): (...args: Params) => void {\n let timer: ReturnType<typeof setTimeout>;\n\n return function (this: any, ...args: Params) {\n clearTimeout(timer);\n timer = setTimeout(() => callback.apply(this, args), delay);\n };\n}\n"],"names":["debounce","callback","delay","timer","_this","this","_len","arguments","length","args","Array","_key","clearTimeout","setTimeout","apply"],"mappings":";AAAO,SAASA,EACdC,EACAC,GAEA,IAAIC,EAEJ,OAAO,WAAsC,IAAA,IAAAC,EAAAC,KAAAC,EAAAC,UAAAC,OAAdC,EAAIC,IAAAA,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAAJF,EAAIE,GAAAJ,UAAAI,GACjCC,aAAaT,GACbA,EAAQU,YAAW,WAAA,OAAMZ,EAASa,MAAMV,EAAMK,EAAK,GAAEP,GAEzD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
2
|
var n=function(n){return"function"==typeof n?n():n instanceof Document||n instanceof Window||n instanceof Element?n:n.current};export{n as getElement};
|
|
3
3
|
//# sourceMappingURL=getElement.js.map
|