foxact 0.3.11-beta.1 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foxact",
3
- "version": "0.3.11-beta.1",
3
+ "version": "0.3.11",
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": {
@@ -52,6 +52,24 @@
52
52
  "exports": {
53
53
  "./package.json": "./package.json",
54
54
  "./sizes.json": "./sizes.json",
55
+ "./browser": {
56
+ "types": "./browser/index.d.ts",
57
+ "import": {
58
+ "types": "./browser/index.d.ts",
59
+ "default": "./browser/index.mjs"
60
+ },
61
+ "require": "./browser/index.cjs",
62
+ "default": "./browser/index.cjs"
63
+ },
64
+ "./breadcrumbs": {
65
+ "types": "./breadcrumbs/index.d.ts",
66
+ "import": {
67
+ "types": "./breadcrumbs/index.d.ts",
68
+ "default": "./breadcrumbs/index.mjs"
69
+ },
70
+ "require": "./breadcrumbs/index.cjs",
71
+ "default": "./breadcrumbs/index.cjs"
72
+ },
55
73
  "./context-reducer": {
56
74
  "types": "./context-reducer/index.d.ts",
57
75
  "import": {
@@ -88,6 +106,15 @@
88
106
  "require": "./create-context-reducer/index.cjs",
89
107
  "default": "./create-context-reducer/index.cjs"
90
108
  },
109
+ "./compose-context-provider": {
110
+ "types": "./compose-context-provider/index.d.ts",
111
+ "import": {
112
+ "types": "./compose-context-provider/index.d.ts",
113
+ "default": "./compose-context-provider/index.mjs"
114
+ },
115
+ "require": "./compose-context-provider/index.cjs",
116
+ "default": "./compose-context-provider/index.cjs"
117
+ },
91
118
  "./create-context-state": {
92
119
  "types": "./create-context-state/index.d.ts",
93
120
  "import": {
@@ -106,15 +133,6 @@
106
133
  "require": "./create-fixed-array/index.cjs",
107
134
  "default": "./create-fixed-array/index.cjs"
108
135
  },
109
- "./create-local-storage-state": {
110
- "types": "./create-local-storage-state/index.d.ts",
111
- "import": {
112
- "types": "./create-local-storage-state/index.d.ts",
113
- "default": "./create-local-storage-state/index.mjs"
114
- },
115
- "require": "./create-local-storage-state/index.cjs",
116
- "default": "./create-local-storage-state/index.cjs"
117
- },
118
136
  "./create-magic-portal": {
119
137
  "types": "./create-magic-portal/index.d.ts",
120
138
  "import": {
@@ -142,14 +160,14 @@
142
160
  "require": "./create-stackless-error/index.cjs",
143
161
  "default": "./create-stackless-error/index.cjs"
144
162
  },
145
- "./create-storage-hook": {
146
- "types": "./create-storage-hook/index.d.ts",
163
+ "./create-local-storage-state": {
164
+ "types": "./create-local-storage-state/index.d.ts",
147
165
  "import": {
148
- "types": "./create-storage-hook/index.d.ts",
149
- "default": "./create-storage-hook/index.mjs"
166
+ "types": "./create-local-storage-state/index.d.ts",
167
+ "default": "./create-local-storage-state/index.mjs"
150
168
  },
151
- "require": "./create-storage-hook/index.cjs",
152
- "default": "./create-storage-hook/index.cjs"
169
+ "require": "./create-local-storage-state/index.cjs",
170
+ "default": "./create-local-storage-state/index.cjs"
153
171
  },
154
172
  "./create-storage-state-factory": {
155
173
  "types": "./create-storage-state-factory/index.d.ts",
@@ -160,6 +178,15 @@
160
178
  "require": "./create-storage-state-factory/index.cjs",
161
179
  "default": "./create-storage-state-factory/index.cjs"
162
180
  },
181
+ "./create-storage-hook": {
182
+ "types": "./create-storage-hook/index.d.ts",
183
+ "import": {
184
+ "types": "./create-storage-hook/index.d.ts",
185
+ "default": "./create-storage-hook/index.mjs"
186
+ },
187
+ "require": "./create-storage-hook/index.cjs",
188
+ "default": "./create-storage-hook/index.cjs"
189
+ },
163
190
  "./current-year": {
164
191
  "types": "./current-year/index.d.ts",
165
192
  "import": {
@@ -169,15 +196,6 @@
169
196
  "require": "./current-year/index.cjs",
170
197
  "default": "./current-year/index.cjs"
171
198
  },
172
- "./fetch-jsonp": {
173
- "types": "./fetch-jsonp/index.d.ts",
174
- "import": {
175
- "types": "./fetch-jsonp/index.d.ts",
176
- "default": "./fetch-jsonp/index.mjs"
177
- },
178
- "require": "./fetch-jsonp/index.cjs",
179
- "default": "./fetch-jsonp/index.cjs"
180
- },
181
199
  "./get-react-children": {
182
200
  "types": "./get-react-children/index.d.ts",
183
201
  "import": {
@@ -187,6 +205,15 @@
187
205
  "require": "./get-react-children/index.cjs",
188
206
  "default": "./get-react-children/index.cjs"
189
207
  },
208
+ "./fetch-jsonp": {
209
+ "types": "./fetch-jsonp/index.d.ts",
210
+ "import": {
211
+ "types": "./fetch-jsonp/index.d.ts",
212
+ "default": "./fetch-jsonp/index.mjs"
213
+ },
214
+ "require": "./fetch-jsonp/index.cjs",
215
+ "default": "./fetch-jsonp/index.cjs"
216
+ },
190
217
  "./get-single-react-children": {
191
218
  "types": "./get-single-react-children/index.d.ts",
192
219
  "import": {
@@ -259,15 +286,6 @@
259
286
  "require": "./noop/index.cjs",
260
287
  "default": "./noop/index.cjs"
261
288
  },
262
- "./noop-component": {
263
- "types": "./noop-component/index.d.ts",
264
- "import": {
265
- "types": "./noop-component/index.d.ts",
266
- "default": "./noop-component/index.mjs"
267
- },
268
- "require": "./noop-component/index.cjs",
269
- "default": "./noop-component/index.cjs"
270
- },
271
289
  "./nullthrow": {
272
290
  "types": "./nullthrow/index.d.ts",
273
291
  "import": {
@@ -286,6 +304,15 @@
286
304
  "require": "./open-new-tab/index.cjs",
287
305
  "default": "./open-new-tab/index.cjs"
288
306
  },
307
+ "./noop-component": {
308
+ "types": "./noop-component/index.d.ts",
309
+ "import": {
310
+ "types": "./noop-component/index.d.ts",
311
+ "default": "./noop-component/index.mjs"
312
+ },
313
+ "require": "./noop-component/index.cjs",
314
+ "default": "./noop-component/index.cjs"
315
+ },
289
316
  "./polymorphic": {
290
317
  "types": "./polymorphic/index.d.ts",
291
318
  "import": {
@@ -340,15 +367,6 @@
340
367
  "require": "./use/index.cjs",
341
368
  "default": "./use/index.cjs"
342
369
  },
343
- "./use-abortable-effect": {
344
- "types": "./use-abortable-effect/index.d.ts",
345
- "import": {
346
- "types": "./use-abortable-effect/index.d.ts",
347
- "default": "./use-abortable-effect/index.mjs"
348
- },
349
- "require": "./use-abortable-effect/index.cjs",
350
- "default": "./use-abortable-effect/index.cjs"
351
- },
352
370
  "./use-array": {
353
371
  "types": "./use-array/index.d.ts",
354
372
  "import": {
@@ -358,6 +376,15 @@
358
376
  "require": "./use-array/index.cjs",
359
377
  "default": "./use-array/index.cjs"
360
378
  },
379
+ "./use-abortable-effect": {
380
+ "types": "./use-abortable-effect/index.d.ts",
381
+ "import": {
382
+ "types": "./use-abortable-effect/index.d.ts",
383
+ "default": "./use-abortable-effect/index.mjs"
384
+ },
385
+ "require": "./use-abortable-effect/index.cjs",
386
+ "default": "./use-abortable-effect/index.cjs"
387
+ },
361
388
  "./use-clipboard": {
362
389
  "types": "./use-clipboard/index.d.ts",
363
390
  "import": {
@@ -394,15 +421,6 @@
394
421
  "require": "./use-debounced-state/index.cjs",
395
422
  "default": "./use-debounced-state/index.cjs"
396
423
  },
397
- "./use-debounced-value": {
398
- "types": "./use-debounced-value/index.d.ts",
399
- "import": {
400
- "types": "./use-debounced-value/index.d.ts",
401
- "default": "./use-debounced-value/index.mjs"
402
- },
403
- "require": "./use-debounced-value/index.cjs",
404
- "default": "./use-debounced-value/index.cjs"
405
- },
406
424
  "./use-error-boundary": {
407
425
  "types": "./use-error-boundary/index.d.ts",
408
426
  "import": {
@@ -412,6 +430,15 @@
412
430
  "require": "./use-error-boundary/index.cjs",
413
431
  "default": "./use-error-boundary/index.cjs"
414
432
  },
433
+ "./use-debounced-value": {
434
+ "types": "./use-debounced-value/index.d.ts",
435
+ "import": {
436
+ "types": "./use-debounced-value/index.d.ts",
437
+ "default": "./use-debounced-value/index.mjs"
438
+ },
439
+ "require": "./use-debounced-value/index.cjs",
440
+ "default": "./use-debounced-value/index.cjs"
441
+ },
415
442
  "./use-fast-click": {
416
443
  "types": "./use-fast-click/index.d.ts",
417
444
  "import": {
@@ -448,15 +475,6 @@
448
475
  "require": "./use-is-online/index.cjs",
449
476
  "default": "./use-is-online/index.cjs"
450
477
  },
451
- "./use-isomorphic-layout-effect": {
452
- "types": "./use-isomorphic-layout-effect/index.d.ts",
453
- "import": {
454
- "types": "./use-isomorphic-layout-effect/index.d.ts",
455
- "default": "./use-isomorphic-layout-effect/index.mjs"
456
- },
457
- "require": "./use-isomorphic-layout-effect/index.cjs",
458
- "default": "./use-isomorphic-layout-effect/index.cjs"
459
- },
460
478
  "./use-local-storage": {
461
479
  "types": "./use-local-storage/index.d.ts",
462
480
  "import": {
@@ -466,14 +484,23 @@
466
484
  "require": "./use-local-storage/index.cjs",
467
485
  "default": "./use-local-storage/index.cjs"
468
486
  },
469
- "./use-map": {
470
- "types": "./use-map/index.d.ts",
487
+ "./use-isomorphic-layout-effect": {
488
+ "types": "./use-isomorphic-layout-effect/index.d.ts",
471
489
  "import": {
472
- "types": "./use-map/index.d.ts",
473
- "default": "./use-map/index.mjs"
490
+ "types": "./use-isomorphic-layout-effect/index.d.ts",
491
+ "default": "./use-isomorphic-layout-effect/index.mjs"
474
492
  },
475
- "require": "./use-map/index.cjs",
476
- "default": "./use-map/index.cjs"
493
+ "require": "./use-isomorphic-layout-effect/index.cjs",
494
+ "default": "./use-isomorphic-layout-effect/index.cjs"
495
+ },
496
+ "./use-page-visibility": {
497
+ "types": "./use-page-visibility/index.d.ts",
498
+ "import": {
499
+ "types": "./use-page-visibility/index.d.ts",
500
+ "default": "./use-page-visibility/index.mjs"
501
+ },
502
+ "require": "./use-page-visibility/index.cjs",
503
+ "default": "./use-page-visibility/index.cjs"
477
504
  },
478
505
  "./use-media-query": {
479
506
  "types": "./use-media-query/index.d.ts",
@@ -484,14 +511,14 @@
484
511
  "require": "./use-media-query/index.cjs",
485
512
  "default": "./use-media-query/index.cjs"
486
513
  },
487
- "./use-page-visibility": {
488
- "types": "./use-page-visibility/index.d.ts",
514
+ "./use-map": {
515
+ "types": "./use-map/index.d.ts",
489
516
  "import": {
490
- "types": "./use-page-visibility/index.d.ts",
491
- "default": "./use-page-visibility/index.mjs"
517
+ "types": "./use-map/index.d.ts",
518
+ "default": "./use-map/index.mjs"
492
519
  },
493
- "require": "./use-page-visibility/index.cjs",
494
- "default": "./use-page-visibility/index.cjs"
520
+ "require": "./use-map/index.cjs",
521
+ "default": "./use-map/index.cjs"
495
522
  },
496
523
  "./use-readonly-search-params": {
497
524
  "types": "./use-readonly-search-params/index.d.ts",
@@ -502,15 +529,6 @@
502
529
  "require": "./use-readonly-search-params/index.cjs",
503
530
  "default": "./use-readonly-search-params/index.cjs"
504
531
  },
505
- "./use-resizing": {
506
- "types": "./use-resizing/index.d.ts",
507
- "import": {
508
- "types": "./use-resizing/index.d.ts",
509
- "default": "./use-resizing/index.mjs"
510
- },
511
- "require": "./use-resizing/index.cjs",
512
- "default": "./use-resizing/index.cjs"
513
- },
514
532
  "./use-retimer": {
515
533
  "types": "./use-retimer/index.d.ts",
516
534
  "import": {
@@ -520,6 +538,15 @@
520
538
  "require": "./use-retimer/index.cjs",
521
539
  "default": "./use-retimer/index.cjs"
522
540
  },
541
+ "./use-resizing": {
542
+ "types": "./use-resizing/index.d.ts",
543
+ "import": {
544
+ "types": "./use-resizing/index.d.ts",
545
+ "default": "./use-resizing/index.mjs"
546
+ },
547
+ "require": "./use-resizing/index.cjs",
548
+ "default": "./use-resizing/index.cjs"
549
+ },
523
550
  "./use-session-storage": {
524
551
  "types": "./use-session-storage/index.d.ts",
525
552
  "import": {
@@ -529,15 +556,6 @@
529
556
  "require": "./use-session-storage/index.cjs",
530
557
  "default": "./use-session-storage/index.cjs"
531
558
  },
532
- "./use-set": {
533
- "types": "./use-set/index.d.ts",
534
- "import": {
535
- "types": "./use-set/index.d.ts",
536
- "default": "./use-set/index.mjs"
537
- },
538
- "require": "./use-set/index.cjs",
539
- "default": "./use-set/index.cjs"
540
- },
541
559
  "./use-singleton": {
542
560
  "types": "./use-singleton/index.d.ts",
543
561
  "import": {
@@ -547,6 +565,15 @@
547
565
  "require": "./use-singleton/index.cjs",
548
566
  "default": "./use-singleton/index.cjs"
549
567
  },
568
+ "./use-set": {
569
+ "types": "./use-set/index.d.ts",
570
+ "import": {
571
+ "types": "./use-set/index.d.ts",
572
+ "default": "./use-set/index.mjs"
573
+ },
574
+ "require": "./use-set/index.cjs",
575
+ "default": "./use-set/index.cjs"
576
+ },
550
577
  "./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired": {
551
578
  "types": "./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.d.ts",
552
579
  "import": {
@@ -591,33 +618,6 @@
591
618
  },
592
619
  "require": "./use-url-hash-state/index.cjs",
593
620
  "default": "./use-url-hash-state/index.cjs"
594
- },
595
- "./breadcrumbs": {
596
- "types": "./breadcrumbs/index.d.ts",
597
- "import": {
598
- "types": "./breadcrumbs/index.d.ts",
599
- "default": "./breadcrumbs/index.mjs"
600
- },
601
- "require": "./breadcrumbs/index.cjs",
602
- "default": "./breadcrumbs/index.cjs"
603
- },
604
- "./compose-context-provider": {
605
- "types": "./compose-context-provider/index.d.ts",
606
- "import": {
607
- "types": "./compose-context-provider/index.d.ts",
608
- "default": "./compose-context-provider/index.mjs"
609
- },
610
- "require": "./compose-context-provider/index.cjs",
611
- "default": "./compose-context-provider/index.cjs"
612
- },
613
- "./browser": {
614
- "types": "./browser/index.d.ts",
615
- "import": {
616
- "types": "./browser/index.d.ts",
617
- "default": "./browser/index.mjs"
618
- },
619
- "require": "./browser/index.cjs",
620
- "default": "./browser/index.cjs"
621
621
  }
622
622
  }
623
623
  }
package/sizes.json CHANGED
@@ -1 +1 @@
1
- {"total":{"raw":30266,"gzip":18315,"br":15425,"zstd":18362},"exports":{"create-context-state":{"raw":59,"gzip":72,"br":59,"zstd":68},"create-breadcrumbs":{"raw":56,"gzip":68,"br":52,"zstd":65},"create-context-reducer":{"raw":63,"gzip":74,"br":64,"zstd":72},"create-magic-portal":{"raw":57,"gzip":71,"br":53,"zstd":66},"create-fixed-array":{"raw":452,"gzip":282,"br":248,"zstd":282},"create-local-storage-state":{"raw":169,"gzip":138,"br":111,"zstd":130},"create-stackless-error":{"raw":278,"gzip":198,"br":162,"zstd":188},"create-session-storage-state":{"raw":173,"gzip":138,"br":108,"zstd":129},"context-state":{"raw":402,"gzip":259,"br":218,"zstd":259},"create-storage-state-factory":{"raw":364,"gzip":248,"br":197,"zstd":243},"fetch-jsonp":{"raw":924,"gzip":570,"br":446,"zstd":576},"create-storage-hook":{"raw":2418,"gzip":957,"br":835,"zstd":1000},"current-year":{"raw":508,"gzip":348,"br":283,"zstd":349},"context-reducer":{"raw":557,"gzip":332,"br":319,"zstd":336},"get-single-react-children":{"raw":68,"gzip":80,"br":70,"zstd":77},"is-safari":{"raw":247,"gzip":175,"br":133,"zstd":169},"invariant":{"raw":178,"gzip":156,"br":118,"zstd":149},"magic-portal":{"raw":1013,"gzip":517,"br":445,"zstd":526},"no-ssr":{"raw":381,"gzip":281,"br":236,"zstd":285},"merge-props":{"raw":1030,"gzip":559,"br":501,"zstd":577},"noop":{"raw":33,"gzip":53,"br":37,"zstd":42},"merge-refs":{"raw":525,"gzip":280,"br":235,"zstd":278},"noop-component":{"raw":142,"gzip":130,"br":111,"zstd":119},"nullthrow":{"raw":187,"gzip":163,"br":121,"zstd":156},"open-new-tab":{"raw":335,"gzip":255,"br":187,"zstd":255},"polymorphic":{"raw":284,"gzip":212,"br":180,"zstd":199},"request-idle-callback":{"raw":392,"gzip":221,"br":171,"zstd":213},"types":{"raw":0,"gzip":20,"br":1,"zstd":9},"typescript-happy-forward-ref":{"raw":119,"gzip":103,"br":80,"zstd":91},"rem":{"raw":823,"gzip":395,"br":350,"zstd":402},"get-react-children":{"raw":568,"gzip":354,"br":284,"zstd":355},"use-abortable-effect":{"raw":215,"gzip":170,"br":144,"zstd":166},"use-array":{"raw":334,"gzip":243,"br":206,"zstd":236},"use-composition-input":{"raw":470,"gzip":286,"br":241,"zstd":296},"use-debounced-value":{"raw":553,"gzip":358,"br":320,"zstd":360},"use-error-boundary":{"raw":252,"gzip":195,"br":165,"zstd":187},"use-component-will-receive-update":{"raw":220,"gzip":190,"br":157,"zstd":179},"use-fast-click":{"raw":499,"gzip":350,"br":284,"zstd":355},"use-is-client":{"raw":184,"gzip":158,"br":130,"zstd":149},"use-is-online":{"raw":288,"gzip":216,"br":196,"zstd":205},"use-isomorphic-layout-effect":{"raw":169,"gzip":137,"br":110,"zstd":127},"use-clipboard":{"raw":2718,"gzip":1333,"br":1141,"zstd":1398},"use-intersection":{"raw":1363,"gzip":716,"br":654,"zstd":750},"use-local-storage":{"raw":192,"gzip":143,"br":114,"zstd":137},"use-map":{"raw":384,"gzip":256,"br":220,"zstd":262},"use-page-visibility":{"raw":283,"gzip":211,"br":162,"zstd":203},"use-debounced-state":{"raw":401,"gzip":282,"br":244,"zstd":288},"use-resizing":{"raw":511,"gzip":334,"br":294,"zstd":342},"use-media-query":{"raw":483,"gzip":322,"br":256,"zstd":325},"use-session-storage":{"raw":198,"gzip":141,"br":118,"zstd":137},"use-set":{"raw":368,"gzip":247,"br":211,"zstd":255},"use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired":{"raw":443,"gzip":320,"br":252,"zstd":320},"use-typescript-happy-callback":{"raw":107,"gzip":102,"br":77,"zstd":94},"use-retimer":{"raw":194,"gzip":166,"br":127,"zstd":154},"use-readonly-search-params":{"raw":2304,"gzip":1047,"br":901,"zstd":1080},"use-state-with-deps":{"raw":747,"gzip":479,"br":418,"zstd":488},"use-uncontrolled":{"raw":388,"gzip":273,"br":230,"zstd":277},"compose-context-provider":{"raw":177,"gzip":155,"br":122,"zstd":144},"use-singleton":{"raw":149,"gzip":135,"br":116,"zstd":123},"use":{"raw":301,"gzip":200,"br":177,"zstd":193},"use-url-hash-state":{"raw":1001,"gzip":572,"br":495,"zstd":582},"breadcrumbs":{"raw":879,"gzip":467,"br":395,"zstd":472},"browser":{"raw":686,"gzip":402,"br":333,"zstd":413}}}
1
+ {"total":{"raw":30280,"gzip":18326,"br":15438,"zstd":18374},"exports":{"browser":{"raw":686,"gzip":402,"br":333,"zstd":413},"create-context-reducer":{"raw":63,"gzip":74,"br":64,"zstd":72},"compose-context-provider":{"raw":177,"gzip":155,"br":122,"zstd":144},"create-breadcrumbs":{"raw":56,"gzip":68,"br":52,"zstd":65},"create-context-state":{"raw":59,"gzip":72,"br":59,"zstd":68},"create-magic-portal":{"raw":57,"gzip":71,"br":53,"zstd":66},"create-fixed-array":{"raw":452,"gzip":282,"br":248,"zstd":282},"context-reducer":{"raw":557,"gzip":332,"br":319,"zstd":336},"create-stackless-error":{"raw":278,"gzip":198,"br":162,"zstd":188},"create-session-storage-state":{"raw":173,"gzip":138,"br":108,"zstd":129},"create-local-storage-state":{"raw":169,"gzip":138,"br":111,"zstd":130},"create-storage-state-factory":{"raw":364,"gzip":248,"br":197,"zstd":243},"breadcrumbs":{"raw":879,"gzip":467,"br":395,"zstd":472},"current-year":{"raw":508,"gzip":348,"br":283,"zstd":349},"context-state":{"raw":402,"gzip":259,"br":218,"zstd":259},"get-single-react-children":{"raw":68,"gzip":80,"br":70,"zstd":77},"fetch-jsonp":{"raw":924,"gzip":570,"br":446,"zstd":576},"is-safari":{"raw":247,"gzip":175,"br":133,"zstd":169},"magic-portal":{"raw":1013,"gzip":517,"br":445,"zstd":526},"get-react-children":{"raw":568,"gzip":354,"br":284,"zstd":355},"merge-refs":{"raw":525,"gzip":280,"br":235,"zstd":278},"no-ssr":{"raw":381,"gzip":281,"br":236,"zstd":285},"create-storage-hook":{"raw":2418,"gzip":957,"br":835,"zstd":1000},"noop":{"raw":33,"gzip":53,"br":37,"zstd":42},"open-new-tab":{"raw":335,"gzip":255,"br":187,"zstd":255},"nullthrow":{"raw":187,"gzip":163,"br":121,"zstd":156},"merge-props":{"raw":1030,"gzip":559,"br":501,"zstd":577},"noop-component":{"raw":142,"gzip":130,"br":111,"zstd":119},"polymorphic":{"raw":284,"gzip":212,"br":180,"zstd":199},"types":{"raw":0,"gzip":20,"br":1,"zstd":9},"request-idle-callback":{"raw":392,"gzip":221,"br":171,"zstd":213},"use":{"raw":301,"gzip":200,"br":177,"zstd":193},"typescript-happy-forward-ref":{"raw":119,"gzip":103,"br":80,"zstd":91},"use-abortable-effect":{"raw":215,"gzip":170,"br":144,"zstd":166},"rem":{"raw":823,"gzip":395,"br":350,"zstd":402},"use-component-will-receive-update":{"raw":220,"gzip":190,"br":157,"zstd":179},"use-debounced-state":{"raw":401,"gzip":282,"br":244,"zstd":288},"invariant":{"raw":178,"gzip":156,"br":118,"zstd":149},"use-composition-input":{"raw":470,"gzip":286,"br":241,"zstd":296},"use-error-boundary":{"raw":252,"gzip":195,"br":165,"zstd":187},"use-debounced-value":{"raw":553,"gzip":358,"br":320,"zstd":360},"use-array":{"raw":334,"gzip":243,"br":206,"zstd":236},"use-clipboard":{"raw":2718,"gzip":1333,"br":1141,"zstd":1398},"use-local-storage":{"raw":192,"gzip":143,"br":114,"zstd":137},"use-intersection":{"raw":1363,"gzip":716,"br":654,"zstd":750},"use-is-client":{"raw":184,"gzip":158,"br":130,"zstd":149},"use-is-online":{"raw":288,"gzip":216,"br":196,"zstd":205},"use-page-visibility":{"raw":283,"gzip":211,"br":162,"zstd":203},"use-fast-click":{"raw":499,"gzip":350,"br":284,"zstd":355},"use-map":{"raw":384,"gzip":256,"br":220,"zstd":262},"use-media-query":{"raw":483,"gzip":322,"br":256,"zstd":325},"use-singleton":{"raw":149,"gzip":135,"br":116,"zstd":123},"use-resizing":{"raw":511,"gzip":334,"br":294,"zstd":342},"use-set":{"raw":368,"gzip":247,"br":211,"zstd":255},"use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired":{"raw":443,"gzip":320,"br":252,"zstd":320},"use-typescript-happy-callback":{"raw":107,"gzip":102,"br":77,"zstd":94},"use-state-with-deps":{"raw":747,"gzip":479,"br":418,"zstd":488},"use-isomorphic-layout-effect":{"raw":169,"gzip":137,"br":110,"zstd":127},"use-retimer":{"raw":194,"gzip":166,"br":127,"zstd":154},"use-session-storage":{"raw":198,"gzip":141,"br":118,"zstd":137},"use-uncontrolled":{"raw":388,"gzip":273,"br":230,"zstd":277},"use-url-hash-state":{"raw":1001,"gzip":572,"br":495,"zstd":582},"use-readonly-search-params":{"raw":2318,"gzip":1058,"br":914,"zstd":1092}}}
@@ -1 +1,2 @@
1
+ 'use client';
1
2
  "use strict";var e=require("react/jsx-runtime"),r=require("event-target-bus/react"),t=require("../no-ssr/index.cjs"),n=require("react");class a extends Error{constructor(){var e;super("[foxact/use-readonly-search-params] Method unavailable on `ReadonlyURLSearchParams`"),(e="name")in this?Object.defineProperty(this,e,{value:"ReadonlyURLSearchParamsError",enumerable:!0,configurable:!0,writable:!0}):this[e]="ReadonlyURLSearchParamsError"}}class o extends URLSearchParams{append(){throw new a}delete(){throw new a}set(){throw new a}sort(){throw new a}}const s=r.createSyncExternalStoreSubscribe(()=>window,"popstate"),c=n.createContext({hasProvider:!1,subscribe:s});let u=0,i=null,l=null;function h(){return"u"<typeof window?new o:null!==l&&window.location.search===i?l:l=new o(i=window.location.search)}function d(){throw t.noSSRError('[foxact] useReadonlySearchParams cannot be used on the server without a "getServerDefaultValue" function')}exports.ReadonlySearchParamsProvider=function(r){let{children:t}=r;const a=n.useContext(c),o=n.useMemo(()=>(function(){const e=new Set;return{contextValue:{hasProvider:!0,subscribe:r=>{const t=s(r);return e.add(r),()=>{t(),e.delete(r)}}},notify:()=>e.forEach(e=>e())}})(),[]);return n.useEffect(()=>{if(a.hasProvider)return;if("production"!==process.env.NODE_ENV&&u>0)throw Error("[foxact/use-readonly-search-params] Multiple non-nested ReadonlySearchParamsProvider instances are mounted. Use a single top-level provider or nest them.");const e=function(e){const r=window.history,t=r.pushState,n=r.replaceState,a=function(){for(var r=arguments.length,n=Array(r),a=0;a<r;a++)n[a]=arguments[a];t.apply(this,n),e()},o=function(){for(var r=arguments.length,t=Array(r),a=0;a<r;a++)t[a]=arguments[a];n.apply(this,t),e()};return r.pushState=a,r.replaceState=o,()=>{r.pushState===a&&(r.pushState=t),r.replaceState===o&&(r.replaceState=n)}}(o.notify);return"production"!==process.env.NODE_ENV&&(u+=1),()=>{e(),"production"!==process.env.NODE_ENV&&(u-=1)}},[o,a.hasProvider]),e.jsx(c.Provider,{value:a.hasProvider?a:o.contextValue,children:t})},exports.ReadonlyURLSearchParams=o,exports.useReadonlySearchParams=function(e){const{subscribe:r}=n.useContext(c);return n.useSyncExternalStore(r,h,null==e?d:()=>{const r=e();return r instanceof o?r:new o(r)})};
@@ -1 +1,2 @@
1
+ 'use client';
1
2
  import{jsx as e}from"react/jsx-runtime";import{createSyncExternalStoreSubscribe as r}from"event-target-bus/react";import{noSSRError as t}from"../no-ssr/index.mjs";import{useContext as n,useMemo as a,useEffect as o,useSyncExternalStore as s,createContext as c}from"react";class i extends Error{constructor(){var e;super("[foxact/use-readonly-search-params] Method unavailable on `ReadonlyURLSearchParams`"),(e="name")in this?Object.defineProperty(this,e,{value:"ReadonlyURLSearchParamsError",enumerable:!0,configurable:!0,writable:!0}):this[e]="ReadonlyURLSearchParamsError"}}class u extends URLSearchParams{append(){throw new i}delete(){throw new i}set(){throw new i}sort(){throw new i}}const l=r(()=>window,"popstate"),h=c({hasProvider:!1,subscribe:l});let d=0;function p(r){let{children:t}=r;const s=n(h),c=a(()=>(function(){const e=new Set;return{contextValue:{hasProvider:!0,subscribe:r=>{const t=l(r);return e.add(r),()=>{t(),e.delete(r)}}},notify:()=>e.forEach(e=>e())}})(),[]);return o(()=>{if(s.hasProvider)return;if("production"!==process.env.NODE_ENV&&d>0)throw Error("[foxact/use-readonly-search-params] Multiple non-nested ReadonlySearchParamsProvider instances are mounted. Use a single top-level provider or nest them.");const e=function(e){const r=window.history,t=r.pushState,n=r.replaceState,a=function(){for(var r=arguments.length,n=Array(r),a=0;a<r;a++)n[a]=arguments[a];t.apply(this,n),e()},o=function(){for(var r=arguments.length,t=Array(r),a=0;a<r;a++)t[a]=arguments[a];n.apply(this,t),e()};return r.pushState=a,r.replaceState=o,()=>{r.pushState===a&&(r.pushState=t),r.replaceState===o&&(r.replaceState=n)}}(c.notify);return"production"!==process.env.NODE_ENV&&(d+=1),()=>{e(),"production"!==process.env.NODE_ENV&&(d-=1)}},[c,s.hasProvider]),e(h.Provider,{value:s.hasProvider?s:c.contextValue,children:t})}let f=null,w=null;function m(){return"u"<typeof window?new u:null!==w&&window.location.search===f?w:w=new u(f=window.location.search)}function v(){throw t('[foxact] useReadonlySearchParams cannot be used on the server without a "getServerDefaultValue" function')}function y(e){const{subscribe:r}=n(h);return s(r,m,null==e?v:()=>{const r=e();return r instanceof u?r:new u(r)})}export{p as ReadonlySearchParamsProvider,u as ReadonlyURLSearchParams,y as useReadonlySearchParams};