@siberiacancode/reactuse 0.2.9 → 0.2.11
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/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/useShare/useShare.cjs +1 -1
- package/dist/cjs/hooks/useShare/useShare.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/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/useShare/useShare.mjs +9 -9
- package/dist/esm/hooks/useShare/useShare.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 +72 -0
- package/dist/esm/hooks/useUrlSearchParam/useUrlSearchParam.mjs.map +1 -0
- package/dist/esm/hooks/useUrlSearchParams/useUrlSearchParams.mjs +43 -58
- package/dist/esm/hooks/useUrlSearchParams/useUrlSearchParams.mjs.map +1 -1
- package/dist/esm/index.mjs +251 -251
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useCookie/useCookie.d.ts +18 -6
- package/dist/types/hooks/useCookies/useCookies.d.ts +10 -10
- package/dist/types/hooks/useShare/useShare.d.ts +2 -2
- package/dist/types/hooks/useUrlSearchParam/useUrlSearchParam.d.ts +70 -0
- package/dist/types/hooks/useUrlSearchParams/useUrlSearchParams.d.ts +36 -13
- package/package.json +1 -1
package/dist/esm/index.mjs
CHANGED
|
@@ -6,129 +6,130 @@ import { useAsync as a } 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
8
|
import { useBoolean as T } from "./hooks/useBoolean/useBoolean.mjs";
|
|
9
|
-
import { BREAKPOINTS_ANT_DESIGN as
|
|
9
|
+
import { BREAKPOINTS_ANT_DESIGN as g, BREAKPOINTS_BOOTSTRAP_V5 as P, BREAKPOINTS_MANTINE as d, 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 A, useBreakpoints as k } from "./hooks/useBreakpoints/useBreakpoints.mjs";
|
|
10
10
|
import { useBrowserLanguage as _ } from "./hooks/useBrowserLanguage/useBrowserLanguage.mjs";
|
|
11
11
|
import { useClickOutside as D } from "./hooks/useClickOutside/useClickOutside.mjs";
|
|
12
12
|
import { useClipboard as N } 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 V, getCookie as F, 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
|
|
26
|
-
import { useDisclosure as
|
|
27
|
-
import { useDisplayMedia as
|
|
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
|
|
52
|
-
import { useInfiniteScroll as
|
|
53
|
-
import { useIntersectionObserver as
|
|
54
|
-
import { useInterval as
|
|
55
|
-
import { useIsFirstRender as
|
|
56
|
-
import { useIsomorphicLayoutEffect as
|
|
57
|
-
import { useKeyboard as
|
|
58
|
-
import { useKeyPress as
|
|
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
|
|
78
|
-
import { useOffsetPagination as
|
|
79
|
-
import { useOnce as
|
|
80
|
-
import { useOnline as
|
|
81
|
-
import { getOperatingSystem as
|
|
82
|
-
import { useOptimistic as
|
|
83
|
-
import { useOrientation as
|
|
84
|
-
import { useOtpCredential as
|
|
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
|
|
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 ae } 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
|
+
import { useDisclosure as Te } from "./hooks/useDisclosure/useDisclosure.mjs";
|
|
27
|
+
import { useDisplayMedia as ge } from "./hooks/useDisplayMedia/useDisplayMedia.mjs";
|
|
28
|
+
import { useDocumentEvent as de } 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 Ae } from "./hooks/useDoubleClick/useDoubleClick.mjs";
|
|
32
|
+
import { useDropZone as ve } from "./hooks/useDropZone/useDropZone.mjs";
|
|
33
|
+
import { useElementSize as he } from "./hooks/useElementSize/useElementSize.mjs";
|
|
34
|
+
import { useEvent as Me } from "./hooks/useEvent/useEvent.mjs";
|
|
35
|
+
import { useEventListener as be } from "./hooks/useEventListener/useEventListener.mjs";
|
|
36
|
+
import { useEventSource as Be } from "./hooks/useEventSource/useEventSource.mjs";
|
|
37
|
+
import { useEyeDropper as Ve } 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 ao } 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
|
+
import { useInfiniteScroll as To } from "./hooks/useInfiniteScroll/useInfiniteScroll.mjs";
|
|
53
|
+
import { useIntersectionObserver as go } 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
|
+
import { useKeyboard as ko } from "./hooks/useKeyboard/useKeyboard.mjs";
|
|
58
|
+
import { useKeyPress as _o } from "./hooks/useKeyPress/useKeyPress.mjs";
|
|
59
|
+
import { useKeyPressEvent as Do } from "./hooks/useKeyPressEvent/useKeyPressEvent.mjs";
|
|
60
|
+
import { useKeysPressed as No } 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 Fo } 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 ir } from "./hooks/useMutationObserver/useMutationObserver.mjs";
|
|
77
|
+
import { getConnection as cr, useNetwork as lr } from "./hooks/useNetwork/useNetwork.mjs";
|
|
78
|
+
import { useOffsetPagination as Tr } from "./hooks/useOffsetPagination/useOffsetPagination.mjs";
|
|
79
|
+
import { useOnce as gr } from "./hooks/useOnce/useOnce.mjs";
|
|
80
|
+
import { useOnline as dr } 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
|
+
import { useOrientation as kr } from "./hooks/useOrientation/useOrientation.mjs";
|
|
84
|
+
import { useOtpCredential as _r } from "./hooks/useOtpCredential/useOtpCredential.mjs";
|
|
85
|
+
import { usePageLeave as Dr } from "./hooks/usePageLeave/usePageLeave.mjs";
|
|
86
|
+
import { Paint as Nr, Pointer as br, usePaint as Lr } from "./hooks/usePaint/usePaint.mjs";
|
|
87
|
+
import { useParallax as Kr } from "./hooks/useParallax/useParallax.mjs";
|
|
88
|
+
import { usePerformanceObserver as Fr } 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 it } 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
104
|
import { useRenderInfo as Et } from "./hooks/useRenderInfo/useRenderInfo.mjs";
|
|
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 Es, useTimer as
|
|
129
|
-
import { useToggle as
|
|
130
|
-
import { useUnmount as
|
|
131
|
-
import { URL_SEARCH_PARAMS_EVENT as
|
|
105
|
+
import { useRerender as Pt } 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 At } from "./hooks/useScript/useScript.mjs";
|
|
109
|
+
import { useScroll as vt } from "./hooks/useScroll/useScroll.mjs";
|
|
110
|
+
import { useScrollIntoView as ht } from "./hooks/useScrollIntoView/useScrollIntoView.mjs";
|
|
111
|
+
import { useScrollTo as Mt } from "./hooks/useScrollTo/useScrollTo.mjs";
|
|
112
|
+
import { useSessionStorage as bt } from "./hooks/useSessionStorage/useSessionStorage.mjs";
|
|
113
|
+
import { useSet as Bt } from "./hooks/useSet/useSet.mjs";
|
|
114
|
+
import { useShare as Vt } 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 is } 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 Es, useTimer as gs } from "./hooks/useTimer/useTimer.mjs";
|
|
129
|
+
import { useToggle as ds } from "./hooks/useToggle/useToggle.mjs";
|
|
130
|
+
import { useUnmount as Rs } from "./hooks/useUnmount/useUnmount.mjs";
|
|
131
|
+
import { URL_SEARCH_PARAMS_EVENT as Os, createQueryString as ys, dispatchUrlSearchParamsEvent as As, getUrlSearchParams as ks, useUrlSearchParam as vs } from "./hooks/useUrlSearchParam/useUrlSearchParam.mjs";
|
|
132
|
+
import { useUrlSearchParams as hs } from "./hooks/useUrlSearchParams/useUrlSearchParams.mjs";
|
|
132
133
|
import { useVibrate as Ms } from "./hooks/useVibrate/useVibrate.mjs";
|
|
133
134
|
import { useWakeLock as bs } from "./hooks/useWakeLock/useWakeLock.mjs";
|
|
134
135
|
import { useWebSocket as Bs } from "./hooks/useWebSocket/useWebSocket.mjs";
|
|
@@ -145,7 +146,7 @@ import { getRetry as pm } from "./utils/helpers/getRetry.mjs";
|
|
|
145
146
|
import { isTarget as fm } from "./utils/helpers/isTarget.mjs";
|
|
146
147
|
import { throttle as am } from "./utils/helpers/throttle.mjs";
|
|
147
148
|
export {
|
|
148
|
-
|
|
149
|
+
g as BREAKPOINTS_ANT_DESIGN,
|
|
149
150
|
P as BREAKPOINTS_BOOTSTRAP_V5,
|
|
150
151
|
d as BREAKPOINTS_MANTINE,
|
|
151
152
|
C as BREAKPOINTS_MASTER_CSS,
|
|
@@ -155,44 +156,42 @@ export {
|
|
|
155
156
|
y as BREAKPOINTS_SEMANTIC,
|
|
156
157
|
A as BREAKPOINTS_TAILWIND,
|
|
157
158
|
K as COOKIE_EVENT,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
159
|
+
Nr as Paint,
|
|
160
|
+
br as Pointer,
|
|
161
|
+
yt as SCRIPT_STATUS_ATTRIBUTE_NAME,
|
|
162
|
+
es as STORAGE_EVENT,
|
|
163
|
+
Os as URL_SEARCH_PARAMS_EVENT,
|
|
163
164
|
X as clearCookies,
|
|
164
165
|
js as copy,
|
|
165
166
|
r as createContext,
|
|
166
|
-
|
|
167
|
+
ys as createQueryString,
|
|
167
168
|
s as createReactiveContext,
|
|
168
169
|
p as createStore,
|
|
169
170
|
Ys as debounce,
|
|
170
171
|
V as dispatchCookieEvent,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
os as dispatchStorageEvent,
|
|
173
|
+
As as dispatchUrlSearchParamsEvent,
|
|
174
|
+
cr as getConnection,
|
|
174
175
|
F as getCookie,
|
|
175
176
|
U as getCookies,
|
|
176
177
|
em as getDate,
|
|
177
178
|
rm as getElement,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
us as getRangesSelection,
|
|
179
|
+
Rr as getOperatingSystem,
|
|
180
|
+
ps as getRangesSelection,
|
|
181
181
|
pm as getRetry,
|
|
182
|
-
|
|
182
|
+
Ut as getSpeechRecognition,
|
|
183
183
|
Es as getTimeFromSeconds,
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
ks as getUrlSearchParams,
|
|
185
|
+
uo as isHotkeyMatch,
|
|
186
186
|
fm as isTarget,
|
|
187
187
|
qs as legacyCopyToClipboard,
|
|
188
|
-
|
|
188
|
+
eo as mapGamepadToXbox360Controller,
|
|
189
189
|
w as removeCookie,
|
|
190
190
|
W as removeCookieItem,
|
|
191
191
|
Ws as scrollTo,
|
|
192
192
|
H as setCookie,
|
|
193
193
|
G as setCookieItem,
|
|
194
|
-
|
|
195
|
-
zt as stateHistoryReducer,
|
|
194
|
+
Qt as stateHistoryReducer,
|
|
196
195
|
tm as target,
|
|
197
196
|
sm as targetSymbol,
|
|
198
197
|
am as throttle,
|
|
@@ -207,122 +206,123 @@ export {
|
|
|
207
206
|
N as useClipboard,
|
|
208
207
|
L as useConst,
|
|
209
208
|
Q as useCookie,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
209
|
+
Z as useCookies,
|
|
210
|
+
q as useCopy,
|
|
211
|
+
Y as useCounter,
|
|
212
|
+
ee as useCssVar,
|
|
213
|
+
re as useDebounceCallback,
|
|
214
|
+
se as useDebounceValue,
|
|
215
|
+
pe as useDefault,
|
|
216
|
+
fe as useDeviceMotion,
|
|
217
|
+
ae as useDeviceOrientation,
|
|
218
|
+
ne as useDevicePixelRatio,
|
|
219
|
+
le as useDidUpdate,
|
|
220
|
+
Te as useDisclosure,
|
|
221
|
+
ge as useDisplayMedia,
|
|
222
|
+
de as useDocumentEvent,
|
|
223
|
+
Re as useDocumentTitle,
|
|
224
|
+
Oe as useDocumentVisibility,
|
|
225
|
+
Ae as useDoubleClick,
|
|
226
|
+
ve as useDropZone,
|
|
227
|
+
he as useElementSize,
|
|
228
|
+
Me as useEvent,
|
|
229
|
+
be as useEventListener,
|
|
230
|
+
Be as useEventSource,
|
|
231
|
+
Ve as useEyeDropper,
|
|
232
|
+
Ue as useFavicon,
|
|
233
|
+
We as useField,
|
|
234
|
+
Ge as useFileDialog,
|
|
235
|
+
ze as useFocus,
|
|
236
|
+
Ze as useFps,
|
|
237
|
+
qe as useFul,
|
|
238
|
+
Ye as useFullscreen,
|
|
239
|
+
oo as useGamepad,
|
|
240
|
+
to as useGeolocation,
|
|
241
|
+
mo as useHash,
|
|
242
|
+
fo as useHotkeys,
|
|
243
|
+
ao as useHover,
|
|
244
|
+
no as useIdle,
|
|
245
|
+
lo as useImage,
|
|
246
|
+
To as useInfiniteScroll,
|
|
247
|
+
go as useIntersectionObserver,
|
|
248
|
+
Co as useInterval,
|
|
249
|
+
Io as useIsFirstRender,
|
|
250
|
+
yo as useIsomorphicLayoutEffect,
|
|
251
|
+
_o as useKeyPress,
|
|
252
|
+
Do as useKeyPressEvent,
|
|
253
|
+
ko as useKeyboard,
|
|
254
|
+
No as useKeysPressed,
|
|
255
|
+
Lo as useLastChanged,
|
|
256
|
+
Ko as useLatest,
|
|
257
|
+
Fo as useLess,
|
|
258
|
+
wo as useList,
|
|
259
|
+
Ho as useLocalStorage,
|
|
260
|
+
Qo as useLockCallback,
|
|
261
|
+
Xo as useLogger,
|
|
262
|
+
jo as useLongPress,
|
|
263
|
+
Jo as useMap,
|
|
264
|
+
$o as useMeasure,
|
|
265
|
+
or as useMediaQuery,
|
|
266
|
+
tr as useMemory,
|
|
267
|
+
mr as useMount,
|
|
268
|
+
ur as useMouse,
|
|
269
|
+
xr as useMutation,
|
|
270
|
+
ir as useMutationObserver,
|
|
271
|
+
lr as useNetwork,
|
|
272
|
+
Tr as useOffsetPagination,
|
|
273
|
+
gr as useOnce,
|
|
274
|
+
dr as useOnline,
|
|
275
|
+
Ir as useOperatingSystem,
|
|
276
|
+
yr as useOptimistic,
|
|
277
|
+
kr as useOrientation,
|
|
278
|
+
_r as useOtpCredential,
|
|
279
|
+
Dr as usePageLeave,
|
|
280
|
+
Lr as usePaint,
|
|
281
|
+
Kr as useParallax,
|
|
282
|
+
Fr as usePerformanceObserver,
|
|
283
|
+
wr as usePermission,
|
|
284
|
+
Hr as usePointerLock,
|
|
285
|
+
Qr as usePostMessage,
|
|
286
|
+
Xr as usePreferredColorScheme,
|
|
287
|
+
jr as usePreferredContrast,
|
|
288
|
+
Jr as usePreferredDark,
|
|
289
|
+
$r as usePreferredLanguages,
|
|
290
|
+
ot as usePreferredReducedMotion,
|
|
291
|
+
tt as usePrevious,
|
|
292
|
+
mt as useQuery,
|
|
293
|
+
ut as useQueue,
|
|
294
|
+
xt as useRaf,
|
|
295
|
+
it as useRafValue,
|
|
296
|
+
ct as useRefState,
|
|
297
|
+
St as useRenderCount,
|
|
299
298
|
Et as useRenderInfo,
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
299
|
+
Pt as useRerender,
|
|
300
|
+
Ct as useResizeObserver,
|
|
301
|
+
It as useScreenOrientation,
|
|
302
|
+
At as useScript,
|
|
303
|
+
vt as useScroll,
|
|
304
|
+
ht as useScrollIntoView,
|
|
305
|
+
Mt as useScrollTo,
|
|
306
|
+
bt as useSessionStorage,
|
|
307
|
+
Bt as useSet,
|
|
308
|
+
Vt as useShare,
|
|
309
|
+
wt as useSpeechRecognition,
|
|
310
|
+
Ht as useSpeechSynthesis,
|
|
311
|
+
zt as useStateHistory,
|
|
312
|
+
Zt as useStep,
|
|
313
|
+
qt as useSticky,
|
|
314
|
+
Yt as useStopwatch,
|
|
315
|
+
rs as useStorage,
|
|
316
|
+
ss as useTextDirection,
|
|
317
|
+
us as useTextSelection,
|
|
318
|
+
xs as useThrottleCallback,
|
|
319
|
+
is as useThrottleValue,
|
|
320
|
+
cs as useTime,
|
|
321
|
+
Ss as useTimeout,
|
|
322
|
+
gs as useTimer,
|
|
323
|
+
ds as useToggle,
|
|
324
|
+
Rs as useUnmount,
|
|
325
|
+
vs as useUrlSearchParam,
|
|
326
326
|
hs as useUrlSearchParams,
|
|
327
327
|
Ms as useVibrate,
|
|
328
328
|
bs as useWakeLock,
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -125,6 +125,7 @@ export * from './useTimeout/useTimeout';
|
|
|
125
125
|
export * from './useTimer/useTimer';
|
|
126
126
|
export * from './useToggle/useToggle';
|
|
127
127
|
export * from './useUnmount/useUnmount';
|
|
128
|
+
export * from './useUrlSearchParam/useUrlSearchParam';
|
|
128
129
|
export * from './useUrlSearchParams/useUrlSearchParams';
|
|
129
130
|
export * from './useVibrate/useVibrate';
|
|
130
131
|
export * from './useWakeLock/useWakeLock';
|
|
@@ -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;
|