@particle-academy/fancy-flow 0.74.1 → 0.75.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-2H5H2DDP.js} +4 -4
- package/dist/{chunk-2GU3V2ZD.js.map → chunk-2H5H2DDP.js.map} +1 -1
- package/dist/{chunk-3RXQGYGH.js → chunk-4BPCA3ZO.js} +3 -3
- package/dist/{chunk-3RXQGYGH.js.map → chunk-4BPCA3ZO.js.map} +1 -1
- package/dist/{chunk-K7KO3UJ3.js → chunk-LKEDPVR3.js} +3 -3
- package/dist/{chunk-K7KO3UJ3.js.map → chunk-LKEDPVR3.js.map} +1 -1
- package/dist/{chunk-7DJ56PUA.js → chunk-T7E7QPHI.js} +4 -4
- package/dist/{chunk-7DJ56PUA.js.map → chunk-T7E7QPHI.js.map} +1 -1
- package/dist/{chunk-EX34GCKK.js → chunk-W7DMO3H7.js} +18 -6
- package/dist/chunk-W7DMO3H7.js.map +1 -0
- package/dist/{chunk-VAF2SWTC.js → chunk-XZFLPKO2.js} +3 -3
- package/dist/{chunk-VAF2SWTC.js.map → chunk-XZFLPKO2.js.map} +1 -1
- package/dist/{chunk-GQ5LEA7Q.js → chunk-ZBHIEKCN.js} +3 -3
- package/dist/{chunk-GQ5LEA7Q.js.map → chunk-ZBHIEKCN.js.map} +1 -1
- package/dist/durable.cjs +16 -4
- package/dist/durable.cjs.map +1 -1
- package/dist/durable.js +1 -1
- package/dist/engine.cjs +16 -4
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.js +4 -4
- package/dist/index.cjs +16 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -12
- package/dist/registry.cjs +16 -4
- package/dist/registry.cjs.map +1 -1
- package/dist/registry.js +2 -2
- package/dist/runtime.cjs +16 -4
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.js +3 -3
- package/dist/schema.cjs +16 -4
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.js +3 -3
- package/dist/screens.cjs +16 -4
- package/dist/screens.cjs.map +1 -1
- package/dist/screens.js +4 -4
- package/dist/ux.cjs +17 -5
- 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-2H5H2DDP.js';
|
|
2
|
+
export { FlowViewer } from './chunk-2H5H2DDP.js';
|
|
3
|
+
import './chunk-4BPCA3ZO.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-W7DMO3H7.js';
|
|
8
8
|
import './chunk-2QXKDLGT.js';
|
|
9
9
|
import { registerSchemaComponents } from '@particle-academy/fancy-screens';
|
|
10
10
|
|
package/dist/ux.cjs
CHANGED
|
@@ -669,8 +669,9 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
669
669
|
outputs[node.id] = stored;
|
|
670
670
|
const activated = activatedPorts(node, stored);
|
|
671
671
|
for (const portId of activated.ports) {
|
|
672
|
-
|
|
673
|
-
|
|
672
|
+
const value = portValueOf(activated, portId);
|
|
673
|
+
portValues.set(`${node.id}:${portId}`, value);
|
|
674
|
+
onEvent({ type: "node-output", nodeId: node.id, portId, value });
|
|
674
675
|
}
|
|
675
676
|
completed.add(node.id);
|
|
676
677
|
onEvent({ type: "node-status", nodeId: node.id, status: "done", text: "resumed" });
|
|
@@ -733,8 +734,9 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
733
734
|
outputs[node.id] = result;
|
|
734
735
|
const activated = activatedPorts(node, result);
|
|
735
736
|
for (const portId of activated.ports) {
|
|
736
|
-
|
|
737
|
-
|
|
737
|
+
const value = portValueOf(activated, portId);
|
|
738
|
+
portValues.set(`${node.id}:${portId}`, value);
|
|
739
|
+
onEvent({ type: "node-output", nodeId: node.id, portId, value });
|
|
738
740
|
}
|
|
739
741
|
completed.add(node.id);
|
|
740
742
|
onEvent({ type: "node-status", nodeId: node.id, status: "done" });
|
|
@@ -840,6 +842,13 @@ function activatedPorts(node, result) {
|
|
|
840
842
|
if (typeof r.__port === "string") {
|
|
841
843
|
return { ports: [r.__port], value: r.value };
|
|
842
844
|
}
|
|
845
|
+
if (Array.isArray(r.__ports)) {
|
|
846
|
+
return { ports: r.__ports.filter((p) => typeof p === "string"), value: r.value };
|
|
847
|
+
}
|
|
848
|
+
if (r.__ports && typeof r.__ports === "object") {
|
|
849
|
+
const values = r.__ports;
|
|
850
|
+
return { ports: Object.keys(values), value: r.value, values };
|
|
851
|
+
}
|
|
843
852
|
if (typeof r.branch === "string") {
|
|
844
853
|
return { ports: [r.branch], value: Object.prototype.hasOwnProperty.call(r, "value") ? r.value : r };
|
|
845
854
|
}
|
|
@@ -848,6 +857,9 @@ function activatedPorts(node, result) {
|
|
|
848
857
|
const declared = resolveNodePorts(node, kind).outputs?.map((p) => p.id);
|
|
849
858
|
return { ports: declared?.length ? declared : ["out"], value: result };
|
|
850
859
|
}
|
|
860
|
+
function portValueOf(activated, portId) {
|
|
861
|
+
return activated.values && Object.prototype.hasOwnProperty.call(activated.values, portId) ? activated.values[portId] : activated.value;
|
|
862
|
+
}
|
|
851
863
|
function announce(onEvent, node, phase) {
|
|
852
864
|
const data = node.data;
|
|
853
865
|
const raw = phase === "start" ? data?.startingMsg : data?.stoppingMsg;
|
|
@@ -2577,7 +2589,7 @@ function createFlowRunnerUx(options) {
|
|
|
2577
2589
|
const config = node.data?.config ?? {};
|
|
2578
2590
|
const params = m.includeInputs ? { ...config, $inputs: inputs } : config;
|
|
2579
2591
|
const result = await dispatcher.dispatch(name, params);
|
|
2580
|
-
if (result && typeof result === "object" && ("branch" in result || "__port" in result)) {
|
|
2592
|
+
if (result && typeof result === "object" && ("branch" in result || "__port" in result || "__ports" in result)) {
|
|
2581
2593
|
return result;
|
|
2582
2594
|
}
|
|
2583
2595
|
if (m.passThrough) return inputs.in ?? inputs;
|