@tanstack/vue-query 5.104.0 → 5.104.2
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/build/legacy/devtools/devtools.cjs +6 -0
- package/build/legacy/devtools/devtools.cjs.map +1 -1
- package/build/legacy/devtools/devtools.d.cts +7 -1
- package/build/legacy/devtools/devtools.d.cts.map +1 -1
- package/build/legacy/devtools/devtools.d.ts +7 -1
- package/build/legacy/devtools/devtools.d.ts.map +1 -1
- package/build/legacy/devtools/devtools.js +6 -0
- package/build/legacy/devtools/devtools.js.map +1 -1
- package/build/legacy/devtools/utils.cjs +21 -0
- package/build/legacy/devtools/utils.cjs.map +1 -1
- package/build/legacy/devtools/utils.d.cts +21 -0
- package/build/legacy/devtools/utils.d.cts.map +1 -1
- package/build/legacy/devtools/utils.d.ts +21 -0
- package/build/legacy/devtools/utils.d.ts.map +1 -1
- package/build/legacy/devtools/utils.js +21 -0
- package/build/legacy/devtools/utils.js.map +1 -1
- package/build/legacy/index.d.cts +6 -6
- package/build/legacy/index.d.ts +6 -6
- package/build/legacy/{infiniteQueryOptions-NucMX_M_.d.ts → infiniteQueryOptions-BaoKhSzb.d.ts} +26 -27
- package/build/legacy/infiniteQueryOptions-BaoKhSzb.d.ts.map +1 -0
- package/build/legacy/{infiniteQueryOptions-CnTRbIP5.d.cts → infiniteQueryOptions-ClNe2-FB.d.cts} +26 -27
- package/build/legacy/infiniteQueryOptions-ClNe2-FB.d.cts.map +1 -0
- package/build/legacy/infiniteQueryOptions.cjs.map +1 -1
- package/build/legacy/infiniteQueryOptions.d.cts +1 -1
- package/build/legacy/infiniteQueryOptions.d.ts +1 -1
- package/build/legacy/infiniteQueryOptions.js.map +1 -1
- package/build/legacy/mutationCache.cjs.map +1 -1
- package/build/legacy/mutationCache.d.cts +1 -1
- package/build/legacy/mutationCache.d.cts.map +1 -1
- package/build/legacy/mutationCache.d.ts +1 -1
- package/build/legacy/mutationCache.d.ts.map +1 -1
- package/build/legacy/mutationCache.js.map +1 -1
- package/build/legacy/mutationOptions.cjs.map +1 -1
- package/build/legacy/mutationOptions.d.cts +5 -13
- package/build/legacy/mutationOptions.d.cts.map +1 -1
- package/build/legacy/mutationOptions.d.ts +5 -13
- package/build/legacy/mutationOptions.d.ts.map +1 -1
- package/build/legacy/mutationOptions.js.map +1 -1
- package/build/legacy/queryCache.cjs.map +1 -1
- package/build/legacy/queryCache.d.cts +1 -1
- package/build/legacy/queryCache.d.cts.map +1 -1
- package/build/legacy/queryCache.d.ts +1 -1
- package/build/legacy/queryCache.d.ts.map +1 -1
- package/build/legacy/queryCache.js.map +1 -1
- package/build/legacy/{queryClient-Bn2Ql_Lu.d.cts → queryClient-BK9W57Qu.d.cts} +3 -3
- package/build/legacy/queryClient-BK9W57Qu.d.cts.map +1 -0
- package/build/legacy/{queryClient-B6mLtXOj.d.ts → queryClient-BoBzDWAZ.d.ts} +3 -3
- package/build/legacy/queryClient-BoBzDWAZ.d.ts.map +1 -0
- package/build/legacy/queryClient.cjs.map +1 -1
- package/build/legacy/queryClient.d.cts +1 -1
- package/build/legacy/queryClient.d.ts +1 -1
- package/build/legacy/queryClient.js.map +1 -1
- package/build/{modern/queryOptions-CwqQgQmQ.d.cts → legacy/queryOptions-BvmZtmiU.d.cts} +14 -19
- package/build/legacy/queryOptions-BvmZtmiU.d.cts.map +1 -0
- package/build/{modern/queryOptions-CsM5TXD2.d.ts → legacy/queryOptions-gpn5D4rf.d.ts} +14 -19
- package/build/legacy/queryOptions-gpn5D4rf.d.ts.map +1 -0
- package/build/legacy/queryOptions.cjs.map +1 -1
- package/build/legacy/queryOptions.d.cts +1 -1
- package/build/legacy/queryOptions.d.ts +1 -1
- package/build/legacy/queryOptions.js.map +1 -1
- package/build/{modern/types-JpJB72CS.d.cts → legacy/types-sdZdiLgo.d.cts} +48 -3
- package/build/legacy/types-sdZdiLgo.d.cts.map +1 -0
- package/build/legacy/{types-JpJB72CS.d.cts → types-sdZdiLgo.d.ts} +48 -3
- package/build/legacy/types-sdZdiLgo.d.ts.map +1 -0
- package/build/legacy/types.d.cts +1 -1
- package/build/legacy/types.d.ts +1 -1
- package/build/legacy/useBaseQuery.cjs +1 -1
- package/build/legacy/useBaseQuery.cjs.map +1 -1
- package/build/legacy/useBaseQuery.d.cts +1 -1
- package/build/legacy/useBaseQuery.d.ts +1 -1
- package/build/legacy/useBaseQuery.js +1 -1
- package/build/legacy/useBaseQuery.js.map +1 -1
- package/build/legacy/useInfiniteQuery.cjs.map +1 -1
- package/build/legacy/useInfiniteQuery.d.cts +1 -1
- package/build/legacy/useInfiniteQuery.d.ts +1 -1
- package/build/legacy/useInfiniteQuery.js.map +1 -1
- package/build/legacy/useIsFetching.cjs +0 -3
- package/build/legacy/useIsFetching.cjs.map +1 -1
- package/build/legacy/useIsFetching.d.cts +6 -5
- package/build/legacy/useIsFetching.d.cts.map +1 -1
- package/build/legacy/useIsFetching.d.ts +6 -5
- package/build/legacy/useIsFetching.d.ts.map +1 -1
- package/build/legacy/useIsFetching.js +0 -3
- package/build/legacy/useIsFetching.js.map +1 -1
- package/build/legacy/useMutation.cjs +2 -8
- package/build/legacy/useMutation.cjs.map +1 -1
- package/build/legacy/useMutation.d.cts +17 -11
- package/build/legacy/useMutation.d.cts.map +1 -1
- package/build/legacy/useMutation.d.ts +17 -11
- package/build/legacy/useMutation.d.ts.map +1 -1
- package/build/legacy/useMutation.js +2 -8
- package/build/legacy/useMutation.js.map +1 -1
- package/build/legacy/useMutationState.cjs +7 -6
- package/build/legacy/useMutationState.cjs.map +1 -1
- package/build/legacy/useMutationState.d.cts +16 -8
- package/build/legacy/useMutationState.d.cts.map +1 -1
- package/build/legacy/useMutationState.d.ts +16 -8
- package/build/legacy/useMutationState.d.ts.map +1 -1
- package/build/legacy/useMutationState.js +7 -6
- package/build/legacy/useMutationState.js.map +1 -1
- package/build/legacy/usePrefetchInfiniteQuery.cjs +5 -3
- package/build/legacy/usePrefetchInfiniteQuery.cjs.map +1 -1
- package/build/legacy/usePrefetchInfiniteQuery.d.cts +6 -5
- package/build/legacy/usePrefetchInfiniteQuery.d.cts.map +1 -1
- package/build/legacy/usePrefetchInfiniteQuery.d.ts +6 -5
- package/build/legacy/usePrefetchInfiniteQuery.d.ts.map +1 -1
- package/build/legacy/usePrefetchInfiniteQuery.js +5 -3
- package/build/legacy/usePrefetchInfiniteQuery.js.map +1 -1
- package/build/legacy/usePrefetchQuery.cjs +5 -3
- package/build/legacy/usePrefetchQuery.cjs.map +1 -1
- package/build/legacy/usePrefetchQuery.d.cts +6 -5
- package/build/legacy/usePrefetchQuery.d.cts.map +1 -1
- package/build/legacy/usePrefetchQuery.d.ts +6 -5
- package/build/legacy/usePrefetchQuery.d.ts.map +1 -1
- package/build/legacy/usePrefetchQuery.js +5 -3
- package/build/legacy/usePrefetchQuery.js.map +1 -1
- package/build/legacy/useQueries.cjs +1 -4
- package/build/legacy/useQueries.cjs.map +1 -1
- package/build/legacy/useQueries.d.cts +4 -7
- package/build/legacy/useQueries.d.cts.map +1 -1
- package/build/legacy/useQueries.d.ts +4 -7
- package/build/legacy/useQueries.d.ts.map +1 -1
- package/build/legacy/useQueries.js +1 -4
- package/build/legacy/useQueries.js.map +1 -1
- package/build/legacy/useQuery.cjs.map +1 -1
- package/build/legacy/useQuery.d.cts +12 -15
- package/build/legacy/useQuery.d.cts.map +1 -1
- package/build/legacy/useQuery.d.ts +12 -15
- package/build/legacy/useQuery.d.ts.map +1 -1
- package/build/legacy/useQuery.js.map +1 -1
- package/build/legacy/useQueryClient.cjs +3 -3
- package/build/legacy/useQueryClient.cjs.map +1 -1
- package/build/legacy/useQueryClient.d.cts +4 -4
- package/build/legacy/useQueryClient.d.ts +4 -4
- package/build/legacy/useQueryClient.js +3 -3
- package/build/legacy/useQueryClient.js.map +1 -1
- package/build/legacy/utils.cjs +54 -6
- package/build/legacy/utils.cjs.map +1 -1
- package/build/legacy/utils.d.cts +34 -7
- package/build/legacy/utils.d.cts.map +1 -1
- package/build/legacy/utils.d.ts +34 -7
- package/build/legacy/utils.d.ts.map +1 -1
- package/build/legacy/utils.js +54 -6
- package/build/legacy/utils.js.map +1 -1
- package/build/legacy/vueQueryPlugin.cjs +0 -3
- package/build/legacy/vueQueryPlugin.cjs.map +1 -1
- package/build/legacy/vueQueryPlugin.d.cts +6 -5
- package/build/legacy/vueQueryPlugin.d.cts.map +1 -1
- package/build/legacy/vueQueryPlugin.d.ts +6 -5
- package/build/legacy/vueQueryPlugin.d.ts.map +1 -1
- package/build/legacy/vueQueryPlugin.js +0 -3
- package/build/legacy/vueQueryPlugin.js.map +1 -1
- package/build/modern/devtools/devtools.cjs +6 -0
- package/build/modern/devtools/devtools.cjs.map +1 -1
- package/build/modern/devtools/devtools.d.cts +7 -1
- package/build/modern/devtools/devtools.d.cts.map +1 -1
- package/build/modern/devtools/devtools.d.ts +7 -1
- package/build/modern/devtools/devtools.d.ts.map +1 -1
- package/build/modern/devtools/devtools.js +6 -0
- package/build/modern/devtools/devtools.js.map +1 -1
- package/build/modern/devtools/utils.cjs +21 -0
- package/build/modern/devtools/utils.cjs.map +1 -1
- package/build/modern/devtools/utils.d.cts +21 -0
- package/build/modern/devtools/utils.d.cts.map +1 -1
- package/build/modern/devtools/utils.d.ts +21 -0
- package/build/modern/devtools/utils.d.ts.map +1 -1
- package/build/modern/devtools/utils.js +21 -0
- package/build/modern/devtools/utils.js.map +1 -1
- package/build/modern/index.d.cts +6 -6
- package/build/modern/index.d.ts +6 -6
- package/build/modern/{infiniteQueryOptions-NucMX_M_.d.ts → infiniteQueryOptions-BaoKhSzb.d.ts} +26 -27
- package/build/modern/infiniteQueryOptions-BaoKhSzb.d.ts.map +1 -0
- package/build/modern/{infiniteQueryOptions-CnTRbIP5.d.cts → infiniteQueryOptions-ClNe2-FB.d.cts} +26 -27
- package/build/modern/infiniteQueryOptions-ClNe2-FB.d.cts.map +1 -0
- package/build/modern/infiniteQueryOptions.cjs.map +1 -1
- package/build/modern/infiniteQueryOptions.d.cts +1 -1
- package/build/modern/infiniteQueryOptions.d.ts +1 -1
- package/build/modern/infiniteQueryOptions.js.map +1 -1
- package/build/modern/mutationCache.cjs.map +1 -1
- package/build/modern/mutationCache.d.cts +1 -1
- package/build/modern/mutationCache.d.cts.map +1 -1
- package/build/modern/mutationCache.d.ts +1 -1
- package/build/modern/mutationCache.d.ts.map +1 -1
- package/build/modern/mutationCache.js.map +1 -1
- package/build/modern/mutationOptions.cjs.map +1 -1
- package/build/modern/mutationOptions.d.cts +5 -13
- package/build/modern/mutationOptions.d.cts.map +1 -1
- package/build/modern/mutationOptions.d.ts +5 -13
- package/build/modern/mutationOptions.d.ts.map +1 -1
- package/build/modern/mutationOptions.js.map +1 -1
- package/build/modern/queryCache.cjs.map +1 -1
- package/build/modern/queryCache.d.cts +1 -1
- package/build/modern/queryCache.d.cts.map +1 -1
- package/build/modern/queryCache.d.ts +1 -1
- package/build/modern/queryCache.d.ts.map +1 -1
- package/build/modern/queryCache.js.map +1 -1
- package/build/modern/{queryClient-Bn2Ql_Lu.d.cts → queryClient-BK9W57Qu.d.cts} +3 -3
- package/build/modern/queryClient-BK9W57Qu.d.cts.map +1 -0
- package/build/modern/{queryClient-B6mLtXOj.d.ts → queryClient-BoBzDWAZ.d.ts} +3 -3
- package/build/modern/queryClient-BoBzDWAZ.d.ts.map +1 -0
- package/build/modern/queryClient.cjs.map +1 -1
- package/build/modern/queryClient.d.cts +1 -1
- package/build/modern/queryClient.d.ts +1 -1
- package/build/modern/queryClient.js.map +1 -1
- package/build/{legacy/queryOptions-CwqQgQmQ.d.cts → modern/queryOptions-BvmZtmiU.d.cts} +14 -19
- package/build/modern/queryOptions-BvmZtmiU.d.cts.map +1 -0
- package/build/{legacy/queryOptions-CsM5TXD2.d.ts → modern/queryOptions-gpn5D4rf.d.ts} +14 -19
- package/build/modern/queryOptions-gpn5D4rf.d.ts.map +1 -0
- package/build/modern/queryOptions.cjs.map +1 -1
- package/build/modern/queryOptions.d.cts +1 -1
- package/build/modern/queryOptions.d.ts +1 -1
- package/build/modern/queryOptions.js.map +1 -1
- package/build/modern/{types-JpJB72CS.d.ts → types-sdZdiLgo.d.cts} +48 -3
- package/build/modern/types-sdZdiLgo.d.cts.map +1 -0
- package/build/{legacy/types-JpJB72CS.d.ts → modern/types-sdZdiLgo.d.ts} +48 -3
- package/build/modern/types-sdZdiLgo.d.ts.map +1 -0
- package/build/modern/types.d.cts +1 -1
- package/build/modern/types.d.ts +1 -1
- package/build/modern/useBaseQuery.cjs +1 -1
- package/build/modern/useBaseQuery.cjs.map +1 -1
- package/build/modern/useBaseQuery.d.cts +1 -1
- package/build/modern/useBaseQuery.d.ts +1 -1
- package/build/modern/useBaseQuery.js +1 -1
- package/build/modern/useBaseQuery.js.map +1 -1
- package/build/modern/useInfiniteQuery.cjs.map +1 -1
- package/build/modern/useInfiniteQuery.d.cts +1 -1
- package/build/modern/useInfiniteQuery.d.ts +1 -1
- package/build/modern/useInfiniteQuery.js.map +1 -1
- package/build/modern/useIsFetching.cjs +0 -3
- package/build/modern/useIsFetching.cjs.map +1 -1
- package/build/modern/useIsFetching.d.cts +6 -5
- package/build/modern/useIsFetching.d.cts.map +1 -1
- package/build/modern/useIsFetching.d.ts +6 -5
- package/build/modern/useIsFetching.d.ts.map +1 -1
- package/build/modern/useIsFetching.js +0 -3
- package/build/modern/useIsFetching.js.map +1 -1
- package/build/modern/useMutation.cjs +2 -8
- package/build/modern/useMutation.cjs.map +1 -1
- package/build/modern/useMutation.d.cts +17 -11
- package/build/modern/useMutation.d.cts.map +1 -1
- package/build/modern/useMutation.d.ts +17 -11
- package/build/modern/useMutation.d.ts.map +1 -1
- package/build/modern/useMutation.js +2 -8
- package/build/modern/useMutation.js.map +1 -1
- package/build/modern/useMutationState.cjs +7 -6
- package/build/modern/useMutationState.cjs.map +1 -1
- package/build/modern/useMutationState.d.cts +16 -8
- package/build/modern/useMutationState.d.cts.map +1 -1
- package/build/modern/useMutationState.d.ts +16 -8
- package/build/modern/useMutationState.d.ts.map +1 -1
- package/build/modern/useMutationState.js +7 -6
- package/build/modern/useMutationState.js.map +1 -1
- package/build/modern/usePrefetchInfiniteQuery.cjs +5 -3
- package/build/modern/usePrefetchInfiniteQuery.cjs.map +1 -1
- package/build/modern/usePrefetchInfiniteQuery.d.cts +6 -5
- package/build/modern/usePrefetchInfiniteQuery.d.cts.map +1 -1
- package/build/modern/usePrefetchInfiniteQuery.d.ts +6 -5
- package/build/modern/usePrefetchInfiniteQuery.d.ts.map +1 -1
- package/build/modern/usePrefetchInfiniteQuery.js +5 -3
- package/build/modern/usePrefetchInfiniteQuery.js.map +1 -1
- package/build/modern/usePrefetchQuery.cjs +5 -3
- package/build/modern/usePrefetchQuery.cjs.map +1 -1
- package/build/modern/usePrefetchQuery.d.cts +6 -5
- package/build/modern/usePrefetchQuery.d.cts.map +1 -1
- package/build/modern/usePrefetchQuery.d.ts +6 -5
- package/build/modern/usePrefetchQuery.d.ts.map +1 -1
- package/build/modern/usePrefetchQuery.js +5 -3
- package/build/modern/usePrefetchQuery.js.map +1 -1
- package/build/modern/useQueries.cjs +1 -4
- package/build/modern/useQueries.cjs.map +1 -1
- package/build/modern/useQueries.d.cts +4 -7
- package/build/modern/useQueries.d.cts.map +1 -1
- package/build/modern/useQueries.d.ts +4 -7
- package/build/modern/useQueries.d.ts.map +1 -1
- package/build/modern/useQueries.js +1 -4
- package/build/modern/useQueries.js.map +1 -1
- package/build/modern/useQuery.cjs.map +1 -1
- package/build/modern/useQuery.d.cts +12 -15
- package/build/modern/useQuery.d.cts.map +1 -1
- package/build/modern/useQuery.d.ts +12 -15
- package/build/modern/useQuery.d.ts.map +1 -1
- package/build/modern/useQuery.js.map +1 -1
- package/build/modern/useQueryClient.cjs +3 -3
- package/build/modern/useQueryClient.cjs.map +1 -1
- package/build/modern/useQueryClient.d.cts +4 -4
- package/build/modern/useQueryClient.d.ts +4 -4
- package/build/modern/useQueryClient.js +3 -3
- package/build/modern/useQueryClient.js.map +1 -1
- package/build/modern/utils.cjs +54 -6
- package/build/modern/utils.cjs.map +1 -1
- package/build/modern/utils.d.cts +34 -7
- package/build/modern/utils.d.cts.map +1 -1
- package/build/modern/utils.d.ts +34 -7
- package/build/modern/utils.d.ts.map +1 -1
- package/build/modern/utils.js +54 -6
- package/build/modern/utils.js.map +1 -1
- package/build/modern/vueQueryPlugin.cjs +0 -3
- package/build/modern/vueQueryPlugin.cjs.map +1 -1
- package/build/modern/vueQueryPlugin.d.cts +6 -5
- package/build/modern/vueQueryPlugin.d.cts.map +1 -1
- package/build/modern/vueQueryPlugin.d.ts +6 -5
- package/build/modern/vueQueryPlugin.d.ts.map +1 -1
- package/build/modern/vueQueryPlugin.js +0 -3
- package/build/modern/vueQueryPlugin.js.map +1 -1
- package/package.json +6 -6
- package/src/devtools/devtools.ts +6 -0
- package/src/devtools/utils.ts +21 -0
- package/src/index.ts +5 -1
- package/src/infiniteQueryOptions.ts +2 -8
- package/src/mutationCache.ts +4 -2
- package/src/mutationOptions.ts +4 -12
- package/src/queryCache.ts +6 -2
- package/src/queryClient.ts +55 -52
- package/src/queryOptions.ts +22 -25
- package/src/types.ts +47 -2
- package/src/useBaseQuery.ts +8 -2
- package/src/useInfiniteQuery.ts +15 -14
- package/src/useIsFetching.ts +6 -4
- package/src/useMutation.ts +15 -9
- package/src/useMutationState.ts +23 -7
- package/src/usePrefetchInfiniteQuery.ts +9 -3
- package/src/usePrefetchQuery.ts +9 -3
- package/src/useQueries.ts +1 -4
- package/src/useQuery.ts +10 -12
- package/src/useQueryClient.ts +3 -3
- package/src/utils.ts +55 -9
- package/src/vueQueryPlugin.ts +4 -3
- package/build/legacy/infiniteQueryOptions-CnTRbIP5.d.cts.map +0 -1
- package/build/legacy/infiniteQueryOptions-NucMX_M_.d.ts.map +0 -1
- package/build/legacy/queryClient-B6mLtXOj.d.ts.map +0 -1
- package/build/legacy/queryClient-Bn2Ql_Lu.d.cts.map +0 -1
- package/build/legacy/queryOptions-CsM5TXD2.d.ts.map +0 -1
- package/build/legacy/queryOptions-CwqQgQmQ.d.cts.map +0 -1
- package/build/legacy/types-JpJB72CS.d.cts.map +0 -1
- package/build/legacy/types-JpJB72CS.d.ts.map +0 -1
- package/build/modern/infiniteQueryOptions-CnTRbIP5.d.cts.map +0 -1
- package/build/modern/infiniteQueryOptions-NucMX_M_.d.ts.map +0 -1
- package/build/modern/queryClient-B6mLtXOj.d.ts.map +0 -1
- package/build/modern/queryClient-Bn2Ql_Lu.d.cts.map +0 -1
- package/build/modern/queryOptions-CsM5TXD2.d.ts.map +0 -1
- package/build/modern/queryOptions-CwqQgQmQ.d.cts.map +0 -1
- package/build/modern/types-JpJB72CS.d.cts.map +0 -1
- package/build/modern/types-JpJB72CS.d.ts.map +0 -1
package/build/legacy/{infiniteQueryOptions-CnTRbIP5.d.cts → infiniteQueryOptions-ClNe2-FB.d.cts}
RENAMED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { a as MaybeRef, d as ShallowOption, o as MaybeRefDeep, s as MaybeRefOrGetter, t as DeepUnwrapRef } from "./types-
|
|
2
|
-
import { o as UseQueryOptions } from "./queryOptions-
|
|
3
|
-
import { t as QueryClient$1 } from "./queryClient-
|
|
1
|
+
import { a as MaybeRef, d as ShallowOption, o as MaybeRefDeep, s as MaybeRefOrGetter, t as DeepUnwrapRef } from "./types-sdZdiLgo.cjs";
|
|
2
|
+
import { o as UseQueryOptions } from "./queryOptions-BvmZtmiU.cjs";
|
|
3
|
+
import { t as QueryClient$1 } from "./queryClient-BK9W57Qu.cjs";
|
|
4
4
|
import { DefaultError, InfiniteData, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, NonUndefinedGuard, QueryKey, QueryKeyWithDataTag, QueryObserver, QueryObserverResult } from "@tanstack/query-core";
|
|
5
5
|
import { Ref } from "vue-demi";
|
|
6
6
|
//#region src/useBaseQuery.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* The result of the query composables: every property of the observer result wrapped in a `Ref`, except
|
|
9
|
+
* the `refetch`, `fetchNextPage`, and `fetchPreviousPage` functions, plus `suspense`.
|
|
10
|
+
*/
|
|
7
11
|
type UseBaseQueryReturnType<TData, TError, TResult = QueryObserverResult<TData, TError>> = { [K in keyof TResult]: K extends 'fetchNextPage' | 'fetchPreviousPage' | 'refetch' ? TResult[K] : Ref<Readonly<TResult>[K]>; } & {
|
|
8
12
|
/**
|
|
9
13
|
* Returns a promise for use with Vue's `Suspense` or `onServerPrefetch`. It fetches the query if it has no
|
|
@@ -18,16 +22,25 @@ type UseBaseQueryReturnType<TData, TError, TResult = QueryObserverResult<TData,
|
|
|
18
22
|
type UseQueryOptionsGeneric<TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = UseQueryOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey> | UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>;
|
|
19
23
|
/**
|
|
20
24
|
* Base implementation shared by `useQuery` and `useInfiniteQuery`.
|
|
21
|
-
*
|
|
22
25
|
* @param Observer - The observer class from query-core (`QueryObserver` or `InfiniteQueryObserver`).
|
|
23
26
|
* @param options - A `ref`, plain value, or reactive getter resolving to the query options.
|
|
24
27
|
* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin`
|
|
25
28
|
* will be used.
|
|
29
|
+
* @returns The query result as `ref`s, plus the `suspense` function.
|
|
26
30
|
*/
|
|
27
31
|
declare function useBaseQuery<TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey, TPageParam>(Observer: typeof QueryObserver, options: MaybeRefOrGetter<UseQueryOptionsGeneric<TQueryFnData, TError, TData, TQueryData, TQueryKey, TPageParam>>, queryClient?: QueryClient$1): UseBaseQueryReturnType<TData, TError>;
|
|
28
32
|
//#endregion
|
|
29
33
|
//#region src/useInfiniteQuery.d.ts
|
|
34
|
+
/**
|
|
35
|
+
* The options accepted by `useInfiniteQuery`. Same as {@link InfiniteQueryObserverOptions} from
|
|
36
|
+
* `@tanstack/query-core`, plus the `shallow` option. Each option except `shallow` can also be a `ref` (and
|
|
37
|
+
* `enabled` a reactive getter).
|
|
38
|
+
*/
|
|
30
39
|
type UseInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = MaybeRef<{ [Property in keyof InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>]: Property extends 'enabled' ? MaybeRefOrGetter<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, DeepUnwrapRef<TQueryKey>, TPageParam>[Property]> : MaybeRefDeep<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, DeepUnwrapRef<TQueryKey>, TPageParam>[Property]>; } & ShallowOption>;
|
|
40
|
+
/**
|
|
41
|
+
* The result of `useInfiniteQuery`: {@link InfiniteQueryObserverResult} from `@tanstack/query-core`, with
|
|
42
|
+
* its properties wrapped in `Ref`s as in {@link UseBaseQueryReturnType}.
|
|
43
|
+
*/
|
|
31
44
|
type UseInfiniteQueryReturnType<TData, TError> = UseBaseQueryReturnType<TData, TError, InfiniteQueryObserverResult<TData, TError>>;
|
|
32
45
|
/**
|
|
33
46
|
* The options for `useInfiniteQuery` are identical to `useQuery`, with the addition of
|
|
@@ -39,10 +52,6 @@ type UseInfiniteQueryReturnType<TData, TError> = UseBaseQueryReturnType<TData, T
|
|
|
39
52
|
* `enabled` tracks reactive dependencies automatically as a `ref`, a plain value, or a reactive getter
|
|
40
53
|
* (`() => ...`). `queryKey` reacts through a `ref` for the array itself, or `ref`s and reactive getters as
|
|
41
54
|
* individual entries — the array itself can't be a bare getter.
|
|
42
|
-
*
|
|
43
|
-
* @remarks Keep in mind that imperative fetch calls, such as `fetchNextPage`, may interfere with the default
|
|
44
|
-
* refetch behavior, resulting in outdated data. Make sure to call these functions only in response to user
|
|
45
|
-
* actions, or add conditions like `hasNextPage && !isFetching`.
|
|
46
55
|
* @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to
|
|
47
56
|
* `useInfiniteQuery`, with `initialData` set.
|
|
48
57
|
* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin`
|
|
@@ -51,7 +60,9 @@ type UseInfiniteQueryReturnType<TData, TError> = UseBaseQueryReturnType<TData, T
|
|
|
51
60
|
* `hasNextPage`, `hasPreviousPage`, `isFetchingNextPage`, and `isFetchingPreviousPage`. `data.value.pages` and
|
|
52
61
|
* `data.value.pageParams` are also added, as long as a `select` doesn't change `TData` away from its default
|
|
53
62
|
* `InfiniteData<TQueryFnData>` shape.
|
|
54
|
-
*
|
|
63
|
+
* @remarks Keep in mind that imperative fetch calls, such as `fetchNextPage`, may interfere with the default
|
|
64
|
+
* refetch behavior, resulting in outdated data. Make sure to call these functions only in response to user
|
|
65
|
+
* actions, or add conditions like `hasNextPage && !isFetching`.
|
|
55
66
|
* @example
|
|
56
67
|
* ```vue
|
|
57
68
|
* <script setup lang="ts">
|
|
@@ -86,10 +97,6 @@ declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = I
|
|
|
86
97
|
* `enabled` tracks reactive dependencies automatically as a `ref`, a plain value, or a reactive getter
|
|
87
98
|
* (`() => ...`). `queryKey` reacts through a `ref` for the array itself, or `ref`s and reactive getters as
|
|
88
99
|
* individual entries — the array itself can't be a bare getter.
|
|
89
|
-
*
|
|
90
|
-
* @remarks Keep in mind that imperative fetch calls, such as `fetchNextPage`, may interfere with the default
|
|
91
|
-
* refetch behavior, resulting in outdated data. Make sure to call these functions only in response to user
|
|
92
|
-
* actions, or add conditions like `hasNextPage && !isFetching`.
|
|
93
100
|
* @param options - The {@link UndefinedInitialDataInfiniteOptions} to use — everything you can pass to
|
|
94
101
|
* `useInfiniteQuery`.
|
|
95
102
|
* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin`
|
|
@@ -98,7 +105,9 @@ declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = I
|
|
|
98
105
|
* `hasNextPage`, `hasPreviousPage`, `isFetchingNextPage`, and `isFetchingPreviousPage`. `data.value.pages` and
|
|
99
106
|
* `data.value.pageParams` are also added, as long as a `select` doesn't change `TData` away from its default
|
|
100
107
|
* `InfiniteData<TQueryFnData>` shape.
|
|
101
|
-
*
|
|
108
|
+
* @remarks Keep in mind that imperative fetch calls, such as `fetchNextPage`, may interfere with the default
|
|
109
|
+
* refetch behavior, resulting in outdated data. Make sure to call these functions only in response to user
|
|
110
|
+
* actions, or add conditions like `hasNextPage && !isFetching`.
|
|
102
111
|
* @example
|
|
103
112
|
* Fetching the next page from a "Load More" button click:
|
|
104
113
|
* ```vue
|
|
@@ -137,7 +146,6 @@ declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = I
|
|
|
137
146
|
* </template>
|
|
138
147
|
* </template>
|
|
139
148
|
* ```
|
|
140
|
-
*
|
|
141
149
|
* @example
|
|
142
150
|
* Fetching the next page automatically as the user scrolls, using an `IntersectionObserver` on a
|
|
143
151
|
* sentinel element after the list:
|
|
@@ -203,14 +211,12 @@ declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = I
|
|
|
203
211
|
* `enabled` tracks reactive dependencies automatically as a `ref`, a plain value, or a reactive getter
|
|
204
212
|
* (`() => ...`). `queryKey` reacts through a `ref` for the array itself, or `ref`s and reactive getters as
|
|
205
213
|
* individual entries — the array itself can't be a bare getter.
|
|
206
|
-
*
|
|
207
214
|
* @param options - A `ref`, plain value, or reactive getter resolving to the {@link UseInfiniteQueryOptions} to
|
|
208
215
|
* use.
|
|
209
216
|
* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin`
|
|
210
217
|
* will be used.
|
|
211
218
|
* @returns The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchPreviousPage`,
|
|
212
219
|
* `hasNextPage`, `hasPreviousPage`, `isFetchingNextPage`, and `isFetchingPreviousPage`.
|
|
213
|
-
*
|
|
214
220
|
* @example
|
|
215
221
|
* Passing a whole-options getter so `maxPages` reacts to a setting stored elsewhere, not just `queryKey`:
|
|
216
222
|
* ```vue
|
|
@@ -234,7 +240,6 @@ declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = I
|
|
|
234
240
|
* </template>
|
|
235
241
|
* </template>
|
|
236
242
|
* ```
|
|
237
|
-
*
|
|
238
243
|
* @example
|
|
239
244
|
* A query that's disabled, type-safe, until `postId` is set — pass `skipToken` as `queryFn` instead of
|
|
240
245
|
* setting `enabled: false`. This requires a whole-options getter: `queryFn` isn't itself reactive, so the
|
|
@@ -278,7 +283,6 @@ declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = I
|
|
|
278
283
|
/**
|
|
279
284
|
* The options accepted by the `infiniteQueryOptions` overload selected when no `initialData` is set — `data`
|
|
280
285
|
* may be `undefined` while the query is `pending`.
|
|
281
|
-
*
|
|
282
286
|
* @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
|
|
283
287
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
284
288
|
* @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
|
|
@@ -292,7 +296,6 @@ type UndefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TD
|
|
|
292
296
|
/**
|
|
293
297
|
* The options accepted by the `infiniteQueryOptions` overload selected when `initialData` is set — `data` is
|
|
294
298
|
* never `undefined` (unless a `select` changes `TData` to include `undefined`).
|
|
295
|
-
*
|
|
296
299
|
* @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
|
|
297
300
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
298
301
|
* @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
|
|
@@ -314,12 +317,10 @@ type DefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TDat
|
|
|
314
317
|
* You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.
|
|
315
318
|
* These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.
|
|
316
319
|
* `options.queryKey` is required and is the query key to generate options for.
|
|
317
|
-
*
|
|
318
|
-
* @see {@link useInfiniteQuery} to run an infinite query with these options.
|
|
319
320
|
* @param options - The {@link UndefinedInitialDataInfiniteOptions} to use — everything you can pass to
|
|
320
321
|
* `useInfiniteQuery`.
|
|
321
322
|
* @returns The same options object, typed so that `queryKey` carries the inferred data type.
|
|
322
|
-
*
|
|
323
|
+
* @see {@link useInfiniteQuery} to run an infinite query with these options.
|
|
323
324
|
* @example
|
|
324
325
|
* ```vue
|
|
325
326
|
* <script setup lang="ts">
|
|
@@ -344,12 +345,10 @@ declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData
|
|
|
344
345
|
*
|
|
345
346
|
* This overload is selected when `initialData` is set, so the resulting `data` is never `undefined` (unless
|
|
346
347
|
* a `select` changes `TData` to include `undefined`).
|
|
347
|
-
*
|
|
348
|
-
* @see {@link useInfiniteQuery} to run an infinite query with these options.
|
|
349
348
|
* @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to
|
|
350
349
|
* `useInfiniteQuery`, with `initialData` set.
|
|
351
350
|
* @returns The same options object, typed so that `queryKey` carries the inferred data type.
|
|
352
|
-
*
|
|
351
|
+
* @see {@link useInfiniteQuery} to run an infinite query with these options.
|
|
353
352
|
* @example
|
|
354
353
|
* ```vue
|
|
355
354
|
* <script setup lang="ts">
|
|
@@ -372,4 +371,4 @@ declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData
|
|
|
372
371
|
declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
|
|
373
372
|
//#endregion
|
|
374
373
|
export { UseInfiniteQueryReturnType as a, useBaseQuery as c, UseInfiniteQueryOptions as i, UndefinedInitialDataInfiniteOptions as n, useInfiniteQuery as o, infiniteQueryOptions as r, UseBaseQueryReturnType as s, DefinedInitialDataInfiniteOptions as t };
|
|
375
|
-
//# sourceMappingURL=infiniteQueryOptions-
|
|
374
|
+
//# sourceMappingURL=infiniteQueryOptions-ClNe2-FB.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infiniteQueryOptions-ClNe2-FB.d.cts","names":["QueryClient","QueryClient"],"sources":["../../src/useBaseQuery.ts","../../src/useInfiniteQuery.ts","../../src/infiniteQueryOptions.ts"],"mappings":";;;;;;;;;;KA8BY,uBACV,OACA,QACA,UAAU,oBAAoB,OAAO,cAEpC,WAAW,UAAU,8DAIlB,QAAQ,KACR,IAAI,SAAS,SAAS;;;;;;;;;EAU1B,gBAAgB,QAAQ;;KAGrB,uBACH,cACA,QACA,OACA,YACA,kBAAkB,WAAW,UAC7B,wBAEE,gBAAgB,cAAc,QAAQ,OAAO,YAAY,aACzD,wBAAwB,cAAc,QAAQ,OAAO,WAAW;;;;;;;;;iBAUpD,aACd,cACA,QACA,OACA,YACA,kBAAkB,UAClB,YAEA,iBAAiB,eACjB,SAAS,iBACP,uBACE,cACA,QACA,OACA,YACA,WACA,cAGJ,cAAcA,gBACb,uBAAuB,OAAO;;;;;;;;KC7DrB,wBACV,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,wBACE,YAGE,kBAAkB,6BAChB,cACA,QACA,OACA,WACA,cAED,6BACC,iBACE,6BACE,cACA,QACA,OACA,cAAc,YACd,YACA,aAEJ,aACE,6BACE,cACA,QACA,OACA,cAAc,YACd,YACA,gBAEN;;;;;KAOM,2BAA2B,OAAO,UAAU,uBACtD,OACA,QACA,4BAA4B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkDrB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,iBACP,kCACE,cACA,QACA,OACA,WACA,cAGJ,cAAcC,gBACb,2BAA2B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkHrB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,iBACP,oCACE,cACA,QACA,OACA,WACA,cAGJ,cAAcA,gBACb,2BAA2B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4ErB,iBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,iBACP,wBAAwB,cAAc,QAAQ,OAAO,WAAW,cAElE,cAAcA,gBACb,2BAA2B,OAAO;;;;;;;;;;;;;KCtVzB,oCACV,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,wBACE,wBACF,cACA,QACA,OACA,WACA;EAEA;;;;;;;;;;;;KAaU,kCACV,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,wBACE,wBACF,cACA,QACA,OACA,WACA;;;;;;;;EASA,aACI,kBAAkB,aAAa,cAAc,sBACtC,kBAAkB,aAAa,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2B1C,qBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,oCACP,cACA,QACA,OACA,WACA,cAED,oCACD,cACA,QACA,OACA,WACA,cAEA,oBAAoB,WAAW,aAAa,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgC7C,qBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,kCACP,cACA,QACA,OACA,WACA,cAED,kCACD,cACA,QACA,OACA,WACA,cAEA,oBAAoB,WAAW,aAAa,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infiniteQueryOptions.cjs","names":[],"sources":["../../src/infiniteQueryOptions.ts"],"sourcesContent":["import type {\n DefaultError,\n InfiniteData,\n NonUndefinedGuard,\n QueryKey,\n QueryKeyWithDataTag,\n} from '@tanstack/query-core'\nimport type { UseInfiniteQueryOptions } from './useInfiniteQuery'\n\n/**\n * The options accepted by the `infiniteQueryOptions` overload selected when no `initialData` is set — `data`\n * may be `undefined` while the query is `pending`.\n
|
|
1
|
+
{"version":3,"file":"infiniteQueryOptions.cjs","names":[],"sources":["../../src/infiniteQueryOptions.ts"],"sourcesContent":["import type {\n DefaultError,\n InfiniteData,\n NonUndefinedGuard,\n QueryKey,\n QueryKeyWithDataTag,\n} from '@tanstack/query-core'\nimport type { UseInfiniteQueryOptions } from './useInfiniteQuery'\n\n/**\n * The options accepted by the `infiniteQueryOptions` overload selected when no `initialData` is set — `data`\n * may be `undefined` while the query is `pending`.\n * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.\n * @template TError - The type of errors your `queryFn` may throw.\n * @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,\n * the shape of all fetched pages plus their page params.\n * @template TQueryKey - The type of your `queryKey`.\n * @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.\n */\nexport type UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n initialData?: undefined\n}\n\n/**\n * The options accepted by the `infiniteQueryOptions` overload selected when `initialData` is set — `data` is\n * never `undefined` (unless a `select` changes `TData` to include `undefined`).\n * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.\n * @template TError - The type of errors your `queryFn` may throw.\n * @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,\n * the shape of all fetched pages plus their page params.\n * @template TQueryKey - The type of your `queryKey`.\n * @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.\n */\nexport type DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n /**\n * If set, this value will be used as the initial data for the query cache (as long as the query hasn't been\n * created or cached yet). If set to a function, the function will be called **once** during the shared/root\n * query initialization, and be expected to synchronously return the initial data. Initial data is\n * considered stale by default unless a `staleTime` has been set. `initialData` **is persisted** to the\n * cache.\n */\n initialData:\n | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>)\n}\n\n/**\n * You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.\n * These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.\n * `options.queryKey` is required and is the query key to generate options for.\n * @param options - The {@link UndefinedInitialDataInfiniteOptions} to use — everything you can pass to\n * `useInfiniteQuery`.\n * @returns The same options object, typed so that `queryKey` carries the inferred data type.\n * @see {@link useInfiniteQuery} to run an infinite query with these options.\n * @example\n * ```vue\n * <script setup lang=\"ts\">\n * import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/vue-query'\n *\n * const projectsOptions = infiniteQueryOptions({\n * queryKey: ['projects'],\n * queryFn: ({ pageParam }) => fetchProjects(pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * })\n *\n * const { data, isError, error, fetchNextPage } = useInfiniteQuery(projectsOptions)\n * </script>\n * ```\n */\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> &\n QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n\n/**\n * You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.\n * These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.\n * `options.queryKey` is required and is the query key to generate options for.\n *\n * This overload is selected when `initialData` is set, so the resulting `data` is never `undefined` (unless\n * a `select` changes `TData` to include `undefined`).\n * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to\n * `useInfiniteQuery`, with `initialData` set.\n * @returns The same options object, typed so that `queryKey` carries the inferred data type.\n * @see {@link useInfiniteQuery} to run an infinite query with these options.\n * @example\n * ```vue\n * <script setup lang=\"ts\">\n * import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/vue-query'\n *\n * const projectsOptions = infiniteQueryOptions({\n * queryKey: ['projects'],\n * queryFn: ({ pageParam }) => fetchProjects(pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * initialData: { pages: [], pageParams: [] },\n * })\n *\n * // `data` is never `undefined`, thanks to `initialData` — even if a refetch fails, so the\n * // list stays visible alongside the error.\n * const { data, isError, error } = useInfiniteQuery(projectsOptions)\n * </script>\n * ```\n */\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> &\n QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n\nexport function infiniteQueryOptions(options: unknown) {\n return options\n}\n"],"mappings":";;AA0KA,SAAgB,qBAAqB,SAAkB;CACrD,OAAO;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as UndefinedInitialDataInfiniteOptions, r as infiniteQueryOptions, t as DefinedInitialDataInfiniteOptions } from "./infiniteQueryOptions-
|
|
1
|
+
import { n as UndefinedInitialDataInfiniteOptions, r as infiniteQueryOptions, t as DefinedInitialDataInfiniteOptions } from "./infiniteQueryOptions-ClNe2-FB.cjs";
|
|
2
2
|
export { DefinedInitialDataInfiniteOptions, UndefinedInitialDataInfiniteOptions, infiniteQueryOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as UndefinedInitialDataInfiniteOptions, r as infiniteQueryOptions, t as DefinedInitialDataInfiniteOptions } from "./infiniteQueryOptions-
|
|
1
|
+
import { n as UndefinedInitialDataInfiniteOptions, r as infiniteQueryOptions, t as DefinedInitialDataInfiniteOptions } from "./infiniteQueryOptions-BaoKhSzb.js";
|
|
2
2
|
export { DefinedInitialDataInfiniteOptions, UndefinedInitialDataInfiniteOptions, infiniteQueryOptions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infiniteQueryOptions.js","names":[],"sources":["../../src/infiniteQueryOptions.ts"],"sourcesContent":["import type {\n DefaultError,\n InfiniteData,\n NonUndefinedGuard,\n QueryKey,\n QueryKeyWithDataTag,\n} from '@tanstack/query-core'\nimport type { UseInfiniteQueryOptions } from './useInfiniteQuery'\n\n/**\n * The options accepted by the `infiniteQueryOptions` overload selected when no `initialData` is set — `data`\n * may be `undefined` while the query is `pending`.\n
|
|
1
|
+
{"version":3,"file":"infiniteQueryOptions.js","names":[],"sources":["../../src/infiniteQueryOptions.ts"],"sourcesContent":["import type {\n DefaultError,\n InfiniteData,\n NonUndefinedGuard,\n QueryKey,\n QueryKeyWithDataTag,\n} from '@tanstack/query-core'\nimport type { UseInfiniteQueryOptions } from './useInfiniteQuery'\n\n/**\n * The options accepted by the `infiniteQueryOptions` overload selected when no `initialData` is set — `data`\n * may be `undefined` while the query is `pending`.\n * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.\n * @template TError - The type of errors your `queryFn` may throw.\n * @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,\n * the shape of all fetched pages plus their page params.\n * @template TQueryKey - The type of your `queryKey`.\n * @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.\n */\nexport type UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n initialData?: undefined\n}\n\n/**\n * The options accepted by the `infiniteQueryOptions` overload selected when `initialData` is set — `data` is\n * never `undefined` (unless a `select` changes `TData` to include `undefined`).\n * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.\n * @template TError - The type of errors your `queryFn` may throw.\n * @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,\n * the shape of all fetched pages plus their page params.\n * @template TQueryKey - The type of your `queryKey`.\n * @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.\n */\nexport type DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n /**\n * If set, this value will be used as the initial data for the query cache (as long as the query hasn't been\n * created or cached yet). If set to a function, the function will be called **once** during the shared/root\n * query initialization, and be expected to synchronously return the initial data. Initial data is\n * considered stale by default unless a `staleTime` has been set. `initialData` **is persisted** to the\n * cache.\n */\n initialData:\n | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>)\n}\n\n/**\n * You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.\n * These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.\n * `options.queryKey` is required and is the query key to generate options for.\n * @param options - The {@link UndefinedInitialDataInfiniteOptions} to use — everything you can pass to\n * `useInfiniteQuery`.\n * @returns The same options object, typed so that `queryKey` carries the inferred data type.\n * @see {@link useInfiniteQuery} to run an infinite query with these options.\n * @example\n * ```vue\n * <script setup lang=\"ts\">\n * import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/vue-query'\n *\n * const projectsOptions = infiniteQueryOptions({\n * queryKey: ['projects'],\n * queryFn: ({ pageParam }) => fetchProjects(pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * })\n *\n * const { data, isError, error, fetchNextPage } = useInfiniteQuery(projectsOptions)\n * </script>\n * ```\n */\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> &\n QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n\n/**\n * You can generally pass everything to `infiniteQueryOptions` that you can also pass to `useInfiniteQuery`.\n * These options can be shared across hooks and imperative APIs such as `queryClient.infiniteQuery`.\n * `options.queryKey` is required and is the query key to generate options for.\n *\n * This overload is selected when `initialData` is set, so the resulting `data` is never `undefined` (unless\n * a `select` changes `TData` to include `undefined`).\n * @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to\n * `useInfiniteQuery`, with `initialData` set.\n * @returns The same options object, typed so that `queryKey` carries the inferred data type.\n * @see {@link useInfiniteQuery} to run an infinite query with these options.\n * @example\n * ```vue\n * <script setup lang=\"ts\">\n * import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/vue-query'\n *\n * const projectsOptions = infiniteQueryOptions({\n * queryKey: ['projects'],\n * queryFn: ({ pageParam }) => fetchProjects(pageParam),\n * initialPageParam: 0,\n * getNextPageParam: (lastPage) => lastPage.nextId,\n * initialData: { pages: [], pageParams: [] },\n * })\n *\n * // `data` is never `undefined`, thanks to `initialData` — even if a refetch fails, so the\n * // list stays visible alongside the error.\n * const { data, isError, error } = useInfiniteQuery(projectsOptions)\n * </script>\n * ```\n */\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> &\n QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n\nexport function infiniteQueryOptions(options: unknown) {\n return options\n}\n"],"mappings":";AA0KA,SAAgB,qBAAqB,SAAkB;CACrD,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutationCache.cjs","names":["MC","cloneDeepUnref"],"sources":["../../src/mutationCache.ts"],"sourcesContent":["import { MutationCache as MC } from '@tanstack/query-core'\nimport { cloneDeepUnref } from './utils'\nimport type {\n DefaultError,\n Mutation,\n MutationFilters,\n} from '@tanstack/query-core'\nimport type { MaybeRefDeep } from './types'\n\n/**\n * Vue-aware subclass of `@tanstack/query-core`'s `MutationCache`. `find`/`findAll` also accept a\n * {@link MaybeRefDeep} filters object, so `ref`s can be passed directly without unwrapping. Access it via\n * `queryClient.getMutationCache()` — `QueryClient` constructs one of these by default.\n */\nexport class MutationCache extends MC {\n find<\n TData = unknown,\n TError = DefaultError,\n TVariables = any,\n TOnMutateResult = unknown,\n >(\n filters: MaybeRefDeep<MutationFilters>,\n ): Mutation<TData, TError, TVariables, TOnMutateResult> | undefined {\n return super.find(cloneDeepUnref(filters))\n }\n\n findAll(filters: MaybeRefDeep<MutationFilters> = {}): Array<Mutation> {\n return super.findAll(cloneDeepUnref(filters))\n }\n}\n"],"mappings":";;;;;;;;;AAcA,IAAa,gBAAb,cAAmCA,qBAAAA,cAAG;CACpC,KAME,SACkE;EAClE,OAAO,MAAM,KAAKC,cAAAA,eAAe,OAAO,CAAC;CAC3C;CAEA,
|
|
1
|
+
{"version":3,"file":"mutationCache.cjs","names":["MC","cloneDeepUnref"],"sources":["../../src/mutationCache.ts"],"sourcesContent":["import { MutationCache as MC } from '@tanstack/query-core'\nimport { cloneDeepUnref } from './utils'\nimport type {\n DefaultError,\n Mutation,\n MutationFilters,\n} from '@tanstack/query-core'\nimport type { MaybeRefDeep } from './types'\n\n/**\n * Vue-aware subclass of `@tanstack/query-core`'s `MutationCache`. `find`/`findAll` also accept a\n * {@link MaybeRefDeep} filters object, so `ref`s can be passed directly without unwrapping. Access it via\n * `queryClient.getMutationCache()` — `QueryClient` constructs one of these by default.\n */\nexport class MutationCache extends MC {\n override find<\n TData = unknown,\n TError = DefaultError,\n TVariables = any,\n TOnMutateResult = unknown,\n >(\n filters: MaybeRefDeep<MutationFilters>,\n ): Mutation<TData, TError, TVariables, TOnMutateResult> | undefined {\n return super.find(cloneDeepUnref(filters))\n }\n\n override findAll(\n filters: MaybeRefDeep<MutationFilters> = {},\n ): Array<Mutation> {\n return super.findAll(cloneDeepUnref(filters))\n }\n}\n"],"mappings":";;;;;;;;;AAcA,IAAa,gBAAb,cAAmCA,qBAAAA,cAAG;CACpC,KAME,SACkE;EAClE,OAAO,MAAM,KAAKC,cAAAA,eAAe,OAAO,CAAC;CAC3C;CAEA,QACE,UAAyC,CAAC,GACzB;EACjB,OAAO,MAAM,QAAQA,cAAAA,eAAe,OAAO,CAAC;CAC9C;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as MaybeRefDeep } from "./types-
|
|
1
|
+
import { o as MaybeRefDeep } from "./types-sdZdiLgo.cjs";
|
|
2
2
|
import { DefaultError, Mutation, MutationCache as MutationCache$1, MutationFilters } from "@tanstack/query-core";
|
|
3
3
|
//#region src/mutationCache.d.ts
|
|
4
4
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutationCache.d.cts","names":["MC"],"sources":["../../src/mutationCache.ts"],"mappings":";;;;;;;;qBAca,sBAAsBA;
|
|
1
|
+
{"version":3,"file":"mutationCache.d.cts","names":["MC"],"sources":["../../src/mutationCache.ts"],"mappings":";;;;;;;;qBAca,sBAAsBA;EACxB,KACP,iBACA,SAAS,cACT,kBACA,2BAEA,SAAS,aAAa,mBACrB,SAAS,OAAO,QAAQ,YAAY;EAI9B,QACP,UAAS,aAAa,mBACrB,MAAM"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as MaybeRefDeep } from "./types-
|
|
1
|
+
import { o as MaybeRefDeep } from "./types-sdZdiLgo.js";
|
|
2
2
|
import { DefaultError, Mutation, MutationCache as MutationCache$1, MutationFilters } from "@tanstack/query-core";
|
|
3
3
|
//#region src/mutationCache.d.ts
|
|
4
4
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutationCache.d.ts","names":["MC"],"sources":["../../src/mutationCache.ts"],"mappings":";;;;;;;;qBAca,sBAAsBA;
|
|
1
|
+
{"version":3,"file":"mutationCache.d.ts","names":["MC"],"sources":["../../src/mutationCache.ts"],"mappings":";;;;;;;;qBAca,sBAAsBA;EACxB,KACP,iBACA,SAAS,cACT,kBACA,2BAEA,SAAS,aAAa,mBACrB,SAAS,OAAO,QAAQ,YAAY;EAI9B,QACP,UAAS,aAAa,mBACrB,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutationCache.js","names":["MC"],"sources":["../../src/mutationCache.ts"],"sourcesContent":["import { MutationCache as MC } from '@tanstack/query-core'\nimport { cloneDeepUnref } from './utils'\nimport type {\n DefaultError,\n Mutation,\n MutationFilters,\n} from '@tanstack/query-core'\nimport type { MaybeRefDeep } from './types'\n\n/**\n * Vue-aware subclass of `@tanstack/query-core`'s `MutationCache`. `find`/`findAll` also accept a\n * {@link MaybeRefDeep} filters object, so `ref`s can be passed directly without unwrapping. Access it via\n * `queryClient.getMutationCache()` — `QueryClient` constructs one of these by default.\n */\nexport class MutationCache extends MC {\n find<\n TData = unknown,\n TError = DefaultError,\n TVariables = any,\n TOnMutateResult = unknown,\n >(\n filters: MaybeRefDeep<MutationFilters>,\n ): Mutation<TData, TError, TVariables, TOnMutateResult> | undefined {\n return super.find(cloneDeepUnref(filters))\n }\n\n findAll(filters: MaybeRefDeep<MutationFilters> = {}): Array<Mutation> {\n return super.findAll(cloneDeepUnref(filters))\n }\n}\n"],"mappings":";;;;;;;;AAcA,IAAa,gBAAb,cAAmCA,gBAAG;CACpC,KAME,SACkE;EAClE,OAAO,MAAM,KAAK,eAAe,OAAO,CAAC;CAC3C;CAEA,
|
|
1
|
+
{"version":3,"file":"mutationCache.js","names":["MC"],"sources":["../../src/mutationCache.ts"],"sourcesContent":["import { MutationCache as MC } from '@tanstack/query-core'\nimport { cloneDeepUnref } from './utils'\nimport type {\n DefaultError,\n Mutation,\n MutationFilters,\n} from '@tanstack/query-core'\nimport type { MaybeRefDeep } from './types'\n\n/**\n * Vue-aware subclass of `@tanstack/query-core`'s `MutationCache`. `find`/`findAll` also accept a\n * {@link MaybeRefDeep} filters object, so `ref`s can be passed directly without unwrapping. Access it via\n * `queryClient.getMutationCache()` — `QueryClient` constructs one of these by default.\n */\nexport class MutationCache extends MC {\n override find<\n TData = unknown,\n TError = DefaultError,\n TVariables = any,\n TOnMutateResult = unknown,\n >(\n filters: MaybeRefDeep<MutationFilters>,\n ): Mutation<TData, TError, TVariables, TOnMutateResult> | undefined {\n return super.find(cloneDeepUnref(filters))\n }\n\n override findAll(\n filters: MaybeRefDeep<MutationFilters> = {},\n ): Array<Mutation> {\n return super.findAll(cloneDeepUnref(filters))\n }\n}\n"],"mappings":";;;;;;;;AAcA,IAAa,gBAAb,cAAmCA,gBAAG;CACpC,KAME,SACkE;EAClE,OAAO,MAAM,KAAK,eAAe,OAAO,CAAC;CAC3C;CAEA,QACE,UAAyC,CAAC,GACzB;EACjB,OAAO,MAAM,QAAQ,eAAe,OAAO,CAAC;CAC9C;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutationOptions.cjs","names":[],"sources":["../../src/mutationOptions.ts"],"sourcesContent":["import type { DefaultError, WithRequired } from '@tanstack/query-core'\nimport type { MutationOptions } from './types'\n\n/**\n * You can generally pass everything to `mutationOptions` that you can also pass to `useMutation`. A\n * `mutationKey` is required on this overload so the mutation can be looked up later, e.g. with\n * `useMutationState`.\n *\n * Unlike a `queryKey` property on a query's options (e.g. `queryOptions({ queryKey: [...] })`), `mutationKey`\n * entries that are reactive getters (`() => id.value`) are never unwrapped — the getter function itself is\n * stored as the entry, rather than its current value. `ref` entries are still unwrapped normally.\n
|
|
1
|
+
{"version":3,"file":"mutationOptions.cjs","names":[],"sources":["../../src/mutationOptions.ts"],"sourcesContent":["import type { DefaultError, WithRequired } from '@tanstack/query-core'\nimport type { MutationOptions } from './types'\n\n/**\n * You can generally pass everything to `mutationOptions` that you can also pass to `useMutation`. A\n * `mutationKey` is required on this overload so the mutation can be looked up later, e.g. with\n * `useMutationState`.\n *\n * Unlike a `queryKey` property on a query's options (e.g. `queryOptions({ queryKey: [...] })`), `mutationKey`\n * entries that are reactive getters (`() => id.value`) are never unwrapped — the getter function itself is\n * stored as the entry, rather than its current value. `ref` entries are still unwrapped normally.\n * @param options - The mutation options to use, identical to what you'd pass to `useMutation`, with a\n * required `mutationKey`.\n * @returns The same options object, unchanged.\n * @see {@link useMutation} to run the mutation these options describe.\n * @example\n * Looking the mutation up elsewhere via its `mutationKey`, e.g. for a global \"saving…\" indicator:\n * ```vue\n * <script setup lang=\"ts\">\n * import { mutationOptions, useMutationState } from '@tanstack/vue-query'\n * import { computed } from 'vue'\n *\n * const createPostOptions = mutationOptions({\n * mutationKey: ['posts', 'create'],\n * mutationFn: createPost,\n * })\n *\n * // Call `useMutationState` once — it manages its own subscription — then derive from its result.\n * const creatingPosts = useMutationState({\n * filters: { mutationKey: createPostOptions.mutationKey, status: 'pending' },\n * })\n * const isCreatingPost = computed(() => creatingPosts.value.length > 0)\n * </script>\n * ```\n */\nexport function mutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(\n options: WithRequired<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n >,\n): WithRequired<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n>\n\n/**\n * Same as the plain-object overload with a required `mutationKey`, but for options that close over reactive\n * state (`ref`s read inside the function body). Wrap them in a getter so `useMutation` and the other consumers\n * always read the current values instead of the ones captured when the options were created.\n * @param options - A function returning the mutation options to use, with a required `mutationKey`,\n * re-evaluated on demand.\n * @returns A function that returns the same options object, unchanged.\n * @see {@link useMutation} to run the mutation these options describe.\n * @example\n * ```vue\n * <script setup lang=\"ts\">\n * import { mutationOptions, useMutation } from '@tanstack/vue-query'\n *\n * const props = defineProps<{ userId: number }>()\n *\n * const createPostOptions = mutationOptions(() => ({\n * mutationKey: ['posts', 'create'],\n * // Reacts to changes on `props.userId`, unlike the plain-object overload.\n * mutationFn: (title: string) => createPost({ title, userId: props.userId }),\n * }))\n *\n * const mutation = useMutation(createPostOptions)\n * </script>\n *\n * <template>\n * <button @click=\"mutation.mutate('Hello')\">Create</button>\n * </template>\n * ```\n */\nexport function mutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(\n options: () => WithRequired<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n >,\n): () => WithRequired<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n>\n\n/**\n * You can generally pass everything to `mutationOptions` that you can also pass to `useMutation`. No\n * `mutationKey` is required on this overload — use this when you don't need to target the mutation via a\n * `mutationKey` filter later (e.g. with `useMutationState`); it can still be observed through other filters,\n * such as `status`.\n * @param options - The mutation options to use, identical to what you'd pass to `useMutation`, without a\n * `mutationKey`.\n * @returns The same options object, unchanged.\n * @remarks See the other overload's example for looking a mutation up via `useMutationState`.\n * @see {@link useMutation} to run the mutation these options describe.\n * @example\n * ```vue\n * <script setup lang=\"ts\">\n * import { mutationOptions, useMutation } from '@tanstack/vue-query'\n *\n * const createPostOptions = mutationOptions({\n * mutationFn: createPost,\n * })\n *\n * const mutation = useMutation(createPostOptions)\n * </script>\n *\n * <template>\n * <button @click=\"mutation.mutate({ title: 'Hello' })\">Create</button>\n * </template>\n * ```\n */\nexport function mutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(\n options: Omit<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n >,\n): Omit<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n>\n\n/**\n * Same as the plain-object overload without a `mutationKey`, but for options that close over reactive state\n * (`ref`s read inside the function body). Wrap them in a getter so `useMutation` and the other consumers\n * always read the current values instead of the ones captured when the options were created.\n * @param options - A function returning the mutation options to use, without a `mutationKey`, re-evaluated on\n * demand.\n * @returns A function that returns the same options object, unchanged.\n * @see {@link useMutation} to run the mutation these options describe.\n * @example\n * ```vue\n * <script setup lang=\"ts\">\n * import { mutationOptions, useMutation } from '@tanstack/vue-query'\n *\n * const props = defineProps<{ userId: number }>()\n *\n * const createPostOptions = mutationOptions(() => ({\n * // Reacts to changes on `props.userId`, unlike the plain-object overload.\n * mutationFn: (title: string) => createPost({ title, userId: props.userId }),\n * }))\n *\n * const mutation = useMutation(createPostOptions)\n * </script>\n *\n * <template>\n * <button @click=\"mutation.mutate('Hello')\">Create</button>\n * </template>\n * ```\n */\nexport function mutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(\n options: () => Omit<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n >,\n): () => Omit<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n>\nexport function mutationOptions(options: unknown) {\n return options\n}\n"],"mappings":";;AAkLA,SAAgB,gBAAgB,SAAkB;CAChD,OAAO;AACT"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as MutationOptions } from "./types-
|
|
1
|
+
import { c as MutationOptions } from "./types-sdZdiLgo.cjs";
|
|
2
2
|
import { DefaultError, WithRequired } from "@tanstack/query-core";
|
|
3
3
|
//#region src/mutationOptions.d.ts
|
|
4
4
|
/**
|
|
@@ -9,12 +9,10 @@ import { DefaultError, WithRequired } from "@tanstack/query-core";
|
|
|
9
9
|
* Unlike a `queryKey` property on a query's options (e.g. `queryOptions({ queryKey: [...] })`), `mutationKey`
|
|
10
10
|
* entries that are reactive getters (`() => id.value`) are never unwrapped — the getter function itself is
|
|
11
11
|
* stored as the entry, rather than its current value. `ref` entries are still unwrapped normally.
|
|
12
|
-
*
|
|
13
|
-
* @see {@link useMutation} to run the mutation these options describe.
|
|
14
12
|
* @param options - The mutation options to use, identical to what you'd pass to `useMutation`, with a
|
|
15
13
|
* required `mutationKey`.
|
|
16
14
|
* @returns The same options object, unchanged.
|
|
17
|
-
*
|
|
15
|
+
* @see {@link useMutation} to run the mutation these options describe.
|
|
18
16
|
* @example
|
|
19
17
|
* Looking the mutation up elsewhere via its `mutationKey`, e.g. for a global "saving…" indicator:
|
|
20
18
|
* ```vue
|
|
@@ -40,12 +38,10 @@ export declare function mutationOptions<TData = unknown, TError = DefaultError,
|
|
|
40
38
|
* Same as the plain-object overload with a required `mutationKey`, but for options that close over reactive
|
|
41
39
|
* state (`ref`s read inside the function body). Wrap them in a getter so `useMutation` and the other consumers
|
|
42
40
|
* always read the current values instead of the ones captured when the options were created.
|
|
43
|
-
*
|
|
44
|
-
* @see {@link useMutation} to run the mutation these options describe.
|
|
45
41
|
* @param options - A function returning the mutation options to use, with a required `mutationKey`,
|
|
46
42
|
* re-evaluated on demand.
|
|
47
43
|
* @returns A function that returns the same options object, unchanged.
|
|
48
|
-
*
|
|
44
|
+
* @see {@link useMutation} to run the mutation these options describe.
|
|
49
45
|
* @example
|
|
50
46
|
* ```vue
|
|
51
47
|
* <script setup lang="ts">
|
|
@@ -73,13 +69,11 @@ export declare function mutationOptions<TData = unknown, TError = DefaultError,
|
|
|
73
69
|
* `mutationKey` is required on this overload — use this when you don't need to target the mutation via a
|
|
74
70
|
* `mutationKey` filter later (e.g. with `useMutationState`); it can still be observed through other filters,
|
|
75
71
|
* such as `status`.
|
|
76
|
-
*
|
|
77
|
-
* @see {@link useMutation} to run the mutation these options describe.
|
|
78
72
|
* @param options - The mutation options to use, identical to what you'd pass to `useMutation`, without a
|
|
79
73
|
* `mutationKey`.
|
|
80
74
|
* @returns The same options object, unchanged.
|
|
81
75
|
* @remarks See the other overload's example for looking a mutation up via `useMutationState`.
|
|
82
|
-
*
|
|
76
|
+
* @see {@link useMutation} to run the mutation these options describe.
|
|
83
77
|
* @example
|
|
84
78
|
* ```vue
|
|
85
79
|
* <script setup lang="ts">
|
|
@@ -102,12 +96,10 @@ export declare function mutationOptions<TData = unknown, TError = DefaultError,
|
|
|
102
96
|
* Same as the plain-object overload without a `mutationKey`, but for options that close over reactive state
|
|
103
97
|
* (`ref`s read inside the function body). Wrap them in a getter so `useMutation` and the other consumers
|
|
104
98
|
* always read the current values instead of the ones captured when the options were created.
|
|
105
|
-
*
|
|
106
|
-
* @see {@link useMutation} to run the mutation these options describe.
|
|
107
99
|
* @param options - A function returning the mutation options to use, without a `mutationKey`, re-evaluated on
|
|
108
100
|
* demand.
|
|
109
101
|
* @returns A function that returns the same options object, unchanged.
|
|
110
|
-
*
|
|
102
|
+
* @see {@link useMutation} to run the mutation these options describe.
|
|
111
103
|
* @example
|
|
112
104
|
* ```vue
|
|
113
105
|
* <script setup lang="ts">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutationOptions.d.cts","names":[],"sources":["../../src/mutationOptions.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"mutationOptions.d.cts","names":[],"sources":["../../src/mutationOptions.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAmCgB,gBACd,iBACA,SAAS,cACT,mBACA,2BAEA,SAAS,aACP,gBAAgB,OAAO,QAAQ,YAAY,mCAG5C,aACD,gBAAgB,OAAO,QAAQ,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAiC7B,gBACd,iBACA,SAAS,cACT,mBACA,2BAEA,eAAe,aACb,gBAAgB,OAAO,QAAQ,YAAY,yCAGtC,aACP,gBAAgB,OAAO,QAAQ,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+B7B,gBACd,iBACA,SAAS,cACT,mBACA,2BAEA,SAAS,KACP,gBAAgB,OAAO,QAAQ,YAAY,mCAG5C,KACD,gBAAgB,OAAO,QAAQ,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgC7B,gBACd,iBACA,SAAS,cACT,mBACA,2BAEA,eAAe,KACb,gBAAgB,OAAO,QAAQ,YAAY,yCAGtC,KACP,gBAAgB,OAAO,QAAQ,YAAY"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as MutationOptions } from "./types-
|
|
1
|
+
import { c as MutationOptions } from "./types-sdZdiLgo.js";
|
|
2
2
|
import { DefaultError, WithRequired } from "@tanstack/query-core";
|
|
3
3
|
//#region src/mutationOptions.d.ts
|
|
4
4
|
/**
|
|
@@ -9,12 +9,10 @@ import { DefaultError, WithRequired } from "@tanstack/query-core";
|
|
|
9
9
|
* Unlike a `queryKey` property on a query's options (e.g. `queryOptions({ queryKey: [...] })`), `mutationKey`
|
|
10
10
|
* entries that are reactive getters (`() => id.value`) are never unwrapped — the getter function itself is
|
|
11
11
|
* stored as the entry, rather than its current value. `ref` entries are still unwrapped normally.
|
|
12
|
-
*
|
|
13
|
-
* @see {@link useMutation} to run the mutation these options describe.
|
|
14
12
|
* @param options - The mutation options to use, identical to what you'd pass to `useMutation`, with a
|
|
15
13
|
* required `mutationKey`.
|
|
16
14
|
* @returns The same options object, unchanged.
|
|
17
|
-
*
|
|
15
|
+
* @see {@link useMutation} to run the mutation these options describe.
|
|
18
16
|
* @example
|
|
19
17
|
* Looking the mutation up elsewhere via its `mutationKey`, e.g. for a global "saving…" indicator:
|
|
20
18
|
* ```vue
|
|
@@ -40,12 +38,10 @@ export declare function mutationOptions<TData = unknown, TError = DefaultError,
|
|
|
40
38
|
* Same as the plain-object overload with a required `mutationKey`, but for options that close over reactive
|
|
41
39
|
* state (`ref`s read inside the function body). Wrap them in a getter so `useMutation` and the other consumers
|
|
42
40
|
* always read the current values instead of the ones captured when the options were created.
|
|
43
|
-
*
|
|
44
|
-
* @see {@link useMutation} to run the mutation these options describe.
|
|
45
41
|
* @param options - A function returning the mutation options to use, with a required `mutationKey`,
|
|
46
42
|
* re-evaluated on demand.
|
|
47
43
|
* @returns A function that returns the same options object, unchanged.
|
|
48
|
-
*
|
|
44
|
+
* @see {@link useMutation} to run the mutation these options describe.
|
|
49
45
|
* @example
|
|
50
46
|
* ```vue
|
|
51
47
|
* <script setup lang="ts">
|
|
@@ -73,13 +69,11 @@ export declare function mutationOptions<TData = unknown, TError = DefaultError,
|
|
|
73
69
|
* `mutationKey` is required on this overload — use this when you don't need to target the mutation via a
|
|
74
70
|
* `mutationKey` filter later (e.g. with `useMutationState`); it can still be observed through other filters,
|
|
75
71
|
* such as `status`.
|
|
76
|
-
*
|
|
77
|
-
* @see {@link useMutation} to run the mutation these options describe.
|
|
78
72
|
* @param options - The mutation options to use, identical to what you'd pass to `useMutation`, without a
|
|
79
73
|
* `mutationKey`.
|
|
80
74
|
* @returns The same options object, unchanged.
|
|
81
75
|
* @remarks See the other overload's example for looking a mutation up via `useMutationState`.
|
|
82
|
-
*
|
|
76
|
+
* @see {@link useMutation} to run the mutation these options describe.
|
|
83
77
|
* @example
|
|
84
78
|
* ```vue
|
|
85
79
|
* <script setup lang="ts">
|
|
@@ -102,12 +96,10 @@ export declare function mutationOptions<TData = unknown, TError = DefaultError,
|
|
|
102
96
|
* Same as the plain-object overload without a `mutationKey`, but for options that close over reactive state
|
|
103
97
|
* (`ref`s read inside the function body). Wrap them in a getter so `useMutation` and the other consumers
|
|
104
98
|
* always read the current values instead of the ones captured when the options were created.
|
|
105
|
-
*
|
|
106
|
-
* @see {@link useMutation} to run the mutation these options describe.
|
|
107
99
|
* @param options - A function returning the mutation options to use, without a `mutationKey`, re-evaluated on
|
|
108
100
|
* demand.
|
|
109
101
|
* @returns A function that returns the same options object, unchanged.
|
|
110
|
-
*
|
|
102
|
+
* @see {@link useMutation} to run the mutation these options describe.
|
|
111
103
|
* @example
|
|
112
104
|
* ```vue
|
|
113
105
|
* <script setup lang="ts">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutationOptions.d.ts","names":[],"sources":["../../src/mutationOptions.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"mutationOptions.d.ts","names":[],"sources":["../../src/mutationOptions.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAmCgB,gBACd,iBACA,SAAS,cACT,mBACA,2BAEA,SAAS,aACP,gBAAgB,OAAO,QAAQ,YAAY,mCAG5C,aACD,gBAAgB,OAAO,QAAQ,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAiC7B,gBACd,iBACA,SAAS,cACT,mBACA,2BAEA,eAAe,aACb,gBAAgB,OAAO,QAAQ,YAAY,yCAGtC,aACP,gBAAgB,OAAO,QAAQ,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+B7B,gBACd,iBACA,SAAS,cACT,mBACA,2BAEA,SAAS,KACP,gBAAgB,OAAO,QAAQ,YAAY,mCAG5C,KACD,gBAAgB,OAAO,QAAQ,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgC7B,gBACd,iBACA,SAAS,cACT,mBACA,2BAEA,eAAe,KACb,gBAAgB,OAAO,QAAQ,YAAY,yCAGtC,KACP,gBAAgB,OAAO,QAAQ,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutationOptions.js","names":[],"sources":["../../src/mutationOptions.ts"],"sourcesContent":["import type { DefaultError, WithRequired } from '@tanstack/query-core'\nimport type { MutationOptions } from './types'\n\n/**\n * You can generally pass everything to `mutationOptions` that you can also pass to `useMutation`. A\n * `mutationKey` is required on this overload so the mutation can be looked up later, e.g. with\n * `useMutationState`.\n *\n * Unlike a `queryKey` property on a query's options (e.g. `queryOptions({ queryKey: [...] })`), `mutationKey`\n * entries that are reactive getters (`() => id.value`) are never unwrapped — the getter function itself is\n * stored as the entry, rather than its current value. `ref` entries are still unwrapped normally.\n
|
|
1
|
+
{"version":3,"file":"mutationOptions.js","names":[],"sources":["../../src/mutationOptions.ts"],"sourcesContent":["import type { DefaultError, WithRequired } from '@tanstack/query-core'\nimport type { MutationOptions } from './types'\n\n/**\n * You can generally pass everything to `mutationOptions` that you can also pass to `useMutation`. A\n * `mutationKey` is required on this overload so the mutation can be looked up later, e.g. with\n * `useMutationState`.\n *\n * Unlike a `queryKey` property on a query's options (e.g. `queryOptions({ queryKey: [...] })`), `mutationKey`\n * entries that are reactive getters (`() => id.value`) are never unwrapped — the getter function itself is\n * stored as the entry, rather than its current value. `ref` entries are still unwrapped normally.\n * @param options - The mutation options to use, identical to what you'd pass to `useMutation`, with a\n * required `mutationKey`.\n * @returns The same options object, unchanged.\n * @see {@link useMutation} to run the mutation these options describe.\n * @example\n * Looking the mutation up elsewhere via its `mutationKey`, e.g. for a global \"saving…\" indicator:\n * ```vue\n * <script setup lang=\"ts\">\n * import { mutationOptions, useMutationState } from '@tanstack/vue-query'\n * import { computed } from 'vue'\n *\n * const createPostOptions = mutationOptions({\n * mutationKey: ['posts', 'create'],\n * mutationFn: createPost,\n * })\n *\n * // Call `useMutationState` once — it manages its own subscription — then derive from its result.\n * const creatingPosts = useMutationState({\n * filters: { mutationKey: createPostOptions.mutationKey, status: 'pending' },\n * })\n * const isCreatingPost = computed(() => creatingPosts.value.length > 0)\n * </script>\n * ```\n */\nexport function mutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(\n options: WithRequired<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n >,\n): WithRequired<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n>\n\n/**\n * Same as the plain-object overload with a required `mutationKey`, but for options that close over reactive\n * state (`ref`s read inside the function body). Wrap them in a getter so `useMutation` and the other consumers\n * always read the current values instead of the ones captured when the options were created.\n * @param options - A function returning the mutation options to use, with a required `mutationKey`,\n * re-evaluated on demand.\n * @returns A function that returns the same options object, unchanged.\n * @see {@link useMutation} to run the mutation these options describe.\n * @example\n * ```vue\n * <script setup lang=\"ts\">\n * import { mutationOptions, useMutation } from '@tanstack/vue-query'\n *\n * const props = defineProps<{ userId: number }>()\n *\n * const createPostOptions = mutationOptions(() => ({\n * mutationKey: ['posts', 'create'],\n * // Reacts to changes on `props.userId`, unlike the plain-object overload.\n * mutationFn: (title: string) => createPost({ title, userId: props.userId }),\n * }))\n *\n * const mutation = useMutation(createPostOptions)\n * </script>\n *\n * <template>\n * <button @click=\"mutation.mutate('Hello')\">Create</button>\n * </template>\n * ```\n */\nexport function mutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(\n options: () => WithRequired<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n >,\n): () => WithRequired<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n>\n\n/**\n * You can generally pass everything to `mutationOptions` that you can also pass to `useMutation`. No\n * `mutationKey` is required on this overload — use this when you don't need to target the mutation via a\n * `mutationKey` filter later (e.g. with `useMutationState`); it can still be observed through other filters,\n * such as `status`.\n * @param options - The mutation options to use, identical to what you'd pass to `useMutation`, without a\n * `mutationKey`.\n * @returns The same options object, unchanged.\n * @remarks See the other overload's example for looking a mutation up via `useMutationState`.\n * @see {@link useMutation} to run the mutation these options describe.\n * @example\n * ```vue\n * <script setup lang=\"ts\">\n * import { mutationOptions, useMutation } from '@tanstack/vue-query'\n *\n * const createPostOptions = mutationOptions({\n * mutationFn: createPost,\n * })\n *\n * const mutation = useMutation(createPostOptions)\n * </script>\n *\n * <template>\n * <button @click=\"mutation.mutate({ title: 'Hello' })\">Create</button>\n * </template>\n * ```\n */\nexport function mutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(\n options: Omit<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n >,\n): Omit<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n>\n\n/**\n * Same as the plain-object overload without a `mutationKey`, but for options that close over reactive state\n * (`ref`s read inside the function body). Wrap them in a getter so `useMutation` and the other consumers\n * always read the current values instead of the ones captured when the options were created.\n * @param options - A function returning the mutation options to use, without a `mutationKey`, re-evaluated on\n * demand.\n * @returns A function that returns the same options object, unchanged.\n * @see {@link useMutation} to run the mutation these options describe.\n * @example\n * ```vue\n * <script setup lang=\"ts\">\n * import { mutationOptions, useMutation } from '@tanstack/vue-query'\n *\n * const props = defineProps<{ userId: number }>()\n *\n * const createPostOptions = mutationOptions(() => ({\n * // Reacts to changes on `props.userId`, unlike the plain-object overload.\n * mutationFn: (title: string) => createPost({ title, userId: props.userId }),\n * }))\n *\n * const mutation = useMutation(createPostOptions)\n * </script>\n *\n * <template>\n * <button @click=\"mutation.mutate('Hello')\">Create</button>\n * </template>\n * ```\n */\nexport function mutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(\n options: () => Omit<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n >,\n): () => Omit<\n MutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n>\nexport function mutationOptions(options: unknown) {\n return options\n}\n"],"mappings":";AAkLA,SAAgB,gBAAgB,SAAkB;CAChD,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryCache.cjs","names":["QC","cloneDeepUnref"],"sources":["../../src/queryCache.ts"],"sourcesContent":["import { QueryCache as QC } from '@tanstack/query-core'\nimport { cloneDeepUnref } from './utils'\nimport type {\n DefaultError,\n Query,\n QueryFilters,\n WithRequired,\n} from '@tanstack/query-core'\nimport type { MaybeRefDeep } from './types'\n\n/**\n * Vue-aware subclass of `@tanstack/query-core`'s `QueryCache`. `find`/`findAll` also accept a\n * {@link MaybeRefDeep} filters object, so `ref`s can be passed directly without unwrapping. Access it via\n * `queryClient.getQueryCache()` — `QueryClient` constructs one of these by default.\n */\nexport class QueryCache extends QC {\n find
|
|
1
|
+
{"version":3,"file":"queryCache.cjs","names":["QC","cloneDeepUnref"],"sources":["../../src/queryCache.ts"],"sourcesContent":["import { QueryCache as QC } from '@tanstack/query-core'\nimport { cloneDeepUnref } from './utils'\nimport type {\n DefaultError,\n Query,\n QueryFilters,\n WithRequired,\n} from '@tanstack/query-core'\nimport type { MaybeRefDeep } from './types'\n\n/**\n * Vue-aware subclass of `@tanstack/query-core`'s `QueryCache`. `find`/`findAll` also accept a\n * {@link MaybeRefDeep} filters object, so `ref`s can be passed directly without unwrapping. Access it via\n * `queryClient.getQueryCache()` — `QueryClient` constructs one of these by default.\n */\nexport class QueryCache extends QC {\n override find<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n >(\n filters: MaybeRefDeep<WithRequired<QueryFilters, 'queryKey'>>,\n ): Query<TQueryFnData, TError, TData> | undefined {\n return super.find(cloneDeepUnref(filters))\n }\n\n override findAll(filters: MaybeRefDeep<QueryFilters> = {}): Array<Query> {\n return super.findAll(cloneDeepUnref(filters))\n }\n}\n"],"mappings":";;;;;;;;;AAeA,IAAa,aAAb,cAAgCA,qBAAAA,WAAG;CACjC,KAKE,SACgD;EAChD,OAAO,MAAM,KAAKC,cAAAA,eAAe,OAAO,CAAC;CAC3C;CAEA,QAAiB,UAAsC,CAAC,GAAiB;EACvE,OAAO,MAAM,QAAQA,cAAAA,eAAe,OAAO,CAAC;CAC9C;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as MaybeRefDeep } from "./types-
|
|
1
|
+
import { o as MaybeRefDeep } from "./types-sdZdiLgo.cjs";
|
|
2
2
|
import { DefaultError, Query, QueryCache as QueryCache$1, QueryFilters, WithRequired } from "@tanstack/query-core";
|
|
3
3
|
//#region src/queryCache.d.ts
|
|
4
4
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryCache.d.cts","names":["QC"],"sources":["../../src/queryCache.ts"],"mappings":";;;;;;;;qBAea,mBAAmBA;
|
|
1
|
+
{"version":3,"file":"queryCache.d.cts","names":["QC"],"sources":["../../src/queryCache.ts"],"mappings":";;;;;;;;qBAea,mBAAmBA;EACrB,KACP,wBACA,SAAS,cACT,QAAQ,cAER,SAAS,aAAa,aAAa,6BAClC,MAAM,cAAc,QAAQ;EAItB,QAAQ,UAAS,aAAa,gBAAqB,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryCache.d.ts","names":["QC"],"sources":["../../src/queryCache.ts"],"mappings":";;;;;;;;qBAea,mBAAmBA;
|
|
1
|
+
{"version":3,"file":"queryCache.d.ts","names":["QC"],"sources":["../../src/queryCache.ts"],"mappings":";;;;;;;;qBAea,mBAAmBA;EACrB,KACP,wBACA,SAAS,cACT,QAAQ,cAER,SAAS,aAAa,aAAa,6BAClC,MAAM,cAAc,QAAQ;EAItB,QAAQ,UAAS,aAAa,gBAAqB,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryCache.js","names":["QC"],"sources":["../../src/queryCache.ts"],"sourcesContent":["import { QueryCache as QC } from '@tanstack/query-core'\nimport { cloneDeepUnref } from './utils'\nimport type {\n DefaultError,\n Query,\n QueryFilters,\n WithRequired,\n} from '@tanstack/query-core'\nimport type { MaybeRefDeep } from './types'\n\n/**\n * Vue-aware subclass of `@tanstack/query-core`'s `QueryCache`. `find`/`findAll` also accept a\n * {@link MaybeRefDeep} filters object, so `ref`s can be passed directly without unwrapping. Access it via\n * `queryClient.getQueryCache()` — `QueryClient` constructs one of these by default.\n */\nexport class QueryCache extends QC {\n find
|
|
1
|
+
{"version":3,"file":"queryCache.js","names":["QC"],"sources":["../../src/queryCache.ts"],"sourcesContent":["import { QueryCache as QC } from '@tanstack/query-core'\nimport { cloneDeepUnref } from './utils'\nimport type {\n DefaultError,\n Query,\n QueryFilters,\n WithRequired,\n} from '@tanstack/query-core'\nimport type { MaybeRefDeep } from './types'\n\n/**\n * Vue-aware subclass of `@tanstack/query-core`'s `QueryCache`. `find`/`findAll` also accept a\n * {@link MaybeRefDeep} filters object, so `ref`s can be passed directly without unwrapping. Access it via\n * `queryClient.getQueryCache()` — `QueryClient` constructs one of these by default.\n */\nexport class QueryCache extends QC {\n override find<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n >(\n filters: MaybeRefDeep<WithRequired<QueryFilters, 'queryKey'>>,\n ): Query<TQueryFnData, TError, TData> | undefined {\n return super.find(cloneDeepUnref(filters))\n }\n\n override findAll(filters: MaybeRefDeep<QueryFilters> = {}): Array<Query> {\n return super.findAll(cloneDeepUnref(filters))\n }\n}\n"],"mappings":";;;;;;;;AAeA,IAAa,aAAb,cAAgCA,aAAG;CACjC,KAKE,SACgD;EAChD,OAAO,MAAM,KAAK,eAAe,OAAO,CAAC;CAC3C;CAEA,QAAiB,UAAsC,CAAC,GAAiB;EACvE,OAAO,MAAM,QAAQ,eAAe,OAAO,CAAC;CAC9C;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as NoUnknown, o as MaybeRefDeep, u as QueryClientConfig } from "./types-
|
|
2
|
-
import { o as UseQueryOptions } from "./queryOptions-
|
|
1
|
+
import { l as NoUnknown, o as MaybeRefDeep, u as QueryClientConfig } from "./types-sdZdiLgo.cjs";
|
|
2
|
+
import { o as UseQueryOptions } from "./queryOptions-BvmZtmiU.cjs";
|
|
3
3
|
import { CancelOptions, DefaultError, DefaultOptions, EnsureQueryDataOptions, FetchInfiniteQueryOptions, FetchQueryOptions, InferDataFromTag, InfiniteData, InfiniteQueryExecuteOptions, InvalidateOptions, InvalidateQueryFilters, MutationFilters, MutationKey, MutationObserverOptions, OmitKeyof, QueryClient, QueryExecuteOptions, QueryFilters, QueryKey, QueryObserverOptions, QueryState, RefetchOptions, RefetchQueryFilters, ResetOptions, SetDataOptions, Updater } from "@tanstack/query-core";
|
|
4
4
|
import { Ref } from "vue-demi";
|
|
5
5
|
//#region src/queryClient.d.ts
|
|
@@ -75,4 +75,4 @@ declare class QueryClient$1 extends QueryClient {
|
|
|
75
75
|
}
|
|
76
76
|
//#endregion
|
|
77
77
|
export { QueryClient$1 as t };
|
|
78
|
-
//# sourceMappingURL=queryClient-
|
|
78
|
+
//# sourceMappingURL=queryClient-BK9W57Qu.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryClient-BK9W57Qu.d.cts","names":["QueryClient","QC"],"sources":["../../src/queryClient.ts"],"mappings":";;;;;;;;;;;;;;;;;;;cAkDaA,sBAAoBC;EACnB,YAAA,SAAQ;;;;;EAapB,cAAc;EAEL,WAAW,UAAS,aAAa;EAIjC,WAAW,UAAS,aAAa;EAIjC,aACP,iBACA,wBAAwB,WAAW,UAEnC,UAAU,kBACT,iBAAiB,OAAO;EAClB,aAAa,iBACpB,UAAU,aAAa,YACtB;;;;EAUM,gBACP,cACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAE7B,SAAS,uBAAuB,cAAc,QAAQ,OAAO,aAC5D,QAAQ;EACF,gBACP,cACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAE7B,SAAS,aACP,uBAAuB,cAAc,QAAQ,OAAO,cAErD,QAAQ;EAeF,eAAe,iBACtB,SAAS,aAAa,gBACrB,OAAO,UAAU;EAIX,aACP,wBACA,wBAAwB,WAAW,UACnC,uBAAuB,iBAAiB,cAAc,kBAEtD,UAAU,iBACV,SAAS,QACP,QAAQ,mCACR,QAAQ,oCAEV,UAAU,aAAa,kBACtB,QAAQ;EACF,aAAa,cAAc,QAAQ,UAAU,eACpD,UAAU,aAAa,WACvB,SAAS,QAAQ,QAAQ,oBAAoB,QAAQ,qBACrD,UAAU,aAAa,kBACtB,QAAQ;EAaF,eAAe,OACtB,SAAS,aAAa,eACtB,SAAS,QAAQ,mBAAmB,oBACpC,UAAS,aAAa,kBACrB,OAAO,UAAU;EAQX,cAAc,iBAAiB,SAAS,cAC/C,UAAU,aAAa,YACtB,WAAW,OAAO;EAIZ,cAAc,wBAAwB,WAAW,UACxD,UAAU,aAAa;EAMhB,aAAa,wBAAwB,WAAW,UACvD,UAAU,aAAa,kBACvB,UAAU,aAAa,gBACtB;EAQM,cAAc,wBAAwB,WAAW,UACxD,UAAU,aAAa,kBACvB,UAAU,aAAa,iBACtB;EAQM,kBAAkB,wBAAwB,WAAW,UAC5D,UACI,uBAAuB,0BAChB,uBAAuB,mBAClC,UAAU,aAAa,qBACtB;EAmCM,eAAe,wBAAwB,WAAW,UACzD,UAAU,oBAAoB,kBAC9B,UAAU,aAAa,kBACtB;EAaM,MACP,cACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,UAC7B,oBAEA,SAAS,oBACP,cACA,QACA,OACA,YACA,WACA,cAED,QAAQ;EACF,MACP,cACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,UAC7B,oBAEA,SAAS,aACP,oBACE,cACA,QACA,OACA,YACA,WACA,eAGH,QAAQ;;;;EA0BF,WACP,cACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,oBAEA,SAAS,kBACP,cACA,QACA,OACA,WACA,cAED,QAAQ;EACF,WACP,cACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,oBAEA,SACI,aACE,kBAAkB,cAAc,QAAQ,OAAO,WAAW,sBAErD,kBACL,cACA,QACA,OACA,WACA,eAEL,QAAQ;;;;EAmBF,cACP,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAE7B,SAAS,kBAAkB,cAAc,QAAQ,OAAO,aACvD;EACM,cACP,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAE7B,SAAS,aACP,kBAAkB,cAAc,QAAQ,OAAO,cAEhD;EAiBM,cACP,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,4BACP,cACA,QACA,OACA,WACA,cAED,QACD,MAAM,eAAe,MAAM,aAAa,iBACpC,aAAa,cAAc,cAC3B;EAEG,cACP,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,aACP,4BACE,cACA,QACA,OACA,WACA,eAGH,QACD,MAAM,eAAe,MAAM,aAAa,iBACpC,aAAa,cAAc,cAC3B;;;;EA6BG,mBACP,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,0BACP,cACA,QACA,OACA,WACA,cAED,QAAQ,aAAa,OAAO;EACtB,mBACP,cACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,aACP,0BACE,cACA,QACA,OACA,WACA,eAGH,QAAQ,aAAa,OAAO;;;;EAyBtB,sBACP,cACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,0BACP,cACA,QACA,OACA,WACA,cAED;EACM,sBACP,cACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,aACP,0BACE,cACA,QACA,OACA,WACA,eAGH;EAsBM,kBAAkB,SAAS,aAAa;EAIxC,iBACP,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cAEb,UAAU,aAAa,WACvB,SAAS,aACP,KAAK,gBAAgB,cAAc,QAAQ,OAAO;EAM7C,iBACP,UAAU,aAAa,YACtB,UAAU;EAIJ,oBACP,iBACA,SAAS,cACT,mBACA,2BAEA,aAAa,aAAa,cAC1B,SAAS,aACP,wBAAwB,OAAO,QAAQ,YAAY;EAS9C,oBACP,aAAa,aAAa,eACzB"}
|