@tanstack/preact-query 5.94.2 → 5.94.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.
@@ -1,10 +1,7 @@
1
1
  import { AnyDataTag } from '@tanstack/query-core';
2
2
  import { CancelledError } from '@tanstack/query-core';
3
3
  import { CancelOptions } from '@tanstack/query-core';
4
- import { Component } from 'preact';
5
- import type { ComponentChild } from 'preact';
6
- import { ComponentChildren } from 'preact';
7
- import type { ComponentType } from 'preact';
4
+ import type { ComponentChildren } from 'preact';
8
5
  import { Context } from 'preact';
9
6
  import { DataTag } from '@tanstack/query-core';
10
7
  import { dataTagErrorSymbol } from '@tanstack/query-core';
@@ -26,7 +23,6 @@ import { Enabled } from '@tanstack/query-core';
26
23
  import { EnsureInfiniteQueryDataOptions } from '@tanstack/query-core';
27
24
  import { EnsureQueryDataOptions } from '@tanstack/query-core';
28
25
  import { environmentManager } from '@tanstack/query-core';
29
- import type { ErrorInfo } from 'preact';
30
26
  import { experimental_streamedQuery } from '@tanstack/query-core';
31
27
  import { FetchInfiniteQueryOptions } from '@tanstack/query-core';
32
28
  import { FetchNextPageOptions } from '@tanstack/query-core';
@@ -64,7 +60,6 @@ import { keepPreviousData } from '@tanstack/query-core';
64
60
  import { ManagedTimerId } from '@tanstack/query-core';
65
61
  import { matchMutation } from '@tanstack/query-core';
66
62
  import { matchQuery } from '@tanstack/query-core';
67
- import type { MockInstance } from 'vitest';
68
63
  import { MutateFunction } from '@tanstack/query-core';
69
64
  import { MutateOptions } from '@tanstack/query-core';
70
65
  import { Mutation } from '@tanstack/query-core';
@@ -133,7 +128,6 @@ import { QueryStatus } from '@tanstack/query-core';
133
128
  import { RefetchOptions } from '@tanstack/query-core';
134
129
  import { RefetchQueryFilters } from '@tanstack/query-core';
135
130
  import { Register } from '@tanstack/query-core';
136
- import { render } from '@testing-library/preact';
137
131
  import { replaceEqualDeep } from '@tanstack/query-core';
138
132
  import { ResetOptions } from '@tanstack/query-core';
139
133
  import { ResultOptions } from '@tanstack/query-core';
@@ -151,7 +145,7 @@ import { UnsetMarker } from '@tanstack/query-core';
151
145
  import { unsetMarker } from '@tanstack/query-core';
152
146
  import { Updater } from '@tanstack/query-core';
153
147
  import type { UserConfig } from 'vite';
154
- import { VNode } from 'preact';
148
+ import type { VNode } from 'preact';
155
149
  import { WithRequired } from '@tanstack/query-core';
156
150
 
157
151
  export { AnyDataTag }
@@ -180,11 +174,6 @@ declare type AnyUseSuspenseQueryOptions = UseSuspenseQueryOptions<any, any, any,
180
174
  export { AnyUseSuspenseQueryOptions }
181
175
  export { AnyUseSuspenseQueryOptions as AnyUseSuspenseQueryOptions_alias_1 }
182
176
 
183
- export declare function Blink({ duration, children, }: {
184
- duration: number;
185
- children: ComponentChildren;
186
- }): JSX.Element;
187
-
188
177
  export { CancelledError }
189
178
 
190
179
  export { CancelOptions }
@@ -264,95 +253,8 @@ export declare const ensureSuspenseTimers: (defaultedOptions: DefaultedQueryObse
264
253
 
265
254
  export { environmentManager }
266
255
 
267
- declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
268
- constructor(props: ErrorBoundaryProps);
269
- static getDerivedStateFromError(error: Error): {
270
- didCatch: boolean;
271
- error: Error;
272
- };
273
- resetErrorBoundary(...args: any[]): void;
274
- componentDidCatch(error: Error, info: ErrorInfo): void;
275
- componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void;
276
- render(): VNode< {
277
- value: {
278
- didCatch: boolean;
279
- error: any;
280
- resetErrorBoundary: (...args: any[]) => void;
281
- } | null;
282
- children?: ComponentChildren;
283
- }>;
284
- }
285
- export { ErrorBoundary }
286
- export { ErrorBoundary as ErrorBoundary_alias_1 }
287
-
288
- declare const ErrorBoundaryContext: Context<ErrorBoundaryContextType | null>;
289
- export { ErrorBoundaryContext }
290
- export { ErrorBoundaryContext as ErrorBoundaryContext_alias_1 }
291
-
292
- declare type ErrorBoundaryContextType = {
293
- didCatch: boolean;
294
- error: any;
295
- resetErrorBoundary: (...args: any[]) => void;
296
- };
297
-
298
- declare type ErrorBoundaryProps = ErrorBoundaryPropsWithFallback | ErrorBoundaryPropsWithComponent | ErrorBoundaryPropsWithRender;
299
- export { ErrorBoundaryProps }
300
- export { ErrorBoundaryProps as ErrorBoundaryProps_alias_1 }
301
-
302
- declare type ErrorBoundaryPropsWithComponent = ErrorBoundarySharedProps & {
303
- fallback?: never;
304
- FallbackComponent: ComponentType<FallbackProps>;
305
- fallbackRender?: never;
306
- };
307
- export { ErrorBoundaryPropsWithComponent }
308
- export { ErrorBoundaryPropsWithComponent as ErrorBoundaryPropsWithComponent_alias_1 }
309
-
310
- declare type ErrorBoundaryPropsWithFallback = ErrorBoundarySharedProps & {
311
- fallback: ComponentChild;
312
- FallbackComponent?: never;
313
- fallbackRender?: never;
314
- };
315
- export { ErrorBoundaryPropsWithFallback }
316
- export { ErrorBoundaryPropsWithFallback as ErrorBoundaryPropsWithFallback_alias_1 }
317
-
318
- declare type ErrorBoundaryPropsWithRender = ErrorBoundarySharedProps & {
319
- fallback?: never;
320
- FallbackComponent?: never;
321
- fallbackRender: (props: FallbackProps) => ComponentChild;
322
- };
323
- export { ErrorBoundaryPropsWithRender }
324
- export { ErrorBoundaryPropsWithRender as ErrorBoundaryPropsWithRender_alias_1 }
325
-
326
- declare type ErrorBoundarySharedProps = PropsWithChildren<{
327
- onError?: (error: Error, info: ErrorInfo) => void;
328
- onReset?: (details: {
329
- reason: 'imperative-api';
330
- args: any[];
331
- } | {
332
- reason: 'keys';
333
- prev: any[] | undefined;
334
- next: any[] | undefined;
335
- }) => void;
336
- resetKeys?: any[];
337
- }>;
338
-
339
- declare type ErrorBoundaryState = {
340
- didCatch: true;
341
- error: any;
342
- } | {
343
- didCatch: false;
344
- error: null;
345
- };
346
-
347
256
  export { experimental_streamedQuery }
348
257
 
349
- declare type FallbackProps = {
350
- error: any;
351
- resetErrorBoundary: (...args: any[]) => void;
352
- };
353
- export { FallbackProps }
354
- export { FallbackProps as FallbackProps_alias_1 }
355
-
356
258
  export { FetchInfiniteQueryOptions }
357
259
 
358
260
  export { FetchNextPageOptions }
@@ -553,8 +455,6 @@ declare type MAXIMUM_DEPTH = 20;
553
455
 
554
456
  declare type MAXIMUM_DEPTH_2 = 20;
555
457
 
556
- export declare function mockOnlineManagerIsOnline(value: boolean): MockInstance<() => boolean>;
557
-
558
458
  /**
559
459
  * @param {Object} opts - Options for building configurations.
560
460
  * @param {string[]} opts.entry - The entry array.
@@ -645,10 +545,6 @@ export { partialMatchKey }
645
545
 
646
546
  export { PlaceholderDataFunction }
647
547
 
648
- declare type PropsWithChildren<TProps = {}> = TProps & {
649
- children?: ComponentChildren;
650
- };
651
-
652
548
  export { QueriesObserver }
653
549
 
654
550
  export { QueriesObserverOptions }
@@ -804,20 +700,14 @@ export { RefetchQueryFilters }
804
700
 
805
701
  export { Register }
806
702
 
807
- export declare function renderWithClient(client: QueryClient, ui: VNode): ReturnType<typeof render>;
808
-
809
703
  export { replaceEqualDeep }
810
704
 
811
705
  export { ResetOptions }
812
706
 
813
707
  export { ResultOptions }
814
708
 
815
- export declare function setActTimeout(fn: () => void, ms?: number): NodeJS.Timeout;
816
-
817
709
  export { SetDataOptions }
818
710
 
819
- export declare function setIsServer(value: boolean): () => void;
820
-
821
711
  export declare const shouldSuspend: (defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any> | undefined, result: QueryObserverResult<any, any>) => boolean | undefined;
822
712
 
823
713
  export { shouldThrowError }
@@ -1,10 +1,7 @@
1
1
  import { AnyDataTag } from '@tanstack/query-core';
2
2
  import { CancelledError } from '@tanstack/query-core';
3
3
  import { CancelOptions } from '@tanstack/query-core';
4
- import { Component } from 'preact';
5
- import type { ComponentChild } from 'preact';
6
- import { ComponentChildren } from 'preact';
7
- import type { ComponentType } from 'preact';
4
+ import type { ComponentChildren } from 'preact';
8
5
  import { Context } from 'preact';
9
6
  import { DataTag } from '@tanstack/query-core';
10
7
  import { dataTagErrorSymbol } from '@tanstack/query-core';
@@ -26,7 +23,6 @@ import { Enabled } from '@tanstack/query-core';
26
23
  import { EnsureInfiniteQueryDataOptions } from '@tanstack/query-core';
27
24
  import { EnsureQueryDataOptions } from '@tanstack/query-core';
28
25
  import { environmentManager } from '@tanstack/query-core';
29
- import type { ErrorInfo } from 'preact';
30
26
  import { experimental_streamedQuery } from '@tanstack/query-core';
31
27
  import { FetchInfiniteQueryOptions } from '@tanstack/query-core';
32
28
  import { FetchNextPageOptions } from '@tanstack/query-core';
@@ -64,7 +60,6 @@ import { keepPreviousData } from '@tanstack/query-core';
64
60
  import { ManagedTimerId } from '@tanstack/query-core';
65
61
  import { matchMutation } from '@tanstack/query-core';
66
62
  import { matchQuery } from '@tanstack/query-core';
67
- import type { MockInstance } from 'vitest';
68
63
  import { MutateFunction } from '@tanstack/query-core';
69
64
  import { MutateOptions } from '@tanstack/query-core';
70
65
  import { Mutation } from '@tanstack/query-core';
@@ -133,7 +128,6 @@ import { QueryStatus } from '@tanstack/query-core';
133
128
  import { RefetchOptions } from '@tanstack/query-core';
134
129
  import { RefetchQueryFilters } from '@tanstack/query-core';
135
130
  import { Register } from '@tanstack/query-core';
136
- import { render } from '@testing-library/preact';
137
131
  import { replaceEqualDeep } from '@tanstack/query-core';
138
132
  import { ResetOptions } from '@tanstack/query-core';
139
133
  import { ResultOptions } from '@tanstack/query-core';
@@ -151,7 +145,7 @@ import { UnsetMarker } from '@tanstack/query-core';
151
145
  import { unsetMarker } from '@tanstack/query-core';
152
146
  import { Updater } from '@tanstack/query-core';
153
147
  import type { UserConfig } from 'vite';
154
- import { VNode } from 'preact';
148
+ import type { VNode } from 'preact';
155
149
  import { WithRequired } from '@tanstack/query-core';
156
150
 
157
151
  export { AnyDataTag }
@@ -180,11 +174,6 @@ declare type AnyUseSuspenseQueryOptions = UseSuspenseQueryOptions<any, any, any,
180
174
  export { AnyUseSuspenseQueryOptions }
181
175
  export { AnyUseSuspenseQueryOptions as AnyUseSuspenseQueryOptions_alias_1 }
182
176
 
183
- export declare function Blink({ duration, children, }: {
184
- duration: number;
185
- children: ComponentChildren;
186
- }): JSX.Element;
187
-
188
177
  export { CancelledError }
189
178
 
190
179
  export { CancelOptions }
@@ -264,95 +253,8 @@ export declare const ensureSuspenseTimers: (defaultedOptions: DefaultedQueryObse
264
253
 
265
254
  export { environmentManager }
266
255
 
267
- declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
268
- constructor(props: ErrorBoundaryProps);
269
- static getDerivedStateFromError(error: Error): {
270
- didCatch: boolean;
271
- error: Error;
272
- };
273
- resetErrorBoundary(...args: any[]): void;
274
- componentDidCatch(error: Error, info: ErrorInfo): void;
275
- componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void;
276
- render(): VNode< {
277
- value: {
278
- didCatch: boolean;
279
- error: any;
280
- resetErrorBoundary: (...args: any[]) => void;
281
- } | null;
282
- children?: ComponentChildren;
283
- }>;
284
- }
285
- export { ErrorBoundary }
286
- export { ErrorBoundary as ErrorBoundary_alias_1 }
287
-
288
- declare const ErrorBoundaryContext: Context<ErrorBoundaryContextType | null>;
289
- export { ErrorBoundaryContext }
290
- export { ErrorBoundaryContext as ErrorBoundaryContext_alias_1 }
291
-
292
- declare type ErrorBoundaryContextType = {
293
- didCatch: boolean;
294
- error: any;
295
- resetErrorBoundary: (...args: any[]) => void;
296
- };
297
-
298
- declare type ErrorBoundaryProps = ErrorBoundaryPropsWithFallback | ErrorBoundaryPropsWithComponent | ErrorBoundaryPropsWithRender;
299
- export { ErrorBoundaryProps }
300
- export { ErrorBoundaryProps as ErrorBoundaryProps_alias_1 }
301
-
302
- declare type ErrorBoundaryPropsWithComponent = ErrorBoundarySharedProps & {
303
- fallback?: never;
304
- FallbackComponent: ComponentType<FallbackProps>;
305
- fallbackRender?: never;
306
- };
307
- export { ErrorBoundaryPropsWithComponent }
308
- export { ErrorBoundaryPropsWithComponent as ErrorBoundaryPropsWithComponent_alias_1 }
309
-
310
- declare type ErrorBoundaryPropsWithFallback = ErrorBoundarySharedProps & {
311
- fallback: ComponentChild;
312
- FallbackComponent?: never;
313
- fallbackRender?: never;
314
- };
315
- export { ErrorBoundaryPropsWithFallback }
316
- export { ErrorBoundaryPropsWithFallback as ErrorBoundaryPropsWithFallback_alias_1 }
317
-
318
- declare type ErrorBoundaryPropsWithRender = ErrorBoundarySharedProps & {
319
- fallback?: never;
320
- FallbackComponent?: never;
321
- fallbackRender: (props: FallbackProps) => ComponentChild;
322
- };
323
- export { ErrorBoundaryPropsWithRender }
324
- export { ErrorBoundaryPropsWithRender as ErrorBoundaryPropsWithRender_alias_1 }
325
-
326
- declare type ErrorBoundarySharedProps = PropsWithChildren<{
327
- onError?: (error: Error, info: ErrorInfo) => void;
328
- onReset?: (details: {
329
- reason: 'imperative-api';
330
- args: any[];
331
- } | {
332
- reason: 'keys';
333
- prev: any[] | undefined;
334
- next: any[] | undefined;
335
- }) => void;
336
- resetKeys?: any[];
337
- }>;
338
-
339
- declare type ErrorBoundaryState = {
340
- didCatch: true;
341
- error: any;
342
- } | {
343
- didCatch: false;
344
- error: null;
345
- };
346
-
347
256
  export { experimental_streamedQuery }
348
257
 
349
- declare type FallbackProps = {
350
- error: any;
351
- resetErrorBoundary: (...args: any[]) => void;
352
- };
353
- export { FallbackProps }
354
- export { FallbackProps as FallbackProps_alias_1 }
355
-
356
258
  export { FetchInfiniteQueryOptions }
357
259
 
358
260
  export { FetchNextPageOptions }
@@ -553,8 +455,6 @@ declare type MAXIMUM_DEPTH = 20;
553
455
 
554
456
  declare type MAXIMUM_DEPTH_2 = 20;
555
457
 
556
- export declare function mockOnlineManagerIsOnline(value: boolean): MockInstance<() => boolean>;
557
-
558
458
  /**
559
459
  * @param {Object} opts - Options for building configurations.
560
460
  * @param {string[]} opts.entry - The entry array.
@@ -645,10 +545,6 @@ export { partialMatchKey }
645
545
 
646
546
  export { PlaceholderDataFunction }
647
547
 
648
- declare type PropsWithChildren<TProps = {}> = TProps & {
649
- children?: ComponentChildren;
650
- };
651
-
652
548
  export { QueriesObserver }
653
549
 
654
550
  export { QueriesObserverOptions }
@@ -804,20 +700,14 @@ export { RefetchQueryFilters }
804
700
 
805
701
  export { Register }
806
702
 
807
- export declare function renderWithClient(client: QueryClient, ui: VNode): ReturnType<typeof render>;
808
-
809
703
  export { replaceEqualDeep }
810
704
 
811
705
  export { ResetOptions }
812
706
 
813
707
  export { ResultOptions }
814
708
 
815
- export declare function setActTimeout(fn: () => void, ms?: number): NodeJS.Timeout;
816
-
817
709
  export { SetDataOptions }
818
710
 
819
- export declare function setIsServer(value: boolean): () => void;
820
-
821
711
  export declare const shouldSuspend: (defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any> | undefined, result: QueryObserverResult<any, any>) => boolean | undefined;
822
712
 
823
713
  export { shouldThrowError }
@@ -1,10 +1,7 @@
1
1
  import { AnyDataTag } from '@tanstack/query-core';
2
2
  import { CancelledError } from '@tanstack/query-core';
3
3
  import { CancelOptions } from '@tanstack/query-core';
4
- import { Component } from 'preact';
5
- import type { ComponentChild } from 'preact';
6
- import { ComponentChildren } from 'preact';
7
- import type { ComponentType } from 'preact';
4
+ import type { ComponentChildren } from 'preact';
8
5
  import { Context } from 'preact';
9
6
  import { DataTag } from '@tanstack/query-core';
10
7
  import { dataTagErrorSymbol } from '@tanstack/query-core';
@@ -26,7 +23,6 @@ import { Enabled } from '@tanstack/query-core';
26
23
  import { EnsureInfiniteQueryDataOptions } from '@tanstack/query-core';
27
24
  import { EnsureQueryDataOptions } from '@tanstack/query-core';
28
25
  import { environmentManager } from '@tanstack/query-core';
29
- import type { ErrorInfo } from 'preact';
30
26
  import { experimental_streamedQuery } from '@tanstack/query-core';
31
27
  import { FetchInfiniteQueryOptions } from '@tanstack/query-core';
32
28
  import { FetchNextPageOptions } from '@tanstack/query-core';
@@ -64,7 +60,6 @@ import { keepPreviousData } from '@tanstack/query-core';
64
60
  import { ManagedTimerId } from '@tanstack/query-core';
65
61
  import { matchMutation } from '@tanstack/query-core';
66
62
  import { matchQuery } from '@tanstack/query-core';
67
- import type { MockInstance } from 'vitest';
68
63
  import { MutateFunction } from '@tanstack/query-core';
69
64
  import { MutateOptions } from '@tanstack/query-core';
70
65
  import { Mutation } from '@tanstack/query-core';
@@ -133,7 +128,6 @@ import { QueryStatus } from '@tanstack/query-core';
133
128
  import { RefetchOptions } from '@tanstack/query-core';
134
129
  import { RefetchQueryFilters } from '@tanstack/query-core';
135
130
  import { Register } from '@tanstack/query-core';
136
- import { render } from '@testing-library/preact';
137
131
  import { replaceEqualDeep } from '@tanstack/query-core';
138
132
  import { ResetOptions } from '@tanstack/query-core';
139
133
  import { ResultOptions } from '@tanstack/query-core';
@@ -151,7 +145,7 @@ import { UnsetMarker } from '@tanstack/query-core';
151
145
  import { unsetMarker } from '@tanstack/query-core';
152
146
  import { Updater } from '@tanstack/query-core';
153
147
  import type { UserConfig } from 'vite';
154
- import { VNode } from 'preact';
148
+ import type { VNode } from 'preact';
155
149
  import { WithRequired } from '@tanstack/query-core';
156
150
 
157
151
  export { AnyDataTag }
@@ -180,11 +174,6 @@ declare type AnyUseSuspenseQueryOptions = UseSuspenseQueryOptions<any, any, any,
180
174
  export { AnyUseSuspenseQueryOptions }
181
175
  export { AnyUseSuspenseQueryOptions as AnyUseSuspenseQueryOptions_alias_1 }
182
176
 
183
- export declare function Blink({ duration, children, }: {
184
- duration: number;
185
- children: ComponentChildren;
186
- }): JSX.Element;
187
-
188
177
  export { CancelledError }
189
178
 
190
179
  export { CancelOptions }
@@ -264,95 +253,8 @@ export declare const ensureSuspenseTimers: (defaultedOptions: DefaultedQueryObse
264
253
 
265
254
  export { environmentManager }
266
255
 
267
- declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
268
- constructor(props: ErrorBoundaryProps);
269
- static getDerivedStateFromError(error: Error): {
270
- didCatch: boolean;
271
- error: Error;
272
- };
273
- resetErrorBoundary(...args: any[]): void;
274
- componentDidCatch(error: Error, info: ErrorInfo): void;
275
- componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void;
276
- render(): VNode< {
277
- value: {
278
- didCatch: boolean;
279
- error: any;
280
- resetErrorBoundary: (...args: any[]) => void;
281
- } | null;
282
- children?: ComponentChildren;
283
- }>;
284
- }
285
- export { ErrorBoundary }
286
- export { ErrorBoundary as ErrorBoundary_alias_1 }
287
-
288
- declare const ErrorBoundaryContext: Context<ErrorBoundaryContextType | null>;
289
- export { ErrorBoundaryContext }
290
- export { ErrorBoundaryContext as ErrorBoundaryContext_alias_1 }
291
-
292
- declare type ErrorBoundaryContextType = {
293
- didCatch: boolean;
294
- error: any;
295
- resetErrorBoundary: (...args: any[]) => void;
296
- };
297
-
298
- declare type ErrorBoundaryProps = ErrorBoundaryPropsWithFallback | ErrorBoundaryPropsWithComponent | ErrorBoundaryPropsWithRender;
299
- export { ErrorBoundaryProps }
300
- export { ErrorBoundaryProps as ErrorBoundaryProps_alias_1 }
301
-
302
- declare type ErrorBoundaryPropsWithComponent = ErrorBoundarySharedProps & {
303
- fallback?: never;
304
- FallbackComponent: ComponentType<FallbackProps>;
305
- fallbackRender?: never;
306
- };
307
- export { ErrorBoundaryPropsWithComponent }
308
- export { ErrorBoundaryPropsWithComponent as ErrorBoundaryPropsWithComponent_alias_1 }
309
-
310
- declare type ErrorBoundaryPropsWithFallback = ErrorBoundarySharedProps & {
311
- fallback: ComponentChild;
312
- FallbackComponent?: never;
313
- fallbackRender?: never;
314
- };
315
- export { ErrorBoundaryPropsWithFallback }
316
- export { ErrorBoundaryPropsWithFallback as ErrorBoundaryPropsWithFallback_alias_1 }
317
-
318
- declare type ErrorBoundaryPropsWithRender = ErrorBoundarySharedProps & {
319
- fallback?: never;
320
- FallbackComponent?: never;
321
- fallbackRender: (props: FallbackProps) => ComponentChild;
322
- };
323
- export { ErrorBoundaryPropsWithRender }
324
- export { ErrorBoundaryPropsWithRender as ErrorBoundaryPropsWithRender_alias_1 }
325
-
326
- declare type ErrorBoundarySharedProps = PropsWithChildren<{
327
- onError?: (error: Error, info: ErrorInfo) => void;
328
- onReset?: (details: {
329
- reason: 'imperative-api';
330
- args: any[];
331
- } | {
332
- reason: 'keys';
333
- prev: any[] | undefined;
334
- next: any[] | undefined;
335
- }) => void;
336
- resetKeys?: any[];
337
- }>;
338
-
339
- declare type ErrorBoundaryState = {
340
- didCatch: true;
341
- error: any;
342
- } | {
343
- didCatch: false;
344
- error: null;
345
- };
346
-
347
256
  export { experimental_streamedQuery }
348
257
 
349
- declare type FallbackProps = {
350
- error: any;
351
- resetErrorBoundary: (...args: any[]) => void;
352
- };
353
- export { FallbackProps }
354
- export { FallbackProps as FallbackProps_alias_1 }
355
-
356
258
  export { FetchInfiniteQueryOptions }
357
259
 
358
260
  export { FetchNextPageOptions }
@@ -553,8 +455,6 @@ declare type MAXIMUM_DEPTH = 20;
553
455
 
554
456
  declare type MAXIMUM_DEPTH_2 = 20;
555
457
 
556
- export declare function mockOnlineManagerIsOnline(value: boolean): MockInstance<() => boolean>;
557
-
558
458
  /**
559
459
  * @param {Object} opts - Options for building configurations.
560
460
  * @param {string[]} opts.entry - The entry array.
@@ -645,10 +545,6 @@ export { partialMatchKey }
645
545
 
646
546
  export { PlaceholderDataFunction }
647
547
 
648
- declare type PropsWithChildren<TProps = {}> = TProps & {
649
- children?: ComponentChildren;
650
- };
651
-
652
548
  export { QueriesObserver }
653
549
 
654
550
  export { QueriesObserverOptions }
@@ -804,20 +700,14 @@ export { RefetchQueryFilters }
804
700
 
805
701
  export { Register }
806
702
 
807
- export declare function renderWithClient(client: QueryClient, ui: VNode): ReturnType<typeof render>;
808
-
809
703
  export { replaceEqualDeep }
810
704
 
811
705
  export { ResetOptions }
812
706
 
813
707
  export { ResultOptions }
814
708
 
815
- export declare function setActTimeout(fn: () => void, ms?: number): NodeJS.Timeout;
816
-
817
709
  export { SetDataOptions }
818
710
 
819
- export declare function setIsServer(value: boolean): () => void;
820
-
821
711
  export declare const shouldSuspend: (defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any> | undefined, result: QueryObserverResult<any, any>) => boolean | undefined;
822
712
 
823
713
  export { shouldThrowError }
@@ -1,10 +1,7 @@
1
1
  import { AnyDataTag } from '@tanstack/query-core';
2
2
  import { CancelledError } from '@tanstack/query-core';
3
3
  import { CancelOptions } from '@tanstack/query-core';
4
- import { Component } from 'preact';
5
- import type { ComponentChild } from 'preact';
6
- import { ComponentChildren } from 'preact';
7
- import type { ComponentType } from 'preact';
4
+ import type { ComponentChildren } from 'preact';
8
5
  import { Context } from 'preact';
9
6
  import { DataTag } from '@tanstack/query-core';
10
7
  import { dataTagErrorSymbol } from '@tanstack/query-core';
@@ -26,7 +23,6 @@ import { Enabled } from '@tanstack/query-core';
26
23
  import { EnsureInfiniteQueryDataOptions } from '@tanstack/query-core';
27
24
  import { EnsureQueryDataOptions } from '@tanstack/query-core';
28
25
  import { environmentManager } from '@tanstack/query-core';
29
- import type { ErrorInfo } from 'preact';
30
26
  import { experimental_streamedQuery } from '@tanstack/query-core';
31
27
  import { FetchInfiniteQueryOptions } from '@tanstack/query-core';
32
28
  import { FetchNextPageOptions } from '@tanstack/query-core';
@@ -64,7 +60,6 @@ import { keepPreviousData } from '@tanstack/query-core';
64
60
  import { ManagedTimerId } from '@tanstack/query-core';
65
61
  import { matchMutation } from '@tanstack/query-core';
66
62
  import { matchQuery } from '@tanstack/query-core';
67
- import type { MockInstance } from 'vitest';
68
63
  import { MutateFunction } from '@tanstack/query-core';
69
64
  import { MutateOptions } from '@tanstack/query-core';
70
65
  import { Mutation } from '@tanstack/query-core';
@@ -133,7 +128,6 @@ import { QueryStatus } from '@tanstack/query-core';
133
128
  import { RefetchOptions } from '@tanstack/query-core';
134
129
  import { RefetchQueryFilters } from '@tanstack/query-core';
135
130
  import { Register } from '@tanstack/query-core';
136
- import { render } from '@testing-library/preact';
137
131
  import { replaceEqualDeep } from '@tanstack/query-core';
138
132
  import { ResetOptions } from '@tanstack/query-core';
139
133
  import { ResultOptions } from '@tanstack/query-core';
@@ -151,7 +145,7 @@ import { UnsetMarker } from '@tanstack/query-core';
151
145
  import { unsetMarker } from '@tanstack/query-core';
152
146
  import { Updater } from '@tanstack/query-core';
153
147
  import type { UserConfig } from 'vite';
154
- import { VNode } from 'preact';
148
+ import type { VNode } from 'preact';
155
149
  import { WithRequired } from '@tanstack/query-core';
156
150
 
157
151
  export { AnyDataTag }
@@ -180,11 +174,6 @@ declare type AnyUseSuspenseQueryOptions = UseSuspenseQueryOptions<any, any, any,
180
174
  export { AnyUseSuspenseQueryOptions }
181
175
  export { AnyUseSuspenseQueryOptions as AnyUseSuspenseQueryOptions_alias_1 }
182
176
 
183
- export declare function Blink({ duration, children, }: {
184
- duration: number;
185
- children: ComponentChildren;
186
- }): JSX.Element;
187
-
188
177
  export { CancelledError }
189
178
 
190
179
  export { CancelOptions }
@@ -264,95 +253,8 @@ export declare const ensureSuspenseTimers: (defaultedOptions: DefaultedQueryObse
264
253
 
265
254
  export { environmentManager }
266
255
 
267
- declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
268
- constructor(props: ErrorBoundaryProps);
269
- static getDerivedStateFromError(error: Error): {
270
- didCatch: boolean;
271
- error: Error;
272
- };
273
- resetErrorBoundary(...args: any[]): void;
274
- componentDidCatch(error: Error, info: ErrorInfo): void;
275
- componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void;
276
- render(): VNode< {
277
- value: {
278
- didCatch: boolean;
279
- error: any;
280
- resetErrorBoundary: (...args: any[]) => void;
281
- } | null;
282
- children?: ComponentChildren;
283
- }>;
284
- }
285
- export { ErrorBoundary }
286
- export { ErrorBoundary as ErrorBoundary_alias_1 }
287
-
288
- declare const ErrorBoundaryContext: Context<ErrorBoundaryContextType | null>;
289
- export { ErrorBoundaryContext }
290
- export { ErrorBoundaryContext as ErrorBoundaryContext_alias_1 }
291
-
292
- declare type ErrorBoundaryContextType = {
293
- didCatch: boolean;
294
- error: any;
295
- resetErrorBoundary: (...args: any[]) => void;
296
- };
297
-
298
- declare type ErrorBoundaryProps = ErrorBoundaryPropsWithFallback | ErrorBoundaryPropsWithComponent | ErrorBoundaryPropsWithRender;
299
- export { ErrorBoundaryProps }
300
- export { ErrorBoundaryProps as ErrorBoundaryProps_alias_1 }
301
-
302
- declare type ErrorBoundaryPropsWithComponent = ErrorBoundarySharedProps & {
303
- fallback?: never;
304
- FallbackComponent: ComponentType<FallbackProps>;
305
- fallbackRender?: never;
306
- };
307
- export { ErrorBoundaryPropsWithComponent }
308
- export { ErrorBoundaryPropsWithComponent as ErrorBoundaryPropsWithComponent_alias_1 }
309
-
310
- declare type ErrorBoundaryPropsWithFallback = ErrorBoundarySharedProps & {
311
- fallback: ComponentChild;
312
- FallbackComponent?: never;
313
- fallbackRender?: never;
314
- };
315
- export { ErrorBoundaryPropsWithFallback }
316
- export { ErrorBoundaryPropsWithFallback as ErrorBoundaryPropsWithFallback_alias_1 }
317
-
318
- declare type ErrorBoundaryPropsWithRender = ErrorBoundarySharedProps & {
319
- fallback?: never;
320
- FallbackComponent?: never;
321
- fallbackRender: (props: FallbackProps) => ComponentChild;
322
- };
323
- export { ErrorBoundaryPropsWithRender }
324
- export { ErrorBoundaryPropsWithRender as ErrorBoundaryPropsWithRender_alias_1 }
325
-
326
- declare type ErrorBoundarySharedProps = PropsWithChildren<{
327
- onError?: (error: Error, info: ErrorInfo) => void;
328
- onReset?: (details: {
329
- reason: 'imperative-api';
330
- args: any[];
331
- } | {
332
- reason: 'keys';
333
- prev: any[] | undefined;
334
- next: any[] | undefined;
335
- }) => void;
336
- resetKeys?: any[];
337
- }>;
338
-
339
- declare type ErrorBoundaryState = {
340
- didCatch: true;
341
- error: any;
342
- } | {
343
- didCatch: false;
344
- error: null;
345
- };
346
-
347
256
  export { experimental_streamedQuery }
348
257
 
349
- declare type FallbackProps = {
350
- error: any;
351
- resetErrorBoundary: (...args: any[]) => void;
352
- };
353
- export { FallbackProps }
354
- export { FallbackProps as FallbackProps_alias_1 }
355
-
356
258
  export { FetchInfiniteQueryOptions }
357
259
 
358
260
  export { FetchNextPageOptions }
@@ -553,8 +455,6 @@ declare type MAXIMUM_DEPTH = 20;
553
455
 
554
456
  declare type MAXIMUM_DEPTH_2 = 20;
555
457
 
556
- export declare function mockOnlineManagerIsOnline(value: boolean): MockInstance<() => boolean>;
557
-
558
458
  /**
559
459
  * @param {Object} opts - Options for building configurations.
560
460
  * @param {string[]} opts.entry - The entry array.
@@ -645,10 +545,6 @@ export { partialMatchKey }
645
545
 
646
546
  export { PlaceholderDataFunction }
647
547
 
648
- declare type PropsWithChildren<TProps = {}> = TProps & {
649
- children?: ComponentChildren;
650
- };
651
-
652
548
  export { QueriesObserver }
653
549
 
654
550
  export { QueriesObserverOptions }
@@ -804,20 +700,14 @@ export { RefetchQueryFilters }
804
700
 
805
701
  export { Register }
806
702
 
807
- export declare function renderWithClient(client: QueryClient, ui: VNode): ReturnType<typeof render>;
808
-
809
703
  export { replaceEqualDeep }
810
704
 
811
705
  export { ResetOptions }
812
706
 
813
707
  export { ResultOptions }
814
708
 
815
- export declare function setActTimeout(fn: () => void, ms?: number): NodeJS.Timeout;
816
-
817
709
  export { SetDataOptions }
818
710
 
819
- export declare function setIsServer(value: boolean): () => void;
820
-
821
711
  export declare const shouldSuspend: (defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any> | undefined, result: QueryObserverResult<any, any>) => boolean | undefined;
822
712
 
823
713
  export { shouldThrowError }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/preact-query",
3
- "version": "5.94.2",
3
+ "version": "5.94.3",
4
4
  "description": "Hooks for managing, caching and syncing asynchronous and remote data in preact",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -55,8 +55,8 @@
55
55
  "preact-render-to-string": "^6.6.4",
56
56
  "typescript": "5.9.3",
57
57
  "typescript-eslint": "^8.54.0",
58
- "@tanstack/query-persist-client-core": "5.92.4",
59
- "@tanstack/query-test-utils": "0.0.0"
58
+ "@tanstack/query-test-utils": "0.0.0",
59
+ "@tanstack/query-persist-client-core": "5.92.4"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "preact": "^10.0.0"