@tanstack/react-query 5.105.0 → 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 (296) hide show
  1. package/build/legacy/HydrationBoundary.cjs +2 -3
  2. package/build/legacy/HydrationBoundary.d.cts +0 -2
  3. package/build/legacy/HydrationBoundary.d.cts.map +1 -1
  4. package/build/legacy/HydrationBoundary.d.ts +0 -2
  5. package/build/legacy/HydrationBoundary.d.ts.map +1 -1
  6. package/build/legacy/HydrationBoundary.js +1 -2
  7. package/build/legacy/IsRestoringProvider.cjs +2 -3
  8. package/build/legacy/IsRestoringProvider.d.cts +0 -2
  9. package/build/legacy/IsRestoringProvider.d.cts.map +1 -1
  10. package/build/legacy/IsRestoringProvider.d.ts +0 -2
  11. package/build/legacy/IsRestoringProvider.d.ts.map +1 -1
  12. package/build/legacy/IsRestoringProvider.js +1 -2
  13. package/build/legacy/QueryClientProvider.cjs +2 -3
  14. package/build/legacy/QueryClientProvider.d.cts +0 -2
  15. package/build/legacy/QueryClientProvider.d.cts.map +1 -1
  16. package/build/legacy/QueryClientProvider.d.ts +0 -2
  17. package/build/legacy/QueryClientProvider.d.ts.map +1 -1
  18. package/build/legacy/QueryClientProvider.js +1 -2
  19. package/build/legacy/QueryErrorResetBoundary.cjs +2 -3
  20. package/build/legacy/QueryErrorResetBoundary.d.cts +1 -3
  21. package/build/legacy/QueryErrorResetBoundary.d.cts.map +1 -1
  22. package/build/legacy/QueryErrorResetBoundary.d.ts +1 -3
  23. package/build/legacy/QueryErrorResetBoundary.d.ts.map +1 -1
  24. package/build/legacy/QueryErrorResetBoundary.js +1 -2
  25. package/build/legacy/errorBoundaryUtils.cjs +2 -3
  26. package/build/legacy/errorBoundaryUtils.d.cts +0 -2
  27. package/build/legacy/errorBoundaryUtils.d.cts.map +1 -1
  28. package/build/legacy/errorBoundaryUtils.d.ts +0 -2
  29. package/build/legacy/errorBoundaryUtils.d.ts.map +1 -1
  30. package/build/legacy/errorBoundaryUtils.js +1 -2
  31. package/build/legacy/index.cjs +1 -2
  32. package/build/legacy/index.js +1 -2
  33. package/build/legacy/infiniteQueryOptions.cjs +1 -2
  34. package/build/legacy/infiniteQueryOptions.cjs.map +1 -1
  35. package/build/legacy/infiniteQueryOptions.d.cts +16 -16
  36. package/build/legacy/infiniteQueryOptions.d.cts.map +1 -1
  37. package/build/legacy/infiniteQueryOptions.d.ts +16 -16
  38. package/build/legacy/infiniteQueryOptions.d.ts.map +1 -1
  39. package/build/legacy/infiniteQueryOptions.js +1 -2
  40. package/build/legacy/infiniteQueryOptions.js.map +1 -1
  41. package/build/legacy/mutationOptions.cjs +1 -2
  42. package/build/legacy/mutationOptions.d.cts +0 -2
  43. package/build/legacy/mutationOptions.d.cts.map +1 -1
  44. package/build/legacy/mutationOptions.d.ts +0 -2
  45. package/build/legacy/mutationOptions.d.ts.map +1 -1
  46. package/build/legacy/mutationOptions.js +1 -2
  47. package/build/legacy/queryOptions.cjs +1 -2
  48. package/build/legacy/queryOptions.cjs.map +1 -1
  49. package/build/legacy/queryOptions.d.cts +16 -15
  50. package/build/legacy/queryOptions.d.cts.map +1 -1
  51. package/build/legacy/queryOptions.d.ts +16 -15
  52. package/build/legacy/queryOptions.d.ts.map +1 -1
  53. package/build/legacy/queryOptions.js +1 -2
  54. package/build/legacy/queryOptions.js.map +1 -1
  55. package/build/legacy/{rolldown-runtime-VH7oDXx4.cjs → rolldown-runtime-CmQyd0Gu.cjs} +1 -2
  56. package/build/legacy/suspense.cjs +1 -2
  57. package/build/legacy/suspense.d.cts +0 -2
  58. package/build/legacy/suspense.d.cts.map +1 -1
  59. package/build/legacy/suspense.d.ts +0 -2
  60. package/build/legacy/suspense.d.ts.map +1 -1
  61. package/build/legacy/suspense.js +1 -2
  62. package/build/legacy/types.cjs +1 -2
  63. package/build/legacy/types.d.cts +0 -2
  64. package/build/legacy/types.d.cts.map +1 -1
  65. package/build/legacy/types.d.ts +0 -2
  66. package/build/legacy/types.d.ts.map +1 -1
  67. package/build/legacy/types.js +1 -2
  68. package/build/legacy/useBaseQuery.cjs +2 -3
  69. package/build/legacy/useBaseQuery.d.cts +0 -2
  70. package/build/legacy/useBaseQuery.d.cts.map +1 -1
  71. package/build/legacy/useBaseQuery.d.ts +0 -2
  72. package/build/legacy/useBaseQuery.d.ts.map +1 -1
  73. package/build/legacy/useBaseQuery.js +1 -2
  74. package/build/legacy/useInfiniteQuery.cjs +1 -2
  75. package/build/legacy/useInfiniteQuery.cjs.map +1 -1
  76. package/build/legacy/useInfiniteQuery.d.cts +2 -4
  77. package/build/legacy/useInfiniteQuery.d.cts.map +1 -1
  78. package/build/legacy/useInfiniteQuery.d.ts +2 -4
  79. package/build/legacy/useInfiniteQuery.d.ts.map +1 -1
  80. package/build/legacy/useInfiniteQuery.js +1 -2
  81. package/build/legacy/useInfiniteQuery.js.map +1 -1
  82. package/build/legacy/useIsFetching.cjs +2 -3
  83. package/build/legacy/useIsFetching.cjs.map +1 -1
  84. package/build/legacy/useIsFetching.d.cts +1 -3
  85. package/build/legacy/useIsFetching.d.cts.map +1 -1
  86. package/build/legacy/useIsFetching.d.ts +1 -3
  87. package/build/legacy/useIsFetching.d.ts.map +1 -1
  88. package/build/legacy/useIsFetching.js +1 -2
  89. package/build/legacy/useIsFetching.js.map +1 -1
  90. package/build/legacy/useMutation.cjs +2 -3
  91. package/build/legacy/useMutation.d.cts +0 -2
  92. package/build/legacy/useMutation.d.cts.map +1 -1
  93. package/build/legacy/useMutation.d.ts +0 -2
  94. package/build/legacy/useMutation.d.ts.map +1 -1
  95. package/build/legacy/useMutation.js +1 -2
  96. package/build/legacy/useMutationState.cjs +2 -3
  97. package/build/legacy/useMutationState.d.cts +0 -2
  98. package/build/legacy/useMutationState.d.cts.map +1 -1
  99. package/build/legacy/useMutationState.d.ts +0 -2
  100. package/build/legacy/useMutationState.d.ts.map +1 -1
  101. package/build/legacy/useMutationState.js +1 -2
  102. package/build/legacy/usePrefetchInfiniteQuery.cjs +1 -2
  103. package/build/legacy/usePrefetchInfiniteQuery.d.cts +0 -2
  104. package/build/legacy/usePrefetchInfiniteQuery.d.cts.map +1 -1
  105. package/build/legacy/usePrefetchInfiniteQuery.d.ts +0 -2
  106. package/build/legacy/usePrefetchInfiniteQuery.d.ts.map +1 -1
  107. package/build/legacy/usePrefetchInfiniteQuery.js +1 -2
  108. package/build/legacy/usePrefetchQuery.cjs +1 -2
  109. package/build/legacy/usePrefetchQuery.d.cts +0 -2
  110. package/build/legacy/usePrefetchQuery.d.cts.map +1 -1
  111. package/build/legacy/usePrefetchQuery.d.ts +0 -2
  112. package/build/legacy/usePrefetchQuery.d.ts.map +1 -1
  113. package/build/legacy/usePrefetchQuery.js +1 -2
  114. package/build/legacy/useQueries.cjs +2 -3
  115. package/build/legacy/useQueries.d.cts +0 -2
  116. package/build/legacy/useQueries.d.cts.map +1 -1
  117. package/build/legacy/useQueries.d.ts +0 -2
  118. package/build/legacy/useQueries.d.ts.map +1 -1
  119. package/build/legacy/useQueries.js +1 -2
  120. package/build/legacy/useQuery.cjs +1 -2
  121. package/build/legacy/useQuery.cjs.map +1 -1
  122. package/build/legacy/useQuery.d.cts +5 -7
  123. package/build/legacy/useQuery.d.cts.map +1 -1
  124. package/build/legacy/useQuery.d.ts +5 -7
  125. package/build/legacy/useQuery.d.ts.map +1 -1
  126. package/build/legacy/useQuery.js +1 -2
  127. package/build/legacy/useQuery.js.map +1 -1
  128. package/build/legacy/useSuspenseInfiniteQuery.cjs +1 -2
  129. package/build/legacy/useSuspenseInfiniteQuery.d.cts +0 -2
  130. package/build/legacy/useSuspenseInfiniteQuery.d.cts.map +1 -1
  131. package/build/legacy/useSuspenseInfiniteQuery.d.ts +0 -2
  132. package/build/legacy/useSuspenseInfiniteQuery.d.ts.map +1 -1
  133. package/build/legacy/useSuspenseInfiniteQuery.js +1 -2
  134. package/build/legacy/useSuspenseQueries.cjs +1 -2
  135. package/build/legacy/useSuspenseQueries.d.cts +0 -2
  136. package/build/legacy/useSuspenseQueries.d.cts.map +1 -1
  137. package/build/legacy/useSuspenseQueries.d.ts +0 -2
  138. package/build/legacy/useSuspenseQueries.d.ts.map +1 -1
  139. package/build/legacy/useSuspenseQueries.js +1 -2
  140. package/build/legacy/useSuspenseQuery.cjs +1 -2
  141. package/build/legacy/useSuspenseQuery.d.cts +0 -2
  142. package/build/legacy/useSuspenseQuery.d.cts.map +1 -1
  143. package/build/legacy/useSuspenseQuery.d.ts +0 -2
  144. package/build/legacy/useSuspenseQuery.d.ts.map +1 -1
  145. package/build/legacy/useSuspenseQuery.js +1 -2
  146. package/build/modern/HydrationBoundary.cjs +2 -3
  147. package/build/modern/HydrationBoundary.d.cts +0 -2
  148. package/build/modern/HydrationBoundary.d.cts.map +1 -1
  149. package/build/modern/HydrationBoundary.d.ts +0 -2
  150. package/build/modern/HydrationBoundary.d.ts.map +1 -1
  151. package/build/modern/HydrationBoundary.js +1 -2
  152. package/build/modern/IsRestoringProvider.cjs +2 -3
  153. package/build/modern/IsRestoringProvider.d.cts +0 -2
  154. package/build/modern/IsRestoringProvider.d.cts.map +1 -1
  155. package/build/modern/IsRestoringProvider.d.ts +0 -2
  156. package/build/modern/IsRestoringProvider.d.ts.map +1 -1
  157. package/build/modern/IsRestoringProvider.js +1 -2
  158. package/build/modern/QueryClientProvider.cjs +2 -3
  159. package/build/modern/QueryClientProvider.d.cts +0 -2
  160. package/build/modern/QueryClientProvider.d.cts.map +1 -1
  161. package/build/modern/QueryClientProvider.d.ts +0 -2
  162. package/build/modern/QueryClientProvider.d.ts.map +1 -1
  163. package/build/modern/QueryClientProvider.js +1 -2
  164. package/build/modern/QueryErrorResetBoundary.cjs +2 -3
  165. package/build/modern/QueryErrorResetBoundary.d.cts +1 -3
  166. package/build/modern/QueryErrorResetBoundary.d.cts.map +1 -1
  167. package/build/modern/QueryErrorResetBoundary.d.ts +1 -3
  168. package/build/modern/QueryErrorResetBoundary.d.ts.map +1 -1
  169. package/build/modern/QueryErrorResetBoundary.js +1 -2
  170. package/build/modern/errorBoundaryUtils.cjs +2 -3
  171. package/build/modern/errorBoundaryUtils.d.cts +0 -2
  172. package/build/modern/errorBoundaryUtils.d.cts.map +1 -1
  173. package/build/modern/errorBoundaryUtils.d.ts +0 -2
  174. package/build/modern/errorBoundaryUtils.d.ts.map +1 -1
  175. package/build/modern/errorBoundaryUtils.js +1 -2
  176. package/build/modern/index.cjs +1 -2
  177. package/build/modern/index.js +1 -2
  178. package/build/modern/infiniteQueryOptions.cjs +1 -2
  179. package/build/modern/infiniteQueryOptions.cjs.map +1 -1
  180. package/build/modern/infiniteQueryOptions.d.cts +16 -16
  181. package/build/modern/infiniteQueryOptions.d.cts.map +1 -1
  182. package/build/modern/infiniteQueryOptions.d.ts +16 -16
  183. package/build/modern/infiniteQueryOptions.d.ts.map +1 -1
  184. package/build/modern/infiniteQueryOptions.js +1 -2
  185. package/build/modern/infiniteQueryOptions.js.map +1 -1
  186. package/build/modern/mutationOptions.cjs +1 -2
  187. package/build/modern/mutationOptions.d.cts +0 -2
  188. package/build/modern/mutationOptions.d.cts.map +1 -1
  189. package/build/modern/mutationOptions.d.ts +0 -2
  190. package/build/modern/mutationOptions.d.ts.map +1 -1
  191. package/build/modern/mutationOptions.js +1 -2
  192. package/build/modern/queryOptions.cjs +1 -2
  193. package/build/modern/queryOptions.cjs.map +1 -1
  194. package/build/modern/queryOptions.d.cts +16 -15
  195. package/build/modern/queryOptions.d.cts.map +1 -1
  196. package/build/modern/queryOptions.d.ts +16 -15
  197. package/build/modern/queryOptions.d.ts.map +1 -1
  198. package/build/modern/queryOptions.js +1 -2
  199. package/build/modern/queryOptions.js.map +1 -1
  200. package/build/modern/{rolldown-runtime-VH7oDXx4.cjs → rolldown-runtime-CmQyd0Gu.cjs} +1 -2
  201. package/build/modern/suspense.cjs +1 -2
  202. package/build/modern/suspense.d.cts +0 -2
  203. package/build/modern/suspense.d.cts.map +1 -1
  204. package/build/modern/suspense.d.ts +0 -2
  205. package/build/modern/suspense.d.ts.map +1 -1
  206. package/build/modern/suspense.js +1 -2
  207. package/build/modern/types.cjs +1 -2
  208. package/build/modern/types.d.cts +0 -2
  209. package/build/modern/types.d.cts.map +1 -1
  210. package/build/modern/types.d.ts +0 -2
  211. package/build/modern/types.d.ts.map +1 -1
  212. package/build/modern/types.js +1 -2
  213. package/build/modern/useBaseQuery.cjs +2 -3
  214. package/build/modern/useBaseQuery.d.cts +0 -2
  215. package/build/modern/useBaseQuery.d.cts.map +1 -1
  216. package/build/modern/useBaseQuery.d.ts +0 -2
  217. package/build/modern/useBaseQuery.d.ts.map +1 -1
  218. package/build/modern/useBaseQuery.js +1 -2
  219. package/build/modern/useInfiniteQuery.cjs +1 -2
  220. package/build/modern/useInfiniteQuery.cjs.map +1 -1
  221. package/build/modern/useInfiniteQuery.d.cts +2 -4
  222. package/build/modern/useInfiniteQuery.d.cts.map +1 -1
  223. package/build/modern/useInfiniteQuery.d.ts +2 -4
  224. package/build/modern/useInfiniteQuery.d.ts.map +1 -1
  225. package/build/modern/useInfiniteQuery.js +1 -2
  226. package/build/modern/useInfiniteQuery.js.map +1 -1
  227. package/build/modern/useIsFetching.cjs +2 -3
  228. package/build/modern/useIsFetching.cjs.map +1 -1
  229. package/build/modern/useIsFetching.d.cts +1 -3
  230. package/build/modern/useIsFetching.d.cts.map +1 -1
  231. package/build/modern/useIsFetching.d.ts +1 -3
  232. package/build/modern/useIsFetching.d.ts.map +1 -1
  233. package/build/modern/useIsFetching.js +1 -2
  234. package/build/modern/useIsFetching.js.map +1 -1
  235. package/build/modern/useMutation.cjs +2 -3
  236. package/build/modern/useMutation.d.cts +0 -2
  237. package/build/modern/useMutation.d.cts.map +1 -1
  238. package/build/modern/useMutation.d.ts +0 -2
  239. package/build/modern/useMutation.d.ts.map +1 -1
  240. package/build/modern/useMutation.js +1 -2
  241. package/build/modern/useMutationState.cjs +2 -3
  242. package/build/modern/useMutationState.d.cts +0 -2
  243. package/build/modern/useMutationState.d.cts.map +1 -1
  244. package/build/modern/useMutationState.d.ts +0 -2
  245. package/build/modern/useMutationState.d.ts.map +1 -1
  246. package/build/modern/useMutationState.js +1 -2
  247. package/build/modern/usePrefetchInfiniteQuery.cjs +1 -2
  248. package/build/modern/usePrefetchInfiniteQuery.d.cts +0 -2
  249. package/build/modern/usePrefetchInfiniteQuery.d.cts.map +1 -1
  250. package/build/modern/usePrefetchInfiniteQuery.d.ts +0 -2
  251. package/build/modern/usePrefetchInfiniteQuery.d.ts.map +1 -1
  252. package/build/modern/usePrefetchInfiniteQuery.js +1 -2
  253. package/build/modern/usePrefetchQuery.cjs +1 -2
  254. package/build/modern/usePrefetchQuery.d.cts +0 -2
  255. package/build/modern/usePrefetchQuery.d.cts.map +1 -1
  256. package/build/modern/usePrefetchQuery.d.ts +0 -2
  257. package/build/modern/usePrefetchQuery.d.ts.map +1 -1
  258. package/build/modern/usePrefetchQuery.js +1 -2
  259. package/build/modern/useQueries.cjs +2 -3
  260. package/build/modern/useQueries.d.cts +0 -2
  261. package/build/modern/useQueries.d.cts.map +1 -1
  262. package/build/modern/useQueries.d.ts +0 -2
  263. package/build/modern/useQueries.d.ts.map +1 -1
  264. package/build/modern/useQueries.js +1 -2
  265. package/build/modern/useQuery.cjs +1 -2
  266. package/build/modern/useQuery.cjs.map +1 -1
  267. package/build/modern/useQuery.d.cts +5 -7
  268. package/build/modern/useQuery.d.cts.map +1 -1
  269. package/build/modern/useQuery.d.ts +5 -7
  270. package/build/modern/useQuery.d.ts.map +1 -1
  271. package/build/modern/useQuery.js +1 -2
  272. package/build/modern/useQuery.js.map +1 -1
  273. package/build/modern/useSuspenseInfiniteQuery.cjs +1 -2
  274. package/build/modern/useSuspenseInfiniteQuery.d.cts +0 -2
  275. package/build/modern/useSuspenseInfiniteQuery.d.cts.map +1 -1
  276. package/build/modern/useSuspenseInfiniteQuery.d.ts +0 -2
  277. package/build/modern/useSuspenseInfiniteQuery.d.ts.map +1 -1
  278. package/build/modern/useSuspenseInfiniteQuery.js +1 -2
  279. package/build/modern/useSuspenseQueries.cjs +1 -2
  280. package/build/modern/useSuspenseQueries.d.cts +0 -2
  281. package/build/modern/useSuspenseQueries.d.cts.map +1 -1
  282. package/build/modern/useSuspenseQueries.d.ts +0 -2
  283. package/build/modern/useSuspenseQueries.d.ts.map +1 -1
  284. package/build/modern/useSuspenseQueries.js +1 -2
  285. package/build/modern/useSuspenseQuery.cjs +1 -2
  286. package/build/modern/useSuspenseQuery.d.cts +0 -2
  287. package/build/modern/useSuspenseQuery.d.cts.map +1 -1
  288. package/build/modern/useSuspenseQuery.d.ts +0 -2
  289. package/build/modern/useSuspenseQuery.d.ts.map +1 -1
  290. package/build/modern/useSuspenseQuery.js +1 -2
  291. package/package.json +8 -8
  292. package/src/infiniteQueryOptions.ts +15 -14
  293. package/src/queryOptions.ts +16 -13
  294. package/src/useInfiniteQuery.ts +2 -2
  295. package/src/useIsFetching.ts +1 -1
  296. package/src/useQuery.ts +5 -5
@@ -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/HydrationBoundary.tsx
8
+ // src/HydrationBoundary.tsx
9
9
  /**
10
10
  * `HydrationBoundary` adds a previously dehydrated state into the `queryClient` that would be returned by
11
11
  * `useQueryClient()`. If the client already contains data, the new queries will be intelligently merged based on
@@ -75,7 +75,6 @@ const HydrationBoundary = ({ children, options = {}, state, queryClient }) => {
75
75
  }, [client, hydrationQueue]);
76
76
  return children;
77
77
  };
78
- //#endregion
79
78
  exports.HydrationBoundary = HydrationBoundary;
80
79
 
81
80
  //# sourceMappingURL=HydrationBoundary.cjs.map
@@ -1,6 +1,5 @@
1
1
  import * as React from "react";
2
2
  import { DehydratedState, HydrateOptions, OmitKeyof, QueryClient } from "@tanstack/query-core";
3
- //#region src/HydrationBoundary.d.ts
4
3
  /**
5
4
  * The props accepted by `HydrationBoundary`.
6
5
  */
@@ -70,5 +69,4 @@ export interface HydrationBoundaryProps {
70
69
  * ```
71
70
  */
72
71
  export declare const HydrationBoundary: ({ children, options, state, queryClient }: HydrationBoundaryProps) => React.ReactElement;
73
- //#endregion
74
72
  //# sourceMappingURL=HydrationBoundary.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HydrationBoundary.d.cts","names":[],"sources":["../../src/HydrationBoundary.tsx"],"mappings":";;;;;;iBAeiB;;;;EAIf,OAAO;;;;EAIP,UAAU,UAAU;IAClB,iBAAiB,UACf,QAAQ;;;;;;;;EAUZ,WAAW,MAAM;;;;EAIjB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA6CH,sBAAqB,UAAA,SAAA,OAAA,eAK/B,2BA+EkB,MAAM"}
1
+ {"version":3,"file":"HydrationBoundary.d.cts","names":[],"sources":["../../src/HydrationBoundary.tsx"],"mappings":";;;;;iBAeiB;;;;EAIf,OAAO;;;;EAIP,UAAU,UAAU;IAClB,iBAAiB,UACf,QAAQ;;;;;;;;EAUZ,WAAW,MAAM;;;;EAIjB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA6CH,sBAAqB,UAAA,SAAA,OAAA,eAK/B,2BA+EkB,MAAM"}
@@ -1,6 +1,5 @@
1
1
  import * as React from "react";
2
2
  import { DehydratedState, HydrateOptions, OmitKeyof, QueryClient } from "@tanstack/query-core";
3
- //#region src/HydrationBoundary.d.ts
4
3
  /**
5
4
  * The props accepted by `HydrationBoundary`.
6
5
  */
@@ -70,5 +69,4 @@ export interface HydrationBoundaryProps {
70
69
  * ```
71
70
  */
72
71
  export declare const HydrationBoundary: ({ children, options, state, queryClient }: HydrationBoundaryProps) => React.ReactElement;
73
- //#endregion
74
72
  //# sourceMappingURL=HydrationBoundary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HydrationBoundary.d.ts","names":[],"sources":["../../src/HydrationBoundary.tsx"],"mappings":";;;;;;iBAeiB;;;;EAIf,OAAO;;;;EAIP,UAAU,UAAU;IAClB,iBAAiB,UACf,QAAQ;;;;;;;;EAUZ,WAAW,MAAM;;;;EAIjB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA6CH,sBAAqB,UAAA,SAAA,OAAA,eAK/B,2BA+EkB,MAAM"}
1
+ {"version":3,"file":"HydrationBoundary.d.ts","names":[],"sources":["../../src/HydrationBoundary.tsx"],"mappings":";;;;;iBAeiB;;;;EAIf,OAAO;;;;EAIP,UAAU,UAAU;IAClB,iBAAiB,UACf,QAAQ;;;;;;;;EAUZ,WAAW,MAAM;;;;EAIjB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA6CH,sBAAqB,UAAA,SAAA,OAAA,eAK/B,2BA+EkB,MAAM"}
@@ -2,7 +2,7 @@
2
2
  import { useQueryClient } from "./QueryClientProvider.js";
3
3
  import * as React from "react";
4
4
  import { hydrate } from "@tanstack/query-core";
5
- //#region src/HydrationBoundary.tsx
5
+ // src/HydrationBoundary.tsx
6
6
  /**
7
7
  * `HydrationBoundary` adds a previously dehydrated state into the `queryClient` that would be returned by
8
8
  * `useQueryClient()`. If the client already contains data, the new queries will be intelligently merged based on
@@ -72,7 +72,6 @@ const HydrationBoundary = ({ children, options = {}, state, queryClient }) => {
72
72
  }, [client, hydrationQueue]);
73
73
  return children;
74
74
  };
75
- //#endregion
76
75
  export { HydrationBoundary };
77
76
 
78
77
  //# sourceMappingURL=HydrationBoundary.js.map
@@ -1,9 +1,9 @@
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
  let react = require("react");
5
5
  react = require_rolldown_runtime.__toESM(react, 1);
6
- //#region src/IsRestoringProvider.ts
6
+ // src/IsRestoringProvider.ts
7
7
  const IsRestoringContext = react.createContext(false);
8
8
  /**
9
9
  * If you are using `PersistQueryClientProvider`, you can also use the `useIsRestoring` hook alongside it to
@@ -17,7 +17,6 @@ const useIsRestoring = () => react.useContext(IsRestoringContext);
17
17
  * being restored, read by `useIsRestoring`.
18
18
  */
19
19
  const IsRestoringProvider = IsRestoringContext.Provider;
20
- //#endregion
21
20
  exports.IsRestoringProvider = IsRestoringProvider;
22
21
  exports.useIsRestoring = useIsRestoring;
23
22
 
@@ -1,5 +1,4 @@
1
1
  import * as React from "react";
2
- //#region src/IsRestoringProvider.d.ts
3
2
  /**
4
3
  * If you are using `PersistQueryClientProvider`, you can also use the `useIsRestoring` hook alongside it to
5
4
  * check if a restore is currently in progress. `useQuery` and friends also check this internally to avoid
@@ -12,5 +11,4 @@ export declare const useIsRestoring: () => boolean;
12
11
  * being restored, read by `useIsRestoring`.
13
12
  */
14
13
  export declare const IsRestoringProvider: React.Provider<boolean>;
15
- //#endregion
16
14
  //# sourceMappingURL=IsRestoringProvider.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IsRestoringProvider.d.cts","names":[],"sources":["../../src/IsRestoringProvider.ts"],"mappings":";;;;;;;;qBAWa;;;;;qBAMA,qBAAmB,MAAA"}
1
+ {"version":3,"file":"IsRestoringProvider.d.cts","names":[],"sources":["../../src/IsRestoringProvider.ts"],"mappings":";;;;;;;qBAWa;;;;;qBAMA,qBAAmB,MAAA"}
@@ -1,5 +1,4 @@
1
1
  import * as React from "react";
2
- //#region src/IsRestoringProvider.d.ts
3
2
  /**
4
3
  * If you are using `PersistQueryClientProvider`, you can also use the `useIsRestoring` hook alongside it to
5
4
  * check if a restore is currently in progress. `useQuery` and friends also check this internally to avoid
@@ -12,5 +11,4 @@ export declare const useIsRestoring: () => boolean;
12
11
  * being restored, read by `useIsRestoring`.
13
12
  */
14
13
  export declare const IsRestoringProvider: React.Provider<boolean>;
15
- //#endregion
16
14
  //# sourceMappingURL=IsRestoringProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IsRestoringProvider.d.ts","names":[],"sources":["../../src/IsRestoringProvider.ts"],"mappings":";;;;;;;;qBAWa;;;;;qBAMA,qBAAmB,MAAA"}
1
+ {"version":3,"file":"IsRestoringProvider.d.ts","names":[],"sources":["../../src/IsRestoringProvider.ts"],"mappings":";;;;;;;qBAWa;;;;;qBAMA,qBAAmB,MAAA"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import * as React from "react";
3
- //#region src/IsRestoringProvider.ts
3
+ // src/IsRestoringProvider.ts
4
4
  const IsRestoringContext = React.createContext(false);
5
5
  /**
6
6
  * If you are using `PersistQueryClientProvider`, you can also use the `useIsRestoring` hook alongside it to
@@ -14,7 +14,6 @@ const useIsRestoring = () => React.useContext(IsRestoringContext);
14
14
  * being restored, read by `useIsRestoring`.
15
15
  */
16
16
  const IsRestoringProvider = IsRestoringContext.Provider;
17
- //#endregion
18
17
  export { IsRestoringProvider, useIsRestoring };
19
18
 
20
19
  //# sourceMappingURL=IsRestoringProvider.js.map
@@ -1,10 +1,10 @@
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
  let react = require("react");
5
5
  react = require_rolldown_runtime.__toESM(react, 1);
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
- //#region src/QueryClientProvider.tsx
7
+ // src/QueryClientProvider.tsx
8
8
  /**
9
9
  * The context that `useQueryClient` reads from. `QueryClientProvider` is the normal way to set it.
10
10
  */
@@ -53,7 +53,6 @@ const QueryClientProvider = ({ client, children }) => {
53
53
  children
54
54
  });
55
55
  };
56
- //#endregion
57
56
  exports.QueryClientContext = QueryClientContext;
58
57
  exports.QueryClientProvider = QueryClientProvider;
59
58
  exports.useQueryClient = useQueryClient;
@@ -1,6 +1,5 @@
1
1
  import * as React from "react";
2
2
  import { QueryClient } from "@tanstack/query-core";
3
- //#region src/QueryClientProvider.d.ts
4
3
  /**
5
4
  * The context that `useQueryClient` reads from. `QueryClientProvider` is the normal way to set it.
6
5
  */
@@ -48,5 +47,4 @@ export type QueryClientProviderProps = {
48
47
  * ```
49
48
  */
50
49
  export declare const QueryClientProvider: ({ client, children }: QueryClientProviderProps) => React.JSX.Element;
51
- //#endregion
52
50
  //# sourceMappingURL=QueryClientProvider.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueryClientProvider.d.cts","names":[],"sources":["../../src/QueryClientProvider.tsx"],"mappings":";;;;;;qBAQa,oBAAkB,MAAA,QAAA;;;;;;;;;qBAYlB,iBAAkB,cAAc,gBAAW;;;;YAiB5C;;;;;;EAMV,QAAQ;;;;EAIR,WAAW,MAAM;;;;;;;;;;;;;;;;;;;;qBAqBN,wBAAuB,QAAA,YAGjC,6BAA2B,MAAM,IAAI"}
1
+ {"version":3,"file":"QueryClientProvider.d.cts","names":[],"sources":["../../src/QueryClientProvider.tsx"],"mappings":";;;;;qBAQa,oBAAkB,MAAA,QAAA;;;;;;;;;qBAYlB,iBAAkB,cAAc,gBAAW;;;;YAiB5C;;;;;;EAMV,QAAQ;;;;EAIR,WAAW,MAAM;;;;;;;;;;;;;;;;;;;;qBAqBN,wBAAuB,QAAA,YAGjC,6BAA2B,MAAM,IAAI"}
@@ -1,6 +1,5 @@
1
1
  import * as React from "react";
2
2
  import { QueryClient } from "@tanstack/query-core";
3
- //#region src/QueryClientProvider.d.ts
4
3
  /**
5
4
  * The context that `useQueryClient` reads from. `QueryClientProvider` is the normal way to set it.
6
5
  */
@@ -48,5 +47,4 @@ export type QueryClientProviderProps = {
48
47
  * ```
49
48
  */
50
49
  export declare const QueryClientProvider: ({ client, children }: QueryClientProviderProps) => React.JSX.Element;
51
- //#endregion
52
50
  //# sourceMappingURL=QueryClientProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueryClientProvider.d.ts","names":[],"sources":["../../src/QueryClientProvider.tsx"],"mappings":";;;;;;qBAQa,oBAAkB,MAAA,QAAA;;;;;;;;;qBAYlB,iBAAkB,cAAc,gBAAW;;;;YAiB5C;;;;;;EAMV,QAAQ;;;;EAIR,WAAW,MAAM;;;;;;;;;;;;;;;;;;;;qBAqBN,wBAAuB,QAAA,YAGjC,6BAA2B,MAAM,IAAI"}
1
+ {"version":3,"file":"QueryClientProvider.d.ts","names":[],"sources":["../../src/QueryClientProvider.tsx"],"mappings":";;;;;qBAQa,oBAAkB,MAAA,QAAA;;;;;;;;;qBAYlB,iBAAkB,cAAc,gBAAW;;;;YAiB5C;;;;;;EAMV,QAAQ;;;;EAIR,WAAW,MAAM;;;;;;;;;;;;;;;;;;;;qBAqBN,wBAAuB,QAAA,YAGjC,6BAA2B,MAAM,IAAI"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import * as React from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
- //#region src/QueryClientProvider.tsx
4
+ // src/QueryClientProvider.tsx
5
5
  /**
6
6
  * The context that `useQueryClient` reads from. `QueryClientProvider` is the normal way to set it.
7
7
  */
@@ -50,7 +50,6 @@ const QueryClientProvider = ({ client, children }) => {
50
50
  children
51
51
  });
52
52
  };
53
- //#endregion
54
53
  export { QueryClientContext, QueryClientProvider, useQueryClient };
55
54
 
56
55
  //# sourceMappingURL=QueryClientProvider.js.map
@@ -1,10 +1,10 @@
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
  let react = require("react");
5
5
  react = require_rolldown_runtime.__toESM(react, 1);
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
- //#region src/QueryErrorResetBoundary.tsx
7
+ // src/QueryErrorResetBoundary.tsx
8
8
  /**
9
9
  * Creates the value shared through the boundary's context, which tracks whether a reset was
10
10
  * requested.
@@ -104,7 +104,6 @@ const QueryErrorResetBoundary = ({ children }) => {
104
104
  children: typeof children === "function" ? children(value) : children
105
105
  });
106
106
  };
107
- //#endregion
108
107
  exports.QueryErrorResetBoundary = QueryErrorResetBoundary;
109
108
  exports.useQueryErrorResetBoundary = useQueryErrorResetBoundary;
110
109
 
@@ -1,5 +1,4 @@
1
1
  import * as React from "react";
2
- //#region src/QueryErrorResetBoundary.d.ts
3
2
  /**
4
3
  * Resets any query errors within the boundary, so queries know they can try again.
5
4
  */
@@ -108,6 +107,5 @@ export interface QueryErrorResetBoundaryProps {
108
107
  * }
109
108
  * ```
110
109
  */
111
- export declare const QueryErrorResetBoundary: ({ children }: QueryErrorResetBoundaryProps) => import("react/jsx-runtime").JSX.Element;
112
- //#endregion
110
+ export declare const QueryErrorResetBoundary: ({ children }: QueryErrorResetBoundaryProps) => React.JSX.Element;
113
111
  //# sourceMappingURL=QueryErrorResetBoundary.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueryErrorResetBoundary.d.cts","names":[],"sources":["../../src/QueryErrorResetBoundary.tsx"],"mappings":";;;;;YAQY;;;;YAKA;;;;YAKA;;;;;iBAMK;;;;EAIf,YAAY;;;;EAIZ,SAAS;;;;EAIT,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiEI,kCAA0B;;;;;;YAU3B,mCACV,OAAO,iCACJ,MAAM;;;;iBAKM;;;;;EAKf,UAAU,kCAAkC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAoCvC,4BAA2B,YAErC,6DAA4B,IAAA"}
1
+ {"version":3,"file":"QueryErrorResetBoundary.d.cts","names":[],"sources":["../../src/QueryErrorResetBoundary.tsx"],"mappings":";;;;YAQY;;;;YAKA;;;;YAKA;;;;;iBAMK;;;;EAIf,YAAY;;;;EAIZ,SAAS;;;;EAIT,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiEI,kCAA0B;;;;;;YAU3B,mCACV,OAAO,iCACJ,MAAM;;;;iBAKM;;;;;EAKf,UAAU,kCAAkC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAoCvC,4BAA2B,YAErC,iCAA4B,MAAA,IAAA"}
@@ -1,5 +1,4 @@
1
1
  import * as React from "react";
2
- //#region src/QueryErrorResetBoundary.d.ts
3
2
  /**
4
3
  * Resets any query errors within the boundary, so queries know they can try again.
5
4
  */
@@ -108,6 +107,5 @@ export interface QueryErrorResetBoundaryProps {
108
107
  * }
109
108
  * ```
110
109
  */
111
- export declare const QueryErrorResetBoundary: ({ children }: QueryErrorResetBoundaryProps) => import("react/jsx-runtime").JSX.Element;
112
- //#endregion
110
+ export declare const QueryErrorResetBoundary: ({ children }: QueryErrorResetBoundaryProps) => React.JSX.Element;
113
111
  //# sourceMappingURL=QueryErrorResetBoundary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueryErrorResetBoundary.d.ts","names":[],"sources":["../../src/QueryErrorResetBoundary.tsx"],"mappings":";;;;;YAQY;;;;YAKA;;;;YAKA;;;;;iBAMK;;;;EAIf,YAAY;;;;EAIZ,SAAS;;;;EAIT,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiEI,kCAA0B;;;;;;YAU3B,mCACV,OAAO,iCACJ,MAAM;;;;iBAKM;;;;;EAKf,UAAU,kCAAkC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAoCvC,4BAA2B,YAErC,6DAA4B,IAAA"}
1
+ {"version":3,"file":"QueryErrorResetBoundary.d.ts","names":[],"sources":["../../src/QueryErrorResetBoundary.tsx"],"mappings":";;;;YAQY;;;;YAKA;;;;YAKA;;;;;iBAMK;;;;EAIf,YAAY;;;;EAIZ,SAAS;;;;EAIT,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiEI,kCAA0B;;;;;;YAU3B,mCACV,OAAO,iCACJ,MAAM;;;;iBAKM;;;;;EAKf,UAAU,kCAAkC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAoCvC,4BAA2B,YAErC,iCAA4B,MAAA,IAAA"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import * as React from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
- //#region src/QueryErrorResetBoundary.tsx
4
+ // src/QueryErrorResetBoundary.tsx
5
5
  /**
6
6
  * Creates the value shared through the boundary's context, which tracks whether a reset was
7
7
  * requested.
@@ -101,7 +101,6 @@ const QueryErrorResetBoundary = ({ children }) => {
101
101
  children: typeof children === "function" ? children(value) : children
102
102
  });
103
103
  };
104
- //#endregion
105
104
  export { QueryErrorResetBoundary, useQueryErrorResetBoundary };
106
105
 
107
106
  //# sourceMappingURL=QueryErrorResetBoundary.js.map
@@ -1,10 +1,10 @@
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
  let react = require("react");
5
5
  react = require_rolldown_runtime.__toESM(react, 1);
6
6
  let _tanstack_query_core = require("@tanstack/query-core");
7
- //#region src/errorBoundaryUtils.ts
7
+ // src/errorBoundaryUtils.ts
8
8
  /**
9
9
  * Turns off `retryOnMount` for a query that throws its errors (with `suspense` or `throwOnError`),
10
10
  * unless the error boundary has been reset, so a remount doesn't retry the failed query before the
@@ -40,7 +40,6 @@ const useClearResetErrorBoundary = (errorResetBoundary) => {
40
40
  const getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }) => {
41
41
  return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || (0, _tanstack_query_core.shouldThrowError)(throwOnError, [result.error, query]));
42
42
  };
43
- //#endregion
44
43
  exports.ensurePreventErrorBoundaryRetry = ensurePreventErrorBoundaryRetry;
45
44
  exports.getHasError = getHasError;
46
45
  exports.useClearResetErrorBoundary = useClearResetErrorBoundary;
@@ -1,6 +1,5 @@
1
1
  import { QueryErrorResetBoundaryValue } from "./QueryErrorResetBoundary.cjs";
2
2
  import { DefaultedQueryObserverOptions, Query, QueryKey, QueryObserverResult, ThrowOnError } from "@tanstack/query-core";
3
- //#region src/errorBoundaryUtils.d.ts
4
3
  /**
5
4
  * Turns off `retryOnMount` for a query that throws its errors (with `suspense` or `throwOnError`),
6
5
  * unless the error boundary has been reset, so a remount doesn't retry the failed query before the
@@ -31,5 +30,4 @@ export declare const getHasError: <TData, TError, TQueryFnData, TQueryData, TQue
31
30
  query: Query<TQueryFnData, TError, TQueryData, TQueryKey> | undefined;
32
31
  suspense: boolean | undefined;
33
32
  }) => boolean | undefined;
34
- //#endregion
35
33
  //# sourceMappingURL=errorBoundaryUtils.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errorBoundaryUtils.d.cts","names":[],"sources":["../../src/errorBoundaryUtils.ts"],"mappings":";;;;;;;;;;;qBAoBa,kCACX,cACA,QACA,OACA,YACA,kBAAkB,UAElB,SAAS,8BACP,cACA,QACA,OACA,YACA,YAEF,oBAAoB,8BACpB,OAAO,MAAM,cAAc,QAAQ,YAAY;;;;;;qBAwBpC,6BACX,oBAAoB;;;;;;;;;qBAeT,cACX,OACA,QACA,cACA,YACA,kBAAkB,YAClB,QAAA,oBAAA,cAAA,OAAA;EAOA,QAAQ,oBAAoB,OAAO;EACnC,oBAAoB;EACpB,cAAc,aAAa,cAAc,QAAQ,YAAY;EAC7D,OAAO,MAAM,cAAc,QAAQ,YAAY;EAC/C"}
1
+ {"version":3,"file":"errorBoundaryUtils.d.cts","names":[],"sources":["../../src/errorBoundaryUtils.ts"],"mappings":";;;;;;;;;;qBAoBa,kCACX,cACA,QACA,OACA,YACA,kBAAkB,UAElB,SAAS,8BACP,cACA,QACA,OACA,YACA,YAEF,oBAAoB,8BACpB,OAAO,MAAM,cAAc,QAAQ,YAAY;;;;;;qBAwBpC,6BACX,oBAAoB;;;;;;;;;qBAeT,cACX,OACA,QACA,cACA,YACA,kBAAkB,YAClB,QAAA,oBAAA,cAAA,OAAA;EAOA,QAAQ,oBAAoB,OAAO;EACnC,oBAAoB;EACpB,cAAc,aAAa,cAAc,QAAQ,YAAY;EAC7D,OAAO,MAAM,cAAc,QAAQ,YAAY;EAC/C"}
@@ -1,6 +1,5 @@
1
1
  import { QueryErrorResetBoundaryValue } from "./QueryErrorResetBoundary.js";
2
2
  import { DefaultedQueryObserverOptions, Query, QueryKey, QueryObserverResult, ThrowOnError } from "@tanstack/query-core";
3
- //#region src/errorBoundaryUtils.d.ts
4
3
  /**
5
4
  * Turns off `retryOnMount` for a query that throws its errors (with `suspense` or `throwOnError`),
6
5
  * unless the error boundary has been reset, so a remount doesn't retry the failed query before the
@@ -31,5 +30,4 @@ export declare const getHasError: <TData, TError, TQueryFnData, TQueryData, TQue
31
30
  query: Query<TQueryFnData, TError, TQueryData, TQueryKey> | undefined;
32
31
  suspense: boolean | undefined;
33
32
  }) => boolean | undefined;
34
- //#endregion
35
33
  //# sourceMappingURL=errorBoundaryUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errorBoundaryUtils.d.ts","names":[],"sources":["../../src/errorBoundaryUtils.ts"],"mappings":";;;;;;;;;;;qBAoBa,kCACX,cACA,QACA,OACA,YACA,kBAAkB,UAElB,SAAS,8BACP,cACA,QACA,OACA,YACA,YAEF,oBAAoB,8BACpB,OAAO,MAAM,cAAc,QAAQ,YAAY;;;;;;qBAwBpC,6BACX,oBAAoB;;;;;;;;;qBAeT,cACX,OACA,QACA,cACA,YACA,kBAAkB,YAClB,QAAA,oBAAA,cAAA,OAAA;EAOA,QAAQ,oBAAoB,OAAO;EACnC,oBAAoB;EACpB,cAAc,aAAa,cAAc,QAAQ,YAAY;EAC7D,OAAO,MAAM,cAAc,QAAQ,YAAY;EAC/C"}
1
+ {"version":3,"file":"errorBoundaryUtils.d.ts","names":[],"sources":["../../src/errorBoundaryUtils.ts"],"mappings":";;;;;;;;;;qBAoBa,kCACX,cACA,QACA,OACA,YACA,kBAAkB,UAElB,SAAS,8BACP,cACA,QACA,OACA,YACA,YAEF,oBAAoB,8BACpB,OAAO,MAAM,cAAc,QAAQ,YAAY;;;;;;qBAwBpC,6BACX,oBAAoB;;;;;;;;;qBAeT,cACX,OACA,QACA,cACA,YACA,kBAAkB,YAClB,QAAA,oBAAA,cAAA,OAAA;EAOA,QAAQ,oBAAoB,OAAO;EACnC,oBAAoB;EACpB,cAAc,aAAa,cAAc,QAAQ,YAAY;EAC7D,OAAO,MAAM,cAAc,QAAQ,YAAY;EAC/C"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import * as React from "react";
3
3
  import { shouldThrowError } from "@tanstack/query-core";
4
- //#region src/errorBoundaryUtils.ts
4
+ // src/errorBoundaryUtils.ts
5
5
  /**
6
6
  * Turns off `retryOnMount` for a query that throws its errors (with `suspense` or `throwOnError`),
7
7
  * unless the error boundary has been reset, so a remount doesn't retry the failed query before the
@@ -37,7 +37,6 @@ const useClearResetErrorBoundary = (errorResetBoundary) => {
37
37
  const getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }) => {
38
38
  return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
39
39
  };
40
- //#endregion
41
40
  export { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary };
42
41
 
43
42
  //# sourceMappingURL=errorBoundaryUtils.js.map
@@ -17,9 +17,8 @@ const require_useMutationState = require("./useMutationState.cjs");
17
17
  const require_useMutation = require("./useMutation.cjs");
18
18
  const require_mutationOptions = require("./mutationOptions.cjs");
19
19
  const require_useInfiniteQuery = require("./useInfiniteQuery.cjs");
20
- //#region src/index.ts
20
+ // src/index.ts
21
21
  /* istanbul ignore file */
22
- //#endregion
23
22
  exports.HydrationBoundary = require_HydrationBoundary.HydrationBoundary;
24
23
  exports.IsRestoringProvider = require_IsRestoringProvider.IsRestoringProvider;
25
24
  exports.QueryClientContext = require_QueryClientProvider.QueryClientContext;
@@ -17,9 +17,8 @@ import { useMutation } from "./useMutation.js";
17
17
  import { mutationOptions } from "./mutationOptions.js";
18
18
  import { useInfiniteQuery } from "./useInfiniteQuery.js";
19
19
  export * from "@tanstack/query-core";
20
- //#region src/index.ts
20
+ // src/index.ts
21
21
  /* istanbul ignore file */
22
- //#endregion
23
22
  export { HydrationBoundary, IsRestoringProvider, QueryClientContext, QueryClientProvider, QueryErrorResetBoundary, infiniteQueryOptions, mutationOptions, queryOptions, useInfiniteQuery, useIsFetching, useIsMutating, useIsRestoring, useMutation, useMutationState, usePrefetchInfiniteQuery, usePrefetchQuery, useQueries, useQuery, useQueryClient, useQueryErrorResetBoundary, useSuspenseInfiniteQuery, useSuspenseQueries, useSuspenseQuery };
24
23
 
25
24
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region src/infiniteQueryOptions.ts
2
+ // src/infiniteQueryOptions.ts
3
3
  function infiniteQueryOptions(options) {
4
4
  return options;
5
5
  }
6
- //#endregion
7
6
  exports.infiniteQueryOptions = infiniteQueryOptions;
8
7
 
9
8
  //# sourceMappingURL=infiniteQueryOptions.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"infiniteQueryOptions.cjs","names":[],"sources":["../../src/infiniteQueryOptions.ts"],"sourcesContent":["import type {\n DefaultError,\n InfiniteData,\n InitialDataFunction,\n NonUndefinedGuard,\n OmitKeyof,\n QueryKey,\n QueryKeyWithDataTag,\n SkipToken,\n} from '@tanstack/query-core'\nimport type { UseInfiniteQueryOptions } from './types'\n\n/**\n * The options accepted by the `infiniteQueryOptions` overload selected when no `initialData` is set — `data`\n * may be `undefined` while the query is `pending`.\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 type UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n /**\n * If set, this value will be used as the initial data for the query cache (as long as the query hasn't been\n * created or cached yet). If set to a function, the function will be called **once** during the shared/root\n * query initialization, and be expected to synchronously return the initial data. Initial data is\n * considered stale by default unless a `staleTime` has been set. `initialData` **is persisted** to the\n * cache.\n */\n initialData?:\n | undefined\n | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n | InitialDataFunction<\n NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n >\n}\n\n/**\n * The options accepted by the `infiniteQueryOptions` overload selected when no `initialData` is set and\n * `queryFn` is not `skipToken` — same as {@link UndefinedInitialDataInfiniteOptions}, but `queryFn` may not be\n * `skipToken`.\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 type UnusedSkipTokenInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = OmitKeyof<\n UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>,\n 'queryFn'\n> & {\n /**\n * `skipToken` is not allowed as a value here — this overload is selected when no `initialData` is set. If\n * you don't intend to run the query yet, set `enabled: false` — omitting `queryFn` alone still triggers a\n * fetch that fails with \"Missing queryFn\" unless `enabled` is `false` or a default query function has been\n * defined. A default query function only supplies `queryFn`; it doesn't defer the fetch on its own.\n */\n queryFn?: Exclude<\n UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >['queryFn'],\n SkipToken | undefined\n >\n}\n\n/**\n * The options accepted by the `infiniteQueryOptions` overload selected when `initialData` is set — `data` is\n * never `undefined` (unless a `select` changes `TData` to include `undefined`).\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 type DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n /**\n * If set, this value will be used as the initial data for the query cache (as long as the query hasn't been\n * created or cached yet). If set to a function, the function will be called **once** during the shared/root\n * query initialization, and be expected to synchronously return the initial data. Initial data is\n * considered stale by default unless a `staleTime` has been set. `initialData` **is persisted** to the\n * cache.\n */\n initialData:\n | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>)\n | undefined\n}\n\n/**\n * You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.\n * These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.\n * `options.queryKey` is required and is the query key to generate options for.\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 * @returns The same options object, typed so that `queryKey` carries the inferred data type.\n * @remarks See {@link useInfiniteQuery} for examples that fetch further pages, from a button click or\n * automatically as the user scrolls.\n * @see {@link useInfiniteQuery} to run an infinite query with these options.\n * @example\n * ```tsx\n * import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query'\n *\n * export const projectsOptions = infiniteQueryOptions({\n * queryKey: ['projects'],\n * queryFn: ({ pageParam }) => fetchProjects(pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * initialData: { pages: [], pageParams: [] },\n * })\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(projectsOptions)\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 infiniteQueryOptions<\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): DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> &\n QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n\n/**\n * You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.\n * These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.\n * `options.queryKey` is required and is the query key to generate options for.\n * @param options - The {@link UnusedSkipTokenInfiniteOptions} to use — everything you can pass to `useInfiniteQuery`.\n * @returns The same options object, typed so that `queryKey` carries the inferred data type.\n * @remarks See {@link useInfiniteQuery} for examples that fetch further pages, from a button click or\n * automatically as the user scrolls.\n * @see {@link useInfiniteQuery} to run an infinite query with these options.\n * @example\n * A parameterized factory, so the same options object can be reused per `postId`:\n * ```tsx\n * import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query'\n *\n * export const commentsOptions = (postId: string) =>\n * infiniteQueryOptions({\n * queryKey: ['post', postId, 'comments'],\n * queryFn: ({ pageParam }) => fetchComments(postId, pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * })\n *\n * function Comments({ postId }: { postId: string }) {\n * const { data, isPending, isError, error } = useInfiniteQuery(commentsOptions(postId))\n *\n * if (isPending) 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 infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UnusedSkipTokenInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): UnusedSkipTokenInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> &\n QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n\n/**\n * You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.\n * These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.\n * `options.queryKey` is required and is the query key to generate options for.\n * @param options - The {@link UndefinedInitialDataInfiniteOptions} to use — everything you can pass to `useInfiniteQuery`.\n * @returns The same options object, typed so that `queryKey` carries the inferred data type.\n * @remarks See {@link useInfiniteQuery} for examples that fetch further pages (from a button click or\n * automatically as the user scrolls) and that use `skipToken` to disable the query until `postId` is set.\n * @see {@link useInfiniteQuery} to run an infinite query with these options.\n * @example\n * A parameterized factory, so the same options object can be reused per `postId`:\n * ```tsx\n * import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query'\n *\n * export const commentsOptions = (postId: string) =>\n * infiniteQueryOptions({\n * queryKey: ['post', postId, 'comments'],\n * queryFn: ({ pageParam }) => fetchComments(postId, pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * })\n *\n * function Comments({ postId }: { postId: string }) {\n * const { data, isPending, isError, error } = useInfiniteQuery(commentsOptions(postId))\n *\n * if (isPending) 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 infiniteQueryOptions<\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): UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> &\n QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n\nexport function infiniteQueryOptions(options: unknown) {\n return options\n}\n"],"mappings":";;AAiTA,SAAgB,qBAAqB,SAAkB;CACrD,OAAO;AACT"}
1
+ {"version":3,"file":"infiniteQueryOptions.cjs","names":[],"sources":["../../src/infiniteQueryOptions.ts"],"sourcesContent":["import type {\n DefaultError,\n InfiniteData,\n InitialDataFunction,\n NonUndefinedGuard,\n OmitKeyof,\n QueryKey,\n QueryKeyWithDataTag,\n SkipToken,\n} from '@tanstack/query-core'\nimport type { UseInfiniteQueryOptions } from './types'\n\n/**\n * The options accepted by the `infiniteQueryOptions` overload selected when `initialData` is omitted, may be\n * `undefined`, or is a function that may return `undefined` — `data` may be `undefined` while the query is\n * `pending`.\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 type UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n /**\n * If set, this value will be used as the initial data for the query cache (as long as the query hasn't been\n * created or cached yet). If set to a function, the function will be called **once** during the shared/root\n * query initialization, and be expected to synchronously return the initial data. Initial data is\n * considered stale by default unless a `staleTime` has been set. `initialData` **is persisted** to the\n * cache.\n */\n initialData?:\n | undefined\n | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n | InitialDataFunction<\n NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n >\n}\n\n/**\n * The options accepted by the `infiniteQueryOptions` overload selected when `queryFn` is not `skipToken` and\n * `initialData` is omitted, may be `undefined`, or is a function that may return `undefined` — same as\n * {@link UndefinedInitialDataInfiniteOptions}, but `queryFn` may not be `skipToken`.\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 type UnusedSkipTokenInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = OmitKeyof<\n UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>,\n 'queryFn'\n> & {\n /**\n * `skipToken` is not allowed as a value here — this overload is selected when `initialData` is omitted, may\n * be `undefined`, or is a function that may return `undefined`. If you don't intend to run the query yet,\n * set `enabled: false` — omitting `queryFn` alone still triggers a fetch that fails with \"Missing queryFn\"\n * unless `enabled` is `false` or a default query function has been defined. A default query function only\n * supplies `queryFn`; it doesn't defer the fetch on its own.\n */\n queryFn?: Exclude<\n UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >['queryFn'],\n SkipToken | undefined\n >\n}\n\n/**\n * The options accepted by the `infiniteQueryOptions` overload selected when `initialData` is known to be\n * defined — `data` is never `undefined` (unless a `select` changes `TData` to include `undefined`).\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 type DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n /**\n * If set, this value will be used as the initial data for the query cache (as long as the query hasn't been\n * created or cached yet). If set to a function, the function will be called **once** during the shared/root\n * query initialization, and be expected to synchronously return the initial data. Initial data is\n * considered stale by default unless a `staleTime` has been set. `initialData` **is persisted** to the\n * cache.\n */\n initialData:\n | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>)\n}\n\n/**\n * You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.\n * These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.\n * `options.queryKey` is required and is the query key to generate options for.\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 * @returns The same options object, typed so that `queryKey` carries the inferred data type.\n * @remarks See {@link useInfiniteQuery} for examples that fetch further pages, from a button click or\n * automatically as the user scrolls.\n * @see {@link useInfiniteQuery} to run an infinite query with these options.\n * @example\n * ```tsx\n * import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query'\n *\n * export const projectsOptions = infiniteQueryOptions({\n * queryKey: ['projects'],\n * queryFn: ({ pageParam }) => fetchProjects(pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * initialData: { pages: [], pageParams: [] },\n * })\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(projectsOptions)\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 infiniteQueryOptions<\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): DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> &\n QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n\n/**\n * You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.\n * These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.\n * `options.queryKey` is required and is the query key to generate options for.\n * @param options - The {@link UnusedSkipTokenInfiniteOptions} to use — everything you can pass to `useInfiniteQuery`.\n * @returns The same options object, typed so that `queryKey` carries the inferred data type.\n * @remarks See {@link useInfiniteQuery} for examples that fetch further pages, from a button click or\n * automatically as the user scrolls.\n * @see {@link useInfiniteQuery} to run an infinite query with these options.\n * @example\n * A parameterized factory, so the same options object can be reused per `postId`:\n * ```tsx\n * import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query'\n *\n * export const commentsOptions = (postId: string) =>\n * infiniteQueryOptions({\n * queryKey: ['post', postId, 'comments'],\n * queryFn: ({ pageParam }) => fetchComments(postId, pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * })\n *\n * function Comments({ postId }: { postId: string }) {\n * const { data, isPending, isError, error } = useInfiniteQuery(commentsOptions(postId))\n *\n * if (isPending) 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 infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UnusedSkipTokenInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): UnusedSkipTokenInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> &\n QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n\n/**\n * You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.\n * These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.\n * `options.queryKey` is required and is the query key to generate options for.\n * @param options - The {@link UndefinedInitialDataInfiniteOptions} to use — everything you can pass to `useInfiniteQuery`.\n * @returns The same options object, typed so that `queryKey` carries the inferred data type.\n * @remarks See {@link useInfiniteQuery} for examples that fetch further pages (from a button click or\n * automatically as the user scrolls) and that use `skipToken` to disable the query until `postId` is set.\n * @see {@link useInfiniteQuery} to run an infinite query with these options.\n * @example\n * A parameterized factory, so the same options object can be reused per `postId`:\n * ```tsx\n * import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query'\n *\n * export const commentsOptions = (postId: string) =>\n * infiniteQueryOptions({\n * queryKey: ['post', postId, 'comments'],\n * queryFn: ({ pageParam }) => fetchComments(postId, pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * })\n *\n * function Comments({ postId }: { postId: string }) {\n * const { data, isPending, isError, error } = useInfiniteQuery(commentsOptions(postId))\n *\n * if (isPending) 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 infiniteQueryOptions<\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): UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> &\n QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n\nexport function infiniteQueryOptions(options: unknown) {\n return options\n}\n"],"mappings":";;AAkTA,SAAgB,qBAAqB,SAAkB;CACrD,OAAO;AACT"}
@@ -1,9 +1,9 @@
1
1
  import { UseInfiniteQueryOptions } from "./types.cjs";
2
2
  import { DefaultError, InfiniteData, InitialDataFunction, NonUndefinedGuard, OmitKeyof, QueryKey, QueryKeyWithDataTag, SkipToken } from "@tanstack/query-core";
3
- //#region src/infiniteQueryOptions.d.ts
4
3
  /**
5
- * The options accepted by the `infiniteQueryOptions` overload selected when no `initialData` is set — `data`
6
- * may be `undefined` while the query is `pending`.
4
+ * The options accepted by the `infiniteQueryOptions` overload selected when `initialData` is omitted, may be
5
+ * `undefined`, or is a function that may return `undefined` — `data` may be `undefined` while the query is
6
+ * `pending`.
7
7
  * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
8
8
  * @template TError - The type of errors your `queryFn` may throw.
9
9
  * @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
@@ -22,9 +22,9 @@ export type UndefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultEr
22
22
  initialData?: undefined | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | InitialDataFunction<NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>>;
23
23
  };
24
24
  /**
25
- * The options accepted by the `infiniteQueryOptions` overload selected when no `initialData` is set and
26
- * `queryFn` is not `skipToken` — same as {@link UndefinedInitialDataInfiniteOptions}, but `queryFn` may not be
27
- * `skipToken`.
25
+ * The options accepted by the `infiniteQueryOptions` overload selected when `queryFn` is not `skipToken` and
26
+ * `initialData` is omitted, may be `undefined`, or is a function that may return `undefined` — same as
27
+ * {@link UndefinedInitialDataInfiniteOptions}, but `queryFn` may not be `skipToken`.
28
28
  * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
29
29
  * @template TError - The type of errors your `queryFn` may throw.
30
30
  * @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
@@ -34,16 +34,17 @@ export type UndefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultEr
34
34
  */
35
35
  export type UnusedSkipTokenInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = OmitKeyof<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'queryFn'> & {
36
36
  /**
37
- * `skipToken` is not allowed as a value here — this overload is selected when no `initialData` is set. If
38
- * you don't intend to run the query yet, set `enabled: false` — omitting `queryFn` alone still triggers a
39
- * fetch that fails with "Missing queryFn" unless `enabled` is `false` or a default query function has been
40
- * defined. A default query function only supplies `queryFn`; it doesn't defer the fetch on its own.
37
+ * `skipToken` is not allowed as a value here — this overload is selected when `initialData` is omitted, may
38
+ * be `undefined`, or is a function that may return `undefined`. If you don't intend to run the query yet,
39
+ * set `enabled: false` — omitting `queryFn` alone still triggers a fetch that fails with "Missing queryFn"
40
+ * unless `enabled` is `false` or a default query function has been defined. A default query function only
41
+ * supplies `queryFn`; it doesn't defer the fetch on its own.
41
42
  */
42
43
  queryFn?: Exclude<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>['queryFn'], SkipToken | undefined>;
43
44
  };
44
45
  /**
45
- * The options accepted by the `infiniteQueryOptions` overload selected when `initialData` is set — `data` is
46
- * never `undefined` (unless a `select` changes `TData` to include `undefined`).
46
+ * The options accepted by the `infiniteQueryOptions` overload selected when `initialData` is known to be
47
+ * defined — `data` is never `undefined` (unless a `select` changes `TData` to include `undefined`).
47
48
  * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
48
49
  * @template TError - The type of errors your `queryFn` may throw.
49
50
  * @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
@@ -59,15 +60,15 @@ export type DefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultErro
59
60
  * considered stale by default unless a `staleTime` has been set. `initialData` **is persisted** to the
60
61
  * cache.
61
62
  */
62
- initialData: NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>) | undefined;
63
+ initialData: NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>);
63
64
  };
64
65
  /**
65
66
  * You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.
66
67
  * These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.
67
68
  * `options.queryKey` is required and is the query key to generate options for.
68
69
  *
69
- * This overload is selected when `initialData` is set.
70
- * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to `useInfiniteQuery`, with `initialData` set.
70
+ * This overload is selected when `initialData` is known to be defined.
71
+ * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to `useInfiniteQuery`, with `initialData` known to be defined.
71
72
  * @returns The same options object, typed so that `queryKey` carries the inferred data type.
72
73
  * @remarks See {@link useInfiniteQuery} for examples that fetch further pages, from a button click or
73
74
  * automatically as the user scrolls.
@@ -175,5 +176,4 @@ export declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError
175
176
  * ```
176
177
  */
177
178
  export declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
178
- //#endregion
179
179
  //# sourceMappingURL=infiniteQueryOptions.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"infiniteQueryOptions.d.cts","names":[],"sources":["../../src/infiniteQueryOptions.ts"],"mappings":";;;;;;;;;;;;;YAsBY,oCACV,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,wBACE,wBACF,cACA,QACA,OACA,WACA;;;;;;;;EASA,0BAEI,kBAAkB,aAAa,cAAc,eAC7C,oBACE,kBAAkB,aAAa,cAAc;;;;;;;;;;;;;YAezC,+BACV,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,wBACE,UACF,wBAAwB,cAAc,QAAQ,OAAO,WAAW;;;;;;;EAShE,UAAU,QACR,wBACE,cACA,QACA,OACA,WACA,wBAEF;;;;;;;;;;;;YAcQ,kCACV,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,wBACE,wBACF,cACA,QACA,OACA,WACA;;;;;;;;EASA,aACI,kBAAkB,aAAa,cAAc,sBACtC,kBAAkB,aAAa,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA2C1C,qBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,kCACP,cACA,QACA,OACA,WACA,cAED,kCACD,cACA,QACA,OACA,WACA,cAEA,oBAAoB,WAAW,aAAa,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsC7C,qBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,+BACP,cACA,QACA,OACA,WACA,cAED,+BACD,cACA,QACA,OACA,WACA,cAEA,oBAAoB,WAAW,aAAa,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsC7C,qBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,oCACP,cACA,QACA,OACA,WACA,cAED,oCACD,cACA,QACA,OACA,WACA,cAEA,oBAAoB,WAAW,aAAa,eAAe"}
1
+ {"version":3,"file":"infiniteQueryOptions.d.cts","names":[],"sources":["../../src/infiniteQueryOptions.ts"],"mappings":";;;;;;;;;;;;;YAuBY,oCACV,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,wBACE,wBACF,cACA,QACA,OACA,WACA;;;;;;;;EASA,0BAEI,kBAAkB,aAAa,cAAc,eAC7C,oBACE,kBAAkB,aAAa,cAAc;;;;;;;;;;;;;YAezC,+BACV,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,wBACE,UACF,wBAAwB,cAAc,QAAQ,OAAO,WAAW;;;;;;;;EAUhE,UAAU,QACR,wBACE,cACA,QACA,OACA,WACA,wBAEF;;;;;;;;;;;;YAcQ,kCACV,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,wBACE,wBACF,cACA,QACA,OACA,WACA;;;;;;;;EASA,aACI,kBAAkB,aAAa,cAAc,sBACtC,kBAAkB,aAAa,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0C1C,qBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,kCACP,cACA,QACA,OACA,WACA,cAED,kCACD,cACA,QACA,OACA,WACA,cAEA,oBAAoB,WAAW,aAAa,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsC7C,qBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,+BACP,cACA,QACA,OACA,WACA,cAED,+BACD,cACA,QACA,OACA,WACA,cAEA,oBAAoB,WAAW,aAAa,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsC7C,qBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,oCACP,cACA,QACA,OACA,WACA,cAED,oCACD,cACA,QACA,OACA,WACA,cAEA,oBAAoB,WAAW,aAAa,eAAe"}