@askrjs/askr 0.0.91 → 0.0.94
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/CHANGELOG.md +3 -0
- package/dist/{access-Dpfoi4cA.js → access-d_DCdwqn.js} +8 -2
- package/dist/actions/index.d.ts +1 -1
- package/dist/actions/index.js +4 -3
- package/dist/{activity-dKH6nlpj.js → activity-BshyLB3_.js} +9 -5
- package/dist/{activity-CF2_JvJs.d.ts → activity-CJIQyo5X.d.ts} +5 -1
- package/dist/benchmark.d.ts +1 -1
- package/dist/benchmark.js +8 -8
- package/dist/boot/index.d.ts +12 -4
- package/dist/boot/index.js +1 -1
- package/dist/{boot-D3zVVWuN.js → boot-BsMB_ySP.js} +34 -22
- package/dist/{cleanup-c837KVij.js → cleanup-DefafSjG.js} +8 -5
- package/dist/{component-cleanup-BUfUleGZ.js → component-cleanup-hrqSikl2.js} +3 -3
- package/dist/{component-internal-C4uwwUaK.js → component-internal-DOVVMjG7.js} +8 -6
- package/dist/{component-scope-DzJEbYGE.js → component-scope-4I3yEMkb.js} +13 -1
- package/dist/components/index.d.ts +7 -2
- package/dist/components/index.js +2 -2
- package/dist/{compose-ref-Cc_YkUpM.js → compose-ref-1Fhs7mbF.js} +13 -0
- package/dist/{compose-ref-Cizq72-x.d.ts → compose-ref-DOJHoW5X.d.ts} +3 -0
- package/dist/control/index.d.ts +1 -1
- package/dist/control/index.js +1 -1
- package/dist/{control-CsGs2bLS.d.ts → control-DdFw-Caz.d.ts} +1 -1
- package/dist/{control-CON10J1p.js → control-DqOzkgc7.js} +9 -5
- package/dist/{csp-nonce-DH0TrDij.js → csp-nonce-BBxq1zq4.js} +8 -1
- package/dist/data/index.d.ts +1 -2
- package/dist/data/index.js +3 -3
- package/dist/{data-Bh_3OETq.js → data-DYqokZzc.js} +23 -12
- package/dist/{data-runtime-wbooGyu7.js → data-runtime-JxoRgrrt.js} +3 -1
- package/dist/{deferred-D6nZaIPs.js → deferred-BS0Xpstg.js} +10 -5
- package/dist/{effect-lnxQIpJG.js → effect-BdvdgMvV.js} +73 -14
- package/dist/{fastlane-CrfB3QG0.js → fastlane-DGo7SxBQ.js} +23 -4
- package/dist/{for-internal-Bsm0B8GZ.js → for-internal-jrliHZmF.js} +6 -6
- package/dist/foundations/icon/index.d.ts +14 -3
- package/dist/foundations/icon/index.js +8 -0
- package/dist/foundations/index.d.ts +2 -2
- package/dist/foundations/index.js +1 -1
- package/dist/foundations/interactions/index.d.ts +18 -2
- package/dist/foundations/interactions/index.js +1 -1
- package/dist/foundations/state/index.d.ts +8 -1
- package/dist/foundations/state/index.js +7 -1
- package/dist/foundations/structures/index.d.ts +2 -2
- package/dist/foundations/structures/index.js +1 -1
- package/dist/foundations/utilities/index.d.ts +2 -2
- package/dist/foundations/utilities/index.js +1 -1
- package/dist/fx/index.d.ts +10 -1
- package/dist/fx/index.js +8 -2
- package/dist/{index-Cf2ANwPL.d.ts → index-C29SEGIv.d.ts} +30 -3
- package/dist/{index-BnU0NPwM.d.ts → index-CzH-0LcA.d.ts} +18 -0
- package/dist/index-KQ7Vl4-8.d.ts +1364 -0
- package/dist/index.d.ts +3 -7
- package/dist/index.js +34 -18
- package/dist/{interactions-CWkNEq_C.js → interactions-B4XaFxt1.js} +6 -1
- package/dist/{jsx-C3IECePB.js → jsx-DRS-qjiN.js} +2 -0
- package/dist/jsx-dev-runtime.d.ts +2 -3
- package/dist/jsx-dev-runtime.js +1 -1
- package/dist/jsx-runtime-BTzDdBJ_.d.ts +2 -0
- package/dist/{jsx-runtime-LHh5tcTe.d.ts → jsx-runtime-Cdd6Gkb0.d.ts} +4 -3
- package/dist/jsx-runtime.d.ts +2 -2
- package/dist/jsx-runtime.js +1 -1
- package/dist/{lifecycle-batch-Dfpid9-A.js → lifecycle-batch-BH0fax4F.js} +2 -2
- package/dist/{lifecycle-operations-CMK1AN2C.js → lifecycle-operations-Qxq6ABrC.js} +7 -2
- package/dist/{manifest-fBb2ynKL.js → manifest-D6rfj_jC.js} +5 -1
- package/dist/{navigate-BO7M2iUG.d.ts → navigate-BL_FIIJ6.d.ts} +6 -1
- package/dist/{navigate-CnQMXze1.js → navigate-CECCMPAr.js} +16 -11
- package/dist/{query-registry-B4LpVtlT.js → query-registry-CimB1YeW.js} +11 -1
- package/dist/{readable-B5NtV7V0.js → readable-BsdGWsDE.js} +9 -6
- package/dist/{renderer-y2DL627q.js → renderer-CLvq458M.js} +235 -189
- package/dist/{resolution-C9A31xQi.js → resolution-D8PgnTzh.js} +12 -6
- package/dist/{resource-operation-whZDJAYv.js → resource-operation-CLQXCn1p.js} +5 -5
- package/dist/resources/index.d.ts +15 -2
- package/dist/resources/index.js +7 -6
- package/dist/{route-matching-xlgdQXg_.js → route-matching-Bo6UqG-5.js} +13 -4
- package/dist/router/index.d.ts +46 -6
- package/dist/router/index.js +16 -9
- package/dist/{selector-BLNkRZ2i.js → selector-CyK-sDwB.js} +24 -6
- package/dist/ssg/index.d.ts +5 -2
- package/dist/ssg/index.js +6 -6
- package/dist/ssr/index.d.ts +16 -5
- package/dist/ssr/index.js +1 -1
- package/dist/{ssr-DNJUPmMq.js → ssr-8_vHDWqV.js} +20 -12
- package/dist/{state-DCjONcHK.js → state-DmkGM_LN.js} +5 -5
- package/dist/{structures-m-cphWI-.js → structures-umvVUD-M.js} +20 -6
- package/dist/testing/index.d.ts +31 -3
- package/dist/testing/index.js +24 -6
- package/dist/{jsx-BYXe_Nnk.d.ts → types-DkVJhVs9.d.ts} +20 -0
- package/dist/{verify-hydration-D8938Fw2.js → verify-hydration-jf8X2V3x.js} +1 -1
- package/package.json +1 -1
- package/dist/control-D-FIa-n-.d.ts +0 -451
- package/dist/index-BU17hud9.d.ts +0 -52
- package/dist/index-CPlPDbEY.d.ts +0 -64
- package/dist/index-Izwp_ESC.d.ts +0 -458
- package/dist/jsx-runtime-BqhMEuT4.d.ts +0 -2
- package/dist/scheduler-CmLO4Dfm.d.ts +0 -65
- package/dist/types-CsPtBGWb.d.ts +0 -16
- package/dist/types-iAmDSV6o.d.ts +0 -179
package/dist/types-iAmDSV6o.d.ts
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
//#region src/data/types.d.ts
|
|
2
|
-
type QueryConsistency = 'fresh' | 'stale' | 'refreshing' | 'pending-write';
|
|
3
|
-
type QueryStaleReason = 'aborted' | 'error' | 'inconsistent';
|
|
4
|
-
interface DataRuntime {
|
|
5
|
-
readonly queryCache: Map<string, unknown>;
|
|
6
|
-
readonly queryData: Map<string, unknown>;
|
|
7
|
-
/** Test-only query overrides keyed by the canonical query key. */
|
|
8
|
-
readonly queryTestOverrides: Map<string, unknown>;
|
|
9
|
-
/** Test-only mutation overrides keyed by the canonical mutation key. */
|
|
10
|
-
readonly mutationTestOverrides: Map<string, unknown>;
|
|
11
|
-
}
|
|
12
|
-
interface DataRuntimeOptions {
|
|
13
|
-
queryCache?: Map<string, unknown>;
|
|
14
|
-
queryData?: Map<string, unknown>;
|
|
15
|
-
queryTestOverrides?: Map<string, unknown>;
|
|
16
|
-
mutationTestOverrides?: Map<string, unknown>;
|
|
17
|
-
}
|
|
18
|
-
interface QueryDefinition<TInput, TResult extends {}> {
|
|
19
|
-
readonly key: (input: TInput) => string;
|
|
20
|
-
readonly fetch: (context: TInput & {
|
|
21
|
-
signal: AbortSignal;
|
|
22
|
-
}) => Promise<TResult>;
|
|
23
|
-
readonly isConsistent?: (data: TResult) => boolean;
|
|
24
|
-
readonly reconcile?: (data: TResult, context: {
|
|
25
|
-
key: string;
|
|
26
|
-
}) => Promise<boolean> | boolean;
|
|
27
|
-
}
|
|
28
|
-
interface QueryPrefetchContext {
|
|
29
|
-
readonly runtime: DataRuntime;
|
|
30
|
-
readonly request?: Request;
|
|
31
|
-
readonly signal: AbortSignal;
|
|
32
|
-
readonly mode: 'ssr' | 'spa';
|
|
33
|
-
prefetch<TInput, TResult extends {}>(query: QueryDefinition<TInput, TResult>, input: TInput): Promise<boolean>;
|
|
34
|
-
}
|
|
35
|
-
type ServerQueryHandler<TInput, TResult extends {}> = (context: {
|
|
36
|
-
input: TInput;
|
|
37
|
-
request?: Request;
|
|
38
|
-
signal: AbortSignal;
|
|
39
|
-
}) => Promise<TResult> | TResult;
|
|
40
|
-
interface InvalidateOptions {
|
|
41
|
-
markPendingWrite?: boolean;
|
|
42
|
-
runtime?: DataRuntime;
|
|
43
|
-
}
|
|
44
|
-
interface InvalidateOnIntervalOptions extends InvalidateOptions {
|
|
45
|
-
intervalMs: number;
|
|
46
|
-
activeOn?: string | readonly string[];
|
|
47
|
-
visibleOnly?: boolean;
|
|
48
|
-
focusedOnly?: boolean;
|
|
49
|
-
}
|
|
50
|
-
type QueryKeyPart = string | number | boolean | null | undefined | readonly QueryKeyPart[] | {
|
|
51
|
-
readonly [key: string]: QueryKeyPart;
|
|
52
|
-
};
|
|
53
|
-
interface QueryScope {
|
|
54
|
-
key(...parts: QueryKeyPart[]): string;
|
|
55
|
-
prefix(...parts: QueryKeyPart[]): string;
|
|
56
|
-
invalidate(parts: readonly QueryKeyPart[], options?: InvalidateOptions): void;
|
|
57
|
-
}
|
|
58
|
-
type QueryControls = {
|
|
59
|
-
refresh(): Promise<void>;
|
|
60
|
-
};
|
|
61
|
-
type QueryLoading = {
|
|
62
|
-
data: null;
|
|
63
|
-
error: null;
|
|
64
|
-
loading: true;
|
|
65
|
-
refreshing: false;
|
|
66
|
-
stale: false;
|
|
67
|
-
consistency: 'fresh';
|
|
68
|
-
staleReason: null;
|
|
69
|
-
};
|
|
70
|
-
type QueryFresh<T> = {
|
|
71
|
-
data: T;
|
|
72
|
-
error: null;
|
|
73
|
-
loading: false;
|
|
74
|
-
refreshing: false;
|
|
75
|
-
stale: false;
|
|
76
|
-
consistency: 'fresh';
|
|
77
|
-
staleReason: null;
|
|
78
|
-
};
|
|
79
|
-
type QueryRefreshing<T> = {
|
|
80
|
-
data: T;
|
|
81
|
-
error: null;
|
|
82
|
-
loading: false;
|
|
83
|
-
refreshing: true;
|
|
84
|
-
stale: true;
|
|
85
|
-
consistency: 'refreshing';
|
|
86
|
-
staleReason: null;
|
|
87
|
-
};
|
|
88
|
-
type QueryPendingWrite<T> = {
|
|
89
|
-
data: T;
|
|
90
|
-
error: null;
|
|
91
|
-
loading: false;
|
|
92
|
-
refreshing: true;
|
|
93
|
-
stale: true;
|
|
94
|
-
consistency: 'pending-write';
|
|
95
|
-
staleReason: null;
|
|
96
|
-
};
|
|
97
|
-
type QueryStaleValue<T> = {
|
|
98
|
-
data: T;
|
|
99
|
-
error: null;
|
|
100
|
-
loading: false;
|
|
101
|
-
refreshing: false;
|
|
102
|
-
stale: true;
|
|
103
|
-
consistency: 'stale';
|
|
104
|
-
staleReason: 'aborted' | 'inconsistent';
|
|
105
|
-
};
|
|
106
|
-
type QueryStaleErrorWithValue<T> = {
|
|
107
|
-
data: T;
|
|
108
|
-
error: {};
|
|
109
|
-
loading: false;
|
|
110
|
-
refreshing: false;
|
|
111
|
-
stale: true;
|
|
112
|
-
consistency: 'stale';
|
|
113
|
-
staleReason: 'error';
|
|
114
|
-
};
|
|
115
|
-
type QueryStaleError = {
|
|
116
|
-
data: null;
|
|
117
|
-
error: {};
|
|
118
|
-
loading: false;
|
|
119
|
-
refreshing: false;
|
|
120
|
-
stale: true;
|
|
121
|
-
consistency: 'stale';
|
|
122
|
-
staleReason: 'error';
|
|
123
|
-
};
|
|
124
|
-
type Query<T extends {}> = QueryControls & (QueryLoading | QueryFresh<T> | QueryRefreshing<T> | QueryPendingWrite<T> | QueryStaleValue<T> | QueryStaleErrorWithValue<T> | QueryStaleError);
|
|
125
|
-
type MutationControls<TInput, TResult> = {
|
|
126
|
-
execute(input: TInput): Promise<TResult>;
|
|
127
|
-
abort(): void;
|
|
128
|
-
reset(): void;
|
|
129
|
-
};
|
|
130
|
-
type MutationIdle = {
|
|
131
|
-
status: 'idle';
|
|
132
|
-
pending: false;
|
|
133
|
-
error: null;
|
|
134
|
-
result: null;
|
|
135
|
-
};
|
|
136
|
-
type MutationPending = {
|
|
137
|
-
status: 'pending';
|
|
138
|
-
pending: true;
|
|
139
|
-
error: null;
|
|
140
|
-
result: null;
|
|
141
|
-
};
|
|
142
|
-
type MutationSuccess<TResult> = {
|
|
143
|
-
status: 'success';
|
|
144
|
-
pending: false;
|
|
145
|
-
error: null;
|
|
146
|
-
result: TResult;
|
|
147
|
-
};
|
|
148
|
-
type MutationError = {
|
|
149
|
-
status: 'error';
|
|
150
|
-
pending: false;
|
|
151
|
-
error: {};
|
|
152
|
-
result: null;
|
|
153
|
-
};
|
|
154
|
-
type Mutation<TInput, TResult> = MutationControls<TInput, TResult> & (MutationIdle | MutationPending | MutationSuccess<TResult> | MutationError);
|
|
155
|
-
type QueryOptions<T> = {
|
|
156
|
-
key: string;
|
|
157
|
-
fetch: (ctx: {
|
|
158
|
-
signal: AbortSignal;
|
|
159
|
-
}) => Promise<T>;
|
|
160
|
-
isConsistent?: (data: T) => boolean;
|
|
161
|
-
reconcile?: (data: T, ctx: {
|
|
162
|
-
key: string;
|
|
163
|
-
}) => Promise<boolean> | boolean;
|
|
164
|
-
runtime?: DataRuntime;
|
|
165
|
-
initialData?: T;
|
|
166
|
-
skipInitialFetch?: boolean;
|
|
167
|
-
};
|
|
168
|
-
type MutationOptions<TInput, TResult> = {
|
|
169
|
-
/** Stable identity used by runtime-scoped mutation test overrides. */
|
|
170
|
-
key?: string;
|
|
171
|
-
action: (input: TInput, ctx: {
|
|
172
|
-
signal: AbortSignal;
|
|
173
|
-
}) => Promise<TResult>;
|
|
174
|
-
affects?: (input: TInput, result: TResult) => string[];
|
|
175
|
-
afterSuccess?: 'invalidate';
|
|
176
|
-
runtime?: DataRuntime;
|
|
177
|
-
};
|
|
178
|
-
//#endregion
|
|
179
|
-
export { Mutation as a, QueryConsistency as c, QueryOptions as d, QueryPrefetchContext as f, ServerQueryHandler as h, InvalidateOptions as i, QueryDefinition as l, QueryStaleReason as m, DataRuntimeOptions as n, MutationOptions as o, QueryScope as p, InvalidateOnIntervalOptions as r, Query as s, DataRuntime as t, QueryKeyPart as u };
|