foxact 0.2.40 → 0.2.42
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/fetch-jsonp/index.cjs +1 -0
- package/fetch-jsonp/index.d.ts +9 -0
- package/fetch-jsonp/index.js +1 -0
- package/fetch-jsonp/index.mjs +1 -0
- package/package.json +118 -109
- package/sizes.json +1 -1
- package/use-component-will-receive-update/index.cjs +1 -1
- package/use-component-will-receive-update/index.d.ts +1 -1
- package/use-component-will-receive-update/index.js +1 -1
- package/use-component-will-receive-update/index.mjs +1 -1
|
@@ -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.
|
|
3
|
+
"version": "0.2.42",
|
|
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": {
|
|
@@ -78,14 +78,14 @@
|
|
|
78
78
|
"require": "./compose-context-provider/index.cjs",
|
|
79
79
|
"default": "./compose-context-provider/index.js"
|
|
80
80
|
},
|
|
81
|
-
"./
|
|
82
|
-
"types": "./
|
|
81
|
+
"./context-state": {
|
|
82
|
+
"types": "./context-state/index.d.ts",
|
|
83
83
|
"import": {
|
|
84
|
-
"types": "./
|
|
85
|
-
"default": "./
|
|
84
|
+
"types": "./context-state/index.d.ts",
|
|
85
|
+
"default": "./context-state/index.mjs"
|
|
86
86
|
},
|
|
87
|
-
"require": "./
|
|
88
|
-
"default": "./
|
|
87
|
+
"require": "./context-state/index.cjs",
|
|
88
|
+
"default": "./context-state/index.js"
|
|
89
89
|
},
|
|
90
90
|
"./create-context-state": {
|
|
91
91
|
"types": "./create-context-state/index.d.ts",
|
|
@@ -96,14 +96,14 @@
|
|
|
96
96
|
"require": "./create-context-state/index.cjs",
|
|
97
97
|
"default": "./create-context-state/index.js"
|
|
98
98
|
},
|
|
99
|
-
"./create-
|
|
100
|
-
"types": "./create-
|
|
99
|
+
"./create-fixed-array": {
|
|
100
|
+
"types": "./create-fixed-array/index.d.ts",
|
|
101
101
|
"import": {
|
|
102
|
-
"types": "./create-
|
|
103
|
-
"default": "./create-
|
|
102
|
+
"types": "./create-fixed-array/index.d.ts",
|
|
103
|
+
"default": "./create-fixed-array/index.mjs"
|
|
104
104
|
},
|
|
105
|
-
"require": "./create-
|
|
106
|
-
"default": "./create-
|
|
105
|
+
"require": "./create-fixed-array/index.cjs",
|
|
106
|
+
"default": "./create-fixed-array/index.js"
|
|
107
107
|
},
|
|
108
108
|
"./create-session-storage-state": {
|
|
109
109
|
"types": "./create-session-storage-state/index.d.ts",
|
|
@@ -114,6 +114,15 @@
|
|
|
114
114
|
"require": "./create-session-storage-state/index.cjs",
|
|
115
115
|
"default": "./create-session-storage-state/index.js"
|
|
116
116
|
},
|
|
117
|
+
"./create-local-storage-state": {
|
|
118
|
+
"types": "./create-local-storage-state/index.d.ts",
|
|
119
|
+
"import": {
|
|
120
|
+
"types": "./create-local-storage-state/index.d.ts",
|
|
121
|
+
"default": "./create-local-storage-state/index.mjs"
|
|
122
|
+
},
|
|
123
|
+
"require": "./create-local-storage-state/index.cjs",
|
|
124
|
+
"default": "./create-local-storage-state/index.js"
|
|
125
|
+
},
|
|
117
126
|
"./create-storage-hook": {
|
|
118
127
|
"types": "./create-storage-hook/index.d.ts",
|
|
119
128
|
"import": {
|
|
@@ -141,6 +150,15 @@
|
|
|
141
150
|
"require": "./current-year/index.cjs",
|
|
142
151
|
"default": "./current-year/index.js"
|
|
143
152
|
},
|
|
153
|
+
"./fetch-jsonp": {
|
|
154
|
+
"types": "./fetch-jsonp/index.d.ts",
|
|
155
|
+
"import": {
|
|
156
|
+
"types": "./fetch-jsonp/index.d.ts",
|
|
157
|
+
"default": "./fetch-jsonp/index.mjs"
|
|
158
|
+
},
|
|
159
|
+
"require": "./fetch-jsonp/index.cjs",
|
|
160
|
+
"default": "./fetch-jsonp/index.js"
|
|
161
|
+
},
|
|
144
162
|
"./invariant": {
|
|
145
163
|
"types": "./invariant/index.d.ts",
|
|
146
164
|
"import": {
|
|
@@ -150,15 +168,6 @@
|
|
|
150
168
|
"require": "./invariant/index.cjs",
|
|
151
169
|
"default": "./invariant/index.js"
|
|
152
170
|
},
|
|
153
|
-
"./context-state": {
|
|
154
|
-
"types": "./context-state/index.d.ts",
|
|
155
|
-
"import": {
|
|
156
|
-
"types": "./context-state/index.d.ts",
|
|
157
|
-
"default": "./context-state/index.mjs"
|
|
158
|
-
},
|
|
159
|
-
"require": "./context-state/index.cjs",
|
|
160
|
-
"default": "./context-state/index.js"
|
|
161
|
-
},
|
|
162
171
|
"./no-ssr": {
|
|
163
172
|
"types": "./no-ssr/index.d.ts",
|
|
164
173
|
"import": {
|
|
@@ -177,15 +186,6 @@
|
|
|
177
186
|
"require": "./noop/index.cjs",
|
|
178
187
|
"default": "./noop/index.js"
|
|
179
188
|
},
|
|
180
|
-
"./nullthrow": {
|
|
181
|
-
"types": "./nullthrow/index.d.ts",
|
|
182
|
-
"import": {
|
|
183
|
-
"types": "./nullthrow/index.d.ts",
|
|
184
|
-
"default": "./nullthrow/index.mjs"
|
|
185
|
-
},
|
|
186
|
-
"require": "./nullthrow/index.cjs",
|
|
187
|
-
"default": "./nullthrow/index.js"
|
|
188
|
-
},
|
|
189
189
|
"./rem": {
|
|
190
190
|
"types": "./rem/index.d.ts",
|
|
191
191
|
"import": {
|
|
@@ -195,6 +195,15 @@
|
|
|
195
195
|
"require": "./rem/index.cjs",
|
|
196
196
|
"default": "./rem/index.js"
|
|
197
197
|
},
|
|
198
|
+
"./nullthrow": {
|
|
199
|
+
"types": "./nullthrow/index.d.ts",
|
|
200
|
+
"import": {
|
|
201
|
+
"types": "./nullthrow/index.d.ts",
|
|
202
|
+
"default": "./nullthrow/index.mjs"
|
|
203
|
+
},
|
|
204
|
+
"require": "./nullthrow/index.cjs",
|
|
205
|
+
"default": "./nullthrow/index.js"
|
|
206
|
+
},
|
|
198
207
|
"./types": {
|
|
199
208
|
"types": "./types/index.d.ts",
|
|
200
209
|
"import": {
|
|
@@ -204,14 +213,14 @@
|
|
|
204
213
|
"require": "./types/index.cjs",
|
|
205
214
|
"default": "./types/index.js"
|
|
206
215
|
},
|
|
207
|
-
"./
|
|
208
|
-
"types": "./
|
|
216
|
+
"./request-idle-callback": {
|
|
217
|
+
"types": "./request-idle-callback/index.d.ts",
|
|
209
218
|
"import": {
|
|
210
|
-
"types": "./
|
|
211
|
-
"default": "./
|
|
219
|
+
"types": "./request-idle-callback/index.d.ts",
|
|
220
|
+
"default": "./request-idle-callback/index.mjs"
|
|
212
221
|
},
|
|
213
|
-
"require": "./
|
|
214
|
-
"default": "./
|
|
222
|
+
"require": "./request-idle-callback/index.cjs",
|
|
223
|
+
"default": "./request-idle-callback/index.js"
|
|
215
224
|
},
|
|
216
225
|
"./typescript-happy-forward-ref": {
|
|
217
226
|
"types": "./typescript-happy-forward-ref/index.d.ts",
|
|
@@ -222,14 +231,14 @@
|
|
|
222
231
|
"require": "./typescript-happy-forward-ref/index.cjs",
|
|
223
232
|
"default": "./typescript-happy-forward-ref/index.js"
|
|
224
233
|
},
|
|
225
|
-
"./use
|
|
226
|
-
"types": "./use
|
|
234
|
+
"./use": {
|
|
235
|
+
"types": "./use/index.d.ts",
|
|
227
236
|
"import": {
|
|
228
|
-
"types": "./use
|
|
229
|
-
"default": "./use
|
|
237
|
+
"types": "./use/index.d.ts",
|
|
238
|
+
"default": "./use/index.mjs"
|
|
230
239
|
},
|
|
231
|
-
"require": "./use
|
|
232
|
-
"default": "./use
|
|
240
|
+
"require": "./use/index.cjs",
|
|
241
|
+
"default": "./use/index.js"
|
|
233
242
|
},
|
|
234
243
|
"./use-array": {
|
|
235
244
|
"types": "./use-array/index.d.ts",
|
|
@@ -240,14 +249,14 @@
|
|
|
240
249
|
"require": "./use-array/index.cjs",
|
|
241
250
|
"default": "./use-array/index.js"
|
|
242
251
|
},
|
|
243
|
-
"./use-
|
|
244
|
-
"types": "./use-
|
|
252
|
+
"./use-abortable-effect": {
|
|
253
|
+
"types": "./use-abortable-effect/index.d.ts",
|
|
245
254
|
"import": {
|
|
246
|
-
"types": "./use-
|
|
247
|
-
"default": "./use-
|
|
255
|
+
"types": "./use-abortable-effect/index.d.ts",
|
|
256
|
+
"default": "./use-abortable-effect/index.mjs"
|
|
248
257
|
},
|
|
249
|
-
"require": "./use-
|
|
250
|
-
"default": "./use-
|
|
258
|
+
"require": "./use-abortable-effect/index.cjs",
|
|
259
|
+
"default": "./use-abortable-effect/index.js"
|
|
251
260
|
},
|
|
252
261
|
"./use-clipboard": {
|
|
253
262
|
"types": "./use-clipboard/index.d.ts",
|
|
@@ -258,23 +267,14 @@
|
|
|
258
267
|
"require": "./use-clipboard/index.cjs",
|
|
259
268
|
"default": "./use-clipboard/index.js"
|
|
260
269
|
},
|
|
261
|
-
"./
|
|
262
|
-
"types": "./
|
|
263
|
-
"import": {
|
|
264
|
-
"types": "./request-idle-callback/index.d.ts",
|
|
265
|
-
"default": "./request-idle-callback/index.mjs"
|
|
266
|
-
},
|
|
267
|
-
"require": "./request-idle-callback/index.cjs",
|
|
268
|
-
"default": "./request-idle-callback/index.js"
|
|
269
|
-
},
|
|
270
|
-
"./use-debounced-state": {
|
|
271
|
-
"types": "./use-debounced-state/index.d.ts",
|
|
270
|
+
"./use-component-will-receive-update": {
|
|
271
|
+
"types": "./use-component-will-receive-update/index.d.ts",
|
|
272
272
|
"import": {
|
|
273
|
-
"types": "./use-
|
|
274
|
-
"default": "./use-
|
|
273
|
+
"types": "./use-component-will-receive-update/index.d.ts",
|
|
274
|
+
"default": "./use-component-will-receive-update/index.mjs"
|
|
275
275
|
},
|
|
276
|
-
"require": "./use-
|
|
277
|
-
"default": "./use-
|
|
276
|
+
"require": "./use-component-will-receive-update/index.cjs",
|
|
277
|
+
"default": "./use-component-will-receive-update/index.js"
|
|
278
278
|
},
|
|
279
279
|
"./use-composition-input": {
|
|
280
280
|
"types": "./use-composition-input/index.d.ts",
|
|
@@ -285,14 +285,14 @@
|
|
|
285
285
|
"require": "./use-composition-input/index.cjs",
|
|
286
286
|
"default": "./use-composition-input/index.js"
|
|
287
287
|
},
|
|
288
|
-
"./use-
|
|
289
|
-
"types": "./use-
|
|
288
|
+
"./use-debounced-state": {
|
|
289
|
+
"types": "./use-debounced-state/index.d.ts",
|
|
290
290
|
"import": {
|
|
291
|
-
"types": "./use-
|
|
292
|
-
"default": "./use-
|
|
291
|
+
"types": "./use-debounced-state/index.d.ts",
|
|
292
|
+
"default": "./use-debounced-state/index.mjs"
|
|
293
293
|
},
|
|
294
|
-
"require": "./use-
|
|
295
|
-
"default": "./use-
|
|
294
|
+
"require": "./use-debounced-state/index.cjs",
|
|
295
|
+
"default": "./use-debounced-state/index.js"
|
|
296
296
|
},
|
|
297
297
|
"./use-debounced-value": {
|
|
298
298
|
"types": "./use-debounced-value/index.d.ts",
|
|
@@ -303,6 +303,15 @@
|
|
|
303
303
|
"require": "./use-debounced-value/index.cjs",
|
|
304
304
|
"default": "./use-debounced-value/index.js"
|
|
305
305
|
},
|
|
306
|
+
"./use-error-boundary": {
|
|
307
|
+
"types": "./use-error-boundary/index.d.ts",
|
|
308
|
+
"import": {
|
|
309
|
+
"types": "./use-error-boundary/index.d.ts",
|
|
310
|
+
"default": "./use-error-boundary/index.mjs"
|
|
311
|
+
},
|
|
312
|
+
"require": "./use-error-boundary/index.cjs",
|
|
313
|
+
"default": "./use-error-boundary/index.js"
|
|
314
|
+
},
|
|
306
315
|
"./use-is-client": {
|
|
307
316
|
"types": "./use-is-client/index.d.ts",
|
|
308
317
|
"import": {
|
|
@@ -312,15 +321,6 @@
|
|
|
312
321
|
"require": "./use-is-client/index.cjs",
|
|
313
322
|
"default": "./use-is-client/index.js"
|
|
314
323
|
},
|
|
315
|
-
"./use-is-online": {
|
|
316
|
-
"types": "./use-is-online/index.d.ts",
|
|
317
|
-
"import": {
|
|
318
|
-
"types": "./use-is-online/index.d.ts",
|
|
319
|
-
"default": "./use-is-online/index.mjs"
|
|
320
|
-
},
|
|
321
|
-
"require": "./use-is-online/index.cjs",
|
|
322
|
-
"default": "./use-is-online/index.js"
|
|
323
|
-
},
|
|
324
324
|
"./use-intersection": {
|
|
325
325
|
"types": "./use-intersection/index.d.ts",
|
|
326
326
|
"import": {
|
|
@@ -330,6 +330,15 @@
|
|
|
330
330
|
"require": "./use-intersection/index.cjs",
|
|
331
331
|
"default": "./use-intersection/index.js"
|
|
332
332
|
},
|
|
333
|
+
"./use-is-online": {
|
|
334
|
+
"types": "./use-is-online/index.d.ts",
|
|
335
|
+
"import": {
|
|
336
|
+
"types": "./use-is-online/index.d.ts",
|
|
337
|
+
"default": "./use-is-online/index.mjs"
|
|
338
|
+
},
|
|
339
|
+
"require": "./use-is-online/index.cjs",
|
|
340
|
+
"default": "./use-is-online/index.js"
|
|
341
|
+
},
|
|
333
342
|
"./use-isomorphic-layout-effect": {
|
|
334
343
|
"types": "./use-isomorphic-layout-effect/index.d.ts",
|
|
335
344
|
"import": {
|
|
@@ -393,23 +402,14 @@
|
|
|
393
402
|
"require": "./use-page-visibility/index.cjs",
|
|
394
403
|
"default": "./use-page-visibility/index.js"
|
|
395
404
|
},
|
|
396
|
-
"./use-
|
|
397
|
-
"types": "./use-
|
|
398
|
-
"import": {
|
|
399
|
-
"types": "./use-react-router-enable-concurrent-navigation/index.d.ts",
|
|
400
|
-
"default": "./use-react-router-enable-concurrent-navigation/index.mjs"
|
|
401
|
-
},
|
|
402
|
-
"require": "./use-react-router-enable-concurrent-navigation/index.cjs",
|
|
403
|
-
"default": "./use-react-router-enable-concurrent-navigation/index.js"
|
|
404
|
-
},
|
|
405
|
-
"./use-react-router-is-match": {
|
|
406
|
-
"types": "./use-react-router-is-match/index.d.ts",
|
|
405
|
+
"./use-retimer": {
|
|
406
|
+
"types": "./use-retimer/index.d.ts",
|
|
407
407
|
"import": {
|
|
408
|
-
"types": "./use-
|
|
409
|
-
"default": "./use-
|
|
408
|
+
"types": "./use-retimer/index.d.ts",
|
|
409
|
+
"default": "./use-retimer/index.mjs"
|
|
410
410
|
},
|
|
411
|
-
"require": "./use-
|
|
412
|
-
"default": "./use-
|
|
411
|
+
"require": "./use-retimer/index.cjs",
|
|
412
|
+
"default": "./use-retimer/index.js"
|
|
413
413
|
},
|
|
414
414
|
"./use-session-storage": {
|
|
415
415
|
"types": "./use-session-storage/index.d.ts",
|
|
@@ -420,23 +420,14 @@
|
|
|
420
420
|
"require": "./use-session-storage/index.cjs",
|
|
421
421
|
"default": "./use-session-storage/index.js"
|
|
422
422
|
},
|
|
423
|
-
"./use-
|
|
424
|
-
"types": "./use-
|
|
425
|
-
"import": {
|
|
426
|
-
"types": "./use-retimer/index.d.ts",
|
|
427
|
-
"default": "./use-retimer/index.mjs"
|
|
428
|
-
},
|
|
429
|
-
"require": "./use-retimer/index.cjs",
|
|
430
|
-
"default": "./use-retimer/index.js"
|
|
431
|
-
},
|
|
432
|
-
"./use-singleton": {
|
|
433
|
-
"types": "./use-singleton/index.d.ts",
|
|
423
|
+
"./use-react-router-is-match": {
|
|
424
|
+
"types": "./use-react-router-is-match/index.d.ts",
|
|
434
425
|
"import": {
|
|
435
|
-
"types": "./use-
|
|
436
|
-
"default": "./use-
|
|
426
|
+
"types": "./use-react-router-is-match/index.d.ts",
|
|
427
|
+
"default": "./use-react-router-is-match/index.mjs"
|
|
437
428
|
},
|
|
438
|
-
"require": "./use-
|
|
439
|
-
"default": "./use-
|
|
429
|
+
"require": "./use-react-router-is-match/index.cjs",
|
|
430
|
+
"default": "./use-react-router-is-match/index.js"
|
|
440
431
|
},
|
|
441
432
|
"./use-set": {
|
|
442
433
|
"types": "./use-set/index.d.ts",
|
|
@@ -447,6 +438,15 @@
|
|
|
447
438
|
"require": "./use-set/index.cjs",
|
|
448
439
|
"default": "./use-set/index.js"
|
|
449
440
|
},
|
|
441
|
+
"./use-singleton": {
|
|
442
|
+
"types": "./use-singleton/index.d.ts",
|
|
443
|
+
"import": {
|
|
444
|
+
"types": "./use-singleton/index.d.ts",
|
|
445
|
+
"default": "./use-singleton/index.mjs"
|
|
446
|
+
},
|
|
447
|
+
"require": "./use-singleton/index.cjs",
|
|
448
|
+
"default": "./use-singleton/index.js"
|
|
449
|
+
},
|
|
450
450
|
"./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired": {
|
|
451
451
|
"types": "./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.d.ts",
|
|
452
452
|
"import": {
|
|
@@ -482,6 +482,15 @@
|
|
|
482
482
|
},
|
|
483
483
|
"require": "./use-url-hash-state/index.cjs",
|
|
484
484
|
"default": "./use-url-hash-state/index.js"
|
|
485
|
+
},
|
|
486
|
+
"./use-react-router-enable-concurrent-navigation": {
|
|
487
|
+
"types": "./use-react-router-enable-concurrent-navigation/index.d.ts",
|
|
488
|
+
"import": {
|
|
489
|
+
"types": "./use-react-router-enable-concurrent-navigation/index.d.ts",
|
|
490
|
+
"default": "./use-react-router-enable-concurrent-navigation/index.mjs"
|
|
491
|
+
},
|
|
492
|
+
"require": "./use-react-router-enable-concurrent-navigation/index.cjs",
|
|
493
|
+
"default": "./use-react-router-enable-concurrent-navigation/index.js"
|
|
485
494
|
}
|
|
486
495
|
}
|
|
487
496
|
}
|
package/sizes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"total":{"raw":
|
|
1
|
+
{"total":{"raw":22047,"gzip":13435,"br":0},"exports":{"compose-context-provider":{"raw":177,"gzip":155,"br":122},"context-state":{"raw":429,"gzip":258,"br":218},"create-context-state":{"raw":145,"gzip":116,"br":96},"create-fixed-array":{"raw":452,"gzip":282,"br":248},"create-local-storage-state":{"raw":328,"gzip":183,"br":154},"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},"fetch-jsonp":{"raw":873,"gzip":537,"br":420},"noop":{"raw":33,"gzip":53,"br":37},"create-storage-hook":{"raw":2073,"gzip":880,"br":764},"types":{"raw":0,"gzip":20,"br":1},"no-ssr":{"raw":474,"gzip":316,"br":260},"nullthrow":{"raw":187,"gzip":163,"br":121},"typescript-happy-forward-ref":{"raw":119,"gzip":103,"br":80},"request-idle-callback":{"raw":410,"gzip":229,"br":175},"rem":{"raw":823,"gzip":395,"br":350},"use-array":{"raw":322,"gzip":236,"br":202},"use-abortable-effect":{"raw":215,"gzip":170,"br":144},"use":{"raw":276,"gzip":182,"br":150},"use-component-will-receive-update":{"raw":216,"gzip":188,"br":154},"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-is-client":{"raw":150,"gzip":145,"br":115},"use-error-boundary":{"raw":255,"gzip":198,"br":163},"use-isomorphic-layout-effect":{"raw":178,"gzip":142,"br":112},"use-local-storage":{"raw":310,"gzip":184,"br":157},"use-is-online":{"raw":335,"gzip":214,"br":160},"use-map":{"raw":339,"gzip":243,"br":208},"use-intersection":{"raw":1230,"gzip":649,"br":597},"use-next-pathname":{"raw":314,"gzip":235,"br":203},"use-media-query":{"raw":738,"gzip":413,"br":332},"use-page-visibility":{"raw":290,"gzip":206,"br":154},"use-retimer":{"raw":199,"gzip":166,"br":127},"use-session-storage":{"raw":316,"gzip":181,"br":152},"use-next-link":{"raw":1615,"gzip":855,"br":737},"use-typescript-happy-callback":{"raw":107,"gzip":102,"br":77},"use-set":{"raw":340,"gzip":238,"br":203},"use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired":{"raw":459,"gzip":325,"br":249},"use-react-router-is-match":{"raw":563,"gzip":372,"br":314},"use-uncontrolled":{"raw":352,"gzip":258,"br":216},"use-singleton":{"raw":139,"gzip":130,"br":104},"use-url-hash-state":{"raw":1081,"gzip":620,"br":540},"use-react-router-enable-concurrent-navigation":{"raw":966,"gzip":470,"br":397}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react");exports.useComponentWillReceiveUpdate=function(t,n){n=[...n];const[l
|
|
1
|
+
"use strict";var e=require("react");exports.useComponentWillReceiveUpdate=function(t,n){n=[...n];const[r,l]=e.useState(n);let o=n.length!==r.length;for(let e=0;e<n.length&&!o;e+=1)r[e]!==n[e]&&(o=!0);return o&&(l(n),t()),o};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @see {https://foxact.skk.moe/use-component-will-receive-update}
|
|
3
3
|
*/
|
|
4
|
-
declare function useComponentWillReceiveUpdate(callback: () => void, deps: readonly unknown[]):
|
|
4
|
+
declare function useComponentWillReceiveUpdate(callback: () => void, deps: readonly unknown[]): boolean;
|
|
5
5
|
|
|
6
6
|
export { useComponentWillReceiveUpdate };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react");exports.useComponentWillReceiveUpdate=function(t,n){n=[...n];const[l
|
|
1
|
+
"use strict";var e=require("react");exports.useComponentWillReceiveUpdate=function(t,n){n=[...n];const[r,l]=e.useState(n);let o=n.length!==r.length;for(let e=0;e<n.length&&!o;e+=1)r[e]!==n[e]&&(o=!0);return o&&(l(n),t()),o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useState as e}from"react";function t(t,n){const[o,l]=e(n=[...n]);let r=n.length!==o.length;for(let e=0;e<n.length&&!r;e+=1)o[e]!==n[e]&&(r=!0);r&&(l(n),t())}export{t as useComponentWillReceiveUpdate};
|
|
1
|
+
import{useState as e}from"react";function t(t,n){const[o,l]=e(n=[...n]);let r=n.length!==o.length;for(let e=0;e<n.length&&!r;e+=1)o[e]!==n[e]&&(r=!0);return r&&(l(n),t()),r}export{t as useComponentWillReceiveUpdate};
|