@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":"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":["callback","delay","timer","_this","this","_len","arguments","length","args","Array","_key","clearTimeout","setTimeout","apply"],"mappings":";8BAAO,SACLA,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
|
"use strict";exports.getElement=function(n){return"function"==typeof n?n():n instanceof Document||n instanceof Window||n instanceof Element?n:n.current};
|
|
3
3
|
//# sourceMappingURL=getElement.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
2
|
"use strict";var e=require("./debounce.js"),t=require("./getElement.js"),r=require("./getRetry.js"),s=require("./isClient.js"),i=require("./throttle.js"),o=require("./time/getDate.js");exports.debounce=e.debounce,exports.getElement=t.getElement,exports.getRetry=r.getRetry,exports.isClient=s.isClient,exports.throttle=i.throttle,exports.getDate=o.getDate;
|
|
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
|
"use strict";var e,n,d=!("undefined"==typeof window||null===(e=window)||void 0===e||!e.document||null===(n=window)||void 0===n||null===(n=n.document)||void 0===n||!n.createElement);exports.isClient=d;
|
|
3
3
|
//# sourceMappingURL=isClient.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
2
|
"use strict";exports.throttle=function(t,r){var n=!1;return function(){if(!n){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];t.apply(this,i),n=!0,setTimeout((function(){n=!1}),r)}}};
|
|
3
3
|
//# sourceMappingURL=throttle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"throttle.js","sources":["../../../../src/utils/helpers/throttle.ts"],"sourcesContent":["export const throttle = <Params extends any[]>(\
|
|
1
|
+
{"version":3,"file":"throttle.js","sources":["../../../../src/utils/helpers/throttle.ts"],"sourcesContent":["export const throttle = <Params extends any[]>(\n callback: (...args: Params) => void,\n delay: number\n): ((...args: Params) => void) => {\n let isCalled = false;\n\n return function (this: any, ...args) {\n if (!isCalled) {\n callback.apply(this, args);\n isCalled = true;\n setTimeout(() => {\n isCalled = false;\n }, delay);\n }\n };\n};\n"],"names":["callback","delay","isCalled","_len","arguments","length","args","Array","_key","apply","this","setTimeout"],"mappings":";8BAAwB,SACtBA,EACAC,GAEA,IAAIC,GAAW,EAEf,OAAO,WACL,IAAKA,EAAU,CAAA,IAAA,IAAAC,EAAAC,UAAAC,OADcC,EAAIC,IAAAA,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAAJF,EAAIE,GAAAJ,UAAAI,GAE/BR,EAASS,MAAMC,KAAMJ,GACrBJ,GAAW,EACXS,YAAW,WACTT,GAAW,CACZ,GAAED,EACL,EAEJ"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
2
|
"use strict";exports.getDate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=e.getSeconds(),s=e.getMinutes(),n=e.getHours();return{seconds:t,minutes:s,hours:n,meridiemHours:{value:n%12==0?12:n%12,type:n>=12?"pm":"am"},day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear(),timestamp:e.getTime()}};
|
|
3
3
|
//# sourceMappingURL=getDate.js.map
|
package/dist/esm/{_rollupPluginBabelHelpers-DnmVbpNy.js → _rollupPluginBabelHelpers-DKveiPYY.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
2
|
function t(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function r(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?t(Object(n),!0).forEach((function(t){f(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))}))}return r}function e(){e=function(){return r};var t,r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,e){t[r]=e.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",f=a.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(t){l=function(t,r,e){return t[r]=e}}function s(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,a=Object.create(o.prototype),c=new T(n||[]);return i(a,"_invoke",{value:P(t,e,c)}),a}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=s;var y="suspendedStart",p="suspendedYield",v="executing",d="completed",m={};function b(){}function g(){}function w(){}var O={};l(O,c,(function(){return this}));var j=Object.getPrototypeOf,E=j&&j(j(N([])));E&&E!==n&&o.call(E,c)&&(O=E);var L=w.prototype=b.prototype=Object.create(O);function x(t){["next","throw","return"].forEach((function(r){l(t,r,(function(t){return this._invoke(r,t)}))}))}function S(t,r){function e(n,i,a,c){var u=h(t[n],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&o.call(l,"__await")?r.resolve(l.__await).then((function(t){e("next",t,a,c)}),(function(t){e("throw",t,a,c)})):r.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return e("throw",t,a,c)}))}c(u.arg)}var n;i(this,"_invoke",{value:function(t,o){function i(){return new r((function(r,n){e(t,o,r,n)}))}return n=n?n.then(i,i):i()}})}function P(r,e,n){var o=y;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=_(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var f=h(r,e,n);if("normal"===f.type){if(o=n.done?d:p,f.arg===m)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=d,n.method="throw",n.arg=f.arg)}}}function _(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,_(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function A(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function k(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function N(r){if(r||""===r){var e=r[c];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var n=-1,i=function e(){for(;++n<r.length;)if(o.call(r,n))return e.value=r[n],e.done=!1,e;return e.value=t,e.done=!0,e};return i.next=i}}throw new TypeError(typeof r+" is not iterable")}return g.prototype=w,i(L,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,f,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,f,"GeneratorFunction")),t.prototype=Object.create(L),t},r.awrap=function(t){return{__await:t}},x(S.prototype),l(S.prototype,u,(function(){return this})),r.AsyncIterator=S,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new S(s(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(L),l(L,f,"Generator"),l(L,c,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=N,T.prototype={constructor:T,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!r)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(n,o){return c.type="throw",c.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),f=o.call(a,"finallyLoc");if(u&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),k(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;k(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:N(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),m}},r}function n(t){var r=function(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof r?r:String(r)}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}function a(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var a=t.apply(r,e);function c(t){i(a,n,o,c,u,"next",t)}function u(t){i(a,n,o,c,u,"throw",t)}c(void 0)}))}}function c(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function u(t,r,e){return r&&function(t,r){for(var e=0;e<r.length;e++){var o=r[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,n(o.key),o)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function f(t,r,e){return(r=n(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function l(t,r){return y(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i,a,c=[],u=!0,f=!1;try{if(i=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;u=!1}else for(;!(u=(n=i.call(e)).done)&&(c.push(n.value),c.length!==r);u=!0);}catch(t){f=!0,o=t}finally{try{if(!u&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(f)throw o}}return c}}(t,r)||v(t,r)||m()}function s(t){return y(t)||p(t)||v(t)||m()}function h(t){return function(t){if(Array.isArray(t))return d(t)}(t)||p(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t){if(Array.isArray(t))return t}function p(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function v(t,r){if(t){if("string"==typeof t)return d(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?d(t,r):void 0}}function d(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function m(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}export{l as _,h as a,r as b,o as c,a as d,e,f,s as g,u as h,c as i};
|
|
3
|
-
//# sourceMappingURL=_rollupPluginBabelHelpers-
|
|
3
|
+
//# sourceMappingURL=_rollupPluginBabelHelpers-DKveiPYY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_rollupPluginBabelHelpers-DKveiPYY.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/esm/hooks/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
export{useAsync}from"./useAsync/useAsync.js";export{useBattery}from"./useBattery/useBattery.js";export{useBoolean}from"./useBoolean/useBoolean.js";export{useBreakpoints}from"./useBreakpoints/useBreakpoints.js";export{useBrowserLanguage}from"./useBrowserLanguage/useBrowserLanguage.js";export{useClickOutside}from"./useClickOutside/useClickOutside.js";export{isPermissionAllowed,legacyCopyToClipboard,useClipboard}from"./useClipboard/useClipboard.js";export{useCounter}from"./useCounter/useCounter.js";export{useCssVar}from"./useCssVar/useCssVar.js";export{useDebounceCallback}from"./useDebounceCallback/useDebounceCallback.js";export{useDebounceValue}from"./useDebounceValue/useDebounceValue.js";export{useDefault}from"./useDefault/useDefault.js";export{useDeviceMotion}from"./useDeviceMotion/useDeviceMotion.js";export{useDeviceOrientation}from"./useDeviceOrientation/useDeviceOrientation.js";export{useDidUpdate}from"./useDidUpdate/useDidUpdate.js";export{useDisclosure}from"./useDisclosure/useDisclosure.js";export{useDocumentEvent}from"./useDocumentEvent/useDocumentEvent.js";export{useDocumentTitle}from"./useDocumentTitle/useDocumentTitle.js";export{useDocumentVisibility}from"./useDocumentVisibility/useDocumentVisibility.js";export{useEvent}from"./useEvent/useEvent.js";export{useEventListener}from"./useEventListener/useEventListener.js";export{useEyeDropper}from"./useEyeDropper/useEyeDropper.js";export{useFavicon}from"./useFavicon/useFavicon.js";export{useField}from"./useField/useField.js";export{useFileDialog}from"./useFileDialog/useFileDialog.js";export{useFocus}from"./useFocus/useFocus.js";export{useFps}from"./useFps/useFps.js";export{useFullscreen}from"./useFullscreen/useFullscreen.js";export{useGamepad}from"./useGamepad/useGamepad.js";export{useGeolocation}from"./useGeolocation/useGeolocation.js";export{useHash}from"./useHash/useHash.js";export{isHotkeyMatch,useHotkeys}from"./useHotkeys/useHotkeys.js";export{useHover}from"./useHover/useHover.js";export{useIdle}from"./useIdle/useIdle.js";export{useImage}from"./useImage/useImage.js";export{useInfiniteScroll}from"./useInfiniteScroll/useInfiniteScroll.js";export{useIntersectionObserver}from"./useIntersectionObserver/useIntersectionObserver.js";export{useInterval}from"./useInterval/useInterval.js";export{useIsFirstRender}from"./useIsFirstRender/useIsFirstRender.js";export{useIsomorphicLayoutEffect}from"./useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";export{useKeyboard}from"./useKeyboard/useKeyboard.js";export{useKeyPress}from"./useKeyPress/useKeyPress.js";export{useKeyPressEvent}from"./useKeyPressEvent/useKeyPressEvent.js";export{useKeysPressed}from"./useKeysPressed/useKeysPressed.js";export{useLastChanged}from"./useLastChanged/useLastChanged.js";export{useList}from"./useList/useList.js";export{useLocalStorage}from"./useLocalStorage/useLocalStorage.js";export{useLogger}from"./useLogger/useLogger.js";export{useLongPress}from"./useLongPress/useLongPress.js";export{useMap}from"./useMap/useMap.js";export{useMeasure}from"./useMeasure/useMeasure.js";export{useMediaQuery}from"./useMediaQuery/useMediaQuery.js";export{useMemory}from"./useMemory/useMemory.js";export{useMount}from"./useMount/useMount.js";export{useMouse}from"./useMouse/useMouse.js";export{useMutation}from"./useMutation/useMutation.js";export{useMutationObserver}from"./useMutationObserver/useMutationObserver.js";export{getConnection,useNetwork}from"./useNetwork/useNetwork.js";export{useOffsetPagination}from"./useOffsetPagination/useOffsetPagination.js";export{useOnline}from"./useOnline/useOnline.js";export{getOperatingSystem,useOperatingSystem}from"./useOperatingSystem/useOperatingSystem.js";export{useOptimistic}from"./useOptimistic/useOptimistic.js";export{useOrientation}from"./useOrientation/useOrientation.js";export{useOtpCredential}from"./useOtpCredential/useOtpCredential.js";export{usePageLeave}from"./usePageLeave/usePageLeave.js";export{usePaint}from"./usePaint/usePaint.js";export{useParallax}from"./useParallax/useParallax.js";export{usePermission}from"./usePermission/usePermission.js";export{usePreferredColorScheme}from"./usePreferredColorScheme/usePreferredColorScheme.js";export{usePreferredContrast}from"./usePreferredContrast/usePreferredContrast.js";export{usePreferredDark}from"./usePreferredDark/usePreferredDark.js";export{usePreferredLanguages}from"./usePreferredLanguages/usePreferredLanguages.js";export{usePreferredReducedMotion}from"./usePreferredReducedMotion/usePreferredReducedMotion.js";export{usePrevious}from"./usePrevious/usePrevious.js";export{useQuery}from"./useQuery/useQuery.js";export{useQueue}from"./useQueue/useQueue.js";export{useRaf}from"./useRaf/useRaf.js";export{useRafValue}from"./useRafValue/useRafValue.js";export{useRenderCount}from"./useRenderCount/useRenderCount.js";export{useRenderInfo}from"./useRenderInfo/useRenderInfo.js";export{useRerender}from"./useRerender/useRerender.js";export{useResizeObserver}from"./useResizeObserver/useResizeObserver.js";export{useScreenOrientation}from"./useScreenOrientation/useScreenOrientation.js";export{SCRIPT_STATUS_ATTRIBUTE_NAME,useScript}from"./useScript/useScript.js";export{useSessionStorage}from"./useSessionStorage/useSessionStorage.js";export{useSet}from"./useSet/useSet.js";export{useShare}from"./useShare/useShare.js";export{useStep}from"./useStep/useStep.js";export{useStopwatch}from"./useStopwatch/useStopwatch.js";export{dispatchStorageEvent,useStorage}from"./useStorage/useStorage.js";export{getRangesSelection,useTextSelection}from"./useTextSelection/useTextSelection.js";export{useTime}from"./useTime/useTime.js";export{useTimeout}from"./useTimeout/useTimeout.js";export{getTimeFromSeconds,useTimer}from"./useTimer/useTimer.js";export{useToggle}from"./useToggle/useToggle.js";export{useUnmount}from"./useUnmount/useUnmount.js";export{useWebSocket}from"./useWebSocket/useWebSocket.js";export{useWindowEvent}from"./useWindowEvent/useWindowEvent.js";export{scrollTo,useWindowScroll}from"./useWindowScroll/useWindowScroll.js";export{useWindowSize}from"./useWindowSize/useWindowSize.js";export{useWizard}from"./useWizard/useWizard.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"./useBreakpoints/constants/breakpoints.js";export{mapGamepadToXbox360Controller}from"./useGamepad/helpers/mapGamepadToXbox360Controller.js";import"../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
export{useActiveElement}from"./useActiveElement/useActiveElement.js";export{useAsync}from"./useAsync/useAsync.js";export{useBattery}from"./useBattery/useBattery.js";export{useBoolean}from"./useBoolean/useBoolean.js";export{useBreakpoints}from"./useBreakpoints/useBreakpoints.js";export{useBrowserLanguage}from"./useBrowserLanguage/useBrowserLanguage.js";export{useClickOutside}from"./useClickOutside/useClickOutside.js";export{isPermissionAllowed,legacyCopyToClipboard,useClipboard}from"./useClipboard/useClipboard.js";export{useCounter}from"./useCounter/useCounter.js";export{useCssVar}from"./useCssVar/useCssVar.js";export{useDebounceCallback}from"./useDebounceCallback/useDebounceCallback.js";export{useDebounceValue}from"./useDebounceValue/useDebounceValue.js";export{useDefault}from"./useDefault/useDefault.js";export{useDeviceMotion}from"./useDeviceMotion/useDeviceMotion.js";export{useDeviceOrientation}from"./useDeviceOrientation/useDeviceOrientation.js";export{useDidUpdate}from"./useDidUpdate/useDidUpdate.js";export{useDisclosure}from"./useDisclosure/useDisclosure.js";export{useDocumentEvent}from"./useDocumentEvent/useDocumentEvent.js";export{useDocumentTitle}from"./useDocumentTitle/useDocumentTitle.js";export{useDocumentVisibility}from"./useDocumentVisibility/useDocumentVisibility.js";export{useEvent}from"./useEvent/useEvent.js";export{useEventListener}from"./useEventListener/useEventListener.js";export{useEyeDropper}from"./useEyeDropper/useEyeDropper.js";export{useFavicon}from"./useFavicon/useFavicon.js";export{useField}from"./useField/useField.js";export{useFileDialog}from"./useFileDialog/useFileDialog.js";export{useFocus}from"./useFocus/useFocus.js";export{useFps}from"./useFps/useFps.js";export{useFullscreen}from"./useFullscreen/useFullscreen.js";export{useGamepad}from"./useGamepad/useGamepad.js";export{useGeolocation}from"./useGeolocation/useGeolocation.js";export{useHash}from"./useHash/useHash.js";export{isHotkeyMatch,useHotkeys}from"./useHotkeys/useHotkeys.js";export{useHover}from"./useHover/useHover.js";export{useIdle}from"./useIdle/useIdle.js";export{useImage}from"./useImage/useImage.js";export{useInfiniteScroll}from"./useInfiniteScroll/useInfiniteScroll.js";export{useIntersectionObserver}from"./useIntersectionObserver/useIntersectionObserver.js";export{useInterval}from"./useInterval/useInterval.js";export{useIsFirstRender}from"./useIsFirstRender/useIsFirstRender.js";export{useIsomorphicLayoutEffect}from"./useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";export{useKeyboard}from"./useKeyboard/useKeyboard.js";export{useKeyPress}from"./useKeyPress/useKeyPress.js";export{useKeyPressEvent}from"./useKeyPressEvent/useKeyPressEvent.js";export{useKeysPressed}from"./useKeysPressed/useKeysPressed.js";export{useLastChanged}from"./useLastChanged/useLastChanged.js";export{useList}from"./useList/useList.js";export{useLocalStorage}from"./useLocalStorage/useLocalStorage.js";export{useLogger}from"./useLogger/useLogger.js";export{useLongPress}from"./useLongPress/useLongPress.js";export{useMap}from"./useMap/useMap.js";export{useMeasure}from"./useMeasure/useMeasure.js";export{useMediaQuery}from"./useMediaQuery/useMediaQuery.js";export{useMemory}from"./useMemory/useMemory.js";export{useMount}from"./useMount/useMount.js";export{useMouse}from"./useMouse/useMouse.js";export{useMutation}from"./useMutation/useMutation.js";export{useMutationObserver}from"./useMutationObserver/useMutationObserver.js";export{getConnection,useNetwork}from"./useNetwork/useNetwork.js";export{useOffsetPagination}from"./useOffsetPagination/useOffsetPagination.js";export{useOnline}from"./useOnline/useOnline.js";export{getOperatingSystem,useOperatingSystem}from"./useOperatingSystem/useOperatingSystem.js";export{useOptimistic}from"./useOptimistic/useOptimistic.js";export{useOrientation}from"./useOrientation/useOrientation.js";export{useOtpCredential}from"./useOtpCredential/useOtpCredential.js";export{usePageLeave}from"./usePageLeave/usePageLeave.js";export{usePaint}from"./usePaint/usePaint.js";export{useParallax}from"./useParallax/useParallax.js";export{usePermission}from"./usePermission/usePermission.js";export{usePreferredColorScheme}from"./usePreferredColorScheme/usePreferredColorScheme.js";export{usePreferredContrast}from"./usePreferredContrast/usePreferredContrast.js";export{usePreferredDark}from"./usePreferredDark/usePreferredDark.js";export{usePreferredLanguages}from"./usePreferredLanguages/usePreferredLanguages.js";export{usePreferredReducedMotion}from"./usePreferredReducedMotion/usePreferredReducedMotion.js";export{usePrevious}from"./usePrevious/usePrevious.js";export{useQuery}from"./useQuery/useQuery.js";export{useQueue}from"./useQueue/useQueue.js";export{useRaf}from"./useRaf/useRaf.js";export{useRafValue}from"./useRafValue/useRafValue.js";export{useRenderCount}from"./useRenderCount/useRenderCount.js";export{useRenderInfo}from"./useRenderInfo/useRenderInfo.js";export{useRerender}from"./useRerender/useRerender.js";export{useResizeObserver}from"./useResizeObserver/useResizeObserver.js";export{useScreenOrientation}from"./useScreenOrientation/useScreenOrientation.js";export{SCRIPT_STATUS_ATTRIBUTE_NAME,useScript}from"./useScript/useScript.js";export{useSessionStorage}from"./useSessionStorage/useSessionStorage.js";export{useSet}from"./useSet/useSet.js";export{useShare}from"./useShare/useShare.js";export{useStep}from"./useStep/useStep.js";export{useStopwatch}from"./useStopwatch/useStopwatch.js";export{dispatchStorageEvent,useStorage}from"./useStorage/useStorage.js";export{getRangesSelection,useTextSelection}from"./useTextSelection/useTextSelection.js";export{useTime}from"./useTime/useTime.js";export{useTimeout}from"./useTimeout/useTimeout.js";export{getTimeFromSeconds,useTimer}from"./useTimer/useTimer.js";export{useToggle}from"./useToggle/useToggle.js";export{useUnmount}from"./useUnmount/useUnmount.js";export{useWebSocket}from"./useWebSocket/useWebSocket.js";export{useWindowEvent}from"./useWindowEvent/useWindowEvent.js";export{useWindowFocus}from"./useWindowFocus/useWindowFocus.js";export{scrollTo,useWindowScroll}from"./useWindowScroll/useWindowScroll.js";export{useWindowSize}from"./useWindowSize/useWindowSize.js";export{useWizard}from"./useWizard/useWizard.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"./useBreakpoints/constants/breakpoints.js";export{mapGamepadToXbox360Controller}from"./useGamepad/helpers/mapGamepadToXbox360Controller.js";import"../_rollupPluginBabelHelpers-DKveiPYY.js";import"react";import"../utils/helpers/getElement.js";import"../utils/helpers/isClient.js";import"../utils/helpers/debounce.js";import"../utils/helpers/throttle.js";import"../index-C0eyELV9.js";import"./usePaint/helpers/Paint.js";import"./usePaint/helpers/Pointer.js";import"../utils/helpers/getRetry.js";import"react-dom";import"../utils/helpers/time/getDate.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as r,useEffect as t}from"react";import{useMutationObserver as n}from"../useMutationObserver/useMutationObserver.js";import"../../utils/helpers/getElement.js";import"../../utils/helpers/isClient.js";var o=function(){var o=r(null),i=e(o,2),u=i[0],l=i[1];return t((function(){var e=function(){var e;return l(null===(e=document)||void 0===e?void 0:e.activeElement)};return window.addEventListener("focus",e,!0),window.addEventListener("blur",e,!0),function(){window.removeEventListener("focus",e),window.removeEventListener("blur",e)}})),n(document,(function(e){e.filter((function(e){return e.removedNodes.length})).map((function(e){return Array.from(e.removedNodes)})).flat().forEach((function(e){var r;e===u&&l(null===(r=document)||void 0===r?void 0:r.activeElement)}))}),{childList:!0,subtree:!0}),u};export{o as useActiveElement};
|
|
3
|
+
//# sourceMappingURL=useActiveElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useActiveElement.js","sources":["../../../../src/hooks/useActiveElement/useActiveElement.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { useMutationObserver } from '../useMutationObserver/useMutationObserver';\n\n/**\n * @name useActiveElement\n * @description - Hook that returns the active element\n * @category Elements\n *\n * @returns {ActiveElement | null} The active element\n *\n * @example\n * const activeElement = useActiveElement();\n */\nexport const useActiveElement = <ActiveElement extends HTMLElement>() => {\n const [activeElement, setActiveElement] = useState<ActiveElement | null>(null);\n\n useEffect(() => {\n const onActiveElementChange = () =>\n setActiveElement(document?.activeElement as ActiveElement | null);\n\n window.addEventListener('focus', onActiveElementChange, true);\n window.addEventListener('blur', onActiveElementChange, true);\n return () => {\n window.removeEventListener('focus', onActiveElementChange);\n window.removeEventListener('blur', onActiveElementChange);\n };\n });\n\n useMutationObserver(\n document as any,\n (mutations) => {\n mutations\n .filter((mutation) => mutation.removedNodes.length)\n .map((mutation) => Array.from(mutation.removedNodes))\n .flat()\n .forEach((node) => {\n if (node === activeElement)\n setActiveElement(document?.activeElement as ActiveElement | null);\n });\n },\n {\n childList: true,\n subtree: true\n }\n );\n\n return activeElement;\n};\n"],"names":["useActiveElement","_useState","useState","_useState2","_slicedToArray","activeElement","setActiveElement","useEffect","onActiveElementChange","_document","document","window","addEventListener","removeEventListener","useMutationObserver","mutations","filter","mutation","removedNodes","length","map","Array","from","flat","forEach","node","_document2","childList","subtree"],"mappings":";0RAcaA,EAAmB,WAC9B,IAAAC,EAA0CC,EAA+B,MAAKC,EAAAC,EAAAH,EAAA,GAAvEI,EAAaF,EAAA,GAAEG,EAAgBH,EAAA,GAgCtC,OA9BAI,GAAU,WACR,IAAMC,EAAwB,WAAH,IAAAC,EAAA,OACzBH,EAAyBG,QAATA,EAACC,gBAAAD,IAAQA,OAARA,EAAAA,EAAUJ,cAAsC,EAInE,OAFAM,OAAOC,iBAAiB,QAASJ,GAAuB,GACxDG,OAAOC,iBAAiB,OAAQJ,GAAuB,GAChD,WACLG,OAAOE,oBAAoB,QAASL,GACpCG,OAAOE,oBAAoB,OAAQL,GAEvC,IAEAM,EACEJ,UACA,SAACK,GACCA,EACGC,QAAO,SAACC,GAAQ,OAAKA,EAASC,aAAaC,MAAM,IACjDC,KAAI,SAACH,GAAQ,OAAKI,MAAMC,KAAKL,EAASC,aAAc,IACpDK,OACAC,SAAQ,SAACC,GAAS,IAAAC,EACbD,IAASpB,GACXC,UAAgBoB,EAAChB,gBAAQ,IAAAgB,OAAA,EAARA,EAAUrB,cAC/B,GACJ,GACA,CACEsB,WAAW,EACXC,SAAS,IAINvB,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 i}from"react";var n=function(n,t){var a=o(!1),c=r(a,2),e=c[0],f=c[1],u=o(!1),l=r(u,2),d=l[0],p=l[1],s=o(void 0),v=r(s,2),m=v[0],g=v[1],h=o(void 0),_=r(h,2),b=_[0],j=_[1];return i((function(){n().then((function(r){j(r),g(void 0),p(!1)})).catch((function(r){g(r),p(!0)})).finally((function(){f(!1)}))}),t),{data:b,isLoading:e,isError:d,error:m}};export{n as useAsync};
|
|
3
3
|
//# sourceMappingURL=useAsync.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAsync.js","sources":["../../../../src/hooks/useAsync/useAsync.ts"],"sourcesContent":["import type { DependencyList } from 'react';\
|
|
1
|
+
{"version":3,"file":"useAsync.js","sources":["../../../../src/hooks/useAsync/useAsync.ts"],"sourcesContent":["import type { DependencyList } from 'react';\nimport { useEffect, useState } from 'react';\n\n/* The use query return type */\nexport interface UseAsyncReturn<Data> {\n /* The state of the query */\n data?: Data;\n /* The loading state of the query */\n isLoading: boolean;\n /* The error state of the query */\n isError: boolean;\n /* The success state of the query */\n error?: Error;\n}\n\n/**\n * @name useAsync\n * @description - Hook that provides the state of an async callback\n * @category Utilities\n *\n * @param {() => Promise<Data>} callback - The async callback\n * @param {DependencyList} [deps] - The dependencies of the callback\n * @returns {UseAsyncReturn<Data>} - The state of the async callback\n *\n * @example\n * const { data, isLoading, isError, error } = useAsync(() => fetch('url'), [deps]);\n */\nexport const useAsync = <Data>(\n callback: () => Promise<Data>,\n deps?: DependencyList\n): UseAsyncReturn<Data> => {\n const [isLoading, setIsLoading] = useState(false);\n const [isError, setIsError] = useState(false);\n\n const [error, setError] = useState<Error | undefined>(undefined);\n const [data, setData] = useState<Data | undefined>(undefined);\n\n useEffect(() => {\n callback()\n .then((response) => {\n setData(response);\n setError(undefined);\n setIsError(false);\n })\n .catch((error: Error) => {\n setError(error);\n setIsError(true);\n })\n .finally(() => {\n setIsLoading(false);\n });\n }, deps);\n\n return {\n data,\n isLoading,\n isError,\n error\n };\n};\n"],"names":["useAsync","callback","deps","_useState","useState","_useState2","_slicedToArray","isLoading","setIsLoading","_useState3","_useState4","isError","setIsError","_useState5","undefined","_useState6","error","setError","_useState7","_useState8","data","setData","useEffect","then","response"],"mappings":";gHA2BO,IAAMA,EAAW,SACtBC,EACAC,GAEA,IAAAC,EAAkCC,GAAS,GAAMC,EAAAC,EAAAH,EAAA,GAA1CI,EAASF,EAAA,GAAEG,EAAYH,EAAA,GAC9BI,EAA8BL,GAAS,GAAMM,EAAAJ,EAAAG,EAAA,GAAtCE,EAAOD,EAAA,GAAEE,EAAUF,EAAA,GAE1BG,EAA0BT,OAA4BU,GAAUC,EAAAT,EAAAO,EAAA,GAAzDG,EAAKD,EAAA,GAAEE,EAAQF,EAAA,GACtBG,EAAwBd,OAA2BU,GAAUK,EAAAb,EAAAY,EAAA,GAAtDE,EAAID,EAAA,GAAEE,EAAOF,EAAA,GAkBpB,OAhBAG,GAAU,WACRrB,IACGsB,MAAK,SAACC,GACLH,EAAQG,GACRP,OAASH,GACTF,GAAW,EACb,IAAE,OACK,SAACI,GACNC,EAASD,GACTJ,GAAW,MAEL,SAAC,WACPJ,GAAa,EACf,GACH,GAAEN,GAEI,CACLkB,KAAAA,EACAb,UAAAA,EACAI,QAAAA,EACAK,MAAAA,EAEJ"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e,b as n}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as e,b as n}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as i,useEffect as r}from"react";var t=function(){var t=i({supported:!1,loading:!0,level:0,charging:!1,chargingTime:0,dischargingTime:0}),a=e(t,2),g=a[0],o=a[1];return r((function(){var e;if(!(navigator&&"getBattery"in navigator&&"function"==typeof navigator.getBattery))return o(n(n({},g),{},{loading:!1}));var i=function(){var n,i,r,t,a,g,v,l;return o({supported:!0,loading:!1,level:null!==(n=null===(i=e)||void 0===i?void 0:i.level)&&void 0!==n?n:0,charging:null!==(r=null===(t=e)||void 0===t?void 0:t.charging)&&void 0!==r&&r,dischargingTime:null!==(a=null===(g=e)||void 0===g?void 0:g.dischargingTime)&&void 0!==a?a:0,chargingTime:null!==(v=null===(l=e)||void 0===l?void 0:l.chargingTime)&&void 0!==v?v:0})};return navigator.getBattery().then((function(n){e=n,i(),n.addEventListener("levelchange",i),n.addEventListener("chargingchange",i),n.addEventListener("chargingtimechange",i),n.addEventListener("dischargingtimechange",i)})),function(){e&&(e.removeEventListener("levelchange",i),e.removeEventListener("chargingchange",i),e.removeEventListener("chargingtimechange",i),e.removeEventListener("dischargingtimechange",i))}}),[]),g};export{t as useBattery};
|
|
3
3
|
//# sourceMappingURL=useBattery.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 n}from"react";var t=function(){var t=n(arguments.length>0&&void 0!==arguments[0]&&arguments[0]),o=r(t,2),e=o[0],u=o[1];return[e,function(r){return u((function(n){return null!=r?r:!n}))}]};export{t as useBoolean};
|
|
3
3
|
//# sourceMappingURL=useBoolean.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBoolean.js","sources":["../../../../src/hooks/useBoolean/useBoolean.ts"],"sourcesContent":["import { useState } from 'react';\
|
|
1
|
+
{"version":3,"file":"useBoolean.js","sources":["../../../../src/hooks/useBoolean/useBoolean.ts"],"sourcesContent":["import { useState } from 'react';\n\n/** The use boolean return type */\nexport type UseBooleanReturn = [\n /** The current boolean state value */\n value: boolean,\n /** Function to toggle the boolean state */\n toggle: (value?: boolean) => void\n];\n\n/**\n * @name useBoolean\n * @description - Hook provides a boolean state and a function to toggle the boolean value\n * @category Utilities\n *\n * @param {boolean} [initialValue=false] The initial boolean value\n * @returns {UseBooleanReturn} An object containing the boolean state value and utility functions to manipulate the state\n *\n * @example\n * const [on, toggle] = useBoolean()\n */\nexport const useBoolean = (initialValue = false): UseBooleanReturn => {\n const [value, setValue] = useState(initialValue);\n const toggle = (value?: boolean) => setValue((prevValue) => value ?? !prevValue);\n\n return [value, toggle];\n};\n"],"names":["useBoolean","_useState","useState","arguments","length","undefined","_useState2","_slicedToArray","value","setValue","prevValue"],"mappings":";qGAqBaA,EAAa,WAA4C,IACpEC,EAA0BC,EADWC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,IACWG,EAAAC,EAAAN,EAAA,GAAzCO,EAAKF,EAAA,GAAEG,EAAQH,EAAA,GAGtB,MAAO,CAACE,EAFO,SAACA,GAAe,OAAKC,GAAS,SAACC,GAAS,OAAKF,QAAAA,GAAUE,IAAU,EAGlF"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
2
|
var l={xs:0,sm:600,md:900,lg:1200,xl:1536},x={xs:576,sm:768,md:992,lg:1200,xl:1408},m={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},s={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},d={xs:480,sm:576,md:768,lg:992,xl:1200,xxl:1600},g={xs:0,sm:600,md:1024,lg:1440,xl:1920},o={mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560},e={"3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560},p={sm:576,md:768,lg:992,xl:1200};export{d as BREAKPOINTS_ANT_DESIGN,s as BREAKPOINTS_BOOTSTRAP_V5,x as BREAKPOINTS_MANTINE,e as BREAKPOINTS_MASTER_CSS,l as BREAKPOINTS_MATERIAL_UI,p as BREAKPOINTS_PRIME_FLEX,g as BREAKPOINTS_QUASAR_V2,o as BREAKPOINTS_SEMANTIC,m as BREAKPOINTS_TAILWIND};
|
|
3
3
|
//# sourceMappingURL=breakpoints.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{b as r,_ as n}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{b as r,_ as n}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useEffect as e}from"react";import{useRerender as t}from"../useRerender/useRerender.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"./constants/breakpoints.js";var i=function(r){return window.matchMedia(r).matches},u=function(u){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mobile-first",o=t(),c=function(r,n){return"".concat(n?Number(u[r])+n:u[r],"px")};e((function(){var r=function(){return o.update()};return window.addEventListener("resize",r),function(){window.removeEventListener("resize",r)}}),[]);var s=function(r){return i("(min-width: ".concat(c(r),")"))},m=function(r){return i("(max-width: ".concat(c(r),")"))},f=function(){return Object.keys(u).map((function(r){return[r,s(r)]})).filter((function(r){return n(r,2)[1]})).map((function(r){return n(r,1)[0]}))},l=function(r){return i("(min-width: ".concat(c(r,.1),")"))},E=function(r){return i("(max-width: ".concat(c(r,-.1),")"))},d=function(r,n){return i("(min-width: ".concat(c(r),") and (max-width: ").concat(c(n,-.1),")"))},A=Object.keys(u).reduce((function(r,n){var e="mobile-first"===a?s(n):m(n);return r[n]=e,r}),{});return r({current:f,greaterOrEqual:s,smallerOrEqual:m,active:function(){var r=f();return r.length?r.at(-1):void 0},greater:l,smaller:E,between:d,isGreater:l,isGreaterOrEqual:s,isSmaller:E,isSmallerOrEqual:m,isInBetween:d},A)};export{u as useBreakpoints};
|
|
3
3
|
//# sourceMappingURL=useBreakpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoints.js","sources":["../../../../src/hooks/useBreakpoints/useBreakpoints.ts"],"sourcesContent":["import { useEffect } from 'react';\
|
|
1
|
+
{"version":3,"file":"useBreakpoints.js","sources":["../../../../src/hooks/useBreakpoints/useBreakpoints.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { useRerender } from '../useRerender/useRerender';\n\n/** The breakpoints type */\nexport type Breakpoints<Breakpoint extends string = string> = Record<Breakpoint, number>;\n\n/** The use breakpoints strategy */\nexport type UseBreakpointsStrategy = 'mobile-first' | 'desktop-first';\n\nconst match = (query: string) => window.matchMedia(query).matches;\n\n/** The use breakpoints return type */\nexport type UseBreakpointsReturn<Breakpoint extends string = string> = {\n /** The function that checks if the current breakpoint is greater than to the given breakpoint */\n greater: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is greater than or equal to the given breakpoint */\n greaterOrEqual: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is smaller than to the given breakpoint */\n smaller: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is smaller than or equal to the given breakpoint */\n smallerOrEqual: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is between to the given breakpoints */\n between: (a: Breakpoint, b: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is greater than to the given breakpoint */\n isGreater: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is greater than or equal to the given breakpoint */\n isGreaterOrEqual: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is smaller than to the given breakpoint */\n isSmaller: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is smaller than or equal to the given breakpoint */\n isSmallerOrEqual: (breakpoint: Breakpoint) => boolean;\n /** The function that checks if the current breakpoint is between to the given breakpoints */\n isInBetween: (a: Breakpoint, b: Breakpoint) => boolean;\n /** The function that returns the current breakpoints */\n current: () => Breakpoint[];\n /** The function that returns the current active breakpoint */\n active: () => Breakpoint;\n} & Record<Breakpoint, boolean>;\n\n/**\n * @name useBreakpoints\n * @description - Hook that manages breakpoints\n * @category Browser\n *\n * @template {string} Breakpoint The name of the breakpoint\n * @param {Breakpoints<Breakpoint>} breakpoints The breakpoints to use\n * @param {UseBreakpointsStrategy} [strategy=min-width] The strategy to use for matching\n * @returns {UseBreakpointsReturn<Breakpoint>} An object containing the current breakpoint\n *\n * @example\n * const { greaterOrEqual, smallerOrEqual, current } = useBreakpoints({ mobile: 0, tablet: 640, laptop: 1024, desktop: 1280 });\n */\nexport const useBreakpoints = <Breakpoint extends string>(\n breakpoints: Breakpoints<Breakpoint>,\n strategy: UseBreakpointsStrategy = 'mobile-first'\n): UseBreakpointsReturn<Breakpoint> => {\n const rerender = useRerender();\n\n const getValue = (breakpoint: Breakpoint, delta?: number) => {\n if (delta) return `${Number(breakpoints[breakpoint]) + delta}px`;\n return `${breakpoints[breakpoint]}px`;\n };\n\n useEffect(() => {\n const onResize = () => rerender.update();\n window.addEventListener('resize', onResize);\n return () => {\n window.removeEventListener('resize', onResize);\n };\n }, []);\n\n const greaterOrEqual = (breakpoint: Breakpoint) => match(`(min-width: ${getValue(breakpoint)})`);\n const smallerOrEqual = (breakpoint: Breakpoint) => match(`(max-width: ${getValue(breakpoint)})`);\n const current = () =>\n Object.keys(breakpoints)\n .map((breakpoint) => [breakpoint, greaterOrEqual(breakpoint as Breakpoint)])\n .filter(([, value]) => value)\n .map(([breakpoint]) => breakpoint) as Breakpoint[];\n const active = () => {\n const breakpoints = current();\n return (breakpoints.length ? breakpoints.at(-1) : undefined) as Breakpoint;\n };\n\n const greater = (breakpoint: Breakpoint) => match(`(min-width: ${getValue(breakpoint, 0.1)})`);\n const smaller = (breakpoint: Breakpoint) => match(`(max-width: ${getValue(breakpoint, -0.1)})`);\n const between = (a: Breakpoint, b: Breakpoint) =>\n match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n\n const breakpointsKeys = (Object.keys(breakpoints) as Breakpoint[]).reduce(\n (acc, breakpoint) => {\n const value =\n strategy === 'mobile-first' ? greaterOrEqual(breakpoint) : smallerOrEqual(breakpoint);\n acc[breakpoint] = value;\n return acc;\n },\n {} as Record<Breakpoint, boolean>\n );\n\n return {\n current,\n greaterOrEqual,\n smallerOrEqual,\n active,\n greater,\n smaller,\n between,\n isGreater: greater,\n isGreaterOrEqual: greaterOrEqual,\n isSmaller: smaller,\n isSmallerOrEqual: smallerOrEqual,\n isInBetween: between,\n ...breakpointsKeys\n };\n};\n\nexport * from './constants/breakpoints';\n"],"names":["match","query","window","matchMedia","matches","useBreakpoints","breakpoints","strategy","arguments","length","undefined","rerender","useRerender","getValue","breakpoint","delta","concat","Number","useEffect","onResize","update","addEventListener","removeEventListener","greaterOrEqual","smallerOrEqual","current","Object","keys","map","filter","_ref","_slicedToArray","_ref3","greater","smaller","between","a","b","breakpointsKeys","reduce","acc","value","_objectSpread","active","at","isGreater","isGreaterOrEqual","isSmaller","isSmallerOrEqual","isInBetween"],"mappings":";uZAUA,IAAMA,EAAQ,SAACC,GAAa,OAAKC,OAAOC,WAAWF,GAAOG,OAAO,EA2CpDC,EAAiB,SAC5BC,GAEqC,IADrCC,EAAgCC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,eAE7BG,EAAWC,IAEXC,EAAW,SAACC,EAAwBC,GACxC,MAAWC,GAAAA,OAAPD,EAAiBE,OAAOX,EAAYQ,IAAeC,EAC7CT,EAAYQ,GADsC,OAI9DI,GAAU,WACR,IAAMC,EAAW,WAAH,OAASR,EAASS,QAAQ,EAExC,OADAlB,OAAOmB,iBAAiB,SAAUF,GAC3B,WACLjB,OAAOoB,oBAAoB,SAAUH,GAExC,GAAE,IAEH,IAAMI,EAAiB,SAACT,GAAsB,OAAKd,iBAAKgB,OAAgBH,EAASC,GAAW,KAAI,EAC1FU,EAAiB,SAACV,GAAsB,OAAKd,iBAAKgB,OAAgBH,EAASC,GAAW,KAAI,EAC1FW,EAAU,WAAH,OACXC,OAAOC,KAAKrB,GACTsB,KAAI,SAACd,GAAU,MAAK,CAACA,EAAYS,EAAeT,GAA0B,IAC1Ee,QAAO,SAAAC,GAAS,OAATC,EAAAD,EAAA,GAAS,EAAW,IAC3BF,KAAI,SAAAI,GAAY,OAAZD,EAAAC,EAAA,GAAY,OAMfC,EAAU,SAACnB,GAAsB,OAAKd,EAAKgB,eAAAA,OAAgBH,EAASC,EAAY,IAAI,KAAI,EACxFoB,EAAU,SAACpB,GAAsB,OAAKd,EAAK,eAAAgB,OAAgBH,EAASC,GAAa,IAAI,KAAI,EACzFqB,EAAU,SAACC,EAAeC,GAAa,OAC3CrC,EAAKgB,eAAAA,OAAgBH,EAASuB,GAAE,sBAAApB,OAAqBH,EAASwB,GAAI,SAAQ,EAEtEC,EAAmBZ,OAAOC,KAAKrB,GAA8BiC,QACjE,SAACC,EAAK1B,GACJ,IAAM2B,EACS,iBAAblC,EAA8BgB,EAAeT,GAAcU,EAAeV,GAE5E,OADA0B,EAAI1B,GAAc2B,EACXD,CACR,GACD,CACF,GAEA,OAAAE,EAAA,CACEjB,QAAAA,EACAF,eAAAA,EACAC,eAAAA,EACAmB,OAxBa,WACb,IAAMrC,EAAcmB,IACpB,OAAQnB,EAAYG,OAASH,EAAYsC,IAAI,QAAKlC,GAuBlDuB,QAAAA,EACAC,QAAAA,EACAC,QAAAA,EACAU,UAAWZ,EACXa,iBAAkBvB,EAClBwB,UAAWb,EACXc,iBAAkBxB,EAClByB,YAAad,GACVG,EAEP"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
2
|
import{useSyncExternalStore as n}from"react";var e=function(){return navigator.language},r=function(){return"undetermined"},t=function(n){return window.addEventListener("languagechange",n),function(){return window.removeEventListener("languagechange",n)}},u=function(){return n(t,e,r)};export{u as useBrowserLanguage};
|
|
3
3
|
//# sourceMappingURL=useBrowserLanguage.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 t,useRef as r,useEffect as n}from"react";import{getElement as o}from"../../utils/helpers/getElement.js";import"../../utils/helpers/isClient.js";var i=function(){var i=void 0===(arguments.length<=1?void 0:arguments[1])||arguments.length<=0?void 0:arguments[0],u=(arguments.length<=1?void 0:arguments[1])?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],s=t(),a=e(s,2),v=a[0],l=a[1],c=r(u);if(c.current=u,n((function(){if(i||v){var e=function(e){if(Array.isArray(i)){if(!i.length)return;var t=i.every((function(t){var r=o(t);return r&&!r.contains(e.target)}));t&&c.current(e)}else{var r=i?o(i):v;r&&!r.contains(e.target)&&c.current(e)}};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}}),[v,i]),!i)return l};export{i as useClickOutside};
|
|
3
3
|
//# sourceMappingURL=useClickOutside.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e,d as t,e as n}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as e,d as t,e as n}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as r,useEffect as o,useCallback as a}from"react";import{usePermission as i}from"../usePermission/usePermission.js";import"../useEvent/useEvent.js";var c=function(e){return"granted"===e||"prompt"===e},u=function(e){var t=document.createElement("textarea");t.value=e,t.readOnly=!0,t.style.fontSize="16px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)},l=function(l){var d,s=navigator&&"clipboard"in navigator,v=r(null),p=e(v,2),m=p[0],f=p[1],x=i("clipboard-read"),b=i("clipboard-write"),g=null!==(d=null==l?void 0:l.enabled)&&void 0!==d&&d,y=function(){var e=t(n().mark((function e(){var t,r,o,a,i,u,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!s||!c(x.state)){e.next=8;break}return e.next=4,navigator.clipboard.readText();case 4:a=e.sent,f(a),e.next=9;break;case 8:f(null!==(t=null===(r=document)||void 0===r||null===(o=r.getSelection)||void 0===o||null===(o=o.call(r))||void 0===o?void 0:o.toString())&&void 0!==t?t:"");case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),f(null!==(i=null===(u=document)||void 0===u||null===(l=u.getSelection)||void 0===l||null===(l=l.call(u))||void 0===l?void 0:l.toString())&&void 0!==i?i:"");case 14:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}();o((function(){if(g)return document.addEventListener("copy",y),document.addEventListener("cut",y),function(){document.removeEventListener("copy",y),document.removeEventListener("cut",y)}}),[g]);var h=a(function(){var e=t(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!s&&!c(b.state)){e.next=6;break}return e.next=4,navigator.clipboard.writeText(t);case 4:e.next=7;break;case 6:u(t);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),u(t);case 12:f(t);case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),[]);return{supported:s,value:m,copy:h}};export{c as isPermissionAllowed,u as legacyCopyToClipboard,l as useClipboard};
|
|
3
3
|
//# sourceMappingURL=useClipboard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useClipboard.js","sources":["../../../../src/hooks/useClipboard/useClipboard.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\
|
|
1
|
+
{"version":3,"file":"useClipboard.js","sources":["../../../../src/hooks/useClipboard/useClipboard.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nimport { usePermission } from '../usePermission/usePermission';\n\nexport const isPermissionAllowed = (status: PermissionState) =>\n status === 'granted' || status === 'prompt';\n\nexport const legacyCopyToClipboard = (value: string) => {\n const tempTextArea = document.createElement('textarea');\n tempTextArea.value = value;\n tempTextArea.readOnly = true;\n tempTextArea.style.fontSize = '16px';\n document.body.appendChild(tempTextArea);\n tempTextArea.select();\n document.execCommand('copy');\n document.body.removeChild(tempTextArea);\n};\n\n/** The use copy to clipboard return type */\nexport interface UseCopyToClipboardReturn {\n /** The copied value */\n value: string | null;\n /** Function to copy to clipboard */\n copy: (value: string) => Promise<void>;\n /** Whether the copy to clipboard is supported */\n supported: boolean;\n}\n\n/** The use copy to clipboard params type */\nexport interface UseCopyToClipboardParams {\n /** Whether the copy to clipboard is enabled */\n enabled: boolean;\n}\n\n/**\n * @name useClipboard\n * @description - Hook that manages a copy to clipboard\n * @category Browser\n *\n * @param {boolean} [params.enabled=false] Whether the copy to clipboard is enabled\n * @returns {UseCopyToClipboardReturn} An object containing the boolean state value and utility functions to manipulate the state\n *\n * @example\n * const { supported, value, copy } = useClipboard();\n */\nexport const useClipboard = (params?: UseCopyToClipboardParams): UseCopyToClipboardReturn => {\n const supported = navigator && 'clipboard' in navigator;\n\n const [value, setValue] = useState<string | null>(null);\n const clipboardReadPermission = usePermission('clipboard-read');\n const clipboardWritePermissionWrite = usePermission('clipboard-write');\n\n const enabled = params?.enabled ?? false;\n\n const set = async () => {\n try {\n if (supported && isPermissionAllowed(clipboardReadPermission.state)) {\n const value = await navigator.clipboard.readText();\n setValue(value);\n } else setValue(document?.getSelection?.()?.toString() ?? '');\n } catch {\n setValue(document?.getSelection?.()?.toString() ?? '');\n }\n };\n\n useEffect(() => {\n if (!enabled) return;\n\n document.addEventListener('copy', set);\n document.addEventListener('cut', set);\n return () => {\n document.removeEventListener('copy', set);\n document.removeEventListener('cut', set);\n };\n }, [enabled]);\n\n const copy = useCallback(async (value: string) => {\n try {\n if (supported || isPermissionAllowed(clipboardWritePermissionWrite.state)) {\n await navigator.clipboard.writeText(value);\n } else {\n legacyCopyToClipboard(value);\n }\n } catch {\n legacyCopyToClipboard(value);\n }\n\n setValue(value);\n }, []);\n\n return { supported, value, copy };\n};\n"],"names":["isPermissionAllowed","status","legacyCopyToClipboard","value","tempTextArea","document","createElement","readOnly","style","fontSize","body","appendChild","select","execCommand","removeChild","useClipboard","params","_params$enabled","supported","navigator","_useState","useState","_useState2","_slicedToArray","setValue","clipboardReadPermission","usePermission","clipboardWritePermissionWrite","enabled","set","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_document$getSelectio","_document","_document$getSelectio2","_value","_document$getSelectio3","_document2","_document2$getSelecti","wrap","_context","prev","next","state","clipboard","readText","sent","getSelection","call","toString","t0","stop","apply","this","arguments","useEffect","addEventListener","removeEventListener","copy","useCallback","_ref2","_callee2","_context2","writeText","_x"],"mappings":";qPAIaA,EAAsB,SAACC,GAAuB,MAC9C,YAAXA,GAAmC,WAAXA,CAAmB,EAEhCC,EAAwB,SAACC,GACpC,IAAMC,EAAeC,SAASC,cAAc,YAC5CF,EAAaD,MAAQA,EACrBC,EAAaG,UAAW,EACxBH,EAAaI,MAAMC,SAAW,OAC9BJ,SAASK,KAAKC,YAAYP,GAC1BA,EAAaQ,SACbP,SAASQ,YAAY,QACrBR,SAASK,KAAKI,YAAYV,EAC5B,EA6BaW,EAAe,SAACC,GAAgE,IAAAC,EACrFC,EAAYC,WAAa,cAAeA,UAE9CC,EAA0BC,EAAwB,MAAKC,EAAAC,EAAAH,EAAA,GAAhDjB,EAAKmB,EAAA,GAAEE,EAAQF,EAAA,GAChBG,EAA0BC,EAAc,kBACxCC,EAAgCD,EAAc,mBAE9CE,EAAyBX,QAAlBA,EAAGD,aAAM,EAANA,EAAQY,eAAOX,IAAAA,GAAAA,EAEzBY,EAAG,WAAA,IAAAC,EAAAC,EAAAC,IAAAC,MAAG,SAAAC,IAAA,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAA,OAAAT,IAAAU,MAAA,SAAAC,GAAA,cAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,GAAAF,EAAAC,KAAA,GAEJ1B,IAAalB,EAAoByB,EAAwBqB,OAAM,CAAAH,EAAAE,KAAA,EAAA,KAAA,CAAA,OAAAF,EAAAE,KAAA,EAC7C1B,UAAU4B,UAAUC,WAAU,KAAA,EAA5C7C,EAAKwC,EAAAM,KACXzB,EAASrB,GAAOwC,EAAAE,KAAA,EAAA,MAAA,KAAA,EACXrB,EAA+CW,QAAvCA,EAASC,QAATA,EAAC/B,gBAAQgC,IAAAD,GAAcC,QAAdA,EAARD,EAAUc,wBAAYb,GAAIA,QAAJA,EAAtBA,EAAAc,KAAAf,cAA0BC,SAA1BA,EAA4Be,sBAAUjB,EAAAA,EAAI,IAAI,KAAA,EAAAQ,EAAAE,KAAA,GAAA,MAAA,KAAA,GAAAF,EAAAC,KAAA,GAAAD,EAAAU,GAAAV,EAAA,MAAA,GAE9DnB,EAA+Ce,QAAvCA,EAASC,QAATA,EAACnC,gBAAQoC,IAAAD,GAAcC,QAAdA,EAARD,EAAUU,wBAAYT,GAAIA,QAAJA,EAAtBA,EAAAU,KAAAX,cAA0BC,SAA1BA,EAA4BW,sBAAUb,EAAAA,EAAI,IAAI,KAAA,GAAA,IAAA,MAAA,OAAAI,EAAAW,OAAA,GAAApB,EAAA,KAAA,CAAA,CAAA,EAAA,KAE1D,KAAA,OAAA,WATQ,OAAAJ,EAAAyB,MAAAC,KAAAC,UAAA,EAAA,GAWTC,GAAU,WACR,GAAK9B,EAIL,OAFAvB,SAASsD,iBAAiB,OAAQ9B,GAClCxB,SAASsD,iBAAiB,MAAO9B,GAC1B,WACLxB,SAASuD,oBAAoB,OAAQ/B,GACrCxB,SAASuD,oBAAoB,MAAO/B,GAExC,GAAG,CAACD,IAEJ,IAAMiC,EAAOC,EAAW,WAAA,IAAAC,EAAAhC,EAAAC,IAAAC,MAAC,SAAA+B,EAAO7D,GAAa,OAAA6B,IAAAU,MAAA,SAAAuB,GAAA,cAAAA,EAAArB,KAAAqB,EAAApB,MAAA,KAAA,EAAA,GAAAoB,EAAArB,KAAA,GAErC1B,IAAalB,EAAoB2B,EAA8BmB,OAAM,CAAAmB,EAAApB,KAAA,EAAA,KAAA,CAAA,OAAAoB,EAAApB,KAAA,EACjE1B,UAAU4B,UAAUmB,UAAU/D,GAAM,KAAA,EAAA8D,EAAApB,KAAA,EAAA,MAAA,KAAA,EAE1C3C,EAAsBC,GAAO,KAAA,EAAA8D,EAAApB,KAAA,GAAA,MAAA,KAAA,EAAAoB,EAAArB,KAAA,EAAAqB,EAAAZ,GAAAY,EAAA,MAAA,GAG/B/D,EAAsBC,GAAO,KAAA,GAG/BqB,EAASrB,GAAO,KAAA,GAAA,IAAA,MAAA,OAAA8D,EAAAX,OAAA,GAAAU,EAAA,KAAA,CAAA,CAAA,EAAA,IACjB,KAAA,OAAA,SAAAG,GAAA,OAAAJ,EAAAR,MAAAC,KAAAC,UAAA,CAAA,CAZuB,GAYrB,IAEH,MAAO,CAAEvC,UAAAA,EAAWf,MAAAA,EAAO0D,KAAAA,EAC7B"}
|
|
@@ -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 r}from"react";var e=function(){for(var e,t,o,u=arguments.length,i=new Array(u),a=0;a<u;a++)i[a]=arguments[a];var l="number"==typeof i[0]?i[0]:null===(e=i[0])||void 0===e?void 0:e.initialValue,m="number"==typeof i[0]?null!==(t=i[1])&&void 0!==t?t:{}:null!==(o=i[0])&&void 0!==o?o:{},f=m.max,v=void 0===f?Number.POSITIVE_INFINITY:f,p=m.min,c=void 0===p?Number.NEGATIVE_INFINITY:p,b=r(null!=l?l:0),d=n(b,2),h=d[0],I=d[1];return{value:h,set:function(n){I((function(r){return Math.max(c,Math.min(v,"number"==typeof n?n:n(r)))}))},inc:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;I((function(r){return"number"==typeof v&&r===v?r:Math.max(Math.min(v,r+n),c)}))},dec:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;I((function(r){return"number"==typeof c&&r===c?r:Math.min(Math.max(c,r-n),v)}))},reset:function(){var n=null!=l?l:0;return"number"==typeof v&&n>v?I(v):"number"==typeof c&&n<c?I(c):void I(n)}}};export{e as useCounter};
|
|
3
3
|
//# sourceMappingURL=useCounter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCounter.js","sources":["../../../../src/hooks/useCounter/useCounter.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from 'react';\
|
|
1
|
+
{"version":3,"file":"useCounter.js","sources":["../../../../src/hooks/useCounter/useCounter.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from 'react';\nimport { useState } from 'react';\n\n/** The use counter options */\nexport interface UseCounterOptions {\n /** The min of count value */\n min?: number;\n /** The max of count value */\n max?: number;\n}\n\n/** The use counter return type */\nexport interface UseCounterReturn {\n /** The current count value */\n value: number;\n /** Function to set a specific value to the counter */\n set: Dispatch<SetStateAction<number>>;\n /** Function to reset the counter to its initial value. */\n reset: () => void;\n /** Function to increment the counter */\n inc: (value?: number) => void;\n /** Function to decrement the counter */\n dec: (value?: number) => void;\n}\n\nexport interface UseCounter {\n (initialValue?: number, options?: UseCounterOptions): UseCounterReturn;\n\n (options: UseCounterOptions & { initialValue?: number }, initialValue?: never): UseCounterReturn;\n}\n\n/**\n * @name useCounter\n * @description - Hook that manages a counter with increment, decrement, reset, and set functionalities\n * @category Utilities\n *\n * @overload\n * @param {number} [initialValue=0] The initial number value\n * @param {number} [options.min=Number.NEGATIVE_INFINITY] The min of count value\n * @param {number} [options.max=Number.POSITIVE_INFINITY] The max of count value\n * @returns {UseCounterReturn} An object containing the current count and functions to interact with the counter\n\n * @overload\n * @param {number} [params.initialValue=0] The initial number value\n * @param {number} [params.min=Number.NEGATIVE_INFINITY] The min of count value\n * @param {number} [params.max=Number.POSITIVE_INFINITY] The max of count value\n * @returns {UseCounterReturn} An object containing the current count and functions to interact with the counter\n *\n * @example\n * const { count, dec, inc, reset, set } = useCounter(5);\n *\n * @example\n * const { count, dec, inc, reset, set } = useCounter({ initialValue: 5, min: 0, max: 10 });\n */\nexport const useCounter = ((...params: any[]) => {\n const initialValue =\n typeof params[0] === 'number'\n ? params[0]\n : (params[0] as UseCounterOptions & { initialValue?: number })?.initialValue;\n const { max = Number.POSITIVE_INFINITY, min = Number.NEGATIVE_INFINITY } =\n typeof params[0] === 'number'\n ? ((params[1] ?? {}) as UseCounterOptions)\n : ((params[0] ?? {}) as UseCounterOptions & { initialValue?: number });\n\n const [value, setValue] = useState(initialValue ?? 0);\n\n const inc = (value: number = 1) => {\n setValue((prevValue) => {\n if (typeof max === 'number' && prevValue === max) return prevValue;\n return Math.max(Math.min(max, prevValue + value), min);\n });\n };\n\n const dec = (value: number = 1) => {\n setValue((prevValue) => {\n if (typeof min === 'number' && prevValue === min) return prevValue;\n return Math.min(Math.max(min, prevValue - value), max);\n });\n };\n\n const reset = () => {\n const value = initialValue ?? 0;\n if (typeof max === 'number' && value > max) return setValue(max);\n if (typeof min === 'number' && value < min) return setValue(min);\n setValue(value);\n };\n\n const set = (value: SetStateAction<number>) => {\n setValue((prevValue) => {\n const updatedCount = Math.max(\n min,\n Math.min(max, typeof value === 'number' ? value : value(prevValue))\n );\n\n return updatedCount;\n });\n };\n\n return { value, set, inc, dec, reset };\n}) as UseCounter;\n"],"names":["useCounter","_params$","_params$2","_params$3","_len","arguments","length","params","Array","_key","initialValue","_ref","_ref$max","max","Number","POSITIVE_INFINITY","_ref$min","min","NEGATIVE_INFINITY","_useState","useState","_useState2","_slicedToArray","value","setValue","set","prevValue","Math","inc","undefined","dec","reset"],"mappings":";qGAsDaA,EAAc,WAAsB,IAAA,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,UAAAC,OAAlBC,EAAMC,IAAAA,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAANF,EAAME,GAAAJ,UAAAI,GACnC,IAAMC,EACiB,iBAAdH,EAAO,GACVA,EAAO,GACG,QADDN,EACRM,EAAO,UAAE,IAAAN,OAAA,EAAVA,EAA8DS,aACpEC,EACuB,iBAAdJ,EAAO,GACCL,QADcA,EACvBK,EAAO,UAAEL,IAAAA,EAAAA,EAAI,CAAA,UAAEC,EACfI,EAAO,UAAE,IAAAJ,EAAAA,EAAI,CAAqD,EAAAS,EAAAD,EAHlEE,IAAAA,OAAG,IAAAD,EAAGE,OAAOC,kBAAiBH,EAAAI,EAAAL,EAAEM,IAAAA,OAAG,IAAAD,EAAGF,OAAOI,kBAAiBF,EAKtEG,EAA0BC,EAASV,QAAAA,EAAgB,GAAEW,EAAAC,EAAAH,EAAA,GAA9CI,EAAKF,EAAA,GAAEG,EAAQH,EAAA,GAkCtB,MAAO,CAAEE,MAAAA,EAAOE,IAXJ,SAACF,GACXC,GAAS,SAACE,GAMR,OALqBC,KAAKd,IACxBI,EACAU,KAAKV,IAAIJ,EAAsB,iBAAVU,EAAqBA,EAAQA,EAAMG,IAI5D,KAGmBE,IAhCT,WAAuB,IAAtBL,EAAalB,UAAAC,OAAA,QAAAuB,IAAAxB,UAAA,GAAAA,UAAA,GAAG,EAC3BmB,GAAS,SAACE,GACR,MAAmB,iBAARb,GAAoBa,IAAcb,EAAYa,EAClDC,KAAKd,IAAIc,KAAKV,IAAIJ,EAAKa,EAAYH,GAAQN,EACpD,KA4BwBa,IAzBd,WAAuB,IAAtBP,EAAalB,UAAAC,OAAA,QAAAuB,IAAAxB,UAAA,GAAAA,UAAA,GAAG,EAC3BmB,GAAS,SAACE,GACR,MAAmB,iBAART,GAAoBS,IAAcT,EAAYS,EAClDC,KAAKV,IAAIU,KAAKd,IAAII,EAAKS,EAAYH,GAAQV,EACpD,KAqB6BkB,MAlBjB,WACZ,IAAMR,EAAQb,QAAAA,EAAgB,EAC9B,MAAmB,iBAARG,GAAoBU,EAAQV,EAAYW,EAASX,GACzC,iBAARI,GAAoBM,EAAQN,EAAYO,EAASP,QAC5DO,EAASD,IAeb"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{c as e,_ as t}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{c as e,_ as t}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as o}from"react";import{getElement as l}from"../../utils/helpers/getElement.js";import"../../utils/helpers/isClient.js";import{useMount as i}from"../useMount/useMount.js";import{useMutationObserver as n}from"../useMutationObserver/useMutationObserver.js";var r=function(){var r="object"===e(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:void 0,u=r?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],s=r?arguments.length<=2?void 0:arguments[2]:arguments.length<=1?void 0:arguments[1],d=o(null!=s?s:""),v=t(d,2),m=v[0],a=v[1],p=function(e){var t,o=l(null!=r?r:null===(t=window)||void 0===t||null===(t=t.document)||void 0===t?void 0:t.documentElement);if(o.style){if(!e)return o.style.removeProperty(u),void a(e);o.style.setProperty(u,e),a(e)}};return i((function(){s&&p(s)})),n(window,(function(){var e,t,o=l(null!=r?r:null===(e=window)||void 0===e||null===(e=e.document)||void 0===e?void 0:e.documentElement);if(o){var i=null===(t=window.getComputedStyle(o).getPropertyValue(u))||void 0===t?void 0:t.trim();a(null!=i?i:s)}}),{attributeFilter:["style","class"]}),{value:m,set:p}};export{r as useCssVar};
|
|
3
3
|
//# sourceMappingURL=useCssVar.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
2
|
import{useMemo as r}from"react";import{debounce as e}from"../../utils/helpers/debounce.js";import"../../utils/helpers/isClient.js";import{useEvent as t}from"../useEvent/useEvent.js";var o=function(o,i){var n=t(o);return r((function(){return e(n,i)}),[i])};export{o as useDebounceCallback};
|
|
3
3
|
//# sourceMappingURL=useDebounceCallback.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{useRef as r,useState as t,useEffect as o}from"react";import{useDebounceCallback as s}from"../useDebounceCallback/useDebounceCallback.js";import"../../utils/helpers/debounce.js";import"../../utils/helpers/isClient.js";import"../useEvent/useEvent.js";var u=function(u,l){var n=r(u),i=t(u),p=e(i,2),c=p[0],a=p[1],m=s(a,l);return o((function(){n.current!==u&&(m(u),n.current=u)}),[u]),c};export{u as useDebounceValue};
|
|
3
3
|
//# sourceMappingURL=useDebounceValue.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 l}from"react";var o=function(o,e){var t=l(o),a=r(t,2),n=a[0];return[null==n?e:n,a[1]]};export{o as useDefault};
|
|
3
3
|
//# sourceMappingURL=useDefault.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as l,b as n}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as l,b as n}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as e,useRef as t,useEffect as a}from"react";import"../../utils/helpers/isClient.js";import{throttle as i}from"../../utils/helpers/throttle.js";var r=function(r){var o,c,u=null===(o=null==r?void 0:r.enabled)||void 0===o||o,v=null!==(c=null==r?void 0:r.delay)&&void 0!==c?c:1e3,d=e({interval:0,rotationRate:{alpha:null,beta:null,gamma:null},acceleration:{x:null,y:null,z:null},accelerationIncludingGravity:{x:null,y:null,z:null}}),s=l(d,2),m=s[0],p=s[1],f=t(null==r?void 0:r.callback);return f.current=null==r?void 0:r.callback,a((function(){if(u){var l=i((function(l){var e;null===(e=f.current)||void 0===e||e.call(f,l),p({interval:l.interval,rotationRate:n(n({},m.rotationRate),l.rotationRate),acceleration:n(n({},m.acceleration),l.acceleration),accelerationIncludingGravity:n(n({},m.accelerationIncludingGravity),l.accelerationIncludingGravity)})}),v);return window.addEventListener("devicemotion",l),function(){window.removeEventListener("devicemotion",l)}}}),[v,u]),m};export{r as useDeviceMotion};
|
|
3
3
|
//# sourceMappingURL=useDeviceMotion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDeviceMotion.js","sources":["../../../../src/hooks/useDeviceMotion/useDeviceMotion.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\
|
|
1
|
+
{"version":3,"file":"useDeviceMotion.js","sources":["../../../../src/hooks/useDeviceMotion/useDeviceMotion.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nimport { throttle } from '@/utils/helpers';\n\nexport interface UseDeviceMotionReturn {\n interval: DeviceMotionEvent['interval'];\n acceleration: DeviceMotionEventAcceleration;\n accelerationIncludingGravity: DeviceMotionEventAcceleration;\n rotationRate: DeviceMotionEventRotationRate;\n}\n\nexport interface UseDeviceMotionParams {\n /** The delay in milliseconds */\n delay?: number;\n /** The callback function to be invoked */\n callback?: (event: DeviceMotionEvent) => void;\n /** Whether to enable the hook */\n enabled?: boolean;\n}\n\n/**\n * @name useDeviceMotion\n * @description Hook that work with device motion\n * @category Utilities\n *\n * @param {number} [delay=1000] The delay in milliseconds\n * @param {(event: DeviceMotionEvent) => void} [callback] The callback function to be invoked\n * @param {boolean} [enabled=true] Whether to enable the hook\n * @returns {UseDeviceMotionReturn} The device motion data and interval\n *\n * @example\n * const { interval, rotationRate, acceleration, accelerationIncludingGravity } = useDeviceMotion();\n */\nexport const useDeviceMotion = (params?: UseDeviceMotionParams) => {\n const enabled = params?.enabled ?? true;\n const delay = params?.delay ?? 1000;\n const [value, setValue] = useState<UseDeviceMotionReturn>({\n interval: 0,\n rotationRate: { alpha: null, beta: null, gamma: null },\n acceleration: { x: null, y: null, z: null },\n accelerationIncludingGravity: { x: null, y: null, z: null }\n });\n const internalCallbackRef = useRef(params?.callback);\n internalCallbackRef.current = params?.callback;\n\n useEffect(() => {\n if (!enabled) return;\n\n const onDeviceMotion = throttle<[DeviceMotionEvent]>((event) => {\n internalCallbackRef.current?.(event);\n setValue({\n interval: event.interval,\n rotationRate: {\n ...value.rotationRate,\n ...event.rotationRate\n },\n acceleration: {\n ...value.acceleration,\n ...event.acceleration\n },\n accelerationIncludingGravity: {\n ...value.accelerationIncludingGravity,\n ...event.accelerationIncludingGravity\n }\n });\n }, delay);\n\n window.addEventListener('devicemotion', onDeviceMotion);\n\n return () => {\n window.removeEventListener('devicemotion', onDeviceMotion);\n };\n }, [delay, enabled]);\n\n return value;\n};\n"],"names":["useDeviceMotion","params","_params$enabled","_params$delay","enabled","delay","_useState","useState","interval","rotationRate","alpha","beta","gamma","acceleration","x","y","z","accelerationIncludingGravity","_useState2","_slicedToArray","value","setValue","internalCallbackRef","useRef","callback","current","useEffect","onDeviceMotion","throttle","event","_internalCallbackRef$","call","_objectSpread","window","addEventListener","removeEventListener"],"mappings":";0OAiCaA,EAAkB,SAACC,GAAmC,IAAAC,EAAAC,EAC3DC,EAAyBF,QAAlBA,EAAGD,aAAM,EAANA,EAAQG,eAAOF,IAAAA,GAAAA,EACzBG,EAAqBF,QAAhBA,EAAGF,aAAM,EAANA,EAAQI,aAAKF,IAAAA,EAAAA,EAAI,IAC/BG,EAA0BC,EAAgC,CACxDC,SAAU,EACVC,aAAc,CAAEC,MAAO,KAAMC,KAAM,KAAMC,MAAO,MAChDC,aAAc,CAAEC,EAAG,KAAMC,EAAG,KAAMC,EAAG,MACrCC,6BAA8B,CAAEH,EAAG,KAAMC,EAAG,KAAMC,EAAG,QACrDE,EAAAC,EAAAb,EAAA,GALKc,EAAKF,EAAA,GAAEG,EAAQH,EAAA,GAMhBI,EAAsBC,EAAOtB,aAAAA,EAAAA,EAAQuB,UAgC3C,OA/BAF,EAAoBG,QAAUxB,aAAM,EAANA,EAAQuB,SAEtCE,GAAU,WACR,GAAKtB,EAAL,CAEA,IAAMuB,EAAiBC,GAA8B,SAACC,GAAU,IAAAC,EACnCA,QAA3BA,EAAAR,EAAoBG,eAApBK,IAA2BA,GAA3BA,EAAAC,KAAAT,EAA8BO,GAC9BR,EAAS,CACPb,SAAUqB,EAAMrB,SAChBC,aAAYuB,EAAAA,EACPZ,CAAAA,EAAAA,EAAMX,cACNoB,EAAMpB,cAEXI,aAAYmB,EAAAA,EACPZ,CAAAA,EAAAA,EAAMP,cACNgB,EAAMhB,cAEXI,6BAA4Be,EAAAA,EAAA,CAAA,EACvBZ,EAAMH,8BACNY,EAAMZ,+BAGd,GAAEZ,GAIH,OAFA4B,OAAOC,iBAAiB,eAAgBP,GAEjC,WACLM,OAAOE,oBAAoB,eAAgBR,GAxB/B,CA0BhB,GAAG,CAACtB,EAAOD,IAEJgB,CACT"}
|
|
@@ -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 a}from"react";var t=function(){var t=window&&"DeviceOrientationEvent"in window,i=n({alpha:null,beta:null,gamma:null,absolute:!1}),o=e(i,2),r=o[0],l=o[1];return a((function(){if(t){var e=function(e){return l({alpha:e.alpha,beta:e.beta,gamma:e.gamma,absolute:e.absolute})};return window.addEventListener("deviceorientation",e),function(){window.removeEventListener("deviceorientation",e)}}}),[]),{supported:t,value:r}};export{t as useDeviceOrientation};
|
|
3
3
|
//# sourceMappingURL=useDeviceOrientation.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}from"react";import{useIsomorphicLayoutEffect as t}from"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import"../../utils/helpers/isClient.js";var o=function(o,e){var i=r(!0);t((function(){if(!i.current){var r=o();return r&&"function"==typeof r?r:void 0}i.current=!1}),e)};export{o as useDidUpdate};
|
|
3
3
|
//# sourceMappingURL=useDidUpdate.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{useState as r}from"react";var o=function(){var o=arguments.length>1?arguments[1]:void 0,l=r(arguments.length>0&&void 0!==arguments[0]&&arguments[0]),e=n(l,2),t=e[0],u=e[1],i=function(){return u((function(n){var r;return n||(null==o||null===(r=o.onOpen)||void 0===r||r.call(o),!0)}))},c=function(){return u((function(n){var r;return n?(null==o||null===(r=o.onClose)||void 0===r||r.call(o),!1):n}))};return{opened:t,open:i,close:c,toggle:function(){return t?c():i()}}};export{o as useDisclosure};
|
|
3
3
|
//# sourceMappingURL=useDisclosure.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(document,t,r,s)};export{t as useDocumentEvent};
|
|
3
3
|
//# sourceMappingURL=useDocumentEvent.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as t}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as t}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useRef as e,useState as o}from"react";import{useIsomorphicLayoutEffect as r}from"../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";import{useMutationObserver as n}from"../useMutationObserver/useMutationObserver.js";import"../../utils/helpers/isClient.js";import"../../utils/helpers/getElement.js";function i(i,u){var l=e(document.title),m=o(null!=i?i:document.title),s=t(m,2),c=s[0],f=s[1];n(document.head.querySelector("title"),(function(){document&&document.title!==c&&f(document.title)}),{childList:!0}),r((function(){if(null!=u&&u.restoreOnUnmount)return function(){document.title=l.current}}),[]);var p=function(t){var e=t.trim();e.length>0&&(document.title=e)};return r((function(){"string"==typeof i&&p(i)}),[i]),[c,p]}export{i as useDocumentTitle};
|
|
3
3
|
//# sourceMappingURL=useDocumentTitle.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
2
|
import{useSyncExternalStore as n}from"react";var t=function(){return document.visibilityState},e=function(){return"hidden"},i=function(n){return document.addEventListener("visibilitychange",n),function(){document.removeEventListener("visibilitychange",n)}},r=function(){return n(i,t,e)};export{r as useDocumentVisibility};
|
|
3
3
|
//# sourceMappingURL=useDocumentVisibility.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,useCallback as t}from"react";var n=function(n){var e=r(n);return e.current=n,t((function(){return e.current.apply(void 0,arguments)}),[])};export{n as useEvent};
|
|
3
3
|
//# sourceMappingURL=useEvent.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 t,useEffect as n}from"react";import{getElement as r}from"../../utils/helpers/getElement.js";import"../../utils/helpers/isClient.js";import{useEvent as i}from"../useEvent/useEvent.js";var o=function(){var o=(arguments.length<=1?void 0:arguments[1])instanceof Function||arguments.length<=0?void 0:arguments[0],l=o?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0],u=Array.isArray(l)?l:[l],s=o?arguments.length<=2?void 0:arguments[2]:arguments.length<=1?void 0:arguments[1],v=o?arguments.length<=3?void 0:arguments[3]:arguments.length<=2?void 0:arguments[2],f=t(),a=e(f,2),h=a[0],c=a[1],d=i(s);if(n((function(){if(o||h){var e=function(e){return d(e)},t=o?r(o):h;return t?(u.forEach((function(n){return t.addEventListener(n,e,v)})),function(){u.forEach((function(n){return t.removeEventListener(n,e,v)}))}):void 0}}),[o,h,l,v]),!o)return c};export{o as useEventListener};
|
|
3
3
|
//# sourceMappingURL=useEventListener.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r,d as e,e as n}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.72 */
|
|
2
|
+
import{_ as r,d as e,e as n}from"../../_rollupPluginBabelHelpers-DKveiPYY.js";import{useState as o}from"react";var t=function(){var t=window&&"EyeDropper"in window,p=o(arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0),a=r(p,2),i=a[0],u=a[1],s=function(){var r=e(n().mark((function r(e){var o,t;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(window.EyeDropper){r.next=2;break}throw new Error("EyeDropper is not supported");case 2:return o=new window.EyeDropper,r.next=5,o.open(e);case 5:return t=r.sent,u(t.sRGBHex),r.abrupt("return",t);case 8:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}();return{supported:t,value:i,open:s}};export{t as useEyeDropper};
|
|
3
3
|
//# sourceMappingURL=useEyeDropper.js.map
|