@markless/serializer 0.3.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/decode-client.d.ts +4 -5
- package/dist/decode-client.js +2 -1
- package/dist/decode.d.ts +2 -2
- package/dist/decode.js +1 -0
- package/dist/index.d.ts +34 -26
- package/dist/index.js +72 -5
- package/dist/protocol-B3YIo3hD.d.ts +647 -0
- package/dist/protocol-BbWeZfik.js +91 -0
- package/dist/{protocol-validation-storage-DogbS8xp.d.ts → protocol-validation-storage-C9YES3Zy.d.ts} +1 -2
- package/dist/{protocol-validation-storage-BQ8D2S5j.js → protocol-validation-storage-DhyQ9fEO.js} +162 -8
- package/dist/protocol-validation.d.ts +1 -1
- package/dist/protocol-validation.js +1 -1
- package/dist/protocol.d.ts +2 -2
- package/dist/protocol.js +2 -2
- package/dist/{value-BJ6YNKDd.d.ts → value-CRkHmkRz.d.ts} +17 -1
- package/package.json +1 -1
- package/dist/protocol-BX4yw9bm.js +0 -31
- package/dist/protocol-BfzeLgjZ.d.ts +0 -288
- /package/dist/{value-decode-extensions-Bf-pgKHA.js → value-decode-extensions-xfgotsAg.js} +0 -0
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
//#region src/async-boundary-arm.d.ts
|
|
2
|
-
declare const ASYNC_BOUNDARY_ARM: {
|
|
3
|
-
readonly try: 0;
|
|
4
|
-
readonly pending: 1;
|
|
5
|
-
readonly catch: 2;
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
//#region src/protocol-constants.d.ts
|
|
9
|
-
declare const ASYNC_PROTOCOL_VERSION = 1;
|
|
10
|
-
declare const STORAGE_PROTOCOL_VERSION = 2;
|
|
11
|
-
declare function protocolStateVersion(storage: readonly unknown[] | undefined): typeof ASYNC_PROTOCOL_VERSION | typeof STORAGE_PROTOCOL_VERSION;
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/protocol.d.ts
|
|
14
|
-
type ProtocolAsyncBoundaryArm = (typeof ASYNC_BOUNDARY_ARM)[keyof typeof ASYNC_BOUNDARY_ARM];
|
|
15
|
-
type ProtocolSyncPolicyCondition = {
|
|
16
|
-
readonly type: 'and';
|
|
17
|
-
readonly conditions: ReadonlyArray<ProtocolSyncPolicyCondition>;
|
|
18
|
-
} | {
|
|
19
|
-
readonly type: 'or';
|
|
20
|
-
readonly conditions: ReadonlyArray<ProtocolSyncPolicyCondition>;
|
|
21
|
-
} | {
|
|
22
|
-
readonly type: 'not';
|
|
23
|
-
readonly condition: ProtocolSyncPolicyCondition;
|
|
24
|
-
} | {
|
|
25
|
-
readonly type: 'graph-truthy';
|
|
26
|
-
readonly graphNodeId: string;
|
|
27
|
-
readonly path?: ReadonlyArray<string>;
|
|
28
|
-
} | {
|
|
29
|
-
readonly type: 'constant-truthy';
|
|
30
|
-
readonly value: unknown;
|
|
31
|
-
} | {
|
|
32
|
-
readonly type: 'event-equals';
|
|
33
|
-
readonly field: string;
|
|
34
|
-
readonly value: unknown;
|
|
35
|
-
};
|
|
36
|
-
type ProtocolSyncPolicyBranch = {
|
|
37
|
-
readonly when: ProtocolSyncPolicyCondition;
|
|
38
|
-
readonly actions: ReadonlyArray<'preventDefault' | 'stopPropagation'>;
|
|
39
|
-
};
|
|
40
|
-
type ProtocolSyncPolicy = ProtocolSyncPolicyBranch | {
|
|
41
|
-
readonly branches: ReadonlyArray<ProtocolSyncPolicyBranch>;
|
|
42
|
-
};
|
|
43
|
-
declare const PROTOCOL_EVENT_ACTION_KIND: {
|
|
44
|
-
readonly event: "event";
|
|
45
|
-
readonly externalDelegate: "external-delegate";
|
|
46
|
-
};
|
|
47
|
-
type ProtocolEventActionKind = (typeof PROTOCOL_EVENT_ACTION_KIND)[keyof typeof PROTOCOL_EVENT_ACTION_KIND];
|
|
48
|
-
type ProtocolEventAction = {
|
|
49
|
-
readonly kind: typeof PROTOCOL_EVENT_ACTION_KIND.externalDelegate;
|
|
50
|
-
readonly owner: string;
|
|
51
|
-
};
|
|
52
|
-
type ProtocolEventRecord = {
|
|
53
|
-
readonly hostNodeId: string;
|
|
54
|
-
readonly eventName: string;
|
|
55
|
-
readonly syncPolicy?: ProtocolSyncPolicy;
|
|
56
|
-
readonly symbolIds: ReadonlyArray<string>;
|
|
57
|
-
readonly action?: ProtocolEventAction;
|
|
58
|
-
};
|
|
59
|
-
declare function protocolEventActionKind(record: Pick<ProtocolEventRecord, 'action'>): ProtocolEventActionKind;
|
|
60
|
-
declare function protocolEventDispatchesMarkless(record: Pick<ProtocolEventRecord, 'action'>): boolean;
|
|
61
|
-
type ProtocolStatePayload = {
|
|
62
|
-
readonly version: typeof ASYNC_PROTOCOL_VERSION | typeof STORAGE_PROTOCOL_VERSION;
|
|
63
|
-
readonly cells: ReadonlyArray<{
|
|
64
|
-
readonly graphNodeId: string;
|
|
65
|
-
readonly name: string;
|
|
66
|
-
readonly valueKind: 'scalar' | 'object' | 'array' | 'unknown';
|
|
67
|
-
readonly value?: unknown;
|
|
68
|
-
readonly directValue?: unknown;
|
|
69
|
-
}>;
|
|
70
|
-
readonly computed: ReadonlyArray<{
|
|
71
|
-
readonly graphNodeId: string;
|
|
72
|
-
readonly name: string;
|
|
73
|
-
readonly async: boolean;
|
|
74
|
-
readonly deriveSymbolId?: string;
|
|
75
|
-
readonly dependencies?: ReadonlyArray<{
|
|
76
|
-
readonly graphNodeId: string;
|
|
77
|
-
readonly path: ReadonlyArray<string>;
|
|
78
|
-
}>;
|
|
79
|
-
readonly snapshot?: {
|
|
80
|
-
readonly status: 'idle';
|
|
81
|
-
readonly version: 0;
|
|
82
|
-
} | {
|
|
83
|
-
readonly status: 'pending';
|
|
84
|
-
readonly version: number;
|
|
85
|
-
readonly key: unknown;
|
|
86
|
-
} | {
|
|
87
|
-
readonly status: 'fulfilled';
|
|
88
|
-
readonly version: number;
|
|
89
|
-
readonly key: unknown;
|
|
90
|
-
readonly value: unknown;
|
|
91
|
-
} | {
|
|
92
|
-
readonly status: 'rejected';
|
|
93
|
-
readonly version: number;
|
|
94
|
-
readonly key: unknown;
|
|
95
|
-
readonly error: unknown;
|
|
96
|
-
};
|
|
97
|
-
}>;
|
|
98
|
-
readonly sharedDefinitions?: ReadonlyArray<{
|
|
99
|
-
readonly id: string;
|
|
100
|
-
readonly name: string;
|
|
101
|
-
readonly exportedName: string;
|
|
102
|
-
readonly scope?: 'request' | 'container' | 'page';
|
|
103
|
-
readonly version: number;
|
|
104
|
-
readonly graphNodeIds: ReadonlyArray<string>;
|
|
105
|
-
readonly dependencies?: ReadonlyArray<{
|
|
106
|
-
readonly definitionId: string;
|
|
107
|
-
readonly definitionName: string;
|
|
108
|
-
}>;
|
|
109
|
-
readonly returnProperties?: ReadonlyArray<{
|
|
110
|
-
readonly kind: 'graph';
|
|
111
|
-
readonly name: string;
|
|
112
|
-
readonly graphNodeId: string;
|
|
113
|
-
readonly path: ReadonlyArray<string>;
|
|
114
|
-
} | {
|
|
115
|
-
readonly kind: 'method';
|
|
116
|
-
readonly name: string;
|
|
117
|
-
}>;
|
|
118
|
-
}>;
|
|
119
|
-
readonly storage?: ReadonlyArray<{
|
|
120
|
-
readonly graphNodeId: string;
|
|
121
|
-
readonly key: string;
|
|
122
|
-
}>;
|
|
123
|
-
};
|
|
124
|
-
type ProtocolArmBranchRecord = {
|
|
125
|
-
readonly id: string;
|
|
126
|
-
readonly testReads: ReadonlyArray<{
|
|
127
|
-
readonly source: string;
|
|
128
|
-
readonly graphNodeId: string;
|
|
129
|
-
readonly path: ReadonlyArray<string>;
|
|
130
|
-
}>;
|
|
131
|
-
readonly symbolId?: string;
|
|
132
|
-
readonly armTests?: ReadonlyArray<unknown>;
|
|
133
|
-
readonly declaredEmptyArms?: ReadonlyArray<number>;
|
|
134
|
-
readonly startAnchor?: {
|
|
135
|
-
readonly strategy: 'arm-branch-comment';
|
|
136
|
-
readonly index: number;
|
|
137
|
-
};
|
|
138
|
-
readonly endAnchor?: {
|
|
139
|
-
readonly strategy: 'arm-branch-comment';
|
|
140
|
-
readonly index: number;
|
|
141
|
-
};
|
|
142
|
-
readonly armRecords?: NonNullable<ProtocolViewPayload['branches']>[number]['armRecords'];
|
|
143
|
-
};
|
|
144
|
-
type ProtocolArmRecordSet = {
|
|
145
|
-
readonly locators: ReadonlyArray<{
|
|
146
|
-
readonly hostNodeId: string;
|
|
147
|
-
readonly strategy: 'arm-relative';
|
|
148
|
-
readonly index: number;
|
|
149
|
-
readonly tagName: string;
|
|
150
|
-
}>;
|
|
151
|
-
readonly events: ProtocolViewPayload['events'];
|
|
152
|
-
readonly domUpdates?: ProtocolViewPayload['domUpdates'];
|
|
153
|
-
readonly behaviors: ProtocolViewPayload['behaviors'];
|
|
154
|
-
readonly elementHandles: ProtocolViewPayload['elementHandles'];
|
|
155
|
-
readonly keyedRepeats?: ProtocolViewPayload['keyedRepeats'];
|
|
156
|
-
readonly branches?: ReadonlyArray<ProtocolArmBranchRecord>;
|
|
157
|
-
};
|
|
158
|
-
type ProtocolStreamedArmPatch = readonly [arm: ProtocolAsyncBoundaryArm, records: ProtocolArmRecordSet];
|
|
159
|
-
type ProtocolViewPayload = {
|
|
160
|
-
readonly version: typeof ASYNC_PROTOCOL_VERSION;
|
|
161
|
-
readonly asyncRunners?: Readonly<Record<string, string>>;
|
|
162
|
-
readonly locators: ReadonlyArray<{
|
|
163
|
-
readonly hostNodeId: string;
|
|
164
|
-
readonly strategy: 'dom-order';
|
|
165
|
-
readonly index: number;
|
|
166
|
-
readonly tagName: string;
|
|
167
|
-
}>;
|
|
168
|
-
readonly events: ReadonlyArray<ProtocolEventRecord>;
|
|
169
|
-
readonly domUpdates: ReadonlyArray<{
|
|
170
|
-
readonly hostNodeId: string;
|
|
171
|
-
readonly source: string;
|
|
172
|
-
readonly graphNodeId: string;
|
|
173
|
-
readonly path: ReadonlyArray<string>;
|
|
174
|
-
readonly target?: {
|
|
175
|
-
readonly kind: 'text';
|
|
176
|
-
readonly prefix?: string;
|
|
177
|
-
readonly suffix?: string;
|
|
178
|
-
readonly trueValue?: string;
|
|
179
|
-
readonly falseValue?: string;
|
|
180
|
-
} | {
|
|
181
|
-
readonly kind: 'attribute';
|
|
182
|
-
readonly name: string;
|
|
183
|
-
} | {
|
|
184
|
-
readonly kind: 'property';
|
|
185
|
-
readonly name: string;
|
|
186
|
-
} | {
|
|
187
|
-
readonly kind: 'class';
|
|
188
|
-
readonly trueValue?: string;
|
|
189
|
-
readonly falseValue?: string;
|
|
190
|
-
} | {
|
|
191
|
-
readonly kind: 'style';
|
|
192
|
-
};
|
|
193
|
-
readonly symbolId?: string;
|
|
194
|
-
}>;
|
|
195
|
-
readonly behaviors: ReadonlyArray<{
|
|
196
|
-
readonly hostNodeId: string;
|
|
197
|
-
readonly source: string;
|
|
198
|
-
readonly functionSource: string;
|
|
199
|
-
readonly inputSources: ReadonlyArray<string>;
|
|
200
|
-
readonly inputValues?: ReadonlyArray<unknown>;
|
|
201
|
-
readonly inputGraphReads?: ReadonlyArray<{
|
|
202
|
-
readonly inputIndex: number;
|
|
203
|
-
readonly source: string;
|
|
204
|
-
readonly graphNodeId: string;
|
|
205
|
-
readonly path: ReadonlyArray<string>;
|
|
206
|
-
}>;
|
|
207
|
-
readonly symbolId?: string;
|
|
208
|
-
}>;
|
|
209
|
-
readonly elementHandles: ReadonlyArray<{
|
|
210
|
-
readonly hostNodeId: string;
|
|
211
|
-
readonly handleId: string;
|
|
212
|
-
readonly name: string;
|
|
213
|
-
}>;
|
|
214
|
-
readonly keyedRepeats?: ReadonlyArray<{
|
|
215
|
-
readonly id: string;
|
|
216
|
-
readonly parentHostNodeId: string;
|
|
217
|
-
readonly collectionGraphNodeId?: string;
|
|
218
|
-
readonly collectionPath: ReadonlyArray<string>;
|
|
219
|
-
readonly keyPath: ReadonlyArray<string>;
|
|
220
|
-
readonly itemName: string;
|
|
221
|
-
readonly rowElementCount: number;
|
|
222
|
-
readonly rowEvents: ReadonlyArray<{
|
|
223
|
-
readonly hostPath: ReadonlyArray<number>;
|
|
224
|
-
readonly eventName: string;
|
|
225
|
-
readonly symbolIds: ReadonlyArray<string>;
|
|
226
|
-
readonly syncPolicy?: ProtocolSyncPolicy;
|
|
227
|
-
}>;
|
|
228
|
-
}>;
|
|
229
|
-
readonly branches?: ReadonlyArray<{
|
|
230
|
-
readonly id: string;
|
|
231
|
-
readonly startAnchor: {
|
|
232
|
-
readonly strategy: 'dom-order-comment';
|
|
233
|
-
readonly index: number;
|
|
234
|
-
};
|
|
235
|
-
readonly endAnchor: {
|
|
236
|
-
readonly strategy: 'dom-order-comment';
|
|
237
|
-
readonly index: number;
|
|
238
|
-
};
|
|
239
|
-
readonly symbolId?: string;
|
|
240
|
-
readonly armTests?: ReadonlyArray<unknown>;
|
|
241
|
-
readonly armRecords?: ReadonlyArray<{
|
|
242
|
-
readonly events: ReadonlyArray<{
|
|
243
|
-
readonly hostPath: ReadonlyArray<number>;
|
|
244
|
-
readonly eventName: string;
|
|
245
|
-
readonly symbolIds: ReadonlyArray<string>;
|
|
246
|
-
readonly syncPolicy?: ProtocolSyncPolicy;
|
|
247
|
-
readonly action?: ProtocolEventAction;
|
|
248
|
-
}>;
|
|
249
|
-
readonly domUpdates: ReadonlyArray<Record<string, unknown>>;
|
|
250
|
-
readonly behaviors: ReadonlyArray<Record<string, unknown>>;
|
|
251
|
-
readonly elementHandles: ReadonlyArray<Record<string, unknown>>;
|
|
252
|
-
}>;
|
|
253
|
-
readonly testReads?: ReadonlyArray<{
|
|
254
|
-
readonly source: string;
|
|
255
|
-
readonly graphNodeId: string;
|
|
256
|
-
readonly path: ReadonlyArray<string>;
|
|
257
|
-
}>;
|
|
258
|
-
}>;
|
|
259
|
-
readonly asyncBoundaries: ReadonlyArray<{
|
|
260
|
-
readonly id: string;
|
|
261
|
-
readonly runnerGraphNodeId: string | null;
|
|
262
|
-
readonly initiallyServedArm: ProtocolAsyncBoundaryArm;
|
|
263
|
-
readonly updateSymbolId?: string;
|
|
264
|
-
readonly armRecords?: ProtocolArmRecordSet | ReadonlyArray<ProtocolArmRecordSet>;
|
|
265
|
-
readonly startAnchor: {
|
|
266
|
-
readonly strategy: 'dom-order-comment';
|
|
267
|
-
readonly index: number;
|
|
268
|
-
};
|
|
269
|
-
readonly endAnchor: {
|
|
270
|
-
readonly strategy: 'dom-order-comment';
|
|
271
|
-
readonly index: number;
|
|
272
|
-
};
|
|
273
|
-
readonly asyncReads: ReadonlyArray<{
|
|
274
|
-
readonly source: string;
|
|
275
|
-
readonly graphNodeId: string;
|
|
276
|
-
readonly path: ReadonlyArray<string>;
|
|
277
|
-
readonly runnerSymbolId?: string;
|
|
278
|
-
}>;
|
|
279
|
-
}>;
|
|
280
|
-
};
|
|
281
|
-
type ProtocolPayloadScripts = {
|
|
282
|
-
readonly state: ProtocolStatePayload;
|
|
283
|
-
readonly view: ProtocolViewPayload;
|
|
284
|
-
readonly stateScript: string;
|
|
285
|
-
readonly viewScript: string;
|
|
286
|
-
};
|
|
287
|
-
//#endregion
|
|
288
|
-
export { ASYNC_PROTOCOL_VERSION as _, ProtocolEventAction as a, ASYNC_BOUNDARY_ARM as b, ProtocolPayloadScripts as c, ProtocolSyncPolicy as d, ProtocolSyncPolicyBranch as f, protocolEventDispatchesMarkless as g, protocolEventActionKind as h, ProtocolAsyncBoundaryArm as i, ProtocolStatePayload as l, ProtocolViewPayload as m, ProtocolArmBranchRecord as n, ProtocolEventActionKind as o, ProtocolSyncPolicyCondition as p, ProtocolArmRecordSet as r, ProtocolEventRecord as s, PROTOCOL_EVENT_ACTION_KIND as t, ProtocolStreamedArmPatch as u, STORAGE_PROTOCOL_VERSION as v, protocolStateVersion as y };
|
|
File without changes
|