@tanstack/query-core 5.55.3 → 5.56.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 (91) hide show
  1. package/build/legacy/{hydration-BOOcDeHq.d.cts → hydration-D6canbuP.d.cts} +7 -2
  2. package/build/legacy/{hydration-DTVzC0E7.d.ts → hydration-DgUcX5FN.d.ts} +7 -2
  3. package/build/legacy/hydration.d.cts +1 -1
  4. package/build/legacy/hydration.d.ts +1 -1
  5. package/build/legacy/index.d.cts +1 -1
  6. package/build/legacy/index.d.ts +1 -1
  7. package/build/legacy/infiniteQueryBehavior.d.cts +1 -1
  8. package/build/legacy/infiniteQueryBehavior.d.ts +1 -1
  9. package/build/legacy/infiniteQueryObserver.d.cts +1 -1
  10. package/build/legacy/infiniteQueryObserver.d.ts +1 -1
  11. package/build/legacy/mutation.d.cts +1 -1
  12. package/build/legacy/mutation.d.ts +1 -1
  13. package/build/legacy/mutationCache.d.cts +1 -1
  14. package/build/legacy/mutationCache.d.ts +1 -1
  15. package/build/legacy/mutationObserver.d.cts +1 -1
  16. package/build/legacy/mutationObserver.d.ts +1 -1
  17. package/build/legacy/notifyManager.cjs +40 -34
  18. package/build/legacy/notifyManager.cjs.map +1 -1
  19. package/build/legacy/notifyManager.d.cts +22 -0
  20. package/build/legacy/notifyManager.d.ts +22 -0
  21. package/build/legacy/notifyManager.js +40 -34
  22. package/build/legacy/notifyManager.js.map +1 -1
  23. package/build/legacy/queriesObserver.d.cts +1 -1
  24. package/build/legacy/queriesObserver.d.ts +1 -1
  25. package/build/legacy/query.d.cts +1 -1
  26. package/build/legacy/query.d.ts +1 -1
  27. package/build/legacy/queryCache.d.cts +1 -1
  28. package/build/legacy/queryCache.d.ts +1 -1
  29. package/build/legacy/queryClient.cjs +4 -0
  30. package/build/legacy/queryClient.cjs.map +1 -1
  31. package/build/legacy/queryClient.d.cts +1 -1
  32. package/build/legacy/queryClient.d.ts +1 -1
  33. package/build/legacy/queryClient.js +4 -0
  34. package/build/legacy/queryClient.js.map +1 -1
  35. package/build/legacy/queryObserver.d.cts +1 -1
  36. package/build/legacy/queryObserver.d.ts +1 -1
  37. package/build/legacy/retryer.d.cts +1 -1
  38. package/build/legacy/retryer.d.ts +1 -1
  39. package/build/legacy/types.cjs.map +1 -1
  40. package/build/legacy/types.d.cts +1 -1
  41. package/build/legacy/types.d.ts +1 -1
  42. package/build/legacy/utils.d.cts +1 -1
  43. package/build/legacy/utils.d.ts +1 -1
  44. package/build/modern/{hydration-BOOcDeHq.d.cts → hydration-D6canbuP.d.cts} +7 -2
  45. package/build/modern/{hydration-DTVzC0E7.d.ts → hydration-DgUcX5FN.d.ts} +7 -2
  46. package/build/modern/hydration.d.cts +1 -1
  47. package/build/modern/hydration.d.ts +1 -1
  48. package/build/modern/index.d.cts +1 -1
  49. package/build/modern/index.d.ts +1 -1
  50. package/build/modern/infiniteQueryBehavior.d.cts +1 -1
  51. package/build/modern/infiniteQueryBehavior.d.ts +1 -1
  52. package/build/modern/infiniteQueryObserver.d.cts +1 -1
  53. package/build/modern/infiniteQueryObserver.d.ts +1 -1
  54. package/build/modern/mutation.d.cts +1 -1
  55. package/build/modern/mutation.d.ts +1 -1
  56. package/build/modern/mutationCache.d.cts +1 -1
  57. package/build/modern/mutationCache.d.ts +1 -1
  58. package/build/modern/mutationObserver.d.cts +1 -1
  59. package/build/modern/mutationObserver.d.ts +1 -1
  60. package/build/modern/notifyManager.cjs +40 -34
  61. package/build/modern/notifyManager.cjs.map +1 -1
  62. package/build/modern/notifyManager.d.cts +22 -0
  63. package/build/modern/notifyManager.d.ts +22 -0
  64. package/build/modern/notifyManager.js +40 -34
  65. package/build/modern/notifyManager.js.map +1 -1
  66. package/build/modern/queriesObserver.d.cts +1 -1
  67. package/build/modern/queriesObserver.d.ts +1 -1
  68. package/build/modern/query.d.cts +1 -1
  69. package/build/modern/query.d.ts +1 -1
  70. package/build/modern/queryCache.d.cts +1 -1
  71. package/build/modern/queryCache.d.ts +1 -1
  72. package/build/modern/queryClient.cjs +4 -0
  73. package/build/modern/queryClient.cjs.map +1 -1
  74. package/build/modern/queryClient.d.cts +1 -1
  75. package/build/modern/queryClient.d.ts +1 -1
  76. package/build/modern/queryClient.js +4 -0
  77. package/build/modern/queryClient.js.map +1 -1
  78. package/build/modern/queryObserver.d.cts +1 -1
  79. package/build/modern/queryObserver.d.ts +1 -1
  80. package/build/modern/retryer.d.cts +1 -1
  81. package/build/modern/retryer.d.ts +1 -1
  82. package/build/modern/types.cjs.map +1 -1
  83. package/build/modern/types.d.cts +1 -1
  84. package/build/modern/types.d.ts +1 -1
  85. package/build/modern/utils.d.cts +1 -1
  86. package/build/modern/utils.d.ts +1 -1
  87. package/package.json +1 -1
  88. package/src/__tests__/queryClient.test.tsx +63 -0
  89. package/src/notifyManager.ts +42 -53
  90. package/src/queryClient.ts +28 -2
  91. package/src/types.ts +26 -6
@@ -327,6 +327,7 @@ declare class QueryClient {
327
327
  prefetchQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>): Promise<void>;
328
328
  fetchInfiniteQuery<TQueryFnData, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: FetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): Promise<InfiniteData<TData, TPageParam>>;
329
329
  prefetchInfiniteQuery<TQueryFnData, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: FetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): Promise<void>;
330
+ ensureInfiniteQueryData<TQueryFnData, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: EnsureInfiniteQueryDataOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): Promise<InfiniteData<TData, TPageParam>>;
330
331
  resumePausedMutations(): Promise<unknown>;
331
332
  getQueryCache(): QueryCache;
332
333
  getMutationCache(): MutationCache;
@@ -712,6 +713,7 @@ interface InfiniteQueryObserverOptions<TQueryFnData = unknown, TError = DefaultE
712
713
  }
713
714
  type DefaultedInfiniteQueryObserverOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = WithRequired<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey, TPageParam>, 'throwOnError' | 'refetchOnReconnect' | 'queryHash'>;
714
715
  interface FetchQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = never> extends WithRequired<QueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'queryKey'> {
716
+ initialPageParam?: never;
715
717
  /**
716
718
  * The time in milliseconds after data is considered stale.
717
719
  * If the data is fresh it will be returned from the cache.
@@ -721,13 +723,16 @@ interface FetchQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData
721
723
  interface EnsureQueryDataOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = never> extends FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> {
722
724
  revalidateIfStale?: boolean;
723
725
  }
726
+ type EnsureInfiniteQueryDataOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = FetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
727
+ revalidateIfStale?: boolean;
728
+ };
724
729
  type FetchInfiniteQueryPages<TQueryFnData = unknown, TPageParam = unknown> = {
725
730
  pages?: never;
726
731
  } | {
727
732
  pages: number;
728
733
  getNextPageParam: GetNextPageParamFunction<TPageParam, TQueryFnData>;
729
734
  };
730
- type FetchInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = FetchQueryOptions<TQueryFnData, TError, InfiniteData<TData, TPageParam>, TQueryKey, TPageParam> & InitialPageParam<TPageParam> & FetchInfiniteQueryPages<TQueryFnData, TPageParam>;
735
+ type FetchInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = Omit<FetchQueryOptions<TQueryFnData, TError, InfiniteData<TData, TPageParam>, TQueryKey, TPageParam>, 'initialPageParam'> & InitialPageParam<TPageParam> & FetchInfiniteQueryPages<TQueryFnData, TPageParam>;
731
736
  interface ResultOptions {
732
737
  throwOnError?: boolean;
733
738
  }
@@ -1237,4 +1242,4 @@ declare function defaultShouldDehydrateQuery(query: Query): boolean;
1237
1242
  declare function dehydrate(client: QueryClient, options?: DehydrateOptions): DehydratedState;
1238
1243
  declare function hydrate(client: QueryClient, dehydratedState: unknown, options?: HydrateOptions): void;
1239
1244
 
1240
- export { type NotifyOnChangeProps as $, type QueryKey as A, dataTagSymbol as B, CancelledError as C, type DehydrateOptions as D, type DataTag as E, type QueryFunction as F, type StaleTime as G, type HydrateOptions as H, type Enabled as I, type QueryPersister as J, type QueryFunctionContext as K, type InitialDataFunction as L, MutationCache as M, type NoInfer as N, type OmitKeyof as O, type PlaceholderDataFunction as P, QueryCache as Q, type Register as R, type SkipToken as S, type QueriesPlaceholderDataFunction as T, type Updater as U, type QueryKeyHashFunction as V, type GetPreviousPageParamFunction as W, type GetNextPageParamFunction as X, type InfiniteData as Y, type QueryMeta as Z, type NetworkMode as _, type QueryCacheNotifyEvent as a, type FetchDirection as a$, type QueryOptions as a0, type InitialPageParam as a1, type InfiniteQueryPageParamsOptions as a2, type ThrowOnError as a3, type QueryObserverOptions as a4, type WithRequired as a5, type Optional as a6, type DefaultedQueryObserverOptions as a7, type InfiniteQueryObserverOptions as a8, type DefaultedInfiniteQueryObserverOptions as a9, type InfiniteQueryObserverSuccessResult as aA, type DefinedInfiniteQueryObserverResult as aB, type InfiniteQueryObserverResult as aC, type MutationKey as aD, type MutationStatus as aE, type MutationScope as aF, type MutationMeta as aG, type MutationFunction as aH, type MutationOptions as aI, type MutationObserverOptions as aJ, type MutateOptions as aK, type MutateFunction as aL, type MutationObserverBaseResult as aM, type MutationObserverIdleResult as aN, type MutationObserverLoadingResult as aO, type MutationObserverErrorResult as aP, type MutationObserverSuccessResult as aQ, type MutationObserverResult as aR, type QueryClientConfig as aS, type DefaultOptions as aT, type CancelOptions as aU, type SetDataOptions as aV, type NotifyEventType as aW, type NotifyEvent as aX, type QueryBehavior as aY, type NotifyOptions as aZ, type FetchContext as a_, type FetchQueryOptions as aa, type EnsureQueryDataOptions as ab, type FetchInfiniteQueryOptions as ac, type ResultOptions as ad, type RefetchOptions as ae, type InvalidateQueryFilters as af, type RefetchQueryFilters as ag, type InvalidateOptions as ah, type ResetOptions as ai, type FetchNextPageOptions as aj, type FetchPreviousPageOptions as ak, type QueryStatus as al, type FetchStatus as am, type QueryObserverBaseResult as an, type QueryObserverPendingResult as ao, type QueryObserverLoadingResult as ap, type QueryObserverLoadingErrorResult as aq, type QueryObserverRefetchErrorResult as ar, type QueryObserverSuccessResult as as, type DefinedQueryObserverResult as at, type QueryObserverResult as au, type InfiniteQueryObserverBaseResult as av, type InfiniteQueryObserverPendingResult as aw, type InfiniteQueryObserverLoadingResult as ax, type InfiniteQueryObserverLoadingErrorResult as ay, type InfiniteQueryObserverRefetchErrorResult as az, QueryClient as b, type FetchMeta as b0, type FetchOptions as b1, type Action$1 as b2, type SetStateOptions as b3, fetchState as b4, type QueryTypeFilter as b5, noop as b6, functionalUpdate as b7, isValidTimeout as b8, timeUntilStale as b9, resolveStaleTime as ba, resolveEnabled as bb, hashQueryKeyByOptions as bc, partialMatchKey as bd, shallowEqualObjects as be, isPlainArray as bf, isPlainObject as bg, sleep as bh, replaceData as bi, addToEnd as bj, addToStart as bk, ensureQueryFn as bl, type QueryStore as bm, type Action as bn, getDefaultState as bo, type Retryer as bp, type RetryValue as bq, type RetryDelayValue as br, canFetch as bs, createRetryer as bt, QueryObserver as c, type MutationCacheNotifyEvent as d, MutationObserver as e, matchMutation as f, type MutationFilters as g, hashKey as h, isServer as i, type QueryFilters as j, keepPreviousData as k, isCancelledError as l, matchQuery as m, dehydrate as n, hydrate as o, defaultShouldDehydrateQuery as p, defaultShouldDehydrateMutation as q, replaceEqualDeep as r, skipToken as s, type QueryState as t, Query as u, type MutationState as v, Mutation as w, type DehydratedState as x, type Override as y, type DefaultError as z };
1245
+ export { type NotifyOnChangeProps as $, type QueryKey as A, dataTagSymbol as B, CancelledError as C, type DehydrateOptions as D, type DataTag as E, type QueryFunction as F, type StaleTime as G, type HydrateOptions as H, type Enabled as I, type QueryPersister as J, type QueryFunctionContext as K, type InitialDataFunction as L, MutationCache as M, type NoInfer as N, type OmitKeyof as O, type PlaceholderDataFunction as P, QueryCache as Q, type Register as R, type SkipToken as S, type QueriesPlaceholderDataFunction as T, type Updater as U, type QueryKeyHashFunction as V, type GetPreviousPageParamFunction as W, type GetNextPageParamFunction as X, type InfiniteData as Y, type QueryMeta as Z, type NetworkMode as _, type QueryCacheNotifyEvent as a, type FetchContext as a$, type QueryOptions as a0, type InitialPageParam as a1, type InfiniteQueryPageParamsOptions as a2, type ThrowOnError as a3, type QueryObserverOptions as a4, type WithRequired as a5, type Optional as a6, type DefaultedQueryObserverOptions as a7, type InfiniteQueryObserverOptions as a8, type DefaultedInfiniteQueryObserverOptions as a9, type InfiniteQueryObserverRefetchErrorResult as aA, type InfiniteQueryObserverSuccessResult as aB, type DefinedInfiniteQueryObserverResult as aC, type InfiniteQueryObserverResult as aD, type MutationKey as aE, type MutationStatus as aF, type MutationScope as aG, type MutationMeta as aH, type MutationFunction as aI, type MutationOptions as aJ, type MutationObserverOptions as aK, type MutateOptions as aL, type MutateFunction as aM, type MutationObserverBaseResult as aN, type MutationObserverIdleResult as aO, type MutationObserverLoadingResult as aP, type MutationObserverErrorResult as aQ, type MutationObserverSuccessResult as aR, type MutationObserverResult as aS, type QueryClientConfig as aT, type DefaultOptions as aU, type CancelOptions as aV, type SetDataOptions as aW, type NotifyEventType as aX, type NotifyEvent as aY, type QueryBehavior as aZ, type NotifyOptions as a_, type FetchQueryOptions as aa, type EnsureQueryDataOptions as ab, type EnsureInfiniteQueryDataOptions as ac, type FetchInfiniteQueryOptions as ad, type ResultOptions as ae, type RefetchOptions as af, type InvalidateQueryFilters as ag, type RefetchQueryFilters as ah, type InvalidateOptions as ai, type ResetOptions as aj, type FetchNextPageOptions as ak, type FetchPreviousPageOptions as al, type QueryStatus as am, type FetchStatus as an, type QueryObserverBaseResult as ao, type QueryObserverPendingResult as ap, type QueryObserverLoadingResult as aq, type QueryObserverLoadingErrorResult as ar, type QueryObserverRefetchErrorResult as as, type QueryObserverSuccessResult as at, type DefinedQueryObserverResult as au, type QueryObserverResult as av, type InfiniteQueryObserverBaseResult as aw, type InfiniteQueryObserverPendingResult as ax, type InfiniteQueryObserverLoadingResult as ay, type InfiniteQueryObserverLoadingErrorResult as az, QueryClient as b, type FetchDirection as b0, type FetchMeta as b1, type FetchOptions as b2, type Action$1 as b3, type SetStateOptions as b4, fetchState as b5, type QueryTypeFilter as b6, noop as b7, functionalUpdate as b8, isValidTimeout as b9, timeUntilStale as ba, resolveStaleTime as bb, resolveEnabled as bc, hashQueryKeyByOptions as bd, partialMatchKey as be, shallowEqualObjects as bf, isPlainArray as bg, isPlainObject as bh, sleep as bi, replaceData as bj, addToEnd as bk, addToStart as bl, ensureQueryFn as bm, type QueryStore as bn, type Action as bo, getDefaultState as bp, type Retryer as bq, type RetryValue as br, type RetryDelayValue as bs, canFetch as bt, createRetryer as bu, QueryObserver as c, type MutationCacheNotifyEvent as d, MutationObserver as e, matchMutation as f, type MutationFilters as g, hashKey as h, isServer as i, type QueryFilters as j, keepPreviousData as k, isCancelledError as l, matchQuery as m, dehydrate as n, hydrate as o, defaultShouldDehydrateQuery as p, defaultShouldDehydrateMutation as q, replaceEqualDeep as r, skipToken as s, type QueryState as t, Query as u, type MutationState as v, Mutation as w, type DehydratedState as x, type Override as y, type DefaultError as z };
@@ -327,6 +327,7 @@ declare class QueryClient {
327
327
  prefetchQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>): Promise<void>;
328
328
  fetchInfiniteQuery<TQueryFnData, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: FetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): Promise<InfiniteData<TData, TPageParam>>;
329
329
  prefetchInfiniteQuery<TQueryFnData, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: FetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): Promise<void>;
330
+ ensureInfiniteQueryData<TQueryFnData, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: EnsureInfiniteQueryDataOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): Promise<InfiniteData<TData, TPageParam>>;
330
331
  resumePausedMutations(): Promise<unknown>;
331
332
  getQueryCache(): QueryCache;
332
333
  getMutationCache(): MutationCache;
@@ -712,6 +713,7 @@ interface InfiniteQueryObserverOptions<TQueryFnData = unknown, TError = DefaultE
712
713
  }
713
714
  type DefaultedInfiniteQueryObserverOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = WithRequired<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey, TPageParam>, 'throwOnError' | 'refetchOnReconnect' | 'queryHash'>;
714
715
  interface FetchQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = never> extends WithRequired<QueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'queryKey'> {
716
+ initialPageParam?: never;
715
717
  /**
716
718
  * The time in milliseconds after data is considered stale.
717
719
  * If the data is fresh it will be returned from the cache.
@@ -721,13 +723,16 @@ interface FetchQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData
721
723
  interface EnsureQueryDataOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = never> extends FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> {
722
724
  revalidateIfStale?: boolean;
723
725
  }
726
+ type EnsureInfiniteQueryDataOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = FetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
727
+ revalidateIfStale?: boolean;
728
+ };
724
729
  type FetchInfiniteQueryPages<TQueryFnData = unknown, TPageParam = unknown> = {
725
730
  pages?: never;
726
731
  } | {
727
732
  pages: number;
728
733
  getNextPageParam: GetNextPageParamFunction<TPageParam, TQueryFnData>;
729
734
  };
730
- type FetchInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = FetchQueryOptions<TQueryFnData, TError, InfiniteData<TData, TPageParam>, TQueryKey, TPageParam> & InitialPageParam<TPageParam> & FetchInfiniteQueryPages<TQueryFnData, TPageParam>;
735
+ type FetchInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = Omit<FetchQueryOptions<TQueryFnData, TError, InfiniteData<TData, TPageParam>, TQueryKey, TPageParam>, 'initialPageParam'> & InitialPageParam<TPageParam> & FetchInfiniteQueryPages<TQueryFnData, TPageParam>;
731
736
  interface ResultOptions {
732
737
  throwOnError?: boolean;
733
738
  }
@@ -1237,4 +1242,4 @@ declare function defaultShouldDehydrateQuery(query: Query): boolean;
1237
1242
  declare function dehydrate(client: QueryClient, options?: DehydrateOptions): DehydratedState;
1238
1243
  declare function hydrate(client: QueryClient, dehydratedState: unknown, options?: HydrateOptions): void;
1239
1244
 
1240
- export { type NotifyOnChangeProps as $, type QueryKey as A, dataTagSymbol as B, CancelledError as C, type DehydrateOptions as D, type DataTag as E, type QueryFunction as F, type StaleTime as G, type HydrateOptions as H, type Enabled as I, type QueryPersister as J, type QueryFunctionContext as K, type InitialDataFunction as L, MutationCache as M, type NoInfer as N, type OmitKeyof as O, type PlaceholderDataFunction as P, QueryCache as Q, type Register as R, type SkipToken as S, type QueriesPlaceholderDataFunction as T, type Updater as U, type QueryKeyHashFunction as V, type GetPreviousPageParamFunction as W, type GetNextPageParamFunction as X, type InfiniteData as Y, type QueryMeta as Z, type NetworkMode as _, type QueryCacheNotifyEvent as a, type FetchDirection as a$, type QueryOptions as a0, type InitialPageParam as a1, type InfiniteQueryPageParamsOptions as a2, type ThrowOnError as a3, type QueryObserverOptions as a4, type WithRequired as a5, type Optional as a6, type DefaultedQueryObserverOptions as a7, type InfiniteQueryObserverOptions as a8, type DefaultedInfiniteQueryObserverOptions as a9, type InfiniteQueryObserverSuccessResult as aA, type DefinedInfiniteQueryObserverResult as aB, type InfiniteQueryObserverResult as aC, type MutationKey as aD, type MutationStatus as aE, type MutationScope as aF, type MutationMeta as aG, type MutationFunction as aH, type MutationOptions as aI, type MutationObserverOptions as aJ, type MutateOptions as aK, type MutateFunction as aL, type MutationObserverBaseResult as aM, type MutationObserverIdleResult as aN, type MutationObserverLoadingResult as aO, type MutationObserverErrorResult as aP, type MutationObserverSuccessResult as aQ, type MutationObserverResult as aR, type QueryClientConfig as aS, type DefaultOptions as aT, type CancelOptions as aU, type SetDataOptions as aV, type NotifyEventType as aW, type NotifyEvent as aX, type QueryBehavior as aY, type NotifyOptions as aZ, type FetchContext as a_, type FetchQueryOptions as aa, type EnsureQueryDataOptions as ab, type FetchInfiniteQueryOptions as ac, type ResultOptions as ad, type RefetchOptions as ae, type InvalidateQueryFilters as af, type RefetchQueryFilters as ag, type InvalidateOptions as ah, type ResetOptions as ai, type FetchNextPageOptions as aj, type FetchPreviousPageOptions as ak, type QueryStatus as al, type FetchStatus as am, type QueryObserverBaseResult as an, type QueryObserverPendingResult as ao, type QueryObserverLoadingResult as ap, type QueryObserverLoadingErrorResult as aq, type QueryObserverRefetchErrorResult as ar, type QueryObserverSuccessResult as as, type DefinedQueryObserverResult as at, type QueryObserverResult as au, type InfiniteQueryObserverBaseResult as av, type InfiniteQueryObserverPendingResult as aw, type InfiniteQueryObserverLoadingResult as ax, type InfiniteQueryObserverLoadingErrorResult as ay, type InfiniteQueryObserverRefetchErrorResult as az, QueryClient as b, type FetchMeta as b0, type FetchOptions as b1, type Action$1 as b2, type SetStateOptions as b3, fetchState as b4, type QueryTypeFilter as b5, noop as b6, functionalUpdate as b7, isValidTimeout as b8, timeUntilStale as b9, resolveStaleTime as ba, resolveEnabled as bb, hashQueryKeyByOptions as bc, partialMatchKey as bd, shallowEqualObjects as be, isPlainArray as bf, isPlainObject as bg, sleep as bh, replaceData as bi, addToEnd as bj, addToStart as bk, ensureQueryFn as bl, type QueryStore as bm, type Action as bn, getDefaultState as bo, type Retryer as bp, type RetryValue as bq, type RetryDelayValue as br, canFetch as bs, createRetryer as bt, QueryObserver as c, type MutationCacheNotifyEvent as d, MutationObserver as e, matchMutation as f, type MutationFilters as g, hashKey as h, isServer as i, type QueryFilters as j, keepPreviousData as k, isCancelledError as l, matchQuery as m, dehydrate as n, hydrate as o, defaultShouldDehydrateQuery as p, defaultShouldDehydrateMutation as q, replaceEqualDeep as r, skipToken as s, type QueryState as t, Query as u, type MutationState as v, Mutation as w, type DehydratedState as x, type Override as y, type DefaultError as z };
1245
+ export { type NotifyOnChangeProps as $, type QueryKey as A, dataTagSymbol as B, CancelledError as C, type DehydrateOptions as D, type DataTag as E, type QueryFunction as F, type StaleTime as G, type HydrateOptions as H, type Enabled as I, type QueryPersister as J, type QueryFunctionContext as K, type InitialDataFunction as L, MutationCache as M, type NoInfer as N, type OmitKeyof as O, type PlaceholderDataFunction as P, QueryCache as Q, type Register as R, type SkipToken as S, type QueriesPlaceholderDataFunction as T, type Updater as U, type QueryKeyHashFunction as V, type GetPreviousPageParamFunction as W, type GetNextPageParamFunction as X, type InfiniteData as Y, type QueryMeta as Z, type NetworkMode as _, type QueryCacheNotifyEvent as a, type FetchContext as a$, type QueryOptions as a0, type InitialPageParam as a1, type InfiniteQueryPageParamsOptions as a2, type ThrowOnError as a3, type QueryObserverOptions as a4, type WithRequired as a5, type Optional as a6, type DefaultedQueryObserverOptions as a7, type InfiniteQueryObserverOptions as a8, type DefaultedInfiniteQueryObserverOptions as a9, type InfiniteQueryObserverRefetchErrorResult as aA, type InfiniteQueryObserverSuccessResult as aB, type DefinedInfiniteQueryObserverResult as aC, type InfiniteQueryObserverResult as aD, type MutationKey as aE, type MutationStatus as aF, type MutationScope as aG, type MutationMeta as aH, type MutationFunction as aI, type MutationOptions as aJ, type MutationObserverOptions as aK, type MutateOptions as aL, type MutateFunction as aM, type MutationObserverBaseResult as aN, type MutationObserverIdleResult as aO, type MutationObserverLoadingResult as aP, type MutationObserverErrorResult as aQ, type MutationObserverSuccessResult as aR, type MutationObserverResult as aS, type QueryClientConfig as aT, type DefaultOptions as aU, type CancelOptions as aV, type SetDataOptions as aW, type NotifyEventType as aX, type NotifyEvent as aY, type QueryBehavior as aZ, type NotifyOptions as a_, type FetchQueryOptions as aa, type EnsureQueryDataOptions as ab, type EnsureInfiniteQueryDataOptions as ac, type FetchInfiniteQueryOptions as ad, type ResultOptions as ae, type RefetchOptions as af, type InvalidateQueryFilters as ag, type RefetchQueryFilters as ah, type InvalidateOptions as ai, type ResetOptions as aj, type FetchNextPageOptions as ak, type FetchPreviousPageOptions as al, type QueryStatus as am, type FetchStatus as an, type QueryObserverBaseResult as ao, type QueryObserverPendingResult as ap, type QueryObserverLoadingResult as aq, type QueryObserverLoadingErrorResult as ar, type QueryObserverRefetchErrorResult as as, type QueryObserverSuccessResult as at, type DefinedQueryObserverResult as au, type QueryObserverResult as av, type InfiniteQueryObserverBaseResult as aw, type InfiniteQueryObserverPendingResult as ax, type InfiniteQueryObserverLoadingResult as ay, type InfiniteQueryObserverLoadingErrorResult as az, QueryClient as b, type FetchDirection as b0, type FetchMeta as b1, type FetchOptions as b2, type Action$1 as b3, type SetStateOptions as b4, fetchState as b5, type QueryTypeFilter as b6, noop as b7, functionalUpdate as b8, isValidTimeout as b9, timeUntilStale as ba, resolveStaleTime as bb, resolveEnabled as bc, hashQueryKeyByOptions as bd, partialMatchKey as be, shallowEqualObjects as bf, isPlainArray as bg, isPlainObject as bh, sleep as bi, replaceData as bj, addToEnd as bk, addToStart as bl, ensureQueryFn as bm, type QueryStore as bn, type Action as bo, getDefaultState as bp, type Retryer as bq, type RetryValue as br, type RetryDelayValue as bs, canFetch as bt, createRetryer as bu, QueryObserver as c, type MutationCacheNotifyEvent as d, MutationObserver as e, matchMutation as f, type MutationFilters as g, hashKey as h, isServer as i, type QueryFilters as j, keepPreviousData as k, isCancelledError as l, matchQuery as m, dehydrate as n, hydrate as o, defaultShouldDehydrateQuery as p, defaultShouldDehydrateMutation as q, replaceEqualDeep as r, skipToken as s, type QueryState as t, Query as u, type MutationState as v, Mutation as w, type DehydratedState as x, type Override as y, type DefaultError as z };
@@ -1,3 +1,3 @@
1
- export { D as DehydrateOptions, x as DehydratedState, H as HydrateOptions, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, o as hydrate } from './hydration-BOOcDeHq.cjs';
1
+ export { D as DehydrateOptions, x as DehydratedState, H as HydrateOptions, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, o as hydrate } from './hydration-D6canbuP.cjs';
2
2
  import './removable.cjs';
3
3
  import './subscribable.cjs';
@@ -1,3 +1,3 @@
1
- export { D as DehydrateOptions, x as DehydratedState, H as HydrateOptions, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, o as hydrate } from './hydration-DTVzC0E7.js';
1
+ export { D as DehydrateOptions, x as DehydratedState, H as HydrateOptions, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, o as hydrate } from './hydration-DgUcX5FN.js';
2
2
  import './removable.js';
3
3
  import './subscribable.js';
@@ -1,4 +1,4 @@
1
- export { aU as CancelOptions, C as CancelledError, E as DataTag, z as DefaultError, aT as DefaultOptions, a9 as DefaultedInfiniteQueryObserverOptions, a7 as DefaultedQueryObserverOptions, aB as DefinedInfiniteQueryObserverResult, at as DefinedQueryObserverResult, D as DehydrateOptions, x as DehydratedState, I as Enabled, ab as EnsureQueryDataOptions, ac as FetchInfiniteQueryOptions, aj as FetchNextPageOptions, ak as FetchPreviousPageOptions, aa as FetchQueryOptions, am as FetchStatus, X as GetNextPageParamFunction, W as GetPreviousPageParamFunction, H as HydrateOptions, Y as InfiniteData, av as InfiniteQueryObserverBaseResult, ay as InfiniteQueryObserverLoadingErrorResult, ax as InfiniteQueryObserverLoadingResult, a8 as InfiniteQueryObserverOptions, aw as InfiniteQueryObserverPendingResult, az as InfiniteQueryObserverRefetchErrorResult, aC as InfiniteQueryObserverResult, aA as InfiniteQueryObserverSuccessResult, a2 as InfiniteQueryPageParamsOptions, L as InitialDataFunction, a1 as InitialPageParam, ah as InvalidateOptions, af as InvalidateQueryFilters, aL as MutateFunction, aK as MutateOptions, w as Mutation, M as MutationCache, d as MutationCacheNotifyEvent, g as MutationFilters, aH as MutationFunction, aD as MutationKey, aG as MutationMeta, e as MutationObserver, aM as MutationObserverBaseResult, aP as MutationObserverErrorResult, aN as MutationObserverIdleResult, aO as MutationObserverLoadingResult, aJ as MutationObserverOptions, aR as MutationObserverResult, aQ as MutationObserverSuccessResult, aI as MutationOptions, aF as MutationScope, v as MutationState, aE as MutationStatus, _ as NetworkMode, N as NoInfer, aX as NotifyEvent, aW as NotifyEventType, $ as NotifyOnChangeProps, O as OmitKeyof, a6 as Optional, y as Override, P as PlaceholderDataFunction, T as QueriesPlaceholderDataFunction, u as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, aS as QueryClientConfig, j as QueryFilters, F as QueryFunction, K as QueryFunctionContext, A as QueryKey, V as QueryKeyHashFunction, Z as QueryMeta, c as QueryObserver, an as QueryObserverBaseResult, aq as QueryObserverLoadingErrorResult, ap as QueryObserverLoadingResult, a4 as QueryObserverOptions, ao as QueryObserverPendingResult, ar as QueryObserverRefetchErrorResult, au as QueryObserverResult, as as QueryObserverSuccessResult, a0 as QueryOptions, J as QueryPersister, t as QueryState, al as QueryStatus, ae as RefetchOptions, ag as RefetchQueryFilters, R as Register, ai as ResetOptions, ad as ResultOptions, aV as SetDataOptions, S as SkipToken, G as StaleTime, a3 as ThrowOnError, U as Updater, a5 as WithRequired, B as dataTagSymbol, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, h as hashKey, o as hydrate, l as isCancelledError, i as isServer, k as keepPreviousData, f as matchMutation, m as matchQuery, r as replaceEqualDeep, s as skipToken } from './hydration-BOOcDeHq.cjs';
1
+ export { aV as CancelOptions, C as CancelledError, E as DataTag, z as DefaultError, aU as DefaultOptions, a9 as DefaultedInfiniteQueryObserverOptions, a7 as DefaultedQueryObserverOptions, aC as DefinedInfiniteQueryObserverResult, au as DefinedQueryObserverResult, D as DehydrateOptions, x as DehydratedState, I as Enabled, ac as EnsureInfiniteQueryDataOptions, ab as EnsureQueryDataOptions, ad as FetchInfiniteQueryOptions, ak as FetchNextPageOptions, al as FetchPreviousPageOptions, aa as FetchQueryOptions, an as FetchStatus, X as GetNextPageParamFunction, W as GetPreviousPageParamFunction, H as HydrateOptions, Y as InfiniteData, aw as InfiniteQueryObserverBaseResult, az as InfiniteQueryObserverLoadingErrorResult, ay as InfiniteQueryObserverLoadingResult, a8 as InfiniteQueryObserverOptions, ax as InfiniteQueryObserverPendingResult, aA as InfiniteQueryObserverRefetchErrorResult, aD as InfiniteQueryObserverResult, aB as InfiniteQueryObserverSuccessResult, a2 as InfiniteQueryPageParamsOptions, L as InitialDataFunction, a1 as InitialPageParam, ai as InvalidateOptions, ag as InvalidateQueryFilters, aM as MutateFunction, aL as MutateOptions, w as Mutation, M as MutationCache, d as MutationCacheNotifyEvent, g as MutationFilters, aI as MutationFunction, aE as MutationKey, aH as MutationMeta, e as MutationObserver, aN as MutationObserverBaseResult, aQ as MutationObserverErrorResult, aO as MutationObserverIdleResult, aP as MutationObserverLoadingResult, aK as MutationObserverOptions, aS as MutationObserverResult, aR as MutationObserverSuccessResult, aJ as MutationOptions, aG as MutationScope, v as MutationState, aF as MutationStatus, _ as NetworkMode, N as NoInfer, aY as NotifyEvent, aX as NotifyEventType, $ as NotifyOnChangeProps, O as OmitKeyof, a6 as Optional, y as Override, P as PlaceholderDataFunction, T as QueriesPlaceholderDataFunction, u as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, aT as QueryClientConfig, j as QueryFilters, F as QueryFunction, K as QueryFunctionContext, A as QueryKey, V as QueryKeyHashFunction, Z as QueryMeta, c as QueryObserver, ao as QueryObserverBaseResult, ar as QueryObserverLoadingErrorResult, aq as QueryObserverLoadingResult, a4 as QueryObserverOptions, ap as QueryObserverPendingResult, as as QueryObserverRefetchErrorResult, av as QueryObserverResult, at as QueryObserverSuccessResult, a0 as QueryOptions, J as QueryPersister, t as QueryState, am as QueryStatus, af as RefetchOptions, ah as RefetchQueryFilters, R as Register, aj as ResetOptions, ae as ResultOptions, aW as SetDataOptions, S as SkipToken, G as StaleTime, a3 as ThrowOnError, U as Updater, a5 as WithRequired, B as dataTagSymbol, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, h as hashKey, o as hydrate, l as isCancelledError, i as isServer, k as keepPreviousData, f as matchMutation, m as matchQuery, r as replaceEqualDeep, s as skipToken } from './hydration-D6canbuP.cjs';
2
2
  export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.cjs';
3
3
  export { InfiniteQueryObserver } from './infiniteQueryObserver.cjs';
4
4
  export { notifyManager } from './notifyManager.cjs';
@@ -1,4 +1,4 @@
1
- export { aU as CancelOptions, C as CancelledError, E as DataTag, z as DefaultError, aT as DefaultOptions, a9 as DefaultedInfiniteQueryObserverOptions, a7 as DefaultedQueryObserverOptions, aB as DefinedInfiniteQueryObserverResult, at as DefinedQueryObserverResult, D as DehydrateOptions, x as DehydratedState, I as Enabled, ab as EnsureQueryDataOptions, ac as FetchInfiniteQueryOptions, aj as FetchNextPageOptions, ak as FetchPreviousPageOptions, aa as FetchQueryOptions, am as FetchStatus, X as GetNextPageParamFunction, W as GetPreviousPageParamFunction, H as HydrateOptions, Y as InfiniteData, av as InfiniteQueryObserverBaseResult, ay as InfiniteQueryObserverLoadingErrorResult, ax as InfiniteQueryObserverLoadingResult, a8 as InfiniteQueryObserverOptions, aw as InfiniteQueryObserverPendingResult, az as InfiniteQueryObserverRefetchErrorResult, aC as InfiniteQueryObserverResult, aA as InfiniteQueryObserverSuccessResult, a2 as InfiniteQueryPageParamsOptions, L as InitialDataFunction, a1 as InitialPageParam, ah as InvalidateOptions, af as InvalidateQueryFilters, aL as MutateFunction, aK as MutateOptions, w as Mutation, M as MutationCache, d as MutationCacheNotifyEvent, g as MutationFilters, aH as MutationFunction, aD as MutationKey, aG as MutationMeta, e as MutationObserver, aM as MutationObserverBaseResult, aP as MutationObserverErrorResult, aN as MutationObserverIdleResult, aO as MutationObserverLoadingResult, aJ as MutationObserverOptions, aR as MutationObserverResult, aQ as MutationObserverSuccessResult, aI as MutationOptions, aF as MutationScope, v as MutationState, aE as MutationStatus, _ as NetworkMode, N as NoInfer, aX as NotifyEvent, aW as NotifyEventType, $ as NotifyOnChangeProps, O as OmitKeyof, a6 as Optional, y as Override, P as PlaceholderDataFunction, T as QueriesPlaceholderDataFunction, u as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, aS as QueryClientConfig, j as QueryFilters, F as QueryFunction, K as QueryFunctionContext, A as QueryKey, V as QueryKeyHashFunction, Z as QueryMeta, c as QueryObserver, an as QueryObserverBaseResult, aq as QueryObserverLoadingErrorResult, ap as QueryObserverLoadingResult, a4 as QueryObserverOptions, ao as QueryObserverPendingResult, ar as QueryObserverRefetchErrorResult, au as QueryObserverResult, as as QueryObserverSuccessResult, a0 as QueryOptions, J as QueryPersister, t as QueryState, al as QueryStatus, ae as RefetchOptions, ag as RefetchQueryFilters, R as Register, ai as ResetOptions, ad as ResultOptions, aV as SetDataOptions, S as SkipToken, G as StaleTime, a3 as ThrowOnError, U as Updater, a5 as WithRequired, B as dataTagSymbol, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, h as hashKey, o as hydrate, l as isCancelledError, i as isServer, k as keepPreviousData, f as matchMutation, m as matchQuery, r as replaceEqualDeep, s as skipToken } from './hydration-DTVzC0E7.js';
1
+ export { aV as CancelOptions, C as CancelledError, E as DataTag, z as DefaultError, aU as DefaultOptions, a9 as DefaultedInfiniteQueryObserverOptions, a7 as DefaultedQueryObserverOptions, aC as DefinedInfiniteQueryObserverResult, au as DefinedQueryObserverResult, D as DehydrateOptions, x as DehydratedState, I as Enabled, ac as EnsureInfiniteQueryDataOptions, ab as EnsureQueryDataOptions, ad as FetchInfiniteQueryOptions, ak as FetchNextPageOptions, al as FetchPreviousPageOptions, aa as FetchQueryOptions, an as FetchStatus, X as GetNextPageParamFunction, W as GetPreviousPageParamFunction, H as HydrateOptions, Y as InfiniteData, aw as InfiniteQueryObserverBaseResult, az as InfiniteQueryObserverLoadingErrorResult, ay as InfiniteQueryObserverLoadingResult, a8 as InfiniteQueryObserverOptions, ax as InfiniteQueryObserverPendingResult, aA as InfiniteQueryObserverRefetchErrorResult, aD as InfiniteQueryObserverResult, aB as InfiniteQueryObserverSuccessResult, a2 as InfiniteQueryPageParamsOptions, L as InitialDataFunction, a1 as InitialPageParam, ai as InvalidateOptions, ag as InvalidateQueryFilters, aM as MutateFunction, aL as MutateOptions, w as Mutation, M as MutationCache, d as MutationCacheNotifyEvent, g as MutationFilters, aI as MutationFunction, aE as MutationKey, aH as MutationMeta, e as MutationObserver, aN as MutationObserverBaseResult, aQ as MutationObserverErrorResult, aO as MutationObserverIdleResult, aP as MutationObserverLoadingResult, aK as MutationObserverOptions, aS as MutationObserverResult, aR as MutationObserverSuccessResult, aJ as MutationOptions, aG as MutationScope, v as MutationState, aF as MutationStatus, _ as NetworkMode, N as NoInfer, aY as NotifyEvent, aX as NotifyEventType, $ as NotifyOnChangeProps, O as OmitKeyof, a6 as Optional, y as Override, P as PlaceholderDataFunction, T as QueriesPlaceholderDataFunction, u as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, aT as QueryClientConfig, j as QueryFilters, F as QueryFunction, K as QueryFunctionContext, A as QueryKey, V as QueryKeyHashFunction, Z as QueryMeta, c as QueryObserver, ao as QueryObserverBaseResult, ar as QueryObserverLoadingErrorResult, aq as QueryObserverLoadingResult, a4 as QueryObserverOptions, ap as QueryObserverPendingResult, as as QueryObserverRefetchErrorResult, av as QueryObserverResult, at as QueryObserverSuccessResult, a0 as QueryOptions, J as QueryPersister, t as QueryState, am as QueryStatus, af as RefetchOptions, ah as RefetchQueryFilters, R as Register, aj as ResetOptions, ae as ResultOptions, aW as SetDataOptions, S as SkipToken, G as StaleTime, a3 as ThrowOnError, U as Updater, a5 as WithRequired, B as dataTagSymbol, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, h as hashKey, o as hydrate, l as isCancelledError, i as isServer, k as keepPreviousData, f as matchMutation, m as matchQuery, r as replaceEqualDeep, s as skipToken } from './hydration-DgUcX5FN.js';
2
2
  export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.js';
3
3
  export { InfiniteQueryObserver } from './infiniteQueryObserver.js';
4
4
  export { notifyManager } from './notifyManager.js';
@@ -1,4 +1,4 @@
1
- import { aY as QueryBehavior, Y as InfiniteData, a2 as InfiniteQueryPageParamsOptions } from './hydration-BOOcDeHq.cjs';
1
+ import { aZ as QueryBehavior, Y as InfiniteData, a2 as InfiniteQueryPageParamsOptions } from './hydration-D6canbuP.cjs';
2
2
  import './removable.cjs';
3
3
  import './subscribable.cjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { aY as QueryBehavior, Y as InfiniteData, a2 as InfiniteQueryPageParamsOptions } from './hydration-DTVzC0E7.js';
1
+ import { aZ as QueryBehavior, Y as InfiniteData, a2 as InfiniteQueryPageParamsOptions } from './hydration-DgUcX5FN.js';
2
2
  import './removable.js';
3
3
  import './subscribable.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { z as DefaultError, Y as InfiniteData, A as QueryKey, c as QueryObserver, aC as InfiniteQueryObserverResult, b as QueryClient, a8 as InfiniteQueryObserverOptions, aZ as NotifyOptions, a9 as DefaultedInfiniteQueryObserverOptions, aj as FetchNextPageOptions, ak as FetchPreviousPageOptions, u as Query } from './hydration-BOOcDeHq.cjs';
1
+ import { z as DefaultError, Y as InfiniteData, A as QueryKey, c as QueryObserver, aD as InfiniteQueryObserverResult, b as QueryClient, a8 as InfiniteQueryObserverOptions, a_ as NotifyOptions, a9 as DefaultedInfiniteQueryObserverOptions, ak as FetchNextPageOptions, al as FetchPreviousPageOptions, u as Query } from './hydration-D6canbuP.cjs';
2
2
  import { Subscribable } from './subscribable.cjs';
3
3
  import './removable.cjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { z as DefaultError, Y as InfiniteData, A as QueryKey, c as QueryObserver, aC as InfiniteQueryObserverResult, b as QueryClient, a8 as InfiniteQueryObserverOptions, aZ as NotifyOptions, a9 as DefaultedInfiniteQueryObserverOptions, aj as FetchNextPageOptions, ak as FetchPreviousPageOptions, u as Query } from './hydration-DTVzC0E7.js';
1
+ import { z as DefaultError, Y as InfiniteData, A as QueryKey, c as QueryObserver, aD as InfiniteQueryObserverResult, b as QueryClient, a8 as InfiniteQueryObserverOptions, a_ as NotifyOptions, a9 as DefaultedInfiniteQueryObserverOptions, ak as FetchNextPageOptions, al as FetchPreviousPageOptions, u as Query } from './hydration-DgUcX5FN.js';
2
2
  import { Subscribable } from './subscribable.js';
3
3
  import './removable.js';
4
4
 
@@ -1,3 +1,3 @@
1
1
  import './removable.cjs';
2
- export { bn as Action, w as Mutation, v as MutationState, bo as getDefaultState } from './hydration-BOOcDeHq.cjs';
2
+ export { bo as Action, w as Mutation, v as MutationState, bp as getDefaultState } from './hydration-D6canbuP.cjs';
3
3
  import './subscribable.cjs';
@@ -1,3 +1,3 @@
1
1
  import './removable.js';
2
- export { bn as Action, w as Mutation, v as MutationState, bo as getDefaultState } from './hydration-DTVzC0E7.js';
2
+ export { bo as Action, w as Mutation, v as MutationState, bp as getDefaultState } from './hydration-DgUcX5FN.js';
3
3
  import './subscribable.js';
@@ -1,3 +1,3 @@
1
- export { M as MutationCache, d as MutationCacheNotifyEvent } from './hydration-BOOcDeHq.cjs';
1
+ export { M as MutationCache, d as MutationCacheNotifyEvent } from './hydration-D6canbuP.cjs';
2
2
  import './subscribable.cjs';
3
3
  import './removable.cjs';
@@ -1,3 +1,3 @@
1
- export { M as MutationCache, d as MutationCacheNotifyEvent } from './hydration-DTVzC0E7.js';
1
+ export { M as MutationCache, d as MutationCacheNotifyEvent } from './hydration-DgUcX5FN.js';
2
2
  import './subscribable.js';
3
3
  import './removable.js';
@@ -1,3 +1,3 @@
1
1
  import './subscribable.cjs';
2
- export { e as MutationObserver } from './hydration-BOOcDeHq.cjs';
2
+ export { e as MutationObserver } from './hydration-D6canbuP.cjs';
3
3
  import './removable.cjs';
@@ -1,3 +1,3 @@
1
1
  import './subscribable.js';
2
- export { e as MutationObserver } from './hydration-DTVzC0E7.js';
2
+ export { e as MutationObserver } from './hydration-DgUcX5FN.js';
3
3
  import './removable.js';
@@ -34,22 +34,6 @@ function createNotifyManager() {
34
34
  callback();
35
35
  };
36
36
  let scheduleFn = (cb) => setTimeout(cb, 0);
37
- const setScheduler = (fn) => {
38
- scheduleFn = fn;
39
- };
40
- const batch = (callback) => {
41
- let result;
42
- transactions++;
43
- try {
44
- result = callback();
45
- } finally {
46
- transactions--;
47
- if (!transactions) {
48
- flush();
49
- }
50
- }
51
- return result;
52
- };
53
37
  const schedule = (callback) => {
54
38
  if (transactions) {
55
39
  queue.push(callback);
@@ -59,13 +43,6 @@ function createNotifyManager() {
59
43
  });
60
44
  }
61
45
  };
62
- const batchCalls = (callback) => {
63
- return (...args) => {
64
- schedule(() => {
65
- callback(...args);
66
- });
67
- };
68
- };
69
46
  const flush = () => {
70
47
  const originalQueue = queue;
71
48
  queue = [];
@@ -79,19 +56,48 @@ function createNotifyManager() {
79
56
  });
80
57
  }
81
58
  };
82
- const setNotifyFunction = (fn) => {
83
- notifyFn = fn;
84
- };
85
- const setBatchNotifyFunction = (fn) => {
86
- batchNotifyFn = fn;
87
- };
88
59
  return {
89
- batch,
90
- batchCalls,
60
+ batch: (callback) => {
61
+ let result;
62
+ transactions++;
63
+ try {
64
+ result = callback();
65
+ } finally {
66
+ transactions--;
67
+ if (!transactions) {
68
+ flush();
69
+ }
70
+ }
71
+ return result;
72
+ },
73
+ /**
74
+ * All calls to the wrapped function will be batched.
75
+ */
76
+ batchCalls: (callback) => {
77
+ return (...args) => {
78
+ schedule(() => {
79
+ callback(...args);
80
+ });
81
+ };
82
+ },
91
83
  schedule,
92
- setNotifyFunction,
93
- setBatchNotifyFunction,
94
- setScheduler
84
+ /**
85
+ * Use this method to set a custom notify function.
86
+ * This can be used to for example wrap notifications with `React.act` while running tests.
87
+ */
88
+ setNotifyFunction: (fn) => {
89
+ notifyFn = fn;
90
+ },
91
+ /**
92
+ * Use this method to set a custom function to batch notifications together into a single tick.
93
+ * By default React Query will use the batch function provided by ReactDOM or React Native.
94
+ */
95
+ setBatchNotifyFunction: (fn) => {
96
+ batchNotifyFn = fn;
97
+ },
98
+ setScheduler: (fn) => {
99
+ scheduleFn = fn;
100
+ }
95
101
  };
96
102
  }
97
103
  var notifyManager = createNotifyManager();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/notifyManager.ts"],"sourcesContent":["// TYPES\n\ntype NotifyCallback = () => void\n\ntype NotifyFunction = (callback: () => void) => void\n\ntype BatchNotifyFunction = (callback: () => void) => void\n\ntype BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void\n\ntype ScheduleFunction = (callback: () => void) => void\n\nexport function createNotifyManager() {\n let queue: Array<NotifyCallback> = []\n let transactions = 0\n let notifyFn: NotifyFunction = (callback) => {\n callback()\n }\n let batchNotifyFn: BatchNotifyFunction = (callback: () => void) => {\n callback()\n }\n let scheduleFn: ScheduleFunction = (cb) => setTimeout(cb, 0)\n\n const setScheduler = (fn: ScheduleFunction) => {\n scheduleFn = fn\n }\n\n const batch = <T>(callback: () => T): T => {\n let result\n transactions++\n try {\n result = callback()\n } finally {\n transactions--\n if (!transactions) {\n flush()\n }\n }\n return result\n }\n\n const schedule = (callback: NotifyCallback): void => {\n if (transactions) {\n queue.push(callback)\n } else {\n scheduleFn(() => {\n notifyFn(callback)\n })\n }\n }\n\n /**\n * All calls to the wrapped function will be batched.\n */\n const batchCalls = <T extends Array<unknown>>(\n callback: BatchCallsCallback<T>,\n ): BatchCallsCallback<T> => {\n return (...args) => {\n schedule(() => {\n callback(...args)\n })\n }\n }\n\n const flush = (): void => {\n const originalQueue = queue\n queue = []\n if (originalQueue.length) {\n scheduleFn(() => {\n batchNotifyFn(() => {\n originalQueue.forEach((callback) => {\n notifyFn(callback)\n })\n })\n })\n }\n }\n\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n const setNotifyFunction = (fn: NotifyFunction) => {\n notifyFn = fn\n }\n\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n const setBatchNotifyFunction = (fn: BatchNotifyFunction) => {\n batchNotifyFn = fn\n }\n\n return {\n batch,\n batchCalls,\n schedule,\n setNotifyFunction,\n setBatchNotifyFunction,\n setScheduler,\n } as const\n}\n\n// SINGLETON\nexport const notifyManager = createNotifyManager()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYO,SAAS,sBAAsB;AACpC,MAAI,QAA+B,CAAC;AACpC,MAAI,eAAe;AACnB,MAAI,WAA2B,CAAC,aAAa;AAC3C,aAAS;AAAA,EACX;AACA,MAAI,gBAAqC,CAAC,aAAyB;AACjE,aAAS;AAAA,EACX;AACA,MAAI,aAA+B,CAAC,OAAO,WAAW,IAAI,CAAC;AAE3D,QAAM,eAAe,CAAC,OAAyB;AAC7C,iBAAa;AAAA,EACf;AAEA,QAAM,QAAQ,CAAI,aAAyB;AACzC,QAAI;AACJ;AACA,QAAI;AACF,eAAS,SAAS;AAAA,IACpB,UAAE;AACA;AACA,UAAI,CAAC,cAAc;AACjB,cAAM;AAAA,MACR;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAEA,QAAM,WAAW,CAAC,aAAmC;AACnD,QAAI,cAAc;AAChB,YAAM,KAAK,QAAQ;AAAA,IACrB,OAAO;AACL,iBAAW,MAAM;AACf,iBAAS,QAAQ;AAAA,MACnB,CAAC;AAAA,IACH;AAAA,EACF;AAKA,QAAM,aAAa,CACjB,aAC0B;AAC1B,WAAO,IAAI,SAAS;AAClB,eAAS,MAAM;AACb,iBAAS,GAAG,IAAI;AAAA,MAClB,CAAC;AAAA,IACH;AAAA,EACF;AAEA,QAAM,QAAQ,MAAY;AACxB,UAAM,gBAAgB;AACtB,YAAQ,CAAC;AACT,QAAI,cAAc,QAAQ;AACxB,iBAAW,MAAM;AACf,sBAAc,MAAM;AAClB,wBAAc,QAAQ,CAAC,aAAa;AAClC,qBAAS,QAAQ;AAAA,UACnB,CAAC;AAAA,QACH,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,EACF;AAMA,QAAM,oBAAoB,CAAC,OAAuB;AAChD,eAAW;AAAA,EACb;AAMA,QAAM,yBAAyB,CAAC,OAA4B;AAC1D,oBAAgB;AAAA,EAClB;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAGO,IAAM,gBAAgB,oBAAoB;","names":[]}
1
+ {"version":3,"sources":["../../src/notifyManager.ts"],"sourcesContent":["// TYPES\n\ntype NotifyCallback = () => void\n\ntype NotifyFunction = (callback: () => void) => void\n\ntype BatchNotifyFunction = (callback: () => void) => void\n\ntype BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void\n\ntype ScheduleFunction = (callback: () => void) => void\n\nexport function createNotifyManager() {\n let queue: Array<NotifyCallback> = []\n let transactions = 0\n let notifyFn: NotifyFunction = (callback) => {\n callback()\n }\n let batchNotifyFn: BatchNotifyFunction = (callback: () => void) => {\n callback()\n }\n let scheduleFn: ScheduleFunction = (cb) => setTimeout(cb, 0)\n\n const schedule = (callback: NotifyCallback): void => {\n if (transactions) {\n queue.push(callback)\n } else {\n scheduleFn(() => {\n notifyFn(callback)\n })\n }\n }\n const flush = (): void => {\n const originalQueue = queue\n queue = []\n if (originalQueue.length) {\n scheduleFn(() => {\n batchNotifyFn(() => {\n originalQueue.forEach((callback) => {\n notifyFn(callback)\n })\n })\n })\n }\n }\n\n return {\n batch: <T>(callback: () => T): T => {\n let result\n transactions++\n try {\n result = callback()\n } finally {\n transactions--\n if (!transactions) {\n flush()\n }\n }\n return result\n },\n /**\n * All calls to the wrapped function will be batched.\n */\n batchCalls: <T extends Array<unknown>>(\n callback: BatchCallsCallback<T>,\n ): BatchCallsCallback<T> => {\n return (...args) => {\n schedule(() => {\n callback(...args)\n })\n }\n },\n schedule,\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n setNotifyFunction: (fn: NotifyFunction) => {\n notifyFn = fn\n },\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n setBatchNotifyFunction: (fn: BatchNotifyFunction) => {\n batchNotifyFn = fn\n },\n setScheduler: (fn: ScheduleFunction) => {\n scheduleFn = fn\n },\n } as const\n}\n\n// SINGLETON\nexport const notifyManager = createNotifyManager()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYO,SAAS,sBAAsB;AACpC,MAAI,QAA+B,CAAC;AACpC,MAAI,eAAe;AACnB,MAAI,WAA2B,CAAC,aAAa;AAC3C,aAAS;AAAA,EACX;AACA,MAAI,gBAAqC,CAAC,aAAyB;AACjE,aAAS;AAAA,EACX;AACA,MAAI,aAA+B,CAAC,OAAO,WAAW,IAAI,CAAC;AAE3D,QAAM,WAAW,CAAC,aAAmC;AACnD,QAAI,cAAc;AAChB,YAAM,KAAK,QAAQ;AAAA,IACrB,OAAO;AACL,iBAAW,MAAM;AACf,iBAAS,QAAQ;AAAA,MACnB,CAAC;AAAA,IACH;AAAA,EACF;AACA,QAAM,QAAQ,MAAY;AACxB,UAAM,gBAAgB;AACtB,YAAQ,CAAC;AACT,QAAI,cAAc,QAAQ;AACxB,iBAAW,MAAM;AACf,sBAAc,MAAM;AAClB,wBAAc,QAAQ,CAAC,aAAa;AAClC,qBAAS,QAAQ;AAAA,UACnB,CAAC;AAAA,QACH,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAO,CAAI,aAAyB;AAClC,UAAI;AACJ;AACA,UAAI;AACF,iBAAS,SAAS;AAAA,MACpB,UAAE;AACA;AACA,YAAI,CAAC,cAAc;AACjB,gBAAM;AAAA,QACR;AAAA,MACF;AACA,aAAO;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAIA,YAAY,CACV,aAC0B;AAC1B,aAAO,IAAI,SAAS;AAClB,iBAAS,MAAM;AACb,mBAAS,GAAG,IAAI;AAAA,QAClB,CAAC;AAAA,MACH;AAAA,IACF;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,mBAAmB,CAAC,OAAuB;AACzC,iBAAW;AAAA,IACb;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,wBAAwB,CAAC,OAA4B;AACnD,sBAAgB;AAAA,IAClB;AAAA,IACA,cAAc,CAAC,OAAyB;AACtC,mBAAa;AAAA,IACf;AAAA,EACF;AACF;AAGO,IAAM,gBAAgB,oBAAoB;","names":[]}
@@ -5,17 +5,39 @@ type BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void;
5
5
  type ScheduleFunction = (callback: () => void) => void;
6
6
  declare function createNotifyManager(): {
7
7
  readonly batch: <T>(callback: () => T) => T;
8
+ /**
9
+ * All calls to the wrapped function will be batched.
10
+ */
8
11
  readonly batchCalls: <T_1 extends unknown[]>(callback: BatchCallsCallback<T_1>) => BatchCallsCallback<T_1>;
9
12
  readonly schedule: (callback: NotifyCallback) => void;
13
+ /**
14
+ * Use this method to set a custom notify function.
15
+ * This can be used to for example wrap notifications with `React.act` while running tests.
16
+ */
10
17
  readonly setNotifyFunction: (fn: NotifyFunction) => void;
18
+ /**
19
+ * Use this method to set a custom function to batch notifications together into a single tick.
20
+ * By default React Query will use the batch function provided by ReactDOM or React Native.
21
+ */
11
22
  readonly setBatchNotifyFunction: (fn: BatchNotifyFunction) => void;
12
23
  readonly setScheduler: (fn: ScheduleFunction) => void;
13
24
  };
14
25
  declare const notifyManager: {
15
26
  readonly batch: <T>(callback: () => T) => T;
27
+ /**
28
+ * All calls to the wrapped function will be batched.
29
+ */
16
30
  readonly batchCalls: <T_1 extends unknown[]>(callback: BatchCallsCallback<T_1>) => BatchCallsCallback<T_1>;
17
31
  readonly schedule: (callback: NotifyCallback) => void;
32
+ /**
33
+ * Use this method to set a custom notify function.
34
+ * This can be used to for example wrap notifications with `React.act` while running tests.
35
+ */
18
36
  readonly setNotifyFunction: (fn: NotifyFunction) => void;
37
+ /**
38
+ * Use this method to set a custom function to batch notifications together into a single tick.
39
+ * By default React Query will use the batch function provided by ReactDOM or React Native.
40
+ */
19
41
  readonly setBatchNotifyFunction: (fn: BatchNotifyFunction) => void;
20
42
  readonly setScheduler: (fn: ScheduleFunction) => void;
21
43
  };
@@ -5,17 +5,39 @@ type BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void;
5
5
  type ScheduleFunction = (callback: () => void) => void;
6
6
  declare function createNotifyManager(): {
7
7
  readonly batch: <T>(callback: () => T) => T;
8
+ /**
9
+ * All calls to the wrapped function will be batched.
10
+ */
8
11
  readonly batchCalls: <T_1 extends unknown[]>(callback: BatchCallsCallback<T_1>) => BatchCallsCallback<T_1>;
9
12
  readonly schedule: (callback: NotifyCallback) => void;
13
+ /**
14
+ * Use this method to set a custom notify function.
15
+ * This can be used to for example wrap notifications with `React.act` while running tests.
16
+ */
10
17
  readonly setNotifyFunction: (fn: NotifyFunction) => void;
18
+ /**
19
+ * Use this method to set a custom function to batch notifications together into a single tick.
20
+ * By default React Query will use the batch function provided by ReactDOM or React Native.
21
+ */
11
22
  readonly setBatchNotifyFunction: (fn: BatchNotifyFunction) => void;
12
23
  readonly setScheduler: (fn: ScheduleFunction) => void;
13
24
  };
14
25
  declare const notifyManager: {
15
26
  readonly batch: <T>(callback: () => T) => T;
27
+ /**
28
+ * All calls to the wrapped function will be batched.
29
+ */
16
30
  readonly batchCalls: <T_1 extends unknown[]>(callback: BatchCallsCallback<T_1>) => BatchCallsCallback<T_1>;
17
31
  readonly schedule: (callback: NotifyCallback) => void;
32
+ /**
33
+ * Use this method to set a custom notify function.
34
+ * This can be used to for example wrap notifications with `React.act` while running tests.
35
+ */
18
36
  readonly setNotifyFunction: (fn: NotifyFunction) => void;
37
+ /**
38
+ * Use this method to set a custom function to batch notifications together into a single tick.
39
+ * By default React Query will use the batch function provided by ReactDOM or React Native.
40
+ */
19
41
  readonly setBatchNotifyFunction: (fn: BatchNotifyFunction) => void;
20
42
  readonly setScheduler: (fn: ScheduleFunction) => void;
21
43
  };
@@ -11,22 +11,6 @@ function createNotifyManager() {
11
11
  callback();
12
12
  };
13
13
  let scheduleFn = (cb) => setTimeout(cb, 0);
14
- const setScheduler = (fn) => {
15
- scheduleFn = fn;
16
- };
17
- const batch = (callback) => {
18
- let result;
19
- transactions++;
20
- try {
21
- result = callback();
22
- } finally {
23
- transactions--;
24
- if (!transactions) {
25
- flush();
26
- }
27
- }
28
- return result;
29
- };
30
14
  const schedule = (callback) => {
31
15
  if (transactions) {
32
16
  queue.push(callback);
@@ -36,13 +20,6 @@ function createNotifyManager() {
36
20
  });
37
21
  }
38
22
  };
39
- const batchCalls = (callback) => {
40
- return (...args) => {
41
- schedule(() => {
42
- callback(...args);
43
- });
44
- };
45
- };
46
23
  const flush = () => {
47
24
  const originalQueue = queue;
48
25
  queue = [];
@@ -56,19 +33,48 @@ function createNotifyManager() {
56
33
  });
57
34
  }
58
35
  };
59
- const setNotifyFunction = (fn) => {
60
- notifyFn = fn;
61
- };
62
- const setBatchNotifyFunction = (fn) => {
63
- batchNotifyFn = fn;
64
- };
65
36
  return {
66
- batch,
67
- batchCalls,
37
+ batch: (callback) => {
38
+ let result;
39
+ transactions++;
40
+ try {
41
+ result = callback();
42
+ } finally {
43
+ transactions--;
44
+ if (!transactions) {
45
+ flush();
46
+ }
47
+ }
48
+ return result;
49
+ },
50
+ /**
51
+ * All calls to the wrapped function will be batched.
52
+ */
53
+ batchCalls: (callback) => {
54
+ return (...args) => {
55
+ schedule(() => {
56
+ callback(...args);
57
+ });
58
+ };
59
+ },
68
60
  schedule,
69
- setNotifyFunction,
70
- setBatchNotifyFunction,
71
- setScheduler
61
+ /**
62
+ * Use this method to set a custom notify function.
63
+ * This can be used to for example wrap notifications with `React.act` while running tests.
64
+ */
65
+ setNotifyFunction: (fn) => {
66
+ notifyFn = fn;
67
+ },
68
+ /**
69
+ * Use this method to set a custom function to batch notifications together into a single tick.
70
+ * By default React Query will use the batch function provided by ReactDOM or React Native.
71
+ */
72
+ setBatchNotifyFunction: (fn) => {
73
+ batchNotifyFn = fn;
74
+ },
75
+ setScheduler: (fn) => {
76
+ scheduleFn = fn;
77
+ }
72
78
  };
73
79
  }
74
80
  var notifyManager = createNotifyManager();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/notifyManager.ts"],"sourcesContent":["// TYPES\n\ntype NotifyCallback = () => void\n\ntype NotifyFunction = (callback: () => void) => void\n\ntype BatchNotifyFunction = (callback: () => void) => void\n\ntype BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void\n\ntype ScheduleFunction = (callback: () => void) => void\n\nexport function createNotifyManager() {\n let queue: Array<NotifyCallback> = []\n let transactions = 0\n let notifyFn: NotifyFunction = (callback) => {\n callback()\n }\n let batchNotifyFn: BatchNotifyFunction = (callback: () => void) => {\n callback()\n }\n let scheduleFn: ScheduleFunction = (cb) => setTimeout(cb, 0)\n\n const setScheduler = (fn: ScheduleFunction) => {\n scheduleFn = fn\n }\n\n const batch = <T>(callback: () => T): T => {\n let result\n transactions++\n try {\n result = callback()\n } finally {\n transactions--\n if (!transactions) {\n flush()\n }\n }\n return result\n }\n\n const schedule = (callback: NotifyCallback): void => {\n if (transactions) {\n queue.push(callback)\n } else {\n scheduleFn(() => {\n notifyFn(callback)\n })\n }\n }\n\n /**\n * All calls to the wrapped function will be batched.\n */\n const batchCalls = <T extends Array<unknown>>(\n callback: BatchCallsCallback<T>,\n ): BatchCallsCallback<T> => {\n return (...args) => {\n schedule(() => {\n callback(...args)\n })\n }\n }\n\n const flush = (): void => {\n const originalQueue = queue\n queue = []\n if (originalQueue.length) {\n scheduleFn(() => {\n batchNotifyFn(() => {\n originalQueue.forEach((callback) => {\n notifyFn(callback)\n })\n })\n })\n }\n }\n\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n const setNotifyFunction = (fn: NotifyFunction) => {\n notifyFn = fn\n }\n\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n const setBatchNotifyFunction = (fn: BatchNotifyFunction) => {\n batchNotifyFn = fn\n }\n\n return {\n batch,\n batchCalls,\n schedule,\n setNotifyFunction,\n setBatchNotifyFunction,\n setScheduler,\n } as const\n}\n\n// SINGLETON\nexport const notifyManager = createNotifyManager()\n"],"mappings":";;;AAYO,SAAS,sBAAsB;AACpC,MAAI,QAA+B,CAAC;AACpC,MAAI,eAAe;AACnB,MAAI,WAA2B,CAAC,aAAa;AAC3C,aAAS;AAAA,EACX;AACA,MAAI,gBAAqC,CAAC,aAAyB;AACjE,aAAS;AAAA,EACX;AACA,MAAI,aAA+B,CAAC,OAAO,WAAW,IAAI,CAAC;AAE3D,QAAM,eAAe,CAAC,OAAyB;AAC7C,iBAAa;AAAA,EACf;AAEA,QAAM,QAAQ,CAAI,aAAyB;AACzC,QAAI;AACJ;AACA,QAAI;AACF,eAAS,SAAS;AAAA,IACpB,UAAE;AACA;AACA,UAAI,CAAC,cAAc;AACjB,cAAM;AAAA,MACR;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAEA,QAAM,WAAW,CAAC,aAAmC;AACnD,QAAI,cAAc;AAChB,YAAM,KAAK,QAAQ;AAAA,IACrB,OAAO;AACL,iBAAW,MAAM;AACf,iBAAS,QAAQ;AAAA,MACnB,CAAC;AAAA,IACH;AAAA,EACF;AAKA,QAAM,aAAa,CACjB,aAC0B;AAC1B,WAAO,IAAI,SAAS;AAClB,eAAS,MAAM;AACb,iBAAS,GAAG,IAAI;AAAA,MAClB,CAAC;AAAA,IACH;AAAA,EACF;AAEA,QAAM,QAAQ,MAAY;AACxB,UAAM,gBAAgB;AACtB,YAAQ,CAAC;AACT,QAAI,cAAc,QAAQ;AACxB,iBAAW,MAAM;AACf,sBAAc,MAAM;AAClB,wBAAc,QAAQ,CAAC,aAAa;AAClC,qBAAS,QAAQ;AAAA,UACnB,CAAC;AAAA,QACH,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,EACF;AAMA,QAAM,oBAAoB,CAAC,OAAuB;AAChD,eAAW;AAAA,EACb;AAMA,QAAM,yBAAyB,CAAC,OAA4B;AAC1D,oBAAgB;AAAA,EAClB;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAGO,IAAM,gBAAgB,oBAAoB;","names":[]}
1
+ {"version":3,"sources":["../../src/notifyManager.ts"],"sourcesContent":["// TYPES\n\ntype NotifyCallback = () => void\n\ntype NotifyFunction = (callback: () => void) => void\n\ntype BatchNotifyFunction = (callback: () => void) => void\n\ntype BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void\n\ntype ScheduleFunction = (callback: () => void) => void\n\nexport function createNotifyManager() {\n let queue: Array<NotifyCallback> = []\n let transactions = 0\n let notifyFn: NotifyFunction = (callback) => {\n callback()\n }\n let batchNotifyFn: BatchNotifyFunction = (callback: () => void) => {\n callback()\n }\n let scheduleFn: ScheduleFunction = (cb) => setTimeout(cb, 0)\n\n const schedule = (callback: NotifyCallback): void => {\n if (transactions) {\n queue.push(callback)\n } else {\n scheduleFn(() => {\n notifyFn(callback)\n })\n }\n }\n const flush = (): void => {\n const originalQueue = queue\n queue = []\n if (originalQueue.length) {\n scheduleFn(() => {\n batchNotifyFn(() => {\n originalQueue.forEach((callback) => {\n notifyFn(callback)\n })\n })\n })\n }\n }\n\n return {\n batch: <T>(callback: () => T): T => {\n let result\n transactions++\n try {\n result = callback()\n } finally {\n transactions--\n if (!transactions) {\n flush()\n }\n }\n return result\n },\n /**\n * All calls to the wrapped function will be batched.\n */\n batchCalls: <T extends Array<unknown>>(\n callback: BatchCallsCallback<T>,\n ): BatchCallsCallback<T> => {\n return (...args) => {\n schedule(() => {\n callback(...args)\n })\n }\n },\n schedule,\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n setNotifyFunction: (fn: NotifyFunction) => {\n notifyFn = fn\n },\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n setBatchNotifyFunction: (fn: BatchNotifyFunction) => {\n batchNotifyFn = fn\n },\n setScheduler: (fn: ScheduleFunction) => {\n scheduleFn = fn\n },\n } as const\n}\n\n// SINGLETON\nexport const notifyManager = createNotifyManager()\n"],"mappings":";;;AAYO,SAAS,sBAAsB;AACpC,MAAI,QAA+B,CAAC;AACpC,MAAI,eAAe;AACnB,MAAI,WAA2B,CAAC,aAAa;AAC3C,aAAS;AAAA,EACX;AACA,MAAI,gBAAqC,CAAC,aAAyB;AACjE,aAAS;AAAA,EACX;AACA,MAAI,aAA+B,CAAC,OAAO,WAAW,IAAI,CAAC;AAE3D,QAAM,WAAW,CAAC,aAAmC;AACnD,QAAI,cAAc;AAChB,YAAM,KAAK,QAAQ;AAAA,IACrB,OAAO;AACL,iBAAW,MAAM;AACf,iBAAS,QAAQ;AAAA,MACnB,CAAC;AAAA,IACH;AAAA,EACF;AACA,QAAM,QAAQ,MAAY;AACxB,UAAM,gBAAgB;AACtB,YAAQ,CAAC;AACT,QAAI,cAAc,QAAQ;AACxB,iBAAW,MAAM;AACf,sBAAc,MAAM;AAClB,wBAAc,QAAQ,CAAC,aAAa;AAClC,qBAAS,QAAQ;AAAA,UACnB,CAAC;AAAA,QACH,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAO,CAAI,aAAyB;AAClC,UAAI;AACJ;AACA,UAAI;AACF,iBAAS,SAAS;AAAA,MACpB,UAAE;AACA;AACA,YAAI,CAAC,cAAc;AACjB,gBAAM;AAAA,QACR;AAAA,MACF;AACA,aAAO;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAIA,YAAY,CACV,aAC0B;AAC1B,aAAO,IAAI,SAAS;AAClB,iBAAS,MAAM;AACb,mBAAS,GAAG,IAAI;AAAA,QAClB,CAAC;AAAA,MACH;AAAA,IACF;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,mBAAmB,CAAC,OAAuB;AACzC,iBAAW;AAAA,IACb;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,wBAAwB,CAAC,OAA4B;AACnD,sBAAgB;AAAA,IAClB;AAAA,IACA,cAAc,CAAC,OAAyB;AACtC,mBAAa;AAAA,IACf;AAAA,EACF;AACF;AAGO,IAAM,gBAAgB,oBAAoB;","names":[]}
@@ -1,4 +1,4 @@
1
- import { au as QueryObserverResult, b as QueryClient, a4 as QueryObserverOptions, aZ as NotifyOptions, u as Query, A as QueryKey, c as QueryObserver } from './hydration-BOOcDeHq.cjs';
1
+ import { av as QueryObserverResult, b as QueryClient, a4 as QueryObserverOptions, a_ as NotifyOptions, u as Query, A as QueryKey, c as QueryObserver } from './hydration-D6canbuP.cjs';
2
2
  import { Subscribable } from './subscribable.cjs';
3
3
  import './removable.cjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { au as QueryObserverResult, b as QueryClient, a4 as QueryObserverOptions, aZ as NotifyOptions, u as Query, A as QueryKey, c as QueryObserver } from './hydration-DTVzC0E7.js';
1
+ import { av as QueryObserverResult, b as QueryClient, a4 as QueryObserverOptions, a_ as NotifyOptions, u as Query, A as QueryKey, c as QueryObserver } from './hydration-DgUcX5FN.js';
2
2
  import { Subscribable } from './subscribable.js';
3
3
  import './removable.js';
4
4
 
@@ -1,3 +1,3 @@
1
1
  import './removable.cjs';
2
- export { b2 as Action, a_ as FetchContext, a$ as FetchDirection, b0 as FetchMeta, b1 as FetchOptions, u as Query, aY as QueryBehavior, t as QueryState, b3 as SetStateOptions, b4 as fetchState } from './hydration-BOOcDeHq.cjs';
2
+ export { b3 as Action, a$ as FetchContext, b0 as FetchDirection, b1 as FetchMeta, b2 as FetchOptions, u as Query, aZ as QueryBehavior, t as QueryState, b4 as SetStateOptions, b5 as fetchState } from './hydration-D6canbuP.cjs';
3
3
  import './subscribable.cjs';
@@ -1,3 +1,3 @@
1
1
  import './removable.js';
2
- export { b2 as Action, a_ as FetchContext, a$ as FetchDirection, b0 as FetchMeta, b1 as FetchOptions, u as Query, aY as QueryBehavior, t as QueryState, b3 as SetStateOptions, b4 as fetchState } from './hydration-DTVzC0E7.js';
2
+ export { b3 as Action, a$ as FetchContext, b0 as FetchDirection, b1 as FetchMeta, b2 as FetchOptions, u as Query, aZ as QueryBehavior, t as QueryState, b4 as SetStateOptions, b5 as fetchState } from './hydration-DgUcX5FN.js';
3
3
  import './subscribable.js';
@@ -1,3 +1,3 @@
1
- export { Q as QueryCache, a as QueryCacheNotifyEvent, bm as QueryStore } from './hydration-BOOcDeHq.cjs';
1
+ export { Q as QueryCache, a as QueryCacheNotifyEvent, bn as QueryStore } from './hydration-D6canbuP.cjs';
2
2
  import './subscribable.cjs';
3
3
  import './removable.cjs';
@@ -1,3 +1,3 @@
1
- export { Q as QueryCache, a as QueryCacheNotifyEvent, bm as QueryStore } from './hydration-DTVzC0E7.js';
1
+ export { Q as QueryCache, a as QueryCacheNotifyEvent, bn as QueryStore } from './hydration-DgUcX5FN.js';
2
2
  import './subscribable.js';
3
3
  import './removable.js';