@tanstack/react-query 4.0.11-beta.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/build/cjs/query-core/build/esm/index.js +3123 -0
  2. package/build/cjs/query-core/build/esm/index.js.map +1 -0
  3. package/build/cjs/react-query/src/Hydrate.js +66 -0
  4. package/build/cjs/react-query/src/Hydrate.js.map +1 -0
  5. package/build/cjs/react-query/src/QueryClientProvider.js +96 -0
  6. package/build/cjs/react-query/src/QueryClientProvider.js.map +1 -0
  7. package/build/cjs/react-query/src/QueryErrorResetBoundary.js +67 -0
  8. package/build/cjs/react-query/src/QueryErrorResetBoundary.js.map +1 -0
  9. package/build/cjs/react-query/src/index.js +64 -0
  10. package/build/cjs/react-query/src/index.js.map +1 -0
  11. package/build/cjs/react-query/src/isRestoring.js +43 -0
  12. package/build/cjs/react-query/src/isRestoring.js.map +1 -0
  13. package/build/cjs/react-query/src/useBaseQuery.js +117 -0
  14. package/build/cjs/react-query/src/useBaseQuery.js.map +1 -0
  15. package/build/cjs/react-query/src/useInfiniteQuery.js +24 -0
  16. package/build/cjs/react-query/src/useInfiniteQuery.js.map +1 -0
  17. package/build/cjs/react-query/src/useIsFetching.js +50 -0
  18. package/build/cjs/react-query/src/useIsFetching.js.map +1 -0
  19. package/build/cjs/react-query/src/useIsMutating.js +50 -0
  20. package/build/cjs/react-query/src/useIsMutating.js.map +1 -0
  21. package/build/cjs/react-query/src/useMutation.js +68 -0
  22. package/build/cjs/react-query/src/useMutation.js.map +1 -0
  23. package/build/cjs/react-query/src/useQueries.js +71 -0
  24. package/build/cjs/react-query/src/useQueries.js.map +1 -0
  25. package/build/cjs/react-query/src/useQuery.js +24 -0
  26. package/build/cjs/react-query/src/useQuery.js.map +1 -0
  27. package/build/cjs/react-query/src/utils.js +25 -0
  28. package/build/cjs/react-query/src/utils.js.map +1 -0
  29. package/build/esm/index.js +3381 -0
  30. package/build/esm/index.js.map +1 -0
  31. package/build/stats-html.html +2689 -0
  32. package/build/stats.json +666 -0
  33. package/build/types/packages/query-core/src/focusManager.d.ts +16 -0
  34. package/build/types/packages/query-core/src/hydration.d.ts +34 -0
  35. package/build/types/packages/query-core/src/index.d.ts +20 -0
  36. package/build/types/packages/query-core/src/infiniteQueryBehavior.d.ts +15 -0
  37. package/build/types/packages/query-core/src/infiniteQueryObserver.d.ts +18 -0
  38. package/build/types/packages/query-core/src/logger.d.ts +8 -0
  39. package/build/types/packages/query-core/src/mutation.d.ts +70 -0
  40. package/build/types/packages/query-core/src/mutationCache.d.ts +57 -0
  41. package/build/types/packages/query-core/src/mutationObserver.d.ts +23 -0
  42. package/build/types/packages/query-core/src/notifyManager.d.ts +18 -0
  43. package/build/types/packages/query-core/src/onlineManager.d.ts +16 -0
  44. package/build/types/packages/query-core/src/queriesObserver.d.ts +23 -0
  45. package/build/types/packages/query-core/src/query.d.ts +119 -0
  46. package/build/types/packages/query-core/src/queryCache.d.ts +64 -0
  47. package/build/types/packages/query-core/src/queryClient.d.ts +65 -0
  48. package/build/types/packages/query-core/src/queryObserver.d.ts +61 -0
  49. package/build/types/packages/query-core/src/removable.d.ts +9 -0
  50. package/build/types/packages/query-core/src/retryer.d.ts +33 -0
  51. package/build/types/packages/query-core/src/subscribable.d.ts +10 -0
  52. package/build/types/packages/query-core/src/types.d.ts +417 -0
  53. package/build/types/packages/query-core/src/utils.d.ts +99 -0
  54. package/build/{lib → types/packages/react-query/src}/Hydrate.d.ts +0 -0
  55. package/build/{lib → types/packages/react-query/src}/QueryClientProvider.d.ts +0 -0
  56. package/build/{lib → types/packages/react-query/src}/QueryErrorResetBoundary.d.ts +0 -0
  57. package/build/{lib/setBatchUpdatesFn.d.ts → types/packages/react-query/src/__tests__/Hydrate.test.d.ts} +0 -0
  58. package/build/types/packages/react-query/src/__tests__/QueryClientProvider.test.d.ts +1 -0
  59. package/build/types/packages/react-query/src/__tests__/QueryResetErrorBoundary.test.d.ts +6 -0
  60. package/build/types/packages/react-query/src/__tests__/ssr-hydration.test.d.ts +1 -0
  61. package/build/types/packages/react-query/src/__tests__/ssr.test.d.ts +4 -0
  62. package/build/types/packages/react-query/src/__tests__/suspense.test.d.ts +1 -0
  63. package/build/types/packages/react-query/src/__tests__/useInfiniteQuery.test.d.ts +1 -0
  64. package/build/types/packages/react-query/src/__tests__/useIsFetching.test.d.ts +1 -0
  65. package/build/types/packages/react-query/src/__tests__/useIsMutating.test.d.ts +1 -0
  66. package/build/types/packages/react-query/src/__tests__/useMutation.test.d.ts +1 -0
  67. package/build/types/packages/react-query/src/__tests__/useQueries.test.d.ts +1 -0
  68. package/build/types/packages/react-query/src/__tests__/useQuery.test.d.ts +1 -0
  69. package/build/types/packages/react-query/src/__tests__/useQuery.types.test.d.ts +2 -0
  70. package/build/types/packages/react-query/src/__tests__/utils.d.ts +8 -0
  71. package/build/{lib → types/packages/react-query/src}/index.d.ts +0 -0
  72. package/build/{lib → types/packages/react-query/src}/isRestoring.d.ts +0 -0
  73. package/build/{lib → types/packages/react-query/src}/reactBatchedUpdates.d.ts +0 -0
  74. package/build/{lib → types/packages/react-query/src}/reactBatchedUpdates.native.d.ts +0 -0
  75. package/build/types/packages/react-query/src/setBatchUpdatesFn.d.ts +1 -0
  76. package/build/{lib → types/packages/react-query/src}/types.d.ts +0 -0
  77. package/build/{lib → types/packages/react-query/src}/useBaseQuery.d.ts +0 -0
  78. package/build/{lib → types/packages/react-query/src}/useInfiniteQuery.d.ts +0 -0
  79. package/build/{lib → types/packages/react-query/src}/useIsFetching.d.ts +0 -0
  80. package/build/{lib → types/packages/react-query/src}/useIsMutating.d.ts +0 -0
  81. package/build/{lib → types/packages/react-query/src}/useMutation.d.ts +0 -0
  82. package/build/{lib → types/packages/react-query/src}/useQueries.d.ts +0 -0
  83. package/build/{lib → types/packages/react-query/src}/useQuery.d.ts +0 -0
  84. package/build/{lib → types/packages/react-query/src}/utils.d.ts +0 -0
  85. package/build/types/tests/utils.d.ts +24 -0
  86. package/build/umd/index.development.js +3043 -30710
  87. package/build/umd/index.development.js.map +1 -1
  88. package/build/umd/index.production.js +7 -6
  89. package/build/umd/index.production.js.map +1 -1
  90. package/package.json +14 -18
  91. package/src/__tests__/useQuery.test.tsx +10 -8
  92. package/src/useBaseQuery.ts +1 -1
  93. package/src/useIsFetching.ts +1 -1
  94. package/src/useIsMutating.ts +1 -1
  95. package/src/useMutation.ts +1 -1
  96. package/src/useQueries.ts +1 -1
  97. package/build/lib/index.js +0 -31527
  98. package/build/lib/index.js.map +0 -1
  99. package/build/lib/index.mjs +0 -31482
  100. package/build/lib/index.mjs.map +0 -1
  101. package/build/lib/useSyncExternalStore.d.ts +0 -1
  102. package/build/lib/useSyncExternalStore.native.d.ts +0 -1
  103. package/src/useSyncExternalStore.native.ts +0 -3
  104. package/src/useSyncExternalStore.ts +0 -2
@@ -0,0 +1,666 @@
1
+ {
2
+ "version": 2,
3
+ "tree": {
4
+ "name": "root",
5
+ "children": [
6
+ {
7
+ "name": "index.production.js",
8
+ "children": [
9
+ {
10
+ "name": "packages",
11
+ "children": [
12
+ {
13
+ "name": "query-core/build/esm/index.js",
14
+ "uid": "bfcd-181"
15
+ },
16
+ {
17
+ "name": "react-query/src",
18
+ "children": [
19
+ {
20
+ "uid": "bfcd-183",
21
+ "name": "QueryClientProvider.tsx"
22
+ },
23
+ {
24
+ "uid": "bfcd-185",
25
+ "name": "isRestoring.tsx"
26
+ },
27
+ {
28
+ "uid": "bfcd-187",
29
+ "name": "useQueries.ts"
30
+ },
31
+ {
32
+ "uid": "bfcd-189",
33
+ "name": "QueryErrorResetBoundary.tsx"
34
+ },
35
+ {
36
+ "uid": "bfcd-191",
37
+ "name": "utils.ts"
38
+ },
39
+ {
40
+ "uid": "bfcd-193",
41
+ "name": "useBaseQuery.ts"
42
+ },
43
+ {
44
+ "uid": "bfcd-195",
45
+ "name": "useQuery.ts"
46
+ },
47
+ {
48
+ "uid": "bfcd-197",
49
+ "name": "Hydrate.tsx"
50
+ },
51
+ {
52
+ "uid": "bfcd-199",
53
+ "name": "useIsFetching.ts"
54
+ },
55
+ {
56
+ "uid": "bfcd-201",
57
+ "name": "useIsMutating.ts"
58
+ },
59
+ {
60
+ "uid": "bfcd-203",
61
+ "name": "useMutation.ts"
62
+ },
63
+ {
64
+ "uid": "bfcd-205",
65
+ "name": "useInfiniteQuery.ts"
66
+ },
67
+ {
68
+ "uid": "bfcd-207",
69
+ "name": "index.ts"
70
+ }
71
+ ]
72
+ }
73
+ ]
74
+ }
75
+ ]
76
+ }
77
+ ],
78
+ "isRoot": true
79
+ },
80
+ "nodeParts": {
81
+ "bfcd-181": {
82
+ "renderedLength": 90730,
83
+ "gzipLength": 17195,
84
+ "brotliLength": 0,
85
+ "mainUid": "bfcd-180"
86
+ },
87
+ "bfcd-183": {
88
+ "renderedLength": 1782,
89
+ "gzipLength": 630,
90
+ "brotliLength": 0,
91
+ "mainUid": "bfcd-182"
92
+ },
93
+ "bfcd-185": {
94
+ "renderedLength": 219,
95
+ "gzipLength": 141,
96
+ "brotliLength": 0,
97
+ "mainUid": "bfcd-184"
98
+ },
99
+ "bfcd-187": {
100
+ "renderedLength": 1446,
101
+ "gzipLength": 596,
102
+ "brotliLength": 0,
103
+ "mainUid": "bfcd-186"
104
+ },
105
+ "bfcd-189": {
106
+ "renderedLength": 792,
107
+ "gzipLength": 325,
108
+ "brotliLength": 0,
109
+ "mainUid": "bfcd-188"
110
+ },
111
+ "bfcd-191": {
112
+ "renderedLength": 283,
113
+ "gzipLength": 177,
114
+ "brotliLength": 0,
115
+ "mainUid": "bfcd-190"
116
+ },
117
+ "bfcd-193": {
118
+ "renderedLength": 3348,
119
+ "gzipLength": 1057,
120
+ "brotliLength": 0,
121
+ "mainUid": "bfcd-192"
122
+ },
123
+ "bfcd-195": {
124
+ "renderedLength": 158,
125
+ "gzipLength": 118,
126
+ "brotliLength": 0,
127
+ "mainUid": "bfcd-194"
128
+ },
129
+ "bfcd-197": {
130
+ "renderedLength": 760,
131
+ "gzipLength": 384,
132
+ "brotliLength": 0,
133
+ "mainUid": "bfcd-196"
134
+ },
135
+ "bfcd-199": {
136
+ "renderedLength": 491,
137
+ "gzipLength": 271,
138
+ "brotliLength": 0,
139
+ "mainUid": "bfcd-198"
140
+ },
141
+ "bfcd-201": {
142
+ "renderedLength": 511,
143
+ "gzipLength": 277,
144
+ "brotliLength": 0,
145
+ "mainUid": "bfcd-200"
146
+ },
147
+ "bfcd-203": {
148
+ "renderedLength": 1078,
149
+ "gzipLength": 480,
150
+ "brotliLength": 0,
151
+ "mainUid": "bfcd-202"
152
+ },
153
+ "bfcd-205": {
154
+ "renderedLength": 162,
155
+ "gzipLength": 124,
156
+ "brotliLength": 0,
157
+ "mainUid": "bfcd-204"
158
+ },
159
+ "bfcd-207": {
160
+ "renderedLength": 0,
161
+ "gzipLength": 0,
162
+ "brotliLength": 0,
163
+ "mainUid": "bfcd-206"
164
+ }
165
+ },
166
+ "nodeMetas": {
167
+ "bfcd-180": {
168
+ "id": "/packages/query-core/build/esm/index.js",
169
+ "moduleParts": {
170
+ "index.production.js": "bfcd-181"
171
+ },
172
+ "imported": [],
173
+ "importedBy": [
174
+ {
175
+ "uid": "bfcd-206"
176
+ },
177
+ {
178
+ "uid": "bfcd-208"
179
+ },
180
+ {
181
+ "uid": "bfcd-186"
182
+ },
183
+ {
184
+ "uid": "bfcd-194"
185
+ },
186
+ {
187
+ "uid": "bfcd-196"
188
+ },
189
+ {
190
+ "uid": "bfcd-198"
191
+ },
192
+ {
193
+ "uid": "bfcd-200"
194
+ },
195
+ {
196
+ "uid": "bfcd-202"
197
+ },
198
+ {
199
+ "uid": "bfcd-204"
200
+ },
201
+ {
202
+ "uid": "bfcd-192"
203
+ }
204
+ ]
205
+ },
206
+ "bfcd-182": {
207
+ "id": "/packages/react-query/src/QueryClientProvider.tsx",
208
+ "moduleParts": {
209
+ "index.production.js": "bfcd-183"
210
+ },
211
+ "imported": [
212
+ {
213
+ "uid": "bfcd-211"
214
+ }
215
+ ],
216
+ "importedBy": [
217
+ {
218
+ "uid": "bfcd-206"
219
+ },
220
+ {
221
+ "uid": "bfcd-186"
222
+ },
223
+ {
224
+ "uid": "bfcd-196"
225
+ },
226
+ {
227
+ "uid": "bfcd-198"
228
+ },
229
+ {
230
+ "uid": "bfcd-200"
231
+ },
232
+ {
233
+ "uid": "bfcd-202"
234
+ },
235
+ {
236
+ "uid": "bfcd-192"
237
+ }
238
+ ]
239
+ },
240
+ "bfcd-184": {
241
+ "id": "/packages/react-query/src/isRestoring.tsx",
242
+ "moduleParts": {
243
+ "index.production.js": "bfcd-185"
244
+ },
245
+ "imported": [
246
+ {
247
+ "uid": "bfcd-211"
248
+ }
249
+ ],
250
+ "importedBy": [
251
+ {
252
+ "uid": "bfcd-206"
253
+ },
254
+ {
255
+ "uid": "bfcd-186"
256
+ },
257
+ {
258
+ "uid": "bfcd-192"
259
+ }
260
+ ]
261
+ },
262
+ "bfcd-186": {
263
+ "id": "/packages/react-query/src/useQueries.ts",
264
+ "moduleParts": {
265
+ "index.production.js": "bfcd-187"
266
+ },
267
+ "imported": [
268
+ {
269
+ "uid": "bfcd-211"
270
+ },
271
+ {
272
+ "uid": "bfcd-212"
273
+ },
274
+ {
275
+ "uid": "bfcd-180"
276
+ },
277
+ {
278
+ "uid": "bfcd-182"
279
+ },
280
+ {
281
+ "uid": "bfcd-184"
282
+ }
283
+ ],
284
+ "importedBy": [
285
+ {
286
+ "uid": "bfcd-206"
287
+ }
288
+ ]
289
+ },
290
+ "bfcd-188": {
291
+ "id": "/packages/react-query/src/QueryErrorResetBoundary.tsx",
292
+ "moduleParts": {
293
+ "index.production.js": "bfcd-189"
294
+ },
295
+ "imported": [
296
+ {
297
+ "uid": "bfcd-211"
298
+ }
299
+ ],
300
+ "importedBy": [
301
+ {
302
+ "uid": "bfcd-206"
303
+ },
304
+ {
305
+ "uid": "bfcd-192"
306
+ }
307
+ ]
308
+ },
309
+ "bfcd-190": {
310
+ "id": "/packages/react-query/src/utils.ts",
311
+ "moduleParts": {
312
+ "index.production.js": "bfcd-191"
313
+ },
314
+ "imported": [],
315
+ "importedBy": [
316
+ {
317
+ "uid": "bfcd-202"
318
+ },
319
+ {
320
+ "uid": "bfcd-192"
321
+ }
322
+ ]
323
+ },
324
+ "bfcd-192": {
325
+ "id": "/packages/react-query/src/useBaseQuery.ts",
326
+ "moduleParts": {
327
+ "index.production.js": "bfcd-193"
328
+ },
329
+ "imported": [
330
+ {
331
+ "uid": "bfcd-211"
332
+ },
333
+ {
334
+ "uid": "bfcd-212"
335
+ },
336
+ {
337
+ "uid": "bfcd-180"
338
+ },
339
+ {
340
+ "uid": "bfcd-188"
341
+ },
342
+ {
343
+ "uid": "bfcd-182"
344
+ },
345
+ {
346
+ "uid": "bfcd-190"
347
+ },
348
+ {
349
+ "uid": "bfcd-184"
350
+ }
351
+ ],
352
+ "importedBy": [
353
+ {
354
+ "uid": "bfcd-194"
355
+ },
356
+ {
357
+ "uid": "bfcd-204"
358
+ }
359
+ ]
360
+ },
361
+ "bfcd-194": {
362
+ "id": "/packages/react-query/src/useQuery.ts",
363
+ "moduleParts": {
364
+ "index.production.js": "bfcd-195"
365
+ },
366
+ "imported": [
367
+ {
368
+ "uid": "bfcd-180"
369
+ },
370
+ {
371
+ "uid": "bfcd-192"
372
+ }
373
+ ],
374
+ "importedBy": [
375
+ {
376
+ "uid": "bfcd-206"
377
+ }
378
+ ]
379
+ },
380
+ "bfcd-196": {
381
+ "id": "/packages/react-query/src/Hydrate.tsx",
382
+ "moduleParts": {
383
+ "index.production.js": "bfcd-197"
384
+ },
385
+ "imported": [
386
+ {
387
+ "uid": "bfcd-211"
388
+ },
389
+ {
390
+ "uid": "bfcd-180"
391
+ },
392
+ {
393
+ "uid": "bfcd-182"
394
+ }
395
+ ],
396
+ "importedBy": [
397
+ {
398
+ "uid": "bfcd-206"
399
+ }
400
+ ]
401
+ },
402
+ "bfcd-198": {
403
+ "id": "/packages/react-query/src/useIsFetching.ts",
404
+ "moduleParts": {
405
+ "index.production.js": "bfcd-199"
406
+ },
407
+ "imported": [
408
+ {
409
+ "uid": "bfcd-211"
410
+ },
411
+ {
412
+ "uid": "bfcd-180"
413
+ },
414
+ {
415
+ "uid": "bfcd-212"
416
+ },
417
+ {
418
+ "uid": "bfcd-182"
419
+ }
420
+ ],
421
+ "importedBy": [
422
+ {
423
+ "uid": "bfcd-206"
424
+ }
425
+ ]
426
+ },
427
+ "bfcd-200": {
428
+ "id": "/packages/react-query/src/useIsMutating.ts",
429
+ "moduleParts": {
430
+ "index.production.js": "bfcd-201"
431
+ },
432
+ "imported": [
433
+ {
434
+ "uid": "bfcd-211"
435
+ },
436
+ {
437
+ "uid": "bfcd-212"
438
+ },
439
+ {
440
+ "uid": "bfcd-180"
441
+ },
442
+ {
443
+ "uid": "bfcd-182"
444
+ }
445
+ ],
446
+ "importedBy": [
447
+ {
448
+ "uid": "bfcd-206"
449
+ }
450
+ ]
451
+ },
452
+ "bfcd-202": {
453
+ "id": "/packages/react-query/src/useMutation.ts",
454
+ "moduleParts": {
455
+ "index.production.js": "bfcd-203"
456
+ },
457
+ "imported": [
458
+ {
459
+ "uid": "bfcd-211"
460
+ },
461
+ {
462
+ "uid": "bfcd-212"
463
+ },
464
+ {
465
+ "uid": "bfcd-180"
466
+ },
467
+ {
468
+ "uid": "bfcd-182"
469
+ },
470
+ {
471
+ "uid": "bfcd-190"
472
+ }
473
+ ],
474
+ "importedBy": [
475
+ {
476
+ "uid": "bfcd-206"
477
+ }
478
+ ]
479
+ },
480
+ "bfcd-204": {
481
+ "id": "/packages/react-query/src/useInfiniteQuery.ts",
482
+ "moduleParts": {
483
+ "index.production.js": "bfcd-205"
484
+ },
485
+ "imported": [
486
+ {
487
+ "uid": "bfcd-180"
488
+ },
489
+ {
490
+ "uid": "bfcd-192"
491
+ }
492
+ ],
493
+ "importedBy": [
494
+ {
495
+ "uid": "bfcd-206"
496
+ }
497
+ ]
498
+ },
499
+ "bfcd-206": {
500
+ "id": "/packages/react-query/src/index.ts",
501
+ "moduleParts": {
502
+ "index.production.js": "bfcd-207"
503
+ },
504
+ "imported": [
505
+ {
506
+ "uid": "bfcd-208"
507
+ },
508
+ {
509
+ "uid": "bfcd-180"
510
+ },
511
+ {
512
+ "uid": "bfcd-209"
513
+ },
514
+ {
515
+ "uid": "bfcd-186"
516
+ },
517
+ {
518
+ "uid": "bfcd-194"
519
+ },
520
+ {
521
+ "uid": "bfcd-182"
522
+ },
523
+ {
524
+ "uid": "bfcd-196"
525
+ },
526
+ {
527
+ "uid": "bfcd-188"
528
+ },
529
+ {
530
+ "uid": "bfcd-198"
531
+ },
532
+ {
533
+ "uid": "bfcd-200"
534
+ },
535
+ {
536
+ "uid": "bfcd-202"
537
+ },
538
+ {
539
+ "uid": "bfcd-204"
540
+ },
541
+ {
542
+ "uid": "bfcd-184"
543
+ }
544
+ ],
545
+ "importedBy": [],
546
+ "isEntry": true
547
+ },
548
+ "bfcd-208": {
549
+ "id": "/packages/react-query/src/setBatchUpdatesFn.ts",
550
+ "moduleParts": {},
551
+ "imported": [
552
+ {
553
+ "uid": "bfcd-180"
554
+ },
555
+ {
556
+ "uid": "bfcd-210"
557
+ }
558
+ ],
559
+ "importedBy": [
560
+ {
561
+ "uid": "bfcd-206"
562
+ }
563
+ ]
564
+ },
565
+ "bfcd-209": {
566
+ "id": "/packages/react-query/src/types.ts",
567
+ "moduleParts": {},
568
+ "imported": [],
569
+ "importedBy": [
570
+ {
571
+ "uid": "bfcd-206"
572
+ }
573
+ ]
574
+ },
575
+ "bfcd-210": {
576
+ "id": "/packages/react-query/src/reactBatchedUpdates.ts",
577
+ "moduleParts": {},
578
+ "imported": [
579
+ {
580
+ "uid": "bfcd-213"
581
+ }
582
+ ],
583
+ "importedBy": [
584
+ {
585
+ "uid": "bfcd-208"
586
+ }
587
+ ]
588
+ },
589
+ "bfcd-211": {
590
+ "id": "react",
591
+ "moduleParts": {},
592
+ "imported": [],
593
+ "importedBy": [
594
+ {
595
+ "uid": "bfcd-186"
596
+ },
597
+ {
598
+ "uid": "bfcd-182"
599
+ },
600
+ {
601
+ "uid": "bfcd-196"
602
+ },
603
+ {
604
+ "uid": "bfcd-188"
605
+ },
606
+ {
607
+ "uid": "bfcd-198"
608
+ },
609
+ {
610
+ "uid": "bfcd-200"
611
+ },
612
+ {
613
+ "uid": "bfcd-202"
614
+ },
615
+ {
616
+ "uid": "bfcd-184"
617
+ },
618
+ {
619
+ "uid": "bfcd-192"
620
+ }
621
+ ],
622
+ "isExternal": true
623
+ },
624
+ "bfcd-212": {
625
+ "id": "use-sync-external-store/shim",
626
+ "moduleParts": {},
627
+ "imported": [],
628
+ "importedBy": [
629
+ {
630
+ "uid": "bfcd-186"
631
+ },
632
+ {
633
+ "uid": "bfcd-198"
634
+ },
635
+ {
636
+ "uid": "bfcd-200"
637
+ },
638
+ {
639
+ "uid": "bfcd-202"
640
+ },
641
+ {
642
+ "uid": "bfcd-192"
643
+ }
644
+ ],
645
+ "isExternal": true
646
+ },
647
+ "bfcd-213": {
648
+ "id": "/node_modules/react-dom/index.js",
649
+ "moduleParts": {},
650
+ "imported": [],
651
+ "importedBy": [
652
+ {
653
+ "uid": "bfcd-210"
654
+ }
655
+ ]
656
+ }
657
+ },
658
+ "env": {
659
+ "rollup": "2.76.0"
660
+ },
661
+ "options": {
662
+ "gzip": true,
663
+ "brotli": false,
664
+ "sourcemap": false
665
+ }
666
+ }
@@ -0,0 +1,16 @@
1
+ import { Subscribable } from './subscribable';
2
+ declare type SetupFn = (setFocused: (focused?: boolean) => void) => (() => void) | undefined;
3
+ export declare class FocusManager extends Subscribable {
4
+ private focused?;
5
+ private cleanup?;
6
+ private setup;
7
+ constructor();
8
+ protected onSubscribe(): void;
9
+ protected onUnsubscribe(): void;
10
+ setEventListener(setup: SetupFn): void;
11
+ setFocused(focused?: boolean): void;
12
+ onFocus(): void;
13
+ isFocused(): boolean;
14
+ }
15
+ export declare const focusManager: FocusManager;
16
+ export {};
@@ -0,0 +1,34 @@
1
+ import type { QueryClient } from './queryClient';
2
+ import type { Query, QueryState } from './query';
3
+ import type { MutationKey, MutationOptions, QueryKey, QueryOptions } from './types';
4
+ import type { Mutation, MutationState } from './mutation';
5
+ export interface DehydrateOptions {
6
+ dehydrateMutations?: boolean;
7
+ dehydrateQueries?: boolean;
8
+ shouldDehydrateMutation?: ShouldDehydrateMutationFunction;
9
+ shouldDehydrateQuery?: ShouldDehydrateQueryFunction;
10
+ }
11
+ export interface HydrateOptions {
12
+ defaultOptions?: {
13
+ queries?: QueryOptions;
14
+ mutations?: MutationOptions;
15
+ };
16
+ }
17
+ interface DehydratedMutation {
18
+ mutationKey?: MutationKey;
19
+ state: MutationState;
20
+ }
21
+ interface DehydratedQuery {
22
+ queryHash: string;
23
+ queryKey: QueryKey;
24
+ state: QueryState;
25
+ }
26
+ export interface DehydratedState {
27
+ mutations: DehydratedMutation[];
28
+ queries: DehydratedQuery[];
29
+ }
30
+ export declare type ShouldDehydrateQueryFunction = (query: Query) => boolean;
31
+ export declare type ShouldDehydrateMutationFunction = (mutation: Mutation) => boolean;
32
+ export declare function dehydrate(client: QueryClient, options?: DehydrateOptions): DehydratedState;
33
+ export declare function hydrate(client: QueryClient, dehydratedState: unknown, options?: HydrateOptions): void;
34
+ export {};