@tanstack/vue-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 (310) hide show
  1. package/build/legacy/devtools/devtools.cjs +1 -2
  2. package/build/legacy/devtools/devtools.d.cts +1 -3
  3. package/build/legacy/devtools/devtools.d.cts.map +1 -1
  4. package/build/legacy/devtools/devtools.d.ts +1 -3
  5. package/build/legacy/devtools/devtools.d.ts.map +1 -1
  6. package/build/legacy/devtools/devtools.js +1 -2
  7. package/build/legacy/devtools/utils.cjs +1 -2
  8. package/build/legacy/devtools/utils.d.cts +0 -2
  9. package/build/legacy/devtools/utils.d.cts.map +1 -1
  10. package/build/legacy/devtools/utils.d.ts +0 -2
  11. package/build/legacy/devtools/utils.d.ts.map +1 -1
  12. package/build/legacy/devtools/utils.js +1 -2
  13. package/build/legacy/index.d.cts +4 -4
  14. package/build/legacy/index.d.ts +4 -4
  15. package/build/legacy/{infiniteQueryOptions-BaoKhSzb.d.ts → infiniteQueryOptions-BLGtkUwV.d.ts} +28 -33
  16. package/build/legacy/infiniteQueryOptions-BLGtkUwV.d.ts.map +1 -0
  17. package/build/legacy/{infiniteQueryOptions-ClNe2-FB.d.cts → infiniteQueryOptions-oStzZOCq.d.cts} +28 -33
  18. package/build/legacy/infiniteQueryOptions-oStzZOCq.d.cts.map +1 -0
  19. package/build/legacy/infiniteQueryOptions.cjs +1 -2
  20. package/build/legacy/infiniteQueryOptions.cjs.map +1 -1
  21. package/build/legacy/infiniteQueryOptions.d.cts +1 -1
  22. package/build/legacy/infiniteQueryOptions.d.ts +1 -1
  23. package/build/legacy/infiniteQueryOptions.js +1 -2
  24. package/build/legacy/infiniteQueryOptions.js.map +1 -1
  25. package/build/legacy/mutationCache.cjs +1 -2
  26. package/build/legacy/mutationCache.d.cts +1 -3
  27. package/build/legacy/mutationCache.d.cts.map +1 -1
  28. package/build/legacy/mutationCache.d.ts +1 -3
  29. package/build/legacy/mutationCache.d.ts.map +1 -1
  30. package/build/legacy/mutationCache.js +1 -2
  31. package/build/legacy/mutationOptions.cjs +1 -2
  32. package/build/legacy/mutationOptions.d.cts +1 -3
  33. package/build/legacy/mutationOptions.d.cts.map +1 -1
  34. package/build/legacy/mutationOptions.d.ts +1 -3
  35. package/build/legacy/mutationOptions.d.ts.map +1 -1
  36. package/build/legacy/mutationOptions.js +1 -2
  37. package/build/legacy/queryCache.cjs +1 -2
  38. package/build/legacy/queryCache.d.cts +1 -3
  39. package/build/legacy/queryCache.d.cts.map +1 -1
  40. package/build/legacy/queryCache.d.ts +1 -3
  41. package/build/legacy/queryCache.d.ts.map +1 -1
  42. package/build/legacy/queryCache.js +1 -2
  43. package/build/{modern/queryClient-BoBzDWAZ.d.ts → legacy/queryClient-CVne8UYf.d.ts} +57 -7
  44. package/build/legacy/queryClient-CVne8UYf.d.ts.map +1 -0
  45. package/build/{modern/queryClient-BK9W57Qu.d.cts → legacy/queryClient-DdZQqhoA.d.cts} +57 -7
  46. package/build/legacy/queryClient-DdZQqhoA.d.cts.map +1 -0
  47. package/build/legacy/queryClient.cjs +1 -2
  48. package/build/legacy/queryClient.cjs.map +1 -1
  49. package/build/legacy/queryClient.d.cts +1 -1
  50. package/build/legacy/queryClient.d.ts +1 -1
  51. package/build/legacy/queryClient.js +1 -2
  52. package/build/legacy/queryClient.js.map +1 -1
  53. package/build/{modern/queryOptions-gpn5D4rf.d.ts → legacy/queryOptions-BuZEBLtg.d.cts} +16 -16
  54. package/build/legacy/queryOptions-BuZEBLtg.d.cts.map +1 -0
  55. package/build/{modern/queryOptions-BvmZtmiU.d.cts → legacy/queryOptions-dXiBZnGk.d.ts} +16 -16
  56. package/build/legacy/queryOptions-dXiBZnGk.d.ts.map +1 -0
  57. package/build/legacy/queryOptions.cjs +1 -2
  58. package/build/legacy/queryOptions.cjs.map +1 -1
  59. package/build/legacy/queryOptions.d.cts +1 -1
  60. package/build/legacy/queryOptions.d.ts +1 -1
  61. package/build/legacy/queryOptions.js +1 -2
  62. package/build/legacy/queryOptions.js.map +1 -1
  63. package/build/legacy/{types-sdZdiLgo.d.ts → types-u_Tu5Ybs.d.cts} +1 -3
  64. package/build/legacy/{types-sdZdiLgo.d.ts.map → types-u_Tu5Ybs.d.cts.map} +1 -1
  65. package/build/{modern/types-sdZdiLgo.d.ts → legacy/types-u_Tu5Ybs.d.ts} +1 -3
  66. package/build/legacy/types-u_Tu5Ybs.d.ts.map +1 -0
  67. package/build/legacy/types.d.cts +1 -1
  68. package/build/legacy/types.d.ts +1 -1
  69. package/build/legacy/useBaseQuery.cjs +1 -2
  70. package/build/legacy/useBaseQuery.d.cts +1 -1
  71. package/build/legacy/useBaseQuery.d.ts +1 -1
  72. package/build/legacy/useBaseQuery.js +1 -2
  73. package/build/legacy/useInfiniteQuery.cjs +1 -2
  74. package/build/legacy/useInfiniteQuery.cjs.map +1 -1
  75. package/build/legacy/useInfiniteQuery.d.cts +1 -1
  76. package/build/legacy/useInfiniteQuery.d.ts +1 -1
  77. package/build/legacy/useInfiniteQuery.js +1 -2
  78. package/build/legacy/useInfiniteQuery.js.map +1 -1
  79. package/build/legacy/useIsFetching.cjs +1 -2
  80. package/build/legacy/useIsFetching.cjs.map +1 -1
  81. package/build/legacy/useIsFetching.d.cts +3 -5
  82. package/build/legacy/useIsFetching.d.cts.map +1 -1
  83. package/build/legacy/useIsFetching.d.ts +3 -5
  84. package/build/legacy/useIsFetching.d.ts.map +1 -1
  85. package/build/legacy/useIsFetching.js +1 -2
  86. package/build/legacy/useIsFetching.js.map +1 -1
  87. package/build/legacy/useMutation.cjs +1 -2
  88. package/build/legacy/useMutation.d.cts +2 -4
  89. package/build/legacy/useMutation.d.cts.map +1 -1
  90. package/build/legacy/useMutation.d.ts +2 -4
  91. package/build/legacy/useMutation.d.ts.map +1 -1
  92. package/build/legacy/useMutation.js +1 -2
  93. package/build/legacy/useMutationState.cjs +1 -2
  94. package/build/legacy/useMutationState.d.cts +2 -4
  95. package/build/legacy/useMutationState.d.cts.map +1 -1
  96. package/build/legacy/useMutationState.d.ts +2 -4
  97. package/build/legacy/useMutationState.d.ts.map +1 -1
  98. package/build/legacy/useMutationState.js +1 -2
  99. package/build/legacy/usePrefetchInfiniteQuery.cjs +1 -2
  100. package/build/legacy/usePrefetchInfiniteQuery.d.cts +2 -4
  101. package/build/legacy/usePrefetchInfiniteQuery.d.cts.map +1 -1
  102. package/build/legacy/usePrefetchInfiniteQuery.d.ts +2 -4
  103. package/build/legacy/usePrefetchInfiniteQuery.d.ts.map +1 -1
  104. package/build/legacy/usePrefetchInfiniteQuery.js +1 -2
  105. package/build/legacy/usePrefetchQuery.cjs +1 -2
  106. package/build/legacy/usePrefetchQuery.d.cts +2 -4
  107. package/build/legacy/usePrefetchQuery.d.cts.map +1 -1
  108. package/build/legacy/usePrefetchQuery.d.ts +2 -4
  109. package/build/legacy/usePrefetchQuery.d.ts.map +1 -1
  110. package/build/legacy/usePrefetchQuery.js +1 -2
  111. package/build/legacy/useQueries.cjs +1 -2
  112. package/build/legacy/useQueries.d.cts +3 -5
  113. package/build/legacy/useQueries.d.cts.map +1 -1
  114. package/build/legacy/useQueries.d.ts +3 -5
  115. package/build/legacy/useQueries.d.ts.map +1 -1
  116. package/build/legacy/useQueries.js +1 -2
  117. package/build/legacy/useQuery.cjs +1 -2
  118. package/build/legacy/useQuery.cjs.map +1 -1
  119. package/build/legacy/useQuery.d.cts +11 -12
  120. package/build/legacy/useQuery.d.cts.map +1 -1
  121. package/build/legacy/useQuery.d.ts +11 -12
  122. package/build/legacy/useQuery.d.ts.map +1 -1
  123. package/build/legacy/useQuery.js +1 -2
  124. package/build/legacy/useQuery.js.map +1 -1
  125. package/build/legacy/useQueryClient.cjs +1 -2
  126. package/build/legacy/useQueryClient.d.cts +1 -3
  127. package/build/legacy/useQueryClient.d.cts.map +1 -1
  128. package/build/legacy/useQueryClient.d.ts +1 -3
  129. package/build/legacy/useQueryClient.d.ts.map +1 -1
  130. package/build/legacy/useQueryClient.js +1 -2
  131. package/build/legacy/utils.cjs +1 -2
  132. package/build/legacy/utils.cjs.map +1 -1
  133. package/build/legacy/utils.d.cts +1 -3
  134. package/build/legacy/utils.d.cts.map +1 -1
  135. package/build/legacy/utils.d.ts +1 -3
  136. package/build/legacy/utils.d.ts.map +1 -1
  137. package/build/legacy/utils.js +1 -2
  138. package/build/legacy/utils.js.map +1 -1
  139. package/build/legacy/vueQueryPlugin.cjs +1 -2
  140. package/build/legacy/vueQueryPlugin.d.cts +2 -4
  141. package/build/legacy/vueQueryPlugin.d.cts.map +1 -1
  142. package/build/legacy/vueQueryPlugin.d.ts +2 -4
  143. package/build/legacy/vueQueryPlugin.d.ts.map +1 -1
  144. package/build/legacy/vueQueryPlugin.js +1 -2
  145. package/build/modern/devtools/devtools.cjs +1 -2
  146. package/build/modern/devtools/devtools.d.cts +1 -3
  147. package/build/modern/devtools/devtools.d.cts.map +1 -1
  148. package/build/modern/devtools/devtools.d.ts +1 -3
  149. package/build/modern/devtools/devtools.d.ts.map +1 -1
  150. package/build/modern/devtools/devtools.js +1 -2
  151. package/build/modern/devtools/utils.cjs +1 -2
  152. package/build/modern/devtools/utils.d.cts +0 -2
  153. package/build/modern/devtools/utils.d.cts.map +1 -1
  154. package/build/modern/devtools/utils.d.ts +0 -2
  155. package/build/modern/devtools/utils.d.ts.map +1 -1
  156. package/build/modern/devtools/utils.js +1 -2
  157. package/build/modern/index.d.cts +4 -4
  158. package/build/modern/index.d.ts +4 -4
  159. package/build/modern/{infiniteQueryOptions-BaoKhSzb.d.ts → infiniteQueryOptions-BLGtkUwV.d.ts} +28 -33
  160. package/build/modern/infiniteQueryOptions-BLGtkUwV.d.ts.map +1 -0
  161. package/build/modern/{infiniteQueryOptions-ClNe2-FB.d.cts → infiniteQueryOptions-oStzZOCq.d.cts} +28 -33
  162. package/build/modern/infiniteQueryOptions-oStzZOCq.d.cts.map +1 -0
  163. package/build/modern/infiniteQueryOptions.cjs +1 -2
  164. package/build/modern/infiniteQueryOptions.cjs.map +1 -1
  165. package/build/modern/infiniteQueryOptions.d.cts +1 -1
  166. package/build/modern/infiniteQueryOptions.d.ts +1 -1
  167. package/build/modern/infiniteQueryOptions.js +1 -2
  168. package/build/modern/infiniteQueryOptions.js.map +1 -1
  169. package/build/modern/mutationCache.cjs +1 -2
  170. package/build/modern/mutationCache.d.cts +1 -3
  171. package/build/modern/mutationCache.d.cts.map +1 -1
  172. package/build/modern/mutationCache.d.ts +1 -3
  173. package/build/modern/mutationCache.d.ts.map +1 -1
  174. package/build/modern/mutationCache.js +1 -2
  175. package/build/modern/mutationOptions.cjs +1 -2
  176. package/build/modern/mutationOptions.d.cts +1 -3
  177. package/build/modern/mutationOptions.d.cts.map +1 -1
  178. package/build/modern/mutationOptions.d.ts +1 -3
  179. package/build/modern/mutationOptions.d.ts.map +1 -1
  180. package/build/modern/mutationOptions.js +1 -2
  181. package/build/modern/queryCache.cjs +1 -2
  182. package/build/modern/queryCache.d.cts +1 -3
  183. package/build/modern/queryCache.d.cts.map +1 -1
  184. package/build/modern/queryCache.d.ts +1 -3
  185. package/build/modern/queryCache.d.ts.map +1 -1
  186. package/build/modern/queryCache.js +1 -2
  187. package/build/{legacy/queryClient-BoBzDWAZ.d.ts → modern/queryClient-CVne8UYf.d.ts} +57 -7
  188. package/build/modern/queryClient-CVne8UYf.d.ts.map +1 -0
  189. package/build/{legacy/queryClient-BK9W57Qu.d.cts → modern/queryClient-DdZQqhoA.d.cts} +57 -7
  190. package/build/modern/queryClient-DdZQqhoA.d.cts.map +1 -0
  191. package/build/modern/queryClient.cjs +1 -2
  192. package/build/modern/queryClient.cjs.map +1 -1
  193. package/build/modern/queryClient.d.cts +1 -1
  194. package/build/modern/queryClient.d.ts +1 -1
  195. package/build/modern/queryClient.js +1 -2
  196. package/build/modern/queryClient.js.map +1 -1
  197. package/build/{legacy/queryOptions-gpn5D4rf.d.ts → modern/queryOptions-BuZEBLtg.d.cts} +16 -16
  198. package/build/modern/queryOptions-BuZEBLtg.d.cts.map +1 -0
  199. package/build/{legacy/queryOptions-BvmZtmiU.d.cts → modern/queryOptions-dXiBZnGk.d.ts} +16 -16
  200. package/build/modern/queryOptions-dXiBZnGk.d.ts.map +1 -0
  201. package/build/modern/queryOptions.cjs +1 -2
  202. package/build/modern/queryOptions.cjs.map +1 -1
  203. package/build/modern/queryOptions.d.cts +1 -1
  204. package/build/modern/queryOptions.d.ts +1 -1
  205. package/build/modern/queryOptions.js +1 -2
  206. package/build/modern/queryOptions.js.map +1 -1
  207. package/build/{legacy/types-sdZdiLgo.d.cts → modern/types-u_Tu5Ybs.d.cts} +1 -3
  208. package/build/modern/{types-sdZdiLgo.d.ts.map → types-u_Tu5Ybs.d.cts.map} +1 -1
  209. package/build/modern/{types-sdZdiLgo.d.cts → types-u_Tu5Ybs.d.ts} +1 -3
  210. package/build/modern/types-u_Tu5Ybs.d.ts.map +1 -0
  211. package/build/modern/types.d.cts +1 -1
  212. package/build/modern/types.d.ts +1 -1
  213. package/build/modern/useBaseQuery.cjs +1 -2
  214. package/build/modern/useBaseQuery.d.cts +1 -1
  215. package/build/modern/useBaseQuery.d.ts +1 -1
  216. package/build/modern/useBaseQuery.js +1 -2
  217. package/build/modern/useInfiniteQuery.cjs +1 -2
  218. package/build/modern/useInfiniteQuery.cjs.map +1 -1
  219. package/build/modern/useInfiniteQuery.d.cts +1 -1
  220. package/build/modern/useInfiniteQuery.d.ts +1 -1
  221. package/build/modern/useInfiniteQuery.js +1 -2
  222. package/build/modern/useInfiniteQuery.js.map +1 -1
  223. package/build/modern/useIsFetching.cjs +1 -2
  224. package/build/modern/useIsFetching.cjs.map +1 -1
  225. package/build/modern/useIsFetching.d.cts +3 -5
  226. package/build/modern/useIsFetching.d.cts.map +1 -1
  227. package/build/modern/useIsFetching.d.ts +3 -5
  228. package/build/modern/useIsFetching.d.ts.map +1 -1
  229. package/build/modern/useIsFetching.js +1 -2
  230. package/build/modern/useIsFetching.js.map +1 -1
  231. package/build/modern/useMutation.cjs +1 -2
  232. package/build/modern/useMutation.d.cts +2 -4
  233. package/build/modern/useMutation.d.cts.map +1 -1
  234. package/build/modern/useMutation.d.ts +2 -4
  235. package/build/modern/useMutation.d.ts.map +1 -1
  236. package/build/modern/useMutation.js +1 -2
  237. package/build/modern/useMutationState.cjs +1 -2
  238. package/build/modern/useMutationState.d.cts +2 -4
  239. package/build/modern/useMutationState.d.cts.map +1 -1
  240. package/build/modern/useMutationState.d.ts +2 -4
  241. package/build/modern/useMutationState.d.ts.map +1 -1
  242. package/build/modern/useMutationState.js +1 -2
  243. package/build/modern/usePrefetchInfiniteQuery.cjs +1 -2
  244. package/build/modern/usePrefetchInfiniteQuery.d.cts +2 -4
  245. package/build/modern/usePrefetchInfiniteQuery.d.cts.map +1 -1
  246. package/build/modern/usePrefetchInfiniteQuery.d.ts +2 -4
  247. package/build/modern/usePrefetchInfiniteQuery.d.ts.map +1 -1
  248. package/build/modern/usePrefetchInfiniteQuery.js +1 -2
  249. package/build/modern/usePrefetchQuery.cjs +1 -2
  250. package/build/modern/usePrefetchQuery.d.cts +2 -4
  251. package/build/modern/usePrefetchQuery.d.cts.map +1 -1
  252. package/build/modern/usePrefetchQuery.d.ts +2 -4
  253. package/build/modern/usePrefetchQuery.d.ts.map +1 -1
  254. package/build/modern/usePrefetchQuery.js +1 -2
  255. package/build/modern/useQueries.cjs +1 -2
  256. package/build/modern/useQueries.d.cts +3 -5
  257. package/build/modern/useQueries.d.cts.map +1 -1
  258. package/build/modern/useQueries.d.ts +3 -5
  259. package/build/modern/useQueries.d.ts.map +1 -1
  260. package/build/modern/useQueries.js +1 -2
  261. package/build/modern/useQuery.cjs +1 -2
  262. package/build/modern/useQuery.cjs.map +1 -1
  263. package/build/modern/useQuery.d.cts +11 -12
  264. package/build/modern/useQuery.d.cts.map +1 -1
  265. package/build/modern/useQuery.d.ts +11 -12
  266. package/build/modern/useQuery.d.ts.map +1 -1
  267. package/build/modern/useQuery.js +1 -2
  268. package/build/modern/useQuery.js.map +1 -1
  269. package/build/modern/useQueryClient.cjs +1 -2
  270. package/build/modern/useQueryClient.d.cts +1 -3
  271. package/build/modern/useQueryClient.d.cts.map +1 -1
  272. package/build/modern/useQueryClient.d.ts +1 -3
  273. package/build/modern/useQueryClient.d.ts.map +1 -1
  274. package/build/modern/useQueryClient.js +1 -2
  275. package/build/modern/utils.cjs +1 -2
  276. package/build/modern/utils.cjs.map +1 -1
  277. package/build/modern/utils.d.cts +1 -3
  278. package/build/modern/utils.d.cts.map +1 -1
  279. package/build/modern/utils.d.ts +1 -3
  280. package/build/modern/utils.d.ts.map +1 -1
  281. package/build/modern/utils.js +1 -2
  282. package/build/modern/utils.js.map +1 -1
  283. package/build/modern/vueQueryPlugin.cjs +1 -2
  284. package/build/modern/vueQueryPlugin.d.cts +2 -4
  285. package/build/modern/vueQueryPlugin.d.cts.map +1 -1
  286. package/build/modern/vueQueryPlugin.d.ts +2 -4
  287. package/build/modern/vueQueryPlugin.d.ts.map +1 -1
  288. package/build/modern/vueQueryPlugin.js +1 -2
  289. package/package.json +2 -2
  290. package/src/infiniteQueryOptions.ts +28 -21
  291. package/src/queryClient.ts +68 -2
  292. package/src/queryOptions.ts +14 -12
  293. package/src/useInfiniteQuery.ts +3 -3
  294. package/src/useIsFetching.ts +2 -2
  295. package/src/useQuery.ts +7 -6
  296. package/src/utils.ts +4 -6
  297. package/build/legacy/infiniteQueryOptions-BaoKhSzb.d.ts.map +0 -1
  298. package/build/legacy/infiniteQueryOptions-ClNe2-FB.d.cts.map +0 -1
  299. package/build/legacy/queryClient-BK9W57Qu.d.cts.map +0 -1
  300. package/build/legacy/queryClient-BoBzDWAZ.d.ts.map +0 -1
  301. package/build/legacy/queryOptions-BvmZtmiU.d.cts.map +0 -1
  302. package/build/legacy/queryOptions-gpn5D4rf.d.ts.map +0 -1
  303. package/build/legacy/types-sdZdiLgo.d.cts.map +0 -1
  304. package/build/modern/infiniteQueryOptions-BaoKhSzb.d.ts.map +0 -1
  305. package/build/modern/infiniteQueryOptions-ClNe2-FB.d.cts.map +0 -1
  306. package/build/modern/queryClient-BK9W57Qu.d.cts.map +0 -1
  307. package/build/modern/queryClient-BoBzDWAZ.d.ts.map +0 -1
  308. package/build/modern/queryOptions-BvmZtmiU.d.cts.map +0 -1
  309. package/build/modern/queryOptions-gpn5D4rf.d.ts.map +0 -1
  310. package/build/modern/types-sdZdiLgo.d.cts.map +0 -1
@@ -1,5 +1,4 @@
1
- import { o as MaybeRefDeep } from "./types-sdZdiLgo.js";
2
- //#region src/utils.d.ts
1
+ import { o as MaybeRefDeep } from "./types-u_Tu5Ybs.js";
3
2
  /**
4
3
  * Base Vue injection key `VueQueryPlugin` provides the `QueryClient` under.
5
4
  * @internal
@@ -48,5 +47,4 @@ export declare function cloneDeepUnref<T>(obj: MaybeRefDeep<T>, unrefGetters?: b
48
47
  * @returns The resolved plain value.
49
48
  */
50
49
  export declare function toValueDeep<T>(source: (() => T) | MaybeRefDeep<T>): T;
51
- //#endregion
52
50
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/utils.ts"],"mappings":";;;;;;qBAOa;;;;;;;wBAQG,aAAa;;;;;;;wBAWb,YACd,OAAO,qBACP,QAAQ;;;;;;;;;;;wBAgEM,UAAU,GACxB,OAAO,aAAa,IACpB,aACE,KAAK,aAAa,IAClB,aACA,kBACG,gBACJ;;;;;;;;;;;wBAca,eAAe,GAC7B,KAAK,aAAa,IAClB,yBACC;;;;;;;wBAyDa,YAAY,GAAG,eAAe,KAAK,aAAa,KAAK"}
1
+ {"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/utils.ts"],"mappings":";;;;;qBAOa;;;;;;;wBAQG,aAAa;;;;;;;wBAWb,YACd,OAAO,qBACP,QAAQ;;;;;;;;;;;wBA+DM,UAAU,GACxB,OAAO,aAAa,IACpB,aACE,KAAK,aAAa,IAClB,aACA,kBACG,gBACJ;;;;;;;;;;;wBAca,eAAe,GAC7B,KAAK,aAAa,IAClB,yBACC;;;;;;;wBAwDa,YAAY,GAAG,eAAe,KAAK,aAAa,KAAK"}
@@ -1,5 +1,5 @@
1
1
  import { isRef, unref } from "vue-demi";
2
- //#region src/utils.ts
2
+ // src/utils.ts
3
3
  /**
4
4
  * Base Vue injection key `VueQueryPlugin` provides the `QueryClient` under.
5
5
  * @internal
@@ -107,7 +107,6 @@ function isFunction(value) {
107
107
  function toValueDeep(source) {
108
108
  return isFunction(source) ? source() : cloneDeepUnref(source);
109
109
  }
110
- //#endregion
111
110
  export { VUE_QUERY_CLIENT, cloneDeep, cloneDeepUnref, getClientKey, toValueDeep, updateState };
112
111
 
113
112
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":[],"sources":["../../src/utils.ts"],"sourcesContent":["import { isRef, unref } from 'vue-demi'\nimport type { MaybeRefDeep } from './types'\n\n/**\n * Base Vue injection key `VueQueryPlugin` provides the `QueryClient` under.\n * @internal\n */\nexport const VUE_QUERY_CLIENT = 'VUE_QUERY_CLIENT'\n\n/**\n * Builds the injection key `useQueryClient`/`VueQueryPlugin` use for a given `queryClientKey`.\n * @internal\n * @param key - The `queryClientKey`. Without it, the base key is used.\n * @returns The injection key.\n */\nexport function getClientKey(key?: string) {\n const suffix = key ? `:${key}` : ''\n return `${VUE_QUERY_CLIENT}${suffix}`\n}\n\n/**\n * Copies each property from `update` onto `state`, in place, for every key already on `state`.\n * @internal\n * @param state - The object to update.\n * @param update - The object to copy the values from.\n */\nexport function updateState(\n state: Record<string, any>,\n update: Record<string, any>,\n): void {\n Object.keys(state).forEach((key) => {\n state[key] = update[key]\n })\n}\n\n/**\n * Recursive implementation of {@link cloneDeep}, which also tracks the key and nesting level of\n * the current node for `customize`.\n * @param value - The value to clone.\n * @param customize - Called for every node with its key and nesting level. If it returns a value\n * other than `undefined`, that value is used instead of recursing.\n * @param currentKey - The key of the current node.\n * @param currentLevel - The nesting level of the current node.\n * @returns The cloned value.\n */\nfunction _cloneDeep<T>(\n value: MaybeRefDeep<T>,\n customize?: (\n val: MaybeRefDeep<T>,\n key: string,\n level: number,\n ) => T | undefined,\n currentKey: string = '',\n currentLevel: number = 0,\n): T {\n if (customize) {\n const result = customize(value, currentKey, currentLevel)\n if (result === undefined && isRef(value)) {\n return result as T\n }\n if (result !== undefined) {\n return result\n }\n }\n\n if (Array.isArray(value)) {\n return value.map((val, index) =>\n _cloneDeep(val, customize, String(index), currentLevel + 1),\n ) as unknown as T\n }\n\n if (typeof value === 'object' && isPlainObject(value)) {\n const entries = Object.entries(value).map(([key, val]) => [\n key,\n _cloneDeep(val, customize, key, currentLevel + 1),\n ])\n return Object.fromEntries(entries)\n }\n\n return value as T\n}\n\n/**\n * Deep-clones `value`, recursing into arrays and plain objects. `customize`, if provided, can\n * intercept any node (by key and nesting level) and substitute its own return value instead of recursing\n * further.\n * @internal\n * @param value - The value to clone.\n * @param customize - Called for every node with its key and nesting level. If it returns a value\n * other than `undefined`, that value is used instead of recursing.\n * @returns The cloned value.\n */\nexport function cloneDeep<T>(\n value: MaybeRefDeep<T>,\n customize?: (\n val: MaybeRefDeep<T>,\n key: string,\n level: number,\n ) => T | undefined,\n): T {\n return _cloneDeep(value, customize)\n}\n\n/**\n * Deep-clones `value` like {@link cloneDeep}, additionally unwrapping any `ref`s it encounters (and,\n * if `unrefGetters` is `true`, calling any functions it encounters and unwrapping their result too). Always\n * resolves `queryKey` this way, regardless of `unrefGetters` — this is what lets a `queryKey` containing `ref`s\n * be passed straight through to `@tanstack/query-core`.\n * @internal\n * @param obj - The value to clone.\n * @param unrefGetters - Whether to also call functions and unwrap their result.\n * @returns The cloned value, with `ref`s unwrapped.\n */\nexport function cloneDeepUnref<T>(\n obj: MaybeRefDeep<T>,\n unrefGetters = false,\n): T {\n return cloneDeep(obj, (val, key, level) => {\n // Check if we're at the top level and the key is 'queryKey'\n //\n // If so, take the recursive descent where we resolve\n // getters to values as well as refs.\n if (level === 1 && key === 'queryKey') {\n return cloneDeepUnref(val, true)\n }\n\n // Resolve getters to values if specified.\n if (unrefGetters && isFunction(val)) {\n // Cast due to older TS versions not allowing calling\n // on certain intersection types.\n return cloneDeepUnref((val as Function)(), unrefGetters)\n }\n\n // Unref refs and continue to recurse into the value.\n if (isRef(val)) {\n return cloneDeepUnref(unref(val), unrefGetters)\n }\n\n return undefined\n })\n}\n\n/**\n * Checks whether a value is a plain object, created with an object literal or\n * `Object.create(null)`.\n * @param value - The value to check.\n * @returns `true` if `value` is a plain object.\n */\n// oxlint-disable-next-line typescript/no-wrapper-object-types\nfunction isPlainObject(value: unknown): value is Object {\n if (Object.prototype.toString.call(value) !== '[object Object]') {\n return false\n }\n\n const prototype = Object.getPrototypeOf(value)\n return prototype === null || prototype === Object.prototype\n}\n\n/**\n * Checks whether a value is a function.\n * @param value - The value to check.\n * @returns `true` if `value` is a function.\n */\nfunction isFunction(value: unknown): value is Function {\n return typeof value === 'function'\n}\n\n/**\n * Resolves `source` to a plain value — calls it if it's a function, otherwise deep-unwraps it.\n * @internal\n * @param source - A getter, or a value that may contain `ref`s.\n * @returns The resolved plain value.\n */\nexport function toValueDeep<T>(source: (() => T) | MaybeRefDeep<T>): T {\n return isFunction(source) ? source() : cloneDeepUnref(source)\n}\n"],"mappings":";;;;;;AAOA,MAAa,mBAAmB;;;;;;;AAQhC,SAAgB,aAAa,KAAc;CACzC,MAAM,SAAS,MAAM,IAAI,QAAQ;CACjC,OAAO,GAAG,mBAAmB;AAC/B;;;;;;;AAQA,SAAgB,YACd,OACA,QACM;CACN,OAAO,KAAK,KAAK,CAAC,CAAC,SAAS,QAAQ;EAClC,MAAM,OAAO,OAAO;CACtB,CAAC;AACH;;;;;;;;;;;AAYA,SAAS,WACP,OACA,WAKA,aAAqB,IACrB,eAAuB,GACpB;CACH,IAAI,WAAW;EACb,MAAM,SAAS,UAAU,OAAO,YAAY,YAAY;EACxD,IAAI,WAAW,KAAA,KAAa,MAAM,KAAK,GACrC,OAAO;EAET,IAAI,WAAW,KAAA,GACb,OAAO;CAEX;CAEA,IAAI,MAAM,QAAQ,KAAK,GACrB,OAAO,MAAM,KAAK,KAAK,UACrB,WAAW,KAAK,WAAW,OAAO,KAAK,GAAG,eAAe,CAAC,CAC5D;CAGF,IAAI,OAAO,UAAU,YAAY,cAAc,KAAK,GAAG;EACrD,MAAM,UAAU,OAAO,QAAQ,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,SAAS,CACxD,KACA,WAAW,KAAK,WAAW,KAAK,eAAe,CAAC,CAClD,CAAC;EACD,OAAO,OAAO,YAAY,OAAO;CACnC;CAEA,OAAO;AACT;;;;;;;;;;;AAYA,SAAgB,UACd,OACA,WAKG;CACH,OAAO,WAAW,OAAO,SAAS;AACpC;;;;;;;;;;;AAYA,SAAgB,eACd,KACA,eAAe,OACZ;CACH,OAAO,UAAU,MAAM,KAAK,KAAK,UAAU;EAKzC,IAAI,UAAU,KAAK,QAAQ,YACzB,OAAO,eAAe,KAAK,IAAI;EAIjC,IAAI,gBAAgB,WAAW,GAAG,GAGhC,OAAO,eAAgB,IAAiB,GAAG,YAAY;EAIzD,IAAI,MAAM,GAAG,GACX,OAAO,eAAe,MAAM,GAAG,GAAG,YAAY;CAIlD,CAAC;AACH;;;;;;;AASA,SAAS,cAAc,OAAiC;CACtD,IAAI,OAAO,UAAU,SAAS,KAAK,KAAK,MAAM,mBAC5C,OAAO;CAGT,MAAM,YAAY,OAAO,eAAe,KAAK;CAC7C,OAAO,cAAc,QAAQ,cAAc,OAAO;AACpD;;;;;;AAOA,SAAS,WAAW,OAAmC;CACrD,OAAO,OAAO,UAAU;AAC1B;;;;;;;AAQA,SAAgB,YAAe,QAAwC;CACrE,OAAO,WAAW,MAAM,IAAI,OAAO,IAAI,eAAe,MAAM;AAC9D"}
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../src/utils.ts"],"sourcesContent":["import { isRef, unref } from 'vue-demi'\nimport type { MaybeRefDeep } from './types'\n\n/**\n * Base Vue injection key `VueQueryPlugin` provides the `QueryClient` under.\n * @internal\n */\nexport const VUE_QUERY_CLIENT = 'VUE_QUERY_CLIENT'\n\n/**\n * Builds the injection key `useQueryClient`/`VueQueryPlugin` use for a given `queryClientKey`.\n * @internal\n * @param key - The `queryClientKey`. Without it, the base key is used.\n * @returns The injection key.\n */\nexport function getClientKey(key?: string) {\n const suffix = key ? `:${key}` : ''\n return `${VUE_QUERY_CLIENT}${suffix}`\n}\n\n/**\n * Copies each property from `update` onto `state`, in place, for every key already on `state`.\n * @internal\n * @param state - The object to update.\n * @param update - The object to copy the values from.\n */\nexport function updateState(\n state: Record<string, any>,\n update: Record<string, any>,\n): void {\n Object.keys(state).forEach((key) => {\n state[key] = update[key]\n })\n}\n\n/**\n * Recursive implementation of {@link cloneDeep}, which also tracks the key and nesting level of\n * the current node for `customize`.\n * @param value - The value to clone.\n * @param customize - Called for every node with its key and nesting level. If it returns a value\n * other than `undefined`, that value is used instead of recursing.\n * @param currentKey - The key of the current node.\n * @param currentLevel - The nesting level of the current node.\n * @returns The cloned value.\n */\nfunction _cloneDeep<T>(\n value: MaybeRefDeep<T>,\n customize?: (\n val: MaybeRefDeep<T>,\n key: string,\n level: number,\n ) => T | undefined,\n currentKey: string = '',\n currentLevel: number = 0,\n): T {\n if (customize) {\n const result = customize(value, currentKey, currentLevel)\n if (result === undefined && isRef(value)) {\n return result as T\n }\n if (result !== undefined) {\n return result\n }\n }\n\n if (Array.isArray(value)) {\n return value.map((val, index) =>\n _cloneDeep(val, customize, String(index), currentLevel + 1),\n ) as unknown as T\n }\n\n if (typeof value === 'object' && isPlainObject(value)) {\n const entries = Object.entries(value as Record<string, any>).map(\n ([key, val]) => [key, _cloneDeep(val, customize, key, currentLevel + 1)],\n )\n return Object.fromEntries(entries)\n }\n\n return value as T\n}\n\n/**\n * Deep-clones `value`, recursing into arrays and plain objects. `customize`, if provided, can\n * intercept any node (by key and nesting level) and substitute its own return value instead of recursing\n * further.\n * @internal\n * @param value - The value to clone.\n * @param customize - Called for every node with its key and nesting level. If it returns a value\n * other than `undefined`, that value is used instead of recursing.\n * @returns The cloned value.\n */\nexport function cloneDeep<T>(\n value: MaybeRefDeep<T>,\n customize?: (\n val: MaybeRefDeep<T>,\n key: string,\n level: number,\n ) => T | undefined,\n): T {\n return _cloneDeep(value, customize)\n}\n\n/**\n * Deep-clones `value` like {@link cloneDeep}, additionally unwrapping any `ref`s it encounters (and,\n * if `unrefGetters` is `true`, calling any functions it encounters and unwrapping their result too). Always\n * resolves `queryKey` this way, regardless of `unrefGetters` — this is what lets a `queryKey` containing `ref`s\n * be passed straight through to `@tanstack/query-core`.\n * @internal\n * @param obj - The value to clone.\n * @param unrefGetters - Whether to also call functions and unwrap their result.\n * @returns The cloned value, with `ref`s unwrapped.\n */\nexport function cloneDeepUnref<T>(\n obj: MaybeRefDeep<T>,\n unrefGetters = false,\n): T {\n return cloneDeep(obj, (val, key, level) => {\n // Check if we're at the top level and the key is 'queryKey'\n //\n // If so, take the recursive descent where we resolve\n // getters to values as well as refs.\n if (level === 1 && key === 'queryKey') {\n return cloneDeepUnref(val, true)\n }\n\n // Resolve getters to values if specified.\n if (unrefGetters && isFunction(val)) {\n // Cast due to older TS versions not allowing calling\n // on certain intersection types.\n return cloneDeepUnref((val as Function)(), unrefGetters)\n }\n\n // Unref refs and continue to recurse into the value.\n if (isRef(val)) {\n return cloneDeepUnref(unref(val), unrefGetters)\n }\n\n return undefined\n })\n}\n\n/**\n * Checks whether a value is a plain object, created with an object literal or\n * `Object.create(null)`.\n * @param value - The value to check.\n * @returns `true` if `value` is a plain object.\n */\nfunction isPlainObject(value: unknown): value is Record<PropertyKey, unknown> {\n if (Object.prototype.toString.call(value) !== '[object Object]') {\n return false\n }\n\n const prototype = Object.getPrototypeOf(value)\n return prototype === null || prototype === Object.prototype\n}\n\n/**\n * Checks whether a value is a function.\n * @param value - The value to check.\n * @returns `true` if `value` is a function.\n */\nfunction isFunction(value: unknown): value is Function {\n return typeof value === 'function'\n}\n\n/**\n * Resolves `source` to a plain value — calls it if it's a function, otherwise deep-unwraps it.\n * @internal\n * @param source - A getter, or a value that may contain `ref`s.\n * @returns The resolved plain value.\n */\nexport function toValueDeep<T>(source: (() => T) | MaybeRefDeep<T>): T {\n return isFunction(source) ? source() : cloneDeepUnref(source)\n}\n"],"mappings":";;;;;;AAOA,MAAa,mBAAmB;;;;;;;AAQhC,SAAgB,aAAa,KAAc;CACzC,MAAM,SAAS,MAAM,IAAI,QAAQ;CACjC,OAAO,GAAG,mBAAmB;AAC/B;;;;;;;AAQA,SAAgB,YACd,OACA,QACM;CACN,OAAO,KAAK,KAAK,CAAC,CAAC,SAAS,QAAQ;EAClC,MAAM,OAAO,OAAO;CACtB,CAAC;AACH;;;;;;;;;;;AAYA,SAAS,WACP,OACA,WAKA,aAAqB,IACrB,eAAuB,GACpB;CACH,IAAI,WAAW;EACb,MAAM,SAAS,UAAU,OAAO,YAAY,YAAY;EACxD,IAAI,WAAW,KAAA,KAAa,MAAM,KAAK,GACrC,OAAO;EAET,IAAI,WAAW,KAAA,GACb,OAAO;CAEX;CAEA,IAAI,MAAM,QAAQ,KAAK,GACrB,OAAO,MAAM,KAAK,KAAK,UACrB,WAAW,KAAK,WAAW,OAAO,KAAK,GAAG,eAAe,CAAC,CAC5D;CAGF,IAAI,OAAO,UAAU,YAAY,cAAc,KAAK,GAAG;EACrD,MAAM,UAAU,OAAO,QAAQ,KAA4B,CAAC,CAAC,KAC1D,CAAC,KAAK,SAAS,CAAC,KAAK,WAAW,KAAK,WAAW,KAAK,eAAe,CAAC,CAAC,CACzE;EACA,OAAO,OAAO,YAAY,OAAO;CACnC;CAEA,OAAO;AACT;;;;;;;;;;;AAYA,SAAgB,UACd,OACA,WAKG;CACH,OAAO,WAAW,OAAO,SAAS;AACpC;;;;;;;;;;;AAYA,SAAgB,eACd,KACA,eAAe,OACZ;CACH,OAAO,UAAU,MAAM,KAAK,KAAK,UAAU;EAKzC,IAAI,UAAU,KAAK,QAAQ,YACzB,OAAO,eAAe,KAAK,IAAI;EAIjC,IAAI,gBAAgB,WAAW,GAAG,GAGhC,OAAO,eAAgB,IAAiB,GAAG,YAAY;EAIzD,IAAI,MAAM,GAAG,GACX,OAAO,eAAe,MAAM,GAAG,GAAG,YAAY;CAIlD,CAAC;AACH;;;;;;;AAQA,SAAS,cAAc,OAAuD;CAC5E,IAAI,OAAO,UAAU,SAAS,KAAK,KAAK,MAAM,mBAC5C,OAAO;CAGT,MAAM,YAAY,OAAO,eAAe,KAAK;CAC7C,OAAO,cAAc,QAAQ,cAAc,OAAO;AACpD;;;;;;AAOA,SAAS,WAAW,OAAmC;CACrD,OAAO,OAAO,UAAU;AAC1B;;;;;;;AAQA,SAAgB,YAAe,QAAwC;CACrE,OAAO,WAAW,MAAM,IAAI,OAAO,IAAI,eAAe,MAAM;AAC9D"}
@@ -4,7 +4,7 @@ const require_queryClient = require("./queryClient.cjs");
4
4
  const require_devtools_devtools = require("./devtools/devtools.cjs");
5
5
  let _tanstack_query_core = require("@tanstack/query-core");
6
6
  let vue_demi = require("vue-demi");
7
- //#region src/vueQueryPlugin.ts
7
+ // src/vueQueryPlugin.ts
8
8
  /**
9
9
  * Installs a `QueryClient` on the Vue app, making it available to every descendant component through
10
10
  * `useQueryClient` — the Vue equivalent of React's `QueryClientProvider`, but wired up as an app-level plugin
@@ -88,7 +88,6 @@ const VueQueryPlugin = { install: (app, options = {}) => {
88
88
  }
89
89
  }
90
90
  } };
91
- //#endregion
92
91
  exports.VueQueryPlugin = VueQueryPlugin;
93
92
 
94
93
  //# sourceMappingURL=vueQueryPlugin.cjs.map
@@ -1,6 +1,5 @@
1
- import { u as QueryClientConfig } from "./types-sdZdiLgo.cjs";
2
- import { t as QueryClient } from "./queryClient-BK9W57Qu.cjs";
3
- //#region src/vueQueryPlugin.d.ts
1
+ import { u as QueryClientConfig } from "./types-u_Tu5Ybs.cjs";
2
+ import { t as QueryClient } from "./queryClient-DdZQqhoA.cjs";
4
3
  type ClientPersister = (client: QueryClient) => [() => void, Promise<void>];
5
4
  interface CommonOptions {
6
5
  /** Enables the legacy Vue Devtools v6 plugin panel. Prefer `@tanstack/vue-query-devtools` for Vue 3 apps. */
@@ -65,5 +64,4 @@ export type VueQueryPluginOptions = ConfigOptions | ClientOptions;
65
64
  export declare const VueQueryPlugin: {
66
65
  install: (app: any, options?: VueQueryPluginOptions) => void;
67
66
  };
68
- //#endregion
69
67
  //# sourceMappingURL=vueQueryPlugin.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vueQueryPlugin.d.cts","names":[],"sources":["../../src/vueQueryPlugin.ts"],"mappings":";;;KAQK,mBAAmB,QAAQ,6BAA6B;UAEnD;;EAER;;;;;EAKA;;;;;EAKA,kBAAkB;;EAElB,4BAA4B,QAAQ;;UAG5B,sBAAsB;;EAE9B,oBAAoB;;UAGZ,sBAAsB;;EAE9B,cAAc;;;;;;YAOJ,wBAAwB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiCvC;EACI,UAAA,UAAG,UAAW"}
1
+ {"version":3,"file":"vueQueryPlugin.d.cts","names":[],"sources":["../../src/vueQueryPlugin.ts"],"mappings":";;KAQK,mBAAmB,QAAQ,6BAA6B;UAEnD;;EAER;;;;;EAKA;;;;;EAKA,kBAAkB;;EAElB,4BAA4B,QAAQ;;UAG5B,sBAAsB;;EAE9B,oBAAoB;;UAGZ,sBAAsB;;EAE9B,cAAc;;;;;;YAOJ,wBAAwB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiCvC;EACI,UAAA,UAAG,UAAW"}
@@ -1,6 +1,5 @@
1
- import { u as QueryClientConfig } from "./types-sdZdiLgo.js";
2
- import { t as QueryClient } from "./queryClient-BoBzDWAZ.js";
3
- //#region src/vueQueryPlugin.d.ts
1
+ import { u as QueryClientConfig } from "./types-u_Tu5Ybs.js";
2
+ import { t as QueryClient } from "./queryClient-CVne8UYf.js";
4
3
  type ClientPersister = (client: QueryClient) => [() => void, Promise<void>];
5
4
  interface CommonOptions {
6
5
  /** Enables the legacy Vue Devtools v6 plugin panel. Prefer `@tanstack/vue-query-devtools` for Vue 3 apps. */
@@ -65,5 +64,4 @@ export type VueQueryPluginOptions = ConfigOptions | ClientOptions;
65
64
  export declare const VueQueryPlugin: {
66
65
  install: (app: any, options?: VueQueryPluginOptions) => void;
67
66
  };
68
- //#endregion
69
67
  //# sourceMappingURL=vueQueryPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vueQueryPlugin.d.ts","names":[],"sources":["../../src/vueQueryPlugin.ts"],"mappings":";;;KAQK,mBAAmB,QAAQ,6BAA6B;UAEnD;;EAER;;;;;EAKA;;;;;EAKA,kBAAkB;;EAElB,4BAA4B,QAAQ;;UAG5B,sBAAsB;;EAE9B,oBAAoB;;UAGZ,sBAAsB;;EAE9B,cAAc;;;;;;YAOJ,wBAAwB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiCvC;EACI,UAAA,UAAG,UAAW"}
1
+ {"version":3,"file":"vueQueryPlugin.d.ts","names":[],"sources":["../../src/vueQueryPlugin.ts"],"mappings":";;KAQK,mBAAmB,QAAQ,6BAA6B;UAEnD;;EAER;;;;;EAKA;;;;;EAKA,kBAAkB;;EAElB,4BAA4B,QAAQ;;UAG5B,sBAAsB;;EAE9B,oBAAoB;;UAGZ,sBAAsB;;EAE9B,cAAc;;;;;;YAOJ,wBAAwB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiCvC;EACI,UAAA,UAAG,UAAW"}
@@ -3,7 +3,7 @@ import { QueryClient as QueryClient$1 } from "./queryClient.js";
3
3
  import { setupDevtools } from "./devtools/devtools.js";
4
4
  import { environmentManager } from "@tanstack/query-core";
5
5
  import { isVue2 } from "vue-demi";
6
- //#region src/vueQueryPlugin.ts
6
+ // src/vueQueryPlugin.ts
7
7
  /**
8
8
  * Installs a `QueryClient` on the Vue app, making it available to every descendant component through
9
9
  * `useQueryClient` — the Vue equivalent of React's `QueryClientProvider`, but wired up as an app-level plugin
@@ -87,7 +87,6 @@ const VueQueryPlugin = { install: (app, options = {}) => {
87
87
  }
88
88
  }
89
89
  } };
90
- //#endregion
91
90
  export { VueQueryPlugin };
92
91
 
93
92
  //# sourceMappingURL=vueQueryPlugin.js.map
@@ -3,7 +3,7 @@ const require_devtools_utils = require("./utils.cjs");
3
3
  let _tanstack_query_core = require("@tanstack/query-core");
4
4
  let _vue_devtools_api = require("@vue/devtools-api");
5
5
  let _tanstack_match_sorter_utils = require("@tanstack/match-sorter-utils");
6
- //#region src/devtools/devtools.ts
6
+ // src/devtools/devtools.ts
7
7
  const pluginId = "vue-query";
8
8
  const pluginName = "Vue Query";
9
9
  /**
@@ -204,7 +204,6 @@ function setupDevtools(app, queryClient) {
204
204
  });
205
205
  });
206
206
  }
207
- //#endregion
208
207
  exports.setupDevtools = setupDevtools;
209
208
 
210
209
  //# sourceMappingURL=devtools.cjs.map
@@ -1,5 +1,4 @@
1
- import { t as QueryClient } from "../queryClient-BK9W57Qu.cjs";
2
- //#region src/devtools/devtools.d.ts
1
+ import { t as QueryClient } from "../queryClient-DdZQqhoA.cjs";
3
2
  /**
4
3
  * Registers the Vue Query plugin with the Vue devtools, adding a query inspector and a timeline
5
4
  * layer for query cache events.
@@ -7,5 +6,4 @@ import { t as QueryClient } from "../queryClient-BK9W57Qu.cjs";
7
6
  * @param queryClient - The client whose query cache is shown in the devtools.
8
7
  */
9
8
  export declare function setupDevtools(app: any, queryClient: QueryClient): void;
10
- //#endregion
11
9
  //# sourceMappingURL=devtools.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"devtools.d.cts","names":[],"sources":["../../../src/devtools/devtools.ts"],"mappings":";;;;;;;;wBAsBgB,cAAc,UAAU,aAAa"}
1
+ {"version":3,"file":"devtools.d.cts","names":[],"sources":["../../../src/devtools/devtools.ts"],"mappings":";;;;;;;wBAsBgB,cAAc,UAAU,aAAa"}
@@ -1,5 +1,4 @@
1
- import { t as QueryClient } from "../queryClient-BoBzDWAZ.js";
2
- //#region src/devtools/devtools.d.ts
1
+ import { t as QueryClient } from "../queryClient-CVne8UYf.js";
3
2
  /**
4
3
  * Registers the Vue Query plugin with the Vue devtools, adding a query inspector and a timeline
5
4
  * layer for query cache events.
@@ -7,5 +6,4 @@ import { t as QueryClient } from "../queryClient-BoBzDWAZ.js";
7
6
  * @param queryClient - The client whose query cache is shown in the devtools.
8
7
  */
9
8
  export declare function setupDevtools(app: any, queryClient: QueryClient): void;
10
- //#endregion
11
9
  //# sourceMappingURL=devtools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"devtools.d.ts","names":[],"sources":["../../../src/devtools/devtools.ts"],"mappings":";;;;;;;;wBAsBgB,cAAc,UAAU,aAAa"}
1
+ {"version":3,"file":"devtools.d.ts","names":[],"sources":["../../../src/devtools/devtools.ts"],"mappings":";;;;;;;wBAsBgB,cAAc,UAAU,aAAa"}
@@ -2,7 +2,7 @@ import { getQueryStateLabel, getQueryStatusBg, getQueryStatusFg, sortFns } from
2
2
  import { onlineManager } from "@tanstack/query-core";
3
3
  import { setupDevtoolsPlugin } from "@vue/devtools-api";
4
4
  import { rankItem } from "@tanstack/match-sorter-utils";
5
- //#region src/devtools/devtools.ts
5
+ // src/devtools/devtools.ts
6
6
  const pluginId = "vue-query";
7
7
  const pluginName = "Vue Query";
8
8
  /**
@@ -203,7 +203,6 @@ function setupDevtools(app, queryClient) {
203
203
  });
204
204
  });
205
205
  }
206
- //#endregion
207
206
  export { setupDevtools };
208
207
 
209
208
  //# sourceMappingURL=devtools.js.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region src/devtools/utils.ts
2
+ // src/devtools/utils.ts
3
3
  /**
4
4
  * Returns the devtools state of a query: fetching, paused, inactive (no observers), stale, or fresh,
5
5
  * checked in that order.
@@ -59,7 +59,6 @@ const sortFns = {
59
59
  "Query Hash": queryHashSort,
60
60
  "Last Updated": dateSort
61
61
  };
62
- //#endregion
63
62
  exports.getQueryState = getQueryState;
64
63
  exports.getQueryStateLabel = getQueryStateLabel;
65
64
  exports.getQueryStatusBg = getQueryStatusBg;
@@ -1,5 +1,4 @@
1
1
  import { Query } from "@tanstack/query-core";
2
- //#region src/devtools/utils.d.ts
3
2
  type SortFn = (a: Query, b: Query) => number;
4
3
  declare enum QueryState$1 {
5
4
  Fetching = 0,
@@ -34,5 +33,4 @@ export declare function getQueryStatusFg(query: Query): number;
34
33
  */
35
34
  export declare function getQueryStatusBg(query: Query): number;
36
35
  export declare const sortFns: Record<string, SortFn>;
37
- //#endregion
38
36
  //# sourceMappingURL=utils.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.cts","names":["QueryState"],"sources":["../../../src/devtools/utils.ts"],"mappings":";;KAEK,UAAU,GAAG,OAAO,GAAG;aAEvBA;EACH;EACA;EACA;EACA;EACA;;;;;;;;wBASc,cAAc,OAAO,QAAQA;;;;;;wBAsB7B,mBAAmB,OAAO;;;;;;wBAwB1B,iBAAiB,OAAO;;;;;;wBAexB,iBAAiB,OAAO;qBAgC3B,SAAS,eAAe"}
1
+ {"version":3,"file":"utils.d.cts","names":["QueryState"],"sources":["../../../src/devtools/utils.ts"],"mappings":";KAEK,UAAU,GAAG,OAAO,GAAG;aAEvBA;EACH;EACA;EACA;EACA;EACA;;;;;;;;wBASc,cAAc,OAAO,QAAQA;;;;;;wBAsB7B,mBAAmB,OAAO;;;;;;wBAwB1B,iBAAiB,OAAO;;;;;;wBAexB,iBAAiB,OAAO;qBAgC3B,SAAS,eAAe"}
@@ -1,5 +1,4 @@
1
1
  import { Query } from "@tanstack/query-core";
2
- //#region src/devtools/utils.d.ts
3
2
  type SortFn = (a: Query, b: Query) => number;
4
3
  declare enum QueryState$1 {
5
4
  Fetching = 0,
@@ -34,5 +33,4 @@ export declare function getQueryStatusFg(query: Query): number;
34
33
  */
35
34
  export declare function getQueryStatusBg(query: Query): number;
36
35
  export declare const sortFns: Record<string, SortFn>;
37
- //#endregion
38
36
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","names":["QueryState"],"sources":["../../../src/devtools/utils.ts"],"mappings":";;KAEK,UAAU,GAAG,OAAO,GAAG;aAEvBA;EACH;EACA;EACA;EACA;EACA;;;;;;;;wBASc,cAAc,OAAO,QAAQA;;;;;;wBAsB7B,mBAAmB,OAAO;;;;;;wBAwB1B,iBAAiB,OAAO;;;;;;wBAexB,iBAAiB,OAAO;qBAgC3B,SAAS,eAAe"}
1
+ {"version":3,"file":"utils.d.ts","names":["QueryState"],"sources":["../../../src/devtools/utils.ts"],"mappings":";KAEK,UAAU,GAAG,OAAO,GAAG;aAEvBA;EACH;EACA;EACA;EACA;EACA;;;;;;;;wBASc,cAAc,OAAO,QAAQA;;;;;;wBAsB7B,mBAAmB,OAAO;;;;;;wBAwB1B,iBAAiB,OAAO;;;;;;wBAexB,iBAAiB,OAAO;qBAgC3B,SAAS,eAAe"}
@@ -1,4 +1,4 @@
1
- //#region src/devtools/utils.ts
1
+ // src/devtools/utils.ts
2
2
  /**
3
3
  * Returns the devtools state of a query: fetching, paused, inactive (no observers), stale, or fresh,
4
4
  * checked in that order.
@@ -58,7 +58,6 @@ const sortFns = {
58
58
  "Query Hash": queryHashSort,
59
59
  "Last Updated": dateSort
60
60
  };
61
- //#endregion
62
61
  export { getQueryState, getQueryStateLabel, getQueryStatusBg, getQueryStatusFg, sortFns };
63
62
 
64
63
  //# sourceMappingURL=utils.js.map
@@ -1,10 +1,10 @@
1
- import { c as MutationOptions } from "./types-sdZdiLgo.cjs";
2
- import { a as UndefinedInitialQueryOptionsWithDataTag, i as UndefinedInitialQueryOptions, n as DefinedInitialQueryOptionsWithDataTag, o as UseQueryOptions, r as QueryOptions, s as queryOptions, t as DefinedInitialQueryOptions } from "./queryOptions-BvmZtmiU.cjs";
3
- import { t as QueryClient } from "./queryClient-BK9W57Qu.cjs";
1
+ import { c as MutationOptions } from "./types-u_Tu5Ybs.cjs";
2
+ import { a as UndefinedInitialQueryOptionsWithDataTag, i as UndefinedInitialQueryOptions, n as DefinedInitialQueryOptionsWithDataTag, o as UseQueryOptions, r as QueryOptions, s as queryOptions, t as DefinedInitialQueryOptions } from "./queryOptions-BuZEBLtg.cjs";
3
+ import { t as QueryClient } from "./queryClient-DdZQqhoA.cjs";
4
4
  import { useQueryClient } from "./useQueryClient.cjs";
5
5
  import { VueQueryPlugin, VueQueryPluginOptions } from "./vueQueryPlugin.cjs";
6
6
  import { QueryCache } from "./queryCache.cjs";
7
- import { a as UseInfiniteQueryReturnType, i as UseInfiniteQueryOptions, n as UndefinedInitialDataInfiniteOptions, o as useInfiniteQuery, r as infiniteQueryOptions, t as DefinedInitialDataInfiniteOptions } from "./infiniteQueryOptions-ClNe2-FB.cjs";
7
+ import { a as UseInfiniteQueryReturnType, i as UseInfiniteQueryOptions, n as UndefinedInitialDataInfiniteOptions, o as useInfiniteQuery, r as infiniteQueryOptions, t as DefinedInitialDataInfiniteOptions } from "./infiniteQueryOptions-oStzZOCq.cjs";
8
8
  import { MutationCache } from "./mutationCache.cjs";
9
9
  import { mutationOptions } from "./mutationOptions.cjs";
10
10
  import { UseQueryDefinedReturnType, UseQueryReturnType, useQuery } from "./useQuery.cjs";
@@ -1,10 +1,10 @@
1
- import { c as MutationOptions } from "./types-sdZdiLgo.js";
2
- import { a as UndefinedInitialQueryOptionsWithDataTag, i as UndefinedInitialQueryOptions, n as DefinedInitialQueryOptionsWithDataTag, o as UseQueryOptions, r as QueryOptions, s as queryOptions, t as DefinedInitialQueryOptions } from "./queryOptions-gpn5D4rf.js";
3
- import { t as QueryClient } from "./queryClient-BoBzDWAZ.js";
1
+ import { c as MutationOptions } from "./types-u_Tu5Ybs.js";
2
+ import { a as UndefinedInitialQueryOptionsWithDataTag, i as UndefinedInitialQueryOptions, n as DefinedInitialQueryOptionsWithDataTag, o as UseQueryOptions, r as QueryOptions, s as queryOptions, t as DefinedInitialQueryOptions } from "./queryOptions-dXiBZnGk.js";
3
+ import { t as QueryClient } from "./queryClient-CVne8UYf.js";
4
4
  import { useQueryClient } from "./useQueryClient.js";
5
5
  import { VueQueryPlugin, VueQueryPluginOptions } from "./vueQueryPlugin.js";
6
6
  import { QueryCache } from "./queryCache.js";
7
- import { a as UseInfiniteQueryReturnType, i as UseInfiniteQueryOptions, n as UndefinedInitialDataInfiniteOptions, o as useInfiniteQuery, r as infiniteQueryOptions, t as DefinedInitialDataInfiniteOptions } from "./infiniteQueryOptions-BaoKhSzb.js";
7
+ import { a as UseInfiniteQueryReturnType, i as UseInfiniteQueryOptions, n as UndefinedInitialDataInfiniteOptions, o as useInfiniteQuery, r as infiniteQueryOptions, t as DefinedInitialDataInfiniteOptions } from "./infiniteQueryOptions-BLGtkUwV.js";
8
8
  import { MutationCache } from "./mutationCache.js";
9
9
  import { mutationOptions } from "./mutationOptions.js";
10
10
  import { UseQueryDefinedReturnType, UseQueryReturnType, useQuery } from "./useQuery.js";
@@ -1,9 +1,8 @@
1
- import { a as MaybeRef, d as ShallowOption, o as MaybeRefDeep, s as MaybeRefOrGetter, t as DeepUnwrapRef } from "./types-sdZdiLgo.js";
2
- import { o as UseQueryOptions } from "./queryOptions-gpn5D4rf.js";
3
- import { t as QueryClient$1 } from "./queryClient-BoBzDWAZ.js";
4
- import { DefaultError, InfiniteData, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, NonUndefinedGuard, QueryKey, QueryKeyWithDataTag, QueryObserver, QueryObserverResult } from "@tanstack/query-core";
1
+ import { a as MaybeRef, d as ShallowOption, o as MaybeRefDeep, s as MaybeRefOrGetter, t as DeepUnwrapRef } from "./types-u_Tu5Ybs.js";
2
+ import { o as UseQueryOptions } from "./queryOptions-dXiBZnGk.js";
3
+ import { t as QueryClient$1 } from "./queryClient-CVne8UYf.js";
4
+ import { DefaultError, InfiniteData, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, InitialDataFunction, NonUndefinedGuard, QueryKey, QueryKeyWithDataTag, QueryObserver, QueryObserverResult } from "@tanstack/query-core";
5
5
  import { Ref } from "vue-demi";
6
- //#region src/useBaseQuery.d.ts
7
6
  /**
8
7
  * The result of the query composables: every property of the observer result wrapped in a `Ref`, except
9
8
  * the `refetch`, `fetchNextPage`, and `fetchPreviousPage` functions, plus `suspense`.
@@ -29,8 +28,6 @@ type UseQueryOptionsGeneric<TQueryFnData, TError, TData, TQueryData, TQueryKey e
29
28
  * @returns The query result as `ref`s, plus the `suspense` function.
30
29
  */
31
30
  declare function useBaseQuery<TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey, TPageParam>(Observer: typeof QueryObserver, options: MaybeRefOrGetter<UseQueryOptionsGeneric<TQueryFnData, TError, TData, TQueryData, TQueryKey, TPageParam>>, queryClient?: QueryClient$1): UseBaseQueryReturnType<TData, TError>;
32
- //#endregion
33
- //#region src/useInfiniteQuery.d.ts
34
31
  /**
35
32
  * The options accepted by `useInfiniteQuery`. Same as {@link InfiniteQueryObserverOptions} from
36
33
  * `@tanstack/query-core`, plus the `shallow` option. Each option except `shallow` can also be a `ref` (and
@@ -46,14 +43,14 @@ type UseInfiniteQueryReturnType<TData, TError> = UseBaseQueryReturnType<TData, T
46
43
  * The options for `useInfiniteQuery` are identical to `useQuery`, with the addition of
47
44
  * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.
48
45
  *
49
- * This overload is selected when `initialData` is set, so the resulting `data` is never `undefined` (unless
50
- * a `select` changes `TData` to include `undefined`).
46
+ * This overload is selected when `initialData` is known to be defined, so the resulting `data` is never
47
+ * `undefined` (unless a `select` changes `TData` to include `undefined`).
51
48
  *
52
49
  * `enabled` tracks reactive dependencies automatically as a `ref`, a plain value, or a reactive getter
53
50
  * (`() => ...`). `queryKey` reacts through a `ref` for the array itself, or `ref`s and reactive getters as
54
51
  * individual entries — the array itself can't be a bare getter.
55
52
  * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to
56
- * `useInfiniteQuery`, with `initialData` set.
53
+ * `useInfiniteQuery`, with `initialData` known to be defined.
57
54
  * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin`
58
55
  * will be used.
59
56
  * @returns The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchPreviousPage`,
@@ -278,11 +275,10 @@ declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = I
278
275
  * ```
279
276
  */
280
277
  declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: MaybeRefOrGetter<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>>, queryClient?: QueryClient$1): UseInfiniteQueryReturnType<TData, TError>;
281
- //#endregion
282
- //#region src/infiniteQueryOptions.d.ts
283
278
  /**
284
- * The options accepted by the `infiniteQueryOptions` overload selected when no `initialData` is set — `data`
285
- * may be `undefined` while the query is `pending`.
279
+ * The options accepted by the `infiniteQueryOptions` overload selected when `initialData` is omitted, may be
280
+ * `undefined`, or is a function that may return `undefined` — `data` may be `undefined` while the query is
281
+ * `pending`.
286
282
  * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
287
283
  * @template TError - The type of errors your `queryFn` may throw.
288
284
  * @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
@@ -291,11 +287,11 @@ declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = I
291
287
  * @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.
292
288
  */
293
289
  type UndefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
294
- initialData?: undefined;
290
+ initialData?: undefined | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | InitialDataFunction<NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>>;
295
291
  };
296
292
  /**
297
- * The options accepted by the `infiniteQueryOptions` overload selected when `initialData` is set — `data` is
298
- * never `undefined` (unless a `select` changes `TData` to include `undefined`).
293
+ * The options accepted by the `infiniteQueryOptions` overload selected when `initialData` is known to be
294
+ * defined — `data` is never `undefined` (unless a `select` changes `TData` to include `undefined`).
299
295
  * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
300
296
  * @template TError - The type of errors your `queryFn` may throw.
301
297
  * @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
@@ -317,8 +313,11 @@ type DefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TDat
317
313
  * You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.
318
314
  * These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.
319
315
  * `options.queryKey` is required and is the query key to generate options for.
320
- * @param options - The {@link UndefinedInitialDataInfiniteOptions} to use — everything you can pass to
321
- * `useInfiniteQuery`.
316
+ *
317
+ * This overload is selected when `initialData` is known to be defined, so the resulting `data` is never
318
+ * `undefined` (unless a `select` changes `TData` to include `undefined`).
319
+ * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to
320
+ * `useInfiniteQuery`, with `initialData` known to be defined.
322
321
  * @returns The same options object, typed so that `queryKey` carries the inferred data type.
323
322
  * @see {@link useInfiniteQuery} to run an infinite query with these options.
324
323
  * @example
@@ -331,22 +330,22 @@ type DefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TDat
331
330
  * queryFn: ({ pageParam }) => fetchProjects(pageParam),
332
331
  * initialPageParam: 0,
333
332
  * getNextPageParam: (lastPage) => lastPage.nextId,
333
+ * initialData: { pages: [], pageParams: [] },
334
334
  * })
335
335
  *
336
- * const { data, isError, error, fetchNextPage } = useInfiniteQuery(projectsOptions)
336
+ * // `data` is never `undefined`, thanks to `initialData` — even if a refetch fails, so the
337
+ * // list stays visible alongside the error.
338
+ * const { data, isError, error } = useInfiniteQuery(projectsOptions)
337
339
  * </script>
338
340
  * ```
339
341
  */
340
- 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>;
342
+ declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
341
343
  /**
342
344
  * You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.
343
345
  * These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.
344
346
  * `options.queryKey` is required and is the query key to generate options for.
345
- *
346
- * This overload is selected when `initialData` is set, so the resulting `data` is never `undefined` (unless
347
- * a `select` changes `TData` to include `undefined`).
348
- * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to
349
- * `useInfiniteQuery`, with `initialData` set.
347
+ * @param options - The {@link UndefinedInitialDataInfiniteOptions} to use — everything you can pass to
348
+ * `useInfiniteQuery`.
350
349
  * @returns The same options object, typed so that `queryKey` carries the inferred data type.
351
350
  * @see {@link useInfiniteQuery} to run an infinite query with these options.
352
351
  * @example
@@ -359,16 +358,12 @@ declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData
359
358
  * queryFn: ({ pageParam }) => fetchProjects(pageParam),
360
359
  * initialPageParam: 0,
361
360
  * getNextPageParam: (lastPage) => lastPage.nextId,
362
- * initialData: { pages: [], pageParams: [] },
363
361
  * })
364
362
  *
365
- * // `data` is never `undefined`, thanks to `initialData` — even if a refetch fails, so the
366
- * // list stays visible alongside the error.
367
- * const { data, isError, error } = useInfiniteQuery(projectsOptions)
363
+ * const { data, isError, error, fetchNextPage } = useInfiniteQuery(projectsOptions)
368
364
  * </script>
369
365
  * ```
370
366
  */
371
- declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
372
- //#endregion
367
+ 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>;
373
368
  export { UseInfiniteQueryReturnType as a, useBaseQuery as c, UseInfiniteQueryOptions as i, UndefinedInitialDataInfiniteOptions as n, useInfiniteQuery as o, infiniteQueryOptions as r, UseBaseQueryReturnType as s, DefinedInitialDataInfiniteOptions as t };
374
- //# sourceMappingURL=infiniteQueryOptions-BaoKhSzb.d.ts.map
369
+ //# sourceMappingURL=infiniteQueryOptions-BLGtkUwV.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infiniteQueryOptions-BLGtkUwV.d.ts","names":["QueryClient","QueryClient"],"sources":["../../src/useBaseQuery.ts","../../src/useInfiniteQuery.ts","../../src/infiniteQueryOptions.ts"],"mappings":";;;;;;;;;KA8BY,uBACV,OACA,QACA,UAAU,oBAAoB,OAAO,cAEpC,WAAW,UAAU,8DAIlB,QAAQ,KACR,IAAI,SAAS,SAAS;;;;;;;;;EAU1B,gBAAgB,QAAQ;;KAGrB,uBACH,cACA,QACA,OACA,YACA,kBAAkB,WAAW,UAC7B,wBAEE,gBAAgB,cAAc,QAAQ,OAAO,YAAY,aACzD,wBAAwB,cAAc,QAAQ,OAAO,WAAW;;;;;;;;;iBAUpD,aACd,cACA,QACA,OACA,YACA,kBAAkB,UAClB,YAEA,iBAAiB,eACjB,SAAS,iBACP,uBACE,cACA,QACA,OACA,YACA,WACA,cAGJ,cAAcA,gBACb,uBAAuB,OAAO;;;;;;KC7DrB,wBACV,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,wBACE,YAGE,kBAAkB,6BAChB,cACA,QACA,OACA,WACA,cAED,6BACC,iBACE,6BACE,cACA,QACA,OACA,cAAc,YACd,YACA,aAEJ,aACE,6BACE,cACA,QACA,OACA,cAAc,YACd,YACA,gBAEN;;;;;KAOM,2BAA2B,OAAO,UAAU,uBACtD,OACA,QACA,4BAA4B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkDrB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,iBACP,kCACE,cACA,QACA,OACA,WACA,cAGJ,cAAcC,gBACb,2BAA2B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkHrB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,iBACP,oCACE,cACA,QACA,OACA,WACA,cAGJ,cAAcA,gBACb,2BAA2B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4ErB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,iBACP,wBAAwB,cAAc,QAAQ,OAAO,WAAW,cAElE,cAAcA,gBACb,2BAA2B,OAAO;;;;;;;;;;;;KCpVzB,oCACV,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,wBACE,wBACF,cACA,QACA,OACA,WACA;EAEA,0BAEI,kBAAkB,aAAa,cAAc,eAC7C,oBACE,kBAAkB,aAAa,cAAc;;;;;;;;;;;;KAczC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiC1C,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;;;;;;;;;;;;;;;;;;;;;;;;;iBA0B7C,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,9 +1,8 @@
1
- import { a as MaybeRef, d as ShallowOption, o as MaybeRefDeep, s as MaybeRefOrGetter, t as DeepUnwrapRef } from "./types-sdZdiLgo.cjs";
2
- import { o as UseQueryOptions } from "./queryOptions-BvmZtmiU.cjs";
3
- import { t as QueryClient$1 } from "./queryClient-BK9W57Qu.cjs";
4
- import { DefaultError, InfiniteData, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, NonUndefinedGuard, QueryKey, QueryKeyWithDataTag, QueryObserver, QueryObserverResult } from "@tanstack/query-core";
1
+ import { a as MaybeRef, d as ShallowOption, o as MaybeRefDeep, s as MaybeRefOrGetter, t as DeepUnwrapRef } from "./types-u_Tu5Ybs.cjs";
2
+ import { o as UseQueryOptions } from "./queryOptions-BuZEBLtg.cjs";
3
+ import { t as QueryClient$1 } from "./queryClient-DdZQqhoA.cjs";
4
+ import { DefaultError, InfiniteData, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, InitialDataFunction, NonUndefinedGuard, QueryKey, QueryKeyWithDataTag, QueryObserver, QueryObserverResult } from "@tanstack/query-core";
5
5
  import { Ref } from "vue-demi";
6
- //#region src/useBaseQuery.d.ts
7
6
  /**
8
7
  * The result of the query composables: every property of the observer result wrapped in a `Ref`, except
9
8
  * the `refetch`, `fetchNextPage`, and `fetchPreviousPage` functions, plus `suspense`.
@@ -29,8 +28,6 @@ type UseQueryOptionsGeneric<TQueryFnData, TError, TData, TQueryData, TQueryKey e
29
28
  * @returns The query result as `ref`s, plus the `suspense` function.
30
29
  */
31
30
  declare function useBaseQuery<TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey, TPageParam>(Observer: typeof QueryObserver, options: MaybeRefOrGetter<UseQueryOptionsGeneric<TQueryFnData, TError, TData, TQueryData, TQueryKey, TPageParam>>, queryClient?: QueryClient$1): UseBaseQueryReturnType<TData, TError>;
32
- //#endregion
33
- //#region src/useInfiniteQuery.d.ts
34
31
  /**
35
32
  * The options accepted by `useInfiniteQuery`. Same as {@link InfiniteQueryObserverOptions} from
36
33
  * `@tanstack/query-core`, plus the `shallow` option. Each option except `shallow` can also be a `ref` (and
@@ -46,14 +43,14 @@ type UseInfiniteQueryReturnType<TData, TError> = UseBaseQueryReturnType<TData, T
46
43
  * The options for `useInfiniteQuery` are identical to `useQuery`, with the addition of
47
44
  * `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.
48
45
  *
49
- * This overload is selected when `initialData` is set, so the resulting `data` is never `undefined` (unless
50
- * a `select` changes `TData` to include `undefined`).
46
+ * This overload is selected when `initialData` is known to be defined, so the resulting `data` is never
47
+ * `undefined` (unless a `select` changes `TData` to include `undefined`).
51
48
  *
52
49
  * `enabled` tracks reactive dependencies automatically as a `ref`, a plain value, or a reactive getter
53
50
  * (`() => ...`). `queryKey` reacts through a `ref` for the array itself, or `ref`s and reactive getters as
54
51
  * individual entries — the array itself can't be a bare getter.
55
52
  * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to
56
- * `useInfiniteQuery`, with `initialData` set.
53
+ * `useInfiniteQuery`, with `initialData` known to be defined.
57
54
  * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin`
58
55
  * will be used.
59
56
  * @returns The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchPreviousPage`,
@@ -278,11 +275,10 @@ declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = I
278
275
  * ```
279
276
  */
280
277
  declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: MaybeRefOrGetter<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>>, queryClient?: QueryClient$1): UseInfiniteQueryReturnType<TData, TError>;
281
- //#endregion
282
- //#region src/infiniteQueryOptions.d.ts
283
278
  /**
284
- * The options accepted by the `infiniteQueryOptions` overload selected when no `initialData` is set — `data`
285
- * may be `undefined` while the query is `pending`.
279
+ * The options accepted by the `infiniteQueryOptions` overload selected when `initialData` is omitted, may be
280
+ * `undefined`, or is a function that may return `undefined` — `data` may be `undefined` while the query is
281
+ * `pending`.
286
282
  * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
287
283
  * @template TError - The type of errors your `queryFn` may throw.
288
284
  * @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
@@ -291,11 +287,11 @@ declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = I
291
287
  * @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.
292
288
  */
293
289
  type UndefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
294
- initialData?: undefined;
290
+ initialData?: undefined | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | InitialDataFunction<NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>>;
295
291
  };
296
292
  /**
297
- * The options accepted by the `infiniteQueryOptions` overload selected when `initialData` is set — `data` is
298
- * never `undefined` (unless a `select` changes `TData` to include `undefined`).
293
+ * The options accepted by the `infiniteQueryOptions` overload selected when `initialData` is known to be
294
+ * defined — `data` is never `undefined` (unless a `select` changes `TData` to include `undefined`).
299
295
  * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
300
296
  * @template TError - The type of errors your `queryFn` may throw.
301
297
  * @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
@@ -317,8 +313,11 @@ type DefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TDat
317
313
  * You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.
318
314
  * These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.
319
315
  * `options.queryKey` is required and is the query key to generate options for.
320
- * @param options - The {@link UndefinedInitialDataInfiniteOptions} to use — everything you can pass to
321
- * `useInfiniteQuery`.
316
+ *
317
+ * This overload is selected when `initialData` is known to be defined, so the resulting `data` is never
318
+ * `undefined` (unless a `select` changes `TData` to include `undefined`).
319
+ * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to
320
+ * `useInfiniteQuery`, with `initialData` known to be defined.
322
321
  * @returns The same options object, typed so that `queryKey` carries the inferred data type.
323
322
  * @see {@link useInfiniteQuery} to run an infinite query with these options.
324
323
  * @example
@@ -331,22 +330,22 @@ type DefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TDat
331
330
  * queryFn: ({ pageParam }) => fetchProjects(pageParam),
332
331
  * initialPageParam: 0,
333
332
  * getNextPageParam: (lastPage) => lastPage.nextId,
333
+ * initialData: { pages: [], pageParams: [] },
334
334
  * })
335
335
  *
336
- * const { data, isError, error, fetchNextPage } = useInfiniteQuery(projectsOptions)
336
+ * // `data` is never `undefined`, thanks to `initialData` — even if a refetch fails, so the
337
+ * // list stays visible alongside the error.
338
+ * const { data, isError, error } = useInfiniteQuery(projectsOptions)
337
339
  * </script>
338
340
  * ```
339
341
  */
340
- 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>;
342
+ declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
341
343
  /**
342
344
  * You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.
343
345
  * These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.
344
346
  * `options.queryKey` is required and is the query key to generate options for.
345
- *
346
- * This overload is selected when `initialData` is set, so the resulting `data` is never `undefined` (unless
347
- * a `select` changes `TData` to include `undefined`).
348
- * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to
349
- * `useInfiniteQuery`, with `initialData` set.
347
+ * @param options - The {@link UndefinedInitialDataInfiniteOptions} to use — everything you can pass to
348
+ * `useInfiniteQuery`.
350
349
  * @returns The same options object, typed so that `queryKey` carries the inferred data type.
351
350
  * @see {@link useInfiniteQuery} to run an infinite query with these options.
352
351
  * @example
@@ -359,16 +358,12 @@ declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData
359
358
  * queryFn: ({ pageParam }) => fetchProjects(pageParam),
360
359
  * initialPageParam: 0,
361
360
  * getNextPageParam: (lastPage) => lastPage.nextId,
362
- * initialData: { pages: [], pageParams: [] },
363
361
  * })
364
362
  *
365
- * // `data` is never `undefined`, thanks to `initialData` — even if a refetch fails, so the
366
- * // list stays visible alongside the error.
367
- * const { data, isError, error } = useInfiniteQuery(projectsOptions)
363
+ * const { data, isError, error, fetchNextPage } = useInfiniteQuery(projectsOptions)
368
364
  * </script>
369
365
  * ```
370
366
  */
371
- declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
372
- //#endregion
367
+ 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>;
373
368
  export { UseInfiniteQueryReturnType as a, useBaseQuery as c, UseInfiniteQueryOptions as i, UndefinedInitialDataInfiniteOptions as n, useInfiniteQuery as o, infiniteQueryOptions as r, UseBaseQueryReturnType as s, DefinedInitialDataInfiniteOptions as t };
374
- //# sourceMappingURL=infiniteQueryOptions-ClNe2-FB.d.cts.map
369
+ //# sourceMappingURL=infiniteQueryOptions-oStzZOCq.d.cts.map