@ersbeth/picoflow 2.0.3 → 2.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 (94) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -0
  3. package/dist/picoflow.js +204 -60
  4. package/dist/types/api/base/flowObservable.d.ts +3 -3
  5. package/dist/types/api/base/flowObservable.d.ts.map +1 -1
  6. package/dist/types/api/base/flowSubscribable.d.ts +2 -2
  7. package/dist/types/api/base/flowSubscribable.d.ts.map +1 -1
  8. package/dist/types/api/base/flowTracker.d.ts +1 -1
  9. package/dist/types/api/base/flowTracker.d.ts.map +1 -1
  10. package/dist/types/api/base/index.d.ts +4 -4
  11. package/dist/types/api/base/index.d.ts.map +1 -1
  12. package/dist/types/api/index.d.ts +2 -2
  13. package/dist/types/api/index.d.ts.map +1 -1
  14. package/dist/types/api/nodes/async/flowConstantAsync.d.ts +1 -1
  15. package/dist/types/api/nodes/async/flowConstantAsync.d.ts.map +1 -1
  16. package/dist/types/api/nodes/async/flowDerivationAsync.d.ts +3 -3
  17. package/dist/types/api/nodes/async/flowDerivationAsync.d.ts.map +1 -1
  18. package/dist/types/api/nodes/async/flowStateAsync.d.ts +3 -3
  19. package/dist/types/api/nodes/async/flowStateAsync.d.ts.map +1 -1
  20. package/dist/types/api/nodes/async/flowWritableDerivationAsync.d.ts +2 -2
  21. package/dist/types/api/nodes/async/flowWritableDerivationAsync.d.ts.map +1 -1
  22. package/dist/types/api/nodes/async/index.d.ts +4 -4
  23. package/dist/types/api/nodes/async/index.d.ts.map +1 -1
  24. package/dist/types/api/nodes/collections/flowArray.d.ts +7 -4
  25. package/dist/types/api/nodes/collections/flowArray.d.ts.map +1 -1
  26. package/dist/types/api/nodes/collections/flowMap.d.ts +3 -2
  27. package/dist/types/api/nodes/collections/flowMap.d.ts.map +1 -1
  28. package/dist/types/api/nodes/collections/index.d.ts +2 -2
  29. package/dist/types/api/nodes/collections/index.d.ts.map +1 -1
  30. package/dist/types/api/nodes/flowEffect.d.ts +2 -2
  31. package/dist/types/api/nodes/flowEffect.d.ts.map +1 -1
  32. package/dist/types/api/nodes/flowSignal.d.ts +1 -1
  33. package/dist/types/api/nodes/flowSignal.d.ts.map +1 -1
  34. package/dist/types/api/nodes/flowValue.d.ts +2 -2
  35. package/dist/types/api/nodes/flowValue.d.ts.map +1 -1
  36. package/dist/types/api/nodes/index.d.ts +7 -7
  37. package/dist/types/api/nodes/index.d.ts.map +1 -1
  38. package/dist/types/api/nodes/sync/flowConstant.d.ts +2 -2
  39. package/dist/types/api/nodes/sync/flowConstant.d.ts.map +1 -1
  40. package/dist/types/api/nodes/sync/flowDerivation.d.ts +3 -3
  41. package/dist/types/api/nodes/sync/flowDerivation.d.ts.map +1 -1
  42. package/dist/types/api/nodes/sync/flowState.d.ts +3 -3
  43. package/dist/types/api/nodes/sync/flowState.d.ts.map +1 -1
  44. package/dist/types/api/nodes/sync/flowWritableDerivation.d.ts +2 -2
  45. package/dist/types/api/nodes/sync/flowWritableDerivation.d.ts.map +1 -1
  46. package/dist/types/api/nodes/sync/index.d.ts +4 -4
  47. package/dist/types/api/nodes/sync/index.d.ts.map +1 -1
  48. package/dist/types/api/nodes/utils.d.ts +1 -1
  49. package/dist/types/api/nodes/utils.d.ts.map +1 -1
  50. package/dist/types/base/disposable.d.ts +1 -1
  51. package/dist/types/base/disposable.d.ts.map +1 -1
  52. package/dist/types/base/executionStack.d.ts +22 -1
  53. package/dist/types/base/executionStack.d.ts.map +1 -1
  54. package/dist/types/base/index.d.ts +5 -5
  55. package/dist/types/base/index.d.ts.map +1 -1
  56. package/dist/types/base/node.d.ts +4 -4
  57. package/dist/types/base/node.d.ts.map +1 -1
  58. package/dist/types/base/observable.d.ts +3 -3
  59. package/dist/types/base/observable.d.ts.map +1 -1
  60. package/dist/types/base/observer.d.ts +2 -2
  61. package/dist/types/base/observer.d.ts.map +1 -1
  62. package/dist/types/converters/index.d.ts +1 -1
  63. package/dist/types/converters/index.d.ts.map +1 -1
  64. package/dist/types/converters/solid.d.ts +12 -8
  65. package/dist/types/converters/solid.d.ts.map +1 -1
  66. package/dist/types/index.d.ts +2 -2
  67. package/dist/types/index.d.ts.map +1 -1
  68. package/dist/types/nodes/actionNode.d.ts +23 -0
  69. package/dist/types/nodes/actionNode.d.ts.map +1 -0
  70. package/dist/types/nodes/arrayNode.d.ts +4 -3
  71. package/dist/types/nodes/arrayNode.d.ts.map +1 -1
  72. package/dist/types/nodes/effectNode.d.ts +18 -2
  73. package/dist/types/nodes/effectNode.d.ts.map +1 -1
  74. package/dist/types/nodes/index.d.ts +8 -7
  75. package/dist/types/nodes/index.d.ts.map +1 -1
  76. package/dist/types/nodes/mapNode.d.ts +4 -3
  77. package/dist/types/nodes/mapNode.d.ts.map +1 -1
  78. package/dist/types/nodes/signalNode.d.ts +2 -2
  79. package/dist/types/nodes/signalNode.d.ts.map +1 -1
  80. package/dist/types/nodes/valueAsyncNode.d.ts +3 -3
  81. package/dist/types/nodes/valueAsyncNode.d.ts.map +1 -1
  82. package/dist/types/nodes/valueNode.d.ts +3 -3
  83. package/dist/types/nodes/valueNode.d.ts.map +1 -1
  84. package/dist/types/nodes/valueSyncNode.d.ts +3 -3
  85. package/dist/types/nodes/valueSyncNode.d.ts.map +1 -1
  86. package/dist/types/schedulers/asyncScheduler.d.ts +2 -1
  87. package/dist/types/schedulers/asyncScheduler.d.ts.map +1 -1
  88. package/dist/types/schedulers/index.d.ts +4 -4
  89. package/dist/types/schedulers/index.d.ts.map +1 -1
  90. package/dist/types/schedulers/syncResolver.d.ts +1 -2
  91. package/dist/types/schedulers/syncResolver.d.ts.map +1 -1
  92. package/dist/types/schedulers/syncScheduler.d.ts +1 -1
  93. package/dist/types/schedulers/syncScheduler.d.ts.map +1 -1
  94. package/package.json +20 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 Elisabeth Rousset
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  > **Upgrading from v1.x?** See the [Upgrade Guide](https://ersbeth-web.gitlab.io/picoflow/guide/advanced/migration-v2.html) for migration instructions.
6
6
 
7
+ ## Requirements
8
+
9
+ The schedulers use `Promise.withResolvers()`, so picoflow needs **Node ≥ 22**, or Chrome ≥ 119, Safari ≥ 17.4, Firefox ≥ 121 in the browser. There is no fallback: on an older runtime the failure is immediate, on the first primitive you create.
10
+
7
11
  ## Installation
8
12
 
9
13
  ```bash
@@ -21,6 +25,17 @@ yarn add @ersbeth/picoflow
21
25
 
22
26
  For comprehensive guides and API documentation, visit the [official website](https://ersbeth-web.gitlab.io/picoflow/)
23
27
 
28
+ ## Development
29
+
30
+ ```bash
31
+ pnpm install
32
+ pnpm playwright:install # once — downloads Chromium for the browser tests
33
+ pnpm test # watch Node tests
34
+ pnpm test:browser # watch browser tests
35
+ ```
36
+
37
+ See [`CONTRIBUTING.md`](CONTRIBUTING.md) for the full setup, the conventions and the release procedure. Known issues and their status are tracked in [`audits/FINDINGS.md`](audits/FINDINGS.md); planned breaking changes in [`ROADMAP.md`](ROADMAP.md); vulnerability reporting in [`SECURITY.md`](SECURITY.md).
38
+
24
39
  ## AI Coding Agents
25
40
 
26
41
  Picoflow ships a [`SKILL.md`](SKILL.md) with the npm package, matching the exact version you have
package/dist/picoflow.js CHANGED
@@ -7,7 +7,7 @@ function isDisposable(obj) {
7
7
  class PendingError extends Error {
8
8
  pendingPromise;
9
9
  constructor(promise) {
10
- super("[PicoFlow] PendingResolver pending");
10
+ super("[PicoFlow] Computation is pending");
11
11
  this.name = "PendingError";
12
12
  this.pendingPromise = promise;
13
13
  }
@@ -36,8 +36,8 @@ class AsyncResolver {
36
36
  return this._finished;
37
37
  }
38
38
  compute() {
39
- if (this._finished) throw new Error("[Picoflow] PendingResolver: Can't restart a settled resolver");
40
- if (this._aborted) throw new Error("[Picoflow] PendingResolver: Can't restart an aborted resolver");
39
+ if (this._finished) throw new Error("[PicoFlow] AsyncResolver: Can't restart a settled resolver");
40
+ if (this._aborted) throw new Error("[PicoFlow] AsyncResolver: Can't restart an aborted resolver");
41
41
  this._iteration++;
42
42
  const currentIteration = this._iteration;
43
43
  this._compute().then((value) => {
@@ -51,8 +51,8 @@ class AsyncResolver {
51
51
  });
52
52
  }
53
53
  overwrite(promise) {
54
- if (this._finished) throw new Error("[Picoflow] PendingResolver: Can't overwrite a settled resolver");
55
- if (this._aborted) throw new Error("[Picoflow] PendingResolver: Can't overwrite an aborted resolver");
54
+ if (this._finished) throw new Error("[PicoFlow] AsyncResolver: Can't overwrite a settled resolver");
55
+ if (this._aborted) throw new Error("[PicoFlow] AsyncResolver: Can't overwrite an aborted resolver");
56
56
  this._iteration++;
57
57
  const currentIteration = this._iteration;
58
58
  promise.then((value) => {
@@ -81,7 +81,7 @@ class AsyncScheduler {
81
81
  this._onResolve = onResolve;
82
82
  this._onReject = onReject;
83
83
  this._resolver = new AsyncResolver(compute);
84
- this._resolver.computed.then(this._onResolve).catch(this._onReject).finally(() => this._settled.resolve());
84
+ this._attachHandlers(this._resolver);
85
85
  }
86
86
  get settled() {
87
87
  if (this._disposed) throw new Error("[PicoFlow] ComputationScheduler is disposed");
@@ -95,7 +95,7 @@ class AsyncScheduler {
95
95
  if (this._resolver.finished) {
96
96
  this._resolver = new AsyncResolver(this._compute);
97
97
  this._settled = Promise.withResolvers();
98
- this._resolver.computed.then(this._onResolve).catch(this._onReject).finally(() => this._settled.resolve());
98
+ this._attachHandlers(this._resolver);
99
99
  }
100
100
  this._resolver.overwrite(promise);
101
101
  }
@@ -104,10 +104,19 @@ class AsyncScheduler {
104
104
  if (this._resolver.finished) {
105
105
  this._resolver = new AsyncResolver(this._compute);
106
106
  this._settled = Promise.withResolvers();
107
- this._resolver.computed.then(this._onResolve).catch(this._onReject).finally(() => this._settled.resolve());
107
+ this._attachHandlers(this._resolver);
108
108
  }
109
109
  this._resolver.compute();
110
110
  }
111
+ _attachHandlers(resolver) {
112
+ resolver.computed.then((value) => {
113
+ if (this._disposed) return;
114
+ this._onResolve(value);
115
+ }).catch((error) => {
116
+ if (this._disposed) return;
117
+ this._onReject(error);
118
+ }).finally(() => this._settled.resolve());
119
+ }
111
120
  dispose() {
112
121
  this._resolver.abort();
113
122
  this._disposed = true;
@@ -116,7 +125,6 @@ class AsyncScheduler {
116
125
 
117
126
  class SyncResolver {
118
127
  _compute;
119
- _iteration = 0;
120
128
  _aborted = false;
121
129
  _finished = false;
122
130
  _onValue;
@@ -133,18 +141,16 @@ class SyncResolver {
133
141
  return this._finished;
134
142
  }
135
143
  compute() {
136
- if (this._finished) throw new Error("[Picoflow] PendingResolver: Can't restart a settled resolver");
137
- if (this._aborted) throw new Error("[Picoflow] PendingResolver: Can't restart an aborted resolver");
138
- this._iteration++;
139
- const currentIteration = this._iteration;
144
+ if (this._finished) throw new Error("[PicoFlow] SyncResolver: Can't restart a settled resolver");
145
+ if (this._aborted) throw new Error("[PicoFlow] SyncResolver: Can't restart an aborted resolver");
140
146
  try {
141
147
  const value = this._compute();
142
- if (this._iteration === currentIteration && !this._aborted) {
148
+ if (!this._finished && !this._aborted) {
143
149
  this._finished = true;
144
150
  this._onValue(value);
145
151
  }
146
152
  } catch (error) {
147
- if (this._iteration === currentIteration && !this._aborted) {
153
+ if (!this._finished && !this._aborted) {
148
154
  if (!(error instanceof PendingError)) {
149
155
  this._finished = true;
150
156
  this._onError(error);
@@ -153,17 +159,12 @@ class SyncResolver {
153
159
  }
154
160
  }
155
161
  overwrite(value) {
156
- if (this._finished) throw new Error("[Picoflow] PendingResolver: Can't overwrite a settled resolver");
157
- if (this._aborted) throw new Error("[Picoflow] PendingResolver: Can't overwrite an aborted resolver");
158
- this._iteration++;
159
- const currentIteration = this._iteration;
160
- if (this._iteration === currentIteration && !this._aborted) {
161
- this._finished = true;
162
- this._onValue(value);
163
- }
162
+ if (this._finished) throw new Error("[PicoFlow] SyncResolver: Can't overwrite a settled resolver");
163
+ if (this._aborted) throw new Error("[PicoFlow] SyncResolver: Can't overwrite an aborted resolver");
164
+ this._finished = true;
165
+ this._onValue(value);
164
166
  }
165
167
  abort() {
166
- this._iteration++;
167
168
  this._aborted = true;
168
169
  }
169
170
  }
@@ -224,17 +225,48 @@ class Disposable {
224
225
  }
225
226
 
226
227
  class ExecutionStack {
228
+ static _MAX_FLUSH_STEPS = 1e4;
227
229
  static _pendingQueue = [];
228
230
  static _effectQueue = [];
229
231
  static _executionScheduled;
232
+ static _coalesceResetScheduled = false;
233
+ /**
234
+ * True once the current synchronous call stack has finished and microtasks have started.
235
+ * EffectNode uses this to treat microtask notifications (e.g. async resolve) differently
236
+ * from coalesced sync-batch notifications.
237
+ */
238
+ static _pastSyncTurn = false;
239
+ /** @internal Used by EffectNode to distinguish sync-batch from microtask notifications. */
240
+ static get pastSyncTurn() {
241
+ return ExecutionStack._pastSyncTurn;
242
+ }
243
+ /**
244
+ * @internal Runs after the current sync turn ends (queueMicrotask).
245
+ * Marks pastSyncTurn so the next coalesced effect notify can bump its epoch,
246
+ * and resets per-effect coalesce flags via onReset.
247
+ */
248
+ static scheduleCoalesceReset(onReset) {
249
+ if (ExecutionStack._coalesceResetScheduled) return;
250
+ ExecutionStack._coalesceResetScheduled = true;
251
+ queueMicrotask(() => {
252
+ ExecutionStack._pastSyncTurn = true;
253
+ ExecutionStack._coalesceResetScheduled = false;
254
+ onReset();
255
+ });
256
+ }
230
257
  static pushPending(node) {
258
+ ExecutionStack._beginSyncTurn();
231
259
  ExecutionStack._scheduleExecution();
232
260
  ExecutionStack._pendingQueue.push(node);
233
261
  }
234
262
  static pushEffect(effect) {
263
+ ExecutionStack._beginSyncTurn();
235
264
  ExecutionStack._scheduleExecution();
236
265
  ExecutionStack._effectQueue.push(effect);
237
266
  }
267
+ static _beginSyncTurn() {
268
+ ExecutionStack._pastSyncTurn = false;
269
+ }
238
270
  static _scheduleExecution() {
239
271
  if (ExecutionStack._executionScheduled) return;
240
272
  ExecutionStack._executionScheduled = new Promise((resolve) => {
@@ -245,15 +277,21 @@ class ExecutionStack {
245
277
  }, 0);
246
278
  });
247
279
  }
280
+ static _drain(queue) {
281
+ for (let i = 0; i < queue.length; i++) {
282
+ if (i >= ExecutionStack._MAX_FLUSH_STEPS) {
283
+ ExecutionStack._pendingQueue.length = 0;
284
+ ExecutionStack._effectQueue.length = 0;
285
+ throw new Error("[PicoFlow] Reactive update cycle exceeded maximum depth");
286
+ }
287
+ const node = queue[i];
288
+ node?.execute();
289
+ }
290
+ queue.length = 0;
291
+ }
248
292
  static _execute() {
249
- ExecutionStack._pendingQueue.forEach((node) => {
250
- node.execute();
251
- });
252
- ExecutionStack._pendingQueue.length = 0;
253
- ExecutionStack._effectQueue.forEach((effect) => {
254
- effect.execute();
255
- });
256
- ExecutionStack._effectQueue.length = 0;
293
+ ExecutionStack._drain(ExecutionStack._pendingQueue);
294
+ ExecutionStack._drain(ExecutionStack._effectQueue);
257
295
  }
258
296
  }
259
297
 
@@ -403,32 +441,67 @@ class EffectNode extends Observer {
403
441
  _onData;
404
442
  _onError;
405
443
  _onPending;
444
+ /** True while this effect is already waiting in the effect queue for the next flush. */
445
+ _queued = false;
446
+ /** Guards the single coalesced bump of _notifyEpoch while _queued during one sync turn. */
447
+ _coalescedWhileQueued = false;
448
+ /** Monotonic count of notifications that must eventually be executed. */
449
+ _notifyEpoch = 0;
450
+ /** How many notification epochs have been executed so far. */
451
+ _executedEpoch = 0;
406
452
  constructor(data, onData, onError, onPending) {
407
453
  super();
408
454
  this._data = data;
409
455
  this._onData = onData;
410
456
  this._onError = onError;
411
457
  this._onPending = onPending;
458
+ this._notifyEpoch = 1;
412
459
  this.execute();
413
460
  }
414
461
  notify() {
415
462
  if (this._disposed) throw new Error("[PicoFlow] Primitive is disposed");
463
+ if (this._queued) {
464
+ if (!this._coalescedWhileQueued) {
465
+ this._coalescedWhileQueued = true;
466
+ if (ExecutionStack.pastSyncTurn) {
467
+ this._notifyEpoch++;
468
+ }
469
+ }
470
+ return;
471
+ }
472
+ this._notifyEpoch++;
473
+ this._queued = true;
474
+ ExecutionStack.scheduleCoalesceReset(() => {
475
+ this._coalescedWhileQueued = false;
476
+ });
416
477
  ExecutionStack.pushEffect(this);
417
478
  }
418
479
  execute() {
419
- try {
420
- if (this._disposed) throw new Error("[PicoFlow] Primitive is disposed");
421
- this.clearDependencies();
422
- const data = this._data(this);
423
- this._onData(data);
424
- } catch (error) {
425
- if (error instanceof PendingError) {
426
- this._onPending?.();
427
- } else {
428
- if (this._onError) {
429
- this._onError(error instanceof Error ? error : new Error(String(error)));
480
+ this._queued = false;
481
+ if (this._disposed) {
482
+ this._executedEpoch = this._notifyEpoch;
483
+ return;
484
+ }
485
+ const targetEpoch = this._notifyEpoch;
486
+ while (this._executedEpoch < targetEpoch) {
487
+ this._executedEpoch++;
488
+ if (this._disposed) {
489
+ this._executedEpoch = this._notifyEpoch;
490
+ return;
491
+ }
492
+ try {
493
+ this.clearDependencies();
494
+ const data = this._data(this);
495
+ this._onData(data);
496
+ } catch (error) {
497
+ if (error instanceof PendingError) {
498
+ this._onPending?.();
430
499
  } else {
431
- throw error;
500
+ if (this._onError) {
501
+ this._onError(error instanceof Error ? error : new Error(String(error)));
502
+ } else {
503
+ throw error;
504
+ }
432
505
  }
433
506
  }
434
507
  }
@@ -570,12 +643,14 @@ class ValueAsyncNode extends ValueNode {
570
643
  );
571
644
  }
572
645
  _onResolve(value) {
646
+ if (this.disposed) return;
573
647
  this.status = "resolved";
574
648
  this._value = value;
575
649
  this._error = void 0;
576
650
  this.notifyDependents();
577
651
  }
578
652
  _onReject(error) {
653
+ if (this.disposed) return;
579
654
  this.status = "error";
580
655
  this._error = error;
581
656
  this.notifyDependents();
@@ -724,11 +799,66 @@ class ValueSyncNode extends ValueNode {
724
799
  }
725
800
  }
726
801
 
802
+ class ActionNode extends ValueSyncNode {
803
+ _slots = /* @__PURE__ */ new Set();
804
+ _enqueueForSubscribers(action) {
805
+ for (const slot of this._slots) {
806
+ slot.queue.push(action);
807
+ }
808
+ }
809
+ set(valueOrUpdater) {
810
+ if (this.disposed) throw new Error("[PicoFlow] Primitive is disposed");
811
+ if (typeof valueOrUpdater === "function") {
812
+ const updater = valueOrUpdater;
813
+ const nextValue2 = updater(this._value);
814
+ if (this.status === "resolved" && nextValue2 === this._value) return;
815
+ this._enqueueForSubscribers(nextValue2);
816
+ super.set(updater);
817
+ return;
818
+ }
819
+ const nextValue = valueOrUpdater;
820
+ if (this.status === "resolved" && nextValue === this._value) return;
821
+ this._enqueueForSubscribers(nextValue);
822
+ super.set(nextValue);
823
+ }
824
+ subscribe(onValue, onError, onPending) {
825
+ if (this.disposed) throw new Error("[PicoFlow] Primitive is disposed");
826
+ const slot = { queue: [] };
827
+ this._slots.add(slot);
828
+ const effect = new EffectNode(
829
+ (tracker) => {
830
+ this.watch(tracker);
831
+ if (slot.queue.length === 0) {
832
+ return [this.get(tracker)];
833
+ }
834
+ return slot.queue.splice(0);
835
+ },
836
+ (actions) => {
837
+ for (const action of actions) {
838
+ onValue(action);
839
+ }
840
+ },
841
+ onError,
842
+ onPending
843
+ );
844
+ const originalDispose = effect.dispose.bind(effect);
845
+ effect.dispose = () => {
846
+ this._slots.delete(slot);
847
+ originalDispose();
848
+ };
849
+ return effect;
850
+ }
851
+ dispose() {
852
+ this._slots.clear();
853
+ super.dispose();
854
+ }
855
+ }
856
+
727
857
  class ArrayNode extends ValueSyncNode {
728
858
  $lastAction;
729
859
  constructor(value = []) {
730
860
  super(value);
731
- this.$lastAction = new ValueSyncNode({
861
+ this.$lastAction = new ActionNode({
732
862
  type: "set",
733
863
  setItems: value,
734
864
  clearedItems: []
@@ -781,6 +911,7 @@ class ArrayNode extends ValueSyncNode {
781
911
  }
782
912
  pop() {
783
913
  if (this.disposed) throw new Error("[PicoFlow] Primitive is disposed");
914
+ if (this._value.length === 0) return void 0;
784
915
  const item = this._value.pop();
785
916
  this.notifyDependents();
786
917
  this.$lastAction.set({ type: "pop", removedItem: item });
@@ -794,6 +925,7 @@ class ArrayNode extends ValueSyncNode {
794
925
  }
795
926
  shift() {
796
927
  if (this.disposed) throw new Error("[PicoFlow] Primitive is disposed");
928
+ if (this._value.length === 0) return void 0;
797
929
  const item = this._value.shift();
798
930
  this.notifyDependents();
799
931
  this.$lastAction.set({ type: "shift", removedItem: item });
@@ -822,9 +954,9 @@ class ArrayNode extends ValueSyncNode {
822
954
  }
823
955
  dispose() {
824
956
  super.dispose();
825
- this._value.forEach((item) => {
826
- if (item instanceof Disposable) item.dispose();
827
- });
957
+ if (!this.$lastAction.disposed) {
958
+ this.$lastAction.dispose();
959
+ }
828
960
  this._value = [];
829
961
  }
830
962
  }
@@ -837,7 +969,7 @@ class MapNode extends ValueSyncNode {
837
969
  $lastAction;
838
970
  constructor(value = /* @__PURE__ */ new Map()) {
839
971
  super(value);
840
- this.$lastAction = new ValueSyncNode({
972
+ this.$lastAction = new ActionNode({
841
973
  type: "set",
842
974
  setMap: value,
843
975
  clearedMap: /* @__PURE__ */ new Map()
@@ -845,8 +977,7 @@ class MapNode extends ValueSyncNode {
845
977
  }
846
978
  add(key, value) {
847
979
  if (this.disposed) throw new Error("[PicoFlow] Primitive is disposed");
848
- const previousValue = this._value.get(key);
849
- if (previousValue) {
980
+ if (this._value.has(key)) {
850
981
  throw new Error("[PicoFlow] Key already exists");
851
982
  }
852
983
  this._value.set(key, value);
@@ -855,8 +986,8 @@ class MapNode extends ValueSyncNode {
855
986
  }
856
987
  update(key, value) {
857
988
  if (this.disposed) throw new Error("[PicoFlow] Primitive is disposed");
989
+ if (!this._value.has(key)) throw new Error("[PicoFlow] Key does not exist");
858
990
  const previousValue = this._value.get(key);
859
- if (!previousValue) throw new Error("[PicoFlow] Key does not exist");
860
991
  this._value.set(key, value);
861
992
  this.notifyDependents();
862
993
  this.$lastAction.set({
@@ -869,8 +1000,8 @@ class MapNode extends ValueSyncNode {
869
1000
  }
870
1001
  delete(key) {
871
1002
  if (this.disposed) throw new Error("[PicoFlow] Primitive is disposed");
1003
+ if (!this._value.has(key)) throw new Error("[PicoFlow] Key does not exist");
872
1004
  const value = this._value.get(key);
873
- if (value === void 0) throw new Error("[PicoFlow] Key does not exist");
874
1005
  this._value.delete(key);
875
1006
  this.notifyDependents();
876
1007
  this.$lastAction.set({ type: "delete", key, removedValue: value });
@@ -897,9 +1028,9 @@ class MapNode extends ValueSyncNode {
897
1028
  }
898
1029
  dispose() {
899
1030
  super.dispose();
900
- this._value.forEach((item) => {
901
- if (item instanceof Disposable) item.dispose();
902
- });
1031
+ if (!this.$lastAction.disposed) {
1032
+ this.$lastAction.dispose();
1033
+ }
903
1034
  this._value.clear();
904
1035
  }
905
1036
  }
@@ -943,7 +1074,15 @@ function writableDerivation(compute) {
943
1074
  return new ValueSyncNode(compute);
944
1075
  }
945
1076
 
946
- function fromNode(node) {
1077
+ function describeFlowInput(value) {
1078
+ if (value === null) return "null";
1079
+ if (typeof value === "object") {
1080
+ const name = value.constructor?.name;
1081
+ return name ? `object (${name})` : "object";
1082
+ }
1083
+ return typeof value;
1084
+ }
1085
+ function fromNode(node, options) {
947
1086
  const [resource, { refetch }] = createResource(() => node.pick());
948
1087
  let fx;
949
1088
  onMount(() => {
@@ -968,14 +1107,19 @@ function fromNode(node) {
968
1107
  resource.error ?? resource();
969
1108
  resetErrorBoundaries();
970
1109
  });
971
- onCleanup(() => fx.dispose());
1110
+ onCleanup(() => {
1111
+ fx.dispose();
1112
+ if (options?.disposeNode && !node.disposed) {
1113
+ node.dispose();
1114
+ }
1115
+ });
972
1116
  return resource;
973
1117
  }
974
1118
  function fromGetter(getter) {
975
1119
  const derivation = new ValueSyncNode((t) => {
976
1120
  return getter(t);
977
1121
  });
978
- return fromNode(derivation);
1122
+ return fromNode(derivation, { disposeNode: true });
979
1123
  }
980
1124
  function from(flow) {
981
1125
  if (flow instanceof ValueAsyncNode || flow instanceof ValueSyncNode) {
@@ -984,7 +1128,7 @@ function from(flow) {
984
1128
  if (typeof flow === "function") {
985
1129
  return fromGetter(flow);
986
1130
  }
987
- throw new Error("Invalid flow type");
1131
+ throw new Error(`[PicoFlow] from(): expected a FlowValue or getter function, received ${describeFlowInput(flow)}`);
988
1132
  }
989
1133
 
990
1134
  export { array, constant, constantAsync, derivation, derivationAsync, from, isDisposable, map, signal, state, stateAsync, subscribe, writableDerivation, writableDerivationAsync };
@@ -1,6 +1,6 @@
1
- import { FlowDisposable } from './flowDisposable';
2
- import { FlowSubscribable } from './flowSubscribable';
3
- import { FlowTracker } from './flowTracker';
1
+ import { FlowDisposable } from './flowDisposable.js';
2
+ import { FlowSubscribable } from './flowSubscribable.js';
3
+ import { FlowTracker } from './flowTracker.js';
4
4
  /**
5
5
  * Contract for reactive primitives that emit changes and notify their dependents in the reactivity graph.
6
6
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"flowObservable.d.ts","sourceRoot":"","sources":["../../../../src/api/base/flowObservable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,CAAE,SAAQ,cAAc,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC1E;;;;;;;OAOG;IACH,KAAK,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAElC;;;;;;OAMG;IACH,OAAO,IAAI,IAAI,CAAC;CACnB"}
1
+ {"version":3,"file":"flowObservable.d.ts","sourceRoot":"","sources":["../../../../src/api/base/flowObservable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,CAAE,SAAQ,cAAc,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC1E;;;;;;;OAOG;IACH,KAAK,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAElC;;;;;;OAMG;IACH,OAAO,IAAI,IAAI,CAAC;CACnB"}
@@ -1,5 +1,5 @@
1
- import { FlowEffect } from '../nodes/flowEffect';
2
- import { FlowTracker } from './flowTracker';
1
+ import { FlowEffect } from '../nodes/flowEffect.js';
2
+ import { FlowTracker } from './flowTracker.js';
3
3
  /**
4
4
  * Function that tracks reactive dependencies and returns data.
5
5
  *
@@ -1 +1 @@
1
- {"version":3,"file":"flowSubscribable.d.ts","sourceRoot":"","sources":["../../../../src/api/base/flowSubscribable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,WAAW,KAAK,CAAC,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;AAEtD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,IAAI,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC;IAC/B;;;;;;;;;;;;OAYG;IACH,SAAS,CACL,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAC7B,OAAO,CAAC,EAAE,mBAAmB,EAC7B,SAAS,CAAC,EAAE,qBAAqB,GAClC,UAAU,CAAC;CACjB"}
1
+ {"version":3,"file":"flowSubscribable.d.ts","sourceRoot":"","sources":["../../../../src/api/base/flowSubscribable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,WAAW,KAAK,CAAC,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;AAEtD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,IAAI,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC;IAC/B;;;;;;;;;;;;OAYG;IACH,SAAS,CACL,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAC7B,OAAO,CAAC,EAAE,mBAAmB,EAC7B,SAAS,CAAC,EAAE,qBAAqB,GAClC,UAAU,CAAC;CACjB"}
@@ -1,4 +1,4 @@
1
- import { FlowDisposable } from './flowDisposable';
1
+ import { FlowDisposable } from './flowDisposable.js';
2
2
  /**
3
3
  * Contract for reactive computations that track dependencies and react to changes in the reactivity graph.
4
4
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"flowTracker.d.ts","sourceRoot":"","sources":["../../../../src/api/base/flowTracker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,cAAc;CAAG"}
1
+ {"version":3,"file":"flowTracker.d.ts","sourceRoot":"","sources":["../../../../src/api/base/flowTracker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,cAAc;CAAG"}
@@ -1,5 +1,5 @@
1
- export * from './flowDisposable';
2
- export * from './flowObservable';
3
- export * from './flowSubscribable';
4
- export * from './flowTracker';
1
+ export * from './flowDisposable.js';
2
+ export * from './flowObservable.js';
3
+ export * from './flowSubscribable.js';
4
+ export * from './flowTracker.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/base/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/base/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
@@ -1,3 +1,3 @@
1
- export * from './base';
2
- export * from './nodes';
1
+ export * from './base/index.js';
2
+ export * from './nodes/index.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { FlowValue } from '../flowValue';
1
+ import { FlowValue } from '../flowValue.js';
2
2
  /** Function that initializes a value asynchronously. */
3
3
  export type InitFunctionAsync<T> = () => Promise<T>;
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"flowConstantAsync.d.ts","sourceRoot":"","sources":["../../../../../src/api/nodes/async/flowConstantAsync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,wDAAwD;AACxD,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC;AAEpD;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;CAAG;AAE7D;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAC1E,wBAAgB,aAAa,CAAC,CAAC,EAAE,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"flowConstantAsync.d.ts","sourceRoot":"","sources":["../../../../../src/api/nodes/async/flowConstantAsync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,wDAAwD;AACxD,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC;AAEpD;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;CAAG;AAE7D;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAC1E,wBAAgB,aAAa,CAAC,CAAC,EAAE,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
- import { FlowTracker } from '../../base';
2
- import { FlowValue } from '../flowValue';
3
- import { NotPromise } from '../utils';
1
+ import { FlowTracker } from '../../base/index.js';
2
+ import { FlowValue } from '../flowValue.js';
3
+ import { NotPromise } from '../utils.js';
4
4
  /** Function that derives a value asynchronously from dependencies and optionally the previous value. */
5
5
  export type DerivationFunctionAsync<T> = (tracker: FlowTracker, previous?: NotPromise<T> | undefined) => Promise<T>;
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"flowDerivationAsync.d.ts","sourceRoot":"","sources":["../../../../../src/api/nodes/async/flowDerivationAsync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,wGAAwG;AACxG,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;AAEpH;;;;;;;;;;GAUG;AACH,MAAM,WAAW,mBAAmB,CAAC,CAAC,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACxD;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACnB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAE9F"}
1
+ {"version":3,"file":"flowDerivationAsync.d.ts","sourceRoot":"","sources":["../../../../../src/api/nodes/async/flowDerivationAsync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,wGAAwG;AACxG,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;AAEpH;;;;;;;;;;GAUG;AACH,MAAM,WAAW,mBAAmB,CAAC,CAAC,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACxD;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACnB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAE9F"}
@@ -1,6 +1,6 @@
1
- import { FlowValue } from '../flowValue';
2
- import { NotPromise } from '../utils';
3
- import { InitFunctionAsync } from './flowConstantAsync';
1
+ import { FlowValue } from '../flowValue.js';
2
+ import { NotPromise } from '../utils.js';
3
+ import { InitFunctionAsync } from './flowConstantAsync.js';
4
4
  /** Function that updates a value asynchronously based on the previous value. */
5
5
  export type UpdateFunctionAsync<T> = (previous: NotPromise<T> | undefined) => Promise<T>;
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"flowStateAsync.d.ts","sourceRoot":"","sources":["../../../../../src/api/nodes/async/flowStateAsync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,gFAAgF;AAChF,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;AAEzF;;;;;;;;;GASG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACnD;;;;;OAKG;IACH,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC/B,GAAG,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC9C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;AACpE,wBAAgB,UAAU,CAAC,CAAC,EAAE,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"flowStateAsync.d.ts","sourceRoot":"","sources":["../../../../../src/api/nodes/async/flowStateAsync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,gFAAgF;AAChF,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;AAEzF;;;;;;;;;GASG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACnD;;;;;OAKG;IACH,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC/B,GAAG,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC9C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;AACpE,wBAAgB,UAAU,CAAC,CAAC,EAAE,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC"}