@siberiacancode/reactuse 0.2.10 → 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/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/useDropZone/useDropZone.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/useStep/useStep.cjs.map +1 -1
- package/dist/cjs/hooks/useStorage/useStorage.cjs.map +1 -1
- package/dist/cjs/hooks/useUrlSearchParam/useUrlSearchParam.cjs +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/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/useDropZone/useDropZone.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/useStep/useStep.mjs.map +1 -1
- package/dist/esm/hooks/useStorage/useStorage.mjs.map +1 -1
- package/dist/esm/hooks/useUrlSearchParam/useUrlSearchParam.mjs +60 -15
- package/dist/esm/hooks/useUrlSearchParam/useUrlSearchParam.mjs.map +1 -1
- package/dist/esm/hooks/useUrlSearchParams/useUrlSearchParams.mjs.map +1 -1
- package/dist/esm/index.mjs +131 -129
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useShare/useShare.d.ts +2 -2
- package/dist/types/hooks/useUrlSearchParam/useUrlSearchParam.d.ts +4 -4
- package/package.json +89 -89
package/dist/esm/index.mjs
CHANGED
|
@@ -2,16 +2,16 @@ import { createContext as r } from "./helpers/createContext/createContext.mjs";
|
|
|
2
2
|
import { createReactiveContext as s } from "./helpers/createReactiveContext/createReactiveContext.mjs";
|
|
3
3
|
import { createStore as p } from "./helpers/createStore/createStore.mjs";
|
|
4
4
|
import { useActiveElement as f } from "./hooks/useActiveElement/useActiveElement.mjs";
|
|
5
|
-
import { useAsync as
|
|
5
|
+
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
|
|
10
|
-
import { useBrowserLanguage as
|
|
11
|
-
import { useClickOutside as
|
|
12
|
-
import { useClipboard 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
|
+
import { useBrowserLanguage as _ } from "./hooks/useBrowserLanguage/useBrowserLanguage.mjs";
|
|
11
|
+
import { useClickOutside as D } from "./hooks/useClickOutside/useClickOutside.mjs";
|
|
12
|
+
import { useClipboard as N } from "./hooks/useClipboard/useClipboard.mjs";
|
|
13
13
|
import { useConst as L } from "./hooks/useConst/useConst.mjs";
|
|
14
|
-
import { COOKIE_EVENT as K, dispatchCookieEvent as
|
|
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
15
|
import { clearCookies as X, useCookies as Z } from "./hooks/useCookies/useCookies.mjs";
|
|
16
16
|
import { useCopy as q } from "./hooks/useCopy/useCopy.mjs";
|
|
17
17
|
import { useCounter as Y } from "./hooks/useCounter/useCounter.mjs";
|
|
@@ -20,21 +20,21 @@ import { useDebounceCallback as re } from "./hooks/useDebounceCallback/useDeboun
|
|
|
20
20
|
import { useDebounceValue as se } from "./hooks/useDebounceValue/useDebounceValue.mjs";
|
|
21
21
|
import { useDefault as pe } from "./hooks/useDefault/useDefault.mjs";
|
|
22
22
|
import { useDeviceMotion as fe } from "./hooks/useDeviceMotion/useDeviceMotion.mjs";
|
|
23
|
-
import { useDeviceOrientation as
|
|
23
|
+
import { useDeviceOrientation as ae } from "./hooks/useDeviceOrientation/useDeviceOrientation.mjs";
|
|
24
24
|
import { useDevicePixelRatio as ne } from "./hooks/useDevicePixelRatio/useDevicePixelRatio.mjs";
|
|
25
25
|
import { useDidUpdate as le } from "./hooks/useDidUpdate/useDidUpdate.mjs";
|
|
26
26
|
import { useDisclosure as Te } from "./hooks/useDisclosure/useDisclosure.mjs";
|
|
27
|
-
import { useDisplayMedia as
|
|
28
|
-
import { useDocumentEvent as
|
|
27
|
+
import { useDisplayMedia as ge } from "./hooks/useDisplayMedia/useDisplayMedia.mjs";
|
|
28
|
+
import { useDocumentEvent as de } from "./hooks/useDocumentEvent/useDocumentEvent.mjs";
|
|
29
29
|
import { useDocumentTitle as Re } from "./hooks/useDocumentTitle/useDocumentTitle.mjs";
|
|
30
30
|
import { useDocumentVisibility as Oe } from "./hooks/useDocumentVisibility/useDocumentVisibility.mjs";
|
|
31
|
-
import { useDoubleClick as
|
|
32
|
-
import { useDropZone as
|
|
33
|
-
import { useElementSize as
|
|
34
|
-
import { useEvent as
|
|
35
|
-
import { useEventListener as
|
|
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
36
|
import { useEventSource as Be } from "./hooks/useEventSource/useEventSource.mjs";
|
|
37
|
-
import { useEyeDropper as
|
|
37
|
+
import { useEyeDropper as Ve } from "./hooks/useEyeDropper/useEyeDropper.mjs";
|
|
38
38
|
import { useFavicon as Ue } from "./hooks/useFavicon/useFavicon.mjs";
|
|
39
39
|
import { useField as We } from "./hooks/useField/useField.mjs";
|
|
40
40
|
import { useFileDialog as Ge } from "./hooks/useFileDialog/useFileDialog.mjs";
|
|
@@ -46,21 +46,21 @@ import { mapGamepadToXbox360Controller as eo, useGamepad as oo } from "./hooks/u
|
|
|
46
46
|
import { useGeolocation as to } from "./hooks/useGeolocation/useGeolocation.mjs";
|
|
47
47
|
import { useHash as mo } from "./hooks/useHash/useHash.mjs";
|
|
48
48
|
import { isHotkeyMatch as uo, useHotkeys as fo } from "./hooks/useHotkeys/useHotkeys.mjs";
|
|
49
|
-
import { useHover as
|
|
49
|
+
import { useHover as ao } from "./hooks/useHover/useHover.mjs";
|
|
50
50
|
import { useIdle as no } from "./hooks/useIdle/useIdle.mjs";
|
|
51
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
|
|
53
|
+
import { useIntersectionObserver as go } from "./hooks/useIntersectionObserver/useIntersectionObserver.mjs";
|
|
54
54
|
import { useInterval as Co } from "./hooks/useInterval/useInterval.mjs";
|
|
55
55
|
import { useIsFirstRender as Io } from "./hooks/useIsFirstRender/useIsFirstRender.mjs";
|
|
56
56
|
import { useIsomorphicLayoutEffect as yo } from "./hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs";
|
|
57
|
-
import { useKeyboard as
|
|
58
|
-
import { useKeyPress as
|
|
59
|
-
import { useKeyPressEvent as
|
|
60
|
-
import { useKeysPressed as
|
|
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
61
|
import { useLastChanged as Lo } from "./hooks/useLastChanged/useLastChanged.mjs";
|
|
62
62
|
import { useLatest as Ko } from "./hooks/useLatest/useLatest.mjs";
|
|
63
|
-
import { useLess as
|
|
63
|
+
import { useLess as Fo } from "./hooks/useLess/useLess.mjs";
|
|
64
64
|
import { useList as wo } from "./hooks/useList/useList.mjs";
|
|
65
65
|
import { useLocalStorage as Ho } from "./hooks/useLocalStorage/useLocalStorage.mjs";
|
|
66
66
|
import { useLockCallback as Qo } from "./hooks/useLockCallback/useLockCallback.mjs";
|
|
@@ -73,19 +73,19 @@ import { useMemory as tr } from "./hooks/useMemory/useMemory.mjs";
|
|
|
73
73
|
import { useMount as mr } from "./hooks/useMount/useMount.mjs";
|
|
74
74
|
import { useMouse as ur } from "./hooks/useMouse/useMouse.mjs";
|
|
75
75
|
import { useMutation as xr } from "./hooks/useMutation/useMutation.mjs";
|
|
76
|
-
import { useMutationObserver as
|
|
76
|
+
import { useMutationObserver as ir } from "./hooks/useMutationObserver/useMutationObserver.mjs";
|
|
77
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
|
-
import { useOnce as
|
|
80
|
-
import { useOnline as
|
|
79
|
+
import { useOnce as gr } from "./hooks/useOnce/useOnce.mjs";
|
|
80
|
+
import { useOnline as dr } from "./hooks/useOnline/useOnline.mjs";
|
|
81
81
|
import { getOperatingSystem as Rr, useOperatingSystem as Ir } from "./hooks/useOperatingSystem/useOperatingSystem.mjs";
|
|
82
82
|
import { useOptimistic as yr } from "./hooks/useOptimistic/useOptimistic.mjs";
|
|
83
|
-
import { useOrientation as
|
|
84
|
-
import { useOtpCredential as
|
|
85
|
-
import { usePageLeave as
|
|
86
|
-
import { Paint as
|
|
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
87
|
import { useParallax as Kr } from "./hooks/useParallax/useParallax.mjs";
|
|
88
|
-
import { usePerformanceObserver as
|
|
88
|
+
import { usePerformanceObserver as Fr } from "./hooks/usePerformanceObserver/usePerformanceObserver.mjs";
|
|
89
89
|
import { usePermission as wr } from "./hooks/usePermission/usePermission.mjs";
|
|
90
90
|
import { usePointerLock as Hr } from "./hooks/usePointerLock/usePointerLock.mjs";
|
|
91
91
|
import { usePostMessage as Qr } from "./hooks/usePostMessage/usePostMessage.mjs";
|
|
@@ -98,20 +98,20 @@ import { usePrevious as tt } from "./hooks/usePrevious/usePrevious.mjs";
|
|
|
98
98
|
import { useQuery as mt } from "./hooks/useQuery/useQuery.mjs";
|
|
99
99
|
import { useQueue as ut } from "./hooks/useQueue/useQueue.mjs";
|
|
100
100
|
import { useRaf as xt } from "./hooks/useRaf/useRaf.mjs";
|
|
101
|
-
import { useRafValue as
|
|
101
|
+
import { useRafValue as it } from "./hooks/useRafValue/useRafValue.mjs";
|
|
102
102
|
import { useRefState as ct } from "./hooks/useRefState/useRefState.mjs";
|
|
103
103
|
import { useRenderCount as St } from "./hooks/useRenderCount/useRenderCount.mjs";
|
|
104
|
-
import { useRenderInfo as
|
|
105
|
-
import { useRerender as
|
|
104
|
+
import { useRenderInfo as Et } from "./hooks/useRenderInfo/useRenderInfo.mjs";
|
|
105
|
+
import { useRerender as Pt } from "./hooks/useRerender/useRerender.mjs";
|
|
106
106
|
import { useResizeObserver as Ct } from "./hooks/useResizeObserver/useResizeObserver.mjs";
|
|
107
107
|
import { useScreenOrientation as It } from "./hooks/useScreenOrientation/useScreenOrientation.mjs";
|
|
108
|
-
import { SCRIPT_STATUS_ATTRIBUTE_NAME as yt, useScript as
|
|
109
|
-
import { useScroll as
|
|
110
|
-
import { useScrollIntoView as
|
|
111
|
-
import { useScrollTo as
|
|
112
|
-
import { useSessionStorage as
|
|
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
113
|
import { useSet as Bt } from "./hooks/useSet/useSet.mjs";
|
|
114
|
-
import { useShare as
|
|
114
|
+
import { useShare as Vt } from "./hooks/useShare/useShare.mjs";
|
|
115
115
|
import { getSpeechRecognition as Ut, useSpeechRecognition as wt } from "./hooks/useSpeechRecognition/useSpeechRecognition.mjs";
|
|
116
116
|
import { useSpeechSynthesis as Ht } from "./hooks/useSpeechSynthesis/useSpeechSynthesis.mjs";
|
|
117
117
|
import { stateHistoryReducer as Qt, useStateHistory as zt } from "./hooks/useStateHistory/useStateHistory.mjs";
|
|
@@ -122,87 +122,88 @@ import { STORAGE_EVENT as es, dispatchStorageEvent as os, useStorage as rs } fro
|
|
|
122
122
|
import { useTextDirection as ss } from "./hooks/useTextDirection/useTextDirection.mjs";
|
|
123
123
|
import { getRangesSelection as ps, useTextSelection as us } from "./hooks/useTextSelection/useTextSelection.mjs";
|
|
124
124
|
import { useThrottleCallback as xs } from "./hooks/useThrottleCallback/useThrottleCallback.mjs";
|
|
125
|
-
import { useThrottleValue as
|
|
125
|
+
import { useThrottleValue as is } from "./hooks/useThrottleValue/useThrottleValue.mjs";
|
|
126
126
|
import { useTime as cs } from "./hooks/useTime/useTime.mjs";
|
|
127
127
|
import { useTimeout as Ss } from "./hooks/useTimeout/useTimeout.mjs";
|
|
128
|
-
import { getTimeFromSeconds as
|
|
129
|
-
import { useToggle as
|
|
128
|
+
import { getTimeFromSeconds as Es, useTimer as gs } from "./hooks/useTimer/useTimer.mjs";
|
|
129
|
+
import { useToggle as ds } from "./hooks/useToggle/useToggle.mjs";
|
|
130
130
|
import { useUnmount as Rs } from "./hooks/useUnmount/useUnmount.mjs";
|
|
131
|
-
import {
|
|
132
|
-
import {
|
|
133
|
-
import { useVibrate as
|
|
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";
|
|
133
|
+
import { useVibrate as Ms } from "./hooks/useVibrate/useVibrate.mjs";
|
|
134
134
|
import { useWakeLock as bs } from "./hooks/useWakeLock/useWakeLock.mjs";
|
|
135
|
-
import { useWebSocket as
|
|
136
|
-
import { useWindowEvent as
|
|
137
|
-
import { useWindowFocus as
|
|
138
|
-
import { scrollTo as
|
|
139
|
-
import { useWindowSize as
|
|
140
|
-
import { useWizard as
|
|
141
|
-
import { copy as
|
|
142
|
-
import { debounce as
|
|
143
|
-
import { getDate as
|
|
144
|
-
import { getElement as
|
|
145
|
-
import { getRetry as
|
|
146
|
-
import { isTarget as
|
|
147
|
-
import { throttle as
|
|
135
|
+
import { useWebSocket as Bs } from "./hooks/useWebSocket/useWebSocket.mjs";
|
|
136
|
+
import { useWindowEvent as Vs } from "./hooks/useWindowEvent/useWindowEvent.mjs";
|
|
137
|
+
import { useWindowFocus as Us } from "./hooks/useWindowFocus/useWindowFocus.mjs";
|
|
138
|
+
import { scrollTo as Ws, useWindowScroll as Hs } from "./hooks/useWindowScroll/useWindowScroll.mjs";
|
|
139
|
+
import { useWindowSize as Qs } from "./hooks/useWindowSize/useWindowSize.mjs";
|
|
140
|
+
import { useWizard as Xs } from "./hooks/useWizard/useWizard.mjs";
|
|
141
|
+
import { copy as js, legacyCopyToClipboard as qs } from "./utils/helpers/copy.mjs";
|
|
142
|
+
import { debounce as Ys } from "./utils/helpers/debounce.mjs";
|
|
143
|
+
import { getDate as em } from "./utils/helpers/getDate.mjs";
|
|
144
|
+
import { getElement as rm, target as tm, targetSymbol as sm } from "./utils/helpers/getElement.mjs";
|
|
145
|
+
import { getRetry as pm } from "./utils/helpers/getRetry.mjs";
|
|
146
|
+
import { isTarget as fm } from "./utils/helpers/isTarget.mjs";
|
|
147
|
+
import { throttle as am } from "./utils/helpers/throttle.mjs";
|
|
148
148
|
export {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
g as BREAKPOINTS_ANT_DESIGN,
|
|
150
|
+
P as BREAKPOINTS_BOOTSTRAP_V5,
|
|
151
|
+
d as BREAKPOINTS_MANTINE,
|
|
152
152
|
C as BREAKPOINTS_MASTER_CSS,
|
|
153
153
|
R as BREAKPOINTS_MATERIAL_UI,
|
|
154
154
|
I as BREAKPOINTS_PRIME_FLEX,
|
|
155
155
|
O as BREAKPOINTS_QUASAR_V2,
|
|
156
156
|
y as BREAKPOINTS_SEMANTIC,
|
|
157
|
-
|
|
157
|
+
A as BREAKPOINTS_TAILWIND,
|
|
158
158
|
K as COOKIE_EVENT,
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
Nr as Paint,
|
|
160
|
+
br as Pointer,
|
|
161
161
|
yt as SCRIPT_STATUS_ATTRIBUTE_NAME,
|
|
162
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
|
-
|
|
170
|
+
Ys as debounce,
|
|
171
|
+
V as dispatchCookieEvent,
|
|
171
172
|
os as dispatchStorageEvent,
|
|
172
|
-
|
|
173
|
+
As as dispatchUrlSearchParamsEvent,
|
|
173
174
|
cr as getConnection,
|
|
174
|
-
|
|
175
|
+
F as getCookie,
|
|
175
176
|
U as getCookies,
|
|
176
|
-
|
|
177
|
-
|
|
177
|
+
em as getDate,
|
|
178
|
+
rm as getElement,
|
|
178
179
|
Rr as getOperatingSystem,
|
|
179
180
|
ps as getRangesSelection,
|
|
180
|
-
|
|
181
|
+
pm as getRetry,
|
|
181
182
|
Ut as getSpeechRecognition,
|
|
182
|
-
|
|
183
|
-
|
|
183
|
+
Es as getTimeFromSeconds,
|
|
184
|
+
ks as getUrlSearchParams,
|
|
184
185
|
uo as isHotkeyMatch,
|
|
185
|
-
|
|
186
|
-
|
|
186
|
+
fm as isTarget,
|
|
187
|
+
qs as legacyCopyToClipboard,
|
|
187
188
|
eo as mapGamepadToXbox360Controller,
|
|
188
189
|
w as removeCookie,
|
|
189
190
|
W as removeCookieItem,
|
|
190
|
-
|
|
191
|
+
Ws as scrollTo,
|
|
191
192
|
H as setCookie,
|
|
192
193
|
G as setCookieItem,
|
|
193
194
|
Qt as stateHistoryReducer,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
tm as target,
|
|
196
|
+
sm as targetSymbol,
|
|
197
|
+
am as throttle,
|
|
197
198
|
f as useActiveElement,
|
|
198
|
-
|
|
199
|
+
a as useAsync,
|
|
199
200
|
n as useBattery,
|
|
200
201
|
l as useBluetooth,
|
|
201
202
|
T as useBoolean,
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
203
|
+
k as useBreakpoints,
|
|
204
|
+
_ as useBrowserLanguage,
|
|
205
|
+
D as useClickOutside,
|
|
206
|
+
N as useClipboard,
|
|
206
207
|
L as useConst,
|
|
207
208
|
Q as useCookie,
|
|
208
209
|
Z as useCookies,
|
|
@@ -213,21 +214,21 @@ export {
|
|
|
213
214
|
se as useDebounceValue,
|
|
214
215
|
pe as useDefault,
|
|
215
216
|
fe as useDeviceMotion,
|
|
216
|
-
|
|
217
|
+
ae as useDeviceOrientation,
|
|
217
218
|
ne as useDevicePixelRatio,
|
|
218
219
|
le as useDidUpdate,
|
|
219
220
|
Te as useDisclosure,
|
|
220
|
-
|
|
221
|
-
|
|
221
|
+
ge as useDisplayMedia,
|
|
222
|
+
de as useDocumentEvent,
|
|
222
223
|
Re as useDocumentTitle,
|
|
223
224
|
Oe as useDocumentVisibility,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
225
|
+
Ae as useDoubleClick,
|
|
226
|
+
ve as useDropZone,
|
|
227
|
+
he as useElementSize,
|
|
228
|
+
Me as useEvent,
|
|
229
|
+
be as useEventListener,
|
|
229
230
|
Be as useEventSource,
|
|
230
|
-
|
|
231
|
+
Ve as useEyeDropper,
|
|
231
232
|
Ue as useFavicon,
|
|
232
233
|
We as useField,
|
|
233
234
|
Ge as useFileDialog,
|
|
@@ -239,21 +240,21 @@ export {
|
|
|
239
240
|
to as useGeolocation,
|
|
240
241
|
mo as useHash,
|
|
241
242
|
fo as useHotkeys,
|
|
242
|
-
|
|
243
|
+
ao as useHover,
|
|
243
244
|
no as useIdle,
|
|
244
245
|
lo as useImage,
|
|
245
246
|
To as useInfiniteScroll,
|
|
246
|
-
|
|
247
|
+
go as useIntersectionObserver,
|
|
247
248
|
Co as useInterval,
|
|
248
249
|
Io as useIsFirstRender,
|
|
249
250
|
yo as useIsomorphicLayoutEffect,
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
_o as useKeyPress,
|
|
252
|
+
Do as useKeyPressEvent,
|
|
253
|
+
ko as useKeyboard,
|
|
254
|
+
No as useKeysPressed,
|
|
254
255
|
Lo as useLastChanged,
|
|
255
256
|
Ko as useLatest,
|
|
256
|
-
|
|
257
|
+
Fo as useLess,
|
|
257
258
|
wo as useList,
|
|
258
259
|
Ho as useLocalStorage,
|
|
259
260
|
Qo as useLockCallback,
|
|
@@ -266,19 +267,19 @@ export {
|
|
|
266
267
|
mr as useMount,
|
|
267
268
|
ur as useMouse,
|
|
268
269
|
xr as useMutation,
|
|
269
|
-
|
|
270
|
+
ir as useMutationObserver,
|
|
270
271
|
lr as useNetwork,
|
|
271
272
|
Tr as useOffsetPagination,
|
|
272
|
-
|
|
273
|
-
|
|
273
|
+
gr as useOnce,
|
|
274
|
+
dr as useOnline,
|
|
274
275
|
Ir as useOperatingSystem,
|
|
275
276
|
yr as useOptimistic,
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
kr as useOrientation,
|
|
278
|
+
_r as useOtpCredential,
|
|
279
|
+
Dr as usePageLeave,
|
|
279
280
|
Lr as usePaint,
|
|
280
281
|
Kr as useParallax,
|
|
281
|
-
|
|
282
|
+
Fr as usePerformanceObserver,
|
|
282
283
|
wr as usePermission,
|
|
283
284
|
Hr as usePointerLock,
|
|
284
285
|
Qr as usePostMessage,
|
|
@@ -291,20 +292,20 @@ export {
|
|
|
291
292
|
mt as useQuery,
|
|
292
293
|
ut as useQueue,
|
|
293
294
|
xt as useRaf,
|
|
294
|
-
|
|
295
|
+
it as useRafValue,
|
|
295
296
|
ct as useRefState,
|
|
296
297
|
St as useRenderCount,
|
|
297
|
-
|
|
298
|
-
|
|
298
|
+
Et as useRenderInfo,
|
|
299
|
+
Pt as useRerender,
|
|
299
300
|
Ct as useResizeObserver,
|
|
300
301
|
It as useScreenOrientation,
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
302
|
+
At as useScript,
|
|
303
|
+
vt as useScroll,
|
|
304
|
+
ht as useScrollIntoView,
|
|
305
|
+
Mt as useScrollTo,
|
|
306
|
+
bt as useSessionStorage,
|
|
306
307
|
Bt as useSet,
|
|
307
|
-
|
|
308
|
+
Vt as useShare,
|
|
308
309
|
wt as useSpeechRecognition,
|
|
309
310
|
Ht as useSpeechSynthesis,
|
|
310
311
|
zt as useStateHistory,
|
|
@@ -315,20 +316,21 @@ export {
|
|
|
315
316
|
ss as useTextDirection,
|
|
316
317
|
us as useTextSelection,
|
|
317
318
|
xs as useThrottleCallback,
|
|
318
|
-
|
|
319
|
+
is as useThrottleValue,
|
|
319
320
|
cs as useTime,
|
|
320
321
|
Ss as useTimeout,
|
|
321
|
-
|
|
322
|
-
|
|
322
|
+
gs as useTimer,
|
|
323
|
+
ds as useToggle,
|
|
323
324
|
Rs as useUnmount,
|
|
324
|
-
|
|
325
|
-
|
|
325
|
+
vs as useUrlSearchParam,
|
|
326
|
+
hs as useUrlSearchParams,
|
|
327
|
+
Ms as useVibrate,
|
|
326
328
|
bs as useWakeLock,
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
329
|
+
Bs as useWebSocket,
|
|
330
|
+
Vs as useWindowEvent,
|
|
331
|
+
Us as useWindowFocus,
|
|
332
|
+
Hs as useWindowScroll,
|
|
333
|
+
Qs as useWindowSize,
|
|
334
|
+
Xs as useWizard
|
|
333
335
|
};
|
|
334
336
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -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';
|
|
@@ -14,7 +14,7 @@ export interface UseShareReturn {
|
|
|
14
14
|
/** Whether the Web Share API is supported in the current environment */
|
|
15
15
|
supported: boolean;
|
|
16
16
|
/** Function to trigger the native share dialog */
|
|
17
|
-
|
|
17
|
+
trigger: (shareParams: ShareData) => Promise<void>;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* @name useShare
|
|
@@ -30,6 +30,6 @@ export interface UseShareReturn {
|
|
|
30
30
|
* const { share, supported } = useShare();
|
|
31
31
|
*/
|
|
32
32
|
export declare const useShare: (params?: UseShareParams) => {
|
|
33
|
-
|
|
33
|
+
trigger: (shareParams: ShareData) => Promise<void>;
|
|
34
34
|
supported: boolean;
|
|
35
35
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** The url search params mode type */
|
|
2
|
-
export type
|
|
2
|
+
export type UrlSearchParamMode = 'hash-params' | 'hash' | 'history';
|
|
3
3
|
/** The use url search param options type */
|
|
4
4
|
export interface UseUrlSearchParamOptions<Value> {
|
|
5
5
|
/** The initial value of the search param */
|
|
6
6
|
initialValue?: Value;
|
|
7
7
|
/** The mode to use for writing to the URL */
|
|
8
|
-
mode?:
|
|
8
|
+
mode?: UrlSearchParamMode;
|
|
9
9
|
/** The mode to use for writing to the URL */
|
|
10
10
|
write?: 'push' | 'replace';
|
|
11
11
|
/** The deserializer function to be invoked */
|
|
@@ -28,8 +28,8 @@ export interface UseUrlSearchParamReturn<Value> {
|
|
|
28
28
|
set: (value: Value, options?: UseUrlSearchParamsActionOptions) => void;
|
|
29
29
|
}
|
|
30
30
|
export declare const URL_SEARCH_PARAMS_EVENT = "reactuse-url-search-params-event";
|
|
31
|
-
export declare const getUrlSearchParams: (mode?:
|
|
32
|
-
export declare const createQueryString: (searchParams: URLSearchParams, mode:
|
|
31
|
+
export declare const getUrlSearchParams: (mode?: UrlSearchParamMode) => URLSearchParams;
|
|
32
|
+
export declare const createQueryString: (searchParams: URLSearchParams, mode: UrlSearchParamMode) => string;
|
|
33
33
|
export declare const dispatchUrlSearchParamsEvent: () => boolean;
|
|
34
34
|
export interface UseUrlSearchParam {
|
|
35
35
|
<Value>(key: string, options: UseUrlSearchParamOptions<Value> & {
|