@siberiacancode/reactuse 0.2.8 → 0.2.10
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 +71 -71
- package/dist/cjs/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/cjs/hooks/useBoolean/useBoolean.cjs.map +1 -1
- package/dist/cjs/hooks/useCookie/useCookie.cjs.map +1 -1
- package/dist/cjs/hooks/useCookies/useCookies.cjs +1 -1
- package/dist/cjs/hooks/useCookies/useCookies.cjs.map +1 -1
- package/dist/cjs/hooks/useDropZone/useDropZone.cjs.map +1 -1
- package/dist/cjs/hooks/useShare/useShare.cjs.map +1 -1
- package/dist/cjs/hooks/useStep/useStep.cjs.map +1 -1
- package/dist/cjs/hooks/useStorage/useStorage.cjs +1 -1
- package/dist/cjs/hooks/useStorage/useStorage.cjs.map +1 -1
- package/dist/cjs/hooks/useUrlSearchParam/useUrlSearchParam.cjs +2 -0
- package/dist/cjs/hooks/useUrlSearchParam/useUrlSearchParam.cjs.map +1 -0
- package/dist/cjs/hooks/useUrlSearchParams/useUrlSearchParams.cjs +1 -1
- package/dist/cjs/hooks/useUrlSearchParams/useUrlSearchParams.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/esm/hooks/useBoolean/useBoolean.mjs.map +1 -1
- package/dist/esm/hooks/useCookie/useCookie.mjs.map +1 -1
- package/dist/esm/hooks/useCookies/useCookies.mjs +31 -35
- package/dist/esm/hooks/useCookies/useCookies.mjs.map +1 -1
- package/dist/esm/hooks/useDropZone/useDropZone.mjs.map +1 -1
- package/dist/esm/hooks/useShare/useShare.mjs.map +1 -1
- package/dist/esm/hooks/useStep/useStep.mjs.map +1 -1
- package/dist/esm/hooks/useStorage/useStorage.mjs +30 -30
- package/dist/esm/hooks/useStorage/useStorage.mjs.map +1 -1
- package/dist/esm/hooks/useUrlSearchParam/useUrlSearchParam.mjs +27 -0
- package/dist/esm/hooks/useUrlSearchParam/useUrlSearchParam.mjs.map +1 -0
- package/dist/esm/hooks/useUrlSearchParams/useUrlSearchParams.mjs +44 -51
- package/dist/esm/hooks/useUrlSearchParams/useUrlSearchParams.mjs.map +1 -1
- package/dist/esm/index.mjs +242 -242
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/hooks/useCookie/useCookie.d.ts +18 -6
- package/dist/types/hooks/useCookies/useCookies.d.ts +10 -10
- package/dist/types/hooks/useUrlSearchParam/useUrlSearchParam.d.ts +70 -0
- package/dist/types/hooks/useUrlSearchParams/useUrlSearchParams.d.ts +36 -11
- package/package.json +89 -89
package/dist/esm/index.mjs
CHANGED
|
@@ -5,131 +5,132 @@ import { useActiveElement as f } from "./hooks/useActiveElement/useActiveElement
|
|
|
5
5
|
import { useAsync as i } from "./hooks/useAsync/useAsync.mjs";
|
|
6
6
|
import { useBattery as n } from "./hooks/useBattery/useBattery.mjs";
|
|
7
7
|
import { useBluetooth as l } from "./hooks/useBluetooth/useBluetooth.mjs";
|
|
8
|
-
import { useBoolean as
|
|
9
|
-
import { BREAKPOINTS_ANT_DESIGN as
|
|
10
|
-
import { useBrowserLanguage as
|
|
8
|
+
import { useBoolean as T } from "./hooks/useBoolean/useBoolean.mjs";
|
|
9
|
+
import { BREAKPOINTS_ANT_DESIGN as E, BREAKPOINTS_BOOTSTRAP_V5 as d, BREAKPOINTS_MANTINE as P, BREAKPOINTS_MASTER_CSS as C, BREAKPOINTS_MATERIAL_UI as R, BREAKPOINTS_PRIME_FLEX as I, BREAKPOINTS_QUASAR_V2 as O, BREAKPOINTS_SEMANTIC as y, BREAKPOINTS_TAILWIND as k, useBreakpoints as v } from "./hooks/useBreakpoints/useBreakpoints.mjs";
|
|
10
|
+
import { useBrowserLanguage as h } from "./hooks/useBrowserLanguage/useBrowserLanguage.mjs";
|
|
11
11
|
import { useClickOutside as _ } from "./hooks/useClickOutside/useClickOutside.mjs";
|
|
12
12
|
import { useClipboard as M } from "./hooks/useClipboard/useClipboard.mjs";
|
|
13
13
|
import { useConst as L } from "./hooks/useConst/useConst.mjs";
|
|
14
14
|
import { COOKIE_EVENT as K, dispatchCookieEvent as F, getCookie as V, getCookies as U, removeCookie as w, removeCookieItem as W, setCookie as H, setCookieItem as G, useCookie as Q } from "./hooks/useCookie/useCookie.mjs";
|
|
15
|
-
import { clearCookies as X,
|
|
16
|
-
import { useCopy as
|
|
17
|
-
import { useCounter as
|
|
18
|
-
import { useCssVar as
|
|
19
|
-
import { useDebounceCallback as
|
|
20
|
-
import { useDebounceValue as
|
|
21
|
-
import { useDefault as
|
|
22
|
-
import { useDeviceMotion as
|
|
23
|
-
import { useDeviceOrientation as
|
|
24
|
-
import { useDevicePixelRatio as
|
|
25
|
-
import { useDidUpdate as
|
|
15
|
+
import { clearCookies as X, useCookies as Z } from "./hooks/useCookies/useCookies.mjs";
|
|
16
|
+
import { useCopy as q } from "./hooks/useCopy/useCopy.mjs";
|
|
17
|
+
import { useCounter as Y } from "./hooks/useCounter/useCounter.mjs";
|
|
18
|
+
import { useCssVar as ee } from "./hooks/useCssVar/useCssVar.mjs";
|
|
19
|
+
import { useDebounceCallback as re } from "./hooks/useDebounceCallback/useDebounceCallback.mjs";
|
|
20
|
+
import { useDebounceValue as se } from "./hooks/useDebounceValue/useDebounceValue.mjs";
|
|
21
|
+
import { useDefault as pe } from "./hooks/useDefault/useDefault.mjs";
|
|
22
|
+
import { useDeviceMotion as fe } from "./hooks/useDeviceMotion/useDeviceMotion.mjs";
|
|
23
|
+
import { useDeviceOrientation as ie } from "./hooks/useDeviceOrientation/useDeviceOrientation.mjs";
|
|
24
|
+
import { useDevicePixelRatio as ne } from "./hooks/useDevicePixelRatio/useDevicePixelRatio.mjs";
|
|
25
|
+
import { useDidUpdate as le } from "./hooks/useDidUpdate/useDidUpdate.mjs";
|
|
26
26
|
import { useDisclosure as Te } from "./hooks/useDisclosure/useDisclosure.mjs";
|
|
27
27
|
import { useDisplayMedia as Ee } from "./hooks/useDisplayMedia/useDisplayMedia.mjs";
|
|
28
|
-
import { useDocumentEvent as
|
|
29
|
-
import { useDocumentTitle as
|
|
30
|
-
import { useDocumentVisibility as
|
|
31
|
-
import { useDoubleClick as
|
|
32
|
-
import { useDropZone as
|
|
33
|
-
import { useElementSize as
|
|
34
|
-
import { useEvent as
|
|
35
|
-
import { useEventListener as
|
|
36
|
-
import { useEventSource as
|
|
37
|
-
import { useEyeDropper as
|
|
38
|
-
import { useFavicon as
|
|
39
|
-
import { useField as
|
|
40
|
-
import { useFileDialog as
|
|
41
|
-
import { useFocus as
|
|
42
|
-
import { useFps as
|
|
43
|
-
import { useFul as
|
|
44
|
-
import { useFullscreen as
|
|
45
|
-
import { mapGamepadToXbox360Controller as
|
|
46
|
-
import { useGeolocation as
|
|
47
|
-
import { useHash as
|
|
48
|
-
import { isHotkeyMatch as
|
|
49
|
-
import { useHover as
|
|
50
|
-
import { useIdle as
|
|
51
|
-
import { useImage as
|
|
28
|
+
import { useDocumentEvent as Pe } from "./hooks/useDocumentEvent/useDocumentEvent.mjs";
|
|
29
|
+
import { useDocumentTitle as Re } from "./hooks/useDocumentTitle/useDocumentTitle.mjs";
|
|
30
|
+
import { useDocumentVisibility as Oe } from "./hooks/useDocumentVisibility/useDocumentVisibility.mjs";
|
|
31
|
+
import { useDoubleClick as ke } from "./hooks/useDoubleClick/useDoubleClick.mjs";
|
|
32
|
+
import { useDropZone as Ae } from "./hooks/useDropZone/useDropZone.mjs";
|
|
33
|
+
import { useElementSize as De } from "./hooks/useElementSize/useElementSize.mjs";
|
|
34
|
+
import { useEvent as be } from "./hooks/useEvent/useEvent.mjs";
|
|
35
|
+
import { useEventListener as Ne } from "./hooks/useEventListener/useEventListener.mjs";
|
|
36
|
+
import { useEventSource as Be } from "./hooks/useEventSource/useEventSource.mjs";
|
|
37
|
+
import { useEyeDropper as Fe } from "./hooks/useEyeDropper/useEyeDropper.mjs";
|
|
38
|
+
import { useFavicon as Ue } from "./hooks/useFavicon/useFavicon.mjs";
|
|
39
|
+
import { useField as We } from "./hooks/useField/useField.mjs";
|
|
40
|
+
import { useFileDialog as Ge } from "./hooks/useFileDialog/useFileDialog.mjs";
|
|
41
|
+
import { useFocus as ze } from "./hooks/useFocus/useFocus.mjs";
|
|
42
|
+
import { useFps as Ze } from "./hooks/useFps/useFps.mjs";
|
|
43
|
+
import { useFul as qe } from "./hooks/useFul/useFul.mjs";
|
|
44
|
+
import { useFullscreen as Ye } from "./hooks/useFullscreen/useFullscreen.mjs";
|
|
45
|
+
import { mapGamepadToXbox360Controller as eo, useGamepad as oo } from "./hooks/useGamepad/useGamepad.mjs";
|
|
46
|
+
import { useGeolocation as to } from "./hooks/useGeolocation/useGeolocation.mjs";
|
|
47
|
+
import { useHash as mo } from "./hooks/useHash/useHash.mjs";
|
|
48
|
+
import { isHotkeyMatch as uo, useHotkeys as fo } from "./hooks/useHotkeys/useHotkeys.mjs";
|
|
49
|
+
import { useHover as io } from "./hooks/useHover/useHover.mjs";
|
|
50
|
+
import { useIdle as no } from "./hooks/useIdle/useIdle.mjs";
|
|
51
|
+
import { useImage as lo } from "./hooks/useImage/useImage.mjs";
|
|
52
52
|
import { useInfiniteScroll as To } from "./hooks/useInfiniteScroll/useInfiniteScroll.mjs";
|
|
53
|
-
import { useIntersectionObserver as
|
|
54
|
-
import { useInterval as
|
|
55
|
-
import { useIsFirstRender as
|
|
56
|
-
import { useIsomorphicLayoutEffect as
|
|
53
|
+
import { useIntersectionObserver as Eo } from "./hooks/useIntersectionObserver/useIntersectionObserver.mjs";
|
|
54
|
+
import { useInterval as Co } from "./hooks/useInterval/useInterval.mjs";
|
|
55
|
+
import { useIsFirstRender as Io } from "./hooks/useIsFirstRender/useIsFirstRender.mjs";
|
|
56
|
+
import { useIsomorphicLayoutEffect as yo } from "./hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs";
|
|
57
57
|
import { useKeyboard as vo } from "./hooks/useKeyboard/useKeyboard.mjs";
|
|
58
58
|
import { useKeyPress as ho } from "./hooks/useKeyPress/useKeyPress.mjs";
|
|
59
|
-
import { useKeyPressEvent as
|
|
60
|
-
import { useKeysPressed as
|
|
61
|
-
import { useLastChanged as
|
|
62
|
-
import { useLatest as
|
|
63
|
-
import { useLess as
|
|
64
|
-
import { useList as
|
|
65
|
-
import { useLocalStorage as
|
|
66
|
-
import { useLockCallback as
|
|
67
|
-
import { useLogger as
|
|
68
|
-
import { useLongPress as
|
|
69
|
-
import { useMap as
|
|
70
|
-
import { useMeasure as
|
|
71
|
-
import { useMediaQuery as
|
|
72
|
-
import { useMemory as
|
|
73
|
-
import { useMount as
|
|
74
|
-
import { useMouse as
|
|
75
|
-
import { useMutation as
|
|
76
|
-
import { useMutationObserver as
|
|
77
|
-
import { getConnection as
|
|
59
|
+
import { useKeyPressEvent as _o } from "./hooks/useKeyPressEvent/useKeyPressEvent.mjs";
|
|
60
|
+
import { useKeysPressed as Mo } from "./hooks/useKeysPressed/useKeysPressed.mjs";
|
|
61
|
+
import { useLastChanged as Lo } from "./hooks/useLastChanged/useLastChanged.mjs";
|
|
62
|
+
import { useLatest as Ko } from "./hooks/useLatest/useLatest.mjs";
|
|
63
|
+
import { useLess as Vo } from "./hooks/useLess/useLess.mjs";
|
|
64
|
+
import { useList as wo } from "./hooks/useList/useList.mjs";
|
|
65
|
+
import { useLocalStorage as Ho } from "./hooks/useLocalStorage/useLocalStorage.mjs";
|
|
66
|
+
import { useLockCallback as Qo } from "./hooks/useLockCallback/useLockCallback.mjs";
|
|
67
|
+
import { useLogger as Xo } from "./hooks/useLogger/useLogger.mjs";
|
|
68
|
+
import { useLongPress as jo } from "./hooks/useLongPress/useLongPress.mjs";
|
|
69
|
+
import { useMap as Jo } from "./hooks/useMap/useMap.mjs";
|
|
70
|
+
import { useMeasure as $o } from "./hooks/useMeasure/useMeasure.mjs";
|
|
71
|
+
import { useMediaQuery as or } from "./hooks/useMediaQuery/useMediaQuery.mjs";
|
|
72
|
+
import { useMemory as tr } from "./hooks/useMemory/useMemory.mjs";
|
|
73
|
+
import { useMount as mr } from "./hooks/useMount/useMount.mjs";
|
|
74
|
+
import { useMouse as ur } from "./hooks/useMouse/useMouse.mjs";
|
|
75
|
+
import { useMutation as xr } from "./hooks/useMutation/useMutation.mjs";
|
|
76
|
+
import { useMutationObserver as ar } from "./hooks/useMutationObserver/useMutationObserver.mjs";
|
|
77
|
+
import { getConnection as cr, useNetwork as lr } from "./hooks/useNetwork/useNetwork.mjs";
|
|
78
78
|
import { useOffsetPagination as Tr } from "./hooks/useOffsetPagination/useOffsetPagination.mjs";
|
|
79
79
|
import { useOnce as Er } from "./hooks/useOnce/useOnce.mjs";
|
|
80
|
-
import { useOnline as
|
|
81
|
-
import { getOperatingSystem as
|
|
82
|
-
import { useOptimistic as
|
|
80
|
+
import { useOnline as Pr } from "./hooks/useOnline/useOnline.mjs";
|
|
81
|
+
import { getOperatingSystem as Rr, useOperatingSystem as Ir } from "./hooks/useOperatingSystem/useOperatingSystem.mjs";
|
|
82
|
+
import { useOptimistic as yr } from "./hooks/useOptimistic/useOptimistic.mjs";
|
|
83
83
|
import { useOrientation as vr } from "./hooks/useOrientation/useOrientation.mjs";
|
|
84
84
|
import { useOtpCredential as hr } from "./hooks/useOtpCredential/useOtpCredential.mjs";
|
|
85
|
-
import { usePageLeave as
|
|
86
|
-
import { Paint as
|
|
87
|
-
import { useParallax as
|
|
88
|
-
import { usePerformanceObserver as
|
|
89
|
-
import { usePermission as
|
|
90
|
-
import { usePointerLock as
|
|
91
|
-
import { usePostMessage as
|
|
92
|
-
import { usePreferredColorScheme as
|
|
93
|
-
import { usePreferredContrast as
|
|
94
|
-
import { usePreferredDark as
|
|
95
|
-
import { usePreferredLanguages as
|
|
96
|
-
import { usePreferredReducedMotion as
|
|
97
|
-
import { usePrevious as
|
|
98
|
-
import { useQuery as
|
|
99
|
-
import { useQueue as
|
|
100
|
-
import { useRaf as
|
|
101
|
-
import { useRafValue as
|
|
102
|
-
import { useRefState as
|
|
103
|
-
import { useRenderCount as
|
|
104
|
-
import { useRenderInfo as
|
|
105
|
-
import { useRerender as
|
|
106
|
-
import { useResizeObserver as
|
|
107
|
-
import { useScreenOrientation as
|
|
108
|
-
import { SCRIPT_STATUS_ATTRIBUTE_NAME as
|
|
109
|
-
import { useScroll as
|
|
110
|
-
import { useScrollIntoView as
|
|
111
|
-
import { useScrollTo as
|
|
112
|
-
import { useSessionStorage as
|
|
113
|
-
import { useSet as
|
|
114
|
-
import { useShare as
|
|
115
|
-
import { getSpeechRecognition as
|
|
116
|
-
import { useSpeechSynthesis as
|
|
117
|
-
import { stateHistoryReducer as
|
|
118
|
-
import { useStep as
|
|
119
|
-
import { useSticky as
|
|
120
|
-
import { useStopwatch as
|
|
121
|
-
import { STORAGE_EVENT as
|
|
122
|
-
import { useTextDirection as
|
|
123
|
-
import { getRangesSelection as
|
|
124
|
-
import { useThrottleCallback as
|
|
125
|
-
import { useThrottleValue as
|
|
126
|
-
import { useTime as
|
|
127
|
-
import { useTimeout as
|
|
128
|
-
import { getTimeFromSeconds as
|
|
129
|
-
import { useToggle as
|
|
130
|
-
import { useUnmount as
|
|
131
|
-
import {
|
|
132
|
-
import {
|
|
85
|
+
import { usePageLeave as _r } from "./hooks/usePageLeave/usePageLeave.mjs";
|
|
86
|
+
import { Paint as Mr, Pointer as Nr, usePaint as Lr } from "./hooks/usePaint/usePaint.mjs";
|
|
87
|
+
import { useParallax as Kr } from "./hooks/useParallax/useParallax.mjs";
|
|
88
|
+
import { usePerformanceObserver as Vr } from "./hooks/usePerformanceObserver/usePerformanceObserver.mjs";
|
|
89
|
+
import { usePermission as wr } from "./hooks/usePermission/usePermission.mjs";
|
|
90
|
+
import { usePointerLock as Hr } from "./hooks/usePointerLock/usePointerLock.mjs";
|
|
91
|
+
import { usePostMessage as Qr } from "./hooks/usePostMessage/usePostMessage.mjs";
|
|
92
|
+
import { usePreferredColorScheme as Xr } from "./hooks/usePreferredColorScheme/usePreferredColorScheme.mjs";
|
|
93
|
+
import { usePreferredContrast as jr } from "./hooks/usePreferredContrast/usePreferredContrast.mjs";
|
|
94
|
+
import { usePreferredDark as Jr } from "./hooks/usePreferredDark/usePreferredDark.mjs";
|
|
95
|
+
import { usePreferredLanguages as $r } from "./hooks/usePreferredLanguages/usePreferredLanguages.mjs";
|
|
96
|
+
import { usePreferredReducedMotion as ot } from "./hooks/usePreferredReducedMotion/usePreferredReducedMotion.mjs";
|
|
97
|
+
import { usePrevious as tt } from "./hooks/usePrevious/usePrevious.mjs";
|
|
98
|
+
import { useQuery as mt } from "./hooks/useQuery/useQuery.mjs";
|
|
99
|
+
import { useQueue as ut } from "./hooks/useQueue/useQueue.mjs";
|
|
100
|
+
import { useRaf as xt } from "./hooks/useRaf/useRaf.mjs";
|
|
101
|
+
import { useRafValue as at } from "./hooks/useRafValue/useRafValue.mjs";
|
|
102
|
+
import { useRefState as ct } from "./hooks/useRefState/useRefState.mjs";
|
|
103
|
+
import { useRenderCount as St } from "./hooks/useRenderCount/useRenderCount.mjs";
|
|
104
|
+
import { useRenderInfo as gt } from "./hooks/useRenderInfo/useRenderInfo.mjs";
|
|
105
|
+
import { useRerender as dt } from "./hooks/useRerender/useRerender.mjs";
|
|
106
|
+
import { useResizeObserver as Ct } from "./hooks/useResizeObserver/useResizeObserver.mjs";
|
|
107
|
+
import { useScreenOrientation as It } from "./hooks/useScreenOrientation/useScreenOrientation.mjs";
|
|
108
|
+
import { SCRIPT_STATUS_ATTRIBUTE_NAME as yt, useScript as kt } from "./hooks/useScript/useScript.mjs";
|
|
109
|
+
import { useScroll as At } from "./hooks/useScroll/useScroll.mjs";
|
|
110
|
+
import { useScrollIntoView as Dt } from "./hooks/useScrollIntoView/useScrollIntoView.mjs";
|
|
111
|
+
import { useScrollTo as bt } from "./hooks/useScrollTo/useScrollTo.mjs";
|
|
112
|
+
import { useSessionStorage as Nt } from "./hooks/useSessionStorage/useSessionStorage.mjs";
|
|
113
|
+
import { useSet as Bt } from "./hooks/useSet/useSet.mjs";
|
|
114
|
+
import { useShare as Ft } from "./hooks/useShare/useShare.mjs";
|
|
115
|
+
import { getSpeechRecognition as Ut, useSpeechRecognition as wt } from "./hooks/useSpeechRecognition/useSpeechRecognition.mjs";
|
|
116
|
+
import { useSpeechSynthesis as Ht } from "./hooks/useSpeechSynthesis/useSpeechSynthesis.mjs";
|
|
117
|
+
import { stateHistoryReducer as Qt, useStateHistory as zt } from "./hooks/useStateHistory/useStateHistory.mjs";
|
|
118
|
+
import { useStep as Zt } from "./hooks/useStep/useStep.mjs";
|
|
119
|
+
import { useSticky as qt } from "./hooks/useSticky/useSticky.mjs";
|
|
120
|
+
import { useStopwatch as Yt } from "./hooks/useStopwatch/useStopwatch.mjs";
|
|
121
|
+
import { STORAGE_EVENT as es, dispatchStorageEvent as os, useStorage as rs } from "./hooks/useStorage/useStorage.mjs";
|
|
122
|
+
import { useTextDirection as ss } from "./hooks/useTextDirection/useTextDirection.mjs";
|
|
123
|
+
import { getRangesSelection as ps, useTextSelection as us } from "./hooks/useTextSelection/useTextSelection.mjs";
|
|
124
|
+
import { useThrottleCallback as xs } from "./hooks/useThrottleCallback/useThrottleCallback.mjs";
|
|
125
|
+
import { useThrottleValue as as } from "./hooks/useThrottleValue/useThrottleValue.mjs";
|
|
126
|
+
import { useTime as cs } from "./hooks/useTime/useTime.mjs";
|
|
127
|
+
import { useTimeout as Ss } from "./hooks/useTimeout/useTimeout.mjs";
|
|
128
|
+
import { getTimeFromSeconds as gs, useTimer as Es } from "./hooks/useTimer/useTimer.mjs";
|
|
129
|
+
import { useToggle as Ps } from "./hooks/useToggle/useToggle.mjs";
|
|
130
|
+
import { useUnmount as Rs } from "./hooks/useUnmount/useUnmount.mjs";
|
|
131
|
+
import { useUrlSearchParams as Os } from "./hooks/useUrlSearchParams/useUrlSearchParams.mjs";
|
|
132
|
+
import { createQueryString as ks, dispatchUrlSearchParamsEvent as vs, getUrlSearchParams as As } from "./hooks/useUrlSearchParam/useUrlSearchParam.mjs";
|
|
133
|
+
import { useVibrate as Ds } from "./hooks/useVibrate/useVibrate.mjs";
|
|
133
134
|
import { useWakeLock as bs } from "./hooks/useWakeLock/useWakeLock.mjs";
|
|
134
135
|
import { useWebSocket as Ns } from "./hooks/useWebSocket/useWebSocket.mjs";
|
|
135
136
|
import { useWindowEvent as Bs } from "./hooks/useWindowEvent/useWindowEvent.mjs";
|
|
@@ -145,8 +146,8 @@ import { getRetry as sm } from "./utils/helpers/getRetry.mjs";
|
|
|
145
146
|
import { isTarget as pm } from "./utils/helpers/isTarget.mjs";
|
|
146
147
|
import { throttle as fm } from "./utils/helpers/throttle.mjs";
|
|
147
148
|
export {
|
|
148
|
-
|
|
149
|
-
|
|
149
|
+
E as BREAKPOINTS_ANT_DESIGN,
|
|
150
|
+
d as BREAKPOINTS_BOOTSTRAP_V5,
|
|
150
151
|
P as BREAKPOINTS_MANTINE,
|
|
151
152
|
C as BREAKPOINTS_MASTER_CSS,
|
|
152
153
|
R as BREAKPOINTS_MATERIAL_UI,
|
|
@@ -155,42 +156,41 @@ export {
|
|
|
155
156
|
y as BREAKPOINTS_SEMANTIC,
|
|
156
157
|
k as BREAKPOINTS_TAILWIND,
|
|
157
158
|
K as COOKIE_EVENT,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
Mr as Paint,
|
|
160
|
+
Nr as Pointer,
|
|
161
|
+
yt as SCRIPT_STATUS_ATTRIBUTE_NAME,
|
|
162
|
+
es as STORAGE_EVENT,
|
|
162
163
|
X as clearCookies,
|
|
163
164
|
Xs as copy,
|
|
164
165
|
r as createContext,
|
|
165
|
-
|
|
166
|
+
ks as createQueryString,
|
|
166
167
|
s as createReactiveContext,
|
|
167
168
|
p as createStore,
|
|
168
169
|
qs as debounce,
|
|
169
170
|
F as dispatchCookieEvent,
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
os as dispatchStorageEvent,
|
|
172
|
+
vs as dispatchUrlSearchParamsEvent,
|
|
173
|
+
cr as getConnection,
|
|
172
174
|
V as getCookie,
|
|
173
175
|
U as getCookies,
|
|
174
176
|
Ys as getDate,
|
|
175
177
|
em as getElement,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
us as getRangesSelection,
|
|
178
|
+
Rr as getOperatingSystem,
|
|
179
|
+
ps as getRangesSelection,
|
|
179
180
|
sm as getRetry,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
181
|
+
Ut as getSpeechRecognition,
|
|
182
|
+
gs as getTimeFromSeconds,
|
|
183
|
+
As as getUrlSearchParams,
|
|
184
|
+
uo as isHotkeyMatch,
|
|
184
185
|
pm as isTarget,
|
|
185
186
|
Zs as legacyCopyToClipboard,
|
|
186
|
-
|
|
187
|
+
eo as mapGamepadToXbox360Controller,
|
|
187
188
|
w as removeCookie,
|
|
188
189
|
W as removeCookieItem,
|
|
189
190
|
Us as scrollTo,
|
|
190
191
|
H as setCookie,
|
|
191
192
|
G as setCookieItem,
|
|
192
|
-
|
|
193
|
-
zt as stateHistoryReducer,
|
|
193
|
+
Qt as stateHistoryReducer,
|
|
194
194
|
om as target,
|
|
195
195
|
rm as targetSymbol,
|
|
196
196
|
fm as throttle,
|
|
@@ -198,131 +198,131 @@ export {
|
|
|
198
198
|
i as useAsync,
|
|
199
199
|
n as useBattery,
|
|
200
200
|
l as useBluetooth,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
T as useBoolean,
|
|
202
|
+
v as useBreakpoints,
|
|
203
|
+
h as useBrowserLanguage,
|
|
204
204
|
_ as useClickOutside,
|
|
205
205
|
M as useClipboard,
|
|
206
206
|
L as useConst,
|
|
207
207
|
Q as useCookie,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
208
|
+
Z as useCookies,
|
|
209
|
+
q as useCopy,
|
|
210
|
+
Y as useCounter,
|
|
211
|
+
ee as useCssVar,
|
|
212
|
+
re as useDebounceCallback,
|
|
213
|
+
se as useDebounceValue,
|
|
214
|
+
pe as useDefault,
|
|
215
|
+
fe as useDeviceMotion,
|
|
216
|
+
ie as useDeviceOrientation,
|
|
217
|
+
ne as useDevicePixelRatio,
|
|
218
|
+
le as useDidUpdate,
|
|
219
219
|
Te as useDisclosure,
|
|
220
220
|
Ee as useDisplayMedia,
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
221
|
+
Pe as useDocumentEvent,
|
|
222
|
+
Re as useDocumentTitle,
|
|
223
|
+
Oe as useDocumentVisibility,
|
|
224
|
+
ke as useDoubleClick,
|
|
225
|
+
Ae as useDropZone,
|
|
226
|
+
De as useElementSize,
|
|
227
|
+
be as useEvent,
|
|
228
|
+
Ne as useEventListener,
|
|
229
|
+
Be as useEventSource,
|
|
230
|
+
Fe as useEyeDropper,
|
|
231
|
+
Ue as useFavicon,
|
|
232
|
+
We as useField,
|
|
233
|
+
Ge as useFileDialog,
|
|
234
|
+
ze as useFocus,
|
|
235
|
+
Ze as useFps,
|
|
236
|
+
qe as useFul,
|
|
237
|
+
Ye as useFullscreen,
|
|
238
|
+
oo as useGamepad,
|
|
239
|
+
to as useGeolocation,
|
|
240
|
+
mo as useHash,
|
|
241
|
+
fo as useHotkeys,
|
|
242
|
+
io as useHover,
|
|
243
|
+
no as useIdle,
|
|
244
|
+
lo as useImage,
|
|
245
245
|
To as useInfiniteScroll,
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
Eo as useIntersectionObserver,
|
|
247
|
+
Co as useInterval,
|
|
248
|
+
Io as useIsFirstRender,
|
|
249
|
+
yo as useIsomorphicLayoutEffect,
|
|
250
250
|
ho as useKeyPress,
|
|
251
|
-
|
|
251
|
+
_o as useKeyPressEvent,
|
|
252
252
|
vo as useKeyboard,
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
253
|
+
Mo as useKeysPressed,
|
|
254
|
+
Lo as useLastChanged,
|
|
255
|
+
Ko as useLatest,
|
|
256
|
+
Vo as useLess,
|
|
257
|
+
wo as useList,
|
|
258
|
+
Ho as useLocalStorage,
|
|
259
|
+
Qo as useLockCallback,
|
|
260
|
+
Xo as useLogger,
|
|
261
|
+
jo as useLongPress,
|
|
262
|
+
Jo as useMap,
|
|
263
|
+
$o as useMeasure,
|
|
264
|
+
or as useMediaQuery,
|
|
265
|
+
tr as useMemory,
|
|
266
|
+
mr as useMount,
|
|
267
|
+
ur as useMouse,
|
|
268
|
+
xr as useMutation,
|
|
269
|
+
ar as useMutationObserver,
|
|
270
|
+
lr as useNetwork,
|
|
271
271
|
Tr as useOffsetPagination,
|
|
272
272
|
Er as useOnce,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
Pr as useOnline,
|
|
274
|
+
Ir as useOperatingSystem,
|
|
275
|
+
yr as useOptimistic,
|
|
276
276
|
vr as useOrientation,
|
|
277
277
|
hr as useOtpCredential,
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
278
|
+
_r as usePageLeave,
|
|
279
|
+
Lr as usePaint,
|
|
280
|
+
Kr as useParallax,
|
|
281
|
+
Vr as usePerformanceObserver,
|
|
282
|
+
wr as usePermission,
|
|
283
|
+
Hr as usePointerLock,
|
|
284
|
+
Qr as usePostMessage,
|
|
285
|
+
Xr as usePreferredColorScheme,
|
|
286
|
+
jr as usePreferredContrast,
|
|
287
|
+
Jr as usePreferredDark,
|
|
288
|
+
$r as usePreferredLanguages,
|
|
289
|
+
ot as usePreferredReducedMotion,
|
|
290
|
+
tt as usePrevious,
|
|
291
|
+
mt as useQuery,
|
|
292
|
+
ut as useQueue,
|
|
293
|
+
xt as useRaf,
|
|
294
|
+
at as useRafValue,
|
|
295
|
+
ct as useRefState,
|
|
296
|
+
St as useRenderCount,
|
|
297
|
+
gt as useRenderInfo,
|
|
298
|
+
dt as useRerender,
|
|
299
|
+
Ct as useResizeObserver,
|
|
300
|
+
It as useScreenOrientation,
|
|
301
|
+
kt as useScript,
|
|
302
|
+
At as useScroll,
|
|
303
|
+
Dt as useScrollIntoView,
|
|
304
|
+
bt as useScrollTo,
|
|
305
|
+
Nt as useSessionStorage,
|
|
306
|
+
Bt as useSet,
|
|
307
|
+
Ft as useShare,
|
|
308
|
+
wt as useSpeechRecognition,
|
|
309
|
+
Ht as useSpeechSynthesis,
|
|
310
|
+
zt as useStateHistory,
|
|
311
|
+
Zt as useStep,
|
|
312
|
+
qt as useSticky,
|
|
313
|
+
Yt as useStopwatch,
|
|
314
|
+
rs as useStorage,
|
|
315
|
+
ss as useTextDirection,
|
|
316
|
+
us as useTextSelection,
|
|
317
|
+
xs as useThrottleCallback,
|
|
318
|
+
as as useThrottleValue,
|
|
319
|
+
cs as useTime,
|
|
320
|
+
Ss as useTimeout,
|
|
321
321
|
Es as useTimer,
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
322
|
+
Ps as useToggle,
|
|
323
|
+
Rs as useUnmount,
|
|
324
|
+
Os as useUrlSearchParams,
|
|
325
|
+
Ds as useVibrate,
|
|
326
326
|
bs as useWakeLock,
|
|
327
327
|
Ns as useWebSocket,
|
|
328
328
|
Bs as useWindowEvent,
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -30,7 +30,6 @@ export interface UseCookieOptions<Value> {
|
|
|
30
30
|
path?: string;
|
|
31
31
|
sameSite?: 'Lax' | 'None' | 'Strict';
|
|
32
32
|
secure?: boolean;
|
|
33
|
-
updateOnChange?: boolean;
|
|
34
33
|
deserializer?: (value: string) => Value;
|
|
35
34
|
serializer?: (value: Value) => string;
|
|
36
35
|
}
|
|
@@ -44,6 +43,14 @@ export declare const dispatchCookieEvent: () => boolean;
|
|
|
44
43
|
export declare const setCookieItem: (key: string, value: string, options?: SetCookieParams) => void;
|
|
45
44
|
export declare const removeCookieItem: (key: string, options?: RemoveCookieParams) => void;
|
|
46
45
|
export declare const getCookie: (key: string) => string | undefined;
|
|
46
|
+
export interface UseCookie {
|
|
47
|
+
<Value>(key: string, options: UseCookieOptions<Value> & {
|
|
48
|
+
initialValue: UseCookieInitialValue<Value>;
|
|
49
|
+
}): UseCookieReturn<Value>;
|
|
50
|
+
<Value>(key: string, options?: UseCookieOptions<Value>): UseCookieReturn<Value | undefined>;
|
|
51
|
+
<Value>(key: string, initialValue: UseCookieInitialValue<Value>): UseCookieReturn<Value>;
|
|
52
|
+
<Value>(key: string): UseCookieReturn<Value | undefined>;
|
|
53
|
+
}
|
|
47
54
|
/**
|
|
48
55
|
* @name useCookie
|
|
49
56
|
* @description - Hook that manages cookie value
|
|
@@ -55,11 +62,16 @@ export declare const getCookie: (key: string) => string | undefined;
|
|
|
55
62
|
* @param {UseCookieInitialValue<Value>} [initialValue] The initial value of the cookie
|
|
56
63
|
* @returns {UseCookieReturn<Value>} The value and the set function
|
|
57
64
|
*
|
|
65
|
+
* @overload
|
|
66
|
+
* @template Value The type of the cookie value
|
|
67
|
+
* @param {string} key The key of the cookie
|
|
68
|
+
* @param {UseCookieOptions<Value>} options The options object
|
|
69
|
+
* @param {UseCookieInitialValue<Value>} [options.initialValue] The initial value of the cookie
|
|
70
|
+
* @param {(value: string) => Value} [options.deserializer] The deserializer function to be invoked
|
|
71
|
+
* @param {(value: Value) => string} [options.serializer] The serializer function to be invoked
|
|
72
|
+
* @returns {UseCookieReturn<Value | undefined>} The value and the set function
|
|
73
|
+
*
|
|
58
74
|
* @example
|
|
59
75
|
* const { value, set, remove } = useCookie('key', 'value');
|
|
60
76
|
*/
|
|
61
|
-
export declare const useCookie:
|
|
62
|
-
value: Value | undefined;
|
|
63
|
-
set: (value: Value, params?: SetCookieParams) => void;
|
|
64
|
-
remove: (params?: RemoveCookieParams) => void;
|
|
65
|
-
};
|
|
77
|
+
export declare const useCookie: UseCookie;
|