@particle-academy/fancy-flow 0.26.0 → 0.27.1

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/index.d.cts CHANGED
@@ -538,10 +538,19 @@ declare function FlowRunControls({ running, onRun, onCancel, onReset, className,
538
538
 
539
539
  type FlowRunFeedProps = {
540
540
  entries: FlowRunFeedEntry[];
541
+ /** Show the header bar (title + running badge + event count). Default true. */
542
+ showHeader?: boolean;
543
+ /** Header title. Default "Run feed". */
544
+ title?: string;
545
+ /** When true, a "running" badge shows in the header. */
546
+ running?: boolean;
541
547
  className?: string;
542
548
  style?: CSSProperties;
543
549
  };
544
- /** FlowRunFeed — scrolling log panel. Auto-scrolls to bottom on new entries. */
545
- declare function FlowRunFeed({ entries, className, style }: FlowRunFeedProps): react.JSX.Element;
550
+ /**
551
+ * FlowRunFeed — scrolling run log with a header (title + live event count).
552
+ * Auto-scrolls its body to the bottom on new entries.
553
+ */
554
+ declare function FlowRunFeed({ entries, showHeader, title, running, className, style }: FlowRunFeedProps): react.JSX.Element;
546
555
 
547
556
  export { ActionNode, type AlignEdge, AutoLayoutOptions, ConfigField, ConfigFieldRenderer, type ConfigFieldRendererProps, ConnectionValidatorOptions, DecisionNode, ExecutorRegistry, FlowCanvas, type FlowCanvasProps, FlowEditor, type FlowEditorAction, type FlowEditorApi, type FlowEditorBuiltins, type FlowEditorProps, type FlowEditorSlots, FlowGraph, FlowNode, type FlowNodeRenderProps, FlowRunControls, type FlowRunControlsProps, FlowRunFeed, FlowRunFeedEntry, type FlowRunFeedProps, LaneNode, NodeCategory, NodeConfigPanel, type NodeConfigPanelProps, NodeKindDefinition, NodePalette, type NodePaletteProps, NodePort, type NodePortProps, type NodePortSide, type NodePortType, NodeRunStatus, NodeShell, type NodeShellProps, NoteNode, OutputNode, SubgraphNode, TriggerNode, WorkflowMetadata, WorkflowSchema, alignNodes, cloneSubgraph, defaultNodeTypes, defineNode, distributeNodes, paletteDropHandlers, reconnectEdge, useFlowEditor, useFlowEditorOptional };
package/dist/index.d.ts CHANGED
@@ -538,10 +538,19 @@ declare function FlowRunControls({ running, onRun, onCancel, onReset, className,
538
538
 
539
539
  type FlowRunFeedProps = {
540
540
  entries: FlowRunFeedEntry[];
541
+ /** Show the header bar (title + running badge + event count). Default true. */
542
+ showHeader?: boolean;
543
+ /** Header title. Default "Run feed". */
544
+ title?: string;
545
+ /** When true, a "running" badge shows in the header. */
546
+ running?: boolean;
541
547
  className?: string;
542
548
  style?: CSSProperties;
543
549
  };
544
- /** FlowRunFeed — scrolling log panel. Auto-scrolls to bottom on new entries. */
545
- declare function FlowRunFeed({ entries, className, style }: FlowRunFeedProps): react.JSX.Element;
550
+ /**
551
+ * FlowRunFeed — scrolling run log with a header (title + live event count).
552
+ * Auto-scrolls its body to the bottom on new entries.
553
+ */
554
+ declare function FlowRunFeed({ entries, showHeader, title, running, className, style }: FlowRunFeedProps): react.JSX.Element;
546
555
 
547
556
  export { ActionNode, type AlignEdge, AutoLayoutOptions, ConfigField, ConfigFieldRenderer, type ConfigFieldRendererProps, ConnectionValidatorOptions, DecisionNode, ExecutorRegistry, FlowCanvas, type FlowCanvasProps, FlowEditor, type FlowEditorAction, type FlowEditorApi, type FlowEditorBuiltins, type FlowEditorProps, type FlowEditorSlots, FlowGraph, FlowNode, type FlowNodeRenderProps, FlowRunControls, type FlowRunControlsProps, FlowRunFeed, FlowRunFeedEntry, type FlowRunFeedProps, LaneNode, NodeCategory, NodeConfigPanel, type NodeConfigPanelProps, NodeKindDefinition, NodePalette, type NodePaletteProps, NodePort, type NodePortProps, type NodePortSide, type NodePortType, NodeRunStatus, NodeShell, type NodeShellProps, NoteNode, OutputNode, SubgraphNode, TriggerNode, WorkflowMetadata, WorkflowSchema, alignNodes, cloneSubgraph, defaultNodeTypes, defineNode, distributeNodes, paletteDropHandlers, reconnectEdge, useFlowEditor, useFlowEditorOptional };
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { useFlowState, useFlowRun, useFlowHistory, applyOutputsToNodes, applyStatusesToNodes } from './chunk-OFW7GN3Y.js';
2
- export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-OFW7GN3Y.js';
3
- import { buildNodeTypes, FlowEditorProvider, registerBuiltinKinds, NoteNode, createConnectionValidator } from './chunk-YOFCVO2W.js';
4
- export { ANY_PORT_TYPE, BUILTIN_KINDS, LaneNode, NoteNode, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility, registerBuiltinKinds, useFlowEditor, useFlowEditorOptional } from './chunk-YOFCVO2W.js';
1
+ import { useFlowState, useFlowRun, useFlowHistory, applyOutputsToNodes, applyStatusesToNodes } from './chunk-HHFOHHAQ.js';
2
+ export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-HHFOHHAQ.js';
3
+ import { buildNodeTypes, FlowEditorProvider, registerBuiltinKinds, NoteNode, createConnectionValidator } from './chunk-THU5LW22.js';
4
+ export { ANY_PORT_TYPE, BUILTIN_KINDS, LaneNode, NoteNode, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility, registerBuiltinKinds, useFlowEditor, useFlowEditorOptional } from './chunk-THU5LW22.js';
5
5
  import { ReactFlowProvider, useReactFlow, addEdge, applyEdgeChanges, applyNodeChanges, Position, Handle, reconnectEdge, index, BackgroundVariant, Background, Controls, MiniMap, ViewportPortal } from './chunk-OWENS2H5.js';
6
6
  export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, decodePause, encodePause, isPause, pauseForHuman } from './chunk-UEOE6B52.js';
7
7
  import './chunk-USL4FMFU.js';
8
- export { runFlow } from './chunk-U2VJB7HR.js';
8
+ export { runFlow } from './chunk-RE7T5GKQ.js';
9
9
  import { workflowToBlob, importWorkflow, exportWorkflow } from './chunk-N5ICD2WZ.js';
10
10
  export { WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './chunk-N5ICD2WZ.js';
11
11
  export { resolveNodePorts, resolvePortSpec } from './chunk-TITD5W4Y.js';
@@ -969,9 +969,13 @@ function NodeConfigPanel({
969
969
  return /* @__PURE__ */ jsxs("aside", { className: ["ff-panel", className ?? ""].filter(Boolean).join(" "), style, children: [
970
970
  header,
971
971
  /* @__PURE__ */ jsxs("header", { className: "ff-panel__header", children: [
972
- /* @__PURE__ */ jsx("span", { className: "ff-panel__kind-tag", children: kind.label }),
973
- kind.description && /* @__PURE__ */ jsx("p", { className: "ff-panel__kind-desc", children: kind.description })
972
+ /* @__PURE__ */ jsx("span", { className: "ff-panel__head-icon", style: { background: kind.accent ?? categoryAccent(kind.category) }, "aria-hidden": true, children: kind.icon }),
973
+ /* @__PURE__ */ jsxs("span", { className: "ff-panel__head-text", children: [
974
+ /* @__PURE__ */ jsx("span", { className: "ff-panel__head-kind", children: kind.label }),
975
+ /* @__PURE__ */ jsx("span", { className: "ff-panel__head-name", children: node.data.label || kind.label })
976
+ ] })
974
977
  ] }),
978
+ kind.description && /* @__PURE__ */ jsx("p", { className: "ff-panel__kind-desc", children: kind.description }),
975
979
  /* @__PURE__ */ jsxs("div", { className: "ff-panel__field", children: [
976
980
  /* @__PURE__ */ jsx("label", { className: "ff-panel__label", children: "Label" }),
977
981
  /* @__PURE__ */ jsx(
@@ -1046,17 +1050,29 @@ function FlowRunControls({ running, onRun, onCancel, onReset, className, style }
1046
1050
  onReset && /* @__PURE__ */ jsx("button", { type: "button", className: "ff-run-controls__btn ff-run-controls__btn--reset", onClick: onReset, disabled: running, children: "Reset" })
1047
1051
  ] });
1048
1052
  }
1049
- function FlowRunFeed({ entries, className, style }) {
1053
+ function FlowRunFeed({ entries, showHeader = true, title = "Run feed", running, className, style }) {
1050
1054
  const scrollRef = useRef(null);
1051
1055
  useEffect(() => {
1052
1056
  const el = scrollRef.current;
1053
1057
  if (el) el.scrollTop = el.scrollHeight;
1054
1058
  }, [entries.length]);
1055
- return /* @__PURE__ */ jsx("div", { className: ["ff-run-feed", className ?? ""].filter(Boolean).join(" "), style, ref: scrollRef, children: entries.length === 0 ? /* @__PURE__ */ jsx("p", { className: "ff-run-feed__empty", children: "No run events yet." }) : entries.map((e) => /* @__PURE__ */ jsxs("div", { className: `ff-run-feed__row ff-run-feed__row--${e.level}`, children: [
1056
- /* @__PURE__ */ jsx("span", { className: "ff-run-feed__time", children: formatTime(e.at) }),
1057
- e.nodeId && /* @__PURE__ */ jsx("span", { className: "ff-run-feed__node", children: e.nodeId }),
1058
- /* @__PURE__ */ jsx("span", { className: "ff-run-feed__text", children: e.text })
1059
- ] }, e.id)) });
1059
+ return /* @__PURE__ */ jsxs("div", { className: ["ff-run-feed", className ?? ""].filter(Boolean).join(" "), style, children: [
1060
+ showHeader && /* @__PURE__ */ jsxs("div", { className: "ff-run-feed__header", children: [
1061
+ /* @__PURE__ */ jsx("span", { className: "ff-run-feed__title", "aria-hidden": true, children: "\u25B8" }),
1062
+ /* @__PURE__ */ jsx("span", { className: "ff-run-feed__title-text", children: title }),
1063
+ running && /* @__PURE__ */ jsx("span", { className: "ff-run-feed__badge", children: "running" }),
1064
+ /* @__PURE__ */ jsxs("span", { className: "ff-run-feed__count", children: [
1065
+ entries.length,
1066
+ " ",
1067
+ entries.length === 1 ? "event" : "events"
1068
+ ] })
1069
+ ] }),
1070
+ /* @__PURE__ */ jsx("div", { className: "ff-run-feed__body", ref: scrollRef, children: entries.length === 0 ? /* @__PURE__ */ jsx("p", { className: "ff-run-feed__empty", children: "No run events yet." }) : entries.map((e) => /* @__PURE__ */ jsxs("div", { className: `ff-run-feed__row ff-run-feed__row--${e.level}`, children: [
1071
+ /* @__PURE__ */ jsx("span", { className: "ff-run-feed__time", children: formatTime(e.at) }),
1072
+ e.nodeId && /* @__PURE__ */ jsx("span", { className: "ff-run-feed__node", children: e.nodeId }),
1073
+ /* @__PURE__ */ jsx("span", { className: "ff-run-feed__text", children: e.text })
1074
+ ] }, e.id)) })
1075
+ ] });
1060
1076
  }
1061
1077
  function formatTime(at) {
1062
1078
  const d = new Date(at);
@@ -1752,7 +1768,7 @@ function FlowEditorInner({
1752
1768
  onCancel: () => setLabelEdit(null)
1753
1769
  }
1754
1770
  ),
1755
- showFeed && (slots.feed ? slots.feed(api) : /* @__PURE__ */ jsx(FlowRunFeed, { entries: runner.feed, className: "ff-editor__feed" })),
1771
+ showFeed && (slots.feed ? slots.feed(api) : /* @__PURE__ */ jsx(FlowRunFeed, { entries: runner.feed, running: api.running, className: "ff-editor__feed" })),
1756
1772
  prompt && /* @__PURE__ */ jsx(HumanPrompt, { request: prompt, onCancel: () => {
1757
1773
  setPrompt(null);
1758
1774
  runner.cancel();