@siberiacancode/reactuse 0.0.90 → 0.0.93
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/README.md +1 -1
- package/dist/cjs/{_rollupPluginBabelHelpers-BsWog5nG.js → _rollupPluginBabelHelpers-CuUcoGqg.js} +3 -3
- package/dist/cjs/_rollupPluginBabelHelpers-CuUcoGqg.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/useBattery/useBattery.js.map +1 -1
- package/dist/cjs/hooks/useBluetooth/useBluetooth.js +2 -2
- package/dist/cjs/hooks/useBoolean/useBoolean.js +2 -2
- package/dist/cjs/hooks/useBreakpoints/constants/breakpoints.js +1 -1
- package/dist/cjs/hooks/useBreakpoints/useBreakpoints.js +2 -2
- package/dist/cjs/hooks/useBreakpoints/useBreakpoints.js.map +1 -1
- package/dist/cjs/hooks/useBrowserLanguage/useBrowserLanguage.js +1 -1
- package/dist/cjs/hooks/useClickOutside/useClickOutside.js +2 -2
- package/dist/cjs/hooks/useClickOutside/useClickOutside.js.map +1 -1
- package/dist/cjs/hooks/useClipboard/useClipboard.js +2 -2
- package/dist/cjs/hooks/useConst/useConst.js +1 -1
- package/dist/cjs/hooks/useCounter/useCounter.js +2 -2
- package/dist/cjs/hooks/useCssVar/useCssVar.js +2 -2
- package/dist/cjs/hooks/useCssVar/useCssVar.js.map +1 -1
- package/dist/cjs/hooks/useDebounceCallback/useDebounceCallback.js +2 -2
- package/dist/cjs/hooks/useDebounceCallback/useDebounceCallback.js.map +1 -1
- package/dist/cjs/hooks/useDebounceValue/useDebounceValue.js +2 -2
- package/dist/cjs/hooks/useDebounceValue/useDebounceValue.js.map +1 -1
- package/dist/cjs/hooks/useDefault/useDefault.js +2 -2
- package/dist/cjs/hooks/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/useDevicePixelRatio/useDevicePixelRatio.js.map +1 -1
- package/dist/cjs/hooks/useDidUpdate/useDidUpdate.js +2 -2
- package/dist/cjs/hooks/useDidUpdate/useDidUpdate.js.map +1 -1
- package/dist/cjs/hooks/useDisclosure/useDisclosure.js +2 -2
- package/dist/cjs/hooks/useDisplayMedia/useDisplayMedia.js +3 -0
- package/dist/cjs/hooks/useDisplayMedia/useDisplayMedia.js.map +1 -0
- package/dist/cjs/hooks/useDocumentEvent/useDocumentEvent.js +2 -2
- package/dist/cjs/hooks/useDocumentEvent/useDocumentEvent.js.map +1 -1
- package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
- package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js.map +1 -1
- package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
- package/dist/cjs/hooks/useElementSize/useElementSize.js +2 -2
- package/dist/cjs/hooks/useElementSize/useElementSize.js.map +1 -1
- package/dist/cjs/hooks/useEvent/useEvent.js +1 -1
- package/dist/cjs/hooks/useEventListener/useEventListener.js +2 -2
- package/dist/cjs/hooks/useEventListener/useEventListener.js.map +1 -1
- package/dist/cjs/hooks/useEyeDropper/useEyeDropper.js +2 -2
- package/dist/cjs/hooks/useFavicon/useFavicon.js +2 -2
- package/dist/cjs/hooks/useFavicon/useFavicon.js.map +1 -1
- package/dist/cjs/hooks/useField/useField.js +2 -2
- package/dist/cjs/hooks/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/useHover/useHover.js.map +1 -1
- package/dist/cjs/hooks/useIdle/useIdle.js +2 -2
- package/dist/cjs/hooks/useIdle/useIdle.js.map +1 -1
- package/dist/cjs/hooks/useImage/useImage.js +2 -2
- package/dist/cjs/hooks/useImage/useImage.js.map +1 -1
- package/dist/cjs/hooks/useInfiniteScroll/useInfiniteScroll.js +2 -2
- package/dist/cjs/hooks/useInfiniteScroll/useInfiniteScroll.js.map +1 -1
- package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
- package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js.map +1 -1
- package/dist/cjs/hooks/useInterval/useInterval.js +2 -2
- package/dist/cjs/hooks/useInterval/useInterval.js.map +1 -1
- package/dist/cjs/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
- package/dist/cjs/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +2 -2
- package/dist/cjs/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/cjs/hooks/useKeyPress/useKeyPress.js +2 -2
- package/dist/cjs/hooks/useKeyPress/useKeyPress.js.map +1 -1
- package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.js +2 -2
- package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.js.map +1 -1
- package/dist/cjs/hooks/useKeyboard/useKeyboard.js +2 -2
- package/dist/cjs/hooks/useKeyboard/useKeyboard.js.map +1 -1
- package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js +2 -2
- package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js.map +1 -1
- package/dist/cjs/hooks/useLastChanged/useLastChanged.js +2 -2
- package/dist/cjs/hooks/useLastChanged/useLastChanged.js.map +1 -1
- 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/useLocalStorage/useLocalStorage.js.map +1 -1
- package/dist/cjs/hooks/useLogger/useLogger.js +2 -2
- package/dist/cjs/hooks/useLogger/useLogger.js.map +1 -1
- 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/useMouse/useMouse.js.map +1 -1
- 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/useNetwork/useNetwork.js.map +1 -1
- 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/useOptimistic/useOptimistic.js.map +1 -1
- package/dist/cjs/hooks/useOrientation/useOrientation.js +2 -2
- package/dist/cjs/hooks/useOrientation/useOrientation.js.map +1 -1
- package/dist/cjs/hooks/useOtpCredential/useOtpCredential.js +2 -2
- package/dist/cjs/hooks/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/usePaint/usePaint.js.map +1 -1
- package/dist/cjs/hooks/useParallax/useParallax.js +2 -2
- package/dist/cjs/hooks/useParallax/useParallax.js.map +1 -1
- package/dist/cjs/hooks/usePermission/usePermission.js +2 -2
- package/dist/cjs/hooks/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/useRefState/useRefState.js.map +1 -1
- 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/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/useScroll/useScroll.js +2 -2
- package/dist/cjs/hooks/useScroll/useScroll.js.map +1 -1
- package/dist/cjs/hooks/useScrollIntoView/useScrollIntoView.js +3 -0
- package/dist/cjs/hooks/useScrollIntoView/useScrollIntoView.js.map +1 -0
- package/dist/cjs/hooks/useScrollTo/useScrollTo.js +2 -2
- package/dist/cjs/hooks/useScrollTo/useScrollTo.js.map +1 -1
- package/dist/cjs/hooks/useSessionStorage/useSessionStorage.js +2 -2
- package/dist/cjs/hooks/useSessionStorage/useSessionStorage.js.map +1 -1
- package/dist/cjs/hooks/useSet/useSet.js +2 -2
- package/dist/cjs/hooks/useShare/useShare.js +2 -2
- package/dist/cjs/hooks/useShare/useShare.js.map +1 -1
- package/dist/cjs/hooks/useStateHistory/useStateHistory.js +3 -0
- package/dist/cjs/hooks/useStateHistory/useStateHistory.js.map +1 -0
- 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/useStorage/useStorage.js.map +1 -1
- package/dist/cjs/hooks/useTextDirection/useTextDirection.js +2 -2
- package/dist/cjs/hooks/useTextDirection/useTextDirection.js.map +1 -1
- package/dist/cjs/hooks/useTextSelection/useTextSelection.js +2 -2
- package/dist/cjs/hooks/useTextSelection/useTextSelection.js.map +1 -1
- package/dist/cjs/hooks/useThrottleCallback/useThrottleCallback.js +2 -2
- package/dist/cjs/hooks/useThrottleCallback/useThrottleCallback.js.map +1 -1
- package/dist/cjs/hooks/useThrottleValue/useThrottleValue.js +2 -2
- package/dist/cjs/hooks/useThrottleValue/useThrottleValue.js.map +1 -1
- package/dist/cjs/hooks/useTime/useTime.js +2 -2
- package/dist/cjs/hooks/useTime/useTime.js.map +1 -1
- package/dist/cjs/hooks/useTimeout/useTimeout.js +2 -2
- package/dist/cjs/hooks/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/useWebSocket/useWebSocket.js.map +1 -1
- package/dist/cjs/hooks/useWindowEvent/useWindowEvent.js +2 -2
- package/dist/cjs/hooks/useWindowEvent/useWindowEvent.js.map +1 -1
- package/dist/cjs/hooks/useWindowFocus/useWindowFocus.js +2 -2
- package/dist/cjs/hooks/useWindowScroll/useWindowScroll.js +2 -2
- package/dist/cjs/hooks/useWindowScroll/useWindowScroll.js.map +1 -1
- package/dist/cjs/hooks/useWindowSize/useWindowSize.js +2 -2
- package/dist/cjs/hooks/useWindowSize/useWindowSize.js.map +1 -1
- package/dist/cjs/hooks/useWizard/useWizard.js +2 -2
- package/dist/cjs/hooks/useWizard/useWizard.js.map +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/utils/helpers/debounce.js +1 -1
- package/dist/cjs/utils/helpers/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/isTarget.js.map +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-CNZ3s-mD.js → _rollupPluginBabelHelpers-BQehtgCo.js} +3 -3
- package/dist/esm/_rollupPluginBabelHelpers-BQehtgCo.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/useBattery/useBattery.js.map +1 -1
- package/dist/esm/hooks/useBluetooth/useBluetooth.js +2 -2
- package/dist/esm/hooks/useBoolean/useBoolean.js +2 -2
- package/dist/esm/hooks/useBreakpoints/constants/breakpoints.js +1 -1
- package/dist/esm/hooks/useBreakpoints/useBreakpoints.js +2 -2
- package/dist/esm/hooks/useBreakpoints/useBreakpoints.js.map +1 -1
- package/dist/esm/hooks/useBrowserLanguage/useBrowserLanguage.js +1 -1
- package/dist/esm/hooks/useClickOutside/useClickOutside.js +2 -2
- package/dist/esm/hooks/useClickOutside/useClickOutside.js.map +1 -1
- package/dist/esm/hooks/useClipboard/useClipboard.js +2 -2
- package/dist/esm/hooks/useConst/useConst.js +1 -1
- package/dist/esm/hooks/useCounter/useCounter.js +2 -2
- package/dist/esm/hooks/useCssVar/useCssVar.js +2 -2
- package/dist/esm/hooks/useCssVar/useCssVar.js.map +1 -1
- package/dist/esm/hooks/useDebounceCallback/useDebounceCallback.js +2 -2
- package/dist/esm/hooks/useDebounceCallback/useDebounceCallback.js.map +1 -1
- package/dist/esm/hooks/useDebounceValue/useDebounceValue.js +2 -2
- package/dist/esm/hooks/useDebounceValue/useDebounceValue.js.map +1 -1
- package/dist/esm/hooks/useDefault/useDefault.js +2 -2
- package/dist/esm/hooks/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/useDevicePixelRatio/useDevicePixelRatio.js +2 -2
- package/dist/esm/hooks/useDevicePixelRatio/useDevicePixelRatio.js.map +1 -1
- package/dist/esm/hooks/useDidUpdate/useDidUpdate.js +2 -2
- package/dist/esm/hooks/useDidUpdate/useDidUpdate.js.map +1 -1
- package/dist/esm/hooks/useDisclosure/useDisclosure.js +2 -2
- package/dist/esm/hooks/useDisplayMedia/useDisplayMedia.js +3 -0
- package/dist/esm/hooks/useDisplayMedia/useDisplayMedia.js.map +1 -0
- package/dist/esm/hooks/useDocumentEvent/useDocumentEvent.js +2 -2
- package/dist/esm/hooks/useDocumentEvent/useDocumentEvent.js.map +1 -1
- package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
- package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js.map +1 -1
- package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.js +1 -1
- package/dist/esm/hooks/useElementSize/useElementSize.js +2 -2
- package/dist/esm/hooks/useElementSize/useElementSize.js.map +1 -1
- package/dist/esm/hooks/useEvent/useEvent.js +1 -1
- package/dist/esm/hooks/useEventListener/useEventListener.js +2 -2
- package/dist/esm/hooks/useEventListener/useEventListener.js.map +1 -1
- package/dist/esm/hooks/useEyeDropper/useEyeDropper.js +2 -2
- package/dist/esm/hooks/useFavicon/useFavicon.js +2 -2
- package/dist/esm/hooks/useFavicon/useFavicon.js.map +1 -1
- package/dist/esm/hooks/useField/useField.js +2 -2
- package/dist/esm/hooks/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/useHover/useHover.js.map +1 -1
- package/dist/esm/hooks/useIdle/useIdle.js +2 -2
- package/dist/esm/hooks/useIdle/useIdle.js.map +1 -1
- package/dist/esm/hooks/useImage/useImage.js +2 -2
- package/dist/esm/hooks/useImage/useImage.js.map +1 -1
- package/dist/esm/hooks/useInfiniteScroll/useInfiniteScroll.js +2 -2
- package/dist/esm/hooks/useInfiniteScroll/useInfiniteScroll.js.map +1 -1
- package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -2
- package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js.map +1 -1
- package/dist/esm/hooks/useInterval/useInterval.js +2 -2
- package/dist/esm/hooks/useInterval/useInterval.js.map +1 -1
- package/dist/esm/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
- package/dist/esm/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +2 -2
- package/dist/esm/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/esm/hooks/useKeyPress/useKeyPress.js +2 -2
- package/dist/esm/hooks/useKeyPress/useKeyPress.js.map +1 -1
- package/dist/esm/hooks/useKeyPressEvent/useKeyPressEvent.js +2 -2
- package/dist/esm/hooks/useKeyPressEvent/useKeyPressEvent.js.map +1 -1
- package/dist/esm/hooks/useKeyboard/useKeyboard.js +2 -2
- package/dist/esm/hooks/useKeyboard/useKeyboard.js.map +1 -1
- package/dist/esm/hooks/useKeysPressed/useKeysPressed.js +2 -2
- package/dist/esm/hooks/useKeysPressed/useKeysPressed.js.map +1 -1
- package/dist/esm/hooks/useLastChanged/useLastChanged.js +2 -2
- package/dist/esm/hooks/useLastChanged/useLastChanged.js.map +1 -1
- 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/useLocalStorage/useLocalStorage.js.map +1 -1
- package/dist/esm/hooks/useLogger/useLogger.js +2 -2
- package/dist/esm/hooks/useLogger/useLogger.js.map +1 -1
- 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/useMeasure/useMeasure.js.map +1 -1
- 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/useMouse/useMouse.js.map +1 -1
- 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/useNetwork/useNetwork.js.map +1 -1
- 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/useOptimistic/useOptimistic.js.map +1 -1
- package/dist/esm/hooks/useOrientation/useOrientation.js +2 -2
- package/dist/esm/hooks/useOrientation/useOrientation.js.map +1 -1
- package/dist/esm/hooks/useOtpCredential/useOtpCredential.js +2 -2
- package/dist/esm/hooks/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/usePaint/usePaint.js.map +1 -1
- package/dist/esm/hooks/useParallax/useParallax.js +2 -2
- package/dist/esm/hooks/useParallax/useParallax.js.map +1 -1
- package/dist/esm/hooks/usePermission/usePermission.js +2 -2
- package/dist/esm/hooks/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/useRefState/useRefState.js.map +1 -1
- package/dist/esm/hooks/useRenderCount/useRenderCount.js +1 -1
- package/dist/esm/hooks/useRenderInfo/useRenderInfo.js +1 -1
- package/dist/esm/hooks/useRerender/useRerender.js +1 -1
- package/dist/esm/hooks/useResizeObserver/useResizeObserver.js +2 -2
- package/dist/esm/hooks/useResizeObserver/useResizeObserver.js.map +1 -1
- package/dist/esm/hooks/useScreenOrientation/useScreenOrientation.js +2 -2
- package/dist/esm/hooks/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 +3 -0
- package/dist/esm/hooks/useScrollIntoView/useScrollIntoView.js.map +1 -0
- package/dist/esm/hooks/useScrollTo/useScrollTo.js +2 -2
- package/dist/esm/hooks/useScrollTo/useScrollTo.js.map +1 -1
- package/dist/esm/hooks/useSessionStorage/useSessionStorage.js +2 -2
- package/dist/esm/hooks/useSessionStorage/useSessionStorage.js.map +1 -1
- package/dist/esm/hooks/useSet/useSet.js +2 -2
- package/dist/esm/hooks/useShare/useShare.js +2 -2
- package/dist/esm/hooks/useShare/useShare.js.map +1 -1
- package/dist/esm/hooks/useStateHistory/useStateHistory.js +3 -0
- package/dist/esm/hooks/useStateHistory/useStateHistory.js.map +1 -0
- 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/useStorage/useStorage.js.map +1 -1
- package/dist/esm/hooks/useTextDirection/useTextDirection.js +2 -2
- package/dist/esm/hooks/useTextDirection/useTextDirection.js.map +1 -1
- package/dist/esm/hooks/useTextSelection/useTextSelection.js +2 -2
- package/dist/esm/hooks/useTextSelection/useTextSelection.js.map +1 -1
- package/dist/esm/hooks/useThrottleCallback/useThrottleCallback.js +2 -2
- package/dist/esm/hooks/useThrottleCallback/useThrottleCallback.js.map +1 -1
- package/dist/esm/hooks/useThrottleValue/useThrottleValue.js +2 -2
- package/dist/esm/hooks/useThrottleValue/useThrottleValue.js.map +1 -1
- package/dist/esm/hooks/useTime/useTime.js +2 -2
- package/dist/esm/hooks/useTime/useTime.js.map +1 -1
- package/dist/esm/hooks/useTimeout/useTimeout.js +2 -2
- package/dist/esm/hooks/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/useWebSocket/useWebSocket.js.map +1 -1
- package/dist/esm/hooks/useWindowEvent/useWindowEvent.js +2 -2
- package/dist/esm/hooks/useWindowEvent/useWindowEvent.js.map +1 -1
- package/dist/esm/hooks/useWindowFocus/useWindowFocus.js +2 -2
- package/dist/esm/hooks/useWindowScroll/useWindowScroll.js +2 -2
- package/dist/esm/hooks/useWindowScroll/useWindowScroll.js.map +1 -1
- package/dist/esm/hooks/useWindowSize/useWindowSize.js +2 -2
- package/dist/esm/hooks/useWindowSize/useWindowSize.js.map +1 -1
- package/dist/esm/hooks/useWizard/useWizard.js +2 -2
- package/dist/esm/hooks/useWizard/useWizard.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/utils/helpers/debounce.js +1 -1
- package/dist/esm/utils/helpers/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/isTarget.js.map +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/types/index.d.ts +192 -30
- package/package.json +89 -114
- package/LICENSE +0 -21
- package/dist/cjs/_rollupPluginBabelHelpers-BsWog5nG.js.map +0 -1
- package/dist/cjs/utils/helpers/isClient.js +0 -3
- package/dist/cjs/utils/helpers/isClient.js.map +0 -1
- package/dist/esm/_rollupPluginBabelHelpers-CNZ3s-mD.js.map +0 -1
- package/dist/esm/utils/helpers/isClient.js +0 -3
- package/dist/esm/utils/helpers/isClient.js.map +0 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -275,6 +275,7 @@ declare const useBrowserLanguage: () => string;
|
|
|
275
275
|
interface StateRef<Value> {
|
|
276
276
|
(node: Value): void;
|
|
277
277
|
current: Value;
|
|
278
|
+
state?: Value;
|
|
278
279
|
}
|
|
279
280
|
/**
|
|
280
281
|
* @name useRefState
|
|
@@ -620,6 +621,64 @@ interface UseDisclosureReturn {
|
|
|
620
621
|
*/
|
|
621
622
|
declare const useDisclosure: (initialValue?: boolean, options?: UseDisclosureOptions) => UseDisclosureReturn;
|
|
622
623
|
|
|
624
|
+
/** The use display media return type */
|
|
625
|
+
interface UseDisplayMediaReturn {
|
|
626
|
+
/** Whether screen sharing is currently active */
|
|
627
|
+
sharing: boolean;
|
|
628
|
+
/** The media stream object */
|
|
629
|
+
stream: MediaStream | null;
|
|
630
|
+
/** Whether the display media API is supported */
|
|
631
|
+
supported: boolean;
|
|
632
|
+
/** Start screen sharing */
|
|
633
|
+
start: () => Promise<void>;
|
|
634
|
+
/** Stop screen sharing */
|
|
635
|
+
stop: () => void;
|
|
636
|
+
}
|
|
637
|
+
/** The use display media options type */
|
|
638
|
+
interface UseDisplayMediaOptions {
|
|
639
|
+
/** Whether to enable audio sharing */
|
|
640
|
+
audio?: boolean | MediaTrackConstraints;
|
|
641
|
+
/** Whether to start immediately */
|
|
642
|
+
enabled?: boolean;
|
|
643
|
+
/** Whether to enable video sharing */
|
|
644
|
+
video?: boolean | MediaTrackConstraints;
|
|
645
|
+
}
|
|
646
|
+
/** The use display media target type */
|
|
647
|
+
type UseDisplayMediaTarget = string | HTMLVideoElement | RefObject<HTMLVideoElement | null | undefined>;
|
|
648
|
+
interface UseDisplayMediaOverload {
|
|
649
|
+
<Target extends UseDisplayMediaTarget>(target: Target, options?: UseDisplayMediaOptions): UseDisplayMediaReturn;
|
|
650
|
+
<Target extends UseDisplayMediaTarget = HTMLVideoElement>(options?: UseDisplayMediaOptions, target?: Target): {
|
|
651
|
+
ref: StateRef<Target>;
|
|
652
|
+
} & UseDisplayMediaReturn;
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* @name useDisplayMedia
|
|
656
|
+
* @description - Hook that provides screen sharing functionality using the Display Media API
|
|
657
|
+
* @category Browser
|
|
658
|
+
*
|
|
659
|
+
* @overload
|
|
660
|
+
* @template Target The target video element
|
|
661
|
+
* @param {Target} target The target video element to display the media stream
|
|
662
|
+
* @param {boolean | MediaTrackConstraints} [options.audio] Whether to enable audio sharing
|
|
663
|
+
* @param {boolean} [options.enabled=false] Whether to start immediately
|
|
664
|
+
* @param {boolean | MediaTrackConstraints} [options.video] Whether to enable video sharing
|
|
665
|
+
* @returns {UseDisplayMediaReturn} Object containing stream, sharing status and control methods
|
|
666
|
+
*
|
|
667
|
+
* @example
|
|
668
|
+
* const { stream, sharing, start, stop } = useDisplayMedia(ref);
|
|
669
|
+
*
|
|
670
|
+
* @overload
|
|
671
|
+
* @template Target The target video element
|
|
672
|
+
* @param {boolean | MediaTrackConstraints} [options.audio] Whether to enable audio sharing
|
|
673
|
+
* @param {boolean} [options.enabled=false] Whether to start immediately
|
|
674
|
+
* @param {boolean | MediaTrackConstraints} [options.video] Whether to enable video sharing
|
|
675
|
+
* @returns {UseDisplayMediaReturn & { ref: StateRef<HTMLVideoElement> }} Object containing stream, sharing status, control methods and ref
|
|
676
|
+
*
|
|
677
|
+
* @example
|
|
678
|
+
* const { ref, stream, sharing, start, stop } = useDisplayMedia<HTMLVideoElement>();
|
|
679
|
+
*/
|
|
680
|
+
declare const useDisplayMedia: UseDisplayMediaOverload;
|
|
681
|
+
|
|
623
682
|
/** The use event listener target type */
|
|
624
683
|
type UseEventListenerTarget = string | Document | Element | RefObject<Element | null | undefined> | Window;
|
|
625
684
|
/** The use event listener options */
|
|
@@ -1230,41 +1289,61 @@ declare const useHash: () => UseHashReturn;
|
|
|
1230
1289
|
/** The use hotkeys params type */
|
|
1231
1290
|
interface UseHotkeysOptions {
|
|
1232
1291
|
/** Alias map for hotkeys */
|
|
1233
|
-
|
|
1292
|
+
alias?: Record<string, string>;
|
|
1234
1293
|
/** Enable or disable the event listeners */
|
|
1235
1294
|
enabled?: boolean;
|
|
1236
|
-
/** Whether to prevent the default behavior of the event */
|
|
1237
|
-
preventDefault?: boolean;
|
|
1238
|
-
/** The target to attach the event listeners to */
|
|
1239
|
-
target?: UseEventListenerTarget;
|
|
1240
1295
|
}
|
|
1241
1296
|
declare const isHotkeyMatch: (hotkey: string, keys: UseHotkeysKey[]) => boolean;
|
|
1242
|
-
|
|
1297
|
+
/** The hotkeys string type */
|
|
1298
|
+
type UseHotkeysHotkeys = string;
|
|
1299
|
+
/** The hotkey key information */
|
|
1243
1300
|
interface UseHotkeysKey {
|
|
1301
|
+
/** The alias for the key */
|
|
1244
1302
|
alias: string;
|
|
1303
|
+
/** The key code */
|
|
1245
1304
|
code: string;
|
|
1305
|
+
/** The key value */
|
|
1246
1306
|
key: string;
|
|
1247
1307
|
}
|
|
1308
|
+
/** The use hotkeys target type */
|
|
1309
|
+
type UseHotkeysTarget = Element | React.RefObject<Element | null | undefined>;
|
|
1310
|
+
interface UseHotkeys {
|
|
1311
|
+
<Target extends UseHotkeysTarget>(target: Target, hotkeys: UseHotkeysHotkeys, callback: (event: KeyboardEvent) => void, options?: UseHotkeysOptions): void;
|
|
1312
|
+
<Target extends UseHotkeysTarget>(hotkeys: UseHotkeysHotkeys, callback: (event: KeyboardEvent) => void, options?: UseHotkeysOptions, target?: never): StateRef<Target>;
|
|
1313
|
+
}
|
|
1248
1314
|
/**
|
|
1249
1315
|
* @name useHotkeys
|
|
1250
1316
|
* @description - Hook that listens for hotkeys
|
|
1251
1317
|
* @category Sensors
|
|
1252
1318
|
*
|
|
1253
|
-
* @
|
|
1254
|
-
* @
|
|
1255
|
-
* @param {
|
|
1256
|
-
* @param {
|
|
1257
|
-
* @param {
|
|
1258
|
-
* @param {Record<string, string>} [options.
|
|
1259
|
-
* @
|
|
1319
|
+
* @overload
|
|
1320
|
+
* @template Target The target element
|
|
1321
|
+
* @param {Target} [target=window] The target element to attach the event listener to
|
|
1322
|
+
* @param {string} hotkeys The hotkey to listen for
|
|
1323
|
+
* @param {(event: KeyboardEvent) => void} callback The callback function to execute when hotkey is pressed
|
|
1324
|
+
* @param {Record<string, string>} [options.alias] Alias map for hotkeys
|
|
1325
|
+
* @param {boolean} [options.enabled=true] Enable or disable the event listeners
|
|
1326
|
+
* @returns {void}
|
|
1260
1327
|
*
|
|
1261
1328
|
* @example
|
|
1262
|
-
* useHotkeys('
|
|
1329
|
+
* useHotkeys(ref, 'ctrl+a', () => console.log('hotkey pressed'));
|
|
1330
|
+
* @example
|
|
1331
|
+
* useHotkeys(ref, 'ctrl+a, ctrl+b', () => console.log('hotkey pressed'));
|
|
1332
|
+
*
|
|
1333
|
+
* @overload
|
|
1334
|
+
* @template Target The target element
|
|
1335
|
+
* @param {string} hotkeys The hotkey to listen for
|
|
1336
|
+
* @param {(event: KeyboardEvent) => void} callback The callback function to execute when hotkey is pressed
|
|
1337
|
+
* @param {Record<string, string>} [options.alias] Alias map for hotkeys
|
|
1338
|
+
* @param {boolean} [options.enabled=true] Enable or disable the event listeners
|
|
1339
|
+
* @returns {StateRef<Target>} A reference to the target element
|
|
1263
1340
|
*
|
|
1264
1341
|
* @example
|
|
1265
|
-
* useHotkeys('
|
|
1342
|
+
* const ref = useHotkeys('ctrl+a', () => console.log('hotkey pressed'));
|
|
1343
|
+
* @example
|
|
1344
|
+
* const ref = useHotkeys('ctrl+a, ctrl+b', () => console.log('hotkey pressed'));
|
|
1266
1345
|
*/
|
|
1267
|
-
declare const useHotkeys:
|
|
1346
|
+
declare const useHotkeys: UseHotkeys;
|
|
1268
1347
|
|
|
1269
1348
|
/** The use hover target type */
|
|
1270
1349
|
type UseHoverTarget = string | Element | RefObject<Element | null | undefined>;
|
|
@@ -1565,7 +1644,7 @@ interface UseInterval {
|
|
|
1565
1644
|
* @overload
|
|
1566
1645
|
* @param {() => void} callback Any callback function
|
|
1567
1646
|
* @param {number} [interval=1000] Time in milliseconds
|
|
1568
|
-
* @param {boolean} [options.
|
|
1647
|
+
* @param {boolean} [options.enabled=true] Start the interval immediately
|
|
1569
1648
|
* @returns {UseIntervalReturn}
|
|
1570
1649
|
*
|
|
1571
1650
|
* @example
|
|
@@ -1574,7 +1653,7 @@ interface UseInterval {
|
|
|
1574
1653
|
* @overload
|
|
1575
1654
|
* @param {() => void} callback Any callback function
|
|
1576
1655
|
* @param {number} [options.interval=1000] Time in milliseconds
|
|
1577
|
-
* @param {boolean} [options.
|
|
1656
|
+
* @param {boolean} [options.enabled=true] Start the interval immediately
|
|
1578
1657
|
*
|
|
1579
1658
|
* @example
|
|
1580
1659
|
* const { active, pause, resume } = useInterval(() => console.log('inside interval'), { interval: 2500 });
|
|
@@ -2855,8 +2934,8 @@ interface UseResizeObserverReturn {
|
|
|
2855
2934
|
entries: ResizeObserverEntry[];
|
|
2856
2935
|
}
|
|
2857
2936
|
interface UseResizeObserver {
|
|
2858
|
-
<Target extends UseResizeObserverTarget
|
|
2859
|
-
<Target extends UseResizeObserverTarget
|
|
2937
|
+
<Target extends UseResizeObserverTarget>(target: Target, options?: UseResizeObserverOptions): UseResizeObserverReturn;
|
|
2938
|
+
<Target extends UseResizeObserverTarget>(options?: UseResizeObserverOptions, target?: never): UseResizeObserverReturn & {
|
|
2860
2939
|
ref: StateRef<Target>;
|
|
2861
2940
|
};
|
|
2862
2941
|
}
|
|
@@ -3040,12 +3119,64 @@ interface UseScroll {
|
|
|
3040
3119
|
*/
|
|
3041
3120
|
declare const useScroll: UseScroll;
|
|
3042
3121
|
|
|
3122
|
+
/** The scroll into view options type */
|
|
3123
|
+
interface UseScrollIntoViewOptions extends ScrollIntoViewOptions {
|
|
3124
|
+
/** Whether to enable the scroll into view */
|
|
3125
|
+
enabled?: boolean;
|
|
3126
|
+
}
|
|
3127
|
+
/** The scroll into view target type */
|
|
3128
|
+
type UseScrollIntoViewTarget = string | Element | RefObject<Element | null | undefined>;
|
|
3129
|
+
/** The scroll into view return type */
|
|
3130
|
+
interface UseScrollIntoViewReturn {
|
|
3131
|
+
/** Function to scroll element into view */
|
|
3132
|
+
trigger: (params?: {
|
|
3133
|
+
behavior?: ScrollBehavior;
|
|
3134
|
+
block?: ScrollLogicalPosition;
|
|
3135
|
+
inline?: ScrollLogicalPosition;
|
|
3136
|
+
}) => void;
|
|
3137
|
+
}
|
|
3138
|
+
interface UseScrollIntoViewOverload {
|
|
3139
|
+
<Target extends UseScrollIntoViewTarget>(target: Target, options?: UseScrollIntoViewOptions): UseScrollIntoViewReturn;
|
|
3140
|
+
<Target extends UseScrollIntoViewTarget>(options?: UseScrollIntoViewOptions, target?: never): {
|
|
3141
|
+
ref: StateRef<Target>;
|
|
3142
|
+
} & UseScrollIntoViewReturn;
|
|
3143
|
+
}
|
|
3144
|
+
/**
|
|
3145
|
+
* @name useScrollIntoView
|
|
3146
|
+
* @description - Hook that provides functionality to scroll an element into view
|
|
3147
|
+
* @category Sensors
|
|
3148
|
+
*
|
|
3149
|
+
* @overload
|
|
3150
|
+
* @template Target The target element
|
|
3151
|
+
* @param {Target} target The target element to scroll into view
|
|
3152
|
+
* @param {ScrollBehavior} [options.behavior='smooth'] The scrolling behavior
|
|
3153
|
+
* @param {ScrollLogicalPosition} [options.block='start'] The vertical alignment
|
|
3154
|
+
* @param {ScrollLogicalPosition} [options.inline='nearest'] The horizontal alignment
|
|
3155
|
+
* @returns {UseScrollIntoViewReturn} Object containing scroll function
|
|
3156
|
+
*
|
|
3157
|
+
* @example
|
|
3158
|
+
* const { trigger } = useScrollIntoView(ref);
|
|
3159
|
+
*
|
|
3160
|
+
* @overload
|
|
3161
|
+
* @template Target The target element
|
|
3162
|
+
* @param {ScrollBehavior} [options.behavior='smooth'] The scrolling behavior
|
|
3163
|
+
* @param {ScrollLogicalPosition} [options.block='start'] The vertical alignment
|
|
3164
|
+
* @param {ScrollLogicalPosition} [options.inline='nearest'] The horizontal alignment
|
|
3165
|
+
* @returns {UseScrollIntoViewReturn & { ref: StateRef<Target> }} Object containing scroll function and ref
|
|
3166
|
+
*
|
|
3167
|
+
* @example
|
|
3168
|
+
* const { ref, trigger } = useScrollIntoView<HTMLDivElement>();
|
|
3169
|
+
*/
|
|
3170
|
+
declare const useScrollIntoView: UseScrollIntoViewOverload;
|
|
3171
|
+
|
|
3043
3172
|
/** The use scroll target element type */
|
|
3044
3173
|
type UseScrollToTarget = string | Document | Element | RefObject<Element | null | undefined> | Window;
|
|
3045
3174
|
/** The use scroll to options type */
|
|
3046
3175
|
interface UseScrollToOptions {
|
|
3047
3176
|
/** The scrolling behavior */
|
|
3048
3177
|
behavior?: ScrollBehavior;
|
|
3178
|
+
/** Whether to enable the scroll to */
|
|
3179
|
+
enabled?: boolean;
|
|
3049
3180
|
/** The horizontal position to scroll to */
|
|
3050
3181
|
x: number;
|
|
3051
3182
|
/** The vertical position to scroll to */
|
|
@@ -3054,7 +3185,7 @@ interface UseScrollToOptions {
|
|
|
3054
3185
|
/** The use scroll to return type */
|
|
3055
3186
|
interface UseScrollToReturn {
|
|
3056
3187
|
/** The state of scrolling */
|
|
3057
|
-
trigger: (params
|
|
3188
|
+
trigger: (params?: {
|
|
3058
3189
|
x: number;
|
|
3059
3190
|
y: number;
|
|
3060
3191
|
behavior?: ScrollBehavior;
|
|
@@ -3156,20 +3287,20 @@ declare const useSet: <Value>(values?: Value[]) => UseSetReturn<Value>;
|
|
|
3156
3287
|
|
|
3157
3288
|
/** The use share options type */
|
|
3158
3289
|
interface UseShareParams {
|
|
3159
|
-
/**
|
|
3290
|
+
/** Array of files to be shared */
|
|
3160
3291
|
files?: File[];
|
|
3161
|
-
/**
|
|
3292
|
+
/** Text content to be shared */
|
|
3162
3293
|
text?: string;
|
|
3163
|
-
/**
|
|
3294
|
+
/** Title of the content being shared */
|
|
3164
3295
|
title?: string;
|
|
3165
|
-
/**
|
|
3296
|
+
/** URL link to be shared */
|
|
3166
3297
|
url?: string;
|
|
3167
3298
|
}
|
|
3168
3299
|
/** The use share return type */
|
|
3169
3300
|
interface UseShareReturn {
|
|
3170
|
-
/**
|
|
3301
|
+
/** Whether the Web Share API is supported in the current environment */
|
|
3171
3302
|
supported: boolean;
|
|
3172
|
-
/**
|
|
3303
|
+
/** Function to trigger the native share dialog */
|
|
3173
3304
|
share: (shareParams: ShareData) => Promise<void>;
|
|
3174
3305
|
}
|
|
3175
3306
|
/**
|
|
@@ -3188,6 +3319,39 @@ declare const useShare: (params?: UseShareParams) => {
|
|
|
3188
3319
|
supported: boolean;
|
|
3189
3320
|
};
|
|
3190
3321
|
|
|
3322
|
+
/** The use state history hook return type */
|
|
3323
|
+
interface UseStateHistoryReturn<Value> {
|
|
3324
|
+
/** All history values */
|
|
3325
|
+
history: Value[];
|
|
3326
|
+
/** Current index in history */
|
|
3327
|
+
index: number;
|
|
3328
|
+
/** Current value */
|
|
3329
|
+
value: Value;
|
|
3330
|
+
/** Go back specified number of steps in history (default: 1) */
|
|
3331
|
+
back: (steps?: number) => void;
|
|
3332
|
+
/** Go forward specified number of steps in history (default: 1) */
|
|
3333
|
+
forward: (steps?: number) => void;
|
|
3334
|
+
/** Reset history to initial state */
|
|
3335
|
+
reset: () => void;
|
|
3336
|
+
/** Set a new value */
|
|
3337
|
+
set: (value: Value) => void;
|
|
3338
|
+
/** Undo the last change */
|
|
3339
|
+
undo: () => void;
|
|
3340
|
+
}
|
|
3341
|
+
/**
|
|
3342
|
+
* @name useStateHistory
|
|
3343
|
+
* @description - Hook that manages state with history functionality
|
|
3344
|
+
* @category Utilities
|
|
3345
|
+
*
|
|
3346
|
+
* @param {Value} initialValue - The initial value to start the history with
|
|
3347
|
+
* @param {number} [maxSize=10] - Maximum number of history entries to keep
|
|
3348
|
+
* @returns {UseStateHistoryReturn<Value>} Object containing current value, history array and control methods
|
|
3349
|
+
*
|
|
3350
|
+
* @example
|
|
3351
|
+
* const { value, history, index, set, back, forward, reset, undo } = useStateHistory(0);
|
|
3352
|
+
*/
|
|
3353
|
+
declare const useStateHistory: <Value>(initialValue: Value, maxSize?: number) => UseStateHistoryReturn<Value>;
|
|
3354
|
+
|
|
3191
3355
|
/** The use step params type */
|
|
3192
3356
|
interface UseStepParams {
|
|
3193
3357
|
/** Initial value for step */
|
|
@@ -3720,8 +3884,6 @@ declare const getElement: <Target extends GetElementTarget>(target: Target) => E
|
|
|
3720
3884
|
|
|
3721
3885
|
declare const getRetry: (retry: boolean | number) => number;
|
|
3722
3886
|
|
|
3723
|
-
declare const isClient: boolean;
|
|
3724
|
-
|
|
3725
3887
|
declare const isTarget: (target: any) => any;
|
|
3726
3888
|
|
|
3727
3889
|
declare const throttle: <Params extends any[]>(callback: (...args: Params) => void, delay: number) => ((...args: Params) => void);
|
|
@@ -3740,4 +3902,4 @@ declare const getDate: (now?: Date) => {
|
|
|
3740
3902
|
timestamp: number;
|
|
3741
3903
|
};
|
|
3742
3904
|
|
|
3743
|
-
export { BREAKPOINTS_ANT_DESIGN, BREAKPOINTS_BOOTSTRAP_V5, BREAKPOINTS_MANTINE, BREAKPOINTS_MASTER_CSS, BREAKPOINTS_MATERIAL_UI, BREAKPOINTS_PRIME_FLEX, BREAKPOINTS_QUASAR_V2, BREAKPOINTS_SEMANTIC, BREAKPOINTS_TAILWIND, type BatteryManager, type Breakpoints, type ColorSelectionOptions, type ColorSelectionResult, type Connection, type ConnectionEffectiveType, type ConnectionType, type EyeDropper, type EyeDropperConstructor, type GetElementTarget, type LongPressReactEvents, type OperatingSystem, type OrientationLockType, type RequestOptions, SCRIPT_STATUS_ATTRIBUTE_NAME, type ScrollPosition, type StateRef, type UseAsyncReturn, type UseBatteryStateReturn, type UseBatteryValue, type UseBluetoothOptions, type UseBluetoothReturn, type UseBooleanReturn, type UseBreakpointsReturn, type UseBreakpointsStrategy, type UseClickOutside, type UseClickOutsideTarget, type UseCopyToClipboardParams, type UseCopyToClipboardReturn, type UseCounter, type UseCounterOptions, type UseCounterReturn, type UseCssVar, type UseCssVarReturn, type UseCssVarTarget, type UseDeviceMotionParams, type UseDeviceMotionReturn, type UseDeviceOrientationReturn, type UseDeviceOrientationValue, type UseDevicePixelRatioReturn, type UseDisclosureOptions, type UseDisclosureReturn, 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 UseHotkeysHotkeys, type UseHotkeysKey, type UseHotkeysOptions, type UseHover, type UseHoverOptions, type UseHoverTarget, type UseIdleOptions, type UseIdleReturn, type UseImageOptions, type UseImageReturn, type UseInfiniteScroll, type UseInfiniteScrollOptions, type UseInfiniteScrollTarget, type UseIntersectionObserver, type UseIntersectionObserverOptions, type UseIntersectionObserverReturn, type UseIntersectionObserverTarget, type UseIntervalOptions, type UseIntervalReturn, type UseKeyPressEvent, type UseKeyPressEventKey, type UseKeyPressKey, type UseKeyPressOptions, type UseKeyboardParams, type UseKeysPressedParams, type UseLastChangedOptions, type UseListReturn, type UseLongPressBind, type UseLongPressOptions, type UseLongPressReturn, type UseLongPressTarget, type UseMapReturn, type UseMeasureReturn, type UseMeasureScreen, type UseMeasureTarget, type UseMemoryReturn, type UseMouse, type UseMouseReturn, type UseMouseTarget, type UseMutationObserver, type UseMutationObserverOptions, type UseMutationObserverReturn, type UseMutationObserverTarget, type UseNetworkReturn, type UseOffsetPaginationOptions, type UseOffsetPaginationReturn, type UseOptimisticReturn, type UseOrientationReturn, type UseOtpCredential, type UseOtpCredentialCallback, type UseOtpCredentialParams, type UseOtpCredentialReturn, type UsePaint, type UsePaintOptions, type UsePaintReturn, type UsePaintTarget, type UseParallax, type UseParallaxOptions, type UseParallaxValue, type UsePermissionName, type UsePermissionOptions, type UsePermissionReturn, type 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 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, dispatchStorageEvent, getConnection, getDate, getElement, getOperatingSystem, getRangesSelection, getRetry, getTimeFromSeconds,
|
|
3905
|
+
export { BREAKPOINTS_ANT_DESIGN, BREAKPOINTS_BOOTSTRAP_V5, BREAKPOINTS_MANTINE, BREAKPOINTS_MASTER_CSS, BREAKPOINTS_MATERIAL_UI, BREAKPOINTS_PRIME_FLEX, BREAKPOINTS_QUASAR_V2, BREAKPOINTS_SEMANTIC, BREAKPOINTS_TAILWIND, type BatteryManager, type Breakpoints, type ColorSelectionOptions, type ColorSelectionResult, type Connection, type ConnectionEffectiveType, type ConnectionType, type EyeDropper, type EyeDropperConstructor, type GetElementTarget, type LongPressReactEvents, type OperatingSystem, type OrientationLockType, type RequestOptions, SCRIPT_STATUS_ATTRIBUTE_NAME, type ScrollPosition, type StateRef, type UseAsyncReturn, type UseBatteryStateReturn, type UseBatteryValue, type UseBluetoothOptions, type UseBluetoothReturn, type UseBooleanReturn, type UseBreakpointsReturn, type UseBreakpointsStrategy, type UseClickOutside, type UseClickOutsideTarget, type UseCopyToClipboardParams, type UseCopyToClipboardReturn, type UseCounter, type UseCounterOptions, type UseCounterReturn, type UseCssVar, type UseCssVarReturn, type UseCssVarTarget, type UseDeviceMotionParams, type UseDeviceMotionReturn, type UseDeviceOrientationReturn, type UseDeviceOrientationValue, type 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, dispatchStorageEvent, getConnection, getDate, getElement, getOperatingSystem, getRangesSelection, getRetry, getTimeFromSeconds, isHotkeyMatch, isPermissionAllowed, isTarget, legacyCopyToClipboard, mapGamepadToXbox360Controller, scrollTo, throttle, useActiveElement, useAsync, useBattery, useBluetooth, useBoolean, useBreakpoints, useBrowserLanguage, useClickOutside, useClipboard, useConst, 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 };
|
package/package.json
CHANGED
|
@@ -1,114 +1,89 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@siberiacancode/reactuse",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Ultimate tool",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "SIBERIA CAN CODE 🧊",
|
|
7
|
-
"url": "https://github.com/siberiacancode"
|
|
8
|
-
},
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"@
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"husky": "^9.1.7",
|
|
91
|
-
"lint-staged": "^15.4.3",
|
|
92
|
-
"markdown-table": "^3.0.4",
|
|
93
|
-
"postcss": "^8.5.1",
|
|
94
|
-
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
95
|
-
"react": "^18.3.1",
|
|
96
|
-
"react-dom": "^18.3.1",
|
|
97
|
-
"shx": "^0.3.4",
|
|
98
|
-
"tailwind-merge": "^3.0.1",
|
|
99
|
-
"tailwindcss": "^4.0.4",
|
|
100
|
-
"typescript": "^5.7.3",
|
|
101
|
-
"vite": "^6.0.11",
|
|
102
|
-
"vitepress": "^1.6.3"
|
|
103
|
-
},
|
|
104
|
-
"lint-staged": {
|
|
105
|
-
"*.js": [
|
|
106
|
-
"eslint --fix",
|
|
107
|
-
"prettier --write"
|
|
108
|
-
],
|
|
109
|
-
"*.ts": [
|
|
110
|
-
"eslint --fix",
|
|
111
|
-
"prettier --write"
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@siberiacancode/reactuse",
|
|
3
|
+
"version": "0.0.93",
|
|
4
|
+
"description": "Ultimate tool",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "SIBERIA CAN CODE 🧊",
|
|
7
|
+
"url": "https://github.com/siberiacancode"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"homepage": "https://siberiacancode.github.io/reactuse/",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/siberiacancode/reactuse.git"
|
|
14
|
+
},
|
|
15
|
+
"bugs": "https://github.com/siberiacancode/reactuse/issues",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"react",
|
|
18
|
+
"react hooks",
|
|
19
|
+
"react use",
|
|
20
|
+
"use",
|
|
21
|
+
"hooks"
|
|
22
|
+
],
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"exports": {
|
|
25
|
+
"types": "./dist/types/index.d.ts",
|
|
26
|
+
"import": "./dist/esm/index.js",
|
|
27
|
+
"require": "./dist/cjs/index.cjs"
|
|
28
|
+
},
|
|
29
|
+
"main": "dist/cjs/index.js",
|
|
30
|
+
"module": "dist/esm/index.js",
|
|
31
|
+
"types": "dist/types/index.d.ts",
|
|
32
|
+
"files": [
|
|
33
|
+
"dist"
|
|
34
|
+
],
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=14"
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"prepublishOnly": "yarn type && yarn unit-test run && yarn build",
|
|
43
|
+
"build": "shx rm -rf dist && rollup -c --bundleConfigAsCjs",
|
|
44
|
+
"lint": "eslint . --fix",
|
|
45
|
+
"lint-inspector": "npx @eslint/config-inspector@latest",
|
|
46
|
+
"type": "tsc --noEmit",
|
|
47
|
+
"pretty": "yarn type && yarn lint && yarn format",
|
|
48
|
+
"unit-test": "vitest",
|
|
49
|
+
"lint-staged": "lint-staged"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"@types/react": "^18.0.0",
|
|
53
|
+
"react": "^17.0.2 || ^18.0.0",
|
|
54
|
+
"react-dom": "^17.0.2 || ^18.0.0"
|
|
55
|
+
},
|
|
56
|
+
"peerDependenciesMeta": {
|
|
57
|
+
"@types/react": {
|
|
58
|
+
"optional": true
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"screenfull": "^6.0.2"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@siberiacancode/builder": "^1.3.17",
|
|
66
|
+
"@siberiacancode/vitest": "^2.0.2",
|
|
67
|
+
"@testing-library/dom": "^10.4.0",
|
|
68
|
+
"@testing-library/react": "^16.2.0",
|
|
69
|
+
"@types/react": "^18.3.12",
|
|
70
|
+
"@types/react-dom": "^18.3.2",
|
|
71
|
+
"@types/web-bluetooth": "^0.0.20",
|
|
72
|
+
"core-js": "^3.40.0",
|
|
73
|
+
"react": "^18.3.1",
|
|
74
|
+
"react-dom": "^18.3.1",
|
|
75
|
+
"shx": "^0.3.4",
|
|
76
|
+
"vite": "^6.1.1",
|
|
77
|
+
"vitest": "^3.0.6"
|
|
78
|
+
},
|
|
79
|
+
"lint-staged": {
|
|
80
|
+
"*.js": [
|
|
81
|
+
"eslint --fix",
|
|
82
|
+
"prettier --write"
|
|
83
|
+
],
|
|
84
|
+
"*.ts": [
|
|
85
|
+
"eslint --fix",
|
|
86
|
+
"prettier --write"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 siberiacancode
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_rollupPluginBabelHelpers-BsWog5nG.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.90 */
|
|
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
|
-
//# sourceMappingURL=isClient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isClient.js","sources":["../../../../src/utils/helpers/isClient.ts"],"sourcesContent":["export const isClient = !!(\n typeof window !== 'undefined' &&\n window?.document &&\n window?.document?.createElement\n);\n"],"names":["isClient","window","_window","document","_window2","createElement"],"mappings":";qBAAaA,IACO,oBAAXC,QACDC,QADuBA,EAC7BD,kBAAMC,IAANA,EAAQC,UACFC,QADUA,EAChBH,kBAAMG,GAAUA,QAAVA,EAANA,EAAQD,oBAAQC,IAAhBA,EAAkBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_rollupPluginBabelHelpers-CNZ3s-mD.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/* @license @siberiacancode/reactuse v0.0.90 */
|
|
2
|
-
var n,d,e=!("undefined"==typeof window||null===(n=window)||void 0===n||!n.document||null===(d=window)||void 0===d||null===(d=d.document)||void 0===d||!d.createElement);export{e as isClient};
|
|
3
|
-
//# sourceMappingURL=isClient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isClient.js","sources":["../../../../src/utils/helpers/isClient.ts"],"sourcesContent":["export const isClient = !!(\n typeof window !== 'undefined' &&\n window?.document &&\n window?.document?.createElement\n);\n"],"names":["isClient","window","_window","document","_window2","createElement"],"mappings":";QAAaA,IACO,oBAAXC,QACDC,QADuBA,EAC7BD,kBAAMC,IAANA,EAAQC,UACFC,QADUA,EAChBH,kBAAMG,GAAUA,QAAVA,EAANA,EAAQD,oBAAQC,IAAhBA,EAAkBC"}
|