@siberiacancode/reactuse 0.2.24 → 0.2.26
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/helpers/createStore/createStore.cjs +1 -1
- package/dist/cjs/helpers/createStore/createStore.cjs.map +1 -1
- package/dist/cjs/hooks/useActiveElement/useActiveElement.cjs +1 -1
- package/dist/cjs/hooks/useActiveElement/useActiveElement.cjs.map +1 -1
- package/dist/cjs/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/cjs/hooks/useAutoScroll/useAutoScroll.cjs +1 -1
- package/dist/cjs/hooks/useAutoScroll/useAutoScroll.cjs.map +1 -1
- package/dist/cjs/hooks/useBoolean/useBoolean.cjs.map +1 -1
- package/dist/cjs/hooks/useBrowserLanguage/useBrowserLanguage.cjs.map +1 -1
- package/dist/cjs/hooks/useClickOutside/useClickOutside.cjs.map +1 -1
- package/dist/cjs/hooks/useCookie/useCookie.cjs.map +1 -1
- package/dist/cjs/hooks/useCookies/useCookies.cjs.map +1 -1
- package/dist/cjs/hooks/useCounter/useCounter.cjs.map +1 -1
- package/dist/cjs/hooks/useCssVar/useCssVar.cjs +1 -1
- package/dist/cjs/hooks/useCssVar/useCssVar.cjs.map +1 -1
- package/dist/cjs/hooks/useDefault/useDefault.cjs.map +1 -1
- package/dist/cjs/hooks/useDisclosure/useDisclosure.cjs.map +1 -1
- package/dist/cjs/hooks/useDisplayMedia/useDisplayMedia.cjs.map +1 -1
- package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.cjs.map +1 -1
- package/dist/cjs/hooks/useDoubleClick/useDoubleClick.cjs.map +1 -1
- package/dist/cjs/hooks/useElementSize/useElementSize.cjs.map +1 -1
- package/dist/cjs/hooks/useEvent/useEvent.cjs.map +1 -1
- package/dist/cjs/hooks/useEventSource/useEventSource.cjs.map +1 -1
- package/dist/cjs/hooks/useField/useField.cjs.map +1 -1
- package/dist/cjs/hooks/useFileDialog/useFileDialog.cjs.map +1 -1
- package/dist/cjs/hooks/useFocus/useFocus.cjs.map +1 -1
- package/dist/cjs/hooks/useFps/useFps.cjs.map +1 -1
- package/dist/cjs/hooks/useHash/useHash.cjs.map +1 -1
- package/dist/cjs/hooks/useHover/useHover.cjs.map +1 -1
- package/dist/cjs/hooks/useImage/useImage.cjs.map +1 -1
- package/dist/cjs/hooks/useInfiniteScroll/useInfiniteScroll.cjs +1 -1
- package/dist/cjs/hooks/useInfiniteScroll/useInfiniteScroll.cjs.map +1 -1
- package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.cjs +1 -1
- package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.cjs.map +1 -1
- package/dist/cjs/hooks/useLastChanged/useLastChanged.cjs.map +1 -1
- package/dist/cjs/hooks/useList/useList.cjs.map +1 -1
- package/dist/cjs/hooks/useLocalStorage/useLocalStorage.cjs.map +1 -1
- package/dist/cjs/hooks/useLockCallback/useLockCallback.cjs.map +1 -1
- package/dist/cjs/hooks/useLockScroll/useLockScroll.cjs +2 -0
- package/dist/cjs/hooks/useLockScroll/useLockScroll.cjs.map +1 -0
- package/dist/cjs/hooks/useLogger/useLogger.cjs.map +1 -1
- package/dist/cjs/hooks/useLongPress/useLongPress.cjs.map +1 -1
- package/dist/cjs/hooks/useMap/useMap.cjs.map +1 -1
- package/dist/cjs/hooks/useMutation/useMutation.cjs.map +1 -1
- package/dist/cjs/hooks/useMutationObserver/useMutationObserver.cjs.map +1 -1
- package/dist/cjs/hooks/useNetwork/useNetwork.cjs.map +1 -1
- package/dist/cjs/hooks/useOffsetPagination/useOffsetPagination.cjs.map +1 -1
- package/dist/cjs/hooks/useOnline/useOnline.cjs.map +1 -1
- package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.cjs.map +1 -1
- package/dist/cjs/hooks/useOptimistic/useOptimistic.cjs.map +1 -1
- package/dist/cjs/hooks/useOrientation/useOrientation.cjs +1 -1
- package/dist/cjs/hooks/useOrientation/useOrientation.cjs.map +1 -1
- package/dist/cjs/hooks/usePaint/usePaint.cjs.map +1 -1
- package/dist/cjs/hooks/useParallax/useParallax.cjs +1 -1
- package/dist/cjs/hooks/useParallax/useParallax.cjs.map +1 -1
- package/dist/cjs/hooks/usePointerLock/usePointerLock.cjs.map +1 -1
- package/dist/cjs/hooks/usePreferredColorScheme/usePreferredColorScheme.cjs.map +1 -1
- package/dist/cjs/hooks/usePreferredContrast/usePreferredContrast.cjs.map +1 -1
- package/dist/cjs/hooks/usePreferredDark/usePreferredDark.cjs.map +1 -1
- package/dist/cjs/hooks/usePreferredLanguages/usePreferredLanguages.cjs.map +1 -1
- package/dist/cjs/hooks/usePreferredReducedMotion/usePreferredReducedMotion.cjs.map +1 -1
- package/dist/cjs/hooks/useQuery/useQuery.cjs.map +1 -1
- package/dist/cjs/hooks/useQueue/useQueue.cjs.map +1 -1
- package/dist/cjs/hooks/useRaf/useRaf.cjs.map +1 -1
- package/dist/cjs/hooks/{useRafValue/useRafValue.cjs → useRafState/useRafState.cjs} +2 -2
- package/dist/cjs/hooks/useRafState/useRafState.cjs.map +1 -0
- package/dist/cjs/hooks/useRefState/useRefState.cjs.map +1 -1
- package/dist/cjs/hooks/useRenderCount/useRenderCount.cjs.map +1 -1
- package/dist/cjs/hooks/useRenderInfo/useRenderInfo.cjs.map +1 -1
- package/dist/cjs/hooks/useRerender/useRerender.cjs.map +1 -1
- package/dist/cjs/hooks/useResizeObserver/useResizeObserver.cjs.map +1 -1
- package/dist/cjs/hooks/useScript/useScript.cjs.map +1 -1
- package/dist/cjs/hooks/useScroll/useScroll.cjs.map +1 -1
- package/dist/cjs/hooks/useSessionStorage/useSessionStorage.cjs.map +1 -1
- package/dist/cjs/hooks/useSet/useSet.cjs.map +1 -1
- package/dist/cjs/hooks/useSpeechRecognition/useSpeechRecognition.cjs.map +1 -1
- package/dist/cjs/hooks/useSpeechSynthesis/useSpeechSynthesis.cjs.map +1 -1
- package/dist/cjs/hooks/useStateHistory/useStateHistory.cjs.map +1 -1
- package/dist/cjs/hooks/useStep/useStep.cjs.map +1 -1
- package/dist/cjs/hooks/useSticky/useSticky.cjs.map +1 -1
- package/dist/cjs/hooks/useStopwatch/useStopwatch.cjs +1 -1
- package/dist/cjs/hooks/useStopwatch/useStopwatch.cjs.map +1 -1
- package/dist/cjs/hooks/useStorage/useStorage.cjs.map +1 -1
- package/dist/cjs/hooks/useTextDirection/useTextDirection.cjs +1 -1
- package/dist/cjs/hooks/useTextDirection/useTextDirection.cjs.map +1 -1
- package/dist/cjs/hooks/useToggle/useToggle.cjs.map +1 -1
- package/dist/cjs/hooks/useUrlSearchParam/useUrlSearchParam.cjs.map +1 -1
- package/dist/cjs/hooks/useUrlSearchParams/useUrlSearchParams.cjs.map +1 -1
- package/dist/cjs/hooks/useWindowEvent/useWindowEvent.cjs.map +1 -1
- package/dist/cjs/hooks/useWizard/useWizard.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/helpers/createStore/createStore.mjs +16 -16
- package/dist/esm/helpers/createStore/createStore.mjs.map +1 -1
- package/dist/esm/hooks/useActiveElement/useActiveElement.mjs +22 -17
- package/dist/esm/hooks/useActiveElement/useActiveElement.mjs.map +1 -1
- package/dist/esm/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/esm/hooks/useAutoScroll/useAutoScroll.mjs +38 -29
- package/dist/esm/hooks/useAutoScroll/useAutoScroll.mjs.map +1 -1
- package/dist/esm/hooks/useBoolean/useBoolean.mjs.map +1 -1
- package/dist/esm/hooks/useBrowserLanguage/useBrowserLanguage.mjs.map +1 -1
- package/dist/esm/hooks/useClickOutside/useClickOutside.mjs.map +1 -1
- package/dist/esm/hooks/useCookie/useCookie.mjs.map +1 -1
- package/dist/esm/hooks/useCookies/useCookies.mjs.map +1 -1
- package/dist/esm/hooks/useCounter/useCounter.mjs.map +1 -1
- package/dist/esm/hooks/useCssVar/useCssVar.mjs +27 -24
- package/dist/esm/hooks/useCssVar/useCssVar.mjs.map +1 -1
- package/dist/esm/hooks/useDefault/useDefault.mjs.map +1 -1
- package/dist/esm/hooks/useDisclosure/useDisclosure.mjs.map +1 -1
- package/dist/esm/hooks/useDisplayMedia/useDisplayMedia.mjs.map +1 -1
- package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.mjs +3 -1
- package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.mjs.map +1 -1
- package/dist/esm/hooks/useDoubleClick/useDoubleClick.mjs.map +1 -1
- package/dist/esm/hooks/useElementSize/useElementSize.mjs.map +1 -1
- package/dist/esm/hooks/useEvent/useEvent.mjs.map +1 -1
- package/dist/esm/hooks/useEventSource/useEventSource.mjs +3 -1
- package/dist/esm/hooks/useEventSource/useEventSource.mjs.map +1 -1
- package/dist/esm/hooks/useField/useField.mjs.map +1 -1
- package/dist/esm/hooks/useFileDialog/useFileDialog.mjs.map +1 -1
- package/dist/esm/hooks/useFocus/useFocus.mjs.map +1 -1
- package/dist/esm/hooks/useFps/useFps.mjs.map +1 -1
- package/dist/esm/hooks/useHash/useHash.mjs.map +1 -1
- package/dist/esm/hooks/useHover/useHover.mjs.map +1 -1
- package/dist/esm/hooks/useImage/useImage.mjs.map +1 -1
- package/dist/esm/hooks/useInfiniteScroll/useInfiniteScroll.mjs +27 -27
- package/dist/esm/hooks/useInfiniteScroll/useInfiniteScroll.mjs.map +1 -1
- package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.mjs +5 -5
- package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.mjs.map +1 -1
- package/dist/esm/hooks/useLastChanged/useLastChanged.mjs.map +1 -1
- package/dist/esm/hooks/useList/useList.mjs +15 -6
- package/dist/esm/hooks/useList/useList.mjs.map +1 -1
- package/dist/esm/hooks/useLocalStorage/useLocalStorage.mjs.map +1 -1
- package/dist/esm/hooks/useLockCallback/useLockCallback.mjs.map +1 -1
- package/dist/esm/hooks/useLockScroll/useLockScroll.mjs +44 -0
- package/dist/esm/hooks/useLockScroll/useLockScroll.mjs.map +1 -0
- package/dist/esm/hooks/useLogger/useLogger.mjs.map +1 -1
- package/dist/esm/hooks/useLongPress/useLongPress.mjs.map +1 -1
- package/dist/esm/hooks/useMap/useMap.mjs.map +1 -1
- package/dist/esm/hooks/useMutation/useMutation.mjs.map +1 -1
- package/dist/esm/hooks/useMutationObserver/useMutationObserver.mjs.map +1 -1
- package/dist/esm/hooks/useNetwork/useNetwork.mjs.map +1 -1
- package/dist/esm/hooks/useOffsetPagination/useOffsetPagination.mjs.map +1 -1
- package/dist/esm/hooks/useOnline/useOnline.mjs.map +1 -1
- package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.mjs.map +1 -1
- package/dist/esm/hooks/useOptimistic/useOptimistic.mjs.map +1 -1
- package/dist/esm/hooks/useOrientation/useOrientation.mjs +25 -9
- package/dist/esm/hooks/useOrientation/useOrientation.mjs.map +1 -1
- package/dist/esm/hooks/usePaint/usePaint.mjs +14 -2
- package/dist/esm/hooks/usePaint/usePaint.mjs.map +1 -1
- package/dist/esm/hooks/useParallax/useParallax.mjs +9 -9
- package/dist/esm/hooks/useParallax/useParallax.mjs.map +1 -1
- package/dist/esm/hooks/usePointerLock/usePointerLock.mjs.map +1 -1
- package/dist/esm/hooks/usePreferredColorScheme/usePreferredColorScheme.mjs.map +1 -1
- package/dist/esm/hooks/usePreferredContrast/usePreferredContrast.mjs.map +1 -1
- package/dist/esm/hooks/usePreferredDark/usePreferredDark.mjs.map +1 -1
- package/dist/esm/hooks/usePreferredLanguages/usePreferredLanguages.mjs.map +1 -1
- package/dist/esm/hooks/usePreferredReducedMotion/usePreferredReducedMotion.mjs.map +1 -1
- package/dist/esm/hooks/useQuery/useQuery.mjs.map +1 -1
- package/dist/esm/hooks/useQueue/useQueue.mjs.map +1 -1
- package/dist/esm/hooks/useRaf/useRaf.mjs.map +1 -1
- package/dist/esm/hooks/{useRafValue/useRafValue.mjs → useRafState/useRafState.mjs} +2 -2
- package/dist/esm/hooks/useRafState/useRafState.mjs.map +1 -0
- package/dist/esm/hooks/useRefState/useRefState.mjs.map +1 -1
- package/dist/esm/hooks/useRenderCount/useRenderCount.mjs.map +1 -1
- package/dist/esm/hooks/useRenderInfo/useRenderInfo.mjs.map +1 -1
- package/dist/esm/hooks/useRerender/useRerender.mjs.map +1 -1
- package/dist/esm/hooks/useResizeObserver/useResizeObserver.mjs.map +1 -1
- package/dist/esm/hooks/useScript/useScript.mjs.map +1 -1
- package/dist/esm/hooks/useScroll/useScroll.mjs.map +1 -1
- package/dist/esm/hooks/useSessionStorage/useSessionStorage.mjs.map +1 -1
- package/dist/esm/hooks/useSet/useSet.mjs.map +1 -1
- package/dist/esm/hooks/useSpeechRecognition/useSpeechRecognition.mjs +14 -4
- package/dist/esm/hooks/useSpeechRecognition/useSpeechRecognition.mjs.map +1 -1
- package/dist/esm/hooks/useSpeechSynthesis/useSpeechSynthesis.mjs.map +1 -1
- package/dist/esm/hooks/useStateHistory/useStateHistory.mjs.map +1 -1
- package/dist/esm/hooks/useStep/useStep.mjs.map +1 -1
- package/dist/esm/hooks/useSticky/useSticky.mjs.map +1 -1
- package/dist/esm/hooks/useStopwatch/useStopwatch.mjs +18 -18
- package/dist/esm/hooks/useStopwatch/useStopwatch.mjs.map +1 -1
- package/dist/esm/hooks/useStorage/useStorage.mjs.map +1 -1
- package/dist/esm/hooks/useTextDirection/useTextDirection.mjs +19 -20
- package/dist/esm/hooks/useTextDirection/useTextDirection.mjs.map +1 -1
- package/dist/esm/hooks/useToggle/useToggle.mjs.map +1 -1
- package/dist/esm/hooks/useUrlSearchParam/useUrlSearchParam.mjs.map +1 -1
- package/dist/esm/hooks/useUrlSearchParams/useUrlSearchParams.mjs.map +1 -1
- package/dist/esm/hooks/useWindowEvent/useWindowEvent.mjs.map +1 -1
- package/dist/esm/hooks/useWizard/useWizard.mjs.map +1 -1
- package/dist/esm/index.mjs +323 -323
- package/dist/types/helpers/createStore/createStore.d.ts +1 -1
- package/dist/types/hooks/async.d.ts +5 -0
- package/dist/types/hooks/browser.d.ts +32 -0
- package/dist/types/hooks/debug.d.ts +4 -0
- package/dist/types/hooks/elements.d.ts +14 -0
- package/dist/types/hooks/fun.d.ts +3 -0
- package/dist/types/hooks/index.d.ts +11 -143
- package/dist/types/hooks/lifecycle.d.ts +6 -0
- package/dist/types/hooks/sensors.d.ts +34 -0
- package/dist/types/hooks/state.d.ts +25 -0
- package/dist/types/hooks/time.d.ts +5 -0
- package/dist/types/hooks/useActiveElement/useActiveElement.d.ts +21 -2
- package/dist/types/hooks/useAsync/useAsync.d.ts +1 -1
- package/dist/types/hooks/useAutoScroll/useAutoScroll.d.ts +3 -1
- package/dist/types/hooks/useBoolean/useBoolean.d.ts +1 -1
- package/dist/types/hooks/useBrowserLanguage/useBrowserLanguage.d.ts +1 -1
- package/dist/types/hooks/useClickOutside/useClickOutside.d.ts +1 -1
- package/dist/types/hooks/useCookie/useCookie.d.ts +1 -1
- package/dist/types/hooks/useCookies/useCookies.d.ts +1 -1
- package/dist/types/hooks/useCounter/useCounter.d.ts +1 -1
- package/dist/types/hooks/useCssVar/useCssVar.d.ts +1 -1
- package/dist/types/hooks/useDefault/useDefault.d.ts +1 -1
- package/dist/types/hooks/useDisclosure/useDisclosure.d.ts +1 -1
- package/dist/types/hooks/useDocumentTitle/useDocumentTitle.d.ts +2 -0
- package/dist/types/hooks/useDoubleClick/useDoubleClick.d.ts +1 -1
- package/dist/types/hooks/useEvent/useEvent.d.ts +1 -1
- package/dist/types/hooks/useField/useField.d.ts +1 -1
- package/dist/types/hooks/useFileDialog/useFileDialog.d.ts +1 -1
- package/dist/types/hooks/useFocus/useFocus.d.ts +1 -1
- package/dist/types/hooks/useFps/useFps.d.ts +1 -1
- package/dist/types/hooks/useHash/useHash.d.ts +1 -1
- package/dist/types/hooks/useHover/useHover.d.ts +1 -1
- package/dist/types/hooks/useImage/useImage.d.ts +1 -1
- package/dist/types/hooks/useIntersectionObserver/useIntersectionObserver.d.ts +7 -6
- package/dist/types/hooks/useLastChanged/useLastChanged.d.ts +1 -1
- package/dist/types/hooks/useList/useList.d.ts +1 -1
- package/dist/types/hooks/useLocalStorage/useLocalStorage.d.ts +1 -1
- package/dist/types/hooks/useLockCallback/useLockCallback.d.ts +1 -1
- package/dist/types/hooks/useLockScroll/useLockScroll.d.ts +49 -0
- package/dist/types/hooks/useLogger/useLogger.d.ts +1 -1
- package/dist/types/hooks/useLongPress/useLongPress.d.ts +1 -1
- package/dist/types/hooks/useMap/useMap.d.ts +1 -1
- package/dist/types/hooks/useMutation/useMutation.d.ts +1 -1
- package/dist/types/hooks/useMutationObserver/useMutationObserver.d.ts +1 -1
- package/dist/types/hooks/useNetwork/useNetwork.d.ts +1 -1
- package/dist/types/hooks/useOffsetPagination/useOffsetPagination.d.ts +1 -1
- package/dist/types/hooks/useOnline/useOnline.d.ts +1 -1
- package/dist/types/hooks/useOperatingSystem/useOperatingSystem.d.ts +1 -1
- package/dist/types/hooks/useOptimistic/useOptimistic.d.ts +1 -1
- package/dist/types/hooks/useOrientation/useOrientation.d.ts +26 -11
- package/dist/types/hooks/usePaint/usePaint.d.ts +1 -1
- package/dist/types/hooks/usePointerLock/usePointerLock.d.ts +1 -1
- package/dist/types/hooks/usePreferredColorScheme/usePreferredColorScheme.d.ts +1 -1
- package/dist/types/hooks/usePreferredContrast/usePreferredContrast.d.ts +1 -1
- package/dist/types/hooks/usePreferredDark/usePreferredDark.d.ts +1 -1
- package/dist/types/hooks/usePreferredLanguages/usePreferredLanguages.d.ts +1 -1
- package/dist/types/hooks/usePreferredReducedMotion/usePreferredReducedMotion.d.ts +1 -1
- package/dist/types/hooks/useQuery/useQuery.d.ts +1 -1
- package/dist/types/hooks/useQueue/useQueue.d.ts +1 -1
- package/dist/types/hooks/useRaf/useRaf.d.ts +1 -1
- package/dist/types/hooks/{useRafValue/useRafValue.d.ts → useRafState/useRafState.d.ts} +6 -6
- package/dist/types/hooks/useRefState/useRefState.d.ts +1 -1
- package/dist/types/hooks/useRenderCount/useRenderCount.d.ts +1 -1
- package/dist/types/hooks/useRenderInfo/useRenderInfo.d.ts +6 -1
- package/dist/types/hooks/useRerender/useRerender.d.ts +1 -1
- package/dist/types/hooks/useResizeObserver/useResizeObserver.d.ts +1 -1
- package/dist/types/hooks/useRightClick/useRightClick.d.ts +37 -0
- package/dist/types/hooks/useScript/useScript.d.ts +1 -1
- package/dist/types/hooks/useSessionStorage/useSessionStorage.d.ts +1 -1
- package/dist/types/hooks/useSet/useSet.d.ts +1 -1
- package/dist/types/hooks/useSpeechRecognition/useSpeechRecognition.d.ts +1 -1
- package/dist/types/hooks/useSpeechSynthesis/useSpeechSynthesis.d.ts +1 -1
- package/dist/types/hooks/useStateHistory/useStateHistory.d.ts +1 -1
- package/dist/types/hooks/useStep/useStep.d.ts +1 -1
- package/dist/types/hooks/useSticky/useSticky.d.ts +1 -1
- package/dist/types/hooks/useStopwatch/useStopwatch.d.ts +2 -2
- package/dist/types/hooks/useStorage/useStorage.d.ts +1 -1
- package/dist/types/hooks/useTextDirection/useTextDirection.d.ts +2 -2
- package/dist/types/hooks/useToggle/useToggle.d.ts +1 -1
- package/dist/types/hooks/useUrlSearchParam/useUrlSearchParam.d.ts +1 -1
- package/dist/types/hooks/useUrlSearchParams/useUrlSearchParams.d.ts +1 -1
- package/dist/types/hooks/useWindowEvent/useWindowEvent.d.ts +1 -1
- package/dist/types/hooks/useWizard/useWizard.d.ts +1 -1
- package/dist/types/hooks/user.d.ts +7 -0
- package/dist/types/hooks/utilities.d.ts +9 -0
- package/dist/types/utils/helpers/getElement.d.ts +1 -1
- package/package.json +89 -89
- package/dist/cjs/hooks/useRafValue/useRafValue.cjs.map +0 -1
- package/dist/cjs/hooks/useScreenOrientation/useScreenOrientation.cjs +0 -2
- package/dist/cjs/hooks/useScreenOrientation/useScreenOrientation.cjs.map +0 -1
- package/dist/esm/hooks/useRafValue/useRafValue.mjs.map +0 -1
- package/dist/esm/hooks/useScreenOrientation/useScreenOrientation.mjs +0 -31
- package/dist/esm/hooks/useScreenOrientation/useScreenOrientation.mjs.map +0 -1
- package/dist/types/hooks/useScreenOrientation/useScreenOrientation.d.ts +0 -35
|
@@ -2,7 +2,7 @@ import { UseStorageInitialValue, UseStorageOptions } from '../useStorage/useStor
|
|
|
2
2
|
/**
|
|
3
3
|
* @name useLocalStorage
|
|
4
4
|
* @description - Hook that manages local storage value
|
|
5
|
-
* @category
|
|
5
|
+
* @category State
|
|
6
6
|
*
|
|
7
7
|
* @browserapi localStorage https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
|
|
8
8
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name useLockCallback
|
|
3
3
|
* @description - Hook that prevents a callback from being executed multiple times simultaneously
|
|
4
|
-
* @category
|
|
4
|
+
* @category Async
|
|
5
5
|
*
|
|
6
6
|
* @param {Function} callback The callback to be locked
|
|
7
7
|
* @returns {Function} The locked callback
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { HookTarget } from '../../utils/helpers';
|
|
2
|
+
import { StateRef } from '../useRefState/useRefState';
|
|
3
|
+
/** The use lock scroll options type */
|
|
4
|
+
export interface UseLockScrollOptions {
|
|
5
|
+
/** Enable or disable scroll locking. Default: true */
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** The use lock scroll return type */
|
|
9
|
+
export interface UseLockScrollReturn<Target extends Element> {
|
|
10
|
+
/** The ref to attach to the element */
|
|
11
|
+
ref: StateRef<Target>;
|
|
12
|
+
/** The value of the lock state */
|
|
13
|
+
value: boolean;
|
|
14
|
+
/** Lock the scroll */
|
|
15
|
+
lock: () => void;
|
|
16
|
+
/** Toggle the scroll lock */
|
|
17
|
+
toggle: () => void;
|
|
18
|
+
/** Unlock the scroll */
|
|
19
|
+
unlock: () => void;
|
|
20
|
+
}
|
|
21
|
+
export interface UseLockScroll {
|
|
22
|
+
(target: HookTarget, options?: UseLockScrollOptions): UseLockScrollReturn<Element>;
|
|
23
|
+
<Target extends Element>(options?: UseLockScrollOptions, target?: never): UseLockScrollReturn<Target> & {
|
|
24
|
+
ref: StateRef<Target>;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @name useLockScroll
|
|
29
|
+
* @description - Hook that locks scroll on an element or document body
|
|
30
|
+
* @category Elements
|
|
31
|
+
*
|
|
32
|
+
*
|
|
33
|
+
* @overload
|
|
34
|
+
* @param {HookTarget} [target=document.body] The target element to lock scroll on
|
|
35
|
+
* @param {UseLockScrollOptions} [options] The options for scroll locking
|
|
36
|
+
* @returns {void}
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* const { lock, unlock, value, toggle } = useLockScroll(ref);
|
|
40
|
+
*
|
|
41
|
+
* @overload
|
|
42
|
+
* @template Target The target element
|
|
43
|
+
* @param {UseLockScrollOptions} [options] The options for scroll locking
|
|
44
|
+
* @returns {StateRef<Target>} Ref to attach to element, or locks body scroll by default
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* const { ref, lock, unlock, value, toggle } = useLockScroll();
|
|
48
|
+
*/
|
|
49
|
+
export declare const useLockScroll: UseLockScroll;
|
|
@@ -17,7 +17,7 @@ export interface UseLongPress {
|
|
|
17
17
|
/**
|
|
18
18
|
* @name useLongPress
|
|
19
19
|
* @description - Hook that defines the logic when long pressing an element
|
|
20
|
-
* @category
|
|
20
|
+
* @category Elements
|
|
21
21
|
*
|
|
22
22
|
* @overload
|
|
23
23
|
* @param {HookTarget} target The target element to be long pressed
|
|
@@ -18,7 +18,7 @@ export interface UseMapReturn<Key, Value> {
|
|
|
18
18
|
/**
|
|
19
19
|
* @name useMap
|
|
20
20
|
* @description - Hook that manages a map structure
|
|
21
|
-
* @category
|
|
21
|
+
* @category State
|
|
22
22
|
*
|
|
23
23
|
* @template Value The type of the value
|
|
24
24
|
* @param {Value[]} [values] The initial array of the map
|
|
@@ -19,7 +19,7 @@ export interface RequestOptions<Data> extends UseMutationOptions<Data> {
|
|
|
19
19
|
/**
|
|
20
20
|
* @name useMutation
|
|
21
21
|
* @description - Hook that defines the logic when mutate data
|
|
22
|
-
* @category
|
|
22
|
+
* @category Async
|
|
23
23
|
*
|
|
24
24
|
* @template Body The type of the body
|
|
25
25
|
* @template Data The type of the data
|
|
@@ -39,7 +39,7 @@ export declare const getConnection: () => Connection;
|
|
|
39
39
|
/**
|
|
40
40
|
* @name useNetwork
|
|
41
41
|
* @description - Hook to track network status
|
|
42
|
-
* @category
|
|
42
|
+
* @category Browser
|
|
43
43
|
*
|
|
44
44
|
* @browserapi navigator.connection https://developer.mozilla.org/en-US/docs/Web/API/Navigator/connection
|
|
45
45
|
*
|
|
@@ -44,7 +44,7 @@ export interface UseOffsetPaginationReturn {
|
|
|
44
44
|
/**
|
|
45
45
|
* @name useOffsetPagination
|
|
46
46
|
* @description - Hook that defines the logic when pagination
|
|
47
|
-
* @category
|
|
47
|
+
* @category State
|
|
48
48
|
*
|
|
49
49
|
* @param {UseOffsetPaginationOptions} options - The options for the hook
|
|
50
50
|
* @param {number} [options.total] - The total number of items
|
|
@@ -4,7 +4,7 @@ export declare const getOperatingSystem: () => OperatingSystem;
|
|
|
4
4
|
/**
|
|
5
5
|
* @name useOperatingSystem
|
|
6
6
|
* @description - Hook that returns the operating system of the current browser
|
|
7
|
-
* @category
|
|
7
|
+
* @category User
|
|
8
8
|
*
|
|
9
9
|
* @returns {OperatingSystem} The operating system
|
|
10
10
|
*
|
|
@@ -5,7 +5,7 @@ export type UseOptimisticReturn<State> = [
|
|
|
5
5
|
/**
|
|
6
6
|
* @name useOptimistic
|
|
7
7
|
* @description - Hook that allows get optimistic value before its update
|
|
8
|
-
* @category
|
|
8
|
+
* @category Async
|
|
9
9
|
*
|
|
10
10
|
* @template State The type of the state
|
|
11
11
|
* @param {State} state The value to be returned initially and whenever no action is pending
|
|
@@ -1,20 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
declare global {
|
|
2
|
+
interface ScreenOrientation {
|
|
3
|
+
lock: (orientation: OrientationLockType) => Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
export interface UseOrientationValue {
|
|
7
|
+
/** The current angle */
|
|
4
8
|
angle: number;
|
|
5
|
-
/** The
|
|
6
|
-
|
|
9
|
+
/** The current orientation type */
|
|
10
|
+
orientationType: OrientationType;
|
|
11
|
+
}
|
|
12
|
+
export type OrientationLockType = 'any' | 'landscape-primary' | 'landscape-secondary' | 'landscape' | 'natural' | 'portrait-primary' | 'portrait-secondary' | 'portrait';
|
|
13
|
+
export interface useOrientationReturn {
|
|
14
|
+
/** Whether the screen orientation is supported */
|
|
15
|
+
supported: boolean;
|
|
16
|
+
/** The current screen orientation value */
|
|
17
|
+
value: UseOrientationValue;
|
|
18
|
+
/** Lock the screen orientation */
|
|
19
|
+
lock: (orientation: OrientationLockType) => void;
|
|
20
|
+
/** Unlock the screen orientation */
|
|
21
|
+
unlock: () => void;
|
|
7
22
|
}
|
|
8
23
|
/**
|
|
9
24
|
* @name useOrientation
|
|
10
|
-
* @description - Hook that
|
|
11
|
-
* @category
|
|
25
|
+
* @description - Hook that provides the current screen orientation
|
|
26
|
+
* @category Sensors
|
|
12
27
|
*
|
|
13
|
-
* @browserapi
|
|
28
|
+
* @browserapi screen.orientation https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation
|
|
14
29
|
*
|
|
15
|
-
* @returns {
|
|
30
|
+
* @returns {useOrientationReturn} The current screen orientation
|
|
16
31
|
*
|
|
17
32
|
* @example
|
|
18
|
-
* const {
|
|
33
|
+
* const { supported, value, lock, unlock } = useOrientation();
|
|
19
34
|
*/
|
|
20
|
-
export declare const useOrientation: () =>
|
|
35
|
+
export declare const useOrientation: () => useOrientationReturn;
|
|
@@ -13,7 +13,7 @@ interface UsePointerLockReturn {
|
|
|
13
13
|
/**
|
|
14
14
|
* @name usePointerLock
|
|
15
15
|
* @description - Hook that provides reactive pointer lock
|
|
16
|
-
* @category
|
|
16
|
+
* @category Browser
|
|
17
17
|
*
|
|
18
18
|
* @browserapi pointerLockElement https://developer.mozilla.org/en-US/docs/Web/API/Document/pointerLockElement
|
|
19
19
|
*
|
|
@@ -3,7 +3,7 @@ export type UsePreferredColorSchemeReturn = 'dark' | 'light' | 'no-preference';
|
|
|
3
3
|
/**
|
|
4
4
|
* @name usePreferredColorScheme
|
|
5
5
|
* @description - Hook that returns user preferred color scheme
|
|
6
|
-
* @category
|
|
6
|
+
* @category User
|
|
7
7
|
*
|
|
8
8
|
* @returns {UsePreferredColorSchemeReturn} String of preferred color scheme
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@ export type UsePreferredContrastReturn = 'custom' | 'less' | 'more' | 'no-prefer
|
|
|
3
3
|
/**
|
|
4
4
|
* @name usePreferredContrast
|
|
5
5
|
* @description - Hook that returns the contrast preference
|
|
6
|
-
* @category
|
|
6
|
+
* @category User
|
|
7
7
|
*
|
|
8
8
|
* @returns {UsePreferredContrastReturn} The contrast preference
|
|
9
9
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name usePreferredLanguages
|
|
3
3
|
* @description Hook that returns a browser preferred languages from navigator
|
|
4
|
-
* @category
|
|
4
|
+
* @category User
|
|
5
5
|
*
|
|
6
6
|
* @browserapi navigator.languages https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages
|
|
7
7
|
*
|
|
@@ -3,7 +3,7 @@ export type UsePreferredReducedMotionReturn = 'no-preference' | 'reduce';
|
|
|
3
3
|
/**
|
|
4
4
|
* @name usePreferredReducedMotion
|
|
5
5
|
* @description - Hook that returns the reduced motion preference
|
|
6
|
-
* @category
|
|
6
|
+
* @category User
|
|
7
7
|
*
|
|
8
8
|
* @returns {UsePreferredReducedMotionReturn} The reduced motion preference
|
|
9
9
|
*
|
|
@@ -28,7 +28,7 @@ export interface UseQueryReturn<Data> {
|
|
|
28
28
|
/**
|
|
29
29
|
* @name useQuery
|
|
30
30
|
* @description - Hook that defines the logic when query data
|
|
31
|
-
* @category
|
|
31
|
+
* @category Async
|
|
32
32
|
*
|
|
33
33
|
* @template Data The type of the data
|
|
34
34
|
* @param {() => Promise<Data>} callback The callback function to be invoked
|
|
@@ -18,7 +18,7 @@ export interface UseQueueReturn<Value> {
|
|
|
18
18
|
/**
|
|
19
19
|
* @name useQueue
|
|
20
20
|
* @description - Hook that manages a queue
|
|
21
|
-
* @category
|
|
21
|
+
* @category State
|
|
22
22
|
*
|
|
23
23
|
* @template Value The type of the value
|
|
24
24
|
* @param {Value[]} [initialValue=[]] The initial value of the queue
|
|
@@ -22,7 +22,7 @@ export interface UseRafReturn {
|
|
|
22
22
|
/**
|
|
23
23
|
* @name useRaf
|
|
24
24
|
* @description - Hook that defines the logic for raf callback
|
|
25
|
-
* @category
|
|
25
|
+
* @category Browser
|
|
26
26
|
*
|
|
27
27
|
* @browserapi requestAnimationFrame https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
|
|
28
28
|
*
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type UseRafStateReturn<Value> = [Value, (value: Value) => void];
|
|
2
2
|
/**
|
|
3
|
-
* @name
|
|
3
|
+
* @name useRafState
|
|
4
4
|
* @description - Hook that returns the value and a function to set the value
|
|
5
|
-
* @category
|
|
5
|
+
* @category State
|
|
6
6
|
*
|
|
7
7
|
* @template Value The type of the value
|
|
8
8
|
* @param {Value} initialValue The initial value
|
|
9
|
-
* @returns {
|
|
9
|
+
* @returns {UseRafStateReturn<Value>} An array containing the value and a function to set the value
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
|
-
* const [value, setValue] =
|
|
12
|
+
* const [value, setValue] = useRafState(initialValue);
|
|
13
13
|
*/
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const useRafState: <Value>(initialValue: (() => Value) | Value) => readonly [Value, (value: Value) => void];
|
|
@@ -6,7 +6,7 @@ export interface StateRef<Value> {
|
|
|
6
6
|
/**
|
|
7
7
|
* @name useRefState
|
|
8
8
|
* @description - Hook that returns the state reference of the value
|
|
9
|
-
* @category
|
|
9
|
+
* @category State
|
|
10
10
|
*
|
|
11
11
|
* @template Value The type of the value
|
|
12
12
|
* @param {Value} [initialValue] The initial value
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
/** The use render info return type */
|
|
1
2
|
export interface UseRenderInfoReturn {
|
|
3
|
+
/** The name of the component */
|
|
2
4
|
component: string;
|
|
5
|
+
/** The number of renders */
|
|
3
6
|
renders: number;
|
|
7
|
+
/** The time since the last render */
|
|
4
8
|
sinceLast: number;
|
|
9
|
+
/** The timestamp of the render */
|
|
5
10
|
timestamp: number | null;
|
|
6
11
|
}
|
|
7
12
|
/**
|
|
8
13
|
* @name useRenderInfo
|
|
9
14
|
* @description - Hook for getting information about component rerender
|
|
10
|
-
* @category
|
|
15
|
+
* @category Debug
|
|
11
16
|
*
|
|
12
17
|
* @param {string} [name='Unknown'] Component name
|
|
13
18
|
* @param {boolean} [log=true] Toggle logging
|
|
@@ -21,7 +21,7 @@ export interface UseResizeObserver {
|
|
|
21
21
|
/**
|
|
22
22
|
* @name useResizeObserver
|
|
23
23
|
* @description - Hook that gives you resize observer state
|
|
24
|
-
* @category
|
|
24
|
+
* @category Sensors
|
|
25
25
|
*
|
|
26
26
|
* @browserapi ResizeObserver https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver
|
|
27
27
|
*
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { HookTarget } from '../../utils/helpers';
|
|
2
|
+
import { StateRef } from '../useRefState/useRefState';
|
|
3
|
+
export type RightClickEvent = MouseEvent | TouchEvent;
|
|
4
|
+
export interface RightClickPositions {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
export interface UseRightClickOptions {
|
|
9
|
+
onEnd?: (event: RightClickEvent) => void;
|
|
10
|
+
onStart?: (event: RightClickEvent) => void;
|
|
11
|
+
}
|
|
12
|
+
export interface UseRightClick {
|
|
13
|
+
(target: HookTarget, callback: (event: Event) => void, options?: UseRightClickOptions): void;
|
|
14
|
+
<Target extends Element>(callback: (positions: RightClickPositions, event: Event) => void, options?: UseRightClickOptions, target?: never): StateRef<Target>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @name useRightClick
|
|
18
|
+
* @description - Hook that handles right-click events and long press on mobile devices
|
|
19
|
+
* @category Elements
|
|
20
|
+
*
|
|
21
|
+
* @overload
|
|
22
|
+
* @param {HookTarget} target The target element for right-click handling
|
|
23
|
+
* @param {(event: RightClickEvents) => void} callback The callback function to be invoked on right click
|
|
24
|
+
* @returns {void}
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* useRightClick(ref, () => console.log('clicked'));
|
|
28
|
+
*
|
|
29
|
+
* @overload
|
|
30
|
+
* @template Target The target element
|
|
31
|
+
* @param {(event: RightClickEvents) => void} callback The callback function to be invoked on right click
|
|
32
|
+
* @returns {StateRef<Target>} Ref to attach to the element
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* const ref = useRightClick(() => console.log('clicked'));
|
|
36
|
+
*/
|
|
37
|
+
export declare const useRightClick: UseRightClick;
|
|
@@ -10,7 +10,7 @@ export interface UseScriptOptions extends ComponentProps<'script'> {
|
|
|
10
10
|
/**
|
|
11
11
|
* @name useScript
|
|
12
12
|
* @description - Hook that manages a script with onLoad, onError, and removeOnUnmount functionalities
|
|
13
|
-
* @category
|
|
13
|
+
* @category Elements
|
|
14
14
|
*
|
|
15
15
|
* @param {string} src The source of the script
|
|
16
16
|
* @param {UseScriptOptions} [options] The options of the script extends from attributes script tag
|
|
@@ -2,7 +2,7 @@ import { UseStorageInitialValue, UseStorageOptions } from '../useStorage/useStor
|
|
|
2
2
|
/**
|
|
3
3
|
* @name useSessionStorage
|
|
4
4
|
* @description - Hook that manages session storage value
|
|
5
|
-
* @category
|
|
5
|
+
* @category State
|
|
6
6
|
*
|
|
7
7
|
* @browserapi sessionStorage https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage
|
|
8
8
|
*
|
|
@@ -28,7 +28,7 @@ interface UseSetReturn<Value> {
|
|
|
28
28
|
/**
|
|
29
29
|
* @name useSet
|
|
30
30
|
* @description - Hook that manages a set structure
|
|
31
|
-
* @category
|
|
31
|
+
* @category State
|
|
32
32
|
*
|
|
33
33
|
* @template Value The type of the value
|
|
34
34
|
* @param {Value[]} [values] The initial array of the set
|
|
@@ -47,7 +47,7 @@ export declare const getSpeechRecognition: () => {
|
|
|
47
47
|
/**
|
|
48
48
|
* @name useSpeechRecognition
|
|
49
49
|
* @description - Hook that provides a streamlined interface for incorporating speech-to-text functionality
|
|
50
|
-
* @category
|
|
50
|
+
* @category Browser
|
|
51
51
|
*
|
|
52
52
|
* @browserapi window.SpeechRecognition https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition
|
|
53
53
|
*
|
|
@@ -41,7 +41,7 @@ export interface UseSpeechSynthesisReturn {
|
|
|
41
41
|
/**
|
|
42
42
|
* @name useSpeechSynthesis
|
|
43
43
|
* @description - Hook that provides speech synthesis functionality
|
|
44
|
-
* @category
|
|
44
|
+
* @category Browser
|
|
45
45
|
*
|
|
46
46
|
* @browserapi SpeechSynthesis https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis
|
|
47
47
|
*
|
|
@@ -60,7 +60,7 @@ export declare const stateHistoryReducer: <Value>(state: StateHistory<Value>, ac
|
|
|
60
60
|
/**
|
|
61
61
|
* @name useStateHistory
|
|
62
62
|
* @description - Hook that manages state with history functionality
|
|
63
|
-
* @category
|
|
63
|
+
* @category State
|
|
64
64
|
*
|
|
65
65
|
* @param {Value} initialValue - The initial value to start the history with
|
|
66
66
|
* @param {number} [capacity=10] - Maximum number of history entries and undo actions to keep
|
|
@@ -20,7 +20,7 @@ export interface UseSticky {
|
|
|
20
20
|
/**
|
|
21
21
|
* @name UseSticky
|
|
22
22
|
* @description - Hook that allows you to detect that your sticky component is stuck
|
|
23
|
-
* @category
|
|
23
|
+
* @category Elements
|
|
24
24
|
*
|
|
25
25
|
* @overload
|
|
26
26
|
* @param {HookTarget} target The target sticky element
|
|
@@ -25,8 +25,8 @@ export interface UseStopwatchReturn {
|
|
|
25
25
|
}
|
|
26
26
|
/** The use stopwatch options */
|
|
27
27
|
export interface UseStopwatchOptions {
|
|
28
|
-
/** The
|
|
29
|
-
|
|
28
|
+
/** The immediately state of the timer */
|
|
29
|
+
immediately?: boolean;
|
|
30
30
|
}
|
|
31
31
|
interface UseStopwatch {
|
|
32
32
|
(initialTime?: number, options?: UseStopwatchOptions): UseStopwatchReturn;
|
|
@@ -19,7 +19,7 @@ export declare const dispatchStorageEvent: (params: Partial<StorageEvent>) => bo
|
|
|
19
19
|
/**
|
|
20
20
|
* @name useStorage
|
|
21
21
|
* @description - Hook that manages storage value
|
|
22
|
-
* @category
|
|
22
|
+
* @category State
|
|
23
23
|
*
|
|
24
24
|
* @overload
|
|
25
25
|
* @param {string} key The key of the storage
|
|
@@ -20,10 +20,10 @@ export interface UseTextDirection {
|
|
|
20
20
|
/**
|
|
21
21
|
* @name useTextDirection
|
|
22
22
|
* @description - Hook that can get and set the direction of the element
|
|
23
|
-
* @category
|
|
23
|
+
* @category Elements
|
|
24
24
|
*
|
|
25
25
|
* @overload
|
|
26
|
-
* @param {HookTarget} target The target element to observe
|
|
26
|
+
* @param {HookTarget} [target=document.querySelector('html')] The target element to observe
|
|
27
27
|
* @param {UseTextDirectionValue} [initialValue = 'ltr'] The initial direction of the element
|
|
28
28
|
* @returns {UseTextDirectionReturn} An object containing the current text direction of the element
|
|
29
29
|
*
|
|
@@ -4,7 +4,7 @@ export type UseToggleReturn<Value> = readonly [Value, (value?: Value) => void];
|
|
|
4
4
|
/**
|
|
5
5
|
* @name useToggle
|
|
6
6
|
* @description - Hook that create toggle
|
|
7
|
-
* @category
|
|
7
|
+
* @category State
|
|
8
8
|
*
|
|
9
9
|
* @template Value The type of the value
|
|
10
10
|
* @param {Value[]} [values=[false, true]] The values to toggle
|
|
@@ -42,7 +42,7 @@ export interface UseUrlSearchParam {
|
|
|
42
42
|
/**
|
|
43
43
|
* @name useUrlSearchParam
|
|
44
44
|
* @description - Hook that provides reactive URLSearchParams for a single key
|
|
45
|
-
* @category
|
|
45
|
+
* @category State
|
|
46
46
|
*
|
|
47
47
|
* @overload
|
|
48
48
|
* @template Value The type of the url param values
|
|
@@ -2,7 +2,7 @@ import { UseEventListenerOptions } from '../useEventListener/useEventListener';
|
|
|
2
2
|
/**
|
|
3
3
|
* @name useWindowEvent
|
|
4
4
|
* @description - Hook attaches an event listener to the window object for the specified event
|
|
5
|
-
* @category
|
|
5
|
+
* @category Sensors
|
|
6
6
|
*
|
|
7
7
|
* @template Event Key of window event map.
|
|
8
8
|
* @param {Event} event The event to listen for.
|
|
@@ -5,7 +5,7 @@ export interface WizardItem<WizardStepId> {
|
|
|
5
5
|
/**
|
|
6
6
|
* @name useWizard
|
|
7
7
|
* @description - Hook that manages a wizard
|
|
8
|
-
* @category
|
|
8
|
+
* @category State
|
|
9
9
|
*
|
|
10
10
|
* @param {WizardItem<WizardStepId>[]} map The map of the wizard
|
|
11
11
|
* @param {WizardStepId} [initialStepId] The initial step id
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './useBrowserLanguage/useBrowserLanguage';
|
|
2
|
+
export * from './useOperatingSystem/useOperatingSystem';
|
|
3
|
+
export * from './usePreferredColorScheme/usePreferredColorScheme';
|
|
4
|
+
export * from './usePreferredContrast/usePreferredContrast';
|
|
5
|
+
export * from './usePreferredDark/usePreferredDark';
|
|
6
|
+
export * from './usePreferredLanguages/usePreferredLanguages';
|
|
7
|
+
export * from './usePreferredReducedMotion/usePreferredReducedMotion';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './useConst/useConst';
|
|
2
|
+
export * from './useDebounceCallback/useDebounceCallback';
|
|
3
|
+
export * from './useDebounceValue/useDebounceValue';
|
|
4
|
+
export * from './useEvent/useEvent';
|
|
5
|
+
export * from './useLastChanged/useLastChanged';
|
|
6
|
+
export * from './useLatest/useLatest';
|
|
7
|
+
export * from './usePrevious/usePrevious';
|
|
8
|
+
export * from './useThrottleCallback/useThrottleCallback';
|
|
9
|
+
export * from './useThrottleValue/useThrottleValue';
|
|
@@ -9,4 +9,4 @@ export declare const target: (target: Target) => {
|
|
|
9
9
|
value: Target;
|
|
10
10
|
type: symbol;
|
|
11
11
|
};
|
|
12
|
-
export declare const getElement: (target: HookTarget) =>
|
|
12
|
+
export declare const getElement: (target: HookTarget) => Window | Document | Element | null | undefined;
|