foxact 0.3.11 → 0.3.12

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",
3
+ "version": "0.3.12",
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,23 +52,14 @@
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",
55
+ "./compose-context-provider": {
56
+ "types": "./compose-context-provider/index.d.ts",
66
57
  "import": {
67
- "types": "./breadcrumbs/index.d.ts",
68
- "default": "./breadcrumbs/index.mjs"
58
+ "types": "./compose-context-provider/index.d.ts",
59
+ "default": "./compose-context-provider/index.mjs"
69
60
  },
70
- "require": "./breadcrumbs/index.cjs",
71
- "default": "./breadcrumbs/index.cjs"
61
+ "require": "./compose-context-provider/index.cjs",
62
+ "default": "./compose-context-provider/index.cjs"
72
63
  },
73
64
  "./context-reducer": {
74
65
  "types": "./context-reducer/index.d.ts",
@@ -97,6 +88,24 @@
97
88
  "require": "./create-breadcrumbs/index.cjs",
98
89
  "default": "./create-breadcrumbs/index.cjs"
99
90
  },
91
+ "./browser": {
92
+ "types": "./browser/index.d.ts",
93
+ "import": {
94
+ "types": "./browser/index.d.ts",
95
+ "default": "./browser/index.mjs"
96
+ },
97
+ "require": "./browser/index.cjs",
98
+ "default": "./browser/index.cjs"
99
+ },
100
+ "./breadcrumbs": {
101
+ "types": "./breadcrumbs/index.d.ts",
102
+ "import": {
103
+ "types": "./breadcrumbs/index.d.ts",
104
+ "default": "./breadcrumbs/index.mjs"
105
+ },
106
+ "require": "./breadcrumbs/index.cjs",
107
+ "default": "./breadcrumbs/index.cjs"
108
+ },
100
109
  "./create-context-reducer": {
101
110
  "types": "./create-context-reducer/index.d.ts",
102
111
  "import": {
@@ -106,15 +115,6 @@
106
115
  "require": "./create-context-reducer/index.cjs",
107
116
  "default": "./create-context-reducer/index.cjs"
108
117
  },
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
- },
118
118
  "./create-context-state": {
119
119
  "types": "./create-context-state/index.d.ts",
120
120
  "import": {
@@ -133,6 +133,15 @@
133
133
  "require": "./create-fixed-array/index.cjs",
134
134
  "default": "./create-fixed-array/index.cjs"
135
135
  },
136
+ "./create-local-storage-state": {
137
+ "types": "./create-local-storage-state/index.d.ts",
138
+ "import": {
139
+ "types": "./create-local-storage-state/index.d.ts",
140
+ "default": "./create-local-storage-state/index.mjs"
141
+ },
142
+ "require": "./create-local-storage-state/index.cjs",
143
+ "default": "./create-local-storage-state/index.cjs"
144
+ },
136
145
  "./create-magic-portal": {
137
146
  "types": "./create-magic-portal/index.d.ts",
138
147
  "import": {
@@ -142,15 +151,6 @@
142
151
  "require": "./create-magic-portal/index.cjs",
143
152
  "default": "./create-magic-portal/index.cjs"
144
153
  },
145
- "./create-session-storage-state": {
146
- "types": "./create-session-storage-state/index.d.ts",
147
- "import": {
148
- "types": "./create-session-storage-state/index.d.ts",
149
- "default": "./create-session-storage-state/index.mjs"
150
- },
151
- "require": "./create-session-storage-state/index.cjs",
152
- "default": "./create-session-storage-state/index.cjs"
153
- },
154
154
  "./create-stackless-error": {
155
155
  "types": "./create-stackless-error/index.d.ts",
156
156
  "import": {
@@ -160,14 +160,23 @@
160
160
  "require": "./create-stackless-error/index.cjs",
161
161
  "default": "./create-stackless-error/index.cjs"
162
162
  },
163
- "./create-local-storage-state": {
164
- "types": "./create-local-storage-state/index.d.ts",
163
+ "./create-storage-hook": {
164
+ "types": "./create-storage-hook/index.d.ts",
165
165
  "import": {
166
- "types": "./create-local-storage-state/index.d.ts",
167
- "default": "./create-local-storage-state/index.mjs"
166
+ "types": "./create-storage-hook/index.d.ts",
167
+ "default": "./create-storage-hook/index.mjs"
168
168
  },
169
- "require": "./create-local-storage-state/index.cjs",
170
- "default": "./create-local-storage-state/index.cjs"
169
+ "require": "./create-storage-hook/index.cjs",
170
+ "default": "./create-storage-hook/index.cjs"
171
+ },
172
+ "./create-session-storage-state": {
173
+ "types": "./create-session-storage-state/index.d.ts",
174
+ "import": {
175
+ "types": "./create-session-storage-state/index.d.ts",
176
+ "default": "./create-session-storage-state/index.mjs"
177
+ },
178
+ "require": "./create-session-storage-state/index.cjs",
179
+ "default": "./create-session-storage-state/index.cjs"
171
180
  },
172
181
  "./create-storage-state-factory": {
173
182
  "types": "./create-storage-state-factory/index.d.ts",
@@ -178,15 +187,6 @@
178
187
  "require": "./create-storage-state-factory/index.cjs",
179
188
  "default": "./create-storage-state-factory/index.cjs"
180
189
  },
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
- },
190
190
  "./current-year": {
191
191
  "types": "./current-year/index.d.ts",
192
192
  "import": {
@@ -196,15 +196,6 @@
196
196
  "require": "./current-year/index.cjs",
197
197
  "default": "./current-year/index.cjs"
198
198
  },
199
- "./get-react-children": {
200
- "types": "./get-react-children/index.d.ts",
201
- "import": {
202
- "types": "./get-react-children/index.d.ts",
203
- "default": "./get-react-children/index.mjs"
204
- },
205
- "require": "./get-react-children/index.cjs",
206
- "default": "./get-react-children/index.cjs"
207
- },
208
199
  "./fetch-jsonp": {
209
200
  "types": "./fetch-jsonp/index.d.ts",
210
201
  "import": {
@@ -214,6 +205,15 @@
214
205
  "require": "./fetch-jsonp/index.cjs",
215
206
  "default": "./fetch-jsonp/index.cjs"
216
207
  },
208
+ "./get-react-children": {
209
+ "types": "./get-react-children/index.d.ts",
210
+ "import": {
211
+ "types": "./get-react-children/index.d.ts",
212
+ "default": "./get-react-children/index.mjs"
213
+ },
214
+ "require": "./get-react-children/index.cjs",
215
+ "default": "./get-react-children/index.cjs"
216
+ },
217
217
  "./get-single-react-children": {
218
218
  "types": "./get-single-react-children/index.d.ts",
219
219
  "import": {
@@ -241,15 +241,6 @@
241
241
  "require": "./is-safari/index.cjs",
242
242
  "default": "./is-safari/index.cjs"
243
243
  },
244
- "./magic-portal": {
245
- "types": "./magic-portal/index.d.ts",
246
- "import": {
247
- "types": "./magic-portal/index.d.ts",
248
- "default": "./magic-portal/index.mjs"
249
- },
250
- "require": "./magic-portal/index.cjs",
251
- "default": "./magic-portal/index.cjs"
252
- },
253
244
  "./merge-props": {
254
245
  "types": "./merge-props/index.d.ts",
255
246
  "import": {
@@ -259,6 +250,15 @@
259
250
  "require": "./merge-props/index.cjs",
260
251
  "default": "./merge-props/index.cjs"
261
252
  },
253
+ "./magic-portal": {
254
+ "types": "./magic-portal/index.d.ts",
255
+ "import": {
256
+ "types": "./magic-portal/index.d.ts",
257
+ "default": "./magic-portal/index.mjs"
258
+ },
259
+ "require": "./magic-portal/index.cjs",
260
+ "default": "./magic-portal/index.cjs"
261
+ },
262
262
  "./merge-refs": {
263
263
  "types": "./merge-refs/index.d.ts",
264
264
  "import": {
@@ -286,6 +286,15 @@
286
286
  "require": "./noop/index.cjs",
287
287
  "default": "./noop/index.cjs"
288
288
  },
289
+ "./noop-component": {
290
+ "types": "./noop-component/index.d.ts",
291
+ "import": {
292
+ "types": "./noop-component/index.d.ts",
293
+ "default": "./noop-component/index.mjs"
294
+ },
295
+ "require": "./noop-component/index.cjs",
296
+ "default": "./noop-component/index.cjs"
297
+ },
289
298
  "./nullthrow": {
290
299
  "types": "./nullthrow/index.d.ts",
291
300
  "import": {
@@ -304,15 +313,6 @@
304
313
  "require": "./open-new-tab/index.cjs",
305
314
  "default": "./open-new-tab/index.cjs"
306
315
  },
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
- },
316
316
  "./polymorphic": {
317
317
  "types": "./polymorphic/index.d.ts",
318
318
  "import": {
@@ -367,15 +367,6 @@
367
367
  "require": "./use/index.cjs",
368
368
  "default": "./use/index.cjs"
369
369
  },
370
- "./use-array": {
371
- "types": "./use-array/index.d.ts",
372
- "import": {
373
- "types": "./use-array/index.d.ts",
374
- "default": "./use-array/index.mjs"
375
- },
376
- "require": "./use-array/index.cjs",
377
- "default": "./use-array/index.cjs"
378
- },
379
370
  "./use-abortable-effect": {
380
371
  "types": "./use-abortable-effect/index.d.ts",
381
372
  "import": {
@@ -385,6 +376,15 @@
385
376
  "require": "./use-abortable-effect/index.cjs",
386
377
  "default": "./use-abortable-effect/index.cjs"
387
378
  },
379
+ "./use-array": {
380
+ "types": "./use-array/index.d.ts",
381
+ "import": {
382
+ "types": "./use-array/index.d.ts",
383
+ "default": "./use-array/index.mjs"
384
+ },
385
+ "require": "./use-array/index.cjs",
386
+ "default": "./use-array/index.cjs"
387
+ },
388
388
  "./use-clipboard": {
389
389
  "types": "./use-clipboard/index.d.ts",
390
390
  "import": {
@@ -439,15 +439,6 @@
439
439
  "require": "./use-debounced-value/index.cjs",
440
440
  "default": "./use-debounced-value/index.cjs"
441
441
  },
442
- "./use-fast-click": {
443
- "types": "./use-fast-click/index.d.ts",
444
- "import": {
445
- "types": "./use-fast-click/index.d.ts",
446
- "default": "./use-fast-click/index.mjs"
447
- },
448
- "require": "./use-fast-click/index.cjs",
449
- "default": "./use-fast-click/index.cjs"
450
- },
451
442
  "./use-intersection": {
452
443
  "types": "./use-intersection/index.d.ts",
453
444
  "import": {
@@ -457,6 +448,15 @@
457
448
  "require": "./use-intersection/index.cjs",
458
449
  "default": "./use-intersection/index.cjs"
459
450
  },
451
+ "./use-fast-click": {
452
+ "types": "./use-fast-click/index.d.ts",
453
+ "import": {
454
+ "types": "./use-fast-click/index.d.ts",
455
+ "default": "./use-fast-click/index.mjs"
456
+ },
457
+ "require": "./use-fast-click/index.cjs",
458
+ "default": "./use-fast-click/index.cjs"
459
+ },
460
460
  "./use-is-client": {
461
461
  "types": "./use-is-client/index.d.ts",
462
462
  "import": {
@@ -475,15 +475,6 @@
475
475
  "require": "./use-is-online/index.cjs",
476
476
  "default": "./use-is-online/index.cjs"
477
477
  },
478
- "./use-local-storage": {
479
- "types": "./use-local-storage/index.d.ts",
480
- "import": {
481
- "types": "./use-local-storage/index.d.ts",
482
- "default": "./use-local-storage/index.mjs"
483
- },
484
- "require": "./use-local-storage/index.cjs",
485
- "default": "./use-local-storage/index.cjs"
486
- },
487
478
  "./use-isomorphic-layout-effect": {
488
479
  "types": "./use-isomorphic-layout-effect/index.d.ts",
489
480
  "import": {
@@ -493,15 +484,6 @@
493
484
  "require": "./use-isomorphic-layout-effect/index.cjs",
494
485
  "default": "./use-isomorphic-layout-effect/index.cjs"
495
486
  },
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"
504
- },
505
487
  "./use-media-query": {
506
488
  "types": "./use-media-query/index.d.ts",
507
489
  "import": {
@@ -511,14 +493,14 @@
511
493
  "require": "./use-media-query/index.cjs",
512
494
  "default": "./use-media-query/index.cjs"
513
495
  },
514
- "./use-map": {
515
- "types": "./use-map/index.d.ts",
496
+ "./use-page-visibility": {
497
+ "types": "./use-page-visibility/index.d.ts",
516
498
  "import": {
517
- "types": "./use-map/index.d.ts",
518
- "default": "./use-map/index.mjs"
499
+ "types": "./use-page-visibility/index.d.ts",
500
+ "default": "./use-page-visibility/index.mjs"
519
501
  },
520
- "require": "./use-map/index.cjs",
521
- "default": "./use-map/index.cjs"
502
+ "require": "./use-page-visibility/index.cjs",
503
+ "default": "./use-page-visibility/index.cjs"
522
504
  },
523
505
  "./use-readonly-search-params": {
524
506
  "types": "./use-readonly-search-params/index.d.ts",
@@ -529,15 +511,6 @@
529
511
  "require": "./use-readonly-search-params/index.cjs",
530
512
  "default": "./use-readonly-search-params/index.cjs"
531
513
  },
532
- "./use-retimer": {
533
- "types": "./use-retimer/index.d.ts",
534
- "import": {
535
- "types": "./use-retimer/index.d.ts",
536
- "default": "./use-retimer/index.mjs"
537
- },
538
- "require": "./use-retimer/index.cjs",
539
- "default": "./use-retimer/index.cjs"
540
- },
541
514
  "./use-resizing": {
542
515
  "types": "./use-resizing/index.d.ts",
543
516
  "import": {
@@ -556,14 +529,23 @@
556
529
  "require": "./use-session-storage/index.cjs",
557
530
  "default": "./use-session-storage/index.cjs"
558
531
  },
559
- "./use-singleton": {
560
- "types": "./use-singleton/index.d.ts",
532
+ "./use-local-storage": {
533
+ "types": "./use-local-storage/index.d.ts",
561
534
  "import": {
562
- "types": "./use-singleton/index.d.ts",
563
- "default": "./use-singleton/index.mjs"
535
+ "types": "./use-local-storage/index.d.ts",
536
+ "default": "./use-local-storage/index.mjs"
564
537
  },
565
- "require": "./use-singleton/index.cjs",
566
- "default": "./use-singleton/index.cjs"
538
+ "require": "./use-local-storage/index.cjs",
539
+ "default": "./use-local-storage/index.cjs"
540
+ },
541
+ "./use-retimer": {
542
+ "types": "./use-retimer/index.d.ts",
543
+ "import": {
544
+ "types": "./use-retimer/index.d.ts",
545
+ "default": "./use-retimer/index.mjs"
546
+ },
547
+ "require": "./use-retimer/index.cjs",
548
+ "default": "./use-retimer/index.cjs"
567
549
  },
568
550
  "./use-set": {
569
551
  "types": "./use-set/index.d.ts",
@@ -583,6 +565,15 @@
583
565
  "require": "./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.cjs",
584
566
  "default": "./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.cjs"
585
567
  },
568
+ "./use-singleton": {
569
+ "types": "./use-singleton/index.d.ts",
570
+ "import": {
571
+ "types": "./use-singleton/index.d.ts",
572
+ "default": "./use-singleton/index.mjs"
573
+ },
574
+ "require": "./use-singleton/index.cjs",
575
+ "default": "./use-singleton/index.cjs"
576
+ },
586
577
  "./use-state-with-deps": {
587
578
  "types": "./use-state-with-deps/index.d.ts",
588
579
  "import": {
@@ -601,6 +592,15 @@
601
592
  "require": "./use-typescript-happy-callback/index.cjs",
602
593
  "default": "./use-typescript-happy-callback/index.cjs"
603
594
  },
595
+ "./use-url-hash-state": {
596
+ "types": "./use-url-hash-state/index.d.ts",
597
+ "import": {
598
+ "types": "./use-url-hash-state/index.d.ts",
599
+ "default": "./use-url-hash-state/index.mjs"
600
+ },
601
+ "require": "./use-url-hash-state/index.cjs",
602
+ "default": "./use-url-hash-state/index.cjs"
603
+ },
604
604
  "./use-uncontrolled": {
605
605
  "types": "./use-uncontrolled/index.d.ts",
606
606
  "import": {
@@ -610,14 +610,14 @@
610
610
  "require": "./use-uncontrolled/index.cjs",
611
611
  "default": "./use-uncontrolled/index.cjs"
612
612
  },
613
- "./use-url-hash-state": {
614
- "types": "./use-url-hash-state/index.d.ts",
613
+ "./use-map": {
614
+ "types": "./use-map/index.d.ts",
615
615
  "import": {
616
- "types": "./use-url-hash-state/index.d.ts",
617
- "default": "./use-url-hash-state/index.mjs"
616
+ "types": "./use-map/index.d.ts",
617
+ "default": "./use-map/index.mjs"
618
618
  },
619
- "require": "./use-url-hash-state/index.cjs",
620
- "default": "./use-url-hash-state/index.cjs"
619
+ "require": "./use-map/index.cjs",
620
+ "default": "./use-map/index.cjs"
621
621
  }
622
622
  }
623
623
  }
package/sizes.json CHANGED
@@ -1 +1 @@
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
+ {"total":{"raw":30280,"gzip":18325,"br":15436,"zstd":18372},"exports":{"context-state":{"raw":402,"gzip":259,"br":218,"zstd":259},"context-reducer":{"raw":557,"gzip":332,"br":319,"zstd":336},"create-breadcrumbs":{"raw":56,"gzip":68,"br":52,"zstd":65},"browser":{"raw":686,"gzip":402,"br":333,"zstd":413},"compose-context-provider":{"raw":177,"gzip":155,"br":122,"zstd":144},"create-context-state":{"raw":59,"gzip":72,"br":59,"zstd":68},"create-fixed-array":{"raw":452,"gzip":282,"br":248,"zstd":282},"create-local-storage-state":{"raw":169,"gzip":138,"br":111,"zstd":130},"create-context-reducer":{"raw":63,"gzip":74,"br":64,"zstd":72},"create-magic-portal":{"raw":57,"gzip":71,"br":53,"zstd":66},"breadcrumbs":{"raw":879,"gzip":467,"br":395,"zstd":472},"create-stackless-error":{"raw":278,"gzip":198,"br":162,"zstd":188},"current-year":{"raw":508,"gzip":348,"br":283,"zstd":349},"create-session-storage-state":{"raw":173,"gzip":138,"br":108,"zstd":129},"create-storage-hook":{"raw":2418,"gzip":957,"br":835,"zstd":1000},"get-single-react-children":{"raw":68,"gzip":80,"br":70,"zstd":77},"create-storage-state-factory":{"raw":364,"gzip":248,"br":197,"zstd":243},"fetch-jsonp":{"raw":924,"gzip":570,"br":446,"zstd":576},"invariant":{"raw":178,"gzip":156,"br":118,"zstd":149},"merge-props":{"raw":1030,"gzip":559,"br":501,"zstd":577},"is-safari":{"raw":247,"gzip":175,"br":133,"zstd":169},"no-ssr":{"raw":381,"gzip":281,"br":236,"zstd":285},"merge-refs":{"raw":525,"gzip":280,"br":235,"zstd":278},"noop":{"raw":33,"gzip":53,"br":37,"zstd":42},"noop-component":{"raw":142,"gzip":130,"br":111,"zstd":119},"magic-portal":{"raw":1013,"gzip":517,"br":445,"zstd":526},"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},"typescript-happy-forward-ref":{"raw":119,"gzip":103,"br":80,"zstd":91},"request-idle-callback":{"raw":392,"gzip":221,"br":171,"zstd":213},"rem":{"raw":823,"gzip":395,"br":350,"zstd":402},"use":{"raw":301,"gzip":200,"br":177,"zstd":193},"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-state":{"raw":401,"gzip":282,"br":244,"zstd":288},"use-component-will-receive-update":{"raw":220,"gzip":190,"br":157,"zstd":179},"use-error-boundary":{"raw":252,"gzip":195,"br":165,"zstd":187},"use-debounced-value":{"raw":553,"gzip":358,"br":320,"zstd":360},"use-clipboard":{"raw":2718,"gzip":1332,"br":1139,"zstd":1396},"use-intersection":{"raw":1363,"gzip":716,"br":654,"zstd":750},"types":{"raw":0,"gzip":20,"br":1,"zstd":9},"use-isomorphic-layout-effect":{"raw":169,"gzip":137,"br":110,"zstd":127},"use-is-online":{"raw":288,"gzip":216,"br":196,"zstd":205},"use-is-client":{"raw":184,"gzip":158,"br":130,"zstd":149},"use-page-visibility":{"raw":283,"gzip":211,"br":162,"zstd":203},"use-media-query":{"raw":483,"gzip":322,"br":256,"zstd":325},"use-resizing":{"raw":511,"gzip":334,"br":294,"zstd":342},"use-session-storage":{"raw":198,"gzip":141,"br":118,"zstd":137},"use-retimer":{"raw":194,"gzip":166,"br":127,"zstd":154},"use-local-storage":{"raw":192,"gzip":143,"br":114,"zstd":137},"use-set":{"raw":368,"gzip":247,"br":211,"zstd":255},"use-singleton":{"raw":149,"gzip":135,"br":116,"zstd":123},"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-readonly-search-params":{"raw":2318,"gzip":1058,"br":914,"zstd":1092},"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-fast-click":{"raw":499,"gzip":350,"br":284,"zstd":355},"use-uncontrolled":{"raw":388,"gzip":273,"br":230,"zstd":277},"use-map":{"raw":384,"gzip":256,"br":220,"zstd":262},"use-url-hash-state":{"raw":1001,"gzip":572,"br":495,"zstd":582}}}
@@ -1 +1 @@
1
- "use strict";require("client-only");var e=require("react"),t=require("../noop/index.cjs"),r=require("../use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.cjs"),l=require("../use-typescript-happy-callback/index.cjs");class a extends Error{constructor(...e){var t;super(...e),(t="name")in this?Object.defineProperty(this,t,{value:"UseClipboardError",enumerable:!0,configurable:!0,writable:!0}):this[t]="UseClipboardError"}}async function o(e,t,r,l){let o;if("clipboard"in navigator)try{return await navigator.clipboard.writeText(e),!0}catch(e){(o=new a("[foxact/use-clipboard] Failed to copy using navigator.clipboard")).cause=e}else o=new a("[foxact/use-clipboard] navigator.clipboard is not supported");if(t){var n;let t;const r=document.activeElement,l=[],c=document.getSelection();let s=null,i=null!=(n=document.fullscreenElement)?n:document.body,u=r;for(;u;){if("DIALOG"===u.tagName&&u.open){i=u;break}u=u.parentElement}let d=null;try{if(c.rangeCount){for(let e=0;e<c.rangeCount;e++)l.push(c.getRangeAt(e));c.removeAllRanges()}((null==r?void 0:r.tagName)==="INPUT"||(null==r?void 0:r.tagName)==="TEXTAREA")&&(s=r).blur();const a=document.createRange();(d=document.createElement("span")).textContent=e,d.style.whiteSpace="pre",d.ariaHidden="true",d.style.all="unset",d.style.position="fixed",d.style.top="0",d.style.clip="rect(0, 0, 0, 0)",d.style.borderWidth="0",d.style.overflow="hidden",d.style.userSelect="text",d.style.webkitUserSelect="text",d.style.MozUserSelect="text",d.style.msUserSelect="text",d.addEventListener("copy",e=>{e.stopPropagation()}),i.appendChild(d),a.selectNodeContents(d),c.removeAllRanges(),c.addRange(a),t=document.execCommand("copy")}catch(e){(o=new a("[foxact/use-clipboard] Failed to copy using execCommand fallback")).cause=e,t=!1}finally{c.removeAllRanges(),d&&i.removeChild(d),"Caret"===c.type&&c.removeAllRanges(),c.rangeCount||l.forEach(e=>c.addRange(e)),null==s||s.focus()}if(t)return!0}return r?(window.prompt(l,e),!1):o}exports.UseClipboardError=a,exports.useClipboard=function(){let{timeout:a=1e3,useExecCommandAsFallback:n=!0,usePromptAsFallback:c=!1,promptFallbackText:s="Failed to copy to clipboard, please manually copy the text below.",onCopyError:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[u,d]=e.useState(null),[p,y]=e.useState(!1),b=e.useRef(null),m=r.useStableHandler(i||t.noop),g=l.useCallback(e=>{b.current&&clearTimeout(b.current),e&&(b.current=window.setTimeout(y,a,!1)),y(e)},[a]),f=l.useCallback(e=>{d(e),m(e)},[m]);return{copy:l.useCallback(async e=>{try{const t=await o(e,n,c,s);"boolean"==typeof t?t&&g(!0):f(t)}catch(e){f(e)}},[g,s,f,n,c]),reset:l.useCallback(()=>{y(!1),d(null),b.current&&clearTimeout(b.current)},[]),error:u,copied:p}};
1
+ "use strict";require("client-only");var e=require("react"),t=require("../noop/index.cjs"),r=require("../use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.cjs"),l=require("../use-typescript-happy-callback/index.cjs");class a extends Error{constructor(...e){var t;super(...e),(t="name")in this?Object.defineProperty(this,t,{value:"UseClipboardError",enumerable:!0,configurable:!0,writable:!0}):this[t]="UseClipboardError"}}async function o(e,t,r,l){let o;if("clipboard"in navigator)try{return await navigator.clipboard.writeText(e),!0}catch(e){(o=new a("[foxact/use-clipboard] Failed to copy using navigator.clipboard")).cause=e}else o=new a("[foxact/use-clipboard] navigator.clipboard is not supported");if(t){var n;let t;const r=document.activeElement,l=[],c=document.getSelection();let s=null,i=null!=(n=document.fullscreenElement)?n:document.body,u=r;for(;u;){if("DIALOG"===u.tagName&&u.open){i=u;break}u=u.parentElement}let d=null;try{if(c.rangeCount){for(let e=0;e<c.rangeCount;e++)l.push(c.getRangeAt(e));c.removeAllRanges()}((null==r?void 0:r.tagName)==="INPUT"||(null==r?void 0:r.tagName)==="TEXTAREA")&&(s=r).blur();const a=document.createRange();(d=document.createElement("span")).textContent=e,d.ariaHidden="true",d.style.all="unset",d.style.whiteSpace="pre",d.style.position="fixed",d.style.top="0",d.style.clip="rect(0, 0, 0, 0)",d.style.borderWidth="0",d.style.overflow="hidden",d.style.userSelect="text",d.style.webkitUserSelect="text",d.style.MozUserSelect="text",d.style.msUserSelect="text",d.addEventListener("copy",e=>{e.stopPropagation()}),i.appendChild(d),a.selectNodeContents(d),c.removeAllRanges(),c.addRange(a),t=document.execCommand("copy")}catch(e){(o=new a("[foxact/use-clipboard] Failed to copy using execCommand fallback")).cause=e,t=!1}finally{c.removeAllRanges(),d&&i.removeChild(d),"Caret"===c.type&&c.removeAllRanges(),c.rangeCount||l.forEach(e=>c.addRange(e)),null==s||s.focus()}if(t)return!0}return r?(window.prompt(l,e),!1):o}exports.UseClipboardError=a,exports.useClipboard=function(){let{timeout:a=1e3,useExecCommandAsFallback:n=!0,usePromptAsFallback:c=!1,promptFallbackText:s="Failed to copy to clipboard, please manually copy the text below.",onCopyError:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[u,d]=e.useState(null),[p,y]=e.useState(!1),b=e.useRef(null),m=r.useStableHandler(i||t.noop),g=l.useCallback(e=>{b.current&&clearTimeout(b.current),e&&(b.current=window.setTimeout(y,a,!1)),y(e)},[a]),f=l.useCallback(e=>{d(e),m(e)},[m]);return{copy:l.useCallback(async e=>{try{const t=await o(e,n,c,s);"boolean"==typeof t?t&&g(!0):f(t)}catch(e){f(e)}},[g,s,f,n,c]),reset:l.useCallback(()=>{y(!1),d(null),b.current&&clearTimeout(b.current)},[]),error:u,copied:p}};
@@ -1 +1 @@
1
- import"client-only";import{useState as e,useRef as t}from"react";import{noop as o}from"../noop/index.mjs";import{useStableHandler as r}from"../use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.mjs";import{useCallback as n}from"../use-typescript-happy-callback/index.mjs";class l extends Error{constructor(...e){var t;super(...e),(t="name")in this?Object.defineProperty(this,t,{value:"UseClipboardError",enumerable:!0,configurable:!0,writable:!0}):this[t]="UseClipboardError"}}function a(){let{timeout:l=1e3,useExecCommandAsFallback:a=!0,usePromptAsFallback:c=!1,promptFallbackText:s="Failed to copy to clipboard, please manually copy the text below.",onCopyError:u}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[d,p]=e(null),[m,y]=e(!1),b=t(null),f=r(u||o),g=n(e=>{b.current&&clearTimeout(b.current),e&&(b.current=window.setTimeout(y,l,!1)),y(e)},[l]),h=n(e=>{p(e),f(e)},[f]);return{copy:n(async e=>{try{const t=await i(e,a,c,s);"boolean"==typeof t?t&&g(!0):h(t)}catch(e){h(e)}},[g,s,h,a,c]),reset:n(()=>{y(!1),p(null),b.current&&clearTimeout(b.current)},[]),error:d,copied:m}}async function i(e,t,o,r){let n;if("clipboard"in navigator)try{return await navigator.clipboard.writeText(e),!0}catch(e){(n=new l("[foxact/use-clipboard] Failed to copy using navigator.clipboard")).cause=e}else n=new l("[foxact/use-clipboard] navigator.clipboard is not supported");if(t){var a;let t;const o=document.activeElement,r=[],i=document.getSelection();let c=null,s=null!=(a=document.fullscreenElement)?a:document.body,u=o;for(;u;){if("DIALOG"===u.tagName&&u.open){s=u;break}u=u.parentElement}let d=null;try{if(i.rangeCount){for(let e=0;e<i.rangeCount;e++)r.push(i.getRangeAt(e));i.removeAllRanges()}((null==o?void 0:o.tagName)==="INPUT"||(null==o?void 0:o.tagName)==="TEXTAREA")&&(c=o).blur();const n=document.createRange();(d=document.createElement("span")).textContent=e,d.style.whiteSpace="pre",d.ariaHidden="true",d.style.all="unset",d.style.position="fixed",d.style.top="0",d.style.clip="rect(0, 0, 0, 0)",d.style.borderWidth="0",d.style.overflow="hidden",d.style.userSelect="text",d.style.webkitUserSelect="text",d.style.MozUserSelect="text",d.style.msUserSelect="text",d.addEventListener("copy",e=>{e.stopPropagation()}),s.appendChild(d),n.selectNodeContents(d),i.removeAllRanges(),i.addRange(n),t=document.execCommand("copy")}catch(e){(n=new l("[foxact/use-clipboard] Failed to copy using execCommand fallback")).cause=e,t=!1}finally{i.removeAllRanges(),d&&s.removeChild(d),"Caret"===i.type&&i.removeAllRanges(),i.rangeCount||r.forEach(e=>i.addRange(e)),null==c||c.focus()}if(t)return!0}return o?(window.prompt(r,e),!1):n}export{l as UseClipboardError,a as useClipboard};
1
+ import"client-only";import{useState as e,useRef as t}from"react";import{noop as o}from"../noop/index.mjs";import{useStableHandler as r}from"../use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.mjs";import{useCallback as n}from"../use-typescript-happy-callback/index.mjs";class l extends Error{constructor(...e){var t;super(...e),(t="name")in this?Object.defineProperty(this,t,{value:"UseClipboardError",enumerable:!0,configurable:!0,writable:!0}):this[t]="UseClipboardError"}}function a(){let{timeout:l=1e3,useExecCommandAsFallback:a=!0,usePromptAsFallback:c=!1,promptFallbackText:s="Failed to copy to clipboard, please manually copy the text below.",onCopyError:u}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[d,p]=e(null),[m,y]=e(!1),b=t(null),f=r(u||o),g=n(e=>{b.current&&clearTimeout(b.current),e&&(b.current=window.setTimeout(y,l,!1)),y(e)},[l]),h=n(e=>{p(e),f(e)},[f]);return{copy:n(async e=>{try{const t=await i(e,a,c,s);"boolean"==typeof t?t&&g(!0):h(t)}catch(e){h(e)}},[g,s,h,a,c]),reset:n(()=>{y(!1),p(null),b.current&&clearTimeout(b.current)},[]),error:d,copied:m}}async function i(e,t,o,r){let n;if("clipboard"in navigator)try{return await navigator.clipboard.writeText(e),!0}catch(e){(n=new l("[foxact/use-clipboard] Failed to copy using navigator.clipboard")).cause=e}else n=new l("[foxact/use-clipboard] navigator.clipboard is not supported");if(t){var a;let t;const o=document.activeElement,r=[],i=document.getSelection();let c=null,s=null!=(a=document.fullscreenElement)?a:document.body,u=o;for(;u;){if("DIALOG"===u.tagName&&u.open){s=u;break}u=u.parentElement}let d=null;try{if(i.rangeCount){for(let e=0;e<i.rangeCount;e++)r.push(i.getRangeAt(e));i.removeAllRanges()}((null==o?void 0:o.tagName)==="INPUT"||(null==o?void 0:o.tagName)==="TEXTAREA")&&(c=o).blur();const n=document.createRange();(d=document.createElement("span")).textContent=e,d.ariaHidden="true",d.style.all="unset",d.style.whiteSpace="pre",d.style.position="fixed",d.style.top="0",d.style.clip="rect(0, 0, 0, 0)",d.style.borderWidth="0",d.style.overflow="hidden",d.style.userSelect="text",d.style.webkitUserSelect="text",d.style.MozUserSelect="text",d.style.msUserSelect="text",d.addEventListener("copy",e=>{e.stopPropagation()}),s.appendChild(d),n.selectNodeContents(d),i.removeAllRanges(),i.addRange(n),t=document.execCommand("copy")}catch(e){(n=new l("[foxact/use-clipboard] Failed to copy using execCommand fallback")).cause=e,t=!1}finally{i.removeAllRanges(),d&&s.removeChild(d),"Caret"===i.type&&i.removeAllRanges(),i.rangeCount||r.forEach(e=>i.addRange(e)),null==c||c.focus()}if(t)return!0}return o?(window.prompt(r,e),!1):n}export{l as UseClipboardError,a as useClipboard};