@tanstack/react-query 5.0.0-alpha.85 → 5.0.0-alpha.87

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 (414) hide show
  1. package/build/legacy/HydrationBoundary.cjs +58 -0
  2. package/build/legacy/HydrationBoundary.cjs.map +1 -0
  3. package/build/legacy/HydrationBoundary.d.cts +12 -0
  4. package/build/legacy/HydrationBoundary.d.ts +12 -0
  5. package/build/legacy/HydrationBoundary.js +24 -0
  6. package/build/legacy/HydrationBoundary.js.map +1 -0
  7. package/build/legacy/QueryClientProvider.cjs +69 -0
  8. package/build/legacy/QueryClientProvider.cjs.map +1 -0
  9. package/build/legacy/QueryClientProvider.d.cts +12 -0
  10. package/build/legacy/QueryClientProvider.d.ts +12 -0
  11. package/build/legacy/QueryClientProvider.js +33 -0
  12. package/build/legacy/QueryClientProvider.js.map +1 -0
  13. package/build/legacy/QueryErrorResetBoundary.cjs +64 -0
  14. package/build/legacy/QueryErrorResetBoundary.cjs.map +1 -0
  15. package/build/legacy/QueryErrorResetBoundary.d.cts +14 -0
  16. package/build/legacy/QueryErrorResetBoundary.d.ts +14 -0
  17. package/build/legacy/QueryErrorResetBoundary.js +29 -0
  18. package/build/legacy/QueryErrorResetBoundary.js.map +1 -0
  19. package/build/legacy/errorBoundaryUtils.cjs +65 -0
  20. package/build/legacy/errorBoundaryUtils.cjs.map +1 -0
  21. package/build/legacy/errorBoundaryUtils.d.cts +14 -0
  22. package/build/legacy/errorBoundaryUtils.d.ts +14 -0
  23. package/build/{lib → legacy}/errorBoundaryUtils.js +10 -9
  24. package/build/legacy/errorBoundaryUtils.js.map +1 -0
  25. package/build/legacy/index.cjs +74 -0
  26. package/build/legacy/index.cjs.map +1 -0
  27. package/build/legacy/index.d.cts +14 -0
  28. package/build/legacy/index.d.ts +14 -0
  29. package/build/legacy/index.js +39 -0
  30. package/build/legacy/index.js.map +1 -0
  31. package/build/legacy/isRestoring.cjs +45 -0
  32. package/build/legacy/isRestoring.cjs.map +1 -0
  33. package/build/legacy/isRestoring.d.cts +6 -0
  34. package/build/legacy/isRestoring.d.ts +6 -0
  35. package/build/legacy/isRestoring.js +10 -0
  36. package/build/legacy/isRestoring.js.map +1 -0
  37. package/build/legacy/queryOptions.cjs +31 -0
  38. package/build/legacy/queryOptions.cjs.map +1 -0
  39. package/build/legacy/queryOptions.d.cts +13 -0
  40. package/build/legacy/queryOptions.d.ts +13 -0
  41. package/build/legacy/queryOptions.js +7 -0
  42. package/build/legacy/queryOptions.js.map +1 -0
  43. package/build/legacy/suspense.cjs +46 -0
  44. package/build/legacy/suspense.cjs.map +1 -0
  45. package/build/legacy/suspense.d.cts +10 -0
  46. package/build/legacy/suspense.d.ts +10 -0
  47. package/build/{lib/suspense.legacy.js → legacy/suspense.js} +10 -8
  48. package/build/legacy/suspense.js.map +1 -0
  49. package/build/legacy/types.cjs +17 -0
  50. package/build/legacy/types.cjs.map +1 -0
  51. package/build/legacy/types.d.cts +28 -0
  52. package/build/legacy/types.d.ts +28 -0
  53. package/build/legacy/types.js +1 -0
  54. package/build/legacy/types.js.map +1 -0
  55. package/build/legacy/useBaseQuery.cjs +90 -0
  56. package/build/legacy/useBaseQuery.cjs.map +1 -0
  57. package/build/legacy/useBaseQuery.d.cts +92 -0
  58. package/build/legacy/useBaseQuery.d.ts +92 -0
  59. package/build/legacy/useBaseQuery.js +60 -0
  60. package/build/legacy/useBaseQuery.js.map +1 -0
  61. package/build/legacy/useInfiniteQuery.cjs +39 -0
  62. package/build/legacy/useInfiniteQuery.cjs.map +1 -0
  63. package/build/legacy/useInfiniteQuery.d.cts +6 -0
  64. package/build/legacy/useInfiniteQuery.d.ts +6 -0
  65. package/build/legacy/useInfiniteQuery.js +15 -0
  66. package/build/legacy/useInfiniteQuery.js.map +1 -0
  67. package/build/legacy/useIsFetching.cjs +54 -0
  68. package/build/legacy/useIsFetching.cjs.map +1 -0
  69. package/build/legacy/useIsFetching.d.cts +5 -0
  70. package/build/legacy/useIsFetching.d.ts +5 -0
  71. package/build/legacy/useIsFetching.js +20 -0
  72. package/build/legacy/useIsFetching.js.map +1 -0
  73. package/build/legacy/useMutation.cjs +75 -0
  74. package/build/legacy/useMutation.cjs.map +1 -0
  75. package/build/legacy/useMutation.d.cts +6 -0
  76. package/build/legacy/useMutation.d.ts +6 -0
  77. package/build/legacy/useMutation.js +41 -0
  78. package/build/legacy/useMutation.js.map +1 -0
  79. package/build/legacy/useMutationState.cjs +86 -0
  80. package/build/legacy/useMutationState.cjs.map +1 -0
  81. package/build/legacy/useMutationState.d.cts +10 -0
  82. package/build/legacy/useMutationState.d.ts +10 -0
  83. package/build/legacy/useMutationState.js +51 -0
  84. package/build/legacy/useMutationState.js.map +1 -0
  85. package/build/legacy/useQueries.cjs +126 -0
  86. package/build/legacy/useQueries.cjs.map +1 -0
  87. package/build/legacy/useQueries.d.cts +53 -0
  88. package/build/{lib → legacy}/useQueries.d.ts +8 -7
  89. package/build/legacy/useQueries.js +101 -0
  90. package/build/legacy/useQueries.js.map +1 -0
  91. package/build/legacy/useQuery.cjs +34 -0
  92. package/build/legacy/useQuery.cjs.map +1 -0
  93. package/build/legacy/useQuery.d.cts +8 -0
  94. package/build/legacy/useQuery.d.ts +8 -0
  95. package/build/legacy/useQuery.js +10 -0
  96. package/build/legacy/useQuery.js.map +1 -0
  97. package/build/legacy/utils.cjs +34 -0
  98. package/build/legacy/utils.cjs.map +1 -0
  99. package/build/legacy/utils.d.cts +3 -0
  100. package/build/legacy/utils.d.ts +3 -0
  101. package/build/legacy/utils.js +10 -0
  102. package/build/legacy/utils.js.map +1 -0
  103. package/build/modern/HydrationBoundary.cjs +58 -0
  104. package/build/modern/HydrationBoundary.cjs.map +1 -0
  105. package/build/modern/HydrationBoundary.d.cts +12 -0
  106. package/build/modern/HydrationBoundary.d.ts +12 -0
  107. package/build/modern/HydrationBoundary.js +24 -0
  108. package/build/modern/HydrationBoundary.js.map +1 -0
  109. package/build/modern/QueryClientProvider.cjs +69 -0
  110. package/build/modern/QueryClientProvider.cjs.map +1 -0
  111. package/build/modern/QueryClientProvider.d.cts +12 -0
  112. package/build/modern/QueryClientProvider.d.ts +12 -0
  113. package/build/modern/QueryClientProvider.js +33 -0
  114. package/build/modern/QueryClientProvider.js.map +1 -0
  115. package/build/modern/QueryErrorResetBoundary.cjs +64 -0
  116. package/build/modern/QueryErrorResetBoundary.cjs.map +1 -0
  117. package/build/modern/QueryErrorResetBoundary.d.cts +14 -0
  118. package/build/modern/QueryErrorResetBoundary.d.ts +14 -0
  119. package/build/modern/QueryErrorResetBoundary.js +29 -0
  120. package/build/modern/QueryErrorResetBoundary.js.map +1 -0
  121. package/build/modern/errorBoundaryUtils.cjs +65 -0
  122. package/build/modern/errorBoundaryUtils.cjs.map +1 -0
  123. package/build/modern/errorBoundaryUtils.d.cts +14 -0
  124. package/build/modern/errorBoundaryUtils.d.ts +14 -0
  125. package/build/{lib/errorBoundaryUtils.legacy.js → modern/errorBoundaryUtils.js} +10 -9
  126. package/build/modern/errorBoundaryUtils.js.map +1 -0
  127. package/build/modern/index.cjs +74 -0
  128. package/build/modern/index.cjs.map +1 -0
  129. package/build/modern/index.d.cts +14 -0
  130. package/build/modern/index.d.ts +14 -0
  131. package/build/modern/index.js +39 -0
  132. package/build/modern/index.js.map +1 -0
  133. package/build/modern/isRestoring.cjs +45 -0
  134. package/build/modern/isRestoring.cjs.map +1 -0
  135. package/build/modern/isRestoring.d.cts +6 -0
  136. package/build/modern/isRestoring.d.ts +6 -0
  137. package/build/modern/isRestoring.js +10 -0
  138. package/build/modern/isRestoring.js.map +1 -0
  139. package/build/modern/queryOptions.cjs +31 -0
  140. package/build/modern/queryOptions.cjs.map +1 -0
  141. package/build/modern/queryOptions.d.cts +13 -0
  142. package/build/modern/queryOptions.d.ts +13 -0
  143. package/build/modern/queryOptions.js +7 -0
  144. package/build/modern/queryOptions.js.map +1 -0
  145. package/build/modern/suspense.cjs +46 -0
  146. package/build/modern/suspense.cjs.map +1 -0
  147. package/build/modern/suspense.d.cts +10 -0
  148. package/build/modern/suspense.d.ts +10 -0
  149. package/build/{lib → modern}/suspense.js +10 -8
  150. package/build/modern/suspense.js.map +1 -0
  151. package/build/modern/types.cjs +17 -0
  152. package/build/modern/types.cjs.map +1 -0
  153. package/build/modern/types.d.cts +28 -0
  154. package/build/modern/types.d.ts +28 -0
  155. package/build/modern/types.js +1 -0
  156. package/build/modern/types.js.map +1 -0
  157. package/build/modern/useBaseQuery.cjs +90 -0
  158. package/build/modern/useBaseQuery.cjs.map +1 -0
  159. package/build/modern/useBaseQuery.d.cts +92 -0
  160. package/build/modern/useBaseQuery.d.ts +92 -0
  161. package/build/modern/useBaseQuery.js +60 -0
  162. package/build/modern/useBaseQuery.js.map +1 -0
  163. package/build/modern/useInfiniteQuery.cjs +39 -0
  164. package/build/modern/useInfiniteQuery.cjs.map +1 -0
  165. package/build/modern/useInfiniteQuery.d.cts +6 -0
  166. package/build/modern/useInfiniteQuery.d.ts +6 -0
  167. package/build/modern/useInfiniteQuery.js +15 -0
  168. package/build/modern/useInfiniteQuery.js.map +1 -0
  169. package/build/modern/useIsFetching.cjs +54 -0
  170. package/build/modern/useIsFetching.cjs.map +1 -0
  171. package/build/modern/useIsFetching.d.cts +5 -0
  172. package/build/modern/useIsFetching.d.ts +5 -0
  173. package/build/modern/useIsFetching.js +20 -0
  174. package/build/modern/useIsFetching.js.map +1 -0
  175. package/build/modern/useMutation.cjs +75 -0
  176. package/build/modern/useMutation.cjs.map +1 -0
  177. package/build/modern/useMutation.d.cts +6 -0
  178. package/build/modern/useMutation.d.ts +6 -0
  179. package/build/modern/useMutation.js +41 -0
  180. package/build/modern/useMutation.js.map +1 -0
  181. package/build/modern/useMutationState.cjs +86 -0
  182. package/build/modern/useMutationState.cjs.map +1 -0
  183. package/build/modern/useMutationState.d.cts +10 -0
  184. package/build/modern/useMutationState.d.ts +10 -0
  185. package/build/modern/useMutationState.js +51 -0
  186. package/build/modern/useMutationState.js.map +1 -0
  187. package/build/modern/useQueries.cjs +123 -0
  188. package/build/modern/useQueries.cjs.map +1 -0
  189. package/build/modern/useQueries.d.cts +53 -0
  190. package/build/modern/useQueries.d.ts +53 -0
  191. package/build/modern/useQueries.js +98 -0
  192. package/build/modern/useQueries.js.map +1 -0
  193. package/build/modern/useQuery.cjs +34 -0
  194. package/build/modern/useQuery.cjs.map +1 -0
  195. package/build/modern/useQuery.d.cts +8 -0
  196. package/build/modern/useQuery.d.ts +8 -0
  197. package/build/modern/useQuery.js +10 -0
  198. package/build/modern/useQuery.js.map +1 -0
  199. package/build/modern/utils.cjs +34 -0
  200. package/build/modern/utils.cjs.map +1 -0
  201. package/build/modern/utils.d.cts +3 -0
  202. package/build/modern/utils.d.ts +3 -0
  203. package/build/modern/utils.js +10 -0
  204. package/build/modern/utils.js.map +1 -0
  205. package/package.json +18 -16
  206. package/src/__tests__/useMutation.test.tsx +16 -17
  207. package/src/__tests__/useQuery.test.tsx +27 -56
  208. package/src/__tests__/utils.tsx +6 -3
  209. package/build/codemods/__testfixtures__/default-import.input.tsx +0 -94
  210. package/build/codemods/__testfixtures__/default-import.output.tsx +0 -96
  211. package/build/codemods/__testfixtures__/named-import.input.tsx +0 -96
  212. package/build/codemods/__testfixtures__/named-import.output.tsx +0 -98
  213. package/build/codemods/__testfixtures__/namespaced-import.input.tsx +0 -86
  214. package/build/codemods/__testfixtures__/namespaced-import.output.tsx +0 -88
  215. package/build/codemods/__testfixtures__/parameter-is-identifier.input.tsx +0 -49
  216. package/build/codemods/__testfixtures__/parameter-is-identifier.output.tsx +0 -49
  217. package/build/codemods/__testfixtures__/parameter-is-object-expression.input.tsx +0 -128
  218. package/build/codemods/__testfixtures__/parameter-is-object-expression.output.tsx +0 -175
  219. package/build/codemods/__testfixtures__/replace-import-specifier.input.tsx +0 -10
  220. package/build/codemods/__testfixtures__/replace-import-specifier.output.tsx +0 -10
  221. package/build/codemods/__testfixtures__/type-arguments.input.tsx +0 -25
  222. package/build/codemods/__testfixtures__/type-arguments.output.tsx +0 -31
  223. package/build/codemods/__tests__/key-transformation.test.js +0 -32
  224. package/build/codemods/__tests__/replace-import-specifier.test.js +0 -12
  225. package/build/codemods/remove-overloads/__testfixtures__/default-import.input.tsx +0 -199
  226. package/build/codemods/remove-overloads/__testfixtures__/default-import.output.tsx +0 -484
  227. package/build/codemods/remove-overloads/__tests__/remove-overloads.test.js +0 -6
  228. package/build/lib/HydrationBoundary.cjs +0 -50
  229. package/build/lib/HydrationBoundary.cjs.map +0 -1
  230. package/build/lib/HydrationBoundary.d.ts +0 -10
  231. package/build/lib/HydrationBoundary.d.ts.map +0 -1
  232. package/build/lib/HydrationBoundary.js +0 -29
  233. package/build/lib/HydrationBoundary.js.map +0 -1
  234. package/build/lib/HydrationBoundary.legacy.cjs +0 -50
  235. package/build/lib/HydrationBoundary.legacy.cjs.map +0 -1
  236. package/build/lib/HydrationBoundary.legacy.js +0 -29
  237. package/build/lib/HydrationBoundary.legacy.js.map +0 -1
  238. package/build/lib/QueryClientProvider.cjs +0 -54
  239. package/build/lib/QueryClientProvider.cjs.map +0 -1
  240. package/build/lib/QueryClientProvider.d.ts +0 -10
  241. package/build/lib/QueryClientProvider.d.ts.map +0 -1
  242. package/build/lib/QueryClientProvider.js +0 -31
  243. package/build/lib/QueryClientProvider.js.map +0 -1
  244. package/build/lib/QueryClientProvider.legacy.cjs +0 -54
  245. package/build/lib/QueryClientProvider.legacy.cjs.map +0 -1
  246. package/build/lib/QueryClientProvider.legacy.js +0 -31
  247. package/build/lib/QueryClientProvider.legacy.js.map +0 -1
  248. package/build/lib/QueryErrorResetBoundary.cjs +0 -60
  249. package/build/lib/QueryErrorResetBoundary.cjs.map +0 -1
  250. package/build/lib/QueryErrorResetBoundary.d.ts +0 -12
  251. package/build/lib/QueryErrorResetBoundary.d.ts.map +0 -1
  252. package/build/lib/QueryErrorResetBoundary.js +0 -38
  253. package/build/lib/QueryErrorResetBoundary.js.map +0 -1
  254. package/build/lib/QueryErrorResetBoundary.legacy.cjs +0 -60
  255. package/build/lib/QueryErrorResetBoundary.legacy.cjs.map +0 -1
  256. package/build/lib/QueryErrorResetBoundary.legacy.js +0 -38
  257. package/build/lib/QueryErrorResetBoundary.legacy.js.map +0 -1
  258. package/build/lib/__tests__/HydrationBoundary.test.d.ts +0 -2
  259. package/build/lib/__tests__/HydrationBoundary.test.d.ts.map +0 -1
  260. package/build/lib/__tests__/QueryClientProvider.test.d.ts +0 -2
  261. package/build/lib/__tests__/QueryClientProvider.test.d.ts.map +0 -1
  262. package/build/lib/__tests__/QueryResetErrorBoundary.test.d.ts +0 -7
  263. package/build/lib/__tests__/QueryResetErrorBoundary.test.d.ts.map +0 -1
  264. package/build/lib/__tests__/ssr-hydration.test.d.ts +0 -2
  265. package/build/lib/__tests__/ssr-hydration.test.d.ts.map +0 -1
  266. package/build/lib/__tests__/ssr.test.d.ts +0 -2
  267. package/build/lib/__tests__/ssr.test.d.ts.map +0 -1
  268. package/build/lib/__tests__/suspense.test.d.ts +0 -2
  269. package/build/lib/__tests__/suspense.test.d.ts.map +0 -1
  270. package/build/lib/__tests__/useInfiniteQuery.test.d.ts +0 -2
  271. package/build/lib/__tests__/useInfiniteQuery.test.d.ts.map +0 -1
  272. package/build/lib/__tests__/useInfiniteQuery.type.test.d.ts +0 -2
  273. package/build/lib/__tests__/useInfiniteQuery.type.test.d.ts.map +0 -1
  274. package/build/lib/__tests__/useIsFetching.test.d.ts +0 -2
  275. package/build/lib/__tests__/useIsFetching.test.d.ts.map +0 -1
  276. package/build/lib/__tests__/useMutation.test.d.ts +0 -2
  277. package/build/lib/__tests__/useMutation.test.d.ts.map +0 -1
  278. package/build/lib/__tests__/useMutationState.test.d.ts +0 -2
  279. package/build/lib/__tests__/useMutationState.test.d.ts.map +0 -1
  280. package/build/lib/__tests__/useQueries.test.d.ts +0 -2
  281. package/build/lib/__tests__/useQueries.test.d.ts.map +0 -1
  282. package/build/lib/__tests__/useQuery.test.d.ts +0 -2
  283. package/build/lib/__tests__/useQuery.test.d.ts.map +0 -1
  284. package/build/lib/__tests__/useQuery.types.test.d.ts +0 -2
  285. package/build/lib/__tests__/useQuery.types.test.d.ts.map +0 -1
  286. package/build/lib/__tests__/utils.d.ts +0 -30
  287. package/build/lib/__tests__/utils.d.ts.map +0 -1
  288. package/build/lib/errorBoundaryUtils.cjs +0 -51
  289. package/build/lib/errorBoundaryUtils.cjs.map +0 -1
  290. package/build/lib/errorBoundaryUtils.d.ts +0 -11
  291. package/build/lib/errorBoundaryUtils.d.ts.map +0 -1
  292. package/build/lib/errorBoundaryUtils.js.map +0 -1
  293. package/build/lib/errorBoundaryUtils.legacy.cjs +0 -51
  294. package/build/lib/errorBoundaryUtils.legacy.cjs.map +0 -1
  295. package/build/lib/errorBoundaryUtils.legacy.js.map +0 -1
  296. package/build/lib/index.cjs +0 -40
  297. package/build/lib/index.cjs.map +0 -1
  298. package/build/lib/index.d.ts +0 -18
  299. package/build/lib/index.d.ts.map +0 -1
  300. package/build/lib/index.js +0 -13
  301. package/build/lib/index.js.map +0 -1
  302. package/build/lib/index.legacy.cjs +0 -40
  303. package/build/lib/index.legacy.cjs.map +0 -1
  304. package/build/lib/index.legacy.js +0 -13
  305. package/build/lib/index.legacy.js.map +0 -1
  306. package/build/lib/isRestoring.cjs +0 -31
  307. package/build/lib/isRestoring.cjs.map +0 -1
  308. package/build/lib/isRestoring.d.ts +0 -4
  309. package/build/lib/isRestoring.d.ts.map +0 -1
  310. package/build/lib/isRestoring.js +0 -9
  311. package/build/lib/isRestoring.js.map +0 -1
  312. package/build/lib/isRestoring.legacy.cjs +0 -31
  313. package/build/lib/isRestoring.legacy.cjs.map +0 -1
  314. package/build/lib/isRestoring.legacy.js +0 -9
  315. package/build/lib/isRestoring.legacy.js.map +0 -1
  316. package/build/lib/queryOptions.cjs +0 -8
  317. package/build/lib/queryOptions.cjs.map +0 -1
  318. package/build/lib/queryOptions.d.ts +0 -11
  319. package/build/lib/queryOptions.d.ts.map +0 -1
  320. package/build/lib/queryOptions.js +0 -6
  321. package/build/lib/queryOptions.js.map +0 -1
  322. package/build/lib/queryOptions.legacy.cjs +0 -8
  323. package/build/lib/queryOptions.legacy.cjs.map +0 -1
  324. package/build/lib/queryOptions.legacy.js +0 -6
  325. package/build/lib/queryOptions.legacy.js.map +0 -1
  326. package/build/lib/suspense.cjs +0 -22
  327. package/build/lib/suspense.cjs.map +0 -1
  328. package/build/lib/suspense.d.ts +0 -7
  329. package/build/lib/suspense.d.ts.map +0 -1
  330. package/build/lib/suspense.js.map +0 -1
  331. package/build/lib/suspense.legacy.cjs +0 -22
  332. package/build/lib/suspense.legacy.cjs.map +0 -1
  333. package/build/lib/suspense.legacy.js.map +0 -1
  334. package/build/lib/types.d.ts +0 -27
  335. package/build/lib/types.d.ts.map +0 -1
  336. package/build/lib/useBaseQuery.cjs +0 -80
  337. package/build/lib/useBaseQuery.cjs.map +0 -1
  338. package/build/lib/useBaseQuery.d.ts +0 -4
  339. package/build/lib/useBaseQuery.d.ts.map +0 -1
  340. package/build/lib/useBaseQuery.js +0 -59
  341. package/build/lib/useBaseQuery.js.map +0 -1
  342. package/build/lib/useBaseQuery.legacy.cjs +0 -80
  343. package/build/lib/useBaseQuery.legacy.cjs.map +0 -1
  344. package/build/lib/useBaseQuery.legacy.js +0 -59
  345. package/build/lib/useBaseQuery.legacy.js.map +0 -1
  346. package/build/lib/useInfiniteQuery.cjs +0 -15
  347. package/build/lib/useInfiniteQuery.cjs.map +0 -1
  348. package/build/lib/useInfiniteQuery.d.ts +0 -4
  349. package/build/lib/useInfiniteQuery.d.ts.map +0 -1
  350. package/build/lib/useInfiniteQuery.js +0 -13
  351. package/build/lib/useInfiniteQuery.js.map +0 -1
  352. package/build/lib/useInfiniteQuery.legacy.cjs +0 -15
  353. package/build/lib/useInfiniteQuery.legacy.cjs.map +0 -1
  354. package/build/lib/useInfiniteQuery.legacy.js +0 -13
  355. package/build/lib/useInfiniteQuery.legacy.js.map +0 -1
  356. package/build/lib/useIsFetching.cjs +0 -34
  357. package/build/lib/useIsFetching.cjs.map +0 -1
  358. package/build/lib/useIsFetching.d.ts +0 -3
  359. package/build/lib/useIsFetching.d.ts.map +0 -1
  360. package/build/lib/useIsFetching.js +0 -13
  361. package/build/lib/useIsFetching.js.map +0 -1
  362. package/build/lib/useIsFetching.legacy.cjs +0 -34
  363. package/build/lib/useIsFetching.legacy.cjs.map +0 -1
  364. package/build/lib/useIsFetching.legacy.js +0 -13
  365. package/build/lib/useIsFetching.legacy.js.map +0 -1
  366. package/build/lib/useMutation.cjs +0 -54
  367. package/build/lib/useMutation.cjs.map +0 -1
  368. package/build/lib/useMutation.d.ts +0 -4
  369. package/build/lib/useMutation.d.ts.map +0 -1
  370. package/build/lib/useMutation.js +0 -33
  371. package/build/lib/useMutation.js.map +0 -1
  372. package/build/lib/useMutation.legacy.cjs +0 -54
  373. package/build/lib/useMutation.legacy.cjs.map +0 -1
  374. package/build/lib/useMutation.legacy.js +0 -33
  375. package/build/lib/useMutation.legacy.js.map +0 -1
  376. package/build/lib/useMutationState.cjs +0 -60
  377. package/build/lib/useMutationState.cjs.map +0 -1
  378. package/build/lib/useMutationState.d.ts +0 -9
  379. package/build/lib/useMutationState.d.ts.map +0 -1
  380. package/build/lib/useMutationState.js +0 -38
  381. package/build/lib/useMutationState.js.map +0 -1
  382. package/build/lib/useMutationState.legacy.cjs +0 -60
  383. package/build/lib/useMutationState.legacy.cjs.map +0 -1
  384. package/build/lib/useMutationState.legacy.js +0 -38
  385. package/build/lib/useMutationState.legacy.js.map +0 -1
  386. package/build/lib/useQueries.cjs +0 -99
  387. package/build/lib/useQueries.cjs.map +0 -1
  388. package/build/lib/useQueries.d.ts.map +0 -1
  389. package/build/lib/useQueries.js +0 -78
  390. package/build/lib/useQueries.js.map +0 -1
  391. package/build/lib/useQueries.legacy.cjs +0 -102
  392. package/build/lib/useQueries.legacy.cjs.map +0 -1
  393. package/build/lib/useQueries.legacy.js +0 -81
  394. package/build/lib/useQueries.legacy.js.map +0 -1
  395. package/build/lib/useQuery.cjs +0 -14
  396. package/build/lib/useQuery.cjs.map +0 -1
  397. package/build/lib/useQuery.d.ts +0 -6
  398. package/build/lib/useQuery.d.ts.map +0 -1
  399. package/build/lib/useQuery.js +0 -12
  400. package/build/lib/useQuery.js.map +0 -1
  401. package/build/lib/useQuery.legacy.cjs +0 -14
  402. package/build/lib/useQuery.legacy.cjs.map +0 -1
  403. package/build/lib/useQuery.legacy.js +0 -12
  404. package/build/lib/useQuery.legacy.js.map +0 -1
  405. package/build/lib/utils.cjs +0 -12
  406. package/build/lib/utils.cjs.map +0 -1
  407. package/build/lib/utils.d.ts +0 -2
  408. package/build/lib/utils.d.ts.map +0 -1
  409. package/build/lib/utils.js +0 -10
  410. package/build/lib/utils.js.map +0 -1
  411. package/build/lib/utils.legacy.cjs +0 -12
  412. package/build/lib/utils.legacy.cjs.map +0 -1
  413. package/build/lib/utils.legacy.js +0 -10
  414. package/build/lib/utils.legacy.js.map +0 -1
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var HydrationBoundary_exports = {};
31
+ __export(HydrationBoundary_exports, {
32
+ HydrationBoundary: () => HydrationBoundary
33
+ });
34
+ module.exports = __toCommonJS(HydrationBoundary_exports);
35
+ var React = __toESM(require("react"), 1);
36
+ var import_query_core = require("@tanstack/query-core");
37
+ var import_QueryClientProvider = require("./QueryClientProvider");
38
+ const HydrationBoundary = ({
39
+ children,
40
+ options = {},
41
+ state,
42
+ queryClient
43
+ }) => {
44
+ const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
45
+ const optionsRef = React.useRef(options);
46
+ optionsRef.current = options;
47
+ React.useMemo(() => {
48
+ if (state) {
49
+ (0, import_query_core.hydrate)(client, state, optionsRef.current);
50
+ }
51
+ }, [client, state]);
52
+ return children;
53
+ };
54
+ // Annotate the CommonJS export names for ESM import in node:
55
+ 0 && (module.exports = {
56
+ HydrationBoundary
57
+ });
58
+ //# sourceMappingURL=HydrationBoundary.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/HydrationBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport { hydrate } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\nimport type { HydrateOptions, QueryClient } from '@tanstack/query-core'\n\nexport interface HydrationBoundaryProps {\n state?: unknown\n options?: HydrateOptions\n children?: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport const HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient,\n}: HydrationBoundaryProps) => {\n const client = useQueryClient(queryClient)\n\n const optionsRef = React.useRef(options)\n optionsRef.current = options\n\n // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n React.useMemo(() => {\n if (state) {\n hydrate(client, state, optionsRef.current)\n }\n }, [client, state])\n\n return children as React.ReactElement\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,YAAuB;AAEvB,wBAAwB;AACxB,iCAA+B;AAUxB,MAAM,oBAAoB,CAAC;AAAA,EAChC;AAAA,EACA,UAAU,CAAC;AAAA,EACX;AAAA,EACA;AACF,MAA8B;AAC5B,QAAM,aAAS,2CAAe,WAAW;AAEzC,QAAM,aAAa,MAAM,OAAO,OAAO;AACvC,aAAW,UAAU;AAMrB,QAAM,QAAQ,MAAM;AAClB,QAAI,OAAO;AACT,qCAAQ,QAAQ,OAAO,WAAW,OAAO;AAAA,IAC3C;AAAA,EACF,GAAG,CAAC,QAAQ,KAAK,CAAC;AAElB,SAAO;AACT;","names":[]}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { HydrateOptions, QueryClient } from '@tanstack/query-core';
3
+
4
+ interface HydrationBoundaryProps {
5
+ state?: unknown;
6
+ options?: HydrateOptions;
7
+ children?: React.ReactNode;
8
+ queryClient?: QueryClient;
9
+ }
10
+ declare const HydrationBoundary: ({ children, options, state, queryClient, }: HydrationBoundaryProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
11
+
12
+ export { HydrationBoundary, HydrationBoundaryProps };
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { HydrateOptions, QueryClient } from '@tanstack/query-core';
3
+
4
+ interface HydrationBoundaryProps {
5
+ state?: unknown;
6
+ options?: HydrateOptions;
7
+ children?: React.ReactNode;
8
+ queryClient?: QueryClient;
9
+ }
10
+ declare const HydrationBoundary: ({ children, options, state, queryClient, }: HydrationBoundaryProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
11
+
12
+ export { HydrationBoundary, HydrationBoundaryProps };
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ import { hydrate } from "@tanstack/query-core";
4
+ import { useQueryClient } from "./QueryClientProvider";
5
+ const HydrationBoundary = ({
6
+ children,
7
+ options = {},
8
+ state,
9
+ queryClient
10
+ }) => {
11
+ const client = useQueryClient(queryClient);
12
+ const optionsRef = React.useRef(options);
13
+ optionsRef.current = options;
14
+ React.useMemo(() => {
15
+ if (state) {
16
+ hydrate(client, state, optionsRef.current);
17
+ }
18
+ }, [client, state]);
19
+ return children;
20
+ };
21
+ export {
22
+ HydrationBoundary
23
+ };
24
+ //# sourceMappingURL=HydrationBoundary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/HydrationBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport { hydrate } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\nimport type { HydrateOptions, QueryClient } from '@tanstack/query-core'\n\nexport interface HydrationBoundaryProps {\n state?: unknown\n options?: HydrateOptions\n children?: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport const HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient,\n}: HydrationBoundaryProps) => {\n const client = useQueryClient(queryClient)\n\n const optionsRef = React.useRef(options)\n optionsRef.current = options\n\n // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n React.useMemo(() => {\n if (state) {\n hydrate(client, state, optionsRef.current)\n }\n }, [client, state])\n\n return children as React.ReactElement\n}\n"],"mappings":";AACA,YAAY,WAAW;AAEvB,SAAS,eAAe;AACxB,SAAS,sBAAsB;AAUxB,MAAM,oBAAoB,CAAC;AAAA,EAChC;AAAA,EACA,UAAU,CAAC;AAAA,EACX;AAAA,EACA;AACF,MAA8B;AAC5B,QAAM,SAAS,eAAe,WAAW;AAEzC,QAAM,aAAa,MAAM,OAAO,OAAO;AACvC,aAAW,UAAU;AAMrB,QAAM,QAAQ,MAAM;AAClB,QAAI,OAAO;AACT,cAAQ,QAAQ,OAAO,WAAW,OAAO;AAAA,IAC3C;AAAA,EACF,GAAG,CAAC,QAAQ,KAAK,CAAC;AAElB,SAAO;AACT;","names":[]}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var QueryClientProvider_exports = {};
31
+ __export(QueryClientProvider_exports, {
32
+ QueryClientContext: () => QueryClientContext,
33
+ QueryClientProvider: () => QueryClientProvider,
34
+ useQueryClient: () => useQueryClient
35
+ });
36
+ module.exports = __toCommonJS(QueryClientProvider_exports);
37
+ var React = __toESM(require("react"), 1);
38
+ const QueryClientContext = React.createContext(
39
+ void 0
40
+ );
41
+ const useQueryClient = (queryClient) => {
42
+ const client = React.useContext(QueryClientContext);
43
+ if (queryClient) {
44
+ return queryClient;
45
+ }
46
+ if (!client) {
47
+ throw new Error("No QueryClient set, use QueryClientProvider to set one");
48
+ }
49
+ return client;
50
+ };
51
+ const QueryClientProvider = ({
52
+ client,
53
+ children
54
+ }) => {
55
+ React.useEffect(() => {
56
+ client.mount();
57
+ return () => {
58
+ client.unmount();
59
+ };
60
+ }, [client]);
61
+ return /* @__PURE__ */ React.createElement(QueryClientContext.Provider, { value: client }, children);
62
+ };
63
+ // Annotate the CommonJS export names for ESM import in node:
64
+ 0 && (module.exports = {
65
+ QueryClientContext,
66
+ QueryClientProvider,
67
+ useQueryClient
68
+ });
69
+ //# sourceMappingURL=QueryClientProvider.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,YAAuB;AAIhB,MAAM,qBAAqB,MAAM;AAAA,EACtC;AACF;AAEO,MAAM,iBAAiB,CAAC,gBAA8B;AAC3D,QAAM,SAAS,MAAM,WAAW,kBAAkB;AAElD,MAAI,aAAa;AACf,WAAO;AAAA,EACT;AAEA,MAAI,CAAC,QAAQ;AACX,UAAM,IAAI,MAAM,wDAAwD;AAAA,EAC1E;AAEA,SAAO;AACT;AAOO,MAAM,sBAAsB,CAAC;AAAA,EAClC;AAAA,EACA;AACF,MAA6C;AAC3C,QAAM,UAAU,MAAM;AACpB,WAAO,MAAM;AACb,WAAO,MAAM;AACX,aAAO,QAAQ;AAAA,IACjB;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE,oCAAC,mBAAmB,UAAnB,EAA4B,OAAO,UACjC,QACH;AAEJ;","names":[]}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { QueryClient } from '@tanstack/query-core';
3
+
4
+ declare const QueryClientContext: React.Context<QueryClient | undefined>;
5
+ declare const useQueryClient: (queryClient?: QueryClient) => QueryClient;
6
+ type QueryClientProviderProps = {
7
+ client: QueryClient;
8
+ children?: React.ReactNode;
9
+ };
10
+ declare const QueryClientProvider: ({ client, children, }: QueryClientProviderProps) => JSX.Element;
11
+
12
+ export { QueryClientContext, QueryClientProvider, QueryClientProviderProps, useQueryClient };
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { QueryClient } from '@tanstack/query-core';
3
+
4
+ declare const QueryClientContext: React.Context<QueryClient | undefined>;
5
+ declare const useQueryClient: (queryClient?: QueryClient) => QueryClient;
6
+ type QueryClientProviderProps = {
7
+ client: QueryClient;
8
+ children?: React.ReactNode;
9
+ };
10
+ declare const QueryClientProvider: ({ client, children, }: QueryClientProviderProps) => JSX.Element;
11
+
12
+ export { QueryClientContext, QueryClientProvider, QueryClientProviderProps, useQueryClient };
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ const QueryClientContext = React.createContext(
4
+ void 0
5
+ );
6
+ const useQueryClient = (queryClient) => {
7
+ const client = React.useContext(QueryClientContext);
8
+ if (queryClient) {
9
+ return queryClient;
10
+ }
11
+ if (!client) {
12
+ throw new Error("No QueryClient set, use QueryClientProvider to set one");
13
+ }
14
+ return client;
15
+ };
16
+ const QueryClientProvider = ({
17
+ client,
18
+ children
19
+ }) => {
20
+ React.useEffect(() => {
21
+ client.mount();
22
+ return () => {
23
+ client.unmount();
24
+ };
25
+ }, [client]);
26
+ return /* @__PURE__ */ React.createElement(QueryClientContext.Provider, { value: client }, children);
27
+ };
28
+ export {
29
+ QueryClientContext,
30
+ QueryClientProvider,
31
+ useQueryClient
32
+ };
33
+ //# sourceMappingURL=QueryClientProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"mappings":";AACA,YAAY,WAAW;AAIhB,MAAM,qBAAqB,MAAM;AAAA,EACtC;AACF;AAEO,MAAM,iBAAiB,CAAC,gBAA8B;AAC3D,QAAM,SAAS,MAAM,WAAW,kBAAkB;AAElD,MAAI,aAAa;AACf,WAAO;AAAA,EACT;AAEA,MAAI,CAAC,QAAQ;AACX,UAAM,IAAI,MAAM,wDAAwD;AAAA,EAC1E;AAEA,SAAO;AACT;AAOO,MAAM,sBAAsB,CAAC;AAAA,EAClC;AAAA,EACA;AACF,MAA6C;AAC3C,QAAM,UAAU,MAAM;AACpB,WAAO,MAAM;AACb,WAAO,MAAM;AACX,aAAO,QAAQ;AAAA,IACjB;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE,oCAAC,mBAAmB,UAAnB,EAA4B,OAAO,UACjC,QACH;AAEJ;","names":[]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var QueryErrorResetBoundary_exports = {};
31
+ __export(QueryErrorResetBoundary_exports, {
32
+ QueryErrorResetBoundary: () => QueryErrorResetBoundary,
33
+ useQueryErrorResetBoundary: () => useQueryErrorResetBoundary
34
+ });
35
+ module.exports = __toCommonJS(QueryErrorResetBoundary_exports);
36
+ var React = __toESM(require("react"), 1);
37
+ function createValue() {
38
+ let isReset = false;
39
+ return {
40
+ clearReset: () => {
41
+ isReset = false;
42
+ },
43
+ reset: () => {
44
+ isReset = true;
45
+ },
46
+ isReset: () => {
47
+ return isReset;
48
+ }
49
+ };
50
+ }
51
+ const QueryErrorResetBoundaryContext = React.createContext(createValue());
52
+ const useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
53
+ const QueryErrorResetBoundary = ({
54
+ children
55
+ }) => {
56
+ const [value] = React.useState(() => createValue());
57
+ return /* @__PURE__ */ React.createElement(QueryErrorResetBoundaryContext.Provider, { value }, typeof children === "function" ? children(value) : children);
58
+ };
59
+ // Annotate the CommonJS export names for ESM import in node:
60
+ 0 && (module.exports = {
61
+ QueryErrorResetBoundary,
62
+ useQueryErrorResetBoundary
63
+ });
64
+ //# sourceMappingURL=QueryErrorResetBoundary.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,YAAuB;AAUvB,SAAS,cAA4C;AACnD,MAAI,UAAU;AACd,SAAO;AAAA,IACL,YAAY,MAAM;AAChB,gBAAU;AAAA,IACZ;AAAA,IACA,OAAO,MAAM;AACX,gBAAU;AAAA,IACZ;AAAA,IACA,SAAS,MAAM;AACb,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAEA,MAAM,iCAAiC,MAAM,cAAc,YAAY,CAAC;AAIjE,MAAM,6BAA6B,MACxC,MAAM,WAAW,8BAA8B;AAU1C,MAAM,0BAA0B,CAAC;AAAA,EACtC;AACF,MAAoC;AAClC,QAAM,CAAC,KAAK,IAAI,MAAM,SAAS,MAAM,YAAY,CAAC;AAClD,SACE,oCAAC,+BAA+B,UAA/B,EAAwC,SACtC,OAAO,aAAa,aAChB,SAAsB,KAAK,IAC5B,QACN;AAEJ;","names":[]}
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+
3
+ interface QueryErrorResetBoundaryValue {
4
+ clearReset: () => void;
5
+ isReset: () => boolean;
6
+ reset: () => void;
7
+ }
8
+ declare const useQueryErrorResetBoundary: () => QueryErrorResetBoundaryValue;
9
+ interface QueryErrorResetBoundaryProps {
10
+ children: ((value: QueryErrorResetBoundaryValue) => React.ReactNode) | React.ReactNode;
11
+ }
12
+ declare const QueryErrorResetBoundary: ({ children, }: QueryErrorResetBoundaryProps) => JSX.Element;
13
+
14
+ export { QueryErrorResetBoundary, QueryErrorResetBoundaryProps, QueryErrorResetBoundaryValue, useQueryErrorResetBoundary };
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+
3
+ interface QueryErrorResetBoundaryValue {
4
+ clearReset: () => void;
5
+ isReset: () => boolean;
6
+ reset: () => void;
7
+ }
8
+ declare const useQueryErrorResetBoundary: () => QueryErrorResetBoundaryValue;
9
+ interface QueryErrorResetBoundaryProps {
10
+ children: ((value: QueryErrorResetBoundaryValue) => React.ReactNode) | React.ReactNode;
11
+ }
12
+ declare const QueryErrorResetBoundary: ({ children, }: QueryErrorResetBoundaryProps) => JSX.Element;
13
+
14
+ export { QueryErrorResetBoundary, QueryErrorResetBoundaryProps, QueryErrorResetBoundaryValue, useQueryErrorResetBoundary };
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ function createValue() {
4
+ let isReset = false;
5
+ return {
6
+ clearReset: () => {
7
+ isReset = false;
8
+ },
9
+ reset: () => {
10
+ isReset = true;
11
+ },
12
+ isReset: () => {
13
+ return isReset;
14
+ }
15
+ };
16
+ }
17
+ const QueryErrorResetBoundaryContext = React.createContext(createValue());
18
+ const useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
19
+ const QueryErrorResetBoundary = ({
20
+ children
21
+ }) => {
22
+ const [value] = React.useState(() => createValue());
23
+ return /* @__PURE__ */ React.createElement(QueryErrorResetBoundaryContext.Provider, { value }, typeof children === "function" ? children(value) : children);
24
+ };
25
+ export {
26
+ QueryErrorResetBoundary,
27
+ useQueryErrorResetBoundary
28
+ };
29
+ //# sourceMappingURL=QueryErrorResetBoundary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"mappings":";AACA,YAAY,WAAW;AAUvB,SAAS,cAA4C;AACnD,MAAI,UAAU;AACd,SAAO;AAAA,IACL,YAAY,MAAM;AAChB,gBAAU;AAAA,IACZ;AAAA,IACA,OAAO,MAAM;AACX,gBAAU;AAAA,IACZ;AAAA,IACA,SAAS,MAAM;AACb,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAEA,MAAM,iCAAiC,MAAM,cAAc,YAAY,CAAC;AAIjE,MAAM,6BAA6B,MACxC,MAAM,WAAW,8BAA8B;AAU1C,MAAM,0BAA0B,CAAC;AAAA,EACtC;AACF,MAAoC;AAClC,QAAM,CAAC,KAAK,IAAI,MAAM,SAAS,MAAM,YAAY,CAAC;AAClD,SACE,oCAAC,+BAA+B,UAA/B,EAAwC,SACtC,OAAO,aAAa,aAChB,SAAsB,KAAK,IAC5B,QACN;AAEJ;","names":[]}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var errorBoundaryUtils_exports = {};
31
+ __export(errorBoundaryUtils_exports, {
32
+ ensurePreventErrorBoundaryRetry: () => ensurePreventErrorBoundaryRetry,
33
+ getHasError: () => getHasError,
34
+ useClearResetErrorBoundary: () => useClearResetErrorBoundary
35
+ });
36
+ module.exports = __toCommonJS(errorBoundaryUtils_exports);
37
+ var React = __toESM(require("react"), 1);
38
+ var import_utils = require("./utils");
39
+ const ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
40
+ if (options.suspense || options.throwOnError) {
41
+ if (!errorResetBoundary.isReset()) {
42
+ options.retryOnMount = false;
43
+ }
44
+ }
45
+ };
46
+ const useClearResetErrorBoundary = (errorResetBoundary) => {
47
+ React.useEffect(() => {
48
+ errorResetBoundary.clearReset();
49
+ }, [errorResetBoundary]);
50
+ };
51
+ const getHasError = ({
52
+ result,
53
+ errorResetBoundary,
54
+ throwOnError,
55
+ query
56
+ }) => {
57
+ return result.isError && !errorResetBoundary.isReset() && !result.isFetching && (0, import_utils.shouldThrowError)(throwOnError, [result.error, query]);
58
+ };
59
+ // Annotate the CommonJS export names for ESM import in node:
60
+ 0 && (module.exports = {
61
+ ensurePreventErrorBoundaryRetry,
62
+ getHasError,
63
+ useClearResetErrorBoundary
64
+ });
65
+ //# sourceMappingURL=errorBoundaryUtils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/errorBoundaryUtils.ts"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { shouldThrowError } from './utils'\nimport type {\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserverResult,\n ThrowOnError,\n} from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\n\nexport const ensurePreventErrorBoundaryRetry = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n if (options.suspense || options.throwOnError) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false\n }\n }\n}\n\nexport const useClearResetErrorBoundary = (\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n React.useEffect(() => {\n errorResetBoundary.clearReset()\n }, [errorResetBoundary])\n}\n\nexport const getHasError = <\n TData,\n TError,\n TQueryFnData,\n TQueryData,\n TQueryKey extends QueryKey,\n>({\n result,\n errorResetBoundary,\n throwOnError,\n query,\n}: {\n result: QueryObserverResult<TData, TError>\n errorResetBoundary: QueryErrorResetBoundaryValue\n throwOnError: ThrowOnError<TQueryFnData, TError, TQueryData, TQueryKey>\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>\n}) => {\n return (\n result.isError &&\n !errorResetBoundary.isReset() &&\n !result.isFetching &&\n shouldThrowError(throwOnError, [result.error, query])\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,YAAuB;AACvB,mBAAiC;AAU1B,MAAM,kCAAkC,CAO7C,SAOA,uBACG;AACH,MAAI,QAAQ,YAAY,QAAQ,cAAc;AAE5C,QAAI,CAAC,mBAAmB,QAAQ,GAAG;AACjC,cAAQ,eAAe;AAAA,IACzB;AAAA,EACF;AACF;AAEO,MAAM,6BAA6B,CACxC,uBACG;AACH,QAAM,UAAU,MAAM;AACpB,uBAAmB,WAAW;AAAA,EAChC,GAAG,CAAC,kBAAkB,CAAC;AACzB;AAEO,MAAM,cAAc,CAMzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAKM;AACJ,SACE,OAAO,WACP,CAAC,mBAAmB,QAAQ,KAC5B,CAAC,OAAO,kBACR,+BAAiB,cAAc,CAAC,OAAO,OAAO,KAAK,CAAC;AAExD;","names":[]}
@@ -0,0 +1,14 @@
1
+ import { QueryKey, DefaultedQueryObserverOptions, QueryObserverResult, ThrowOnError, Query } from '@tanstack/query-core';
2
+ import { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary.cjs';
3
+ import 'react';
4
+
5
+ declare const ensurePreventErrorBoundaryRetry: <TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey>(options: DefaultedQueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, errorResetBoundary: QueryErrorResetBoundaryValue) => void;
6
+ declare const useClearResetErrorBoundary: (errorResetBoundary: QueryErrorResetBoundaryValue) => void;
7
+ declare const getHasError: <TData, TError, TQueryFnData, TQueryData, TQueryKey extends QueryKey>({ result, errorResetBoundary, throwOnError, query, }: {
8
+ result: QueryObserverResult<TData, TError>;
9
+ errorResetBoundary: QueryErrorResetBoundaryValue;
10
+ throwOnError: ThrowOnError<TQueryFnData, TError, TQueryData, TQueryKey>;
11
+ query: Query<TQueryFnData, TError, TQueryData, TQueryKey>;
12
+ }) => boolean;
13
+
14
+ export { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary };
@@ -0,0 +1,14 @@
1
+ import { QueryKey, DefaultedQueryObserverOptions, QueryObserverResult, ThrowOnError, Query } from '@tanstack/query-core';
2
+ import { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary.js';
3
+ import 'react';
4
+
5
+ declare const ensurePreventErrorBoundaryRetry: <TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey>(options: DefaultedQueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, errorResetBoundary: QueryErrorResetBoundaryValue) => void;
6
+ declare const useClearResetErrorBoundary: (errorResetBoundary: QueryErrorResetBoundaryValue) => void;
7
+ declare const getHasError: <TData, TError, TQueryFnData, TQueryData, TQueryKey extends QueryKey>({ result, errorResetBoundary, throwOnError, query, }: {
8
+ result: QueryObserverResult<TData, TError>;
9
+ errorResetBoundary: QueryErrorResetBoundaryValue;
10
+ throwOnError: ThrowOnError<TQueryFnData, TError, TQueryData, TQueryKey>;
11
+ query: Query<TQueryFnData, TError, TQueryData, TQueryKey>;
12
+ }) => boolean;
13
+
14
+ export { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary };
@@ -1,16 +1,14 @@
1
- 'use client';
2
- import * as React from 'react';
3
- import { shouldThrowError } from './utils.js';
4
-
1
+ "use client";
2
+ import * as React from "react";
3
+ import { shouldThrowError } from "./utils";
5
4
  const ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
6
5
  if (options.suspense || options.throwOnError) {
7
- // Prevent retrying failed query if the error boundary has not been reset yet
8
6
  if (!errorResetBoundary.isReset()) {
9
7
  options.retryOnMount = false;
10
8
  }
11
9
  }
12
10
  };
13
- const useClearResetErrorBoundary = errorResetBoundary => {
11
+ const useClearResetErrorBoundary = (errorResetBoundary) => {
14
12
  React.useEffect(() => {
15
13
  errorResetBoundary.clearReset();
16
14
  }, [errorResetBoundary]);
@@ -23,6 +21,9 @@ const getHasError = ({
23
21
  }) => {
24
22
  return result.isError && !errorResetBoundary.isReset() && !result.isFetching && shouldThrowError(throwOnError, [result.error, query]);
25
23
  };
26
-
27
- export { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary };
28
- //# sourceMappingURL=errorBoundaryUtils.js.map
24
+ export {
25
+ ensurePreventErrorBoundaryRetry,
26
+ getHasError,
27
+ useClearResetErrorBoundary
28
+ };
29
+ //# sourceMappingURL=errorBoundaryUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/errorBoundaryUtils.ts"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { shouldThrowError } from './utils'\nimport type {\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserverResult,\n ThrowOnError,\n} from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\n\nexport const ensurePreventErrorBoundaryRetry = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n if (options.suspense || options.throwOnError) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false\n }\n }\n}\n\nexport const useClearResetErrorBoundary = (\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n React.useEffect(() => {\n errorResetBoundary.clearReset()\n }, [errorResetBoundary])\n}\n\nexport const getHasError = <\n TData,\n TError,\n TQueryFnData,\n TQueryData,\n TQueryKey extends QueryKey,\n>({\n result,\n errorResetBoundary,\n throwOnError,\n query,\n}: {\n result: QueryObserverResult<TData, TError>\n errorResetBoundary: QueryErrorResetBoundaryValue\n throwOnError: ThrowOnError<TQueryFnData, TError, TQueryData, TQueryKey>\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>\n}) => {\n return (\n result.isError &&\n !errorResetBoundary.isReset() &&\n !result.isFetching &&\n shouldThrowError(throwOnError, [result.error, query])\n )\n}\n"],"mappings":";AACA,YAAY,WAAW;AACvB,SAAS,wBAAwB;AAU1B,MAAM,kCAAkC,CAO7C,SAOA,uBACG;AACH,MAAI,QAAQ,YAAY,QAAQ,cAAc;AAE5C,QAAI,CAAC,mBAAmB,QAAQ,GAAG;AACjC,cAAQ,eAAe;AAAA,IACzB;AAAA,EACF;AACF;AAEO,MAAM,6BAA6B,CACxC,uBACG;AACH,QAAM,UAAU,MAAM;AACpB,uBAAmB,WAAW;AAAA,EAChC,GAAG,CAAC,kBAAkB,CAAC;AACzB;AAEO,MAAM,cAAc,CAMzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAKM;AACJ,SACE,OAAO,WACP,CAAC,mBAAmB,QAAQ,KAC5B,CAAC,OAAO,cACR,iBAAiB,cAAc,CAAC,OAAO,OAAO,KAAK,CAAC;AAExD;","names":[]}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var src_exports = {};
21
+ __export(src_exports, {
22
+ HydrationBoundary: () => import_HydrationBoundary.HydrationBoundary,
23
+ IsRestoringProvider: () => import_isRestoring.IsRestoringProvider,
24
+ QueryClientContext: () => import_QueryClientProvider.QueryClientContext,
25
+ QueryClientProvider: () => import_QueryClientProvider.QueryClientProvider,
26
+ QueryErrorResetBoundary: () => import_QueryErrorResetBoundary.QueryErrorResetBoundary,
27
+ queryOptions: () => import_queryOptions.queryOptions,
28
+ useInfiniteQuery: () => import_useInfiniteQuery.useInfiniteQuery,
29
+ useIsFetching: () => import_useIsFetching.useIsFetching,
30
+ useIsMutating: () => import_useMutationState.useIsMutating,
31
+ useIsRestoring: () => import_isRestoring.useIsRestoring,
32
+ useMutation: () => import_useMutation.useMutation,
33
+ useMutationState: () => import_useMutationState.useMutationState,
34
+ useQueries: () => import_useQueries.useQueries,
35
+ useQuery: () => import_useQuery.useQuery,
36
+ useQueryClient: () => import_QueryClientProvider.useQueryClient,
37
+ useQueryErrorResetBoundary: () => import_QueryErrorResetBoundary.useQueryErrorResetBoundary
38
+ });
39
+ module.exports = __toCommonJS(src_exports);
40
+ __reExport(src_exports, require("@tanstack/query-core"), module.exports);
41
+ __reExport(src_exports, require("./types"), module.exports);
42
+ var import_useQueries = require("./useQueries");
43
+ var import_useQuery = require("./useQuery");
44
+ var import_queryOptions = require("./queryOptions");
45
+ var import_QueryClientProvider = require("./QueryClientProvider");
46
+ var import_HydrationBoundary = require("./HydrationBoundary");
47
+ var import_QueryErrorResetBoundary = require("./QueryErrorResetBoundary");
48
+ var import_useIsFetching = require("./useIsFetching");
49
+ var import_useMutationState = require("./useMutationState");
50
+ var import_useMutation = require("./useMutation");
51
+ var import_useInfiniteQuery = require("./useInfiniteQuery");
52
+ var import_isRestoring = require("./isRestoring");
53
+ // Annotate the CommonJS export names for ESM import in node:
54
+ 0 && (module.exports = {
55
+ HydrationBoundary,
56
+ IsRestoringProvider,
57
+ QueryClientContext,
58
+ QueryClientProvider,
59
+ QueryErrorResetBoundary,
60
+ queryOptions,
61
+ useInfiniteQuery,
62
+ useIsFetching,
63
+ useIsMutating,
64
+ useIsRestoring,
65
+ useMutation,
66
+ useMutationState,
67
+ useQueries,
68
+ useQuery,
69
+ useQueryClient,
70
+ useQueryErrorResetBoundary,
71
+ ...require("@tanstack/query-core"),
72
+ ...require("./types")
73
+ });
74
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/* istanbul ignore file */\n\n// Re-export core\nexport * from '@tanstack/query-core'\n\n// React Query\nexport * from './types'\nexport { useQueries } from './useQueries'\nexport type { QueriesResults, QueriesOptions } from './useQueries'\nexport { useQuery } from './useQuery'\nexport { queryOptions } from './queryOptions'\nexport {\n QueryClientContext,\n QueryClientProvider,\n useQueryClient,\n} from './QueryClientProvider'\nexport type { QueryClientProviderProps } from './QueryClientProvider'\nexport type { QueryErrorResetBoundaryProps } from './QueryErrorResetBoundary'\nexport { HydrationBoundary } from './HydrationBoundary'\nexport type { HydrationBoundaryProps } from './HydrationBoundary'\nexport {\n QueryErrorResetBoundary,\n useQueryErrorResetBoundary,\n} from './QueryErrorResetBoundary'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { useMutation } from './useMutation'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useIsRestoring, IsRestoringProvider } from './isRestoring'\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAc,iCAHd;AAMA,wBAAc,oBANd;AAOA,wBAA2B;AAE3B,sBAAyB;AACzB,0BAA6B;AAC7B,iCAIO;AAGP,+BAAkC;AAElC,qCAGO;AACP,2BAA8B;AAC9B,8BAAgD;AAChD,yBAA4B;AAC5B,8BAAiC;AACjC,yBAAoD;","names":[]}