@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/screens.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { FlowViewer } from './chunk-
|
|
2
|
-
export { FlowViewer } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { FlowViewer } from './chunk-4KYW5BT4.js';
|
|
2
|
+
export { FlowViewer } from './chunk-4KYW5BT4.js';
|
|
3
|
+
import './chunk-M34S7XUM.js';
|
|
4
4
|
import './chunk-F5RPRB7A.js';
|
|
5
5
|
import './chunk-OWENS2H5.js';
|
|
6
6
|
import './chunk-UEOE6B52.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-V2657EQG.js';
|
|
8
8
|
import './chunk-2QXKDLGT.js';
|
|
9
9
|
import { registerSchemaComponents } from '@particle-academy/fancy-screens';
|
|
10
10
|
|
package/dist/ux.cjs
CHANGED
|
@@ -528,8 +528,9 @@ function possiblePortIds(node) {
|
|
|
528
528
|
if (!kind) return ["out"];
|
|
529
529
|
const config = nodeConfig(node);
|
|
530
530
|
const representative = typeof kind.outputs === "function" && !configDeclaresPorts(kind.name, config);
|
|
531
|
-
const
|
|
532
|
-
|
|
531
|
+
const resolved = resolvePortSpec(kind.outputs, representative ? defaultConfigFor(kind) : config);
|
|
532
|
+
if (resolved === void 0) return ["out"];
|
|
533
|
+
return resolved.map((p) => p.id);
|
|
533
534
|
}
|
|
534
535
|
function configDeclaresPorts(kindName, config) {
|
|
535
536
|
const bare = kindName.startsWith("@") ? kindName.slice(kindName.lastIndexOf("/") + 1) : kindName;
|
|
@@ -669,8 +670,9 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
669
670
|
outputs[node.id] = stored;
|
|
670
671
|
const activated = activatedPorts(node, stored);
|
|
671
672
|
for (const portId of activated.ports) {
|
|
672
|
-
|
|
673
|
-
|
|
673
|
+
const value = portValueOf(activated, portId);
|
|
674
|
+
portValues.set(`${node.id}:${portId}`, value);
|
|
675
|
+
onEvent({ type: "node-output", nodeId: node.id, portId, value });
|
|
674
676
|
}
|
|
675
677
|
completed.add(node.id);
|
|
676
678
|
onEvent({ type: "node-status", nodeId: node.id, status: "done", text: "resumed" });
|
|
@@ -733,8 +735,9 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
733
735
|
outputs[node.id] = result;
|
|
734
736
|
const activated = activatedPorts(node, result);
|
|
735
737
|
for (const portId of activated.ports) {
|
|
736
|
-
|
|
737
|
-
|
|
738
|
+
const value = portValueOf(activated, portId);
|
|
739
|
+
portValues.set(`${node.id}:${portId}`, value);
|
|
740
|
+
onEvent({ type: "node-output", nodeId: node.id, portId, value });
|
|
738
741
|
}
|
|
739
742
|
completed.add(node.id);
|
|
740
743
|
onEvent({ type: "node-status", nodeId: node.id, status: "done" });
|
|
@@ -840,13 +843,23 @@ function activatedPorts(node, result) {
|
|
|
840
843
|
if (typeof r.__port === "string") {
|
|
841
844
|
return { ports: [r.__port], value: r.value };
|
|
842
845
|
}
|
|
846
|
+
if (Array.isArray(r.__ports)) {
|
|
847
|
+
return { ports: r.__ports.filter((p) => typeof p === "string"), value: r.value };
|
|
848
|
+
}
|
|
849
|
+
if (r.__ports && typeof r.__ports === "object") {
|
|
850
|
+
const values = r.__ports;
|
|
851
|
+
return { ports: Object.keys(values), value: r.value, values };
|
|
852
|
+
}
|
|
843
853
|
if (typeof r.branch === "string") {
|
|
844
854
|
return { ports: [r.branch], value: Object.prototype.hasOwnProperty.call(r, "value") ? r.value : r };
|
|
845
855
|
}
|
|
846
856
|
}
|
|
847
857
|
const kind = getNodeKind(node.data?.kind ?? node.type ?? "") ?? void 0;
|
|
848
858
|
const declared = resolveNodePorts(node, kind).outputs?.map((p) => p.id);
|
|
849
|
-
return { ports: declared
|
|
859
|
+
return { ports: declared ?? ["out"], value: result };
|
|
860
|
+
}
|
|
861
|
+
function portValueOf(activated, portId) {
|
|
862
|
+
return activated.values && Object.prototype.hasOwnProperty.call(activated.values, portId) ? activated.values[portId] : activated.value;
|
|
850
863
|
}
|
|
851
864
|
function announce(onEvent, node, phase) {
|
|
852
865
|
const data = node.data;
|
|
@@ -2577,7 +2590,7 @@ function createFlowRunnerUx(options) {
|
|
|
2577
2590
|
const config = node.data?.config ?? {};
|
|
2578
2591
|
const params = m.includeInputs ? { ...config, $inputs: inputs } : config;
|
|
2579
2592
|
const result = await dispatcher.dispatch(name, params);
|
|
2580
|
-
if (result && typeof result === "object" && ("branch" in result || "__port" in result)) {
|
|
2593
|
+
if (result && typeof result === "object" && ("branch" in result || "__port" in result || "__ports" in result)) {
|
|
2581
2594
|
return result;
|
|
2582
2595
|
}
|
|
2583
2596
|
if (m.passThrough) return inputs.in ?? inputs;
|