@suspensive/react-query-4 3.14.0 → 3.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ClientOnly-DH55RkfW.js → ClientOnly-P5h-7PhS.mjs} +1 -1
- package/dist/ClientOnly-P5h-7PhS.mjs.map +1 -0
- package/dist/{IsFetching-CUZZV-rO.d.cts → IsFetching-3KG146_K.d.mts} +2 -2
- package/dist/IsFetching-3KG146_K.d.mts.map +1 -0
- package/dist/{IsFetching-DknEssbS.js → IsFetching-DWmZ80q2.mjs} +1 -1
- package/dist/IsFetching-DWmZ80q2.mjs.map +1 -0
- package/dist/{IsFetching-NswbU7_3.d.ts → IsFetching-DZvSjDTq.d.cts} +3 -3
- package/dist/IsFetching-DZvSjDTq.d.cts.map +1 -0
- package/dist/IsFetching.d.cts +1 -1
- package/dist/IsFetching.d.mts +2 -0
- package/dist/IsFetching.mjs +6 -0
- package/dist/{Mutation-Br4thm3U.cjs → Mutation-B2H-fZYn.cjs} +2 -2
- package/dist/{Mutation-Br4thm3U.cjs.map → Mutation-B2H-fZYn.cjs.map} +1 -1
- package/dist/{Mutation-BxzGeXWh.d.cts → Mutation-CR3oXQ6p.d.mts} +2 -2
- package/dist/{Mutation-BxzGeXWh.d.cts.map → Mutation-CR3oXQ6p.d.mts.map} +1 -1
- package/dist/{Mutation-ChNqI8IT.js → Mutation-CkHa5_Af.mjs} +2 -2
- package/dist/Mutation-CkHa5_Af.mjs.map +1 -0
- package/dist/{Mutation-BXxdgixl.d.ts → Mutation-DClZyxmF.d.cts} +3 -3
- package/dist/Mutation-DClZyxmF.d.cts.map +1 -0
- package/dist/Mutation.cjs +2 -2
- package/dist/Mutation.d.cts +1 -1
- package/dist/Mutation.d.mts +2 -0
- package/dist/Mutation.mjs +7 -0
- package/dist/{PrefetchInfiniteQuery-XgWIoyZf.d.ts → PrefetchInfiniteQuery-B9hGVsbw.d.cts} +3 -3
- package/dist/PrefetchInfiniteQuery-B9hGVsbw.d.cts.map +1 -0
- package/dist/{PrefetchInfiniteQuery-DUo4NQFu.js → PrefetchInfiniteQuery-C0eOVFlg.mjs} +2 -2
- package/dist/PrefetchInfiniteQuery-C0eOVFlg.mjs.map +1 -0
- package/dist/{PrefetchInfiniteQuery-DeqbqFn3.d.cts → PrefetchInfiniteQuery-DtZ7itiY.d.mts} +2 -2
- package/dist/PrefetchInfiniteQuery-DtZ7itiY.d.mts.map +1 -0
- package/dist/PrefetchInfiniteQuery.d.cts +1 -1
- package/dist/{PrefetchInfiniteQuery.d.ts → PrefetchInfiniteQuery.d.mts} +1 -1
- package/dist/PrefetchInfiniteQuery.mjs +7 -0
- package/dist/{PrefetchQuery-DsA87P_Q.js → PrefetchQuery-7QYRCNcB.mjs} +2 -2
- package/dist/PrefetchQuery-7QYRCNcB.mjs.map +1 -0
- package/dist/{PrefetchQuery-2dr_x_It.d.ts → PrefetchQuery-DJQ3O6jL.d.cts} +3 -3
- package/dist/PrefetchQuery-DJQ3O6jL.d.cts.map +1 -0
- package/dist/{PrefetchQuery-DLH4RnOr.d.cts → PrefetchQuery-PoJ8NbtL.d.mts} +3 -3
- package/dist/PrefetchQuery-PoJ8NbtL.d.mts.map +1 -0
- package/dist/PrefetchQuery.d.cts +1 -1
- package/dist/PrefetchQuery.d.mts +2 -0
- package/dist/PrefetchQuery.mjs +7 -0
- package/dist/{QueriesHydrationBoundary-B0-SThJ9.js → QueriesHydration-C8w5Rm3q.mjs} +33 -33
- package/dist/QueriesHydration-C8w5Rm3q.mjs.map +1 -0
- package/dist/{QueriesHydrationBoundary-CCKy06Iw.cjs → QueriesHydration-CJDH1B_7.cjs} +32 -32
- package/dist/QueriesHydration-CJDH1B_7.cjs.map +1 -0
- package/dist/{QueriesHydrationBoundary-YPalBVSC.d.cts → QueriesHydration-COAxA2eo.d.cts} +22 -22
- package/dist/QueriesHydration-COAxA2eo.d.cts.map +1 -0
- package/dist/{QueriesHydrationBoundary-ltKHcdNU.d.ts → QueriesHydration-CdvYxMoD.d.mts} +20 -20
- package/dist/QueriesHydration-CdvYxMoD.d.mts.map +1 -0
- package/dist/QueriesHydration.cjs +5 -0
- package/dist/QueriesHydration.d.cts +2 -0
- package/dist/QueriesHydration.d.mts +2 -0
- package/dist/QueriesHydration.mjs +5 -0
- package/dist/{QueryClientConsumer-CbHc2ncp.d.ts → QueryClientConsumer-BXcUnpLu.d.mts} +1 -1
- package/dist/QueryClientConsumer-BXcUnpLu.d.mts.map +1 -0
- package/dist/{QueryClientConsumer-BEhkrgN2.d.cts → QueryClientConsumer-BrLhJAim.d.cts} +3 -3
- package/dist/QueryClientConsumer-BrLhJAim.d.cts.map +1 -0
- package/dist/{QueryClientConsumer-CXreZ3Qo.js → QueryClientConsumer-DspevCdg.mjs} +1 -1
- package/dist/QueryClientConsumer-DspevCdg.mjs.map +1 -0
- package/dist/QueryClientConsumer.d.cts +1 -1
- package/dist/{QueryClientConsumer.d.ts → QueryClientConsumer.d.mts} +1 -1
- package/dist/{QueryClientConsumer.js → QueryClientConsumer.mjs} +1 -1
- package/dist/{SuspenseInfiniteQuery-aUCIM1wn.d.ts → SuspenseInfiniteQuery-BDTZAWs7.d.cts} +3 -3
- package/dist/SuspenseInfiniteQuery-BDTZAWs7.d.cts.map +1 -0
- package/dist/{SuspenseInfiniteQuery-KkCb1ti2.cjs → SuspenseInfiniteQuery-BZCYAjw-.cjs} +2 -2
- package/dist/{SuspenseInfiniteQuery-KkCb1ti2.cjs.map → SuspenseInfiniteQuery-BZCYAjw-.cjs.map} +1 -1
- package/dist/{SuspenseInfiniteQuery-d5K3FWJK.js → SuspenseInfiniteQuery-CTap1GdP.mjs} +2 -2
- package/dist/SuspenseInfiniteQuery-CTap1GdP.mjs.map +1 -0
- package/dist/{SuspenseInfiniteQuery-493uCstF.d.cts → SuspenseInfiniteQuery-Dm9U1IPG.d.mts} +4 -4
- package/dist/SuspenseInfiniteQuery-Dm9U1IPG.d.mts.map +1 -0
- package/dist/SuspenseInfiniteQuery.cjs +2 -2
- package/dist/SuspenseInfiniteQuery.d.cts +2 -2
- package/dist/SuspenseInfiniteQuery.d.mts +3 -0
- package/dist/SuspenseInfiniteQuery.mjs +7 -0
- package/dist/{SuspenseQueries-U51bGPhv.d.ts → SuspenseQueries-DAXTYR9M.d.mts} +1 -1
- package/dist/{SuspenseQueries-D6adYiY4.d.cts.map → SuspenseQueries-DAXTYR9M.d.mts.map} +1 -1
- package/dist/{SuspenseQueries-D6adYiY4.d.cts → SuspenseQueries-GYiP7qAa.d.cts} +3 -3
- package/dist/SuspenseQueries-GYiP7qAa.d.cts.map +1 -0
- package/dist/{SuspenseQueries-BdrwpuQr.js → SuspenseQueries-dN78EqbL.mjs} +1 -1
- package/dist/SuspenseQueries-dN78EqbL.mjs.map +1 -0
- package/dist/SuspenseQueries.d.cts +1 -1
- package/dist/SuspenseQueries.d.mts +2 -0
- package/dist/SuspenseQueries.mjs +6 -0
- package/dist/{SuspenseQuery-Dzt7c7L0.cjs → SuspenseQuery-7Zbz551V.cjs} +2 -2
- package/dist/{SuspenseQuery-Dzt7c7L0.cjs.map → SuspenseQuery-7Zbz551V.cjs.map} +1 -1
- package/dist/{SuspenseQuery-Bi9HwyhA.d.ts → SuspenseQuery-Bg3h1Es3.d.cts} +3 -3
- package/dist/SuspenseQuery-Bg3h1Es3.d.cts.map +1 -0
- package/dist/{SuspenseQuery-Owa-DnJP.js → SuspenseQuery-COzwc2gl.mjs} +2 -2
- package/dist/SuspenseQuery-COzwc2gl.mjs.map +1 -0
- package/dist/{SuspenseQuery-D0Vt5tKg.d.cts → SuspenseQuery-CjQ3EBKI.d.mts} +2 -2
- package/dist/SuspenseQuery-CjQ3EBKI.d.mts.map +1 -0
- package/dist/SuspenseQuery.cjs +2 -2
- package/dist/SuspenseQuery.d.cts +1 -1
- package/dist/SuspenseQuery.d.mts +2 -0
- package/dist/SuspenseQuery.mjs +7 -0
- package/dist/components/{ClientOnly.d.ts → ClientOnly.d.mts} +1 -1
- package/dist/components/ClientOnly.d.mts.map +1 -0
- package/dist/components/ClientOnly.mjs +6 -0
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +18 -18
- package/dist/index.d.mts +18 -0
- package/dist/index.mjs +21 -0
- package/dist/{infiniteQueryOptions-C6sg-DmH.d.cts → infiniteQueryOptions-B8E274sw.d.mts} +1 -1
- package/dist/infiniteQueryOptions-B8E274sw.d.mts.map +1 -0
- package/dist/{infiniteQueryOptions-DedMwRo_.js → infiniteQueryOptions-C27u8Ixn.mjs} +1 -1
- package/dist/infiniteQueryOptions-C27u8Ixn.mjs.map +1 -0
- package/dist/{infiniteQueryOptions-hV-8kk-O.d.ts → infiniteQueryOptions-DlBYY8gQ.d.cts} +1 -1
- package/dist/infiniteQueryOptions-DlBYY8gQ.d.cts.map +1 -0
- package/dist/infiniteQueryOptions.d.cts +1 -1
- package/dist/{infiniteQueryOptions.d.ts → infiniteQueryOptions.d.mts} +1 -1
- package/dist/{infiniteQueryOptions.js → infiniteQueryOptions.mjs} +1 -1
- package/dist/{mutationOptions-Bj0_hsC2.d.cts → mutationOptions-C9u4Q4VU.d.mts} +1 -1
- package/dist/{mutationOptions-Bj0_hsC2.d.cts.map → mutationOptions-C9u4Q4VU.d.mts.map} +1 -1
- package/dist/{mutationOptions-CxQSzp3a.d.ts → mutationOptions-Clj_vPii.d.cts} +1 -1
- package/dist/mutationOptions-Clj_vPii.d.cts.map +1 -0
- package/dist/{mutationOptions-BErIlU4L.js → mutationOptions-VOkWleB4.mjs} +1 -1
- package/dist/mutationOptions-VOkWleB4.mjs.map +1 -0
- package/dist/mutationOptions.d.cts +1 -1
- package/dist/mutationOptions.d.mts +2 -0
- package/dist/mutationOptions.mjs +3 -0
- package/dist/{objectWithoutProperties-wiuk62IC.cjs → objectWithoutProperties-DjGVB1dZ.cjs} +2 -2
- package/dist/{objectWithoutProperties-hKN8srXd.js → objectWithoutProperties-VHBPpeSg.mjs} +2 -2
- package/dist/{queryOptions-Dc7nh_PI.d.cts → queryOptions-D42SP_vE.d.mts} +1 -1
- package/dist/queryOptions-D42SP_vE.d.mts.map +1 -0
- package/dist/{queryOptions-BbIIVma_.js → queryOptions-WyeTyhoy.mjs} +1 -1
- package/dist/queryOptions-WyeTyhoy.mjs.map +1 -0
- package/dist/{queryOptions-J0Eukq3P.d.ts → queryOptions-Z6iEA5XS.d.cts} +1 -1
- package/dist/queryOptions-Z6iEA5XS.d.cts.map +1 -0
- package/dist/queryOptions.d.cts +1 -1
- package/dist/{queryOptions.d.ts → queryOptions.d.mts} +1 -1
- package/dist/queryOptions.mjs +3 -0
- package/dist/{usePrefetchInfiniteQuery-K7YH3Qy-.js → usePrefetchInfiniteQuery-DZiSAbIS.mjs} +1 -1
- package/dist/usePrefetchInfiniteQuery-DZiSAbIS.mjs.map +1 -0
- package/dist/{usePrefetchInfiniteQuery-DikULYWD.d.ts → usePrefetchInfiniteQuery-Db5oZ2b_.d.cts} +1 -1
- package/dist/usePrefetchInfiniteQuery-Db5oZ2b_.d.cts.map +1 -0
- package/dist/{usePrefetchInfiniteQuery-CySAkFGs.d.cts → usePrefetchInfiniteQuery-xFsVE7gF.d.mts} +1 -1
- package/dist/usePrefetchInfiniteQuery-xFsVE7gF.d.mts.map +1 -0
- package/dist/usePrefetchInfiniteQuery.d.cts +1 -1
- package/dist/{usePrefetchInfiniteQuery.d.ts → usePrefetchInfiniteQuery.d.mts} +1 -1
- package/dist/{usePrefetchInfiniteQuery.js → usePrefetchInfiniteQuery.mjs} +1 -1
- package/dist/{usePrefetchQuery-6ohVKCHb.d.ts → usePrefetchQuery-CIIwQHYI.d.mts} +1 -1
- package/dist/usePrefetchQuery-CIIwQHYI.d.mts.map +1 -0
- package/dist/{usePrefetchQuery-Crude5FC.d.cts → usePrefetchQuery-DoUOJZwe.d.cts} +1 -1
- package/dist/usePrefetchQuery-DoUOJZwe.d.cts.map +1 -0
- package/dist/{usePrefetchQuery-HaCGXPNG.js → usePrefetchQuery-RuK6ZS1I.mjs} +1 -1
- package/dist/usePrefetchQuery-RuK6ZS1I.mjs.map +1 -0
- package/dist/usePrefetchQuery.d.cts +1 -1
- package/dist/usePrefetchQuery.d.mts +2 -0
- package/dist/usePrefetchQuery.mjs +6 -0
- package/dist/{useSuspenseInfiniteQuery-CPSFNa3R.js → useSuspenseInfiniteQuery-BVmSR5yZ.mjs} +1 -1
- package/dist/useSuspenseInfiniteQuery-BVmSR5yZ.mjs.map +1 -0
- package/dist/{useSuspenseInfiniteQuery-Cu93Uy03.d.cts → useSuspenseInfiniteQuery-CMhbiMDc.d.cts} +1 -1
- package/dist/useSuspenseInfiniteQuery-CMhbiMDc.d.cts.map +1 -0
- package/dist/{useSuspenseInfiniteQuery-Bb0CuB92.d.ts → useSuspenseInfiniteQuery-Dvy7bTQq.d.mts} +1 -1
- package/dist/useSuspenseInfiniteQuery-Dvy7bTQq.d.mts.map +1 -0
- package/dist/useSuspenseInfiniteQuery.d.cts +1 -1
- package/dist/{useSuspenseInfiniteQuery.d.ts → useSuspenseInfiniteQuery.d.mts} +1 -1
- package/dist/{useSuspenseInfiniteQuery.js → useSuspenseInfiniteQuery.mjs} +1 -1
- package/dist/{useSuspenseQueries-B5ixNUu4.d.cts → useSuspenseQueries-DFtL_xO-.d.mts} +1 -1
- package/dist/useSuspenseQueries-DFtL_xO-.d.mts.map +1 -0
- package/dist/{useSuspenseQueries-DWeObNoR.d.ts → useSuspenseQueries-DNZH-duj.d.cts} +1 -1
- package/dist/useSuspenseQueries-DNZH-duj.d.cts.map +1 -0
- package/dist/{useSuspenseQueries-B9xL4GvG.js → useSuspenseQueries-DqT8AKu2.mjs} +1 -1
- package/dist/useSuspenseQueries-DqT8AKu2.mjs.map +1 -0
- package/dist/useSuspenseQueries.d.cts +1 -1
- package/dist/{useSuspenseQueries.d.ts → useSuspenseQueries.d.mts} +1 -1
- package/dist/useSuspenseQueries.mjs +6 -0
- package/dist/{useSuspenseQuery-CDzxlQHt.d.ts → useSuspenseQuery-07kIGch-.d.cts} +1 -1
- package/dist/{useSuspenseQuery-DKMYNG6m.d.cts.map → useSuspenseQuery-07kIGch-.d.cts.map} +1 -1
- package/dist/{useSuspenseQuery--Hz9YbA-.js → useSuspenseQuery-BvMsQ1Ho.mjs} +1 -1
- package/dist/useSuspenseQuery-BvMsQ1Ho.mjs.map +1 -0
- package/dist/{useSuspenseQuery-DKMYNG6m.d.cts → useSuspenseQuery-CMEH7kZ8.d.mts} +1 -1
- package/dist/useSuspenseQuery-CMEH7kZ8.d.mts.map +1 -0
- package/dist/useSuspenseQuery.d.cts +1 -1
- package/dist/{useSuspenseQuery.d.ts → useSuspenseQuery.d.mts} +1 -1
- package/dist/useSuspenseQuery.mjs +6 -0
- package/package.json +5 -5
- package/src/{QueriesHydrationBoundary.tsx → QueriesHydration.tsx} +19 -19
- package/src/index.ts +1 -1
- package/dist/ClientOnly-DH55RkfW.js.map +0 -1
- package/dist/IsFetching-CUZZV-rO.d.cts.map +0 -1
- package/dist/IsFetching-DknEssbS.js.map +0 -1
- package/dist/IsFetching-NswbU7_3.d.ts.map +0 -1
- package/dist/IsFetching.d.ts +0 -2
- package/dist/IsFetching.js +0 -6
- package/dist/Mutation-BXxdgixl.d.ts.map +0 -1
- package/dist/Mutation-ChNqI8IT.js.map +0 -1
- package/dist/Mutation.d.ts +0 -2
- package/dist/Mutation.js +0 -7
- package/dist/PrefetchInfiniteQuery-DUo4NQFu.js.map +0 -1
- package/dist/PrefetchInfiniteQuery-DeqbqFn3.d.cts.map +0 -1
- package/dist/PrefetchInfiniteQuery-XgWIoyZf.d.ts.map +0 -1
- package/dist/PrefetchInfiniteQuery.js +0 -7
- package/dist/PrefetchQuery-2dr_x_It.d.ts.map +0 -1
- package/dist/PrefetchQuery-DLH4RnOr.d.cts.map +0 -1
- package/dist/PrefetchQuery-DsA87P_Q.js.map +0 -1
- package/dist/PrefetchQuery.d.ts +0 -2
- package/dist/PrefetchQuery.js +0 -7
- package/dist/QueriesHydrationBoundary-B0-SThJ9.js.map +0 -1
- package/dist/QueriesHydrationBoundary-CCKy06Iw.cjs.map +0 -1
- package/dist/QueriesHydrationBoundary-YPalBVSC.d.cts.map +0 -1
- package/dist/QueriesHydrationBoundary-ltKHcdNU.d.ts.map +0 -1
- package/dist/QueriesHydrationBoundary.cjs +0 -5
- package/dist/QueriesHydrationBoundary.d.cts +0 -2
- package/dist/QueriesHydrationBoundary.d.ts +0 -2
- package/dist/QueriesHydrationBoundary.js +0 -5
- package/dist/QueryClientConsumer-BEhkrgN2.d.cts.map +0 -1
- package/dist/QueryClientConsumer-CXreZ3Qo.js.map +0 -1
- package/dist/QueryClientConsumer-CbHc2ncp.d.ts.map +0 -1
- package/dist/SuspenseInfiniteQuery-493uCstF.d.cts.map +0 -1
- package/dist/SuspenseInfiniteQuery-aUCIM1wn.d.ts.map +0 -1
- package/dist/SuspenseInfiniteQuery-d5K3FWJK.js.map +0 -1
- package/dist/SuspenseInfiniteQuery.d.ts +0 -3
- package/dist/SuspenseInfiniteQuery.js +0 -7
- package/dist/SuspenseQueries-BdrwpuQr.js.map +0 -1
- package/dist/SuspenseQueries-U51bGPhv.d.ts.map +0 -1
- package/dist/SuspenseQueries.d.ts +0 -2
- package/dist/SuspenseQueries.js +0 -6
- package/dist/SuspenseQuery-Bi9HwyhA.d.ts.map +0 -1
- package/dist/SuspenseQuery-D0Vt5tKg.d.cts.map +0 -1
- package/dist/SuspenseQuery-Owa-DnJP.js.map +0 -1
- package/dist/SuspenseQuery.d.ts +0 -2
- package/dist/SuspenseQuery.js +0 -7
- package/dist/components/ClientOnly.d.ts.map +0 -1
- package/dist/components/ClientOnly.js +0 -6
- package/dist/index.d.ts +0 -18
- package/dist/index.js +0 -21
- package/dist/infiniteQueryOptions-C6sg-DmH.d.cts.map +0 -1
- package/dist/infiniteQueryOptions-DedMwRo_.js.map +0 -1
- package/dist/infiniteQueryOptions-hV-8kk-O.d.ts.map +0 -1
- package/dist/mutationOptions-BErIlU4L.js.map +0 -1
- package/dist/mutationOptions-CxQSzp3a.d.ts.map +0 -1
- package/dist/mutationOptions.d.ts +0 -2
- package/dist/mutationOptions.js +0 -3
- package/dist/queryOptions-BbIIVma_.js.map +0 -1
- package/dist/queryOptions-Dc7nh_PI.d.cts.map +0 -1
- package/dist/queryOptions-J0Eukq3P.d.ts.map +0 -1
- package/dist/queryOptions.js +0 -3
- package/dist/usePrefetchInfiniteQuery-CySAkFGs.d.cts.map +0 -1
- package/dist/usePrefetchInfiniteQuery-DikULYWD.d.ts.map +0 -1
- package/dist/usePrefetchInfiniteQuery-K7YH3Qy-.js.map +0 -1
- package/dist/usePrefetchQuery-6ohVKCHb.d.ts.map +0 -1
- package/dist/usePrefetchQuery-Crude5FC.d.cts.map +0 -1
- package/dist/usePrefetchQuery-HaCGXPNG.js.map +0 -1
- package/dist/usePrefetchQuery.d.ts +0 -2
- package/dist/usePrefetchQuery.js +0 -6
- package/dist/useSuspenseInfiniteQuery-Bb0CuB92.d.ts.map +0 -1
- package/dist/useSuspenseInfiniteQuery-CPSFNa3R.js.map +0 -1
- package/dist/useSuspenseInfiniteQuery-Cu93Uy03.d.cts.map +0 -1
- package/dist/useSuspenseQueries-B5ixNUu4.d.cts.map +0 -1
- package/dist/useSuspenseQueries-B9xL4GvG.js.map +0 -1
- package/dist/useSuspenseQueries-DWeObNoR.d.ts.map +0 -1
- package/dist/useSuspenseQueries.js +0 -6
- package/dist/useSuspenseQuery--Hz9YbA-.js.map +0 -1
- package/dist/useSuspenseQuery-CDzxlQHt.d.ts.map +0 -1
- package/dist/useSuspenseQuery.js +0 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientOnly-P5h-7PhS.mjs","names":[],"sources":["../src/components/ClientOnly.tsx"],"sourcesContent":["'use client'\n\nimport { useSyncExternalStore } from 'react'\n\nconst useIsClient = () => useSyncExternalStore(emptySubscribe, getSnapshot, getServerSnapshot)\n\nconst emptySubscribe = () => () => {}\nconst getSnapshot = () => true\nconst getServerSnapshot = () => false\n\nexport const ClientOnly = ({ children, fallback }: { children: React.ReactNode; fallback: React.ReactNode }) => (\n <>{useIsClient() ? children : fallback}</>\n)\n"],"mappings":";;;;AAIA,MAAM,oBAAoB,qBAAqB,gBAAgB,aAAa,kBAAkB;AAE9F,MAAM,6BAA6B;AACnC,MAAM,oBAAoB;AAC1B,MAAM,0BAA0B;AAEhC,MAAa,cAAc,EAAE,UAAU,eACrC,0CAAG,aAAa,GAAG,WAAW,WAAY"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { QueryFilters, useIsFetching } from "@tanstack/react-query";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/IsFetching.d.ts
|
|
@@ -13,4 +13,4 @@ declare const IsFetching: ({
|
|
|
13
13
|
}) => react_jsx_runtime0.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { IsFetching as t };
|
|
16
|
-
//# sourceMappingURL=IsFetching-
|
|
16
|
+
//# sourceMappingURL=IsFetching-3KG146_K.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsFetching-3KG146_K.d.mts","names":[],"sources":["../src/IsFetching.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAQa,cAAA,UAIZ,EAAA,CAAA;EAAA;CAAA,EAFE,YAEF,GAAA;EAJ0B,QAAA,EAAA,CAAA,UAAA,EAEgB,UAFhB,CAAA,OAEkC,aAFlC,CAAA,EAAA,GAEqD,SAFrD;CAExB,EAAA,GAAwF,kBAAA,CAAA,GAAA,CAAA,OAAxF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsFetching-DWmZ80q2.mjs","names":[],"sources":["../src/IsFetching.tsx"],"sourcesContent":["'use client'\n\nimport { type QueryFilters, useIsFetching } from '@tanstack/react-query'\nimport type { ReactNode } from 'react'\n\n/**\n * @experimental This is an experimental feature.\n */\nexport const IsFetching = ({\n children,\n}: QueryFilters & { children: (isFetching: ReturnType<typeof useIsFetching>) => ReactNode }) => (\n <>{children(useIsFetching())}</>\n)\n"],"mappings":";;;;;;;AAQA,MAAa,cAAc,EACzB,eAEA,0CAAG,SAAS,eAAe,CAAC,GAAI"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
1
2
|
import { QueryFilters, useIsFetching } from "@tanstack/react-query";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/IsFetching.d.ts
|
|
@@ -10,7 +10,7 @@ declare const IsFetching: ({
|
|
|
10
10
|
children
|
|
11
11
|
}: QueryFilters & {
|
|
12
12
|
children: (isFetching: ReturnType<typeof useIsFetching>) => ReactNode;
|
|
13
|
-
}) =>
|
|
13
|
+
}) => react_jsx_runtime6.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { IsFetching as t };
|
|
16
|
-
//# sourceMappingURL=IsFetching-
|
|
16
|
+
//# sourceMappingURL=IsFetching-DZvSjDTq.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsFetching-DZvSjDTq.d.cts","names":[],"sources":["../src/IsFetching.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAQa,cAAA,UAIZ,EAAA,CAAA;EAAA;CAAA,EAFE,YAEF,GAAA;EAJ0B,QAAA,EAAA,CAAA,UAAA,EAEgB,UAFhB,CAAA,OAEkC,aAFlC,CAAA,EAAA,GAEqD,SAFrD;CAExB,EAAA,GAAwF,kBAAA,CAAA,GAAA,CAAA,OAAxF"}
|
package/dist/IsFetching.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as IsFetching } from "./IsFetching-
|
|
1
|
+
import { t as IsFetching } from "./IsFetching-DZvSjDTq.cjs";
|
|
2
2
|
export { IsFetching };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_objectWithoutProperties = require('./objectWithoutProperties-
|
|
1
|
+
const require_objectWithoutProperties = require('./objectWithoutProperties-DjGVB1dZ.cjs');
|
|
2
2
|
let __tanstack_react_query = require("@tanstack/react-query");
|
|
3
3
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
4
|
|
|
@@ -16,4 +16,4 @@ Object.defineProperty(exports, 'Mutation', {
|
|
|
16
16
|
return Mutation;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
//# sourceMappingURL=Mutation-
|
|
19
|
+
//# sourceMappingURL=Mutation-B2H-fZYn.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Mutation-
|
|
1
|
+
{"version":3,"file":"Mutation-B2H-fZYn.cjs","names":[],"sources":["../src/Mutation.tsx"],"sourcesContent":["'use client'\n\nimport { type UseMutationOptions, type UseMutationResult, useMutation } from '@tanstack/react-query'\nimport type { ReactNode } from 'react'\n\nexport function Mutation<TData = unknown, TError = unknown, TVariables = void, TContext = unknown>({\n children,\n ...options\n}: UseMutationOptions<TData, TError, TVariables, TContext> & {\n children: (mutationResult: UseMutationResult<TData, TError, TVariables, TContext>) => ReactNode\n}) {\n return <>{children(useMutation(options))}</>\n}\n"],"mappings":";;;;;mBAME;AADF,SAAgB,SAAmF,MAKhG;KALgG,EACjG;AAKA,QAAO,mFAAG,2HAA6B,CAAC,GAAI"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { UseMutationOptions, UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/Mutation.d.ts
|
|
@@ -11,4 +11,4 @@ declare function Mutation<TData = unknown, TError = unknown, TVariables = void,
|
|
|
11
11
|
}): react_jsx_runtime0.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { Mutation as t };
|
|
14
|
-
//# sourceMappingURL=Mutation-
|
|
14
|
+
//# sourceMappingURL=Mutation-CR3oXQ6p.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Mutation-
|
|
1
|
+
{"version":3,"file":"Mutation-CR3oXQ6p.d.mts","names":[],"sources":["../src/Mutation.tsx"],"sourcesContent":[],"mappings":";;;;;iBAKgB;;;GAGb,mBAAmB,OAAO,QAAQ,YAAY;6BACpB,kBAAkB,OAAO,QAAQ,YAAY,cAAc;IACvF,kBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as _objectWithoutProperties } from "./objectWithoutProperties-
|
|
1
|
+
import { t as _objectWithoutProperties } from "./objectWithoutProperties-VHBPpeSg.mjs";
|
|
2
2
|
import { useMutation } from "@tanstack/react-query";
|
|
3
3
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
4
|
|
|
@@ -11,4 +11,4 @@ function Mutation(_ref) {
|
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
13
|
export { Mutation as t };
|
|
14
|
-
//# sourceMappingURL=Mutation-
|
|
14
|
+
//# sourceMappingURL=Mutation-CkHa5_Af.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Mutation-CkHa5_Af.mjs","names":[],"sources":["../src/Mutation.tsx"],"sourcesContent":["'use client'\n\nimport { type UseMutationOptions, type UseMutationResult, useMutation } from '@tanstack/react-query'\nimport type { ReactNode } from 'react'\n\nexport function Mutation<TData = unknown, TError = unknown, TVariables = void, TContext = unknown>({\n children,\n ...options\n}: UseMutationOptions<TData, TError, TVariables, TContext> & {\n children: (mutationResult: UseMutationResult<TData, TError, TVariables, TContext>) => ReactNode\n}) {\n return <>{children(useMutation(options))}</>\n}\n"],"mappings":";;;;;mBAME;AADF,SAAgB,SAAmF,MAKhG;KALgG,EACjG;AAKA,QAAO,0CAAG,SAAS,sDAAoB,CAAC,GAAI"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
1
2
|
import { UseMutationOptions, UseMutationResult } from "@tanstack/react-query";
|
|
2
|
-
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/Mutation.d.ts
|
|
@@ -8,7 +8,7 @@ declare function Mutation<TData = unknown, TError = unknown, TVariables = void,
|
|
|
8
8
|
...options
|
|
9
9
|
}: UseMutationOptions<TData, TError, TVariables, TContext> & {
|
|
10
10
|
children: (mutationResult: UseMutationResult<TData, TError, TVariables, TContext>) => ReactNode;
|
|
11
|
-
}):
|
|
11
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { Mutation as t };
|
|
14
|
-
//# sourceMappingURL=Mutation-
|
|
14
|
+
//# sourceMappingURL=Mutation-DClZyxmF.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Mutation-DClZyxmF.d.cts","names":[],"sources":["../src/Mutation.tsx"],"sourcesContent":[],"mappings":";;;;;iBAKgB;;;GAGb,mBAAmB,OAAO,QAAQ,YAAY;6BACpB,kBAAkB,OAAO,QAAQ,YAAY,cAAc;IACvF,kBAAA,CAAA,GAAA,CAAA"}
|
package/dist/Mutation.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
require('./objectWithoutProperties-
|
|
5
|
-
const require_Mutation = require('./Mutation-
|
|
4
|
+
require('./objectWithoutProperties-DjGVB1dZ.cjs');
|
|
5
|
+
const require_Mutation = require('./Mutation-B2H-fZYn.cjs');
|
|
6
6
|
|
|
7
7
|
exports.Mutation = require_Mutation.Mutation;
|
package/dist/Mutation.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Mutation } from "./Mutation-
|
|
1
|
+
import { t as Mutation } from "./Mutation-DClZyxmF.cjs";
|
|
2
2
|
export { Mutation };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
1
2
|
import { FetchInfiniteQueryOptions, QueryKey } from "@tanstack/react-query";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/PrefetchInfiniteQuery.d.ts
|
|
5
5
|
|
|
@@ -11,7 +11,7 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
11
11
|
* <PrefetchInfiniteQuery queryKey={['queryKey']} queryFn={queryFn} />
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
declare function PrefetchInfiniteQuery<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: FetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey>):
|
|
14
|
+
declare function PrefetchInfiniteQuery<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: FetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey>): react_jsx_runtime7.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { PrefetchInfiniteQuery as t };
|
|
17
|
-
//# sourceMappingURL=PrefetchInfiniteQuery-
|
|
17
|
+
//# sourceMappingURL=PrefetchInfiniteQuery-B9hGVsbw.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrefetchInfiniteQuery-B9hGVsbw.d.cts","names":[],"sources":["../src/PrefetchInfiniteQuery.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAaA;;;;;AAKmD,iBALnC,qBAKmC,CAAA,eAAA,OAAA,EAAA,SAAA,OAAA,EAAA,QAFzC,YAEyC,EAAA,kBAD/B,QAC+B,GADpB,QACoB,CAAA,CAAA,OAAA,EAAxC,yBAAwC,CAAd,YAAc,EAAA,MAAA,EAAQ,KAAR,EAAe,SAAf,CAAA,CAAA,EAAyB,kBAAA,CAAA,GAAA,CAAA,OAAzB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as usePrefetchInfiniteQuery } from "./usePrefetchInfiniteQuery-
|
|
1
|
+
import { t as usePrefetchInfiniteQuery } from "./usePrefetchInfiniteQuery-DZiSAbIS.mjs";
|
|
2
2
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/PrefetchInfiniteQuery.tsx
|
|
@@ -17,4 +17,4 @@ function PrefetchInfiniteQuery(options) {
|
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
19
|
export { PrefetchInfiniteQuery as t };
|
|
20
|
-
//# sourceMappingURL=PrefetchInfiniteQuery-
|
|
20
|
+
//# sourceMappingURL=PrefetchInfiniteQuery-C0eOVFlg.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrefetchInfiniteQuery-C0eOVFlg.mjs","names":[],"sources":["../src/PrefetchInfiniteQuery.tsx"],"sourcesContent":["'use client'\n\nimport { type FetchInfiniteQueryOptions, type QueryKey } from '@tanstack/react-query'\nimport { usePrefetchInfiniteQuery } from './usePrefetchInfiniteQuery'\n\n/**\n * A component that allows you to use `usePrefetchInfiniteQuery` in JSX, avoiding the limitations of React hooks.\n * @see {@link https://suspensive.org/docs/react-query/PrefetchInfiniteQuery Suspensive Docs}\n * @example\n * ```tsx\n * <PrefetchInfiniteQuery queryKey={['queryKey']} queryFn={queryFn} />\n * ```\n */\nexport function PrefetchInfiniteQuery<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(options: FetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey>) {\n usePrefetchInfiniteQuery(options)\n return <></>\n}\n"],"mappings":";;;;;;;;;;;;AAaA,SAAgB,sBAKd,SAA4E;AAC5E,0BAAyB,QAAQ;AACjC,QAAO,iCAAK"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
1
|
import { FetchInfiniteQueryOptions, QueryKey } from "@tanstack/react-query";
|
|
2
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/PrefetchInfiniteQuery.d.ts
|
|
5
5
|
|
|
@@ -14,4 +14,4 @@ import { FetchInfiniteQueryOptions, QueryKey } from "@tanstack/react-query";
|
|
|
14
14
|
declare function PrefetchInfiniteQuery<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: FetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey>): react_jsx_runtime1.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { PrefetchInfiniteQuery as t };
|
|
17
|
-
//# sourceMappingURL=PrefetchInfiniteQuery-
|
|
17
|
+
//# sourceMappingURL=PrefetchInfiniteQuery-DtZ7itiY.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrefetchInfiniteQuery-DtZ7itiY.d.mts","names":[],"sources":["../src/PrefetchInfiniteQuery.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAaA;;;;;AAKmD,iBALnC,qBAKmC,CAAA,eAAA,OAAA,EAAA,SAAA,OAAA,EAAA,QAFzC,YAEyC,EAAA,kBAD/B,QAC+B,GADpB,QACoB,CAAA,CAAA,OAAA,EAAxC,yBAAwC,CAAd,YAAc,EAAA,MAAA,EAAQ,KAAR,EAAe,SAAf,CAAA,CAAA,EAAyB,kBAAA,CAAA,GAAA,CAAA,OAAzB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PrefetchInfiniteQuery } from "./PrefetchInfiniteQuery-
|
|
1
|
+
import { t as PrefetchInfiniteQuery } from "./PrefetchInfiniteQuery-B9hGVsbw.cjs";
|
|
2
2
|
export { PrefetchInfiniteQuery };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PrefetchInfiniteQuery } from "./PrefetchInfiniteQuery-
|
|
1
|
+
import { t as PrefetchInfiniteQuery } from "./PrefetchInfiniteQuery-DtZ7itiY.mjs";
|
|
2
2
|
export { PrefetchInfiniteQuery };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as usePrefetchQuery } from "./usePrefetchQuery-
|
|
1
|
+
import { t as usePrefetchQuery } from "./usePrefetchQuery-RuK6ZS1I.mjs";
|
|
2
2
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/PrefetchQuery.tsx
|
|
@@ -17,4 +17,4 @@ function PrefetchQuery(options) {
|
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
19
|
export { PrefetchQuery as t };
|
|
20
|
-
//# sourceMappingURL=PrefetchQuery-
|
|
20
|
+
//# sourceMappingURL=PrefetchQuery-7QYRCNcB.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrefetchQuery-7QYRCNcB.mjs","names":[],"sources":["../src/PrefetchQuery.tsx"],"sourcesContent":["'use client'\n\nimport { type FetchQueryOptions, type QueryKey } from '@tanstack/react-query'\nimport { usePrefetchQuery } from './usePrefetchQuery'\n\n/**\n * A component that allows you to use usePrefetchQuery in JSX, avoiding the limitations of React hooks.\n * @see {@link https://suspensive.org/docs/react-query/PrefetchQuery Suspensive Docs}\n * @example\n * ```tsx\n * <PrefetchQuery queryKey={['queryKey']} queryFn={queryFn} />\n * ```\n */\nexport function PrefetchQuery<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(options: FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>) {\n usePrefetchQuery(options)\n return <></>\n}\n"],"mappings":";;;;;;;;;;;;AAaA,SAAgB,cAKd,SAAoE;AACpE,kBAAiB,QAAQ;AACzB,QAAO,iCAAK"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
1
2
|
import { FetchQueryOptions, QueryKey } from "@tanstack/react-query";
|
|
2
|
-
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/PrefetchQuery.d.ts
|
|
5
5
|
|
|
@@ -11,7 +11,7 @@ import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
|
11
11
|
* <PrefetchQuery queryKey={['queryKey']} queryFn={queryFn} />
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
declare function PrefetchQuery<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>):
|
|
14
|
+
declare function PrefetchQuery<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>): react_jsx_runtime0.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { PrefetchQuery as t };
|
|
17
|
-
//# sourceMappingURL=PrefetchQuery-
|
|
17
|
+
//# sourceMappingURL=PrefetchQuery-DJQ3O6jL.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrefetchQuery-DJQ3O6jL.d.cts","names":[],"sources":["../src/PrefetchQuery.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAaA;;;;;AAK2C,iBAL3B,aAK2B,CAAA,eAAA,OAAA,EAAA,SAAA,OAAA,EAAA,QAFjC,YAEiC,EAAA,kBADvB,QACuB,GADZ,QACY,CAAA,CAAA,OAAA,EAAhC,iBAAgC,CAAd,YAAc,EAAA,MAAA,EAAQ,KAAR,EAAe,SAAf,CAAA,CAAA,EAAyB,kBAAA,CAAA,GAAA,CAAA,OAAzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
2
1
|
import { FetchQueryOptions, QueryKey } from "@tanstack/react-query";
|
|
2
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/PrefetchQuery.d.ts
|
|
5
5
|
|
|
@@ -11,7 +11,7 @@ import { FetchQueryOptions, QueryKey } from "@tanstack/react-query";
|
|
|
11
11
|
* <PrefetchQuery queryKey={['queryKey']} queryFn={queryFn} />
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
declare function PrefetchQuery<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>):
|
|
14
|
+
declare function PrefetchQuery<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>): react_jsx_runtime3.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { PrefetchQuery as t };
|
|
17
|
-
//# sourceMappingURL=PrefetchQuery-
|
|
17
|
+
//# sourceMappingURL=PrefetchQuery-PoJ8NbtL.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrefetchQuery-PoJ8NbtL.d.mts","names":[],"sources":["../src/PrefetchQuery.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAaA;;;;;AAK2C,iBAL3B,aAK2B,CAAA,eAAA,OAAA,EAAA,SAAA,OAAA,EAAA,QAFjC,YAEiC,EAAA,kBADvB,QACuB,GADZ,QACY,CAAA,CAAA,OAAA,EAAhC,iBAAgC,CAAd,YAAc,EAAA,MAAA,EAAQ,KAAR,EAAe,SAAf,CAAA,CAAA,EAAyB,kBAAA,CAAA,GAAA,CAAA,OAAzB"}
|
package/dist/PrefetchQuery.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PrefetchQuery } from "./PrefetchQuery-
|
|
1
|
+
import { t as PrefetchQuery } from "./PrefetchQuery-DJQ3O6jL.cjs";
|
|
2
2
|
export { PrefetchQuery };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as _objectWithoutProperties } from "./objectWithoutProperties-
|
|
2
|
-
import { t as ClientOnly } from "./ClientOnly-
|
|
3
|
-
import { Hydrate, dehydrate } from "@tanstack/react-query";
|
|
1
|
+
import { t as _objectWithoutProperties } from "./objectWithoutProperties-VHBPpeSg.mjs";
|
|
2
|
+
import { t as ClientOnly } from "./ClientOnly-P5h-7PhS.mjs";
|
|
3
|
+
import { Hydrate, QueryClient, dehydrate } from "@tanstack/react-query";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
|
-
//#region \0@oxc-project+runtime@0.
|
|
6
|
+
//#region \0@oxc-project+runtime@0.97.0/helpers/typeof.js
|
|
7
7
|
function _typeof(o) {
|
|
8
8
|
"@babel/helpers - typeof";
|
|
9
9
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
|
|
@@ -14,7 +14,7 @@ function _typeof(o) {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
//#endregion
|
|
17
|
-
//#region \0@oxc-project+runtime@0.
|
|
17
|
+
//#region \0@oxc-project+runtime@0.97.0/helpers/toPrimitive.js
|
|
18
18
|
function toPrimitive(t, r) {
|
|
19
19
|
if ("object" != _typeof(t) || !t) return t;
|
|
20
20
|
var e = t[Symbol.toPrimitive];
|
|
@@ -27,14 +27,14 @@ function toPrimitive(t, r) {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
//#endregion
|
|
30
|
-
//#region \0@oxc-project+runtime@0.
|
|
30
|
+
//#region \0@oxc-project+runtime@0.97.0/helpers/toPropertyKey.js
|
|
31
31
|
function toPropertyKey(t) {
|
|
32
32
|
var i = toPrimitive(t, "string");
|
|
33
33
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
|
-
//#region \0@oxc-project+runtime@0.
|
|
37
|
+
//#region \0@oxc-project+runtime@0.97.0/helpers/defineProperty.js
|
|
38
38
|
function _defineProperty(e, r, t) {
|
|
39
39
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
40
40
|
value: t,
|
|
@@ -45,7 +45,7 @@ function _defineProperty(e, r, t) {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
//#endregion
|
|
48
|
-
//#region \0@oxc-project+runtime@0.
|
|
48
|
+
//#region \0@oxc-project+runtime@0.97.0/helpers/objectSpread2.js
|
|
49
49
|
function ownKeys(e, r) {
|
|
50
50
|
var t = Object.keys(e);
|
|
51
51
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -69,7 +69,7 @@ function _objectSpread2(e) {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
//#endregion
|
|
72
|
-
//#region \0@oxc-project+runtime@0.
|
|
72
|
+
//#region \0@oxc-project+runtime@0.97.0/helpers/asyncToGenerator.js
|
|
73
73
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
74
74
|
try {
|
|
75
75
|
var i = n[a](c), u = i.value;
|
|
@@ -96,7 +96,7 @@ function _asyncToGenerator(n) {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
//#endregion
|
|
99
|
-
//#region src/
|
|
99
|
+
//#region src/QueriesHydration.tsx
|
|
100
100
|
const _excluded = [
|
|
101
101
|
"queries",
|
|
102
102
|
"children",
|
|
@@ -109,7 +109,7 @@ const _excluded = [
|
|
|
109
109
|
* @experimental This component is experimental and may be changed or removed in the future.
|
|
110
110
|
*
|
|
111
111
|
* @description
|
|
112
|
-
*
|
|
112
|
+
* QueriesHydration is designed for React Server Components (RSC).
|
|
113
113
|
* It pre-fetches multiple queries on the server side and automatically hydrates
|
|
114
114
|
* the data to the client, enabling seamless data synchronization between server and client.
|
|
115
115
|
*
|
|
@@ -120,32 +120,32 @@ const _excluded = [
|
|
|
120
120
|
* ```tsx
|
|
121
121
|
* // app/page.tsx (Server Component)
|
|
122
122
|
* import { Suspense } from 'react'
|
|
123
|
-
* import {
|
|
123
|
+
* import { QueriesHydration } from '@suspensive/react-query'
|
|
124
124
|
* import { queryOptions } from '@tanstack/react-query'
|
|
125
125
|
*
|
|
126
|
-
* const
|
|
127
|
-
* queryKey: ['user',
|
|
128
|
-
* queryFn: () => fetchUser(
|
|
126
|
+
* const userQueryOptions = (userId: string) => queryOptions({
|
|
127
|
+
* queryKey: ['user', userId],
|
|
128
|
+
* queryFn: () => fetchUser(userId)
|
|
129
129
|
* })
|
|
130
130
|
*
|
|
131
|
-
* const
|
|
131
|
+
* const postsQueryOptions = () => queryOptions({
|
|
132
132
|
* queryKey: ['posts'],
|
|
133
133
|
* queryFn: () => fetchPosts()
|
|
134
134
|
* })
|
|
135
135
|
*
|
|
136
|
-
* export default function Page() {
|
|
136
|
+
* export default function Page({ userId }: { userId: string }) {
|
|
137
137
|
* return (
|
|
138
138
|
* <>
|
|
139
139
|
* <Suspense fallback={<div>Loading user...</div>}>
|
|
140
|
-
* <
|
|
140
|
+
* <QueriesHydration queries={[userQueryOptions(userId)]}>
|
|
141
141
|
* <UserProfile />
|
|
142
|
-
* </
|
|
142
|
+
* </QueriesHydration>
|
|
143
143
|
* </Suspense>
|
|
144
144
|
*
|
|
145
145
|
* <Suspense fallback={<div>Loading posts...</div>}>
|
|
146
|
-
* <
|
|
146
|
+
* <QueriesHydration queries={[postsQueryOptions()]}>
|
|
147
147
|
* <PostsList />
|
|
148
|
-
* </
|
|
148
|
+
* </QueriesHydration>
|
|
149
149
|
* </Suspense>
|
|
150
150
|
* </>
|
|
151
151
|
* )
|
|
@@ -156,23 +156,23 @@ const _excluded = [
|
|
|
156
156
|
* ```tsx
|
|
157
157
|
* // With custom error fallback
|
|
158
158
|
* <Suspense fallback={<div>Loading user...</div>}>
|
|
159
|
-
* <
|
|
160
|
-
* queries={[
|
|
159
|
+
* <QueriesHydration
|
|
160
|
+
* queries={[userQueryOptions(userId)]}
|
|
161
161
|
* skipSsrOnError={{ fallback: <div>Fetching on client...</div> }}
|
|
162
162
|
* >
|
|
163
163
|
* <UserProfile />
|
|
164
|
-
* </
|
|
164
|
+
* </QueriesHydration>
|
|
165
165
|
* </Suspense>
|
|
166
166
|
* ```
|
|
167
167
|
*
|
|
168
|
-
* @see {@link https://suspensive.org/docs/react-query/
|
|
168
|
+
* @see {@link https://suspensive.org/docs/react-query/QueriesHydration Documentation}
|
|
169
169
|
*/
|
|
170
|
-
function
|
|
171
|
-
return
|
|
170
|
+
function QueriesHydration(_x) {
|
|
171
|
+
return _QueriesHydration.apply(this, arguments);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
|
|
175
|
-
let { queries, children, queryClient, skipSsrOnError = true } = _ref, props = _objectWithoutProperties(_ref, _excluded);
|
|
173
|
+
function _QueriesHydration() {
|
|
174
|
+
_QueriesHydration = _asyncToGenerator(function* (_ref) {
|
|
175
|
+
let { queries, children, queryClient = new QueryClient(), skipSsrOnError = true } = _ref, props = _objectWithoutProperties(_ref, _excluded);
|
|
176
176
|
try {
|
|
177
177
|
yield Promise.all(queries.map((query) => queryClient.ensureQueryData(query)));
|
|
178
178
|
} catch (_unused) {
|
|
@@ -186,9 +186,9 @@ function _QueriesHydrationBoundary() {
|
|
|
186
186
|
children
|
|
187
187
|
}));
|
|
188
188
|
});
|
|
189
|
-
return
|
|
189
|
+
return _QueriesHydration.apply(this, arguments);
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
//#endregion
|
|
193
|
-
export {
|
|
194
|
-
//# sourceMappingURL=
|
|
193
|
+
export { QueriesHydration as t };
|
|
194
|
+
//# sourceMappingURL=QueriesHydration-C8w5Rm3q.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueriesHydration-C8w5Rm3q.mjs","names":[],"sources":["../src/QueriesHydration.tsx"],"sourcesContent":["import {\n Hydrate,\n type HydrateProps,\n type OmitKeyof,\n QueryClient,\n type QueryOptions,\n type WithRequired,\n dehydrate,\n} from '@tanstack/react-query'\nimport type { ReactNode } from 'react'\nimport { ClientOnly } from './components/ClientOnly'\n\n/**\n * A server component that fetches multiple queries on the server and hydrates them to the client.\n *\n * @experimental This component is experimental and may be changed or removed in the future.\n *\n * @description\n * QueriesHydration is designed for React Server Components (RSC).\n * It pre-fetches multiple queries on the server side and automatically hydrates\n * the data to the client, enabling seamless data synchronization between server and client.\n *\n * When errors occur during server-side fetching, the component gracefully falls back\n * to client-side rendering, ensuring your application remains resilient.\n *\n * @example\n * ```tsx\n * // app/page.tsx (Server Component)\n * import { Suspense } from 'react'\n * import { QueriesHydration } from '@suspensive/react-query'\n * import { queryOptions } from '@tanstack/react-query'\n *\n * const userQueryOptions = (userId: string) => queryOptions({\n * queryKey: ['user', userId],\n * queryFn: () => fetchUser(userId)\n * })\n *\n * const postsQueryOptions = () => queryOptions({\n * queryKey: ['posts'],\n * queryFn: () => fetchPosts()\n * })\n *\n * export default function Page({ userId }: { userId: string }) {\n * return (\n * <>\n * <Suspense fallback={<div>Loading user...</div>}>\n * <QueriesHydration queries={[userQueryOptions(userId)]}>\n * <UserProfile />\n * </QueriesHydration>\n * </Suspense>\n *\n * <Suspense fallback={<div>Loading posts...</div>}>\n * <QueriesHydration queries={[postsQueryOptions()]}>\n * <PostsList />\n * </QueriesHydration>\n * </Suspense>\n * </>\n * )\n * }\n * ```\n *\n * @example\n * ```tsx\n * // With custom error fallback\n * <Suspense fallback={<div>Loading user...</div>}>\n * <QueriesHydration\n * queries={[userQueryOptions(userId)]}\n * skipSsrOnError={{ fallback: <div>Fetching on client...</div> }}\n * >\n * <UserProfile />\n * </QueriesHydration>\n * </Suspense>\n * ```\n *\n * @see {@link https://suspensive.org/docs/react-query/QueriesHydration Documentation}\n */\nexport async function QueriesHydration({\n queries,\n children,\n queryClient = new QueryClient(),\n skipSsrOnError = true,\n ...props\n}: {\n /**\n * The QueryClient instance to use for fetching queries.\n */\n queryClient?: QueryClient\n /**\n * An array of query options to be fetched on the server. Each query must include a `queryKey`.\n */\n queries: WithRequired<QueryOptions<any, any, any, any>, 'queryKey'>[]\n /**\n * Controls error handling behavior:\n * - `true` (default): Skips SSR and falls back to client-side rendering when server fetch fails\n * - `false`: Proceeds with SSR without hydration (retry fetching on client component server rendering)\n * - `{ fallback: ReactNode }`: Skips SSR with custom fallback UI during client-side rendering\n */\n skipSsrOnError?:\n | boolean\n | {\n fallback: ReactNode\n }\n} & OmitKeyof<HydrateProps, 'state'>) {\n try {\n await Promise.all(queries.map((query) => queryClient.ensureQueryData(query)))\n } catch {\n if (skipSsrOnError) {\n return (\n <ClientOnly fallback={skipSsrOnError === true ? undefined : skipSsrOnError.fallback}>{children}</ClientOnly>\n )\n }\n }\n return (\n <Hydrate {...props} state={dehydrate(queryClient)}>\n {children}\n </Hydrate>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EE;CACA;CACA;CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAJF,SAAsB,iBAAiB;;;;wDA0BD;MA1BC,EACrC,SACA,UACA,cAAc,IAAI,aAAa,EAC/B,iBAAiB,eACd;AAsBH,MAAI;AACF,SAAM,QAAQ,IAAI,QAAQ,KAAK,UAAU,YAAY,gBAAgB,MAAM,CAAC,CAAC;oBACvE;AACN,OAAI,eACF,QACE,oBAAC;IAAW,UAAU,mBAAmB,OAAO,SAAY,eAAe;IAAW;KAAsB;;AAIlH,SACE,oBAAC,2CAAY;GAAO,OAAO,UAAU,YAAY;GAC9C;KACO"}
|