@particle-academy/fancy-flow 0.74.1 → 0.76.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-2GU3V2ZD.js → chunk-4KYW5BT4.js} +4 -4
- package/dist/{chunk-2GU3V2ZD.js.map → chunk-4KYW5BT4.js.map} +1 -1
- package/dist/{chunk-VAF2SWTC.js → chunk-CYVVUKHH.js} +3 -3
- package/dist/{chunk-VAF2SWTC.js.map → chunk-CYVVUKHH.js.map} +1 -1
- package/dist/{chunk-K7KO3UJ3.js → chunk-G4GKDJG5.js} +3 -3
- package/dist/{chunk-K7KO3UJ3.js.map → chunk-G4GKDJG5.js.map} +1 -1
- package/dist/{chunk-3RXQGYGH.js → chunk-M34S7XUM.js} +3 -3
- package/dist/{chunk-3RXQGYGH.js.map → chunk-M34S7XUM.js.map} +1 -1
- package/dist/{chunk-7DJ56PUA.js → chunk-PXVISCSC.js} +4 -4
- package/dist/{chunk-7DJ56PUA.js.map → chunk-PXVISCSC.js.map} +1 -1
- package/dist/{chunk-EX34GCKK.js → chunk-V2657EQG.js} +22 -9
- package/dist/chunk-V2657EQG.js.map +1 -0
- package/dist/{chunk-GQ5LEA7Q.js → chunk-ZKAPSUTL.js} +3 -3
- package/dist/{chunk-GQ5LEA7Q.js.map → chunk-ZKAPSUTL.js.map} +1 -1
- package/dist/durable.cjs +20 -7
- package/dist/durable.cjs.map +1 -1
- package/dist/durable.js +1 -1
- package/dist/engine.cjs +20 -7
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.js +4 -4
- package/dist/index.cjs +20 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -12
- package/dist/registry.cjs +20 -7
- package/dist/registry.cjs.map +1 -1
- package/dist/registry.js +2 -2
- package/dist/runtime.cjs +20 -7
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.js +3 -3
- package/dist/schema.cjs +20 -7
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.js +3 -3
- package/dist/screens.cjs +20 -7
- package/dist/screens.cjs.map +1 -1
- package/dist/screens.js +4 -4
- package/dist/ux.cjs +21 -8
- package/dist/ux.cjs.map +1 -1
- package/dist/ux.js +2 -2
- package/dist/ux.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-EX34GCKK.js.map +0 -1
package/dist/runtime.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-
|
|
2
|
-
export { runCohort } from './chunk-
|
|
1
|
+
export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-ZKAPSUTL.js';
|
|
2
|
+
export { runCohort } from './chunk-G4GKDJG5.js';
|
|
3
3
|
import './chunk-OWENS2H5.js';
|
|
4
|
-
export { RunIdentity, escapeSegment, runFlow } from './chunk-
|
|
4
|
+
export { RunIdentity, escapeSegment, runFlow } from './chunk-V2657EQG.js';
|
|
5
5
|
import './chunk-2QXKDLGT.js';
|
|
6
6
|
//# sourceMappingURL=runtime.js.map
|
|
7
7
|
//# sourceMappingURL=runtime.js.map
|
package/dist/schema.cjs
CHANGED
|
@@ -523,8 +523,9 @@ function possiblePortIds(node) {
|
|
|
523
523
|
if (!kind) return ["out"];
|
|
524
524
|
const config = nodeConfig(node);
|
|
525
525
|
const representative = typeof kind.outputs === "function" && !configDeclaresPorts(kind.name, config);
|
|
526
|
-
const
|
|
527
|
-
|
|
526
|
+
const resolved = resolvePortSpec(kind.outputs, representative ? defaultConfigFor(kind) : config);
|
|
527
|
+
if (resolved === void 0) return ["out"];
|
|
528
|
+
return resolved.map((p) => p.id);
|
|
528
529
|
}
|
|
529
530
|
function configDeclaresPorts(kindName, config) {
|
|
530
531
|
const bare = kindName.startsWith("@") ? kindName.slice(kindName.lastIndexOf("/") + 1) : kindName;
|
|
@@ -664,8 +665,9 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
664
665
|
outputs[node.id] = stored;
|
|
665
666
|
const activated = activatedPorts(node, stored);
|
|
666
667
|
for (const portId of activated.ports) {
|
|
667
|
-
|
|
668
|
-
|
|
668
|
+
const value = portValueOf(activated, portId);
|
|
669
|
+
portValues.set(`${node.id}:${portId}`, value);
|
|
670
|
+
onEvent({ type: "node-output", nodeId: node.id, portId, value });
|
|
669
671
|
}
|
|
670
672
|
completed.add(node.id);
|
|
671
673
|
onEvent({ type: "node-status", nodeId: node.id, status: "done", text: "resumed" });
|
|
@@ -728,8 +730,9 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
728
730
|
outputs[node.id] = result;
|
|
729
731
|
const activated = activatedPorts(node, result);
|
|
730
732
|
for (const portId of activated.ports) {
|
|
731
|
-
|
|
732
|
-
|
|
733
|
+
const value = portValueOf(activated, portId);
|
|
734
|
+
portValues.set(`${node.id}:${portId}`, value);
|
|
735
|
+
onEvent({ type: "node-output", nodeId: node.id, portId, value });
|
|
733
736
|
}
|
|
734
737
|
completed.add(node.id);
|
|
735
738
|
onEvent({ type: "node-status", nodeId: node.id, status: "done" });
|
|
@@ -835,13 +838,23 @@ function activatedPorts(node, result) {
|
|
|
835
838
|
if (typeof r.__port === "string") {
|
|
836
839
|
return { ports: [r.__port], value: r.value };
|
|
837
840
|
}
|
|
841
|
+
if (Array.isArray(r.__ports)) {
|
|
842
|
+
return { ports: r.__ports.filter((p) => typeof p === "string"), value: r.value };
|
|
843
|
+
}
|
|
844
|
+
if (r.__ports && typeof r.__ports === "object") {
|
|
845
|
+
const values = r.__ports;
|
|
846
|
+
return { ports: Object.keys(values), value: r.value, values };
|
|
847
|
+
}
|
|
838
848
|
if (typeof r.branch === "string") {
|
|
839
849
|
return { ports: [r.branch], value: Object.prototype.hasOwnProperty.call(r, "value") ? r.value : r };
|
|
840
850
|
}
|
|
841
851
|
}
|
|
842
852
|
const kind = getNodeKind(node.data?.kind ?? node.type ?? "") ?? void 0;
|
|
843
853
|
const declared = resolveNodePorts(node, kind).outputs?.map((p) => p.id);
|
|
844
|
-
return { ports: declared
|
|
854
|
+
return { ports: declared ?? ["out"], value: result };
|
|
855
|
+
}
|
|
856
|
+
function portValueOf(activated, portId) {
|
|
857
|
+
return activated.values && Object.prototype.hasOwnProperty.call(activated.values, portId) ? activated.values[portId] : activated.value;
|
|
845
858
|
}
|
|
846
859
|
function announce(onEvent, node, phase) {
|
|
847
860
|
const data = node.data;
|