@tanstack/query-core 5.80.1 → 5.80.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/legacy/{hydration-DYrnn9Jo.d.ts → hydration-CYIcz6o-.d.ts} +1 -1
- package/build/legacy/{hydration-BubklUgv.d.cts → hydration-wIUo5Xh0.d.cts} +1 -1
- package/build/legacy/hydration.d.cts +1 -1
- package/build/legacy/hydration.d.ts +1 -1
- package/build/legacy/index.cjs +2 -0
- package/build/legacy/index.cjs.map +1 -1
- package/build/legacy/index.d.cts +1 -1
- package/build/legacy/index.d.ts +1 -1
- package/build/legacy/index.js +2 -0
- package/build/legacy/index.js.map +1 -1
- package/build/legacy/infiniteQueryBehavior.d.cts +1 -1
- package/build/legacy/infiniteQueryBehavior.d.ts +1 -1
- package/build/legacy/infiniteQueryObserver.d.cts +1 -1
- package/build/legacy/infiniteQueryObserver.d.ts +1 -1
- package/build/legacy/mutation.d.cts +1 -1
- package/build/legacy/mutation.d.ts +1 -1
- package/build/legacy/mutationCache.d.cts +1 -1
- package/build/legacy/mutationCache.d.ts +1 -1
- package/build/legacy/mutationObserver.d.cts +1 -1
- package/build/legacy/mutationObserver.d.ts +1 -1
- package/build/legacy/queriesObserver.d.cts +1 -1
- package/build/legacy/queriesObserver.d.ts +1 -1
- package/build/legacy/query.d.cts +1 -1
- package/build/legacy/query.d.ts +1 -1
- package/build/legacy/queryCache.d.cts +1 -1
- package/build/legacy/queryCache.d.ts +1 -1
- package/build/legacy/queryClient.d.cts +1 -1
- package/build/legacy/queryClient.d.ts +1 -1
- package/build/legacy/queryObserver.d.cts +1 -1
- package/build/legacy/queryObserver.d.ts +1 -1
- package/build/legacy/retryer.d.cts +1 -1
- package/build/legacy/retryer.d.ts +1 -1
- package/build/legacy/streamedQuery.d.cts +1 -1
- package/build/legacy/streamedQuery.d.ts +1 -1
- package/build/legacy/thenable.cjs +1 -1
- package/build/legacy/thenable.cjs.map +1 -1
- package/build/legacy/thenable.js +1 -1
- package/build/legacy/thenable.js.map +1 -1
- package/build/legacy/types.d.cts +1 -1
- package/build/legacy/types.d.ts +1 -1
- package/build/legacy/utils.d.cts +1 -1
- package/build/legacy/utils.d.ts +1 -1
- package/build/modern/{hydration-DYrnn9Jo.d.ts → hydration-CYIcz6o-.d.ts} +1 -1
- package/build/modern/{hydration-BubklUgv.d.cts → hydration-wIUo5Xh0.d.cts} +1 -1
- package/build/modern/hydration.d.cts +1 -1
- package/build/modern/hydration.d.ts +1 -1
- package/build/modern/index.cjs +2 -0
- package/build/modern/index.cjs.map +1 -1
- package/build/modern/index.d.cts +1 -1
- package/build/modern/index.d.ts +1 -1
- package/build/modern/index.js +2 -0
- package/build/modern/index.js.map +1 -1
- package/build/modern/infiniteQueryBehavior.d.cts +1 -1
- package/build/modern/infiniteQueryBehavior.d.ts +1 -1
- package/build/modern/infiniteQueryObserver.d.cts +1 -1
- package/build/modern/infiniteQueryObserver.d.ts +1 -1
- package/build/modern/mutation.d.cts +1 -1
- package/build/modern/mutation.d.ts +1 -1
- package/build/modern/mutationCache.d.cts +1 -1
- package/build/modern/mutationCache.d.ts +1 -1
- package/build/modern/mutationObserver.d.cts +1 -1
- package/build/modern/mutationObserver.d.ts +1 -1
- package/build/modern/queriesObserver.d.cts +1 -1
- package/build/modern/queriesObserver.d.ts +1 -1
- package/build/modern/query.d.cts +1 -1
- package/build/modern/query.d.ts +1 -1
- package/build/modern/queryCache.d.cts +1 -1
- package/build/modern/queryCache.d.ts +1 -1
- package/build/modern/queryClient.d.cts +1 -1
- package/build/modern/queryClient.d.ts +1 -1
- package/build/modern/queryObserver.d.cts +1 -1
- package/build/modern/queryObserver.d.ts +1 -1
- package/build/modern/retryer.d.cts +1 -1
- package/build/modern/retryer.d.ts +1 -1
- package/build/modern/streamedQuery.d.cts +1 -1
- package/build/modern/streamedQuery.d.ts +1 -1
- package/build/modern/thenable.cjs +1 -1
- package/build/modern/thenable.cjs.map +1 -1
- package/build/modern/thenable.js +1 -1
- package/build/modern/thenable.js.map +1 -1
- package/build/modern/types.d.cts +1 -1
- package/build/modern/types.d.ts +1 -1
- package/build/modern/utils.d.cts +1 -1
- package/build/modern/utils.d.ts +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/thenable.ts +1 -1
|
@@ -1361,4 +1361,4 @@ declare function defaultShouldDehydrateQuery(query: Query): boolean;
|
|
|
1361
1361
|
declare function dehydrate(client: QueryClient, options?: DehydrateOptions): DehydratedState;
|
|
1362
1362
|
declare function hydrate(client: QueryClient, dehydratedState: unknown, options?: HydrateOptions): void;
|
|
1363
1363
|
|
|
1364
|
-
export { type
|
|
1364
|
+
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 };
|
|
@@ -1361,4 +1361,4 @@ declare function defaultShouldDehydrateQuery(query: Query): boolean;
|
|
|
1361
1361
|
declare function dehydrate(client: QueryClient, options?: DehydrateOptions): DehydratedState;
|
|
1362
1362
|
declare function hydrate(client: QueryClient, dehydratedState: unknown, options?: HydrateOptions): void;
|
|
1363
1363
|
|
|
1364
|
-
export { type
|
|
1364
|
+
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 };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { D as DehydrateOptions,
|
|
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-wIUo5Xh0.cjs';
|
|
2
2
|
import './removable.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { D as DehydrateOptions,
|
|
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-CYIcz6o-.js';
|
|
2
2
|
import './removable.js';
|
|
3
3
|
import './subscribable.js';
|
package/build/legacy/index.cjs
CHANGED
|
@@ -47,6 +47,7 @@ __export(index_exports, {
|
|
|
47
47
|
noop: () => import_utils.noop,
|
|
48
48
|
notifyManager: () => import_notifyManager.notifyManager,
|
|
49
49
|
onlineManager: () => import_onlineManager.onlineManager,
|
|
50
|
+
partialMatchKey: () => import_utils.partialMatchKey,
|
|
50
51
|
replaceEqualDeep: () => import_utils.replaceEqualDeep,
|
|
51
52
|
shouldThrowError: () => import_utils.shouldThrowError,
|
|
52
53
|
skipToken: () => import_utils.skipToken
|
|
@@ -98,6 +99,7 @@ var import_mutation = require("./mutation.cjs");
|
|
|
98
99
|
noop,
|
|
99
100
|
notifyManager,
|
|
100
101
|
onlineManager,
|
|
102
|
+
partialMatchKey,
|
|
101
103
|
replaceEqualDeep,
|
|
102
104
|
shouldThrowError,
|
|
103
105
|
skipToken,
|
|
@@ -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 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;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,
|
|
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"]}
|
package/build/legacy/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
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-wIUo5Xh0.cjs';
|
|
2
2
|
export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.cjs';
|
|
3
3
|
export { InfiniteQueryObserver } from './infiniteQueryObserver.cjs';
|
|
4
4
|
export { defaultScheduler, notifyManager } from './notifyManager.cjs';
|
package/build/legacy/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
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-CYIcz6o-.js';
|
|
2
2
|
export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.js';
|
|
3
3
|
export { InfiniteQueryObserver } from './infiniteQueryObserver.js';
|
|
4
4
|
export { defaultScheduler, notifyManager } from './notifyManager.js';
|
package/build/legacy/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import { focusManager } from "./focusManager.js";
|
|
|
14
14
|
import { onlineManager } from "./onlineManager.js";
|
|
15
15
|
import {
|
|
16
16
|
hashKey,
|
|
17
|
+
partialMatchKey,
|
|
17
18
|
replaceEqualDeep,
|
|
18
19
|
isServer,
|
|
19
20
|
matchQuery,
|
|
@@ -61,6 +62,7 @@ export {
|
|
|
61
62
|
noop,
|
|
62
63
|
notifyManager,
|
|
63
64
|
onlineManager,
|
|
65
|
+
partialMatchKey,
|
|
64
66
|
replaceEqualDeep,
|
|
65
67
|
shouldThrowError,
|
|
66
68
|
skipToken
|
|
@@ -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 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,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 { 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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ba as QueryBehavior, a8 as InfiniteData, ae as InfiniteQueryPageParamsOptions } from './hydration-wIUo5Xh0.cjs';
|
|
2
2
|
import './removable.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ba as QueryBehavior, a8 as InfiniteData, ae as InfiniteQueryPageParamsOptions } from './hydration-CYIcz6o-.js';
|
|
2
2
|
import './removable.js';
|
|
3
3
|
import './subscribable.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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-wIUo5Xh0.cjs';
|
|
2
2
|
import { Subscribable } from './subscribable.cjs';
|
|
3
3
|
import './removable.cjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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-CYIcz6o-.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 {
|
|
2
|
+
export { bi as Action, z as Mutation, y as MutationState, bj as getDefaultState } from './hydration-wIUo5Xh0.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './removable.js';
|
|
2
|
-
export {
|
|
2
|
+
export { bi as Action, z as Mutation, y as MutationState, bj as getDefaultState } from './hydration-CYIcz6o-.js';
|
|
3
3
|
import './subscribable.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aH as QueryObserverResult, b as QueryClient, ag as QueryObserverOptions, x as Query, c as QueryObserver } from './hydration-wIUo5Xh0.cjs';
|
|
2
2
|
import { Subscribable } from './subscribable.cjs';
|
|
3
3
|
import './removable.cjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aH as QueryObserverResult, b as QueryClient, ag as QueryObserverOptions, x as Query, c as QueryObserver } from './hydration-CYIcz6o-.js';
|
|
2
2
|
import { Subscribable } from './subscribable.js';
|
|
3
3
|
import './removable.js';
|
|
4
4
|
|
package/build/legacy/query.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './removable.cjs';
|
|
2
|
-
export {
|
|
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-wIUo5Xh0.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
package/build/legacy/query.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './removable.js';
|
|
2
|
-
export {
|
|
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-CYIcz6o-.js';
|
|
3
3
|
import './subscribable.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { C as CancelledError, bC as RetryDelayValue, bB as RetryValue, bA as Retryer, bD as canFetch, bE as createRetryer, o as isCancelledError } from './hydration-
|
|
1
|
+
export { C as CancelledError, bC as RetryDelayValue, bB as RetryValue, bA as Retryer, bD as canFetch, bE as createRetryer, o as isCancelledError } from './hydration-wIUo5Xh0.cjs';
|
|
2
2
|
import './removable.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { C as CancelledError, bC as RetryDelayValue, bB as RetryValue, bA as Retryer, bD as canFetch, bE as createRetryer, o as isCancelledError } from './hydration-
|
|
1
|
+
export { C as CancelledError, bC as RetryDelayValue, bB as RetryValue, bA as Retryer, bD as canFetch, bE as createRetryer, o as isCancelledError } from './hydration-CYIcz6o-.js';
|
|
2
2
|
import './removable.js';
|
|
3
3
|
import './subscribable.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as QueryKey, a1 as QueryFunctionContext, Y as QueryFunction } from './hydration-wIUo5Xh0.cjs';
|
|
2
2
|
import './removable.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
|
4
4
|
|
|
@@ -62,7 +62,7 @@ function tryResolveSync(promise) {
|
|
|
62
62
|
(_a = promise.then((result) => {
|
|
63
63
|
data = result;
|
|
64
64
|
return result;
|
|
65
|
-
})) == null ? void 0 : _a.catch(import_utils.noop);
|
|
65
|
+
}, import_utils.noop)) == null ? void 0 : _a.catch(import_utils.noop);
|
|
66
66
|
if (data !== void 0) {
|
|
67
67
|
return { data };
|
|
68
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/thenable.ts"],"sourcesContent":["/**\n * Thenable types which matches React's types for promises\n *\n * React seemingly uses `.status`, `.value` and `.reason` properties on a promises to optimistically unwrap data from promises\n *\n * @see https://github.com/facebook/react/blob/main/packages/shared/ReactTypes.js#L112-L138\n * @see https://github.com/facebook/react/blob/4f604941569d2e8947ce1460a0b2997e835f37b9/packages/react-debug-tools/src/ReactDebugHooks.js#L224-L227\n */\n\nimport { noop } from './utils'\n\ninterface Fulfilled<T> {\n status: 'fulfilled'\n value: T\n}\ninterface Rejected {\n status: 'rejected'\n reason: unknown\n}\ninterface Pending<T> {\n status: 'pending'\n\n /**\n * Resolve the promise with a value.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n resolve: (value: T) => void\n /**\n * Reject the promise with a reason.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n reject: (reason: unknown) => void\n}\n\nexport type FulfilledThenable<T> = Promise<T> & Fulfilled<T>\nexport type RejectedThenable<T> = Promise<T> & Rejected\nexport type PendingThenable<T> = Promise<T> & Pending<T>\n\nexport type Thenable<T> =\n | FulfilledThenable<T>\n | RejectedThenable<T>\n | PendingThenable<T>\n\nexport function pendingThenable<T>(): PendingThenable<T> {\n let resolve: Pending<T>['resolve']\n let reject: Pending<T>['reject']\n // this could use `Promise.withResolvers()` in the future\n const thenable = new Promise((_resolve, _reject) => {\n resolve = _resolve\n reject = _reject\n }) as PendingThenable<T>\n\n thenable.status = 'pending'\n thenable.catch(() => {\n // prevent unhandled rejection errors\n })\n\n function finalize(data: Fulfilled<T> | Rejected) {\n Object.assign(thenable, data)\n\n // clear pending props props to avoid calling them twice\n delete (thenable as Partial<PendingThenable<T>>).resolve\n delete (thenable as Partial<PendingThenable<T>>).reject\n }\n\n thenable.resolve = (value) => {\n finalize({\n status: 'fulfilled',\n value,\n })\n\n resolve(value)\n }\n thenable.reject = (reason) => {\n finalize({\n status: 'rejected',\n reason,\n })\n\n reject(reason)\n }\n\n return thenable\n}\n\n/**\n * This function takes a Promise-like input and detects whether the data\n * is synchronously available or not.\n *\n * It does not inspect .status, .value or .reason properties of the promise,\n * as those are not always available, and the .status of React's promises\n * should not be considered part of the public API.\n */\nexport function tryResolveSync(promise: Promise<unknown> | Thenable<unknown>) {\n let data: unknown\n\n promise\n .then((result) => {\n data = result\n return result\n })\n // .catch can be unavailable on certain kinds of thenable's\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n ?.catch(noop)\n\n if (data !== undefined) {\n return { data }\n }\n\n return undefined\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,mBAAqB;AAkCd,SAAS,kBAAyC;AACvD,MAAI;AACJ,MAAI;AAEJ,QAAM,WAAW,IAAI,QAAQ,CAAC,UAAU,YAAY;AAClD,cAAU;AACV,aAAS;AAAA,EACX,CAAC;AAED,WAAS,SAAS;AAClB,WAAS,MAAM,MAAM;AAAA,EAErB,CAAC;AAED,WAAS,SAAS,MAA+B;AAC/C,WAAO,OAAO,UAAU,IAAI;AAG5B,WAAQ,SAAyC;AACjD,WAAQ,SAAyC;AAAA,EACnD;AAEA,WAAS,UAAU,CAAC,UAAU;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,YAAQ,KAAK;AAAA,EACf;AACA,WAAS,SAAS,CAAC,WAAW;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AAAA,EACf;AAEA,SAAO;AACT;AAUO,SAAS,eAAe,SAA+C;AA7F9E;AA8FE,MAAI;AAEJ,gBACG,KAAK,CAAC,WAAW;AAChB,WAAO;AACP,WAAO;AAAA,EACT,
|
|
1
|
+
{"version":3,"sources":["../../src/thenable.ts"],"sourcesContent":["/**\n * Thenable types which matches React's types for promises\n *\n * React seemingly uses `.status`, `.value` and `.reason` properties on a promises to optimistically unwrap data from promises\n *\n * @see https://github.com/facebook/react/blob/main/packages/shared/ReactTypes.js#L112-L138\n * @see https://github.com/facebook/react/blob/4f604941569d2e8947ce1460a0b2997e835f37b9/packages/react-debug-tools/src/ReactDebugHooks.js#L224-L227\n */\n\nimport { noop } from './utils'\n\ninterface Fulfilled<T> {\n status: 'fulfilled'\n value: T\n}\ninterface Rejected {\n status: 'rejected'\n reason: unknown\n}\ninterface Pending<T> {\n status: 'pending'\n\n /**\n * Resolve the promise with a value.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n resolve: (value: T) => void\n /**\n * Reject the promise with a reason.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n reject: (reason: unknown) => void\n}\n\nexport type FulfilledThenable<T> = Promise<T> & Fulfilled<T>\nexport type RejectedThenable<T> = Promise<T> & Rejected\nexport type PendingThenable<T> = Promise<T> & Pending<T>\n\nexport type Thenable<T> =\n | FulfilledThenable<T>\n | RejectedThenable<T>\n | PendingThenable<T>\n\nexport function pendingThenable<T>(): PendingThenable<T> {\n let resolve: Pending<T>['resolve']\n let reject: Pending<T>['reject']\n // this could use `Promise.withResolvers()` in the future\n const thenable = new Promise((_resolve, _reject) => {\n resolve = _resolve\n reject = _reject\n }) as PendingThenable<T>\n\n thenable.status = 'pending'\n thenable.catch(() => {\n // prevent unhandled rejection errors\n })\n\n function finalize(data: Fulfilled<T> | Rejected) {\n Object.assign(thenable, data)\n\n // clear pending props props to avoid calling them twice\n delete (thenable as Partial<PendingThenable<T>>).resolve\n delete (thenable as Partial<PendingThenable<T>>).reject\n }\n\n thenable.resolve = (value) => {\n finalize({\n status: 'fulfilled',\n value,\n })\n\n resolve(value)\n }\n thenable.reject = (reason) => {\n finalize({\n status: 'rejected',\n reason,\n })\n\n reject(reason)\n }\n\n return thenable\n}\n\n/**\n * This function takes a Promise-like input and detects whether the data\n * is synchronously available or not.\n *\n * It does not inspect .status, .value or .reason properties of the promise,\n * as those are not always available, and the .status of React's promises\n * should not be considered part of the public API.\n */\nexport function tryResolveSync(promise: Promise<unknown> | Thenable<unknown>) {\n let data: unknown\n\n promise\n .then((result) => {\n data = result\n return result\n }, noop)\n // .catch can be unavailable on certain kinds of thenable's\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n ?.catch(noop)\n\n if (data !== undefined) {\n return { data }\n }\n\n return undefined\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,mBAAqB;AAkCd,SAAS,kBAAyC;AACvD,MAAI;AACJ,MAAI;AAEJ,QAAM,WAAW,IAAI,QAAQ,CAAC,UAAU,YAAY;AAClD,cAAU;AACV,aAAS;AAAA,EACX,CAAC;AAED,WAAS,SAAS;AAClB,WAAS,MAAM,MAAM;AAAA,EAErB,CAAC;AAED,WAAS,SAAS,MAA+B;AAC/C,WAAO,OAAO,UAAU,IAAI;AAG5B,WAAQ,SAAyC;AACjD,WAAQ,SAAyC;AAAA,EACnD;AAEA,WAAS,UAAU,CAAC,UAAU;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,YAAQ,KAAK;AAAA,EACf;AACA,WAAS,SAAS,CAAC,WAAW;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AAAA,EACf;AAEA,SAAO;AACT;AAUO,SAAS,eAAe,SAA+C;AA7F9E;AA8FE,MAAI;AAEJ,gBACG,KAAK,CAAC,WAAW;AAChB,WAAO;AACP,WAAO;AAAA,EACT,GAAG,iBAAI,MAJT,mBAOI,MAAM;AAEV,MAAI,SAAS,QAAW;AACtB,WAAO,EAAE,KAAK;AAAA,EAChB;AAEA,SAAO;AACT;","names":[]}
|
package/build/legacy/thenable.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/thenable.ts"],"sourcesContent":["/**\n * Thenable types which matches React's types for promises\n *\n * React seemingly uses `.status`, `.value` and `.reason` properties on a promises to optimistically unwrap data from promises\n *\n * @see https://github.com/facebook/react/blob/main/packages/shared/ReactTypes.js#L112-L138\n * @see https://github.com/facebook/react/blob/4f604941569d2e8947ce1460a0b2997e835f37b9/packages/react-debug-tools/src/ReactDebugHooks.js#L224-L227\n */\n\nimport { noop } from './utils'\n\ninterface Fulfilled<T> {\n status: 'fulfilled'\n value: T\n}\ninterface Rejected {\n status: 'rejected'\n reason: unknown\n}\ninterface Pending<T> {\n status: 'pending'\n\n /**\n * Resolve the promise with a value.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n resolve: (value: T) => void\n /**\n * Reject the promise with a reason.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n reject: (reason: unknown) => void\n}\n\nexport type FulfilledThenable<T> = Promise<T> & Fulfilled<T>\nexport type RejectedThenable<T> = Promise<T> & Rejected\nexport type PendingThenable<T> = Promise<T> & Pending<T>\n\nexport type Thenable<T> =\n | FulfilledThenable<T>\n | RejectedThenable<T>\n | PendingThenable<T>\n\nexport function pendingThenable<T>(): PendingThenable<T> {\n let resolve: Pending<T>['resolve']\n let reject: Pending<T>['reject']\n // this could use `Promise.withResolvers()` in the future\n const thenable = new Promise((_resolve, _reject) => {\n resolve = _resolve\n reject = _reject\n }) as PendingThenable<T>\n\n thenable.status = 'pending'\n thenable.catch(() => {\n // prevent unhandled rejection errors\n })\n\n function finalize(data: Fulfilled<T> | Rejected) {\n Object.assign(thenable, data)\n\n // clear pending props props to avoid calling them twice\n delete (thenable as Partial<PendingThenable<T>>).resolve\n delete (thenable as Partial<PendingThenable<T>>).reject\n }\n\n thenable.resolve = (value) => {\n finalize({\n status: 'fulfilled',\n value,\n })\n\n resolve(value)\n }\n thenable.reject = (reason) => {\n finalize({\n status: 'rejected',\n reason,\n })\n\n reject(reason)\n }\n\n return thenable\n}\n\n/**\n * This function takes a Promise-like input and detects whether the data\n * is synchronously available or not.\n *\n * It does not inspect .status, .value or .reason properties of the promise,\n * as those are not always available, and the .status of React's promises\n * should not be considered part of the public API.\n */\nexport function tryResolveSync(promise: Promise<unknown> | Thenable<unknown>) {\n let data: unknown\n\n promise\n .then((result) => {\n data = result\n return result\n })\n // .catch can be unavailable on certain kinds of thenable's\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n ?.catch(noop)\n\n if (data !== undefined) {\n return { data }\n }\n\n return undefined\n}\n"],"mappings":";;;AASA,SAAS,YAAY;AAkCd,SAAS,kBAAyC;AACvD,MAAI;AACJ,MAAI;AAEJ,QAAM,WAAW,IAAI,QAAQ,CAAC,UAAU,YAAY;AAClD,cAAU;AACV,aAAS;AAAA,EACX,CAAC;AAED,WAAS,SAAS;AAClB,WAAS,MAAM,MAAM;AAAA,EAErB,CAAC;AAED,WAAS,SAAS,MAA+B;AAC/C,WAAO,OAAO,UAAU,IAAI;AAG5B,WAAQ,SAAyC;AACjD,WAAQ,SAAyC;AAAA,EACnD;AAEA,WAAS,UAAU,CAAC,UAAU;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,YAAQ,KAAK;AAAA,EACf;AACA,WAAS,SAAS,CAAC,WAAW;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AAAA,EACf;AAEA,SAAO;AACT;AAUO,SAAS,eAAe,SAA+C;AA7F9E;AA8FE,MAAI;AAEJ,gBACG,KAAK,CAAC,WAAW;AAChB,WAAO;AACP,WAAO;AAAA,EACT,
|
|
1
|
+
{"version":3,"sources":["../../src/thenable.ts"],"sourcesContent":["/**\n * Thenable types which matches React's types for promises\n *\n * React seemingly uses `.status`, `.value` and `.reason` properties on a promises to optimistically unwrap data from promises\n *\n * @see https://github.com/facebook/react/blob/main/packages/shared/ReactTypes.js#L112-L138\n * @see https://github.com/facebook/react/blob/4f604941569d2e8947ce1460a0b2997e835f37b9/packages/react-debug-tools/src/ReactDebugHooks.js#L224-L227\n */\n\nimport { noop } from './utils'\n\ninterface Fulfilled<T> {\n status: 'fulfilled'\n value: T\n}\ninterface Rejected {\n status: 'rejected'\n reason: unknown\n}\ninterface Pending<T> {\n status: 'pending'\n\n /**\n * Resolve the promise with a value.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n resolve: (value: T) => void\n /**\n * Reject the promise with a reason.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n reject: (reason: unknown) => void\n}\n\nexport type FulfilledThenable<T> = Promise<T> & Fulfilled<T>\nexport type RejectedThenable<T> = Promise<T> & Rejected\nexport type PendingThenable<T> = Promise<T> & Pending<T>\n\nexport type Thenable<T> =\n | FulfilledThenable<T>\n | RejectedThenable<T>\n | PendingThenable<T>\n\nexport function pendingThenable<T>(): PendingThenable<T> {\n let resolve: Pending<T>['resolve']\n let reject: Pending<T>['reject']\n // this could use `Promise.withResolvers()` in the future\n const thenable = new Promise((_resolve, _reject) => {\n resolve = _resolve\n reject = _reject\n }) as PendingThenable<T>\n\n thenable.status = 'pending'\n thenable.catch(() => {\n // prevent unhandled rejection errors\n })\n\n function finalize(data: Fulfilled<T> | Rejected) {\n Object.assign(thenable, data)\n\n // clear pending props props to avoid calling them twice\n delete (thenable as Partial<PendingThenable<T>>).resolve\n delete (thenable as Partial<PendingThenable<T>>).reject\n }\n\n thenable.resolve = (value) => {\n finalize({\n status: 'fulfilled',\n value,\n })\n\n resolve(value)\n }\n thenable.reject = (reason) => {\n finalize({\n status: 'rejected',\n reason,\n })\n\n reject(reason)\n }\n\n return thenable\n}\n\n/**\n * This function takes a Promise-like input and detects whether the data\n * is synchronously available or not.\n *\n * It does not inspect .status, .value or .reason properties of the promise,\n * as those are not always available, and the .status of React's promises\n * should not be considered part of the public API.\n */\nexport function tryResolveSync(promise: Promise<unknown> | Thenable<unknown>) {\n let data: unknown\n\n promise\n .then((result) => {\n data = result\n return result\n }, noop)\n // .catch can be unavailable on certain kinds of thenable's\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n ?.catch(noop)\n\n if (data !== undefined) {\n return { data }\n }\n\n return undefined\n}\n"],"mappings":";;;AASA,SAAS,YAAY;AAkCd,SAAS,kBAAyC;AACvD,MAAI;AACJ,MAAI;AAEJ,QAAM,WAAW,IAAI,QAAQ,CAAC,UAAU,YAAY;AAClD,cAAU;AACV,aAAS;AAAA,EACX,CAAC;AAED,WAAS,SAAS;AAClB,WAAS,MAAM,MAAM;AAAA,EAErB,CAAC;AAED,WAAS,SAAS,MAA+B;AAC/C,WAAO,OAAO,UAAU,IAAI;AAG5B,WAAQ,SAAyC;AACjD,WAAQ,SAAyC;AAAA,EACnD;AAEA,WAAS,UAAU,CAAC,UAAU;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,YAAQ,KAAK;AAAA,EACf;AACA,WAAS,SAAS,CAAC,WAAW;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AAAA,EACf;AAEA,SAAO;AACT;AAUO,SAAS,eAAe,SAA+C;AA7F9E;AA8FE,MAAI;AAEJ,gBACG,KAAK,CAAC,WAAW;AAChB,WAAO;AACP,WAAO;AAAA,EACT,GAAG,IAAI,MAJT,mBAOI,MAAM;AAEV,MAAI,SAAS,QAAW;AACtB,WAAO,EAAE,KAAK;AAAA,EAChB;AAEA,SAAO;AACT;","names":[]}
|
package/build/legacy/types.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { T as AnyDataTag, b6 as CancelOptions, V as DataTag, G as DefaultError, b5 as DefaultOptions, ak as DefaultedInfiniteQueryObserverOptions, ai as DefaultedQueryObserverOptions, aP as DefinedInfiniteQueryObserverResult, aG as DefinedQueryObserverResult, 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, 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, aV as MutationFunction, aR as MutationKey, aU as MutationMeta, 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, 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, b4 as QueryClientConfig, Y as QueryFunction, a1 as QueryFunctionContext, I as QueryKey, a5 as QueryKeyHashFunction, a9 as QueryMeta, 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, ax as QueryStatus, aq as RefetchOptions, as as RefetchQueryFilters, R as Register, au as ResetOptions, ap as ResultOptions, b7 as SetDataOptions, Z as StaleTime, _ as StaleTimeFunction, af as ThrowOnError, P as UnsetMarker, ah as WithRequired, K as dataTagErrorSymbol, J as dataTagSymbol, L as unsetMarker } from './hydration-wIUo5Xh0.cjs';
|
|
2
2
|
import './removable.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
package/build/legacy/types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { T as AnyDataTag, b6 as CancelOptions, V as DataTag, G as DefaultError, b5 as DefaultOptions, ak as DefaultedInfiniteQueryObserverOptions, ai as DefaultedQueryObserverOptions, aP as DefinedInfiniteQueryObserverResult, aG as DefinedQueryObserverResult, 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, 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, aV as MutationFunction, aR as MutationKey, aU as MutationMeta, 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, 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, b4 as QueryClientConfig, Y as QueryFunction, a1 as QueryFunctionContext, I as QueryKey, a5 as QueryKeyHashFunction, a9 as QueryMeta, 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, ax as QueryStatus, aq as RefetchOptions, as as RefetchQueryFilters, R as Register, au as ResetOptions, ap as ResultOptions, b7 as SetDataOptions, Z as StaleTime, _ as StaleTimeFunction, af as ThrowOnError, P as UnsetMarker, ah as WithRequired, K as dataTagErrorSymbol, J as dataTagSymbol, L as unsetMarker } from './hydration-CYIcz6o-.js';
|
|
2
2
|
import './removable.js';
|
|
3
3
|
import './subscribable.js';
|
package/build/legacy/utils.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { j as MutationFilters, l as QueryFilters,
|
|
1
|
+
export { j as MutationFilters, l as QueryFilters, bk as QueryTypeFilter, S as SkipToken, U as Updater, bw as addToEnd, bx as addToStart, by as ensureQueryFn, bl as functionalUpdate, h as hashKey, bq as hashQueryKeyByOptions, bs as isPlainArray, bt as isPlainObject, i as isServer, bm as isValidTimeout, k as keepPreviousData, f as matchMutation, m as matchQuery, n as noop, p as partialMatchKey, bv as replaceData, r as replaceEqualDeep, bp as resolveEnabled, bo as resolveStaleTime, br as shallowEqualObjects, g as shouldThrowError, s as skipToken, bu as sleep, bn as timeUntilStale } from './hydration-wIUo5Xh0.cjs';
|
|
2
2
|
import './removable.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
package/build/legacy/utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { j as MutationFilters, l as QueryFilters,
|
|
1
|
+
export { j as MutationFilters, l as QueryFilters, bk as QueryTypeFilter, S as SkipToken, U as Updater, bw as addToEnd, bx as addToStart, by as ensureQueryFn, bl as functionalUpdate, h as hashKey, bq as hashQueryKeyByOptions, bs as isPlainArray, bt as isPlainObject, i as isServer, bm as isValidTimeout, k as keepPreviousData, f as matchMutation, m as matchQuery, n as noop, p as partialMatchKey, bv as replaceData, r as replaceEqualDeep, bp as resolveEnabled, bo as resolveStaleTime, br as shallowEqualObjects, g as shouldThrowError, s as skipToken, bu as sleep, bn as timeUntilStale } from './hydration-CYIcz6o-.js';
|
|
2
2
|
import './removable.js';
|
|
3
3
|
import './subscribable.js';
|
|
@@ -1361,4 +1361,4 @@ declare function defaultShouldDehydrateQuery(query: Query): boolean;
|
|
|
1361
1361
|
declare function dehydrate(client: QueryClient, options?: DehydrateOptions): DehydratedState;
|
|
1362
1362
|
declare function hydrate(client: QueryClient, dehydratedState: unknown, options?: HydrateOptions): void;
|
|
1363
1363
|
|
|
1364
|
-
export { type
|
|
1364
|
+
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 };
|
|
@@ -1361,4 +1361,4 @@ declare function defaultShouldDehydrateQuery(query: Query): boolean;
|
|
|
1361
1361
|
declare function dehydrate(client: QueryClient, options?: DehydrateOptions): DehydratedState;
|
|
1362
1362
|
declare function hydrate(client: QueryClient, dehydratedState: unknown, options?: HydrateOptions): void;
|
|
1363
1363
|
|
|
1364
|
-
export { type
|
|
1364
|
+
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 };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { D as DehydrateOptions,
|
|
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-wIUo5Xh0.cjs';
|
|
2
2
|
import './removable.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { D as DehydrateOptions,
|
|
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-CYIcz6o-.js';
|
|
2
2
|
import './removable.js';
|
|
3
3
|
import './subscribable.js';
|
package/build/modern/index.cjs
CHANGED
|
@@ -47,6 +47,7 @@ __export(index_exports, {
|
|
|
47
47
|
noop: () => import_utils.noop,
|
|
48
48
|
notifyManager: () => import_notifyManager.notifyManager,
|
|
49
49
|
onlineManager: () => import_onlineManager.onlineManager,
|
|
50
|
+
partialMatchKey: () => import_utils.partialMatchKey,
|
|
50
51
|
replaceEqualDeep: () => import_utils.replaceEqualDeep,
|
|
51
52
|
shouldThrowError: () => import_utils.shouldThrowError,
|
|
52
53
|
skipToken: () => import_utils.skipToken
|
|
@@ -98,6 +99,7 @@ var import_mutation = require("./mutation.cjs");
|
|
|
98
99
|
noop,
|
|
99
100
|
notifyManager,
|
|
100
101
|
onlineManager,
|
|
102
|
+
partialMatchKey,
|
|
101
103
|
replaceEqualDeep,
|
|
102
104
|
shouldThrowError,
|
|
103
105
|
skipToken,
|
|
@@ -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 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;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,
|
|
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"]}
|
package/build/modern/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
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-wIUo5Xh0.cjs';
|
|
2
2
|
export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.cjs';
|
|
3
3
|
export { InfiniteQueryObserver } from './infiniteQueryObserver.cjs';
|
|
4
4
|
export { defaultScheduler, notifyManager } from './notifyManager.cjs';
|
package/build/modern/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
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-CYIcz6o-.js';
|
|
2
2
|
export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.js';
|
|
3
3
|
export { InfiniteQueryObserver } from './infiniteQueryObserver.js';
|
|
4
4
|
export { defaultScheduler, notifyManager } from './notifyManager.js';
|
package/build/modern/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import { focusManager } from "./focusManager.js";
|
|
|
12
12
|
import { onlineManager } from "./onlineManager.js";
|
|
13
13
|
import {
|
|
14
14
|
hashKey,
|
|
15
|
+
partialMatchKey,
|
|
15
16
|
replaceEqualDeep,
|
|
16
17
|
isServer,
|
|
17
18
|
matchQuery,
|
|
@@ -59,6 +60,7 @@ export {
|
|
|
59
60
|
noop,
|
|
60
61
|
notifyManager,
|
|
61
62
|
onlineManager,
|
|
63
|
+
partialMatchKey,
|
|
62
64
|
replaceEqualDeep,
|
|
63
65
|
shouldThrowError,
|
|
64
66
|
skipToken
|
|
@@ -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 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,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 { 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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ba as QueryBehavior, a8 as InfiniteData, ae as InfiniteQueryPageParamsOptions } from './hydration-wIUo5Xh0.cjs';
|
|
2
2
|
import './removable.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ba as QueryBehavior, a8 as InfiniteData, ae as InfiniteQueryPageParamsOptions } from './hydration-CYIcz6o-.js';
|
|
2
2
|
import './removable.js';
|
|
3
3
|
import './subscribable.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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-wIUo5Xh0.cjs';
|
|
2
2
|
import { Subscribable } from './subscribable.cjs';
|
|
3
3
|
import './removable.cjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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-CYIcz6o-.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 {
|
|
2
|
+
export { bi as Action, z as Mutation, y as MutationState, bj as getDefaultState } from './hydration-wIUo5Xh0.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './removable.js';
|
|
2
|
-
export {
|
|
2
|
+
export { bi as Action, z as Mutation, y as MutationState, bj as getDefaultState } from './hydration-CYIcz6o-.js';
|
|
3
3
|
import './subscribable.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aH as QueryObserverResult, b as QueryClient, ag as QueryObserverOptions, x as Query, c as QueryObserver } from './hydration-wIUo5Xh0.cjs';
|
|
2
2
|
import { Subscribable } from './subscribable.cjs';
|
|
3
3
|
import './removable.cjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aH as QueryObserverResult, b as QueryClient, ag as QueryObserverOptions, x as Query, c as QueryObserver } from './hydration-CYIcz6o-.js';
|
|
2
2
|
import { Subscribable } from './subscribable.js';
|
|
3
3
|
import './removable.js';
|
|
4
4
|
|
package/build/modern/query.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './removable.cjs';
|
|
2
|
-
export {
|
|
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-wIUo5Xh0.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
package/build/modern/query.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './removable.js';
|
|
2
|
-
export {
|
|
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-CYIcz6o-.js';
|
|
3
3
|
import './subscribable.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { C as CancelledError, bC as RetryDelayValue, bB as RetryValue, bA as Retryer, bD as canFetch, bE as createRetryer, o as isCancelledError } from './hydration-
|
|
1
|
+
export { C as CancelledError, bC as RetryDelayValue, bB as RetryValue, bA as Retryer, bD as canFetch, bE as createRetryer, o as isCancelledError } from './hydration-wIUo5Xh0.cjs';
|
|
2
2
|
import './removable.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { C as CancelledError, bC as RetryDelayValue, bB as RetryValue, bA as Retryer, bD as canFetch, bE as createRetryer, o as isCancelledError } from './hydration-
|
|
1
|
+
export { C as CancelledError, bC as RetryDelayValue, bB as RetryValue, bA as Retryer, bD as canFetch, bE as createRetryer, o as isCancelledError } from './hydration-CYIcz6o-.js';
|
|
2
2
|
import './removable.js';
|
|
3
3
|
import './subscribable.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as QueryKey, a1 as QueryFunctionContext, Y as QueryFunction } from './hydration-wIUo5Xh0.cjs';
|
|
2
2
|
import './removable.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/thenable.ts"],"sourcesContent":["/**\n * Thenable types which matches React's types for promises\n *\n * React seemingly uses `.status`, `.value` and `.reason` properties on a promises to optimistically unwrap data from promises\n *\n * @see https://github.com/facebook/react/blob/main/packages/shared/ReactTypes.js#L112-L138\n * @see https://github.com/facebook/react/blob/4f604941569d2e8947ce1460a0b2997e835f37b9/packages/react-debug-tools/src/ReactDebugHooks.js#L224-L227\n */\n\nimport { noop } from './utils'\n\ninterface Fulfilled<T> {\n status: 'fulfilled'\n value: T\n}\ninterface Rejected {\n status: 'rejected'\n reason: unknown\n}\ninterface Pending<T> {\n status: 'pending'\n\n /**\n * Resolve the promise with a value.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n resolve: (value: T) => void\n /**\n * Reject the promise with a reason.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n reject: (reason: unknown) => void\n}\n\nexport type FulfilledThenable<T> = Promise<T> & Fulfilled<T>\nexport type RejectedThenable<T> = Promise<T> & Rejected\nexport type PendingThenable<T> = Promise<T> & Pending<T>\n\nexport type Thenable<T> =\n | FulfilledThenable<T>\n | RejectedThenable<T>\n | PendingThenable<T>\n\nexport function pendingThenable<T>(): PendingThenable<T> {\n let resolve: Pending<T>['resolve']\n let reject: Pending<T>['reject']\n // this could use `Promise.withResolvers()` in the future\n const thenable = new Promise((_resolve, _reject) => {\n resolve = _resolve\n reject = _reject\n }) as PendingThenable<T>\n\n thenable.status = 'pending'\n thenable.catch(() => {\n // prevent unhandled rejection errors\n })\n\n function finalize(data: Fulfilled<T> | Rejected) {\n Object.assign(thenable, data)\n\n // clear pending props props to avoid calling them twice\n delete (thenable as Partial<PendingThenable<T>>).resolve\n delete (thenable as Partial<PendingThenable<T>>).reject\n }\n\n thenable.resolve = (value) => {\n finalize({\n status: 'fulfilled',\n value,\n })\n\n resolve(value)\n }\n thenable.reject = (reason) => {\n finalize({\n status: 'rejected',\n reason,\n })\n\n reject(reason)\n }\n\n return thenable\n}\n\n/**\n * This function takes a Promise-like input and detects whether the data\n * is synchronously available or not.\n *\n * It does not inspect .status, .value or .reason properties of the promise,\n * as those are not always available, and the .status of React's promises\n * should not be considered part of the public API.\n */\nexport function tryResolveSync(promise: Promise<unknown> | Thenable<unknown>) {\n let data: unknown\n\n promise\n .then((result) => {\n data = result\n return result\n })\n // .catch can be unavailable on certain kinds of thenable's\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n ?.catch(noop)\n\n if (data !== undefined) {\n return { data }\n }\n\n return undefined\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,mBAAqB;AAkCd,SAAS,kBAAyC;AACvD,MAAI;AACJ,MAAI;AAEJ,QAAM,WAAW,IAAI,QAAQ,CAAC,UAAU,YAAY;AAClD,cAAU;AACV,aAAS;AAAA,EACX,CAAC;AAED,WAAS,SAAS;AAClB,WAAS,MAAM,MAAM;AAAA,EAErB,CAAC;AAED,WAAS,SAAS,MAA+B;AAC/C,WAAO,OAAO,UAAU,IAAI;AAG5B,WAAQ,SAAyC;AACjD,WAAQ,SAAyC;AAAA,EACnD;AAEA,WAAS,UAAU,CAAC,UAAU;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,YAAQ,KAAK;AAAA,EACf;AACA,WAAS,SAAS,CAAC,WAAW;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AAAA,EACf;AAEA,SAAO;AACT;AAUO,SAAS,eAAe,SAA+C;AAC5E,MAAI;AAEJ,UACG,KAAK,CAAC,WAAW;AAChB,WAAO;AACP,WAAO;AAAA,EACT,
|
|
1
|
+
{"version":3,"sources":["../../src/thenable.ts"],"sourcesContent":["/**\n * Thenable types which matches React's types for promises\n *\n * React seemingly uses `.status`, `.value` and `.reason` properties on a promises to optimistically unwrap data from promises\n *\n * @see https://github.com/facebook/react/blob/main/packages/shared/ReactTypes.js#L112-L138\n * @see https://github.com/facebook/react/blob/4f604941569d2e8947ce1460a0b2997e835f37b9/packages/react-debug-tools/src/ReactDebugHooks.js#L224-L227\n */\n\nimport { noop } from './utils'\n\ninterface Fulfilled<T> {\n status: 'fulfilled'\n value: T\n}\ninterface Rejected {\n status: 'rejected'\n reason: unknown\n}\ninterface Pending<T> {\n status: 'pending'\n\n /**\n * Resolve the promise with a value.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n resolve: (value: T) => void\n /**\n * Reject the promise with a reason.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n reject: (reason: unknown) => void\n}\n\nexport type FulfilledThenable<T> = Promise<T> & Fulfilled<T>\nexport type RejectedThenable<T> = Promise<T> & Rejected\nexport type PendingThenable<T> = Promise<T> & Pending<T>\n\nexport type Thenable<T> =\n | FulfilledThenable<T>\n | RejectedThenable<T>\n | PendingThenable<T>\n\nexport function pendingThenable<T>(): PendingThenable<T> {\n let resolve: Pending<T>['resolve']\n let reject: Pending<T>['reject']\n // this could use `Promise.withResolvers()` in the future\n const thenable = new Promise((_resolve, _reject) => {\n resolve = _resolve\n reject = _reject\n }) as PendingThenable<T>\n\n thenable.status = 'pending'\n thenable.catch(() => {\n // prevent unhandled rejection errors\n })\n\n function finalize(data: Fulfilled<T> | Rejected) {\n Object.assign(thenable, data)\n\n // clear pending props props to avoid calling them twice\n delete (thenable as Partial<PendingThenable<T>>).resolve\n delete (thenable as Partial<PendingThenable<T>>).reject\n }\n\n thenable.resolve = (value) => {\n finalize({\n status: 'fulfilled',\n value,\n })\n\n resolve(value)\n }\n thenable.reject = (reason) => {\n finalize({\n status: 'rejected',\n reason,\n })\n\n reject(reason)\n }\n\n return thenable\n}\n\n/**\n * This function takes a Promise-like input and detects whether the data\n * is synchronously available or not.\n *\n * It does not inspect .status, .value or .reason properties of the promise,\n * as those are not always available, and the .status of React's promises\n * should not be considered part of the public API.\n */\nexport function tryResolveSync(promise: Promise<unknown> | Thenable<unknown>) {\n let data: unknown\n\n promise\n .then((result) => {\n data = result\n return result\n }, noop)\n // .catch can be unavailable on certain kinds of thenable's\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n ?.catch(noop)\n\n if (data !== undefined) {\n return { data }\n }\n\n return undefined\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,mBAAqB;AAkCd,SAAS,kBAAyC;AACvD,MAAI;AACJ,MAAI;AAEJ,QAAM,WAAW,IAAI,QAAQ,CAAC,UAAU,YAAY;AAClD,cAAU;AACV,aAAS;AAAA,EACX,CAAC;AAED,WAAS,SAAS;AAClB,WAAS,MAAM,MAAM;AAAA,EAErB,CAAC;AAED,WAAS,SAAS,MAA+B;AAC/C,WAAO,OAAO,UAAU,IAAI;AAG5B,WAAQ,SAAyC;AACjD,WAAQ,SAAyC;AAAA,EACnD;AAEA,WAAS,UAAU,CAAC,UAAU;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,YAAQ,KAAK;AAAA,EACf;AACA,WAAS,SAAS,CAAC,WAAW;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AAAA,EACf;AAEA,SAAO;AACT;AAUO,SAAS,eAAe,SAA+C;AAC5E,MAAI;AAEJ,UACG,KAAK,CAAC,WAAW;AAChB,WAAO;AACP,WAAO;AAAA,EACT,GAAG,iBAAI,GAGL,MAAM,iBAAI;AAEd,MAAI,SAAS,QAAW;AACtB,WAAO,EAAE,KAAK;AAAA,EAChB;AAEA,SAAO;AACT;","names":[]}
|
package/build/modern/thenable.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/thenable.ts"],"sourcesContent":["/**\n * Thenable types which matches React's types for promises\n *\n * React seemingly uses `.status`, `.value` and `.reason` properties on a promises to optimistically unwrap data from promises\n *\n * @see https://github.com/facebook/react/blob/main/packages/shared/ReactTypes.js#L112-L138\n * @see https://github.com/facebook/react/blob/4f604941569d2e8947ce1460a0b2997e835f37b9/packages/react-debug-tools/src/ReactDebugHooks.js#L224-L227\n */\n\nimport { noop } from './utils'\n\ninterface Fulfilled<T> {\n status: 'fulfilled'\n value: T\n}\ninterface Rejected {\n status: 'rejected'\n reason: unknown\n}\ninterface Pending<T> {\n status: 'pending'\n\n /**\n * Resolve the promise with a value.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n resolve: (value: T) => void\n /**\n * Reject the promise with a reason.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n reject: (reason: unknown) => void\n}\n\nexport type FulfilledThenable<T> = Promise<T> & Fulfilled<T>\nexport type RejectedThenable<T> = Promise<T> & Rejected\nexport type PendingThenable<T> = Promise<T> & Pending<T>\n\nexport type Thenable<T> =\n | FulfilledThenable<T>\n | RejectedThenable<T>\n | PendingThenable<T>\n\nexport function pendingThenable<T>(): PendingThenable<T> {\n let resolve: Pending<T>['resolve']\n let reject: Pending<T>['reject']\n // this could use `Promise.withResolvers()` in the future\n const thenable = new Promise((_resolve, _reject) => {\n resolve = _resolve\n reject = _reject\n }) as PendingThenable<T>\n\n thenable.status = 'pending'\n thenable.catch(() => {\n // prevent unhandled rejection errors\n })\n\n function finalize(data: Fulfilled<T> | Rejected) {\n Object.assign(thenable, data)\n\n // clear pending props props to avoid calling them twice\n delete (thenable as Partial<PendingThenable<T>>).resolve\n delete (thenable as Partial<PendingThenable<T>>).reject\n }\n\n thenable.resolve = (value) => {\n finalize({\n status: 'fulfilled',\n value,\n })\n\n resolve(value)\n }\n thenable.reject = (reason) => {\n finalize({\n status: 'rejected',\n reason,\n })\n\n reject(reason)\n }\n\n return thenable\n}\n\n/**\n * This function takes a Promise-like input and detects whether the data\n * is synchronously available or not.\n *\n * It does not inspect .status, .value or .reason properties of the promise,\n * as those are not always available, and the .status of React's promises\n * should not be considered part of the public API.\n */\nexport function tryResolveSync(promise: Promise<unknown> | Thenable<unknown>) {\n let data: unknown\n\n promise\n .then((result) => {\n data = result\n return result\n })\n // .catch can be unavailable on certain kinds of thenable's\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n ?.catch(noop)\n\n if (data !== undefined) {\n return { data }\n }\n\n return undefined\n}\n"],"mappings":";AASA,SAAS,YAAY;AAkCd,SAAS,kBAAyC;AACvD,MAAI;AACJ,MAAI;AAEJ,QAAM,WAAW,IAAI,QAAQ,CAAC,UAAU,YAAY;AAClD,cAAU;AACV,aAAS;AAAA,EACX,CAAC;AAED,WAAS,SAAS;AAClB,WAAS,MAAM,MAAM;AAAA,EAErB,CAAC;AAED,WAAS,SAAS,MAA+B;AAC/C,WAAO,OAAO,UAAU,IAAI;AAG5B,WAAQ,SAAyC;AACjD,WAAQ,SAAyC;AAAA,EACnD;AAEA,WAAS,UAAU,CAAC,UAAU;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,YAAQ,KAAK;AAAA,EACf;AACA,WAAS,SAAS,CAAC,WAAW;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AAAA,EACf;AAEA,SAAO;AACT;AAUO,SAAS,eAAe,SAA+C;AAC5E,MAAI;AAEJ,UACG,KAAK,CAAC,WAAW;AAChB,WAAO;AACP,WAAO;AAAA,EACT,
|
|
1
|
+
{"version":3,"sources":["../../src/thenable.ts"],"sourcesContent":["/**\n * Thenable types which matches React's types for promises\n *\n * React seemingly uses `.status`, `.value` and `.reason` properties on a promises to optimistically unwrap data from promises\n *\n * @see https://github.com/facebook/react/blob/main/packages/shared/ReactTypes.js#L112-L138\n * @see https://github.com/facebook/react/blob/4f604941569d2e8947ce1460a0b2997e835f37b9/packages/react-debug-tools/src/ReactDebugHooks.js#L224-L227\n */\n\nimport { noop } from './utils'\n\ninterface Fulfilled<T> {\n status: 'fulfilled'\n value: T\n}\ninterface Rejected {\n status: 'rejected'\n reason: unknown\n}\ninterface Pending<T> {\n status: 'pending'\n\n /**\n * Resolve the promise with a value.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n resolve: (value: T) => void\n /**\n * Reject the promise with a reason.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n reject: (reason: unknown) => void\n}\n\nexport type FulfilledThenable<T> = Promise<T> & Fulfilled<T>\nexport type RejectedThenable<T> = Promise<T> & Rejected\nexport type PendingThenable<T> = Promise<T> & Pending<T>\n\nexport type Thenable<T> =\n | FulfilledThenable<T>\n | RejectedThenable<T>\n | PendingThenable<T>\n\nexport function pendingThenable<T>(): PendingThenable<T> {\n let resolve: Pending<T>['resolve']\n let reject: Pending<T>['reject']\n // this could use `Promise.withResolvers()` in the future\n const thenable = new Promise((_resolve, _reject) => {\n resolve = _resolve\n reject = _reject\n }) as PendingThenable<T>\n\n thenable.status = 'pending'\n thenable.catch(() => {\n // prevent unhandled rejection errors\n })\n\n function finalize(data: Fulfilled<T> | Rejected) {\n Object.assign(thenable, data)\n\n // clear pending props props to avoid calling them twice\n delete (thenable as Partial<PendingThenable<T>>).resolve\n delete (thenable as Partial<PendingThenable<T>>).reject\n }\n\n thenable.resolve = (value) => {\n finalize({\n status: 'fulfilled',\n value,\n })\n\n resolve(value)\n }\n thenable.reject = (reason) => {\n finalize({\n status: 'rejected',\n reason,\n })\n\n reject(reason)\n }\n\n return thenable\n}\n\n/**\n * This function takes a Promise-like input and detects whether the data\n * is synchronously available or not.\n *\n * It does not inspect .status, .value or .reason properties of the promise,\n * as those are not always available, and the .status of React's promises\n * should not be considered part of the public API.\n */\nexport function tryResolveSync(promise: Promise<unknown> | Thenable<unknown>) {\n let data: unknown\n\n promise\n .then((result) => {\n data = result\n return result\n }, noop)\n // .catch can be unavailable on certain kinds of thenable's\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n ?.catch(noop)\n\n if (data !== undefined) {\n return { data }\n }\n\n return undefined\n}\n"],"mappings":";AASA,SAAS,YAAY;AAkCd,SAAS,kBAAyC;AACvD,MAAI;AACJ,MAAI;AAEJ,QAAM,WAAW,IAAI,QAAQ,CAAC,UAAU,YAAY;AAClD,cAAU;AACV,aAAS;AAAA,EACX,CAAC;AAED,WAAS,SAAS;AAClB,WAAS,MAAM,MAAM;AAAA,EAErB,CAAC;AAED,WAAS,SAAS,MAA+B;AAC/C,WAAO,OAAO,UAAU,IAAI;AAG5B,WAAQ,SAAyC;AACjD,WAAQ,SAAyC;AAAA,EACnD;AAEA,WAAS,UAAU,CAAC,UAAU;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,YAAQ,KAAK;AAAA,EACf;AACA,WAAS,SAAS,CAAC,WAAW;AAC5B,aAAS;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AAAA,EACf;AAEA,SAAO;AACT;AAUO,SAAS,eAAe,SAA+C;AAC5E,MAAI;AAEJ,UACG,KAAK,CAAC,WAAW;AAChB,WAAO;AACP,WAAO;AAAA,EACT,GAAG,IAAI,GAGL,MAAM,IAAI;AAEd,MAAI,SAAS,QAAW;AACtB,WAAO,EAAE,KAAK;AAAA,EAChB;AAEA,SAAO;AACT;","names":[]}
|
package/build/modern/types.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { T as AnyDataTag, b6 as CancelOptions, V as DataTag, G as DefaultError, b5 as DefaultOptions, ak as DefaultedInfiniteQueryObserverOptions, ai as DefaultedQueryObserverOptions, aP as DefinedInfiniteQueryObserverResult, aG as DefinedQueryObserverResult, 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, 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, aV as MutationFunction, aR as MutationKey, aU as MutationMeta, 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, 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, b4 as QueryClientConfig, Y as QueryFunction, a1 as QueryFunctionContext, I as QueryKey, a5 as QueryKeyHashFunction, a9 as QueryMeta, 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, ax as QueryStatus, aq as RefetchOptions, as as RefetchQueryFilters, R as Register, au as ResetOptions, ap as ResultOptions, b7 as SetDataOptions, Z as StaleTime, _ as StaleTimeFunction, af as ThrowOnError, P as UnsetMarker, ah as WithRequired, K as dataTagErrorSymbol, J as dataTagSymbol, L as unsetMarker } from './hydration-wIUo5Xh0.cjs';
|
|
2
2
|
import './removable.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
package/build/modern/types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { T as AnyDataTag, b6 as CancelOptions, V as DataTag, G as DefaultError, b5 as DefaultOptions, ak as DefaultedInfiniteQueryObserverOptions, ai as DefaultedQueryObserverOptions, aP as DefinedInfiniteQueryObserverResult, aG as DefinedQueryObserverResult, 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, 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, aV as MutationFunction, aR as MutationKey, aU as MutationMeta, 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, 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, b4 as QueryClientConfig, Y as QueryFunction, a1 as QueryFunctionContext, I as QueryKey, a5 as QueryKeyHashFunction, a9 as QueryMeta, 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, ax as QueryStatus, aq as RefetchOptions, as as RefetchQueryFilters, R as Register, au as ResetOptions, ap as ResultOptions, b7 as SetDataOptions, Z as StaleTime, _ as StaleTimeFunction, af as ThrowOnError, P as UnsetMarker, ah as WithRequired, K as dataTagErrorSymbol, J as dataTagSymbol, L as unsetMarker } from './hydration-CYIcz6o-.js';
|
|
2
2
|
import './removable.js';
|
|
3
3
|
import './subscribable.js';
|
package/build/modern/utils.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { j as MutationFilters, l as QueryFilters,
|
|
1
|
+
export { j as MutationFilters, l as QueryFilters, bk as QueryTypeFilter, S as SkipToken, U as Updater, bw as addToEnd, bx as addToStart, by as ensureQueryFn, bl as functionalUpdate, h as hashKey, bq as hashQueryKeyByOptions, bs as isPlainArray, bt as isPlainObject, i as isServer, bm as isValidTimeout, k as keepPreviousData, f as matchMutation, m as matchQuery, n as noop, p as partialMatchKey, bv as replaceData, r as replaceEqualDeep, bp as resolveEnabled, bo as resolveStaleTime, br as shallowEqualObjects, g as shouldThrowError, s as skipToken, bu as sleep, bn as timeUntilStale } from './hydration-wIUo5Xh0.cjs';
|
|
2
2
|
import './removable.cjs';
|
|
3
3
|
import './subscribable.cjs';
|
package/build/modern/utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { j as MutationFilters, l as QueryFilters,
|
|
1
|
+
export { j as MutationFilters, l as QueryFilters, bk as QueryTypeFilter, S as SkipToken, U as Updater, bw as addToEnd, bx as addToStart, by as ensureQueryFn, bl as functionalUpdate, h as hashKey, bq as hashQueryKeyByOptions, bs as isPlainArray, bt as isPlainObject, i as isServer, bm as isValidTimeout, k as keepPreviousData, f as matchMutation, m as matchQuery, n as noop, p as partialMatchKey, bv as replaceData, r as replaceEqualDeep, bp as resolveEnabled, bo as resolveStaleTime, br as shallowEqualObjects, g as shouldThrowError, s as skipToken, bu as sleep, bn as timeUntilStale } from './hydration-CYIcz6o-.js';
|
|
2
2
|
import './removable.js';
|
|
3
3
|
import './subscribable.js';
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/thenable.ts
CHANGED
|
@@ -98,7 +98,7 @@ export function tryResolveSync(promise: Promise<unknown> | Thenable<unknown>) {
|
|
|
98
98
|
.then((result) => {
|
|
99
99
|
data = result
|
|
100
100
|
return result
|
|
101
|
-
})
|
|
101
|
+
}, noop)
|
|
102
102
|
// .catch can be unavailable on certain kinds of thenable's
|
|
103
103
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
104
104
|
?.catch(noop)
|