@siberiacancode/reactuse 0.0.96 → 0.0.97
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-zZt1zBDH.js → _rollupPluginBabelHelpers-B6-9bMtn.js} +3 -3
- package/dist/cjs/_rollupPluginBabelHelpers-B6-9bMtn.js.map +1 -0
- package/dist/cjs/hooks/index.js +2 -2
- package/dist/cjs/hooks/useActiveElement/useActiveElement.js +2 -2
- package/dist/cjs/hooks/useAsync/useAsync.js +2 -2
- package/dist/cjs/hooks/useBattery/useBattery.js +2 -2
- package/dist/cjs/hooks/useBluetooth/useBluetooth.js +2 -2
- package/dist/cjs/hooks/useBoolean/useBoolean.js +2 -2
- 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/useConst/useConst.js +1 -1
- package/dist/cjs/hooks/useCookie/useCookie.js +2 -2
- package/dist/cjs/hooks/useCookie/useCookie.js.map +1 -1
- package/dist/cjs/hooks/useCounter/useCounter.js +2 -2
- package/dist/cjs/hooks/useCssVar/useCssVar.js +2 -2
- package/dist/cjs/hooks/useDebounceCallback/useDebounceCallback.js +2 -2
- 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/useDevicePixelRatio/useDevicePixelRatio.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/useDisplayMedia/useDisplayMedia.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/useElementSize/useElementSize.js +2 -2
- 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/useFavicon/useFavicon.js +2 -2
- package/dist/cjs/hooks/useField/useField.js +2 -2
- 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/useFps/useFps.js +2 -2
- package/dist/cjs/hooks/useFullscreen/useFullscreen.js +2 -2
- package/dist/cjs/hooks/useGamepad/helpers/index.js +1 -1
- package/dist/cjs/hooks/useGamepad/helpers/mapGamepadToXbox360Controller.js +1 -1
- package/dist/cjs/hooks/useGamepad/useGamepad.js +2 -2
- package/dist/cjs/hooks/useGamepad/useGamepad.js.map +1 -1
- package/dist/cjs/hooks/useGeolocation/useGeolocation.js +2 -2
- package/dist/cjs/hooks/useHash/useHash.js +2 -2
- package/dist/cjs/hooks/useHotkeys/useHotkeys.js +2 -2
- package/dist/cjs/hooks/useHover/useHover.js +2 -2
- package/dist/cjs/hooks/useIdle/useIdle.js +2 -2
- package/dist/cjs/hooks/useImage/useImage.js +2 -2
- package/dist/cjs/hooks/useInfiniteScroll/useInfiniteScroll.js +2 -2
- package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
- package/dist/cjs/hooks/useInterval/useInterval.js +2 -2
- 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/useKeyPressEvent/useKeyPressEvent.js +2 -2
- package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.js.map +1 -1
- package/dist/cjs/hooks/useKeyboard/useKeyboard.js +2 -2
- package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js +2 -2
- package/dist/cjs/hooks/useLastChanged/useLastChanged.js +2 -2
- package/dist/cjs/hooks/useLatest/useLatest.js +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/useMeasure/useMeasure.js.map +1 -1
- 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/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/Paint.js.map +1 -1
- package/dist/cjs/hooks/usePaint/helpers/index.js +3 -0
- package/dist/cjs/hooks/usePaint/usePaint.js +2 -2
- package/dist/cjs/hooks/usePaint/usePaint.js.map +1 -1
- package/dist/cjs/hooks/useParallax/useParallax.js +2 -2
- package/dist/cjs/hooks/usePermission/usePermission.js +2 -2
- package/dist/cjs/hooks/usePointerLock/usePointerLock.js +2 -2
- package/dist/cjs/hooks/usePostMessage/usePostMessage.js +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/useQuery/useQuery.js.map +1 -1
- package/dist/cjs/hooks/useQueue/useQueue.js +2 -2
- 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/useRefState/useRefState.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/useRerender/useRerender.js +1 -1
- package/dist/cjs/hooks/useResizeObserver/useResizeObserver.js +2 -2
- package/dist/cjs/hooks/useScreenOrientation/useScreenOrientation.js +2 -2
- package/dist/cjs/hooks/useScript/useScript.js +2 -2
- package/dist/cjs/hooks/useScroll/useScroll.js +2 -2
- package/dist/cjs/hooks/useScroll/useScroll.js.map +1 -1
- package/dist/cjs/hooks/useScrollIntoView/useScrollIntoView.js +2 -2
- package/dist/cjs/hooks/useScrollTo/useScrollTo.js +2 -2
- 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/useStateHistory/useStateHistory.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/useStorage/useStorage.js +2 -2
- package/dist/cjs/hooks/useTextDirection/useTextDirection.js +2 -2
- package/dist/cjs/hooks/useTextSelection/useTextSelection.js +2 -2
- package/dist/cjs/hooks/useThrottleCallback/useThrottleCallback.js +2 -2
- package/dist/cjs/hooks/useThrottleValue/useThrottleValue.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/useUnmount/useUnmount.js +1 -1
- package/dist/cjs/hooks/useVibrate/useVibrate.js +2 -2
- 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 +2 -2
- package/dist/cjs/hooks/useWindowScroll/useWindowScroll.js +2 -2
- package/dist/cjs/hooks/useWindowSize/useWindowSize.js +2 -2
- package/dist/cjs/hooks/useWizard/useWizard.js +2 -2
- package/dist/cjs/hooks/useWizard/useWizard.js.map +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/utils/helpers/cookie.js +3 -0
- package/dist/cjs/utils/helpers/cookie.js.map +1 -0
- package/dist/cjs/utils/helpers/debounce.js +1 -1
- package/dist/cjs/utils/helpers/getDate.js +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 +2 -2
- package/dist/cjs/utils/helpers/isTarget.js +2 -2
- package/dist/cjs/utils/helpers/throttle.js +1 -1
- package/dist/esm/{_rollupPluginBabelHelpers-B03Kl8w9.js → _rollupPluginBabelHelpers-WrSliisk.js} +3 -3
- package/dist/esm/_rollupPluginBabelHelpers-WrSliisk.js.map +1 -0
- package/dist/esm/hooks/index.js +2 -2
- package/dist/esm/hooks/useActiveElement/useActiveElement.js +2 -2
- package/dist/esm/hooks/useAsync/useAsync.js +2 -2
- package/dist/esm/hooks/useBattery/useBattery.js +2 -2
- package/dist/esm/hooks/useBluetooth/useBluetooth.js +2 -2
- package/dist/esm/hooks/useBoolean/useBoolean.js +2 -2
- 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/useConst/useConst.js +1 -1
- package/dist/esm/hooks/useCookie/useCookie.js +2 -2
- package/dist/esm/hooks/useCookie/useCookie.js.map +1 -1
- package/dist/esm/hooks/useCounter/useCounter.js +2 -2
- package/dist/esm/hooks/useCssVar/useCssVar.js +2 -2
- package/dist/esm/hooks/useDebounceCallback/useDebounceCallback.js +2 -2
- 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/useDeviceOrientation/useDeviceOrientation.js +2 -2
- package/dist/esm/hooks/useDevicePixelRatio/useDevicePixelRatio.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/useDisplayMedia/useDisplayMedia.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/useElementSize/useElementSize.js +2 -2
- 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/useFavicon/useFavicon.js +2 -2
- package/dist/esm/hooks/useField/useField.js +2 -2
- 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/useFps/useFps.js +2 -2
- package/dist/esm/hooks/useFullscreen/useFullscreen.js +2 -2
- package/dist/esm/hooks/useGamepad/helpers/index.js +1 -1
- package/dist/esm/hooks/useGamepad/helpers/mapGamepadToXbox360Controller.js +1 -1
- package/dist/esm/hooks/useGamepad/useGamepad.js +2 -2
- package/dist/esm/hooks/useGamepad/useGamepad.js.map +1 -1
- package/dist/esm/hooks/useGeolocation/useGeolocation.js +2 -2
- package/dist/esm/hooks/useHash/useHash.js +2 -2
- package/dist/esm/hooks/useHotkeys/useHotkeys.js +2 -2
- package/dist/esm/hooks/useHover/useHover.js +2 -2
- package/dist/esm/hooks/useIdle/useIdle.js +2 -2
- package/dist/esm/hooks/useImage/useImage.js +2 -2
- package/dist/esm/hooks/useInfiniteScroll/useInfiniteScroll.js +2 -2
- package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
- package/dist/esm/hooks/useInterval/useInterval.js +2 -2
- 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/useKeyPressEvent/useKeyPressEvent.js +2 -2
- package/dist/esm/hooks/useKeyboard/useKeyboard.js +2 -2
- package/dist/esm/hooks/useKeysPressed/useKeysPressed.js +2 -2
- package/dist/esm/hooks/useLastChanged/useLastChanged.js +2 -2
- package/dist/esm/hooks/useLatest/useLatest.js +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/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/Paint.js.map +1 -1
- package/dist/esm/hooks/usePaint/helpers/index.js +3 -0
- package/dist/esm/hooks/usePaint/usePaint.js +2 -2
- package/dist/esm/hooks/usePaint/usePaint.js.map +1 -1
- package/dist/esm/hooks/useParallax/useParallax.js +2 -2
- package/dist/esm/hooks/usePermission/usePermission.js +2 -2
- package/dist/esm/hooks/usePointerLock/usePointerLock.js +2 -2
- package/dist/esm/hooks/usePostMessage/usePostMessage.js +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/useQuery/useQuery.js.map +1 -1
- package/dist/esm/hooks/useQueue/useQueue.js +2 -2
- 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/useRefState/useRefState.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/useRerender/useRerender.js +1 -1
- package/dist/esm/hooks/useResizeObserver/useResizeObserver.js +2 -2
- package/dist/esm/hooks/useScreenOrientation/useScreenOrientation.js +2 -2
- package/dist/esm/hooks/useScript/useScript.js +2 -2
- package/dist/esm/hooks/useScroll/useScroll.js +2 -2
- package/dist/esm/hooks/useScroll/useScroll.js.map +1 -1
- package/dist/esm/hooks/useScrollIntoView/useScrollIntoView.js +2 -2
- package/dist/esm/hooks/useScrollTo/useScrollTo.js +2 -2
- 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/useStateHistory/useStateHistory.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/useStorage/useStorage.js +2 -2
- package/dist/esm/hooks/useTextDirection/useTextDirection.js +2 -2
- package/dist/esm/hooks/useTextSelection/useTextSelection.js +2 -2
- package/dist/esm/hooks/useThrottleCallback/useThrottleCallback.js +2 -2
- package/dist/esm/hooks/useThrottleValue/useThrottleValue.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/useUnmount/useUnmount.js +1 -1
- package/dist/esm/hooks/useVibrate/useVibrate.js +2 -2
- 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 +2 -2
- package/dist/esm/hooks/useWindowScroll/useWindowScroll.js +2 -2
- package/dist/esm/hooks/useWindowSize/useWindowSize.js +2 -2
- package/dist/esm/hooks/useWizard/useWizard.js +2 -2
- package/dist/esm/hooks/useWizard/useWizard.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/utils/helpers/cookie.js +3 -0
- package/dist/esm/utils/helpers/cookie.js.map +1 -0
- package/dist/esm/utils/helpers/debounce.js +1 -1
- package/dist/esm/utils/helpers/getDate.js +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 +2 -2
- package/dist/esm/utils/helpers/isTarget.js +2 -2
- package/dist/esm/utils/helpers/throttle.js +1 -1
- package/dist/types/index.d.ts +74 -79
- package/package.json +91 -91
- package/dist/cjs/_rollupPluginBabelHelpers-zZt1zBDH.js.map +0 -1
- package/dist/cjs/hooks/useBreakpoints/helpers/breakpoints.js +0 -3
- package/dist/cjs/hooks/useBreakpoints/helpers/breakpoints.js.map +0 -1
- package/dist/cjs/hooks/useBreakpoints/helpers/index.js +0 -3
- package/dist/cjs/hooks/useCookie/helpers/clearCookies.js +0 -3
- package/dist/cjs/hooks/useCookie/helpers/clearCookies.js.map +0 -1
- package/dist/cjs/hooks/useCookie/helpers/getCookies.js +0 -3
- package/dist/cjs/hooks/useCookie/helpers/getCookies.js.map +0 -1
- package/dist/cjs/hooks/useCookie/helpers/index.js +0 -3
- package/dist/cjs/hooks/useCookie/helpers/removeCookie.js +0 -3
- package/dist/cjs/hooks/useCookie/helpers/removeCookie.js.map +0 -1
- package/dist/cjs/hooks/useCookie/helpers/setCookie.js +0 -3
- package/dist/cjs/hooks/useCookie/helpers/setCookie.js.map +0 -1
- package/dist/cjs/hooks/usePaint/helpers/Pointer.js +0 -3
- package/dist/cjs/hooks/usePaint/helpers/Pointer.js.map +0 -1
- package/dist/esm/_rollupPluginBabelHelpers-B03Kl8w9.js.map +0 -1
- package/dist/esm/hooks/useBreakpoints/helpers/breakpoints.js +0 -3
- package/dist/esm/hooks/useBreakpoints/helpers/breakpoints.js.map +0 -1
- package/dist/esm/hooks/useBreakpoints/helpers/index.js +0 -3
- package/dist/esm/hooks/useBreakpoints/helpers/index.js.map +0 -1
- package/dist/esm/hooks/useCookie/helpers/clearCookies.js +0 -3
- package/dist/esm/hooks/useCookie/helpers/clearCookies.js.map +0 -1
- package/dist/esm/hooks/useCookie/helpers/getCookies.js +0 -3
- package/dist/esm/hooks/useCookie/helpers/getCookies.js.map +0 -1
- package/dist/esm/hooks/useCookie/helpers/index.js +0 -3
- package/dist/esm/hooks/useCookie/helpers/index.js.map +0 -1
- package/dist/esm/hooks/useCookie/helpers/removeCookie.js +0 -3
- package/dist/esm/hooks/useCookie/helpers/removeCookie.js.map +0 -1
- package/dist/esm/hooks/useCookie/helpers/setCookie.js +0 -3
- package/dist/esm/hooks/useCookie/helpers/setCookie.js.map +0 -1
- package/dist/esm/hooks/usePaint/helpers/Pointer.js +0 -3
- package/dist/esm/hooks/usePaint/helpers/Pointer.js.map +0 -1
- /package/dist/cjs/hooks/{useBreakpoints → usePaint}/helpers/index.js.map +0 -0
- /package/dist/{cjs/hooks/useCookie → esm/hooks/usePaint}/helpers/index.js.map +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as n,useEffect as t}from"react";import{useRerender as r}from"../useRerender/useRerender.js";var o=function(e){var n,t=null!==(n=e.rangeCount)&&void 0!==n?n:0;return Array.from({length:t},(function(n,t){return e.getRangeAt(t)}))},u=function(){var u,i=r(),c=n("undefined"!=typeof document?document.getSelection():null),l=e(c,2),a=l[0],d=l[1];t((function(){var e=function(){d(document.getSelection()),i()};return document.addEventListener("selectionchange",e),function(){return document.removeEventListener("selectionchange",e)}}),[]);var m=null!==(u=null==a?void 0:a.toString())&&void 0!==u?u:"",f=a?o(a):[],g=f.map((function(e){return e.getBoundingClientRect()}));return{text:m,ranges:f,rects:g,selection:a}};export{o as getRangesSelection,u as useTextSelection};
|
|
3
3
|
//# sourceMappingURL=useTextSelection.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{useMemo as r}from"react";import{
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{useMemo as r}from"react";import{useEvent as t}from"../useEvent/useEvent.js";import{throttle as e}from"../../utils/helpers/throttle.js";var o=function(o,n){var u=t(o);return r((function(){return e(u,n)}),[n])};export{o as useThrottleCallback};
|
|
3
3
|
//# sourceMappingURL=useThrottleCallback.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{_ as r}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useRef as t,useState as e,useEffect as o}from"react";import{useThrottleCallback as l}from"../useThrottleCallback/useThrottleCallback.js";import"../useEvent/useEvent.js";import"../../utils/helpers/throttle.js";var s=function(s,u){var n=t(s),a=e(s),i=r(a,2),p=i[0],m=i[1],c=l(m,u);return o((function(){n.current!==s&&(c(s),n.current=s)}),[s]),p};export{s as useThrottleValue};
|
|
3
3
|
//# sourceMappingURL=useThrottleValue.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{_ as r}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as e}from"react";import{useInterval as t}from"../useInterval/useInterval.js";import{getDate as o}from"../../utils/helpers/getDate.js";var l=function(){var l=e(o()),n=r(l,2),s=n[0],u=n[1];return t((function(){return u(o())}),1e3),s};export{l as useTime};
|
|
3
3
|
//# sourceMappingURL=useTime.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{_ as r}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as e,useRef as t,useEffect as n}from"react";import{useEvent as u}from"../useEvent/useEvent.js";function o(o,c){var i=e(!1),m=r(i,2),a=m[0],f=m[1],l=t(),s=u(o);n((function(){return l.current=setTimeout((function(){s(),f(!0)}),c),function(){clearTimeout(l.current)}}),[c]);return{ready:a,clear:function(){clearTimeout(l.current),f(!0)}}}export{o as useTimeout};
|
|
3
3
|
//# sourceMappingURL=useTimeout.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{b as n,_ as t,c as o}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{b as n,_ as t,c as o}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as l}from"react";import{useInterval as r}from"../useInterval/useInterval.js";var e=function(n){var t=Math.ceil(n),o=Math.floor(t/86400),l=Math.floor(t%86400/3600),r=Math.floor(t%3600/60);return{seconds:Math.floor(t%60),minutes:r,hours:l,days:o}},a=function(){var a,i=arguments.length<=0?void 0:arguments[0],u="object"===n(arguments.length<=1?void 0:arguments[1])?arguments.length<=1?void 0:arguments[1]:{onExpire:arguments.length<=1?void 0:arguments[1]},c=null===(a=null==u?void 0:u.autostart)||void 0===a||a,s=l(Math.ceil(i/1e3)),v=t(s,2),f=v[0],h=v[1],d=l(c),g=t(d,2),p=g[0],M=g[1];return r((function(){var n,t,o=f-1;(null==u||null===(n=u.onTick)||void 0===n||n.call(u,f),h(o),0===o)&&(M(!1),null==u||null===(t=u.onExpire)||void 0===t||t.call(u))}),1e3,{enabled:p}),o(o({},e(f)),{},{pause:function(){return M(!1)},toggle:function(){return M(!p)},start:function(){M(!0),h(Math.ceil(i/1e3))},restart:function(n){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];h(Math.ceil(n/1e3)),M(t)},running:p})};export{e as getTimeFromSeconds,a as useTimer};
|
|
3
3
|
//# sourceMappingURL=useTimer.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{_ as r}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useReducer as n}from"react";var t=function(){var t=n((function(r,n){var t=n instanceof Function?n(r[0]):n,e=Math.abs(r.indexOf(t));return r.slice(e).concat(r.slice(0,e))}),arguments.length>0&&void 0!==arguments[0]?arguments[0]:[!1,!0]),e=r(t,2);return[r(e[0],1)[0],e[1]]};export{t as useToggle};
|
|
3
3
|
//# sourceMappingURL=useToggle.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
2
|
import{useRef as r,useEffect as n}from"react";var t=function(t){var c=r(t);c.current=t,n((function(){return function(){c.current()}}),[])};export{t as useUnmount};
|
|
3
3
|
//# sourceMappingURL=useUnmount.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as r}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{_ as r}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useRef as t,useState as n,useEffect as e}from"react";var a=function(a){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o="undefined"!=typeof navigator&&"vibrate"in navigator,u=t(),c=n(!1),v=r(c,2),l=v[0],f=v[1],g=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;o&&navigator.vibrate(r)},p=function(){o&&(navigator.vibrate(0),f(!1),u.current&&clearInterval(u.current))},s=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;o&&(u.current&&clearInterval(u.current),f(!0),u.current=setInterval(g,r))};return e((function(){if(o&&!(i<=0))return s(i),function(){p()}}),[i,a]),{supported:o,trigger:g,stop:p,active:l,pause:function(){o&&(f(!1),u.current&&clearInterval(u.current))},resume:s}};export{a as useVibrate};
|
|
3
3
|
//# sourceMappingURL=useVibrate.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as n}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{_ as n}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useRef as r,useState as e,useEffect as o}from"react";import{useEvent as t}from"../useEvent/useEvent.js";import{getRetry as u}from"../../utils/helpers/getRetry.js";var c=function(c,l){var i=r(),s=r(null!=l&&l.retry?u(l.retry):0),v=r(!1),a=e("connecting"),d=n(a,2),f=d[0],p=d[1],m=t((function(){i.current=new WebSocket("function"==typeof c?c():c,null==l?void 0:l.protocols),p("connecting");var n=i.current;n&&(n.onopen=function(){var r;p("connected"),null==l||null===(r=l.onConnected)||void 0===r||r.call(l,n)},n.onerror=function(r){var e;p("failed"),null==l||null===(e=l.onError)||void 0===e||e.call(l,r,n)},n.onmessage=function(r){var e;return null==l||null===(e=l.onMessage)||void 0===e?void 0:e.call(l,r,n)},n.onclose=function(r){var e;if(p("disconnected"),null==l||null===(e=l.onDisconnected)||void 0===e||e.call(l,r,n),!v.current)return s.current>0?(s.current-=1,m()):void(s.current=null!=l&&l.retry?u(l.retry):0)})}));o((function(){return m(),function(){i.current&&(i.current.close(),i.current=void 0)}}),[c]);return{client:i.current,close:function(){var n;v.current=!0,null===(n=i.current)||void 0===n||n.close()},open:function(){v.current=!1,m()},send:function(n){var r;return null===(r=i.current)||void 0===r?void 0:r.send(n)},status:f}};export{c as useWebSocket};
|
|
3
3
|
//# sourceMappingURL=useWebSocket.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{useEventListener as e}from"../useEventListener/useEventListener.js";import"react";import"
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{useEventListener as e}from"../useEventListener/useEventListener.js";import"react";import"../useEvent/useEvent.js";import"../useRefState/useRefState.js";import"../../_rollupPluginBabelHelpers-WrSliisk.js";import"../../utils/helpers/getElement.js";var t=function(t,r,s){return e(window,t,r,s)};export{t as useWindowEvent};
|
|
3
3
|
//# sourceMappingURL=useWindowEvent.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as n}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{_ as n}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as r,useEffect as e}from"react";var t=function(){var t=r(!1),o=n(t,2),i=o[0],u=o[1];return e((function(){var n=function(){return u(!0)},r=function(){return u(!1)};return window.addEventListener("focus",n),window.addEventListener("blur",r),function(){window.removeEventListener("focus",n),window.removeEventListener("blur",r)}})),i};export{t as useWindowFocus};
|
|
3
3
|
//# sourceMappingURL=useWindowFocus.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as o,useEffect as r}from"react";var n=function(e){var o=e.x,r=e.y,n=e.behavior,i={behavior:void 0===n?"smooth":n};"number"==typeof o&&(i.left=o),"number"==typeof r&&(i.top=r),window.scrollTo(i)},i=function(){var i=o({x:"undefined"!=typeof window?window.scrollX:Number.POSITIVE_INFINITY,y:"undefined"!=typeof window?window.scrollY:Number.POSITIVE_INFINITY}),t=e(i,2),l=t[0],w=t[1];return r((function(){var e=function(){return w({x:window.scrollX,y:window.scrollY})};return window.addEventListener("scroll",e),window.addEventListener("resize",e),function(){window.removeEventListener("scroll",e),window.removeEventListener("resize",e)}}),[]),{value:l,scrollTo:n}};export{n as scrollTo,i as useWindowScroll};
|
|
3
3
|
//# sourceMappingURL=useWindowScroll.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as n}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{_ as n}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as e,useEffect as i}from"react";var t=function(t){var o,d=null===(o=null==t?void 0:t.includeScrollbar)||void 0===o||o,r=e((function(){return"undefined"==typeof window?{width:Number.POSITIVE_INFINITY,height:Number.POSITIVE_INFINITY}:{width:d?window.innerWidth:window.document.documentElement.clientWidth,height:d?window.innerHeight:window.document.documentElement.clientHeight}})),u=n(r,2),w=u[0],l=u[1];return i((function(){var n=function(){l(d?{width:window.innerWidth,height:window.innerHeight}:{width:window.document.documentElement.clientWidth,height:window.document.documentElement.clientHeight})};return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}}),[null==t?void 0:t.includeScrollbar]),w};export{t as useWindowSize};
|
|
3
3
|
//# sourceMappingURL=useWindowSize.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{_ as n,a as o}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{_ as n,a as o}from"../../_rollupPluginBabelHelpers-WrSliisk.js";import{useState as t}from"react";var r=function(r,e){var c=null!=e?e:r[0].id,i=new Map(r.map((function(n){return[n.id,n]}))),l=t(c),a=n(l,2),u=a[0],f=a[1],s=t([c]),d=n(s,2),v=d[0],g=d[1];return{currentStepId:u,set:function(n){var t;if(null===(t=i.get(u))||void 0===t||null===(t=t.nodes)||void 0===t||!t.includes(n))throw new Error("Can't go to ".concat(n," from ").concat(u));g([].concat(o(v),[n])),f(n)},reset:function(){f(c),g([c])},back:function(){var n;if(1!==v.length){var o=v[v.length-2];if(null===(n=i.get(u))||void 0===n||null===(n=n.nodes)||void 0===n||!n.includes(o))throw new Error("Can't go to ".concat(o," from ").concat(u));g(v.slice(0,-1)),f(v[v.length-2])}},history:v}};export{r as useWizard};
|
|
3
3
|
//# sourceMappingURL=useWizard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWizard.js","sources":["../../../../src/hooks/useWizard/useWizard.ts"],"sourcesContent":["import { useState } from 'react';\n\nexport interface WizardItem<WizardStepId> {\n id: WizardStepId;\n nodes?: WizardStepId[];\n}\n\n/**\n * @name useWizard\n * @description - Hook that manages a wizard\n * @category Utilities\n *\n * @param {WizardItem<WizardStepId>[]} map The map of the wizard\n * @param {WizardStepId} [initialStepId] The initial step id\n * @returns {UseWizardReturn<WizardStepId>} An object containing the current step id and functions to interact with the wizard\n *\n * @example\n * const { currentStepId, set, reset, back, history } = useWizard([\n * { id: 'step1', nodes: ['step2', 'step3'] },\n * { id: 'step2', nodes: ['step3'] },\n * { id: 'step3', nodes: [] },\n * ])\n */\nexport const useWizard = <WizardStepId extends string>(\n map: WizardItem<WizardStepId>[],\n initialStepId?: WizardStepId\n) => {\n const initialId = initialStepId ?? map[0].id;\n const wizardMap = new Map(map.map((wizardItem) => [wizardItem.id, wizardItem]));\n const [currentStepId, setCurrentStepId] = useState(initialId);\n const [history, setHistory] = useState<WizardStepId[]>([initialId]);\n\n const set = (id: WizardStepId) => {\n if (!wizardMap.get(currentStepId)?.nodes?.includes(id))\n throw new Error(`Can't go to ${id} from ${currentStepId}`);\n\n setHistory([...history, id]);\n setCurrentStepId(id);\n };\n\n const back = () => {\n if (history.length === 1) return;\n\n const previousStepId = history[history.length - 2];\n if (!wizardMap.get(currentStepId)?.nodes?.includes(previousStepId))\n throw new Error(`Can't go to ${previousStepId} from ${currentStepId}`);\n\n setHistory(history.slice(0, -1));\n setCurrentStepId(history[history.length - 2]);\n };\n\n const reset = () => {\n setCurrentStepId(initialId);\n setHistory([initialId]);\n };\n\n return { currentStepId, set, reset, back, history };\n};\n"],"names":["useWizard","map","initialStepId","initialId","id","wizardMap","Map","wizardItem","_useState","useState","_useState2","_slicedToArray","currentStepId","setCurrentStepId","_useState3","_useState4","history","setHistory","set","_wizardMap$get","get","nodes","includes","Error","concat","_toConsumableArray","reset","back","_wizardMap$get2","length","previousStepId","slice"],"mappings":";wGAuBO,IAAMA,EAAY,SACvBC,EACAC,GAEA,IAAMC,EAAYD,QAAAA,EAAiBD,EAAI,GAAGG,GACpCC,EAAY,IAAIC,IAAIL,EAAIA,KAAI,SAACM,GAAU,MAAK,CAACA,EAAWH,GAAIG,EAAW,KAC7EC,EAA0CC,EAASN,GAAUO,EAAAC,EAAAH,EAAA,GAAtDI,EAAaF,EAAA,GAAEG,EAAgBH,EAAA,GACtCI,EAA8BL,EAAyB,CAACN,IAAWY,EAAAJ,EAAAG,EAAA,GAA5DE,EAAOD,EAAA,GAAEE,EAAUF,EAAA,GA0B1B,MAAO,CAAEH,cAAAA,EAAeM,IAxBZ,SAACd,GAAqB,IAAAe,EAChC,GAAiC,QAA7BA,EAACd,EAAUe,IAAIR,UAAcO,IAAAA,GAAOA,QAAPA,EAA5BA,EAA8BE,aAA9BF,IAAmCA,IAAnCA,EAAqCG,SAASlB,GACjD,MAAM,IAAImB,MAAKC,eAAAA,OAAgBpB,EAAE,UAAAoB,OAASZ,IAE5CK,EAAU,GAAAO,OAAAC,EAAKT,GAAO,CAAEZ,KACxBS,EAAiBT,EAClB,EAkB4BsB,MALf,WACZb,EAAiBV,GACjBc,EAAW,CAACd,GACb,EAEmCwB,KAhBvB,WAAM,IAAAC,EACjB,GAAuB,IAAnBZ,EAAQa,OAAZ,CAEA,IAAMC,EAAiBd,EAAQA,EAAQa,OAAS,GAChD,GAAiC,QAA7BD,EAACvB,EAAUe,IAAIR,UAAcgB,IAAAA,GAAOA,QAAPA,EAA5BA,EAA8BP,aAA9BO,IAAmCA,IAAnCA,EAAqCN,SAASQ,GACjD,MAAM,IAAIP,MAAKC,eAAAA,OAAgBM,EAAc,UAAAN,OAASZ,IAExDK,EAAWD,EAAQe,MAAM,
|
|
1
|
+
{"version":3,"file":"useWizard.js","sources":["../../../../src/hooks/useWizard/useWizard.ts"],"sourcesContent":["import { useState } from 'react';\n\nexport interface WizardItem<WizardStepId> {\n id: WizardStepId;\n nodes?: WizardStepId[];\n}\n\n/**\n * @name useWizard\n * @description - Hook that manages a wizard\n * @category Utilities\n *\n * @param {WizardItem<WizardStepId>[]} map The map of the wizard\n * @param {WizardStepId} [initialStepId] The initial step id\n * @returns {UseWizardReturn<WizardStepId>} An object containing the current step id and functions to interact with the wizard\n *\n * @example\n * const { currentStepId, set, reset, back, history } = useWizard([\n * { id: 'step1', nodes: ['step2', 'step3'] },\n * { id: 'step2', nodes: ['step3'] },\n * { id: 'step3', nodes: [] },\n * ])\n */\nexport const useWizard = <WizardStepId extends string>(\n map: WizardItem<WizardStepId>[],\n initialStepId?: WizardStepId\n) => {\n const initialId = initialStepId ?? map[0].id;\n const wizardMap = new Map(map.map((wizardItem) => [wizardItem.id, wizardItem]));\n const [currentStepId, setCurrentStepId] = useState(initialId);\n const [history, setHistory] = useState<WizardStepId[]>([initialId]);\n\n const set = (id: WizardStepId) => {\n if (!wizardMap.get(currentStepId)?.nodes?.includes(id))\n throw new Error(`Can't go to ${id} from ${currentStepId}`);\n\n setHistory([...history, id]);\n setCurrentStepId(id);\n };\n\n const back = () => {\n if (history.length === 1) return;\n\n const previousStepId = history[history.length - 2];\n if (!wizardMap.get(currentStepId)?.nodes?.includes(previousStepId))\n throw new Error(`Can't go to ${previousStepId} from ${currentStepId}`);\n\n setHistory(history.slice(0, -1));\n setCurrentStepId(history[history.length - 2]);\n };\n\n const reset = () => {\n setCurrentStepId(initialId);\n setHistory([initialId]);\n };\n\n return { currentStepId, set, reset, back, history };\n};\n"],"names":["useWizard","map","initialStepId","initialId","id","wizardMap","Map","wizardItem","_useState","useState","_useState2","_slicedToArray","currentStepId","setCurrentStepId","_useState3","_useState4","history","setHistory","set","_wizardMap$get","get","nodes","includes","Error","concat","_toConsumableArray","reset","back","_wizardMap$get2","length","previousStepId","slice"],"mappings":";wGAuBO,IAAMA,EAAY,SACvBC,EACAC,GAEA,IAAMC,EAAYD,QAAAA,EAAiBD,EAAI,GAAGG,GACpCC,EAAY,IAAIC,IAAIL,EAAIA,KAAI,SAACM,GAAU,MAAK,CAACA,EAAWH,GAAIG,EAAW,KAC7EC,EAA0CC,EAASN,GAAUO,EAAAC,EAAAH,EAAA,GAAtDI,EAAaF,EAAA,GAAEG,EAAgBH,EAAA,GACtCI,EAA8BL,EAAyB,CAACN,IAAWY,EAAAJ,EAAAG,EAAA,GAA5DE,EAAOD,EAAA,GAAEE,EAAUF,EAAA,GA0B1B,MAAO,CAAEH,cAAAA,EAAeM,IAxBZ,SAACd,GAAqB,IAAAe,EAChC,GAAiC,QAA7BA,EAACd,EAAUe,IAAIR,UAAcO,IAAAA,GAAOA,QAAPA,EAA5BA,EAA8BE,aAA9BF,IAAmCA,IAAnCA,EAAqCG,SAASlB,GACjD,MAAM,IAAImB,MAAKC,eAAAA,OAAgBpB,EAAE,UAAAoB,OAASZ,IAE5CK,EAAU,GAAAO,OAAAC,EAAKT,GAAO,CAAEZ,KACxBS,EAAiBT,EAClB,EAkB4BsB,MALf,WACZb,EAAiBV,GACjBc,EAAW,CAACd,GACb,EAEmCwB,KAhBvB,WAAM,IAAAC,EACjB,GAAuB,IAAnBZ,EAAQa,OAAZ,CAEA,IAAMC,EAAiBd,EAAQA,EAAQa,OAAS,GAChD,GAAiC,QAA7BD,EAACvB,EAAUe,IAAIR,UAAcgB,IAAAA,GAAOA,QAAPA,EAA5BA,EAA8BP,aAA9BO,IAAmCA,IAAnCA,EAAqCN,SAASQ,GACjD,MAAM,IAAIP,MAAKC,eAAAA,OAAgBM,EAAc,UAAAN,OAASZ,IAExDK,EAAWD,EAAQe,MAAM,GAAI,IAC7BlB,EAAiBG,EAAQA,EAAQa,OAAS,GAPhB,CAQ3B,EAOyCb,QAAAA,EAC5C"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
export{useActiveElement}from"./hooks/useActiveElement/useActiveElement.js";export{useAsync}from"./hooks/useAsync/useAsync.js";export{useBattery}from"./hooks/useBattery/useBattery.js";export{useBluetooth}from"./hooks/useBluetooth/useBluetooth.js";export{useBoolean}from"./hooks/useBoolean/useBoolean.js";export{useBreakpoints}from"./hooks/useBreakpoints/useBreakpoints.js";export{useBrowserLanguage}from"./hooks/useBrowserLanguage/useBrowserLanguage.js";export{useClickOutside}from"./hooks/useClickOutside/useClickOutside.js";export{isPermissionAllowed,legacyCopyToClipboard,useClipboard}from"./hooks/useClipboard/useClipboard.js";export{useConst}from"./hooks/useConst/useConst.js";export{COOKIE_EVENT,dispatchCookieEvent,useCookie}from"./hooks/useCookie/useCookie.js";export{useCounter}from"./hooks/useCounter/useCounter.js";export{useCssVar}from"./hooks/useCssVar/useCssVar.js";export{useDebounceCallback}from"./hooks/useDebounceCallback/useDebounceCallback.js";export{useDebounceValue}from"./hooks/useDebounceValue/useDebounceValue.js";export{useDefault}from"./hooks/useDefault/useDefault.js";export{useDeviceMotion}from"./hooks/useDeviceMotion/useDeviceMotion.js";export{useDeviceOrientation}from"./hooks/useDeviceOrientation/useDeviceOrientation.js";export{useDevicePixelRatio}from"./hooks/useDevicePixelRatio/useDevicePixelRatio.js";export{useDidUpdate}from"./hooks/useDidUpdate/useDidUpdate.js";export{useDisclosure}from"./hooks/useDisclosure/useDisclosure.js";export{useDisplayMedia}from"./hooks/useDisplayMedia/useDisplayMedia.js";export{useDocumentEvent}from"./hooks/useDocumentEvent/useDocumentEvent.js";export{useDocumentTitle}from"./hooks/useDocumentTitle/useDocumentTitle.js";export{useDocumentVisibility}from"./hooks/useDocumentVisibility/useDocumentVisibility.js";export{useElementSize}from"./hooks/useElementSize/useElementSize.js";export{useEvent}from"./hooks/useEvent/useEvent.js";export{useEventListener}from"./hooks/useEventListener/useEventListener.js";export{useEyeDropper}from"./hooks/useEyeDropper/useEyeDropper.js";export{useFavicon}from"./hooks/useFavicon/useFavicon.js";export{useField}from"./hooks/useField/useField.js";export{useFileDialog}from"./hooks/useFileDialog/useFileDialog.js";export{useFocus}from"./hooks/useFocus/useFocus.js";export{useFps}from"./hooks/useFps/useFps.js";export{useFullscreen}from"./hooks/useFullscreen/useFullscreen.js";export{useGamepad}from"./hooks/useGamepad/useGamepad.js";export{useGeolocation}from"./hooks/useGeolocation/useGeolocation.js";export{useHash}from"./hooks/useHash/useHash.js";export{isHotkeyMatch,useHotkeys}from"./hooks/useHotkeys/useHotkeys.js";export{useHover}from"./hooks/useHover/useHover.js";export{useIdle}from"./hooks/useIdle/useIdle.js";export{useImage}from"./hooks/useImage/useImage.js";export{useInfiniteScroll}from"./hooks/useInfiniteScroll/useInfiniteScroll.js";export{useIntersectionObserver}from"./hooks/useIntersectionObserver/useIntersectionObserver.js";export{useInterval}from"./hooks/useInterval/useInterval.js";export{useIsFirstRender}from"./hooks/useIsFirstRender/useIsFirstRender.js";export{useIsomorphicLayoutEffect}from"./hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";export{useKeyboard}from"./hooks/useKeyboard/useKeyboard.js";export{useKeyPress}from"./hooks/useKeyPress/useKeyPress.js";export{useKeyPressEvent}from"./hooks/useKeyPressEvent/useKeyPressEvent.js";export{useKeysPressed}from"./hooks/useKeysPressed/useKeysPressed.js";export{useLastChanged}from"./hooks/useLastChanged/useLastChanged.js";export{useLatest}from"./hooks/useLatest/useLatest.js";export{useList}from"./hooks/useList/useList.js";export{useLocalStorage}from"./hooks/useLocalStorage/useLocalStorage.js";export{useLogger}from"./hooks/useLogger/useLogger.js";export{useLongPress}from"./hooks/useLongPress/useLongPress.js";export{useMap}from"./hooks/useMap/useMap.js";export{useMeasure}from"./hooks/useMeasure/useMeasure.js";export{useMediaQuery}from"./hooks/useMediaQuery/useMediaQuery.js";export{useMemory}from"./hooks/useMemory/useMemory.js";export{useMount}from"./hooks/useMount/useMount.js";export{useMouse}from"./hooks/useMouse/useMouse.js";export{useMutation}from"./hooks/useMutation/useMutation.js";export{useMutationObserver}from"./hooks/useMutationObserver/useMutationObserver.js";export{getConnection,useNetwork}from"./hooks/useNetwork/useNetwork.js";export{useOffsetPagination}from"./hooks/useOffsetPagination/useOffsetPagination.js";export{useOnline}from"./hooks/useOnline/useOnline.js";export{getOperatingSystem,useOperatingSystem}from"./hooks/useOperatingSystem/useOperatingSystem.js";export{useOptimistic}from"./hooks/useOptimistic/useOptimistic.js";export{useOrientation}from"./hooks/useOrientation/useOrientation.js";export{useOtpCredential}from"./hooks/useOtpCredential/useOtpCredential.js";export{usePageLeave}from"./hooks/usePageLeave/usePageLeave.js";export{usePaint}from"./hooks/usePaint/usePaint.js";export{useParallax}from"./hooks/useParallax/useParallax.js";export{usePermission}from"./hooks/usePermission/usePermission.js";export{usePointerLock}from"./hooks/usePointerLock/usePointerLock.js";export{usePostMessage}from"./hooks/usePostMessage/usePostMessage.js";export{usePreferredColorScheme}from"./hooks/usePreferredColorScheme/usePreferredColorScheme.js";export{usePreferredContrast}from"./hooks/usePreferredContrast/usePreferredContrast.js";export{usePreferredDark}from"./hooks/usePreferredDark/usePreferredDark.js";export{usePreferredLanguages}from"./hooks/usePreferredLanguages/usePreferredLanguages.js";export{usePreferredReducedMotion}from"./hooks/usePreferredReducedMotion/usePreferredReducedMotion.js";export{usePrevious}from"./hooks/usePrevious/usePrevious.js";export{useQuery}from"./hooks/useQuery/useQuery.js";export{useQueue}from"./hooks/useQueue/useQueue.js";export{useRaf}from"./hooks/useRaf/useRaf.js";export{useRafValue}from"./hooks/useRafValue/useRafValue.js";export{useRefState}from"./hooks/useRefState/useRefState.js";export{useRenderCount}from"./hooks/useRenderCount/useRenderCount.js";export{useRenderInfo}from"./hooks/useRenderInfo/useRenderInfo.js";export{useRerender}from"./hooks/useRerender/useRerender.js";export{useResizeObserver}from"./hooks/useResizeObserver/useResizeObserver.js";export{useScreenOrientation}from"./hooks/useScreenOrientation/useScreenOrientation.js";export{SCRIPT_STATUS_ATTRIBUTE_NAME,useScript}from"./hooks/useScript/useScript.js";export{useScroll}from"./hooks/useScroll/useScroll.js";export{useScrollIntoView}from"./hooks/useScrollIntoView/useScrollIntoView.js";export{useScrollTo}from"./hooks/useScrollTo/useScrollTo.js";export{useSessionStorage}from"./hooks/useSessionStorage/useSessionStorage.js";export{useSet}from"./hooks/useSet/useSet.js";export{useShare}from"./hooks/useShare/useShare.js";export{useStateHistory}from"./hooks/useStateHistory/useStateHistory.js";export{useStep}from"./hooks/useStep/useStep.js";export{useStopwatch}from"./hooks/useStopwatch/useStopwatch.js";export{STORAGE_EVENT,dispatchStorageEvent,useStorage}from"./hooks/useStorage/useStorage.js";export{useTextDirection}from"./hooks/useTextDirection/useTextDirection.js";export{getRangesSelection,useTextSelection}from"./hooks/useTextSelection/useTextSelection.js";export{useThrottleCallback}from"./hooks/useThrottleCallback/useThrottleCallback.js";export{useThrottleValue}from"./hooks/useThrottleValue/useThrottleValue.js";export{useTime}from"./hooks/useTime/useTime.js";export{useTimeout}from"./hooks/useTimeout/useTimeout.js";export{getTimeFromSeconds,useTimer}from"./hooks/useTimer/useTimer.js";export{useToggle}from"./hooks/useToggle/useToggle.js";export{useUnmount}from"./hooks/useUnmount/useUnmount.js";export{useVibrate}from"./hooks/useVibrate/useVibrate.js";export{useWebSocket}from"./hooks/useWebSocket/useWebSocket.js";export{useWindowEvent}from"./hooks/useWindowEvent/useWindowEvent.js";export{useWindowFocus}from"./hooks/useWindowFocus/useWindowFocus.js";export{scrollTo,useWindowScroll}from"./hooks/useWindowScroll/useWindowScroll.js";export{useWindowSize}from"./hooks/useWindowSize/useWindowSize.js";export{useWizard}from"./hooks/useWizard/useWizard.js";export{
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
export{useActiveElement}from"./hooks/useActiveElement/useActiveElement.js";export{useAsync}from"./hooks/useAsync/useAsync.js";export{useBattery}from"./hooks/useBattery/useBattery.js";export{useBluetooth}from"./hooks/useBluetooth/useBluetooth.js";export{useBoolean}from"./hooks/useBoolean/useBoolean.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,useBreakpoints}from"./hooks/useBreakpoints/useBreakpoints.js";export{useBrowserLanguage}from"./hooks/useBrowserLanguage/useBrowserLanguage.js";export{useClickOutside}from"./hooks/useClickOutside/useClickOutside.js";export{isPermissionAllowed,legacyCopyToClipboard,useClipboard}from"./hooks/useClipboard/useClipboard.js";export{useConst}from"./hooks/useConst/useConst.js";export{COOKIE_EVENT,dispatchCookieEvent,useCookie}from"./hooks/useCookie/useCookie.js";export{useCounter}from"./hooks/useCounter/useCounter.js";export{useCssVar}from"./hooks/useCssVar/useCssVar.js";export{useDebounceCallback}from"./hooks/useDebounceCallback/useDebounceCallback.js";export{useDebounceValue}from"./hooks/useDebounceValue/useDebounceValue.js";export{useDefault}from"./hooks/useDefault/useDefault.js";export{useDeviceMotion}from"./hooks/useDeviceMotion/useDeviceMotion.js";export{useDeviceOrientation}from"./hooks/useDeviceOrientation/useDeviceOrientation.js";export{useDevicePixelRatio}from"./hooks/useDevicePixelRatio/useDevicePixelRatio.js";export{useDidUpdate}from"./hooks/useDidUpdate/useDidUpdate.js";export{useDisclosure}from"./hooks/useDisclosure/useDisclosure.js";export{useDisplayMedia}from"./hooks/useDisplayMedia/useDisplayMedia.js";export{useDocumentEvent}from"./hooks/useDocumentEvent/useDocumentEvent.js";export{useDocumentTitle}from"./hooks/useDocumentTitle/useDocumentTitle.js";export{useDocumentVisibility}from"./hooks/useDocumentVisibility/useDocumentVisibility.js";export{useElementSize}from"./hooks/useElementSize/useElementSize.js";export{useEvent}from"./hooks/useEvent/useEvent.js";export{useEventListener}from"./hooks/useEventListener/useEventListener.js";export{useEyeDropper}from"./hooks/useEyeDropper/useEyeDropper.js";export{useFavicon}from"./hooks/useFavicon/useFavicon.js";export{useField}from"./hooks/useField/useField.js";export{useFileDialog}from"./hooks/useFileDialog/useFileDialog.js";export{useFocus}from"./hooks/useFocus/useFocus.js";export{useFps}from"./hooks/useFps/useFps.js";export{useFullscreen}from"./hooks/useFullscreen/useFullscreen.js";export{mapGamepadToXbox360Controller}from"./hooks/useGamepad/helpers/mapGamepadToXbox360Controller.js";export{useGamepad}from"./hooks/useGamepad/useGamepad.js";export{useGeolocation}from"./hooks/useGeolocation/useGeolocation.js";export{useHash}from"./hooks/useHash/useHash.js";export{isHotkeyMatch,useHotkeys}from"./hooks/useHotkeys/useHotkeys.js";export{useHover}from"./hooks/useHover/useHover.js";export{useIdle}from"./hooks/useIdle/useIdle.js";export{useImage}from"./hooks/useImage/useImage.js";export{useInfiniteScroll}from"./hooks/useInfiniteScroll/useInfiniteScroll.js";export{useIntersectionObserver}from"./hooks/useIntersectionObserver/useIntersectionObserver.js";export{useInterval}from"./hooks/useInterval/useInterval.js";export{useIsFirstRender}from"./hooks/useIsFirstRender/useIsFirstRender.js";export{useIsomorphicLayoutEffect}from"./hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";export{useKeyboard}from"./hooks/useKeyboard/useKeyboard.js";export{useKeyPress}from"./hooks/useKeyPress/useKeyPress.js";export{useKeyPressEvent}from"./hooks/useKeyPressEvent/useKeyPressEvent.js";export{useKeysPressed}from"./hooks/useKeysPressed/useKeysPressed.js";export{useLastChanged}from"./hooks/useLastChanged/useLastChanged.js";export{useLatest}from"./hooks/useLatest/useLatest.js";export{useList}from"./hooks/useList/useList.js";export{useLocalStorage}from"./hooks/useLocalStorage/useLocalStorage.js";export{useLogger}from"./hooks/useLogger/useLogger.js";export{useLongPress}from"./hooks/useLongPress/useLongPress.js";export{useMap}from"./hooks/useMap/useMap.js";export{useMeasure}from"./hooks/useMeasure/useMeasure.js";export{useMediaQuery}from"./hooks/useMediaQuery/useMediaQuery.js";export{useMemory}from"./hooks/useMemory/useMemory.js";export{useMount}from"./hooks/useMount/useMount.js";export{useMouse}from"./hooks/useMouse/useMouse.js";export{useMutation}from"./hooks/useMutation/useMutation.js";export{useMutationObserver}from"./hooks/useMutationObserver/useMutationObserver.js";export{getConnection,useNetwork}from"./hooks/useNetwork/useNetwork.js";export{useOffsetPagination}from"./hooks/useOffsetPagination/useOffsetPagination.js";export{useOnline}from"./hooks/useOnline/useOnline.js";export{getOperatingSystem,useOperatingSystem}from"./hooks/useOperatingSystem/useOperatingSystem.js";export{useOptimistic}from"./hooks/useOptimistic/useOptimistic.js";export{useOrientation}from"./hooks/useOrientation/useOrientation.js";export{useOtpCredential}from"./hooks/useOtpCredential/useOtpCredential.js";export{usePageLeave}from"./hooks/usePageLeave/usePageLeave.js";export{usePaint}from"./hooks/usePaint/usePaint.js";export{useParallax}from"./hooks/useParallax/useParallax.js";export{usePermission}from"./hooks/usePermission/usePermission.js";export{usePointerLock}from"./hooks/usePointerLock/usePointerLock.js";export{usePostMessage}from"./hooks/usePostMessage/usePostMessage.js";export{usePreferredColorScheme}from"./hooks/usePreferredColorScheme/usePreferredColorScheme.js";export{usePreferredContrast}from"./hooks/usePreferredContrast/usePreferredContrast.js";export{usePreferredDark}from"./hooks/usePreferredDark/usePreferredDark.js";export{usePreferredLanguages}from"./hooks/usePreferredLanguages/usePreferredLanguages.js";export{usePreferredReducedMotion}from"./hooks/usePreferredReducedMotion/usePreferredReducedMotion.js";export{usePrevious}from"./hooks/usePrevious/usePrevious.js";export{useQuery}from"./hooks/useQuery/useQuery.js";export{useQueue}from"./hooks/useQueue/useQueue.js";export{useRaf}from"./hooks/useRaf/useRaf.js";export{useRafValue}from"./hooks/useRafValue/useRafValue.js";export{useRefState}from"./hooks/useRefState/useRefState.js";export{useRenderCount}from"./hooks/useRenderCount/useRenderCount.js";export{useRenderInfo}from"./hooks/useRenderInfo/useRenderInfo.js";export{useRerender}from"./hooks/useRerender/useRerender.js";export{useResizeObserver}from"./hooks/useResizeObserver/useResizeObserver.js";export{useScreenOrientation}from"./hooks/useScreenOrientation/useScreenOrientation.js";export{SCRIPT_STATUS_ATTRIBUTE_NAME,useScript}from"./hooks/useScript/useScript.js";export{useScroll}from"./hooks/useScroll/useScroll.js";export{useScrollIntoView}from"./hooks/useScrollIntoView/useScrollIntoView.js";export{useScrollTo}from"./hooks/useScrollTo/useScrollTo.js";export{useSessionStorage}from"./hooks/useSessionStorage/useSessionStorage.js";export{useSet}from"./hooks/useSet/useSet.js";export{useShare}from"./hooks/useShare/useShare.js";export{useStateHistory}from"./hooks/useStateHistory/useStateHistory.js";export{useStep}from"./hooks/useStep/useStep.js";export{useStopwatch}from"./hooks/useStopwatch/useStopwatch.js";export{STORAGE_EVENT,dispatchStorageEvent,useStorage}from"./hooks/useStorage/useStorage.js";export{useTextDirection}from"./hooks/useTextDirection/useTextDirection.js";export{getRangesSelection,useTextSelection}from"./hooks/useTextSelection/useTextSelection.js";export{useThrottleCallback}from"./hooks/useThrottleCallback/useThrottleCallback.js";export{useThrottleValue}from"./hooks/useThrottleValue/useThrottleValue.js";export{useTime}from"./hooks/useTime/useTime.js";export{useTimeout}from"./hooks/useTimeout/useTimeout.js";export{getTimeFromSeconds,useTimer}from"./hooks/useTimer/useTimer.js";export{useToggle}from"./hooks/useToggle/useToggle.js";export{useUnmount}from"./hooks/useUnmount/useUnmount.js";export{useVibrate}from"./hooks/useVibrate/useVibrate.js";export{useWebSocket}from"./hooks/useWebSocket/useWebSocket.js";export{useWindowEvent}from"./hooks/useWindowEvent/useWindowEvent.js";export{useWindowFocus}from"./hooks/useWindowFocus/useWindowFocus.js";export{scrollTo,useWindowScroll}from"./hooks/useWindowScroll/useWindowScroll.js";export{useWindowSize}from"./hooks/useWindowSize/useWindowSize.js";export{useWizard}from"./hooks/useWizard/useWizard.js";export{getCookies,removeCookie,setCookie}from"./utils/helpers/cookie.js";export{debounce}from"./utils/helpers/debounce.js";export{getDate}from"./utils/helpers/getDate.js";export{getElement}from"./utils/helpers/getElement.js";export{getRetry}from"./utils/helpers/getRetry.js";export{isTarget}from"./utils/helpers/isTarget.js";export{throttle}from"./utils/helpers/throttle.js";import"./_rollupPluginBabelHelpers-WrSliisk.js";import"react";import"./hooks/usePaint/helpers/Paint.js";import"react-dom";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{h as e}from"../../_rollupPluginBabelHelpers-WrSliisk.js";var n=function(){return Object.fromEntries(document.cookie.split("; ").map((function(n){var o=n.split("="),t=e(o),c=t[0],a=t.slice(1);return[c,decodeURIComponent(a.join("="))]})))},o=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};document.cookie="".concat(encodeURIComponent(e),"=; expires=Thu, 01 Jan 1970 00:00:00 GMT").concat(n.path?"; path=".concat(n.path):"").concat(n.domain?"; domain=".concat(n.domain):"").concat(n.maxAge?"; max-age=0":"").concat(n.expires?"; expires=Thu, 01 Jan 1970 00:00:00 GMT":"").concat(n.secure?"; secure":"").concat(n.sameSite?"; samesite=".concat(n.sameSite):"")},t=function(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},t=["".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(n))];o.path&&t.push("path=".concat(o.path)),o.domain&&t.push("domain=".concat(o.domain)),"number"==typeof o.maxAge&&t.push("max-age=".concat(o.maxAge)),o.expires&&t.push("expires=".concat(o.expires.toUTCString())),o.secure&&t.push("secure"),o.httpOnly&&t.push("httpOnly"),o.sameSite&&t.push("samesite=".concat(o.sameSite)),document.cookie=t.join("; ")};export{n as getCookies,o as removeCookie,t as setCookie};
|
|
3
|
+
//# sourceMappingURL=cookie.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cookie.js","sources":["../../../../src/utils/helpers/cookie.ts"],"sourcesContent":["export const getCookies = () =>\n Object.fromEntries(\n document.cookie.split('; ').map((cookie) => {\n const [key, ...value] = cookie.split('=');\n const decodedValue = decodeURIComponent(value.join('='));\n return [key, decodedValue];\n })\n );\n\nexport interface RemoveCookieParams {\n domain?: string;\n expires?: Date;\n maxAge?: number;\n path?: string;\n sameSite?: 'Lax' | 'None' | 'Strict';\n secure?: boolean;\n}\n\nexport const removeCookie = (key: string, options: RemoveCookieParams = {}) => {\n document.cookie = `${encodeURIComponent(key)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT${\n options.path ? `; path=${options.path}` : ''\n }${options.domain ? `; domain=${options.domain}` : ''}${options.maxAge ? `; max-age=0` : ''}${\n options.expires ? `; expires=Thu, 01 Jan 1970 00:00:00 GMT` : ''\n }${options.secure ? `; secure` : ''}${options.sameSite ? `; samesite=${options.sameSite}` : ''}`;\n};\n\nexport interface SetCookieParams {\n domain?: string;\n expires?: Date;\n httpOnly?: boolean;\n maxAge?: number;\n path?: string;\n sameSite?: 'Lax' | 'None' | 'Strict';\n secure?: boolean;\n}\n\nexport const setCookie = (key: string, value: string, options: SetCookieParams = {}) => {\n const cookie: string[] = [`${encodeURIComponent(key)}=${encodeURIComponent(value)}`];\n\n if (options.path) cookie.push(`path=${options.path}`);\n if (options.domain) cookie.push(`domain=${options.domain}`);\n if (typeof options.maxAge === 'number') cookie.push(`max-age=${options.maxAge}`);\n if (options.expires) cookie.push(`expires=${options.expires.toUTCString()}`);\n if (options.secure) cookie.push(`secure`);\n if (options.httpOnly) cookie.push(`httpOnly`);\n if (options.sameSite) cookie.push(`samesite=${options.sameSite}`);\n\n document.cookie = cookie.join('; ');\n};\n"],"names":["getCookies","Object","fromEntries","document","cookie","split","map","_cookie$split","_cookie$split2","_toArray","key","value","slice","decodeURIComponent","join","removeCookie","options","arguments","length","undefined","concat","encodeURIComponent","path","domain","maxAge","expires","secure","sameSite","setCookie","push","toUTCString","httpOnly"],"mappings":";gEAAaA,IAAAA,EAAa,WAAH,OACrBC,OAAOC,YACLC,SAASC,OAAOC,MAAM,MAAMC,KAAI,SAACF,GAC/B,IAAAG,EAAwBH,EAAOC,MAAM,KAAIG,EAAAC,EAAAF,GAAlCG,EAAGF,EAAA,GAAKG,EAAKH,EAAAI,MAAA,GAEpB,MAAO,CAACF,EADaG,mBAAmBF,EAAMG,KAAK,MAErD,IACD,EAWUC,EAAe,SAACL,GAAkD,IAArCM,EAA2BC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,CAAE,EACxEd,SAASC,OAAMgB,GAAAA,OAAMC,mBAAmBX,+CAAIU,OAC1CJ,EAAQM,KAAIF,UAAAA,OAAaJ,EAAQM,MAAS,IAAEF,OAC3CJ,EAAQO,mBAAMH,OAAeJ,EAAQO,QAAW,IAAEH,OAAGJ,EAAQQ,OAAM,cAAmB,IAAEJ,OACzFJ,EAAQS,QAAO,0CAA+C,IAAEL,OAC/DJ,EAAQU,kBAAsB,IAAEN,OAAGJ,EAAQW,SAAQP,cAAAA,OAAiBJ,EAAQW,UAAa,GAC9F,EAYaC,EAAY,SAAClB,EAAaC,GAAiD,IAAlCK,EAAwBC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,CAAE,EAC3Eb,EAAmB,CAAA,GAAAgB,OAAIC,mBAAmBX,GAAI,KAAAU,OAAIC,mBAAmBV,KAEvEK,EAAQM,MAAMlB,EAAOyB,KAAIT,QAAAA,OAASJ,EAAQM,OAC1CN,EAAQO,QAAQnB,EAAOyB,KAAIT,UAAAA,OAAWJ,EAAQO,SACpB,iBAAnBP,EAAQQ,QAAqBpB,EAAOyB,gBAAIT,OAAYJ,EAAQQ,SACnER,EAAQS,SAASrB,EAAOyB,KAAIT,WAAAA,OAAYJ,EAAQS,QAAQK,gBACxDd,EAAQU,QAAQtB,EAAOyB,eACvBb,EAAQe,UAAU3B,EAAOyB,iBACzBb,EAAQW,UAAUvB,EAAOyB,KAAIT,YAAAA,OAAaJ,EAAQW,WAEtDxB,SAASC,OAASA,EAAOU,KAAK,KAChC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
2
|
function r(r,t){var n;return function(){for(var e=this,o=arguments.length,u=new Array(o),i=0;i<o;i++)u[i]=arguments[i];clearTimeout(n),n=setTimeout((function(){return r.apply(e,u)}),t)}}export{r as debounce};
|
|
3
3
|
//# sourceMappingURL=debounce.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
2
|
var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=e.getSeconds(),n=e.getMinutes(),r=e.getHours();return{seconds:t,minutes:n,hours:r,meridiemHours:{value:r%12==0?12:r%12,type:r>=12?"pm":"am"},day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear(),timestamp:e.getTime()}};export{e as getDate};
|
|
3
3
|
//# sourceMappingURL=getDate.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
2
|
var n=function(n){return"function"==typeof n?n():"string"==typeof n?document.querySelector(n):n instanceof Document||n instanceof Window||n instanceof Element?n:n.current};export{n as getElement};
|
|
3
3
|
//# sourceMappingURL=getElement.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
export{debounce}from"./debounce.js";export{getDate}from"./getDate.js";export{getElement}from"./getElement.js";export{getRetry}from"./getRetry.js";export{isTarget}from"./isTarget.js";export{throttle}from"./throttle.js";import"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
export{getCookies,removeCookie,setCookie}from"./cookie.js";export{debounce}from"./debounce.js";export{getDate}from"./getDate.js";export{getElement}from"./getElement.js";export{getRetry}from"./getRetry.js";export{isTarget}from"./isTarget.js";export{throttle}from"./throttle.js";import"../../_rollupPluginBabelHelpers-WrSliisk.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
2
|
-
import{b as n}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
|
+
import{b as n}from"../../_rollupPluginBabelHelpers-WrSliisk.js";var e=function(e){return"string"==typeof e||e instanceof Element||e instanceof Window||e instanceof Document||e&&"object"===n(e)&&"current"in e};export{e as isTarget};
|
|
3
3
|
//# sourceMappingURL=isTarget.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.
|
|
1
|
+
/* @license @siberiacancode/reactuse v0.0.97 */
|
|
2
2
|
var n=function(n,t){var e=!1,r=null,u=function(){r?(n.apply(undefined,r),r=null,setTimeout(u,t)):e=!1};return function(){for(var i=arguments.length,l=new Array(i),o=0;o<i;o++)l[o]=arguments[o];e?r=l:(n.apply(this,l),e=!0,setTimeout(u,t))}};export{n as throttle};
|
|
3
3
|
//# sourceMappingURL=throttle.js.map
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { DependencyList, RefObject, Dispatch, SetStateAction, EffectCallback, ComponentProps, useEffect, MouseEventHandler, TouchEventHandler, MouseEvent as MouseEvent$1 } from 'react';
|
|
3
|
+
import { RemoveCookieParams as RemoveCookieParams$1, SetCookieParams as SetCookieParams$1 } from '@/utils/helpers';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @name useActiveElement
|
|
@@ -133,6 +134,51 @@ type UseBooleanReturn = [
|
|
|
133
134
|
*/
|
|
134
135
|
declare const useBoolean: (initialValue?: boolean) => UseBooleanReturn;
|
|
135
136
|
|
|
137
|
+
/** The breakpoints type */
|
|
138
|
+
type Breakpoints<Breakpoint extends string = string> = Record<Breakpoint, number>;
|
|
139
|
+
/** The use breakpoints strategy */
|
|
140
|
+
type UseBreakpointsStrategy = 'desktop-first' | 'mobile-first';
|
|
141
|
+
/** The use breakpoints return type */
|
|
142
|
+
type UseBreakpointsReturn<Breakpoint extends string = string> = {
|
|
143
|
+
/** The function that checks if the current breakpoint is greater than to the given breakpoint */
|
|
144
|
+
greater: (breakpoint: Breakpoint) => boolean;
|
|
145
|
+
/** The function that checks if the current breakpoint is greater than or equal to the given breakpoint */
|
|
146
|
+
greaterOrEqual: (breakpoint: Breakpoint) => boolean;
|
|
147
|
+
/** The function that checks if the current breakpoint is smaller than to the given breakpoint */
|
|
148
|
+
smaller: (breakpoint: Breakpoint) => boolean;
|
|
149
|
+
/** The function that checks if the current breakpoint is smaller than or equal to the given breakpoint */
|
|
150
|
+
smallerOrEqual: (breakpoint: Breakpoint) => boolean;
|
|
151
|
+
/** The function that checks if the current breakpoint is between to the given breakpoints */
|
|
152
|
+
between: (a: Breakpoint, b: Breakpoint) => boolean;
|
|
153
|
+
/** The function that checks if the current breakpoint is greater than to the given breakpoint */
|
|
154
|
+
isGreater: (breakpoint: Breakpoint) => boolean;
|
|
155
|
+
/** The function that checks if the current breakpoint is greater than or equal to the given breakpoint */
|
|
156
|
+
isGreaterOrEqual: (breakpoint: Breakpoint) => boolean;
|
|
157
|
+
/** The function that checks if the current breakpoint is smaller than to the given breakpoint */
|
|
158
|
+
isSmaller: (breakpoint: Breakpoint) => boolean;
|
|
159
|
+
/** The function that checks if the current breakpoint is smaller than or equal to the given breakpoint */
|
|
160
|
+
isSmallerOrEqual: (breakpoint: Breakpoint) => boolean;
|
|
161
|
+
/** The function that checks if the current breakpoint is between to the given breakpoints */
|
|
162
|
+
isInBetween: (a: Breakpoint, b: Breakpoint) => boolean;
|
|
163
|
+
/** The function that returns the current breakpoints */
|
|
164
|
+
current: () => Breakpoint[];
|
|
165
|
+
/** The function that returns the current active breakpoint */
|
|
166
|
+
active: () => Breakpoint;
|
|
167
|
+
} & Record<Breakpoint, boolean>;
|
|
168
|
+
/**
|
|
169
|
+
* @name useBreakpoints
|
|
170
|
+
* @description - Hook that manages breakpoints
|
|
171
|
+
* @category Browser
|
|
172
|
+
*
|
|
173
|
+
* @template {string} Breakpoint The name of the breakpoint
|
|
174
|
+
* @param {Breakpoints<Breakpoint>} breakpoints The breakpoints to use
|
|
175
|
+
* @param {UseBreakpointsStrategy} [strategy=min-width] The strategy to use for matching
|
|
176
|
+
* @returns {UseBreakpointsReturn<Breakpoint>} An object containing the current breakpoint
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* const { greaterOrEqual, smallerOrEqual, current } = useBreakpoints({ mobile: 0, tablet: 640, laptop: 1024, desktop: 1280 });
|
|
180
|
+
*/
|
|
181
|
+
declare const useBreakpoints: <Breakpoint extends string>(breakpoints: Breakpoints<Breakpoint>, strategy?: UseBreakpointsStrategy) => UseBreakpointsReturn<Breakpoint>;
|
|
136
182
|
/** Breakpoints from Material UI */
|
|
137
183
|
declare const BREAKPOINTS_MATERIAL_UI: {
|
|
138
184
|
xs: number;
|
|
@@ -214,52 +260,6 @@ declare const BREAKPOINTS_PRIME_FLEX: {
|
|
|
214
260
|
xl: number;
|
|
215
261
|
};
|
|
216
262
|
|
|
217
|
-
/** The breakpoints type */
|
|
218
|
-
type Breakpoints<Breakpoint extends string = string> = Record<Breakpoint, number>;
|
|
219
|
-
/** The use breakpoints strategy */
|
|
220
|
-
type UseBreakpointsStrategy = 'desktop-first' | 'mobile-first';
|
|
221
|
-
/** The use breakpoints return type */
|
|
222
|
-
type UseBreakpointsReturn<Breakpoint extends string = string> = {
|
|
223
|
-
/** The function that checks if the current breakpoint is greater than to the given breakpoint */
|
|
224
|
-
greater: (breakpoint: Breakpoint) => boolean;
|
|
225
|
-
/** The function that checks if the current breakpoint is greater than or equal to the given breakpoint */
|
|
226
|
-
greaterOrEqual: (breakpoint: Breakpoint) => boolean;
|
|
227
|
-
/** The function that checks if the current breakpoint is smaller than to the given breakpoint */
|
|
228
|
-
smaller: (breakpoint: Breakpoint) => boolean;
|
|
229
|
-
/** The function that checks if the current breakpoint is smaller than or equal to the given breakpoint */
|
|
230
|
-
smallerOrEqual: (breakpoint: Breakpoint) => boolean;
|
|
231
|
-
/** The function that checks if the current breakpoint is between to the given breakpoints */
|
|
232
|
-
between: (a: Breakpoint, b: Breakpoint) => boolean;
|
|
233
|
-
/** The function that checks if the current breakpoint is greater than to the given breakpoint */
|
|
234
|
-
isGreater: (breakpoint: Breakpoint) => boolean;
|
|
235
|
-
/** The function that checks if the current breakpoint is greater than or equal to the given breakpoint */
|
|
236
|
-
isGreaterOrEqual: (breakpoint: Breakpoint) => boolean;
|
|
237
|
-
/** The function that checks if the current breakpoint is smaller than to the given breakpoint */
|
|
238
|
-
isSmaller: (breakpoint: Breakpoint) => boolean;
|
|
239
|
-
/** The function that checks if the current breakpoint is smaller than or equal to the given breakpoint */
|
|
240
|
-
isSmallerOrEqual: (breakpoint: Breakpoint) => boolean;
|
|
241
|
-
/** The function that checks if the current breakpoint is between to the given breakpoints */
|
|
242
|
-
isInBetween: (a: Breakpoint, b: Breakpoint) => boolean;
|
|
243
|
-
/** The function that returns the current breakpoints */
|
|
244
|
-
current: () => Breakpoint[];
|
|
245
|
-
/** The function that returns the current active breakpoint */
|
|
246
|
-
active: () => Breakpoint;
|
|
247
|
-
} & Record<Breakpoint, boolean>;
|
|
248
|
-
/**
|
|
249
|
-
* @name useBreakpoints
|
|
250
|
-
* @description - Hook that manages breakpoints
|
|
251
|
-
* @category Browser
|
|
252
|
-
*
|
|
253
|
-
* @template {string} Breakpoint The name of the breakpoint
|
|
254
|
-
* @param {Breakpoints<Breakpoint>} breakpoints The breakpoints to use
|
|
255
|
-
* @param {UseBreakpointsStrategy} [strategy=min-width] The strategy to use for matching
|
|
256
|
-
* @returns {UseBreakpointsReturn<Breakpoint>} An object containing the current breakpoint
|
|
257
|
-
*
|
|
258
|
-
* @example
|
|
259
|
-
* const { greaterOrEqual, smallerOrEqual, current } = useBreakpoints({ mobile: 0, tablet: 640, laptop: 1024, desktop: 1280 });
|
|
260
|
-
*/
|
|
261
|
-
declare const useBreakpoints: <Breakpoint extends string>(breakpoints: Breakpoints<Breakpoint>, strategy?: UseBreakpointsStrategy) => UseBreakpointsReturn<Breakpoint>;
|
|
262
|
-
|
|
263
263
|
/**
|
|
264
264
|
* @name useBrowserLanguage
|
|
265
265
|
* @description - Hook that returns the current browser language
|
|
@@ -364,33 +364,6 @@ declare const useClipboard: (params?: UseCopyToClipboardParams) => UseCopyToClip
|
|
|
364
364
|
*/
|
|
365
365
|
declare const useConst: <Value>(initialValue: (() => Value) | Value) => Value;
|
|
366
366
|
|
|
367
|
-
declare const clearCookies: () => void;
|
|
368
|
-
|
|
369
|
-
declare const getCookies: () => {
|
|
370
|
-
[k: string]: string;
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
interface RemoveCookieParams {
|
|
374
|
-
domain?: string;
|
|
375
|
-
expires?: Date;
|
|
376
|
-
maxAge?: number;
|
|
377
|
-
path?: string;
|
|
378
|
-
sameSite?: 'Lax' | 'None' | 'Strict';
|
|
379
|
-
secure?: boolean;
|
|
380
|
-
}
|
|
381
|
-
declare const removeCookie: (key: string, options?: RemoveCookieParams) => void;
|
|
382
|
-
|
|
383
|
-
interface SetCookieParams {
|
|
384
|
-
domain?: string;
|
|
385
|
-
expires?: Date;
|
|
386
|
-
httpOnly?: boolean;
|
|
387
|
-
maxAge?: number;
|
|
388
|
-
path?: string;
|
|
389
|
-
sameSite?: 'Lax' | 'None' | 'Strict';
|
|
390
|
-
secure?: boolean;
|
|
391
|
-
}
|
|
392
|
-
declare const setCookie: (key: string, value: string, options?: SetCookieParams) => void;
|
|
393
|
-
|
|
394
367
|
type UseCookieInitialValue<Value> = (() => Value) | Value;
|
|
395
368
|
interface UseCookieOptions<Value> {
|
|
396
369
|
initialValue?: UseCookieInitialValue<Value>;
|
|
@@ -399,8 +372,8 @@ interface UseCookieOptions<Value> {
|
|
|
399
372
|
}
|
|
400
373
|
interface UseCookieReturn<Value> {
|
|
401
374
|
value: Value;
|
|
402
|
-
remove: (options?: RemoveCookieParams) => void;
|
|
403
|
-
set: (value: Value, options?: SetCookieParams) => void;
|
|
375
|
+
remove: (options?: RemoveCookieParams$1) => void;
|
|
376
|
+
set: (value: Value, options?: SetCookieParams$1) => void;
|
|
404
377
|
}
|
|
405
378
|
declare const COOKIE_EVENT = "reactuse-cookie";
|
|
406
379
|
declare const dispatchCookieEvent: () => boolean;
|
|
@@ -420,8 +393,8 @@ declare const dispatchCookieEvent: () => boolean;
|
|
|
420
393
|
*/
|
|
421
394
|
declare const useCookie: <Value>(key: string, params?: UseCookieInitialValue<Value> | UseCookieOptions<Value>) => {
|
|
422
395
|
value: Value | undefined;
|
|
423
|
-
set: (value: Value, options?: SetCookieParams) => void;
|
|
424
|
-
remove: (options?: RemoveCookieParams) => void;
|
|
396
|
+
set: (value: Value, options?: SetCookieParams$1) => void;
|
|
397
|
+
remove: (options?: RemoveCookieParams$1) => void;
|
|
425
398
|
};
|
|
426
399
|
|
|
427
400
|
/** The use counter options */
|
|
@@ -2567,7 +2540,6 @@ declare class Pointer implements Point {
|
|
|
2567
2540
|
equalsTo(point: Point): boolean;
|
|
2568
2541
|
moveByAngle(angle: number, distance: number): this;
|
|
2569
2542
|
}
|
|
2570
|
-
|
|
2571
2543
|
declare class Paint {
|
|
2572
2544
|
pointer: Pointer;
|
|
2573
2545
|
brush: Pointer;
|
|
@@ -3944,6 +3916,29 @@ declare const useWizard: <WizardStepId extends string>(map: WizardItem<WizardSte
|
|
|
3944
3916
|
history: WizardStepId[];
|
|
3945
3917
|
};
|
|
3946
3918
|
|
|
3919
|
+
declare const getCookies: () => {
|
|
3920
|
+
[k: string]: string;
|
|
3921
|
+
};
|
|
3922
|
+
interface RemoveCookieParams {
|
|
3923
|
+
domain?: string;
|
|
3924
|
+
expires?: Date;
|
|
3925
|
+
maxAge?: number;
|
|
3926
|
+
path?: string;
|
|
3927
|
+
sameSite?: 'Lax' | 'None' | 'Strict';
|
|
3928
|
+
secure?: boolean;
|
|
3929
|
+
}
|
|
3930
|
+
declare const removeCookie: (key: string, options?: RemoveCookieParams) => void;
|
|
3931
|
+
interface SetCookieParams {
|
|
3932
|
+
domain?: string;
|
|
3933
|
+
expires?: Date;
|
|
3934
|
+
httpOnly?: boolean;
|
|
3935
|
+
maxAge?: number;
|
|
3936
|
+
path?: string;
|
|
3937
|
+
sameSite?: 'Lax' | 'None' | 'Strict';
|
|
3938
|
+
secure?: boolean;
|
|
3939
|
+
}
|
|
3940
|
+
declare const setCookie: (key: string, value: string, options?: SetCookieParams) => void;
|
|
3941
|
+
|
|
3947
3942
|
declare function debounce<Params extends unknown[]>(callback: (...args: Params) => void, delay: number): (...args: Params) => void;
|
|
3948
3943
|
|
|
3949
3944
|
declare const getDate: (now?: Date) => {
|
|
@@ -3969,4 +3964,4 @@ declare const isTarget: (target: any) => any;
|
|
|
3969
3964
|
|
|
3970
3965
|
declare const throttle: <Params extends any[]>(callback: (...args: Params) => void, delay: number) => ((...args: Params) => void);
|
|
3971
3966
|
|
|
3972
|
-
export { BREAKPOINTS_ANT_DESIGN, BREAKPOINTS_BOOTSTRAP_V5, BREAKPOINTS_MANTINE, BREAKPOINTS_MASTER_CSS, BREAKPOINTS_MATERIAL_UI, BREAKPOINTS_PRIME_FLEX, BREAKPOINTS_QUASAR_V2, BREAKPOINTS_SEMANTIC, BREAKPOINTS_TAILWIND, type BatteryManager, type Breakpoints, COOKIE_EVENT, type ColorSelectionOptions, type ColorSelectionResult, type Connection, type ConnectionEffectiveType, type ConnectionType, type EyeDropper, type EyeDropperConstructor, type GetElementTarget, type LongPressReactEvents, type OperatingSystem, type OrientationLockType, type RemoveCookieParams, type RequestOptions, SCRIPT_STATUS_ATTRIBUTE_NAME, STORAGE_EVENT, type ScrollPosition, type SetCookieParams, type StateRef, type UseAsyncReturn, type UseBatteryStateReturn, type UseBatteryValue, type UseBluetoothOptions, type UseBluetoothReturn, type UseBooleanReturn, type UseBreakpointsReturn, type UseBreakpointsStrategy, type UseClickOutside, type UseClickOutsideTarget, type UseCookieInitialValue, type UseCookieOptions, type UseCookieReturn, type UseCopyToClipboardParams, type UseCopyToClipboardReturn, type UseCounter, type UseCounterOptions, type UseCounterReturn, type UseCssVar, type UseCssVarReturn, type UseCssVarTarget, type UseDeviceMotionParams, type UseDeviceMotionReturn, type UseDeviceOrientationReturn, type UseDeviceOrientationValue, type UseDevicePixelRatioReturn, type UseDisclosureOptions, type UseDisclosureReturn, type UseDisplayMediaOptions, type UseDisplayMediaOverload, type UseDisplayMediaReturn, type UseDisplayMediaTarget, type UseDocumentTitleOptions, type UseDocumentTitleReturn, type UseElementSize, type UseElementSizeReturn, type UseElementSizeTarget, type UseElementSizeValue, type UseEventListener, type UseEventListenerOptions, type UseEventListenerReturn, type UseEventListenerTarget, type UseEyeDropperReturn, type UseFaviconReturn, type UseFieldParams, type UseFieldRegisterParams, type UseFieldReturn, type UseFileDialog, type UseFileDialogOptions, type UseFileDialogReturn, type UseFocus, type UseFocusOptions, type UseFocusReturn, type UseFocusTarget, type UseFullScreen, type UseFullScreenOptions, type UseFullScreenReturn, type UseFullScreenTarget, type UseGamepadStateReturn, type UseGeolocationParams, type UseGeolocationReturn, type UseHotkeys, type UseHotkeysHotkeys, type UseHotkeysKey, type UseHotkeysOptions, type UseHotkeysTarget, type UseHover, type UseHoverOptions, type UseHoverTarget, type UseIdleOptions, type UseIdleReturn, type UseImageOptions, type UseImageReturn, type UseInfiniteScroll, type UseInfiniteScrollOptions, type UseInfiniteScrollTarget, type UseIntersectionObserver, type UseIntersectionObserverOptions, type UseIntersectionObserverReturn, type UseIntersectionObserverTarget, type UseIntervalOptions, type UseIntervalReturn, type UseKeyPressEvent, type UseKeyPressEventKey, type UseKeyPressKey, type UseKeyPressOptions, type UseKeyboardParams, type UseKeysPressedParams, type UseLastChangedOptions, type UseListReturn, type UseLongPressBind, type UseLongPressOptions, type UseLongPressReturn, type UseLongPressTarget, type UseMapReturn, type UseMeasureReturn, type UseMeasureScreen, type UseMeasureTarget, type UseMemoryReturn, type UseMouse, type UseMouseReturn, type UseMouseTarget, type UseMutationObserver, type UseMutationObserverOptions, type UseMutationObserverReturn, type UseMutationObserverTarget, type UseNetworkReturn, type UseOffsetPaginationOptions, type UseOffsetPaginationReturn, type UseOptimisticReturn, type UseOrientationReturn, type UseOtpCredential, type UseOtpCredentialCallback, type UseOtpCredentialParams, type UseOtpCredentialReturn, type UsePaint, type UsePaintOptions, type UsePaintReturn, type UsePaintTarget, type UseParallax, type UseParallaxOptions, type UseParallaxValue, type UsePermissionName, type UsePermissionOptions, type UsePermissionReturn, type UsePostMessageReturn, type UsePreferredColorSchemeReturn, type UsePreferredContrastReturn, type UsePreferredReducedMotionReturn, type UsePreviousOptions, type UseQueryOptions, type UseQueryReturn, type UseQueueReturn, type UseRafCallback, type UseRafOptions, type UseRafParams, type UseRafReturn, type UseRafValueReturn, type UseRenderInfoReturn, type UseResizeObserver, type UseResizeObserverOptions, type UseResizeObserverReturn, type UseResizeObserverTarget, type UseScreenOrientationValue, type UseScriptOptions, type UseScriptStatus, type UseScroll, type UseScrollCallbackParams, type UseScrollIntoViewOptions, type UseScrollIntoViewOverload, type UseScrollIntoViewReturn, type UseScrollIntoViewTarget, type UseScrollOptions, type UseScrollTarget, type UseScrollTo, type UseScrollToOptions, type UseScrollToReturn, type UseScrollToTarget, type UseShareParams, type UseShareReturn, type UseStopwatchOptions, type UseStopwatchReturn, type UseStorageInitialValue, type UseStorageOptions, type UseStorageReturn, type UseTextDirection, type UseTextDirectionReturn, type UseTextDirectionTarget, type UseTextDirectionValue, type UseTextSelectionReturn, type UseTimeReturn, type UseTimer, type UseTimerOptions, type UseTimerReturn, type UseToggleReturn, type UseVibratePattern, type UseVibrateReturn, type UseWebSocketOptions, type UseWebSocketReturn, type UseWebSocketStatus, type UseWebSocketUrl, type UseWindowSizeReturn, type WizardItem,
|
|
3967
|
+
export { BREAKPOINTS_ANT_DESIGN, BREAKPOINTS_BOOTSTRAP_V5, BREAKPOINTS_MANTINE, BREAKPOINTS_MASTER_CSS, BREAKPOINTS_MATERIAL_UI, BREAKPOINTS_PRIME_FLEX, BREAKPOINTS_QUASAR_V2, BREAKPOINTS_SEMANTIC, BREAKPOINTS_TAILWIND, type BatteryManager, type Breakpoints, COOKIE_EVENT, type ColorSelectionOptions, type ColorSelectionResult, type Connection, type ConnectionEffectiveType, type ConnectionType, type EyeDropper, type EyeDropperConstructor, type GetElementTarget, type LongPressReactEvents, type OperatingSystem, type OrientationLockType, type RemoveCookieParams, type RequestOptions, SCRIPT_STATUS_ATTRIBUTE_NAME, STORAGE_EVENT, type ScrollPosition, type SetCookieParams, type StateRef, type UseAsyncReturn, type UseBatteryStateReturn, type UseBatteryValue, type UseBluetoothOptions, type UseBluetoothReturn, type UseBooleanReturn, type UseBreakpointsReturn, type UseBreakpointsStrategy, type UseClickOutside, type UseClickOutsideTarget, type UseCookieInitialValue, type UseCookieOptions, type UseCookieReturn, type UseCopyToClipboardParams, type UseCopyToClipboardReturn, type UseCounter, type UseCounterOptions, type UseCounterReturn, type UseCssVar, type UseCssVarReturn, type UseCssVarTarget, type UseDeviceMotionParams, type UseDeviceMotionReturn, type UseDeviceOrientationReturn, type UseDeviceOrientationValue, type UseDevicePixelRatioReturn, type UseDisclosureOptions, type UseDisclosureReturn, type UseDisplayMediaOptions, type UseDisplayMediaOverload, type UseDisplayMediaReturn, type UseDisplayMediaTarget, type UseDocumentTitleOptions, type UseDocumentTitleReturn, type UseElementSize, type UseElementSizeReturn, type UseElementSizeTarget, type UseElementSizeValue, type UseEventListener, type UseEventListenerOptions, type UseEventListenerReturn, type UseEventListenerTarget, type UseEyeDropperReturn, type UseFaviconReturn, type UseFieldParams, type UseFieldRegisterParams, type UseFieldReturn, type UseFileDialog, type UseFileDialogOptions, type UseFileDialogReturn, type UseFocus, type UseFocusOptions, type UseFocusReturn, type UseFocusTarget, type UseFullScreen, type UseFullScreenOptions, type UseFullScreenReturn, type UseFullScreenTarget, type UseGamepadStateReturn, type UseGeolocationParams, type UseGeolocationReturn, type UseHotkeys, type UseHotkeysHotkeys, type UseHotkeysKey, type UseHotkeysOptions, type UseHotkeysTarget, type UseHover, type UseHoverOptions, type UseHoverTarget, type UseIdleOptions, type UseIdleReturn, type UseImageOptions, type UseImageReturn, type UseInfiniteScroll, type UseInfiniteScrollOptions, type UseInfiniteScrollTarget, type UseIntersectionObserver, type UseIntersectionObserverOptions, type UseIntersectionObserverReturn, type UseIntersectionObserverTarget, type UseIntervalOptions, type UseIntervalReturn, type UseKeyPressEvent, type UseKeyPressEventKey, type UseKeyPressKey, type UseKeyPressOptions, type UseKeyboardParams, type UseKeysPressedParams, type UseLastChangedOptions, type UseListReturn, type UseLongPressBind, type UseLongPressOptions, type UseLongPressReturn, type UseLongPressTarget, type UseMapReturn, type UseMeasureReturn, type UseMeasureScreen, type UseMeasureTarget, type UseMemoryReturn, type UseMouse, type UseMouseReturn, type UseMouseTarget, type UseMutationObserver, type UseMutationObserverOptions, type UseMutationObserverReturn, type UseMutationObserverTarget, type UseNetworkReturn, type UseOffsetPaginationOptions, type UseOffsetPaginationReturn, type UseOptimisticReturn, type UseOrientationReturn, type UseOtpCredential, type UseOtpCredentialCallback, type UseOtpCredentialParams, type UseOtpCredentialReturn, type UsePaint, type UsePaintOptions, type UsePaintReturn, type UsePaintTarget, type UseParallax, type UseParallaxOptions, type UseParallaxValue, type UsePermissionName, type UsePermissionOptions, type UsePermissionReturn, type UsePostMessageReturn, type UsePreferredColorSchemeReturn, type UsePreferredContrastReturn, type UsePreferredReducedMotionReturn, type UsePreviousOptions, type UseQueryOptions, type UseQueryReturn, type UseQueueReturn, type UseRafCallback, type UseRafOptions, type UseRafParams, type UseRafReturn, type UseRafValueReturn, type UseRenderInfoReturn, type UseResizeObserver, type UseResizeObserverOptions, type UseResizeObserverReturn, type UseResizeObserverTarget, type UseScreenOrientationValue, type UseScriptOptions, type UseScriptStatus, type UseScroll, type UseScrollCallbackParams, type UseScrollIntoViewOptions, type UseScrollIntoViewOverload, type UseScrollIntoViewReturn, type UseScrollIntoViewTarget, type UseScrollOptions, type UseScrollTarget, type UseScrollTo, type UseScrollToOptions, type UseScrollToReturn, type UseScrollToTarget, type UseShareParams, type UseShareReturn, type UseStopwatchOptions, type UseStopwatchReturn, type UseStorageInitialValue, type UseStorageOptions, type UseStorageReturn, type UseTextDirection, type UseTextDirectionReturn, type UseTextDirectionTarget, type UseTextDirectionValue, type UseTextSelectionReturn, type UseTimeReturn, type UseTimer, type UseTimerOptions, type UseTimerReturn, type UseToggleReturn, type UseVibratePattern, type UseVibrateReturn, type UseWebSocketOptions, type UseWebSocketReturn, type UseWebSocketStatus, type UseWebSocketUrl, type UseWindowSizeReturn, type WizardItem, debounce, dispatchCookieEvent, dispatchStorageEvent, getConnection, getCookies, getDate, getElement, getOperatingSystem, getRangesSelection, getRetry, getTimeFromSeconds, isHotkeyMatch, isPermissionAllowed, isTarget, legacyCopyToClipboard, mapGamepadToXbox360Controller, removeCookie, scrollTo, setCookie, throttle, useActiveElement, useAsync, useBattery, useBluetooth, useBoolean, useBreakpoints, useBrowserLanguage, useClickOutside, useClipboard, useConst, useCookie, useCounter, useCssVar, useDebounceCallback, useDebounceValue, useDefault, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDidUpdate, useDisclosure, useDisplayMedia, useDocumentEvent, useDocumentTitle, useDocumentVisibility, useElementSize, useEvent, useEventListener, useEyeDropper, useFavicon, useField, useFileDialog, useFocus, useFps, useFullscreen, useGamepad, useGeolocation, useHash, useHotkeys, useHover, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useInterval, useIsFirstRender, useIsomorphicLayoutEffect, useKeyPress, useKeyPressEvent, useKeyboard, useKeysPressed, useLastChanged, useLatest, useList, useLocalStorage, useLogger, useLongPress, useMap, useMeasure, useMediaQuery, useMemory, useMount, useMouse, useMutation, useMutationObserver, useNetwork, useOffsetPagination, useOnline, useOperatingSystem, useOptimistic, useOrientation, useOtpCredential, usePageLeave, usePaint, useParallax, usePermission, usePointerLock, usePostMessage, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useQuery, useQueue, useRaf, useRafValue, useRefState, useRenderCount, useRenderInfo, useRerender, useResizeObserver, useScreenOrientation, type useScreenOrientationReturn, useScript, useScroll, useScrollIntoView, useScrollTo, useSessionStorage, useSet, useShare, useStateHistory, useStep, useStopwatch, useStorage, useTextDirection, useTextSelection, useThrottleCallback, useThrottleValue, useTime, useTimeout, useTimer, useToggle, useUnmount, useVibrate, useWebSocket, useWindowEvent, useWindowFocus, useWindowScroll, useWindowSize, useWizard };
|