@tanstack/preact-query 5.102.3 → 5.102.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.
Files changed (296) hide show
  1. package/build/legacy/HydrationBoundary.cjs +43 -0
  2. package/build/legacy/HydrationBoundary.cjs.map +1 -1
  3. package/build/legacy/HydrationBoundary.d.cts +61 -0
  4. package/build/legacy/HydrationBoundary.d.cts.map +1 -1
  5. package/build/legacy/HydrationBoundary.d.ts +61 -0
  6. package/build/legacy/HydrationBoundary.d.ts.map +1 -1
  7. package/build/legacy/HydrationBoundary.js +43 -0
  8. package/build/legacy/HydrationBoundary.js.map +1 -1
  9. package/build/legacy/IsRestoringProvider.cjs +11 -0
  10. package/build/legacy/IsRestoringProvider.cjs.map +1 -1
  11. package/build/legacy/IsRestoringProvider.d.cts +11 -0
  12. package/build/legacy/IsRestoringProvider.d.cts.map +1 -1
  13. package/build/legacy/IsRestoringProvider.d.ts +11 -0
  14. package/build/legacy/IsRestoringProvider.d.ts.map +1 -1
  15. package/build/legacy/IsRestoringProvider.js +11 -0
  16. package/build/legacy/IsRestoringProvider.js.map +1 -1
  17. package/build/legacy/QueryClientProvider.cjs +30 -0
  18. package/build/legacy/QueryClientProvider.cjs.map +1 -1
  19. package/build/legacy/QueryClientProvider.d.cts +41 -0
  20. package/build/legacy/QueryClientProvider.d.cts.map +1 -1
  21. package/build/legacy/QueryClientProvider.d.ts +41 -0
  22. package/build/legacy/QueryClientProvider.d.ts.map +1 -1
  23. package/build/legacy/QueryClientProvider.js +30 -0
  24. package/build/legacy/QueryClientProvider.js.map +1 -1
  25. package/build/legacy/QueryErrorResetBoundary.cjs +77 -0
  26. package/build/legacy/QueryErrorResetBoundary.cjs.map +1 -1
  27. package/build/legacy/QueryErrorResetBoundary.d.cts +108 -0
  28. package/build/legacy/QueryErrorResetBoundary.d.cts.map +1 -1
  29. package/build/legacy/QueryErrorResetBoundary.d.ts +108 -0
  30. package/build/legacy/QueryErrorResetBoundary.d.ts.map +1 -1
  31. package/build/legacy/QueryErrorResetBoundary.js +77 -0
  32. package/build/legacy/QueryErrorResetBoundary.js.map +1 -1
  33. package/build/legacy/infiniteQueryOptions.cjs.map +1 -1
  34. package/build/legacy/infiniteQueryOptions.d.cts +187 -0
  35. package/build/legacy/infiniteQueryOptions.d.cts.map +1 -1
  36. package/build/legacy/infiniteQueryOptions.d.ts +187 -0
  37. package/build/legacy/infiniteQueryOptions.d.ts.map +1 -1
  38. package/build/legacy/infiniteQueryOptions.js.map +1 -1
  39. package/build/legacy/mutationOptions.cjs.map +1 -1
  40. package/build/legacy/mutationOptions.d.cts +68 -0
  41. package/build/legacy/mutationOptions.d.cts.map +1 -1
  42. package/build/legacy/mutationOptions.d.ts +68 -0
  43. package/build/legacy/mutationOptions.d.ts.map +1 -1
  44. package/build/legacy/mutationOptions.js.map +1 -1
  45. package/build/legacy/queryOptions.cjs.map +1 -1
  46. package/build/legacy/queryOptions.d.cts +198 -0
  47. package/build/legacy/queryOptions.d.cts.map +1 -1
  48. package/build/legacy/queryOptions.d.ts +198 -0
  49. package/build/legacy/queryOptions.d.ts.map +1 -1
  50. package/build/legacy/queryOptions.js.map +1 -1
  51. package/build/legacy/types.cjs.map +1 -1
  52. package/build/legacy/types.d.cts +228 -2
  53. package/build/legacy/types.d.cts.map +1 -1
  54. package/build/legacy/types.d.ts +228 -2
  55. package/build/legacy/types.d.ts.map +1 -1
  56. package/build/legacy/types.js.map +1 -1
  57. package/build/legacy/useInfiniteQuery.cjs.map +1 -1
  58. package/build/legacy/useInfiniteQuery.d.cts +120 -0
  59. package/build/legacy/useInfiniteQuery.d.cts.map +1 -1
  60. package/build/legacy/useInfiniteQuery.d.ts +120 -0
  61. package/build/legacy/useInfiniteQuery.d.ts.map +1 -1
  62. package/build/legacy/useInfiniteQuery.js.map +1 -1
  63. package/build/legacy/useIsFetching.cjs +34 -0
  64. package/build/legacy/useIsFetching.cjs.map +1 -1
  65. package/build/legacy/useIsFetching.d.cts +34 -0
  66. package/build/legacy/useIsFetching.d.cts.map +1 -1
  67. package/build/legacy/useIsFetching.d.ts +34 -0
  68. package/build/legacy/useIsFetching.d.ts.map +1 -1
  69. package/build/legacy/useIsFetching.js +34 -0
  70. package/build/legacy/useIsFetching.js.map +1 -1
  71. package/build/legacy/useMutation.cjs +170 -0
  72. package/build/legacy/useMutation.cjs.map +1 -1
  73. package/build/legacy/useMutation.d.cts +170 -0
  74. package/build/legacy/useMutation.d.cts.map +1 -1
  75. package/build/legacy/useMutation.d.ts +170 -0
  76. package/build/legacy/useMutation.d.ts.map +1 -1
  77. package/build/legacy/useMutation.js +170 -0
  78. package/build/legacy/useMutation.js.map +1 -1
  79. package/build/legacy/useMutationState.cjs +74 -0
  80. package/build/legacy/useMutationState.cjs.map +1 -1
  81. package/build/legacy/useMutationState.d.cts +74 -0
  82. package/build/legacy/useMutationState.d.cts.map +1 -1
  83. package/build/legacy/useMutationState.d.ts +74 -0
  84. package/build/legacy/useMutationState.d.ts.map +1 -1
  85. package/build/legacy/useMutationState.js +74 -0
  86. package/build/legacy/useMutationState.js.map +1 -1
  87. package/build/legacy/usePrefetchInfiniteQuery.cjs +44 -0
  88. package/build/legacy/usePrefetchInfiniteQuery.cjs.map +1 -1
  89. package/build/legacy/usePrefetchInfiniteQuery.d.cts +44 -0
  90. package/build/legacy/usePrefetchInfiniteQuery.d.cts.map +1 -1
  91. package/build/legacy/usePrefetchInfiniteQuery.d.ts +44 -0
  92. package/build/legacy/usePrefetchInfiniteQuery.d.ts.map +1 -1
  93. package/build/legacy/usePrefetchInfiniteQuery.js +44 -0
  94. package/build/legacy/usePrefetchInfiniteQuery.js.map +1 -1
  95. package/build/legacy/usePrefetchQuery.cjs +35 -0
  96. package/build/legacy/usePrefetchQuery.cjs.map +1 -1
  97. package/build/legacy/usePrefetchQuery.d.cts +35 -0
  98. package/build/legacy/usePrefetchQuery.d.cts.map +1 -1
  99. package/build/legacy/usePrefetchQuery.d.ts +35 -0
  100. package/build/legacy/usePrefetchQuery.d.ts.map +1 -1
  101. package/build/legacy/usePrefetchQuery.js +35 -0
  102. package/build/legacy/usePrefetchQuery.js.map +1 -1
  103. package/build/legacy/useQueries.cjs +50 -0
  104. package/build/legacy/useQueries.cjs.map +1 -1
  105. package/build/legacy/useQueries.d.cts +85 -2
  106. package/build/legacy/useQueries.d.cts.map +1 -1
  107. package/build/legacy/useQueries.d.ts +85 -2
  108. package/build/legacy/useQueries.d.ts.map +1 -1
  109. package/build/legacy/useQueries.js +50 -0
  110. package/build/legacy/useQueries.js.map +1 -1
  111. package/build/legacy/useQuery.cjs.map +1 -1
  112. package/build/legacy/useQuery.d.cts +186 -0
  113. package/build/legacy/useQuery.d.cts.map +1 -1
  114. package/build/legacy/useQuery.d.ts +186 -0
  115. package/build/legacy/useQuery.d.ts.map +1 -1
  116. package/build/legacy/useQuery.js.map +1 -1
  117. package/build/legacy/useSuspenseInfiniteQuery.cjs +56 -0
  118. package/build/legacy/useSuspenseInfiniteQuery.cjs.map +1 -1
  119. package/build/legacy/useSuspenseInfiniteQuery.d.cts +56 -0
  120. package/build/legacy/useSuspenseInfiniteQuery.d.cts.map +1 -1
  121. package/build/legacy/useSuspenseInfiniteQuery.d.ts +56 -0
  122. package/build/legacy/useSuspenseInfiniteQuery.d.ts.map +1 -1
  123. package/build/legacy/useSuspenseInfiniteQuery.js +56 -0
  124. package/build/legacy/useSuspenseInfiniteQuery.js.map +1 -1
  125. package/build/legacy/useSuspenseQueries.cjs.map +1 -1
  126. package/build/legacy/useSuspenseQueries.d.cts +196 -2
  127. package/build/legacy/useSuspenseQueries.d.cts.map +1 -1
  128. package/build/legacy/useSuspenseQueries.d.ts +196 -2
  129. package/build/legacy/useSuspenseQueries.d.ts.map +1 -1
  130. package/build/legacy/useSuspenseQueries.js.map +1 -1
  131. package/build/legacy/useSuspenseQuery.cjs +47 -0
  132. package/build/legacy/useSuspenseQuery.cjs.map +1 -1
  133. package/build/legacy/useSuspenseQuery.d.cts +47 -0
  134. package/build/legacy/useSuspenseQuery.d.cts.map +1 -1
  135. package/build/legacy/useSuspenseQuery.d.ts +47 -0
  136. package/build/legacy/useSuspenseQuery.d.ts.map +1 -1
  137. package/build/legacy/useSuspenseQuery.js +47 -0
  138. package/build/legacy/useSuspenseQuery.js.map +1 -1
  139. package/build/modern/HydrationBoundary.cjs +43 -0
  140. package/build/modern/HydrationBoundary.cjs.map +1 -1
  141. package/build/modern/HydrationBoundary.d.cts +61 -0
  142. package/build/modern/HydrationBoundary.d.cts.map +1 -1
  143. package/build/modern/HydrationBoundary.d.ts +61 -0
  144. package/build/modern/HydrationBoundary.d.ts.map +1 -1
  145. package/build/modern/HydrationBoundary.js +43 -0
  146. package/build/modern/HydrationBoundary.js.map +1 -1
  147. package/build/modern/IsRestoringProvider.cjs +11 -0
  148. package/build/modern/IsRestoringProvider.cjs.map +1 -1
  149. package/build/modern/IsRestoringProvider.d.cts +11 -0
  150. package/build/modern/IsRestoringProvider.d.cts.map +1 -1
  151. package/build/modern/IsRestoringProvider.d.ts +11 -0
  152. package/build/modern/IsRestoringProvider.d.ts.map +1 -1
  153. package/build/modern/IsRestoringProvider.js +11 -0
  154. package/build/modern/IsRestoringProvider.js.map +1 -1
  155. package/build/modern/QueryClientProvider.cjs +30 -0
  156. package/build/modern/QueryClientProvider.cjs.map +1 -1
  157. package/build/modern/QueryClientProvider.d.cts +41 -0
  158. package/build/modern/QueryClientProvider.d.cts.map +1 -1
  159. package/build/modern/QueryClientProvider.d.ts +41 -0
  160. package/build/modern/QueryClientProvider.d.ts.map +1 -1
  161. package/build/modern/QueryClientProvider.js +30 -0
  162. package/build/modern/QueryClientProvider.js.map +1 -1
  163. package/build/modern/QueryErrorResetBoundary.cjs +77 -0
  164. package/build/modern/QueryErrorResetBoundary.cjs.map +1 -1
  165. package/build/modern/QueryErrorResetBoundary.d.cts +108 -0
  166. package/build/modern/QueryErrorResetBoundary.d.cts.map +1 -1
  167. package/build/modern/QueryErrorResetBoundary.d.ts +108 -0
  168. package/build/modern/QueryErrorResetBoundary.d.ts.map +1 -1
  169. package/build/modern/QueryErrorResetBoundary.js +77 -0
  170. package/build/modern/QueryErrorResetBoundary.js.map +1 -1
  171. package/build/modern/infiniteQueryOptions.cjs.map +1 -1
  172. package/build/modern/infiniteQueryOptions.d.cts +187 -0
  173. package/build/modern/infiniteQueryOptions.d.cts.map +1 -1
  174. package/build/modern/infiniteQueryOptions.d.ts +187 -0
  175. package/build/modern/infiniteQueryOptions.d.ts.map +1 -1
  176. package/build/modern/infiniteQueryOptions.js.map +1 -1
  177. package/build/modern/mutationOptions.cjs.map +1 -1
  178. package/build/modern/mutationOptions.d.cts +68 -0
  179. package/build/modern/mutationOptions.d.cts.map +1 -1
  180. package/build/modern/mutationOptions.d.ts +68 -0
  181. package/build/modern/mutationOptions.d.ts.map +1 -1
  182. package/build/modern/mutationOptions.js.map +1 -1
  183. package/build/modern/queryOptions.cjs.map +1 -1
  184. package/build/modern/queryOptions.d.cts +198 -0
  185. package/build/modern/queryOptions.d.cts.map +1 -1
  186. package/build/modern/queryOptions.d.ts +198 -0
  187. package/build/modern/queryOptions.d.ts.map +1 -1
  188. package/build/modern/queryOptions.js.map +1 -1
  189. package/build/modern/types.cjs.map +1 -1
  190. package/build/modern/types.d.cts +228 -2
  191. package/build/modern/types.d.cts.map +1 -1
  192. package/build/modern/types.d.ts +228 -2
  193. package/build/modern/types.d.ts.map +1 -1
  194. package/build/modern/types.js.map +1 -1
  195. package/build/modern/useInfiniteQuery.cjs.map +1 -1
  196. package/build/modern/useInfiniteQuery.d.cts +120 -0
  197. package/build/modern/useInfiniteQuery.d.cts.map +1 -1
  198. package/build/modern/useInfiniteQuery.d.ts +120 -0
  199. package/build/modern/useInfiniteQuery.d.ts.map +1 -1
  200. package/build/modern/useInfiniteQuery.js.map +1 -1
  201. package/build/modern/useIsFetching.cjs +34 -0
  202. package/build/modern/useIsFetching.cjs.map +1 -1
  203. package/build/modern/useIsFetching.d.cts +34 -0
  204. package/build/modern/useIsFetching.d.cts.map +1 -1
  205. package/build/modern/useIsFetching.d.ts +34 -0
  206. package/build/modern/useIsFetching.d.ts.map +1 -1
  207. package/build/modern/useIsFetching.js +34 -0
  208. package/build/modern/useIsFetching.js.map +1 -1
  209. package/build/modern/useMutation.cjs +170 -0
  210. package/build/modern/useMutation.cjs.map +1 -1
  211. package/build/modern/useMutation.d.cts +170 -0
  212. package/build/modern/useMutation.d.cts.map +1 -1
  213. package/build/modern/useMutation.d.ts +170 -0
  214. package/build/modern/useMutation.d.ts.map +1 -1
  215. package/build/modern/useMutation.js +170 -0
  216. package/build/modern/useMutation.js.map +1 -1
  217. package/build/modern/useMutationState.cjs +74 -0
  218. package/build/modern/useMutationState.cjs.map +1 -1
  219. package/build/modern/useMutationState.d.cts +74 -0
  220. package/build/modern/useMutationState.d.cts.map +1 -1
  221. package/build/modern/useMutationState.d.ts +74 -0
  222. package/build/modern/useMutationState.d.ts.map +1 -1
  223. package/build/modern/useMutationState.js +74 -0
  224. package/build/modern/useMutationState.js.map +1 -1
  225. package/build/modern/usePrefetchInfiniteQuery.cjs +44 -0
  226. package/build/modern/usePrefetchInfiniteQuery.cjs.map +1 -1
  227. package/build/modern/usePrefetchInfiniteQuery.d.cts +44 -0
  228. package/build/modern/usePrefetchInfiniteQuery.d.cts.map +1 -1
  229. package/build/modern/usePrefetchInfiniteQuery.d.ts +44 -0
  230. package/build/modern/usePrefetchInfiniteQuery.d.ts.map +1 -1
  231. package/build/modern/usePrefetchInfiniteQuery.js +44 -0
  232. package/build/modern/usePrefetchInfiniteQuery.js.map +1 -1
  233. package/build/modern/usePrefetchQuery.cjs +35 -0
  234. package/build/modern/usePrefetchQuery.cjs.map +1 -1
  235. package/build/modern/usePrefetchQuery.d.cts +35 -0
  236. package/build/modern/usePrefetchQuery.d.cts.map +1 -1
  237. package/build/modern/usePrefetchQuery.d.ts +35 -0
  238. package/build/modern/usePrefetchQuery.d.ts.map +1 -1
  239. package/build/modern/usePrefetchQuery.js +35 -0
  240. package/build/modern/usePrefetchQuery.js.map +1 -1
  241. package/build/modern/useQueries.cjs +50 -0
  242. package/build/modern/useQueries.cjs.map +1 -1
  243. package/build/modern/useQueries.d.cts +85 -2
  244. package/build/modern/useQueries.d.cts.map +1 -1
  245. package/build/modern/useQueries.d.ts +85 -2
  246. package/build/modern/useQueries.d.ts.map +1 -1
  247. package/build/modern/useQueries.js +50 -0
  248. package/build/modern/useQueries.js.map +1 -1
  249. package/build/modern/useQuery.cjs.map +1 -1
  250. package/build/modern/useQuery.d.cts +186 -0
  251. package/build/modern/useQuery.d.cts.map +1 -1
  252. package/build/modern/useQuery.d.ts +186 -0
  253. package/build/modern/useQuery.d.ts.map +1 -1
  254. package/build/modern/useQuery.js.map +1 -1
  255. package/build/modern/useSuspenseInfiniteQuery.cjs +56 -0
  256. package/build/modern/useSuspenseInfiniteQuery.cjs.map +1 -1
  257. package/build/modern/useSuspenseInfiniteQuery.d.cts +56 -0
  258. package/build/modern/useSuspenseInfiniteQuery.d.cts.map +1 -1
  259. package/build/modern/useSuspenseInfiniteQuery.d.ts +56 -0
  260. package/build/modern/useSuspenseInfiniteQuery.d.ts.map +1 -1
  261. package/build/modern/useSuspenseInfiniteQuery.js +56 -0
  262. package/build/modern/useSuspenseInfiniteQuery.js.map +1 -1
  263. package/build/modern/useSuspenseQueries.cjs.map +1 -1
  264. package/build/modern/useSuspenseQueries.d.cts +196 -2
  265. package/build/modern/useSuspenseQueries.d.cts.map +1 -1
  266. package/build/modern/useSuspenseQueries.d.ts +196 -2
  267. package/build/modern/useSuspenseQueries.d.ts.map +1 -1
  268. package/build/modern/useSuspenseQueries.js.map +1 -1
  269. package/build/modern/useSuspenseQuery.cjs +47 -0
  270. package/build/modern/useSuspenseQuery.cjs.map +1 -1
  271. package/build/modern/useSuspenseQuery.d.cts +47 -0
  272. package/build/modern/useSuspenseQuery.d.cts.map +1 -1
  273. package/build/modern/useSuspenseQuery.d.ts +47 -0
  274. package/build/modern/useSuspenseQuery.d.ts.map +1 -1
  275. package/build/modern/useSuspenseQuery.js +47 -0
  276. package/build/modern/useSuspenseQuery.js.map +1 -1
  277. package/package.json +3 -3
  278. package/src/HydrationBoundary.tsx +61 -0
  279. package/src/IsRestoringProvider.ts +12 -0
  280. package/src/QueryClientProvider.tsx +41 -0
  281. package/src/QueryErrorResetBoundary.tsx +111 -0
  282. package/src/infiniteQueryOptions.ts +187 -0
  283. package/src/mutationOptions.ts +68 -0
  284. package/src/queryOptions.ts +198 -0
  285. package/src/types.ts +228 -2
  286. package/src/useInfiniteQuery.ts +120 -0
  287. package/src/useIsFetching.ts +34 -0
  288. package/src/useMutation.ts +170 -0
  289. package/src/useMutationState.ts +74 -0
  290. package/src/usePrefetchInfiniteQuery.tsx +44 -0
  291. package/src/usePrefetchQuery.tsx +35 -0
  292. package/src/useQueries.ts +85 -2
  293. package/src/useQuery.ts +186 -0
  294. package/src/useSuspenseInfiniteQuery.ts +56 -0
  295. package/src/useSuspenseQueries.ts +196 -2
  296. package/src/useSuspenseQuery.ts +47 -0
@@ -1,53 +1,279 @@
1
1
  import { DefaultError, DefinedInfiniteQueryObserverResult, DefinedQueryObserverResult, DistributiveOmit, InfiniteData, InfiniteQueryExecuteOptions, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, MutateFunction, MutationObserverOptions, MutationObserverResult, OmitKeyof, Override, QueryExecuteOptions, QueryKey, QueryObserverOptions, QueryObserverResult, SkipToken } from "@tanstack/query-core";
2
2
  //#region src/types.d.ts
3
+ /**
4
+ * {@link UseBaseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't
5
+ * relevant, e.g. when accepting options for any query in a helper function.
6
+ */
3
7
  type AnyUseBaseQueryOptions = UseBaseQueryOptions<any, any, any, any, any>;
8
+ /**
9
+ * The options shared by `useQuery` and `useSuspenseQuery`. Extends {@link QueryObserverOptions} from
10
+ * `@tanstack/query-core` with the `preact-query`-specific `subscribed` option.
11
+ *
12
+ * @template TQueryFnData - The type your `queryFn` resolves to.
13
+ * @template TError - The type of errors your `queryFn` may throw.
14
+ * @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
15
+ * `select` is used.
16
+ * @template TQueryData - The type of the data actually held in the query cache — the input to `select` and
17
+ * `placeholderData`. Defaults to, and is usually the same as, `TQueryFnData`.
18
+ * @template TQueryKey - The type of your `queryKey`.
19
+ */
4
20
  interface UseBaseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends QueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey> {
5
21
  /**
6
22
  * Set this to `false` to unsubscribe this observer from updates to the query cache.
7
- * Defaults to `true`.
23
+ *
24
+ * @defaultValue true
8
25
  */
9
26
  subscribed?: boolean;
10
27
  }
28
+ /**
29
+ * The options accepted by `usePrefetchQuery` — everything you can pass to `queryClient.query`, except `queryFn`
30
+ * is required unless a default query function has been defined.
31
+ *
32
+ * @template TQueryFnData - The type your `queryFn` resolves to.
33
+ * @template TError - The type of errors your `queryFn` may throw.
34
+ * @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
35
+ * `select` is used.
36
+ * @template TQueryData - The type of the data actually held in the query cache — the input to `select` and
37
+ * `placeholderData`. Defaults to, and is usually the same as, `TQueryFnData`.
38
+ * @template TQueryKey - The type of your `queryKey`.
39
+ */
11
40
  type UsePrefetchQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = DistributiveOmit<QueryExecuteOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, 'queryFn'> & {
41
+ /**
42
+ * `skipToken` is not allowed as a value here — a prefetch always needs a query function to actually run,
43
+ * unless a default query function has been defined.
44
+ */
12
45
  queryFn?: Exclude<QueryExecuteOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>['queryFn'], SkipToken>;
13
46
  };
47
+ /**
48
+ * The options accepted by `usePrefetchInfiniteQuery` — everything you can pass to `queryClient.infiniteQuery`,
49
+ * except `queryFn` is required unless a default query function has been defined.
50
+ *
51
+ * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
52
+ * @template TError - The type of errors your `queryFn` may throw.
53
+ * @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` (a single page)
54
+ * here, since a prefetch never reads `data` back out — this parameter only matters if you reuse these options
55
+ * elsewhere with `select` applied.
56
+ * @template TQueryKey - The type of your `queryKey`.
57
+ * @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.
58
+ */
14
59
  type UsePrefetchInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = DistributiveOmit<InfiniteQueryExecuteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'queryFn'> & {
60
+ /**
61
+ * `skipToken` is not allowed as a value here — a prefetch always needs a query function to actually run,
62
+ * unless a default query function has been defined.
63
+ */
15
64
  queryFn?: Exclude<InfiniteQueryExecuteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>['queryFn'], SkipToken>;
16
65
  };
66
+ /**
67
+ * {@link UseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't
68
+ * relevant, e.g. when accepting options for any query in a helper function.
69
+ */
17
70
  type AnyUseQueryOptions = UseQueryOptions<any, any, any, any>;
71
+ /**
72
+ * The options accepted by `useQuery`. Same as {@link UseBaseQueryOptions}, minus `suspense` (which
73
+ * `preact-query` derives from which hook you call rather than exposing as an option).
74
+ *
75
+ * @template TQueryFnData - The type your `queryFn` resolves to.
76
+ * @template TError - The type of errors your `queryFn` may throw.
77
+ * @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
78
+ * `select` is used.
79
+ * @template TQueryKey - The type of your `queryKey`.
80
+ */
18
81
  interface UseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends OmitKeyof<UseBaseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>, 'suspense'> {}
82
+ /**
83
+ * {@link UseSuspenseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't
84
+ * relevant, e.g. when accepting options for any query in a helper function.
85
+ */
19
86
  type AnyUseSuspenseQueryOptions = UseSuspenseQueryOptions<any, any, any, any>;
87
+ /**
88
+ * The options accepted by `useSuspenseQuery`. Same as {@link UseQueryOptions}, minus `enabled`, `throwOnError`,
89
+ * and `placeholderData` — Suspense hooks cannot render a "disabled" or "placeholder" state, so those options
90
+ * don't apply.
91
+ *
92
+ * @template TQueryFnData - The type your `queryFn` resolves to.
93
+ * @template TError - The type of errors your `queryFn` may throw.
94
+ * @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
95
+ * `select` is used.
96
+ * @template TQueryKey - The type of your `queryKey`.
97
+ */
20
98
  interface UseSuspenseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends OmitKeyof<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'> {
99
+ /**
100
+ * `skipToken` is not allowed here — Suspense hooks cannot render a "disabled" state, so a query function
101
+ * must always be provided, unless a default query function has been defined.
102
+ */
21
103
  queryFn?: Exclude<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'], SkipToken>;
22
104
  }
105
+ /**
106
+ * {@link UseInfiniteQueryOptions} with all type parameters set to `any`, useful when the specific types aren't
107
+ * relevant, e.g. when accepting options for any query in a helper function.
108
+ */
23
109
  type AnyUseInfiniteQueryOptions = UseInfiniteQueryOptions<any, any, any, any, any>;
110
+ /**
111
+ * The options accepted by `useInfiniteQuery`. Extends {@link InfiniteQueryObserverOptions} from
112
+ * `@tanstack/query-core` with the `preact-query`-specific `subscribed` option, minus `suspense` (which
113
+ * `preact-query` derives from which hook you call rather than exposing as an option).
114
+ *
115
+ * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
116
+ * @template TError - The type of errors your `queryFn` may throw.
117
+ * @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
118
+ * the shape of all fetched pages plus their page params.
119
+ * @template TQueryKey - The type of your `queryKey`.
120
+ * @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.
121
+ */
24
122
  interface UseInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends OmitKeyof<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'suspense'> {
25
123
  /**
26
124
  * Set this to `false` to unsubscribe this observer from updates to the query cache.
27
- * Defaults to `true`.
125
+ *
126
+ * @defaultValue true
28
127
  */
29
128
  subscribed?: boolean;
30
129
  }
130
+ /**
131
+ * {@link UseSuspenseInfiniteQueryOptions} with all type parameters set to `any`, useful when the specific types
132
+ * aren't relevant, e.g. when accepting options for any query in a helper function.
133
+ */
31
134
  type AnyUseSuspenseInfiniteQueryOptions = UseSuspenseInfiniteQueryOptions<any, any, any, any, any>;
135
+ /**
136
+ * The options accepted by `useSuspenseInfiniteQuery`. Same as {@link UseInfiniteQueryOptions}, minus `enabled`,
137
+ * `throwOnError`, and `placeholderData` — Suspense hooks cannot render a "disabled" or "placeholder" state, so
138
+ * those options don't apply.
139
+ *
140
+ * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
141
+ * @template TError - The type of errors your `queryFn` may throw.
142
+ * @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
143
+ * the shape of all fetched pages plus their page params.
144
+ * @template TQueryKey - The type of your `queryKey`.
145
+ * @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.
146
+ */
32
147
  interface UseSuspenseInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends OmitKeyof<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'> {
148
+ /**
149
+ * `skipToken` is not allowed here — Suspense hooks cannot render a "disabled" state, so a query function
150
+ * must always be provided, unless a default query function has been defined.
151
+ */
33
152
  queryFn?: Exclude<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>['queryFn'], SkipToken>;
34
153
  }
154
+ /**
155
+ * The result of `useQuery` when `initialData` isn't set — `data` may be `undefined` while the query is
156
+ * `pending`. Re-exports {@link QueryObserverResult} from `@tanstack/query-core`. `useInfiniteQuery` returns
157
+ * {@link UseInfiniteQueryResult} instead.
158
+ *
159
+ * @template TData - The type `data` ends up as after `select` runs.
160
+ * @template TError - The type of errors your `queryFn` may throw.
161
+ */
35
162
  type UseBaseQueryResult<TData = unknown, TError = DefaultError> = QueryObserverResult<TData, TError>;
163
+ /**
164
+ * The result of `useQuery`. Same as {@link UseBaseQueryResult}.
165
+ *
166
+ * @template TData - The type `data` ends up as after `select` runs.
167
+ * @template TError - The type of errors your `queryFn` may throw.
168
+ */
36
169
  type UseQueryResult<TData = unknown, TError = DefaultError> = UseBaseQueryResult<TData, TError>;
170
+ /**
171
+ * The result of `useSuspenseQuery`. Same as {@link DefinedUseQueryResult}, minus `isPlaceholderData` — always
172
+ * `false` on that type, so this drops the dead field rather than an active state.
173
+ *
174
+ * @template TData - The type `data` ends up as after `select` runs.
175
+ * @template TError - The type of errors your `queryFn` may throw.
176
+ */
37
177
  type UseSuspenseQueryResult<TData = unknown, TError = DefaultError> = DistributiveOmit<DefinedQueryObserverResult<TData, TError>, 'isPlaceholderData'>;
178
+ /**
179
+ * The result of `useQuery` when `initialData` is set, or of `useSuspenseQuery` before the `isPlaceholderData`
180
+ * omission — `data` is never `undefined`. Re-exports {@link DefinedQueryObserverResult} from
181
+ * `@tanstack/query-core`.
182
+ *
183
+ * @template TData - The type `data` ends up as after `select` runs.
184
+ * @template TError - The type of errors your `queryFn` may throw.
185
+ */
38
186
  type DefinedUseQueryResult<TData = unknown, TError = DefaultError> = DefinedQueryObserverResult<TData, TError>;
187
+ /**
188
+ * The result of `useInfiniteQuery` when `initialData` isn't set — `data` may be `undefined` while the query is
189
+ * `pending`. Re-exports {@link InfiniteQueryObserverResult} from `@tanstack/query-core`.
190
+ *
191
+ * @template TData - The type `data` ends up as after `select` runs.
192
+ * @template TError - The type of errors your `queryFn` may throw.
193
+ */
39
194
  type UseInfiniteQueryResult<TData = unknown, TError = DefaultError> = InfiniteQueryObserverResult<TData, TError>;
195
+ /**
196
+ * The result of `useInfiniteQuery` when `initialData` is set — `data` is never `undefined`. Re-exports
197
+ * {@link DefinedInfiniteQueryObserverResult} from `@tanstack/query-core`.
198
+ *
199
+ * @template TData - The type `data` ends up as after `select` runs.
200
+ * @template TError - The type of errors your `queryFn` may throw.
201
+ */
40
202
  type DefinedUseInfiniteQueryResult<TData = unknown, TError = DefaultError> = DefinedInfiniteQueryObserverResult<TData, TError>;
203
+ /**
204
+ * The result of `useSuspenseInfiniteQuery`. Same as {@link DefinedUseInfiniteQueryResult}, minus
205
+ * `isPlaceholderData` — Suspense hooks never render placeholder data.
206
+ *
207
+ * @template TData - The type `data` ends up as after `select` runs.
208
+ * @template TError - The type of errors your `queryFn` may throw.
209
+ */
41
210
  type UseSuspenseInfiniteQueryResult<TData = unknown, TError = DefaultError> = OmitKeyof<DefinedInfiniteQueryObserverResult<TData, TError>, 'isPlaceholderData'>;
211
+ /**
212
+ * {@link UseMutationOptions} with all type parameters set to `any`, useful when the specific types aren't
213
+ * relevant, e.g. when accepting options for any mutation in a helper function.
214
+ */
42
215
  type AnyUseMutationOptions = UseMutationOptions<any, any, any, any>;
216
+ /**
217
+ * The options accepted by `useMutation`. Same as {@link MutationObserverOptions} from `@tanstack/query-core`,
218
+ * minus the internal `_defaulted` flag.
219
+ *
220
+ * @template TData - The type your mutation function resolves to.
221
+ * @template TError - The type of errors your mutation function may throw.
222
+ * @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.
223
+ * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
224
+ * their `onMutateResult` parameter — useful for optimistic-update rollback data.
225
+ */
43
226
  interface UseMutationOptions<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown> extends OmitKeyof<MutationObserverOptions<TData, TError, TVariables, TOnMutateResult>, '_defaulted'> {}
227
+ /**
228
+ * The type of `mutate`, as returned by `useMutation`. Forwards the variables (and an optional per-call
229
+ * `onSuccess`/`onError`/`onSettled`) to the underlying `mutate` call. Fire-and-forget — errors are surfaced
230
+ * through the mutation result, not thrown.
231
+ *
232
+ * @template TData - The type your mutation function resolves to.
233
+ * @template TError - The type of errors your mutation function may throw.
234
+ * @template TVariables - The type of the variable passed to `mutate`.
235
+ * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
236
+ * their `onMutateResult` parameter — useful for optimistic-update rollback data.
237
+ */
44
238
  type UseMutateFunction<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown> = (...args: Parameters<MutateFunction<TData, TError, TVariables, TOnMutateResult>>) => void;
239
+ /**
240
+ * The type of `mutateAsync`, as returned by `useMutation`. Similar to {@link UseMutateFunction}, but returns a
241
+ * promise which can be awaited.
242
+ *
243
+ * @template TData - The type your mutation function resolves to.
244
+ * @template TError - The type of errors your mutation function may throw.
245
+ * @template TVariables - The type of the variable passed to `mutateAsync`.
246
+ * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
247
+ * their `onMutateResult` parameter — useful for optimistic-update rollback data.
248
+ */
45
249
  type UseMutateAsyncFunction<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown> = MutateFunction<TData, TError, TVariables, TOnMutateResult>;
250
+ /**
251
+ * The result of `useMutation`. Same as {@link MutationObserverResult} from `@tanstack/query-core`, with
252
+ * `mutate` narrowed to the fire-and-forget {@link UseMutateFunction} signature, plus the added `mutateAsync`.
253
+ *
254
+ * @template TData - The type your mutation function resolves to.
255
+ * @template TError - The type of errors your mutation function may throw.
256
+ * @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.
257
+ * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
258
+ * their `onMutateResult` parameter — useful for optimistic-update rollback data.
259
+ */
46
260
  type UseBaseMutationResult<TData = unknown, TError = DefaultError, TVariables = unknown, TOnMutateResult = unknown> = Override<MutationObserverResult<TData, TError, TVariables, TOnMutateResult>, {
47
261
  mutate: UseMutateFunction<TData, TError, TVariables, TOnMutateResult>;
48
262
  }> & {
263
+ /**
264
+ * Similar to `mutate`, but returns a promise which can be awaited.
265
+ */
49
266
  mutateAsync: UseMutateAsyncFunction<TData, TError, TVariables, TOnMutateResult>;
50
267
  };
268
+ /**
269
+ * The result of `useMutation`. Same as {@link UseBaseMutationResult}.
270
+ *
271
+ * @template TData - The type your mutation function resolves to.
272
+ * @template TError - The type of errors your mutation function may throw.
273
+ * @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.
274
+ * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
275
+ * their `onMutateResult` parameter — useful for optimistic-update rollback data.
276
+ */
51
277
  type UseMutationResult<TData = unknown, TError = DefaultError, TVariables = unknown, TOnMutateResult = unknown> = UseBaseMutationResult<TData, TError, TVariables, TOnMutateResult>;
52
278
  //#endregion
53
279
  export { AnyUseBaseQueryOptions, AnyUseInfiniteQueryOptions, AnyUseMutationOptions, AnyUseQueryOptions, AnyUseSuspenseInfiniteQueryOptions, AnyUseSuspenseQueryOptions, DefinedUseInfiniteQueryResult, DefinedUseQueryResult, UseBaseMutationResult, UseBaseQueryOptions, UseBaseQueryResult, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutateAsyncFunction, UseMutateFunction, UseMutationOptions, UseMutationResult, UsePrefetchInfiniteQueryOptions, UsePrefetchQueryOptions, UseQueryOptions, UseQueryResult, UseSuspenseInfiniteQueryOptions, UseSuspenseInfiniteQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../src/types.ts"],"mappings":";;KAsBY,yBAAyB;UAOpB,oBACf,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,kBACrB,qBACR,cACA,QACA,OACA,YACA;;;;;EAMA;;KAGU,wBACV,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,YAC3B,iBACF,oBAAoB,cAAc,QAAQ,OAAO,YAAY;EAG7D,UAAU,QACR,oBACE,cACA,QACA,OACA,cACA,uBAEF;;KAIQ,gCACV,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,wBACE,iBACF,4BACE,cACA,QACA,OACA,WACA;EAIF,UAAU,QACR,4BACE,cACA,QACA,OACA,WACA,wBAEF;;KAIQ,qBAAqB;UAChB,gBACf,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,kBACrB,UACR,oBAAoB,cAAc,QAAQ,OAAO,cAAc;KAIrD,6BAA6B;UAMxB,wBACf,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,kBACrB,UACR,gBAAgB,cAAc,QAAQ,OAAO;EAG7C,UAAU,QACR,gBAAgB,cAAc,QAAQ,OAAO,uBAC7C;;KAIQ,6BAA6B;UAOxB,wBACf,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,8BACQ,UACR,6BACE,cACA,QACA,OACA,WACA;;;;;EAQF;;KAGU,qCACV;UACe,gCACf,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,8BACQ,UACR,wBAAwB,cAAc,QAAQ,OAAO,WAAW;EAGhE,UAAU,QACR,wBACE,cACA,QACA,OACA,WACA,wBAEF;;KAIQ,mBACV,iBACA,SAAS,gBACP,oBAAoB,OAAO;KAEnB,eACV,iBACA,SAAS,gBACP,mBAAmB,OAAO;KAElB,uBACV,iBACA,SAAS,gBACP,iBACF,2BAA2B,OAAO;KAIxB,sBACV,iBACA,SAAS,gBACP,2BAA2B,OAAO;KAE1B,uBACV,iBACA,SAAS,gBACP,4BAA4B,OAAO;KAE3B,8BACV,iBACA,SAAS,gBACP,mCAAmC,OAAO;KAElC,+BACV,iBACA,SAAS,gBACP,UACF,mCAAmC,OAAO;KAIhC,wBAAwB;UACnB,mBACf,iBACA,SAAS,cACT,mBACA,mCACQ,UACR,wBAAwB,OAAO,QAAQ,YAAY;KAIzC,kBACV,iBACA,SAAS,cACT,mBACA,iCAEG,MAAM,WACP,eAAe,OAAO,QAAQ,YAAY;KAIlC,uBACV,iBACA,SAAS,cACT,mBACA,6BACE,eAAe,OAAO,QAAQ,YAAY;KAElC,sBACV,iBACA,SAAS,cACT,sBACA,6BACE,SACF,uBAAuB,OAAO,QAAQ,YAAY;EAChD,QAAQ,kBAAkB,OAAO,QAAQ,YAAY;;EAEvD,aAAa,uBACX,OACA,QACA,YACA;;KAIQ,kBACV,iBACA,SAAS,cACT,sBACA,6BACE,sBAAsB,OAAO,QAAQ,YAAY"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../src/types.ts"],"mappings":";;;;;;KA0BY,yBAAyB;;;;;;;;;;;;;UAmBpB,oBACf,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,kBACrB,qBACR,cACA,QACA,OACA,YACA;;;;;;EAOA;;;;;;;;;;;;;;KAeU,wBACV,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,YAC3B,iBACF,oBAAoB,cAAc,QAAQ,OAAO,YAAY;;;;;EAO7D,UAAU,QACR,oBACE,cACA,QACA,OACA,cACA,uBAEF;;;;;;;;;;;;;;KAgBQ,gCACV,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,wBACE,iBACF,4BACE,cACA,QACA,OACA,WACA;;;;;EAQF,UAAU,QACR,4BACE,cACA,QACA,OACA,WACA,wBAEF;;;;;;KAQQ,qBAAqB;;;;;;;;;;;UAWhB,gBACf,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,kBACrB,UACR,oBAAoB,cAAc,QAAQ,OAAO,cAAc;;;;;KAQrD,6BAA6B;;;;;;;;;;;;UAiBxB,wBACf,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,kBACrB,UACR,gBAAgB,cAAc,QAAQ,OAAO;;;;;EAO7C,UAAU,QACR,gBAAgB,cAAc,QAAQ,OAAO,uBAC7C;;;;;;KAQQ,6BAA6B;;;;;;;;;;;;;UAmBxB,wBACf,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,8BACQ,UACR,6BACE,cACA,QACA,OACA,WACA;;;;;;EASF;;;;;;KAOU,qCACV;;;;;;;;;;;;;UAae,gCACf,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,8BACQ,UACR,wBAAwB,cAAc,QAAQ,OAAO,WAAW;;;;;EAOhE,UAAU,QACR,wBACE,cACA,QACA,OACA,WACA,wBAEF;;;;;;;;;;KAYQ,mBACV,iBACA,SAAS,gBACP,oBAAoB,OAAO;;;;;;;KAQnB,eACV,iBACA,SAAS,gBACP,mBAAmB,OAAO;;;;;;;;KASlB,uBACV,iBACA,SAAS,gBACP,iBACF,2BAA2B,OAAO;;;;;;;;;KAYxB,sBACV,iBACA,SAAS,gBACP,2BAA2B,OAAO;;;;;;;;KAS1B,uBACV,iBACA,SAAS,gBACP,4BAA4B,OAAO;;;;;;;;KAS3B,8BACV,iBACA,SAAS,gBACP,mCAAmC,OAAO;;;;;;;;KASlC,+BACV,iBACA,SAAS,gBACP,UACF,mCAAmC,OAAO;;;;;KAQhC,wBAAwB;;;;;;;;;;;UAWnB,mBACf,iBACA,SAAS,cACT,mBACA,mCACQ,UACR,wBAAwB,OAAO,QAAQ,YAAY;;;;;;;;;;;;KAezC,kBACV,iBACA,SAAS,cACT,mBACA,iCAEG,MAAM,WACP,eAAe,OAAO,QAAQ,YAAY;;;;;;;;;;;KAclC,uBACV,iBACA,SAAS,cACT,mBACA,6BACE,eAAe,OAAO,QAAQ,YAAY;;;;;;;;;;;KAYlC,sBACV,iBACA,SAAS,cACT,sBACA,6BACE,SACF,uBAAuB,OAAO,QAAQ,YAAY;EAChD,QAAQ,kBAAkB,OAAO,QAAQ,YAAY;;;;;EAKvD,aAAa,uBACX,OACA,QACA,YACA;;;;;;;;;;;KAaQ,kBACV,iBACA,SAAS,cACT,sBACA,6BACE,sBAAsB,OAAO,QAAQ,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/types.ts"],"sourcesContent":["/* istanbul ignore file */\nimport type {\n DefaultError,\n DefinedInfiniteQueryObserverResult,\n DefinedQueryObserverResult,\n DistributiveOmit,\n InfiniteData,\n InfiniteQueryExecuteOptions,\n InfiniteQueryObserverOptions,\n InfiniteQueryObserverResult,\n MutateFunction,\n MutationObserverOptions,\n MutationObserverResult,\n OmitKeyof,\n Override,\n QueryExecuteOptions,\n QueryKey,\n QueryObserverOptions,\n QueryObserverResult,\n SkipToken,\n} from '@tanstack/query-core'\n\nexport type AnyUseBaseQueryOptions = UseBaseQueryOptions<\n any,\n any,\n any,\n any,\n any\n>\nexport interface UseBaseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n> {\n /**\n * Set this to `false` to unsubscribe this observer from updates to the query cache.\n * Defaults to `true`.\n */\n subscribed?: boolean\n}\n\nexport type UsePrefetchQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = DistributiveOmit<\n QueryExecuteOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>,\n 'queryFn'\n> & {\n queryFn?: Exclude<\n QueryExecuteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey\n >['queryFn'],\n SkipToken\n >\n}\n\nexport type UsePrefetchInfiniteQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = DistributiveOmit<\n InfiniteQueryExecuteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n 'queryFn'\n> & {\n queryFn?: Exclude<\n InfiniteQueryExecuteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >['queryFn'],\n SkipToken\n >\n}\n\nexport type AnyUseQueryOptions = UseQueryOptions<any, any, any, any>\nexport interface UseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends OmitKeyof<\n UseBaseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>,\n 'suspense'\n> {}\n\nexport type AnyUseSuspenseQueryOptions = UseSuspenseQueryOptions<\n any,\n any,\n any,\n any\n>\nexport interface UseSuspenseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends OmitKeyof<\n UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'\n> {\n queryFn?: Exclude<\n UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'],\n SkipToken\n >\n}\n\nexport type AnyUseInfiniteQueryOptions = UseInfiniteQueryOptions<\n any,\n any,\n any,\n any,\n any\n>\nexport interface UseInfiniteQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> extends OmitKeyof<\n InfiniteQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n 'suspense'\n> {\n /**\n * Set this to `false` to unsubscribe this observer from updates to the query cache.\n * Defaults to `true`.\n */\n subscribed?: boolean\n}\n\nexport type AnyUseSuspenseInfiniteQueryOptions =\n UseSuspenseInfiniteQueryOptions<any, any, any, any, any>\nexport interface UseSuspenseInfiniteQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> extends OmitKeyof<\n UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>,\n 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'\n> {\n queryFn?: Exclude<\n UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >['queryFn'],\n SkipToken\n >\n}\n\nexport type UseBaseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = QueryObserverResult<TData, TError>\n\nexport type UseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = UseBaseQueryResult<TData, TError>\n\nexport type UseSuspenseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = DistributiveOmit<\n DefinedQueryObserverResult<TData, TError>,\n 'isPlaceholderData'\n>\n\nexport type DefinedUseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = DefinedQueryObserverResult<TData, TError>\n\nexport type UseInfiniteQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = InfiniteQueryObserverResult<TData, TError>\n\nexport type DefinedUseInfiniteQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = DefinedInfiniteQueryObserverResult<TData, TError>\n\nexport type UseSuspenseInfiniteQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = OmitKeyof<\n DefinedInfiniteQueryObserverResult<TData, TError>,\n 'isPlaceholderData'\n>\n\nexport type AnyUseMutationOptions = UseMutationOptions<any, any, any, any>\nexport interface UseMutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends OmitKeyof<\n MutationObserverOptions<TData, TError, TVariables, TOnMutateResult>,\n '_defaulted'\n> {}\n\nexport type UseMutateFunction<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> = (\n ...args: Parameters<\n MutateFunction<TData, TError, TVariables, TOnMutateResult>\n >\n) => void\n\nexport type UseMutateAsyncFunction<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> = MutateFunction<TData, TError, TVariables, TOnMutateResult>\n\nexport type UseBaseMutationResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> = Override<\n MutationObserverResult<TData, TError, TVariables, TOnMutateResult>,\n { mutate: UseMutateFunction<TData, TError, TVariables, TOnMutateResult> }\n> & {\n mutateAsync: UseMutateAsyncFunction<\n TData,\n TError,\n TVariables,\n TOnMutateResult\n >\n}\n\nexport type UseMutationResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> = UseBaseMutationResult<TData, TError, TVariables, TOnMutateResult>\n"],"mappings":""}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/types.ts"],"sourcesContent":["/* istanbul ignore file */\nimport type {\n DefaultError,\n DefinedInfiniteQueryObserverResult,\n DefinedQueryObserverResult,\n DistributiveOmit,\n InfiniteData,\n InfiniteQueryExecuteOptions,\n InfiniteQueryObserverOptions,\n InfiniteQueryObserverResult,\n MutateFunction,\n MutationObserverOptions,\n MutationObserverResult,\n OmitKeyof,\n Override,\n QueryExecuteOptions,\n QueryKey,\n QueryObserverOptions,\n QueryObserverResult,\n SkipToken,\n} from '@tanstack/query-core'\n\n/**\n * {@link UseBaseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't\n * relevant, e.g. when accepting options for any query in a helper function.\n */\nexport type AnyUseBaseQueryOptions = UseBaseQueryOptions<\n any,\n any,\n any,\n any,\n any\n>\n/**\n * The options shared by `useQuery` and `useSuspenseQuery`. Extends {@link QueryObserverOptions} from\n * `@tanstack/query-core` with the `preact-query`-specific `subscribed` option.\n *\n * @template TQueryFnData - The type your `queryFn` resolves to.\n * @template TError - The type of errors your `queryFn` may throw.\n * @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no\n * `select` is used.\n * @template TQueryData - The type of the data actually held in the query cache — the input to `select` and\n * `placeholderData`. Defaults to, and is usually the same as, `TQueryFnData`.\n * @template TQueryKey - The type of your `queryKey`.\n */\nexport interface UseBaseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n> {\n /**\n * Set this to `false` to unsubscribe this observer from updates to the query cache.\n *\n * @defaultValue true\n */\n subscribed?: boolean\n}\n\n/**\n * The options accepted by `usePrefetchQuery` — everything you can pass to `queryClient.query`, except `queryFn`\n * is required unless a default query function has been defined.\n *\n * @template TQueryFnData - The type your `queryFn` resolves to.\n * @template TError - The type of errors your `queryFn` may throw.\n * @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no\n * `select` is used.\n * @template TQueryData - The type of the data actually held in the query cache — the input to `select` and\n * `placeholderData`. Defaults to, and is usually the same as, `TQueryFnData`.\n * @template TQueryKey - The type of your `queryKey`.\n */\nexport type UsePrefetchQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = DistributiveOmit<\n QueryExecuteOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>,\n 'queryFn'\n> & {\n /**\n * `skipToken` is not allowed as a value here — a prefetch always needs a query function to actually run,\n * unless a default query function has been defined.\n */\n queryFn?: Exclude<\n QueryExecuteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey\n >['queryFn'],\n SkipToken\n >\n}\n\n/**\n * The options accepted by `usePrefetchInfiniteQuery` — everything you can pass to `queryClient.infiniteQuery`,\n * except `queryFn` is required unless a default query function has been defined.\n *\n * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.\n * @template TError - The type of errors your `queryFn` may throw.\n * @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` (a single page)\n * here, since a prefetch never reads `data` back out — this parameter only matters if you reuse these options\n * elsewhere with `select` applied.\n * @template TQueryKey - The type of your `queryKey`.\n * @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.\n */\nexport type UsePrefetchInfiniteQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = DistributiveOmit<\n InfiniteQueryExecuteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n 'queryFn'\n> & {\n /**\n * `skipToken` is not allowed as a value here — a prefetch always needs a query function to actually run,\n * unless a default query function has been defined.\n */\n queryFn?: Exclude<\n InfiniteQueryExecuteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >['queryFn'],\n SkipToken\n >\n}\n\n/**\n * {@link UseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't\n * relevant, e.g. when accepting options for any query in a helper function.\n */\nexport type AnyUseQueryOptions = UseQueryOptions<any, any, any, any>\n/**\n * The options accepted by `useQuery`. Same as {@link UseBaseQueryOptions}, minus `suspense` (which\n * `preact-query` derives from which hook you call rather than exposing as an option).\n *\n * @template TQueryFnData - The type your `queryFn` resolves to.\n * @template TError - The type of errors your `queryFn` may throw.\n * @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no\n * `select` is used.\n * @template TQueryKey - The type of your `queryKey`.\n */\nexport interface UseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends OmitKeyof<\n UseBaseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>,\n 'suspense'\n> {}\n\n/**\n * {@link UseSuspenseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't\n * relevant, e.g. when accepting options for any query in a helper function.\n */\nexport type AnyUseSuspenseQueryOptions = UseSuspenseQueryOptions<\n any,\n any,\n any,\n any\n>\n/**\n * The options accepted by `useSuspenseQuery`. Same as {@link UseQueryOptions}, minus `enabled`, `throwOnError`,\n * and `placeholderData` — Suspense hooks cannot render a \"disabled\" or \"placeholder\" state, so those options\n * don't apply.\n *\n * @template TQueryFnData - The type your `queryFn` resolves to.\n * @template TError - The type of errors your `queryFn` may throw.\n * @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no\n * `select` is used.\n * @template TQueryKey - The type of your `queryKey`.\n */\nexport interface UseSuspenseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends OmitKeyof<\n UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'\n> {\n /**\n * `skipToken` is not allowed here — Suspense hooks cannot render a \"disabled\" state, so a query function\n * must always be provided, unless a default query function has been defined.\n */\n queryFn?: Exclude<\n UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'],\n SkipToken\n >\n}\n\n/**\n * {@link UseInfiniteQueryOptions} with all type parameters set to `any`, useful when the specific types aren't\n * relevant, e.g. when accepting options for any query in a helper function.\n */\nexport type AnyUseInfiniteQueryOptions = UseInfiniteQueryOptions<\n any,\n any,\n any,\n any,\n any\n>\n/**\n * The options accepted by `useInfiniteQuery`. Extends {@link InfiniteQueryObserverOptions} from\n * `@tanstack/query-core` with the `preact-query`-specific `subscribed` option, minus `suspense` (which\n * `preact-query` derives from which hook you call rather than exposing as an option).\n *\n * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.\n * @template TError - The type of errors your `queryFn` may throw.\n * @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,\n * the shape of all fetched pages plus their page params.\n * @template TQueryKey - The type of your `queryKey`.\n * @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.\n */\nexport interface UseInfiniteQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> extends OmitKeyof<\n InfiniteQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n 'suspense'\n> {\n /**\n * Set this to `false` to unsubscribe this observer from updates to the query cache.\n *\n * @defaultValue true\n */\n subscribed?: boolean\n}\n\n/**\n * {@link UseSuspenseInfiniteQueryOptions} with all type parameters set to `any`, useful when the specific types\n * aren't relevant, e.g. when accepting options for any query in a helper function.\n */\nexport type AnyUseSuspenseInfiniteQueryOptions =\n UseSuspenseInfiniteQueryOptions<any, any, any, any, any>\n/**\n * The options accepted by `useSuspenseInfiniteQuery`. Same as {@link UseInfiniteQueryOptions}, minus `enabled`,\n * `throwOnError`, and `placeholderData` — Suspense hooks cannot render a \"disabled\" or \"placeholder\" state, so\n * those options don't apply.\n *\n * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.\n * @template TError - The type of errors your `queryFn` may throw.\n * @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,\n * the shape of all fetched pages plus their page params.\n * @template TQueryKey - The type of your `queryKey`.\n * @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.\n */\nexport interface UseSuspenseInfiniteQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> extends OmitKeyof<\n UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>,\n 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'\n> {\n /**\n * `skipToken` is not allowed here — Suspense hooks cannot render a \"disabled\" state, so a query function\n * must always be provided, unless a default query function has been defined.\n */\n queryFn?: Exclude<\n UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >['queryFn'],\n SkipToken\n >\n}\n\n/**\n * The result of `useQuery` when `initialData` isn't set — `data` may be `undefined` while the query is\n * `pending`. Re-exports {@link QueryObserverResult} from `@tanstack/query-core`. `useInfiniteQuery` returns\n * {@link UseInfiniteQueryResult} instead.\n *\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type UseBaseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = QueryObserverResult<TData, TError>\n\n/**\n * The result of `useQuery`. Same as {@link UseBaseQueryResult}.\n *\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type UseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = UseBaseQueryResult<TData, TError>\n\n/**\n * The result of `useSuspenseQuery`. Same as {@link DefinedUseQueryResult}, minus `isPlaceholderData` — always\n * `false` on that type, so this drops the dead field rather than an active state.\n *\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type UseSuspenseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = DistributiveOmit<\n DefinedQueryObserverResult<TData, TError>,\n 'isPlaceholderData'\n>\n\n/**\n * The result of `useQuery` when `initialData` is set, or of `useSuspenseQuery` before the `isPlaceholderData`\n * omission — `data` is never `undefined`. Re-exports {@link DefinedQueryObserverResult} from\n * `@tanstack/query-core`.\n *\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type DefinedUseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = DefinedQueryObserverResult<TData, TError>\n\n/**\n * The result of `useInfiniteQuery` when `initialData` isn't set — `data` may be `undefined` while the query is\n * `pending`. Re-exports {@link InfiniteQueryObserverResult} from `@tanstack/query-core`.\n *\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type UseInfiniteQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = InfiniteQueryObserverResult<TData, TError>\n\n/**\n * The result of `useInfiniteQuery` when `initialData` is set — `data` is never `undefined`. Re-exports\n * {@link DefinedInfiniteQueryObserverResult} from `@tanstack/query-core`.\n *\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type DefinedUseInfiniteQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = DefinedInfiniteQueryObserverResult<TData, TError>\n\n/**\n * The result of `useSuspenseInfiniteQuery`. Same as {@link DefinedUseInfiniteQueryResult}, minus\n * `isPlaceholderData` — Suspense hooks never render placeholder data.\n *\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type UseSuspenseInfiniteQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = OmitKeyof<\n DefinedInfiniteQueryObserverResult<TData, TError>,\n 'isPlaceholderData'\n>\n\n/**\n * {@link UseMutationOptions} with all type parameters set to `any`, useful when the specific types aren't\n * relevant, e.g. when accepting options for any mutation in a helper function.\n */\nexport type AnyUseMutationOptions = UseMutationOptions<any, any, any, any>\n/**\n * The options accepted by `useMutation`. Same as {@link MutationObserverOptions} from `@tanstack/query-core`,\n * minus the internal `_defaulted` flag.\n *\n * @template TData - The type your mutation function resolves to.\n * @template TError - The type of errors your mutation function may throw.\n * @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.\n * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as\n * their `onMutateResult` parameter — useful for optimistic-update rollback data.\n */\nexport interface UseMutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends OmitKeyof<\n MutationObserverOptions<TData, TError, TVariables, TOnMutateResult>,\n '_defaulted'\n> {}\n\n/**\n * The type of `mutate`, as returned by `useMutation`. Forwards the variables (and an optional per-call\n * `onSuccess`/`onError`/`onSettled`) to the underlying `mutate` call. Fire-and-forget — errors are surfaced\n * through the mutation result, not thrown.\n *\n * @template TData - The type your mutation function resolves to.\n * @template TError - The type of errors your mutation function may throw.\n * @template TVariables - The type of the variable passed to `mutate`.\n * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as\n * their `onMutateResult` parameter — useful for optimistic-update rollback data.\n */\nexport type UseMutateFunction<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> = (\n ...args: Parameters<\n MutateFunction<TData, TError, TVariables, TOnMutateResult>\n >\n) => void\n\n/**\n * The type of `mutateAsync`, as returned by `useMutation`. Similar to {@link UseMutateFunction}, but returns a\n * promise which can be awaited.\n *\n * @template TData - The type your mutation function resolves to.\n * @template TError - The type of errors your mutation function may throw.\n * @template TVariables - The type of the variable passed to `mutateAsync`.\n * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as\n * their `onMutateResult` parameter — useful for optimistic-update rollback data.\n */\nexport type UseMutateAsyncFunction<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> = MutateFunction<TData, TError, TVariables, TOnMutateResult>\n\n/**\n * The result of `useMutation`. Same as {@link MutationObserverResult} from `@tanstack/query-core`, with\n * `mutate` narrowed to the fire-and-forget {@link UseMutateFunction} signature, plus the added `mutateAsync`.\n *\n * @template TData - The type your mutation function resolves to.\n * @template TError - The type of errors your mutation function may throw.\n * @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.\n * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as\n * their `onMutateResult` parameter — useful for optimistic-update rollback data.\n */\nexport type UseBaseMutationResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> = Override<\n MutationObserverResult<TData, TError, TVariables, TOnMutateResult>,\n { mutate: UseMutateFunction<TData, TError, TVariables, TOnMutateResult> }\n> & {\n /**\n * Similar to `mutate`, but returns a promise which can be awaited.\n */\n mutateAsync: UseMutateAsyncFunction<\n TData,\n TError,\n TVariables,\n TOnMutateResult\n >\n}\n\n/**\n * The result of `useMutation`. Same as {@link UseBaseMutationResult}.\n *\n * @template TData - The type your mutation function resolves to.\n * @template TError - The type of errors your mutation function may throw.\n * @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.\n * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as\n * their `onMutateResult` parameter — useful for optimistic-update rollback data.\n */\nexport type UseMutationResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> = UseBaseMutationResult<TData, TError, TVariables, TOnMutateResult>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"useInfiniteQuery.cjs","names":["useBaseQuery","InfiniteQueryObserver"],"sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["import { InfiniteQueryObserver } from '@tanstack/query-core'\nimport type {\n DefaultError,\n InfiniteData,\n QueryClient,\n QueryKey,\n QueryObserver,\n} from '@tanstack/query-core'\n\nimport type {\n DefinedInitialDataInfiniteOptions,\n UndefinedInitialDataInfiniteOptions,\n} from './infiniteQueryOptions'\nimport type {\n DefinedUseInfiniteQueryResult,\n UseInfiniteQueryOptions,\n UseInfiniteQueryResult,\n} from './types'\nimport { useBaseQuery } from './useBaseQuery'\n\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): DefinedUseInfiniteQueryResult<TData, TError>\n\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): UseInfiniteQueryResult<TData, TError>\n\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): UseInfiniteQueryResult<TData, TError>\n\nexport function useInfiniteQuery(\n options: UseInfiniteQueryOptions,\n queryClient?: QueryClient,\n) {\n return useBaseQuery(\n options,\n InfiniteQueryObserver as typeof QueryObserver,\n queryClient,\n )\n}\n"],"mappings":";;;;AAuEA,SAAgB,iBACd,SACA,aACA;CACA,OAAOA,qBAAAA,aACL,SACAC,qBAAAA,uBACA,WACF;AACF"}
1
+ {"version":3,"file":"useInfiniteQuery.cjs","names":["useBaseQuery","InfiniteQueryObserver"],"sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["import { InfiniteQueryObserver } from '@tanstack/query-core'\nimport type {\n DefaultError,\n InfiniteData,\n QueryClient,\n QueryKey,\n QueryObserver,\n} from '@tanstack/query-core'\n\nimport type {\n DefinedInitialDataInfiniteOptions,\n UndefinedInitialDataInfiniteOptions,\n} from './infiniteQueryOptions'\nimport type {\n DefinedUseInfiniteQueryResult,\n UseInfiniteQueryOptions,\n UseInfiniteQueryResult,\n} from './types'\nimport { useBaseQuery } from './useBaseQuery'\n\n/**\n * The options for `useInfiniteQuery` are identical to `useQuery`, with the addition of `queryFn`,\n * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.\n *\n * This overload is selected when `initialData` is set.\n *\n * @remarks Keep in mind that imperative fetch calls, such as `fetchNextPage`, may interfere with the default\n * refetch behavior, resulting in outdated data. Make sure to call these functions only in response to user\n * actions, or add conditions like `hasNextPage && !isFetching`.\n * @see {@link infiniteQueryOptions} to share these options between `useInfiniteQuery` and imperative APIs like `queryClient.infiniteQuery`.\n * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to `useInfiniteQuery`, with `initialData` set.\n * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will\n * be used.\n * @returns The same properties as `useQuery`, with the addition of `data.pages`, `data.pageParams`,\n * `fetchNextPage`, `fetchPreviousPage`, `hasNextPage`, `hasPreviousPage`, `isFetchingNextPage`, and\n * `isFetchingPreviousPage`.\n *\n * @example\n * ```tsx\n * import { useInfiniteQuery } from '@tanstack/preact-query'\n *\n * function Projects() {\n * const { data } = useInfiniteQuery({\n * queryKey: ['projects'],\n * queryFn: ({ pageParam }) => fetchProjects(pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * initialData: { pages: [], pageParams: [] },\n * })\n *\n * return <>{data.pages.map((page) => page.projects.map((p) => <p key={p.id}>{p.name}</p>))}</>\n * }\n * ```\n */\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): DefinedUseInfiniteQueryResult<TData, TError>\n\n/**\n * The options for `useInfiniteQuery` are identical to `useQuery`, with the addition of `queryFn`,\n * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.\n *\n * @remarks Keep in mind that imperative fetch calls, such as `fetchNextPage`, may interfere with the default\n * refetch behavior, resulting in outdated data. Make sure to call these functions only in response to user\n * actions, or add conditions like `hasNextPage && !isFetching`.\n * @see {@link infiniteQueryOptions} to share these options between `useInfiniteQuery` and imperative APIs like `queryClient.infiniteQuery`.\n * @param options - The {@link UndefinedInitialDataInfiniteOptions} to use — everything you can pass to `useInfiniteQuery`.\n * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will\n * be used.\n * @returns The same properties as `useQuery`, with the addition of `data.pages`, `data.pageParams`,\n * `fetchNextPage`, `fetchPreviousPage`, `hasNextPage`, `hasPreviousPage`, `isFetchingNextPage`, and\n * `isFetchingPreviousPage`.\n *\n * @example\n * ```tsx\n * import { useInfiniteQuery } from '@tanstack/preact-query'\n *\n * function Projects() {\n * const { data, fetchNextPage, hasNextPage, isFetching, isFetchingNextPage } =\n * useInfiniteQuery({\n * queryKey: ['projects'],\n * queryFn: ({ pageParam }) => fetchProjects(pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * })\n *\n * return (\n * <button\n * onClick={() => fetchNextPage()}\n * disabled={!hasNextPage || isFetching}\n * >\n * {isFetchingNextPage\n * ? 'Loading more...'\n * : hasNextPage\n * ? 'Load More'\n * : 'Nothing more to load'}\n * </button>\n * )\n * }\n * ```\n */\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): UseInfiniteQueryResult<TData, TError>\n\n/**\n * The options for `useInfiniteQuery` are identical to `useQuery`, with the addition of `queryFn`,\n * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.\n *\n * @remarks Keep in mind that imperative fetch calls, such as `fetchNextPage`, may interfere with the default\n * refetch behavior, resulting in outdated data. Make sure to call these functions only in response to user\n * actions, or add conditions like `hasNextPage && !isFetching`.\n * @see {@link infiniteQueryOptions} to share these options between `useInfiniteQuery` and imperative APIs like `queryClient.infiniteQuery`.\n * @param options - The {@link UseInfiniteQueryOptions} to use — everything you can pass to `useInfiniteQuery`.\n * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will\n * be used.\n * @returns The same properties as `useQuery`, with the addition of `data.pages`, `data.pageParams`,\n * `fetchNextPage`, `fetchPreviousPage`, `hasNextPage`, `hasPreviousPage`, `isFetchingNextPage`, and\n * `isFetchingPreviousPage`.\n *\n * @example\n * ```tsx\n * import { useInfiniteQuery } from '@tanstack/preact-query'\n *\n * function Projects() {\n * const { data, fetchNextPage, hasNextPage, isFetching, isFetchingNextPage } =\n * useInfiniteQuery({\n * queryKey: ['projects'],\n * queryFn: ({ pageParam }) => fetchProjects(pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * })\n *\n * return (\n * <button\n * onClick={() => fetchNextPage()}\n * disabled={!hasNextPage || isFetching}\n * >\n * {isFetchingNextPage\n * ? 'Loading more...'\n * : hasNextPage\n * ? 'Load More'\n * : 'Nothing more to load'}\n * </button>\n * )\n * }\n * ```\n */\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): UseInfiniteQueryResult<TData, TError>\n\nexport function useInfiniteQuery(\n options: UseInfiniteQueryOptions,\n queryClient?: QueryClient,\n) {\n return useBaseQuery(\n options,\n InfiniteQueryObserver as typeof QueryObserver,\n queryClient,\n )\n}\n"],"mappings":";;;;AA+LA,SAAgB,iBACd,SACA,aACA;CACA,OAAOA,qBAAAA,aACL,SACAC,qBAAAA,uBACA,WACF;AACF"}
@@ -2,8 +2,128 @@ import { DefinedUseInfiniteQueryResult, UseInfiniteQueryOptions, UseInfiniteQuer
2
2
  import { DefinedInitialDataInfiniteOptions, UndefinedInitialDataInfiniteOptions } from "./infiniteQueryOptions.cjs";
3
3
  import { DefaultError, InfiniteData, QueryClient, QueryKey } from "@tanstack/query-core";
4
4
  //#region src/useInfiniteQuery.d.ts
5
+ /**
6
+ * The options for `useInfiniteQuery` are identical to `useQuery`, with the addition of `queryFn`,
7
+ * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.
8
+ *
9
+ * This overload is selected when `initialData` is set.
10
+ *
11
+ * @remarks Keep in mind that imperative fetch calls, such as `fetchNextPage`, may interfere with the default
12
+ * refetch behavior, resulting in outdated data. Make sure to call these functions only in response to user
13
+ * actions, or add conditions like `hasNextPage && !isFetching`.
14
+ * @see {@link infiniteQueryOptions} to share these options between `useInfiniteQuery` and imperative APIs like `queryClient.infiniteQuery`.
15
+ * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to `useInfiniteQuery`, with `initialData` set.
16
+ * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will
17
+ * be used.
18
+ * @returns The same properties as `useQuery`, with the addition of `data.pages`, `data.pageParams`,
19
+ * `fetchNextPage`, `fetchPreviousPage`, `hasNextPage`, `hasPreviousPage`, `isFetchingNextPage`, and
20
+ * `isFetchingPreviousPage`.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * import { useInfiniteQuery } from '@tanstack/preact-query'
25
+ *
26
+ * function Projects() {
27
+ * const { data } = useInfiniteQuery({
28
+ * queryKey: ['projects'],
29
+ * queryFn: ({ pageParam }) => fetchProjects(pageParam),
30
+ * initialPageParam: 0,
31
+ * getNextPageParam: (lastPage) => lastPage.nextId,
32
+ * initialData: { pages: [], pageParams: [] },
33
+ * })
34
+ *
35
+ * return <>{data.pages.map((page) => page.projects.map((p) => <p key={p.id}>{p.name}</p>))}</>
36
+ * }
37
+ * ```
38
+ */
5
39
  declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: QueryClient): DefinedUseInfiniteQueryResult<TData, TError>;
40
+ /**
41
+ * The options for `useInfiniteQuery` are identical to `useQuery`, with the addition of `queryFn`,
42
+ * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.
43
+ *
44
+ * @remarks Keep in mind that imperative fetch calls, such as `fetchNextPage`, may interfere with the default
45
+ * refetch behavior, resulting in outdated data. Make sure to call these functions only in response to user
46
+ * actions, or add conditions like `hasNextPage && !isFetching`.
47
+ * @see {@link infiniteQueryOptions} to share these options between `useInfiniteQuery` and imperative APIs like `queryClient.infiniteQuery`.
48
+ * @param options - The {@link UndefinedInitialDataInfiniteOptions} to use — everything you can pass to `useInfiniteQuery`.
49
+ * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will
50
+ * be used.
51
+ * @returns The same properties as `useQuery`, with the addition of `data.pages`, `data.pageParams`,
52
+ * `fetchNextPage`, `fetchPreviousPage`, `hasNextPage`, `hasPreviousPage`, `isFetchingNextPage`, and
53
+ * `isFetchingPreviousPage`.
54
+ *
55
+ * @example
56
+ * ```tsx
57
+ * import { useInfiniteQuery } from '@tanstack/preact-query'
58
+ *
59
+ * function Projects() {
60
+ * const { data, fetchNextPage, hasNextPage, isFetching, isFetchingNextPage } =
61
+ * useInfiniteQuery({
62
+ * queryKey: ['projects'],
63
+ * queryFn: ({ pageParam }) => fetchProjects(pageParam),
64
+ * initialPageParam: 0,
65
+ * getNextPageParam: (lastPage) => lastPage.nextId,
66
+ * })
67
+ *
68
+ * return (
69
+ * <button
70
+ * onClick={() => fetchNextPage()}
71
+ * disabled={!hasNextPage || isFetching}
72
+ * >
73
+ * {isFetchingNextPage
74
+ * ? 'Loading more...'
75
+ * : hasNextPage
76
+ * ? 'Load More'
77
+ * : 'Nothing more to load'}
78
+ * </button>
79
+ * )
80
+ * }
81
+ * ```
82
+ */
6
83
  declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: QueryClient): UseInfiniteQueryResult<TData, TError>;
84
+ /**
85
+ * The options for `useInfiniteQuery` are identical to `useQuery`, with the addition of `queryFn`,
86
+ * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.
87
+ *
88
+ * @remarks Keep in mind that imperative fetch calls, such as `fetchNextPage`, may interfere with the default
89
+ * refetch behavior, resulting in outdated data. Make sure to call these functions only in response to user
90
+ * actions, or add conditions like `hasNextPage && !isFetching`.
91
+ * @see {@link infiniteQueryOptions} to share these options between `useInfiniteQuery` and imperative APIs like `queryClient.infiniteQuery`.
92
+ * @param options - The {@link UseInfiniteQueryOptions} to use — everything you can pass to `useInfiniteQuery`.
93
+ * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will
94
+ * be used.
95
+ * @returns The same properties as `useQuery`, with the addition of `data.pages`, `data.pageParams`,
96
+ * `fetchNextPage`, `fetchPreviousPage`, `hasNextPage`, `hasPreviousPage`, `isFetchingNextPage`, and
97
+ * `isFetchingPreviousPage`.
98
+ *
99
+ * @example
100
+ * ```tsx
101
+ * import { useInfiniteQuery } from '@tanstack/preact-query'
102
+ *
103
+ * function Projects() {
104
+ * const { data, fetchNextPage, hasNextPage, isFetching, isFetchingNextPage } =
105
+ * useInfiniteQuery({
106
+ * queryKey: ['projects'],
107
+ * queryFn: ({ pageParam }) => fetchProjects(pageParam),
108
+ * initialPageParam: 0,
109
+ * getNextPageParam: (lastPage) => lastPage.nextId,
110
+ * })
111
+ *
112
+ * return (
113
+ * <button
114
+ * onClick={() => fetchNextPage()}
115
+ * disabled={!hasNextPage || isFetching}
116
+ * >
117
+ * {isFetchingNextPage
118
+ * ? 'Loading more...'
119
+ * : hasNextPage
120
+ * ? 'Load More'
121
+ * : 'Nothing more to load'}
122
+ * </button>
123
+ * )
124
+ * }
125
+ * ```
126
+ */
7
127
  declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: QueryClient): UseInfiniteQueryResult<TData, TError>;
8
128
  //#endregion
9
129
  export { useInfiniteQuery };
@@ -1 +1 @@
1
- {"version":3,"file":"useInfiniteQuery.d.cts","names":[],"sources":["../../src/useInfiniteQuery.ts"],"mappings":";;;;iBAoBgB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,kCACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,8BAA8B,OAAO;iBAExB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,oCACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,uBAAuB,OAAO;iBAEjB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,wBACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,uBAAuB,OAAO"}
1
+ {"version":3,"file":"useInfiniteQuery.d.cts","names":[],"sources":["../../src/useInfiniteQuery.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsDgB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,kCACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,8BAA8B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6CxB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,oCACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,uBAAuB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6CjB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,wBACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,uBAAuB,OAAO"}