@siberiacancode/reactuse 0.2.25 → 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.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/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/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 +9 -10
- 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.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/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/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/useAsync/useAsync.d.ts +1 -1
- package/dist/types/hooks/useAutoScroll/useAutoScroll.d.ts +1 -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/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/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
package/package.json
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@siberiacancode/reactuse",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "The ultimate collection of react hooks",
|
|
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": "git+https://github.com/siberiacancode/reactuse.git",
|
|
14
|
-
"directory": "packages/core"
|
|
15
|
-
},
|
|
16
|
-
"bugs": "https://github.com/siberiacancode/reactuse/issues",
|
|
17
|
-
"keywords": [
|
|
18
|
-
"react",
|
|
19
|
-
"react hooks",
|
|
20
|
-
"react use",
|
|
21
|
-
"use",
|
|
22
|
-
"hooks"
|
|
23
|
-
],
|
|
24
|
-
"sideEffects": false,
|
|
25
|
-
"exports": {
|
|
26
|
-
"types": "./dist/types/index.d.ts",
|
|
27
|
-
"import": "./dist/esm/index.mjs",
|
|
28
|
-
"require": "./dist/cjs/index.cjs"
|
|
29
|
-
},
|
|
30
|
-
"main": "dist/cjs/index.cjs",
|
|
31
|
-
"module": "dist/esm/index.mjs",
|
|
32
|
-
"types": "dist/types/index.d.ts",
|
|
33
|
-
"files": [
|
|
34
|
-
"dist"
|
|
35
|
-
],
|
|
36
|
-
"engines": {
|
|
37
|
-
"node": ">=14"
|
|
38
|
-
},
|
|
39
|
-
"publishConfig": {
|
|
40
|
-
"access": "public"
|
|
41
|
-
},
|
|
42
|
-
"scripts": {
|
|
43
|
-
"prepublishOnly": "pnpm unit-test run && pnpm build",
|
|
44
|
-
"build": "shx rm -rf dist && vite build",
|
|
45
|
-
"build:js": "tsc --project tsconfig.build.json && prettier --write src/bundle",
|
|
46
|
-
"lint": "eslint . --fix",
|
|
47
|
-
"lint-inspector": "npx @eslint/config-inspector@latest",
|
|
48
|
-
"format": "prettier --write .",
|
|
49
|
-
"pretty": "pnpm lint && pnpm format",
|
|
50
|
-
"unit-test": "vitest",
|
|
51
|
-
"lint-staged": "lint-staged"
|
|
52
|
-
},
|
|
53
|
-
"peerDependencies": {
|
|
54
|
-
"@types/react": "^18 || ^19",
|
|
55
|
-
"react": "^18 || ^19",
|
|
56
|
-
"react-dom": "^18 || ^19"
|
|
57
|
-
},
|
|
58
|
-
"peerDependenciesMeta": {
|
|
59
|
-
"@types/react": {
|
|
60
|
-
"optional": true
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"dependencies": {
|
|
64
|
-
"screenfull": "^6.0.2"
|
|
65
|
-
},
|
|
66
|
-
"devDependencies": {
|
|
67
|
-
"@siberiacancode/vitest": "^2.1.0",
|
|
68
|
-
"@testing-library/dom": "^10.4.
|
|
69
|
-
"@testing-library/react": "^16.3.0",
|
|
70
|
-
"@types/dom-speech-recognition": "^0.0.6",
|
|
71
|
-
"@types/react": "^19.1.
|
|
72
|
-
"@types/react-dom": "^19.1.
|
|
73
|
-
"@types/web-bluetooth": "^0.0.21",
|
|
74
|
-
"@vitejs/plugin-react": "^4.
|
|
75
|
-
"core-js": "^3.44.0",
|
|
76
|
-
"react": "^19.1.
|
|
77
|
-
"react-dom": "^19.1.
|
|
78
|
-
"shx": "^0.4.0",
|
|
79
|
-
"vite": "^7.0.
|
|
80
|
-
"vite-plugin-dts": "^4.5.4",
|
|
81
|
-
"vitest": "^3.2.4"
|
|
82
|
-
},
|
|
83
|
-
"lint-staged": {
|
|
84
|
-
"*.{js,ts,tsx}": [
|
|
85
|
-
"eslint --fix",
|
|
86
|
-
"prettier --write"
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@siberiacancode/reactuse",
|
|
3
|
+
"version": "0.2.26",
|
|
4
|
+
"description": "The ultimate collection of react hooks",
|
|
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": "git+https://github.com/siberiacancode/reactuse.git",
|
|
14
|
+
"directory": "packages/core"
|
|
15
|
+
},
|
|
16
|
+
"bugs": "https://github.com/siberiacancode/reactuse/issues",
|
|
17
|
+
"keywords": [
|
|
18
|
+
"react",
|
|
19
|
+
"react hooks",
|
|
20
|
+
"react use",
|
|
21
|
+
"use",
|
|
22
|
+
"hooks"
|
|
23
|
+
],
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"exports": {
|
|
26
|
+
"types": "./dist/types/index.d.ts",
|
|
27
|
+
"import": "./dist/esm/index.mjs",
|
|
28
|
+
"require": "./dist/cjs/index.cjs"
|
|
29
|
+
},
|
|
30
|
+
"main": "dist/cjs/index.cjs",
|
|
31
|
+
"module": "dist/esm/index.mjs",
|
|
32
|
+
"types": "dist/types/index.d.ts",
|
|
33
|
+
"files": [
|
|
34
|
+
"dist"
|
|
35
|
+
],
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=14"
|
|
38
|
+
},
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"prepublishOnly": "pnpm unit-test run && pnpm build",
|
|
44
|
+
"build": "shx rm -rf dist && vite build",
|
|
45
|
+
"build:js": "tsc --project tsconfig.build.json && prettier --write src/bundle",
|
|
46
|
+
"lint": "eslint . --fix",
|
|
47
|
+
"lint-inspector": "npx @eslint/config-inspector@latest",
|
|
48
|
+
"format": "prettier --write .",
|
|
49
|
+
"pretty": "pnpm lint && pnpm format",
|
|
50
|
+
"unit-test": "vitest",
|
|
51
|
+
"lint-staged": "lint-staged"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"@types/react": "^18 || ^19",
|
|
55
|
+
"react": "^18 || ^19",
|
|
56
|
+
"react-dom": "^18 || ^19"
|
|
57
|
+
},
|
|
58
|
+
"peerDependenciesMeta": {
|
|
59
|
+
"@types/react": {
|
|
60
|
+
"optional": true
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"screenfull": "^6.0.2"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@siberiacancode/vitest": "^2.1.0",
|
|
68
|
+
"@testing-library/dom": "^10.4.1",
|
|
69
|
+
"@testing-library/react": "^16.3.0",
|
|
70
|
+
"@types/dom-speech-recognition": "^0.0.6",
|
|
71
|
+
"@types/react": "^19.1.9",
|
|
72
|
+
"@types/react-dom": "^19.1.7",
|
|
73
|
+
"@types/web-bluetooth": "^0.0.21",
|
|
74
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
75
|
+
"core-js": "^3.44.0",
|
|
76
|
+
"react": "^19.1.1",
|
|
77
|
+
"react-dom": "^19.1.1",
|
|
78
|
+
"shx": "^0.4.0",
|
|
79
|
+
"vite": "^7.0.6",
|
|
80
|
+
"vite-plugin-dts": "^4.5.4",
|
|
81
|
+
"vitest": "^3.2.4"
|
|
82
|
+
},
|
|
83
|
+
"lint-staged": {
|
|
84
|
+
"*.{js,ts,tsx}": [
|
|
85
|
+
"eslint --fix",
|
|
86
|
+
"prettier --write"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRafValue.cjs","sources":["../../../../src/hooks/useRafValue/useRafValue.ts"],"sourcesContent":["import { useRef, useState } from 'react';\n\nimport { useUnmount } from '../useUnmount/useUnmount';\n\n/* The use raf value params type */\nexport type UseRafValueReturn<Value> = [Value, (value: Value) => void];\n\n/**\n * @name useRafValue\n * @description - Hook that returns the value and a function to set the value\n * @category Utilities\n *\n * @template Value The type of the value\n * @param {Value} initialValue The initial value\n * @returns {UseRafValueReturn<Value>} An array containing the value and a function to set the value\n *\n * @example\n * const [value, setValue] = useRafValue(initialValue);\n */\nexport const useRafValue = <Value>(initialValue: (() => Value) | Value) => {\n const rafIdRef = useRef(0);\n const [value, setValue] = useState(initialValue);\n\n const set = (value: Value) => {\n cancelAnimationFrame(rafIdRef.current);\n rafIdRef.current = requestAnimationFrame(() => setValue(value));\n };\n\n useUnmount(() => cancelAnimationFrame(rafIdRef.current));\n\n return [value, set] as const;\n};\n"],"names":["useRafValue","initialValue","rafIdRef","useRef","value","setValue","useState","set","useUnmount"],"mappings":"mJAmBaA,EAAsBC,GAAwC,CACzE,MAAMC,EAAWC,EAAAA,OAAO,CAAC,EACnB,CAACC,EAAOC,CAAQ,EAAIC,EAAAA,SAASL,CAAY,EAEzCM,EAAOH,GAAiB,CAC5B,qBAAqBF,EAAS,OAAO,EACrCA,EAAS,QAAU,sBAAsB,IAAMG,EAASD,CAAK,CAAC,CAAA,EAGhEI,OAAAA,EAAAA,WAAW,IAAM,qBAAqBN,EAAS,OAAO,CAAC,EAEhD,CAACE,EAAOG,CAAG,CACpB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),c=()=>{const n=typeof window<"u"&&"screen"in window&&"orientation"in window.screen,e=n?window.screen.orientation:{},[i,r]=o.useState(()=>({angle:e?.angle??0,orientationType:e?.type}));return o.useEffect(()=>{if(!n)return;const t=()=>r({angle:e.angle,orientationType:e.type});return window.addEventListener("orientationchange",t),()=>{window.removeEventListener("orientationchange",t)}}),{supported:n,value:i,lock:t=>{if(n&&typeof e.lock=="function")return e.lock(t)},unlock:()=>{n&&typeof e.unlock=="function"&&e.unlock()}}};exports.useScreenOrientation=c;
|
|
2
|
-
//# sourceMappingURL=useScreenOrientation.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useScreenOrientation.cjs","sources":["../../../../src/hooks/useScreenOrientation/useScreenOrientation.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\ndeclare global {\n interface ScreenOrientation {\n lock: (orientation: OrientationLockType) => Promise<void>;\n }\n}\n\n/* The use device orientation value type */\nexport interface UseScreenOrientationValue {\n /** The current angle */\n angle: number;\n /** The current orientation type */\n orientationType: OrientationType;\n}\n\n/* The screen lock orientation type */\nexport type OrientationLockType =\n | 'any'\n | 'landscape-primary'\n | 'landscape-secondary'\n | 'landscape'\n | 'natural'\n | 'portrait-primary'\n | 'portrait-secondary'\n | 'portrait';\n\n/* The use device orientation return type */\nexport interface useScreenOrientationReturn {\n /** Whether the screen orientation is supported */\n supported: boolean;\n /** The current screen orientation value */\n value: UseScreenOrientationValue;\n /** Lock the screen orientation */\n lock: (orientation: OrientationLockType) => void;\n /** Unlock the screen orientation */\n unlock: () => void;\n}\n\n/**\n * @name useScreenOrientation\n * @description - Hook that provides the current screen orientation\n * @category Sensors\n *\n * @browserapi screen.orientation https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation\n *\n * @returns {useScreenOrientationReturn} The current screen orientation\n *\n * @example\n * const { supported, value, lock, unlock } = useScreenOrientation();\n */\nexport const useScreenOrientation = (): useScreenOrientationReturn => {\n const supported =\n typeof window !== 'undefined' && 'screen' in window && 'orientation' in window.screen;\n const screenOrientation = (supported ? window.screen.orientation : {}) as ScreenOrientation;\n\n const [value, setValue] = useState<UseScreenOrientationValue>(() => {\n return {\n angle: screenOrientation?.angle ?? 0,\n orientationType: screenOrientation?.type\n };\n });\n\n useEffect(() => {\n if (!supported) return;\n\n const onOrientationChange = () =>\n setValue({\n angle: screenOrientation.angle,\n orientationType: screenOrientation.type\n });\n\n window.addEventListener('orientationchange', onOrientationChange);\n return () => {\n window.removeEventListener('orientationchange', onOrientationChange);\n };\n });\n\n const lock = (type: OrientationLockType) => {\n if (supported && typeof screenOrientation.lock === 'function')\n return screenOrientation.lock(type);\n };\n\n const unlock = () => {\n if (supported && typeof screenOrientation.unlock === 'function') screenOrientation.unlock();\n };\n\n return {\n supported,\n value,\n lock,\n unlock\n };\n};\n"],"names":["useScreenOrientation","supported","screenOrientation","value","setValue","useState","useEffect","onOrientationChange","type"],"mappings":"yGAmDaA,EAAuB,IAAkC,CACpE,MAAMC,EACJ,OAAO,OAAW,KAAe,WAAY,QAAU,gBAAiB,OAAO,OAC3EC,EAAqBD,EAAY,OAAO,OAAO,YAAc,CAAA,EAE7D,CAACE,EAAOC,CAAQ,EAAIC,EAAAA,SAAoC,KACrD,CACL,MAAOH,GAAmB,OAAS,EACnC,gBAAiBA,GAAmB,IAAA,EAEvC,EAEDI,OAAAA,EAAAA,UAAU,IAAM,CACd,GAAI,CAACL,EAAW,OAEhB,MAAMM,EAAsB,IAC1BH,EAAS,CACP,MAAOF,EAAkB,MACzB,gBAAiBA,EAAkB,IAAA,CACpC,EAEH,cAAO,iBAAiB,oBAAqBK,CAAmB,EACzD,IAAM,CACX,OAAO,oBAAoB,oBAAqBA,CAAmB,CAAA,CACrE,CACD,EAWM,CACL,UAAAN,EACA,MAAAE,EACA,KAZYK,GAA8B,CAC1C,GAAIP,GAAa,OAAOC,EAAkB,MAAS,WACjD,OAAOA,EAAkB,KAAKM,CAAI,CAAA,EAWpC,OARa,IAAM,CACfP,GAAa,OAAOC,EAAkB,QAAW,cAA8B,OAAA,CAAO,CAO1F,CAEJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRafValue.mjs","sources":["../../../../src/hooks/useRafValue/useRafValue.ts"],"sourcesContent":["import { useRef, useState } from 'react';\n\nimport { useUnmount } from '../useUnmount/useUnmount';\n\n/* The use raf value params type */\nexport type UseRafValueReturn<Value> = [Value, (value: Value) => void];\n\n/**\n * @name useRafValue\n * @description - Hook that returns the value and a function to set the value\n * @category Utilities\n *\n * @template Value The type of the value\n * @param {Value} initialValue The initial value\n * @returns {UseRafValueReturn<Value>} An array containing the value and a function to set the value\n *\n * @example\n * const [value, setValue] = useRafValue(initialValue);\n */\nexport const useRafValue = <Value>(initialValue: (() => Value) | Value) => {\n const rafIdRef = useRef(0);\n const [value, setValue] = useState(initialValue);\n\n const set = (value: Value) => {\n cancelAnimationFrame(rafIdRef.current);\n rafIdRef.current = requestAnimationFrame(() => setValue(value));\n };\n\n useUnmount(() => cancelAnimationFrame(rafIdRef.current));\n\n return [value, set] as const;\n};\n"],"names":["useRafValue","initialValue","rafIdRef","useRef","value","setValue","useState","set","useUnmount"],"mappings":";;AAmBO,MAAMA,IAAc,CAAQC,MAAwC;AACzE,QAAMC,IAAWC,EAAO,CAAC,GACnB,CAACC,GAAOC,CAAQ,IAAIC,EAASL,CAAY,GAEzCM,IAAM,CAACH,MAAiB;AAC5B,yBAAqBF,EAAS,OAAO,GACrCA,EAAS,UAAU,sBAAsB,MAAMG,EAASD,CAAK,CAAC;AAAA,EAAA;AAGhE,SAAAI,EAAW,MAAM,qBAAqBN,EAAS,OAAO,CAAC,GAEhD,CAACE,GAAOG,CAAG;AACpB;"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useState as r, useEffect as c } from "react";
|
|
2
|
-
const l = () => {
|
|
3
|
-
const e = typeof window < "u" && "screen" in window && "orientation" in window.screen, n = e ? window.screen.orientation : {}, [o, i] = r(() => ({
|
|
4
|
-
angle: n?.angle ?? 0,
|
|
5
|
-
orientationType: n?.type
|
|
6
|
-
}));
|
|
7
|
-
return c(() => {
|
|
8
|
-
if (!e) return;
|
|
9
|
-
const t = () => i({
|
|
10
|
-
angle: n.angle,
|
|
11
|
-
orientationType: n.type
|
|
12
|
-
});
|
|
13
|
-
return window.addEventListener("orientationchange", t), () => {
|
|
14
|
-
window.removeEventListener("orientationchange", t);
|
|
15
|
-
};
|
|
16
|
-
}), {
|
|
17
|
-
supported: e,
|
|
18
|
-
value: o,
|
|
19
|
-
lock: (t) => {
|
|
20
|
-
if (e && typeof n.lock == "function")
|
|
21
|
-
return n.lock(t);
|
|
22
|
-
},
|
|
23
|
-
unlock: () => {
|
|
24
|
-
e && typeof n.unlock == "function" && n.unlock();
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
l as useScreenOrientation
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=useScreenOrientation.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useScreenOrientation.mjs","sources":["../../../../src/hooks/useScreenOrientation/useScreenOrientation.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\ndeclare global {\n interface ScreenOrientation {\n lock: (orientation: OrientationLockType) => Promise<void>;\n }\n}\n\n/* The use device orientation value type */\nexport interface UseScreenOrientationValue {\n /** The current angle */\n angle: number;\n /** The current orientation type */\n orientationType: OrientationType;\n}\n\n/* The screen lock orientation type */\nexport type OrientationLockType =\n | 'any'\n | 'landscape-primary'\n | 'landscape-secondary'\n | 'landscape'\n | 'natural'\n | 'portrait-primary'\n | 'portrait-secondary'\n | 'portrait';\n\n/* The use device orientation return type */\nexport interface useScreenOrientationReturn {\n /** Whether the screen orientation is supported */\n supported: boolean;\n /** The current screen orientation value */\n value: UseScreenOrientationValue;\n /** Lock the screen orientation */\n lock: (orientation: OrientationLockType) => void;\n /** Unlock the screen orientation */\n unlock: () => void;\n}\n\n/**\n * @name useScreenOrientation\n * @description - Hook that provides the current screen orientation\n * @category Sensors\n *\n * @browserapi screen.orientation https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation\n *\n * @returns {useScreenOrientationReturn} The current screen orientation\n *\n * @example\n * const { supported, value, lock, unlock } = useScreenOrientation();\n */\nexport const useScreenOrientation = (): useScreenOrientationReturn => {\n const supported =\n typeof window !== 'undefined' && 'screen' in window && 'orientation' in window.screen;\n const screenOrientation = (supported ? window.screen.orientation : {}) as ScreenOrientation;\n\n const [value, setValue] = useState<UseScreenOrientationValue>(() => {\n return {\n angle: screenOrientation?.angle ?? 0,\n orientationType: screenOrientation?.type\n };\n });\n\n useEffect(() => {\n if (!supported) return;\n\n const onOrientationChange = () =>\n setValue({\n angle: screenOrientation.angle,\n orientationType: screenOrientation.type\n });\n\n window.addEventListener('orientationchange', onOrientationChange);\n return () => {\n window.removeEventListener('orientationchange', onOrientationChange);\n };\n });\n\n const lock = (type: OrientationLockType) => {\n if (supported && typeof screenOrientation.lock === 'function')\n return screenOrientation.lock(type);\n };\n\n const unlock = () => {\n if (supported && typeof screenOrientation.unlock === 'function') screenOrientation.unlock();\n };\n\n return {\n supported,\n value,\n lock,\n unlock\n };\n};\n"],"names":["useScreenOrientation","supported","screenOrientation","value","setValue","useState","useEffect","onOrientationChange","type"],"mappings":";AAmDO,MAAMA,IAAuB,MAAkC;AACpE,QAAMC,IACJ,OAAO,SAAW,OAAe,YAAY,UAAU,iBAAiB,OAAO,QAC3EC,IAAqBD,IAAY,OAAO,OAAO,cAAc,CAAA,GAE7D,CAACE,GAAOC,CAAQ,IAAIC,EAAoC,OACrD;AAAA,IACL,OAAOH,GAAmB,SAAS;AAAA,IACnC,iBAAiBA,GAAmB;AAAA,EAAA,EAEvC;AAED,SAAAI,EAAU,MAAM;AACd,QAAI,CAACL,EAAW;AAEhB,UAAMM,IAAsB,MAC1BH,EAAS;AAAA,MACP,OAAOF,EAAkB;AAAA,MACzB,iBAAiBA,EAAkB;AAAA,IAAA,CACpC;AAEH,kBAAO,iBAAiB,qBAAqBK,CAAmB,GACzD,MAAM;AACX,aAAO,oBAAoB,qBAAqBA,CAAmB;AAAA,IAAA;AAAA,EACrE,CACD,GAWM;AAAA,IACL,WAAAN;AAAA,IACA,OAAAE;AAAA,IACA,MAZW,CAACK,MAA8B;AAC1C,UAAIP,KAAa,OAAOC,EAAkB,QAAS;AACjD,eAAOA,EAAkB,KAAKM,CAAI;AAAA,IAAA;AAAA,IAWpC,QARa,MAAM;AACnB,MAAIP,KAAa,OAAOC,EAAkB,UAAW,gBAA8B,OAAA;AAAA,IAAO;AAAA,EAO1F;AAEJ;"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
interface ScreenOrientation {
|
|
3
|
-
lock: (orientation: OrientationLockType) => Promise<void>;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
export interface UseScreenOrientationValue {
|
|
7
|
-
/** The current angle */
|
|
8
|
-
angle: number;
|
|
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 useScreenOrientationReturn {
|
|
14
|
-
/** Whether the screen orientation is supported */
|
|
15
|
-
supported: boolean;
|
|
16
|
-
/** The current screen orientation value */
|
|
17
|
-
value: UseScreenOrientationValue;
|
|
18
|
-
/** Lock the screen orientation */
|
|
19
|
-
lock: (orientation: OrientationLockType) => void;
|
|
20
|
-
/** Unlock the screen orientation */
|
|
21
|
-
unlock: () => void;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* @name useScreenOrientation
|
|
25
|
-
* @description - Hook that provides the current screen orientation
|
|
26
|
-
* @category Sensors
|
|
27
|
-
*
|
|
28
|
-
* @browserapi screen.orientation https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation
|
|
29
|
-
*
|
|
30
|
-
* @returns {useScreenOrientationReturn} The current screen orientation
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* const { supported, value, lock, unlock } = useScreenOrientation();
|
|
34
|
-
*/
|
|
35
|
-
export declare const useScreenOrientation: () => useScreenOrientationReturn;
|