react-query-kit 1.5.0 → 1.5.2

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 (81) hide show
  1. package/README.md +21 -35
  2. package/build/lib/createBaseQuery.esm.js +12 -11
  3. package/build/lib/createBaseQuery.esm.js.map +1 -1
  4. package/build/lib/createBaseQuery.js +11 -10
  5. package/build/lib/createBaseQuery.js.map +1 -1
  6. package/build/lib/createBaseQuery.mjs +12 -11
  7. package/build/lib/createBaseQuery.mjs.map +1 -1
  8. package/build/lib/createInfiniteQuery.d.ts +1 -1
  9. package/build/lib/createInfiniteQuery.esm.js +2 -2
  10. package/build/lib/createInfiniteQuery.esm.js.map +1 -1
  11. package/build/lib/createInfiniteQuery.js +2 -2
  12. package/build/lib/createInfiniteQuery.js.map +1 -1
  13. package/build/lib/createInfiniteQuery.mjs +2 -2
  14. package/build/lib/createInfiniteQuery.mjs.map +1 -1
  15. package/build/lib/createMutation.d.ts +1 -1
  16. package/build/lib/createMutation.esm.js +4 -4
  17. package/build/lib/createMutation.esm.js.map +1 -1
  18. package/build/lib/createMutation.js +3 -3
  19. package/build/lib/createMutation.js.map +1 -1
  20. package/build/lib/createMutation.mjs +4 -4
  21. package/build/lib/createMutation.mjs.map +1 -1
  22. package/build/lib/createQuery.d.ts +1 -1
  23. package/build/lib/createQuery.esm.js +2 -2
  24. package/build/lib/createQuery.esm.js.map +1 -1
  25. package/build/lib/createQuery.js +2 -2
  26. package/build/lib/createQuery.js.map +1 -1
  27. package/build/lib/createQuery.mjs +2 -2
  28. package/build/lib/createQuery.mjs.map +1 -1
  29. package/build/lib/createSuspenseInfiniteQuery.d.ts +1 -1
  30. package/build/lib/createSuspenseInfiniteQuery.esm.js +2 -2
  31. package/build/lib/createSuspenseInfiniteQuery.esm.js.map +1 -1
  32. package/build/lib/createSuspenseInfiniteQuery.js +2 -2
  33. package/build/lib/createSuspenseInfiniteQuery.js.map +1 -1
  34. package/build/lib/createSuspenseInfiniteQuery.mjs +2 -2
  35. package/build/lib/createSuspenseInfiniteQuery.mjs.map +1 -1
  36. package/build/lib/createSuspenseQuery.d.ts +1 -1
  37. package/build/lib/createSuspenseQuery.esm.js +2 -2
  38. package/build/lib/createSuspenseQuery.esm.js.map +1 -1
  39. package/build/lib/createSuspenseQuery.js +2 -2
  40. package/build/lib/createSuspenseQuery.js.map +1 -1
  41. package/build/lib/createSuspenseQuery.mjs +2 -2
  42. package/build/lib/createSuspenseQuery.mjs.map +1 -1
  43. package/build/lib/index.d.ts +1 -2
  44. package/build/lib/index.esm.js +0 -1
  45. package/build/lib/index.esm.js.map +1 -1
  46. package/build/lib/index.js +0 -2
  47. package/build/lib/index.js.map +1 -1
  48. package/build/lib/index.mjs +0 -1
  49. package/build/lib/index.mjs.map +1 -1
  50. package/build/lib/types.d.ts +18 -16
  51. package/build/lib/utils.d.ts +4 -4
  52. package/build/lib/utils.esm.js +20 -23
  53. package/build/lib/utils.esm.js.map +1 -1
  54. package/build/lib/utils.js +20 -23
  55. package/build/lib/utils.js.map +1 -1
  56. package/build/lib/utils.mjs +20 -23
  57. package/build/lib/utils.mjs.map +1 -1
  58. package/build/stats-html.html +1 -1
  59. package/build/stats.json +91 -129
  60. package/build/umd/index.development.js +41 -58
  61. package/build/umd/index.development.js.map +1 -1
  62. package/build/umd/index.production.js +1 -1
  63. package/build/umd/index.production.js.map +1 -1
  64. package/package.json +2 -2
  65. package/src/createBaseQuery.ts +32 -33
  66. package/src/createInfiniteQuery.ts +2 -2
  67. package/src/createMutation.ts +4 -4
  68. package/src/createQuery.tsx +2 -2
  69. package/src/createSuspenseInfiniteQuery.ts +2 -2
  70. package/src/createSuspenseQuery.ts +2 -2
  71. package/src/index.ts +1 -4
  72. package/src/types.ts +117 -111
  73. package/src/utils.ts +22 -17
  74. package/build/lib/createImmutableQuery.d.ts +0 -6
  75. package/build/lib/createImmutableQuery.esm.js +0 -19
  76. package/build/lib/createImmutableQuery.esm.js.map +0 -1
  77. package/build/lib/createImmutableQuery.js +0 -23
  78. package/build/lib/createImmutableQuery.js.map +0 -1
  79. package/build/lib/createImmutableQuery.mjs +0 -19
  80. package/build/lib/createImmutableQuery.mjs.map +0 -1
  81. package/src/createImmutableQuery.tsx +0 -54
@@ -1,40 +1,37 @@
1
1
  import { useQueryClient } from '@tanstack/react-query';
2
2
 
3
- const useCompatibeQueryClient = (options, queryClient) => // @ts-ignore
4
- useQueryClient(options != null && options.context ? {
5
- context: options.context
6
- } : queryClient);
7
- const withMiddlewares = (hook, defaultOptions, type) => {
8
- const {
9
- use = [],
10
- ...restOptions
11
- } = defaultOptions;
3
+ const useCompatibeQueryClient = (options, queryClient) => {
4
+ return useQueryClient( // compatible with ReactQuery v4
5
+ // @ts-ignore
6
+ options != null && options.context ? {
7
+ context: options.context
8
+ } : queryClient);
9
+ };
10
+ const withMiddleware = (hook, defaultOptions, type) => {
12
11
  return function useMiddleware(options, queryClient) {
13
12
  const client = useCompatibeQueryClient(options, queryClient);
13
+ const [middleware, opts] = [client.getDefaultOptions()[type], defaultOptions, options].reduce((acc, item = {}) => {
14
+ const [middleware, opts] = acc;
15
+ const {
16
+ use = [],
17
+ ...rest
18
+ } = item;
19
+ return [[...middleware, ...use], { ...opts,
20
+ ...rest
21
+ }];
22
+ }, [[], {}]);
14
23
  let next = hook;
15
- const {
16
- use: configUse = [],
17
- ...configOptions
18
- } = client.getDefaultOptions()[type] || {};
19
- const middleware = configUse.concat(use);
20
24
 
21
25
  for (let i = middleware.length; i--;) {
22
- if (middleware[i] === undefined) {
23
- console.log(middleware[i], middleware);
24
- }
25
-
26
26
  next = middleware[i](next);
27
27
  }
28
28
 
29
- return next({ ...configOptions,
30
- ...restOptions,
31
- ...options
32
- }, queryClient);
29
+ return next(opts, queryClient);
33
30
  };
34
31
  };
35
32
  const getQueryKey = (primaryKey, variables) => {
36
33
  return variables === undefined ? [primaryKey] : [primaryKey, variables];
37
34
  };
38
35
 
39
- export { getQueryKey, useCompatibeQueryClient, withMiddlewares };
36
+ export { getQueryKey, useCompatibeQueryClient, withMiddleware };
40
37
  //# sourceMappingURL=utils.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs","sources":["../../src/utils.ts"],"sourcesContent":["import { QueryClient, useQueryClient } from '@tanstack/react-query'\n\nimport { CompatibleWithV4, Middleware } from './types'\n\nexport const useCompatibeQueryClient = (\n options?: any,\n queryClient?: CompatibleWithV4<QueryClient, void>\n) =>\n // @ts-ignore\n useQueryClient(options?.context ? { context: options.context } : queryClient)\n\nexport const withMiddlewares = (\n hook: any,\n defaultOptions: any,\n type: 'queries' | 'mutations'\n) => {\n const { use = [], ...restOptions } = defaultOptions\n\n return function useMiddleware(\n options?: { client?: QueryClient; use?: Middleware[] },\n queryClient?: CompatibleWithV4<QueryClient, void>\n ) {\n const client = useCompatibeQueryClient(options, queryClient)\n\n let next = hook\n\n const { use: configUse = [], ...configOptions } =\n (client.getDefaultOptions()[type] as any) || {}\n\n const middleware: Middleware[] = configUse.concat(use)\n\n for (let i = middleware.length; i--; ) {\n if (middleware[i] === undefined) {\n console.log(middleware[i], middleware)\n }\n next = middleware[i]!(next)\n }\n\n return next({ ...configOptions, ...restOptions, ...options }, queryClient)\n }\n}\n\nexport const getQueryKey = <TVariables>(\n primaryKey: string,\n variables?: TVariables\n) => {\n return variables === undefined ? [primaryKey] : [primaryKey, variables]\n}\n"],"names":["useCompatibeQueryClient","options","queryClient","useQueryClient","context","withMiddlewares","hook","defaultOptions","type","use","restOptions","useMiddleware","client","next","configUse","configOptions","getDefaultOptions","middleware","concat","i","length","undefined","console","log","getQueryKey","primaryKey","variables"],"mappings":";;MAIaA,uBAAuB,GAAG,CACrCC,OADqC,EAErCC,WAFqC;AAKrCC,cAAc,CAACF,OAAO,IAAA,IAAP,IAAAA,OAAO,CAAEG,OAAT,GAAmB;EAAEA,OAAO,EAAEH,OAAO,CAACG,OAAAA;AAAnB,CAAnB,GAAkDF,WAAnD,EALT;AAOA,MAAMG,eAAe,GAAG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;;"}
1
+ {"version":3,"file":"utils.mjs","sources":["../../src/utils.ts"],"sourcesContent":["import { QueryClient, useQueryClient } from '@tanstack/react-query'\n\nimport { CompatibleWithV4, Middleware } from './types'\n\nexport const useCompatibeQueryClient = (\n options?: any,\n queryClient?: CompatibleWithV4<QueryClient, void>\n) => {\n return useQueryClient(\n // compatible with ReactQuery v4\n // @ts-ignore\n options?.context ? { context: options.context } : queryClient\n )\n}\n\nexport const withMiddleware = (\n hook: any,\n defaultOptions: any,\n type: 'queries' | 'mutations'\n) => {\n return function useMiddleware(\n options?: { client?: QueryClient; use?: Middleware[] },\n queryClient?: CompatibleWithV4<QueryClient, void>\n ) {\n const client = useCompatibeQueryClient(options, queryClient)\n const [middleware, opts] = [\n client.getDefaultOptions()[type],\n defaultOptions,\n options,\n ].reduce(\n (acc, item = {}) => {\n const [middleware, opts] = acc\n const { use = [], ...rest } = item\n return [[...middleware, ...use], { ...opts, ...rest }]\n },\n [[], {}]\n )\n\n let next = hook\n for (let i = middleware.length; i--; ) {\n next = middleware[i](next)\n }\n\n return next(opts, queryClient)\n }\n}\n\nexport const getQueryKey = <TVariables>(\n primaryKey: string,\n variables?: TVariables\n) => {\n return variables === undefined ? [primaryKey] : [primaryKey, variables]\n}\n"],"names":["useCompatibeQueryClient","options","queryClient","useQueryClient","context","withMiddleware","hook","defaultOptions","type","useMiddleware","client","middleware","opts","getDefaultOptions","reduce","acc","item","use","rest","next","i","length","getQueryKey","primaryKey","variables","undefined"],"mappings":";;MAIaA,uBAAuB,GAAG,CACrCC,OADqC,EAErCC,WAFqC,KAGlC;AACH,EAAA,OAAOC,cAAc;AAEnB;AACAF,EAAAA,OAAO,IAAP,IAAA,IAAAA,OAAO,CAAEG,OAAT,GAAmB;IAAEA,OAAO,EAAEH,OAAO,CAACG,OAAAA;GAAtC,GAAkDF,WAH/B,CAArB,CAAA;AAKD,EATM;AAWA,MAAMG,cAAc,GAAG,CAC5BC,IAD4B,EAE5BC,cAF4B,EAG5BC,IAH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
4014
4014
  </script>
4015
4015
  <script>
4016
4016
  /*<!--*/
4017
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"src","children":[{"uid":"349d-1","name":"utils.ts"},{"uid":"349d-3","name":"createBaseQuery.ts"},{"uid":"349d-5","name":"createQuery.tsx"},{"uid":"349d-7","name":"createImmutableQuery.tsx"},{"uid":"349d-9","name":"createSuspenseQuery.ts"},{"uid":"349d-11","name":"createInfiniteQuery.ts"},{"uid":"349d-13","name":"createSuspenseInfiniteQuery.ts"},{"uid":"349d-15","name":"createMutation.ts"},{"uid":"349d-17","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"349d-1":{"renderedLength":1082,"gzipLength":441,"brotliLength":0,"mainUid":"349d-0"},"349d-3":{"renderedLength":1585,"gzipLength":512,"brotliLength":0,"mainUid":"349d-2"},"349d-5":{"renderedLength":95,"gzipLength":83,"brotliLength":0,"mainUid":"349d-4"},"349d-7":{"renderedLength":376,"gzipLength":204,"brotliLength":0,"mainUid":"349d-6"},"349d-9":{"renderedLength":269,"gzipLength":174,"brotliLength":0,"mainUid":"349d-8"},"349d-11":{"renderedLength":111,"gzipLength":92,"brotliLength":0,"mainUid":"349d-10"},"349d-13":{"renderedLength":285,"gzipLength":181,"brotliLength":0,"mainUid":"349d-12"},"349d-15":{"renderedLength":264,"gzipLength":174,"brotliLength":0,"mainUid":"349d-14"},"349d-17":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"349d-16"}},"nodeMetas":{"349d-0":{"id":"/src/utils.ts","moduleParts":{"index.production.js":"349d-1"},"imported":[{"uid":"349d-18"}],"importedBy":[{"uid":"349d-16"},{"uid":"349d-14"},{"uid":"349d-2"}]},"349d-2":{"id":"/src/createBaseQuery.ts","moduleParts":{"index.production.js":"349d-3"},"imported":[{"uid":"349d-0"}],"importedBy":[{"uid":"349d-4"},{"uid":"349d-6"},{"uid":"349d-8"},{"uid":"349d-10"},{"uid":"349d-12"}]},"349d-4":{"id":"/src/createQuery.tsx","moduleParts":{"index.production.js":"349d-5"},"imported":[{"uid":"349d-18"},{"uid":"349d-2"}],"importedBy":[{"uid":"349d-16"}]},"349d-6":{"id":"/src/createImmutableQuery.tsx","moduleParts":{"index.production.js":"349d-7"},"imported":[{"uid":"349d-18"},{"uid":"349d-2"}],"importedBy":[{"uid":"349d-16"}]},"349d-8":{"id":"/src/createSuspenseQuery.ts","moduleParts":{"index.production.js":"349d-9"},"imported":[{"uid":"349d-18"},{"uid":"349d-2"}],"importedBy":[{"uid":"349d-16"}]},"349d-10":{"id":"/src/createInfiniteQuery.ts","moduleParts":{"index.production.js":"349d-11"},"imported":[{"uid":"349d-18"},{"uid":"349d-2"}],"importedBy":[{"uid":"349d-16"}]},"349d-12":{"id":"/src/createSuspenseInfiniteQuery.ts","moduleParts":{"index.production.js":"349d-13"},"imported":[{"uid":"349d-18"},{"uid":"349d-2"}],"importedBy":[{"uid":"349d-16"}]},"349d-14":{"id":"/src/createMutation.ts","moduleParts":{"index.production.js":"349d-15"},"imported":[{"uid":"349d-18"},{"uid":"349d-0"}],"importedBy":[{"uid":"349d-16"}]},"349d-16":{"id":"/src/index.ts","moduleParts":{"index.production.js":"349d-17"},"imported":[{"uid":"349d-4"},{"uid":"349d-6"},{"uid":"349d-8"},{"uid":"349d-10"},{"uid":"349d-12"},{"uid":"349d-14"},{"uid":"349d-0"}],"importedBy":[],"isEntry":true},"349d-18":{"id":"@tanstack/react-query","moduleParts":{},"imported":[],"importedBy":[{"uid":"349d-4"},{"uid":"349d-6"},{"uid":"349d-8"},{"uid":"349d-10"},{"uid":"349d-12"},{"uid":"349d-14"},{"uid":"349d-0"}],"isExternal":true}},"env":{"rollup":"2.77.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
4017
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"src","children":[{"uid":"24d3-1","name":"utils.ts"},{"uid":"24d3-3","name":"createBaseQuery.ts"},{"uid":"24d3-5","name":"createQuery.tsx"},{"uid":"24d3-7","name":"createSuspenseQuery.ts"},{"uid":"24d3-9","name":"createInfiniteQuery.ts"},{"uid":"24d3-11","name":"createSuspenseInfiniteQuery.ts"},{"uid":"24d3-13","name":"createMutation.ts"},{"uid":"24d3-15","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"24d3-1":{"renderedLength":1070,"gzipLength":444,"brotliLength":0,"mainUid":"24d3-0"},"24d3-3":{"renderedLength":1470,"gzipLength":495,"brotliLength":0,"mainUid":"24d3-2"},"24d3-5":{"renderedLength":97,"gzipLength":90,"brotliLength":0,"mainUid":"24d3-4"},"24d3-7":{"renderedLength":271,"gzipLength":177,"brotliLength":0,"mainUid":"24d3-6"},"24d3-9":{"renderedLength":113,"gzipLength":99,"brotliLength":0,"mainUid":"24d3-8"},"24d3-11":{"renderedLength":287,"gzipLength":186,"brotliLength":0,"mainUid":"24d3-10"},"24d3-13":{"renderedLength":265,"gzipLength":173,"brotliLength":0,"mainUid":"24d3-12"},"24d3-15":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"24d3-14"}},"nodeMetas":{"24d3-0":{"id":"/src/utils.ts","moduleParts":{"index.production.js":"24d3-1"},"imported":[{"uid":"24d3-16"}],"importedBy":[{"uid":"24d3-14"},{"uid":"24d3-12"},{"uid":"24d3-2"}]},"24d3-2":{"id":"/src/createBaseQuery.ts","moduleParts":{"index.production.js":"24d3-3"},"imported":[{"uid":"24d3-0"}],"importedBy":[{"uid":"24d3-4"},{"uid":"24d3-6"},{"uid":"24d3-8"},{"uid":"24d3-10"}]},"24d3-4":{"id":"/src/createQuery.tsx","moduleParts":{"index.production.js":"24d3-5"},"imported":[{"uid":"24d3-16"},{"uid":"24d3-2"}],"importedBy":[{"uid":"24d3-14"}]},"24d3-6":{"id":"/src/createSuspenseQuery.ts","moduleParts":{"index.production.js":"24d3-7"},"imported":[{"uid":"24d3-16"},{"uid":"24d3-2"}],"importedBy":[{"uid":"24d3-14"}]},"24d3-8":{"id":"/src/createInfiniteQuery.ts","moduleParts":{"index.production.js":"24d3-9"},"imported":[{"uid":"24d3-16"},{"uid":"24d3-2"}],"importedBy":[{"uid":"24d3-14"}]},"24d3-10":{"id":"/src/createSuspenseInfiniteQuery.ts","moduleParts":{"index.production.js":"24d3-11"},"imported":[{"uid":"24d3-16"},{"uid":"24d3-2"}],"importedBy":[{"uid":"24d3-14"}]},"24d3-12":{"id":"/src/createMutation.ts","moduleParts":{"index.production.js":"24d3-13"},"imported":[{"uid":"24d3-16"},{"uid":"24d3-0"}],"importedBy":[{"uid":"24d3-14"}]},"24d3-14":{"id":"/src/index.ts","moduleParts":{"index.production.js":"24d3-15"},"imported":[{"uid":"24d3-4"},{"uid":"24d3-6"},{"uid":"24d3-8"},{"uid":"24d3-10"},{"uid":"24d3-12"},{"uid":"24d3-0"}],"importedBy":[],"isEntry":true},"24d3-16":{"id":"@tanstack/react-query","moduleParts":{},"imported":[],"importedBy":[{"uid":"24d3-4"},{"uid":"24d3-6"},{"uid":"24d3-8"},{"uid":"24d3-10"},{"uid":"24d3-12"},{"uid":"24d3-0"}],"isExternal":true}},"env":{"rollup":"2.77.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
4018
4018
 
4019
4019
  const run = () => {
4020
4020
  const width = window.innerWidth;
package/build/stats.json CHANGED
@@ -10,39 +10,35 @@
10
10
  "name": "src",
11
11
  "children": [
12
12
  {
13
- "uid": "349d-20",
13
+ "uid": "24d3-18",
14
14
  "name": "utils.ts"
15
15
  },
16
16
  {
17
- "uid": "349d-22",
17
+ "uid": "24d3-20",
18
18
  "name": "createBaseQuery.ts"
19
19
  },
20
20
  {
21
- "uid": "349d-24",
21
+ "uid": "24d3-22",
22
22
  "name": "createQuery.tsx"
23
23
  },
24
24
  {
25
- "uid": "349d-26",
26
- "name": "createImmutableQuery.tsx"
27
- },
28
- {
29
- "uid": "349d-28",
25
+ "uid": "24d3-24",
30
26
  "name": "createSuspenseQuery.ts"
31
27
  },
32
28
  {
33
- "uid": "349d-30",
29
+ "uid": "24d3-26",
34
30
  "name": "createInfiniteQuery.ts"
35
31
  },
36
32
  {
37
- "uid": "349d-32",
33
+ "uid": "24d3-28",
38
34
  "name": "createSuspenseInfiniteQuery.ts"
39
35
  },
40
36
  {
41
- "uid": "349d-34",
37
+ "uid": "24d3-30",
42
38
  "name": "createMutation.ts"
43
39
  },
44
40
  {
45
- "uid": "349d-36",
41
+ "uid": "24d3-32",
46
42
  "name": "index.ts"
47
43
  }
48
44
  ]
@@ -53,282 +49,248 @@
53
49
  "isRoot": true
54
50
  },
55
51
  "nodeParts": {
56
- "349d-20": {
57
- "renderedLength": 1082,
58
- "gzipLength": 441,
59
- "brotliLength": 0,
60
- "mainUid": "349d-19"
61
- },
62
- "349d-22": {
63
- "renderedLength": 1585,
64
- "gzipLength": 512,
52
+ "24d3-18": {
53
+ "renderedLength": 1070,
54
+ "gzipLength": 444,
65
55
  "brotliLength": 0,
66
- "mainUid": "349d-21"
56
+ "mainUid": "24d3-17"
67
57
  },
68
- "349d-24": {
69
- "renderedLength": 95,
70
- "gzipLength": 83,
58
+ "24d3-20": {
59
+ "renderedLength": 1470,
60
+ "gzipLength": 495,
71
61
  "brotliLength": 0,
72
- "mainUid": "349d-23"
62
+ "mainUid": "24d3-19"
73
63
  },
74
- "349d-26": {
75
- "renderedLength": 376,
76
- "gzipLength": 204,
64
+ "24d3-22": {
65
+ "renderedLength": 97,
66
+ "gzipLength": 90,
77
67
  "brotliLength": 0,
78
- "mainUid": "349d-25"
68
+ "mainUid": "24d3-21"
79
69
  },
80
- "349d-28": {
81
- "renderedLength": 269,
82
- "gzipLength": 174,
70
+ "24d3-24": {
71
+ "renderedLength": 271,
72
+ "gzipLength": 177,
83
73
  "brotliLength": 0,
84
- "mainUid": "349d-27"
74
+ "mainUid": "24d3-23"
85
75
  },
86
- "349d-30": {
87
- "renderedLength": 111,
88
- "gzipLength": 92,
76
+ "24d3-26": {
77
+ "renderedLength": 113,
78
+ "gzipLength": 99,
89
79
  "brotliLength": 0,
90
- "mainUid": "349d-29"
80
+ "mainUid": "24d3-25"
91
81
  },
92
- "349d-32": {
93
- "renderedLength": 285,
94
- "gzipLength": 181,
82
+ "24d3-28": {
83
+ "renderedLength": 287,
84
+ "gzipLength": 186,
95
85
  "brotliLength": 0,
96
- "mainUid": "349d-31"
86
+ "mainUid": "24d3-27"
97
87
  },
98
- "349d-34": {
99
- "renderedLength": 264,
100
- "gzipLength": 174,
88
+ "24d3-30": {
89
+ "renderedLength": 265,
90
+ "gzipLength": 173,
101
91
  "brotliLength": 0,
102
- "mainUid": "349d-33"
92
+ "mainUid": "24d3-29"
103
93
  },
104
- "349d-36": {
94
+ "24d3-32": {
105
95
  "renderedLength": 0,
106
96
  "gzipLength": 0,
107
97
  "brotliLength": 0,
108
- "mainUid": "349d-35"
98
+ "mainUid": "24d3-31"
109
99
  }
110
100
  },
111
101
  "nodeMetas": {
112
- "349d-19": {
102
+ "24d3-17": {
113
103
  "id": "/src/utils.ts",
114
104
  "moduleParts": {
115
- "index.production.js": "349d-20"
105
+ "index.production.js": "24d3-18"
116
106
  },
117
107
  "imported": [
118
108
  {
119
- "uid": "349d-37"
109
+ "uid": "24d3-33"
120
110
  }
121
111
  ],
122
112
  "importedBy": [
123
113
  {
124
- "uid": "349d-35"
114
+ "uid": "24d3-31"
125
115
  },
126
116
  {
127
- "uid": "349d-33"
117
+ "uid": "24d3-29"
128
118
  },
129
119
  {
130
- "uid": "349d-21"
120
+ "uid": "24d3-19"
131
121
  }
132
122
  ]
133
123
  },
134
- "349d-21": {
124
+ "24d3-19": {
135
125
  "id": "/src/createBaseQuery.ts",
136
126
  "moduleParts": {
137
- "index.production.js": "349d-22"
127
+ "index.production.js": "24d3-20"
138
128
  },
139
129
  "imported": [
140
130
  {
141
- "uid": "349d-19"
131
+ "uid": "24d3-17"
142
132
  }
143
133
  ],
144
134
  "importedBy": [
145
135
  {
146
- "uid": "349d-23"
147
- },
148
- {
149
- "uid": "349d-25"
136
+ "uid": "24d3-21"
150
137
  },
151
138
  {
152
- "uid": "349d-27"
139
+ "uid": "24d3-23"
153
140
  },
154
141
  {
155
- "uid": "349d-29"
142
+ "uid": "24d3-25"
156
143
  },
157
144
  {
158
- "uid": "349d-31"
145
+ "uid": "24d3-27"
159
146
  }
160
147
  ]
161
148
  },
162
- "349d-23": {
149
+ "24d3-21": {
163
150
  "id": "/src/createQuery.tsx",
164
151
  "moduleParts": {
165
- "index.production.js": "349d-24"
152
+ "index.production.js": "24d3-22"
166
153
  },
167
154
  "imported": [
168
155
  {
169
- "uid": "349d-37"
156
+ "uid": "24d3-33"
170
157
  },
171
158
  {
172
- "uid": "349d-21"
159
+ "uid": "24d3-19"
173
160
  }
174
161
  ],
175
162
  "importedBy": [
176
163
  {
177
- "uid": "349d-35"
164
+ "uid": "24d3-31"
178
165
  }
179
166
  ]
180
167
  },
181
- "349d-25": {
182
- "id": "/src/createImmutableQuery.tsx",
183
- "moduleParts": {
184
- "index.production.js": "349d-26"
185
- },
186
- "imported": [
187
- {
188
- "uid": "349d-37"
189
- },
190
- {
191
- "uid": "349d-21"
192
- }
193
- ],
194
- "importedBy": [
195
- {
196
- "uid": "349d-35"
197
- }
198
- ]
199
- },
200
- "349d-27": {
168
+ "24d3-23": {
201
169
  "id": "/src/createSuspenseQuery.ts",
202
170
  "moduleParts": {
203
- "index.production.js": "349d-28"
171
+ "index.production.js": "24d3-24"
204
172
  },
205
173
  "imported": [
206
174
  {
207
- "uid": "349d-37"
175
+ "uid": "24d3-33"
208
176
  },
209
177
  {
210
- "uid": "349d-21"
178
+ "uid": "24d3-19"
211
179
  }
212
180
  ],
213
181
  "importedBy": [
214
182
  {
215
- "uid": "349d-35"
183
+ "uid": "24d3-31"
216
184
  }
217
185
  ]
218
186
  },
219
- "349d-29": {
187
+ "24d3-25": {
220
188
  "id": "/src/createInfiniteQuery.ts",
221
189
  "moduleParts": {
222
- "index.production.js": "349d-30"
190
+ "index.production.js": "24d3-26"
223
191
  },
224
192
  "imported": [
225
193
  {
226
- "uid": "349d-37"
194
+ "uid": "24d3-33"
227
195
  },
228
196
  {
229
- "uid": "349d-21"
197
+ "uid": "24d3-19"
230
198
  }
231
199
  ],
232
200
  "importedBy": [
233
201
  {
234
- "uid": "349d-35"
202
+ "uid": "24d3-31"
235
203
  }
236
204
  ]
237
205
  },
238
- "349d-31": {
206
+ "24d3-27": {
239
207
  "id": "/src/createSuspenseInfiniteQuery.ts",
240
208
  "moduleParts": {
241
- "index.production.js": "349d-32"
209
+ "index.production.js": "24d3-28"
242
210
  },
243
211
  "imported": [
244
212
  {
245
- "uid": "349d-37"
213
+ "uid": "24d3-33"
246
214
  },
247
215
  {
248
- "uid": "349d-21"
216
+ "uid": "24d3-19"
249
217
  }
250
218
  ],
251
219
  "importedBy": [
252
220
  {
253
- "uid": "349d-35"
221
+ "uid": "24d3-31"
254
222
  }
255
223
  ]
256
224
  },
257
- "349d-33": {
225
+ "24d3-29": {
258
226
  "id": "/src/createMutation.ts",
259
227
  "moduleParts": {
260
- "index.production.js": "349d-34"
228
+ "index.production.js": "24d3-30"
261
229
  },
262
230
  "imported": [
263
231
  {
264
- "uid": "349d-37"
232
+ "uid": "24d3-33"
265
233
  },
266
234
  {
267
- "uid": "349d-19"
235
+ "uid": "24d3-17"
268
236
  }
269
237
  ],
270
238
  "importedBy": [
271
239
  {
272
- "uid": "349d-35"
240
+ "uid": "24d3-31"
273
241
  }
274
242
  ]
275
243
  },
276
- "349d-35": {
244
+ "24d3-31": {
277
245
  "id": "/src/index.ts",
278
246
  "moduleParts": {
279
- "index.production.js": "349d-36"
247
+ "index.production.js": "24d3-32"
280
248
  },
281
249
  "imported": [
282
250
  {
283
- "uid": "349d-23"
284
- },
285
- {
286
- "uid": "349d-25"
251
+ "uid": "24d3-21"
287
252
  },
288
253
  {
289
- "uid": "349d-27"
254
+ "uid": "24d3-23"
290
255
  },
291
256
  {
292
- "uid": "349d-29"
257
+ "uid": "24d3-25"
293
258
  },
294
259
  {
295
- "uid": "349d-31"
260
+ "uid": "24d3-27"
296
261
  },
297
262
  {
298
- "uid": "349d-33"
263
+ "uid": "24d3-29"
299
264
  },
300
265
  {
301
- "uid": "349d-19"
266
+ "uid": "24d3-17"
302
267
  }
303
268
  ],
304
269
  "importedBy": [],
305
270
  "isEntry": true
306
271
  },
307
- "349d-37": {
272
+ "24d3-33": {
308
273
  "id": "@tanstack/react-query",
309
274
  "moduleParts": {},
310
275
  "imported": [],
311
276
  "importedBy": [
312
277
  {
313
- "uid": "349d-23"
314
- },
315
- {
316
- "uid": "349d-25"
278
+ "uid": "24d3-21"
317
279
  },
318
280
  {
319
- "uid": "349d-27"
281
+ "uid": "24d3-23"
320
282
  },
321
283
  {
322
- "uid": "349d-29"
284
+ "uid": "24d3-25"
323
285
  },
324
286
  {
325
- "uid": "349d-31"
287
+ "uid": "24d3-27"
326
288
  },
327
289
  {
328
- "uid": "349d-33"
290
+ "uid": "24d3-29"
329
291
  },
330
292
  {
331
- "uid": "349d-19"
293
+ "uid": "24d3-17"
332
294
  }
333
295
  ],
334
296
  "isExternal": true