@tanstack/preact-query 5.101.3 → 5.102.0

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 (400) hide show
  1. package/README.md +15 -1
  2. package/build/legacy/HydrationBoundary.cjs +35 -79
  3. package/build/legacy/HydrationBoundary.cjs.map +1 -1
  4. package/build/legacy/HydrationBoundary.d.cts +15 -2
  5. package/build/legacy/HydrationBoundary.d.cts.map +1 -0
  6. package/build/legacy/HydrationBoundary.d.ts +15 -2
  7. package/build/legacy/HydrationBoundary.d.ts.map +1 -0
  8. package/build/legacy/HydrationBoundary.js +31 -51
  9. package/build/legacy/HydrationBoundary.js.map +1 -1
  10. package/build/legacy/IsRestoringProvider.cjs +10 -35
  11. package/build/legacy/IsRestoringProvider.cjs.map +1 -1
  12. package/build/legacy/IsRestoringProvider.d.cts +6 -2
  13. package/build/legacy/IsRestoringProvider.d.cts.map +1 -0
  14. package/build/legacy/IsRestoringProvider.d.ts +6 -2
  15. package/build/legacy/IsRestoringProvider.d.ts.map +1 -0
  16. package/build/legacy/IsRestoringProvider.js +7 -8
  17. package/build/legacy/IsRestoringProvider.js.map +1 -1
  18. package/build/legacy/QueryClientProvider.cjs +26 -58
  19. package/build/legacy/QueryClientProvider.cjs.map +1 -1
  20. package/build/legacy/QueryClientProvider.d.cts +13 -4
  21. package/build/legacy/QueryClientProvider.d.cts.map +1 -0
  22. package/build/legacy/QueryClientProvider.d.ts +13 -4
  23. package/build/legacy/QueryClientProvider.d.ts.map +1 -0
  24. package/build/legacy/QueryClientProvider.js +21 -29
  25. package/build/legacy/QueryClientProvider.js.map +1 -1
  26. package/build/legacy/QueryErrorResetBoundary.cjs +29 -53
  27. package/build/legacy/QueryErrorResetBoundary.cjs.map +1 -1
  28. package/build/legacy/QueryErrorResetBoundary.d.cts +19 -8
  29. package/build/legacy/QueryErrorResetBoundary.d.cts.map +1 -0
  30. package/build/legacy/QueryErrorResetBoundary.d.ts +19 -8
  31. package/build/legacy/QueryErrorResetBoundary.d.ts.map +1 -0
  32. package/build/legacy/QueryErrorResetBoundary.js +24 -24
  33. package/build/legacy/QueryErrorResetBoundary.js.map +1 -1
  34. package/build/legacy/errorBoundaryUtils.cjs +20 -53
  35. package/build/legacy/errorBoundaryUtils.cjs.map +1 -1
  36. package/build/legacy/errorBoundaryUtils.d.cts +15 -3
  37. package/build/legacy/errorBoundaryUtils.d.cts.map +1 -0
  38. package/build/legacy/errorBoundaryUtils.d.ts +15 -3
  39. package/build/legacy/errorBoundaryUtils.d.ts.map +1 -0
  40. package/build/legacy/errorBoundaryUtils.js +15 -24
  41. package/build/legacy/errorBoundaryUtils.js.map +1 -1
  42. package/build/legacy/index.cjs +55 -95
  43. package/build/legacy/index.cjs.map +1 -1
  44. package/build/legacy/index.d.cts +21 -205
  45. package/build/legacy/index.d.ts +21 -205
  46. package/build/legacy/index.js +11 -39
  47. package/build/legacy/index.js.map +1 -1
  48. package/build/legacy/infiniteQueryOptions.cjs +6 -30
  49. package/build/legacy/infiniteQueryOptions.cjs.map +1 -1
  50. package/build/legacy/infiniteQueryOptions.d.cts +18 -4
  51. package/build/legacy/infiniteQueryOptions.d.cts.map +1 -0
  52. package/build/legacy/infiniteQueryOptions.d.ts +18 -4
  53. package/build/legacy/infiniteQueryOptions.d.ts.map +1 -0
  54. package/build/legacy/infiniteQueryOptions.js +5 -5
  55. package/build/legacy/infiniteQueryOptions.js.map +1 -1
  56. package/build/legacy/mutationOptions.cjs +6 -30
  57. package/build/legacy/mutationOptions.cjs.map +1 -1
  58. package/build/legacy/mutationOptions.d.cts +8 -1
  59. package/build/legacy/mutationOptions.d.cts.map +1 -0
  60. package/build/legacy/mutationOptions.d.ts +8 -1
  61. package/build/legacy/mutationOptions.d.ts.map +1 -0
  62. package/build/legacy/mutationOptions.js +5 -5
  63. package/build/legacy/mutationOptions.js.map +1 -1
  64. package/build/legacy/queryOptions.cjs +6 -30
  65. package/build/legacy/queryOptions.cjs.map +1 -1
  66. package/build/legacy/queryOptions.d.cts +19 -4
  67. package/build/legacy/queryOptions.d.cts.map +1 -0
  68. package/build/legacy/queryOptions.d.ts +19 -4
  69. package/build/legacy/queryOptions.d.ts.map +1 -0
  70. package/build/legacy/queryOptions.js +5 -5
  71. package/build/legacy/queryOptions.js.map +1 -1
  72. package/build/legacy/suspense.cjs +20 -55
  73. package/build/legacy/suspense.cjs.map +1 -1
  74. package/build/legacy/suspense.d.cts +10 -5
  75. package/build/legacy/suspense.d.cts.map +1 -0
  76. package/build/legacy/suspense.d.ts +10 -5
  77. package/build/legacy/suspense.d.ts.map +1 -0
  78. package/build/legacy/suspense.js +16 -26
  79. package/build/legacy/suspense.js.map +1 -1
  80. package/build/legacy/types.cjs +3 -17
  81. package/build/legacy/types.cjs.map +1 -1
  82. package/build/legacy/types.d.cts +54 -24
  83. package/build/legacy/types.d.cts.map +1 -0
  84. package/build/legacy/types.d.ts +54 -24
  85. package/build/legacy/types.d.ts.map +1 -0
  86. package/build/legacy/types.js +5 -0
  87. package/build/legacy/types.js.map +1 -1
  88. package/build/legacy/useBaseQuery.cjs +48 -118
  89. package/build/legacy/useBaseQuery.cjs.map +1 -1
  90. package/build/legacy/useBaseQuery.d.cts +7 -1
  91. package/build/legacy/useBaseQuery.d.cts.map +1 -0
  92. package/build/legacy/useBaseQuery.d.ts +7 -1
  93. package/build/legacy/useBaseQuery.d.ts.map +1 -0
  94. package/build/legacy/useBaseQuery.js +44 -99
  95. package/build/legacy/useBaseQuery.js.map +1 -1
  96. package/build/legacy/useInfiniteQuery.cjs +8 -36
  97. package/build/legacy/useInfiniteQuery.cjs.map +1 -1
  98. package/build/legacy/useInfiniteQuery.d.cts +10 -1
  99. package/build/legacy/useInfiniteQuery.d.cts.map +1 -0
  100. package/build/legacy/useInfiniteQuery.d.ts +10 -1
  101. package/build/legacy/useInfiniteQuery.d.ts.map +1 -0
  102. package/build/legacy/useInfiniteQuery.js +6 -10
  103. package/build/legacy/useInfiniteQuery.js.map +1 -1
  104. package/build/legacy/useIsFetching.cjs +12 -42
  105. package/build/legacy/useIsFetching.cjs.map +1 -1
  106. package/build/legacy/useIsFetching.d.cts +6 -1
  107. package/build/legacy/useIsFetching.d.cts.map +1 -0
  108. package/build/legacy/useIsFetching.d.ts +6 -1
  109. package/build/legacy/useIsFetching.d.ts.map +1 -0
  110. package/build/legacy/useIsFetching.js +9 -15
  111. package/build/legacy/useIsFetching.js.map +1 -1
  112. package/build/legacy/useMutation.cjs +24 -60
  113. package/build/legacy/useMutation.cjs.map +1 -1
  114. package/build/legacy/useMutation.d.cts +7 -1
  115. package/build/legacy/useMutation.d.cts.map +1 -0
  116. package/build/legacy/useMutation.d.ts +7 -1
  117. package/build/legacy/useMutation.d.ts.map +1 -0
  118. package/build/legacy/useMutation.js +21 -38
  119. package/build/legacy/useMutation.js.map +1 -1
  120. package/build/legacy/useMutationState.cjs +30 -68
  121. package/build/legacy/useMutationState.cjs.map +1 -1
  122. package/build/legacy/useMutationState.d.cts +12 -2
  123. package/build/legacy/useMutationState.d.cts.map +1 -0
  124. package/build/legacy/useMutationState.d.ts +12 -2
  125. package/build/legacy/useMutationState.d.ts.map +1 -0
  126. package/build/legacy/useMutationState.js +26 -40
  127. package/build/legacy/useMutationState.js.map +1 -1
  128. package/build/legacy/usePrefetchInfiniteQuery.cjs +9 -34
  129. package/build/legacy/usePrefetchInfiniteQuery.cjs.map +1 -1
  130. package/build/legacy/usePrefetchInfiniteQuery.d.cts +7 -1
  131. package/build/legacy/usePrefetchInfiniteQuery.d.cts.map +1 -0
  132. package/build/legacy/usePrefetchInfiniteQuery.d.ts +7 -1
  133. package/build/legacy/usePrefetchInfiniteQuery.d.ts.map +1 -0
  134. package/build/legacy/usePrefetchInfiniteQuery.js +7 -8
  135. package/build/legacy/usePrefetchInfiniteQuery.js.map +1 -1
  136. package/build/legacy/usePrefetchQuery.cjs +9 -34
  137. package/build/legacy/usePrefetchQuery.cjs.map +1 -1
  138. package/build/legacy/usePrefetchQuery.d.cts +7 -1
  139. package/build/legacy/usePrefetchQuery.d.cts.map +1 -0
  140. package/build/legacy/usePrefetchQuery.d.ts +7 -1
  141. package/build/legacy/usePrefetchQuery.d.ts.map +1 -0
  142. package/build/legacy/usePrefetchQuery.js +7 -8
  143. package/build/legacy/usePrefetchQuery.js.map +1 -1
  144. package/build/legacy/useQueries.cjs +64 -114
  145. package/build/legacy/useQueries.cjs.map +1 -1
  146. package/build/legacy/useQueries.d.cts +57 -3
  147. package/build/legacy/useQueries.d.cts.map +1 -0
  148. package/build/legacy/useQueries.d.ts +57 -3
  149. package/build/legacy/useQueries.d.ts.map +1 -0
  150. package/build/legacy/useQueries.js +60 -99
  151. package/build/legacy/useQueries.js.map +1 -1
  152. package/build/legacy/useQuery.cjs +8 -32
  153. package/build/legacy/useQuery.cjs.map +1 -1
  154. package/build/legacy/useQuery.d.cts +10 -1
  155. package/build/legacy/useQuery.d.cts.map +1 -0
  156. package/build/legacy/useQuery.d.ts +10 -1
  157. package/build/legacy/useQuery.d.ts.map +1 -0
  158. package/build/legacy/useQuery.js +6 -6
  159. package/build/legacy/useQuery.js.map +1 -1
  160. package/build/legacy/useSuspenseInfiniteQuery.cjs +18 -47
  161. package/build/legacy/useSuspenseInfiniteQuery.cjs.map +1 -1
  162. package/build/legacy/useSuspenseInfiniteQuery.d.cts +7 -1
  163. package/build/legacy/useSuspenseInfiniteQuery.d.cts.map +1 -0
  164. package/build/legacy/useSuspenseInfiniteQuery.d.ts +7 -1
  165. package/build/legacy/useSuspenseInfiniteQuery.d.ts.map +1 -0
  166. package/build/legacy/useSuspenseInfiniteQuery.js +15 -20
  167. package/build/legacy/useSuspenseInfiniteQuery.js.map +1 -1
  168. package/build/legacy/useSuspenseQueries.cjs +23 -52
  169. package/build/legacy/useSuspenseQueries.cjs.map +1 -1
  170. package/build/legacy/useSuspenseQueries.d.cts +60 -3
  171. package/build/legacy/useSuspenseQueries.d.cts.map +1 -0
  172. package/build/legacy/useSuspenseQueries.d.ts +60 -3
  173. package/build/legacy/useSuspenseQueries.d.ts.map +1 -0
  174. package/build/legacy/useSuspenseQueries.js +20 -25
  175. package/build/legacy/useSuspenseQueries.js.map +1 -1
  176. package/build/legacy/useSuspenseQuery.cjs +18 -48
  177. package/build/legacy/useSuspenseQuery.cjs.map +1 -1
  178. package/build/legacy/useSuspenseQuery.d.cts +7 -1
  179. package/build/legacy/useSuspenseQuery.d.cts.map +1 -0
  180. package/build/legacy/useSuspenseQuery.d.ts +7 -1
  181. package/build/legacy/useSuspenseQuery.d.ts.map +1 -0
  182. package/build/legacy/useSuspenseQuery.js +15 -21
  183. package/build/legacy/useSuspenseQuery.js.map +1 -1
  184. package/build/legacy/utils.cjs +43 -72
  185. package/build/legacy/utils.cjs.map +1 -1
  186. package/build/legacy/utils.d.cts +6 -2
  187. package/build/legacy/utils.d.cts.map +1 -0
  188. package/build/legacy/utils.d.ts +6 -2
  189. package/build/legacy/utils.d.ts.map +1 -0
  190. package/build/legacy/utils.js +40 -45
  191. package/build/legacy/utils.js.map +1 -1
  192. package/build/modern/HydrationBoundary.cjs +35 -79
  193. package/build/modern/HydrationBoundary.cjs.map +1 -1
  194. package/build/modern/HydrationBoundary.d.cts +15 -2
  195. package/build/modern/HydrationBoundary.d.cts.map +1 -0
  196. package/build/modern/HydrationBoundary.d.ts +15 -2
  197. package/build/modern/HydrationBoundary.d.ts.map +1 -0
  198. package/build/modern/HydrationBoundary.js +31 -51
  199. package/build/modern/HydrationBoundary.js.map +1 -1
  200. package/build/modern/IsRestoringProvider.cjs +10 -35
  201. package/build/modern/IsRestoringProvider.cjs.map +1 -1
  202. package/build/modern/IsRestoringProvider.d.cts +6 -2
  203. package/build/modern/IsRestoringProvider.d.cts.map +1 -0
  204. package/build/modern/IsRestoringProvider.d.ts +6 -2
  205. package/build/modern/IsRestoringProvider.d.ts.map +1 -0
  206. package/build/modern/IsRestoringProvider.js +7 -8
  207. package/build/modern/IsRestoringProvider.js.map +1 -1
  208. package/build/modern/QueryClientProvider.cjs +26 -58
  209. package/build/modern/QueryClientProvider.cjs.map +1 -1
  210. package/build/modern/QueryClientProvider.d.cts +13 -4
  211. package/build/modern/QueryClientProvider.d.cts.map +1 -0
  212. package/build/modern/QueryClientProvider.d.ts +13 -4
  213. package/build/modern/QueryClientProvider.d.ts.map +1 -0
  214. package/build/modern/QueryClientProvider.js +21 -29
  215. package/build/modern/QueryClientProvider.js.map +1 -1
  216. package/build/modern/QueryErrorResetBoundary.cjs +29 -53
  217. package/build/modern/QueryErrorResetBoundary.cjs.map +1 -1
  218. package/build/modern/QueryErrorResetBoundary.d.cts +19 -8
  219. package/build/modern/QueryErrorResetBoundary.d.cts.map +1 -0
  220. package/build/modern/QueryErrorResetBoundary.d.ts +19 -8
  221. package/build/modern/QueryErrorResetBoundary.d.ts.map +1 -0
  222. package/build/modern/QueryErrorResetBoundary.js +24 -24
  223. package/build/modern/QueryErrorResetBoundary.js.map +1 -1
  224. package/build/modern/errorBoundaryUtils.cjs +20 -53
  225. package/build/modern/errorBoundaryUtils.cjs.map +1 -1
  226. package/build/modern/errorBoundaryUtils.d.cts +15 -3
  227. package/build/modern/errorBoundaryUtils.d.cts.map +1 -0
  228. package/build/modern/errorBoundaryUtils.d.ts +15 -3
  229. package/build/modern/errorBoundaryUtils.d.ts.map +1 -0
  230. package/build/modern/errorBoundaryUtils.js +15 -24
  231. package/build/modern/errorBoundaryUtils.js.map +1 -1
  232. package/build/modern/index.cjs +55 -95
  233. package/build/modern/index.cjs.map +1 -1
  234. package/build/modern/index.d.cts +21 -205
  235. package/build/modern/index.d.ts +21 -205
  236. package/build/modern/index.js +11 -39
  237. package/build/modern/index.js.map +1 -1
  238. package/build/modern/infiniteQueryOptions.cjs +6 -30
  239. package/build/modern/infiniteQueryOptions.cjs.map +1 -1
  240. package/build/modern/infiniteQueryOptions.d.cts +18 -4
  241. package/build/modern/infiniteQueryOptions.d.cts.map +1 -0
  242. package/build/modern/infiniteQueryOptions.d.ts +18 -4
  243. package/build/modern/infiniteQueryOptions.d.ts.map +1 -0
  244. package/build/modern/infiniteQueryOptions.js +5 -5
  245. package/build/modern/infiniteQueryOptions.js.map +1 -1
  246. package/build/modern/mutationOptions.cjs +6 -30
  247. package/build/modern/mutationOptions.cjs.map +1 -1
  248. package/build/modern/mutationOptions.d.cts +8 -1
  249. package/build/modern/mutationOptions.d.cts.map +1 -0
  250. package/build/modern/mutationOptions.d.ts +8 -1
  251. package/build/modern/mutationOptions.d.ts.map +1 -0
  252. package/build/modern/mutationOptions.js +5 -5
  253. package/build/modern/mutationOptions.js.map +1 -1
  254. package/build/modern/queryOptions.cjs +6 -30
  255. package/build/modern/queryOptions.cjs.map +1 -1
  256. package/build/modern/queryOptions.d.cts +19 -4
  257. package/build/modern/queryOptions.d.cts.map +1 -0
  258. package/build/modern/queryOptions.d.ts +19 -4
  259. package/build/modern/queryOptions.d.ts.map +1 -0
  260. package/build/modern/queryOptions.js +5 -5
  261. package/build/modern/queryOptions.js.map +1 -1
  262. package/build/modern/suspense.cjs +20 -55
  263. package/build/modern/suspense.cjs.map +1 -1
  264. package/build/modern/suspense.d.cts +10 -5
  265. package/build/modern/suspense.d.cts.map +1 -0
  266. package/build/modern/suspense.d.ts +10 -5
  267. package/build/modern/suspense.d.ts.map +1 -0
  268. package/build/modern/suspense.js +16 -26
  269. package/build/modern/suspense.js.map +1 -1
  270. package/build/modern/types.cjs +3 -17
  271. package/build/modern/types.cjs.map +1 -1
  272. package/build/modern/types.d.cts +54 -24
  273. package/build/modern/types.d.cts.map +1 -0
  274. package/build/modern/types.d.ts +54 -24
  275. package/build/modern/types.d.ts.map +1 -0
  276. package/build/modern/types.js +5 -0
  277. package/build/modern/types.js.map +1 -1
  278. package/build/modern/useBaseQuery.cjs +48 -115
  279. package/build/modern/useBaseQuery.cjs.map +1 -1
  280. package/build/modern/useBaseQuery.d.cts +7 -1
  281. package/build/modern/useBaseQuery.d.cts.map +1 -0
  282. package/build/modern/useBaseQuery.d.ts +7 -1
  283. package/build/modern/useBaseQuery.d.ts.map +1 -0
  284. package/build/modern/useBaseQuery.js +44 -96
  285. package/build/modern/useBaseQuery.js.map +1 -1
  286. package/build/modern/useInfiniteQuery.cjs +8 -36
  287. package/build/modern/useInfiniteQuery.cjs.map +1 -1
  288. package/build/modern/useInfiniteQuery.d.cts +10 -1
  289. package/build/modern/useInfiniteQuery.d.cts.map +1 -0
  290. package/build/modern/useInfiniteQuery.d.ts +10 -1
  291. package/build/modern/useInfiniteQuery.d.ts.map +1 -0
  292. package/build/modern/useInfiniteQuery.js +6 -10
  293. package/build/modern/useInfiniteQuery.js.map +1 -1
  294. package/build/modern/useIsFetching.cjs +12 -42
  295. package/build/modern/useIsFetching.cjs.map +1 -1
  296. package/build/modern/useIsFetching.d.cts +6 -1
  297. package/build/modern/useIsFetching.d.cts.map +1 -0
  298. package/build/modern/useIsFetching.d.ts +6 -1
  299. package/build/modern/useIsFetching.d.ts.map +1 -0
  300. package/build/modern/useIsFetching.js +9 -15
  301. package/build/modern/useIsFetching.js.map +1 -1
  302. package/build/modern/useMutation.cjs +24 -60
  303. package/build/modern/useMutation.cjs.map +1 -1
  304. package/build/modern/useMutation.d.cts +7 -1
  305. package/build/modern/useMutation.d.cts.map +1 -0
  306. package/build/modern/useMutation.d.ts +7 -1
  307. package/build/modern/useMutation.d.ts.map +1 -0
  308. package/build/modern/useMutation.js +21 -38
  309. package/build/modern/useMutation.js.map +1 -1
  310. package/build/modern/useMutationState.cjs +30 -68
  311. package/build/modern/useMutationState.cjs.map +1 -1
  312. package/build/modern/useMutationState.d.cts +12 -2
  313. package/build/modern/useMutationState.d.cts.map +1 -0
  314. package/build/modern/useMutationState.d.ts +12 -2
  315. package/build/modern/useMutationState.d.ts.map +1 -0
  316. package/build/modern/useMutationState.js +26 -40
  317. package/build/modern/useMutationState.js.map +1 -1
  318. package/build/modern/usePrefetchInfiniteQuery.cjs +9 -34
  319. package/build/modern/usePrefetchInfiniteQuery.cjs.map +1 -1
  320. package/build/modern/usePrefetchInfiniteQuery.d.cts +7 -1
  321. package/build/modern/usePrefetchInfiniteQuery.d.cts.map +1 -0
  322. package/build/modern/usePrefetchInfiniteQuery.d.ts +7 -1
  323. package/build/modern/usePrefetchInfiniteQuery.d.ts.map +1 -0
  324. package/build/modern/usePrefetchInfiniteQuery.js +7 -8
  325. package/build/modern/usePrefetchInfiniteQuery.js.map +1 -1
  326. package/build/modern/usePrefetchQuery.cjs +9 -34
  327. package/build/modern/usePrefetchQuery.cjs.map +1 -1
  328. package/build/modern/usePrefetchQuery.d.cts +7 -1
  329. package/build/modern/usePrefetchQuery.d.cts.map +1 -0
  330. package/build/modern/usePrefetchQuery.d.ts +7 -1
  331. package/build/modern/usePrefetchQuery.d.ts.map +1 -0
  332. package/build/modern/usePrefetchQuery.js +7 -8
  333. package/build/modern/usePrefetchQuery.js.map +1 -1
  334. package/build/modern/useQueries.cjs +64 -114
  335. package/build/modern/useQueries.cjs.map +1 -1
  336. package/build/modern/useQueries.d.cts +57 -3
  337. package/build/modern/useQueries.d.cts.map +1 -0
  338. package/build/modern/useQueries.d.ts +57 -3
  339. package/build/modern/useQueries.d.ts.map +1 -0
  340. package/build/modern/useQueries.js +60 -99
  341. package/build/modern/useQueries.js.map +1 -1
  342. package/build/modern/useQuery.cjs +8 -32
  343. package/build/modern/useQuery.cjs.map +1 -1
  344. package/build/modern/useQuery.d.cts +10 -1
  345. package/build/modern/useQuery.d.cts.map +1 -0
  346. package/build/modern/useQuery.d.ts +10 -1
  347. package/build/modern/useQuery.d.ts.map +1 -0
  348. package/build/modern/useQuery.js +6 -6
  349. package/build/modern/useQuery.js.map +1 -1
  350. package/build/modern/useSuspenseInfiniteQuery.cjs +18 -47
  351. package/build/modern/useSuspenseInfiniteQuery.cjs.map +1 -1
  352. package/build/modern/useSuspenseInfiniteQuery.d.cts +7 -1
  353. package/build/modern/useSuspenseInfiniteQuery.d.cts.map +1 -0
  354. package/build/modern/useSuspenseInfiniteQuery.d.ts +7 -1
  355. package/build/modern/useSuspenseInfiniteQuery.d.ts.map +1 -0
  356. package/build/modern/useSuspenseInfiniteQuery.js +15 -20
  357. package/build/modern/useSuspenseInfiniteQuery.js.map +1 -1
  358. package/build/modern/useSuspenseQueries.cjs +23 -52
  359. package/build/modern/useSuspenseQueries.cjs.map +1 -1
  360. package/build/modern/useSuspenseQueries.d.cts +60 -3
  361. package/build/modern/useSuspenseQueries.d.cts.map +1 -0
  362. package/build/modern/useSuspenseQueries.d.ts +60 -3
  363. package/build/modern/useSuspenseQueries.d.ts.map +1 -0
  364. package/build/modern/useSuspenseQueries.js +20 -25
  365. package/build/modern/useSuspenseQueries.js.map +1 -1
  366. package/build/modern/useSuspenseQuery.cjs +18 -48
  367. package/build/modern/useSuspenseQuery.cjs.map +1 -1
  368. package/build/modern/useSuspenseQuery.d.cts +7 -1
  369. package/build/modern/useSuspenseQuery.d.cts.map +1 -0
  370. package/build/modern/useSuspenseQuery.d.ts +7 -1
  371. package/build/modern/useSuspenseQuery.d.ts.map +1 -0
  372. package/build/modern/useSuspenseQuery.js +15 -21
  373. package/build/modern/useSuspenseQuery.js.map +1 -1
  374. package/build/modern/utils.cjs +43 -72
  375. package/build/modern/utils.cjs.map +1 -1
  376. package/build/modern/utils.d.cts +6 -2
  377. package/build/modern/utils.d.cts.map +1 -0
  378. package/build/modern/utils.d.ts +6 -2
  379. package/build/modern/utils.d.ts.map +1 -0
  380. package/build/modern/utils.js +40 -45
  381. package/build/modern/utils.js.map +1 -1
  382. package/build/query-codemods/root.eslint.config.js +1 -1
  383. package/package.json +7 -9
  384. package/src/errorBoundaryUtils.ts +7 -5
  385. package/src/infiniteQueryOptions.ts +7 -10
  386. package/src/queryOptions.ts +7 -10
  387. package/src/suspense.ts +0 -5
  388. package/src/types.ts +47 -10
  389. package/src/useBaseQuery.ts +11 -41
  390. package/src/useMutation.ts +6 -2
  391. package/src/useMutationState.ts +32 -7
  392. package/src/usePrefetchInfiniteQuery.tsx +6 -9
  393. package/src/usePrefetchQuery.tsx +12 -4
  394. package/src/useQueries.ts +4 -3
  395. package/src/useQuery.ts +3 -3
  396. package/src/useSuspenseInfiniteQuery.ts +1 -0
  397. package/build/legacy/_tsup-dts-rollup.d.cts +0 -954
  398. package/build/legacy/_tsup-dts-rollup.d.ts +0 -954
  399. package/build/modern/_tsup-dts-rollup.d.cts +0 -954
  400. package/build/modern/_tsup-dts-rollup.d.ts +0 -954
@@ -1,37 +1,12 @@
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let preact = require("preact");
3
+ let preact_hooks = require("preact/hooks");
4
+ //#region src/IsRestoringProvider.ts
5
+ const IsRestoringContext = (0, preact.createContext)(false);
6
+ const useIsRestoring = () => (0, preact_hooks.useContext)(IsRestoringContext);
7
+ const IsRestoringProvider = IsRestoringContext.Provider;
8
+ //#endregion
9
+ exports.IsRestoringProvider = IsRestoringProvider;
10
+ exports.useIsRestoring = useIsRestoring;
19
11
 
20
- // src/IsRestoringProvider.ts
21
- var IsRestoringProvider_exports = {};
22
- __export(IsRestoringProvider_exports, {
23
- IsRestoringProvider: () => IsRestoringProvider,
24
- useIsRestoring: () => useIsRestoring
25
- });
26
- module.exports = __toCommonJS(IsRestoringProvider_exports);
27
- var import_preact = require("preact");
28
- var import_hooks = require("preact/hooks");
29
- var IsRestoringContext = (0, import_preact.createContext)(false);
30
- var useIsRestoring = () => (0, import_hooks.useContext)(IsRestoringContext);
31
- var IsRestoringProvider = IsRestoringContext.Provider;
32
- // Annotate the CommonJS export names for ESM import in node:
33
- 0 && (module.exports = {
34
- IsRestoringProvider,
35
- useIsRestoring
36
- });
37
12
  //# sourceMappingURL=IsRestoringProvider.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/IsRestoringProvider.ts"],"sourcesContent":["import { createContext } from 'preact'\nimport { useContext } from 'preact/hooks'\n\nconst IsRestoringContext = createContext(false)\n\nexport const useIsRestoring = () => useContext(IsRestoringContext)\nexport const IsRestoringProvider = IsRestoringContext.Provider\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA8B;AAC9B,mBAA2B;AAE3B,IAAM,yBAAqB,6BAAc,KAAK;AAEvC,IAAM,iBAAiB,UAAM,yBAAW,kBAAkB;AAC1D,IAAM,sBAAsB,mBAAmB;","names":[]}
1
+ {"version":3,"file":"IsRestoringProvider.cjs","names":["createContext","useContext"],"sources":["../../src/IsRestoringProvider.ts"],"sourcesContent":["import { createContext } from 'preact'\nimport { useContext } from 'preact/hooks'\n\nconst IsRestoringContext = createContext(false)\n\nexport const useIsRestoring = () => useContext(IsRestoringContext)\nexport const IsRestoringProvider = IsRestoringContext.Provider\n"],"mappings":";;;;AAGA,MAAM,sBAAA,GAAqBA,OAAAA,cAAAA,CAAc,KAAK;AAE9C,MAAa,wBAAA,GAAuBC,aAAAA,WAAAA,CAAW,kBAAkB;AACjE,MAAa,sBAAsB,mBAAmB"}
@@ -1,2 +1,6 @@
1
- export { useIsRestoring } from './_tsup-dts-rollup.cjs';
2
- export { IsRestoringProvider } from './_tsup-dts-rollup.cjs';
1
+ //#region src/IsRestoringProvider.d.ts
2
+ declare const useIsRestoring: () => boolean;
3
+ declare const IsRestoringProvider: import("preact").Provider<boolean>;
4
+ //#endregion
5
+ export { IsRestoringProvider, useIsRestoring };
6
+ //# sourceMappingURL=IsRestoringProvider.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IsRestoringProvider.d.cts","names":[],"sources":["../../src/IsRestoringProvider.ts"],"mappings":";cAKa;cACA,sCAAmB"}
@@ -1,2 +1,6 @@
1
- export { useIsRestoring } from './_tsup-dts-rollup.js';
2
- export { IsRestoringProvider } from './_tsup-dts-rollup.js';
1
+ //#region src/IsRestoringProvider.d.ts
2
+ declare const useIsRestoring: () => boolean;
3
+ declare const IsRestoringProvider: import("preact").Provider<boolean>;
4
+ //#endregion
5
+ export { IsRestoringProvider, useIsRestoring };
6
+ //# sourceMappingURL=IsRestoringProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IsRestoringProvider.d.ts","names":[],"sources":["../../src/IsRestoringProvider.ts"],"mappings":";cAKa;cACA,sCAAmB"}
@@ -1,11 +1,10 @@
1
- // src/IsRestoringProvider.ts
2
1
  import { createContext } from "preact";
3
2
  import { useContext } from "preact/hooks";
4
- var IsRestoringContext = createContext(false);
5
- var useIsRestoring = () => useContext(IsRestoringContext);
6
- var IsRestoringProvider = IsRestoringContext.Provider;
7
- export {
8
- IsRestoringProvider,
9
- useIsRestoring
10
- };
3
+ //#region src/IsRestoringProvider.ts
4
+ const IsRestoringContext = createContext(false);
5
+ const useIsRestoring = () => useContext(IsRestoringContext);
6
+ const IsRestoringProvider = IsRestoringContext.Provider;
7
+ //#endregion
8
+ export { IsRestoringProvider, useIsRestoring };
9
+
11
10
  //# sourceMappingURL=IsRestoringProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/IsRestoringProvider.ts"],"sourcesContent":["import { createContext } from 'preact'\nimport { useContext } from 'preact/hooks'\n\nconst IsRestoringContext = createContext(false)\n\nexport const useIsRestoring = () => useContext(IsRestoringContext)\nexport const IsRestoringProvider = IsRestoringContext.Provider\n"],"mappings":";AAAA,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAE3B,IAAM,qBAAqB,cAAc,KAAK;AAEvC,IAAM,iBAAiB,MAAM,WAAW,kBAAkB;AAC1D,IAAM,sBAAsB,mBAAmB;","names":[]}
1
+ {"version":3,"file":"IsRestoringProvider.js","names":[],"sources":["../../src/IsRestoringProvider.ts"],"sourcesContent":["import { createContext } from 'preact'\nimport { useContext } from 'preact/hooks'\n\nconst IsRestoringContext = createContext(false)\n\nexport const useIsRestoring = () => useContext(IsRestoringContext)\nexport const IsRestoringProvider = IsRestoringContext.Provider\n"],"mappings":";;;AAGA,MAAM,qBAAqB,cAAc,KAAK;AAE9C,MAAa,uBAAuB,WAAW,kBAAkB;AACjE,MAAa,sBAAsB,mBAAmB"}
@@ -1,62 +1,30 @@
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 });
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let preact = require("preact");
3
+ let preact_hooks = require("preact/hooks");
4
+ let preact_jsx_runtime = require("preact/jsx-runtime");
5
+ //#region src/QueryClientProvider.tsx
6
+ const QueryClientContext = (0, preact.createContext)(void 0);
7
+ const useQueryClient = (queryClient) => {
8
+ const client = (0, preact_hooks.useContext)(QueryClientContext);
9
+ if (queryClient) return queryClient;
10
+ if (!client) throw new Error("No QueryClient set, use QueryClientProvider to set one");
11
+ return client;
9
12
  };
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;
13
+ const QueryClientProvider = ({ client, children }) => {
14
+ (0, preact_hooks.useEffect)(() => {
15
+ client.mount();
16
+ return () => {
17
+ client.unmount();
18
+ };
19
+ }, [client]);
20
+ return /* @__PURE__ */ (0, preact_jsx_runtime.jsx)(QueryClientContext.Provider, {
21
+ value: client,
22
+ children
23
+ });
17
24
  };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ //#endregion
26
+ exports.QueryClientContext = QueryClientContext;
27
+ exports.QueryClientProvider = QueryClientProvider;
28
+ exports.useQueryClient = useQueryClient;
19
29
 
20
- // src/QueryClientProvider.tsx
21
- var QueryClientProvider_exports = {};
22
- __export(QueryClientProvider_exports, {
23
- QueryClientContext: () => QueryClientContext,
24
- QueryClientProvider: () => QueryClientProvider,
25
- useQueryClient: () => useQueryClient
26
- });
27
- module.exports = __toCommonJS(QueryClientProvider_exports);
28
- var import_preact = require("preact");
29
- var import_hooks = require("preact/hooks");
30
- var import_jsx_runtime = require("preact/jsx-runtime");
31
- var QueryClientContext = (0, import_preact.createContext)(
32
- void 0
33
- );
34
- var useQueryClient = (queryClient) => {
35
- const client = (0, import_hooks.useContext)(QueryClientContext);
36
- if (queryClient) {
37
- return queryClient;
38
- }
39
- if (!client) {
40
- throw new Error("No QueryClient set, use QueryClientProvider to set one");
41
- }
42
- return client;
43
- };
44
- var QueryClientProvider = ({
45
- client,
46
- children
47
- }) => {
48
- (0, import_hooks.useEffect)(() => {
49
- client.mount();
50
- return () => {
51
- client.unmount();
52
- };
53
- }, [client]);
54
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientContext.Provider, { value: client, children });
55
- };
56
- // Annotate the CommonJS export names for ESM import in node:
57
- 0 && (module.exports = {
58
- QueryClientContext,
59
- QueryClientProvider,
60
- useQueryClient
61
- });
62
30
  //# sourceMappingURL=QueryClientProvider.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["import type { QueryClient } from '@tanstack/query-core'\nimport { createContext } from 'preact'\nimport type { ComponentChildren, VNode } from 'preact'\nimport { useContext, useEffect } from 'preact/hooks'\n\nexport const QueryClientContext = createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = 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?: ComponentChildren\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): VNode => {\n 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,oBAA8B;AAE9B,mBAAsC;AAqClC;AAnCG,IAAM,yBAAqB;AAAA,EAChC;AACF;AAEO,IAAM,iBAAiB,CAAC,gBAA8B;AAC3D,QAAM,aAAS,yBAAW,kBAAkB;AAE5C,MAAI,aAAa;AACf,WAAO;AAAA,EACT;AAEA,MAAI,CAAC,QAAQ;AACX,UAAM,IAAI,MAAM,wDAAwD;AAAA,EAC1E;AAEA,SAAO;AACT;AAOO,IAAM,sBAAsB,CAAC;AAAA,EAClC;AAAA,EACA;AACF,MAAuC;AACrC,8BAAU,MAAM;AACd,WAAO,MAAM;AACb,WAAO,MAAM;AACX,aAAO,QAAQ;AAAA,IACjB;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE,4CAAC,mBAAmB,UAAnB,EAA4B,OAAO,QACjC,UACH;AAEJ;","names":[]}
1
+ {"version":3,"file":"QueryClientProvider.cjs","names":["createContext","useContext"],"sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["import type { QueryClient } from '@tanstack/query-core'\nimport { createContext } from 'preact'\nimport type { ComponentChildren, VNode } from 'preact'\nimport { useContext, useEffect } from 'preact/hooks'\n\nexport const QueryClientContext = createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = 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?: ComponentChildren\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): VNode => {\n 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":";;;;;AAKA,MAAa,sBAAA,GAAqBA,OAAAA,cAAAA,CAChC,KAAA,CACF;AAEA,MAAa,kBAAkB,gBAA8B;CAC3D,MAAM,UAAA,GAASC,aAAAA,WAAAA,CAAW,kBAAkB;CAE5C,IAAI,aACF,OAAO;CAGT,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,wDAAwD;CAG1E,OAAO;AACT;AAOA,MAAa,uBAAuB,EAClC,QACA,eACqC;CACrC,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,OAAO,MAAM;EACb,aAAa;GACX,OAAO,QAAQ;EACjB;CACF,GAAG,CAAC,MAAM,CAAC;CAEX,OACE,iBAAA,GAAA,mBAAA,IAAA,CAAC,mBAAmB,UAApB;EAA6B,OAAO;EACjC;CAC0B,CAAA;AAEjC"}
@@ -1,4 +1,13 @@
1
- export { QueryClientContext } from './_tsup-dts-rollup.cjs';
2
- export { useQueryClient } from './_tsup-dts-rollup.cjs';
3
- export { QueryClientProviderProps } from './_tsup-dts-rollup.cjs';
4
- export { QueryClientProvider } from './_tsup-dts-rollup.cjs';
1
+ import { QueryClient } from "@tanstack/query-core";
2
+ import { ComponentChildren, VNode } from "preact";
3
+ //#region src/QueryClientProvider.d.ts
4
+ declare const QueryClientContext: import("preact").Context<QueryClient | undefined>;
5
+ declare const useQueryClient: (queryClient?: QueryClient) => QueryClient;
6
+ type QueryClientProviderProps = {
7
+ client: QueryClient;
8
+ children?: ComponentChildren;
9
+ };
10
+ declare const QueryClientProvider: ({ client, children }: QueryClientProviderProps) => VNode;
11
+ //#endregion
12
+ export { QueryClientContext, QueryClientProvider, QueryClientProviderProps, useQueryClient };
13
+ //# sourceMappingURL=QueryClientProvider.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryClientProvider.d.cts","names":[],"sources":["../../src/QueryClientProvider.tsx"],"mappings":";;;cAKa,qCAAkB,QAAA;cAIlB,iBAAkB,cAAc,gBAAW;KAc5C;EACV,QAAQ;EACR,WAAW;;cAGA,wBAAuB,QAAA,YAGjC,6BAA2B"}
@@ -1,4 +1,13 @@
1
- export { QueryClientContext } from './_tsup-dts-rollup.js';
2
- export { useQueryClient } from './_tsup-dts-rollup.js';
3
- export { QueryClientProviderProps } from './_tsup-dts-rollup.js';
4
- export { QueryClientProvider } from './_tsup-dts-rollup.js';
1
+ import { QueryClient } from "@tanstack/query-core";
2
+ import { ComponentChildren, VNode } from "preact";
3
+ //#region src/QueryClientProvider.d.ts
4
+ declare const QueryClientContext: import("preact").Context<QueryClient | undefined>;
5
+ declare const useQueryClient: (queryClient?: QueryClient) => QueryClient;
6
+ type QueryClientProviderProps = {
7
+ client: QueryClient;
8
+ children?: ComponentChildren;
9
+ };
10
+ declare const QueryClientProvider: ({ client, children }: QueryClientProviderProps) => VNode;
11
+ //#endregion
12
+ export { QueryClientContext, QueryClientProvider, QueryClientProviderProps, useQueryClient };
13
+ //# sourceMappingURL=QueryClientProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryClientProvider.d.ts","names":[],"sources":["../../src/QueryClientProvider.tsx"],"mappings":";;;cAKa,qCAAkB,QAAA;cAIlB,iBAAkB,cAAc,gBAAW;KAc5C;EACV,QAAQ;EACR,WAAW;;cAGA,wBAAuB,QAAA,YAGjC,6BAA2B"}
@@ -1,35 +1,27 @@
1
- // src/QueryClientProvider.tsx
2
1
  import { createContext } from "preact";
3
2
  import { useContext, useEffect } from "preact/hooks";
4
3
  import { jsx } from "preact/jsx-runtime";
5
- var QueryClientContext = createContext(
6
- void 0
7
- );
8
- var useQueryClient = (queryClient) => {
9
- const client = useContext(QueryClientContext);
10
- if (queryClient) {
11
- return queryClient;
12
- }
13
- if (!client) {
14
- throw new Error("No QueryClient set, use QueryClientProvider to set one");
15
- }
16
- return client;
4
+ //#region src/QueryClientProvider.tsx
5
+ const QueryClientContext = createContext(void 0);
6
+ const useQueryClient = (queryClient) => {
7
+ const client = useContext(QueryClientContext);
8
+ if (queryClient) return queryClient;
9
+ if (!client) throw new Error("No QueryClient set, use QueryClientProvider to set one");
10
+ return client;
17
11
  };
18
- var QueryClientProvider = ({
19
- client,
20
- children
21
- }) => {
22
- useEffect(() => {
23
- client.mount();
24
- return () => {
25
- client.unmount();
26
- };
27
- }, [client]);
28
- return /* @__PURE__ */ jsx(QueryClientContext.Provider, { value: client, children });
29
- };
30
- export {
31
- QueryClientContext,
32
- QueryClientProvider,
33
- useQueryClient
12
+ const QueryClientProvider = ({ client, children }) => {
13
+ useEffect(() => {
14
+ client.mount();
15
+ return () => {
16
+ client.unmount();
17
+ };
18
+ }, [client]);
19
+ return /* @__PURE__ */ jsx(QueryClientContext.Provider, {
20
+ value: client,
21
+ children
22
+ });
34
23
  };
24
+ //#endregion
25
+ export { QueryClientContext, QueryClientProvider, useQueryClient };
26
+
35
27
  //# sourceMappingURL=QueryClientProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["import type { QueryClient } from '@tanstack/query-core'\nimport { createContext } from 'preact'\nimport type { ComponentChildren, VNode } from 'preact'\nimport { useContext, useEffect } from 'preact/hooks'\n\nexport const QueryClientContext = createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = 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?: ComponentChildren\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): VNode => {\n 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,SAAS,qBAAqB;AAE9B,SAAS,YAAY,iBAAiB;AAqClC;AAnCG,IAAM,qBAAqB;AAAA,EAChC;AACF;AAEO,IAAM,iBAAiB,CAAC,gBAA8B;AAC3D,QAAM,SAAS,WAAW,kBAAkB;AAE5C,MAAI,aAAa;AACf,WAAO;AAAA,EACT;AAEA,MAAI,CAAC,QAAQ;AACX,UAAM,IAAI,MAAM,wDAAwD;AAAA,EAC1E;AAEA,SAAO;AACT;AAOO,IAAM,sBAAsB,CAAC;AAAA,EAClC;AAAA,EACA;AACF,MAAuC;AACrC,YAAU,MAAM;AACd,WAAO,MAAM;AACb,WAAO,MAAM;AACX,aAAO,QAAQ;AAAA,IACjB;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE,oBAAC,mBAAmB,UAAnB,EAA4B,OAAO,QACjC,UACH;AAEJ;","names":[]}
1
+ {"version":3,"file":"QueryClientProvider.js","names":[],"sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["import type { QueryClient } from '@tanstack/query-core'\nimport { createContext } from 'preact'\nimport type { ComponentChildren, VNode } from 'preact'\nimport { useContext, useEffect } from 'preact/hooks'\n\nexport const QueryClientContext = createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = 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?: ComponentChildren\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): VNode => {\n 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":";;;;AAKA,MAAa,qBAAqB,cAChC,KAAA,CACF;AAEA,MAAa,kBAAkB,gBAA8B;CAC3D,MAAM,SAAS,WAAW,kBAAkB;CAE5C,IAAI,aACF,OAAO;CAGT,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,wDAAwD;CAG1E,OAAO;AACT;AAOA,MAAa,uBAAuB,EAClC,QACA,eACqC;CACrC,gBAAgB;EACd,OAAO,MAAM;EACb,aAAa;GACX,OAAO,QAAQ;EACjB;CACF,GAAG,CAAC,MAAM,CAAC;CAEX,OACE,oBAAC,mBAAmB,UAApB;EAA6B,OAAO;EACjC;CAC0B,CAAA;AAEjC"}
@@ -1,57 +1,33 @@
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/QueryErrorResetBoundary.tsx
21
- var QueryErrorResetBoundary_exports = {};
22
- __export(QueryErrorResetBoundary_exports, {
23
- QueryErrorResetBoundary: () => QueryErrorResetBoundary,
24
- useQueryErrorResetBoundary: () => useQueryErrorResetBoundary
25
- });
26
- module.exports = __toCommonJS(QueryErrorResetBoundary_exports);
27
- var import_preact = require("preact");
28
- var import_hooks = require("preact/hooks");
29
- var import_jsx_runtime = require("preact/jsx-runtime");
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let preact = require("preact");
3
+ let preact_hooks = require("preact/hooks");
4
+ let preact_jsx_runtime = require("preact/jsx-runtime");
5
+ //#region src/QueryErrorResetBoundary.tsx
30
6
  function createValue() {
31
- let isReset = false;
32
- return {
33
- clearReset: () => {
34
- isReset = false;
35
- },
36
- reset: () => {
37
- isReset = true;
38
- },
39
- isReset: () => {
40
- return isReset;
41
- }
42
- };
7
+ let isReset = false;
8
+ return {
9
+ clearReset: () => {
10
+ isReset = false;
11
+ },
12
+ reset: () => {
13
+ isReset = true;
14
+ },
15
+ isReset: () => {
16
+ return isReset;
17
+ }
18
+ };
43
19
  }
44
- var QueryErrorResetBoundaryContext = (0, import_preact.createContext)(createValue());
45
- var useQueryErrorResetBoundary = () => (0, import_hooks.useContext)(QueryErrorResetBoundaryContext);
46
- var QueryErrorResetBoundary = ({
47
- children
48
- }) => {
49
- const [value] = (0, import_hooks.useState)(() => createValue());
50
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === "function" ? children(value) : children });
20
+ const QueryErrorResetBoundaryContext = (0, preact.createContext)(createValue());
21
+ const useQueryErrorResetBoundary = () => (0, preact_hooks.useContext)(QueryErrorResetBoundaryContext);
22
+ const QueryErrorResetBoundary = ({ children }) => {
23
+ const [value] = (0, preact_hooks.useState)(() => createValue());
24
+ return /* @__PURE__ */ (0, preact_jsx_runtime.jsx)(QueryErrorResetBoundaryContext.Provider, {
25
+ value,
26
+ children: typeof children === "function" ? children(value) : children
27
+ });
51
28
  };
52
- // Annotate the CommonJS export names for ESM import in node:
53
- 0 && (module.exports = {
54
- QueryErrorResetBoundary,
55
- useQueryErrorResetBoundary
56
- });
29
+ //#endregion
30
+ exports.QueryErrorResetBoundary = QueryErrorResetBoundary;
31
+ exports.useQueryErrorResetBoundary = useQueryErrorResetBoundary;
32
+
57
33
  //# sourceMappingURL=QueryErrorResetBoundary.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["import { createContext } from 'preact'\nimport type { ComponentChildren } from 'preact'\nimport { useContext, useState } from 'preact/hooks'\n\n// CONTEXT\nexport type QueryErrorResetFunction = () => void\nexport type QueryErrorIsResetFunction = () => boolean\nexport type QueryErrorClearResetFunction = () => void\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: QueryErrorClearResetFunction\n isReset: QueryErrorIsResetFunction\n reset: QueryErrorResetFunction\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 = createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport type QueryErrorResetBoundaryFunction = (\n value: QueryErrorResetBoundaryValue,\n) => ComponentChildren\n\nexport interface QueryErrorResetBoundaryProps {\n children: QueryErrorResetBoundaryFunction | ComponentChildren\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function' ? children(value) : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA8B;AAE9B,mBAAqC;AAkDjC;AArCJ,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,IAAM,qCAAiC,6BAAc,YAAY,CAAC;AAI3D,IAAM,6BAA6B,UACxC,yBAAW,8BAA8B;AAYpC,IAAM,0BAA0B,CAAC;AAAA,EACtC;AACF,MAAoC;AAClC,QAAM,CAAC,KAAK,QAAI,uBAAS,MAAM,YAAY,CAAC;AAC5C,SACE,4CAAC,+BAA+B,UAA/B,EAAwC,OACtC,iBAAO,aAAa,aAAa,SAAS,KAAK,IAAI,UACtD;AAEJ;","names":[]}
1
+ {"version":3,"file":"QueryErrorResetBoundary.cjs","names":["createContext","useContext","useState"],"sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["import { createContext } from 'preact'\nimport type { ComponentChildren } from 'preact'\nimport { useContext, useState } from 'preact/hooks'\n\n// CONTEXT\nexport type QueryErrorResetFunction = () => void\nexport type QueryErrorIsResetFunction = () => boolean\nexport type QueryErrorClearResetFunction = () => void\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: QueryErrorClearResetFunction\n isReset: QueryErrorIsResetFunction\n reset: QueryErrorResetFunction\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 = createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport type QueryErrorResetBoundaryFunction = (\n value: QueryErrorResetBoundaryValue,\n) => ComponentChildren\n\nexport interface QueryErrorResetBoundaryProps {\n children: QueryErrorResetBoundaryFunction | ComponentChildren\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function' ? children(value) : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"mappings":";;;;;AAeA,SAAS,cAA4C;CACnD,IAAI,UAAU;CACd,OAAO;EACL,kBAAkB;GAChB,UAAU;EACZ;EACA,aAAa;GACX,UAAU;EACZ;EACA,eAAe;GACb,OAAO;EACT;CACF;AACF;AAEA,MAAM,kCAAA,GAAiCA,OAAAA,cAAAA,CAAc,YAAY,CAAC;AAIlE,MAAa,oCAAA,GACXC,aAAAA,WAAAA,CAAW,8BAA8B;AAY3C,MAAa,2BAA2B,EACtC,eACkC;CAClC,MAAM,CAAC,UAAA,GAASC,aAAAA,SAAAA,OAAe,YAAY,CAAC;CAC5C,OACE,iBAAA,GAAA,mBAAA,IAAA,CAAC,+BAA+B,UAAhC;EAAgD;EAC7C,UAAA,OAAO,aAAa,aAAa,SAAS,KAAK,IAAI;CACb,CAAA;AAE7C"}
@@ -1,8 +1,19 @@
1
- export { QueryErrorResetFunction } from './_tsup-dts-rollup.cjs';
2
- export { QueryErrorIsResetFunction } from './_tsup-dts-rollup.cjs';
3
- export { QueryErrorClearResetFunction } from './_tsup-dts-rollup.cjs';
4
- export { QueryErrorResetBoundaryValue } from './_tsup-dts-rollup.cjs';
5
- export { useQueryErrorResetBoundary } from './_tsup-dts-rollup.cjs';
6
- export { QueryErrorResetBoundaryFunction } from './_tsup-dts-rollup.cjs';
7
- export { QueryErrorResetBoundaryProps } from './_tsup-dts-rollup.cjs';
8
- export { QueryErrorResetBoundary } from './_tsup-dts-rollup.cjs';
1
+ import { ComponentChildren } from "preact";
2
+ //#region src/QueryErrorResetBoundary.d.ts
3
+ type QueryErrorResetFunction = () => void;
4
+ type QueryErrorIsResetFunction = () => boolean;
5
+ type QueryErrorClearResetFunction = () => void;
6
+ interface QueryErrorResetBoundaryValue {
7
+ clearReset: QueryErrorClearResetFunction;
8
+ isReset: QueryErrorIsResetFunction;
9
+ reset: QueryErrorResetFunction;
10
+ }
11
+ declare const useQueryErrorResetBoundary: () => QueryErrorResetBoundaryValue;
12
+ type QueryErrorResetBoundaryFunction = (value: QueryErrorResetBoundaryValue) => ComponentChildren;
13
+ interface QueryErrorResetBoundaryProps {
14
+ children: QueryErrorResetBoundaryFunction | ComponentChildren;
15
+ }
16
+ declare const QueryErrorResetBoundary: ({ children }: QueryErrorResetBoundaryProps) => import("preact").JSX.Element;
17
+ //#endregion
18
+ export { QueryErrorClearResetFunction, QueryErrorIsResetFunction, QueryErrorResetBoundary, QueryErrorResetBoundaryFunction, QueryErrorResetBoundaryProps, QueryErrorResetBoundaryValue, QueryErrorResetFunction, useQueryErrorResetBoundary };
19
+ //# sourceMappingURL=QueryErrorResetBoundary.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryErrorResetBoundary.d.cts","names":[],"sources":["../../src/QueryErrorResetBoundary.tsx"],"mappings":";;KAKY;KACA;KACA;UAEK;EACf,YAAY;EACZ,SAAS;EACT,OAAO;;cAsBI,kCAA0B;KAK3B,mCACV,OAAO,iCACJ;UAEY;EACf,UAAU,kCAAkC;;cAGjC,4BAA2B,YAErC,kDAA4B,IAAA"}
@@ -1,8 +1,19 @@
1
- export { QueryErrorResetFunction } from './_tsup-dts-rollup.js';
2
- export { QueryErrorIsResetFunction } from './_tsup-dts-rollup.js';
3
- export { QueryErrorClearResetFunction } from './_tsup-dts-rollup.js';
4
- export { QueryErrorResetBoundaryValue } from './_tsup-dts-rollup.js';
5
- export { useQueryErrorResetBoundary } from './_tsup-dts-rollup.js';
6
- export { QueryErrorResetBoundaryFunction } from './_tsup-dts-rollup.js';
7
- export { QueryErrorResetBoundaryProps } from './_tsup-dts-rollup.js';
8
- export { QueryErrorResetBoundary } from './_tsup-dts-rollup.js';
1
+ import { ComponentChildren } from "preact";
2
+ //#region src/QueryErrorResetBoundary.d.ts
3
+ type QueryErrorResetFunction = () => void;
4
+ type QueryErrorIsResetFunction = () => boolean;
5
+ type QueryErrorClearResetFunction = () => void;
6
+ interface QueryErrorResetBoundaryValue {
7
+ clearReset: QueryErrorClearResetFunction;
8
+ isReset: QueryErrorIsResetFunction;
9
+ reset: QueryErrorResetFunction;
10
+ }
11
+ declare const useQueryErrorResetBoundary: () => QueryErrorResetBoundaryValue;
12
+ type QueryErrorResetBoundaryFunction = (value: QueryErrorResetBoundaryValue) => ComponentChildren;
13
+ interface QueryErrorResetBoundaryProps {
14
+ children: QueryErrorResetBoundaryFunction | ComponentChildren;
15
+ }
16
+ declare const QueryErrorResetBoundary: ({ children }: QueryErrorResetBoundaryProps) => import("preact").JSX.Element;
17
+ //#endregion
18
+ export { QueryErrorClearResetFunction, QueryErrorIsResetFunction, QueryErrorResetBoundary, QueryErrorResetBoundaryFunction, QueryErrorResetBoundaryProps, QueryErrorResetBoundaryValue, QueryErrorResetFunction, useQueryErrorResetBoundary };
19
+ //# sourceMappingURL=QueryErrorResetBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryErrorResetBoundary.d.ts","names":[],"sources":["../../src/QueryErrorResetBoundary.tsx"],"mappings":";;KAKY;KACA;KACA;UAEK;EACf,YAAY;EACZ,SAAS;EACT,OAAO;;cAsBI,kCAA0B;KAK3B,mCACV,OAAO,iCACJ;UAEY;EACf,UAAU,kCAAkC;;cAGjC,4BAA2B,YAErC,kDAA4B,IAAA"}
@@ -1,31 +1,31 @@
1
- // src/QueryErrorResetBoundary.tsx
2
1
  import { createContext } from "preact";
3
2
  import { useContext, useState } from "preact/hooks";
4
3
  import { jsx } from "preact/jsx-runtime";
4
+ //#region src/QueryErrorResetBoundary.tsx
5
5
  function createValue() {
6
- let isReset = false;
7
- return {
8
- clearReset: () => {
9
- isReset = false;
10
- },
11
- reset: () => {
12
- isReset = true;
13
- },
14
- isReset: () => {
15
- return isReset;
16
- }
17
- };
6
+ let isReset = false;
7
+ return {
8
+ clearReset: () => {
9
+ isReset = false;
10
+ },
11
+ reset: () => {
12
+ isReset = true;
13
+ },
14
+ isReset: () => {
15
+ return isReset;
16
+ }
17
+ };
18
18
  }
19
- var QueryErrorResetBoundaryContext = createContext(createValue());
20
- var useQueryErrorResetBoundary = () => useContext(QueryErrorResetBoundaryContext);
21
- var QueryErrorResetBoundary = ({
22
- children
23
- }) => {
24
- const [value] = useState(() => createValue());
25
- return /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === "function" ? children(value) : children });
26
- };
27
- export {
28
- QueryErrorResetBoundary,
29
- useQueryErrorResetBoundary
19
+ const QueryErrorResetBoundaryContext = createContext(createValue());
20
+ const useQueryErrorResetBoundary = () => useContext(QueryErrorResetBoundaryContext);
21
+ const QueryErrorResetBoundary = ({ children }) => {
22
+ const [value] = useState(() => createValue());
23
+ return /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, {
24
+ value,
25
+ children: typeof children === "function" ? children(value) : children
26
+ });
30
27
  };
28
+ //#endregion
29
+ export { QueryErrorResetBoundary, useQueryErrorResetBoundary };
30
+
31
31
  //# sourceMappingURL=QueryErrorResetBoundary.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["import { createContext } from 'preact'\nimport type { ComponentChildren } from 'preact'\nimport { useContext, useState } from 'preact/hooks'\n\n// CONTEXT\nexport type QueryErrorResetFunction = () => void\nexport type QueryErrorIsResetFunction = () => boolean\nexport type QueryErrorClearResetFunction = () => void\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: QueryErrorClearResetFunction\n isReset: QueryErrorIsResetFunction\n reset: QueryErrorResetFunction\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 = createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport type QueryErrorResetBoundaryFunction = (\n value: QueryErrorResetBoundaryValue,\n) => ComponentChildren\n\nexport interface QueryErrorResetBoundaryProps {\n children: QueryErrorResetBoundaryFunction | ComponentChildren\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function' ? children(value) : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"mappings":";AAAA,SAAS,qBAAqB;AAE9B,SAAS,YAAY,gBAAgB;AAkDjC;AArCJ,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,IAAM,iCAAiC,cAAc,YAAY,CAAC;AAI3D,IAAM,6BAA6B,MACxC,WAAW,8BAA8B;AAYpC,IAAM,0BAA0B,CAAC;AAAA,EACtC;AACF,MAAoC;AAClC,QAAM,CAAC,KAAK,IAAI,SAAS,MAAM,YAAY,CAAC;AAC5C,SACE,oBAAC,+BAA+B,UAA/B,EAAwC,OACtC,iBAAO,aAAa,aAAa,SAAS,KAAK,IAAI,UACtD;AAEJ;","names":[]}
1
+ {"version":3,"file":"QueryErrorResetBoundary.js","names":[],"sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["import { createContext } from 'preact'\nimport type { ComponentChildren } from 'preact'\nimport { useContext, useState } from 'preact/hooks'\n\n// CONTEXT\nexport type QueryErrorResetFunction = () => void\nexport type QueryErrorIsResetFunction = () => boolean\nexport type QueryErrorClearResetFunction = () => void\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: QueryErrorClearResetFunction\n isReset: QueryErrorIsResetFunction\n reset: QueryErrorResetFunction\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 = createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport type QueryErrorResetBoundaryFunction = (\n value: QueryErrorResetBoundaryValue,\n) => ComponentChildren\n\nexport interface QueryErrorResetBoundaryProps {\n children: QueryErrorResetBoundaryFunction | ComponentChildren\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function' ? children(value) : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"mappings":";;;;AAeA,SAAS,cAA4C;CACnD,IAAI,UAAU;CACd,OAAO;EACL,kBAAkB;GAChB,UAAU;EACZ;EACA,aAAa;GACX,UAAU;EACZ;EACA,eAAe;GACb,OAAO;EACT;CACF;AACF;AAEA,MAAM,iCAAiC,cAAc,YAAY,CAAC;AAIlE,MAAa,mCACX,WAAW,8BAA8B;AAY3C,MAAa,2BAA2B,EACtC,eACkC;CAClC,MAAM,CAAC,SAAS,eAAe,YAAY,CAAC;CAC5C,OACE,oBAAC,+BAA+B,UAAhC;EAAgD;EAC7C,UAAA,OAAO,aAAa,aAAa,SAAS,KAAK,IAAI;CACb,CAAA;AAE7C"}