@suspensive/react-query-4 3.19.2 → 3.19.3
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/IsFetching.cjs +18 -2
- package/dist/IsFetching.cjs.map +1 -0
- package/dist/IsFetching.d.cts +18 -2
- package/dist/IsFetching.d.cts.map +1 -0
- package/dist/IsFetching.d.mts +18 -2
- package/dist/IsFetching.d.mts.map +1 -0
- package/dist/IsFetching.mjs +17 -2
- package/dist/IsFetching.mjs.map +1 -0
- package/dist/Mutation.cjs +14 -2
- package/dist/Mutation.cjs.map +1 -0
- package/dist/Mutation.d.cts +14 -2
- package/dist/Mutation.d.cts.map +1 -0
- package/dist/Mutation.d.mts +14 -2
- package/dist/Mutation.d.mts.map +1 -0
- package/dist/Mutation.mjs +13 -2
- package/dist/Mutation.mjs.map +1 -0
- package/dist/PrefetchInfiniteQuery.cjs +20 -2
- package/dist/PrefetchInfiniteQuery.cjs.map +1 -0
- package/dist/PrefetchInfiniteQuery.d.cts +16 -2
- package/dist/PrefetchInfiniteQuery.d.cts.map +1 -0
- package/dist/PrefetchInfiniteQuery.d.mts +16 -2
- package/dist/PrefetchInfiniteQuery.d.mts.map +1 -0
- package/dist/PrefetchInfiniteQuery.mjs +19 -2
- package/dist/PrefetchInfiniteQuery.mjs.map +1 -0
- package/dist/PrefetchQuery.cjs +20 -2
- package/dist/PrefetchQuery.cjs.map +1 -0
- package/dist/PrefetchQuery.d.cts +16 -2
- package/dist/PrefetchQuery.d.cts.map +1 -0
- package/dist/PrefetchQuery.d.mts +16 -2
- package/dist/PrefetchQuery.d.mts.map +1 -0
- package/dist/PrefetchQuery.mjs +19 -2
- package/dist/PrefetchQuery.mjs.map +1 -0
- package/dist/{QueriesHydration-dcSAzQNT.cjs → QueriesHydration-B9tinfWA.cjs} +16 -16
- package/dist/QueriesHydration-B9tinfWA.cjs.map +1 -0
- package/dist/{QueriesHydration-GQxJe_Vu.mjs → QueriesHydration-MZQ7Oj60.mjs} +11 -11
- package/dist/QueriesHydration-MZQ7Oj60.mjs.map +1 -0
- package/dist/QueriesHydration.cjs +2 -1
- package/dist/QueriesHydration.d.cts +105 -2
- package/dist/QueriesHydration.d.cts.map +1 -0
- package/dist/QueriesHydration.d.mts +105 -2
- package/dist/QueriesHydration.d.mts.map +1 -0
- package/dist/QueriesHydration.mjs +1 -1
- package/dist/QueryClientConsumer.cjs +14 -2
- package/dist/QueryClientConsumer.cjs.map +1 -0
- package/dist/QueryClientConsumer.d.cts +18 -2
- package/dist/QueryClientConsumer.d.cts.map +1 -0
- package/dist/QueryClientConsumer.d.mts +18 -2
- package/dist/QueryClientConsumer.d.mts.map +1 -0
- package/dist/QueryClientConsumer.mjs +13 -2
- package/dist/QueryClientConsumer.mjs.map +1 -0
- package/dist/SuspenseInfiniteQuery.cjs +30 -2
- package/dist/SuspenseInfiniteQuery.cjs.map +1 -0
- package/dist/SuspenseInfiniteQuery.d.cts +31 -2
- package/dist/SuspenseInfiniteQuery.d.cts.map +1 -0
- package/dist/SuspenseInfiniteQuery.d.mts +31 -3
- package/dist/SuspenseInfiniteQuery.d.mts.map +1 -0
- package/dist/SuspenseInfiniteQuery.mjs +29 -2
- package/dist/SuspenseInfiniteQuery.mjs.map +1 -0
- package/dist/SuspenseQueries.cjs +26 -2
- package/dist/SuspenseQueries.cjs.map +1 -0
- package/dist/SuspenseQueries.d.cts +30 -2
- package/dist/SuspenseQueries.d.cts.map +1 -0
- package/dist/SuspenseQueries.d.mts +30 -2
- package/dist/SuspenseQueries.d.mts.map +1 -0
- package/dist/SuspenseQueries.mjs +25 -2
- package/dist/SuspenseQueries.mjs.map +1 -0
- package/dist/SuspenseQuery.cjs +30 -2
- package/dist/SuspenseQuery.cjs.map +1 -0
- package/dist/SuspenseQuery.d.cts +30 -2
- package/dist/SuspenseQuery.d.cts.map +1 -0
- package/dist/SuspenseQuery.d.mts +30 -2
- package/dist/SuspenseQuery.d.mts.map +1 -0
- package/dist/SuspenseQuery.mjs +29 -2
- package/dist/SuspenseQuery.mjs.map +1 -0
- package/dist/components/ClientOnly.cjs +13 -2
- package/dist/components/ClientOnly.cjs.map +1 -0
- package/dist/components/ClientOnly.d.cts +2 -2
- package/dist/components/ClientOnly.d.cts.map +1 -1
- package/dist/components/ClientOnly.d.mts +2 -2
- package/dist/components/ClientOnly.d.mts.map +1 -1
- package/dist/components/ClientOnly.mjs +12 -2
- package/dist/components/ClientOnly.mjs.map +1 -0
- package/dist/createGetQueryClient.cjs +63 -2
- package/dist/createGetQueryClient.cjs.map +1 -0
- package/dist/createGetQueryClient.d.cts +53 -2
- package/dist/createGetQueryClient.d.cts.map +1 -0
- package/dist/createGetQueryClient.d.mts +53 -2
- package/dist/createGetQueryClient.d.mts.map +1 -0
- package/dist/createGetQueryClient.mjs +62 -2
- package/dist/createGetQueryClient.mjs.map +1 -0
- package/dist/index.cjs +19 -18
- package/dist/index.d.cts +18 -18
- package/dist/index.d.mts +18 -18
- package/dist/index.mjs +18 -18
- package/dist/infiniteQueryOptions.cjs +17 -2
- package/dist/infiniteQueryOptions.cjs.map +1 -0
- package/dist/infiniteQueryOptions.d.cts +28 -2
- package/dist/infiniteQueryOptions.d.cts.map +1 -0
- package/dist/infiniteQueryOptions.d.mts +28 -2
- package/dist/infiniteQueryOptions.d.mts.map +1 -0
- package/dist/infiniteQueryOptions.mjs +16 -2
- package/dist/infiniteQueryOptions.mjs.map +1 -0
- package/dist/mutationOptions.cjs +9 -2
- package/dist/mutationOptions.cjs.map +1 -0
- package/dist/mutationOptions.d.cts +7 -2
- package/dist/mutationOptions.d.cts.map +1 -0
- package/dist/mutationOptions.d.mts +7 -2
- package/dist/mutationOptions.d.mts.map +1 -0
- package/dist/mutationOptions.mjs +7 -2
- package/dist/mutationOptions.mjs.map +1 -0
- package/dist/{objectSpread2-CpqxxdM2.cjs → objectSpread2-9HkiXZY2.cjs} +15 -15
- package/dist/{objectSpread2-BFPIJj0i.mjs → objectSpread2-BX3M3dlG.mjs} +15 -15
- package/dist/{objectWithoutProperties-BYP50gyF.mjs → objectWithoutProperties-CZk5Qmfh.mjs} +2 -2
- package/dist/{objectWithoutProperties-CYXRK7DS.cjs → objectWithoutProperties-CfjOeCpP.cjs} +2 -2
- package/dist/queryOptions.cjs +17 -2
- package/dist/queryOptions.cjs.map +1 -0
- package/dist/queryOptions.d.cts +28 -2
- package/dist/queryOptions.d.cts.map +1 -0
- package/dist/queryOptions.d.mts +28 -2
- package/dist/queryOptions.d.mts.map +1 -0
- package/dist/queryOptions.mjs +16 -2
- package/dist/queryOptions.mjs.map +1 -0
- package/dist/usePrefetchInfiniteQuery.cjs +15 -2
- package/dist/usePrefetchInfiniteQuery.cjs.map +1 -0
- package/dist/usePrefetchInfiniteQuery.d.cts +11 -2
- package/dist/usePrefetchInfiniteQuery.d.cts.map +1 -0
- package/dist/usePrefetchInfiniteQuery.d.mts +11 -2
- package/dist/usePrefetchInfiniteQuery.d.mts.map +1 -0
- package/dist/usePrefetchInfiniteQuery.mjs +14 -2
- package/dist/usePrefetchInfiniteQuery.mjs.map +1 -0
- package/dist/usePrefetchQuery.cjs +15 -2
- package/dist/usePrefetchQuery.cjs.map +1 -0
- package/dist/usePrefetchQuery.d.cts +11 -2
- package/dist/usePrefetchQuery.d.cts.map +1 -0
- package/dist/usePrefetchQuery.d.mts +11 -2
- package/dist/usePrefetchQuery.d.mts.map +1 -0
- package/dist/usePrefetchQuery.mjs +14 -2
- package/dist/usePrefetchQuery.mjs.map +1 -0
- package/dist/useSuspenseInfiniteQuery.cjs +17 -2
- package/dist/useSuspenseInfiniteQuery.cjs.map +1 -0
- package/dist/useSuspenseInfiniteQuery.d.cts +17 -2
- package/dist/useSuspenseInfiniteQuery.d.cts.map +1 -0
- package/dist/useSuspenseInfiniteQuery.d.mts +17 -2
- package/dist/useSuspenseInfiniteQuery.d.mts.map +1 -0
- package/dist/useSuspenseInfiniteQuery.mjs +16 -2
- package/dist/useSuspenseInfiniteQuery.mjs.map +1 -0
- package/dist/useSuspenseQueries.cjs +17 -2
- package/dist/useSuspenseQueries.cjs.map +1 -0
- package/dist/useSuspenseQueries.d.cts +36 -2
- package/dist/useSuspenseQueries.d.cts.map +1 -0
- package/dist/useSuspenseQueries.d.mts +36 -2
- package/dist/useSuspenseQueries.d.mts.map +1 -0
- package/dist/useSuspenseQueries.mjs +16 -2
- package/dist/useSuspenseQueries.mjs.map +1 -0
- package/dist/useSuspenseQuery.cjs +17 -2
- package/dist/useSuspenseQuery.cjs.map +1 -0
- package/dist/useSuspenseQuery.d.cts +36 -2
- package/dist/useSuspenseQuery.d.cts.map +1 -0
- package/dist/useSuspenseQuery.d.mts +36 -2
- package/dist/useSuspenseQuery.d.mts.map +1 -0
- package/dist/useSuspenseQuery.mjs +16 -2
- package/dist/useSuspenseQuery.mjs.map +1 -0
- package/package.json +4 -4
- package/src/createGetQueryClient.spec.tsx +25 -77
- package/dist/ClientOnly-BdmzVYnI.mjs +0 -15
- package/dist/ClientOnly-BdmzVYnI.mjs.map +0 -1
- package/dist/ClientOnly-Dvf8t__-.cjs +0 -20
- package/dist/ClientOnly-Dvf8t__-.cjs.map +0 -1
- package/dist/IsFetching-BYkNw1cs.mjs +0 -18
- package/dist/IsFetching-BYkNw1cs.mjs.map +0 -1
- package/dist/IsFetching-BfIQ3Qek.d.mts +0 -19
- package/dist/IsFetching-BfIQ3Qek.d.mts.map +0 -1
- package/dist/IsFetching-BhOgGqrs.cjs +0 -23
- package/dist/IsFetching-BhOgGqrs.cjs.map +0 -1
- package/dist/IsFetching-CuftXnaJ.d.cts +0 -19
- package/dist/IsFetching-CuftXnaJ.d.cts.map +0 -1
- package/dist/Mutation-CGUYEkKX.cjs +0 -19
- package/dist/Mutation-CGUYEkKX.cjs.map +0 -1
- package/dist/Mutation-CGpbCg54.d.mts +0 -14
- package/dist/Mutation-CGpbCg54.d.mts.map +0 -1
- package/dist/Mutation-DGmP7HQI.d.cts +0 -14
- package/dist/Mutation-DGmP7HQI.d.cts.map +0 -1
- package/dist/Mutation-DUJhz3rT.mjs +0 -14
- package/dist/Mutation-DUJhz3rT.mjs.map +0 -1
- package/dist/PrefetchInfiniteQuery-BewcG5rR.d.cts +0 -17
- package/dist/PrefetchInfiniteQuery-BewcG5rR.d.cts.map +0 -1
- package/dist/PrefetchInfiniteQuery-D-3dZMEz.d.mts +0 -17
- package/dist/PrefetchInfiniteQuery-D-3dZMEz.d.mts.map +0 -1
- package/dist/PrefetchInfiniteQuery-RS3Qz-7B.mjs +0 -20
- package/dist/PrefetchInfiniteQuery-RS3Qz-7B.mjs.map +0 -1
- package/dist/PrefetchInfiniteQuery-cCSXqKVR.cjs +0 -25
- package/dist/PrefetchInfiniteQuery-cCSXqKVR.cjs.map +0 -1
- package/dist/PrefetchQuery-0pdYNtpS.cjs +0 -25
- package/dist/PrefetchQuery-0pdYNtpS.cjs.map +0 -1
- package/dist/PrefetchQuery-Ddbt43Fk.d.cts +0 -17
- package/dist/PrefetchQuery-Ddbt43Fk.d.cts.map +0 -1
- package/dist/PrefetchQuery-DqgbVdjY.d.mts +0 -17
- package/dist/PrefetchQuery-DqgbVdjY.d.mts.map +0 -1
- package/dist/PrefetchQuery-uh4idoXK.mjs +0 -20
- package/dist/PrefetchQuery-uh4idoXK.mjs.map +0 -1
- package/dist/QueriesHydration-DPogKsc4.d.mts +0 -106
- package/dist/QueriesHydration-DPogKsc4.d.mts.map +0 -1
- package/dist/QueriesHydration-DnlRrHJ3.d.cts +0 -106
- package/dist/QueriesHydration-DnlRrHJ3.d.cts.map +0 -1
- package/dist/QueriesHydration-GQxJe_Vu.mjs.map +0 -1
- package/dist/QueriesHydration-dcSAzQNT.cjs.map +0 -1
- package/dist/QueryClientConsumer-5PZLv_8g.d.mts +0 -18
- package/dist/QueryClientConsumer-5PZLv_8g.d.mts.map +0 -1
- package/dist/QueryClientConsumer-e7PyaFF3.mjs +0 -14
- package/dist/QueryClientConsumer-e7PyaFF3.mjs.map +0 -1
- package/dist/QueryClientConsumer-mF0OUwkq.cjs +0 -19
- package/dist/QueryClientConsumer-mF0OUwkq.cjs.map +0 -1
- package/dist/QueryClientConsumer-pihgMOoA.d.cts +0 -18
- package/dist/QueryClientConsumer-pihgMOoA.d.cts.map +0 -1
- package/dist/SuspenseInfiniteQuery-BimBkaCe.mjs +0 -30
- package/dist/SuspenseInfiniteQuery-BimBkaCe.mjs.map +0 -1
- package/dist/SuspenseInfiniteQuery-BtRviR-Z.d.mts +0 -32
- package/dist/SuspenseInfiniteQuery-BtRviR-Z.d.mts.map +0 -1
- package/dist/SuspenseInfiniteQuery-DSYC5XON.d.cts +0 -32
- package/dist/SuspenseInfiniteQuery-DSYC5XON.d.cts.map +0 -1
- package/dist/SuspenseInfiniteQuery-oVQE2P2T.cjs +0 -35
- package/dist/SuspenseInfiniteQuery-oVQE2P2T.cjs.map +0 -1
- package/dist/SuspenseQueries-BPvriygJ.d.cts +0 -31
- package/dist/SuspenseQueries-BPvriygJ.d.cts.map +0 -1
- package/dist/SuspenseQueries-Brk6gtMw.cjs +0 -31
- package/dist/SuspenseQueries-Brk6gtMw.cjs.map +0 -1
- package/dist/SuspenseQueries-C0mF_XD_.mjs +0 -26
- package/dist/SuspenseQueries-C0mF_XD_.mjs.map +0 -1
- package/dist/SuspenseQueries-CHFS9e4y.d.mts +0 -31
- package/dist/SuspenseQueries-CHFS9e4y.d.mts.map +0 -1
- package/dist/SuspenseQuery-BWI24top.mjs +0 -30
- package/dist/SuspenseQuery-BWI24top.mjs.map +0 -1
- package/dist/SuspenseQuery-D4IZU_Co.d.cts +0 -31
- package/dist/SuspenseQuery-D4IZU_Co.d.cts.map +0 -1
- package/dist/SuspenseQuery-DE4NKrqP.cjs +0 -35
- package/dist/SuspenseQuery-DE4NKrqP.cjs.map +0 -1
- package/dist/SuspenseQuery-VjYG_b1z.d.mts +0 -31
- package/dist/SuspenseQuery-VjYG_b1z.d.mts.map +0 -1
- package/dist/createGetQueryClient-B0yrcyXF.mjs +0 -63
- package/dist/createGetQueryClient-B0yrcyXF.mjs.map +0 -1
- package/dist/createGetQueryClient-DTKVVwpJ.d.mts +0 -54
- package/dist/createGetQueryClient-DTKVVwpJ.d.mts.map +0 -1
- package/dist/createGetQueryClient-iXoXO7so.d.cts +0 -54
- package/dist/createGetQueryClient-iXoXO7so.d.cts.map +0 -1
- package/dist/createGetQueryClient-nXvPqrrS.cjs +0 -68
- package/dist/createGetQueryClient-nXvPqrrS.cjs.map +0 -1
- package/dist/infiniteQueryOptions-2KFmTqEY.mjs +0 -17
- package/dist/infiniteQueryOptions-2KFmTqEY.mjs.map +0 -1
- package/dist/infiniteQueryOptions-BVac5B-c.cjs +0 -22
- package/dist/infiniteQueryOptions-BVac5B-c.cjs.map +0 -1
- package/dist/infiniteQueryOptions-Be7VYTUR.d.cts +0 -29
- package/dist/infiniteQueryOptions-Be7VYTUR.d.cts.map +0 -1
- package/dist/infiniteQueryOptions-Bpz4mFYH.d.mts +0 -29
- package/dist/infiniteQueryOptions-Bpz4mFYH.d.mts.map +0 -1
- package/dist/mutationOptions-BIOn3zne.cjs +0 -14
- package/dist/mutationOptions-BIOn3zne.cjs.map +0 -1
- package/dist/mutationOptions-BZS10WEJ.d.mts +0 -7
- package/dist/mutationOptions-BZS10WEJ.d.mts.map +0 -1
- package/dist/mutationOptions-C4emetVL.mjs +0 -8
- package/dist/mutationOptions-C4emetVL.mjs.map +0 -1
- package/dist/mutationOptions-Eid3aM1W.d.cts +0 -7
- package/dist/mutationOptions-Eid3aM1W.d.cts.map +0 -1
- package/dist/queryOptions-92vSd4eV.cjs +0 -22
- package/dist/queryOptions-92vSd4eV.cjs.map +0 -1
- package/dist/queryOptions-DILe-4vk.d.mts +0 -29
- package/dist/queryOptions-DILe-4vk.d.mts.map +0 -1
- package/dist/queryOptions-DNGHeGX5.d.cts +0 -29
- package/dist/queryOptions-DNGHeGX5.d.cts.map +0 -1
- package/dist/queryOptions-Dnf4-wlk.mjs +0 -17
- package/dist/queryOptions-Dnf4-wlk.mjs.map +0 -1
- package/dist/usePrefetchInfiniteQuery-B0_Ladyp.d.mts +0 -12
- package/dist/usePrefetchInfiniteQuery-B0_Ladyp.d.mts.map +0 -1
- package/dist/usePrefetchInfiniteQuery-BmZtlLeD.cjs +0 -20
- package/dist/usePrefetchInfiniteQuery-BmZtlLeD.cjs.map +0 -1
- package/dist/usePrefetchInfiniteQuery-CQSN-P9m.mjs +0 -15
- package/dist/usePrefetchInfiniteQuery-CQSN-P9m.mjs.map +0 -1
- package/dist/usePrefetchInfiniteQuery-CRwRctQH.d.cts +0 -12
- package/dist/usePrefetchInfiniteQuery-CRwRctQH.d.cts.map +0 -1
- package/dist/usePrefetchQuery-38O319FT.d.mts +0 -12
- package/dist/usePrefetchQuery-38O319FT.d.mts.map +0 -1
- package/dist/usePrefetchQuery-93Pltnzl.d.cts +0 -12
- package/dist/usePrefetchQuery-93Pltnzl.d.cts.map +0 -1
- package/dist/usePrefetchQuery-CtrJciA6.mjs +0 -15
- package/dist/usePrefetchQuery-CtrJciA6.mjs.map +0 -1
- package/dist/usePrefetchQuery-woiivAJc.cjs +0 -20
- package/dist/usePrefetchQuery-woiivAJc.cjs.map +0 -1
- package/dist/useSuspenseInfiniteQuery-Bh0nh8Kc.d.mts +0 -17
- package/dist/useSuspenseInfiniteQuery-Bh0nh8Kc.d.mts.map +0 -1
- package/dist/useSuspenseInfiniteQuery-CA0jmgbX.cjs +0 -22
- package/dist/useSuspenseInfiniteQuery-CA0jmgbX.cjs.map +0 -1
- package/dist/useSuspenseInfiniteQuery-DUxKOkCo.mjs +0 -17
- package/dist/useSuspenseInfiniteQuery-DUxKOkCo.mjs.map +0 -1
- package/dist/useSuspenseInfiniteQuery-xXu-A7cX.d.cts +0 -17
- package/dist/useSuspenseInfiniteQuery-xXu-A7cX.d.cts.map +0 -1
- package/dist/useSuspenseQueries-Bf0lSTWB.mjs +0 -17
- package/dist/useSuspenseQueries-Bf0lSTWB.mjs.map +0 -1
- package/dist/useSuspenseQueries-CHPLAyeb.d.cts +0 -37
- package/dist/useSuspenseQueries-CHPLAyeb.d.cts.map +0 -1
- package/dist/useSuspenseQueries-DqBaOI3L.cjs +0 -22
- package/dist/useSuspenseQueries-DqBaOI3L.cjs.map +0 -1
- package/dist/useSuspenseQueries-pfI8hFSM.d.mts +0 -37
- package/dist/useSuspenseQueries-pfI8hFSM.d.mts.map +0 -1
- package/dist/useSuspenseQuery-41ONxa6i.cjs +0 -22
- package/dist/useSuspenseQuery-41ONxa6i.cjs.map +0 -1
- package/dist/useSuspenseQuery-CVWQeHhd.mjs +0 -17
- package/dist/useSuspenseQuery-CVWQeHhd.mjs.map +0 -1
- package/dist/useSuspenseQuery-DG0Jz1Da.d.mts +0 -37
- package/dist/useSuspenseQuery-DG0Jz1Da.d.mts.map +0 -1
- package/dist/useSuspenseQuery-DiNomNWA.d.cts +0 -37
- package/dist/useSuspenseQuery-DiNomNWA.d.cts.map +0 -1
|
@@ -1,45 +1,32 @@
|
|
|
1
1
|
import { QueryClient } from '@tanstack/react-query'
|
|
2
2
|
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
|
3
|
+
import { createGetQueryClient } from './createGetQueryClient'
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const mock = { isServer: false }
|
|
6
|
+
|
|
7
|
+
vi.mock(import('@tanstack/react-query'), async (importOriginal) => {
|
|
8
|
+
const actual = await importOriginal()
|
|
7
9
|
return {
|
|
8
10
|
...actual,
|
|
9
|
-
isServer
|
|
11
|
+
get isServer() {
|
|
12
|
+
return mock.isServer
|
|
13
|
+
},
|
|
10
14
|
}
|
|
11
15
|
})
|
|
12
16
|
|
|
13
|
-
describe('getQueryClient', () => {
|
|
17
|
+
describe('getQueryClient (browser environment)', () => {
|
|
14
18
|
beforeEach(() => {
|
|
15
|
-
|
|
16
|
-
vi.resetModules()
|
|
19
|
+
mock.isServer = false
|
|
17
20
|
})
|
|
18
21
|
|
|
19
|
-
it('should return
|
|
20
|
-
const { createGetQueryClient } = await import('./createGetQueryClient')
|
|
22
|
+
it('should return the same QueryClient instance on multiple calls', () => {
|
|
21
23
|
const { getQueryClient } = createGetQueryClient()
|
|
22
|
-
|
|
23
|
-
expect(queryClient).toBeInstanceOf(QueryClient)
|
|
24
|
+
expect(getQueryClient()).toBe(getQueryClient())
|
|
24
25
|
})
|
|
25
26
|
|
|
26
|
-
it('should
|
|
27
|
-
const { createGetQueryClient } = await import('./createGetQueryClient')
|
|
28
|
-
const { getQueryClient } = createGetQueryClient()
|
|
29
|
-
const queryClient1 = getQueryClient()
|
|
30
|
-
const queryClient2 = getQueryClient()
|
|
31
|
-
expect(queryClient1).toBe(queryClient2)
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
it('should apply config when creating initial QueryClient', async () => {
|
|
35
|
-
const { createGetQueryClient } = await import('./createGetQueryClient')
|
|
27
|
+
it('should apply config', () => {
|
|
36
28
|
const { getQueryClient } = createGetQueryClient({
|
|
37
|
-
defaultOptions: {
|
|
38
|
-
queries: {
|
|
39
|
-
staleTime: 5000,
|
|
40
|
-
retry: 3,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
29
|
+
defaultOptions: { queries: { staleTime: 5000, retry: 3 } },
|
|
43
30
|
})
|
|
44
31
|
const queryClient = getQueryClient()
|
|
45
32
|
expect(queryClient).toBeInstanceOf(QueryClient)
|
|
@@ -47,72 +34,33 @@ describe('getQueryClient', () => {
|
|
|
47
34
|
expect(queryClient.getDefaultOptions().queries?.retry).toBe(3)
|
|
48
35
|
})
|
|
49
36
|
|
|
50
|
-
it('should
|
|
51
|
-
const { createGetQueryClient } = await import('./createGetQueryClient')
|
|
37
|
+
it('should not set cacheTime to Infinity', () => {
|
|
52
38
|
const { getQueryClient } = createGetQueryClient({
|
|
53
|
-
defaultOptions: {
|
|
54
|
-
queries: {
|
|
55
|
-
cacheTime: 5000,
|
|
56
|
-
},
|
|
57
|
-
},
|
|
39
|
+
defaultOptions: { queries: { cacheTime: 5000 } },
|
|
58
40
|
})
|
|
59
|
-
|
|
60
|
-
// In browser, cacheTime should use the provided value, not Infinity
|
|
61
|
-
expect(queryClient.getDefaultOptions().queries?.cacheTime).toBe(5000)
|
|
62
|
-
expect(queryClient.getDefaultOptions().queries?.cacheTime).not.toBe(Infinity)
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
it('should not set cacheTime to Infinity in browser environment when no config provided', async () => {
|
|
66
|
-
const { createGetQueryClient } = await import('./createGetQueryClient')
|
|
67
|
-
const { getQueryClient } = createGetQueryClient()
|
|
68
|
-
const queryClient = getQueryClient()
|
|
69
|
-
// In browser, cacheTime should use default value (not Infinity)
|
|
70
|
-
// Default cacheTime in React Query v4 is 5 minutes (300000ms)
|
|
71
|
-
expect(queryClient.getDefaultOptions().queries?.cacheTime).not.toBe(Infinity)
|
|
41
|
+
expect(getQueryClient().getDefaultOptions().queries?.cacheTime).toBe(5000)
|
|
72
42
|
})
|
|
73
43
|
})
|
|
74
44
|
|
|
75
45
|
describe('getQueryClient (server environment)', () => {
|
|
76
46
|
beforeEach(() => {
|
|
77
|
-
|
|
78
|
-
// Mock isServer as true for server tests
|
|
79
|
-
vi.doMock('@tanstack/react-query', async () => {
|
|
80
|
-
const actual = await vi.importActual('@tanstack/react-query')
|
|
81
|
-
return {
|
|
82
|
-
...actual,
|
|
83
|
-
isServer: true,
|
|
84
|
-
}
|
|
85
|
-
})
|
|
47
|
+
mock.isServer = true
|
|
86
48
|
})
|
|
87
49
|
|
|
88
|
-
it('should return new QueryClient instance on each call
|
|
89
|
-
const { createGetQueryClient } = await import('./createGetQueryClient')
|
|
50
|
+
it('should return new QueryClient instance on each call', () => {
|
|
90
51
|
const { getQueryClient } = createGetQueryClient()
|
|
91
|
-
|
|
92
|
-
const queryClient2 = getQueryClient()
|
|
93
|
-
expect(queryClient1).toBeInstanceOf(QueryClient)
|
|
94
|
-
expect(queryClient2).toBeInstanceOf(QueryClient)
|
|
95
|
-
expect(queryClient1).not.toBe(queryClient2)
|
|
52
|
+
expect(getQueryClient()).not.toBe(getQueryClient())
|
|
96
53
|
})
|
|
97
54
|
|
|
98
|
-
it('should set cacheTime to Infinity
|
|
99
|
-
const { createGetQueryClient } = await import('./createGetQueryClient')
|
|
55
|
+
it('should set cacheTime to Infinity to prevent OOM', () => {
|
|
100
56
|
const { getQueryClient } = createGetQueryClient()
|
|
101
|
-
|
|
102
|
-
expect(queryClient.getDefaultOptions().queries?.cacheTime).toBe(Infinity)
|
|
57
|
+
expect(getQueryClient().getDefaultOptions().queries?.cacheTime).toBe(Infinity)
|
|
103
58
|
})
|
|
104
59
|
|
|
105
|
-
it('should override cacheTime to Infinity even if config provides different value
|
|
106
|
-
const { createGetQueryClient } = await import('./createGetQueryClient')
|
|
60
|
+
it('should override cacheTime to Infinity even if config provides different value', () => {
|
|
107
61
|
const { getQueryClient } = createGetQueryClient({
|
|
108
|
-
defaultOptions: {
|
|
109
|
-
queries: {
|
|
110
|
-
cacheTime: 5000,
|
|
111
|
-
},
|
|
112
|
-
},
|
|
62
|
+
defaultOptions: { queries: { cacheTime: 5000 } },
|
|
113
63
|
})
|
|
114
|
-
|
|
115
|
-
// cacheTime should be Infinity regardless of config to prevent OOM on server
|
|
116
|
-
expect(queryClient.getDefaultOptions().queries?.cacheTime).toBe(Infinity)
|
|
64
|
+
expect(getQueryClient().getDefaultOptions().queries?.cacheTime).toBe(Infinity)
|
|
117
65
|
})
|
|
118
66
|
})
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
|
-
import { useSyncExternalStore } from "react";
|
|
5
|
-
|
|
6
|
-
//#region src/components/ClientOnly.tsx
|
|
7
|
-
const useIsClient = () => useSyncExternalStore(emptySubscribe, getSnapshot, getServerSnapshot);
|
|
8
|
-
const emptySubscribe = () => () => {};
|
|
9
|
-
const getSnapshot = () => true;
|
|
10
|
-
const getServerSnapshot = () => false;
|
|
11
|
-
const ClientOnly = ({ children, fallback }) => /* @__PURE__ */ jsx(Fragment, { children: useIsClient() ? children : fallback });
|
|
12
|
-
|
|
13
|
-
//#endregion
|
|
14
|
-
export { ClientOnly as t };
|
|
15
|
-
//# sourceMappingURL=ClientOnly-BdmzVYnI.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ClientOnly-BdmzVYnI.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,20 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
-
let react = require("react");
|
|
5
|
-
|
|
6
|
-
//#region src/components/ClientOnly.tsx
|
|
7
|
-
const useIsClient = () => (0, react.useSyncExternalStore)(emptySubscribe, getSnapshot, getServerSnapshot);
|
|
8
|
-
const emptySubscribe = () => () => {};
|
|
9
|
-
const getSnapshot = () => true;
|
|
10
|
-
const getServerSnapshot = () => false;
|
|
11
|
-
const ClientOnly = ({ children, fallback }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: useIsClient() ? children : fallback });
|
|
12
|
-
|
|
13
|
-
//#endregion
|
|
14
|
-
Object.defineProperty(exports, 'ClientOnly', {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () {
|
|
17
|
-
return ClientOnly;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
//# sourceMappingURL=ClientOnly-Dvf8t__-.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ClientOnly-Dvf8t__-.cjs","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,oDAAyC,gBAAgB,aAAa,kBAAkB;AAE9F,MAAM,6BAA6B;AACnC,MAAM,oBAAoB;AAC1B,MAAM,0BAA0B;AAEhC,MAAa,cAAc,EAAE,UAAU,eACrC,mFAAG,aAAa,GAAG,WAAW,WAAY"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { t as _objectWithoutProperties } from "./objectWithoutProperties-BYP50gyF.mjs";
|
|
2
|
-
import { useIsFetching } from "@tanstack/react-query";
|
|
3
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/IsFetching.tsx
|
|
6
|
-
const _excluded = ["children"];
|
|
7
|
-
/**
|
|
8
|
-
* Renders the current fetching count for queries that match the given filters.
|
|
9
|
-
* @experimental This is an experimental feature.
|
|
10
|
-
*/
|
|
11
|
-
const IsFetching = (_ref) => {
|
|
12
|
-
let { children } = _ref;
|
|
13
|
-
return /* @__PURE__ */ jsx(Fragment, { children: children(useIsFetching(_objectWithoutProperties(_ref, _excluded))) });
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
//#endregion
|
|
17
|
-
export { IsFetching as t };
|
|
18
|
-
//# sourceMappingURL=IsFetching-BYkNw1cs.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsFetching-BYkNw1cs.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 * Renders the current fetching count for queries that match the given filters.\n * @experimental This is an experimental feature.\n */\nexport const IsFetching = ({\n children,\n ...filter\n}: QueryFilters & { children: (isFetching: ReturnType<typeof useIsFetching>) => ReactNode }) => (\n <>{children(useIsFetching(filter))}</>\n)\n"],"mappings":";;;;;mBAUE;;;;;AADF,MAAa,cAAc,SAGqE;KAHrE,EACzB;AAE8F,QAC9F,0CAAG,SAAS,wDAAqB,CAAC,GAAI"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { QueryFilters, useIsFetching } from "@tanstack/react-query";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
import { ReactNode } from "react";
|
|
4
|
-
|
|
5
|
-
//#region src/IsFetching.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Renders the current fetching count for queries that match the given filters.
|
|
9
|
-
* @experimental This is an experimental feature.
|
|
10
|
-
*/
|
|
11
|
-
declare const IsFetching: ({
|
|
12
|
-
children,
|
|
13
|
-
...filter
|
|
14
|
-
}: QueryFilters & {
|
|
15
|
-
children: (isFetching: ReturnType<typeof useIsFetching>) => ReactNode;
|
|
16
|
-
}) => react_jsx_runtime0.JSX.Element;
|
|
17
|
-
//#endregion
|
|
18
|
-
export { IsFetching as t };
|
|
19
|
-
//# sourceMappingURL=IsFetching-BfIQ3Qek.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsFetching-BfIQ3Qek.d.mts","names":[],"sources":["../src/IsFetching.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AASA;AAA2B,cAAd,UAAc,EAAA,CAAA;EAAA,QAAA;EAAA,GAAA;CAAA,EAGxB,YAHwB,GAAA;EAGxB,QAAA,EAAA,CAAA,UAAA,EAAwC,UAAxC,CAAA,OAA0D,aAA1D,CAAA,EAAA,GAA6E,SAA7E;CAA0D,EAAA,GAA8B,kBAAA,CAAA,GAAA,CAAA,OAA9B"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
const require_objectWithoutProperties = require('./objectWithoutProperties-CYXRK7DS.cjs');
|
|
2
|
-
let __tanstack_react_query = require("@tanstack/react-query");
|
|
3
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
-
|
|
5
|
-
//#region src/IsFetching.tsx
|
|
6
|
-
const _excluded = ["children"];
|
|
7
|
-
/**
|
|
8
|
-
* Renders the current fetching count for queries that match the given filters.
|
|
9
|
-
* @experimental This is an experimental feature.
|
|
10
|
-
*/
|
|
11
|
-
const IsFetching = (_ref) => {
|
|
12
|
-
let { children } = _ref;
|
|
13
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: children((0, __tanstack_react_query.useIsFetching)(require_objectWithoutProperties._objectWithoutProperties(_ref, _excluded))) });
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
//#endregion
|
|
17
|
-
Object.defineProperty(exports, 'IsFetching', {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function () {
|
|
20
|
-
return IsFetching;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
//# sourceMappingURL=IsFetching-BhOgGqrs.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsFetching-BhOgGqrs.cjs","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 * Renders the current fetching count for queries that match the given filters.\n * @experimental This is an experimental feature.\n */\nexport const IsFetching = ({\n children,\n ...filter\n}: QueryFilters & { children: (isFetching: ReturnType<typeof useIsFetching>) => ReactNode }) => (\n <>{children(useIsFetching(filter))}</>\n)\n"],"mappings":";;;;;mBAUE;;;;;AADF,MAAa,cAAc,SAGqE;KAHrE,EACzB;AAE8F,QAC9F,mFAAG,6HAA8B,CAAC,GAAI"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
2
|
-
import { QueryFilters, useIsFetching } from "@tanstack/react-query";
|
|
3
|
-
import { ReactNode } from "react";
|
|
4
|
-
|
|
5
|
-
//#region src/IsFetching.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Renders the current fetching count for queries that match the given filters.
|
|
9
|
-
* @experimental This is an experimental feature.
|
|
10
|
-
*/
|
|
11
|
-
declare const IsFetching: ({
|
|
12
|
-
children,
|
|
13
|
-
...filter
|
|
14
|
-
}: QueryFilters & {
|
|
15
|
-
children: (isFetching: ReturnType<typeof useIsFetching>) => ReactNode;
|
|
16
|
-
}) => react_jsx_runtime8.JSX.Element;
|
|
17
|
-
//#endregion
|
|
18
|
-
export { IsFetching as t };
|
|
19
|
-
//# sourceMappingURL=IsFetching-CuftXnaJ.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsFetching-CuftXnaJ.d.cts","names":[],"sources":["../src/IsFetching.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AASA;AAA2B,cAAd,UAAc,EAAA,CAAA;EAAA,QAAA;EAAA,GAAA;CAAA,EAGxB,YAHwB,GAAA;EAGxB,QAAA,EAAA,CAAA,UAAA,EAAwC,UAAxC,CAAA,OAA0D,aAA1D,CAAA,EAAA,GAA6E,SAA7E;CAA0D,EAAA,GAA8B,kBAAA,CAAA,GAAA,CAAA,OAA9B"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const require_objectWithoutProperties = require('./objectWithoutProperties-CYXRK7DS.cjs');
|
|
2
|
-
let __tanstack_react_query = require("@tanstack/react-query");
|
|
3
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
-
|
|
5
|
-
//#region src/Mutation.tsx
|
|
6
|
-
const _excluded = ["children"];
|
|
7
|
-
function Mutation(_ref) {
|
|
8
|
-
let { children } = _ref;
|
|
9
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: children((0, __tanstack_react_query.useMutation)(require_objectWithoutProperties._objectWithoutProperties(_ref, _excluded))) });
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
Object.defineProperty(exports, 'Mutation', {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () {
|
|
16
|
-
return Mutation;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
//# sourceMappingURL=Mutation-CGUYEkKX.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Mutation-CGUYEkKX.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,14 +0,0 @@
|
|
|
1
|
-
import { UseMutationOptions, UseMutationResult } from "@tanstack/react-query";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
import { ReactNode } from "react";
|
|
4
|
-
|
|
5
|
-
//#region src/Mutation.d.ts
|
|
6
|
-
declare function Mutation<TData = unknown, TError = unknown, TVariables = void, TContext = unknown>({
|
|
7
|
-
children,
|
|
8
|
-
...options
|
|
9
|
-
}: UseMutationOptions<TData, TError, TVariables, TContext> & {
|
|
10
|
-
children: (mutationResult: UseMutationResult<TData, TError, TVariables, TContext>) => ReactNode;
|
|
11
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { Mutation as t };
|
|
14
|
-
//# sourceMappingURL=Mutation-CGpbCg54.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Mutation-CGpbCg54.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,14 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
2
|
-
import { UseMutationOptions, UseMutationResult } from "@tanstack/react-query";
|
|
3
|
-
import { ReactNode } from "react";
|
|
4
|
-
|
|
5
|
-
//#region src/Mutation.d.ts
|
|
6
|
-
declare function Mutation<TData = unknown, TError = unknown, TVariables = void, TContext = unknown>({
|
|
7
|
-
children,
|
|
8
|
-
...options
|
|
9
|
-
}: UseMutationOptions<TData, TError, TVariables, TContext> & {
|
|
10
|
-
children: (mutationResult: UseMutationResult<TData, TError, TVariables, TContext>) => ReactNode;
|
|
11
|
-
}): react_jsx_runtime6.JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { Mutation as t };
|
|
14
|
-
//# sourceMappingURL=Mutation-DGmP7HQI.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Mutation-DGmP7HQI.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"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { t as _objectWithoutProperties } from "./objectWithoutProperties-BYP50gyF.mjs";
|
|
2
|
-
import { useMutation } from "@tanstack/react-query";
|
|
3
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/Mutation.tsx
|
|
6
|
-
const _excluded = ["children"];
|
|
7
|
-
function Mutation(_ref) {
|
|
8
|
-
let { children } = _ref;
|
|
9
|
-
return /* @__PURE__ */ jsx(Fragment, { children: children(useMutation(_objectWithoutProperties(_ref, _excluded))) });
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
export { Mutation as t };
|
|
14
|
-
//# sourceMappingURL=Mutation-DUJhz3rT.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Mutation-DUJhz3rT.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,17 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
import { FetchInfiniteQueryOptions, QueryKey } from "@tanstack/react-query";
|
|
3
|
-
|
|
4
|
-
//#region src/PrefetchInfiniteQuery.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A component that allows you to use `usePrefetchInfiniteQuery` in JSX, avoiding the limitations of React hooks.
|
|
8
|
-
* @see {@link https://suspensive.org/docs/react-query/PrefetchInfiniteQuery Suspensive Docs}
|
|
9
|
-
* @example
|
|
10
|
-
* ```tsx
|
|
11
|
-
* <PrefetchInfiniteQuery queryKey={['queryKey']} queryFn={queryFn} />
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
declare function PrefetchInfiniteQuery<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: FetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey>): react_jsx_runtime0.JSX.Element;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { PrefetchInfiniteQuery as t };
|
|
17
|
-
//# sourceMappingURL=PrefetchInfiniteQuery-BewcG5rR.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PrefetchInfiniteQuery-BewcG5rR.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,17 +0,0 @@
|
|
|
1
|
-
import { FetchInfiniteQueryOptions, QueryKey } from "@tanstack/react-query";
|
|
2
|
-
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/PrefetchInfiniteQuery.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A component that allows you to use `usePrefetchInfiniteQuery` in JSX, avoiding the limitations of React hooks.
|
|
8
|
-
* @see {@link https://suspensive.org/docs/react-query/PrefetchInfiniteQuery Suspensive Docs}
|
|
9
|
-
* @example
|
|
10
|
-
* ```tsx
|
|
11
|
-
* <PrefetchInfiniteQuery queryKey={['queryKey']} queryFn={queryFn} />
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
declare function PrefetchInfiniteQuery<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: FetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey>): react_jsx_runtime4.JSX.Element;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { PrefetchInfiniteQuery as t };
|
|
17
|
-
//# sourceMappingURL=PrefetchInfiniteQuery-D-3dZMEz.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PrefetchInfiniteQuery-D-3dZMEz.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,20 +0,0 @@
|
|
|
1
|
-
import { t as usePrefetchInfiniteQuery } from "./usePrefetchInfiniteQuery-CQSN-P9m.mjs";
|
|
2
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/PrefetchInfiniteQuery.tsx
|
|
5
|
-
/**
|
|
6
|
-
* A component that allows you to use `usePrefetchInfiniteQuery` in JSX, avoiding the limitations of React hooks.
|
|
7
|
-
* @see {@link https://suspensive.org/docs/react-query/PrefetchInfiniteQuery Suspensive Docs}
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* <PrefetchInfiniteQuery queryKey={['queryKey']} queryFn={queryFn} />
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
function PrefetchInfiniteQuery(options) {
|
|
14
|
-
usePrefetchInfiniteQuery(options);
|
|
15
|
-
return /* @__PURE__ */ jsx(Fragment, {});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { PrefetchInfiniteQuery as t };
|
|
20
|
-
//# sourceMappingURL=PrefetchInfiniteQuery-RS3Qz-7B.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PrefetchInfiniteQuery-RS3Qz-7B.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,25 +0,0 @@
|
|
|
1
|
-
const require_usePrefetchInfiniteQuery = require('./usePrefetchInfiniteQuery-BmZtlLeD.cjs');
|
|
2
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
-
|
|
4
|
-
//#region src/PrefetchInfiniteQuery.tsx
|
|
5
|
-
/**
|
|
6
|
-
* A component that allows you to use `usePrefetchInfiniteQuery` in JSX, avoiding the limitations of React hooks.
|
|
7
|
-
* @see {@link https://suspensive.org/docs/react-query/PrefetchInfiniteQuery Suspensive Docs}
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* <PrefetchInfiniteQuery queryKey={['queryKey']} queryFn={queryFn} />
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
function PrefetchInfiniteQuery(options) {
|
|
14
|
-
require_usePrefetchInfiniteQuery.usePrefetchInfiniteQuery(options);
|
|
15
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
Object.defineProperty(exports, 'PrefetchInfiniteQuery', {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () {
|
|
22
|
-
return PrefetchInfiniteQuery;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=PrefetchInfiniteQuery-cCSXqKVR.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PrefetchInfiniteQuery-cCSXqKVR.cjs","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,2DAAyB,QAAQ;AACjC,QAAO,0EAAK"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const require_usePrefetchQuery = require('./usePrefetchQuery-woiivAJc.cjs');
|
|
2
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
-
|
|
4
|
-
//#region src/PrefetchQuery.tsx
|
|
5
|
-
/**
|
|
6
|
-
* A component that allows you to use usePrefetchQuery in JSX, avoiding the limitations of React hooks.
|
|
7
|
-
* @see {@link https://suspensive.org/docs/react-query/PrefetchQuery Suspensive Docs}
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* <PrefetchQuery queryKey={['queryKey']} queryFn={queryFn} />
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
function PrefetchQuery(options) {
|
|
14
|
-
require_usePrefetchQuery.usePrefetchQuery(options);
|
|
15
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
Object.defineProperty(exports, 'PrefetchQuery', {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () {
|
|
22
|
-
return PrefetchQuery;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=PrefetchQuery-0pdYNtpS.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PrefetchQuery-0pdYNtpS.cjs","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,2CAAiB,QAAQ;AACzB,QAAO,0EAAK"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
import { FetchQueryOptions, QueryKey } from "@tanstack/react-query";
|
|
3
|
-
|
|
4
|
-
//#region src/PrefetchQuery.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A component that allows you to use usePrefetchQuery in JSX, avoiding the limitations of React hooks.
|
|
8
|
-
* @see {@link https://suspensive.org/docs/react-query/PrefetchQuery Suspensive Docs}
|
|
9
|
-
* @example
|
|
10
|
-
* ```tsx
|
|
11
|
-
* <PrefetchQuery queryKey={['queryKey']} queryFn={queryFn} />
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
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
|
-
//#endregion
|
|
16
|
-
export { PrefetchQuery as t };
|
|
17
|
-
//# sourceMappingURL=PrefetchQuery-Ddbt43Fk.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PrefetchQuery-Ddbt43Fk.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,17 +0,0 @@
|
|
|
1
|
-
import { FetchQueryOptions, QueryKey } from "@tanstack/react-query";
|
|
2
|
-
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/PrefetchQuery.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A component that allows you to use usePrefetchQuery in JSX, avoiding the limitations of React hooks.
|
|
8
|
-
* @see {@link https://suspensive.org/docs/react-query/PrefetchQuery Suspensive Docs}
|
|
9
|
-
* @example
|
|
10
|
-
* ```tsx
|
|
11
|
-
* <PrefetchQuery queryKey={['queryKey']} queryFn={queryFn} />
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
declare function PrefetchQuery<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>): react_jsx_runtime8.JSX.Element;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { PrefetchQuery as t };
|
|
17
|
-
//# sourceMappingURL=PrefetchQuery-DqgbVdjY.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PrefetchQuery-DqgbVdjY.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"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { t as usePrefetchQuery } from "./usePrefetchQuery-CtrJciA6.mjs";
|
|
2
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/PrefetchQuery.tsx
|
|
5
|
-
/**
|
|
6
|
-
* A component that allows you to use usePrefetchQuery in JSX, avoiding the limitations of React hooks.
|
|
7
|
-
* @see {@link https://suspensive.org/docs/react-query/PrefetchQuery Suspensive Docs}
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* <PrefetchQuery queryKey={['queryKey']} queryFn={queryFn} />
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
function PrefetchQuery(options) {
|
|
14
|
-
usePrefetchQuery(options);
|
|
15
|
-
return /* @__PURE__ */ jsx(Fragment, {});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { PrefetchQuery as t };
|
|
20
|
-
//# sourceMappingURL=PrefetchQuery-uh4idoXK.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PrefetchQuery-uh4idoXK.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"}
|