vestjs-runtime 1.6.0 → 1.7.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 (136) hide show
  1. package/IsolateSerializer/package.json +8 -12
  2. package/README.md +1 -3
  3. package/dist/cjs/IsolateSerializer.development.js +135 -0
  4. package/dist/cjs/IsolateSerializer.development.js.map +1 -0
  5. package/dist/cjs/IsolateSerializer.js +6 -0
  6. package/dist/cjs/IsolateSerializer.production.js +2 -0
  7. package/dist/cjs/IsolateSerializer.production.js.map +1 -0
  8. package/dist/cjs/package.json +1 -0
  9. package/dist/cjs/test-utils.development.js +61 -0
  10. package/dist/cjs/test-utils.development.js.map +1 -0
  11. package/dist/cjs/test-utils.js +6 -0
  12. package/dist/cjs/test-utils.production.js +2 -0
  13. package/dist/cjs/test-utils.production.js.map +1 -0
  14. package/dist/cjs/vestjs-runtime.development.js +686 -0
  15. package/dist/cjs/vestjs-runtime.development.js.map +1 -0
  16. package/dist/cjs/vestjs-runtime.js +6 -0
  17. package/dist/cjs/vestjs-runtime.production.js +2 -0
  18. package/dist/cjs/vestjs-runtime.production.js.map +1 -0
  19. package/dist/es/IsolateSerializer.development.js +133 -0
  20. package/dist/es/IsolateSerializer.development.js.map +1 -0
  21. package/dist/es/IsolateSerializer.production.js +2 -0
  22. package/dist/es/IsolateSerializer.production.js.map +1 -0
  23. package/dist/es/package.json +1 -0
  24. package/dist/es/test-utils.development.js +59 -0
  25. package/dist/es/test-utils.development.js.map +1 -0
  26. package/dist/es/test-utils.production.js +2 -0
  27. package/dist/es/test-utils.production.js.map +1 -0
  28. package/dist/es/vestjs-runtime.development.js +675 -0
  29. package/dist/es/vestjs-runtime.development.js.map +1 -0
  30. package/dist/es/vestjs-runtime.production.js +2 -0
  31. package/dist/es/vestjs-runtime.production.js.map +1 -0
  32. package/dist/umd/IsolateSerializer.development.js +138 -0
  33. package/dist/umd/IsolateSerializer.development.js.map +1 -0
  34. package/dist/umd/IsolateSerializer.production.js +2 -0
  35. package/dist/umd/IsolateSerializer.production.js.map +1 -0
  36. package/dist/umd/test-utils.development.js +67 -0
  37. package/dist/umd/test-utils.development.js.map +1 -0
  38. package/dist/umd/test-utils.production.js +2 -0
  39. package/dist/umd/test-utils.production.js.map +1 -0
  40. package/dist/umd/vestjs-runtime.development.js +688 -0
  41. package/dist/umd/vestjs-runtime.development.js.map +1 -0
  42. package/dist/umd/vestjs-runtime.production.js +2 -0
  43. package/dist/umd/vestjs-runtime.production.js.map +1 -0
  44. package/package.json +87 -42
  45. package/test-utils/package.json +8 -12
  46. package/types/IsolateSerializer.d.ts +42 -0
  47. package/types/IsolateSerializer.d.ts.map +1 -0
  48. package/types/test-utils.d.ts +37 -0
  49. package/types/test-utils.d.ts.map +1 -0
  50. package/types/vestjs-runtime.d.ts +257 -351
  51. package/types/vestjs-runtime.d.ts.map +1 -0
  52. package/vitest.config.ts +17 -9
  53. package/dist/IsolateKeys-B21aPuBk.mjs +0 -23
  54. package/dist/IsolateKeys-B21aPuBk.mjs.map +0 -1
  55. package/dist/IsolateKeys-CCvALpZC.cjs +0 -35
  56. package/dist/IsolateKeys-CCvALpZC.cjs.map +0 -1
  57. package/dist/IsolateSerializer-B1hE3gmT.mjs +0 -1004
  58. package/dist/IsolateSerializer-B1hE3gmT.mjs.map +0 -1
  59. package/dist/IsolateSerializer-pbEf5gB2.cjs +0 -1121
  60. package/dist/IsolateSerializer-pbEf5gB2.cjs.map +0 -1
  61. package/dist/chunk-CLMFDpHK.mjs +0 -18
  62. package/dist/exports/IsolateSerializer.cjs +0 -4
  63. package/dist/exports/IsolateSerializer.mjs +0 -4
  64. package/dist/exports/test-utils.cjs +0 -21
  65. package/dist/exports/test-utils.cjs.map +0 -1
  66. package/dist/exports/test-utils.mjs +0 -21
  67. package/dist/exports/test-utils.mjs.map +0 -1
  68. package/dist/vestjs-runtime.cjs +0 -153
  69. package/dist/vestjs-runtime.cjs.map +0 -1
  70. package/dist/vestjs-runtime.mjs +0 -117
  71. package/dist/vestjs-runtime.mjs.map +0 -1
  72. package/docs/IsolateRegistry.docs.md +0 -146
  73. package/docs/Isolates.md +0 -97
  74. package/src/Bus.ts +0 -46
  75. package/src/Isolate/Isolate.ts +0 -163
  76. package/src/Isolate/IsolateFocused.ts +0 -93
  77. package/src/Isolate/IsolateIndexer.ts +0 -42
  78. package/src/Isolate/IsolateInspector.ts +0 -93
  79. package/src/Isolate/IsolateKeys.ts +0 -18
  80. package/src/Isolate/IsolateMutator.ts +0 -165
  81. package/src/Isolate/IsolateRegistry.ts +0 -176
  82. package/src/Isolate/IsolateReorderable.ts +0 -11
  83. package/src/Isolate/IsolateSelectors.ts +0 -25
  84. package/src/Isolate/IsolateStateMachine.ts +0 -30
  85. package/src/Isolate/IsolateStatus.ts +0 -8
  86. package/src/Isolate/IsolateTransient.ts +0 -27
  87. package/src/Isolate/IsolateTypes.ts +0 -33
  88. package/src/Isolate/__tests__/Isolate.test.ts +0 -123
  89. package/src/Isolate/__tests__/IsolateFocused.test.ts +0 -199
  90. package/src/Isolate/__tests__/IsolateInspector.test.ts +0 -136
  91. package/src/Isolate/__tests__/IsolateMutator.test.ts +0 -164
  92. package/src/Isolate/__tests__/IsolatePropagation.test.ts +0 -170
  93. package/src/Isolate/__tests__/IsolateReorderable.test.ts +0 -111
  94. package/src/Isolate/__tests__/IsolateSelectors.test.ts +0 -72
  95. package/src/Isolate/__tests__/IsolateStatus.test.ts +0 -44
  96. package/src/Isolate/__tests__/IsolateTransient.test.ts +0 -58
  97. package/src/Isolate/__tests__/__snapshots__/asyncIsolate.test.ts.snap +0 -71
  98. package/src/Isolate/__tests__/asyncIsolate.test.ts +0 -85
  99. package/src/IsolateWalker.ts +0 -359
  100. package/src/Orchestrator/RuntimeStates.ts +0 -4
  101. package/src/Reconciler.ts +0 -178
  102. package/src/RuntimeEvents.ts +0 -9
  103. package/src/VestRuntime.ts +0 -421
  104. package/src/__tests__/Bus.test.ts +0 -57
  105. package/src/__tests__/IsolateWalker.iterative.test.ts +0 -77
  106. package/src/__tests__/IsolateWalker.test.ts +0 -418
  107. package/src/__tests__/Reconciler.test.ts +0 -193
  108. package/src/__tests__/Reconciler.transient.test.ts +0 -166
  109. package/src/__tests__/VestRuntime.test.ts +0 -212
  110. package/src/__tests__/VestRuntimeStateMachine.test.ts +0 -36
  111. package/src/__tests__/vestjs-runtime.test.ts +0 -19
  112. package/src/errors/ErrorStrings.ts +0 -6
  113. package/src/exports/IsolateSerializer.ts +0 -131
  114. package/src/exports/__tests__/IsolateSerializer.test.ts +0 -334
  115. package/src/exports/__tests__/IsolateSerializer.transient.test.ts +0 -101
  116. package/src/exports/__tests__/__snapshots__/IsolateSerializer.test.ts.snap +0 -5
  117. package/src/exports/test-utils.ts +0 -17
  118. package/src/vestjs-runtime.ts +0 -28
  119. package/types/Isolate-DChR7h5K.d.mts +0 -58
  120. package/types/Isolate-DChR7h5K.d.mts.map +0 -1
  121. package/types/Isolate-HYIh82M8.d.cts +0 -58
  122. package/types/Isolate-HYIh82M8.d.cts.map +0 -1
  123. package/types/IsolateSerializer-BCg01Px5.d.mts +0 -13
  124. package/types/IsolateSerializer-BCg01Px5.d.mts.map +0 -1
  125. package/types/IsolateSerializer-CQpP6A4m.d.cts +0 -13
  126. package/types/IsolateSerializer-CQpP6A4m.d.cts.map +0 -1
  127. package/types/exports/IsolateSerializer.d.cts +0 -3
  128. package/types/exports/IsolateSerializer.d.mts +0 -3
  129. package/types/exports/test-utils.d.cts +0 -7
  130. package/types/exports/test-utils.d.cts.map +0 -1
  131. package/types/exports/test-utils.d.mts +0 -7
  132. package/types/exports/test-utils.d.mts.map +0 -1
  133. package/types/vestjs-runtime.d.cts +0 -372
  134. package/types/vestjs-runtime.d.cts.map +0 -1
  135. package/types/vestjs-runtime.d.mts +0 -370
  136. package/types/vestjs-runtime.d.mts.map +0 -1
@@ -1,370 +0,0 @@
1
- import { a as IsolateStatus, i as TIsolate, n as IsolateKey, o as IsolateKeys, r as IsolatePayload, t as Isolate } from "./Isolate-DChR7h5K.mjs";
2
- import { t as IsolateSerializer } from "./IsolateSerializer-BCg01Px5.mjs";
3
- import { BusType, CB, DynamicValue, Maybe, Nullable, Nullish, OneOrMoreOf, Result, TinyState } from "vest-utils";
4
-
5
- //#region src/RuntimeEvents.d.ts
6
- type RuntimeEvents = {
7
- ASYNC_ISOLATE_DONE: TIsolate;
8
- ISOLATE_DONE: TIsolate;
9
- ISOLATE_ENTER: TIsolate;
10
- ISOLATE_PENDING: TIsolate;
11
- ISOLATE_RECONCILED: TIsolate;
12
- };
13
- //#endregion
14
- //#region src/Reconciler.d.ts
15
- interface IReconciler<I = any> {
16
- (currentNode: I, historyNode: I): Nullable<I>;
17
- }
18
- declare class Reconciler {
19
- /**
20
- * Reconciles the current isolate with the history isolate.
21
- * If the current isolate is of a different type than the history isolate,
22
- * the current isolate is returned.
23
- * Otherwise, the reconciler function is called to determine the next isolate.
24
- * If the reconciler function returns null or undefined, the base reconciler is used.
25
- * If no history isolate exists, the current isolate is returned.
26
- * @param node The current isolate to reconcile.
27
- * @returns The next isolate after reconciliation.
28
- */
29
- static reconcile(node: TIsolate): TIsolate;
30
- static dropNextNodesOnReorder<I extends TIsolate>(reorderLogic: (newNode: I, prevNode: Maybe<TIsolate>) => boolean, newNode: I, prevNode: Maybe<TIsolate>): boolean;
31
- static handleIsolateNodeWithKey<I extends TIsolate>(node: TIsolate, revoke: ((node: I) => boolean) | false): TIsolate;
32
- }
33
- declare namespace IsolateWalker_d_exports {
34
- export { closest, closestExists, every, find, findAll, findClosest, has, mapFirst, pluck, reduce, some, walk };
35
- }
36
- type VisitOnlyPredicate = (isolate: TIsolate) => boolean;
37
- /**
38
- * Walks the isolate tree starting from the given node.
39
- * @param startNode - The starting node for the traversal.
40
- * @param callback - The callback function to be called for each visited node.
41
- * @param visitOnly - Optional predicate to filter which nodes to visit.
42
- */
43
- declare function walk(startNode: TIsolate, callback: (isolate: TIsolate) => Result<void>, visitOnly?: VisitOnlyPredicate): Result<void>;
44
- /**
45
- * Reduces the isolate tree to a single value.
46
- * @param startNode - The starting node for the traversal.
47
- * @param callback - The reducer function.
48
- * @param initialValue - The initial value for the accumulator.
49
- * @param visitOnly - Optional predicate to filter which nodes to visit.
50
- * @returns The final accumulated value.
51
- */
52
- declare function reduce<T>(startNode: TIsolate, callback: (acc: T, isolate: TIsolate) => Result<T>, initialValue: T, visitOnly?: VisitOnlyPredicate): T;
53
- /**
54
- * Checks if any node in the tree satisfies the predicate.
55
- * @param startNode - The starting node for the traversal.
56
- * @param predicate - The predicate function to test each node.
57
- * @param visitOnly - Optional predicate to filter which nodes to visit.
58
- * @returns True if any node satisfies the predicate, false otherwise.
59
- */
60
- declare function some(startNode: TIsolate, predicate: (node: TIsolate) => boolean, visitOnly?: VisitOnlyPredicate): boolean;
61
- /**
62
- * Checks if the tree contains a node that matches the predicate.
63
- * @param startNode - The starting node for the traversal.
64
- * @param match - The predicate function to match nodes.
65
- * @returns True if a matching node is found, false otherwise.
66
- */
67
- declare function has(startNode: TIsolate, match: VisitOnlyPredicate): boolean;
68
- /**
69
- * Traverses up the tree to find the closest ancestor that satisfies the predicate,
70
- * then returns the first direct descendant of that ancestor that satisfies the predicate.
71
- * @param startNode - The starting node.
72
- * @param predicate - The predicate to match.
73
- * @returns The found node or null.
74
- */
75
- declare function findClosest<I extends TIsolate = TIsolate>(startNode: TIsolate, predicate: (node: TIsolate) => boolean): Nullable<I>;
76
- /**
77
- * Finds the first node in the tree that satisfies the predicate.
78
- * @param startNode - The starting node.
79
- * @param predicate - The predicate to match.
80
- * @param visitOnly - Optional predicate to filter which nodes to visit.
81
- * @returns The found node or null.
82
- */
83
- declare function find(startNode: TIsolate, predicate: (node: TIsolate) => boolean, visitOnly?: VisitOnlyPredicate): Nullable<TIsolate>;
84
- /**
85
- * Finds all nodes in the tree that satisfy the predicate.
86
- * @param startNode - The starting node.
87
- * @param predicate - The predicate to match.
88
- * @param visitOnly - Optional predicate to filter which nodes to visit.
89
- * @returns An array of found nodes.
90
- */
91
- declare function findAll(startNode: TIsolate, predicate: (node: TIsolate) => boolean, visitOnly?: VisitOnlyPredicate): TIsolate[];
92
- /**
93
- * Checks if every node in the tree satisfies the predicate.
94
- * @param startNode - The starting node.
95
- * @param predicate - The predicate to match.
96
- * @param visitOnly - Optional predicate to filter which nodes to visit.
97
- * @returns True if all nodes satisfy the predicate, false otherwise.
98
- */
99
- declare function every(startNode: TIsolate, predicate: (node: TIsolate) => boolean, visitOnly?: VisitOnlyPredicate): boolean;
100
- /**
101
- * Removes nodes from the tree that satisfy the predicate.
102
- * @param startNode - The starting node.
103
- * @param predicate - The predicate to match nodes to remove.
104
- * @param visitOnly - Optional predicate to filter which nodes to visit.
105
- */
106
- declare function pluck(startNode: TIsolate, predicate: (node: TIsolate) => boolean, visitOnly?: VisitOnlyPredicate): void;
107
- /**
108
- * Finds the closest ancestor of the startNode that satisfies the predicate.
109
- * @param startNode - The starting node.
110
- * @param predicate - The predicate to match.
111
- * @returns The found ancestor or null.
112
- */
113
- declare function closest<I extends TIsolate = TIsolate>(startNode: TIsolate, predicate: (node: TIsolate) => boolean): Nullable<I>;
114
- /**
115
- * Checks if an ancestor satisfying the predicate exists.
116
- * @param startNode - The starting node.
117
- * @param predicate - The predicate to match.
118
- * @returns True if such an ancestor exists, false otherwise.
119
- */
120
- declare function closestExists(startNode: TIsolate, predicate: (node: TIsolate) => boolean): boolean;
121
- /**
122
- * Traverses the tree and returns the first non-nullish value returned by the callback.
123
- * It optimizes traversal by only visiting nodes that have pending isolates or are pending themselves.
124
- */
125
- declare function mapFirst<T>(startNode: TIsolate, callback: (isolate: TIsolate, breakout: (value: T) => void) => void): T | null;
126
- //#endregion
127
- //#region src/Orchestrator/RuntimeStates.d.ts
128
- declare enum RuntimeState {
129
- PENDING = "PENDING",
130
- STABLE = "STABLE",
131
- }
132
- //#endregion
133
- //#region src/VestRuntime.d.ts
134
- /**
135
- * The state reference type for the Vest runtime.
136
- * Holds all mutable state for the runtime instance.
137
- */
138
- type StateRefType = {
139
- Bus: BusType<RuntimeEvents>;
140
- appData: Record<string, any>;
141
- historyRoot: TinyState<Nullable<TIsolate>>;
142
- Reconciler: IReconciler;
143
- implicitOnlyNodes: Set<TIsolate>;
144
- };
145
- /**
146
- * Retrieves the current runtime state (e.g., STABLE, PENDING).
147
- */
148
- declare function useRuntimeState(): RuntimeState;
149
- /**
150
- * Checks if the runtime is currently stable (no pending tests).
151
- */
152
- declare function useIsStable(): boolean;
153
- /**
154
- * Retrieves the application-specific data stored in the runtime.
155
- */
156
- declare function useXAppData<T = object>(): T;
157
- /**
158
- * Creates a new state reference for such as the history root, pending isolates, and the current runtime state.
159
- */
160
- declare function createRef(Reconciler: IReconciler, setter: DynamicValue<Record<string, any>>): StateRefType;
161
- /**
162
- * Dispatches a runtime event to the internal Bus.
163
- * This is used to trigger state changes and notifications.
164
- */
165
- declare function dispatch<T extends keyof RuntimeEvents>(event: RuntimeEvents[T] extends void ? {
166
- type: T;
167
- payload?: void;
168
- } : {
169
- type: T;
170
- payload: RuntimeEvents[T];
171
- }): void;
172
- /**
173
- * Registers an isolate as pending.
174
- * This is used to track async tests and other async operations.
175
- */
176
- declare function registerPending(isolate: TIsolate): void;
177
- /**
178
- * Removes an isolate from the pending set.
179
- * This is used when an async test or operation completes.
180
- */
181
- declare function removePending(isolate: TIsolate): void;
182
- /**
183
- * Persists the current runtime context to a callback function.
184
- * This allows the callback to be executed later (e.g. in an async operation)
185
- * while still having access to the correct runtime context.
186
- */
187
- declare function persist<T extends (...args: any[]) => any>(cb: T): T;
188
- /**
189
- * Retrieves the history root state.
190
- */
191
- declare function useHistoryRoot(): any;
192
- /**
193
- * Sets the history root for the runtime.
194
- * This is used to hydrate the runtime with previous results.
195
- */
196
- declare function useSetHistoryRoot(history: TIsolate): void;
197
- /**
198
- * Retrieves the current cursor position within the active isolate.
199
- */
200
- declare function useCurrentCursor(): number;
201
- /**
202
- * Adds a child isolate to the current isolate and sets the parent-child relationship.
203
- */
204
- declare function useSetNextIsolateChild(child: TIsolate): void;
205
- /**
206
- * Returns the available root isolate.
207
- * If a runtime root exists (i.e. we are currently running a suite), it returns that.
208
- * Otherwise, it returns the history root (i.e. the result of the last run).
209
- */
210
- declare function useAvailableRoot<I extends TIsolate = TIsolate>(): I;
211
- /**
212
- * Checks whether a specific key is heavily focused out.
213
- */
214
- declare function useIsFocusedOut(key?: string): boolean;
215
- declare function hasImplicitOnly(): boolean;
216
- /**
217
- * Resets the history root.
218
- */
219
- declare function reset(): void;
220
- declare const RuntimeApi: {
221
- Run: any;
222
- createRef: typeof createRef;
223
- dispatch: typeof dispatch;
224
- hasImplicitOnly: typeof hasImplicitOnly;
225
- persist: typeof persist;
226
- registerPending: typeof registerPending;
227
- removePending: typeof removePending;
228
- reset: typeof reset;
229
- useAvailableRoot: typeof useAvailableRoot;
230
- useCurrentCursor: typeof useCurrentCursor;
231
- useHistoryRoot: typeof useHistoryRoot;
232
- useIsFocusedOut: typeof useIsFocusedOut;
233
- useIsStable: typeof useIsStable;
234
- useRuntimeState: typeof useRuntimeState;
235
- useSetHistoryRoot: typeof useSetHistoryRoot;
236
- useSetNextIsolateChild: typeof useSetNextIsolateChild;
237
- useXAppData: typeof useXAppData;
238
- };
239
- //#endregion
240
- //#region src/Isolate/IsolateInspector.d.ts
241
- declare class IsolateInspector {
242
- static at(isolate: Nullable<TIsolate>, at: number): Nullable<TIsolate>;
243
- static cursor(isolate: Nullable<TIsolate>): number;
244
- static canReorder<I extends TIsolate>(isolate: Nullable<I>): boolean;
245
- static allowsReorder<I extends Record<any, any>>(isolate: Nullable<I>): boolean;
246
- static usesKey(isolate: Nullable<TIsolate>): boolean;
247
- static getChildByKey(isolate: Nullable<TIsolate>, key: string): Nullable<TIsolate>;
248
- static getStatus(isolate: Nullable<TIsolate>): IsolateStatus;
249
- static statusEquals(isolate: Nullable<TIsolate>, status: IsolateStatus): boolean;
250
- static isPending(isolate: Nullable<TIsolate>): boolean;
251
- static isHasPending(isolate: Nullable<TIsolate>): boolean;
252
- static hasPending(isolate: Nullable<TIsolate>): boolean;
253
- static hasActiveChildren(isolate: Nullable<TIsolate>): boolean;
254
- static getParent(isolate: Nullable<TIsolate>): Nullable<TIsolate>;
255
- }
256
- //#endregion
257
- //#region src/Isolate/IsolateMutator.d.ts
258
- declare class IsolateMutator {
259
- static setParent(isolate: TIsolate, parent: Nullable<TIsolate>): TIsolate;
260
- static saveOutput(isolate: TIsolate, output: any): TIsolate;
261
- static setKey(isolate: TIsolate, key: Nullable<string>): TIsolate;
262
- static addChild(isolate: TIsolate, child: TIsolate): void;
263
- static removeChild(isolate: TIsolate, node: TIsolate): void;
264
- static addChildKey(isolate: TIsolate, key: string, node: TIsolate): void;
265
- static slice(isolate: TIsolate, at: number): void;
266
- static setData(isolate: TIsolate, data: any): void;
267
- static abort(isolate: TIsolate, reason?: string): void;
268
- static setStatus(isolate: TIsolate, status: IsolateStatus, payload?: any): Result<IsolateStatus, string>;
269
- static setPending(isolate: TIsolate): void;
270
- static setHasPending(isolate: TIsolate): Result<IsolateStatus, string>;
271
- static setDone(isolate: TIsolate): void;
272
- }
273
- declare namespace Bus_d_exports {
274
- export { useBus, useEmit, usePrepareEmitter };
275
- }
276
- declare function useBus<E extends Record<string, any> = RuntimeEvents>(): BusType<E>;
277
- declare function useEmit<E extends Record<string, any> = RuntimeEvents, T extends keyof E = keyof E>(event: T, ...args: E[T] extends void ? [payload?: E[T]] : [payload: E[T]]): void;
278
- declare function useEmit<_E extends Record<string, any> = RuntimeEvents>(): (event: string, data?: any) => void;
279
- declare function usePrepareEmitter<E extends Record<string, any> = RuntimeEvents, T extends keyof E = keyof E>(event: T): (arg: E[T]) => void;
280
- declare namespace IsolateSelectors_d_exports {
281
- export { isIsolateType, isSameIsolateIdentity, isSameIsolateType };
282
- }
283
- declare function isIsolateType<I extends TIsolate>(node: Maybe<TIsolate>, type: string): node is I;
284
- declare function isSameIsolateType<A extends TIsolate, B extends TIsolate>(a: A, b: B): boolean;
285
- declare function isSameIsolateIdentity<A extends TIsolate, B extends TIsolate>(a: A, b: B): boolean;
286
- //#endregion
287
- //#region src/Isolate/IsolateStateMachine.d.ts
288
- declare const IsolateStateMachine: any;
289
- declare namespace IsolateRegistry_d_exports {
290
- export { RegistryCategoryConfig, RegistryIndex, useClearRegistry, useGetFromRegistry, useHasFromRegistry, useRemoveFieldFromRegistry, useUpdateRegistry };
291
- }
292
- /**
293
- * A registry index, mapping group keys (like field names) to sets of isolates.
294
- */
295
- type RegistryIndex = Map<string, Set<TIsolate>>;
296
- /**
297
- * Configuration for a registry category.
298
- */
299
- type RegistryCategoryConfig = {
300
- predicate: (isolate: TIsolate) => boolean;
301
- getKey: (isolate: TIsolate) => string;
302
- };
303
- /**
304
- * Updates the registration of an isolate in all relevant indices based on provided predicates.
305
- *
306
- * @param isolate - The isolate node to update.
307
- * @param predicates - A record of category keys and their corresponding predicate configurations.
308
- */
309
- declare function useUpdateRegistry(isolate: TIsolate, predicates: Record<string, RegistryCategoryConfig>): void;
310
- /**
311
- * Retrieves isolates from the registry based on a category and an optional key.
312
- */
313
- declare function useGetFromRegistry(category: string, key?: string): Set<TIsolate>;
314
- /**
315
- * Checks if the registry contains any isolates for a given category and optional key.
316
- */
317
- declare function useHasFromRegistry(category: string, key?: string): boolean;
318
- /**
319
- * Removes all entries for a specific key from the registry.
320
- */
321
- declare function useRemoveFieldFromRegistry(key: string): void;
322
- /**
323
- * Clears all registry entries from the root isolate.
324
- */
325
- declare function useClearRegistry(root: TIsolate): void;
326
- //#endregion
327
- //#region src/Isolate/IsolateReorderable.d.ts
328
- declare function IsolateReorderable(callback: CB, type?: string, payload?: Record<string, any>): TIsolate<IsolatePayload<Record<string, any>>>;
329
- //#endregion
330
- //#region src/Isolate/IsolateTransient.d.ts
331
- /**
332
- * Creates a transient isolate.
333
- *
334
- * Transient isolates are isolates that:
335
- * 1. Do not persist in the history tree.
336
- * 2. Are not reconciled with previous runs.
337
- * 3. Do not appear in the serialized suite dump.
338
- * 4. Do not interfere with the index of their siblings (they are skipped by the reconciler).
339
- *
340
- * This is useful for "structural" isolates that are used for control flow or grouping
341
- * but do not hold state that needs to be preserved between runs, such as `focused` (skip/only) isolates.
342
- */
343
- declare function IsolateTransient<Payload extends IsolatePayload>(callback: CB, type?: string, payload?: Payload): TIsolate<Payload>;
344
- //#endregion
345
- //#region src/Isolate/IsolateFocused.d.ts
346
- declare enum FocusModes {
347
- SKIP = "skip",
348
- ONLY = "only",
349
- }
350
- type FocusMatchExclusion = Maybe<OneOrMoreOf<string>>;
351
- type TIsolateFocused = TIsolate<IsolateFocusedPayload>;
352
- type IsolateFocusedPayload = {
353
- focusMode: FocusModes;
354
- match: FocusMatchExclusion;
355
- matchAll: boolean;
356
- };
357
- /**
358
- * Creates a focused isolate.
359
- * Focused isolates are transient because they only affect the current run
360
- * and do not need to be preserved in history or appearing in the suite result.
361
- */
362
- declare function IsolateFocused(focusMode: FocusModes, match?: true | FocusMatchExclusion): TIsolateFocused | undefined;
363
- declare class FocusSelectors {
364
- static isSkipFocused(focus: Nullish<TIsolateFocused>, fieldName?: string): boolean;
365
- static isOnlyFocused(focus: Nullish<TIsolateFocused>, fieldName?: string): boolean;
366
- static isIsolateFocused(isolate: TIsolate): isolate is TIsolateFocused;
367
- }
368
- //#endregion
369
- export { Bus_d_exports as Bus, FocusModes, FocusSelectors, type IReconciler, Isolate, IsolateFocused, IsolateInspector, type IsolateKey, IsolateKeys, IsolateMutator, IsolateRegistry_d_exports as IsolateRegistry, IsolateReorderable, IsolateSelectors_d_exports as IsolateSelectors, IsolateSerializer, IsolateStateMachine, IsolateStatus, IsolateTransient, Reconciler, type RegistryCategoryConfig, type RegistryIndex, type RuntimeEvents, type TIsolate, type TIsolateFocused, RuntimeApi as VestRuntime, IsolateWalker_d_exports as Walker };
370
- //# sourceMappingURL=vestjs-runtime.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vestjs-runtime.d.mts","names":["TIsolate","RuntimeEvents","Maybe","Nullable","TIsolate","IReconciler","I","Reconciler","Nullable","Result","TIsolate","VisitOnlyPredicate","walk","reduce","T","some","has","findClosest","I","find","findAll","every","pluck","closest","closestExists","mapFirst","RuntimeState","RuntimeEvents","TinyState","BusType","Nullable","DynamicValue","TIsolate","IReconciler","RuntimeState","CTXType","StateRefType","Record","Set","Run","useRuntimeState","useIsStable","useXAppData","T","createRef","dispatch","registerPending","removePending","useReconciler","persist","useX","useHistoryRoot","useHistoryIsolate","__Isolate_IsolateTypes0","IsolatePayload","useHistoryIsolateAtCurrentPosition","useSetHistoryRoot","useHistoryKey","useIsolate","useCurrentCursor","useRuntimeRoot","useSetNextIsolateChild","useSetIsolateKey","useAvailableRoot","I","useIsFocusedOut","hasImplicitOnly","reset","RuntimeApi","Nullable","TIsolate","IsolateStatus","IsolateInspector","I","Record","Nullable","Result","IsolateStatus","TIsolate","IsolateMutator","BusType","RuntimeEvents","useBus","E","Record","useEmit","T","_E","usePrepareEmitter","Maybe","TIsolate","isIsolateType","I","isSameIsolateType","A","B","isSameIsolateIdentity","IsolateStateMachine","TIsolate","RegistryIndex","Set","Map","RegistryCategoryConfig","useUpdateRegistry","Record","useGetFromRegistry","useHasFromRegistry","useRemoveFieldFromRegistry","useClearRegistry","CB","IsolateReorderable","Record","__IsolateTypes0","IsolatePayload","TIsolate","CB","IsolatePayload","TIsolate","IsolateTransient","Payload","Maybe","Nullish","OneOrMoreOf","TIsolate","VestIsolateTypeFocused","FocusModes","FocusMatchExclusion","TIsolateFocused","IsolateFocusedPayload","IsolateFocused","FocusSelectors"],"sources":["../src/RuntimeEvents.d.ts","../src/Reconciler.d.ts","../src/IsolateWalker.d.ts","../src/Orchestrator/RuntimeStates.d.ts","../src/VestRuntime.d.ts","../src/Isolate/IsolateInspector.d.ts","../src/Isolate/IsolateMutator.d.ts","../src/Bus.d.ts","../src/Isolate/IsolateSelectors.d.ts","../src/Isolate/IsolateStateMachine.d.ts","../src/Isolate/IsolateRegistry.d.ts","../src/Isolate/IsolateReorderable.d.ts","../src/Isolate/IsolateTransient.d.ts","../src/Isolate/IsolateFocused.d.ts"],"sourcesContent":["import { TIsolate } from './Isolate/IsolateTypes';\nexport type RuntimeEvents = {\n ASYNC_ISOLATE_DONE: TIsolate;\n ISOLATE_DONE: TIsolate;\n ISOLATE_ENTER: TIsolate;\n ISOLATE_PENDING: TIsolate;\n ISOLATE_RECONCILED: TIsolate;\n};\n","import { Maybe, Nullable } from 'vest-utils';\nimport { type TIsolate } from './Isolate/Isolate';\nexport interface IReconciler<I = any> {\n (currentNode: I, historyNode: I): Nullable<I>;\n}\nexport declare class Reconciler {\n /**\n * Reconciles the current isolate with the history isolate.\n * If the current isolate is of a different type than the history isolate,\n * the current isolate is returned.\n * Otherwise, the reconciler function is called to determine the next isolate.\n * If the reconciler function returns null or undefined, the base reconciler is used.\n * If no history isolate exists, the current isolate is returned.\n * @param node The current isolate to reconcile.\n * @returns The next isolate after reconciliation.\n */\n static reconcile(node: TIsolate): TIsolate;\n static dropNextNodesOnReorder<I extends TIsolate>(reorderLogic: (newNode: I, prevNode: Maybe<TIsolate>) => boolean, newNode: I, prevNode: Maybe<TIsolate>): boolean;\n static handleIsolateNodeWithKey<I extends TIsolate>(node: TIsolate, revoke: ((node: I) => boolean) | false): TIsolate;\n}\n","import { Nullable, Result } from 'vest-utils';\nimport { type TIsolate } from './Isolate/Isolate';\ntype VisitOnlyPredicate = (isolate: TIsolate) => boolean;\n/**\n * Walks the isolate tree starting from the given node.\n * @param startNode - The starting node for the traversal.\n * @param callback - The callback function to be called for each visited node.\n * @param visitOnly - Optional predicate to filter which nodes to visit.\n */\nexport declare function walk(startNode: TIsolate, callback: (isolate: TIsolate) => Result<void>, visitOnly?: VisitOnlyPredicate): Result<void>;\n/**\n * Reduces the isolate tree to a single value.\n * @param startNode - The starting node for the traversal.\n * @param callback - The reducer function.\n * @param initialValue - The initial value for the accumulator.\n * @param visitOnly - Optional predicate to filter which nodes to visit.\n * @returns The final accumulated value.\n */\nexport declare function reduce<T>(startNode: TIsolate, callback: (acc: T, isolate: TIsolate) => Result<T>, initialValue: T, visitOnly?: VisitOnlyPredicate): T;\n/**\n * Checks if any node in the tree satisfies the predicate.\n * @param startNode - The starting node for the traversal.\n * @param predicate - The predicate function to test each node.\n * @param visitOnly - Optional predicate to filter which nodes to visit.\n * @returns True if any node satisfies the predicate, false otherwise.\n */\nexport declare function some(startNode: TIsolate, predicate: (node: TIsolate) => boolean, visitOnly?: VisitOnlyPredicate): boolean;\n/**\n * Checks if the tree contains a node that matches the predicate.\n * @param startNode - The starting node for the traversal.\n * @param match - The predicate function to match nodes.\n * @returns True if a matching node is found, false otherwise.\n */\nexport declare function has(startNode: TIsolate, match: VisitOnlyPredicate): boolean;\n/**\n * Traverses up the tree to find the closest ancestor that satisfies the predicate,\n * then returns the first direct descendant of that ancestor that satisfies the predicate.\n * @param startNode - The starting node.\n * @param predicate - The predicate to match.\n * @returns The found node or null.\n */\nexport declare function findClosest<I extends TIsolate = TIsolate>(startNode: TIsolate, predicate: (node: TIsolate) => boolean): Nullable<I>;\n/**\n * Finds the first node in the tree that satisfies the predicate.\n * @param startNode - The starting node.\n * @param predicate - The predicate to match.\n * @param visitOnly - Optional predicate to filter which nodes to visit.\n * @returns The found node or null.\n */\nexport declare function find(startNode: TIsolate, predicate: (node: TIsolate) => boolean, visitOnly?: VisitOnlyPredicate): Nullable<TIsolate>;\n/**\n * Finds all nodes in the tree that satisfy the predicate.\n * @param startNode - The starting node.\n * @param predicate - The predicate to match.\n * @param visitOnly - Optional predicate to filter which nodes to visit.\n * @returns An array of found nodes.\n */\nexport declare function findAll(startNode: TIsolate, predicate: (node: TIsolate) => boolean, visitOnly?: VisitOnlyPredicate): TIsolate[];\n/**\n * Checks if every node in the tree satisfies the predicate.\n * @param startNode - The starting node.\n * @param predicate - The predicate to match.\n * @param visitOnly - Optional predicate to filter which nodes to visit.\n * @returns True if all nodes satisfy the predicate, false otherwise.\n */\nexport declare function every(startNode: TIsolate, predicate: (node: TIsolate) => boolean, visitOnly?: VisitOnlyPredicate): boolean;\n/**\n * Removes nodes from the tree that satisfy the predicate.\n * @param startNode - The starting node.\n * @param predicate - The predicate to match nodes to remove.\n * @param visitOnly - Optional predicate to filter which nodes to visit.\n */\nexport declare function pluck(startNode: TIsolate, predicate: (node: TIsolate) => boolean, visitOnly?: VisitOnlyPredicate): void;\n/**\n * Finds the closest ancestor of the startNode that satisfies the predicate.\n * @param startNode - The starting node.\n * @param predicate - The predicate to match.\n * @returns The found ancestor or null.\n */\nexport declare function closest<I extends TIsolate = TIsolate>(startNode: TIsolate, predicate: (node: TIsolate) => boolean): Nullable<I>;\n/**\n * Checks if an ancestor satisfying the predicate exists.\n * @param startNode - The starting node.\n * @param predicate - The predicate to match.\n * @returns True if such an ancestor exists, false otherwise.\n */\nexport declare function closestExists(startNode: TIsolate, predicate: (node: TIsolate) => boolean): boolean;\n/**\n * Traverses the tree and returns the first non-nullish value returned by the callback.\n * It optimizes traversal by only visiting nodes that have pending isolates or are pending themselves.\n */\nexport declare function mapFirst<T>(startNode: TIsolate, callback: (isolate: TIsolate, breakout: (value: T) => void) => void): T | null;\nexport {};\n","export declare enum RuntimeState {\n PENDING = \"PENDING\",\n STABLE = \"STABLE\"\n}\n","import { RuntimeEvents } from './RuntimeEvents';\nimport { TinyState, BusType, Nullable, DynamicValue } from 'vest-utils';\nimport { TIsolate } from './Isolate/Isolate';\nimport { IReconciler } from './Reconciler';\nimport { RuntimeState } from './Orchestrator/RuntimeStates';\ntype CTXType = StateRefType & {\n historyNode: Nullable<TIsolate>;\n runtimeNode: Nullable<TIsolate>;\n runtimeRoot: Nullable<TIsolate>;\n stateRef: StateRefType;\n};\n/**\n * The state reference type for the Vest runtime.\n * Holds all mutable state for the runtime instance.\n */\nexport type StateRefType = {\n Bus: BusType<RuntimeEvents>;\n appData: Record<string, any>;\n historyRoot: TinyState<Nullable<TIsolate>>;\n Reconciler: IReconciler;\n implicitOnlyNodes: Set<TIsolate>;\n};\n/**\n * Runs a function within the Vest runtime context.\n * This is the main entry point for executing Vest suites.\n */\nexport declare const Run: any;\n/**\n * Retrieves the current runtime state (e.g., STABLE, PENDING).\n */\nexport declare function useRuntimeState(): RuntimeState;\n/**\n * Checks if the runtime is currently stable (no pending tests).\n */\nexport declare function useIsStable(): boolean;\n/**\n * Retrieves the application-specific data stored in the runtime.\n */\nexport declare function useXAppData<T = object>(): T;\n/**\n * Creates a new state reference for such as the history root, pending isolates, and the current runtime state.\n */\nexport declare function createRef(Reconciler: IReconciler, setter: DynamicValue<Record<string, any>>): StateRefType;\n/**\n * Dispatches a runtime event to the internal Bus.\n * This is used to trigger state changes and notifications.\n */\nexport declare function dispatch<T extends keyof RuntimeEvents>(event: RuntimeEvents[T] extends void ? {\n type: T;\n payload?: void;\n} : {\n type: T;\n payload: RuntimeEvents[T];\n}): void;\n/**\n * Registers an isolate as pending.\n * This is used to track async tests and other async operations.\n */\nexport declare function registerPending(isolate: TIsolate): void;\n/**\n * Removes an isolate from the pending set.\n * This is used when an async test or operation completes.\n */\nexport declare function removePending(isolate: TIsolate): void;\n/**\n * Retrieves the Reconciler used by the current runtime.\n */\nexport declare function useReconciler(): IReconciler<any>;\n/**\n * Persists the current runtime context to a callback function.\n * This allows the callback to be executed later (e.g. in an async operation)\n * while still having access to the correct runtime context.\n */\nexport declare function persist<T extends (...args: any[]) => any>(cb: T): T;\n/**\n * Retrieves the current runtime context.\n * Throws if called outside of a Vest runtime.\n */\nexport declare function useX<T = object>(): CTXType & T;\n/**\n * Retrieves the history root state.\n */\nexport declare function useHistoryRoot(): any;\n/**\n * Retrieves the current history isolate (the one matching the current runtime isolate).\n */\nexport declare function useHistoryIsolate(): Nullable<TIsolate<import(\"./Isolate/IsolateTypes\").IsolatePayload<Record<string, any>>>>;\n/**\n * Returns the history isolate at the current position.\n * If there is a parent isolate, it returns the history node from the parent's children.\n * Otherwise, it returns the history node.\n * @returns {Nullable<TIsolate>} The history isolate at the current position.\n */\nexport declare function useHistoryIsolateAtCurrentPosition(): any;\n/**\n * Sets the history root for the runtime.\n * This is used to hydrate the runtime with previous results.\n */\nexport declare function useSetHistoryRoot(history: TIsolate): void;\n/**\n * Retrieves a child isolate from the history tree by its key.\n */\nexport declare function useHistoryKey(key?: Nullable<string>): Nullable<TIsolate>;\n/**\n * Retrieves the currently active isolate in the runtime tree.\n */\nexport declare function useIsolate(): any;\n/**\n * Retrieves the current cursor position within the active isolate.\n */\nexport declare function useCurrentCursor(): number;\n/**\n * Retrieves the root of the current runtime tree.\n */\nexport declare function useRuntimeRoot(): Nullable<TIsolate<import(\"./Isolate/IsolateTypes\").IsolatePayload<Record<string, any>>>>;\n/**\n * Adds a child isolate to the current isolate and sets the parent-child relationship.\n */\nexport declare function useSetNextIsolateChild(child: TIsolate): void;\n/**\n * Sets a key for a child isolate within the current isolate.\n * Throws if the key is already taken.\n */\nexport declare function useSetIsolateKey(key: Nullable<string>, node: TIsolate): void;\n/**\n * Returns the available root isolate.\n * If a runtime root exists (i.e. we are currently running a suite), it returns that.\n * Otherwise, it returns the history root (i.e. the result of the last run).\n */\nexport declare function useAvailableRoot<I extends TIsolate = TIsolate>(): I;\n/**\n * Checks whether a specific key is heavily focused out.\n */\nexport declare function useIsFocusedOut(key?: string): boolean;\ndeclare function hasImplicitOnly(): boolean;\n/**\n * Resets the history root.\n */\nexport declare function reset(): void;\nexport declare const RuntimeApi: {\n Run: any;\n createRef: typeof createRef;\n dispatch: typeof dispatch;\n hasImplicitOnly: typeof hasImplicitOnly;\n persist: typeof persist;\n registerPending: typeof registerPending;\n removePending: typeof removePending;\n reset: typeof reset;\n useAvailableRoot: typeof useAvailableRoot;\n useCurrentCursor: typeof useCurrentCursor;\n useHistoryRoot: typeof useHistoryRoot;\n useIsFocusedOut: typeof useIsFocusedOut;\n useIsStable: typeof useIsStable;\n useRuntimeState: typeof useRuntimeState;\n useSetHistoryRoot: typeof useSetHistoryRoot;\n useSetNextIsolateChild: typeof useSetNextIsolateChild;\n useXAppData: typeof useXAppData;\n};\nexport {};\n","import { Nullable } from 'vest-utils';\nimport { TIsolate } from './Isolate';\nimport { IsolateStatus } from './IsolateStatus';\nexport declare class IsolateInspector {\n static at(isolate: Nullable<TIsolate>, at: number): Nullable<TIsolate>;\n static cursor(isolate: Nullable<TIsolate>): number;\n static canReorder<I extends TIsolate>(isolate: Nullable<I>): boolean;\n static allowsReorder<I extends Record<any, any>>(isolate: Nullable<I>): boolean;\n static usesKey(isolate: Nullable<TIsolate>): boolean;\n static getChildByKey(isolate: Nullable<TIsolate>, key: string): Nullable<TIsolate>;\n static getStatus(isolate: Nullable<TIsolate>): IsolateStatus;\n static statusEquals(isolate: Nullable<TIsolate>, status: IsolateStatus): boolean;\n static isPending(isolate: Nullable<TIsolate>): boolean;\n static isHasPending(isolate: Nullable<TIsolate>): boolean;\n static hasPending(isolate: Nullable<TIsolate>): boolean;\n static hasActiveChildren(isolate: Nullable<TIsolate>): boolean;\n static getParent(isolate: Nullable<TIsolate>): Nullable<TIsolate>;\n}\n","import { Nullable, Result } from 'vest-utils';\nimport { IsolateStatus } from './IsolateStatus';\nimport { TIsolate } from './Isolate';\nexport declare class IsolateMutator {\n static setParent(isolate: TIsolate, parent: Nullable<TIsolate>): TIsolate;\n static saveOutput(isolate: TIsolate, output: any): TIsolate;\n static setKey(isolate: TIsolate, key: Nullable<string>): TIsolate;\n static addChild(isolate: TIsolate, child: TIsolate): void;\n static removeChild(isolate: TIsolate, node: TIsolate): void;\n static addChildKey(isolate: TIsolate, key: string, node: TIsolate): void;\n static slice(isolate: TIsolate, at: number): void;\n static setData(isolate: TIsolate, data: any): void;\n static abort(isolate: TIsolate, reason?: string): void;\n static setStatus(isolate: TIsolate, status: IsolateStatus, payload?: any): Result<IsolateStatus, string>;\n static setPending(isolate: TIsolate): void;\n static setHasPending(isolate: TIsolate): Result<IsolateStatus, string>;\n static setDone(isolate: TIsolate): void;\n}\n","import { BusType } from 'vest-utils';\nimport { RuntimeEvents } from './RuntimeEvents';\nexport declare function useBus<E extends Record<string, any> = RuntimeEvents>(): BusType<E>;\nexport declare function useEmit<E extends Record<string, any> = RuntimeEvents, T extends keyof E = keyof E>(event: T, ...args: E[T] extends void ? [payload?: E[T]] : [payload: E[T]]): void;\nexport declare function useEmit<_E extends Record<string, any> = RuntimeEvents>(): (event: string, data?: any) => void;\nexport declare function usePrepareEmitter<E extends Record<string, any> = RuntimeEvents, T extends keyof E = keyof E>(event: T): (arg: E[T]) => void;\n","import { Maybe } from 'vest-utils';\nimport { TIsolate } from './Isolate';\nexport declare function isIsolateType<I extends TIsolate>(node: Maybe<TIsolate>, type: string): node is I;\nexport declare function isSameIsolateType<A extends TIsolate, B extends TIsolate>(a: A, b: B): boolean;\nexport declare function isSameIsolateIdentity<A extends TIsolate, B extends TIsolate>(a: A, b: B): boolean;\n","export declare const IsolateStateMachine: any;\n","import { TIsolate } from './Isolate';\n/**\n * A registry index, mapping group keys (like field names) to sets of isolates.\n */\nexport type RegistryIndex = Map<string, Set<TIsolate>>;\n/**\n * Configuration for a registry category.\n */\nexport type RegistryCategoryConfig = {\n predicate: (isolate: TIsolate) => boolean;\n getKey: (isolate: TIsolate) => string;\n};\n/**\n * Updates the registration of an isolate in all relevant indices based on provided predicates.\n *\n * @param isolate - The isolate node to update.\n * @param predicates - A record of category keys and their corresponding predicate configurations.\n */\nexport declare function useUpdateRegistry(isolate: TIsolate, predicates: Record<string, RegistryCategoryConfig>): void;\n/**\n * Retrieves isolates from the registry based on a category and an optional key.\n */\nexport declare function useGetFromRegistry(category: string, key?: string): Set<TIsolate>;\n/**\n * Checks if the registry contains any isolates for a given category and optional key.\n */\nexport declare function useHasFromRegistry(category: string, key?: string): boolean;\n/**\n * Removes all entries for a specific key from the registry.\n */\nexport declare function useRemoveFieldFromRegistry(key: string): void;\n/**\n * Clears all registry entries from the root isolate.\n */\nexport declare function useClearRegistry(root: TIsolate): void;\n","import { CB } from 'vest-utils';\nexport declare function IsolateReorderable(callback: CB, type?: string, payload?: Record<string, any>): import(\"./IsolateTypes\").TIsolate<import(\"./IsolateTypes\").IsolatePayload<Record<string, any>>>;\n","import { CB } from 'vest-utils';\nimport type { IsolatePayload, TIsolate } from './IsolateTypes';\n/**\n * Creates a transient isolate.\n *\n * Transient isolates are isolates that:\n * 1. Do not persist in the history tree.\n * 2. Are not reconciled with previous runs.\n * 3. Do not appear in the serialized suite dump.\n * 4. Do not interfere with the index of their siblings (they are skipped by the reconciler).\n *\n * This is useful for \"structural\" isolates that are used for control flow or grouping\n * but do not hold state that needs to be preserved between runs, such as `focused` (skip/only) isolates.\n */\nexport declare function IsolateTransient<Payload extends IsolatePayload>(callback: CB, type?: string, payload?: Payload): TIsolate<Payload>;\n","import { Maybe, Nullish, OneOrMoreOf } from 'vest-utils';\nimport { TIsolate } from './Isolate';\nexport declare const VestIsolateTypeFocused = \"Focused\";\nexport declare enum FocusModes {\n SKIP = \"skip\",\n ONLY = \"only\"\n}\nexport type FocusMatchExclusion = Maybe<OneOrMoreOf<string>>;\nexport type TIsolateFocused = TIsolate<IsolateFocusedPayload>;\ntype IsolateFocusedPayload = {\n focusMode: FocusModes;\n match: FocusMatchExclusion;\n matchAll: boolean;\n};\n/**\n * Creates a focused isolate.\n * Focused isolates are transient because they only affect the current run\n * and do not need to be preserved in history or appearing in the suite result.\n */\nexport declare function IsolateFocused(focusMode: FocusModes, match?: true | FocusMatchExclusion): TIsolateFocused | undefined;\nexport declare class FocusSelectors {\n static isSkipFocused(focus: Nullish<TIsolateFocused>, fieldName?: string): boolean;\n static isOnlyFocused(focus: Nullish<TIsolateFocused>, fieldName?: string): boolean;\n static isIsolateFocused(isolate: TIsolate): isolate is TIsolateFocused;\n}\nexport {};\n"],"mappings":";;;;;KACYC,aAAAA;sBACYD;gBACNA;iBACCA;mBACEA;EAJTC,kBAAa,EAKDD,QALC;CACDA;;;UCAPK;gBACCC,gBAAgBA,IAAIH,SAASG;;cAE1BC,UAAAA;EDJTN;;;;;;;;;;ECCKI,OAAAA,SAAW,CAAA,IAAAC,EAcDF,QAdC,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