@tanstack/preact-query 5.93.0 → 5.94.0

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.
Files changed (110) hide show
  1. package/build/legacy/HydrationBoundary.d.cts +2 -15
  2. package/build/legacy/HydrationBoundary.d.ts +2 -15
  3. package/build/legacy/IsRestoringProvider.d.cts +2 -6
  4. package/build/legacy/IsRestoringProvider.d.ts +2 -6
  5. package/build/legacy/QueryClientProvider.d.cts +4 -13
  6. package/build/legacy/QueryClientProvider.d.ts +4 -13
  7. package/build/legacy/QueryErrorResetBoundary.d.cts +8 -19
  8. package/build/legacy/QueryErrorResetBoundary.d.ts +8 -19
  9. package/build/legacy/_tsup-dts-rollup.d.cts +1095 -0
  10. package/build/legacy/_tsup-dts-rollup.d.ts +1095 -0
  11. package/build/legacy/errorBoundaryUtils.d.cts +3 -15
  12. package/build/legacy/errorBoundaryUtils.d.ts +3 -15
  13. package/build/legacy/index.d.cts +206 -21
  14. package/build/legacy/index.d.ts +206 -21
  15. package/build/legacy/infiniteQueryOptions.d.cts +4 -23
  16. package/build/legacy/infiniteQueryOptions.d.ts +4 -23
  17. package/build/legacy/mutationOptions.d.cts +1 -7
  18. package/build/legacy/mutationOptions.d.ts +1 -7
  19. package/build/legacy/queryOptions.d.cts +4 -24
  20. package/build/legacy/queryOptions.d.ts +4 -24
  21. package/build/legacy/suspense.d.cts +5 -11
  22. package/build/legacy/suspense.d.ts +5 -11
  23. package/build/legacy/types.d.cts +24 -52
  24. package/build/legacy/types.d.ts +24 -52
  25. package/build/legacy/useBaseQuery.cjs +1 -1
  26. package/build/legacy/useBaseQuery.cjs.map +1 -1
  27. package/build/legacy/useBaseQuery.d.cts +1 -6
  28. package/build/legacy/useBaseQuery.d.ts +1 -6
  29. package/build/legacy/useBaseQuery.js +2 -2
  30. package/build/legacy/useBaseQuery.js.map +1 -1
  31. package/build/legacy/useInfiniteQuery.d.cts +1 -9
  32. package/build/legacy/useInfiniteQuery.d.ts +1 -9
  33. package/build/legacy/useIsFetching.d.cts +1 -5
  34. package/build/legacy/useIsFetching.d.ts +1 -5
  35. package/build/legacy/useMutation.d.cts +1 -6
  36. package/build/legacy/useMutation.d.ts +1 -6
  37. package/build/legacy/useMutationState.d.cts +2 -10
  38. package/build/legacy/useMutationState.d.ts +2 -10
  39. package/build/legacy/usePrefetchInfiniteQuery.d.cts +1 -5
  40. package/build/legacy/usePrefetchInfiniteQuery.d.ts +1 -5
  41. package/build/legacy/usePrefetchQuery.d.cts +1 -6
  42. package/build/legacy/usePrefetchQuery.d.ts +1 -6
  43. package/build/legacy/useQueries.d.cts +3 -76
  44. package/build/legacy/useQueries.d.ts +3 -76
  45. package/build/legacy/useQuery.d.cts +1 -9
  46. package/build/legacy/useQuery.d.ts +1 -9
  47. package/build/legacy/useSuspenseInfiniteQuery.d.cts +1 -6
  48. package/build/legacy/useSuspenseInfiniteQuery.d.ts +1 -6
  49. package/build/legacy/useSuspenseQueries.d.cts +3 -79
  50. package/build/legacy/useSuspenseQueries.d.ts +3 -79
  51. package/build/legacy/useSuspenseQuery.d.cts +1 -6
  52. package/build/legacy/useSuspenseQuery.d.ts +1 -6
  53. package/build/legacy/utils.d.cts +2 -4
  54. package/build/legacy/utils.d.ts +2 -4
  55. package/build/modern/HydrationBoundary.d.cts +2 -15
  56. package/build/modern/HydrationBoundary.d.ts +2 -15
  57. package/build/modern/IsRestoringProvider.d.cts +2 -6
  58. package/build/modern/IsRestoringProvider.d.ts +2 -6
  59. package/build/modern/QueryClientProvider.d.cts +4 -13
  60. package/build/modern/QueryClientProvider.d.ts +4 -13
  61. package/build/modern/QueryErrorResetBoundary.d.cts +8 -19
  62. package/build/modern/QueryErrorResetBoundary.d.ts +8 -19
  63. package/build/modern/_tsup-dts-rollup.d.cts +1095 -0
  64. package/build/modern/_tsup-dts-rollup.d.ts +1095 -0
  65. package/build/modern/errorBoundaryUtils.d.cts +3 -15
  66. package/build/modern/errorBoundaryUtils.d.ts +3 -15
  67. package/build/modern/index.d.cts +206 -21
  68. package/build/modern/index.d.ts +206 -21
  69. package/build/modern/infiniteQueryOptions.d.cts +4 -23
  70. package/build/modern/infiniteQueryOptions.d.ts +4 -23
  71. package/build/modern/mutationOptions.d.cts +1 -7
  72. package/build/modern/mutationOptions.d.ts +1 -7
  73. package/build/modern/queryOptions.d.cts +4 -24
  74. package/build/modern/queryOptions.d.ts +4 -24
  75. package/build/modern/suspense.d.cts +5 -11
  76. package/build/modern/suspense.d.ts +5 -11
  77. package/build/modern/types.d.cts +24 -52
  78. package/build/modern/types.d.ts +24 -52
  79. package/build/modern/useBaseQuery.cjs +1 -1
  80. package/build/modern/useBaseQuery.cjs.map +1 -1
  81. package/build/modern/useBaseQuery.d.cts +1 -6
  82. package/build/modern/useBaseQuery.d.ts +1 -6
  83. package/build/modern/useBaseQuery.js +2 -2
  84. package/build/modern/useBaseQuery.js.map +1 -1
  85. package/build/modern/useInfiniteQuery.d.cts +1 -9
  86. package/build/modern/useInfiniteQuery.d.ts +1 -9
  87. package/build/modern/useIsFetching.d.cts +1 -5
  88. package/build/modern/useIsFetching.d.ts +1 -5
  89. package/build/modern/useMutation.d.cts +1 -6
  90. package/build/modern/useMutation.d.ts +1 -6
  91. package/build/modern/useMutationState.d.cts +2 -10
  92. package/build/modern/useMutationState.d.ts +2 -10
  93. package/build/modern/usePrefetchInfiniteQuery.d.cts +1 -5
  94. package/build/modern/usePrefetchInfiniteQuery.d.ts +1 -5
  95. package/build/modern/usePrefetchQuery.d.cts +1 -6
  96. package/build/modern/usePrefetchQuery.d.ts +1 -6
  97. package/build/modern/useQueries.d.cts +3 -76
  98. package/build/modern/useQueries.d.ts +3 -76
  99. package/build/modern/useQuery.d.cts +1 -9
  100. package/build/modern/useQuery.d.ts +1 -9
  101. package/build/modern/useSuspenseInfiniteQuery.d.cts +1 -6
  102. package/build/modern/useSuspenseInfiniteQuery.d.ts +1 -6
  103. package/build/modern/useSuspenseQueries.d.cts +3 -79
  104. package/build/modern/useSuspenseQueries.d.ts +3 -79
  105. package/build/modern/useSuspenseQuery.d.cts +1 -6
  106. package/build/modern/useSuspenseQuery.d.ts +1 -6
  107. package/build/modern/utils.d.cts +2 -4
  108. package/build/modern/utils.d.ts +2 -4
  109. package/package.json +7 -7
  110. package/src/useBaseQuery.ts +2 -2
@@ -1,15 +1,2 @@
1
- import * as preact from 'preact';
2
- import { ComponentChildren } from 'preact';
3
- import { DehydratedState, OmitKeyof, HydrateOptions, QueryClient } from '@tanstack/query-core';
4
-
5
- interface HydrationBoundaryProps {
6
- state: DehydratedState | null | undefined;
7
- options?: OmitKeyof<HydrateOptions, 'defaultOptions'> & {
8
- defaultOptions?: OmitKeyof<Exclude<HydrateOptions['defaultOptions'], undefined>, 'mutations'>;
9
- };
10
- children?: ComponentChildren;
11
- queryClient?: QueryClient;
12
- }
13
- declare const HydrationBoundary: ({ children, options, state, queryClient, }: HydrationBoundaryProps) => preact.JSX.Element;
14
-
15
- export { HydrationBoundary, type HydrationBoundaryProps };
1
+ export { HydrationBoundaryProps } from './_tsup-dts-rollup.cjs';
2
+ export { HydrationBoundary } from './_tsup-dts-rollup.cjs';
@@ -1,15 +1,2 @@
1
- import * as preact from 'preact';
2
- import { ComponentChildren } from 'preact';
3
- import { DehydratedState, OmitKeyof, HydrateOptions, QueryClient } from '@tanstack/query-core';
4
-
5
- interface HydrationBoundaryProps {
6
- state: DehydratedState | null | undefined;
7
- options?: OmitKeyof<HydrateOptions, 'defaultOptions'> & {
8
- defaultOptions?: OmitKeyof<Exclude<HydrateOptions['defaultOptions'], undefined>, 'mutations'>;
9
- };
10
- children?: ComponentChildren;
11
- queryClient?: QueryClient;
12
- }
13
- declare const HydrationBoundary: ({ children, options, state, queryClient, }: HydrationBoundaryProps) => preact.JSX.Element;
14
-
15
- export { HydrationBoundary, type HydrationBoundaryProps };
1
+ export { HydrationBoundaryProps } from './_tsup-dts-rollup.js';
2
+ export { HydrationBoundary } from './_tsup-dts-rollup.js';
@@ -1,6 +1,2 @@
1
- import * as preact from 'preact';
2
-
3
- declare const useIsRestoring: () => boolean;
4
- declare const IsRestoringProvider: preact.Provider<boolean>;
5
-
6
- export { IsRestoringProvider, useIsRestoring };
1
+ export { useIsRestoring } from './_tsup-dts-rollup.cjs';
2
+ export { IsRestoringProvider } from './_tsup-dts-rollup.cjs';
@@ -1,6 +1,2 @@
1
- import * as preact from 'preact';
2
-
3
- declare const useIsRestoring: () => boolean;
4
- declare const IsRestoringProvider: preact.Provider<boolean>;
5
-
6
- export { IsRestoringProvider, useIsRestoring };
1
+ export { useIsRestoring } from './_tsup-dts-rollup.js';
2
+ export { IsRestoringProvider } from './_tsup-dts-rollup.js';
@@ -1,13 +1,4 @@
1
- import * as preact from 'preact';
2
- import { ComponentChildren, VNode } from 'preact';
3
- import { QueryClient } from '@tanstack/query-core';
4
-
5
- declare const QueryClientContext: preact.Context<QueryClient | undefined>;
6
- declare const useQueryClient: (queryClient?: QueryClient) => QueryClient;
7
- type QueryClientProviderProps = {
8
- client: QueryClient;
9
- children?: ComponentChildren;
10
- };
11
- declare const QueryClientProvider: ({ client, children, }: QueryClientProviderProps) => VNode;
12
-
13
- export { QueryClientContext, QueryClientProvider, type QueryClientProviderProps, useQueryClient };
1
+ export { QueryClientContext } from './_tsup-dts-rollup.cjs';
2
+ export { useQueryClient } from './_tsup-dts-rollup.cjs';
3
+ export { QueryClientProviderProps } from './_tsup-dts-rollup.cjs';
4
+ export { QueryClientProvider } from './_tsup-dts-rollup.cjs';
@@ -1,13 +1,4 @@
1
- import * as preact from 'preact';
2
- import { ComponentChildren, VNode } from 'preact';
3
- import { QueryClient } from '@tanstack/query-core';
4
-
5
- declare const QueryClientContext: preact.Context<QueryClient | undefined>;
6
- declare const useQueryClient: (queryClient?: QueryClient) => QueryClient;
7
- type QueryClientProviderProps = {
8
- client: QueryClient;
9
- children?: ComponentChildren;
10
- };
11
- declare const QueryClientProvider: ({ client, children, }: QueryClientProviderProps) => VNode;
12
-
13
- export { QueryClientContext, QueryClientProvider, type QueryClientProviderProps, useQueryClient };
1
+ export { QueryClientContext } from './_tsup-dts-rollup.js';
2
+ export { useQueryClient } from './_tsup-dts-rollup.js';
3
+ export { QueryClientProviderProps } from './_tsup-dts-rollup.js';
4
+ export { QueryClientProvider } from './_tsup-dts-rollup.js';
@@ -1,19 +1,8 @@
1
- import * as preact from 'preact';
2
- import { ComponentChildren } from 'preact';
3
-
4
- type QueryErrorResetFunction = () => void;
5
- type QueryErrorIsResetFunction = () => boolean;
6
- type QueryErrorClearResetFunction = () => void;
7
- interface QueryErrorResetBoundaryValue {
8
- clearReset: QueryErrorClearResetFunction;
9
- isReset: QueryErrorIsResetFunction;
10
- reset: QueryErrorResetFunction;
11
- }
12
- declare const useQueryErrorResetBoundary: () => QueryErrorResetBoundaryValue;
13
- type QueryErrorResetBoundaryFunction = (value: QueryErrorResetBoundaryValue) => ComponentChildren;
14
- interface QueryErrorResetBoundaryProps {
15
- children: QueryErrorResetBoundaryFunction | ComponentChildren;
16
- }
17
- declare const QueryErrorResetBoundary: ({ children, }: QueryErrorResetBoundaryProps) => preact.JSX.Element;
18
-
19
- export { type QueryErrorClearResetFunction, type QueryErrorIsResetFunction, QueryErrorResetBoundary, type QueryErrorResetBoundaryFunction, type QueryErrorResetBoundaryProps, type QueryErrorResetBoundaryValue, type QueryErrorResetFunction, useQueryErrorResetBoundary };
1
+ export { QueryErrorResetFunction } from './_tsup-dts-rollup.cjs';
2
+ export { QueryErrorIsResetFunction } from './_tsup-dts-rollup.cjs';
3
+ export { QueryErrorClearResetFunction } from './_tsup-dts-rollup.cjs';
4
+ export { QueryErrorResetBoundaryValue } from './_tsup-dts-rollup.cjs';
5
+ export { useQueryErrorResetBoundary } from './_tsup-dts-rollup.cjs';
6
+ export { QueryErrorResetBoundaryFunction } from './_tsup-dts-rollup.cjs';
7
+ export { QueryErrorResetBoundaryProps } from './_tsup-dts-rollup.cjs';
8
+ export { QueryErrorResetBoundary } from './_tsup-dts-rollup.cjs';
@@ -1,19 +1,8 @@
1
- import * as preact from 'preact';
2
- import { ComponentChildren } from 'preact';
3
-
4
- type QueryErrorResetFunction = () => void;
5
- type QueryErrorIsResetFunction = () => boolean;
6
- type QueryErrorClearResetFunction = () => void;
7
- interface QueryErrorResetBoundaryValue {
8
- clearReset: QueryErrorClearResetFunction;
9
- isReset: QueryErrorIsResetFunction;
10
- reset: QueryErrorResetFunction;
11
- }
12
- declare const useQueryErrorResetBoundary: () => QueryErrorResetBoundaryValue;
13
- type QueryErrorResetBoundaryFunction = (value: QueryErrorResetBoundaryValue) => ComponentChildren;
14
- interface QueryErrorResetBoundaryProps {
15
- children: QueryErrorResetBoundaryFunction | ComponentChildren;
16
- }
17
- declare const QueryErrorResetBoundary: ({ children, }: QueryErrorResetBoundaryProps) => preact.JSX.Element;
18
-
19
- export { type QueryErrorClearResetFunction, type QueryErrorIsResetFunction, QueryErrorResetBoundary, type QueryErrorResetBoundaryFunction, type QueryErrorResetBoundaryProps, type QueryErrorResetBoundaryValue, type QueryErrorResetFunction, useQueryErrorResetBoundary };
1
+ export { QueryErrorResetFunction } from './_tsup-dts-rollup.js';
2
+ export { QueryErrorIsResetFunction } from './_tsup-dts-rollup.js';
3
+ export { QueryErrorClearResetFunction } from './_tsup-dts-rollup.js';
4
+ export { QueryErrorResetBoundaryValue } from './_tsup-dts-rollup.js';
5
+ export { useQueryErrorResetBoundary } from './_tsup-dts-rollup.js';
6
+ export { QueryErrorResetBoundaryFunction } from './_tsup-dts-rollup.js';
7
+ export { QueryErrorResetBoundaryProps } from './_tsup-dts-rollup.js';
8
+ export { QueryErrorResetBoundary } from './_tsup-dts-rollup.js';