@tanstack/query-core 5.86.0 → 5.87.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 (127) hide show
  1. package/build/legacy/{hydration-BpLOP9Dw.d.ts → hydration-BYonJkjc.d.ts} +1 -1
  2. package/build/legacy/{hydration-BC7iBQD-.d.cts → hydration-_hO-y142.d.cts} +1 -1
  3. package/build/legacy/hydration.d.cts +1 -1
  4. package/build/legacy/hydration.d.ts +1 -1
  5. package/build/legacy/index.cjs +14 -12
  6. package/build/legacy/index.cjs.map +1 -1
  7. package/build/legacy/index.d.cts +5 -4
  8. package/build/legacy/index.d.ts +5 -4
  9. package/build/legacy/index.js +26 -23
  10. package/build/legacy/index.js.map +1 -1
  11. package/build/legacy/infiniteQueryBehavior.d.cts +1 -1
  12. package/build/legacy/infiniteQueryBehavior.d.ts +1 -1
  13. package/build/legacy/infiniteQueryObserver.d.cts +1 -1
  14. package/build/legacy/infiniteQueryObserver.d.ts +1 -1
  15. package/build/legacy/mutation.d.cts +1 -1
  16. package/build/legacy/mutation.d.ts +1 -1
  17. package/build/legacy/mutationCache.d.cts +1 -1
  18. package/build/legacy/mutationCache.d.ts +1 -1
  19. package/build/legacy/mutationObserver.d.cts +1 -1
  20. package/build/legacy/mutationObserver.d.ts +1 -1
  21. package/build/legacy/notifyManager.cjs +2 -1
  22. package/build/legacy/notifyManager.cjs.map +1 -1
  23. package/build/legacy/notifyManager.js +2 -1
  24. package/build/legacy/notifyManager.js.map +1 -1
  25. package/build/legacy/queriesObserver.d.cts +1 -1
  26. package/build/legacy/queriesObserver.d.ts +1 -1
  27. package/build/legacy/query.d.cts +1 -1
  28. package/build/legacy/query.d.ts +1 -1
  29. package/build/legacy/queryCache.d.cts +1 -1
  30. package/build/legacy/queryCache.d.ts +1 -1
  31. package/build/legacy/queryClient.d.cts +1 -1
  32. package/build/legacy/queryClient.d.ts +1 -1
  33. package/build/legacy/queryObserver.cjs +5 -4
  34. package/build/legacy/queryObserver.cjs.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/queryObserver.js +5 -4
  38. package/build/legacy/queryObserver.js.map +1 -1
  39. package/build/legacy/removable.cjs +3 -2
  40. package/build/legacy/removable.cjs.map +1 -1
  41. package/build/legacy/removable.js +3 -2
  42. package/build/legacy/removable.js.map +1 -1
  43. package/build/legacy/retryer.d.cts +1 -1
  44. package/build/legacy/retryer.d.ts +1 -1
  45. package/build/legacy/streamedQuery.d.cts +1 -1
  46. package/build/legacy/streamedQuery.d.ts +1 -1
  47. package/build/legacy/timeoutManager.cjs +110 -0
  48. package/build/legacy/timeoutManager.cjs.map +1 -0
  49. package/build/legacy/timeoutManager.d.cts +58 -0
  50. package/build/legacy/timeoutManager.d.ts +58 -0
  51. package/build/legacy/timeoutManager.js +81 -0
  52. package/build/legacy/timeoutManager.js.map +1 -0
  53. package/build/legacy/types.d.cts +1 -1
  54. package/build/legacy/types.d.ts +1 -1
  55. package/build/legacy/utils.cjs +2 -1
  56. package/build/legacy/utils.cjs.map +1 -1
  57. package/build/legacy/utils.d.cts +1 -1
  58. package/build/legacy/utils.d.ts +1 -1
  59. package/build/legacy/utils.js +2 -1
  60. package/build/legacy/utils.js.map +1 -1
  61. package/build/modern/{hydration-BpLOP9Dw.d.ts → hydration-BYonJkjc.d.ts} +1 -1
  62. package/build/modern/{hydration-BC7iBQD-.d.cts → hydration-_hO-y142.d.cts} +1 -1
  63. package/build/modern/hydration.d.cts +1 -1
  64. package/build/modern/hydration.d.ts +1 -1
  65. package/build/modern/index.cjs +14 -12
  66. package/build/modern/index.cjs.map +1 -1
  67. package/build/modern/index.d.cts +5 -4
  68. package/build/modern/index.d.ts +5 -4
  69. package/build/modern/index.js +26 -23
  70. package/build/modern/index.js.map +1 -1
  71. package/build/modern/infiniteQueryBehavior.d.cts +1 -1
  72. package/build/modern/infiniteQueryBehavior.d.ts +1 -1
  73. package/build/modern/infiniteQueryObserver.d.cts +1 -1
  74. package/build/modern/infiniteQueryObserver.d.ts +1 -1
  75. package/build/modern/mutation.d.cts +1 -1
  76. package/build/modern/mutation.d.ts +1 -1
  77. package/build/modern/mutationCache.d.cts +1 -1
  78. package/build/modern/mutationCache.d.ts +1 -1
  79. package/build/modern/mutationObserver.d.cts +1 -1
  80. package/build/modern/mutationObserver.d.ts +1 -1
  81. package/build/modern/notifyManager.cjs +2 -1
  82. package/build/modern/notifyManager.cjs.map +1 -1
  83. package/build/modern/notifyManager.js +2 -1
  84. package/build/modern/notifyManager.js.map +1 -1
  85. package/build/modern/queriesObserver.d.cts +1 -1
  86. package/build/modern/queriesObserver.d.ts +1 -1
  87. package/build/modern/query.d.cts +1 -1
  88. package/build/modern/query.d.ts +1 -1
  89. package/build/modern/queryCache.d.cts +1 -1
  90. package/build/modern/queryCache.d.ts +1 -1
  91. package/build/modern/queryClient.d.cts +1 -1
  92. package/build/modern/queryClient.d.ts +1 -1
  93. package/build/modern/queryObserver.cjs +5 -4
  94. package/build/modern/queryObserver.cjs.map +1 -1
  95. package/build/modern/queryObserver.d.cts +1 -1
  96. package/build/modern/queryObserver.d.ts +1 -1
  97. package/build/modern/queryObserver.js +5 -4
  98. package/build/modern/queryObserver.js.map +1 -1
  99. package/build/modern/removable.cjs +3 -2
  100. package/build/modern/removable.cjs.map +1 -1
  101. package/build/modern/removable.js +3 -2
  102. package/build/modern/removable.js.map +1 -1
  103. package/build/modern/retryer.d.cts +1 -1
  104. package/build/modern/retryer.d.ts +1 -1
  105. package/build/modern/streamedQuery.d.cts +1 -1
  106. package/build/modern/streamedQuery.d.ts +1 -1
  107. package/build/modern/timeoutManager.cjs +98 -0
  108. package/build/modern/timeoutManager.cjs.map +1 -0
  109. package/build/modern/timeoutManager.d.cts +58 -0
  110. package/build/modern/timeoutManager.d.ts +58 -0
  111. package/build/modern/timeoutManager.js +70 -0
  112. package/build/modern/timeoutManager.js.map +1 -0
  113. package/build/modern/types.d.cts +1 -1
  114. package/build/modern/types.d.ts +1 -1
  115. package/build/modern/utils.cjs +2 -1
  116. package/build/modern/utils.cjs.map +1 -1
  117. package/build/modern/utils.d.cts +1 -1
  118. package/build/modern/utils.d.ts +1 -1
  119. package/build/modern/utils.js +2 -1
  120. package/build/modern/utils.js.map +1 -1
  121. package/package.json +1 -1
  122. package/src/index.ts +32 -27
  123. package/src/notifyManager.ts +3 -1
  124. package/src/queryObserver.ts +8 -6
  125. package/src/removable.ts +5 -3
  126. package/src/timeoutManager.ts +135 -0
  127. package/src/utils.ts +2 -1
@@ -1367,4 +1367,4 @@ declare function defaultShouldDehydrateQuery(query: Query): boolean;
1367
1367
  declare function dehydrate(client: QueryClient, options?: DehydrateOptions): DehydratedState;
1368
1368
  declare function hydrate(client: QueryClient, dehydratedState: unknown, options?: HydrateOptions): void;
1369
1369
 
1370
- export { type Enabled as $, type DehydratedState as A, type DistributiveOmit as B, CancelledError as C, type DehydrateOptions as D, type Override as E, type NoInfer as F, type DefaultError as G, type HydrateOptions as H, type QueryKey as I, dataTagSymbol as J, dataTagErrorSymbol as K, unsetMarker as L, MutationCache as M, type NonUndefinedGuard as N, type OmitKeyof as O, type UnsetMarker as P, QueryCache as Q, type Register as R, type SkipToken as S, type AnyDataTag as T, type Updater as U, type DataTag as V, type InferDataFromTag as W, type InferErrorFromTag as X, type QueryFunction as Y, type StaleTime as Z, type StaleTimeFunction as _, type QueryCacheNotifyEvent as a, type MutationObserverIdleResult as a$, type QueryPersister as a0, type QueryFunctionContext as a1, type InitialDataFunction as a2, type PlaceholderDataFunction as a3, type QueriesPlaceholderDataFunction as a4, type QueryKeyHashFunction as a5, type GetPreviousPageParamFunction as a6, type GetNextPageParamFunction as a7, type InfiniteData as a8, type QueryMeta as a9, type QueryObserverPendingResult as aA, type QueryObserverLoadingResult as aB, type QueryObserverLoadingErrorResult as aC, type QueryObserverRefetchErrorResult as aD, type QueryObserverSuccessResult as aE, type QueryObserverPlaceholderResult as aF, type DefinedQueryObserverResult as aG, type QueryObserverResult as aH, type InfiniteQueryObserverBaseResult as aI, type InfiniteQueryObserverPendingResult as aJ, type InfiniteQueryObserverLoadingResult as aK, type InfiniteQueryObserverLoadingErrorResult as aL, type InfiniteQueryObserverRefetchErrorResult as aM, type InfiniteQueryObserverSuccessResult as aN, type InfiniteQueryObserverPlaceholderResult as aO, type DefinedInfiniteQueryObserverResult as aP, type InfiniteQueryObserverResult as aQ, type MutationKey as aR, type MutationStatus as aS, type MutationScope as aT, type MutationMeta as aU, type MutationFunction as aV, type MutationOptions as aW, type MutationObserverOptions as aX, type MutateOptions as aY, type MutateFunction as aZ, type MutationObserverBaseResult as a_, type NetworkMode as aa, type NotifyOnChangeProps as ab, type QueryOptions as ac, type InitialPageParam as ad, type InfiniteQueryPageParamsOptions as ae, type ThrowOnError as af, type QueryObserverOptions as ag, type WithRequired as ah, type DefaultedQueryObserverOptions as ai, type InfiniteQueryObserverOptions as aj, type DefaultedInfiniteQueryObserverOptions as ak, type FetchQueryOptions as al, type EnsureQueryDataOptions as am, type EnsureInfiniteQueryDataOptions as an, type FetchInfiniteQueryOptions as ao, type ResultOptions as ap, type RefetchOptions as aq, type InvalidateQueryFilters as ar, type RefetchQueryFilters as as, type InvalidateOptions as at, type ResetOptions as au, type FetchNextPageOptions as av, type FetchPreviousPageOptions as aw, type QueryStatus as ax, type FetchStatus as ay, type QueryObserverBaseResult as az, QueryClient as b, type MutationObserverLoadingResult as b0, type MutationObserverErrorResult as b1, type MutationObserverSuccessResult as b2, type MutationObserverResult as b3, type QueryClientConfig as b4, type DefaultOptions as b5, type CancelOptions as b6, type SetDataOptions as b7, type NotifyEventType as b8, type NotifyEvent as b9, type Retryer as bA, type RetryValue as bB, type RetryDelayValue as bC, canFetch as bD, createRetryer as bE, type QueryBehavior as ba, type FetchContext as bb, type FetchDirection as bc, type FetchMeta as bd, type FetchOptions as be, type Action$1 as bf, type SetStateOptions as bg, fetchState as bh, type Action as bi, getDefaultState as bj, type QueryTypeFilter as bk, functionalUpdate as bl, isValidTimeout as bm, timeUntilStale as bn, resolveStaleTime as bo, resolveEnabled as bp, hashQueryKeyByOptions as bq, shallowEqualObjects as br, isPlainArray as bs, isPlainObject as bt, sleep as bu, replaceData as bv, addToEnd as bw, addToStart as bx, ensureQueryFn as by, type QueryStore as bz, QueryObserver as c, type MutationCacheNotifyEvent as d, MutationObserver as e, matchMutation as f, shouldThrowError as g, hashKey as h, isServer as i, type MutationFilters as j, keepPreviousData as k, type QueryFilters as l, matchQuery as m, noop as n, isCancelledError as o, partialMatchKey as p, dehydrate as q, replaceEqualDeep as r, skipToken as s, hydrate as t, defaultShouldDehydrateQuery as u, defaultShouldDehydrateMutation as v, type QueryState as w, Query as x, type MutationState as y, Mutation as z };
1370
+ export { type Enabled as $, type QueryState as A, type DistributiveOmit as B, CancelledError as C, type DehydratedState as D, type Override as E, type NoInfer as F, type DefaultError as G, type HydrateOptions as H, type QueryKey as I, dataTagSymbol as J, dataTagErrorSymbol as K, unsetMarker as L, MutationCache as M, type NonUndefinedGuard as N, type OmitKeyof as O, type UnsetMarker as P, QueryCache as Q, type Register as R, type SkipToken as S, type AnyDataTag as T, type Updater as U, type DataTag as V, type InferDataFromTag as W, type InferErrorFromTag as X, type QueryFunction as Y, type StaleTime as Z, type StaleTimeFunction as _, defaultShouldDehydrateQuery as a, type MutationObserverIdleResult as a$, type QueryPersister as a0, type QueryFunctionContext as a1, type InitialDataFunction as a2, type PlaceholderDataFunction as a3, type QueriesPlaceholderDataFunction as a4, type QueryKeyHashFunction as a5, type GetPreviousPageParamFunction as a6, type GetNextPageParamFunction as a7, type InfiniteData as a8, type QueryMeta as a9, type QueryObserverPendingResult as aA, type QueryObserverLoadingResult as aB, type QueryObserverLoadingErrorResult as aC, type QueryObserverRefetchErrorResult as aD, type QueryObserverSuccessResult as aE, type QueryObserverPlaceholderResult as aF, type DefinedQueryObserverResult as aG, type QueryObserverResult as aH, type InfiniteQueryObserverBaseResult as aI, type InfiniteQueryObserverPendingResult as aJ, type InfiniteQueryObserverLoadingResult as aK, type InfiniteQueryObserverLoadingErrorResult as aL, type InfiniteQueryObserverRefetchErrorResult as aM, type InfiniteQueryObserverSuccessResult as aN, type InfiniteQueryObserverPlaceholderResult as aO, type DefinedInfiniteQueryObserverResult as aP, type InfiniteQueryObserverResult as aQ, type MutationKey as aR, type MutationStatus as aS, type MutationScope as aT, type MutationMeta as aU, type MutationFunction as aV, type MutationOptions as aW, type MutationObserverOptions as aX, type MutateOptions as aY, type MutateFunction as aZ, type MutationObserverBaseResult as a_, type NetworkMode as aa, type NotifyOnChangeProps as ab, type QueryOptions as ac, type InitialPageParam as ad, type InfiniteQueryPageParamsOptions as ae, type ThrowOnError as af, type QueryObserverOptions as ag, type WithRequired as ah, type DefaultedQueryObserverOptions as ai, type InfiniteQueryObserverOptions as aj, type DefaultedInfiniteQueryObserverOptions as ak, type FetchQueryOptions as al, type EnsureQueryDataOptions as am, type EnsureInfiniteQueryDataOptions as an, type FetchInfiniteQueryOptions as ao, type ResultOptions as ap, type RefetchOptions as aq, type InvalidateQueryFilters as ar, type RefetchQueryFilters as as, type InvalidateOptions as at, type ResetOptions as au, type FetchNextPageOptions as av, type FetchPreviousPageOptions as aw, type QueryStatus as ax, type FetchStatus as ay, type QueryObserverBaseResult as az, dehydrate as b, type MutationObserverLoadingResult as b0, type MutationObserverErrorResult as b1, type MutationObserverSuccessResult as b2, type MutationObserverResult as b3, type QueryClientConfig as b4, type DefaultOptions as b5, type CancelOptions as b6, type SetDataOptions as b7, type NotifyEventType as b8, type NotifyEvent as b9, type Retryer as bA, type RetryValue as bB, type RetryDelayValue as bC, canFetch as bD, createRetryer as bE, type QueryBehavior as ba, type FetchContext as bb, type FetchDirection as bc, type FetchMeta as bd, type FetchOptions as be, type Action$1 as bf, type SetStateOptions as bg, fetchState as bh, type Action as bi, getDefaultState as bj, type QueryTypeFilter as bk, functionalUpdate as bl, isValidTimeout as bm, timeUntilStale as bn, resolveStaleTime as bo, resolveEnabled as bp, hashQueryKeyByOptions as bq, shallowEqualObjects as br, isPlainArray as bs, isPlainObject as bt, sleep as bu, replaceData as bv, addToEnd as bw, addToStart as bx, ensureQueryFn as by, type QueryStore as bz, type MutationCacheNotifyEvent as c, defaultShouldDehydrateMutation as d, MutationObserver as e, type QueryCacheNotifyEvent as f, QueryClient as g, hydrate as h, QueryObserver as i, isCancelledError as j, hashKey as k, isServer as l, keepPreviousData as m, matchMutation as n, matchQuery as o, noop as p, partialMatchKey as q, replaceEqualDeep as r, shouldThrowError as s, skipToken as t, type MutationFilters as u, type QueryFilters as v, type DehydrateOptions as w, Mutation as x, type MutationState as y, Query as z };
@@ -1367,4 +1367,4 @@ declare function defaultShouldDehydrateQuery(query: Query): boolean;
1367
1367
  declare function dehydrate(client: QueryClient, options?: DehydrateOptions): DehydratedState;
1368
1368
  declare function hydrate(client: QueryClient, dehydratedState: unknown, options?: HydrateOptions): void;
1369
1369
 
1370
- export { type Enabled as $, type DehydratedState as A, type DistributiveOmit as B, CancelledError as C, type DehydrateOptions as D, type Override as E, type NoInfer as F, type DefaultError as G, type HydrateOptions as H, type QueryKey as I, dataTagSymbol as J, dataTagErrorSymbol as K, unsetMarker as L, MutationCache as M, type NonUndefinedGuard as N, type OmitKeyof as O, type UnsetMarker as P, QueryCache as Q, type Register as R, type SkipToken as S, type AnyDataTag as T, type Updater as U, type DataTag as V, type InferDataFromTag as W, type InferErrorFromTag as X, type QueryFunction as Y, type StaleTime as Z, type StaleTimeFunction as _, type QueryCacheNotifyEvent as a, type MutationObserverIdleResult as a$, type QueryPersister as a0, type QueryFunctionContext as a1, type InitialDataFunction as a2, type PlaceholderDataFunction as a3, type QueriesPlaceholderDataFunction as a4, type QueryKeyHashFunction as a5, type GetPreviousPageParamFunction as a6, type GetNextPageParamFunction as a7, type InfiniteData as a8, type QueryMeta as a9, type QueryObserverPendingResult as aA, type QueryObserverLoadingResult as aB, type QueryObserverLoadingErrorResult as aC, type QueryObserverRefetchErrorResult as aD, type QueryObserverSuccessResult as aE, type QueryObserverPlaceholderResult as aF, type DefinedQueryObserverResult as aG, type QueryObserverResult as aH, type InfiniteQueryObserverBaseResult as aI, type InfiniteQueryObserverPendingResult as aJ, type InfiniteQueryObserverLoadingResult as aK, type InfiniteQueryObserverLoadingErrorResult as aL, type InfiniteQueryObserverRefetchErrorResult as aM, type InfiniteQueryObserverSuccessResult as aN, type InfiniteQueryObserverPlaceholderResult as aO, type DefinedInfiniteQueryObserverResult as aP, type InfiniteQueryObserverResult as aQ, type MutationKey as aR, type MutationStatus as aS, type MutationScope as aT, type MutationMeta as aU, type MutationFunction as aV, type MutationOptions as aW, type MutationObserverOptions as aX, type MutateOptions as aY, type MutateFunction as aZ, type MutationObserverBaseResult as a_, type NetworkMode as aa, type NotifyOnChangeProps as ab, type QueryOptions as ac, type InitialPageParam as ad, type InfiniteQueryPageParamsOptions as ae, type ThrowOnError as af, type QueryObserverOptions as ag, type WithRequired as ah, type DefaultedQueryObserverOptions as ai, type InfiniteQueryObserverOptions as aj, type DefaultedInfiniteQueryObserverOptions as ak, type FetchQueryOptions as al, type EnsureQueryDataOptions as am, type EnsureInfiniteQueryDataOptions as an, type FetchInfiniteQueryOptions as ao, type ResultOptions as ap, type RefetchOptions as aq, type InvalidateQueryFilters as ar, type RefetchQueryFilters as as, type InvalidateOptions as at, type ResetOptions as au, type FetchNextPageOptions as av, type FetchPreviousPageOptions as aw, type QueryStatus as ax, type FetchStatus as ay, type QueryObserverBaseResult as az, QueryClient as b, type MutationObserverLoadingResult as b0, type MutationObserverErrorResult as b1, type MutationObserverSuccessResult as b2, type MutationObserverResult as b3, type QueryClientConfig as b4, type DefaultOptions as b5, type CancelOptions as b6, type SetDataOptions as b7, type NotifyEventType as b8, type NotifyEvent as b9, type Retryer as bA, type RetryValue as bB, type RetryDelayValue as bC, canFetch as bD, createRetryer as bE, type QueryBehavior as ba, type FetchContext as bb, type FetchDirection as bc, type FetchMeta as bd, type FetchOptions as be, type Action$1 as bf, type SetStateOptions as bg, fetchState as bh, type Action as bi, getDefaultState as bj, type QueryTypeFilter as bk, functionalUpdate as bl, isValidTimeout as bm, timeUntilStale as bn, resolveStaleTime as bo, resolveEnabled as bp, hashQueryKeyByOptions as bq, shallowEqualObjects as br, isPlainArray as bs, isPlainObject as bt, sleep as bu, replaceData as bv, addToEnd as bw, addToStart as bx, ensureQueryFn as by, type QueryStore as bz, QueryObserver as c, type MutationCacheNotifyEvent as d, MutationObserver as e, matchMutation as f, shouldThrowError as g, hashKey as h, isServer as i, type MutationFilters as j, keepPreviousData as k, type QueryFilters as l, matchQuery as m, noop as n, isCancelledError as o, partialMatchKey as p, dehydrate as q, replaceEqualDeep as r, skipToken as s, hydrate as t, defaultShouldDehydrateQuery as u, defaultShouldDehydrateMutation as v, type QueryState as w, Query as x, type MutationState as y, Mutation as z };
1370
+ export { type Enabled as $, type QueryState as A, type DistributiveOmit as B, CancelledError as C, type DehydratedState as D, type Override as E, type NoInfer as F, type DefaultError as G, type HydrateOptions as H, type QueryKey as I, dataTagSymbol as J, dataTagErrorSymbol as K, unsetMarker as L, MutationCache as M, type NonUndefinedGuard as N, type OmitKeyof as O, type UnsetMarker as P, QueryCache as Q, type Register as R, type SkipToken as S, type AnyDataTag as T, type Updater as U, type DataTag as V, type InferDataFromTag as W, type InferErrorFromTag as X, type QueryFunction as Y, type StaleTime as Z, type StaleTimeFunction as _, defaultShouldDehydrateQuery as a, type MutationObserverIdleResult as a$, type QueryPersister as a0, type QueryFunctionContext as a1, type InitialDataFunction as a2, type PlaceholderDataFunction as a3, type QueriesPlaceholderDataFunction as a4, type QueryKeyHashFunction as a5, type GetPreviousPageParamFunction as a6, type GetNextPageParamFunction as a7, type InfiniteData as a8, type QueryMeta as a9, type QueryObserverPendingResult as aA, type QueryObserverLoadingResult as aB, type QueryObserverLoadingErrorResult as aC, type QueryObserverRefetchErrorResult as aD, type QueryObserverSuccessResult as aE, type QueryObserverPlaceholderResult as aF, type DefinedQueryObserverResult as aG, type QueryObserverResult as aH, type InfiniteQueryObserverBaseResult as aI, type InfiniteQueryObserverPendingResult as aJ, type InfiniteQueryObserverLoadingResult as aK, type InfiniteQueryObserverLoadingErrorResult as aL, type InfiniteQueryObserverRefetchErrorResult as aM, type InfiniteQueryObserverSuccessResult as aN, type InfiniteQueryObserverPlaceholderResult as aO, type DefinedInfiniteQueryObserverResult as aP, type InfiniteQueryObserverResult as aQ, type MutationKey as aR, type MutationStatus as aS, type MutationScope as aT, type MutationMeta as aU, type MutationFunction as aV, type MutationOptions as aW, type MutationObserverOptions as aX, type MutateOptions as aY, type MutateFunction as aZ, type MutationObserverBaseResult as a_, type NetworkMode as aa, type NotifyOnChangeProps as ab, type QueryOptions as ac, type InitialPageParam as ad, type InfiniteQueryPageParamsOptions as ae, type ThrowOnError as af, type QueryObserverOptions as ag, type WithRequired as ah, type DefaultedQueryObserverOptions as ai, type InfiniteQueryObserverOptions as aj, type DefaultedInfiniteQueryObserverOptions as ak, type FetchQueryOptions as al, type EnsureQueryDataOptions as am, type EnsureInfiniteQueryDataOptions as an, type FetchInfiniteQueryOptions as ao, type ResultOptions as ap, type RefetchOptions as aq, type InvalidateQueryFilters as ar, type RefetchQueryFilters as as, type InvalidateOptions as at, type ResetOptions as au, type FetchNextPageOptions as av, type FetchPreviousPageOptions as aw, type QueryStatus as ax, type FetchStatus as ay, type QueryObserverBaseResult as az, dehydrate as b, type MutationObserverLoadingResult as b0, type MutationObserverErrorResult as b1, type MutationObserverSuccessResult as b2, type MutationObserverResult as b3, type QueryClientConfig as b4, type DefaultOptions as b5, type CancelOptions as b6, type SetDataOptions as b7, type NotifyEventType as b8, type NotifyEvent as b9, type Retryer as bA, type RetryValue as bB, type RetryDelayValue as bC, canFetch as bD, createRetryer as bE, type QueryBehavior as ba, type FetchContext as bb, type FetchDirection as bc, type FetchMeta as bd, type FetchOptions as be, type Action$1 as bf, type SetStateOptions as bg, fetchState as bh, type Action as bi, getDefaultState as bj, type QueryTypeFilter as bk, functionalUpdate as bl, isValidTimeout as bm, timeUntilStale as bn, resolveStaleTime as bo, resolveEnabled as bp, hashQueryKeyByOptions as bq, shallowEqualObjects as br, isPlainArray as bs, isPlainObject as bt, sleep as bu, replaceData as bv, addToEnd as bw, addToStart as bx, ensureQueryFn as by, type QueryStore as bz, type MutationCacheNotifyEvent as c, defaultShouldDehydrateMutation as d, MutationObserver as e, type QueryCacheNotifyEvent as f, QueryClient as g, hydrate as h, QueryObserver as i, isCancelledError as j, hashKey as k, isServer as l, keepPreviousData as m, matchMutation as n, matchQuery as o, noop as p, partialMatchKey as q, replaceEqualDeep as r, shouldThrowError as s, skipToken as t, type MutationFilters as u, type QueryFilters as v, type DehydrateOptions as w, Mutation as x, type MutationState as y, Query as z };
@@ -1,3 +1,3 @@
1
- export { D as DehydrateOptions, A as DehydratedState, H as HydrateOptions, v as defaultShouldDehydrateMutation, u as defaultShouldDehydrateQuery, q as dehydrate, t as hydrate } from './hydration-BC7iBQD-.cjs';
1
+ export { w as DehydrateOptions, D as DehydratedState, H as HydrateOptions, d as defaultShouldDehydrateMutation, a as defaultShouldDehydrateQuery, b as dehydrate, h as hydrate } from './hydration-_hO-y142.cjs';
2
2
  import './removable.cjs';
3
3
  import './subscribable.cjs';
@@ -1,3 +1,3 @@
1
- export { D as DehydrateOptions, A as DehydratedState, H as HydrateOptions, v as defaultShouldDehydrateMutation, u as defaultShouldDehydrateQuery, q as dehydrate, t as hydrate } from './hydration-BpLOP9Dw.js';
1
+ export { w as DehydrateOptions, D as DehydratedState, H as HydrateOptions, d as defaultShouldDehydrateMutation, a as defaultShouldDehydrateQuery, b as dehydrate, h as hydrate } from './hydration-BYonJkjc.js';
2
2
  import './removable.js';
3
3
  import './subscribable.js';
@@ -39,7 +39,7 @@ __export(index_exports, {
39
39
  focusManager: () => import_focusManager.focusManager,
40
40
  hashKey: () => import_utils.hashKey,
41
41
  hydrate: () => import_hydration.hydrate,
42
- isCancelledError: () => import_retryer2.isCancelledError,
42
+ isCancelledError: () => import_retryer.isCancelledError,
43
43
  isServer: () => import_utils.isServer,
44
44
  keepPreviousData: () => import_utils.keepPreviousData,
45
45
  matchMutation: () => import_utils.matchMutation,
@@ -50,27 +50,28 @@ __export(index_exports, {
50
50
  partialMatchKey: () => import_utils.partialMatchKey,
51
51
  replaceEqualDeep: () => import_utils.replaceEqualDeep,
52
52
  shouldThrowError: () => import_utils.shouldThrowError,
53
- skipToken: () => import_utils.skipToken
53
+ skipToken: () => import_utils.skipToken,
54
+ timeoutManager: () => import_timeoutManager.timeoutManager
54
55
  });
55
56
  module.exports = __toCommonJS(index_exports);
56
- var import_retryer = require("./retryer.cjs");
57
- var import_queryCache = require("./queryCache.cjs");
58
- var import_queryClient = require("./queryClient.cjs");
59
- var import_queryObserver = require("./queryObserver.cjs");
60
- var import_queriesObserver = require("./queriesObserver.cjs");
57
+ var import_focusManager = require("./focusManager.cjs");
58
+ var import_hydration = require("./hydration.cjs");
61
59
  var import_infiniteQueryObserver = require("./infiniteQueryObserver.cjs");
62
60
  var import_mutationCache = require("./mutationCache.cjs");
63
61
  var import_mutationObserver = require("./mutationObserver.cjs");
64
62
  var import_notifyManager = require("./notifyManager.cjs");
65
- var import_focusManager = require("./focusManager.cjs");
66
63
  var import_onlineManager = require("./onlineManager.cjs");
64
+ var import_queriesObserver = require("./queriesObserver.cjs");
65
+ var import_queryCache = require("./queryCache.cjs");
66
+ var import_queryClient = require("./queryClient.cjs");
67
+ var import_queryObserver = require("./queryObserver.cjs");
68
+ var import_retryer = require("./retryer.cjs");
69
+ var import_timeoutManager = require("./timeoutManager.cjs");
67
70
  var import_utils = require("./utils.cjs");
68
- var import_retryer2 = require("./retryer.cjs");
69
- var import_hydration = require("./hydration.cjs");
70
71
  var import_streamedQuery = require("./streamedQuery.cjs");
71
- __reExport(index_exports, require("./types.cjs"), module.exports);
72
- var import_query = require("./query.cjs");
73
72
  var import_mutation = require("./mutation.cjs");
73
+ var import_query = require("./query.cjs");
74
+ __reExport(index_exports, require("./types.cjs"), module.exports);
74
75
  // Annotate the CommonJS export names for ESM import in node:
75
76
  0 && (module.exports = {
76
77
  CancelledError,
@@ -103,6 +104,7 @@ var import_mutation = require("./mutation.cjs");
103
104
  replaceEqualDeep,
104
105
  shouldThrowError,
105
106
  skipToken,
107
+ timeoutManager,
106
108
  ...require("./types.cjs")
107
109
  });
108
110
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/* istanbul ignore file */\n\nexport { CancelledError } from './retryer'\nexport { QueryCache } from './queryCache'\nexport type { QueryCacheNotifyEvent } from './queryCache'\nexport { QueryClient } from './queryClient'\nexport { QueryObserver } from './queryObserver'\nexport { QueriesObserver } from './queriesObserver'\nexport { InfiniteQueryObserver } from './infiniteQueryObserver'\nexport { MutationCache } from './mutationCache'\nexport type { MutationCacheNotifyEvent } from './mutationCache'\nexport { MutationObserver } from './mutationObserver'\nexport { notifyManager, defaultScheduler } from './notifyManager'\nexport { focusManager } from './focusManager'\nexport { onlineManager } from './onlineManager'\nexport {\n hashKey,\n partialMatchKey,\n replaceEqualDeep,\n isServer,\n matchQuery,\n matchMutation,\n keepPreviousData,\n skipToken,\n noop,\n shouldThrowError,\n} from './utils'\nexport type { MutationFilters, QueryFilters, Updater, SkipToken } from './utils'\nexport { isCancelledError } from './retryer'\nexport {\n dehydrate,\n hydrate,\n defaultShouldDehydrateQuery,\n defaultShouldDehydrateMutation,\n} from './hydration'\n\nexport { streamedQuery as experimental_streamedQuery } from './streamedQuery'\n\n// Types\nexport * from './types'\nexport type { QueryState } from './query'\nexport { Query } from './query'\nexport type { MutationState } from './mutation'\nexport { Mutation } from './mutation'\nexport type {\n DehydrateOptions,\n DehydratedState,\n HydrateOptions,\n} from './hydration'\nexport type { QueriesObserverOptions } from './queriesObserver'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,qBAA+B;AAC/B,wBAA2B;AAE3B,yBAA4B;AAC5B,2BAA8B;AAC9B,6BAAgC;AAChC,mCAAsC;AACtC,2BAA8B;AAE9B,8BAAiC;AACjC,2BAAgD;AAChD,0BAA6B;AAC7B,2BAA8B;AAC9B,mBAWO;AAEP,IAAAA,kBAAiC;AACjC,uBAKO;AAEP,2BAA4D;AAG5D,0BAAc,wBAvCd;AAyCA,mBAAsB;AAEtB,sBAAyB;","names":["import_retryer"]}
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/* istanbul ignore file */\n\nexport { focusManager } from './focusManager'\nexport {\n defaultShouldDehydrateMutation,\n defaultShouldDehydrateQuery,\n dehydrate,\n hydrate,\n} from './hydration'\nexport { InfiniteQueryObserver } from './infiniteQueryObserver'\nexport { MutationCache } from './mutationCache'\nexport type { MutationCacheNotifyEvent } from './mutationCache'\nexport { MutationObserver } from './mutationObserver'\nexport { defaultScheduler, notifyManager } from './notifyManager'\nexport { onlineManager } from './onlineManager'\nexport { QueriesObserver } from './queriesObserver'\nexport { QueryCache } from './queryCache'\nexport type { QueryCacheNotifyEvent } from './queryCache'\nexport { QueryClient } from './queryClient'\nexport { QueryObserver } from './queryObserver'\nexport { CancelledError, isCancelledError } from './retryer'\nexport {\n timeoutManager,\n type ManagedTimerId,\n type TimeoutCallback,\n type TimeoutProvider,\n} from './timeoutManager'\nexport {\n hashKey,\n isServer,\n keepPreviousData,\n matchMutation,\n matchQuery,\n noop,\n partialMatchKey,\n replaceEqualDeep,\n shouldThrowError,\n skipToken,\n} from './utils'\nexport type { MutationFilters, QueryFilters, SkipToken, Updater } from './utils'\n\nexport { streamedQuery as experimental_streamedQuery } from './streamedQuery'\n\n// Types\nexport type {\n DehydratedState,\n DehydrateOptions,\n HydrateOptions,\n} from './hydration'\nexport { Mutation } from './mutation'\nexport type { MutationState } from './mutation'\nexport type { QueriesObserverOptions } from './queriesObserver'\nexport { Query } from './query'\nexport type { QueryState } from './query'\nexport * from './types'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0BAA6B;AAC7B,uBAKO;AACP,mCAAsC;AACtC,2BAA8B;AAE9B,8BAAiC;AACjC,2BAAgD;AAChD,2BAA8B;AAC9B,6BAAgC;AAChC,wBAA2B;AAE3B,yBAA4B;AAC5B,2BAA8B;AAC9B,qBAAiD;AACjD,4BAKO;AACP,mBAWO;AAGP,2BAA4D;AAQ5D,sBAAyB;AAGzB,mBAAsB;AAEtB,0BAAc,wBAtDd;","names":[]}
@@ -1,9 +1,10 @@
1
- export { T as AnyDataTag, b6 as CancelOptions, C as CancelledError, V as DataTag, G as DefaultError, b5 as DefaultOptions, ak as DefaultedInfiniteQueryObserverOptions, ai as DefaultedQueryObserverOptions, aP as DefinedInfiniteQueryObserverResult, aG as DefinedQueryObserverResult, D as DehydrateOptions, A as DehydratedState, B as DistributiveOmit, $ as Enabled, an as EnsureInfiniteQueryDataOptions, am as EnsureQueryDataOptions, ao as FetchInfiniteQueryOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, al as FetchQueryOptions, ay as FetchStatus, a7 as GetNextPageParamFunction, a6 as GetPreviousPageParamFunction, H as HydrateOptions, W as InferDataFromTag, X as InferErrorFromTag, a8 as InfiniteData, aI as InfiniteQueryObserverBaseResult, aL as InfiniteQueryObserverLoadingErrorResult, aK as InfiniteQueryObserverLoadingResult, aj as InfiniteQueryObserverOptions, aJ as InfiniteQueryObserverPendingResult, aO as InfiniteQueryObserverPlaceholderResult, aM as InfiniteQueryObserverRefetchErrorResult, aQ as InfiniteQueryObserverResult, aN as InfiniteQueryObserverSuccessResult, ae as InfiniteQueryPageParamsOptions, a2 as InitialDataFunction, ad as InitialPageParam, at as InvalidateOptions, ar as InvalidateQueryFilters, aZ as MutateFunction, aY as MutateOptions, z as Mutation, M as MutationCache, d as MutationCacheNotifyEvent, j as MutationFilters, aV as MutationFunction, aR as MutationKey, aU as MutationMeta, e as MutationObserver, a_ as MutationObserverBaseResult, b1 as MutationObserverErrorResult, a$ as MutationObserverIdleResult, b0 as MutationObserverLoadingResult, aX as MutationObserverOptions, b3 as MutationObserverResult, b2 as MutationObserverSuccessResult, aW as MutationOptions, aT as MutationScope, y as MutationState, aS as MutationStatus, aa as NetworkMode, F as NoInfer, N as NonUndefinedGuard, b9 as NotifyEvent, b8 as NotifyEventType, ab as NotifyOnChangeProps, O as OmitKeyof, E as Override, a3 as PlaceholderDataFunction, a4 as QueriesPlaceholderDataFunction, x as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, b4 as QueryClientConfig, l as QueryFilters, Y as QueryFunction, a1 as QueryFunctionContext, I as QueryKey, a5 as QueryKeyHashFunction, a9 as QueryMeta, c as QueryObserver, az as QueryObserverBaseResult, aC as QueryObserverLoadingErrorResult, aB as QueryObserverLoadingResult, ag as QueryObserverOptions, aA as QueryObserverPendingResult, aF as QueryObserverPlaceholderResult, aD as QueryObserverRefetchErrorResult, aH as QueryObserverResult, aE as QueryObserverSuccessResult, ac as QueryOptions, a0 as QueryPersister, w as QueryState, ax as QueryStatus, aq as RefetchOptions, as as RefetchQueryFilters, R as Register, au as ResetOptions, ap as ResultOptions, b7 as SetDataOptions, S as SkipToken, Z as StaleTime, _ as StaleTimeFunction, af as ThrowOnError, P as UnsetMarker, U as Updater, ah as WithRequired, K as dataTagErrorSymbol, J as dataTagSymbol, v as defaultShouldDehydrateMutation, u as defaultShouldDehydrateQuery, q as dehydrate, h as hashKey, t as hydrate, o as isCancelledError, i as isServer, k as keepPreviousData, f as matchMutation, m as matchQuery, n as noop, p as partialMatchKey, r as replaceEqualDeep, g as shouldThrowError, s as skipToken, L as unsetMarker } from './hydration-BC7iBQD-.cjs';
2
- export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.cjs';
1
+ export { focusManager } from './focusManager.cjs';
2
+ export { T as AnyDataTag, b6 as CancelOptions, C as CancelledError, V as DataTag, G as DefaultError, b5 as DefaultOptions, ak as DefaultedInfiniteQueryObserverOptions, ai as DefaultedQueryObserverOptions, aP as DefinedInfiniteQueryObserverResult, aG as DefinedQueryObserverResult, w as DehydrateOptions, D as DehydratedState, B as DistributiveOmit, $ as Enabled, an as EnsureInfiniteQueryDataOptions, am as EnsureQueryDataOptions, ao as FetchInfiniteQueryOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, al as FetchQueryOptions, ay as FetchStatus, a7 as GetNextPageParamFunction, a6 as GetPreviousPageParamFunction, H as HydrateOptions, W as InferDataFromTag, X as InferErrorFromTag, a8 as InfiniteData, aI as InfiniteQueryObserverBaseResult, aL as InfiniteQueryObserverLoadingErrorResult, aK as InfiniteQueryObserverLoadingResult, aj as InfiniteQueryObserverOptions, aJ as InfiniteQueryObserverPendingResult, aO as InfiniteQueryObserverPlaceholderResult, aM as InfiniteQueryObserverRefetchErrorResult, aQ as InfiniteQueryObserverResult, aN as InfiniteQueryObserverSuccessResult, ae as InfiniteQueryPageParamsOptions, a2 as InitialDataFunction, ad as InitialPageParam, at as InvalidateOptions, ar as InvalidateQueryFilters, aZ as MutateFunction, aY as MutateOptions, x as Mutation, M as MutationCache, c as MutationCacheNotifyEvent, u as MutationFilters, aV as MutationFunction, aR as MutationKey, aU as MutationMeta, e as MutationObserver, a_ as MutationObserverBaseResult, b1 as MutationObserverErrorResult, a$ as MutationObserverIdleResult, b0 as MutationObserverLoadingResult, aX as MutationObserverOptions, b3 as MutationObserverResult, b2 as MutationObserverSuccessResult, aW as MutationOptions, aT as MutationScope, y as MutationState, aS as MutationStatus, aa as NetworkMode, F as NoInfer, N as NonUndefinedGuard, b9 as NotifyEvent, b8 as NotifyEventType, ab as NotifyOnChangeProps, O as OmitKeyof, E as Override, a3 as PlaceholderDataFunction, a4 as QueriesPlaceholderDataFunction, z as Query, Q as QueryCache, f as QueryCacheNotifyEvent, g as QueryClient, b4 as QueryClientConfig, v as QueryFilters, Y as QueryFunction, a1 as QueryFunctionContext, I as QueryKey, a5 as QueryKeyHashFunction, a9 as QueryMeta, i as QueryObserver, az as QueryObserverBaseResult, aC as QueryObserverLoadingErrorResult, aB as QueryObserverLoadingResult, ag as QueryObserverOptions, aA as QueryObserverPendingResult, aF as QueryObserverPlaceholderResult, aD as QueryObserverRefetchErrorResult, aH as QueryObserverResult, aE as QueryObserverSuccessResult, ac as QueryOptions, a0 as QueryPersister, A as QueryState, ax as QueryStatus, aq as RefetchOptions, as as RefetchQueryFilters, R as Register, au as ResetOptions, ap as ResultOptions, b7 as SetDataOptions, S as SkipToken, Z as StaleTime, _ as StaleTimeFunction, af as ThrowOnError, P as UnsetMarker, U as Updater, ah as WithRequired, K as dataTagErrorSymbol, J as dataTagSymbol, d as defaultShouldDehydrateMutation, a as defaultShouldDehydrateQuery, b as dehydrate, k as hashKey, h as hydrate, j as isCancelledError, l as isServer, m as keepPreviousData, n as matchMutation, o as matchQuery, p as noop, q as partialMatchKey, r as replaceEqualDeep, s as shouldThrowError, t as skipToken, L as unsetMarker } from './hydration-_hO-y142.cjs';
3
3
  export { InfiniteQueryObserver } from './infiniteQueryObserver.cjs';
4
4
  export { defaultScheduler, notifyManager } from './notifyManager.cjs';
5
- export { focusManager } from './focusManager.cjs';
6
5
  export { onlineManager } from './onlineManager.cjs';
6
+ export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.cjs';
7
+ export { ManagedTimerId, TimeoutCallback, TimeoutProvider, timeoutManager } from './timeoutManager.cjs';
7
8
  export { streamedQuery as experimental_streamedQuery } from './streamedQuery.cjs';
8
- import './removable.cjs';
9
9
  import './subscribable.cjs';
10
+ import './removable.cjs';
@@ -1,9 +1,10 @@
1
- export { T as AnyDataTag, b6 as CancelOptions, C as CancelledError, V as DataTag, G as DefaultError, b5 as DefaultOptions, ak as DefaultedInfiniteQueryObserverOptions, ai as DefaultedQueryObserverOptions, aP as DefinedInfiniteQueryObserverResult, aG as DefinedQueryObserverResult, D as DehydrateOptions, A as DehydratedState, B as DistributiveOmit, $ as Enabled, an as EnsureInfiniteQueryDataOptions, am as EnsureQueryDataOptions, ao as FetchInfiniteQueryOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, al as FetchQueryOptions, ay as FetchStatus, a7 as GetNextPageParamFunction, a6 as GetPreviousPageParamFunction, H as HydrateOptions, W as InferDataFromTag, X as InferErrorFromTag, a8 as InfiniteData, aI as InfiniteQueryObserverBaseResult, aL as InfiniteQueryObserverLoadingErrorResult, aK as InfiniteQueryObserverLoadingResult, aj as InfiniteQueryObserverOptions, aJ as InfiniteQueryObserverPendingResult, aO as InfiniteQueryObserverPlaceholderResult, aM as InfiniteQueryObserverRefetchErrorResult, aQ as InfiniteQueryObserverResult, aN as InfiniteQueryObserverSuccessResult, ae as InfiniteQueryPageParamsOptions, a2 as InitialDataFunction, ad as InitialPageParam, at as InvalidateOptions, ar as InvalidateQueryFilters, aZ as MutateFunction, aY as MutateOptions, z as Mutation, M as MutationCache, d as MutationCacheNotifyEvent, j as MutationFilters, aV as MutationFunction, aR as MutationKey, aU as MutationMeta, e as MutationObserver, a_ as MutationObserverBaseResult, b1 as MutationObserverErrorResult, a$ as MutationObserverIdleResult, b0 as MutationObserverLoadingResult, aX as MutationObserverOptions, b3 as MutationObserverResult, b2 as MutationObserverSuccessResult, aW as MutationOptions, aT as MutationScope, y as MutationState, aS as MutationStatus, aa as NetworkMode, F as NoInfer, N as NonUndefinedGuard, b9 as NotifyEvent, b8 as NotifyEventType, ab as NotifyOnChangeProps, O as OmitKeyof, E as Override, a3 as PlaceholderDataFunction, a4 as QueriesPlaceholderDataFunction, x as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, b4 as QueryClientConfig, l as QueryFilters, Y as QueryFunction, a1 as QueryFunctionContext, I as QueryKey, a5 as QueryKeyHashFunction, a9 as QueryMeta, c as QueryObserver, az as QueryObserverBaseResult, aC as QueryObserverLoadingErrorResult, aB as QueryObserverLoadingResult, ag as QueryObserverOptions, aA as QueryObserverPendingResult, aF as QueryObserverPlaceholderResult, aD as QueryObserverRefetchErrorResult, aH as QueryObserverResult, aE as QueryObserverSuccessResult, ac as QueryOptions, a0 as QueryPersister, w as QueryState, ax as QueryStatus, aq as RefetchOptions, as as RefetchQueryFilters, R as Register, au as ResetOptions, ap as ResultOptions, b7 as SetDataOptions, S as SkipToken, Z as StaleTime, _ as StaleTimeFunction, af as ThrowOnError, P as UnsetMarker, U as Updater, ah as WithRequired, K as dataTagErrorSymbol, J as dataTagSymbol, v as defaultShouldDehydrateMutation, u as defaultShouldDehydrateQuery, q as dehydrate, h as hashKey, t as hydrate, o as isCancelledError, i as isServer, k as keepPreviousData, f as matchMutation, m as matchQuery, n as noop, p as partialMatchKey, r as replaceEqualDeep, g as shouldThrowError, s as skipToken, L as unsetMarker } from './hydration-BpLOP9Dw.js';
2
- export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.js';
1
+ export { focusManager } from './focusManager.js';
2
+ export { T as AnyDataTag, b6 as CancelOptions, C as CancelledError, V as DataTag, G as DefaultError, b5 as DefaultOptions, ak as DefaultedInfiniteQueryObserverOptions, ai as DefaultedQueryObserverOptions, aP as DefinedInfiniteQueryObserverResult, aG as DefinedQueryObserverResult, w as DehydrateOptions, D as DehydratedState, B as DistributiveOmit, $ as Enabled, an as EnsureInfiniteQueryDataOptions, am as EnsureQueryDataOptions, ao as FetchInfiniteQueryOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, al as FetchQueryOptions, ay as FetchStatus, a7 as GetNextPageParamFunction, a6 as GetPreviousPageParamFunction, H as HydrateOptions, W as InferDataFromTag, X as InferErrorFromTag, a8 as InfiniteData, aI as InfiniteQueryObserverBaseResult, aL as InfiniteQueryObserverLoadingErrorResult, aK as InfiniteQueryObserverLoadingResult, aj as InfiniteQueryObserverOptions, aJ as InfiniteQueryObserverPendingResult, aO as InfiniteQueryObserverPlaceholderResult, aM as InfiniteQueryObserverRefetchErrorResult, aQ as InfiniteQueryObserverResult, aN as InfiniteQueryObserverSuccessResult, ae as InfiniteQueryPageParamsOptions, a2 as InitialDataFunction, ad as InitialPageParam, at as InvalidateOptions, ar as InvalidateQueryFilters, aZ as MutateFunction, aY as MutateOptions, x as Mutation, M as MutationCache, c as MutationCacheNotifyEvent, u as MutationFilters, aV as MutationFunction, aR as MutationKey, aU as MutationMeta, e as MutationObserver, a_ as MutationObserverBaseResult, b1 as MutationObserverErrorResult, a$ as MutationObserverIdleResult, b0 as MutationObserverLoadingResult, aX as MutationObserverOptions, b3 as MutationObserverResult, b2 as MutationObserverSuccessResult, aW as MutationOptions, aT as MutationScope, y as MutationState, aS as MutationStatus, aa as NetworkMode, F as NoInfer, N as NonUndefinedGuard, b9 as NotifyEvent, b8 as NotifyEventType, ab as NotifyOnChangeProps, O as OmitKeyof, E as Override, a3 as PlaceholderDataFunction, a4 as QueriesPlaceholderDataFunction, z as Query, Q as QueryCache, f as QueryCacheNotifyEvent, g as QueryClient, b4 as QueryClientConfig, v as QueryFilters, Y as QueryFunction, a1 as QueryFunctionContext, I as QueryKey, a5 as QueryKeyHashFunction, a9 as QueryMeta, i as QueryObserver, az as QueryObserverBaseResult, aC as QueryObserverLoadingErrorResult, aB as QueryObserverLoadingResult, ag as QueryObserverOptions, aA as QueryObserverPendingResult, aF as QueryObserverPlaceholderResult, aD as QueryObserverRefetchErrorResult, aH as QueryObserverResult, aE as QueryObserverSuccessResult, ac as QueryOptions, a0 as QueryPersister, A as QueryState, ax as QueryStatus, aq as RefetchOptions, as as RefetchQueryFilters, R as Register, au as ResetOptions, ap as ResultOptions, b7 as SetDataOptions, S as SkipToken, Z as StaleTime, _ as StaleTimeFunction, af as ThrowOnError, P as UnsetMarker, U as Updater, ah as WithRequired, K as dataTagErrorSymbol, J as dataTagSymbol, d as defaultShouldDehydrateMutation, a as defaultShouldDehydrateQuery, b as dehydrate, k as hashKey, h as hydrate, j as isCancelledError, l as isServer, m as keepPreviousData, n as matchMutation, o as matchQuery, p as noop, q as partialMatchKey, r as replaceEqualDeep, s as shouldThrowError, t as skipToken, L as unsetMarker } from './hydration-BYonJkjc.js';
3
3
  export { InfiniteQueryObserver } from './infiniteQueryObserver.js';
4
4
  export { defaultScheduler, notifyManager } from './notifyManager.js';
5
- export { focusManager } from './focusManager.js';
6
5
  export { onlineManager } from './onlineManager.js';
6
+ export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.js';
7
+ export { ManagedTimerId, TimeoutCallback, TimeoutProvider, timeoutManager } from './timeoutManager.js';
7
8
  export { streamedQuery as experimental_streamedQuery } from './streamedQuery.js';
8
- import './removable.js';
9
9
  import './subscribable.js';
10
+ import './removable.js';
@@ -1,40 +1,42 @@
1
1
  import "./chunk-PXG64RU4.js";
2
2
 
3
3
  // src/index.ts
4
- import { CancelledError } from "./retryer.js";
5
- import { QueryCache } from "./queryCache.js";
6
- import { QueryClient } from "./queryClient.js";
7
- import { QueryObserver } from "./queryObserver.js";
8
- import { QueriesObserver } from "./queriesObserver.js";
4
+ import { focusManager } from "./focusManager.js";
5
+ import {
6
+ defaultShouldDehydrateMutation,
7
+ defaultShouldDehydrateQuery,
8
+ dehydrate,
9
+ hydrate
10
+ } from "./hydration.js";
9
11
  import { InfiniteQueryObserver } from "./infiniteQueryObserver.js";
10
12
  import { MutationCache } from "./mutationCache.js";
11
13
  import { MutationObserver } from "./mutationObserver.js";
12
- import { notifyManager, defaultScheduler } from "./notifyManager.js";
13
- import { focusManager } from "./focusManager.js";
14
+ import { defaultScheduler, notifyManager } from "./notifyManager.js";
14
15
  import { onlineManager } from "./onlineManager.js";
16
+ import { QueriesObserver } from "./queriesObserver.js";
17
+ import { QueryCache } from "./queryCache.js";
18
+ import { QueryClient } from "./queryClient.js";
19
+ import { QueryObserver } from "./queryObserver.js";
20
+ import { CancelledError, isCancelledError } from "./retryer.js";
21
+ import {
22
+ timeoutManager
23
+ } from "./timeoutManager.js";
15
24
  import {
16
25
  hashKey,
17
- partialMatchKey,
18
- replaceEqualDeep,
19
26
  isServer,
20
- matchQuery,
21
- matchMutation,
22
27
  keepPreviousData,
23
- skipToken,
28
+ matchMutation,
29
+ matchQuery,
24
30
  noop,
25
- shouldThrowError
31
+ partialMatchKey,
32
+ replaceEqualDeep,
33
+ shouldThrowError,
34
+ skipToken
26
35
  } from "./utils.js";
27
- import { isCancelledError } from "./retryer.js";
28
- import {
29
- dehydrate,
30
- hydrate,
31
- defaultShouldDehydrateQuery,
32
- defaultShouldDehydrateMutation
33
- } from "./hydration.js";
34
36
  import { streamedQuery } from "./streamedQuery.js";
35
- export * from "./types.js";
36
- import { Query } from "./query.js";
37
37
  import { Mutation } from "./mutation.js";
38
+ import { Query } from "./query.js";
39
+ export * from "./types.js";
38
40
  export {
39
41
  CancelledError,
40
42
  InfiniteQueryObserver,
@@ -65,6 +67,7 @@ export {
65
67
  partialMatchKey,
66
68
  replaceEqualDeep,
67
69
  shouldThrowError,
68
- skipToken
70
+ skipToken,
71
+ timeoutManager
69
72
  };
70
73
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/* istanbul ignore file */\n\nexport { CancelledError } from './retryer'\nexport { QueryCache } from './queryCache'\nexport type { QueryCacheNotifyEvent } from './queryCache'\nexport { QueryClient } from './queryClient'\nexport { QueryObserver } from './queryObserver'\nexport { QueriesObserver } from './queriesObserver'\nexport { InfiniteQueryObserver } from './infiniteQueryObserver'\nexport { MutationCache } from './mutationCache'\nexport type { MutationCacheNotifyEvent } from './mutationCache'\nexport { MutationObserver } from './mutationObserver'\nexport { notifyManager, defaultScheduler } from './notifyManager'\nexport { focusManager } from './focusManager'\nexport { onlineManager } from './onlineManager'\nexport {\n hashKey,\n partialMatchKey,\n replaceEqualDeep,\n isServer,\n matchQuery,\n matchMutation,\n keepPreviousData,\n skipToken,\n noop,\n shouldThrowError,\n} from './utils'\nexport type { MutationFilters, QueryFilters, Updater, SkipToken } from './utils'\nexport { isCancelledError } from './retryer'\nexport {\n dehydrate,\n hydrate,\n defaultShouldDehydrateQuery,\n defaultShouldDehydrateMutation,\n} from './hydration'\n\nexport { streamedQuery as experimental_streamedQuery } from './streamedQuery'\n\n// Types\nexport * from './types'\nexport type { QueryState } from './query'\nexport { Query } from './query'\nexport type { MutationState } from './mutation'\nexport { Mutation } from './mutation'\nexport type {\n DehydrateOptions,\n DehydratedState,\n HydrateOptions,\n} from './hydration'\nexport type { QueriesObserverOptions } from './queriesObserver'\n"],"mappings":";;;AAEA,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAE3B,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,6BAA6B;AACtC,SAAS,qBAAqB;AAE9B,SAAS,wBAAwB;AACjC,SAAS,eAAe,wBAAwB;AAChD,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,wBAAwB;AACjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAA0B,qBAAkC;AAG5D,cAAc;AAEd,SAAS,aAAa;AAEtB,SAAS,gBAAgB;","names":[]}
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/* istanbul ignore file */\n\nexport { focusManager } from './focusManager'\nexport {\n defaultShouldDehydrateMutation,\n defaultShouldDehydrateQuery,\n dehydrate,\n hydrate,\n} from './hydration'\nexport { InfiniteQueryObserver } from './infiniteQueryObserver'\nexport { MutationCache } from './mutationCache'\nexport type { MutationCacheNotifyEvent } from './mutationCache'\nexport { MutationObserver } from './mutationObserver'\nexport { defaultScheduler, notifyManager } from './notifyManager'\nexport { onlineManager } from './onlineManager'\nexport { QueriesObserver } from './queriesObserver'\nexport { QueryCache } from './queryCache'\nexport type { QueryCacheNotifyEvent } from './queryCache'\nexport { QueryClient } from './queryClient'\nexport { QueryObserver } from './queryObserver'\nexport { CancelledError, isCancelledError } from './retryer'\nexport {\n timeoutManager,\n type ManagedTimerId,\n type TimeoutCallback,\n type TimeoutProvider,\n} from './timeoutManager'\nexport {\n hashKey,\n isServer,\n keepPreviousData,\n matchMutation,\n matchQuery,\n noop,\n partialMatchKey,\n replaceEqualDeep,\n shouldThrowError,\n skipToken,\n} from './utils'\nexport type { MutationFilters, QueryFilters, SkipToken, Updater } from './utils'\n\nexport { streamedQuery as experimental_streamedQuery } from './streamedQuery'\n\n// Types\nexport type {\n DehydratedState,\n DehydrateOptions,\n HydrateOptions,\n} from './hydration'\nexport { Mutation } from './mutation'\nexport type { MutationState } from './mutation'\nexport type { QueriesObserverOptions } from './queriesObserver'\nexport { Query } from './query'\nexport type { QueryState } from './query'\nexport * from './types'\n"],"mappings":";;;AAEA,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,6BAA6B;AACtC,SAAS,qBAAqB;AAE9B,SAAS,wBAAwB;AACjC,SAAS,kBAAkB,qBAAqB;AAChD,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,kBAAkB;AAE3B,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB,wBAAwB;AACjD;AAAA,EACE;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAA0B,qBAAkC;AAQ5D,SAAS,gBAAgB;AAGzB,SAAS,aAAa;AAEtB,cAAc;","names":[]}
@@ -1,4 +1,4 @@
1
- import { ba as QueryBehavior, a8 as InfiniteData, ae as InfiniteQueryPageParamsOptions } from './hydration-BC7iBQD-.cjs';
1
+ import { ba as QueryBehavior, a8 as InfiniteData, ae as InfiniteQueryPageParamsOptions } from './hydration-_hO-y142.cjs';
2
2
  import './removable.cjs';
3
3
  import './subscribable.cjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { ba as QueryBehavior, a8 as InfiniteData, ae as InfiniteQueryPageParamsOptions } from './hydration-BpLOP9Dw.js';
1
+ import { ba as QueryBehavior, a8 as InfiniteData, ae as InfiniteQueryPageParamsOptions } from './hydration-BYonJkjc.js';
2
2
  import './removable.js';
3
3
  import './subscribable.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { G as DefaultError, a8 as InfiniteData, I as QueryKey, c as QueryObserver, aQ as InfiniteQueryObserverResult, b as QueryClient, aj as InfiniteQueryObserverOptions, ak as DefaultedInfiniteQueryObserverOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, x as Query } from './hydration-BC7iBQD-.cjs';
1
+ import { G as DefaultError, a8 as InfiniteData, I as QueryKey, i as QueryObserver, aQ as InfiniteQueryObserverResult, g as QueryClient, aj as InfiniteQueryObserverOptions, ak as DefaultedInfiniteQueryObserverOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, z as Query } from './hydration-_hO-y142.cjs';
2
2
  import { Subscribable } from './subscribable.cjs';
3
3
  import './removable.cjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { G as DefaultError, a8 as InfiniteData, I as QueryKey, c as QueryObserver, aQ as InfiniteQueryObserverResult, b as QueryClient, aj as InfiniteQueryObserverOptions, ak as DefaultedInfiniteQueryObserverOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, x as Query } from './hydration-BpLOP9Dw.js';
1
+ import { G as DefaultError, a8 as InfiniteData, I as QueryKey, i as QueryObserver, aQ as InfiniteQueryObserverResult, g as QueryClient, aj as InfiniteQueryObserverOptions, ak as DefaultedInfiniteQueryObserverOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, z as Query } from './hydration-BYonJkjc.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 { bi as Action, z as Mutation, y as MutationState, bj as getDefaultState } from './hydration-BC7iBQD-.cjs';
2
+ export { bi as Action, x as Mutation, y as MutationState, bj as getDefaultState } from './hydration-_hO-y142.cjs';
3
3
  import './subscribable.cjs';
@@ -1,3 +1,3 @@
1
1
  import './removable.js';
2
- export { bi as Action, z as Mutation, y as MutationState, bj as getDefaultState } from './hydration-BpLOP9Dw.js';
2
+ export { bi as Action, x as Mutation, y as MutationState, bj as getDefaultState } from './hydration-BYonJkjc.js';
3
3
  import './subscribable.js';
@@ -1,3 +1,3 @@
1
- export { M as MutationCache, d as MutationCacheNotifyEvent } from './hydration-BC7iBQD-.cjs';
1
+ export { M as MutationCache, c as MutationCacheNotifyEvent } from './hydration-_hO-y142.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-BpLOP9Dw.js';
1
+ export { M as MutationCache, c as MutationCacheNotifyEvent } from './hydration-BYonJkjc.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-BC7iBQD-.cjs';
2
+ export { e as MutationObserver } from './hydration-_hO-y142.cjs';
3
3
  import './removable.cjs';
@@ -1,3 +1,3 @@
1
1
  import './subscribable.js';
2
- export { e as MutationObserver } from './hydration-BpLOP9Dw.js';
2
+ export { e as MutationObserver } from './hydration-BYonJkjc.js';
3
3
  import './removable.js';
@@ -25,7 +25,8 @@ __export(notifyManager_exports, {
25
25
  notifyManager: () => notifyManager
26
26
  });
27
27
  module.exports = __toCommonJS(notifyManager_exports);
28
- var defaultScheduler = (cb) => setTimeout(cb, 0);
28
+ var import_timeoutManager = require("./timeoutManager.cjs");
29
+ var defaultScheduler = import_timeoutManager.systemSetTimeoutZero;
29
30
  function createNotifyManager() {
30
31
  let queue = [];
31
32
  let transactions = 0;
@@ -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 const defaultScheduler: ScheduleFunction = (cb) => setTimeout(cb, 0)\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 = defaultScheduler\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;AAAA;AAYO,IAAM,mBAAqC,CAAC,OAAO,WAAW,IAAI,CAAC;AAEnE,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,aAAa;AAEjB,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
+ {"version":3,"sources":["../../src/notifyManager.ts"],"sourcesContent":["// TYPES\n\nimport { systemSetTimeoutZero } from './timeoutManager'\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 const defaultScheduler: ScheduleFunction = systemSetTimeoutZero\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 = defaultScheduler\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;AAAA;AAEA,4BAAqC;AAY9B,IAAM,mBAAqC;AAE3C,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,aAAa;AAEjB,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,7 +1,8 @@
1
1
  import "./chunk-PXG64RU4.js";
2
2
 
3
3
  // src/notifyManager.ts
4
- var defaultScheduler = (cb) => setTimeout(cb, 0);
4
+ import { systemSetTimeoutZero } from "./timeoutManager.js";
5
+ var defaultScheduler = systemSetTimeoutZero;
5
6
  function createNotifyManager() {
6
7
  let queue = [];
7
8
  let transactions = 0;
@@ -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 const defaultScheduler: ScheduleFunction = (cb) => setTimeout(cb, 0)\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 = defaultScheduler\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,IAAM,mBAAqC,CAAC,OAAO,WAAW,IAAI,CAAC;AAEnE,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,aAAa;AAEjB,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
+ {"version":3,"sources":["../../src/notifyManager.ts"],"sourcesContent":["// TYPES\n\nimport { systemSetTimeoutZero } from './timeoutManager'\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 const defaultScheduler: ScheduleFunction = systemSetTimeoutZero\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 = defaultScheduler\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":";;;AAEA,SAAS,4BAA4B;AAY9B,IAAM,mBAAqC;AAE3C,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,aAAa;AAEjB,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 { aH as QueryObserverResult, b as QueryClient, ag as QueryObserverOptions, x as Query, c as QueryObserver } from './hydration-BC7iBQD-.cjs';
1
+ import { aH as QueryObserverResult, g as QueryClient, ag as QueryObserverOptions, z as Query, i as QueryObserver } from './hydration-_hO-y142.cjs';
2
2
  import { Subscribable } from './subscribable.cjs';
3
3
  import './removable.cjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { aH as QueryObserverResult, b as QueryClient, ag as QueryObserverOptions, x as Query, c as QueryObserver } from './hydration-BpLOP9Dw.js';
1
+ import { aH as QueryObserverResult, g as QueryClient, ag as QueryObserverOptions, z as Query, i as QueryObserver } from './hydration-BYonJkjc.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 { bf as Action, bb as FetchContext, bc as FetchDirection, bd as FetchMeta, be as FetchOptions, x as Query, ba as QueryBehavior, w as QueryState, bg as SetStateOptions, bh as fetchState } from './hydration-BC7iBQD-.cjs';
2
+ export { bf as Action, bb as FetchContext, bc as FetchDirection, bd as FetchMeta, be as FetchOptions, z as Query, ba as QueryBehavior, A as QueryState, bg as SetStateOptions, bh as fetchState } from './hydration-_hO-y142.cjs';
3
3
  import './subscribable.cjs';
@@ -1,3 +1,3 @@
1
1
  import './removable.js';
2
- export { bf as Action, bb as FetchContext, bc as FetchDirection, bd as FetchMeta, be as FetchOptions, x as Query, ba as QueryBehavior, w as QueryState, bg as SetStateOptions, bh as fetchState } from './hydration-BpLOP9Dw.js';
2
+ export { bf as Action, bb as FetchContext, bc as FetchDirection, bd as FetchMeta, be as FetchOptions, z as Query, ba as QueryBehavior, A as QueryState, bg as SetStateOptions, bh as fetchState } from './hydration-BYonJkjc.js';
3
3
  import './subscribable.js';
@@ -1,3 +1,3 @@
1
- export { Q as QueryCache, a as QueryCacheNotifyEvent, bz as QueryStore } from './hydration-BC7iBQD-.cjs';
1
+ export { Q as QueryCache, f as QueryCacheNotifyEvent, bz as QueryStore } from './hydration-_hO-y142.cjs';
2
2
  import './subscribable.cjs';
3
3
  import './removable.cjs';
@@ -1,3 +1,3 @@
1
- export { Q as QueryCache, a as QueryCacheNotifyEvent, bz as QueryStore } from './hydration-BpLOP9Dw.js';
1
+ export { Q as QueryCache, f as QueryCacheNotifyEvent, bz as QueryStore } from './hydration-BYonJkjc.js';
2
2
  import './subscribable.js';
3
3
  import './removable.js';
@@ -1,3 +1,3 @@
1
- export { b as QueryClient } from './hydration-BC7iBQD-.cjs';
1
+ export { g as QueryClient } from './hydration-_hO-y142.cjs';
2
2
  import './removable.cjs';
3
3
  import './subscribable.cjs';
@@ -1,3 +1,3 @@
1
- export { b as QueryClient } from './hydration-BpLOP9Dw.js';
1
+ export { g as QueryClient } from './hydration-BYonJkjc.js';
2
2
  import './removable.js';
3
3
  import './subscribable.js';
@@ -37,6 +37,7 @@ var import_query = require("./query.cjs");
37
37
  var import_subscribable = require("./subscribable.cjs");
38
38
  var import_thenable = require("./thenable.cjs");
39
39
  var import_utils = require("./utils.cjs");
40
+ var import_timeoutManager = require("./timeoutManager.cjs");
40
41
  var _client, _currentQuery, _currentQueryInitialState, _currentResult, _currentResultState, _currentResultOptions, _currentThenable, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _QueryObserver_instances, executeFetch_fn, updateStaleTimeout_fn, computeRefetchInterval_fn, updateRefetchInterval_fn, updateTimers_fn, clearStaleTimeout_fn, clearRefetchInterval_fn, updateQuery_fn, notify_fn;
41
42
  var QueryObserver = class extends import_subscribable.Subscribable {
42
43
  constructor(client, options) {
@@ -414,7 +415,7 @@ updateStaleTimeout_fn = function() {
414
415
  }
415
416
  const time = (0, import_utils.timeUntilStale)(__privateGet(this, _currentResult).dataUpdatedAt, staleTime);
416
417
  const timeout = time + 1;
417
- __privateSet(this, _staleTimeoutId, setTimeout(() => {
418
+ __privateSet(this, _staleTimeoutId, import_timeoutManager.timeoutManager.setTimeout(() => {
418
419
  if (!__privateGet(this, _currentResult).isStale) {
419
420
  this.updateResult();
420
421
  }
@@ -429,7 +430,7 @@ updateRefetchInterval_fn = function(nextInterval) {
429
430
  if (import_utils.isServer || (0, import_utils.resolveEnabled)(this.options.enabled, __privateGet(this, _currentQuery)) === false || !(0, import_utils.isValidTimeout)(__privateGet(this, _currentRefetchInterval)) || __privateGet(this, _currentRefetchInterval) === 0) {
430
431
  return;
431
432
  }
432
- __privateSet(this, _refetchIntervalId, setInterval(() => {
433
+ __privateSet(this, _refetchIntervalId, import_timeoutManager.timeoutManager.setInterval(() => {
433
434
  if (this.options.refetchIntervalInBackground || import_focusManager.focusManager.isFocused()) {
434
435
  __privateMethod(this, _QueryObserver_instances, executeFetch_fn).call(this);
435
436
  }
@@ -441,13 +442,13 @@ updateTimers_fn = function() {
441
442
  };
442
443
  clearStaleTimeout_fn = function() {
443
444
  if (__privateGet(this, _staleTimeoutId)) {
444
- clearTimeout(__privateGet(this, _staleTimeoutId));
445
+ import_timeoutManager.timeoutManager.clearTimeout(__privateGet(this, _staleTimeoutId));
445
446
  __privateSet(this, _staleTimeoutId, void 0);
446
447
  }
447
448
  };
448
449
  clearRefetchInterval_fn = function() {
449
450
  if (__privateGet(this, _refetchIntervalId)) {
450
- clearInterval(__privateGet(this, _refetchIntervalId));
451
+ import_timeoutManager.timeoutManager.clearInterval(__privateGet(this, _refetchIntervalId));
451
452
  __privateSet(this, _refetchIntervalId, void 0);
452
453
  }
453
454
  };