@tanstack/react-query 5.104.5 → 5.105.1

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 (301) hide show
  1. package/build/legacy/HydrationBoundary.cjs +2 -3
  2. package/build/legacy/HydrationBoundary.cjs.map +1 -1
  3. package/build/legacy/HydrationBoundary.d.cts +0 -2
  4. package/build/legacy/HydrationBoundary.d.cts.map +1 -1
  5. package/build/legacy/HydrationBoundary.d.ts +0 -2
  6. package/build/legacy/HydrationBoundary.d.ts.map +1 -1
  7. package/build/legacy/HydrationBoundary.js +1 -2
  8. package/build/legacy/HydrationBoundary.js.map +1 -1
  9. package/build/legacy/IsRestoringProvider.cjs +2 -3
  10. package/build/legacy/IsRestoringProvider.d.cts +0 -2
  11. package/build/legacy/IsRestoringProvider.d.cts.map +1 -1
  12. package/build/legacy/IsRestoringProvider.d.ts +0 -2
  13. package/build/legacy/IsRestoringProvider.d.ts.map +1 -1
  14. package/build/legacy/IsRestoringProvider.js +1 -2
  15. package/build/legacy/QueryClientProvider.cjs +2 -3
  16. package/build/legacy/QueryClientProvider.d.cts +0 -2
  17. package/build/legacy/QueryClientProvider.d.cts.map +1 -1
  18. package/build/legacy/QueryClientProvider.d.ts +0 -2
  19. package/build/legacy/QueryClientProvider.d.ts.map +1 -1
  20. package/build/legacy/QueryClientProvider.js +1 -2
  21. package/build/legacy/QueryErrorResetBoundary.cjs +2 -3
  22. package/build/legacy/QueryErrorResetBoundary.d.cts +1 -3
  23. package/build/legacy/QueryErrorResetBoundary.d.cts.map +1 -1
  24. package/build/legacy/QueryErrorResetBoundary.d.ts +1 -3
  25. package/build/legacy/QueryErrorResetBoundary.d.ts.map +1 -1
  26. package/build/legacy/QueryErrorResetBoundary.js +1 -2
  27. package/build/legacy/errorBoundaryUtils.cjs +2 -3
  28. package/build/legacy/errorBoundaryUtils.d.cts +0 -2
  29. package/build/legacy/errorBoundaryUtils.d.cts.map +1 -1
  30. package/build/legacy/errorBoundaryUtils.d.ts +0 -2
  31. package/build/legacy/errorBoundaryUtils.d.ts.map +1 -1
  32. package/build/legacy/errorBoundaryUtils.js +1 -2
  33. package/build/legacy/index.cjs +1 -2
  34. package/build/legacy/index.js +1 -2
  35. package/build/legacy/infiniteQueryOptions.cjs +1 -2
  36. package/build/legacy/infiniteQueryOptions.cjs.map +1 -1
  37. package/build/legacy/infiniteQueryOptions.d.cts +16 -16
  38. package/build/legacy/infiniteQueryOptions.d.cts.map +1 -1
  39. package/build/legacy/infiniteQueryOptions.d.ts +16 -16
  40. package/build/legacy/infiniteQueryOptions.d.ts.map +1 -1
  41. package/build/legacy/infiniteQueryOptions.js +1 -2
  42. package/build/legacy/infiniteQueryOptions.js.map +1 -1
  43. package/build/legacy/mutationOptions.cjs +1 -2
  44. package/build/legacy/mutationOptions.d.cts +0 -2
  45. package/build/legacy/mutationOptions.d.cts.map +1 -1
  46. package/build/legacy/mutationOptions.d.ts +0 -2
  47. package/build/legacy/mutationOptions.d.ts.map +1 -1
  48. package/build/legacy/mutationOptions.js +1 -2
  49. package/build/legacy/queryOptions.cjs +1 -2
  50. package/build/legacy/queryOptions.cjs.map +1 -1
  51. package/build/legacy/queryOptions.d.cts +16 -15
  52. package/build/legacy/queryOptions.d.cts.map +1 -1
  53. package/build/legacy/queryOptions.d.ts +16 -15
  54. package/build/legacy/queryOptions.d.ts.map +1 -1
  55. package/build/legacy/queryOptions.js +1 -2
  56. package/build/legacy/queryOptions.js.map +1 -1
  57. package/build/legacy/{rolldown-runtime-VH7oDXx4.cjs → rolldown-runtime-CmQyd0Gu.cjs} +1 -2
  58. package/build/legacy/suspense.cjs +1 -2
  59. package/build/legacy/suspense.d.cts +0 -2
  60. package/build/legacy/suspense.d.cts.map +1 -1
  61. package/build/legacy/suspense.d.ts +0 -2
  62. package/build/legacy/suspense.d.ts.map +1 -1
  63. package/build/legacy/suspense.js +1 -2
  64. package/build/legacy/types.cjs +1 -2
  65. package/build/legacy/types.d.cts +0 -2
  66. package/build/legacy/types.d.cts.map +1 -1
  67. package/build/legacy/types.d.ts +0 -2
  68. package/build/legacy/types.d.ts.map +1 -1
  69. package/build/legacy/types.js +1 -2
  70. package/build/legacy/useBaseQuery.cjs +2 -3
  71. package/build/legacy/useBaseQuery.d.cts +0 -2
  72. package/build/legacy/useBaseQuery.d.cts.map +1 -1
  73. package/build/legacy/useBaseQuery.d.ts +0 -2
  74. package/build/legacy/useBaseQuery.d.ts.map +1 -1
  75. package/build/legacy/useBaseQuery.js +1 -2
  76. package/build/legacy/useInfiniteQuery.cjs +1 -2
  77. package/build/legacy/useInfiniteQuery.cjs.map +1 -1
  78. package/build/legacy/useInfiniteQuery.d.cts +2 -4
  79. package/build/legacy/useInfiniteQuery.d.cts.map +1 -1
  80. package/build/legacy/useInfiniteQuery.d.ts +2 -4
  81. package/build/legacy/useInfiniteQuery.d.ts.map +1 -1
  82. package/build/legacy/useInfiniteQuery.js +1 -2
  83. package/build/legacy/useInfiniteQuery.js.map +1 -1
  84. package/build/legacy/useIsFetching.cjs +2 -3
  85. package/build/legacy/useIsFetching.cjs.map +1 -1
  86. package/build/legacy/useIsFetching.d.cts +1 -3
  87. package/build/legacy/useIsFetching.d.cts.map +1 -1
  88. package/build/legacy/useIsFetching.d.ts +1 -3
  89. package/build/legacy/useIsFetching.d.ts.map +1 -1
  90. package/build/legacy/useIsFetching.js +1 -2
  91. package/build/legacy/useIsFetching.js.map +1 -1
  92. package/build/legacy/useMutation.cjs +2 -3
  93. package/build/legacy/useMutation.d.cts +0 -2
  94. package/build/legacy/useMutation.d.cts.map +1 -1
  95. package/build/legacy/useMutation.d.ts +0 -2
  96. package/build/legacy/useMutation.d.ts.map +1 -1
  97. package/build/legacy/useMutation.js +1 -2
  98. package/build/legacy/useMutationState.cjs +2 -3
  99. package/build/legacy/useMutationState.d.cts +0 -2
  100. package/build/legacy/useMutationState.d.cts.map +1 -1
  101. package/build/legacy/useMutationState.d.ts +0 -2
  102. package/build/legacy/useMutationState.d.ts.map +1 -1
  103. package/build/legacy/useMutationState.js +1 -2
  104. package/build/legacy/usePrefetchInfiniteQuery.cjs +1 -2
  105. package/build/legacy/usePrefetchInfiniteQuery.d.cts +0 -2
  106. package/build/legacy/usePrefetchInfiniteQuery.d.cts.map +1 -1
  107. package/build/legacy/usePrefetchInfiniteQuery.d.ts +0 -2
  108. package/build/legacy/usePrefetchInfiniteQuery.d.ts.map +1 -1
  109. package/build/legacy/usePrefetchInfiniteQuery.js +1 -2
  110. package/build/legacy/usePrefetchQuery.cjs +1 -2
  111. package/build/legacy/usePrefetchQuery.d.cts +0 -2
  112. package/build/legacy/usePrefetchQuery.d.cts.map +1 -1
  113. package/build/legacy/usePrefetchQuery.d.ts +0 -2
  114. package/build/legacy/usePrefetchQuery.d.ts.map +1 -1
  115. package/build/legacy/usePrefetchQuery.js +1 -2
  116. package/build/legacy/useQueries.cjs +2 -3
  117. package/build/legacy/useQueries.d.cts +0 -2
  118. package/build/legacy/useQueries.d.cts.map +1 -1
  119. package/build/legacy/useQueries.d.ts +0 -2
  120. package/build/legacy/useQueries.d.ts.map +1 -1
  121. package/build/legacy/useQueries.js +1 -2
  122. package/build/legacy/useQuery.cjs +1 -2
  123. package/build/legacy/useQuery.cjs.map +1 -1
  124. package/build/legacy/useQuery.d.cts +5 -7
  125. package/build/legacy/useQuery.d.cts.map +1 -1
  126. package/build/legacy/useQuery.d.ts +5 -7
  127. package/build/legacy/useQuery.d.ts.map +1 -1
  128. package/build/legacy/useQuery.js +1 -2
  129. package/build/legacy/useQuery.js.map +1 -1
  130. package/build/legacy/useSuspenseInfiniteQuery.cjs +1 -2
  131. package/build/legacy/useSuspenseInfiniteQuery.d.cts +0 -2
  132. package/build/legacy/useSuspenseInfiniteQuery.d.cts.map +1 -1
  133. package/build/legacy/useSuspenseInfiniteQuery.d.ts +0 -2
  134. package/build/legacy/useSuspenseInfiniteQuery.d.ts.map +1 -1
  135. package/build/legacy/useSuspenseInfiniteQuery.js +1 -2
  136. package/build/legacy/useSuspenseQueries.cjs +1 -2
  137. package/build/legacy/useSuspenseQueries.d.cts +0 -2
  138. package/build/legacy/useSuspenseQueries.d.cts.map +1 -1
  139. package/build/legacy/useSuspenseQueries.d.ts +0 -2
  140. package/build/legacy/useSuspenseQueries.d.ts.map +1 -1
  141. package/build/legacy/useSuspenseQueries.js +1 -2
  142. package/build/legacy/useSuspenseQuery.cjs +1 -2
  143. package/build/legacy/useSuspenseQuery.d.cts +0 -2
  144. package/build/legacy/useSuspenseQuery.d.cts.map +1 -1
  145. package/build/legacy/useSuspenseQuery.d.ts +0 -2
  146. package/build/legacy/useSuspenseQuery.d.ts.map +1 -1
  147. package/build/legacy/useSuspenseQuery.js +1 -2
  148. package/build/modern/HydrationBoundary.cjs +2 -3
  149. package/build/modern/HydrationBoundary.cjs.map +1 -1
  150. package/build/modern/HydrationBoundary.d.cts +0 -2
  151. package/build/modern/HydrationBoundary.d.cts.map +1 -1
  152. package/build/modern/HydrationBoundary.d.ts +0 -2
  153. package/build/modern/HydrationBoundary.d.ts.map +1 -1
  154. package/build/modern/HydrationBoundary.js +1 -2
  155. package/build/modern/HydrationBoundary.js.map +1 -1
  156. package/build/modern/IsRestoringProvider.cjs +2 -3
  157. package/build/modern/IsRestoringProvider.d.cts +0 -2
  158. package/build/modern/IsRestoringProvider.d.cts.map +1 -1
  159. package/build/modern/IsRestoringProvider.d.ts +0 -2
  160. package/build/modern/IsRestoringProvider.d.ts.map +1 -1
  161. package/build/modern/IsRestoringProvider.js +1 -2
  162. package/build/modern/QueryClientProvider.cjs +2 -3
  163. package/build/modern/QueryClientProvider.d.cts +0 -2
  164. package/build/modern/QueryClientProvider.d.cts.map +1 -1
  165. package/build/modern/QueryClientProvider.d.ts +0 -2
  166. package/build/modern/QueryClientProvider.d.ts.map +1 -1
  167. package/build/modern/QueryClientProvider.js +1 -2
  168. package/build/modern/QueryErrorResetBoundary.cjs +2 -3
  169. package/build/modern/QueryErrorResetBoundary.d.cts +1 -3
  170. package/build/modern/QueryErrorResetBoundary.d.cts.map +1 -1
  171. package/build/modern/QueryErrorResetBoundary.d.ts +1 -3
  172. package/build/modern/QueryErrorResetBoundary.d.ts.map +1 -1
  173. package/build/modern/QueryErrorResetBoundary.js +1 -2
  174. package/build/modern/errorBoundaryUtils.cjs +2 -3
  175. package/build/modern/errorBoundaryUtils.d.cts +0 -2
  176. package/build/modern/errorBoundaryUtils.d.cts.map +1 -1
  177. package/build/modern/errorBoundaryUtils.d.ts +0 -2
  178. package/build/modern/errorBoundaryUtils.d.ts.map +1 -1
  179. package/build/modern/errorBoundaryUtils.js +1 -2
  180. package/build/modern/index.cjs +1 -2
  181. package/build/modern/index.js +1 -2
  182. package/build/modern/infiniteQueryOptions.cjs +1 -2
  183. package/build/modern/infiniteQueryOptions.cjs.map +1 -1
  184. package/build/modern/infiniteQueryOptions.d.cts +16 -16
  185. package/build/modern/infiniteQueryOptions.d.cts.map +1 -1
  186. package/build/modern/infiniteQueryOptions.d.ts +16 -16
  187. package/build/modern/infiniteQueryOptions.d.ts.map +1 -1
  188. package/build/modern/infiniteQueryOptions.js +1 -2
  189. package/build/modern/infiniteQueryOptions.js.map +1 -1
  190. package/build/modern/mutationOptions.cjs +1 -2
  191. package/build/modern/mutationOptions.d.cts +0 -2
  192. package/build/modern/mutationOptions.d.cts.map +1 -1
  193. package/build/modern/mutationOptions.d.ts +0 -2
  194. package/build/modern/mutationOptions.d.ts.map +1 -1
  195. package/build/modern/mutationOptions.js +1 -2
  196. package/build/modern/queryOptions.cjs +1 -2
  197. package/build/modern/queryOptions.cjs.map +1 -1
  198. package/build/modern/queryOptions.d.cts +16 -15
  199. package/build/modern/queryOptions.d.cts.map +1 -1
  200. package/build/modern/queryOptions.d.ts +16 -15
  201. package/build/modern/queryOptions.d.ts.map +1 -1
  202. package/build/modern/queryOptions.js +1 -2
  203. package/build/modern/queryOptions.js.map +1 -1
  204. package/build/modern/{rolldown-runtime-VH7oDXx4.cjs → rolldown-runtime-CmQyd0Gu.cjs} +1 -2
  205. package/build/modern/suspense.cjs +1 -2
  206. package/build/modern/suspense.d.cts +0 -2
  207. package/build/modern/suspense.d.cts.map +1 -1
  208. package/build/modern/suspense.d.ts +0 -2
  209. package/build/modern/suspense.d.ts.map +1 -1
  210. package/build/modern/suspense.js +1 -2
  211. package/build/modern/types.cjs +1 -2
  212. package/build/modern/types.d.cts +0 -2
  213. package/build/modern/types.d.cts.map +1 -1
  214. package/build/modern/types.d.ts +0 -2
  215. package/build/modern/types.d.ts.map +1 -1
  216. package/build/modern/types.js +1 -2
  217. package/build/modern/useBaseQuery.cjs +2 -3
  218. package/build/modern/useBaseQuery.d.cts +0 -2
  219. package/build/modern/useBaseQuery.d.cts.map +1 -1
  220. package/build/modern/useBaseQuery.d.ts +0 -2
  221. package/build/modern/useBaseQuery.d.ts.map +1 -1
  222. package/build/modern/useBaseQuery.js +1 -2
  223. package/build/modern/useInfiniteQuery.cjs +1 -2
  224. package/build/modern/useInfiniteQuery.cjs.map +1 -1
  225. package/build/modern/useInfiniteQuery.d.cts +2 -4
  226. package/build/modern/useInfiniteQuery.d.cts.map +1 -1
  227. package/build/modern/useInfiniteQuery.d.ts +2 -4
  228. package/build/modern/useInfiniteQuery.d.ts.map +1 -1
  229. package/build/modern/useInfiniteQuery.js +1 -2
  230. package/build/modern/useInfiniteQuery.js.map +1 -1
  231. package/build/modern/useIsFetching.cjs +2 -3
  232. package/build/modern/useIsFetching.cjs.map +1 -1
  233. package/build/modern/useIsFetching.d.cts +1 -3
  234. package/build/modern/useIsFetching.d.cts.map +1 -1
  235. package/build/modern/useIsFetching.d.ts +1 -3
  236. package/build/modern/useIsFetching.d.ts.map +1 -1
  237. package/build/modern/useIsFetching.js +1 -2
  238. package/build/modern/useIsFetching.js.map +1 -1
  239. package/build/modern/useMutation.cjs +2 -3
  240. package/build/modern/useMutation.d.cts +0 -2
  241. package/build/modern/useMutation.d.cts.map +1 -1
  242. package/build/modern/useMutation.d.ts +0 -2
  243. package/build/modern/useMutation.d.ts.map +1 -1
  244. package/build/modern/useMutation.js +1 -2
  245. package/build/modern/useMutationState.cjs +2 -3
  246. package/build/modern/useMutationState.d.cts +0 -2
  247. package/build/modern/useMutationState.d.cts.map +1 -1
  248. package/build/modern/useMutationState.d.ts +0 -2
  249. package/build/modern/useMutationState.d.ts.map +1 -1
  250. package/build/modern/useMutationState.js +1 -2
  251. package/build/modern/usePrefetchInfiniteQuery.cjs +1 -2
  252. package/build/modern/usePrefetchInfiniteQuery.d.cts +0 -2
  253. package/build/modern/usePrefetchInfiniteQuery.d.cts.map +1 -1
  254. package/build/modern/usePrefetchInfiniteQuery.d.ts +0 -2
  255. package/build/modern/usePrefetchInfiniteQuery.d.ts.map +1 -1
  256. package/build/modern/usePrefetchInfiniteQuery.js +1 -2
  257. package/build/modern/usePrefetchQuery.cjs +1 -2
  258. package/build/modern/usePrefetchQuery.d.cts +0 -2
  259. package/build/modern/usePrefetchQuery.d.cts.map +1 -1
  260. package/build/modern/usePrefetchQuery.d.ts +0 -2
  261. package/build/modern/usePrefetchQuery.d.ts.map +1 -1
  262. package/build/modern/usePrefetchQuery.js +1 -2
  263. package/build/modern/useQueries.cjs +2 -3
  264. package/build/modern/useQueries.d.cts +0 -2
  265. package/build/modern/useQueries.d.cts.map +1 -1
  266. package/build/modern/useQueries.d.ts +0 -2
  267. package/build/modern/useQueries.d.ts.map +1 -1
  268. package/build/modern/useQueries.js +1 -2
  269. package/build/modern/useQuery.cjs +1 -2
  270. package/build/modern/useQuery.cjs.map +1 -1
  271. package/build/modern/useQuery.d.cts +5 -7
  272. package/build/modern/useQuery.d.cts.map +1 -1
  273. package/build/modern/useQuery.d.ts +5 -7
  274. package/build/modern/useQuery.d.ts.map +1 -1
  275. package/build/modern/useQuery.js +1 -2
  276. package/build/modern/useQuery.js.map +1 -1
  277. package/build/modern/useSuspenseInfiniteQuery.cjs +1 -2
  278. package/build/modern/useSuspenseInfiniteQuery.d.cts +0 -2
  279. package/build/modern/useSuspenseInfiniteQuery.d.cts.map +1 -1
  280. package/build/modern/useSuspenseInfiniteQuery.d.ts +0 -2
  281. package/build/modern/useSuspenseInfiniteQuery.d.ts.map +1 -1
  282. package/build/modern/useSuspenseInfiniteQuery.js +1 -2
  283. package/build/modern/useSuspenseQueries.cjs +1 -2
  284. package/build/modern/useSuspenseQueries.d.cts +0 -2
  285. package/build/modern/useSuspenseQueries.d.cts.map +1 -1
  286. package/build/modern/useSuspenseQueries.d.ts +0 -2
  287. package/build/modern/useSuspenseQueries.d.ts.map +1 -1
  288. package/build/modern/useSuspenseQueries.js +1 -2
  289. package/build/modern/useSuspenseQuery.cjs +1 -2
  290. package/build/modern/useSuspenseQuery.d.cts +0 -2
  291. package/build/modern/useSuspenseQuery.d.cts.map +1 -1
  292. package/build/modern/useSuspenseQuery.d.ts +0 -2
  293. package/build/modern/useSuspenseQuery.d.ts.map +1 -1
  294. package/build/modern/useSuspenseQuery.js +1 -2
  295. package/package.json +8 -8
  296. package/src/HydrationBoundary.tsx +1 -1
  297. package/src/infiniteQueryOptions.ts +15 -14
  298. package/src/queryOptions.ts +16 -13
  299. package/src/useInfiniteQuery.ts +2 -2
  300. package/src/useIsFetching.ts +1 -1
  301. package/src/useQuery.ts +5 -5
@@ -1,13 +1,12 @@
1
1
  import { DefinedUseInfiniteQueryResult, UseInfiniteQueryOptions, UseInfiniteQueryResult } from "./types.cjs";
2
2
  import { DefinedInitialDataInfiniteOptions, UndefinedInitialDataInfiniteOptions } from "./infiniteQueryOptions.cjs";
3
3
  import { DefaultError, InfiniteData, QueryClient, QueryKey } from "@tanstack/query-core";
4
- //#region src/useInfiniteQuery.d.ts
5
4
  /**
6
5
  * The options for `useInfiniteQuery` are identical to `useQuery`, with the addition of
7
6
  * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.
8
7
  *
9
- * This overload is selected when `initialData` is set.
10
- * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to `useInfiniteQuery`, with `initialData` set.
8
+ * This overload is selected when `initialData` is known to be defined.
9
+ * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to `useInfiniteQuery`, with `initialData` known to be defined.
11
10
  * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will
12
11
  * be used.
13
12
  * @returns The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchPreviousPage`,
@@ -288,5 +287,4 @@ export declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TD
288
287
  * ```
289
288
  */
290
289
  export 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>;
291
- //#endregion
292
290
  //# sourceMappingURL=useInfiniteQuery.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useInfiniteQuery.d.cts","names":[],"sources":["../../src/useInfiniteQuery.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA8DgB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,kCACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,8BAA8B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA4GxB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,oCACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,uBAAuB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAyIjB,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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA8DgB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,kCACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,8BAA8B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA4GxB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,oCACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,uBAAuB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAyIjB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,wBACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,uBAAuB,OAAO"}
@@ -1,13 +1,12 @@
1
1
  import { DefinedUseInfiniteQueryResult, UseInfiniteQueryOptions, UseInfiniteQueryResult } from "./types.js";
2
2
  import { DefinedInitialDataInfiniteOptions, UndefinedInitialDataInfiniteOptions } from "./infiniteQueryOptions.js";
3
3
  import { DefaultError, InfiniteData, QueryClient, QueryKey } from "@tanstack/query-core";
4
- //#region src/useInfiniteQuery.d.ts
5
4
  /**
6
5
  * The options for `useInfiniteQuery` are identical to `useQuery`, with the addition of
7
6
  * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.
8
7
  *
9
- * This overload is selected when `initialData` is set.
10
- * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to `useInfiniteQuery`, with `initialData` set.
8
+ * This overload is selected when `initialData` is known to be defined.
9
+ * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to `useInfiniteQuery`, with `initialData` known to be defined.
11
10
  * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will
12
11
  * be used.
13
12
  * @returns The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchPreviousPage`,
@@ -288,5 +287,4 @@ export declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TD
288
287
  * ```
289
288
  */
290
289
  export 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>;
291
- //#endregion
292
290
  //# sourceMappingURL=useInfiniteQuery.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useInfiniteQuery.d.ts","names":[],"sources":["../../src/useInfiniteQuery.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA8DgB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,kCACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,8BAA8B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA4GxB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,oCACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,uBAAuB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAyIjB,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.ts","names":[],"sources":["../../src/useInfiniteQuery.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA8DgB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,kCACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,8BAA8B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA4GxB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,oCACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,uBAAuB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAyIjB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,wBACP,cACA,QACA,OACA,WACA,aAEF,cAAc,cACb,uBAAuB,OAAO"}
@@ -1,11 +1,10 @@
1
1
  "use client";
2
2
  import { useBaseQuery } from "./useBaseQuery.js";
3
3
  import { InfiniteQueryObserver } from "@tanstack/query-core";
4
- //#region src/useInfiniteQuery.ts
4
+ // src/useInfiniteQuery.ts
5
5
  function useInfiniteQuery(options, queryClient) {
6
6
  return useBaseQuery(options, InfiniteQueryObserver, queryClient);
7
7
  }
8
- //#endregion
9
8
  export { useInfiniteQuery };
10
9
 
11
10
  //# sourceMappingURL=useInfiniteQuery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useInfiniteQuery.js","names":[],"sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["'use client'\nimport { InfiniteQueryObserver } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type {\n DefaultError,\n InfiniteData,\n QueryClient,\n QueryKey,\n QueryObserver,\n} from '@tanstack/query-core'\nimport type {\n DefinedUseInfiniteQueryResult,\n UseInfiniteQueryOptions,\n UseInfiniteQueryResult,\n} from './types'\nimport type {\n DefinedInitialDataInfiniteOptions,\n UndefinedInitialDataInfiniteOptions,\n} from './infiniteQueryOptions'\n\n/**\n * The options for `useInfiniteQuery` are identical to `useQuery`, with the addition of\n * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.\n *\n * This overload is selected when `initialData` is set.\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 `fetchNextPage`, `fetchPreviousPage`,\n * `hasNextPage`, `hasPreviousPage`, `isFetchingNextPage`, and `isFetchingPreviousPage`. `data.pages` and\n * `data.pageParams` are also added, as long as a `select` doesn't change `TData` away from its default\n * `InfiniteData<TQueryFnData>` shape.\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 * @example\n * ```tsx\n * import { useInfiniteQuery } from '@tanstack/react-query'\n *\n * function Projects() {\n * // `data` is never `undefined`, thanks to `initialData` — even if a refetch fails, so the\n * // list stays visible alongside the error.\n * const { data, isError, error } = 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 (\n * <div>\n * {isError ? <span>Error: {error.message}</span> : null}\n * <ul>\n * {data.pages.map((page) => page.projects.map((p) => <li key={p.id}>{p.name}</li>))}\n * </ul>\n * </div>\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: 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\n * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.\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 `fetchNextPage`, `fetchPreviousPage`,\n * `hasNextPage`, `hasPreviousPage`, `isFetchingNextPage`, and `isFetchingPreviousPage`. `data.pages` and\n * `data.pageParams` are also added, as long as a `select` doesn't change `TData` away from its default\n * `InfiniteData<TQueryFnData>` shape.\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 * @example\n * Fetching the next page from a \"Load More\" button click:\n * ```tsx\n * import { useInfiniteQuery } from '@tanstack/react-query'\n *\n * function Projects() {\n * const { data, isPending, isError, error, 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 * if (isPending) return 'Loading...'\n * if (isError) return <span>Error: {error.message}</span>\n *\n * return (\n * <>\n * <ul>\n * {data.pages.map((page) =>\n * page.projects.map((project) => <li key={project.id}>{project.name}</li>),\n * )}\n * </ul>\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 * ```\n * @example\n * Fetching the next page automatically as the user scrolls, using an `IntersectionObserver` on a\n * sentinel element after the list:\n * ```tsx\n * import { useInfiniteQuery } from '@tanstack/react-query'\n * import { useEffect, useRef } from 'react'\n *\n * function Projects() {\n * const {\n * data,\n * isPending,\n * isError,\n * error,\n * fetchNextPage,\n * hasNextPage,\n * isFetching,\n * isFetchingNextPage,\n * } = useInfiniteQuery({\n * queryKey: ['projects'],\n * queryFn: ({ pageParam }) => fetchProjects(pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * })\n *\n * const sentinelRef = useRef<HTMLDivElement>(null)\n *\n * useEffect(() => {\n * const sentinel = sentinelRef.current\n * if (sentinel == null || !hasNextPage || isFetching) return\n *\n * const observer = new IntersectionObserver(([entry]) => {\n * if (entry?.isIntersecting) fetchNextPage()\n * })\n * observer.observe(sentinel)\n *\n * return () => observer.disconnect()\n * }, [hasNextPage, isFetching, fetchNextPage])\n *\n * if (isPending) return 'Loading...'\n * if (isError) return <span>Error: {error.message}</span>\n *\n * return (\n * <>\n * <ul>\n * {data.pages.map((page) =>\n * page.projects.map((project) => <li key={project.id}>{project.name}</li>),\n * )}\n * </ul>\n * <div ref={sentinelRef}>{isFetchingNextPage ? 'Loading more...' : null}</div>\n * </>\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\n * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.\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 `fetchNextPage`, `fetchPreviousPage`,\n * `hasNextPage`, `hasPreviousPage`, `isFetchingNextPage`, and `isFetchingPreviousPage`. `data.pages` and\n * `data.pageParams` are also added, as long as a `select` doesn't change `TData` away from its default\n * `InfiniteData<TQueryFnData>` shape.\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 * @example\n * Fetching the next page from a \"Load More\" button click:\n * ```tsx\n * import { useInfiniteQuery } from '@tanstack/react-query'\n *\n * function Projects() {\n * const { data, isPending, isError, error, 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 * if (isPending) return 'Loading...'\n * if (isError) return <span>Error: {error.message}</span>\n *\n * return (\n * <>\n * <ul>\n * {data.pages.map((page) =>\n * page.projects.map((project) => <li key={project.id}>{project.name}</li>),\n * )}\n * </ul>\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 * ```\n * @example\n * Fetching the next page automatically as the user scrolls, using an `IntersectionObserver` on a\n * sentinel element after the list:\n * ```tsx\n * import { useInfiniteQuery } from '@tanstack/react-query'\n * import { useEffect, useRef } from 'react'\n *\n * function Projects() {\n * const {\n * data,\n * isPending,\n * isError,\n * error,\n * fetchNextPage,\n * hasNextPage,\n * isFetching,\n * isFetchingNextPage,\n * } = useInfiniteQuery({\n * queryKey: ['projects'],\n * queryFn: ({ pageParam }) => fetchProjects(pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * })\n *\n * const sentinelRef = useRef<HTMLDivElement>(null)\n *\n * useEffect(() => {\n * const sentinel = sentinelRef.current\n * if (sentinel == null || !hasNextPage || isFetching) return\n *\n * const observer = new IntersectionObserver(([entry]) => {\n * if (entry?.isIntersecting) fetchNextPage()\n * })\n * observer.observe(sentinel)\n *\n * return () => observer.disconnect()\n * }, [hasNextPage, isFetching, fetchNextPage])\n *\n * if (isPending) return 'Loading...'\n * if (isError) return <span>Error: {error.message}</span>\n *\n * return (\n * <>\n * <ul>\n * {data.pages.map((page) =>\n * page.projects.map((project) => <li key={project.id}>{project.name}</li>),\n * )}\n * </ul>\n * <div ref={sentinelRef}>{isFetchingNextPage ? 'Loading more...' : null}</div>\n * </>\n * )\n * }\n * ```\n * @example\n * A query that's disabled, type safe, until `postId` is set — pass `skipToken` as `queryFn`\n * instead of setting `enabled: false`:\n * ```tsx\n * import { skipToken, useInfiniteQuery } from '@tanstack/react-query'\n *\n * function Comments({ postId }: { postId: string | undefined }) {\n * // Use `isLoading`, not `isPending`, so the loading state doesn't show while the query is disabled.\n * const { data, isLoading, isError, error } = useInfiniteQuery({\n * queryKey: ['post', postId, 'comments'],\n * queryFn:\n * postId != null\n * ? ({ pageParam }) => fetchComments(postId, pageParam)\n * : skipToken,\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * })\n *\n * if (postId == null) return 'Select a post'\n * if (isLoading) return 'Loading...'\n * if (isError) return <span>Error: {error.message}</span>\n *\n * return (\n * <ul>\n * {data?.pages.map((page) => page.comments.map((c) => <li key={c.id}>{c.text}</li>))}\n * </ul>\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":";;;;AAkWA,SAAgB,iBACd,SACA,aACA;CACA,OAAO,aACL,SACA,uBACA,WACF;AACF"}
1
+ {"version":3,"file":"useInfiniteQuery.js","names":[],"sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["'use client'\nimport { InfiniteQueryObserver } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type {\n DefaultError,\n InfiniteData,\n QueryClient,\n QueryKey,\n QueryObserver,\n} from '@tanstack/query-core'\nimport type {\n DefinedUseInfiniteQueryResult,\n UseInfiniteQueryOptions,\n UseInfiniteQueryResult,\n} from './types'\nimport type {\n DefinedInitialDataInfiniteOptions,\n UndefinedInitialDataInfiniteOptions,\n} from './infiniteQueryOptions'\n\n/**\n * The options for `useInfiniteQuery` are identical to `useQuery`, with the addition of\n * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.\n *\n * This overload is selected when `initialData` is known to be defined.\n * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to `useInfiniteQuery`, with `initialData` known to be defined.\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 `fetchNextPage`, `fetchPreviousPage`,\n * `hasNextPage`, `hasPreviousPage`, `isFetchingNextPage`, and `isFetchingPreviousPage`. `data.pages` and\n * `data.pageParams` are also added, as long as a `select` doesn't change `TData` away from its default\n * `InfiniteData<TQueryFnData>` shape.\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 * @example\n * ```tsx\n * import { useInfiniteQuery } from '@tanstack/react-query'\n *\n * function Projects() {\n * // `data` is never `undefined`, thanks to `initialData` — even if a refetch fails, so the\n * // list stays visible alongside the error.\n * const { data, isError, error } = 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 (\n * <div>\n * {isError ? <span>Error: {error.message}</span> : null}\n * <ul>\n * {data.pages.map((page) => page.projects.map((p) => <li key={p.id}>{p.name}</li>))}\n * </ul>\n * </div>\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: 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\n * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.\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 `fetchNextPage`, `fetchPreviousPage`,\n * `hasNextPage`, `hasPreviousPage`, `isFetchingNextPage`, and `isFetchingPreviousPage`. `data.pages` and\n * `data.pageParams` are also added, as long as a `select` doesn't change `TData` away from its default\n * `InfiniteData<TQueryFnData>` shape.\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 * @example\n * Fetching the next page from a \"Load More\" button click:\n * ```tsx\n * import { useInfiniteQuery } from '@tanstack/react-query'\n *\n * function Projects() {\n * const { data, isPending, isError, error, 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 * if (isPending) return 'Loading...'\n * if (isError) return <span>Error: {error.message}</span>\n *\n * return (\n * <>\n * <ul>\n * {data.pages.map((page) =>\n * page.projects.map((project) => <li key={project.id}>{project.name}</li>),\n * )}\n * </ul>\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 * ```\n * @example\n * Fetching the next page automatically as the user scrolls, using an `IntersectionObserver` on a\n * sentinel element after the list:\n * ```tsx\n * import { useInfiniteQuery } from '@tanstack/react-query'\n * import { useEffect, useRef } from 'react'\n *\n * function Projects() {\n * const {\n * data,\n * isPending,\n * isError,\n * error,\n * fetchNextPage,\n * hasNextPage,\n * isFetching,\n * isFetchingNextPage,\n * } = useInfiniteQuery({\n * queryKey: ['projects'],\n * queryFn: ({ pageParam }) => fetchProjects(pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * })\n *\n * const sentinelRef = useRef<HTMLDivElement>(null)\n *\n * useEffect(() => {\n * const sentinel = sentinelRef.current\n * if (sentinel == null || !hasNextPage || isFetching) return\n *\n * const observer = new IntersectionObserver(([entry]) => {\n * if (entry?.isIntersecting) fetchNextPage()\n * })\n * observer.observe(sentinel)\n *\n * return () => observer.disconnect()\n * }, [hasNextPage, isFetching, fetchNextPage])\n *\n * if (isPending) return 'Loading...'\n * if (isError) return <span>Error: {error.message}</span>\n *\n * return (\n * <>\n * <ul>\n * {data.pages.map((page) =>\n * page.projects.map((project) => <li key={project.id}>{project.name}</li>),\n * )}\n * </ul>\n * <div ref={sentinelRef}>{isFetchingNextPage ? 'Loading more...' : null}</div>\n * </>\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\n * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.\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 `fetchNextPage`, `fetchPreviousPage`,\n * `hasNextPage`, `hasPreviousPage`, `isFetchingNextPage`, and `isFetchingPreviousPage`. `data.pages` and\n * `data.pageParams` are also added, as long as a `select` doesn't change `TData` away from its default\n * `InfiniteData<TQueryFnData>` shape.\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 * @example\n * Fetching the next page from a \"Load More\" button click:\n * ```tsx\n * import { useInfiniteQuery } from '@tanstack/react-query'\n *\n * function Projects() {\n * const { data, isPending, isError, error, 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 * if (isPending) return 'Loading...'\n * if (isError) return <span>Error: {error.message}</span>\n *\n * return (\n * <>\n * <ul>\n * {data.pages.map((page) =>\n * page.projects.map((project) => <li key={project.id}>{project.name}</li>),\n * )}\n * </ul>\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 * ```\n * @example\n * Fetching the next page automatically as the user scrolls, using an `IntersectionObserver` on a\n * sentinel element after the list:\n * ```tsx\n * import { useInfiniteQuery } from '@tanstack/react-query'\n * import { useEffect, useRef } from 'react'\n *\n * function Projects() {\n * const {\n * data,\n * isPending,\n * isError,\n * error,\n * fetchNextPage,\n * hasNextPage,\n * isFetching,\n * isFetchingNextPage,\n * } = useInfiniteQuery({\n * queryKey: ['projects'],\n * queryFn: ({ pageParam }) => fetchProjects(pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * })\n *\n * const sentinelRef = useRef<HTMLDivElement>(null)\n *\n * useEffect(() => {\n * const sentinel = sentinelRef.current\n * if (sentinel == null || !hasNextPage || isFetching) return\n *\n * const observer = new IntersectionObserver(([entry]) => {\n * if (entry?.isIntersecting) fetchNextPage()\n * })\n * observer.observe(sentinel)\n *\n * return () => observer.disconnect()\n * }, [hasNextPage, isFetching, fetchNextPage])\n *\n * if (isPending) return 'Loading...'\n * if (isError) return <span>Error: {error.message}</span>\n *\n * return (\n * <>\n * <ul>\n * {data.pages.map((page) =>\n * page.projects.map((project) => <li key={project.id}>{project.name}</li>),\n * )}\n * </ul>\n * <div ref={sentinelRef}>{isFetchingNextPage ? 'Loading more...' : null}</div>\n * </>\n * )\n * }\n * ```\n * @example\n * A query that's disabled, type safe, until `postId` is set — pass `skipToken` as `queryFn`\n * instead of setting `enabled: false`:\n * ```tsx\n * import { skipToken, useInfiniteQuery } from '@tanstack/react-query'\n *\n * function Comments({ postId }: { postId: string | undefined }) {\n * // Use `isLoading`, not `isPending`, so the loading state doesn't show while the query is disabled.\n * const { data, isLoading, isError, error } = useInfiniteQuery({\n * queryKey: ['post', postId, 'comments'],\n * queryFn:\n * postId != null\n * ? ({ pageParam }) => fetchComments(postId, pageParam)\n * : skipToken,\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * })\n *\n * if (postId == null) return 'Select a post'\n * if (isLoading) return 'Loading...'\n * if (isError) return <span>Error: {error.message}</span>\n *\n * return (\n * <ul>\n * {data?.pages.map((page) => page.comments.map((c) => <li key={c.id}>{c.text}</li>))}\n * </ul>\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":";;;;AAkWA,SAAgB,iBACd,SACA,aACA;CACA,OAAO,aACL,SACA,uBACA,WACF;AACF"}
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
3
+ const require_rolldown_runtime = require("./rolldown-runtime-CmQyd0Gu.cjs");
4
4
  const require_QueryClientProvider = require("./QueryClientProvider.cjs");
5
5
  let react = require("react");
6
6
  react = require_rolldown_runtime.__toESM(react, 1);
7
7
  let _tanstack_query_core = require("@tanstack/query-core");
8
- //#region src/useIsFetching.ts
8
+ // src/useIsFetching.ts
9
9
  /**
10
10
  * The `useIsFetching` hook returns the `number` of the queries that your application is loading or fetching in
11
11
  * the background (useful for app-wide loading indicators).
@@ -44,7 +44,6 @@ function useIsFetching(filters, queryClient) {
44
44
  const queryCache = client.getQueryCache();
45
45
  return react.useSyncExternalStore(react.useCallback((onStoreChange) => queryCache.subscribe(_tanstack_query_core.notifyManager.batchCalls(onStoreChange)), [queryCache]), () => client.isFetching(filters), () => client.isFetching(filters));
46
46
  }
47
- //#endregion
48
47
  exports.useIsFetching = useIsFetching;
49
48
 
50
49
  //# sourceMappingURL=useIsFetching.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"useIsFetching.cjs","names":["useQueryClient","React","notifyManager"],"sources":["../../src/useIsFetching.ts"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { notifyManager } from '@tanstack/query-core'\n\nimport { useQueryClient } from './QueryClientProvider'\nimport type { QueryClient, QueryFilters } from '@tanstack/query-core'\n\n/**\n * The `useIsFetching` hook returns the `number` of the queries that your application is loading or fetching in\n * the background (useful for app-wide loading indicators).\n * @param filters - The {@link QueryFilters} to narrow down the matched queries.\n * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will\n * be used.\n * @returns Will be the `number` of the queries that your application is currently loading or fetching in the\n * background.\n * @example\n * ```tsx\n * import { useIsFetching } from '@tanstack/react-query'\n *\n * function PostsFetchingIndicator() {\n * // How many queries matching the posts prefix are fetching?\n * const isFetchingPosts = useIsFetching({ queryKey: ['posts'] })\n *\n * return isFetchingPosts ? <span>Refreshing posts...</span> : null\n * }\n * ```\n * @example\n * A global loading indicator for any query fetching in the background, not just the ones on screen:\n * ```tsx\n * import { useIsFetching } from '@tanstack/react-query'\n *\n * function GlobalLoadingIndicator() {\n * const isFetching = useIsFetching()\n *\n * return isFetching ? (\n * <div>Queries are fetching in the background...</div>\n * ) : null\n * }\n * ```\n */\nexport function useIsFetching(\n filters?: QueryFilters,\n queryClient?: QueryClient,\n): number {\n const client = useQueryClient(queryClient)\n const queryCache = client.getQueryCache()\n\n return React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n queryCache.subscribe(notifyManager.batchCalls(onStoreChange)),\n [queryCache],\n ),\n () => client.isFetching(filters),\n () => client.isFetching(filters),\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,SAAgB,cACd,SACA,aACQ;CACR,MAAM,SAASA,4BAAAA,eAAe,WAAW;CACzC,MAAM,aAAa,OAAO,cAAc;CAExC,OAAOC,MAAM,qBACXA,MAAM,aACH,kBACC,WAAW,UAAUC,qBAAAA,cAAc,WAAW,aAAa,CAAC,GAC9D,CAAC,UAAU,CACb,SACM,OAAO,WAAW,OAAO,SACzB,OAAO,WAAW,OAAO,CACjC;AACF"}
1
+ {"version":3,"file":"useIsFetching.cjs","names":["useQueryClient","React","notifyManager"],"sources":["../../src/useIsFetching.ts"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { notifyManager } from '@tanstack/query-core'\n\nimport { useQueryClient } from './QueryClientProvider'\nimport type { QueryClient, QueryFilters } from '@tanstack/query-core'\n\n/**\n * The `useIsFetching` hook returns the `number` of the queries that your application is loading or fetching in\n * the background (useful for app-wide loading indicators).\n * @param filters - The {@link QueryFilters} to narrow down the matched queries.\n * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will\n * be used.\n * @returns Will be the `number` of the queries that your application is currently loading or fetching in the\n * background.\n * @example\n * ```tsx\n * import { useIsFetching } from '@tanstack/react-query'\n *\n * function PostsFetchingIndicator() {\n * // How many queries matching the posts prefix are fetching?\n * const isFetchingPosts = useIsFetching({ queryKey: ['posts'] })\n *\n * return isFetchingPosts ? <span>Refreshing posts...</span> : null\n * }\n * ```\n * @example\n * A global loading indicator for any query fetching in the background, not just the ones on screen:\n * ```tsx\n * import { useIsFetching } from '@tanstack/react-query'\n *\n * function GlobalLoadingIndicator() {\n * const isFetching = useIsFetching()\n *\n * return isFetching ? (\n * <div>Queries are fetching in the background...</div>\n * ) : null\n * }\n * ```\n */\nexport function useIsFetching(\n filters?: Omit<QueryFilters, 'fetchStatus'>,\n queryClient?: QueryClient,\n): number {\n const client = useQueryClient(queryClient)\n const queryCache = client.getQueryCache()\n\n return React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n queryCache.subscribe(notifyManager.batchCalls(onStoreChange)),\n [queryCache],\n ),\n () => client.isFetching(filters),\n () => client.isFetching(filters),\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,SAAgB,cACd,SACA,aACQ;CACR,MAAM,SAASA,4BAAAA,eAAe,WAAW;CACzC,MAAM,aAAa,OAAO,cAAc;CAExC,OAAOC,MAAM,qBACXA,MAAM,aACH,kBACC,WAAW,UAAUC,qBAAAA,cAAc,WAAW,aAAa,CAAC,GAC9D,CAAC,UAAU,CACb,SACM,OAAO,WAAW,OAAO,SACzB,OAAO,WAAW,OAAO,CACjC;AACF"}
@@ -1,5 +1,4 @@
1
1
  import { QueryClient, QueryFilters } from "@tanstack/query-core";
2
- //#region src/useIsFetching.d.ts
3
2
  /**
4
3
  * The `useIsFetching` hook returns the `number` of the queries that your application is loading or fetching in
5
4
  * the background (useful for app-wide loading indicators).
@@ -33,6 +32,5 @@ import { QueryClient, QueryFilters } from "@tanstack/query-core";
33
32
  * }
34
33
  * ```
35
34
  */
36
- export declare function useIsFetching(filters?: QueryFilters, queryClient?: QueryClient): number;
37
- //#endregion
35
+ export declare function useIsFetching(filters?: Omit<QueryFilters, 'fetchStatus'>, queryClient?: QueryClient): number;
38
36
  //# sourceMappingURL=useIsFetching.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useIsFetching.d.cts","names":[],"sources":["../../src/useIsFetching.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAwCgB,cACd,UAAU,cACV,cAAc"}
1
+ {"version":3,"file":"useIsFetching.d.cts","names":[],"sources":["../../src/useIsFetching.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAwCgB,cACd,UAAU,KAAK,8BACf,cAAc"}
@@ -1,5 +1,4 @@
1
1
  import { QueryClient, QueryFilters } from "@tanstack/query-core";
2
- //#region src/useIsFetching.d.ts
3
2
  /**
4
3
  * The `useIsFetching` hook returns the `number` of the queries that your application is loading or fetching in
5
4
  * the background (useful for app-wide loading indicators).
@@ -33,6 +32,5 @@ import { QueryClient, QueryFilters } from "@tanstack/query-core";
33
32
  * }
34
33
  * ```
35
34
  */
36
- export declare function useIsFetching(filters?: QueryFilters, queryClient?: QueryClient): number;
37
- //#endregion
35
+ export declare function useIsFetching(filters?: Omit<QueryFilters, 'fetchStatus'>, queryClient?: QueryClient): number;
38
36
  //# sourceMappingURL=useIsFetching.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useIsFetching.d.ts","names":[],"sources":["../../src/useIsFetching.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAwCgB,cACd,UAAU,cACV,cAAc"}
1
+ {"version":3,"file":"useIsFetching.d.ts","names":[],"sources":["../../src/useIsFetching.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAwCgB,cACd,UAAU,KAAK,8BACf,cAAc"}
@@ -2,7 +2,7 @@
2
2
  import { useQueryClient } from "./QueryClientProvider.js";
3
3
  import * as React from "react";
4
4
  import { notifyManager } from "@tanstack/query-core";
5
- //#region src/useIsFetching.ts
5
+ // src/useIsFetching.ts
6
6
  /**
7
7
  * The `useIsFetching` hook returns the `number` of the queries that your application is loading or fetching in
8
8
  * the background (useful for app-wide loading indicators).
@@ -41,7 +41,6 @@ function useIsFetching(filters, queryClient) {
41
41
  const queryCache = client.getQueryCache();
42
42
  return React.useSyncExternalStore(React.useCallback((onStoreChange) => queryCache.subscribe(notifyManager.batchCalls(onStoreChange)), [queryCache]), () => client.isFetching(filters), () => client.isFetching(filters));
43
43
  }
44
- //#endregion
45
44
  export { useIsFetching };
46
45
 
47
46
  //# sourceMappingURL=useIsFetching.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useIsFetching.js","names":[],"sources":["../../src/useIsFetching.ts"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { notifyManager } from '@tanstack/query-core'\n\nimport { useQueryClient } from './QueryClientProvider'\nimport type { QueryClient, QueryFilters } from '@tanstack/query-core'\n\n/**\n * The `useIsFetching` hook returns the `number` of the queries that your application is loading or fetching in\n * the background (useful for app-wide loading indicators).\n * @param filters - The {@link QueryFilters} to narrow down the matched queries.\n * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will\n * be used.\n * @returns Will be the `number` of the queries that your application is currently loading or fetching in the\n * background.\n * @example\n * ```tsx\n * import { useIsFetching } from '@tanstack/react-query'\n *\n * function PostsFetchingIndicator() {\n * // How many queries matching the posts prefix are fetching?\n * const isFetchingPosts = useIsFetching({ queryKey: ['posts'] })\n *\n * return isFetchingPosts ? <span>Refreshing posts...</span> : null\n * }\n * ```\n * @example\n * A global loading indicator for any query fetching in the background, not just the ones on screen:\n * ```tsx\n * import { useIsFetching } from '@tanstack/react-query'\n *\n * function GlobalLoadingIndicator() {\n * const isFetching = useIsFetching()\n *\n * return isFetching ? (\n * <div>Queries are fetching in the background...</div>\n * ) : null\n * }\n * ```\n */\nexport function useIsFetching(\n filters?: QueryFilters,\n queryClient?: QueryClient,\n): number {\n const client = useQueryClient(queryClient)\n const queryCache = client.getQueryCache()\n\n return React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n queryCache.subscribe(notifyManager.batchCalls(onStoreChange)),\n [queryCache],\n ),\n () => client.isFetching(filters),\n () => client.isFetching(filters),\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,SAAgB,cACd,SACA,aACQ;CACR,MAAM,SAAS,eAAe,WAAW;CACzC,MAAM,aAAa,OAAO,cAAc;CAExC,OAAO,MAAM,qBACX,MAAM,aACH,kBACC,WAAW,UAAU,cAAc,WAAW,aAAa,CAAC,GAC9D,CAAC,UAAU,CACb,SACM,OAAO,WAAW,OAAO,SACzB,OAAO,WAAW,OAAO,CACjC;AACF"}
1
+ {"version":3,"file":"useIsFetching.js","names":[],"sources":["../../src/useIsFetching.ts"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { notifyManager } from '@tanstack/query-core'\n\nimport { useQueryClient } from './QueryClientProvider'\nimport type { QueryClient, QueryFilters } from '@tanstack/query-core'\n\n/**\n * The `useIsFetching` hook returns the `number` of the queries that your application is loading or fetching in\n * the background (useful for app-wide loading indicators).\n * @param filters - The {@link QueryFilters} to narrow down the matched queries.\n * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will\n * be used.\n * @returns Will be the `number` of the queries that your application is currently loading or fetching in the\n * background.\n * @example\n * ```tsx\n * import { useIsFetching } from '@tanstack/react-query'\n *\n * function PostsFetchingIndicator() {\n * // How many queries matching the posts prefix are fetching?\n * const isFetchingPosts = useIsFetching({ queryKey: ['posts'] })\n *\n * return isFetchingPosts ? <span>Refreshing posts...</span> : null\n * }\n * ```\n * @example\n * A global loading indicator for any query fetching in the background, not just the ones on screen:\n * ```tsx\n * import { useIsFetching } from '@tanstack/react-query'\n *\n * function GlobalLoadingIndicator() {\n * const isFetching = useIsFetching()\n *\n * return isFetching ? (\n * <div>Queries are fetching in the background...</div>\n * ) : null\n * }\n * ```\n */\nexport function useIsFetching(\n filters?: Omit<QueryFilters, 'fetchStatus'>,\n queryClient?: QueryClient,\n): number {\n const client = useQueryClient(queryClient)\n const queryCache = client.getQueryCache()\n\n return React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n queryCache.subscribe(notifyManager.batchCalls(onStoreChange)),\n [queryCache],\n ),\n () => client.isFetching(filters),\n () => client.isFetching(filters),\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,SAAgB,cACd,SACA,aACQ;CACR,MAAM,SAAS,eAAe,WAAW;CACzC,MAAM,aAAa,OAAO,cAAc;CAExC,OAAO,MAAM,qBACX,MAAM,aACH,kBACC,WAAW,UAAU,cAAc,WAAW,aAAa,CAAC,GAC9D,CAAC,UAAU,CACb,SACM,OAAO,WAAW,OAAO,SACzB,OAAO,WAAW,OAAO,CACjC;AACF"}
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
3
+ const require_rolldown_runtime = require("./rolldown-runtime-CmQyd0Gu.cjs");
4
4
  const require_QueryClientProvider = require("./QueryClientProvider.cjs");
5
5
  let react = require("react");
6
6
  react = require_rolldown_runtime.__toESM(react, 1);
7
7
  let _tanstack_query_core = require("@tanstack/query-core");
8
- //#region src/useMutation.ts
8
+ // src/useMutation.ts
9
9
  /**
10
10
  * Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects.
11
11
  * `useMutation` is the hook for that.
@@ -191,7 +191,6 @@ function useMutation(options, queryClient) {
191
191
  mutateAsync: result.mutate
192
192
  };
193
193
  }
194
- //#endregion
195
194
  exports.useMutation = useMutation;
196
195
 
197
196
  //# sourceMappingURL=useMutation.cjs.map
@@ -1,6 +1,5 @@
1
1
  import { UseMutationOptions, UseMutationResult } from "./types.cjs";
2
2
  import { DefaultError, QueryClient } from "@tanstack/query-core";
3
- //#region src/useMutation.d.ts
4
3
  /**
5
4
  * Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects.
6
5
  * `useMutation` is the hook for that.
@@ -170,5 +169,4 @@ import { DefaultError, QueryClient } from "@tanstack/query-core";
170
169
  * ```
171
170
  */
172
171
  export declare function useMutation<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown>(options: UseMutationOptions<TData, TError, TVariables, TOnMutateResult>, queryClient?: QueryClient): UseMutationResult<TData, TError, TVariables, TOnMutateResult>;
173
- //#endregion
174
172
  //# sourceMappingURL=useMutation.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMutation.d.cts","names":[],"sources":["../../src/useMutation.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0LgB,YACd,iBACA,SAAS,cACT,mBACA,2BAEA,SAAS,mBAAmB,OAAO,QAAQ,YAAY,kBACvD,cAAc,cACb,kBAAkB,OAAO,QAAQ,YAAY"}
1
+ {"version":3,"file":"useMutation.d.cts","names":[],"sources":["../../src/useMutation.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0LgB,YACd,iBACA,SAAS,cACT,mBACA,2BAEA,SAAS,mBAAmB,OAAO,QAAQ,YAAY,kBACvD,cAAc,cACb,kBAAkB,OAAO,QAAQ,YAAY"}
@@ -1,6 +1,5 @@
1
1
  import { UseMutationOptions, UseMutationResult } from "./types.js";
2
2
  import { DefaultError, QueryClient } from "@tanstack/query-core";
3
- //#region src/useMutation.d.ts
4
3
  /**
5
4
  * Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects.
6
5
  * `useMutation` is the hook for that.
@@ -170,5 +169,4 @@ import { DefaultError, QueryClient } from "@tanstack/query-core";
170
169
  * ```
171
170
  */
172
171
  export declare function useMutation<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown>(options: UseMutationOptions<TData, TError, TVariables, TOnMutateResult>, queryClient?: QueryClient): UseMutationResult<TData, TError, TVariables, TOnMutateResult>;
173
- //#endregion
174
172
  //# sourceMappingURL=useMutation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMutation.d.ts","names":[],"sources":["../../src/useMutation.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0LgB,YACd,iBACA,SAAS,cACT,mBACA,2BAEA,SAAS,mBAAmB,OAAO,QAAQ,YAAY,kBACvD,cAAc,cACb,kBAAkB,OAAO,QAAQ,YAAY"}
1
+ {"version":3,"file":"useMutation.d.ts","names":[],"sources":["../../src/useMutation.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0LgB,YACd,iBACA,SAAS,cACT,mBACA,2BAEA,SAAS,mBAAmB,OAAO,QAAQ,YAAY,kBACvD,cAAc,cACb,kBAAkB,OAAO,QAAQ,YAAY"}
@@ -2,7 +2,7 @@
2
2
  import { useQueryClient } from "./QueryClientProvider.js";
3
3
  import * as React from "react";
4
4
  import { MutationObserver, noop, notifyManager, shouldThrowError } from "@tanstack/query-core";
5
- //#region src/useMutation.ts
5
+ // src/useMutation.ts
6
6
  /**
7
7
  * Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects.
8
8
  * `useMutation` is the hook for that.
@@ -188,7 +188,6 @@ function useMutation(options, queryClient) {
188
188
  mutateAsync: result.mutate
189
189
  };
190
190
  }
191
- //#endregion
192
191
  export { useMutation };
193
192
 
194
193
  //# sourceMappingURL=useMutation.js.map
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
3
+ const require_rolldown_runtime = require("./rolldown-runtime-CmQyd0Gu.cjs");
4
4
  const require_QueryClientProvider = require("./QueryClientProvider.cjs");
5
5
  let react = require("react");
6
6
  react = require_rolldown_runtime.__toESM(react, 1);
7
7
  let _tanstack_query_core = require("@tanstack/query-core");
8
- //#region src/useMutationState.ts
8
+ // src/useMutationState.ts
9
9
  /**
10
10
  * The `useIsMutating` hook returns the `number` of mutations that your application currently has `pending`
11
11
  * (useful for app-wide loading indicators).
@@ -130,7 +130,6 @@ function useMutationState(options = {}, queryClient) {
130
130
  const getSnapshot = createSnapshot(mutationCache, options);
131
131
  return react.useSyncExternalStore(react.useCallback((onStoreChange) => mutationCache.subscribe(_tanstack_query_core.notifyManager.batchCalls(onStoreChange)), [mutationCache]), getSnapshot, getSnapshot);
132
132
  }
133
- //#endregion
134
133
  exports.useIsMutating = useIsMutating;
135
134
  exports.useMutationState = useMutationState;
136
135
 
@@ -1,5 +1,4 @@
1
1
  import { Mutation, MutationFilters, MutationState, QueryClient } from "@tanstack/query-core";
2
- //#region src/useMutationState.d.ts
3
2
  /**
4
3
  * The `useIsMutating` hook returns the `number` of mutations that your application currently has `pending`
5
4
  * (useful for app-wide loading indicators).
@@ -95,5 +94,4 @@ type MutationStateOptions<TResult = MutationState, TMutation extends Mutation<an
95
94
  * ```
96
95
  */
97
96
  export declare function useMutationState<TResult = MutationState, TMutation extends Mutation<any, any, any, any> = MutationTypeFromResult<TResult>>(options?: MutationStateOptions<TResult, TMutation>, queryClient?: QueryClient): Array<TResult>;
98
- //#endregion
99
97
  //# sourceMappingURL=useMutationState.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMutationState.d.cts","names":[],"sources":["../../src/useMutationState.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;wBAgCgB,cACd,UAAU,iBACV,cAAc;KASX,uBAAuB,YAAY,kBACtC,oBACQ,aACA,cACA,kBACA,oBAGN,SAAS,OAAO,QAAQ,YAAY,mBACpC;KAEC,qBACH,UAAU,eACV,kBAAkB,+BAChB,uBAAuB;EAEzB,UAAU;EACV,UAAU,UAAU,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0HpB,iBACd,UAAU,eACV,kBAAkB,+BAChB,uBAAuB,UAEzB,UAAS,qBAAqB,SAAS,YACvC,cAAc,cACb,MAAM"}
1
+ {"version":3,"file":"useMutationState.d.cts","names":[],"sources":["../../src/useMutationState.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;wBAgCgB,cACd,UAAU,iBACV,cAAc;KASX,uBAAuB,YAAY,kBACtC,oBACQ,aACA,cACA,kBACA,oBAGN,SAAS,OAAO,QAAQ,YAAY,mBACpC;KAEC,qBACH,UAAU,eACV,kBAAkB,+BAChB,uBAAuB;EAEzB,UAAU;EACV,UAAU,UAAU,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0HpB,iBACd,UAAU,eACV,kBAAkB,+BAChB,uBAAuB,UAEzB,UAAS,qBAAqB,SAAS,YACvC,cAAc,cACb,MAAM"}
@@ -1,5 +1,4 @@
1
1
  import { Mutation, MutationFilters, MutationState, QueryClient } from "@tanstack/query-core";
2
- //#region src/useMutationState.d.ts
3
2
  /**
4
3
  * The `useIsMutating` hook returns the `number` of mutations that your application currently has `pending`
5
4
  * (useful for app-wide loading indicators).
@@ -95,5 +94,4 @@ type MutationStateOptions<TResult = MutationState, TMutation extends Mutation<an
95
94
  * ```
96
95
  */
97
96
  export declare function useMutationState<TResult = MutationState, TMutation extends Mutation<any, any, any, any> = MutationTypeFromResult<TResult>>(options?: MutationStateOptions<TResult, TMutation>, queryClient?: QueryClient): Array<TResult>;
98
- //#endregion
99
97
  //# sourceMappingURL=useMutationState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMutationState.d.ts","names":[],"sources":["../../src/useMutationState.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;wBAgCgB,cACd,UAAU,iBACV,cAAc;KASX,uBAAuB,YAAY,kBACtC,oBACQ,aACA,cACA,kBACA,oBAGN,SAAS,OAAO,QAAQ,YAAY,mBACpC;KAEC,qBACH,UAAU,eACV,kBAAkB,+BAChB,uBAAuB;EAEzB,UAAU;EACV,UAAU,UAAU,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0HpB,iBACd,UAAU,eACV,kBAAkB,+BAChB,uBAAuB,UAEzB,UAAS,qBAAqB,SAAS,YACvC,cAAc,cACb,MAAM"}
1
+ {"version":3,"file":"useMutationState.d.ts","names":[],"sources":["../../src/useMutationState.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;wBAgCgB,cACd,UAAU,iBACV,cAAc;KASX,uBAAuB,YAAY,kBACtC,oBACQ,aACA,cACA,kBACA,oBAGN,SAAS,OAAO,QAAQ,YAAY,mBACpC;KAEC,qBACH,UAAU,eACV,kBAAkB,+BAChB,uBAAuB;EAEzB,UAAU;EACV,UAAU,UAAU,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0HpB,iBACd,UAAU,eACV,kBAAkB,+BAChB,uBAAuB,UAEzB,UAAS,qBAAqB,SAAS,YACvC,cAAc,cACb,MAAM"}
@@ -2,7 +2,7 @@
2
2
  import { useQueryClient } from "./QueryClientProvider.js";
3
3
  import * as React from "react";
4
4
  import { notifyManager, replaceEqualDeep } from "@tanstack/query-core";
5
- //#region src/useMutationState.ts
5
+ // src/useMutationState.ts
6
6
  /**
7
7
  * The `useIsMutating` hook returns the `number` of mutations that your application currently has `pending`
8
8
  * (useful for app-wide loading indicators).
@@ -127,7 +127,6 @@ function useMutationState(options = {}, queryClient) {
127
127
  const getSnapshot = createSnapshot(mutationCache, options);
128
128
  return React.useSyncExternalStore(React.useCallback((onStoreChange) => mutationCache.subscribe(notifyManager.batchCalls(onStoreChange)), [mutationCache]), getSnapshot, getSnapshot);
129
129
  }
130
- //#endregion
131
130
  export { useIsMutating, useMutationState };
132
131
 
133
132
  //# sourceMappingURL=useMutationState.js.map
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_QueryClientProvider = require("./QueryClientProvider.cjs");
3
3
  let _tanstack_query_core = require("@tanstack/query-core");
4
- //#region src/usePrefetchInfiniteQuery.tsx
4
+ // src/usePrefetchInfiniteQuery.tsx
5
5
  /**
6
6
  * `usePrefetchInfiniteQuery` does not return anything, it should be used just to fire a prefetch during render,
7
7
  * before a suspense boundary that wraps a component that uses `useSuspenseInfiniteQuery`. You can pass
@@ -47,7 +47,6 @@ function usePrefetchInfiniteQuery(options, queryClient) {
47
47
  const client = require_QueryClientProvider.useQueryClient(queryClient);
48
48
  if (!client.getQueryState(options.queryKey)) client.infiniteQuery(options).catch(_tanstack_query_core.noop);
49
49
  }
50
- //#endregion
51
50
  exports.usePrefetchInfiniteQuery = usePrefetchInfiniteQuery;
52
51
 
53
52
  //# sourceMappingURL=usePrefetchInfiniteQuery.cjs.map
@@ -1,6 +1,5 @@
1
1
  import { UsePrefetchInfiniteQueryOptions } from "./types.cjs";
2
2
  import { DefaultError, InfiniteData, QueryClient, QueryKey } from "@tanstack/query-core";
3
- //#region src/usePrefetchInfiniteQuery.d.ts
4
3
  /**
5
4
  * `usePrefetchInfiniteQuery` does not return anything, it should be used just to fire a prefetch during render,
6
5
  * before a suspense boundary that wraps a component that uses `useSuspenseInfiniteQuery`. You can pass
@@ -43,5 +42,4 @@ import { DefaultError, InfiniteData, QueryClient, QueryKey } from "@tanstack/que
43
42
  * ```
44
43
  */
45
44
  export declare function usePrefetchInfiniteQuery<TQueryFnData = unknown, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UsePrefetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: QueryClient): void;
46
- //#endregion
47
45
  //# sourceMappingURL=usePrefetchInfiniteQuery.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePrefetchInfiniteQuery.d.cts","names":[],"sources":["../../src/usePrefetchInfiniteQuery.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAoDgB,yBACd,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,gCACP,cACA,QACA,OACA,WACA,aAEF,cAAc"}
1
+ {"version":3,"file":"usePrefetchInfiniteQuery.d.cts","names":[],"sources":["../../src/usePrefetchInfiniteQuery.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAoDgB,yBACd,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,gCACP,cACA,QACA,OACA,WACA,aAEF,cAAc"}
@@ -1,6 +1,5 @@
1
1
  import { UsePrefetchInfiniteQueryOptions } from "./types.js";
2
2
  import { DefaultError, InfiniteData, QueryClient, QueryKey } from "@tanstack/query-core";
3
- //#region src/usePrefetchInfiniteQuery.d.ts
4
3
  /**
5
4
  * `usePrefetchInfiniteQuery` does not return anything, it should be used just to fire a prefetch during render,
6
5
  * before a suspense boundary that wraps a component that uses `useSuspenseInfiniteQuery`. You can pass
@@ -43,5 +42,4 @@ import { DefaultError, InfiniteData, QueryClient, QueryKey } from "@tanstack/que
43
42
  * ```
44
43
  */
45
44
  export declare function usePrefetchInfiniteQuery<TQueryFnData = unknown, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UsePrefetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: QueryClient): void;
46
- //#endregion
47
45
  //# sourceMappingURL=usePrefetchInfiniteQuery.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePrefetchInfiniteQuery.d.ts","names":[],"sources":["../../src/usePrefetchInfiniteQuery.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAoDgB,yBACd,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,gCACP,cACA,QACA,OACA,WACA,aAEF,cAAc"}
1
+ {"version":3,"file":"usePrefetchInfiniteQuery.d.ts","names":[],"sources":["../../src/usePrefetchInfiniteQuery.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAoDgB,yBACd,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,gCACP,cACA,QACA,OACA,WACA,aAEF,cAAc"}
@@ -1,6 +1,6 @@
1
1
  import { useQueryClient } from "./QueryClientProvider.js";
2
2
  import { noop } from "@tanstack/query-core";
3
- //#region src/usePrefetchInfiniteQuery.tsx
3
+ // src/usePrefetchInfiniteQuery.tsx
4
4
  /**
5
5
  * `usePrefetchInfiniteQuery` does not return anything, it should be used just to fire a prefetch during render,
6
6
  * before a suspense boundary that wraps a component that uses `useSuspenseInfiniteQuery`. You can pass
@@ -46,7 +46,6 @@ function usePrefetchInfiniteQuery(options, queryClient) {
46
46
  const client = useQueryClient(queryClient);
47
47
  if (!client.getQueryState(options.queryKey)) client.infiniteQuery(options).catch(noop);
48
48
  }
49
- //#endregion
50
49
  export { usePrefetchInfiniteQuery };
51
50
 
52
51
  //# sourceMappingURL=usePrefetchInfiniteQuery.js.map
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_QueryClientProvider = require("./QueryClientProvider.cjs");
3
3
  let _tanstack_query_core = require("@tanstack/query-core");
4
- //#region src/usePrefetchQuery.tsx
4
+ // src/usePrefetchQuery.tsx
5
5
  /**
6
6
  * `usePrefetchQuery` does not return anything, it should be used just to fire a prefetch during render, before
7
7
  * a suspense boundary that wraps a component that uses `useSuspenseQuery`. You can pass everything to
@@ -38,7 +38,6 @@ function usePrefetchQuery(options, queryClient) {
38
38
  const client = require_QueryClientProvider.useQueryClient(queryClient);
39
39
  if (!client.getQueryState(options.queryKey)) client.query(options).catch(_tanstack_query_core.noop);
40
40
  }
41
- //#endregion
42
41
  exports.usePrefetchQuery = usePrefetchQuery;
43
42
 
44
43
  //# sourceMappingURL=usePrefetchQuery.cjs.map
@@ -1,6 +1,5 @@
1
1
  import { UsePrefetchQueryOptions } from "./types.cjs";
2
2
  import { DefaultError, QueryClient, QueryKey } from "@tanstack/query-core";
3
- //#region src/usePrefetchQuery.d.ts
4
3
  /**
5
4
  * `usePrefetchQuery` does not return anything, it should be used just to fire a prefetch during render, before
6
5
  * a suspense boundary that wraps a component that uses `useSuspenseQuery`. You can pass everything to
@@ -34,5 +33,4 @@ import { DefaultError, QueryClient, QueryKey } from "@tanstack/query-core";
34
33
  * ```
35
34
  */
36
35
  export declare function usePrefetchQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UsePrefetchQueryOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, queryClient?: QueryClient): void;
37
- //#endregion
38
36
  //# sourceMappingURL=usePrefetchQuery.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePrefetchQuery.d.cts","names":[],"sources":["../../src/usePrefetchQuery.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsCgB,iBACd,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,UAE7B,SAAS,wBACP,cACA,QACA,OACA,YACA,YAEF,cAAc"}
1
+ {"version":3,"file":"usePrefetchQuery.d.cts","names":[],"sources":["../../src/usePrefetchQuery.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsCgB,iBACd,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,UAE7B,SAAS,wBACP,cACA,QACA,OACA,YACA,YAEF,cAAc"}
@@ -1,6 +1,5 @@
1
1
  import { UsePrefetchQueryOptions } from "./types.js";
2
2
  import { DefaultError, QueryClient, QueryKey } from "@tanstack/query-core";
3
- //#region src/usePrefetchQuery.d.ts
4
3
  /**
5
4
  * `usePrefetchQuery` does not return anything, it should be used just to fire a prefetch during render, before
6
5
  * a suspense boundary that wraps a component that uses `useSuspenseQuery`. You can pass everything to
@@ -34,5 +33,4 @@ import { DefaultError, QueryClient, QueryKey } from "@tanstack/query-core";
34
33
  * ```
35
34
  */
36
35
  export declare function usePrefetchQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UsePrefetchQueryOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, queryClient?: QueryClient): void;
37
- //#endregion
38
36
  //# sourceMappingURL=usePrefetchQuery.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePrefetchQuery.d.ts","names":[],"sources":["../../src/usePrefetchQuery.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsCgB,iBACd,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,UAE7B,SAAS,wBACP,cACA,QACA,OACA,YACA,YAEF,cAAc"}
1
+ {"version":3,"file":"usePrefetchQuery.d.ts","names":[],"sources":["../../src/usePrefetchQuery.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsCgB,iBACd,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,UAE7B,SAAS,wBACP,cACA,QACA,OACA,YACA,YAEF,cAAc"}
@@ -1,6 +1,6 @@
1
1
  import { useQueryClient } from "./QueryClientProvider.js";
2
2
  import { noop } from "@tanstack/query-core";
3
- //#region src/usePrefetchQuery.tsx
3
+ // src/usePrefetchQuery.tsx
4
4
  /**
5
5
  * `usePrefetchQuery` does not return anything, it should be used just to fire a prefetch during render, before
6
6
  * a suspense boundary that wraps a component that uses `useSuspenseQuery`. You can pass everything to
@@ -37,7 +37,6 @@ function usePrefetchQuery(options, queryClient) {
37
37
  const client = useQueryClient(queryClient);
38
38
  if (!client.getQueryState(options.queryKey)) client.query(options).catch(noop);
39
39
  }
40
- //#endregion
41
40
  export { usePrefetchQuery };
42
41
 
43
42
  //# sourceMappingURL=usePrefetchQuery.js.map
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
3
+ const require_rolldown_runtime = require("./rolldown-runtime-CmQyd0Gu.cjs");
4
4
  const require_QueryClientProvider = require("./QueryClientProvider.cjs");
5
5
  const require_IsRestoringProvider = require("./IsRestoringProvider.cjs");
6
6
  const require_QueryErrorResetBoundary = require("./QueryErrorResetBoundary.cjs");
@@ -9,7 +9,7 @@ const require_suspense = require("./suspense.cjs");
9
9
  let react = require("react");
10
10
  react = require_rolldown_runtime.__toESM(react, 1);
11
11
  let _tanstack_query_core = require("@tanstack/query-core");
12
- //#region src/useQueries.ts
12
+ // src/useQueries.ts
13
13
  /**
14
14
  * The `useQueries` hook can be used to fetch a variable number of queries.
15
15
  *
@@ -193,7 +193,6 @@ function useQueries({ queries, ...options }, queryClient) {
193
193
  if (firstSingleResultWhichShouldThrow) throw firstSingleResultWhichShouldThrow.error;
194
194
  return getCombinedResult(trackResult());
195
195
  }
196
- //#endregion
197
196
  exports.useQueries = useQueries;
198
197
 
199
198
  //# sourceMappingURL=useQueries.cjs.map
@@ -1,6 +1,5 @@
1
1
  import { DefinedUseQueryResult, UseQueryOptions, UseQueryResult } from "./types.cjs";
2
2
  import { DefaultError, OmitKeyof, QueriesPlaceholderDataFunction, QueryClient, QueryFunction, QueryKey, ThrowOnError } from "@tanstack/query-core";
3
- //#region src/useQueries.d.ts
4
3
  type UseQueryOptionsForUseQueries<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = OmitKeyof<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'placeholderData' | 'subscribed'> & {
5
4
  placeholderData?: TQueryFnData | QueriesPlaceholderDataFunction<TQueryFnData>;
6
5
  };
@@ -215,5 +214,4 @@ export declare function useQueries<T extends Array<any>, TCombinedResult = Queri
215
214
  */
216
215
  subscribed?: boolean;
217
216
  }, queryClient?: QueryClient): TCombinedResult;
218
- //#endregion
219
217
  //# sourceMappingURL=useQueries.d.cts.map