foxact 0.2.41 → 0.2.43

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.
@@ -0,0 +1 @@
1
+ "use strict";const e="__foxact_jsonp_callbacks__SECRET_INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED";exports.fetchJsonp=function(o){if("undefined"==typeof window)throw TypeError("fetchJsonp is only available in the browser");window[e]||Object.defineProperty(window,e,{value:{},writable:!0,configurable:!0,enumerable:!1});const n="__".concat(Date.now(),"_").concat(Math.random().toString().slice(2),"__"),t="window.".concat(e,".").concat(n);if(Object.prototype.hasOwnProperty.call(window[e],n))throw TypeError("Callback name conflict: ".concat(n));const r=o(t);return new Promise((o,t)=>{const c=document.createElement("script");c.src=r,c.async=!0;const a=()=>{c.removeEventListener("error",i),c.remove(),window[e][n]&&delete window[e][n]};function i(){a(),t(Error("Failed to load script: ".concat(r)))}c.addEventListener("error",i),window[e][n]=e=>{a(),o(e)},document.body.append(c)})};
@@ -0,0 +1,9 @@
1
+ declare global {
2
+ interface Window {
3
+ __foxact_jsonp_callbacks__SECRET_INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Record<string, ((data: any) => void) | undefined>;
4
+ }
5
+ }
6
+ /** @see https://foxact.skk.moe/fetch-jsonp */
7
+ declare function fetchJsonp<T>(getUrl: (callbackName: string) => string): Promise<T>;
8
+
9
+ export { fetchJsonp };
@@ -0,0 +1 @@
1
+ "use strict";const e="__foxact_jsonp_callbacks__SECRET_INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED";exports.fetchJsonp=function(o){if("undefined"==typeof window)throw TypeError("fetchJsonp is only available in the browser");window[e]||Object.defineProperty(window,e,{value:{},writable:!0,configurable:!0,enumerable:!1});const n="__".concat(Date.now(),"_").concat(Math.random().toString().slice(2),"__"),t="window.".concat(e,".").concat(n);if(Object.prototype.hasOwnProperty.call(window[e],n))throw TypeError("Callback name conflict: ".concat(n));const r=o(t);return new Promise((o,t)=>{const c=document.createElement("script");c.src=r,c.async=!0;const a=()=>{c.removeEventListener("error",i),c.remove(),window[e][n]&&delete window[e][n]};function i(){a(),t(Error("Failed to load script: ".concat(r)))}c.addEventListener("error",i),window[e][n]=e=>{a(),o(e)},document.body.append(c)})};
@@ -0,0 +1 @@
1
+ const e="__foxact_jsonp_callbacks__SECRET_INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED";function o(o){if("undefined"==typeof window)throw TypeError("fetchJsonp is only available in the browser");window[e]||Object.defineProperty(window,e,{value:{},writable:!0,configurable:!0,enumerable:!1});const n="__".concat(Date.now(),"_").concat(Math.random().toString().slice(2),"__"),t="window.".concat(e,".").concat(n);if(Object.prototype.hasOwnProperty.call(window[e],n))throw TypeError("Callback name conflict: ".concat(n));const r=o(t);return new Promise((o,t)=>{const c=document.createElement("script");c.src=r,c.async=!0;const a=()=>{c.removeEventListener("error",i),c.remove(),window[e][n]&&delete window[e][n]};function i(){a(),t(Error("Failed to load script: ".concat(r)))}c.addEventListener("error",i),window[e][n]=e=>{a(),o(e)},document.body.append(c)})}export{o as fetchJsonp};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foxact",
3
- "version": "0.2.41",
3
+ "version": "0.2.43",
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.10.0",
35
+ "packageManager": "pnpm@9.14.4",
36
36
  "pnpm": {
37
37
  "overrides": {
38
38
  "array-includes": "npm:@nolyfill/array-includes@latest",
@@ -78,24 +78,6 @@
78
78
  "require": "./compose-context-provider/index.cjs",
79
79
  "default": "./compose-context-provider/index.js"
80
80
  },
81
- "./create-context-state": {
82
- "types": "./create-context-state/index.d.ts",
83
- "import": {
84
- "types": "./create-context-state/index.d.ts",
85
- "default": "./create-context-state/index.mjs"
86
- },
87
- "require": "./create-context-state/index.cjs",
88
- "default": "./create-context-state/index.js"
89
- },
90
- "./create-fixed-array": {
91
- "types": "./create-fixed-array/index.d.ts",
92
- "import": {
93
- "types": "./create-fixed-array/index.d.ts",
94
- "default": "./create-fixed-array/index.mjs"
95
- },
96
- "require": "./create-fixed-array/index.cjs",
97
- "default": "./create-fixed-array/index.js"
98
- },
99
81
  "./context-state": {
100
82
  "types": "./context-state/index.d.ts",
101
83
  "import": {
@@ -105,14 +87,23 @@
105
87
  "require": "./context-state/index.cjs",
106
88
  "default": "./context-state/index.js"
107
89
  },
108
- "./create-session-storage-state": {
109
- "types": "./create-session-storage-state/index.d.ts",
90
+ "./create-local-storage-state": {
91
+ "types": "./create-local-storage-state/index.d.ts",
110
92
  "import": {
111
- "types": "./create-session-storage-state/index.d.ts",
112
- "default": "./create-session-storage-state/index.mjs"
93
+ "types": "./create-local-storage-state/index.d.ts",
94
+ "default": "./create-local-storage-state/index.mjs"
113
95
  },
114
- "require": "./create-session-storage-state/index.cjs",
115
- "default": "./create-session-storage-state/index.js"
96
+ "require": "./create-local-storage-state/index.cjs",
97
+ "default": "./create-local-storage-state/index.js"
98
+ },
99
+ "./create-context-state": {
100
+ "types": "./create-context-state/index.d.ts",
101
+ "import": {
102
+ "types": "./create-context-state/index.d.ts",
103
+ "default": "./create-context-state/index.mjs"
104
+ },
105
+ "require": "./create-context-state/index.cjs",
106
+ "default": "./create-context-state/index.js"
116
107
  },
117
108
  "./create-storage-hook": {
118
109
  "types": "./create-storage-hook/index.d.ts",
@@ -123,15 +114,6 @@
123
114
  "require": "./create-storage-hook/index.cjs",
124
115
  "default": "./create-storage-hook/index.js"
125
116
  },
126
- "./create-local-storage-state": {
127
- "types": "./create-local-storage-state/index.d.ts",
128
- "import": {
129
- "types": "./create-local-storage-state/index.d.ts",
130
- "default": "./create-local-storage-state/index.mjs"
131
- },
132
- "require": "./create-local-storage-state/index.cjs",
133
- "default": "./create-local-storage-state/index.js"
134
- },
135
117
  "./create-storage-state-factory": {
136
118
  "types": "./create-storage-state-factory/index.d.ts",
137
119
  "import": {
@@ -141,6 +123,15 @@
141
123
  "require": "./create-storage-state-factory/index.cjs",
142
124
  "default": "./create-storage-state-factory/index.js"
143
125
  },
126
+ "./create-session-storage-state": {
127
+ "types": "./create-session-storage-state/index.d.ts",
128
+ "import": {
129
+ "types": "./create-session-storage-state/index.d.ts",
130
+ "default": "./create-session-storage-state/index.mjs"
131
+ },
132
+ "require": "./create-session-storage-state/index.cjs",
133
+ "default": "./create-session-storage-state/index.js"
134
+ },
144
135
  "./current-year": {
145
136
  "types": "./current-year/index.d.ts",
146
137
  "import": {
@@ -150,6 +141,24 @@
150
141
  "require": "./current-year/index.cjs",
151
142
  "default": "./current-year/index.js"
152
143
  },
144
+ "./fetch-jsonp": {
145
+ "types": "./fetch-jsonp/index.d.ts",
146
+ "import": {
147
+ "types": "./fetch-jsonp/index.d.ts",
148
+ "default": "./fetch-jsonp/index.mjs"
149
+ },
150
+ "require": "./fetch-jsonp/index.cjs",
151
+ "default": "./fetch-jsonp/index.js"
152
+ },
153
+ "./create-fixed-array": {
154
+ "types": "./create-fixed-array/index.d.ts",
155
+ "import": {
156
+ "types": "./create-fixed-array/index.d.ts",
157
+ "default": "./create-fixed-array/index.mjs"
158
+ },
159
+ "require": "./create-fixed-array/index.cjs",
160
+ "default": "./create-fixed-array/index.js"
161
+ },
153
162
  "./invariant": {
154
163
  "types": "./invariant/index.d.ts",
155
164
  "import": {
@@ -186,6 +195,15 @@
186
195
  "require": "./nullthrow/index.cjs",
187
196
  "default": "./nullthrow/index.js"
188
197
  },
198
+ "./rem": {
199
+ "types": "./rem/index.d.ts",
200
+ "import": {
201
+ "types": "./rem/index.d.ts",
202
+ "default": "./rem/index.mjs"
203
+ },
204
+ "require": "./rem/index.cjs",
205
+ "default": "./rem/index.js"
206
+ },
189
207
  "./request-idle-callback": {
190
208
  "types": "./request-idle-callback/index.d.ts",
191
209
  "import": {
@@ -204,15 +222,6 @@
204
222
  "require": "./types/index.cjs",
205
223
  "default": "./types/index.js"
206
224
  },
207
- "./typescript-happy-forward-ref": {
208
- "types": "./typescript-happy-forward-ref/index.d.ts",
209
- "import": {
210
- "types": "./typescript-happy-forward-ref/index.d.ts",
211
- "default": "./typescript-happy-forward-ref/index.mjs"
212
- },
213
- "require": "./typescript-happy-forward-ref/index.cjs",
214
- "default": "./typescript-happy-forward-ref/index.js"
215
- },
216
225
  "./use": {
217
226
  "types": "./use/index.d.ts",
218
227
  "import": {
@@ -222,6 +231,15 @@
222
231
  "require": "./use/index.cjs",
223
232
  "default": "./use/index.js"
224
233
  },
234
+ "./typescript-happy-forward-ref": {
235
+ "types": "./typescript-happy-forward-ref/index.d.ts",
236
+ "import": {
237
+ "types": "./typescript-happy-forward-ref/index.d.ts",
238
+ "default": "./typescript-happy-forward-ref/index.mjs"
239
+ },
240
+ "require": "./typescript-happy-forward-ref/index.cjs",
241
+ "default": "./typescript-happy-forward-ref/index.js"
242
+ },
225
243
  "./use-abortable-effect": {
226
244
  "types": "./use-abortable-effect/index.d.ts",
227
245
  "import": {
@@ -240,24 +258,6 @@
240
258
  "require": "./use-array/index.cjs",
241
259
  "default": "./use-array/index.js"
242
260
  },
243
- "./use-clipboard": {
244
- "types": "./use-clipboard/index.d.ts",
245
- "import": {
246
- "types": "./use-clipboard/index.d.ts",
247
- "default": "./use-clipboard/index.mjs"
248
- },
249
- "require": "./use-clipboard/index.cjs",
250
- "default": "./use-clipboard/index.js"
251
- },
252
- "./rem": {
253
- "types": "./rem/index.d.ts",
254
- "import": {
255
- "types": "./rem/index.d.ts",
256
- "default": "./rem/index.mjs"
257
- },
258
- "require": "./rem/index.cjs",
259
- "default": "./rem/index.js"
260
- },
261
261
  "./use-component-will-receive-update": {
262
262
  "types": "./use-component-will-receive-update/index.d.ts",
263
263
  "import": {
@@ -267,6 +267,15 @@
267
267
  "require": "./use-component-will-receive-update/index.cjs",
268
268
  "default": "./use-component-will-receive-update/index.js"
269
269
  },
270
+ "./use-clipboard": {
271
+ "types": "./use-clipboard/index.d.ts",
272
+ "import": {
273
+ "types": "./use-clipboard/index.d.ts",
274
+ "default": "./use-clipboard/index.mjs"
275
+ },
276
+ "require": "./use-clipboard/index.cjs",
277
+ "default": "./use-clipboard/index.js"
278
+ },
270
279
  "./use-composition-input": {
271
280
  "types": "./use-composition-input/index.d.ts",
272
281
  "import": {
@@ -276,15 +285,6 @@
276
285
  "require": "./use-composition-input/index.cjs",
277
286
  "default": "./use-composition-input/index.js"
278
287
  },
279
- "./use-debounced-value": {
280
- "types": "./use-debounced-value/index.d.ts",
281
- "import": {
282
- "types": "./use-debounced-value/index.d.ts",
283
- "default": "./use-debounced-value/index.mjs"
284
- },
285
- "require": "./use-debounced-value/index.cjs",
286
- "default": "./use-debounced-value/index.js"
287
- },
288
288
  "./use-debounced-state": {
289
289
  "types": "./use-debounced-state/index.d.ts",
290
290
  "import": {
@@ -294,6 +294,15 @@
294
294
  "require": "./use-debounced-state/index.cjs",
295
295
  "default": "./use-debounced-state/index.js"
296
296
  },
297
+ "./use-debounced-value": {
298
+ "types": "./use-debounced-value/index.d.ts",
299
+ "import": {
300
+ "types": "./use-debounced-value/index.d.ts",
301
+ "default": "./use-debounced-value/index.mjs"
302
+ },
303
+ "require": "./use-debounced-value/index.cjs",
304
+ "default": "./use-debounced-value/index.js"
305
+ },
297
306
  "./use-error-boundary": {
298
307
  "types": "./use-error-boundary/index.d.ts",
299
308
  "import": {
@@ -303,15 +312,6 @@
303
312
  "require": "./use-error-boundary/index.cjs",
304
313
  "default": "./use-error-boundary/index.js"
305
314
  },
306
- "./use-intersection": {
307
- "types": "./use-intersection/index.d.ts",
308
- "import": {
309
- "types": "./use-intersection/index.d.ts",
310
- "default": "./use-intersection/index.mjs"
311
- },
312
- "require": "./use-intersection/index.cjs",
313
- "default": "./use-intersection/index.js"
314
- },
315
315
  "./use-is-client": {
316
316
  "types": "./use-is-client/index.d.ts",
317
317
  "import": {
@@ -330,6 +330,15 @@
330
330
  "require": "./use-is-online/index.cjs",
331
331
  "default": "./use-is-online/index.js"
332
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"
341
+ },
333
342
  "./use-isomorphic-layout-effect": {
334
343
  "types": "./use-isomorphic-layout-effect/index.d.ts",
335
344
  "import": {
@@ -339,15 +348,6 @@
339
348
  "require": "./use-isomorphic-layout-effect/index.cjs",
340
349
  "default": "./use-isomorphic-layout-effect/index.js"
341
350
  },
342
- "./use-map": {
343
- "types": "./use-map/index.d.ts",
344
- "import": {
345
- "types": "./use-map/index.d.ts",
346
- "default": "./use-map/index.mjs"
347
- },
348
- "require": "./use-map/index.cjs",
349
- "default": "./use-map/index.js"
350
- },
351
351
  "./use-local-storage": {
352
352
  "types": "./use-local-storage/index.d.ts",
353
353
  "import": {
@@ -357,6 +357,15 @@
357
357
  "require": "./use-local-storage/index.cjs",
358
358
  "default": "./use-local-storage/index.js"
359
359
  },
360
+ "./use-map": {
361
+ "types": "./use-map/index.d.ts",
362
+ "import": {
363
+ "types": "./use-map/index.d.ts",
364
+ "default": "./use-map/index.mjs"
365
+ },
366
+ "require": "./use-map/index.cjs",
367
+ "default": "./use-map/index.js"
368
+ },
360
369
  "./use-media-query": {
361
370
  "types": "./use-media-query/index.d.ts",
362
371
  "import": {
@@ -429,15 +438,6 @@
429
438
  "require": "./use-session-storage/index.cjs",
430
439
  "default": "./use-session-storage/index.js"
431
440
  },
432
- "./use-singleton": {
433
- "types": "./use-singleton/index.d.ts",
434
- "import": {
435
- "types": "./use-singleton/index.d.ts",
436
- "default": "./use-singleton/index.mjs"
437
- },
438
- "require": "./use-singleton/index.cjs",
439
- "default": "./use-singleton/index.js"
440
- },
441
441
  "./use-set": {
442
442
  "types": "./use-set/index.d.ts",
443
443
  "import": {
@@ -447,6 +447,15 @@
447
447
  "require": "./use-set/index.cjs",
448
448
  "default": "./use-set/index.js"
449
449
  },
450
+ "./use-singleton": {
451
+ "types": "./use-singleton/index.d.ts",
452
+ "import": {
453
+ "types": "./use-singleton/index.d.ts",
454
+ "default": "./use-singleton/index.mjs"
455
+ },
456
+ "require": "./use-singleton/index.cjs",
457
+ "default": "./use-singleton/index.js"
458
+ },
450
459
  "./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired": {
451
460
  "types": "./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.d.ts",
452
461
  "import": {
@@ -465,15 +474,6 @@
465
474
  "require": "./use-typescript-happy-callback/index.cjs",
466
475
  "default": "./use-typescript-happy-callback/index.js"
467
476
  },
468
- "./use-url-hash-state": {
469
- "types": "./use-url-hash-state/index.d.ts",
470
- "import": {
471
- "types": "./use-url-hash-state/index.d.ts",
472
- "default": "./use-url-hash-state/index.mjs"
473
- },
474
- "require": "./use-url-hash-state/index.cjs",
475
- "default": "./use-url-hash-state/index.js"
476
- },
477
477
  "./use-uncontrolled": {
478
478
  "types": "./use-uncontrolled/index.d.ts",
479
479
  "import": {
@@ -482,6 +482,15 @@
482
482
  },
483
483
  "require": "./use-uncontrolled/index.cjs",
484
484
  "default": "./use-uncontrolled/index.js"
485
+ },
486
+ "./use-url-hash-state": {
487
+ "types": "./use-url-hash-state/index.d.ts",
488
+ "import": {
489
+ "types": "./use-url-hash-state/index.d.ts",
490
+ "default": "./use-url-hash-state/index.mjs"
491
+ },
492
+ "require": "./use-url-hash-state/index.cjs",
493
+ "default": "./use-url-hash-state/index.js"
485
494
  }
486
495
  }
487
496
  }
package/sizes.json CHANGED
@@ -1 +1 @@
1
- {"total":{"raw":21174,"gzip":12898,"br":0},"exports":{"create-context-state":{"raw":145,"gzip":116,"br":96},"compose-context-provider":{"raw":177,"gzip":155,"br":122},"context-state":{"raw":429,"gzip":258,"br":218},"create-fixed-array":{"raw":452,"gzip":282,"br":248},"create-session-storage-state":{"raw":332,"gzip":182,"br":152},"create-local-storage-state":{"raw":328,"gzip":183,"br":154},"create-storage-state-factory":{"raw":519,"gzip":309,"br":263},"invariant":{"raw":178,"gzip":156,"br":118},"current-year":{"raw":618,"gzip":417,"br":339},"noop":{"raw":33,"gzip":53,"br":37},"types":{"raw":0,"gzip":20,"br":1},"no-ssr":{"raw":474,"gzip":316,"br":260},"create-storage-hook":{"raw":2073,"gzip":880,"br":764},"nullthrow":{"raw":187,"gzip":163,"br":121},"typescript-happy-forward-ref":{"raw":119,"gzip":103,"br":80},"use-abortable-effect":{"raw":215,"gzip":170,"br":144},"request-idle-callback":{"raw":410,"gzip":229,"br":175},"use-array":{"raw":322,"gzip":236,"br":202},"use":{"raw":276,"gzip":182,"br":150},"use-component-will-receive-update":{"raw":216,"gzip":188,"br":154},"use-debounced-value":{"raw":524,"gzip":342,"br":286},"rem":{"raw":823,"gzip":395,"br":350},"use-clipboard":{"raw":1177,"gzip":651,"br":552},"use-composition-input":{"raw":470,"gzip":286,"br":241},"use-is-client":{"raw":150,"gzip":145,"br":115},"use-error-boundary":{"raw":255,"gzip":198,"br":163},"use-debounced-state":{"raw":401,"gzip":280,"br":242},"use-is-online":{"raw":335,"gzip":214,"br":160},"use-isomorphic-layout-effect":{"raw":178,"gzip":142,"br":112},"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-next-pathname":{"raw":314,"gzip":235,"br":203},"use-local-storage":{"raw":310,"gzip":184,"br":157},"use-page-visibility":{"raw":290,"gzip":206,"br":154},"use-react-router-is-match":{"raw":563,"gzip":372,"br":314},"use-retimer":{"raw":199,"gzip":166,"br":127},"use-next-link":{"raw":1615,"gzip":855,"br":737},"use-singleton":{"raw":139,"gzip":130,"br":104},"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-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":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 +1 @@
1
- "use strict";require("client-only");var e=require("react"),t=require("next/navigation"),r=require("next/dist/shared/lib/router/utils/format-url"),n=require("../use-intersection/index.cjs");function o(e,t,r){"undefined"!=typeof window&&Promise.resolve(e.prefetch(t,r)).catch(e=>{if("production"!==process.env.NODE_ENV)throw e})}require("../request-idle-callback/index.cjs"),exports.unstable_useNextLink=function(u,s){let{prefetch:i,ref:c,onClick:l,onMouseEnter:a,onTouchStart:f,scroll:p=!0,replace:d=!1,...v}=s;process.env.NODE_ENV;const E=null==i?"auto":"full",y=!1!==i,N=t.useRouter(),[h,k]=e.useTransition(),[b,m,g]=n.useIntersection(e.useMemo(()=>({rootMargin:"200px"}),[])),q=e.useMemo(()=>"string"==typeof u?u:r.formatUrl(u),[u]),[x,_]=e.useState(q);return x!==q&&(_(q),g()),e.useEffect(()=>{"production"===process.env.NODE_ENV&&m&&y&&o(N,q,{kind:E})},[E,m,y,q,N]),[h,{ref:e.useCallback(e=>{b(e),"function"==typeof c?c(e):c&&e&&(c.current=e)},[c,b]),onClick:e.useCallback(e=>{if("function"==typeof l&&l(e),e.defaultPrevented)return;const{nodeName:t}=e.currentTarget;!("A"===t.toUpperCase()&&function(e){const t=e.currentTarget,r=t.getAttribute("target");return r&&"_self"!==r||t.download||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e))&&(e.preventDefault(),k(()=>{N[d?"replace":"push"](q,{scroll:p})}))},[l,d,q,N,p]),onMouseEnter:e.useCallback(e=>{"function"==typeof a&&a(e),"development"!==process.env.NODE_ENV&&y&&o(N,q,{kind:E})},[E,a,y,q,N]),onTouchStart:e.useCallback(e=>{"function"==typeof f&&f(e),"development"!==process.env.NODE_ENV&&y&&o(N,q,{kind:E})},[E,f,y,q,N]),...v}]};
1
+ "use strict";require("client-only");var e=require("react"),t=require("next/navigation"),n=require("next/dist/shared/lib/router/utils/format-url"),r=require("../use-intersection/index.cjs"),o=require("../use-component-will-receive-update/index.cjs");function u(e,t,n){"undefined"!=typeof window&&Promise.resolve(e.prefetch(t,n)).catch(e=>{if("production"!==process.env.NODE_ENV)throw e})}require("../request-idle-callback/index.cjs"),exports.unstable_useNextLink=function(i,s){let{prefetch:c,ref:l,onClick:a,onMouseEnter:f,onTouchStart:p,scroll:d=!0,replace:v=!1,...E}=s;process.env.NODE_ENV;const y=null==c?"auto":"full",N=!1!==c,h=t.useRouter(),[k,m]=e.useTransition(),[b,q,x]=r.useIntersection(e.useMemo(()=>({rootMargin:"200px"}),[])),g=e.useMemo(()=>"string"==typeof i?i:n.formatUrl(i),[i]);return o.useComponentWillReceiveUpdate(x,[g]),e.useEffect(()=>{"production"===process.env.NODE_ENV&&q&&N&&u(h,g,{kind:y})},[y,q,N,g,h]),[k,{ref:e.useCallback(e=>{b(e),"function"==typeof l?l(e):l&&e&&(l.current=e)},[l,b]),onClick:e.useCallback(e=>{if("function"==typeof a&&a(e),e.defaultPrevented)return;const{nodeName:t}=e.currentTarget;!("A"===t.toUpperCase()&&function(e){const t=e.currentTarget,n=t.getAttribute("target");return n&&"_self"!==n||t.download||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e))&&(e.preventDefault(),m(()=>{h[v?"replace":"push"](g,{scroll:d})}))},[a,v,g,h,d]),onMouseEnter:e.useCallback(e=>{"function"==typeof f&&f(e),"development"!==process.env.NODE_ENV&&N&&u(h,g,{kind:y})},[y,f,N,g,h]),onTouchStart:e.useCallback(e=>{"function"==typeof p&&p(e),"development"!==process.env.NODE_ENV&&N&&u(h,g,{kind:y})},[y,p,N,g,h]),...E}]};
@@ -1 +1 @@
1
- "use strict";require("client-only");var e=require("react"),t=require("next/navigation"),r=require("next/dist/shared/lib/router/utils/format-url"),n=require("../use-intersection/index.js");function o(e,t,r){"undefined"!=typeof window&&Promise.resolve(e.prefetch(t,r)).catch(e=>{if("production"!==process.env.NODE_ENV)throw e})}require("../request-idle-callback/index.js"),exports.unstable_useNextLink=function(u,s){let{prefetch:i,ref:c,onClick:l,onMouseEnter:a,onTouchStart:f,scroll:p=!0,replace:d=!1,...v}=s;process.env.NODE_ENV;const E=null==i?"auto":"full",y=!1!==i,N=t.useRouter(),[h,k]=e.useTransition(),[b,m,g]=n.useIntersection(e.useMemo(()=>({rootMargin:"200px"}),[])),q=e.useMemo(()=>"string"==typeof u?u:r.formatUrl(u),[u]),[x,_]=e.useState(q);return x!==q&&(_(q),g()),e.useEffect(()=>{"production"===process.env.NODE_ENV&&m&&y&&o(N,q,{kind:E})},[E,m,y,q,N]),[h,{ref:e.useCallback(e=>{b(e),"function"==typeof c?c(e):c&&e&&(c.current=e)},[c,b]),onClick:e.useCallback(e=>{if("function"==typeof l&&l(e),e.defaultPrevented)return;const{nodeName:t}=e.currentTarget;!("A"===t.toUpperCase()&&function(e){const t=e.currentTarget,r=t.getAttribute("target");return r&&"_self"!==r||t.download||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e))&&(e.preventDefault(),k(()=>{N[d?"replace":"push"](q,{scroll:p})}))},[l,d,q,N,p]),onMouseEnter:e.useCallback(e=>{"function"==typeof a&&a(e),"development"!==process.env.NODE_ENV&&y&&o(N,q,{kind:E})},[E,a,y,q,N]),onTouchStart:e.useCallback(e=>{"function"==typeof f&&f(e),"development"!==process.env.NODE_ENV&&y&&o(N,q,{kind:E})},[E,f,y,q,N]),...v}]};
1
+ "use strict";require("client-only");var e=require("react"),t=require("next/navigation"),n=require("next/dist/shared/lib/router/utils/format-url"),r=require("../use-intersection/index.js"),o=require("../use-component-will-receive-update/index.js");function u(e,t,n){"undefined"!=typeof window&&Promise.resolve(e.prefetch(t,n)).catch(e=>{if("production"!==process.env.NODE_ENV)throw e})}require("../request-idle-callback/index.js"),exports.unstable_useNextLink=function(i,s){let{prefetch:c,ref:l,onClick:a,onMouseEnter:f,onTouchStart:p,scroll:d=!0,replace:v=!1,...E}=s;process.env.NODE_ENV;const y=null==c?"auto":"full",N=!1!==c,h=t.useRouter(),[k,m]=e.useTransition(),[b,q,x]=r.useIntersection(e.useMemo(()=>({rootMargin:"200px"}),[])),g=e.useMemo(()=>"string"==typeof i?i:n.formatUrl(i),[i]);return o.useComponentWillReceiveUpdate(x,[g]),e.useEffect(()=>{"production"===process.env.NODE_ENV&&q&&N&&u(h,g,{kind:y})},[y,q,N,g,h]),[k,{ref:e.useCallback(e=>{b(e),"function"==typeof l?l(e):l&&e&&(l.current=e)},[l,b]),onClick:e.useCallback(e=>{if("function"==typeof a&&a(e),e.defaultPrevented)return;const{nodeName:t}=e.currentTarget;!("A"===t.toUpperCase()&&function(e){const t=e.currentTarget,n=t.getAttribute("target");return n&&"_self"!==n||t.download||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e))&&(e.preventDefault(),m(()=>{h[v?"replace":"push"](g,{scroll:d})}))},[a,v,g,h,d]),onMouseEnter:e.useCallback(e=>{"function"==typeof f&&f(e),"development"!==process.env.NODE_ENV&&N&&u(h,g,{kind:y})},[y,f,N,g,h]),onTouchStart:e.useCallback(e=>{"function"==typeof p&&p(e),"development"!==process.env.NODE_ENV&&N&&u(h,g,{kind:y})},[y,p,N,g,h]),...E}]};
@@ -1 +1 @@
1
- import"client-only";import{useTransition as e,useMemo as t,useState as n,useEffect as o,useCallback as r}from"react";import{useRouter as i}from"next/navigation";import{formatUrl as c}from"next/dist/shared/lib/router/utils/format-url";import{useIntersection as s}from"../use-intersection/index.mjs";import"../request-idle-callback/index.mjs";function u(e,t,n){"undefined"!=typeof window&&Promise.resolve(e.prefetch(t,n)).catch(e=>{if("production"!==process.env.NODE_ENV)throw e})}const p=function(p,f){let{prefetch:l,ref:a,onClick:d,onMouseEnter:m,onTouchStart:v,scroll:E=!0,replace:y=!1,...N}=f;process.env.NODE_ENV;const h=null==l?"auto":"full",g=!1!==l,x=i(),[_,k]=e(),[D,w,O]=s(t(()=>({rootMargin:"200px"}),[])),V=t(()=>"string"==typeof p?p:c(p),[p]),[b,K]=n(V);return b!==V&&(K(V),O()),o(()=>{"production"===process.env.NODE_ENV&&w&&g&&u(x,V,{kind:h})},[h,w,g,V,x]),[_,{ref:r(e=>{D(e),"function"==typeof a?a(e):a&&e&&(a.current=e)},[a,D]),onClick:r(e=>{if("function"==typeof d&&d(e),e.defaultPrevented)return;const{nodeName:t}=e.currentTarget;!("A"===t.toUpperCase()&&function(e){const t=e.currentTarget,n=t.getAttribute("target");return n&&"_self"!==n||t.download||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e))&&(e.preventDefault(),k(()=>{x[y?"replace":"push"](V,{scroll:E})}))},[d,y,V,x,E]),onMouseEnter:r(e=>{"function"==typeof m&&m(e),"development"!==process.env.NODE_ENV&&g&&u(x,V,{kind:h})},[h,m,g,V,x]),onTouchStart:r(e=>{"function"==typeof v&&v(e),"development"!==process.env.NODE_ENV&&g&&u(x,V,{kind:h})},[h,v,g,V,x]),...N}]};export{p as unstable_useNextLink};
1
+ import"client-only";import{useTransition as e,useMemo as t,useEffect as n,useCallback as o}from"react";import{useRouter as r}from"next/navigation";import{formatUrl as i}from"next/dist/shared/lib/router/utils/format-url";import{useIntersection as c}from"../use-intersection/index.mjs";import{useComponentWillReceiveUpdate as s}from"../use-component-will-receive-update/index.mjs";import"../request-idle-callback/index.mjs";function u(e,t,n){"undefined"!=typeof window&&Promise.resolve(e.prefetch(t,n)).catch(e=>{if("production"!==process.env.NODE_ENV)throw e})}const p=function(p,l){let{prefetch:f,ref:a,onClick:d,onMouseEnter:m,onTouchStart:v,scroll:E=!0,replace:y=!1,...N}=l;process.env.NODE_ENV;const h=null==f?"auto":"full",x=!1!==f,g=r(),[_,k]=e(),[w,D,O]=c(t(()=>({rootMargin:"200px"}),[])),V=t(()=>"string"==typeof p?p:i(p),[p]);return s(O,[V]),n(()=>{"production"===process.env.NODE_ENV&&D&&x&&u(g,V,{kind:h})},[h,D,x,V,g]),[_,{ref:o(e=>{w(e),"function"==typeof a?a(e):a&&e&&(a.current=e)},[a,w]),onClick:o(e=>{if("function"==typeof d&&d(e),e.defaultPrevented)return;const{nodeName:t}=e.currentTarget;!("A"===t.toUpperCase()&&function(e){const t=e.currentTarget,n=t.getAttribute("target");return n&&"_self"!==n||t.download||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e))&&(e.preventDefault(),k(()=>{g[y?"replace":"push"](V,{scroll:E})}))},[d,y,V,g,E]),onMouseEnter:o(e=>{"function"==typeof m&&m(e),"development"!==process.env.NODE_ENV&&x&&u(g,V,{kind:h})},[h,m,x,V,g]),onTouchStart:o(e=>{"function"==typeof v&&v(e),"development"!==process.env.NODE_ENV&&x&&u(g,V,{kind:h})},[h,v,x,V,g]),...N}]};export{p as unstable_useNextLink};