react-query-kit 1.3.4 → 1.3.5

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.
@@ -22,14 +22,14 @@ export declare type ExposeMethods<TFnData, TVariables> = {
22
22
  queryFn: QueryFunction<TFnData, QueryKitKey<TVariables>>;
23
23
  queryKeyHashFn: QueryKeyHashFunction<QueryKitKey<TVariables>>;
24
24
  };
25
- declare type QueryHookOptions<TFnData, Error, TData, TVariables> = Omit<UseQueryOptions<TFnData, Error, TData, QueryKitKey<TVariables>>, 'queryKey' | 'queryFn' | 'enabled'> & AdditionalQueryHookOptions<TFnData, TVariables>;
25
+ declare type QueryHookOptions<TFnData, Error, TData, TVariables> = Omit<UseQueryOptions<TFnData, Error, TData, QueryKitKey<TVariables>>, 'queryKey' | 'queryFn' | 'queryKeyHashFn' | 'enabled'> & AdditionalQueryHookOptions<TFnData, TVariables>;
26
26
  export interface QueryHook<TFnData, TVariables, Error> extends ExposeMethods<TFnData, TVariables> {
27
27
  <TData = TFnData>(options: TVariables extends void ? QueryHookOptions<TFnData, Error, TData, TVariables> | void : QueryHookOptions<TFnData, Error, TData, TVariables>): UseQueryResult<TData, Error> & {
28
28
  queryKey: QueryKitKey<TVariables>;
29
29
  setData: (updater: Updater<TFnData | undefined, TFnData>, options?: SetDataOptions | undefined) => TFnData | undefined;
30
30
  };
31
31
  }
32
- declare type InfiniteQueryHookOptions<TFnData, Error, TData, TVariables> = Omit<UseInfiniteQueryOptions<TFnData, Error, TData, TFnData, QueryKitKey<TVariables>>, 'queryKey' | 'queryFn' | 'enabled'> & AdditionalQueryHookOptions<TFnData, TVariables>;
32
+ declare type InfiniteQueryHookOptions<TFnData, Error, TData, TVariables> = Omit<UseInfiniteQueryOptions<TFnData, Error, TData, TFnData, QueryKitKey<TVariables>>, 'queryKey' | 'queryFn' | 'queryKeyHashFn' | 'enabled'> & AdditionalQueryHookOptions<TFnData, TVariables>;
33
33
  export interface InfiniteQueryHook<TFnData, TVariables, Error = unknown> extends ExposeMethods<TFnData, TVariables> {
34
34
  <TData = TFnData>(options: TVariables extends void ? InfiniteQueryHookOptions<TFnData, Error, TData, TVariables> | void : InfiniteQueryHookOptions<TFnData, Error, TData, TVariables>): UseInfiniteQueryResult<TData, Error> & {
35
35
  queryKey: QueryKitKey<TVariables>;
@@ -4014,7 +4014,7 @@ var drawChart = (function (exports) {
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":"f579-1","name":"createBaseQuery.ts"},{"uid":"f579-3","name":"utils.ts"},{"uid":"f579-5","name":"createInfiniteQuery.ts"},{"uid":"f579-7","name":"createMutation.ts"},{"uid":"f579-9","name":"createQuery.tsx"},{"uid":"f579-11","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"f579-1":{"renderedLength":1296,"gzipLength":463,"brotliLength":0,"mainUid":"f579-0"},"f579-3":{"renderedLength":292,"gzipLength":169,"brotliLength":0,"mainUid":"f579-2"},"f579-5":{"renderedLength":177,"gzipLength":131,"brotliLength":0,"mainUid":"f579-4"},"f579-7":{"renderedLength":432,"gzipLength":217,"brotliLength":0,"mainUid":"f579-6"},"f579-9":{"renderedLength":161,"gzipLength":121,"brotliLength":0,"mainUid":"f579-8"},"f579-11":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"f579-10"}},"nodeMetas":{"f579-0":{"id":"/src/createBaseQuery.ts","moduleParts":{"index.production.js":"f579-1"},"imported":[{"uid":"f579-13"},{"uid":"f579-12"}],"importedBy":[{"uid":"f579-4"},{"uid":"f579-8"}]},"f579-2":{"id":"/src/utils.ts","moduleParts":{"index.production.js":"f579-3"},"imported":[],"importedBy":[{"uid":"f579-4"},{"uid":"f579-8"}]},"f579-4":{"id":"/src/createInfiniteQuery.ts","moduleParts":{"index.production.js":"f579-5"},"imported":[{"uid":"f579-12"},{"uid":"f579-0"},{"uid":"f579-2"}],"importedBy":[{"uid":"f579-10"}]},"f579-6":{"id":"/src/createMutation.ts","moduleParts":{"index.production.js":"f579-7"},"imported":[{"uid":"f579-12"}],"importedBy":[{"uid":"f579-10"}]},"f579-8":{"id":"/src/createQuery.tsx","moduleParts":{"index.production.js":"f579-9"},"imported":[{"uid":"f579-12"},{"uid":"f579-0"},{"uid":"f579-2"}],"importedBy":[{"uid":"f579-10"}]},"f579-10":{"id":"/src/index.ts","moduleParts":{"index.production.js":"f579-11"},"imported":[{"uid":"f579-4"},{"uid":"f579-6"},{"uid":"f579-8"}],"importedBy":[],"isEntry":true},"f579-12":{"id":"@tanstack/react-query","moduleParts":{},"imported":[],"importedBy":[{"uid":"f579-4"},{"uid":"f579-6"},{"uid":"f579-8"},{"uid":"f579-0"}],"isExternal":true},"f579-13":{"id":"@tanstack/query-core","moduleParts":{},"imported":[],"importedBy":[{"uid":"f579-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":"8502-1","name":"createBaseQuery.ts"},{"uid":"8502-3","name":"utils.ts"},{"uid":"8502-5","name":"createInfiniteQuery.ts"},{"uid":"8502-7","name":"createMutation.ts"},{"uid":"8502-9","name":"createQuery.tsx"},{"uid":"8502-11","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"8502-1":{"renderedLength":1296,"gzipLength":463,"brotliLength":0,"mainUid":"8502-0"},"8502-3":{"renderedLength":292,"gzipLength":169,"brotliLength":0,"mainUid":"8502-2"},"8502-5":{"renderedLength":177,"gzipLength":131,"brotliLength":0,"mainUid":"8502-4"},"8502-7":{"renderedLength":432,"gzipLength":217,"brotliLength":0,"mainUid":"8502-6"},"8502-9":{"renderedLength":161,"gzipLength":121,"brotliLength":0,"mainUid":"8502-8"},"8502-11":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"8502-10"}},"nodeMetas":{"8502-0":{"id":"/src/createBaseQuery.ts","moduleParts":{"index.production.js":"8502-1"},"imported":[{"uid":"8502-13"},{"uid":"8502-12"}],"importedBy":[{"uid":"8502-4"},{"uid":"8502-8"}]},"8502-2":{"id":"/src/utils.ts","moduleParts":{"index.production.js":"8502-3"},"imported":[],"importedBy":[{"uid":"8502-4"},{"uid":"8502-8"}]},"8502-4":{"id":"/src/createInfiniteQuery.ts","moduleParts":{"index.production.js":"8502-5"},"imported":[{"uid":"8502-12"},{"uid":"8502-0"},{"uid":"8502-2"}],"importedBy":[{"uid":"8502-10"}]},"8502-6":{"id":"/src/createMutation.ts","moduleParts":{"index.production.js":"8502-7"},"imported":[{"uid":"8502-12"}],"importedBy":[{"uid":"8502-10"}]},"8502-8":{"id":"/src/createQuery.tsx","moduleParts":{"index.production.js":"8502-9"},"imported":[{"uid":"8502-12"},{"uid":"8502-0"},{"uid":"8502-2"}],"importedBy":[{"uid":"8502-10"}]},"8502-10":{"id":"/src/index.ts","moduleParts":{"index.production.js":"8502-11"},"imported":[{"uid":"8502-4"},{"uid":"8502-6"},{"uid":"8502-8"}],"importedBy":[],"isEntry":true},"8502-12":{"id":"@tanstack/react-query","moduleParts":{},"imported":[],"importedBy":[{"uid":"8502-4"},{"uid":"8502-6"},{"uid":"8502-8"},{"uid":"8502-0"}],"isExternal":true},"8502-13":{"id":"@tanstack/query-core","moduleParts":{},"imported":[],"importedBy":[{"uid":"8502-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,27 +10,27 @@
10
10
  "name": "src",
11
11
  "children": [
12
12
  {
13
- "uid": "f579-15",
13
+ "uid": "8502-15",
14
14
  "name": "createBaseQuery.ts"
15
15
  },
16
16
  {
17
- "uid": "f579-17",
17
+ "uid": "8502-17",
18
18
  "name": "utils.ts"
19
19
  },
20
20
  {
21
- "uid": "f579-19",
21
+ "uid": "8502-19",
22
22
  "name": "createInfiniteQuery.ts"
23
23
  },
24
24
  {
25
- "uid": "f579-21",
25
+ "uid": "8502-21",
26
26
  "name": "createMutation.ts"
27
27
  },
28
28
  {
29
- "uid": "f579-23",
29
+ "uid": "8502-23",
30
30
  "name": "createQuery.tsx"
31
31
  },
32
32
  {
33
- "uid": "f579-25",
33
+ "uid": "8502-25",
34
34
  "name": "index.ts"
35
35
  }
36
36
  ]
@@ -41,187 +41,187 @@
41
41
  "isRoot": true
42
42
  },
43
43
  "nodeParts": {
44
- "f579-15": {
44
+ "8502-15": {
45
45
  "renderedLength": 1296,
46
46
  "gzipLength": 463,
47
47
  "brotliLength": 0,
48
- "mainUid": "f579-14"
48
+ "mainUid": "8502-14"
49
49
  },
50
- "f579-17": {
50
+ "8502-17": {
51
51
  "renderedLength": 292,
52
52
  "gzipLength": 169,
53
53
  "brotliLength": 0,
54
- "mainUid": "f579-16"
54
+ "mainUid": "8502-16"
55
55
  },
56
- "f579-19": {
56
+ "8502-19": {
57
57
  "renderedLength": 177,
58
58
  "gzipLength": 131,
59
59
  "brotliLength": 0,
60
- "mainUid": "f579-18"
60
+ "mainUid": "8502-18"
61
61
  },
62
- "f579-21": {
62
+ "8502-21": {
63
63
  "renderedLength": 432,
64
64
  "gzipLength": 217,
65
65
  "brotliLength": 0,
66
- "mainUid": "f579-20"
66
+ "mainUid": "8502-20"
67
67
  },
68
- "f579-23": {
68
+ "8502-23": {
69
69
  "renderedLength": 161,
70
70
  "gzipLength": 121,
71
71
  "brotliLength": 0,
72
- "mainUid": "f579-22"
72
+ "mainUid": "8502-22"
73
73
  },
74
- "f579-25": {
74
+ "8502-25": {
75
75
  "renderedLength": 0,
76
76
  "gzipLength": 0,
77
77
  "brotliLength": 0,
78
- "mainUid": "f579-24"
78
+ "mainUid": "8502-24"
79
79
  }
80
80
  },
81
81
  "nodeMetas": {
82
- "f579-14": {
82
+ "8502-14": {
83
83
  "id": "/src/createBaseQuery.ts",
84
84
  "moduleParts": {
85
- "index.production.js": "f579-15"
85
+ "index.production.js": "8502-15"
86
86
  },
87
87
  "imported": [
88
88
  {
89
- "uid": "f579-27"
89
+ "uid": "8502-27"
90
90
  },
91
91
  {
92
- "uid": "f579-26"
92
+ "uid": "8502-26"
93
93
  }
94
94
  ],
95
95
  "importedBy": [
96
96
  {
97
- "uid": "f579-18"
97
+ "uid": "8502-18"
98
98
  },
99
99
  {
100
- "uid": "f579-22"
100
+ "uid": "8502-22"
101
101
  }
102
102
  ]
103
103
  },
104
- "f579-16": {
104
+ "8502-16": {
105
105
  "id": "/src/utils.ts",
106
106
  "moduleParts": {
107
- "index.production.js": "f579-17"
107
+ "index.production.js": "8502-17"
108
108
  },
109
109
  "imported": [],
110
110
  "importedBy": [
111
111
  {
112
- "uid": "f579-18"
112
+ "uid": "8502-18"
113
113
  },
114
114
  {
115
- "uid": "f579-22"
115
+ "uid": "8502-22"
116
116
  }
117
117
  ]
118
118
  },
119
- "f579-18": {
119
+ "8502-18": {
120
120
  "id": "/src/createInfiniteQuery.ts",
121
121
  "moduleParts": {
122
- "index.production.js": "f579-19"
122
+ "index.production.js": "8502-19"
123
123
  },
124
124
  "imported": [
125
125
  {
126
- "uid": "f579-26"
126
+ "uid": "8502-26"
127
127
  },
128
128
  {
129
- "uid": "f579-14"
129
+ "uid": "8502-14"
130
130
  },
131
131
  {
132
- "uid": "f579-16"
132
+ "uid": "8502-16"
133
133
  }
134
134
  ],
135
135
  "importedBy": [
136
136
  {
137
- "uid": "f579-24"
137
+ "uid": "8502-24"
138
138
  }
139
139
  ]
140
140
  },
141
- "f579-20": {
141
+ "8502-20": {
142
142
  "id": "/src/createMutation.ts",
143
143
  "moduleParts": {
144
- "index.production.js": "f579-21"
144
+ "index.production.js": "8502-21"
145
145
  },
146
146
  "imported": [
147
147
  {
148
- "uid": "f579-26"
148
+ "uid": "8502-26"
149
149
  }
150
150
  ],
151
151
  "importedBy": [
152
152
  {
153
- "uid": "f579-24"
153
+ "uid": "8502-24"
154
154
  }
155
155
  ]
156
156
  },
157
- "f579-22": {
157
+ "8502-22": {
158
158
  "id": "/src/createQuery.tsx",
159
159
  "moduleParts": {
160
- "index.production.js": "f579-23"
160
+ "index.production.js": "8502-23"
161
161
  },
162
162
  "imported": [
163
163
  {
164
- "uid": "f579-26"
164
+ "uid": "8502-26"
165
165
  },
166
166
  {
167
- "uid": "f579-14"
167
+ "uid": "8502-14"
168
168
  },
169
169
  {
170
- "uid": "f579-16"
170
+ "uid": "8502-16"
171
171
  }
172
172
  ],
173
173
  "importedBy": [
174
174
  {
175
- "uid": "f579-24"
175
+ "uid": "8502-24"
176
176
  }
177
177
  ]
178
178
  },
179
- "f579-24": {
179
+ "8502-24": {
180
180
  "id": "/src/index.ts",
181
181
  "moduleParts": {
182
- "index.production.js": "f579-25"
182
+ "index.production.js": "8502-25"
183
183
  },
184
184
  "imported": [
185
185
  {
186
- "uid": "f579-18"
186
+ "uid": "8502-18"
187
187
  },
188
188
  {
189
- "uid": "f579-20"
189
+ "uid": "8502-20"
190
190
  },
191
191
  {
192
- "uid": "f579-22"
192
+ "uid": "8502-22"
193
193
  }
194
194
  ],
195
195
  "importedBy": [],
196
196
  "isEntry": true
197
197
  },
198
- "f579-26": {
198
+ "8502-26": {
199
199
  "id": "@tanstack/react-query",
200
200
  "moduleParts": {},
201
201
  "imported": [],
202
202
  "importedBy": [
203
203
  {
204
- "uid": "f579-18"
204
+ "uid": "8502-18"
205
205
  },
206
206
  {
207
- "uid": "f579-20"
207
+ "uid": "8502-20"
208
208
  },
209
209
  {
210
- "uid": "f579-22"
210
+ "uid": "8502-22"
211
211
  },
212
212
  {
213
- "uid": "f579-14"
213
+ "uid": "8502-14"
214
214
  }
215
215
  ],
216
216
  "isExternal": true
217
217
  },
218
- "f579-27": {
218
+ "8502-27": {
219
219
  "id": "@tanstack/query-core",
220
220
  "moduleParts": {},
221
221
  "imported": [],
222
222
  "importedBy": [
223
223
  {
224
- "uid": "f579-14"
224
+ "uid": "8502-14"
225
225
  }
226
226
  ],
227
227
  "isExternal": true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-query-kit",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "🕊️ A toolkit for ReactQuery that make ReactQuery hooks more reusable and typesafe",
5
5
  "author": "liaoliao666",
6
6
  "repository": "liaoliao666/react-query-kit",
package/src/types.ts CHANGED
@@ -57,7 +57,7 @@ export type ExposeMethods<TFnData, TVariables> = {
57
57
 
58
58
  type QueryHookOptions<TFnData, Error, TData, TVariables> = Omit<
59
59
  UseQueryOptions<TFnData, Error, TData, QueryKitKey<TVariables>>,
60
- 'queryKey' | 'queryFn' | 'enabled'
60
+ 'queryKey' | 'queryFn' | 'queryKeyHashFn' | 'enabled'
61
61
  > &
62
62
  AdditionalQueryHookOptions<TFnData, TVariables>
63
63
 
@@ -84,7 +84,7 @@ type InfiniteQueryHookOptions<TFnData, Error, TData, TVariables> = Omit<
84
84
  TFnData,
85
85
  QueryKitKey<TVariables>
86
86
  >,
87
- 'queryKey' | 'queryFn' | 'enabled'
87
+ 'queryKey' | 'queryFn' | 'queryKeyHashFn' | 'enabled'
88
88
  > &
89
89
  AdditionalQueryHookOptions<TFnData, TVariables>
90
90