@tanstack/preact-query 5.104.1 → 5.104.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/build/legacy/HydrationBoundary.cjs +2 -3
- package/build/legacy/HydrationBoundary.cjs.map +1 -1
- package/build/legacy/HydrationBoundary.d.cts +3 -4
- package/build/legacy/HydrationBoundary.d.cts.map +1 -1
- package/build/legacy/HydrationBoundary.d.ts +2 -3
- package/build/legacy/HydrationBoundary.d.ts.map +1 -1
- package/build/legacy/HydrationBoundary.js +2 -3
- package/build/legacy/HydrationBoundary.js.map +1 -1
- package/build/legacy/IsRestoringProvider.cjs +0 -1
- package/build/legacy/IsRestoringProvider.cjs.map +1 -1
- package/build/legacy/IsRestoringProvider.d.cts +0 -1
- package/build/legacy/IsRestoringProvider.d.cts.map +1 -1
- package/build/legacy/IsRestoringProvider.d.ts +0 -1
- package/build/legacy/IsRestoringProvider.d.ts.map +1 -1
- package/build/legacy/IsRestoringProvider.js +0 -1
- package/build/legacy/IsRestoringProvider.js.map +1 -1
- package/build/legacy/QueryClientProvider.cjs +3 -4
- package/build/legacy/QueryClientProvider.cjs.map +1 -1
- package/build/legacy/QueryClientProvider.d.cts +4 -5
- package/build/legacy/QueryClientProvider.d.cts.map +1 -1
- package/build/legacy/QueryClientProvider.d.ts +3 -4
- package/build/legacy/QueryClientProvider.d.ts.map +1 -1
- package/build/legacy/QueryClientProvider.js +3 -4
- package/build/legacy/QueryClientProvider.js.map +1 -1
- package/build/legacy/QueryErrorResetBoundary.cjs +6 -4
- package/build/legacy/QueryErrorResetBoundary.cjs.map +1 -1
- package/build/legacy/QueryErrorResetBoundary.d.cts +5 -5
- package/build/legacy/QueryErrorResetBoundary.d.cts.map +1 -1
- package/build/legacy/QueryErrorResetBoundary.d.ts +5 -5
- package/build/legacy/QueryErrorResetBoundary.d.ts.map +1 -1
- package/build/legacy/QueryErrorResetBoundary.js +6 -4
- package/build/legacy/QueryErrorResetBoundary.js.map +1 -1
- package/build/legacy/errorBoundaryUtils.cjs +21 -0
- package/build/legacy/errorBoundaryUtils.cjs.map +1 -1
- package/build/legacy/errorBoundaryUtils.d.cts +21 -0
- package/build/legacy/errorBoundaryUtils.d.cts.map +1 -1
- package/build/legacy/errorBoundaryUtils.d.ts +21 -0
- package/build/legacy/errorBoundaryUtils.d.ts.map +1 -1
- package/build/legacy/errorBoundaryUtils.js +21 -0
- package/build/legacy/errorBoundaryUtils.js.map +1 -1
- package/build/legacy/infiniteQueryOptions.cjs.map +1 -1
- package/build/legacy/infiniteQueryOptions.d.cts +5 -16
- package/build/legacy/infiniteQueryOptions.d.cts.map +1 -1
- package/build/legacy/infiniteQueryOptions.d.ts +5 -16
- package/build/legacy/infiniteQueryOptions.d.ts.map +1 -1
- package/build/legacy/infiniteQueryOptions.js.map +1 -1
- package/build/legacy/mutationOptions.cjs.map +1 -1
- package/build/legacy/mutationOptions.d.cts +2 -6
- package/build/legacy/mutationOptions.d.cts.map +1 -1
- package/build/legacy/mutationOptions.d.ts +2 -6
- package/build/legacy/mutationOptions.d.ts.map +1 -1
- package/build/legacy/mutationOptions.js.map +1 -1
- package/build/legacy/queryOptions.cjs.map +1 -1
- package/build/legacy/queryOptions.d.cts +6 -16
- package/build/legacy/queryOptions.d.cts.map +1 -1
- package/build/legacy/queryOptions.d.ts +6 -16
- package/build/legacy/queryOptions.d.ts.map +1 -1
- package/build/legacy/queryOptions.js.map +1 -1
- package/build/legacy/suspense.cjs +27 -0
- package/build/legacy/suspense.cjs.map +1 -1
- package/build/legacy/suspense.d.cts +27 -0
- package/build/legacy/suspense.d.cts.map +1 -1
- package/build/legacy/suspense.d.ts +27 -0
- package/build/legacy/suspense.d.ts.map +1 -1
- package/build/legacy/suspense.js +27 -0
- package/build/legacy/suspense.js.map +1 -1
- package/build/legacy/types.cjs.map +1 -1
- package/build/legacy/types.d.cts +2 -22
- package/build/legacy/types.d.cts.map +1 -1
- package/build/legacy/types.d.ts +2 -22
- package/build/legacy/types.d.ts.map +1 -1
- package/build/legacy/types.js.map +1 -1
- package/build/legacy/useBaseQuery.cjs +13 -0
- package/build/legacy/useBaseQuery.cjs.map +1 -1
- package/build/legacy/useBaseQuery.d.cts +13 -0
- package/build/legacy/useBaseQuery.d.cts.map +1 -1
- package/build/legacy/useBaseQuery.d.ts +13 -0
- package/build/legacy/useBaseQuery.d.ts.map +1 -1
- package/build/legacy/useBaseQuery.js +13 -0
- package/build/legacy/useBaseQuery.js.map +1 -1
- package/build/legacy/useInfiniteQuery.cjs.map +1 -1
- package/build/legacy/useInfiniteQuery.d.cts +12 -21
- package/build/legacy/useInfiniteQuery.d.cts.map +1 -1
- package/build/legacy/useInfiniteQuery.d.ts +12 -21
- package/build/legacy/useInfiniteQuery.d.ts.map +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 +0 -3
- package/build/legacy/useIsFetching.d.cts.map +1 -1
- package/build/legacy/useIsFetching.d.ts +0 -3
- 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 +4 -8
- package/build/legacy/useMutation.cjs.map +1 -1
- package/build/legacy/useMutation.d.cts +4 -8
- package/build/legacy/useMutation.d.cts.map +1 -1
- package/build/legacy/useMutation.d.ts +4 -8
- package/build/legacy/useMutation.d.ts.map +1 -1
- package/build/legacy/useMutation.js +4 -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 +0 -6
- package/build/legacy/useMutationState.d.cts.map +1 -1
- package/build/legacy/useMutationState.d.ts +0 -6
- 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 +0 -3
- package/build/legacy/usePrefetchInfiniteQuery.cjs.map +1 -1
- package/build/legacy/usePrefetchInfiniteQuery.d.cts +0 -3
- package/build/legacy/usePrefetchInfiniteQuery.d.cts.map +1 -1
- package/build/legacy/usePrefetchInfiniteQuery.d.ts +0 -3
- package/build/legacy/usePrefetchInfiniteQuery.d.ts.map +1 -1
- package/build/legacy/usePrefetchInfiniteQuery.js +0 -3
- package/build/legacy/usePrefetchInfiniteQuery.js.map +1 -1
- package/build/legacy/usePrefetchQuery.cjs +0 -3
- package/build/legacy/usePrefetchQuery.cjs.map +1 -1
- package/build/legacy/usePrefetchQuery.d.cts +0 -3
- package/build/legacy/usePrefetchQuery.d.cts.map +1 -1
- package/build/legacy/usePrefetchQuery.d.ts +0 -3
- package/build/legacy/usePrefetchQuery.d.ts.map +1 -1
- package/build/legacy/usePrefetchQuery.js +0 -3
- package/build/legacy/usePrefetchQuery.js.map +1 -1
- package/build/legacy/useQueries.cjs +3 -3
- package/build/legacy/useQueries.cjs.map +1 -1
- package/build/legacy/useQueries.d.cts +3 -6
- package/build/legacy/useQueries.d.cts.map +1 -1
- package/build/legacy/useQueries.d.ts +3 -6
- package/build/legacy/useQueries.d.ts.map +1 -1
- package/build/legacy/useQueries.js +3 -3
- package/build/legacy/useQueries.js.map +1 -1
- package/build/legacy/useQuery.cjs.map +1 -1
- package/build/legacy/useQuery.d.cts +8 -13
- package/build/legacy/useQuery.d.cts.map +1 -1
- package/build/legacy/useQuery.d.ts +8 -13
- package/build/legacy/useQuery.d.ts.map +1 -1
- package/build/legacy/useQuery.js.map +1 -1
- package/build/legacy/useSuspenseInfiniteQuery.cjs +6 -8
- package/build/legacy/useSuspenseInfiniteQuery.cjs.map +1 -1
- package/build/legacy/useSuspenseInfiniteQuery.d.cts +6 -8
- package/build/legacy/useSuspenseInfiniteQuery.d.cts.map +1 -1
- package/build/legacy/useSuspenseInfiniteQuery.d.ts +6 -8
- package/build/legacy/useSuspenseInfiniteQuery.d.ts.map +1 -1
- package/build/legacy/useSuspenseInfiniteQuery.js +6 -8
- package/build/legacy/useSuspenseInfiniteQuery.js.map +1 -1
- package/build/legacy/useSuspenseQueries.cjs.map +1 -1
- package/build/legacy/useSuspenseQueries.d.cts +0 -9
- package/build/legacy/useSuspenseQueries.d.cts.map +1 -1
- package/build/legacy/useSuspenseQueries.d.ts +0 -9
- package/build/legacy/useSuspenseQueries.d.ts.map +1 -1
- package/build/legacy/useSuspenseQueries.js.map +1 -1
- package/build/legacy/useSuspenseQuery.cjs +4 -6
- package/build/legacy/useSuspenseQuery.cjs.map +1 -1
- package/build/legacy/useSuspenseQuery.d.cts +4 -6
- package/build/legacy/useSuspenseQuery.d.cts.map +1 -1
- package/build/legacy/useSuspenseQuery.d.ts +4 -6
- package/build/legacy/useSuspenseQuery.d.ts.map +1 -1
- package/build/legacy/useSuspenseQuery.js +4 -6
- package/build/legacy/useSuspenseQuery.js.map +1 -1
- package/build/legacy/utils.cjs +21 -1
- package/build/legacy/utils.cjs.map +1 -1
- package/build/legacy/utils.d.cts +15 -0
- package/build/legacy/utils.d.cts.map +1 -1
- package/build/legacy/utils.d.ts +15 -0
- package/build/legacy/utils.d.ts.map +1 -1
- package/build/legacy/utils.js +21 -1
- package/build/legacy/utils.js.map +1 -1
- package/build/modern/HydrationBoundary.cjs +2 -3
- package/build/modern/HydrationBoundary.cjs.map +1 -1
- package/build/modern/HydrationBoundary.d.cts +3 -4
- package/build/modern/HydrationBoundary.d.cts.map +1 -1
- package/build/modern/HydrationBoundary.d.ts +2 -3
- package/build/modern/HydrationBoundary.d.ts.map +1 -1
- package/build/modern/HydrationBoundary.js +2 -3
- package/build/modern/HydrationBoundary.js.map +1 -1
- package/build/modern/IsRestoringProvider.cjs +0 -1
- package/build/modern/IsRestoringProvider.cjs.map +1 -1
- package/build/modern/IsRestoringProvider.d.cts +0 -1
- package/build/modern/IsRestoringProvider.d.cts.map +1 -1
- package/build/modern/IsRestoringProvider.d.ts +0 -1
- package/build/modern/IsRestoringProvider.d.ts.map +1 -1
- package/build/modern/IsRestoringProvider.js +0 -1
- package/build/modern/IsRestoringProvider.js.map +1 -1
- package/build/modern/QueryClientProvider.cjs +3 -4
- package/build/modern/QueryClientProvider.cjs.map +1 -1
- package/build/modern/QueryClientProvider.d.cts +4 -5
- package/build/modern/QueryClientProvider.d.cts.map +1 -1
- package/build/modern/QueryClientProvider.d.ts +3 -4
- package/build/modern/QueryClientProvider.d.ts.map +1 -1
- package/build/modern/QueryClientProvider.js +3 -4
- package/build/modern/QueryClientProvider.js.map +1 -1
- package/build/modern/QueryErrorResetBoundary.cjs +6 -4
- package/build/modern/QueryErrorResetBoundary.cjs.map +1 -1
- package/build/modern/QueryErrorResetBoundary.d.cts +5 -5
- package/build/modern/QueryErrorResetBoundary.d.cts.map +1 -1
- package/build/modern/QueryErrorResetBoundary.d.ts +5 -5
- package/build/modern/QueryErrorResetBoundary.d.ts.map +1 -1
- package/build/modern/QueryErrorResetBoundary.js +6 -4
- package/build/modern/QueryErrorResetBoundary.js.map +1 -1
- package/build/modern/errorBoundaryUtils.cjs +21 -0
- package/build/modern/errorBoundaryUtils.cjs.map +1 -1
- package/build/modern/errorBoundaryUtils.d.cts +21 -0
- package/build/modern/errorBoundaryUtils.d.cts.map +1 -1
- package/build/modern/errorBoundaryUtils.d.ts +21 -0
- package/build/modern/errorBoundaryUtils.d.ts.map +1 -1
- package/build/modern/errorBoundaryUtils.js +21 -0
- package/build/modern/errorBoundaryUtils.js.map +1 -1
- package/build/modern/infiniteQueryOptions.cjs.map +1 -1
- package/build/modern/infiniteQueryOptions.d.cts +5 -16
- package/build/modern/infiniteQueryOptions.d.cts.map +1 -1
- package/build/modern/infiniteQueryOptions.d.ts +5 -16
- package/build/modern/infiniteQueryOptions.d.ts.map +1 -1
- package/build/modern/infiniteQueryOptions.js.map +1 -1
- package/build/modern/mutationOptions.cjs.map +1 -1
- package/build/modern/mutationOptions.d.cts +2 -6
- package/build/modern/mutationOptions.d.cts.map +1 -1
- package/build/modern/mutationOptions.d.ts +2 -6
- package/build/modern/mutationOptions.d.ts.map +1 -1
- package/build/modern/mutationOptions.js.map +1 -1
- package/build/modern/queryOptions.cjs.map +1 -1
- package/build/modern/queryOptions.d.cts +6 -16
- package/build/modern/queryOptions.d.cts.map +1 -1
- package/build/modern/queryOptions.d.ts +6 -16
- package/build/modern/queryOptions.d.ts.map +1 -1
- package/build/modern/queryOptions.js.map +1 -1
- package/build/modern/suspense.cjs +27 -0
- package/build/modern/suspense.cjs.map +1 -1
- package/build/modern/suspense.d.cts +27 -0
- package/build/modern/suspense.d.cts.map +1 -1
- package/build/modern/suspense.d.ts +27 -0
- package/build/modern/suspense.d.ts.map +1 -1
- package/build/modern/suspense.js +27 -0
- package/build/modern/suspense.js.map +1 -1
- package/build/modern/types.cjs.map +1 -1
- package/build/modern/types.d.cts +2 -22
- package/build/modern/types.d.cts.map +1 -1
- package/build/modern/types.d.ts +2 -22
- package/build/modern/types.d.ts.map +1 -1
- package/build/modern/types.js.map +1 -1
- package/build/modern/useBaseQuery.cjs +13 -0
- package/build/modern/useBaseQuery.cjs.map +1 -1
- package/build/modern/useBaseQuery.d.cts +13 -0
- package/build/modern/useBaseQuery.d.cts.map +1 -1
- package/build/modern/useBaseQuery.d.ts +13 -0
- package/build/modern/useBaseQuery.d.ts.map +1 -1
- package/build/modern/useBaseQuery.js +13 -0
- package/build/modern/useBaseQuery.js.map +1 -1
- package/build/modern/useInfiniteQuery.cjs.map +1 -1
- package/build/modern/useInfiniteQuery.d.cts +12 -21
- package/build/modern/useInfiniteQuery.d.cts.map +1 -1
- package/build/modern/useInfiniteQuery.d.ts +12 -21
- package/build/modern/useInfiniteQuery.d.ts.map +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 +0 -3
- package/build/modern/useIsFetching.d.cts.map +1 -1
- package/build/modern/useIsFetching.d.ts +0 -3
- 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 +4 -8
- package/build/modern/useMutation.cjs.map +1 -1
- package/build/modern/useMutation.d.cts +4 -8
- package/build/modern/useMutation.d.cts.map +1 -1
- package/build/modern/useMutation.d.ts +4 -8
- package/build/modern/useMutation.d.ts.map +1 -1
- package/build/modern/useMutation.js +4 -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 +0 -6
- package/build/modern/useMutationState.d.cts.map +1 -1
- package/build/modern/useMutationState.d.ts +0 -6
- 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 +0 -3
- package/build/modern/usePrefetchInfiniteQuery.cjs.map +1 -1
- package/build/modern/usePrefetchInfiniteQuery.d.cts +0 -3
- package/build/modern/usePrefetchInfiniteQuery.d.cts.map +1 -1
- package/build/modern/usePrefetchInfiniteQuery.d.ts +0 -3
- package/build/modern/usePrefetchInfiniteQuery.d.ts.map +1 -1
- package/build/modern/usePrefetchInfiniteQuery.js +0 -3
- package/build/modern/usePrefetchInfiniteQuery.js.map +1 -1
- package/build/modern/usePrefetchQuery.cjs +0 -3
- package/build/modern/usePrefetchQuery.cjs.map +1 -1
- package/build/modern/usePrefetchQuery.d.cts +0 -3
- package/build/modern/usePrefetchQuery.d.cts.map +1 -1
- package/build/modern/usePrefetchQuery.d.ts +0 -3
- package/build/modern/usePrefetchQuery.d.ts.map +1 -1
- package/build/modern/usePrefetchQuery.js +0 -3
- package/build/modern/usePrefetchQuery.js.map +1 -1
- package/build/modern/useQueries.cjs +3 -3
- package/build/modern/useQueries.cjs.map +1 -1
- package/build/modern/useQueries.d.cts +3 -6
- package/build/modern/useQueries.d.cts.map +1 -1
- package/build/modern/useQueries.d.ts +3 -6
- package/build/modern/useQueries.d.ts.map +1 -1
- package/build/modern/useQueries.js +3 -3
- package/build/modern/useQueries.js.map +1 -1
- package/build/modern/useQuery.cjs.map +1 -1
- package/build/modern/useQuery.d.cts +8 -13
- package/build/modern/useQuery.d.cts.map +1 -1
- package/build/modern/useQuery.d.ts +8 -13
- package/build/modern/useQuery.d.ts.map +1 -1
- package/build/modern/useQuery.js.map +1 -1
- package/build/modern/useSuspenseInfiniteQuery.cjs +6 -8
- package/build/modern/useSuspenseInfiniteQuery.cjs.map +1 -1
- package/build/modern/useSuspenseInfiniteQuery.d.cts +6 -8
- package/build/modern/useSuspenseInfiniteQuery.d.cts.map +1 -1
- package/build/modern/useSuspenseInfiniteQuery.d.ts +6 -8
- package/build/modern/useSuspenseInfiniteQuery.d.ts.map +1 -1
- package/build/modern/useSuspenseInfiniteQuery.js +6 -8
- package/build/modern/useSuspenseInfiniteQuery.js.map +1 -1
- package/build/modern/useSuspenseQueries.cjs.map +1 -1
- package/build/modern/useSuspenseQueries.d.cts +0 -9
- package/build/modern/useSuspenseQueries.d.cts.map +1 -1
- package/build/modern/useSuspenseQueries.d.ts +0 -9
- package/build/modern/useSuspenseQueries.d.ts.map +1 -1
- package/build/modern/useSuspenseQueries.js.map +1 -1
- package/build/modern/useSuspenseQuery.cjs +4 -6
- package/build/modern/useSuspenseQuery.cjs.map +1 -1
- package/build/modern/useSuspenseQuery.d.cts +4 -6
- package/build/modern/useSuspenseQuery.d.cts.map +1 -1
- package/build/modern/useSuspenseQuery.d.ts +4 -6
- package/build/modern/useSuspenseQuery.d.ts.map +1 -1
- package/build/modern/useSuspenseQuery.js +4 -6
- package/build/modern/useSuspenseQuery.js.map +1 -1
- package/build/modern/utils.cjs +21 -1
- package/build/modern/utils.cjs.map +1 -1
- package/build/modern/utils.d.cts +15 -0
- package/build/modern/utils.d.cts.map +1 -1
- package/build/modern/utils.d.ts +15 -0
- package/build/modern/utils.d.ts.map +1 -1
- package/build/modern/utils.js +21 -1
- package/build/modern/utils.js.map +1 -1
- package/package.json +8 -10
- package/src/HydrationBoundary.tsx +8 -8
- package/src/IsRestoringProvider.ts +0 -1
- package/src/QueryClientProvider.tsx +5 -6
- package/src/QueryErrorResetBoundary.tsx +11 -6
- package/src/errorBoundaryUtils.ts +22 -1
- package/src/infiniteQueryOptions.ts +5 -16
- package/src/mutationOptions.ts +2 -6
- package/src/queryOptions.ts +8 -17
- package/src/suspense.ts +29 -1
- package/src/types.ts +2 -22
- package/src/useBaseQuery.ts +20 -7
- package/src/useInfiniteQuery.ts +13 -22
- package/src/useIsFetching.ts +1 -4
- package/src/useMutation.ts +6 -10
- package/src/useMutationState.ts +11 -10
- package/src/usePrefetchInfiniteQuery.tsx +0 -3
- package/src/usePrefetchQuery.tsx +0 -3
- package/src/useQueries.ts +15 -18
- package/src/useQuery.ts +9 -14
- package/src/useSuspenseInfiniteQuery.ts +8 -10
- package/src/useSuspenseQueries.ts +2 -11
- package/src/useSuspenseQuery.ts +6 -8
- package/src/utils.ts +21 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suspense.cjs","names":[],"sources":["../../src/suspense.ts"],"sourcesContent":["import type {\n DefaultError,\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserver,\n QueryObserverResult,\n} from '@tanstack/query-core'\n\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\n\nexport const defaultThrowOnError = <\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n _error: TError,\n query: Query<TQueryFnData, TError, TData, TQueryKey>,\n) => query.state.data === undefined\n\nexport const ensureSuspenseTimers = (\n defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any>,\n) => {\n if (defaultedOptions.suspense) {\n // Handle staleTime to ensure minimum 1000ms in Suspense mode\n // This prevents unnecessary refetching when components remount after suspending\n const MIN_SUSPENSE_TIME_MS = 1000\n\n const clamp = (value: number | 'static' | undefined) =>\n value === 'static'\n ? value\n : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS)\n\n const originalStaleTime = defaultedOptions.staleTime\n defaultedOptions.staleTime =\n typeof originalStaleTime === 'function'\n ? (...args) => clamp(originalStaleTime(...args))\n : clamp(originalStaleTime)\n\n if (typeof defaultedOptions.gcTime === 'number') {\n defaultedOptions.gcTime = Math.max(\n defaultedOptions.gcTime,\n MIN_SUSPENSE_TIME_MS,\n )\n }\n }\n}\n\nexport const shouldSuspend = (\n defaultedOptions:\n DefaultedQueryObserverOptions<any, any, any, any, any
|
|
1
|
+
{"version":3,"file":"suspense.cjs","names":[],"sources":["../../src/suspense.ts"],"sourcesContent":["import type {\n DefaultError,\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserver,\n QueryObserverResult,\n} from '@tanstack/query-core'\n\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\n\n/**\n * The default `throwOnError` of the suspense hooks: throws the error to the nearest error boundary\n * only if the query has no data to show.\n * @param _error - The error of the query. Unused.\n * @param query - The query that errored.\n * @returns `true` if the query has no data.\n */\nexport const defaultThrowOnError = <\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n _error: TError,\n query: Query<TQueryFnData, TError, TData, TQueryKey>,\n) => query.state.data === undefined\n\n/**\n * Raises `staleTime` and a numeric `gcTime` to at least 1000ms when `suspense` is enabled, so a\n * component that remounts after suspending doesn't refetch right away or find the query garbage\n * collected. A `'static'` `staleTime` is kept as is. Mutates the options.\n * @param defaultedOptions - The defaulted query options to adjust.\n */\nexport const ensureSuspenseTimers = (\n defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any>,\n) => {\n if (defaultedOptions.suspense) {\n // Handle staleTime to ensure minimum 1000ms in Suspense mode\n // This prevents unnecessary refetching when components remount after suspending\n const MIN_SUSPENSE_TIME_MS = 1000\n\n const clamp = (value: number | 'static' | undefined) =>\n value === 'static'\n ? value\n : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS)\n\n const originalStaleTime = defaultedOptions.staleTime\n defaultedOptions.staleTime =\n typeof originalStaleTime === 'function'\n ? (...args) => clamp(originalStaleTime(...args))\n : clamp(originalStaleTime)\n\n if (typeof defaultedOptions.gcTime === 'number') {\n defaultedOptions.gcTime = Math.max(\n defaultedOptions.gcTime,\n MIN_SUSPENSE_TIME_MS,\n )\n }\n }\n}\n\n/**\n * Checks whether a query should suspend: `suspense` is enabled and the result is still `pending`.\n * @param defaultedOptions - The defaulted query options, if any.\n * @param result - The current result of the observer.\n * @returns `true` if the component should suspend.\n */\nexport const shouldSuspend = (\n defaultedOptions:\n | DefaultedQueryObserverOptions<any, any, any, any, any>\n | undefined,\n result: QueryObserverResult<any, any>,\n) => defaultedOptions?.suspense && result.isPending\n\n/**\n * Fetches the query for a suspending component, without affecting the observer's own result. If\n * the fetch fails, the reset state of the error boundary is cleared, so the error is thrown to it.\n * @param defaultedOptions - The defaulted query options to fetch with.\n * @param observer - The observer of the query.\n * @param errorResetBoundary - The value of the nearest `QueryErrorResetBoundary`.\n * @returns A promise that resolves once the fetch settles. It never rejects.\n */\nexport const fetchOptimistic = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n defaultedOptions: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n observer: QueryObserver<TQueryFnData, TError, TData, TQueryData, TQueryKey>,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) =>\n observer.fetchOptimistic(defaultedOptions).catch(() => {\n errorResetBoundary.clearReset()\n })\n"],"mappings":";;;;;;;;;AAkBA,MAAa,uBAMX,QACA,UACG,MAAM,MAAM,SAAS,KAAA;;;;;;;AAQ1B,MAAa,wBACX,qBACG;CACH,IAAI,iBAAiB,UAAU;EAG7B,MAAM,uBAAuB;EAE7B,MAAM,SAAS,UACb,UAAU,WACN,QACA,KAAK,IAAI,SAAS,sBAAsB,oBAAoB;EAElE,MAAM,oBAAoB,iBAAiB;EAC3C,iBAAiB,YACf,OAAO,sBAAsB,cACxB,GAAG,SAAS,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAC7C,MAAM,iBAAiB;EAE7B,IAAI,OAAO,iBAAiB,WAAW,UACrC,iBAAiB,SAAS,KAAK,IAC7B,iBAAiB,QACjB,oBACF;CAEJ;AACF;;;;;;;AAQA,MAAa,iBACX,kBAGA,WACG,kBAAkB,YAAY,OAAO;;;;;;;;;AAU1C,MAAa,mBAOX,kBAOA,UACA,uBAEA,SAAS,gBAAgB,gBAAgB,CAAC,CAAC,YAAY;CACrD,mBAAmB,WAAW;AAChC,CAAC"}
|
|
@@ -1,9 +1,36 @@
|
|
|
1
1
|
import { QueryErrorResetBoundaryValue } from "./QueryErrorResetBoundary.cjs";
|
|
2
2
|
import { DefaultError, DefaultedQueryObserverOptions, Query, QueryKey, QueryObserver, QueryObserverResult } from "@tanstack/query-core";
|
|
3
3
|
//#region src/suspense.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* The default `throwOnError` of the suspense hooks: throws the error to the nearest error boundary
|
|
6
|
+
* only if the query has no data to show.
|
|
7
|
+
* @param _error - The error of the query. Unused.
|
|
8
|
+
* @param query - The query that errored.
|
|
9
|
+
* @returns `true` if the query has no data.
|
|
10
|
+
*/
|
|
4
11
|
export declare const defaultThrowOnError: <TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(_error: TError, query: Query<TQueryFnData, TError, TData, TQueryKey>) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Raises `staleTime` and a numeric `gcTime` to at least 1000ms when `suspense` is enabled, so a
|
|
14
|
+
* component that remounts after suspending doesn't refetch right away or find the query garbage
|
|
15
|
+
* collected. A `'static'` `staleTime` is kept as is. Mutates the options.
|
|
16
|
+
* @param defaultedOptions - The defaulted query options to adjust.
|
|
17
|
+
*/
|
|
5
18
|
export declare const ensureSuspenseTimers: (defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any>) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Checks whether a query should suspend: `suspense` is enabled and the result is still `pending`.
|
|
21
|
+
* @param defaultedOptions - The defaulted query options, if any.
|
|
22
|
+
* @param result - The current result of the observer.
|
|
23
|
+
* @returns `true` if the component should suspend.
|
|
24
|
+
*/
|
|
6
25
|
export declare const shouldSuspend: (defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any> | undefined, result: QueryObserverResult<any, any>) => boolean | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Fetches the query for a suspending component, without affecting the observer's own result. If
|
|
28
|
+
* the fetch fails, the reset state of the error boundary is cleared, so the error is thrown to it.
|
|
29
|
+
* @param defaultedOptions - The defaulted query options to fetch with.
|
|
30
|
+
* @param observer - The observer of the query.
|
|
31
|
+
* @param errorResetBoundary - The value of the nearest `QueryErrorResetBoundary`.
|
|
32
|
+
* @returns A promise that resolves once the fetch settles. It never rejects.
|
|
33
|
+
*/
|
|
7
34
|
export declare const fetchOptimistic: <TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey>(defaultedOptions: DefaultedQueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, observer: QueryObserver<TQueryFnData, TError, TData, TQueryData, TQueryKey>, errorResetBoundary: QueryErrorResetBoundaryValue) => Promise<void | QueryObserverResult<TData, TError>>;
|
|
8
35
|
//#endregion
|
|
9
36
|
//# sourceMappingURL=suspense.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suspense.d.cts","names":[],"sources":["../../src/suspense.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"suspense.d.cts","names":[],"sources":["../../src/suspense.ts"],"mappings":";;;;;;;;;;qBAkBa,sBACX,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAE7B,QAAQ,QACR,OAAO,MAAM,cAAc,QAAQ,OAAO;;;;;;;qBAS/B,uBACX,kBAAkB;;;;;;;qBAiCP,gBACX,kBACI,oEAEJ,QAAQ;;;;;;;;;qBAWG,kBACX,cACA,QACA,OACA,YACA,kBAAkB,UAElB,kBAAkB,8BAChB,cACA,QACA,OACA,YACA,YAEF,UAAU,cAAc,cAAc,QAAQ,OAAO,YAAY,YACjE,oBAAoB,iCAA4B,eAAA,oBAAA,OAAA"}
|
|
@@ -1,9 +1,36 @@
|
|
|
1
1
|
import { QueryErrorResetBoundaryValue } from "./QueryErrorResetBoundary.js";
|
|
2
2
|
import { DefaultError, DefaultedQueryObserverOptions, Query, QueryKey, QueryObserver, QueryObserverResult } from "@tanstack/query-core";
|
|
3
3
|
//#region src/suspense.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* The default `throwOnError` of the suspense hooks: throws the error to the nearest error boundary
|
|
6
|
+
* only if the query has no data to show.
|
|
7
|
+
* @param _error - The error of the query. Unused.
|
|
8
|
+
* @param query - The query that errored.
|
|
9
|
+
* @returns `true` if the query has no data.
|
|
10
|
+
*/
|
|
4
11
|
export declare const defaultThrowOnError: <TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(_error: TError, query: Query<TQueryFnData, TError, TData, TQueryKey>) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Raises `staleTime` and a numeric `gcTime` to at least 1000ms when `suspense` is enabled, so a
|
|
14
|
+
* component that remounts after suspending doesn't refetch right away or find the query garbage
|
|
15
|
+
* collected. A `'static'` `staleTime` is kept as is. Mutates the options.
|
|
16
|
+
* @param defaultedOptions - The defaulted query options to adjust.
|
|
17
|
+
*/
|
|
5
18
|
export declare const ensureSuspenseTimers: (defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any>) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Checks whether a query should suspend: `suspense` is enabled and the result is still `pending`.
|
|
21
|
+
* @param defaultedOptions - The defaulted query options, if any.
|
|
22
|
+
* @param result - The current result of the observer.
|
|
23
|
+
* @returns `true` if the component should suspend.
|
|
24
|
+
*/
|
|
6
25
|
export declare const shouldSuspend: (defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any> | undefined, result: QueryObserverResult<any, any>) => boolean | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Fetches the query for a suspending component, without affecting the observer's own result. If
|
|
28
|
+
* the fetch fails, the reset state of the error boundary is cleared, so the error is thrown to it.
|
|
29
|
+
* @param defaultedOptions - The defaulted query options to fetch with.
|
|
30
|
+
* @param observer - The observer of the query.
|
|
31
|
+
* @param errorResetBoundary - The value of the nearest `QueryErrorResetBoundary`.
|
|
32
|
+
* @returns A promise that resolves once the fetch settles. It never rejects.
|
|
33
|
+
*/
|
|
7
34
|
export declare const fetchOptimistic: <TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey>(defaultedOptions: DefaultedQueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, observer: QueryObserver<TQueryFnData, TError, TData, TQueryData, TQueryKey>, errorResetBoundary: QueryErrorResetBoundaryValue) => Promise<void | QueryObserverResult<TData, TError>>;
|
|
8
35
|
//#endregion
|
|
9
36
|
//# sourceMappingURL=suspense.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suspense.d.ts","names":[],"sources":["../../src/suspense.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"suspense.d.ts","names":[],"sources":["../../src/suspense.ts"],"mappings":";;;;;;;;;;qBAkBa,sBACX,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAE7B,QAAQ,QACR,OAAO,MAAM,cAAc,QAAQ,OAAO;;;;;;;qBAS/B,uBACX,kBAAkB;;;;;;;qBAiCP,gBACX,kBACI,oEAEJ,QAAQ;;;;;;;;;qBAWG,kBACX,cACA,QACA,OACA,YACA,kBAAkB,UAElB,kBAAkB,8BAChB,cACA,QACA,OACA,YACA,YAEF,UAAU,cAAc,cAAc,QAAQ,OAAO,YAAY,YACjE,oBAAoB,iCAA4B,eAAA,oBAAA,OAAA"}
|
package/build/modern/suspense.js
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
//#region src/suspense.ts
|
|
2
|
+
/**
|
|
3
|
+
* The default `throwOnError` of the suspense hooks: throws the error to the nearest error boundary
|
|
4
|
+
* only if the query has no data to show.
|
|
5
|
+
* @param _error - The error of the query. Unused.
|
|
6
|
+
* @param query - The query that errored.
|
|
7
|
+
* @returns `true` if the query has no data.
|
|
8
|
+
*/
|
|
2
9
|
const defaultThrowOnError = (_error, query) => query.state.data === void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Raises `staleTime` and a numeric `gcTime` to at least 1000ms when `suspense` is enabled, so a
|
|
12
|
+
* component that remounts after suspending doesn't refetch right away or find the query garbage
|
|
13
|
+
* collected. A `'static'` `staleTime` is kept as is. Mutates the options.
|
|
14
|
+
* @param defaultedOptions - The defaulted query options to adjust.
|
|
15
|
+
*/
|
|
3
16
|
const ensureSuspenseTimers = (defaultedOptions) => {
|
|
4
17
|
if (defaultedOptions.suspense) {
|
|
5
18
|
const MIN_SUSPENSE_TIME_MS = 1e3;
|
|
@@ -9,7 +22,21 @@ const ensureSuspenseTimers = (defaultedOptions) => {
|
|
|
9
22
|
if (typeof defaultedOptions.gcTime === "number") defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, MIN_SUSPENSE_TIME_MS);
|
|
10
23
|
}
|
|
11
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Checks whether a query should suspend: `suspense` is enabled and the result is still `pending`.
|
|
27
|
+
* @param defaultedOptions - The defaulted query options, if any.
|
|
28
|
+
* @param result - The current result of the observer.
|
|
29
|
+
* @returns `true` if the component should suspend.
|
|
30
|
+
*/
|
|
12
31
|
const shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;
|
|
32
|
+
/**
|
|
33
|
+
* Fetches the query for a suspending component, without affecting the observer's own result. If
|
|
34
|
+
* the fetch fails, the reset state of the error boundary is cleared, so the error is thrown to it.
|
|
35
|
+
* @param defaultedOptions - The defaulted query options to fetch with.
|
|
36
|
+
* @param observer - The observer of the query.
|
|
37
|
+
* @param errorResetBoundary - The value of the nearest `QueryErrorResetBoundary`.
|
|
38
|
+
* @returns A promise that resolves once the fetch settles. It never rejects.
|
|
39
|
+
*/
|
|
13
40
|
const fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
|
|
14
41
|
errorResetBoundary.clearReset();
|
|
15
42
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suspense.js","names":[],"sources":["../../src/suspense.ts"],"sourcesContent":["import type {\n DefaultError,\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserver,\n QueryObserverResult,\n} from '@tanstack/query-core'\n\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\n\nexport const defaultThrowOnError = <\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n _error: TError,\n query: Query<TQueryFnData, TError, TData, TQueryKey>,\n) => query.state.data === undefined\n\nexport const ensureSuspenseTimers = (\n defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any>,\n) => {\n if (defaultedOptions.suspense) {\n // Handle staleTime to ensure minimum 1000ms in Suspense mode\n // This prevents unnecessary refetching when components remount after suspending\n const MIN_SUSPENSE_TIME_MS = 1000\n\n const clamp = (value: number | 'static' | undefined) =>\n value === 'static'\n ? value\n : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS)\n\n const originalStaleTime = defaultedOptions.staleTime\n defaultedOptions.staleTime =\n typeof originalStaleTime === 'function'\n ? (...args) => clamp(originalStaleTime(...args))\n : clamp(originalStaleTime)\n\n if (typeof defaultedOptions.gcTime === 'number') {\n defaultedOptions.gcTime = Math.max(\n defaultedOptions.gcTime,\n MIN_SUSPENSE_TIME_MS,\n )\n }\n }\n}\n\nexport const shouldSuspend = (\n defaultedOptions:\n DefaultedQueryObserverOptions<any, any, any, any, any
|
|
1
|
+
{"version":3,"file":"suspense.js","names":[],"sources":["../../src/suspense.ts"],"sourcesContent":["import type {\n DefaultError,\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserver,\n QueryObserverResult,\n} from '@tanstack/query-core'\n\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\n\n/**\n * The default `throwOnError` of the suspense hooks: throws the error to the nearest error boundary\n * only if the query has no data to show.\n * @param _error - The error of the query. Unused.\n * @param query - The query that errored.\n * @returns `true` if the query has no data.\n */\nexport const defaultThrowOnError = <\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n _error: TError,\n query: Query<TQueryFnData, TError, TData, TQueryKey>,\n) => query.state.data === undefined\n\n/**\n * Raises `staleTime` and a numeric `gcTime` to at least 1000ms when `suspense` is enabled, so a\n * component that remounts after suspending doesn't refetch right away or find the query garbage\n * collected. A `'static'` `staleTime` is kept as is. Mutates the options.\n * @param defaultedOptions - The defaulted query options to adjust.\n */\nexport const ensureSuspenseTimers = (\n defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any>,\n) => {\n if (defaultedOptions.suspense) {\n // Handle staleTime to ensure minimum 1000ms in Suspense mode\n // This prevents unnecessary refetching when components remount after suspending\n const MIN_SUSPENSE_TIME_MS = 1000\n\n const clamp = (value: number | 'static' | undefined) =>\n value === 'static'\n ? value\n : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS)\n\n const originalStaleTime = defaultedOptions.staleTime\n defaultedOptions.staleTime =\n typeof originalStaleTime === 'function'\n ? (...args) => clamp(originalStaleTime(...args))\n : clamp(originalStaleTime)\n\n if (typeof defaultedOptions.gcTime === 'number') {\n defaultedOptions.gcTime = Math.max(\n defaultedOptions.gcTime,\n MIN_SUSPENSE_TIME_MS,\n )\n }\n }\n}\n\n/**\n * Checks whether a query should suspend: `suspense` is enabled and the result is still `pending`.\n * @param defaultedOptions - The defaulted query options, if any.\n * @param result - The current result of the observer.\n * @returns `true` if the component should suspend.\n */\nexport const shouldSuspend = (\n defaultedOptions:\n | DefaultedQueryObserverOptions<any, any, any, any, any>\n | undefined,\n result: QueryObserverResult<any, any>,\n) => defaultedOptions?.suspense && result.isPending\n\n/**\n * Fetches the query for a suspending component, without affecting the observer's own result. If\n * the fetch fails, the reset state of the error boundary is cleared, so the error is thrown to it.\n * @param defaultedOptions - The defaulted query options to fetch with.\n * @param observer - The observer of the query.\n * @param errorResetBoundary - The value of the nearest `QueryErrorResetBoundary`.\n * @returns A promise that resolves once the fetch settles. It never rejects.\n */\nexport const fetchOptimistic = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n defaultedOptions: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n observer: QueryObserver<TQueryFnData, TError, TData, TQueryData, TQueryKey>,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) =>\n observer.fetchOptimistic(defaultedOptions).catch(() => {\n errorResetBoundary.clearReset()\n })\n"],"mappings":";;;;;;;;AAkBA,MAAa,uBAMX,QACA,UACG,MAAM,MAAM,SAAS,KAAA;;;;;;;AAQ1B,MAAa,wBACX,qBACG;CACH,IAAI,iBAAiB,UAAU;EAG7B,MAAM,uBAAuB;EAE7B,MAAM,SAAS,UACb,UAAU,WACN,QACA,KAAK,IAAI,SAAS,sBAAsB,oBAAoB;EAElE,MAAM,oBAAoB,iBAAiB;EAC3C,iBAAiB,YACf,OAAO,sBAAsB,cACxB,GAAG,SAAS,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAC7C,MAAM,iBAAiB;EAE7B,IAAI,OAAO,iBAAiB,WAAW,UACrC,iBAAiB,SAAS,KAAK,IAC7B,iBAAiB,QACjB,oBACF;CAEJ;AACF;;;;;;;AAQA,MAAa,iBACX,kBAGA,WACG,kBAAkB,YAAY,OAAO;;;;;;;;;AAU1C,MAAa,mBAOX,kBAOA,UACA,uBAEA,SAAS,gBAAgB,gBAAgB,CAAC,CAAC,YAAY;CACrD,mBAAmB,WAAW;AAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","names":[],"sources":["../../src/types.ts"],"sourcesContent":["/* istanbul ignore file */\nimport type {\n DefaultError,\n DefinedInfiniteQueryObserverResult,\n DefinedQueryObserverResult,\n DistributiveOmit,\n InfiniteData,\n InfiniteQueryExecuteOptions,\n InfiniteQueryObserverOptions,\n InfiniteQueryObserverResult,\n MutateFunction,\n MutationObserverOptions,\n MutationObserverResult,\n OmitKeyof,\n Override,\n QueryExecuteOptions,\n QueryKey,\n QueryObserverOptions,\n QueryObserverResult,\n SkipToken,\n} from '@tanstack/query-core'\n\n/**\n * {@link UseBaseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't\n * relevant, e.g. when accepting options for any query in a helper function.\n */\nexport type AnyUseBaseQueryOptions = UseBaseQueryOptions<\n any,\n any,\n any,\n any,\n any\n>\n/**\n * The options shared by `useQuery` and `useSuspenseQuery`. Extends {@link QueryObserverOptions} from\n * `@tanstack/query-core` with the `preact-query`-specific `subscribed` option.\n *\n * @template TQueryFnData - The type your `queryFn` resolves to.\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 `TQueryFnData` when no\n * `select` is used.\n * @template TQueryData - The type of the data actually held in the query cache — the input to `select` and\n * `placeholderData`. Defaults to, and is usually the same as, `TQueryFnData`.\n * @template TQueryKey - The type of your `queryKey`.\n */\nexport interface UseBaseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n> {\n /**\n * Set this to `false` to unsubscribe this observer from updates to the query cache.\n *\n * @defaultValue true\n */\n subscribed?: boolean\n}\n\n/**\n * The options accepted by `usePrefetchQuery` — everything you can pass to `queryClient.query`, except `queryFn`\n * is required unless a default query function has been defined.\n *\n * @template TQueryFnData - The type your `queryFn` resolves to.\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 `TQueryFnData` when no\n * `select` is used.\n * @template TQueryData - The type of the data actually held in the query cache — the input to `select` and\n * `placeholderData`. Defaults to, and is usually the same as, `TQueryFnData`.\n * @template TQueryKey - The type of your `queryKey`.\n */\nexport type UsePrefetchQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = DistributiveOmit<\n QueryExecuteOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>,\n 'queryFn'\n> & {\n /**\n * `skipToken` is not allowed as a value here — a prefetch always needs a query function to actually run,\n * unless a default query function has been defined.\n */\n queryFn?: Exclude<\n QueryExecuteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey\n >['queryFn'],\n SkipToken\n >\n}\n\n/**\n * The options accepted by `usePrefetchInfiniteQuery` — everything you can pass to `queryClient.infiniteQuery`,\n * except `queryFn` is required unless a default query function has been defined.\n *\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 `TQueryFnData` (a single page)\n * here, since a prefetch never reads `data` back out — this parameter only matters if you reuse these options\n * elsewhere with `select` applied.\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 UsePrefetchInfiniteQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = DistributiveOmit<\n InfiniteQueryExecuteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n 'queryFn'\n> & {\n /**\n * `skipToken` is not allowed as a value here — a prefetch always needs a query function to actually run,\n * unless a default query function has been defined.\n */\n queryFn?: Exclude<\n InfiniteQueryExecuteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >['queryFn'],\n SkipToken\n >\n}\n\n/**\n * {@link UseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't\n * relevant, e.g. when accepting options for any query in a helper function.\n */\nexport type AnyUseQueryOptions = UseQueryOptions<any, any, any, any>\n/**\n * The options accepted by `useQuery`. Same as {@link UseBaseQueryOptions}, minus `suspense` (which\n * `preact-query` derives from which hook you call rather than exposing as an option).\n *\n * @template TQueryFnData - The type your `queryFn` resolves to.\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 `TQueryFnData` when no\n * `select` is used.\n * @template TQueryKey - The type of your `queryKey`.\n */\nexport interface UseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends OmitKeyof<\n UseBaseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>,\n 'suspense'\n> {}\n\n/**\n * {@link UseSuspenseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't\n * relevant, e.g. when accepting options for any query in a helper function.\n */\nexport type AnyUseSuspenseQueryOptions = UseSuspenseQueryOptions<\n any,\n any,\n any,\n any\n>\n/**\n * The options accepted by `useSuspenseQuery`. Same as {@link UseQueryOptions}, minus `enabled`, `throwOnError`,\n * and `placeholderData` — Suspense hooks cannot render a \"disabled\" or \"placeholder\" state, so those options\n * don't apply.\n *\n * @template TQueryFnData - The type your `queryFn` resolves to.\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 `TQueryFnData` when no\n * `select` is used.\n * @template TQueryKey - The type of your `queryKey`.\n */\nexport interface UseSuspenseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends OmitKeyof<\n UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'\n> {\n /**\n * `skipToken` is not allowed here — Suspense hooks cannot render a \"disabled\" state, so a query function\n * must always be provided, unless a default query function has been defined.\n */\n queryFn?: Exclude<\n UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'],\n SkipToken\n >\n}\n\n/**\n * {@link UseInfiniteQueryOptions} with all type parameters set to `any`, useful when the specific types aren't\n * relevant, e.g. when accepting options for any query in a helper function.\n */\nexport type AnyUseInfiniteQueryOptions = UseInfiniteQueryOptions<\n any,\n any,\n any,\n any,\n any\n>\n/**\n * The options accepted by `useInfiniteQuery`. Extends {@link InfiniteQueryObserverOptions} from\n * `@tanstack/query-core` with the `preact-query`-specific `subscribed` option, minus `suspense` (which\n * `preact-query` derives from which hook you call rather than exposing as an option).\n *\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 interface UseInfiniteQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> extends OmitKeyof<\n InfiniteQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n 'suspense'\n> {\n /**\n * Set this to `false` to unsubscribe this observer from updates to the query cache.\n *\n * @defaultValue true\n */\n subscribed?: boolean\n}\n\n/**\n * {@link UseSuspenseInfiniteQueryOptions} with all type parameters set to `any`, useful when the specific types\n * aren't relevant, e.g. when accepting options for any query in a helper function.\n */\nexport type AnyUseSuspenseInfiniteQueryOptions =\n UseSuspenseInfiniteQueryOptions<any, any, any, any, any>\n/**\n * The options accepted by `useSuspenseInfiniteQuery`. Same as {@link UseInfiniteQueryOptions}, minus `enabled`,\n * `throwOnError`, and `placeholderData` — Suspense hooks cannot render a \"disabled\" or \"placeholder\" state, so\n * those options don't apply.\n *\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 interface UseSuspenseInfiniteQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> extends OmitKeyof<\n UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>,\n 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'\n> {\n /**\n * `skipToken` is not allowed here — Suspense hooks cannot render a \"disabled\" state, so a query function\n * must always be provided, unless a default query function has been defined.\n */\n queryFn?: Exclude<\n UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >['queryFn'],\n SkipToken\n >\n}\n\n/**\n * The result of `useQuery` when `initialData` isn't set — `data` may be `undefined` while the query is\n * `pending`. Re-exports {@link QueryObserverResult} from `@tanstack/query-core`. `useInfiniteQuery` returns\n * {@link UseInfiniteQueryResult} instead.\n *\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type UseBaseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = QueryObserverResult<TData, TError>\n\n/**\n * The result of `useQuery`. Same as {@link UseBaseQueryResult}.\n *\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type UseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = UseBaseQueryResult<TData, TError>\n\n/**\n * The result of `useSuspenseQuery`. Same as {@link DefinedUseQueryResult}, minus `isPlaceholderData` — always\n * `false` on that type, so this drops the dead field rather than an active state.\n *\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type UseSuspenseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = DistributiveOmit<\n DefinedQueryObserverResult<TData, TError>,\n 'isPlaceholderData'\n>\n\n/**\n * The result of `useQuery` when `initialData` is set, or of `useSuspenseQuery` before the `isPlaceholderData`\n * omission — `data` is never `undefined` (unless a `select` changes `TData` to include `undefined`).\n * Re-exports {@link DefinedQueryObserverResult} from `@tanstack/query-core`.\n *\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type DefinedUseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = DefinedQueryObserverResult<TData, TError>\n\n/**\n * The result of `useInfiniteQuery` when `initialData` isn't set — `data` may be `undefined` while the query is\n * `pending`. Re-exports {@link InfiniteQueryObserverResult} from `@tanstack/query-core`.\n *\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type UseInfiniteQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = InfiniteQueryObserverResult<TData, TError>\n\n/**\n * The result of `useInfiniteQuery` when `initialData` is set — `data` is never `undefined` (unless a\n * `select` changes `TData` to include `undefined`). Re-exports {@link DefinedInfiniteQueryObserverResult}\n * from `@tanstack/query-core`.\n *\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type DefinedUseInfiniteQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = DefinedInfiniteQueryObserverResult<TData, TError>\n\n/**\n * The result of `useSuspenseInfiniteQuery`. Same as {@link DefinedUseInfiniteQueryResult}, minus\n * `isPlaceholderData` — Suspense hooks never render placeholder data.\n *\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type UseSuspenseInfiniteQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = OmitKeyof<\n DefinedInfiniteQueryObserverResult<TData, TError>,\n 'isPlaceholderData'\n>\n\n/**\n * {@link UseMutationOptions} with all type parameters set to `any`, useful when the specific types aren't\n * relevant, e.g. when accepting options for any mutation in a helper function.\n */\nexport type AnyUseMutationOptions = UseMutationOptions<any, any, any, any>\n/**\n * The options accepted by `useMutation`. Same as {@link MutationObserverOptions} from `@tanstack/query-core`,\n * minus the internal `_defaulted` flag.\n *\n * @template TData - The type your mutation function resolves to.\n * @template TError - The type of errors your mutation function may throw.\n * @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.\n * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as\n * their `onMutateResult` parameter — useful for optimistic-update rollback data.\n */\nexport interface UseMutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends OmitKeyof<\n MutationObserverOptions<TData, TError, TVariables, TOnMutateResult>,\n '_defaulted'\n> {}\n\n/**\n * The type of `mutate`, as returned by `useMutation`. Forwards the variables (and an optional per-call\n * `onSuccess`/`onError`/`onSettled`) to the underlying `mutate` call. Fire-and-forget — errors are surfaced\n * through the mutation result, not thrown.\n *\n * @template TData - The type your mutation function resolves to.\n * @template TError - The type of errors your mutation function may throw.\n * @template TVariables - The type of the variable passed to `mutate`.\n * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as\n * their `onMutateResult` parameter — useful for optimistic-update rollback data.\n */\nexport type UseMutateFunction<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> = (\n ...args: Parameters<\n MutateFunction<TData, TError, TVariables, TOnMutateResult>\n >\n) => void\n\n/**\n * The type of `mutateAsync`, as returned by `useMutation`. Similar to {@link UseMutateFunction}, but returns a\n * promise which can be awaited.\n *\n * @template TData - The type your mutation function resolves to.\n * @template TError - The type of errors your mutation function may throw.\n * @template TVariables - The type of the variable passed to `mutateAsync`.\n * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as\n * their `onMutateResult` parameter — useful for optimistic-update rollback data.\n */\nexport type UseMutateAsyncFunction<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> = MutateFunction<TData, TError, TVariables, TOnMutateResult>\n\n/**\n * The result of `useMutation`. Same as {@link MutationObserverResult} from `@tanstack/query-core`, with\n * `mutate` narrowed to the fire-and-forget {@link UseMutateFunction} signature, plus the added `mutateAsync`.\n *\n * @template TData - The type your mutation function resolves to.\n * @template TError - The type of errors your mutation function may throw.\n * @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.\n * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as\n * their `onMutateResult` parameter — useful for optimistic-update rollback data.\n */\nexport type UseBaseMutationResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> = Override<\n MutationObserverResult<TData, TError, TVariables, TOnMutateResult>,\n { mutate: UseMutateFunction<TData, TError, TVariables, TOnMutateResult> }\n> & {\n /**\n * Similar to `mutate`, but returns a promise which can be awaited.\n */\n mutateAsync: UseMutateAsyncFunction<\n TData,\n TError,\n TVariables,\n TOnMutateResult\n >\n}\n\n/**\n * The result of `useMutation`. Same as {@link UseBaseMutationResult}.\n *\n * @template TData - The type your mutation function resolves to.\n * @template TError - The type of errors your mutation function may throw.\n * @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.\n * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as\n * their `onMutateResult` parameter — useful for optimistic-update rollback data.\n */\nexport type UseMutationResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> = UseBaseMutationResult<TData, TError, TVariables, TOnMutateResult>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.cjs","names":[],"sources":["../../src/types.ts"],"sourcesContent":["/* istanbul ignore file */\nimport type {\n DefaultError,\n DefinedInfiniteQueryObserverResult,\n DefinedQueryObserverResult,\n DistributiveOmit,\n InfiniteData,\n InfiniteQueryExecuteOptions,\n InfiniteQueryObserverOptions,\n InfiniteQueryObserverResult,\n MutateFunction,\n MutationObserverOptions,\n MutationObserverResult,\n OmitKeyof,\n Override,\n QueryExecuteOptions,\n QueryKey,\n QueryObserverOptions,\n QueryObserverResult,\n SkipToken,\n} from '@tanstack/query-core'\n\n/**\n * {@link UseBaseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't\n * relevant, e.g. when accepting options for any query in a helper function.\n */\nexport type AnyUseBaseQueryOptions = UseBaseQueryOptions<\n any,\n any,\n any,\n any,\n any\n>\n/**\n * The options shared by `useQuery` and `useSuspenseQuery`. Extends {@link QueryObserverOptions} from\n * `@tanstack/query-core` with the `preact-query`-specific `subscribed` option.\n * @template TQueryFnData - The type your `queryFn` resolves to.\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 `TQueryFnData` when no\n * `select` is used.\n * @template TQueryData - The type of the data actually held in the query cache — the input to `select` and\n * `placeholderData`. Defaults to, and is usually the same as, `TQueryFnData`.\n * @template TQueryKey - The type of your `queryKey`.\n */\nexport interface UseBaseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n> {\n /**\n * Set this to `false` to unsubscribe this observer from updates to the query cache.\n * @defaultValue true\n */\n subscribed?: boolean\n}\n\n/**\n * The options accepted by `usePrefetchQuery` — everything you can pass to `queryClient.query`, except `queryFn`\n * is required unless a default query function has been defined.\n * @template TQueryFnData - The type your `queryFn` resolves to.\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 `TQueryFnData` when no\n * `select` is used.\n * @template TQueryData - The type of the data actually held in the query cache — the input to `select` and\n * `placeholderData`. Defaults to, and is usually the same as, `TQueryFnData`.\n * @template TQueryKey - The type of your `queryKey`.\n */\nexport type UsePrefetchQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = DistributiveOmit<\n QueryExecuteOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>,\n 'queryFn'\n> & {\n /**\n * `skipToken` is not allowed as a value here — a prefetch always needs a query function to actually run,\n * unless a default query function has been defined.\n */\n queryFn?: Exclude<\n QueryExecuteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey\n >['queryFn'],\n SkipToken\n >\n}\n\n/**\n * The options accepted by `usePrefetchInfiniteQuery` — everything you can pass to `queryClient.infiniteQuery`,\n * except `queryFn` is required unless a default query function has been defined.\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 `TQueryFnData` (a single page)\n * here, since a prefetch never reads `data` back out — this parameter only matters if you reuse these options\n * elsewhere with `select` applied.\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 UsePrefetchInfiniteQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = DistributiveOmit<\n InfiniteQueryExecuteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n 'queryFn'\n> & {\n /**\n * `skipToken` is not allowed as a value here — a prefetch always needs a query function to actually run,\n * unless a default query function has been defined.\n */\n queryFn?: Exclude<\n InfiniteQueryExecuteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >['queryFn'],\n SkipToken\n >\n}\n\n/**\n * {@link UseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't\n * relevant, e.g. when accepting options for any query in a helper function.\n */\nexport type AnyUseQueryOptions = UseQueryOptions<any, any, any, any>\n/**\n * The options accepted by `useQuery`. Same as {@link UseBaseQueryOptions}, minus `suspense` (which\n * `preact-query` derives from which hook you call rather than exposing as an option).\n * @template TQueryFnData - The type your `queryFn` resolves to.\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 `TQueryFnData` when no\n * `select` is used.\n * @template TQueryKey - The type of your `queryKey`.\n */\nexport interface UseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends OmitKeyof<\n UseBaseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>,\n 'suspense'\n> {}\n\n/**\n * {@link UseSuspenseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't\n * relevant, e.g. when accepting options for any query in a helper function.\n */\nexport type AnyUseSuspenseQueryOptions = UseSuspenseQueryOptions<\n any,\n any,\n any,\n any\n>\n/**\n * The options accepted by `useSuspenseQuery`. Same as {@link UseQueryOptions}, minus `enabled`, `throwOnError`,\n * and `placeholderData` — Suspense hooks cannot render a \"disabled\" or \"placeholder\" state, so those options\n * don't apply.\n * @template TQueryFnData - The type your `queryFn` resolves to.\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 `TQueryFnData` when no\n * `select` is used.\n * @template TQueryKey - The type of your `queryKey`.\n */\nexport interface UseSuspenseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends OmitKeyof<\n UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'\n> {\n /**\n * `skipToken` is not allowed here — Suspense hooks cannot render a \"disabled\" state, so a query function\n * must always be provided, unless a default query function has been defined.\n */\n queryFn?: Exclude<\n UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'],\n SkipToken\n >\n}\n\n/**\n * {@link UseInfiniteQueryOptions} with all type parameters set to `any`, useful when the specific types aren't\n * relevant, e.g. when accepting options for any query in a helper function.\n */\nexport type AnyUseInfiniteQueryOptions = UseInfiniteQueryOptions<\n any,\n any,\n any,\n any,\n any\n>\n/**\n * The options accepted by `useInfiniteQuery`. Extends {@link InfiniteQueryObserverOptions} from\n * `@tanstack/query-core` with the `preact-query`-specific `subscribed` option, minus `suspense` (which\n * `preact-query` derives from which hook you call rather than exposing as an option).\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 interface UseInfiniteQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> extends OmitKeyof<\n InfiniteQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n 'suspense'\n> {\n /**\n * Set this to `false` to unsubscribe this observer from updates to the query cache.\n * @defaultValue true\n */\n subscribed?: boolean\n}\n\n/**\n * {@link UseSuspenseInfiniteQueryOptions} with all type parameters set to `any`, useful when the specific types\n * aren't relevant, e.g. when accepting options for any query in a helper function.\n */\nexport type AnyUseSuspenseInfiniteQueryOptions =\n UseSuspenseInfiniteQueryOptions<any, any, any, any, any>\n/**\n * The options accepted by `useSuspenseInfiniteQuery`. Same as {@link UseInfiniteQueryOptions}, minus `enabled`,\n * `throwOnError`, and `placeholderData` — Suspense hooks cannot render a \"disabled\" or \"placeholder\" state, so\n * those options don't apply.\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 interface UseSuspenseInfiniteQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> extends OmitKeyof<\n UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>,\n 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'\n> {\n /**\n * `skipToken` is not allowed here — Suspense hooks cannot render a \"disabled\" state, so a query function\n * must always be provided, unless a default query function has been defined.\n */\n queryFn?: Exclude<\n UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >['queryFn'],\n SkipToken\n >\n}\n\n/**\n * The result of `useQuery` when `initialData` isn't set — `data` may be `undefined` while the query is\n * `pending`. Re-exports {@link QueryObserverResult} from `@tanstack/query-core`. `useInfiniteQuery` returns\n * {@link UseInfiniteQueryResult} instead.\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type UseBaseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = QueryObserverResult<TData, TError>\n\n/**\n * The result of `useQuery`. Same as {@link UseBaseQueryResult}.\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type UseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = UseBaseQueryResult<TData, TError>\n\n/**\n * The result of `useSuspenseQuery`. Same as {@link DefinedUseQueryResult}, minus `isPlaceholderData` — always\n * `false` on that type, so this drops the dead field rather than an active state.\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type UseSuspenseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = DistributiveOmit<\n DefinedQueryObserverResult<TData, TError>,\n 'isPlaceholderData'\n>\n\n/**\n * The result of `useQuery` when `initialData` is set, or of `useSuspenseQuery` before the `isPlaceholderData`\n * omission — `data` is never `undefined` (unless a `select` changes `TData` to include `undefined`).\n * Re-exports {@link DefinedQueryObserverResult} from `@tanstack/query-core`.\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type DefinedUseQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = DefinedQueryObserverResult<TData, TError>\n\n/**\n * The result of `useInfiniteQuery` when `initialData` isn't set — `data` may be `undefined` while the query is\n * `pending`. Re-exports {@link InfiniteQueryObserverResult} from `@tanstack/query-core`.\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type UseInfiniteQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = InfiniteQueryObserverResult<TData, TError>\n\n/**\n * The result of `useInfiniteQuery` when `initialData` is set — `data` is never `undefined` (unless a\n * `select` changes `TData` to include `undefined`). Re-exports {@link DefinedInfiniteQueryObserverResult}\n * from `@tanstack/query-core`.\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type DefinedUseInfiniteQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = DefinedInfiniteQueryObserverResult<TData, TError>\n\n/**\n * The result of `useSuspenseInfiniteQuery`. Same as {@link DefinedUseInfiniteQueryResult}, minus\n * `isPlaceholderData` — Suspense hooks never render placeholder data.\n * @template TData - The type `data` ends up as after `select` runs.\n * @template TError - The type of errors your `queryFn` may throw.\n */\nexport type UseSuspenseInfiniteQueryResult<\n TData = unknown,\n TError = DefaultError,\n> = OmitKeyof<\n DefinedInfiniteQueryObserverResult<TData, TError>,\n 'isPlaceholderData'\n>\n\n/**\n * {@link UseMutationOptions} with all type parameters set to `any`, useful when the specific types aren't\n * relevant, e.g. when accepting options for any mutation in a helper function.\n */\nexport type AnyUseMutationOptions = UseMutationOptions<any, any, any, any>\n/**\n * The options accepted by `useMutation`. Same as {@link MutationObserverOptions} from `@tanstack/query-core`,\n * minus the internal `_defaulted` flag.\n * @template TData - The type your mutation function resolves to.\n * @template TError - The type of errors your mutation function may throw.\n * @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.\n * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as\n * their `onMutateResult` parameter — useful for optimistic-update rollback data.\n */\nexport interface UseMutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends OmitKeyof<\n MutationObserverOptions<TData, TError, TVariables, TOnMutateResult>,\n '_defaulted'\n> {}\n\n/**\n * The type of `mutate`, as returned by `useMutation`. Forwards the variables (and an optional per-call\n * `onSuccess`/`onError`/`onSettled`) to the underlying `mutate` call. Fire-and-forget — errors are surfaced\n * through the mutation result instead of being thrown by `mutate`, unless `throwOnError` makes `useMutation`\n * rethrow them.\n * @template TData - The type your mutation function resolves to.\n * @template TError - The type of errors your mutation function may throw.\n * @template TVariables - The type of the variable passed to `mutate`.\n * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as\n * their `onMutateResult` parameter — useful for optimistic-update rollback data.\n */\nexport type UseMutateFunction<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> = (\n ...args: Parameters<\n MutateFunction<TData, TError, TVariables, TOnMutateResult>\n >\n) => void\n\n/**\n * The type of `mutateAsync`, as returned by `useMutation`. Similar to {@link UseMutateFunction}, but returns a\n * promise which can be awaited.\n * @template TData - The type your mutation function resolves to.\n * @template TError - The type of errors your mutation function may throw.\n * @template TVariables - The type of the variable passed to `mutateAsync`.\n * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as\n * their `onMutateResult` parameter — useful for optimistic-update rollback data.\n */\nexport type UseMutateAsyncFunction<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> = MutateFunction<TData, TError, TVariables, TOnMutateResult>\n\n/**\n * The result of `useMutation`. Same as {@link MutationObserverResult} from `@tanstack/query-core`, with\n * `mutate` narrowed to the fire-and-forget {@link UseMutateFunction} signature, plus the added `mutateAsync`.\n * @template TData - The type your mutation function resolves to.\n * @template TError - The type of errors your mutation function may throw.\n * @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.\n * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as\n * their `onMutateResult` parameter — useful for optimistic-update rollback data.\n */\nexport type UseBaseMutationResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> = Override<\n MutationObserverResult<TData, TError, TVariables, TOnMutateResult>,\n { mutate: UseMutateFunction<TData, TError, TVariables, TOnMutateResult> }\n> & {\n /**\n * Similar to `mutate`, but returns a promise which can be awaited.\n */\n mutateAsync: UseMutateAsyncFunction<\n TData,\n TError,\n TVariables,\n TOnMutateResult\n >\n}\n\n/**\n * The result of `useMutation`. Same as {@link UseBaseMutationResult}.\n * @template TData - The type your mutation function resolves to.\n * @template TError - The type of errors your mutation function may throw.\n * @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.\n * @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as\n * their `onMutateResult` parameter — useful for optimistic-update rollback data.\n */\nexport type UseMutationResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> = UseBaseMutationResult<TData, TError, TVariables, TOnMutateResult>\n"],"mappings":""}
|
package/build/modern/types.d.cts
CHANGED
|
@@ -8,7 +8,6 @@ export type AnyUseBaseQueryOptions = UseBaseQueryOptions<any, any, any, any, any
|
|
|
8
8
|
/**
|
|
9
9
|
* The options shared by `useQuery` and `useSuspenseQuery`. Extends {@link QueryObserverOptions} from
|
|
10
10
|
* `@tanstack/query-core` with the `preact-query`-specific `subscribed` option.
|
|
11
|
-
*
|
|
12
11
|
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
13
12
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
14
13
|
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
@@ -20,7 +19,6 @@ export type AnyUseBaseQueryOptions = UseBaseQueryOptions<any, any, any, any, any
|
|
|
20
19
|
export interface UseBaseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends QueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey> {
|
|
21
20
|
/**
|
|
22
21
|
* Set this to `false` to unsubscribe this observer from updates to the query cache.
|
|
23
|
-
*
|
|
24
22
|
* @defaultValue true
|
|
25
23
|
*/
|
|
26
24
|
subscribed?: boolean;
|
|
@@ -28,7 +26,6 @@ export interface UseBaseQueryOptions<TQueryFnData = unknown, TError = DefaultErr
|
|
|
28
26
|
/**
|
|
29
27
|
* The options accepted by `usePrefetchQuery` — everything you can pass to `queryClient.query`, except `queryFn`
|
|
30
28
|
* is required unless a default query function has been defined.
|
|
31
|
-
*
|
|
32
29
|
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
33
30
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
34
31
|
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
@@ -47,7 +44,6 @@ export type UsePrefetchQueryOptions<TQueryFnData = unknown, TError = DefaultErro
|
|
|
47
44
|
/**
|
|
48
45
|
* The options accepted by `usePrefetchInfiniteQuery` — everything you can pass to `queryClient.infiniteQuery`,
|
|
49
46
|
* except `queryFn` is required unless a default query function has been defined.
|
|
50
|
-
*
|
|
51
47
|
* @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
|
|
52
48
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
53
49
|
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` (a single page)
|
|
@@ -71,7 +67,6 @@ export type AnyUseQueryOptions = UseQueryOptions<any, any, any, any>;
|
|
|
71
67
|
/**
|
|
72
68
|
* The options accepted by `useQuery`. Same as {@link UseBaseQueryOptions}, minus `suspense` (which
|
|
73
69
|
* `preact-query` derives from which hook you call rather than exposing as an option).
|
|
74
|
-
*
|
|
75
70
|
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
76
71
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
77
72
|
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
@@ -88,7 +83,6 @@ export type AnyUseSuspenseQueryOptions = UseSuspenseQueryOptions<any, any, any,
|
|
|
88
83
|
* The options accepted by `useSuspenseQuery`. Same as {@link UseQueryOptions}, minus `enabled`, `throwOnError`,
|
|
89
84
|
* and `placeholderData` — Suspense hooks cannot render a "disabled" or "placeholder" state, so those options
|
|
90
85
|
* don't apply.
|
|
91
|
-
*
|
|
92
86
|
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
93
87
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
94
88
|
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
@@ -111,7 +105,6 @@ export type AnyUseInfiniteQueryOptions = UseInfiniteQueryOptions<any, any, any,
|
|
|
111
105
|
* The options accepted by `useInfiniteQuery`. Extends {@link InfiniteQueryObserverOptions} from
|
|
112
106
|
* `@tanstack/query-core` with the `preact-query`-specific `subscribed` option, minus `suspense` (which
|
|
113
107
|
* `preact-query` derives from which hook you call rather than exposing as an option).
|
|
114
|
-
*
|
|
115
108
|
* @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
|
|
116
109
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
117
110
|
* @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
|
|
@@ -122,7 +115,6 @@ export type AnyUseInfiniteQueryOptions = UseInfiniteQueryOptions<any, any, any,
|
|
|
122
115
|
export interface UseInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends OmitKeyof<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'suspense'> {
|
|
123
116
|
/**
|
|
124
117
|
* Set this to `false` to unsubscribe this observer from updates to the query cache.
|
|
125
|
-
*
|
|
126
118
|
* @defaultValue true
|
|
127
119
|
*/
|
|
128
120
|
subscribed?: boolean;
|
|
@@ -136,7 +128,6 @@ export type AnyUseSuspenseInfiniteQueryOptions = UseSuspenseInfiniteQueryOptions
|
|
|
136
128
|
* The options accepted by `useSuspenseInfiniteQuery`. Same as {@link UseInfiniteQueryOptions}, minus `enabled`,
|
|
137
129
|
* `throwOnError`, and `placeholderData` — Suspense hooks cannot render a "disabled" or "placeholder" state, so
|
|
138
130
|
* those options don't apply.
|
|
139
|
-
*
|
|
140
131
|
* @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
|
|
141
132
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
142
133
|
* @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
|
|
@@ -155,14 +146,12 @@ export interface UseSuspenseInfiniteQueryOptions<TQueryFnData = unknown, TError
|
|
|
155
146
|
* The result of `useQuery` when `initialData` isn't set — `data` may be `undefined` while the query is
|
|
156
147
|
* `pending`. Re-exports {@link QueryObserverResult} from `@tanstack/query-core`. `useInfiniteQuery` returns
|
|
157
148
|
* {@link UseInfiniteQueryResult} instead.
|
|
158
|
-
*
|
|
159
149
|
* @template TData - The type `data` ends up as after `select` runs.
|
|
160
150
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
161
151
|
*/
|
|
162
152
|
export type UseBaseQueryResult<TData = unknown, TError = DefaultError> = QueryObserverResult<TData, TError>;
|
|
163
153
|
/**
|
|
164
154
|
* The result of `useQuery`. Same as {@link UseBaseQueryResult}.
|
|
165
|
-
*
|
|
166
155
|
* @template TData - The type `data` ends up as after `select` runs.
|
|
167
156
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
168
157
|
*/
|
|
@@ -170,7 +159,6 @@ export type UseQueryResult<TData = unknown, TError = DefaultError> = UseBaseQuer
|
|
|
170
159
|
/**
|
|
171
160
|
* The result of `useSuspenseQuery`. Same as {@link DefinedUseQueryResult}, minus `isPlaceholderData` — always
|
|
172
161
|
* `false` on that type, so this drops the dead field rather than an active state.
|
|
173
|
-
*
|
|
174
162
|
* @template TData - The type `data` ends up as after `select` runs.
|
|
175
163
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
176
164
|
*/
|
|
@@ -179,7 +167,6 @@ export type UseSuspenseQueryResult<TData = unknown, TError = DefaultError> = Dis
|
|
|
179
167
|
* The result of `useQuery` when `initialData` is set, or of `useSuspenseQuery` before the `isPlaceholderData`
|
|
180
168
|
* omission — `data` is never `undefined` (unless a `select` changes `TData` to include `undefined`).
|
|
181
169
|
* Re-exports {@link DefinedQueryObserverResult} from `@tanstack/query-core`.
|
|
182
|
-
*
|
|
183
170
|
* @template TData - The type `data` ends up as after `select` runs.
|
|
184
171
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
185
172
|
*/
|
|
@@ -187,7 +174,6 @@ export type DefinedUseQueryResult<TData = unknown, TError = DefaultError> = Defi
|
|
|
187
174
|
/**
|
|
188
175
|
* The result of `useInfiniteQuery` when `initialData` isn't set — `data` may be `undefined` while the query is
|
|
189
176
|
* `pending`. Re-exports {@link InfiniteQueryObserverResult} from `@tanstack/query-core`.
|
|
190
|
-
*
|
|
191
177
|
* @template TData - The type `data` ends up as after `select` runs.
|
|
192
178
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
193
179
|
*/
|
|
@@ -196,7 +182,6 @@ export type UseInfiniteQueryResult<TData = unknown, TError = DefaultError> = Inf
|
|
|
196
182
|
* The result of `useInfiniteQuery` when `initialData` is set — `data` is never `undefined` (unless a
|
|
197
183
|
* `select` changes `TData` to include `undefined`). Re-exports {@link DefinedInfiniteQueryObserverResult}
|
|
198
184
|
* from `@tanstack/query-core`.
|
|
199
|
-
*
|
|
200
185
|
* @template TData - The type `data` ends up as after `select` runs.
|
|
201
186
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
202
187
|
*/
|
|
@@ -204,7 +189,6 @@ export type DefinedUseInfiniteQueryResult<TData = unknown, TError = DefaultError
|
|
|
204
189
|
/**
|
|
205
190
|
* The result of `useSuspenseInfiniteQuery`. Same as {@link DefinedUseInfiniteQueryResult}, minus
|
|
206
191
|
* `isPlaceholderData` — Suspense hooks never render placeholder data.
|
|
207
|
-
*
|
|
208
192
|
* @template TData - The type `data` ends up as after `select` runs.
|
|
209
193
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
210
194
|
*/
|
|
@@ -217,7 +201,6 @@ export type AnyUseMutationOptions = UseMutationOptions<any, any, any, any>;
|
|
|
217
201
|
/**
|
|
218
202
|
* The options accepted by `useMutation`. Same as {@link MutationObserverOptions} from `@tanstack/query-core`,
|
|
219
203
|
* minus the internal `_defaulted` flag.
|
|
220
|
-
*
|
|
221
204
|
* @template TData - The type your mutation function resolves to.
|
|
222
205
|
* @template TError - The type of errors your mutation function may throw.
|
|
223
206
|
* @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.
|
|
@@ -228,8 +211,8 @@ export interface UseMutationOptions<TData = unknown, TError = DefaultError, TVar
|
|
|
228
211
|
/**
|
|
229
212
|
* The type of `mutate`, as returned by `useMutation`. Forwards the variables (and an optional per-call
|
|
230
213
|
* `onSuccess`/`onError`/`onSettled`) to the underlying `mutate` call. Fire-and-forget — errors are surfaced
|
|
231
|
-
* through the mutation result
|
|
232
|
-
*
|
|
214
|
+
* through the mutation result instead of being thrown by `mutate`, unless `throwOnError` makes `useMutation`
|
|
215
|
+
* rethrow them.
|
|
233
216
|
* @template TData - The type your mutation function resolves to.
|
|
234
217
|
* @template TError - The type of errors your mutation function may throw.
|
|
235
218
|
* @template TVariables - The type of the variable passed to `mutate`.
|
|
@@ -240,7 +223,6 @@ export type UseMutateFunction<TData = unknown, TError = DefaultError, TVariables
|
|
|
240
223
|
/**
|
|
241
224
|
* The type of `mutateAsync`, as returned by `useMutation`. Similar to {@link UseMutateFunction}, but returns a
|
|
242
225
|
* promise which can be awaited.
|
|
243
|
-
*
|
|
244
226
|
* @template TData - The type your mutation function resolves to.
|
|
245
227
|
* @template TError - The type of errors your mutation function may throw.
|
|
246
228
|
* @template TVariables - The type of the variable passed to `mutateAsync`.
|
|
@@ -251,7 +233,6 @@ export type UseMutateAsyncFunction<TData = unknown, TError = DefaultError, TVari
|
|
|
251
233
|
/**
|
|
252
234
|
* The result of `useMutation`. Same as {@link MutationObserverResult} from `@tanstack/query-core`, with
|
|
253
235
|
* `mutate` narrowed to the fire-and-forget {@link UseMutateFunction} signature, plus the added `mutateAsync`.
|
|
254
|
-
*
|
|
255
236
|
* @template TData - The type your mutation function resolves to.
|
|
256
237
|
* @template TError - The type of errors your mutation function may throw.
|
|
257
238
|
* @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.
|
|
@@ -268,7 +249,6 @@ export type UseBaseMutationResult<TData = unknown, TError = DefaultError, TVaria
|
|
|
268
249
|
};
|
|
269
250
|
/**
|
|
270
251
|
* The result of `useMutation`. Same as {@link UseBaseMutationResult}.
|
|
271
|
-
*
|
|
272
252
|
* @template TData - The type your mutation function resolves to.
|
|
273
253
|
* @template TError - The type of errors your mutation function may throw.
|
|
274
254
|
* @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/types.ts"],"mappings":";;;;;;YA0BY,yBAAyB
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/types.ts"],"mappings":";;;;;;YA0BY,yBAAyB;;;;;;;;;;;;iBAkBpB,oBACf,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,kBACrB,qBACR,cACA,QACA,OACA,YACA;;;;;EAMA;;;;;;;;;;;;;YAcU,wBACV,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,YAC3B,iBACF,oBAAoB,cAAc,QAAQ,OAAO,YAAY;;;;;EAO7D,UAAU,QACR,oBACE,cACA,QACA,OACA,cACA,uBAEF;;;;;;;;;;;;;YAeQ,gCACV,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,wBACE,iBACF,4BACE,cACA,QACA,OACA,WACA;;;;;EAQF,UAAU,QACR,4BACE,cACA,QACA,OACA,WACA,wBAEF;;;;;;YAQQ,qBAAqB;;;;;;;;;;iBAUhB,gBACf,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,kBACrB,UACR,oBAAoB,cAAc,QAAQ,OAAO,cAAc;;;;;YAQrD,6BAA6B;;;;;;;;;;;iBAgBxB,wBACf,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,kBACrB,UACR,gBAAgB,cAAc,QAAQ,OAAO;;;;;EAO7C,UAAU,QACR,gBAAgB,cAAc,QAAQ,OAAO,uBAC7C;;;;;;YAQQ,6BAA6B;;;;;;;;;;;;iBAkBxB,wBACf,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,8BACQ,UACR,6BACE,cACA,QACA,OACA,WACA;;;;;EAQF;;;;;;YAOU,qCACV;;;;;;;;;;;;iBAYe,gCACf,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,8BACQ,UACR,wBAAwB,cAAc,QAAQ,OAAO,WAAW;;;;;EAOhE,UAAU,QACR,wBACE,cACA,QACA,OACA,WACA,wBAEF;;;;;;;;;YAWQ,mBACV,iBACA,SAAS,gBACP,oBAAoB,OAAO;;;;;;YAOnB,eACV,iBACA,SAAS,gBACP,mBAAmB,OAAO;;;;;;;YAQlB,uBACV,iBACA,SAAS,gBACP,iBACF,2BAA2B,OAAO;;;;;;;;YAWxB,sBACV,iBACA,SAAS,gBACP,2BAA2B,OAAO;;;;;;;YAQ1B,uBACV,iBACA,SAAS,gBACP,4BAA4B,OAAO;;;;;;;;YAS3B,8BACV,iBACA,SAAS,gBACP,mCAAmC,OAAO;;;;;;;YAQlC,+BACV,iBACA,SAAS,gBACP,UACF,mCAAmC,OAAO;;;;;YAQhC,wBAAwB;;;;;;;;;;iBAUnB,mBACf,iBACA,SAAS,cACT,mBACA,mCACQ,UACR,wBAAwB,OAAO,QAAQ,YAAY;;;;;;;;;;;;YAezC,kBACV,iBACA,SAAS,cACT,mBACA,iCAEG,MAAM,WACP,eAAe,OAAO,QAAQ,YAAY;;;;;;;;;;YAalC,uBACV,iBACA,SAAS,cACT,mBACA,6BACE,eAAe,OAAO,QAAQ,YAAY;;;;;;;;;;YAWlC,sBACV,iBACA,SAAS,cACT,sBACA,6BACE,SACF,uBAAuB,OAAO,QAAQ,YAAY;EAChD,QAAQ,kBAAkB,OAAO,QAAQ,YAAY;;;;;EAKvD,aAAa,uBACX,OACA,QACA,YACA;;;;;;;;;;YAYQ,kBACV,iBACA,SAAS,cACT,sBACA,6BACE,sBAAsB,OAAO,QAAQ,YAAY"}
|
package/build/modern/types.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export type AnyUseBaseQueryOptions = UseBaseQueryOptions<any, any, any, any, any
|
|
|
8
8
|
/**
|
|
9
9
|
* The options shared by `useQuery` and `useSuspenseQuery`. Extends {@link QueryObserverOptions} from
|
|
10
10
|
* `@tanstack/query-core` with the `preact-query`-specific `subscribed` option.
|
|
11
|
-
*
|
|
12
11
|
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
13
12
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
14
13
|
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
@@ -20,7 +19,6 @@ export type AnyUseBaseQueryOptions = UseBaseQueryOptions<any, any, any, any, any
|
|
|
20
19
|
export interface UseBaseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends QueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey> {
|
|
21
20
|
/**
|
|
22
21
|
* Set this to `false` to unsubscribe this observer from updates to the query cache.
|
|
23
|
-
*
|
|
24
22
|
* @defaultValue true
|
|
25
23
|
*/
|
|
26
24
|
subscribed?: boolean;
|
|
@@ -28,7 +26,6 @@ export interface UseBaseQueryOptions<TQueryFnData = unknown, TError = DefaultErr
|
|
|
28
26
|
/**
|
|
29
27
|
* The options accepted by `usePrefetchQuery` — everything you can pass to `queryClient.query`, except `queryFn`
|
|
30
28
|
* is required unless a default query function has been defined.
|
|
31
|
-
*
|
|
32
29
|
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
33
30
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
34
31
|
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
@@ -47,7 +44,6 @@ export type UsePrefetchQueryOptions<TQueryFnData = unknown, TError = DefaultErro
|
|
|
47
44
|
/**
|
|
48
45
|
* The options accepted by `usePrefetchInfiniteQuery` — everything you can pass to `queryClient.infiniteQuery`,
|
|
49
46
|
* except `queryFn` is required unless a default query function has been defined.
|
|
50
|
-
*
|
|
51
47
|
* @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
|
|
52
48
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
53
49
|
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` (a single page)
|
|
@@ -71,7 +67,6 @@ export type AnyUseQueryOptions = UseQueryOptions<any, any, any, any>;
|
|
|
71
67
|
/**
|
|
72
68
|
* The options accepted by `useQuery`. Same as {@link UseBaseQueryOptions}, minus `suspense` (which
|
|
73
69
|
* `preact-query` derives from which hook you call rather than exposing as an option).
|
|
74
|
-
*
|
|
75
70
|
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
76
71
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
77
72
|
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
@@ -88,7 +83,6 @@ export type AnyUseSuspenseQueryOptions = UseSuspenseQueryOptions<any, any, any,
|
|
|
88
83
|
* The options accepted by `useSuspenseQuery`. Same as {@link UseQueryOptions}, minus `enabled`, `throwOnError`,
|
|
89
84
|
* and `placeholderData` — Suspense hooks cannot render a "disabled" or "placeholder" state, so those options
|
|
90
85
|
* don't apply.
|
|
91
|
-
*
|
|
92
86
|
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
93
87
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
94
88
|
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
@@ -111,7 +105,6 @@ export type AnyUseInfiniteQueryOptions = UseInfiniteQueryOptions<any, any, any,
|
|
|
111
105
|
* The options accepted by `useInfiniteQuery`. Extends {@link InfiniteQueryObserverOptions} from
|
|
112
106
|
* `@tanstack/query-core` with the `preact-query`-specific `subscribed` option, minus `suspense` (which
|
|
113
107
|
* `preact-query` derives from which hook you call rather than exposing as an option).
|
|
114
|
-
*
|
|
115
108
|
* @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
|
|
116
109
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
117
110
|
* @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
|
|
@@ -122,7 +115,6 @@ export type AnyUseInfiniteQueryOptions = UseInfiniteQueryOptions<any, any, any,
|
|
|
122
115
|
export interface UseInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends OmitKeyof<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'suspense'> {
|
|
123
116
|
/**
|
|
124
117
|
* Set this to `false` to unsubscribe this observer from updates to the query cache.
|
|
125
|
-
*
|
|
126
118
|
* @defaultValue true
|
|
127
119
|
*/
|
|
128
120
|
subscribed?: boolean;
|
|
@@ -136,7 +128,6 @@ export type AnyUseSuspenseInfiniteQueryOptions = UseSuspenseInfiniteQueryOptions
|
|
|
136
128
|
* The options accepted by `useSuspenseInfiniteQuery`. Same as {@link UseInfiniteQueryOptions}, minus `enabled`,
|
|
137
129
|
* `throwOnError`, and `placeholderData` — Suspense hooks cannot render a "disabled" or "placeholder" state, so
|
|
138
130
|
* those options don't apply.
|
|
139
|
-
*
|
|
140
131
|
* @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
|
|
141
132
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
142
133
|
* @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
|
|
@@ -155,14 +146,12 @@ export interface UseSuspenseInfiniteQueryOptions<TQueryFnData = unknown, TError
|
|
|
155
146
|
* The result of `useQuery` when `initialData` isn't set — `data` may be `undefined` while the query is
|
|
156
147
|
* `pending`. Re-exports {@link QueryObserverResult} from `@tanstack/query-core`. `useInfiniteQuery` returns
|
|
157
148
|
* {@link UseInfiniteQueryResult} instead.
|
|
158
|
-
*
|
|
159
149
|
* @template TData - The type `data` ends up as after `select` runs.
|
|
160
150
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
161
151
|
*/
|
|
162
152
|
export type UseBaseQueryResult<TData = unknown, TError = DefaultError> = QueryObserverResult<TData, TError>;
|
|
163
153
|
/**
|
|
164
154
|
* The result of `useQuery`. Same as {@link UseBaseQueryResult}.
|
|
165
|
-
*
|
|
166
155
|
* @template TData - The type `data` ends up as after `select` runs.
|
|
167
156
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
168
157
|
*/
|
|
@@ -170,7 +159,6 @@ export type UseQueryResult<TData = unknown, TError = DefaultError> = UseBaseQuer
|
|
|
170
159
|
/**
|
|
171
160
|
* The result of `useSuspenseQuery`. Same as {@link DefinedUseQueryResult}, minus `isPlaceholderData` — always
|
|
172
161
|
* `false` on that type, so this drops the dead field rather than an active state.
|
|
173
|
-
*
|
|
174
162
|
* @template TData - The type `data` ends up as after `select` runs.
|
|
175
163
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
176
164
|
*/
|
|
@@ -179,7 +167,6 @@ export type UseSuspenseQueryResult<TData = unknown, TError = DefaultError> = Dis
|
|
|
179
167
|
* The result of `useQuery` when `initialData` is set, or of `useSuspenseQuery` before the `isPlaceholderData`
|
|
180
168
|
* omission — `data` is never `undefined` (unless a `select` changes `TData` to include `undefined`).
|
|
181
169
|
* Re-exports {@link DefinedQueryObserverResult} from `@tanstack/query-core`.
|
|
182
|
-
*
|
|
183
170
|
* @template TData - The type `data` ends up as after `select` runs.
|
|
184
171
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
185
172
|
*/
|
|
@@ -187,7 +174,6 @@ export type DefinedUseQueryResult<TData = unknown, TError = DefaultError> = Defi
|
|
|
187
174
|
/**
|
|
188
175
|
* The result of `useInfiniteQuery` when `initialData` isn't set — `data` may be `undefined` while the query is
|
|
189
176
|
* `pending`. Re-exports {@link InfiniteQueryObserverResult} from `@tanstack/query-core`.
|
|
190
|
-
*
|
|
191
177
|
* @template TData - The type `data` ends up as after `select` runs.
|
|
192
178
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
193
179
|
*/
|
|
@@ -196,7 +182,6 @@ export type UseInfiniteQueryResult<TData = unknown, TError = DefaultError> = Inf
|
|
|
196
182
|
* The result of `useInfiniteQuery` when `initialData` is set — `data` is never `undefined` (unless a
|
|
197
183
|
* `select` changes `TData` to include `undefined`). Re-exports {@link DefinedInfiniteQueryObserverResult}
|
|
198
184
|
* from `@tanstack/query-core`.
|
|
199
|
-
*
|
|
200
185
|
* @template TData - The type `data` ends up as after `select` runs.
|
|
201
186
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
202
187
|
*/
|
|
@@ -204,7 +189,6 @@ export type DefinedUseInfiniteQueryResult<TData = unknown, TError = DefaultError
|
|
|
204
189
|
/**
|
|
205
190
|
* The result of `useSuspenseInfiniteQuery`. Same as {@link DefinedUseInfiniteQueryResult}, minus
|
|
206
191
|
* `isPlaceholderData` — Suspense hooks never render placeholder data.
|
|
207
|
-
*
|
|
208
192
|
* @template TData - The type `data` ends up as after `select` runs.
|
|
209
193
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
210
194
|
*/
|
|
@@ -217,7 +201,6 @@ export type AnyUseMutationOptions = UseMutationOptions<any, any, any, any>;
|
|
|
217
201
|
/**
|
|
218
202
|
* The options accepted by `useMutation`. Same as {@link MutationObserverOptions} from `@tanstack/query-core`,
|
|
219
203
|
* minus the internal `_defaulted` flag.
|
|
220
|
-
*
|
|
221
204
|
* @template TData - The type your mutation function resolves to.
|
|
222
205
|
* @template TError - The type of errors your mutation function may throw.
|
|
223
206
|
* @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.
|
|
@@ -228,8 +211,8 @@ export interface UseMutationOptions<TData = unknown, TError = DefaultError, TVar
|
|
|
228
211
|
/**
|
|
229
212
|
* The type of `mutate`, as returned by `useMutation`. Forwards the variables (and an optional per-call
|
|
230
213
|
* `onSuccess`/`onError`/`onSettled`) to the underlying `mutate` call. Fire-and-forget — errors are surfaced
|
|
231
|
-
* through the mutation result
|
|
232
|
-
*
|
|
214
|
+
* through the mutation result instead of being thrown by `mutate`, unless `throwOnError` makes `useMutation`
|
|
215
|
+
* rethrow them.
|
|
233
216
|
* @template TData - The type your mutation function resolves to.
|
|
234
217
|
* @template TError - The type of errors your mutation function may throw.
|
|
235
218
|
* @template TVariables - The type of the variable passed to `mutate`.
|
|
@@ -240,7 +223,6 @@ export type UseMutateFunction<TData = unknown, TError = DefaultError, TVariables
|
|
|
240
223
|
/**
|
|
241
224
|
* The type of `mutateAsync`, as returned by `useMutation`. Similar to {@link UseMutateFunction}, but returns a
|
|
242
225
|
* promise which can be awaited.
|
|
243
|
-
*
|
|
244
226
|
* @template TData - The type your mutation function resolves to.
|
|
245
227
|
* @template TError - The type of errors your mutation function may throw.
|
|
246
228
|
* @template TVariables - The type of the variable passed to `mutateAsync`.
|
|
@@ -251,7 +233,6 @@ export type UseMutateAsyncFunction<TData = unknown, TError = DefaultError, TVari
|
|
|
251
233
|
/**
|
|
252
234
|
* The result of `useMutation`. Same as {@link MutationObserverResult} from `@tanstack/query-core`, with
|
|
253
235
|
* `mutate` narrowed to the fire-and-forget {@link UseMutateFunction} signature, plus the added `mutateAsync`.
|
|
254
|
-
*
|
|
255
236
|
* @template TData - The type your mutation function resolves to.
|
|
256
237
|
* @template TError - The type of errors your mutation function may throw.
|
|
257
238
|
* @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.
|
|
@@ -268,7 +249,6 @@ export type UseBaseMutationResult<TData = unknown, TError = DefaultError, TVaria
|
|
|
268
249
|
};
|
|
269
250
|
/**
|
|
270
251
|
* The result of `useMutation`. Same as {@link UseBaseMutationResult}.
|
|
271
|
-
*
|
|
272
252
|
* @template TData - The type your mutation function resolves to.
|
|
273
253
|
* @template TError - The type of errors your mutation function may throw.
|
|
274
254
|
* @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/types.ts"],"mappings":";;;;;;YA0BY,yBAAyB
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/types.ts"],"mappings":";;;;;;YA0BY,yBAAyB;;;;;;;;;;;;iBAkBpB,oBACf,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,kBACrB,qBACR,cACA,QACA,OACA,YACA;;;;;EAMA;;;;;;;;;;;;;YAcU,wBACV,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,YAC3B,iBACF,oBAAoB,cAAc,QAAQ,OAAO,YAAY;;;;;EAO7D,UAAU,QACR,oBACE,cACA,QACA,OACA,cACA,uBAEF;;;;;;;;;;;;;YAeQ,gCACV,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,wBACE,iBACF,4BACE,cACA,QACA,OACA,WACA;;;;;EAQF,UAAU,QACR,4BACE,cACA,QACA,OACA,WACA,wBAEF;;;;;;YAQQ,qBAAqB;;;;;;;;;;iBAUhB,gBACf,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,kBACrB,UACR,oBAAoB,cAAc,QAAQ,OAAO,cAAc;;;;;YAQrD,6BAA6B;;;;;;;;;;;iBAgBxB,wBACf,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,kBACrB,UACR,gBAAgB,cAAc,QAAQ,OAAO;;;;;EAO7C,UAAU,QACR,gBAAgB,cAAc,QAAQ,OAAO,uBAC7C;;;;;;YAQQ,6BAA6B;;;;;;;;;;;;iBAkBxB,wBACf,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,8BACQ,UACR,6BACE,cACA,QACA,OACA,WACA;;;;;EAQF;;;;;;YAOU,qCACV;;;;;;;;;;;;iBAYe,gCACf,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,8BACQ,UACR,wBAAwB,cAAc,QAAQ,OAAO,WAAW;;;;;EAOhE,UAAU,QACR,wBACE,cACA,QACA,OACA,WACA,wBAEF;;;;;;;;;YAWQ,mBACV,iBACA,SAAS,gBACP,oBAAoB,OAAO;;;;;;YAOnB,eACV,iBACA,SAAS,gBACP,mBAAmB,OAAO;;;;;;;YAQlB,uBACV,iBACA,SAAS,gBACP,iBACF,2BAA2B,OAAO;;;;;;;;YAWxB,sBACV,iBACA,SAAS,gBACP,2BAA2B,OAAO;;;;;;;YAQ1B,uBACV,iBACA,SAAS,gBACP,4BAA4B,OAAO;;;;;;;;YAS3B,8BACV,iBACA,SAAS,gBACP,mCAAmC,OAAO;;;;;;;YAQlC,+BACV,iBACA,SAAS,gBACP,UACF,mCAAmC,OAAO;;;;;YAQhC,wBAAwB;;;;;;;;;;iBAUnB,mBACf,iBACA,SAAS,cACT,mBACA,mCACQ,UACR,wBAAwB,OAAO,QAAQ,YAAY;;;;;;;;;;;;YAezC,kBACV,iBACA,SAAS,cACT,mBACA,iCAEG,MAAM,WACP,eAAe,OAAO,QAAQ,YAAY;;;;;;;;;;YAalC,uBACV,iBACA,SAAS,cACT,mBACA,6BACE,eAAe,OAAO,QAAQ,YAAY;;;;;;;;;;YAWlC,sBACV,iBACA,SAAS,cACT,sBACA,6BACE,SACF,uBAAuB,OAAO,QAAQ,YAAY;EAChD,QAAQ,kBAAkB,OAAO,QAAQ,YAAY;;;;;EAKvD,aAAa,uBACX,OACA,QACA,YACA;;;;;;;;;;YAYQ,kBACV,iBACA,SAAS,cACT,sBACA,6BACE,sBAAsB,OAAO,QAAQ,YAAY"}
|