foxact 0.2.43 → 0.2.45

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.
Files changed (87) hide show
  1. package/compose-context-provider/index.d.ts +5 -2
  2. package/context-state/index.cjs +1 -1
  3. package/context-state/index.d.ts +3 -1
  4. package/context-state/index.mjs +1 -1
  5. package/create-storage-hook/index.d.ts +2 -1
  6. package/create-storage-state-factory/index.d.ts +13 -2
  7. package/current-year/index.cjs +1 -1
  8. package/current-year/index.d.ts +3 -1
  9. package/current-year/index.mjs +1 -1
  10. package/email-protection/index.cjs +2 -0
  11. package/email-protection/index.d.ts +27 -0
  12. package/email-protection/index.mjs +2 -0
  13. package/is-safari/index.cjs +1 -0
  14. package/is-safari/index.d.ts +3 -0
  15. package/is-safari/index.mjs +1 -0
  16. package/noop/index.d.ts +2 -1
  17. package/open-new-tab/index.cjs +1 -0
  18. package/open-new-tab/index.d.ts +3 -0
  19. package/open-new-tab/index.mjs +1 -0
  20. package/package.json +146 -107
  21. package/sizes.json +1 -1
  22. package/typescript-happy-forward-ref/index.d.ts +2 -1
  23. package/use-abortable-effect/index.d.ts +5 -1
  24. package/use-composition-input/index.d.ts +2 -1
  25. package/use-error-boundary/index.cjs +1 -1
  26. package/use-error-boundary/index.mjs +1 -1
  27. package/use-fast-click/index.cjs +1 -0
  28. package/use-fast-click/index.d.ts +6 -0
  29. package/use-fast-click/index.mjs +1 -0
  30. package/use-is-online/index.cjs +1 -1
  31. package/use-is-online/index.d.ts +1 -1
  32. package/use-is-online/index.mjs +1 -1
  33. package/use-local-storage/index.d.ts +9 -3
  34. package/use-next-link/index.d.ts +5 -2
  35. package/use-react-router-enable-concurrent-navigation/index.d.ts +3 -1
  36. package/use-react-router-is-match/index.d.ts +5 -1
  37. package/use-session-storage/index.d.ts +9 -3
  38. package/use-singleton/index.d.ts +2 -1
  39. package/use-uncontrolled/index.d.ts +1 -1
  40. package/use-url-hash-state/index.d.ts +2 -1
  41. package/compose-context-provider/index.js +0 -1
  42. package/context-state/index.js +0 -1
  43. package/create-context-state/index.js +0 -1
  44. package/create-fixed-array/index.js +0 -1
  45. package/create-local-storage-state/index.js +0 -1
  46. package/create-session-storage-state/index.js +0 -1
  47. package/create-storage-hook/index.js +0 -1
  48. package/create-storage-state-factory/index.js +0 -1
  49. package/current-year/index.js +0 -2
  50. package/fetch-jsonp/index.js +0 -1
  51. package/invariant/index.js +0 -1
  52. package/no-ssr/index.js +0 -1
  53. package/noop/index.js +0 -1
  54. package/nullthrow/index.js +0 -1
  55. package/rem/index.js +0 -1
  56. package/request-idle-callback/index.js +0 -1
  57. package/types/index.js +0 -1
  58. package/typescript-happy-forward-ref/index.js +0 -1
  59. package/use/index.js +0 -1
  60. package/use-abortable-effect/index.js +0 -1
  61. package/use-array/index.js +0 -1
  62. package/use-clipboard/index.js +0 -1
  63. package/use-component-will-receive-update/index.js +0 -1
  64. package/use-composition-input/index.js +0 -1
  65. package/use-debounced-state/index.js +0 -1
  66. package/use-debounced-value/index.js +0 -1
  67. package/use-error-boundary/index.js +0 -1
  68. package/use-intersection/index.js +0 -1
  69. package/use-is-client/index.js +0 -1
  70. package/use-is-online/index.js +0 -2
  71. package/use-isomorphic-layout-effect/index.js +0 -1
  72. package/use-local-storage/index.js +0 -1
  73. package/use-map/index.js +0 -1
  74. package/use-media-query/index.js +0 -2
  75. package/use-next-link/index.js +0 -1
  76. package/use-next-pathname/index.js +0 -1
  77. package/use-page-visibility/index.js +0 -2
  78. package/use-react-router-enable-concurrent-navigation/index.js +0 -2
  79. package/use-react-router-is-match/index.js +0 -1
  80. package/use-retimer/index.js +0 -1
  81. package/use-session-storage/index.js +0 -1
  82. package/use-set/index.js +0 -1
  83. package/use-singleton/index.js +0 -1
  84. package/use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.js +0 -1
  85. package/use-typescript-happy-callback/index.js +0 -1
  86. package/use-uncontrolled/index.js +0 -1
  87. package/use-url-hash-state/index.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foxact",
3
- "version": "0.2.43",
3
+ "version": "0.2.45",
4
4
  "description": "React Hooks/Utils done right. For browser, SSR, and React Server Components.",
5
5
  "homepage": "https://foxact.skk.moe",
6
6
  "repository": {
@@ -32,7 +32,7 @@
32
32
  "optional": true
33
33
  }
34
34
  },
35
- "packageManager": "pnpm@9.14.4",
35
+ "packageManager": "pnpm@10.6.4",
36
36
  "pnpm": {
37
37
  "overrides": {
38
38
  "array-includes": "npm:@nolyfill/array-includes@latest",
@@ -50,9 +50,12 @@
50
50
  "object.groupby": "npm:@nolyfill/object.groupby@latest",
51
51
  "object.hasown": "npm:@nolyfill/object.hasown@latest",
52
52
  "object.values": "npm:@nolyfill/object.values@latest",
53
- "string.prototype.matchall": "npm:@nolyfill/string.prototype.matchall@latest",
54
- "rollup": "$rollup"
55
- }
53
+ "rollup": "$rollup",
54
+ "string.prototype.matchall": "npm:@nolyfill/string.prototype.matchall@latest"
55
+ },
56
+ "onlyBuiltDependencies": [
57
+ "@swc/core"
58
+ ]
56
59
  },
57
60
  "typeVersions": {
58
61
  ">=4.8": {
@@ -76,7 +79,7 @@
76
79
  "default": "./compose-context-provider/index.mjs"
77
80
  },
78
81
  "require": "./compose-context-provider/index.cjs",
79
- "default": "./compose-context-provider/index.js"
82
+ "default": "./compose-context-provider/index.cjs"
80
83
  },
81
84
  "./context-state": {
82
85
  "types": "./context-state/index.d.ts",
@@ -85,16 +88,7 @@
85
88
  "default": "./context-state/index.mjs"
86
89
  },
87
90
  "require": "./context-state/index.cjs",
88
- "default": "./context-state/index.js"
89
- },
90
- "./create-local-storage-state": {
91
- "types": "./create-local-storage-state/index.d.ts",
92
- "import": {
93
- "types": "./create-local-storage-state/index.d.ts",
94
- "default": "./create-local-storage-state/index.mjs"
95
- },
96
- "require": "./create-local-storage-state/index.cjs",
97
- "default": "./create-local-storage-state/index.js"
91
+ "default": "./context-state/index.cjs"
98
92
  },
99
93
  "./create-context-state": {
100
94
  "types": "./create-context-state/index.d.ts",
@@ -103,25 +97,25 @@
103
97
  "default": "./create-context-state/index.mjs"
104
98
  },
105
99
  "require": "./create-context-state/index.cjs",
106
- "default": "./create-context-state/index.js"
100
+ "default": "./create-context-state/index.cjs"
107
101
  },
108
- "./create-storage-hook": {
109
- "types": "./create-storage-hook/index.d.ts",
102
+ "./create-fixed-array": {
103
+ "types": "./create-fixed-array/index.d.ts",
110
104
  "import": {
111
- "types": "./create-storage-hook/index.d.ts",
112
- "default": "./create-storage-hook/index.mjs"
105
+ "types": "./create-fixed-array/index.d.ts",
106
+ "default": "./create-fixed-array/index.mjs"
113
107
  },
114
- "require": "./create-storage-hook/index.cjs",
115
- "default": "./create-storage-hook/index.js"
108
+ "require": "./create-fixed-array/index.cjs",
109
+ "default": "./create-fixed-array/index.cjs"
116
110
  },
117
- "./create-storage-state-factory": {
118
- "types": "./create-storage-state-factory/index.d.ts",
111
+ "./create-local-storage-state": {
112
+ "types": "./create-local-storage-state/index.d.ts",
119
113
  "import": {
120
- "types": "./create-storage-state-factory/index.d.ts",
121
- "default": "./create-storage-state-factory/index.mjs"
114
+ "types": "./create-local-storage-state/index.d.ts",
115
+ "default": "./create-local-storage-state/index.mjs"
122
116
  },
123
- "require": "./create-storage-state-factory/index.cjs",
124
- "default": "./create-storage-state-factory/index.js"
117
+ "require": "./create-local-storage-state/index.cjs",
118
+ "default": "./create-local-storage-state/index.cjs"
125
119
  },
126
120
  "./create-session-storage-state": {
127
121
  "types": "./create-session-storage-state/index.d.ts",
@@ -130,7 +124,25 @@
130
124
  "default": "./create-session-storage-state/index.mjs"
131
125
  },
132
126
  "require": "./create-session-storage-state/index.cjs",
133
- "default": "./create-session-storage-state/index.js"
127
+ "default": "./create-session-storage-state/index.cjs"
128
+ },
129
+ "./create-storage-state-factory": {
130
+ "types": "./create-storage-state-factory/index.d.ts",
131
+ "import": {
132
+ "types": "./create-storage-state-factory/index.d.ts",
133
+ "default": "./create-storage-state-factory/index.mjs"
134
+ },
135
+ "require": "./create-storage-state-factory/index.cjs",
136
+ "default": "./create-storage-state-factory/index.cjs"
137
+ },
138
+ "./create-storage-hook": {
139
+ "types": "./create-storage-hook/index.d.ts",
140
+ "import": {
141
+ "types": "./create-storage-hook/index.d.ts",
142
+ "default": "./create-storage-hook/index.mjs"
143
+ },
144
+ "require": "./create-storage-hook/index.cjs",
145
+ "default": "./create-storage-hook/index.cjs"
134
146
  },
135
147
  "./current-year": {
136
148
  "types": "./current-year/index.d.ts",
@@ -139,7 +151,16 @@
139
151
  "default": "./current-year/index.mjs"
140
152
  },
141
153
  "require": "./current-year/index.cjs",
142
- "default": "./current-year/index.js"
154
+ "default": "./current-year/index.cjs"
155
+ },
156
+ "./email-protection": {
157
+ "types": "./email-protection/index.d.ts",
158
+ "import": {
159
+ "types": "./email-protection/index.d.ts",
160
+ "default": "./email-protection/index.mjs"
161
+ },
162
+ "require": "./email-protection/index.cjs",
163
+ "default": "./email-protection/index.cjs"
143
164
  },
144
165
  "./fetch-jsonp": {
145
166
  "types": "./fetch-jsonp/index.d.ts",
@@ -148,25 +169,16 @@
148
169
  "default": "./fetch-jsonp/index.mjs"
149
170
  },
150
171
  "require": "./fetch-jsonp/index.cjs",
151
- "default": "./fetch-jsonp/index.js"
172
+ "default": "./fetch-jsonp/index.cjs"
152
173
  },
153
- "./create-fixed-array": {
154
- "types": "./create-fixed-array/index.d.ts",
174
+ "./is-safari": {
175
+ "types": "./is-safari/index.d.ts",
155
176
  "import": {
156
- "types": "./create-fixed-array/index.d.ts",
157
- "default": "./create-fixed-array/index.mjs"
177
+ "types": "./is-safari/index.d.ts",
178
+ "default": "./is-safari/index.mjs"
158
179
  },
159
- "require": "./create-fixed-array/index.cjs",
160
- "default": "./create-fixed-array/index.js"
161
- },
162
- "./invariant": {
163
- "types": "./invariant/index.d.ts",
164
- "import": {
165
- "types": "./invariant/index.d.ts",
166
- "default": "./invariant/index.mjs"
167
- },
168
- "require": "./invariant/index.cjs",
169
- "default": "./invariant/index.js"
180
+ "require": "./is-safari/index.cjs",
181
+ "default": "./is-safari/index.cjs"
170
182
  },
171
183
  "./no-ssr": {
172
184
  "types": "./no-ssr/index.d.ts",
@@ -175,7 +187,16 @@
175
187
  "default": "./no-ssr/index.mjs"
176
188
  },
177
189
  "require": "./no-ssr/index.cjs",
178
- "default": "./no-ssr/index.js"
190
+ "default": "./no-ssr/index.cjs"
191
+ },
192
+ "./invariant": {
193
+ "types": "./invariant/index.d.ts",
194
+ "import": {
195
+ "types": "./invariant/index.d.ts",
196
+ "default": "./invariant/index.mjs"
197
+ },
198
+ "require": "./invariant/index.cjs",
199
+ "default": "./invariant/index.cjs"
179
200
  },
180
201
  "./noop": {
181
202
  "types": "./noop/index.d.ts",
@@ -184,7 +205,7 @@
184
205
  "default": "./noop/index.mjs"
185
206
  },
186
207
  "require": "./noop/index.cjs",
187
- "default": "./noop/index.js"
208
+ "default": "./noop/index.cjs"
188
209
  },
189
210
  "./nullthrow": {
190
211
  "types": "./nullthrow/index.d.ts",
@@ -193,7 +214,16 @@
193
214
  "default": "./nullthrow/index.mjs"
194
215
  },
195
216
  "require": "./nullthrow/index.cjs",
196
- "default": "./nullthrow/index.js"
217
+ "default": "./nullthrow/index.cjs"
218
+ },
219
+ "./open-new-tab": {
220
+ "types": "./open-new-tab/index.d.ts",
221
+ "import": {
222
+ "types": "./open-new-tab/index.d.ts",
223
+ "default": "./open-new-tab/index.mjs"
224
+ },
225
+ "require": "./open-new-tab/index.cjs",
226
+ "default": "./open-new-tab/index.cjs"
197
227
  },
198
228
  "./rem": {
199
229
  "types": "./rem/index.d.ts",
@@ -202,7 +232,7 @@
202
232
  "default": "./rem/index.mjs"
203
233
  },
204
234
  "require": "./rem/index.cjs",
205
- "default": "./rem/index.js"
235
+ "default": "./rem/index.cjs"
206
236
  },
207
237
  "./request-idle-callback": {
208
238
  "types": "./request-idle-callback/index.d.ts",
@@ -211,7 +241,7 @@
211
241
  "default": "./request-idle-callback/index.mjs"
212
242
  },
213
243
  "require": "./request-idle-callback/index.cjs",
214
- "default": "./request-idle-callback/index.js"
244
+ "default": "./request-idle-callback/index.cjs"
215
245
  },
216
246
  "./types": {
217
247
  "types": "./types/index.d.ts",
@@ -220,16 +250,7 @@
220
250
  "default": "./types/index.mjs"
221
251
  },
222
252
  "require": "./types/index.cjs",
223
- "default": "./types/index.js"
224
- },
225
- "./use": {
226
- "types": "./use/index.d.ts",
227
- "import": {
228
- "types": "./use/index.d.ts",
229
- "default": "./use/index.mjs"
230
- },
231
- "require": "./use/index.cjs",
232
- "default": "./use/index.js"
253
+ "default": "./types/index.cjs"
233
254
  },
234
255
  "./typescript-happy-forward-ref": {
235
256
  "types": "./typescript-happy-forward-ref/index.d.ts",
@@ -238,7 +259,16 @@
238
259
  "default": "./typescript-happy-forward-ref/index.mjs"
239
260
  },
240
261
  "require": "./typescript-happy-forward-ref/index.cjs",
241
- "default": "./typescript-happy-forward-ref/index.js"
262
+ "default": "./typescript-happy-forward-ref/index.cjs"
263
+ },
264
+ "./use": {
265
+ "types": "./use/index.d.ts",
266
+ "import": {
267
+ "types": "./use/index.d.ts",
268
+ "default": "./use/index.mjs"
269
+ },
270
+ "require": "./use/index.cjs",
271
+ "default": "./use/index.cjs"
242
272
  },
243
273
  "./use-abortable-effect": {
244
274
  "types": "./use-abortable-effect/index.d.ts",
@@ -247,7 +277,7 @@
247
277
  "default": "./use-abortable-effect/index.mjs"
248
278
  },
249
279
  "require": "./use-abortable-effect/index.cjs",
250
- "default": "./use-abortable-effect/index.js"
280
+ "default": "./use-abortable-effect/index.cjs"
251
281
  },
252
282
  "./use-array": {
253
283
  "types": "./use-array/index.d.ts",
@@ -256,7 +286,7 @@
256
286
  "default": "./use-array/index.mjs"
257
287
  },
258
288
  "require": "./use-array/index.cjs",
259
- "default": "./use-array/index.js"
289
+ "default": "./use-array/index.cjs"
260
290
  },
261
291
  "./use-component-will-receive-update": {
262
292
  "types": "./use-component-will-receive-update/index.d.ts",
@@ -265,7 +295,7 @@
265
295
  "default": "./use-component-will-receive-update/index.mjs"
266
296
  },
267
297
  "require": "./use-component-will-receive-update/index.cjs",
268
- "default": "./use-component-will-receive-update/index.js"
298
+ "default": "./use-component-will-receive-update/index.cjs"
269
299
  },
270
300
  "./use-clipboard": {
271
301
  "types": "./use-clipboard/index.d.ts",
@@ -274,7 +304,7 @@
274
304
  "default": "./use-clipboard/index.mjs"
275
305
  },
276
306
  "require": "./use-clipboard/index.cjs",
277
- "default": "./use-clipboard/index.js"
307
+ "default": "./use-clipboard/index.cjs"
278
308
  },
279
309
  "./use-composition-input": {
280
310
  "types": "./use-composition-input/index.d.ts",
@@ -283,7 +313,7 @@
283
313
  "default": "./use-composition-input/index.mjs"
284
314
  },
285
315
  "require": "./use-composition-input/index.cjs",
286
- "default": "./use-composition-input/index.js"
316
+ "default": "./use-composition-input/index.cjs"
287
317
  },
288
318
  "./use-debounced-state": {
289
319
  "types": "./use-debounced-state/index.d.ts",
@@ -292,7 +322,7 @@
292
322
  "default": "./use-debounced-state/index.mjs"
293
323
  },
294
324
  "require": "./use-debounced-state/index.cjs",
295
- "default": "./use-debounced-state/index.js"
325
+ "default": "./use-debounced-state/index.cjs"
296
326
  },
297
327
  "./use-debounced-value": {
298
328
  "types": "./use-debounced-value/index.d.ts",
@@ -301,7 +331,7 @@
301
331
  "default": "./use-debounced-value/index.mjs"
302
332
  },
303
333
  "require": "./use-debounced-value/index.cjs",
304
- "default": "./use-debounced-value/index.js"
334
+ "default": "./use-debounced-value/index.cjs"
305
335
  },
306
336
  "./use-error-boundary": {
307
337
  "types": "./use-error-boundary/index.d.ts",
@@ -310,7 +340,25 @@
310
340
  "default": "./use-error-boundary/index.mjs"
311
341
  },
312
342
  "require": "./use-error-boundary/index.cjs",
313
- "default": "./use-error-boundary/index.js"
343
+ "default": "./use-error-boundary/index.cjs"
344
+ },
345
+ "./use-fast-click": {
346
+ "types": "./use-fast-click/index.d.ts",
347
+ "import": {
348
+ "types": "./use-fast-click/index.d.ts",
349
+ "default": "./use-fast-click/index.mjs"
350
+ },
351
+ "require": "./use-fast-click/index.cjs",
352
+ "default": "./use-fast-click/index.cjs"
353
+ },
354
+ "./use-intersection": {
355
+ "types": "./use-intersection/index.d.ts",
356
+ "import": {
357
+ "types": "./use-intersection/index.d.ts",
358
+ "default": "./use-intersection/index.mjs"
359
+ },
360
+ "require": "./use-intersection/index.cjs",
361
+ "default": "./use-intersection/index.cjs"
314
362
  },
315
363
  "./use-is-client": {
316
364
  "types": "./use-is-client/index.d.ts",
@@ -319,7 +367,7 @@
319
367
  "default": "./use-is-client/index.mjs"
320
368
  },
321
369
  "require": "./use-is-client/index.cjs",
322
- "default": "./use-is-client/index.js"
370
+ "default": "./use-is-client/index.cjs"
323
371
  },
324
372
  "./use-is-online": {
325
373
  "types": "./use-is-online/index.d.ts",
@@ -328,16 +376,7 @@
328
376
  "default": "./use-is-online/index.mjs"
329
377
  },
330
378
  "require": "./use-is-online/index.cjs",
331
- "default": "./use-is-online/index.js"
332
- },
333
- "./use-intersection": {
334
- "types": "./use-intersection/index.d.ts",
335
- "import": {
336
- "types": "./use-intersection/index.d.ts",
337
- "default": "./use-intersection/index.mjs"
338
- },
339
- "require": "./use-intersection/index.cjs",
340
- "default": "./use-intersection/index.js"
379
+ "default": "./use-is-online/index.cjs"
341
380
  },
342
381
  "./use-isomorphic-layout-effect": {
343
382
  "types": "./use-isomorphic-layout-effect/index.d.ts",
@@ -346,7 +385,7 @@
346
385
  "default": "./use-isomorphic-layout-effect/index.mjs"
347
386
  },
348
387
  "require": "./use-isomorphic-layout-effect/index.cjs",
349
- "default": "./use-isomorphic-layout-effect/index.js"
388
+ "default": "./use-isomorphic-layout-effect/index.cjs"
350
389
  },
351
390
  "./use-local-storage": {
352
391
  "types": "./use-local-storage/index.d.ts",
@@ -355,7 +394,7 @@
355
394
  "default": "./use-local-storage/index.mjs"
356
395
  },
357
396
  "require": "./use-local-storage/index.cjs",
358
- "default": "./use-local-storage/index.js"
397
+ "default": "./use-local-storage/index.cjs"
359
398
  },
360
399
  "./use-map": {
361
400
  "types": "./use-map/index.d.ts",
@@ -364,7 +403,7 @@
364
403
  "default": "./use-map/index.mjs"
365
404
  },
366
405
  "require": "./use-map/index.cjs",
367
- "default": "./use-map/index.js"
406
+ "default": "./use-map/index.cjs"
368
407
  },
369
408
  "./use-media-query": {
370
409
  "types": "./use-media-query/index.d.ts",
@@ -373,7 +412,7 @@
373
412
  "default": "./use-media-query/index.mjs"
374
413
  },
375
414
  "require": "./use-media-query/index.cjs",
376
- "default": "./use-media-query/index.js"
415
+ "default": "./use-media-query/index.cjs"
377
416
  },
378
417
  "./use-next-link": {
379
418
  "types": "./use-next-link/index.d.ts",
@@ -382,7 +421,7 @@
382
421
  "default": "./use-next-link/index.mjs"
383
422
  },
384
423
  "require": "./use-next-link/index.cjs",
385
- "default": "./use-next-link/index.js"
424
+ "default": "./use-next-link/index.cjs"
386
425
  },
387
426
  "./use-next-pathname": {
388
427
  "types": "./use-next-pathname/index.d.ts",
@@ -391,7 +430,7 @@
391
430
  "default": "./use-next-pathname/index.mjs"
392
431
  },
393
432
  "require": "./use-next-pathname/index.cjs",
394
- "default": "./use-next-pathname/index.js"
433
+ "default": "./use-next-pathname/index.cjs"
395
434
  },
396
435
  "./use-page-visibility": {
397
436
  "types": "./use-page-visibility/index.d.ts",
@@ -400,7 +439,7 @@
400
439
  "default": "./use-page-visibility/index.mjs"
401
440
  },
402
441
  "require": "./use-page-visibility/index.cjs",
403
- "default": "./use-page-visibility/index.js"
442
+ "default": "./use-page-visibility/index.cjs"
404
443
  },
405
444
  "./use-react-router-enable-concurrent-navigation": {
406
445
  "types": "./use-react-router-enable-concurrent-navigation/index.d.ts",
@@ -409,7 +448,7 @@
409
448
  "default": "./use-react-router-enable-concurrent-navigation/index.mjs"
410
449
  },
411
450
  "require": "./use-react-router-enable-concurrent-navigation/index.cjs",
412
- "default": "./use-react-router-enable-concurrent-navigation/index.js"
451
+ "default": "./use-react-router-enable-concurrent-navigation/index.cjs"
413
452
  },
414
453
  "./use-react-router-is-match": {
415
454
  "types": "./use-react-router-is-match/index.d.ts",
@@ -418,7 +457,7 @@
418
457
  "default": "./use-react-router-is-match/index.mjs"
419
458
  },
420
459
  "require": "./use-react-router-is-match/index.cjs",
421
- "default": "./use-react-router-is-match/index.js"
460
+ "default": "./use-react-router-is-match/index.cjs"
422
461
  },
423
462
  "./use-retimer": {
424
463
  "types": "./use-retimer/index.d.ts",
@@ -427,16 +466,7 @@
427
466
  "default": "./use-retimer/index.mjs"
428
467
  },
429
468
  "require": "./use-retimer/index.cjs",
430
- "default": "./use-retimer/index.js"
431
- },
432
- "./use-session-storage": {
433
- "types": "./use-session-storage/index.d.ts",
434
- "import": {
435
- "types": "./use-session-storage/index.d.ts",
436
- "default": "./use-session-storage/index.mjs"
437
- },
438
- "require": "./use-session-storage/index.cjs",
439
- "default": "./use-session-storage/index.js"
469
+ "default": "./use-retimer/index.cjs"
440
470
  },
441
471
  "./use-set": {
442
472
  "types": "./use-set/index.d.ts",
@@ -445,7 +475,16 @@
445
475
  "default": "./use-set/index.mjs"
446
476
  },
447
477
  "require": "./use-set/index.cjs",
448
- "default": "./use-set/index.js"
478
+ "default": "./use-set/index.cjs"
479
+ },
480
+ "./use-session-storage": {
481
+ "types": "./use-session-storage/index.d.ts",
482
+ "import": {
483
+ "types": "./use-session-storage/index.d.ts",
484
+ "default": "./use-session-storage/index.mjs"
485
+ },
486
+ "require": "./use-session-storage/index.cjs",
487
+ "default": "./use-session-storage/index.cjs"
449
488
  },
450
489
  "./use-singleton": {
451
490
  "types": "./use-singleton/index.d.ts",
@@ -454,7 +493,7 @@
454
493
  "default": "./use-singleton/index.mjs"
455
494
  },
456
495
  "require": "./use-singleton/index.cjs",
457
- "default": "./use-singleton/index.js"
496
+ "default": "./use-singleton/index.cjs"
458
497
  },
459
498
  "./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired": {
460
499
  "types": "./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.d.ts",
@@ -463,7 +502,7 @@
463
502
  "default": "./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.mjs"
464
503
  },
465
504
  "require": "./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.cjs",
466
- "default": "./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.js"
505
+ "default": "./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.cjs"
467
506
  },
468
507
  "./use-typescript-happy-callback": {
469
508
  "types": "./use-typescript-happy-callback/index.d.ts",
@@ -472,7 +511,7 @@
472
511
  "default": "./use-typescript-happy-callback/index.mjs"
473
512
  },
474
513
  "require": "./use-typescript-happy-callback/index.cjs",
475
- "default": "./use-typescript-happy-callback/index.js"
514
+ "default": "./use-typescript-happy-callback/index.cjs"
476
515
  },
477
516
  "./use-uncontrolled": {
478
517
  "types": "./use-uncontrolled/index.d.ts",
@@ -481,7 +520,7 @@
481
520
  "default": "./use-uncontrolled/index.mjs"
482
521
  },
483
522
  "require": "./use-uncontrolled/index.cjs",
484
- "default": "./use-uncontrolled/index.js"
523
+ "default": "./use-uncontrolled/index.cjs"
485
524
  },
486
525
  "./use-url-hash-state": {
487
526
  "types": "./use-url-hash-state/index.d.ts",
@@ -490,7 +529,7 @@
490
529
  "default": "./use-url-hash-state/index.mjs"
491
530
  },
492
531
  "require": "./use-url-hash-state/index.cjs",
493
- "default": "./use-url-hash-state/index.js"
532
+ "default": "./use-url-hash-state/index.cjs"
494
533
  }
495
534
  }
496
535
  }
package/sizes.json CHANGED
@@ -1 +1 @@
1
- {"total":{"raw":22110,"gzip":13448,"br":0},"exports":{"compose-context-provider":{"raw":177,"gzip":155,"br":122},"create-local-storage-state":{"raw":328,"gzip":183,"br":154},"create-context-state":{"raw":145,"gzip":116,"br":96},"context-state":{"raw":429,"gzip":258,"br":218},"create-session-storage-state":{"raw":332,"gzip":182,"br":152},"create-storage-state-factory":{"raw":519,"gzip":309,"br":263},"current-year":{"raw":618,"gzip":417,"br":339},"invariant":{"raw":178,"gzip":156,"br":118},"create-fixed-array":{"raw":452,"gzip":282,"br":248},"fetch-jsonp":{"raw":875,"gzip":533,"br":418},"create-storage-hook":{"raw":2073,"gzip":880,"br":764},"noop":{"raw":33,"gzip":53,"br":37},"no-ssr":{"raw":474,"gzip":316,"br":260},"types":{"raw":0,"gzip":20,"br":1},"nullthrow":{"raw":187,"gzip":163,"br":121},"request-idle-callback":{"raw":410,"gzip":229,"br":175},"rem":{"raw":823,"gzip":395,"br":350},"use":{"raw":276,"gzip":182,"br":150},"typescript-happy-forward-ref":{"raw":119,"gzip":103,"br":80},"use-abortable-effect":{"raw":215,"gzip":170,"br":144},"use-component-will-receive-update":{"raw":216,"gzip":188,"br":154},"use-array":{"raw":322,"gzip":236,"br":202},"use-debounced-state":{"raw":401,"gzip":280,"br":242},"use-composition-input":{"raw":470,"gzip":286,"br":241},"use-debounced-value":{"raw":524,"gzip":342,"br":286},"use-clipboard":{"raw":1177,"gzip":651,"br":552},"use-error-boundary":{"raw":255,"gzip":198,"br":163},"use-isomorphic-layout-effect":{"raw":178,"gzip":142,"br":112},"use-is-client":{"raw":150,"gzip":145,"br":115},"use-local-storage":{"raw":310,"gzip":184,"br":157},"use-map":{"raw":339,"gzip":243,"br":208},"use-intersection":{"raw":1230,"gzip":649,"br":597},"use-media-query":{"raw":738,"gzip":413,"br":332},"use-is-online":{"raw":335,"gzip":214,"br":160},"use-next-pathname":{"raw":314,"gzip":235,"br":203},"use-page-visibility":{"raw":290,"gzip":206,"br":154},"use-next-link":{"raw":1676,"gzip":872,"br":745},"use-retimer":{"raw":199,"gzip":166,"br":127},"use-react-router-is-match":{"raw":563,"gzip":372,"br":314},"use-react-router-enable-concurrent-navigation":{"raw":966,"gzip":470,"br":397},"use-session-storage":{"raw":316,"gzip":181,"br":152},"use-set":{"raw":340,"gzip":238,"br":203},"use-singleton":{"raw":139,"gzip":130,"br":104},"use-typescript-happy-callback":{"raw":107,"gzip":102,"br":77},"use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired":{"raw":459,"gzip":325,"br":249},"use-uncontrolled":{"raw":352,"gzip":258,"br":216},"use-url-hash-state":{"raw":1081,"gzip":620,"br":540}}}
1
+ {"total":{"raw":23617,"gzip":14516,"br":0},"exports":{"compose-context-provider":{"raw":177,"gzip":155,"br":122},"create-context-state":{"raw":145,"gzip":116,"br":96},"context-state":{"raw":377,"gzip":241,"br":207},"create-local-storage-state":{"raw":328,"gzip":183,"br":154},"create-session-storage-state":{"raw":332,"gzip":182,"br":152},"create-fixed-array":{"raw":452,"gzip":282,"br":248},"create-storage-state-factory":{"raw":519,"gzip":309,"br":263},"current-year":{"raw":592,"gzip":400,"br":326},"email-protection":{"raw":426,"gzip":321,"br":272},"is-safari":{"raw":248,"gzip":164,"br":117},"fetch-jsonp":{"raw":875,"gzip":533,"br":418},"no-ssr":{"raw":474,"gzip":316,"br":260},"noop":{"raw":33,"gzip":53,"br":37},"create-storage-hook":{"raw":2073,"gzip":880,"br":764},"invariant":{"raw":178,"gzip":156,"br":118},"nullthrow":{"raw":187,"gzip":163,"br":121},"types":{"raw":0,"gzip":20,"br":1},"open-new-tab":{"raw":340,"gzip":258,"br":188},"use":{"raw":276,"gzip":182,"br":150},"typescript-happy-forward-ref":{"raw":119,"gzip":103,"br":80},"rem":{"raw":823,"gzip":395,"br":350},"request-idle-callback":{"raw":410,"gzip":229,"br":175},"use-abortable-effect":{"raw":215,"gzip":170,"br":144},"use-array":{"raw":322,"gzip":236,"br":202},"use-component-will-receive-update":{"raw":216,"gzip":188,"br":154},"use-composition-input":{"raw":470,"gzip":286,"br":241},"use-error-boundary":{"raw":252,"gzip":195,"br":165},"use-debounced-state":{"raw":401,"gzip":280,"br":242},"use-clipboard":{"raw":1177,"gzip":651,"br":552},"use-debounced-value":{"raw":524,"gzip":342,"br":286},"use-fast-click":{"raw":553,"gzip":364,"br":297},"use-is-client":{"raw":150,"gzip":145,"br":115},"use-is-online":{"raw":356,"gzip":212,"br":158},"use-intersection":{"raw":1230,"gzip":649,"br":597},"use-isomorphic-layout-effect":{"raw":178,"gzip":142,"br":112},"use-map":{"raw":339,"gzip":243,"br":208},"use-local-storage":{"raw":310,"gzip":184,"br":157},"use-media-query":{"raw":738,"gzip":413,"br":332},"use-page-visibility":{"raw":290,"gzip":206,"br":154},"use-next-pathname":{"raw":314,"gzip":235,"br":203},"use-retimer":{"raw":199,"gzip":166,"br":127},"use-next-link":{"raw":1676,"gzip":872,"br":745},"use-set":{"raw":340,"gzip":238,"br":203},"use-react-router-enable-concurrent-navigation":{"raw":966,"gzip":470,"br":397},"use-singleton":{"raw":139,"gzip":130,"br":104},"use-react-router-is-match":{"raw":563,"gzip":372,"br":314},"use-session-storage":{"raw":316,"gzip":181,"br":152},"use-typescript-happy-callback":{"raw":107,"gzip":102,"br":77},"use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired":{"raw":459,"gzip":325,"br":249},"use-uncontrolled":{"raw":352,"gzip":258,"br":216},"use-url-hash-state":{"raw":1081,"gzip":620,"br":540}}}
@@ -6,4 +6,5 @@ declare const typeScriptHappyForwardRef: TypeScriptHappyForwardRef;
6
6
  /** @see https://foxact.skk.moe/typescript-happy-forward-ref */
7
7
  declare const typescriptHappyForwardRef: TypeScriptHappyForwardRef;
8
8
 
9
- export { type TypeScriptHappyForwardRef, typeScriptHappyForwardRef, typescriptHappyForwardRef };
9
+ export { typeScriptHappyForwardRef, typescriptHappyForwardRef };
10
+ export type { TypeScriptHappyForwardRef };
@@ -1,4 +1,8 @@
1
- import { EffectCallback, DependencyList } from 'react';
1
+ import type { EffectCallback, DependencyList } from 'react';
2
+
3
+
4
+
5
+
2
6
 
3
7
  /** @see https://foxact.skk.moe/use-abortable-effect */
4
8
  declare function useAbortableEffect(callback: (signal: AbortSignal) => ReturnType<EffectCallback>, deps: DependencyList): void;
@@ -8,4 +8,5 @@ interface UseCompositionInputReturn<T extends HTMLInputElement | HTMLTextAreaEle
8
8
  /** @see https://foxact.skk.moe/use-composition-input */
9
9
  declare function useCompositionInput<T extends HTMLInputElement | HTMLTextAreaElement = HTMLInputElement>(cb: UseCompositionInputCallback): UseCompositionInputReturn<T>;
10
10
 
11
- export { type UseCompositionInputCallback, type UseCompositionInputReturn, type UseCompositionInputReturnKey, useCompositionInput };
11
+ export { useCompositionInput };
12
+ export type { UseCompositionInputCallback, UseCompositionInputReturn, UseCompositionInputReturnKey };
@@ -1 +1 @@
1
- "use strict";require("client-only");var r=require("react");function t(r){return!(!1===r||null==r)}exports.useErrorBoundary=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const[n,u]=r.useState(!1);if(t(e))throw e;if(t(n))throw n;return u};
1
+ "use strict";require("client-only");var r=require("react");function t(r){return!1!==r&&null!=r}exports.useErrorBoundary=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const[n,u]=r.useState(!1);if(t(e))throw e;if(t(n))throw n;return u};
@@ -1 +1 @@
1
- import"client-only";import{useState as r}from"react";function t(r){return!(!1===r||null==r)}function o(){let o=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const[n,e]=r(!1);if(t(o))throw o;if(t(n))throw n;return e}export{o as useErrorBoundary};
1
+ import"client-only";import{useState as r}from"react";function t(r){return!1!==r&&null!=r}function o(){let o=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const[n,e]=r(!1);if(t(o))throw o;if(t(n))throw n;return e}export{o as useErrorBoundary};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react"),n=require("../use-media-query/index.cjs");require("../no-ssr/index.cjs"),require("../noop/index.cjs"),exports.useFastClick=function(o){const s=e.useCallback(e=>{("mousedown"!==e.type||0===e.button)&&("development"!==process.env.NODE_ENV||e.currentTarget instanceof HTMLDivElement||e.currentTarget instanceof HTMLButtonElement||console.warn('[foxact/use-fast-click] You should only use "useFastClick" on <div /> or <button /> elements'),o(e))},[o]);return n.useMediaQuery("(pointer: coarse)",!1)?{onClick:s}:{onMouseDown:s}};
@@ -0,0 +1,6 @@
1
+ type FastClickReturn<T extends HTMLDivElement | HTMLButtonElement> = Pick<React.DOMAttributes<T>, 'onMouseDown' | 'onClick'>;
2
+ /** @see https://foxact.skk.moe/use-fast-click */
3
+ declare function useFastClick<T extends HTMLDivElement | HTMLButtonElement>(callback: React.MouseEventHandler<T>): FastClickReturn<T>;
4
+
5
+ export { useFastClick };
6
+ export type { FastClickReturn };
@@ -0,0 +1 @@
1
+ import{useCallback as e}from"react";import{useMediaQuery as o}from"../use-media-query/index.mjs";import"../no-ssr/index.mjs";import"../noop/index.mjs";function n(n){const t=e(e=>{("mousedown"!==e.type||0===e.button)&&("development"!==process.env.NODE_ENV||e.currentTarget instanceof HTMLDivElement||e.currentTarget instanceof HTMLButtonElement||console.warn('[foxact/use-fast-click] You should only use "useFastClick" on <div /> or <button /> elements'),n(e))},[n]);return o("(pointer: coarse)",!1)?{onClick:t}:{onMouseDown:t}}export{n as useFastClick};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";var e=require("react");const n=e=>(window.addEventListener("online",e),window.addEventListener("offline",e),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",e)}),i=()=>"undefined"!=typeof window&&navigator.onLine;exports.useIsOnline=function(){return e.useSyncExternalStore(n,i,i)};
2
+ "use strict";var e=require("react");function n(e){return window.addEventListener("online",e),window.addEventListener("offline",e),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",e)}}function i(){return"undefined"!=typeof window&&navigator.onLine}exports.useIsOnline=function(){return e.useSyncExternalStore(n,i,i)};
@@ -1,4 +1,4 @@
1
1
  /** @see https://foxact.skk.moe/use-is-online */
2
- declare function useIsOnline(): unknown;
2
+ declare function useIsOnline(): boolean;
3
3
 
4
4
  export { useIsOnline };
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{useSyncExternalStore as n}from"react";const e=n=>(window.addEventListener("online",n),window.addEventListener("offline",n),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",n)}),i=()=>"undefined"!=typeof window&&navigator.onLine;function o(){return n(e,i,i)}export{o as useIsOnline};
2
+ import{useSyncExternalStore as n}from"react";function e(n){return window.addEventListener("online",n),window.addEventListener("offline",n),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",n)}}function i(){return"undefined"!=typeof window&&navigator.onLine}function o(){return n(e,i,i)}export{o as useIsOnline};