@particle-academy/fancy-flow 0.74.0 → 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.
Files changed (42) hide show
  1. package/dist/{chunk-XV5L4JQH.js → chunk-2H5H2DDP.js} +10 -9
  2. package/dist/chunk-2H5H2DDP.js.map +1 -0
  3. package/dist/{chunk-3RXQGYGH.js → chunk-4BPCA3ZO.js} +3 -3
  4. package/dist/{chunk-3RXQGYGH.js.map → chunk-4BPCA3ZO.js.map} +1 -1
  5. package/dist/{chunk-K7KO3UJ3.js → chunk-LKEDPVR3.js} +3 -3
  6. package/dist/{chunk-K7KO3UJ3.js.map → chunk-LKEDPVR3.js.map} +1 -1
  7. package/dist/{chunk-7DJ56PUA.js → chunk-T7E7QPHI.js} +4 -4
  8. package/dist/{chunk-7DJ56PUA.js.map → chunk-T7E7QPHI.js.map} +1 -1
  9. package/dist/{chunk-EX34GCKK.js → chunk-W7DMO3H7.js} +18 -6
  10. package/dist/chunk-W7DMO3H7.js.map +1 -0
  11. package/dist/{chunk-VAF2SWTC.js → chunk-XZFLPKO2.js} +3 -3
  12. package/dist/{chunk-VAF2SWTC.js.map → chunk-XZFLPKO2.js.map} +1 -1
  13. package/dist/{chunk-GQ5LEA7Q.js → chunk-ZBHIEKCN.js} +3 -3
  14. package/dist/{chunk-GQ5LEA7Q.js.map → chunk-ZBHIEKCN.js.map} +1 -1
  15. package/dist/durable.cjs +16 -4
  16. package/dist/durable.cjs.map +1 -1
  17. package/dist/durable.js +1 -1
  18. package/dist/engine.cjs +16 -4
  19. package/dist/engine.cjs.map +1 -1
  20. package/dist/engine.js +4 -4
  21. package/dist/index.cjs +22 -9
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.js +12 -12
  24. package/dist/registry.cjs +16 -4
  25. package/dist/registry.cjs.map +1 -1
  26. package/dist/registry.js +2 -2
  27. package/dist/runtime.cjs +16 -4
  28. package/dist/runtime.cjs.map +1 -1
  29. package/dist/runtime.js +3 -3
  30. package/dist/schema.cjs +16 -4
  31. package/dist/schema.cjs.map +1 -1
  32. package/dist/schema.js +3 -3
  33. package/dist/screens.cjs +22 -9
  34. package/dist/screens.cjs.map +1 -1
  35. package/dist/screens.js +4 -4
  36. package/dist/ux.cjs +17 -5
  37. package/dist/ux.cjs.map +1 -1
  38. package/dist/ux.js +2 -2
  39. package/dist/ux.js.map +1 -1
  40. package/package.json +2 -2
  41. package/dist/chunk-EX34GCKK.js.map +0 -1
  42. package/dist/chunk-XV5L4JQH.js.map +0 -1
package/dist/schema.js CHANGED
@@ -1,6 +1,6 @@
1
- export { WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './chunk-7DJ56PUA.js';
2
- import './chunk-VAF2SWTC.js';
3
- import './chunk-EX34GCKK.js';
1
+ export { WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './chunk-T7E7QPHI.js';
2
+ import './chunk-XZFLPKO2.js';
3
+ import './chunk-W7DMO3H7.js';
4
4
  import './chunk-2QXKDLGT.js';
5
5
  //# sourceMappingURL=schema.js.map
6
6
  //# sourceMappingURL=schema.js.map
package/dist/screens.cjs CHANGED
@@ -9861,8 +9861,9 @@ async function runFlow(graph, executors, onEvent = () => {
9861
9861
  outputs[node.id] = stored;
9862
9862
  const activated = activatedPorts(node, stored);
9863
9863
  for (const portId of activated.ports) {
9864
- portValues.set(`${node.id}:${portId}`, activated.value);
9865
- onEvent({ type: "node-output", nodeId: node.id, portId, value: activated.value });
9864
+ const value = portValueOf(activated, portId);
9865
+ portValues.set(`${node.id}:${portId}`, value);
9866
+ onEvent({ type: "node-output", nodeId: node.id, portId, value });
9866
9867
  }
9867
9868
  completed.add(node.id);
9868
9869
  onEvent({ type: "node-status", nodeId: node.id, status: "done", text: "resumed" });
@@ -9925,8 +9926,9 @@ async function runFlow(graph, executors, onEvent = () => {
9925
9926
  outputs[node.id] = result;
9926
9927
  const activated = activatedPorts(node, result);
9927
9928
  for (const portId of activated.ports) {
9928
- portValues.set(`${node.id}:${portId}`, activated.value);
9929
- onEvent({ type: "node-output", nodeId: node.id, portId, value: activated.value });
9929
+ const value = portValueOf(activated, portId);
9930
+ portValues.set(`${node.id}:${portId}`, value);
9931
+ onEvent({ type: "node-output", nodeId: node.id, portId, value });
9930
9932
  }
9931
9933
  completed.add(node.id);
9932
9934
  onEvent({ type: "node-status", nodeId: node.id, status: "done" });
@@ -10032,6 +10034,13 @@ function activatedPorts(node, result) {
10032
10034
  if (typeof r.__port === "string") {
10033
10035
  return { ports: [r.__port], value: r.value };
10034
10036
  }
10037
+ if (Array.isArray(r.__ports)) {
10038
+ return { ports: r.__ports.filter((p) => typeof p === "string"), value: r.value };
10039
+ }
10040
+ if (r.__ports && typeof r.__ports === "object") {
10041
+ const values = r.__ports;
10042
+ return { ports: Object.keys(values), value: r.value, values };
10043
+ }
10035
10044
  if (typeof r.branch === "string") {
10036
10045
  return { ports: [r.branch], value: Object.prototype.hasOwnProperty.call(r, "value") ? r.value : r };
10037
10046
  }
@@ -10040,6 +10049,9 @@ function activatedPorts(node, result) {
10040
10049
  const declared = resolveNodePorts(node, kind).outputs?.map((p) => p.id);
10041
10050
  return { ports: declared?.length ? declared : ["out"], value: result };
10042
10051
  }
10052
+ function portValueOf(activated, portId) {
10053
+ return activated.values && Object.prototype.hasOwnProperty.call(activated.values, portId) ? activated.values[portId] : activated.value;
10054
+ }
10043
10055
  function announce(onEvent, node, phase) {
10044
10056
  const data = node.data;
10045
10057
  const raw = phase === "start" ? data?.startingMsg : data?.stoppingMsg;
@@ -11972,14 +11984,15 @@ function useResolvedColorMode(explicit) {
11972
11984
  }, [pinned]);
11973
11985
  return pinned ?? resolved;
11974
11986
  }
11975
- function preventScrollWhileZooming(event) {
11976
- if (event.shiftKey) event.preventDefault();
11987
+ function keepBareWheelFromZooming(event) {
11988
+ if (!event.shiftKey) event.stopPropagation();
11977
11989
  }
11978
11990
  function wheelZoomProps(zoomOnWheel) {
11979
- return zoomOnWheel ? { zoomActivationKeyCode: null, preventScrolling: true } : {
11991
+ return zoomOnWheel ? { zoomOnScroll: true, zoomActivationKeyCode: null, preventScrolling: true } : {
11992
+ zoomOnScroll: false,
11980
11993
  zoomActivationKeyCode: "Shift",
11981
- preventScrolling: false,
11982
- onWheelCapture: preventScrollWhileZooming
11994
+ preventScrolling: true,
11995
+ onWheelCapture: keepBareWheelFromZooming
11983
11996
  };
11984
11997
  }
11985
11998
  var DEFAULT_FIT_VIEW = { padding: 0.2 };