@tanstack/react-query 5.0.0-alpha.85 → 5.0.0-alpha.87
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 +58 -0
- package/build/legacy/HydrationBoundary.cjs.map +1 -0
- package/build/legacy/HydrationBoundary.d.cts +12 -0
- package/build/legacy/HydrationBoundary.d.ts +12 -0
- package/build/legacy/HydrationBoundary.js +24 -0
- package/build/legacy/HydrationBoundary.js.map +1 -0
- package/build/legacy/QueryClientProvider.cjs +69 -0
- package/build/legacy/QueryClientProvider.cjs.map +1 -0
- package/build/legacy/QueryClientProvider.d.cts +12 -0
- package/build/legacy/QueryClientProvider.d.ts +12 -0
- package/build/legacy/QueryClientProvider.js +33 -0
- package/build/legacy/QueryClientProvider.js.map +1 -0
- package/build/legacy/QueryErrorResetBoundary.cjs +64 -0
- package/build/legacy/QueryErrorResetBoundary.cjs.map +1 -0
- package/build/legacy/QueryErrorResetBoundary.d.cts +14 -0
- package/build/legacy/QueryErrorResetBoundary.d.ts +14 -0
- package/build/legacy/QueryErrorResetBoundary.js +29 -0
- package/build/legacy/QueryErrorResetBoundary.js.map +1 -0
- package/build/legacy/errorBoundaryUtils.cjs +65 -0
- package/build/legacy/errorBoundaryUtils.cjs.map +1 -0
- package/build/legacy/errorBoundaryUtils.d.cts +14 -0
- package/build/legacy/errorBoundaryUtils.d.ts +14 -0
- package/build/{lib → legacy}/errorBoundaryUtils.js +10 -9
- package/build/legacy/errorBoundaryUtils.js.map +1 -0
- package/build/legacy/index.cjs +74 -0
- package/build/legacy/index.cjs.map +1 -0
- package/build/legacy/index.d.cts +14 -0
- package/build/legacy/index.d.ts +14 -0
- package/build/legacy/index.js +39 -0
- package/build/legacy/index.js.map +1 -0
- package/build/legacy/isRestoring.cjs +45 -0
- package/build/legacy/isRestoring.cjs.map +1 -0
- package/build/legacy/isRestoring.d.cts +6 -0
- package/build/legacy/isRestoring.d.ts +6 -0
- package/build/legacy/isRestoring.js +10 -0
- package/build/legacy/isRestoring.js.map +1 -0
- package/build/legacy/queryOptions.cjs +31 -0
- package/build/legacy/queryOptions.cjs.map +1 -0
- package/build/legacy/queryOptions.d.cts +13 -0
- package/build/legacy/queryOptions.d.ts +13 -0
- package/build/legacy/queryOptions.js +7 -0
- package/build/legacy/queryOptions.js.map +1 -0
- package/build/legacy/suspense.cjs +46 -0
- package/build/legacy/suspense.cjs.map +1 -0
- package/build/legacy/suspense.d.cts +10 -0
- package/build/legacy/suspense.d.ts +10 -0
- package/build/{lib/suspense.legacy.js → legacy/suspense.js} +10 -8
- package/build/legacy/suspense.js.map +1 -0
- package/build/legacy/types.cjs +17 -0
- package/build/legacy/types.cjs.map +1 -0
- package/build/legacy/types.d.cts +28 -0
- package/build/legacy/types.d.ts +28 -0
- package/build/legacy/types.js +1 -0
- package/build/legacy/types.js.map +1 -0
- package/build/legacy/useBaseQuery.cjs +90 -0
- package/build/legacy/useBaseQuery.cjs.map +1 -0
- package/build/legacy/useBaseQuery.d.cts +92 -0
- package/build/legacy/useBaseQuery.d.ts +92 -0
- package/build/legacy/useBaseQuery.js +60 -0
- package/build/legacy/useBaseQuery.js.map +1 -0
- package/build/legacy/useInfiniteQuery.cjs +39 -0
- package/build/legacy/useInfiniteQuery.cjs.map +1 -0
- package/build/legacy/useInfiniteQuery.d.cts +6 -0
- package/build/legacy/useInfiniteQuery.d.ts +6 -0
- package/build/legacy/useInfiniteQuery.js +15 -0
- package/build/legacy/useInfiniteQuery.js.map +1 -0
- package/build/legacy/useIsFetching.cjs +54 -0
- package/build/legacy/useIsFetching.cjs.map +1 -0
- package/build/legacy/useIsFetching.d.cts +5 -0
- package/build/legacy/useIsFetching.d.ts +5 -0
- package/build/legacy/useIsFetching.js +20 -0
- package/build/legacy/useIsFetching.js.map +1 -0
- package/build/legacy/useMutation.cjs +75 -0
- package/build/legacy/useMutation.cjs.map +1 -0
- package/build/legacy/useMutation.d.cts +6 -0
- package/build/legacy/useMutation.d.ts +6 -0
- package/build/legacy/useMutation.js +41 -0
- package/build/legacy/useMutation.js.map +1 -0
- package/build/legacy/useMutationState.cjs +86 -0
- package/build/legacy/useMutationState.cjs.map +1 -0
- package/build/legacy/useMutationState.d.cts +10 -0
- package/build/legacy/useMutationState.d.ts +10 -0
- package/build/legacy/useMutationState.js +51 -0
- package/build/legacy/useMutationState.js.map +1 -0
- package/build/legacy/useQueries.cjs +126 -0
- package/build/legacy/useQueries.cjs.map +1 -0
- package/build/legacy/useQueries.d.cts +53 -0
- package/build/{lib → legacy}/useQueries.d.ts +8 -7
- package/build/legacy/useQueries.js +101 -0
- package/build/legacy/useQueries.js.map +1 -0
- package/build/legacy/useQuery.cjs +34 -0
- package/build/legacy/useQuery.cjs.map +1 -0
- package/build/legacy/useQuery.d.cts +8 -0
- package/build/legacy/useQuery.d.ts +8 -0
- package/build/legacy/useQuery.js +10 -0
- package/build/legacy/useQuery.js.map +1 -0
- package/build/legacy/utils.cjs +34 -0
- package/build/legacy/utils.cjs.map +1 -0
- package/build/legacy/utils.d.cts +3 -0
- package/build/legacy/utils.d.ts +3 -0
- package/build/legacy/utils.js +10 -0
- package/build/legacy/utils.js.map +1 -0
- package/build/modern/HydrationBoundary.cjs +58 -0
- package/build/modern/HydrationBoundary.cjs.map +1 -0
- package/build/modern/HydrationBoundary.d.cts +12 -0
- package/build/modern/HydrationBoundary.d.ts +12 -0
- package/build/modern/HydrationBoundary.js +24 -0
- package/build/modern/HydrationBoundary.js.map +1 -0
- package/build/modern/QueryClientProvider.cjs +69 -0
- package/build/modern/QueryClientProvider.cjs.map +1 -0
- package/build/modern/QueryClientProvider.d.cts +12 -0
- package/build/modern/QueryClientProvider.d.ts +12 -0
- package/build/modern/QueryClientProvider.js +33 -0
- package/build/modern/QueryClientProvider.js.map +1 -0
- package/build/modern/QueryErrorResetBoundary.cjs +64 -0
- package/build/modern/QueryErrorResetBoundary.cjs.map +1 -0
- package/build/modern/QueryErrorResetBoundary.d.cts +14 -0
- package/build/modern/QueryErrorResetBoundary.d.ts +14 -0
- package/build/modern/QueryErrorResetBoundary.js +29 -0
- package/build/modern/QueryErrorResetBoundary.js.map +1 -0
- package/build/modern/errorBoundaryUtils.cjs +65 -0
- package/build/modern/errorBoundaryUtils.cjs.map +1 -0
- package/build/modern/errorBoundaryUtils.d.cts +14 -0
- package/build/modern/errorBoundaryUtils.d.ts +14 -0
- package/build/{lib/errorBoundaryUtils.legacy.js → modern/errorBoundaryUtils.js} +10 -9
- package/build/modern/errorBoundaryUtils.js.map +1 -0
- package/build/modern/index.cjs +74 -0
- package/build/modern/index.cjs.map +1 -0
- package/build/modern/index.d.cts +14 -0
- package/build/modern/index.d.ts +14 -0
- package/build/modern/index.js +39 -0
- package/build/modern/index.js.map +1 -0
- package/build/modern/isRestoring.cjs +45 -0
- package/build/modern/isRestoring.cjs.map +1 -0
- package/build/modern/isRestoring.d.cts +6 -0
- package/build/modern/isRestoring.d.ts +6 -0
- package/build/modern/isRestoring.js +10 -0
- package/build/modern/isRestoring.js.map +1 -0
- package/build/modern/queryOptions.cjs +31 -0
- package/build/modern/queryOptions.cjs.map +1 -0
- package/build/modern/queryOptions.d.cts +13 -0
- package/build/modern/queryOptions.d.ts +13 -0
- package/build/modern/queryOptions.js +7 -0
- package/build/modern/queryOptions.js.map +1 -0
- package/build/modern/suspense.cjs +46 -0
- package/build/modern/suspense.cjs.map +1 -0
- package/build/modern/suspense.d.cts +10 -0
- package/build/modern/suspense.d.ts +10 -0
- package/build/{lib → modern}/suspense.js +10 -8
- package/build/modern/suspense.js.map +1 -0
- package/build/modern/types.cjs +17 -0
- package/build/modern/types.cjs.map +1 -0
- package/build/modern/types.d.cts +28 -0
- package/build/modern/types.d.ts +28 -0
- package/build/modern/types.js +1 -0
- package/build/modern/types.js.map +1 -0
- package/build/modern/useBaseQuery.cjs +90 -0
- package/build/modern/useBaseQuery.cjs.map +1 -0
- package/build/modern/useBaseQuery.d.cts +92 -0
- package/build/modern/useBaseQuery.d.ts +92 -0
- package/build/modern/useBaseQuery.js +60 -0
- package/build/modern/useBaseQuery.js.map +1 -0
- package/build/modern/useInfiniteQuery.cjs +39 -0
- package/build/modern/useInfiniteQuery.cjs.map +1 -0
- package/build/modern/useInfiniteQuery.d.cts +6 -0
- package/build/modern/useInfiniteQuery.d.ts +6 -0
- package/build/modern/useInfiniteQuery.js +15 -0
- package/build/modern/useInfiniteQuery.js.map +1 -0
- package/build/modern/useIsFetching.cjs +54 -0
- package/build/modern/useIsFetching.cjs.map +1 -0
- package/build/modern/useIsFetching.d.cts +5 -0
- package/build/modern/useIsFetching.d.ts +5 -0
- package/build/modern/useIsFetching.js +20 -0
- package/build/modern/useIsFetching.js.map +1 -0
- package/build/modern/useMutation.cjs +75 -0
- package/build/modern/useMutation.cjs.map +1 -0
- package/build/modern/useMutation.d.cts +6 -0
- package/build/modern/useMutation.d.ts +6 -0
- package/build/modern/useMutation.js +41 -0
- package/build/modern/useMutation.js.map +1 -0
- package/build/modern/useMutationState.cjs +86 -0
- package/build/modern/useMutationState.cjs.map +1 -0
- package/build/modern/useMutationState.d.cts +10 -0
- package/build/modern/useMutationState.d.ts +10 -0
- package/build/modern/useMutationState.js +51 -0
- package/build/modern/useMutationState.js.map +1 -0
- package/build/modern/useQueries.cjs +123 -0
- package/build/modern/useQueries.cjs.map +1 -0
- package/build/modern/useQueries.d.cts +53 -0
- package/build/modern/useQueries.d.ts +53 -0
- package/build/modern/useQueries.js +98 -0
- package/build/modern/useQueries.js.map +1 -0
- package/build/modern/useQuery.cjs +34 -0
- package/build/modern/useQuery.cjs.map +1 -0
- package/build/modern/useQuery.d.cts +8 -0
- package/build/modern/useQuery.d.ts +8 -0
- package/build/modern/useQuery.js +10 -0
- package/build/modern/useQuery.js.map +1 -0
- package/build/modern/utils.cjs +34 -0
- package/build/modern/utils.cjs.map +1 -0
- package/build/modern/utils.d.cts +3 -0
- package/build/modern/utils.d.ts +3 -0
- package/build/modern/utils.js +10 -0
- package/build/modern/utils.js.map +1 -0
- package/package.json +18 -16
- package/src/__tests__/useMutation.test.tsx +16 -17
- package/src/__tests__/useQuery.test.tsx +27 -56
- package/src/__tests__/utils.tsx +6 -3
- package/build/codemods/__testfixtures__/default-import.input.tsx +0 -94
- package/build/codemods/__testfixtures__/default-import.output.tsx +0 -96
- package/build/codemods/__testfixtures__/named-import.input.tsx +0 -96
- package/build/codemods/__testfixtures__/named-import.output.tsx +0 -98
- package/build/codemods/__testfixtures__/namespaced-import.input.tsx +0 -86
- package/build/codemods/__testfixtures__/namespaced-import.output.tsx +0 -88
- package/build/codemods/__testfixtures__/parameter-is-identifier.input.tsx +0 -49
- package/build/codemods/__testfixtures__/parameter-is-identifier.output.tsx +0 -49
- package/build/codemods/__testfixtures__/parameter-is-object-expression.input.tsx +0 -128
- package/build/codemods/__testfixtures__/parameter-is-object-expression.output.tsx +0 -175
- package/build/codemods/__testfixtures__/replace-import-specifier.input.tsx +0 -10
- package/build/codemods/__testfixtures__/replace-import-specifier.output.tsx +0 -10
- package/build/codemods/__testfixtures__/type-arguments.input.tsx +0 -25
- package/build/codemods/__testfixtures__/type-arguments.output.tsx +0 -31
- package/build/codemods/__tests__/key-transformation.test.js +0 -32
- package/build/codemods/__tests__/replace-import-specifier.test.js +0 -12
- package/build/codemods/remove-overloads/__testfixtures__/default-import.input.tsx +0 -199
- package/build/codemods/remove-overloads/__testfixtures__/default-import.output.tsx +0 -484
- package/build/codemods/remove-overloads/__tests__/remove-overloads.test.js +0 -6
- package/build/lib/HydrationBoundary.cjs +0 -50
- package/build/lib/HydrationBoundary.cjs.map +0 -1
- package/build/lib/HydrationBoundary.d.ts +0 -10
- package/build/lib/HydrationBoundary.d.ts.map +0 -1
- package/build/lib/HydrationBoundary.js +0 -29
- package/build/lib/HydrationBoundary.js.map +0 -1
- package/build/lib/HydrationBoundary.legacy.cjs +0 -50
- package/build/lib/HydrationBoundary.legacy.cjs.map +0 -1
- package/build/lib/HydrationBoundary.legacy.js +0 -29
- package/build/lib/HydrationBoundary.legacy.js.map +0 -1
- package/build/lib/QueryClientProvider.cjs +0 -54
- package/build/lib/QueryClientProvider.cjs.map +0 -1
- package/build/lib/QueryClientProvider.d.ts +0 -10
- package/build/lib/QueryClientProvider.d.ts.map +0 -1
- package/build/lib/QueryClientProvider.js +0 -31
- package/build/lib/QueryClientProvider.js.map +0 -1
- package/build/lib/QueryClientProvider.legacy.cjs +0 -54
- package/build/lib/QueryClientProvider.legacy.cjs.map +0 -1
- package/build/lib/QueryClientProvider.legacy.js +0 -31
- package/build/lib/QueryClientProvider.legacy.js.map +0 -1
- package/build/lib/QueryErrorResetBoundary.cjs +0 -60
- package/build/lib/QueryErrorResetBoundary.cjs.map +0 -1
- package/build/lib/QueryErrorResetBoundary.d.ts +0 -12
- package/build/lib/QueryErrorResetBoundary.d.ts.map +0 -1
- package/build/lib/QueryErrorResetBoundary.js +0 -38
- package/build/lib/QueryErrorResetBoundary.js.map +0 -1
- package/build/lib/QueryErrorResetBoundary.legacy.cjs +0 -60
- package/build/lib/QueryErrorResetBoundary.legacy.cjs.map +0 -1
- package/build/lib/QueryErrorResetBoundary.legacy.js +0 -38
- package/build/lib/QueryErrorResetBoundary.legacy.js.map +0 -1
- package/build/lib/__tests__/HydrationBoundary.test.d.ts +0 -2
- package/build/lib/__tests__/HydrationBoundary.test.d.ts.map +0 -1
- package/build/lib/__tests__/QueryClientProvider.test.d.ts +0 -2
- package/build/lib/__tests__/QueryClientProvider.test.d.ts.map +0 -1
- package/build/lib/__tests__/QueryResetErrorBoundary.test.d.ts +0 -7
- package/build/lib/__tests__/QueryResetErrorBoundary.test.d.ts.map +0 -1
- package/build/lib/__tests__/ssr-hydration.test.d.ts +0 -2
- package/build/lib/__tests__/ssr-hydration.test.d.ts.map +0 -1
- package/build/lib/__tests__/ssr.test.d.ts +0 -2
- package/build/lib/__tests__/ssr.test.d.ts.map +0 -1
- package/build/lib/__tests__/suspense.test.d.ts +0 -2
- package/build/lib/__tests__/suspense.test.d.ts.map +0 -1
- package/build/lib/__tests__/useInfiniteQuery.test.d.ts +0 -2
- package/build/lib/__tests__/useInfiniteQuery.test.d.ts.map +0 -1
- package/build/lib/__tests__/useInfiniteQuery.type.test.d.ts +0 -2
- package/build/lib/__tests__/useInfiniteQuery.type.test.d.ts.map +0 -1
- package/build/lib/__tests__/useIsFetching.test.d.ts +0 -2
- package/build/lib/__tests__/useIsFetching.test.d.ts.map +0 -1
- package/build/lib/__tests__/useMutation.test.d.ts +0 -2
- package/build/lib/__tests__/useMutation.test.d.ts.map +0 -1
- package/build/lib/__tests__/useMutationState.test.d.ts +0 -2
- package/build/lib/__tests__/useMutationState.test.d.ts.map +0 -1
- package/build/lib/__tests__/useQueries.test.d.ts +0 -2
- package/build/lib/__tests__/useQueries.test.d.ts.map +0 -1
- package/build/lib/__tests__/useQuery.test.d.ts +0 -2
- package/build/lib/__tests__/useQuery.test.d.ts.map +0 -1
- package/build/lib/__tests__/useQuery.types.test.d.ts +0 -2
- package/build/lib/__tests__/useQuery.types.test.d.ts.map +0 -1
- package/build/lib/__tests__/utils.d.ts +0 -30
- package/build/lib/__tests__/utils.d.ts.map +0 -1
- package/build/lib/errorBoundaryUtils.cjs +0 -51
- package/build/lib/errorBoundaryUtils.cjs.map +0 -1
- package/build/lib/errorBoundaryUtils.d.ts +0 -11
- package/build/lib/errorBoundaryUtils.d.ts.map +0 -1
- package/build/lib/errorBoundaryUtils.js.map +0 -1
- package/build/lib/errorBoundaryUtils.legacy.cjs +0 -51
- package/build/lib/errorBoundaryUtils.legacy.cjs.map +0 -1
- package/build/lib/errorBoundaryUtils.legacy.js.map +0 -1
- package/build/lib/index.cjs +0 -40
- package/build/lib/index.cjs.map +0 -1
- package/build/lib/index.d.ts +0 -18
- package/build/lib/index.d.ts.map +0 -1
- package/build/lib/index.js +0 -13
- package/build/lib/index.js.map +0 -1
- package/build/lib/index.legacy.cjs +0 -40
- package/build/lib/index.legacy.cjs.map +0 -1
- package/build/lib/index.legacy.js +0 -13
- package/build/lib/index.legacy.js.map +0 -1
- package/build/lib/isRestoring.cjs +0 -31
- package/build/lib/isRestoring.cjs.map +0 -1
- package/build/lib/isRestoring.d.ts +0 -4
- package/build/lib/isRestoring.d.ts.map +0 -1
- package/build/lib/isRestoring.js +0 -9
- package/build/lib/isRestoring.js.map +0 -1
- package/build/lib/isRestoring.legacy.cjs +0 -31
- package/build/lib/isRestoring.legacy.cjs.map +0 -1
- package/build/lib/isRestoring.legacy.js +0 -9
- package/build/lib/isRestoring.legacy.js.map +0 -1
- package/build/lib/queryOptions.cjs +0 -8
- package/build/lib/queryOptions.cjs.map +0 -1
- package/build/lib/queryOptions.d.ts +0 -11
- package/build/lib/queryOptions.d.ts.map +0 -1
- package/build/lib/queryOptions.js +0 -6
- package/build/lib/queryOptions.js.map +0 -1
- package/build/lib/queryOptions.legacy.cjs +0 -8
- package/build/lib/queryOptions.legacy.cjs.map +0 -1
- package/build/lib/queryOptions.legacy.js +0 -6
- package/build/lib/queryOptions.legacy.js.map +0 -1
- package/build/lib/suspense.cjs +0 -22
- package/build/lib/suspense.cjs.map +0 -1
- package/build/lib/suspense.d.ts +0 -7
- package/build/lib/suspense.d.ts.map +0 -1
- package/build/lib/suspense.js.map +0 -1
- package/build/lib/suspense.legacy.cjs +0 -22
- package/build/lib/suspense.legacy.cjs.map +0 -1
- package/build/lib/suspense.legacy.js.map +0 -1
- package/build/lib/types.d.ts +0 -27
- package/build/lib/types.d.ts.map +0 -1
- package/build/lib/useBaseQuery.cjs +0 -80
- package/build/lib/useBaseQuery.cjs.map +0 -1
- package/build/lib/useBaseQuery.d.ts +0 -4
- package/build/lib/useBaseQuery.d.ts.map +0 -1
- package/build/lib/useBaseQuery.js +0 -59
- package/build/lib/useBaseQuery.js.map +0 -1
- package/build/lib/useBaseQuery.legacy.cjs +0 -80
- package/build/lib/useBaseQuery.legacy.cjs.map +0 -1
- package/build/lib/useBaseQuery.legacy.js +0 -59
- package/build/lib/useBaseQuery.legacy.js.map +0 -1
- package/build/lib/useInfiniteQuery.cjs +0 -15
- package/build/lib/useInfiniteQuery.cjs.map +0 -1
- package/build/lib/useInfiniteQuery.d.ts +0 -4
- package/build/lib/useInfiniteQuery.d.ts.map +0 -1
- package/build/lib/useInfiniteQuery.js +0 -13
- package/build/lib/useInfiniteQuery.js.map +0 -1
- package/build/lib/useInfiniteQuery.legacy.cjs +0 -15
- package/build/lib/useInfiniteQuery.legacy.cjs.map +0 -1
- package/build/lib/useInfiniteQuery.legacy.js +0 -13
- package/build/lib/useInfiniteQuery.legacy.js.map +0 -1
- package/build/lib/useIsFetching.cjs +0 -34
- package/build/lib/useIsFetching.cjs.map +0 -1
- package/build/lib/useIsFetching.d.ts +0 -3
- package/build/lib/useIsFetching.d.ts.map +0 -1
- package/build/lib/useIsFetching.js +0 -13
- package/build/lib/useIsFetching.js.map +0 -1
- package/build/lib/useIsFetching.legacy.cjs +0 -34
- package/build/lib/useIsFetching.legacy.cjs.map +0 -1
- package/build/lib/useIsFetching.legacy.js +0 -13
- package/build/lib/useIsFetching.legacy.js.map +0 -1
- package/build/lib/useMutation.cjs +0 -54
- package/build/lib/useMutation.cjs.map +0 -1
- package/build/lib/useMutation.d.ts +0 -4
- package/build/lib/useMutation.d.ts.map +0 -1
- package/build/lib/useMutation.js +0 -33
- package/build/lib/useMutation.js.map +0 -1
- package/build/lib/useMutation.legacy.cjs +0 -54
- package/build/lib/useMutation.legacy.cjs.map +0 -1
- package/build/lib/useMutation.legacy.js +0 -33
- package/build/lib/useMutation.legacy.js.map +0 -1
- package/build/lib/useMutationState.cjs +0 -60
- package/build/lib/useMutationState.cjs.map +0 -1
- package/build/lib/useMutationState.d.ts +0 -9
- package/build/lib/useMutationState.d.ts.map +0 -1
- package/build/lib/useMutationState.js +0 -38
- package/build/lib/useMutationState.js.map +0 -1
- package/build/lib/useMutationState.legacy.cjs +0 -60
- package/build/lib/useMutationState.legacy.cjs.map +0 -1
- package/build/lib/useMutationState.legacy.js +0 -38
- package/build/lib/useMutationState.legacy.js.map +0 -1
- package/build/lib/useQueries.cjs +0 -99
- package/build/lib/useQueries.cjs.map +0 -1
- package/build/lib/useQueries.d.ts.map +0 -1
- package/build/lib/useQueries.js +0 -78
- package/build/lib/useQueries.js.map +0 -1
- package/build/lib/useQueries.legacy.cjs +0 -102
- package/build/lib/useQueries.legacy.cjs.map +0 -1
- package/build/lib/useQueries.legacy.js +0 -81
- package/build/lib/useQueries.legacy.js.map +0 -1
- package/build/lib/useQuery.cjs +0 -14
- package/build/lib/useQuery.cjs.map +0 -1
- package/build/lib/useQuery.d.ts +0 -6
- package/build/lib/useQuery.d.ts.map +0 -1
- package/build/lib/useQuery.js +0 -12
- package/build/lib/useQuery.js.map +0 -1
- package/build/lib/useQuery.legacy.cjs +0 -14
- package/build/lib/useQuery.legacy.cjs.map +0 -1
- package/build/lib/useQuery.legacy.js +0 -12
- package/build/lib/useQuery.legacy.js.map +0 -1
- package/build/lib/utils.cjs +0 -12
- package/build/lib/utils.cjs.map +0 -1
- package/build/lib/utils.d.ts +0 -2
- package/build/lib/utils.d.ts.map +0 -1
- package/build/lib/utils.js +0 -10
- package/build/lib/utils.js.map +0 -1
- package/build/lib/utils.legacy.cjs +0 -12
- package/build/lib/utils.legacy.cjs.map +0 -1
- package/build/lib/utils.legacy.js +0 -10
- package/build/lib/utils.legacy.js.map +0 -1
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
var React = require('react');
|
|
5
|
-
|
|
6
|
-
function _interopNamespaceDefault(e) {
|
|
7
|
-
var n = Object.create(null);
|
|
8
|
-
if (e) {
|
|
9
|
-
Object.keys(e).forEach(function (k) {
|
|
10
|
-
if (k !== 'default') {
|
|
11
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () { return e[k]; }
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
n.default = e;
|
|
20
|
-
return Object.freeze(n);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
24
|
-
|
|
25
|
-
const QueryClientContext = /*#__PURE__*/React__namespace.createContext(undefined);
|
|
26
|
-
const useQueryClient = queryClient => {
|
|
27
|
-
const client = React__namespace.useContext(QueryClientContext);
|
|
28
|
-
if (queryClient) {
|
|
29
|
-
return queryClient;
|
|
30
|
-
}
|
|
31
|
-
if (!client) {
|
|
32
|
-
throw new Error('No QueryClient set, use QueryClientProvider to set one');
|
|
33
|
-
}
|
|
34
|
-
return client;
|
|
35
|
-
};
|
|
36
|
-
const QueryClientProvider = ({
|
|
37
|
-
client,
|
|
38
|
-
children
|
|
39
|
-
}) => {
|
|
40
|
-
React__namespace.useEffect(() => {
|
|
41
|
-
client.mount();
|
|
42
|
-
return () => {
|
|
43
|
-
client.unmount();
|
|
44
|
-
};
|
|
45
|
-
}, [client]);
|
|
46
|
-
return /*#__PURE__*/React__namespace.createElement(QueryClientContext.Provider, {
|
|
47
|
-
value: client
|
|
48
|
-
}, children);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
exports.QueryClientContext = QueryClientContext;
|
|
52
|
-
exports.QueryClientProvider = QueryClientProvider;
|
|
53
|
-
exports.useQueryClient = useQueryClient;
|
|
54
|
-
//# sourceMappingURL=QueryClientProvider.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryClientProvider.cjs","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["useQueryClient","children","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAKO;AAIMA;AACX;AAEA;AACE;AACF;;AAGE;AACF;AAEA;AACF;AAOO;;AAELC;AACwB;;;AAGtB;;;AAGF;AAEA;AAC+BC;AAAc;AAI/C;;;;"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { QueryClient } from '@tanstack/query-core';
|
|
3
|
-
export declare const QueryClientContext: React.Context<QueryClient | undefined>;
|
|
4
|
-
export declare const useQueryClient: (queryClient?: QueryClient) => QueryClient;
|
|
5
|
-
export type QueryClientProviderProps = {
|
|
6
|
-
client: QueryClient;
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
};
|
|
9
|
-
export declare const QueryClientProvider: ({ client, children, }: QueryClientProviderProps) => JSX.Element;
|
|
10
|
-
//# sourceMappingURL=QueryClientProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryClientProvider.d.ts","sourceRoot":"","sources":["../../src/QueryClientProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEvD,eAAO,MAAM,kBAAkB,wCAE9B,CAAA;AAED,eAAO,MAAM,cAAc,iBAAkB,WAAW,gBAYvD,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,WAAW,CAAA;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,mBAAmB,0BAG7B,wBAAwB,KAAG,WAa7B,CAAA"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
const QueryClientContext = /*#__PURE__*/React.createContext(undefined);
|
|
5
|
-
const useQueryClient = queryClient => {
|
|
6
|
-
const client = React.useContext(QueryClientContext);
|
|
7
|
-
if (queryClient) {
|
|
8
|
-
return queryClient;
|
|
9
|
-
}
|
|
10
|
-
if (!client) {
|
|
11
|
-
throw new Error('No QueryClient set, use QueryClientProvider to set one');
|
|
12
|
-
}
|
|
13
|
-
return client;
|
|
14
|
-
};
|
|
15
|
-
const QueryClientProvider = ({
|
|
16
|
-
client,
|
|
17
|
-
children
|
|
18
|
-
}) => {
|
|
19
|
-
React.useEffect(() => {
|
|
20
|
-
client.mount();
|
|
21
|
-
return () => {
|
|
22
|
-
client.unmount();
|
|
23
|
-
};
|
|
24
|
-
}, [client]);
|
|
25
|
-
return /*#__PURE__*/React.createElement(QueryClientContext.Provider, {
|
|
26
|
-
value: client
|
|
27
|
-
}, children);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export { QueryClientContext, QueryClientProvider, useQueryClient };
|
|
31
|
-
//# sourceMappingURL=QueryClientProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryClientProvider.js","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["useQueryClient","children","value"],"mappings":";;;AAKO;AAIMA;AACX;AAEA;AACE;AACF;;AAGE;AACF;AAEA;AACF;AAOO;;AAELC;AACwB;;;AAGtB;;;AAGF;AAEA;AAC+BC;AAAc;AAI/C;;"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
var React = require('react');
|
|
5
|
-
|
|
6
|
-
function _interopNamespaceDefault(e) {
|
|
7
|
-
var n = Object.create(null);
|
|
8
|
-
if (e) {
|
|
9
|
-
Object.keys(e).forEach(function (k) {
|
|
10
|
-
if (k !== 'default') {
|
|
11
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () { return e[k]; }
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
n.default = e;
|
|
20
|
-
return Object.freeze(n);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
24
|
-
|
|
25
|
-
const QueryClientContext = /*#__PURE__*/React__namespace.createContext(undefined);
|
|
26
|
-
const useQueryClient = queryClient => {
|
|
27
|
-
const client = React__namespace.useContext(QueryClientContext);
|
|
28
|
-
if (queryClient) {
|
|
29
|
-
return queryClient;
|
|
30
|
-
}
|
|
31
|
-
if (!client) {
|
|
32
|
-
throw new Error('No QueryClient set, use QueryClientProvider to set one');
|
|
33
|
-
}
|
|
34
|
-
return client;
|
|
35
|
-
};
|
|
36
|
-
const QueryClientProvider = ({
|
|
37
|
-
client,
|
|
38
|
-
children
|
|
39
|
-
}) => {
|
|
40
|
-
React__namespace.useEffect(() => {
|
|
41
|
-
client.mount();
|
|
42
|
-
return () => {
|
|
43
|
-
client.unmount();
|
|
44
|
-
};
|
|
45
|
-
}, [client]);
|
|
46
|
-
return /*#__PURE__*/React__namespace.createElement(QueryClientContext.Provider, {
|
|
47
|
-
value: client
|
|
48
|
-
}, children);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
exports.QueryClientContext = QueryClientContext;
|
|
52
|
-
exports.QueryClientProvider = QueryClientProvider;
|
|
53
|
-
exports.useQueryClient = useQueryClient;
|
|
54
|
-
//# sourceMappingURL=QueryClientProvider.legacy.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryClientProvider.legacy.cjs","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["useQueryClient","children","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAKO;AAIMA;AACX;AAEA;AACE;AACF;;AAGE;AACF;AAEA;AACF;AAOO;;AAELC;AACwB;;;AAGtB;;;AAGF;AAEA;AAC+BC;AAAc;AAI/C;;;;"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
const QueryClientContext = /*#__PURE__*/React.createContext(undefined);
|
|
5
|
-
const useQueryClient = queryClient => {
|
|
6
|
-
const client = React.useContext(QueryClientContext);
|
|
7
|
-
if (queryClient) {
|
|
8
|
-
return queryClient;
|
|
9
|
-
}
|
|
10
|
-
if (!client) {
|
|
11
|
-
throw new Error('No QueryClient set, use QueryClientProvider to set one');
|
|
12
|
-
}
|
|
13
|
-
return client;
|
|
14
|
-
};
|
|
15
|
-
const QueryClientProvider = ({
|
|
16
|
-
client,
|
|
17
|
-
children
|
|
18
|
-
}) => {
|
|
19
|
-
React.useEffect(() => {
|
|
20
|
-
client.mount();
|
|
21
|
-
return () => {
|
|
22
|
-
client.unmount();
|
|
23
|
-
};
|
|
24
|
-
}, [client]);
|
|
25
|
-
return /*#__PURE__*/React.createElement(QueryClientContext.Provider, {
|
|
26
|
-
value: client
|
|
27
|
-
}, children);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export { QueryClientContext, QueryClientProvider, useQueryClient };
|
|
31
|
-
//# sourceMappingURL=QueryClientProvider.legacy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryClientProvider.legacy.js","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["useQueryClient","children","value"],"mappings":";;;AAKO;AAIMA;AACX;AAEA;AACE;AACF;;AAGE;AACF;AAEA;AACF;AAOO;;AAELC;AACwB;;;AAGtB;;;AAGF;AAEA;AAC+BC;AAAc;AAI/C;;"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
var React = require('react');
|
|
5
|
-
|
|
6
|
-
function _interopNamespaceDefault(e) {
|
|
7
|
-
var n = Object.create(null);
|
|
8
|
-
if (e) {
|
|
9
|
-
Object.keys(e).forEach(function (k) {
|
|
10
|
-
if (k !== 'default') {
|
|
11
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () { return e[k]; }
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
n.default = e;
|
|
20
|
-
return Object.freeze(n);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
24
|
-
|
|
25
|
-
// CONTEXT
|
|
26
|
-
|
|
27
|
-
function createValue() {
|
|
28
|
-
let isReset = false;
|
|
29
|
-
return {
|
|
30
|
-
clearReset: () => {
|
|
31
|
-
isReset = false;
|
|
32
|
-
},
|
|
33
|
-
reset: () => {
|
|
34
|
-
isReset = true;
|
|
35
|
-
},
|
|
36
|
-
isReset: () => {
|
|
37
|
-
return isReset;
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
const QueryErrorResetBoundaryContext = /*#__PURE__*/React__namespace.createContext(createValue());
|
|
42
|
-
|
|
43
|
-
// HOOK
|
|
44
|
-
|
|
45
|
-
const useQueryErrorResetBoundary = () => React__namespace.useContext(QueryErrorResetBoundaryContext);
|
|
46
|
-
|
|
47
|
-
// COMPONENT
|
|
48
|
-
|
|
49
|
-
const QueryErrorResetBoundary = ({
|
|
50
|
-
children
|
|
51
|
-
}) => {
|
|
52
|
-
const [value] = React__namespace.useState(() => createValue());
|
|
53
|
-
return /*#__PURE__*/React__namespace.createElement(QueryErrorResetBoundaryContext.Provider, {
|
|
54
|
-
value: value
|
|
55
|
-
}, typeof children === 'function' ? children(value) : children);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
exports.QueryErrorResetBoundary = QueryErrorResetBoundary;
|
|
59
|
-
exports.useQueryErrorResetBoundary = useQueryErrorResetBoundary;
|
|
60
|
-
//# sourceMappingURL=QueryErrorResetBoundary.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryErrorResetBoundary.cjs","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["isReset","children","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGA;;AAQA;;;;AAIMA;;;AAGAA;;;AAGA;AACF;;AAEJ;AAEA;;AAEA;;AAEO;;AAGP;;AAQO;AACLC;AAC4B;AAC5B;AACA;AAC2CC;;AAM7C;;;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface QueryErrorResetBoundaryValue {
|
|
3
|
-
clearReset: () => void;
|
|
4
|
-
isReset: () => boolean;
|
|
5
|
-
reset: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const useQueryErrorResetBoundary: () => QueryErrorResetBoundaryValue;
|
|
8
|
-
export interface QueryErrorResetBoundaryProps {
|
|
9
|
-
children: ((value: QueryErrorResetBoundaryValue) => React.ReactNode) | React.ReactNode;
|
|
10
|
-
}
|
|
11
|
-
export declare const QueryErrorResetBoundary: ({ children, }: QueryErrorResetBoundaryProps) => JSX.Element;
|
|
12
|
-
//# sourceMappingURL=QueryErrorResetBoundary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryErrorResetBoundary.d.ts","sourceRoot":"","sources":["../../src/QueryErrorResetBoundary.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,OAAO,EAAE,MAAM,OAAO,CAAA;IACtB,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAqBD,eAAO,MAAM,0BAA0B,oCACW,CAAA;AAIlD,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EACJ,CAAC,CAAC,KAAK,EAAE,4BAA4B,KAAK,KAAK,CAAC,SAAS,CAAC,GAC1D,KAAK,CAAC,SAAS,CAAA;CACpB;AAED,eAAO,MAAM,uBAAuB,kBAEjC,4BAA4B,gBAS9B,CAAA"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
// CONTEXT
|
|
5
|
-
|
|
6
|
-
function createValue() {
|
|
7
|
-
let isReset = false;
|
|
8
|
-
return {
|
|
9
|
-
clearReset: () => {
|
|
10
|
-
isReset = false;
|
|
11
|
-
},
|
|
12
|
-
reset: () => {
|
|
13
|
-
isReset = true;
|
|
14
|
-
},
|
|
15
|
-
isReset: () => {
|
|
16
|
-
return isReset;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
const QueryErrorResetBoundaryContext = /*#__PURE__*/React.createContext(createValue());
|
|
21
|
-
|
|
22
|
-
// HOOK
|
|
23
|
-
|
|
24
|
-
const useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
|
|
25
|
-
|
|
26
|
-
// COMPONENT
|
|
27
|
-
|
|
28
|
-
const QueryErrorResetBoundary = ({
|
|
29
|
-
children
|
|
30
|
-
}) => {
|
|
31
|
-
const [value] = React.useState(() => createValue());
|
|
32
|
-
return /*#__PURE__*/React.createElement(QueryErrorResetBoundaryContext.Provider, {
|
|
33
|
-
value: value
|
|
34
|
-
}, typeof children === 'function' ? children(value) : children);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export { QueryErrorResetBoundary, useQueryErrorResetBoundary };
|
|
38
|
-
//# sourceMappingURL=QueryErrorResetBoundary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryErrorResetBoundary.js","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["isReset","children","value"],"mappings":";;;AAGA;;AAQA;;;;AAIMA;;;AAGAA;;;AAGA;AACF;;AAEJ;AAEA;;AAEA;;AAEO;;AAGP;;AAQO;AACLC;AAC4B;AAC5B;AACA;AAC2CC;;AAM7C;;"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
var React = require('react');
|
|
5
|
-
|
|
6
|
-
function _interopNamespaceDefault(e) {
|
|
7
|
-
var n = Object.create(null);
|
|
8
|
-
if (e) {
|
|
9
|
-
Object.keys(e).forEach(function (k) {
|
|
10
|
-
if (k !== 'default') {
|
|
11
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () { return e[k]; }
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
n.default = e;
|
|
20
|
-
return Object.freeze(n);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
24
|
-
|
|
25
|
-
// CONTEXT
|
|
26
|
-
|
|
27
|
-
function createValue() {
|
|
28
|
-
let isReset = false;
|
|
29
|
-
return {
|
|
30
|
-
clearReset: () => {
|
|
31
|
-
isReset = false;
|
|
32
|
-
},
|
|
33
|
-
reset: () => {
|
|
34
|
-
isReset = true;
|
|
35
|
-
},
|
|
36
|
-
isReset: () => {
|
|
37
|
-
return isReset;
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
const QueryErrorResetBoundaryContext = /*#__PURE__*/React__namespace.createContext(createValue());
|
|
42
|
-
|
|
43
|
-
// HOOK
|
|
44
|
-
|
|
45
|
-
const useQueryErrorResetBoundary = () => React__namespace.useContext(QueryErrorResetBoundaryContext);
|
|
46
|
-
|
|
47
|
-
// COMPONENT
|
|
48
|
-
|
|
49
|
-
const QueryErrorResetBoundary = ({
|
|
50
|
-
children
|
|
51
|
-
}) => {
|
|
52
|
-
const [value] = React__namespace.useState(() => createValue());
|
|
53
|
-
return /*#__PURE__*/React__namespace.createElement(QueryErrorResetBoundaryContext.Provider, {
|
|
54
|
-
value: value
|
|
55
|
-
}, typeof children === 'function' ? children(value) : children);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
exports.QueryErrorResetBoundary = QueryErrorResetBoundary;
|
|
59
|
-
exports.useQueryErrorResetBoundary = useQueryErrorResetBoundary;
|
|
60
|
-
//# sourceMappingURL=QueryErrorResetBoundary.legacy.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryErrorResetBoundary.legacy.cjs","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["isReset","children","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGA;;AAQA;;;;AAIMA;;;AAGAA;;;AAGA;AACF;;AAEJ;AAEA;;AAEA;;AAEO;;AAGP;;AAQO;AACLC;AAC4B;AAC5B;AACA;AAC2CC;;AAM7C;;;"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
// CONTEXT
|
|
5
|
-
|
|
6
|
-
function createValue() {
|
|
7
|
-
let isReset = false;
|
|
8
|
-
return {
|
|
9
|
-
clearReset: () => {
|
|
10
|
-
isReset = false;
|
|
11
|
-
},
|
|
12
|
-
reset: () => {
|
|
13
|
-
isReset = true;
|
|
14
|
-
},
|
|
15
|
-
isReset: () => {
|
|
16
|
-
return isReset;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
const QueryErrorResetBoundaryContext = /*#__PURE__*/React.createContext(createValue());
|
|
21
|
-
|
|
22
|
-
// HOOK
|
|
23
|
-
|
|
24
|
-
const useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
|
|
25
|
-
|
|
26
|
-
// COMPONENT
|
|
27
|
-
|
|
28
|
-
const QueryErrorResetBoundary = ({
|
|
29
|
-
children
|
|
30
|
-
}) => {
|
|
31
|
-
const [value] = React.useState(() => createValue());
|
|
32
|
-
return /*#__PURE__*/React.createElement(QueryErrorResetBoundaryContext.Provider, {
|
|
33
|
-
value: value
|
|
34
|
-
}, typeof children === 'function' ? children(value) : children);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export { QueryErrorResetBoundary, useQueryErrorResetBoundary };
|
|
38
|
-
//# sourceMappingURL=QueryErrorResetBoundary.legacy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryErrorResetBoundary.legacy.js","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["isReset","children","value"],"mappings":";;;AAGA;;AAQA;;;;AAIMA;;;AAGAA;;;AAGA;AACF;;AAEJ;AAEA;;AAEA;;AAEO;;AAGP;;AAQO;AACLC;AAC4B;AAC5B;AACA;AAC2CC;;AAM7C;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HydrationBoundary.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/HydrationBoundary.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryClientProvider.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/QueryClientProvider.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryResetErrorBoundary.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/QueryResetErrorBoundary.test.tsx"],"names":[],"mappings":"AASA,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,8BAA8B;QACtC,QAAQ,EAAE,GAAG,CAAA;KACd;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ssr-hydration.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/ssr-hydration.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ssr.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/ssr.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"suspense.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/suspense.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useInfiniteQuery.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/useInfiniteQuery.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useInfiniteQuery.type.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/useInfiniteQuery.type.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIsFetching.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/useIsFetching.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMutation.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/useMutation.test.tsx"],"names":[],"mappings":"AACA,OAAO,2BAA2B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMutationState.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/useMutationState.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useQueries.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/useQueries.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useQuery.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/useQuery.test.tsx"],"names":[],"mappings":"AACA,OAAO,2BAA2B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useQuery.types.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/useQuery.types.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { render } from '@testing-library/react';
|
|
4
|
-
import { QueryClient } from '..';
|
|
5
|
-
import type { QueryClientConfig } from '..';
|
|
6
|
-
import type { SpyInstance } from 'vitest';
|
|
7
|
-
export declare function renderWithClient(client: QueryClient, ui: React.ReactElement): ReturnType<typeof render>;
|
|
8
|
-
export declare const Blink: ({ duration, children, }: {
|
|
9
|
-
duration: number;
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
}) => JSX.Element;
|
|
12
|
-
export declare function createQueryClient(config?: QueryClientConfig): QueryClient;
|
|
13
|
-
export declare function mockVisibilityState(value: DocumentVisibilityState): SpyInstance<[], DocumentVisibilityState>;
|
|
14
|
-
export declare function mockNavigatorOnLine(value: boolean): SpyInstance<[], boolean>;
|
|
15
|
-
export declare function queryKey(): Array<string>;
|
|
16
|
-
export declare function sleep(timeout: number): Promise<void>;
|
|
17
|
-
export declare function setActTimeout(fn: () => void, ms?: number): NodeJS.Timeout;
|
|
18
|
-
/**
|
|
19
|
-
* Assert the parameter is of a specific type.
|
|
20
|
-
*/
|
|
21
|
-
export declare function expectType<T>(_: T): void;
|
|
22
|
-
export type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? true : false;
|
|
23
|
-
export type Expect<T extends true> = T;
|
|
24
|
-
/**
|
|
25
|
-
* Assert the parameter is not typed as `any`
|
|
26
|
-
*/
|
|
27
|
-
export declare function expectTypeNotAny<T>(_: 0 extends 1 & T ? never : T): void;
|
|
28
|
-
export declare function setIsServer(isServer: boolean): () => void;
|
|
29
|
-
export declare const doNotExecute: (_func: () => void) => boolean;
|
|
30
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/__tests__/utils.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAGpD,OAAO,EAAE,WAAW,EAAuB,MAAM,IAAI,CAAA;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAEzC,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,WAAW,EACnB,EAAE,EAAE,KAAK,CAAC,YAAY,GACrB,UAAU,CAAC,OAAO,MAAM,CAAC,CAW3B;AAED,eAAO,MAAM,KAAK;cAIN,MAAM;cACN,MAAM,SAAS;iBAa1B,CAAA;AAED,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,WAAW,CAEzE;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,uBAAuB,GAC7B,WAAW,CAAC,EAAE,EAAE,uBAAuB,CAAC,CAE1C;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAAC,EAAE,EAAE,OAAO,CAAC,CAE5E;AAGD,wBAAgB,QAAQ,IAAI,KAAK,CAAC,MAAM,CAAC,CAGxC;AAED,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIpD;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC,EAAE,MAAM,kBAMxD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAExC;AAED,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,SAAS,CAC/D,CAAC,OACI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,GACtB,IAAI,GACJ,KAAK,CAAA;AAET,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,CAAA;AAEtC;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,IAAI,CAExE;AAID,wBAAgB,WAAW,CAAC,QAAQ,EAAE,OAAO,cAW5C;AAED,eAAO,MAAM,YAAY,UAAW,MAAM,IAAI,YAAS,CAAA"}
|