vestjs-runtime 1.0.4 → 1.0.6
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/cjs/IsolateSerializer.development.js +18 -2
- package/dist/cjs/IsolateSerializer.development.js.map +1 -1
- package/dist/cjs/IsolateSerializer.production.js +1 -1
- package/dist/cjs/IsolateSerializer.production.js.map +1 -1
- package/dist/cjs/test-utils.development.js +11 -0
- package/dist/cjs/test-utils.development.js.map +1 -1
- package/dist/cjs/test-utils.production.js +1 -1
- package/dist/cjs/test-utils.production.js.map +1 -1
- package/dist/cjs/vestjs-runtime.development.js +164 -123
- package/dist/cjs/vestjs-runtime.development.js.map +1 -1
- package/dist/cjs/vestjs-runtime.production.js +1 -1
- package/dist/cjs/vestjs-runtime.production.js.map +1 -1
- package/dist/es/IsolateSerializer.development.js +18 -2
- package/dist/es/IsolateSerializer.development.js.map +1 -1
- package/dist/es/IsolateSerializer.production.js +1 -1
- package/dist/es/IsolateSerializer.production.js.map +1 -1
- package/dist/es/test-utils.development.js +11 -0
- package/dist/es/test-utils.development.js.map +1 -1
- package/dist/es/test-utils.production.js +1 -1
- package/dist/es/test-utils.production.js.map +1 -1
- package/dist/es/vestjs-runtime.development.js +166 -125
- package/dist/es/vestjs-runtime.development.js.map +1 -1
- package/dist/es/vestjs-runtime.production.js +1 -1
- package/dist/es/vestjs-runtime.production.js.map +1 -1
- package/dist/umd/IsolateSerializer.development.js +18 -2
- package/dist/umd/IsolateSerializer.development.js.map +1 -1
- package/dist/umd/IsolateSerializer.production.js +1 -1
- package/dist/umd/IsolateSerializer.production.js.map +1 -1
- package/dist/umd/test-utils.development.js +11 -0
- package/dist/umd/test-utils.development.js.map +1 -1
- package/dist/umd/test-utils.production.js +1 -1
- package/dist/umd/test-utils.production.js.map +1 -1
- package/dist/umd/vestjs-runtime.development.js +164 -123
- package/dist/umd/vestjs-runtime.development.js.map +1 -1
- package/dist/umd/vestjs-runtime.production.js +1 -1
- package/dist/umd/vestjs-runtime.production.js.map +1 -1
- package/package.json +3 -3
- package/types/IsolateSerializer.d.ts +8 -1
- package/types/IsolateSerializer.d.ts.map +1 -1
- package/types/test-utils.d.ts +8 -1
- package/types/test-utils.d.ts.map +1 -1
- package/types/vestjs-runtime.d.ts +38 -7
- package/types/vestjs-runtime.d.ts.map +1 -1
|
@@ -5,7 +5,8 @@ declare enum IsolateKeys {
|
|
|
5
5
|
Key = "key",
|
|
6
6
|
Parent = "parent",
|
|
7
7
|
Data = "data",
|
|
8
|
-
AllowReorder = "allowReorder"
|
|
8
|
+
AllowReorder = "allowReorder",
|
|
9
|
+
Status = "status"
|
|
9
10
|
}
|
|
10
11
|
declare enum MinifiedKeys {
|
|
11
12
|
Type = "$",
|
|
@@ -13,7 +14,13 @@ declare enum MinifiedKeys {
|
|
|
13
14
|
Key = "k",
|
|
14
15
|
Parent = "P",
|
|
15
16
|
Data = "D",
|
|
16
|
-
AllowReorder = "aR"
|
|
17
|
+
AllowReorder = "aR",
|
|
18
|
+
Status = "S"
|
|
19
|
+
}
|
|
20
|
+
declare enum IsolateStatus {
|
|
21
|
+
PENDING = "PENDING",
|
|
22
|
+
DONE = "DONE",
|
|
23
|
+
INITIAL = "INITIAL"
|
|
17
24
|
}
|
|
18
25
|
type IsolateKey = Nullable<string>;
|
|
19
26
|
type TIsolate<P extends IsolatePayload = IsolatePayload> = {
|
|
@@ -22,6 +29,7 @@ type TIsolate<P extends IsolatePayload = IsolatePayload> = {
|
|
|
22
29
|
[IsolateKeys.Type]: string;
|
|
23
30
|
[IsolateKeys.Keys]: Nullable<Record<string, TIsolate>>;
|
|
24
31
|
[IsolateKeys.Data]: DataOnly<P>;
|
|
32
|
+
[IsolateKeys.Status]: IsolateStatus;
|
|
25
33
|
children: Nullable<TIsolate[]>;
|
|
26
34
|
key: IsolateKey;
|
|
27
35
|
output: any;
|
|
@@ -30,6 +38,7 @@ type DataOnly<P extends IsolatePayload> = Omit<P, keyof IsolateFeatures>;
|
|
|
30
38
|
type UsedFeaturesOnly<P extends IsolatePayload> = Pick<P, keyof IsolateFeatures>;
|
|
31
39
|
declare class Isolate {
|
|
32
40
|
static create<Payload extends IsolatePayload>(type: string, callback: CB, payload?: Maybe<Payload>, key?: IsolateKey): TIsolate<Payload>;
|
|
41
|
+
static isIsolate(node: any): node is TIsolate;
|
|
33
42
|
}
|
|
34
43
|
type IsolateData = Record<string, any>;
|
|
35
44
|
type IsolatePayload = IsolateData & IsolateFeatures;
|
|
@@ -65,7 +74,8 @@ declare namespace Walker {
|
|
|
65
74
|
Key = "key",
|
|
66
75
|
Parent = "parent",
|
|
67
76
|
Data = "data",
|
|
68
|
-
AllowReorder = "allowReorder"
|
|
77
|
+
AllowReorder = "allowReorder",
|
|
78
|
+
Status = "status"
|
|
69
79
|
}
|
|
70
80
|
enum MinifiedKeys {
|
|
71
81
|
Type = "$",
|
|
@@ -73,7 +83,8 @@ declare namespace Walker {
|
|
|
73
83
|
Key = "k",
|
|
74
84
|
Parent = "P",
|
|
75
85
|
Data = "D",
|
|
76
|
-
AllowReorder = "aR"
|
|
86
|
+
AllowReorder = "aR",
|
|
87
|
+
Status = "S"
|
|
77
88
|
}
|
|
78
89
|
const KeyToMinified: {
|
|
79
90
|
$type: MinifiedKeys;
|
|
@@ -82,6 +93,7 @@ declare namespace Walker {
|
|
|
82
93
|
data: MinifiedKeys;
|
|
83
94
|
key: MinifiedKeys;
|
|
84
95
|
allowReorder: MinifiedKeys;
|
|
96
|
+
status: MinifiedKeys;
|
|
85
97
|
};
|
|
86
98
|
// This const is an object that looks like this:
|
|
87
99
|
// {
|
|
@@ -91,6 +103,11 @@ declare namespace Walker {
|
|
|
91
103
|
// ...
|
|
92
104
|
// }
|
|
93
105
|
const MinifiedToKey: Record<string, IsolateKeys>;
|
|
106
|
+
enum IsolateStatus {
|
|
107
|
+
PENDING = "PENDING",
|
|
108
|
+
DONE = "DONE",
|
|
109
|
+
INITIAL = "INITIAL"
|
|
110
|
+
}
|
|
94
111
|
type IsolateKey = Nullable<string>;
|
|
95
112
|
type TIsolate<P extends IsolatePayload = IsolatePayload> = {
|
|
96
113
|
[IsolateKeys.AllowReorder]?: boolean;
|
|
@@ -98,6 +115,7 @@ declare namespace Walker {
|
|
|
98
115
|
[IsolateKeys.Type]: string;
|
|
99
116
|
[IsolateKeys.Keys]: Nullable<Record<string, TIsolate>>;
|
|
100
117
|
[IsolateKeys.Data]: DataOnly<P>;
|
|
118
|
+
[IsolateKeys.Status]: IsolateStatus;
|
|
101
119
|
children: Nullable<TIsolate[]>;
|
|
102
120
|
key: IsolateKey;
|
|
103
121
|
output: any;
|
|
@@ -106,6 +124,7 @@ declare namespace Walker {
|
|
|
106
124
|
type UsedFeaturesOnly<P extends IsolatePayload> = Pick<P, keyof IsolateFeatures>;
|
|
107
125
|
class Isolate {
|
|
108
126
|
static create<Payload extends IsolatePayload>(type: string, callback: CB, payload?: Maybe<Payload>, key?: IsolateKey): TIsolate<Payload>;
|
|
127
|
+
static isIsolate(node: any): node is TIsolate;
|
|
109
128
|
}
|
|
110
129
|
type IsolateData = Record<string, any>;
|
|
111
130
|
type IsolatePayload = IsolateData & IsolateFeatures;
|
|
@@ -213,6 +232,8 @@ declare class IsolateMutator {
|
|
|
213
232
|
static addChildKey(isolate: TIsolate, key: string, node: TIsolate): void;
|
|
214
233
|
static slice(isolate: TIsolate, at: number): void;
|
|
215
234
|
static setData(isolate: TIsolate, data: any): void;
|
|
235
|
+
static setPending(isolate: TIsolate): void;
|
|
236
|
+
static setDone(isolate: TIsolate): void;
|
|
216
237
|
}
|
|
217
238
|
declare namespace Bus {
|
|
218
239
|
function useBus(): import("vest-utils").BusType;
|
|
@@ -230,7 +251,8 @@ declare namespace IsolateSelectors {
|
|
|
230
251
|
Key = "key",
|
|
231
252
|
Parent = "parent",
|
|
232
253
|
Data = "data",
|
|
233
|
-
AllowReorder = "allowReorder"
|
|
254
|
+
AllowReorder = "allowReorder",
|
|
255
|
+
Status = "status"
|
|
234
256
|
}
|
|
235
257
|
enum MinifiedKeys {
|
|
236
258
|
Type = "$",
|
|
@@ -238,7 +260,8 @@ declare namespace IsolateSelectors {
|
|
|
238
260
|
Key = "k",
|
|
239
261
|
Parent = "P",
|
|
240
262
|
Data = "D",
|
|
241
|
-
AllowReorder = "aR"
|
|
263
|
+
AllowReorder = "aR",
|
|
264
|
+
Status = "S"
|
|
242
265
|
}
|
|
243
266
|
const KeyToMinified: {
|
|
244
267
|
$type: MinifiedKeys;
|
|
@@ -247,6 +270,7 @@ declare namespace IsolateSelectors {
|
|
|
247
270
|
data: MinifiedKeys;
|
|
248
271
|
key: MinifiedKeys;
|
|
249
272
|
allowReorder: MinifiedKeys;
|
|
273
|
+
status: MinifiedKeys;
|
|
250
274
|
};
|
|
251
275
|
// This const is an object that looks like this:
|
|
252
276
|
// {
|
|
@@ -256,6 +280,11 @@ declare namespace IsolateSelectors {
|
|
|
256
280
|
// ...
|
|
257
281
|
// }
|
|
258
282
|
const MinifiedToKey: Record<string, IsolateKeys>;
|
|
283
|
+
enum IsolateStatus {
|
|
284
|
+
PENDING = "PENDING",
|
|
285
|
+
DONE = "DONE",
|
|
286
|
+
INITIAL = "INITIAL"
|
|
287
|
+
}
|
|
259
288
|
type IsolateKey = Nullable<string>;
|
|
260
289
|
type TIsolate<P extends IsolatePayload = IsolatePayload> = {
|
|
261
290
|
[IsolateKeys.AllowReorder]?: boolean;
|
|
@@ -263,6 +292,7 @@ declare namespace IsolateSelectors {
|
|
|
263
292
|
[IsolateKeys.Type]: string;
|
|
264
293
|
[IsolateKeys.Keys]: Nullable<Record<string, TIsolate>>;
|
|
265
294
|
[IsolateKeys.Data]: DataOnly<P>;
|
|
295
|
+
[IsolateKeys.Status]: IsolateStatus;
|
|
266
296
|
children: Nullable<TIsolate[]>;
|
|
267
297
|
key: IsolateKey;
|
|
268
298
|
output: any;
|
|
@@ -271,6 +301,7 @@ declare namespace IsolateSelectors {
|
|
|
271
301
|
type UsedFeaturesOnly<P extends IsolatePayload> = Pick<P, keyof IsolateFeatures>;
|
|
272
302
|
class Isolate {
|
|
273
303
|
static create<Payload extends IsolatePayload>(type: string, callback: CB, payload?: Maybe<Payload>, key?: IsolateKey): TIsolate<Payload>;
|
|
304
|
+
static isIsolate(node: any): node is TIsolate;
|
|
274
305
|
}
|
|
275
306
|
type IsolateData = Record<string, any>;
|
|
276
307
|
type IsolatePayload = IsolateData & IsolateFeatures;
|
|
@@ -288,5 +319,5 @@ declare class IsolateSerializer {
|
|
|
288
319
|
static getChildren(node: TIsolate): Nullable<TIsolate[]>;
|
|
289
320
|
static validateIsolate(node: Record<string, any> | TIsolate): void;
|
|
290
321
|
}
|
|
291
|
-
export { IsolateKey, TIsolate, Isolate, Reconciler, IRecociler, Walker, RuntimeApi as VestRuntime, IsolateInspector, IsolateMutator, Bus, IsolateSelectors, IsolateSerializer };
|
|
322
|
+
export { IsolateKey, TIsolate, Isolate, IsolateStatus, Reconciler, IRecociler, Walker, RuntimeApi as VestRuntime, IsolateInspector, IsolateMutator, Bus, IsolateSelectors, IsolateSerializer };
|
|
292
323
|
//# sourceMappingURL=vestjs-runtime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vestjs-runtime.d.ts","sourceRoot":"","sources":["../src/vestjs-runtime.ts","../src/Isolate/
|
|
1
|
+
{"version":3,"file":"vestjs-runtime.d.ts","sourceRoot":"","sources":["../src/vestjs-runtime.ts","../src/errors/ErrorStrings.ts","../src/Isolate/IsolateInspector.ts","../src/Isolate/IsolateStatus.ts","../src/Isolate/IsolateMutator.ts","../src/Isolate/IsolateKeys.ts","../src/Isolate/IsolateSelectors.ts","../src/Reconciler.ts","../src/VestRuntime.ts","../src/Bus.ts","../src/RuntimeEvents.ts","../src/Isolate/Isolate.ts","../src/IsolateWalker.ts","../src/exports/IsolateSerializer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,uLAAiC,CAAgB"}
|