vestjs-runtime 1.0.6 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/cjs/IsolateSerializer.development.js +0 -13
  2. package/dist/cjs/IsolateSerializer.development.js.map +1 -1
  3. package/dist/cjs/IsolateSerializer.production.js +1 -1
  4. package/dist/cjs/IsolateSerializer.production.js.map +1 -1
  5. package/dist/cjs/test-utils.development.js +37 -18
  6. package/dist/cjs/test-utils.development.js.map +1 -1
  7. package/dist/cjs/test-utils.production.js +1 -1
  8. package/dist/cjs/test-utils.production.js.map +1 -1
  9. package/dist/cjs/vestjs-runtime.development.js +31 -51
  10. package/dist/cjs/vestjs-runtime.development.js.map +1 -1
  11. package/dist/cjs/vestjs-runtime.production.js +1 -1
  12. package/dist/cjs/vestjs-runtime.production.js.map +1 -1
  13. package/dist/es/IsolateSerializer.development.js +0 -13
  14. package/dist/es/IsolateSerializer.development.js.map +1 -1
  15. package/dist/es/IsolateSerializer.production.js +1 -1
  16. package/dist/es/IsolateSerializer.production.js.map +1 -1
  17. package/dist/es/test-utils.development.js +37 -18
  18. package/dist/es/test-utils.development.js.map +1 -1
  19. package/dist/es/test-utils.production.js +1 -1
  20. package/dist/es/test-utils.production.js.map +1 -1
  21. package/dist/es/vestjs-runtime.development.js +31 -52
  22. package/dist/es/vestjs-runtime.development.js.map +1 -1
  23. package/dist/es/vestjs-runtime.production.js +1 -1
  24. package/dist/es/vestjs-runtime.production.js.map +1 -1
  25. package/dist/umd/IsolateSerializer.development.js +0 -13
  26. package/dist/umd/IsolateSerializer.development.js.map +1 -1
  27. package/dist/umd/IsolateSerializer.production.js +1 -1
  28. package/dist/umd/IsolateSerializer.production.js.map +1 -1
  29. package/dist/umd/test-utils.development.js +80 -61
  30. package/dist/umd/test-utils.development.js.map +1 -1
  31. package/dist/umd/test-utils.production.js +1 -1
  32. package/dist/umd/test-utils.production.js.map +1 -1
  33. package/dist/umd/vestjs-runtime.development.js +690 -710
  34. package/dist/umd/vestjs-runtime.development.js.map +1 -1
  35. package/dist/umd/vestjs-runtime.production.js +1 -1
  36. package/dist/umd/vestjs-runtime.production.js.map +1 -1
  37. package/package.json +3 -3
  38. package/types/IsolateSerializer.d.ts +2 -6
  39. package/types/IsolateSerializer.d.ts.map +1 -1
  40. package/types/test-utils.d.ts +3 -7
  41. package/types/test-utils.d.ts.map +1 -1
  42. package/types/vestjs-runtime.d.ts +16 -21
  43. package/types/vestjs-runtime.d.ts.map +1 -1
@@ -1,4 +1,9 @@
1
1
  import { CB, Maybe, Nullable, TinyState, BusType, DynamicValue } from "vest-utils";
2
+ declare const RuntimeEvents: {
3
+ ISOLATE_ENTER: string;
4
+ ISOLATE_PENDING: string;
5
+ ISOLATE_DONE: string;
6
+ };
2
7
  declare enum IsolateKeys {
3
8
  Type = "$type",
4
9
  Keys = "keys",
@@ -17,11 +22,6 @@ declare enum MinifiedKeys {
17
22
  AllowReorder = "aR",
18
23
  Status = "S"
19
24
  }
20
- declare enum IsolateStatus {
21
- PENDING = "PENDING",
22
- DONE = "DONE",
23
- INITIAL = "INITIAL"
24
- }
25
25
  type IsolateKey = Nullable<string>;
26
26
  type TIsolate<P extends IsolatePayload = IsolatePayload> = {
27
27
  [IsolateKeys.AllowReorder]?: boolean;
@@ -29,7 +29,7 @@ type TIsolate<P extends IsolatePayload = IsolatePayload> = {
29
29
  [IsolateKeys.Type]: string;
30
30
  [IsolateKeys.Keys]: Nullable<Record<string, TIsolate>>;
31
31
  [IsolateKeys.Data]: DataOnly<P>;
32
- [IsolateKeys.Status]: IsolateStatus;
32
+ [IsolateKeys.Status]?: string;
33
33
  children: Nullable<TIsolate[]>;
34
34
  key: IsolateKey;
35
35
  output: any;
@@ -44,6 +44,7 @@ type IsolateData = Record<string, any>;
44
44
  type IsolatePayload = IsolateData & IsolateFeatures;
45
45
  type IsolateFeatures = {
46
46
  [IsolateKeys.AllowReorder]?: boolean;
47
+ [IsolateKeys.Status]?: string;
47
48
  };
48
49
  // import { isSameIsolateType } from 'IsolateSelectors';
49
50
  // I would rather not use `any` here, but instead use `Isolate`.
@@ -103,11 +104,6 @@ declare namespace Walker {
103
104
  // ...
104
105
  // }
105
106
  const MinifiedToKey: Record<string, IsolateKeys>;
106
- enum IsolateStatus {
107
- PENDING = "PENDING",
108
- DONE = "DONE",
109
- INITIAL = "INITIAL"
110
- }
111
107
  type IsolateKey = Nullable<string>;
112
108
  type TIsolate<P extends IsolatePayload = IsolatePayload> = {
113
109
  [IsolateKeys.AllowReorder]?: boolean;
@@ -115,7 +111,7 @@ declare namespace Walker {
115
111
  [IsolateKeys.Type]: string;
116
112
  [IsolateKeys.Keys]: Nullable<Record<string, TIsolate>>;
117
113
  [IsolateKeys.Data]: DataOnly<P>;
118
- [IsolateKeys.Status]: IsolateStatus;
114
+ [IsolateKeys.Status]?: string;
119
115
  children: Nullable<TIsolate[]>;
120
116
  key: IsolateKey;
121
117
  output: any;
@@ -130,6 +126,7 @@ declare namespace Walker {
130
126
  type IsolatePayload = IsolateData & IsolateFeatures;
131
127
  type IsolateFeatures = {
132
128
  [IsolateKeys.AllowReorder]?: boolean;
129
+ [IsolateKeys.Status]?: string;
133
130
  };
134
131
  type VisitOnlyPredicate = (isolate: TIsolate) => boolean;
135
132
  // eslint-disable-next-line
@@ -192,20 +189,24 @@ declare function useHistoryRoot(): [
192
189
  [x: string]: any;
193
190
  } & {
194
191
  allowReorder?: boolean | undefined;
192
+ status?: string | undefined;
195
193
  }>>,
196
194
  setValue: (next: Nullable<TIsolate<{
197
195
  [x: string]: any;
198
196
  } & {
199
197
  allowReorder?: boolean | undefined;
198
+ status?: string | undefined;
200
199
  }>> | import("vest-utils").CB<Nullable<TIsolate<{
201
200
  [x: string]: any;
202
201
  } & {
203
202
  allowReorder?: boolean | undefined;
203
+ status?: string | undefined;
204
204
  }>>, [
205
205
  prev: Nullable<TIsolate<{
206
206
  [x: string]: any;
207
207
  } & {
208
208
  allowReorder?: boolean | undefined;
209
+ status?: string | undefined;
209
210
  }>>
210
211
  ]>) => void,
211
212
  resetValue: () => void
@@ -232,8 +233,6 @@ declare class IsolateMutator {
232
233
  static addChildKey(isolate: TIsolate, key: string, node: TIsolate): void;
233
234
  static slice(isolate: TIsolate, at: number): void;
234
235
  static setData(isolate: TIsolate, data: any): void;
235
- static setPending(isolate: TIsolate): void;
236
- static setDone(isolate: TIsolate): void;
237
236
  }
238
237
  declare namespace Bus {
239
238
  function useBus(): import("vest-utils").BusType;
@@ -280,11 +279,6 @@ declare namespace IsolateSelectors {
280
279
  // ...
281
280
  // }
282
281
  const MinifiedToKey: Record<string, IsolateKeys>;
283
- enum IsolateStatus {
284
- PENDING = "PENDING",
285
- DONE = "DONE",
286
- INITIAL = "INITIAL"
287
- }
288
282
  type IsolateKey = Nullable<string>;
289
283
  type TIsolate<P extends IsolatePayload = IsolatePayload> = {
290
284
  [IsolateKeys.AllowReorder]?: boolean;
@@ -292,7 +286,7 @@ declare namespace IsolateSelectors {
292
286
  [IsolateKeys.Type]: string;
293
287
  [IsolateKeys.Keys]: Nullable<Record<string, TIsolate>>;
294
288
  [IsolateKeys.Data]: DataOnly<P>;
295
- [IsolateKeys.Status]: IsolateStatus;
289
+ [IsolateKeys.Status]?: string;
296
290
  children: Nullable<TIsolate[]>;
297
291
  key: IsolateKey;
298
292
  output: any;
@@ -307,6 +301,7 @@ declare namespace IsolateSelectors {
307
301
  type IsolatePayload = IsolateData & IsolateFeatures;
308
302
  type IsolateFeatures = {
309
303
  [IsolateKeys.AllowReorder]?: boolean;
304
+ [IsolateKeys.Status]?: string;
310
305
  };
311
306
  function isIsolateType<I extends TIsolate>(node: Maybe<TIsolate>, type: string): node is I;
312
307
  function isSameIsolateType<A extends TIsolate, B extends TIsolate>(a: A, b: B): boolean;
@@ -319,5 +314,5 @@ declare class IsolateSerializer {
319
314
  static getChildren(node: TIsolate): Nullable<TIsolate[]>;
320
315
  static validateIsolate(node: Record<string, any> | TIsolate): void;
321
316
  }
322
- export { IsolateKey, TIsolate, Isolate, IsolateStatus, Reconciler, IRecociler, Walker, RuntimeApi as VestRuntime, IsolateInspector, IsolateMutator, Bus, IsolateSelectors, IsolateSerializer };
317
+ export { RuntimeEvents, IsolateKey, TIsolate, Isolate, Reconciler, IRecociler, Walker, RuntimeApi as VestRuntime, IsolateInspector, IsolateMutator, Bus, IsolateSelectors, IsolateSerializer };
323
318
  //# sourceMappingURL=vestjs-runtime.d.ts.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"vestjs-runtime.d.ts","sourceRoot":"","sources":["../src/vestjs-runtime.ts","../src/RuntimeEvents.ts","../src/errors/ErrorStrings.ts","../src/Isolate/IsolateInspector.ts","../src/Isolate/IsolateMutator.ts","../src/Isolate/IsolateKeys.ts","../src/Isolate/IsolateSelectors.ts","../src/Reconciler.ts","../src/VestRuntime.ts","../src/Bus.ts","../src/Isolate/Isolate.ts","../src/IsolateWalker.ts","../src/exports/IsolateSerializer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,uLAAiB,CAAsB"}