@particle-academy/fancy-flow 0.16.0 → 0.18.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/index.d.cts CHANGED
@@ -1,6 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, CSSProperties, ComponentType } from 'react';
3
3
  import { ReactFlowProps, Edge, BackgroundVariant, NodeProps, NodeTypes } from '@xyflow/react';
4
+ import { ConnectionValidatorOptions } from './registry/index.cjs';
5
+ export { ANY_PORT_TYPE, BUILTIN_KINDS, PortCompatibility, RegistryNode, RichInputAdapter, RichInputPreview, buildNodeTypes, categoryAccent, createConnectionValidator, defaultConfigFor, defaultPortCompatibility, getNodeKind, getRichInputAdapter, isRichInputEnabled, listNodeKinds, onNodeKindsChanged, onRichInputAdapterChanged, registerBuiltinKinds, registerNodeKind, registerRichInputAdapter, resolveNodePorts, resolvePortSpec, validateConfig } from './registry/index.cjs';
4
6
  import { b as FlowNode, F as FlowGraph, e as NodeRunStatus, E as ExecutorRegistry } from './types-sOmpCitB.cjs';
5
7
  export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, a as FlowEdge, c as FlowNodeData, d as FlowNodeKind, N as NodeExecutor, f as NoteNodeData, O as OutputNodeData, P as PortDescriptor, R as RunEvent, S as SubgraphNodeData, T as TriggerNodeData } from './types-sOmpCitB.cjs';
6
8
  import { WorkflowSchema, WorkflowMetadata } from './schema/index.cjs';
@@ -9,7 +11,6 @@ import { N as NodeCategory, a as NodeKindDefinition, C as ConfigField } from './
9
11
  export { D as DocumentConfigField, K as KeyValueConfigField, P as PortSpec, R as RenderBodyContext, d as RepeaterConfigField, e as RepeaterRowField } from './types-D_jOR3Z2.cjs';
10
12
  import { FlowRunFeedEntry } from './runtime/index.cjs';
11
13
  export { UseFlowRunOptions, UseFlowRunReturn, UseFlowStateReturn, applyStatusesToNodes, useFlowRun, useFlowState } from './runtime/index.cjs';
12
- export { BUILTIN_KINDS, RegistryNode, RichInputAdapter, RichInputPreview, buildNodeTypes, categoryAccent, defaultConfigFor, getNodeKind, getRichInputAdapter, isRichInputEnabled, listNodeKinds, onNodeKindsChanged, onRichInputAdapterChanged, registerBuiltinKinds, registerNodeKind, registerRichInputAdapter, resolveNodePorts, resolvePortSpec, validateConfig } from './registry/index.cjs';
13
14
  export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-VKm57Hcj.cjs';
14
15
  export { L as LEGACY_PAUSE_PREFIXES, a as PAUSE_PREFIX, P as PauseAwaiting, b as PauseSignal, d as decodePause, e as encodePause, i as isPause, p as pauseForHuman } from './pause-9iT4tCEV.cjs';
15
16
  import './capabilities-ChE3Xi8R.cjs';
@@ -25,6 +26,14 @@ type FlowCanvasProps = Omit<ReactFlowProps<FlowNode, Edge>, "nodes" | "edges" |
25
26
  showMinimap?: boolean;
26
27
  /** Pixel height; FlowCanvas expects a sized container. Default 600. */
27
28
  height?: number | string;
29
+ /**
30
+ * Enforce port-type compatibility on new connections. `true` (default) uses
31
+ * the built-in validator: a connection is refused only when both ports
32
+ * declare a concrete, differing `type` (so untyped graphs are unaffected),
33
+ * and self-loops are blocked. Pass options to tune the rule, or `false` to
34
+ * disable. An `isValidConnection` you pass yourself always takes precedence.
35
+ */
36
+ validateConnections?: boolean | ConnectionValidatorOptions;
28
37
  /** Optional toolbar / palette etc. rendered above the canvas. */
29
38
  toolbar?: ReactNode;
30
39
  className?: string;
@@ -39,7 +48,7 @@ type FlowCanvasProps = Omit<ReactFlowProps<FlowNode, Edge>, "nodes" | "edges" |
39
48
  * (xyflow's standard pattern). The surrounding `useFlowState` hook in
40
49
  * `runtime/use-flow-state.ts` is a convenience that wires those for you.
41
50
  */
42
- declare function FlowCanvas({ nodes, edges, background, showControls, showMinimap, height, toolbar, nodeTypes, edgeTypes, className, style, ...rest }: FlowCanvasProps): react.JSX.Element;
51
+ declare function FlowCanvas({ nodes, edges, background, showControls, showMinimap, height, validateConnections, isValidConnection, toolbar, nodeTypes, edgeTypes, className, style, ...rest }: FlowCanvasProps): react.JSX.Element;
43
52
 
44
53
  /**
45
54
  * Everything the editor knows and can do, handed to every extension point.
@@ -243,6 +252,15 @@ type NodeConfigPanelProps = {
243
252
  node: FlowNode | null;
244
253
  /** Called when the user edits the node label, description, or config. */
245
254
  onChange: (next: FlowNode) => void;
255
+ /**
256
+ * Called when the user deletes the node from the panel. When provided, the
257
+ * panel renders a "Delete node" button while a node is selected — so the
258
+ * delete affordance lives WITH the panel (a dev composing their own editor
259
+ * gets it for free), rather than in a host toolbar it has to re-implement.
260
+ */
261
+ onDelete?: (node: FlowNode) => void;
262
+ /** Label for the delete button. Default "Delete node". */
263
+ deleteLabel?: string;
246
264
  /** Optional header content (e.g. close button). */
247
265
  header?: ReactNode;
248
266
  /** Optional credential picker hook — host renders the picker. */
@@ -268,7 +286,7 @@ type NodeConfigPanelProps = {
268
286
  * NodeConfigPanel — schema-driven form for the selected node. Defers to
269
287
  * `kind.renderPanel` if the kind opts out of the auto-form.
270
288
  */
271
- declare function NodeConfigPanel({ node, onChange, header, renderCredentialField, renderDocumentField, className, style, }: NodeConfigPanelProps): react.JSX.Element;
289
+ declare function NodeConfigPanel({ node, onChange, onDelete, deleteLabel, header, renderCredentialField, renderDocumentField, className, style, }: NodeConfigPanelProps): react.JSX.Element;
272
290
 
273
291
  type ConfigFieldRendererProps = {
274
292
  field: ConfigField;
@@ -435,4 +453,4 @@ type FlowRunFeedProps = {
435
453
  /** FlowRunFeed — scrolling log panel. Auto-scrolls to bottom on new entries. */
436
454
  declare function FlowRunFeed({ entries, className, style }: FlowRunFeedProps): react.JSX.Element;
437
455
 
438
- export { ActionNode, ConfigField, ConfigFieldRenderer, type ConfigFieldRendererProps, 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, 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, defaultNodeTypes, defineNode, paletteDropHandlers, useFlowEditor, useFlowEditorOptional };
456
+ export { ActionNode, 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, 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, defaultNodeTypes, defineNode, paletteDropHandlers, useFlowEditor, useFlowEditorOptional };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, CSSProperties, ComponentType } from 'react';
3
3
  import { ReactFlowProps, Edge, BackgroundVariant, NodeProps, NodeTypes } from '@xyflow/react';
4
+ import { ConnectionValidatorOptions } from './registry/index.js';
5
+ export { ANY_PORT_TYPE, BUILTIN_KINDS, PortCompatibility, RegistryNode, RichInputAdapter, RichInputPreview, buildNodeTypes, categoryAccent, createConnectionValidator, defaultConfigFor, defaultPortCompatibility, getNodeKind, getRichInputAdapter, isRichInputEnabled, listNodeKinds, onNodeKindsChanged, onRichInputAdapterChanged, registerBuiltinKinds, registerNodeKind, registerRichInputAdapter, resolveNodePorts, resolvePortSpec, validateConfig } from './registry/index.js';
4
6
  import { b as FlowNode, F as FlowGraph, e as NodeRunStatus, E as ExecutorRegistry } from './types-sOmpCitB.js';
5
7
  export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, a as FlowEdge, c as FlowNodeData, d as FlowNodeKind, N as NodeExecutor, f as NoteNodeData, O as OutputNodeData, P as PortDescriptor, R as RunEvent, S as SubgraphNodeData, T as TriggerNodeData } from './types-sOmpCitB.js';
6
8
  import { WorkflowSchema, WorkflowMetadata } from './schema/index.js';
@@ -9,7 +11,6 @@ import { N as NodeCategory, a as NodeKindDefinition, C as ConfigField } from './
9
11
  export { D as DocumentConfigField, K as KeyValueConfigField, P as PortSpec, R as RenderBodyContext, d as RepeaterConfigField, e as RepeaterRowField } from './types-NerkPtHS.js';
10
12
  import { FlowRunFeedEntry } from './runtime/index.js';
11
13
  export { UseFlowRunOptions, UseFlowRunReturn, UseFlowStateReturn, applyStatusesToNodes, useFlowRun, useFlowState } from './runtime/index.js';
12
- export { BUILTIN_KINDS, RegistryNode, RichInputAdapter, RichInputPreview, buildNodeTypes, categoryAccent, defaultConfigFor, getNodeKind, getRichInputAdapter, isRichInputEnabled, listNodeKinds, onNodeKindsChanged, onRichInputAdapterChanged, registerBuiltinKinds, registerNodeKind, registerRichInputAdapter, resolveNodePorts, resolvePortSpec, validateConfig } from './registry/index.js';
13
14
  export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-ChBi6q-W.js';
14
15
  export { L as LEGACY_PAUSE_PREFIXES, a as PAUSE_PREFIX, P as PauseAwaiting, b as PauseSignal, d as decodePause, e as encodePause, i as isPause, p as pauseForHuman } from './pause-9iT4tCEV.js';
15
16
  import './capabilities-DUhAc-EJ.js';
@@ -25,6 +26,14 @@ type FlowCanvasProps = Omit<ReactFlowProps<FlowNode, Edge>, "nodes" | "edges" |
25
26
  showMinimap?: boolean;
26
27
  /** Pixel height; FlowCanvas expects a sized container. Default 600. */
27
28
  height?: number | string;
29
+ /**
30
+ * Enforce port-type compatibility on new connections. `true` (default) uses
31
+ * the built-in validator: a connection is refused only when both ports
32
+ * declare a concrete, differing `type` (so untyped graphs are unaffected),
33
+ * and self-loops are blocked. Pass options to tune the rule, or `false` to
34
+ * disable. An `isValidConnection` you pass yourself always takes precedence.
35
+ */
36
+ validateConnections?: boolean | ConnectionValidatorOptions;
28
37
  /** Optional toolbar / palette etc. rendered above the canvas. */
29
38
  toolbar?: ReactNode;
30
39
  className?: string;
@@ -39,7 +48,7 @@ type FlowCanvasProps = Omit<ReactFlowProps<FlowNode, Edge>, "nodes" | "edges" |
39
48
  * (xyflow's standard pattern). The surrounding `useFlowState` hook in
40
49
  * `runtime/use-flow-state.ts` is a convenience that wires those for you.
41
50
  */
42
- declare function FlowCanvas({ nodes, edges, background, showControls, showMinimap, height, toolbar, nodeTypes, edgeTypes, className, style, ...rest }: FlowCanvasProps): react.JSX.Element;
51
+ declare function FlowCanvas({ nodes, edges, background, showControls, showMinimap, height, validateConnections, isValidConnection, toolbar, nodeTypes, edgeTypes, className, style, ...rest }: FlowCanvasProps): react.JSX.Element;
43
52
 
44
53
  /**
45
54
  * Everything the editor knows and can do, handed to every extension point.
@@ -243,6 +252,15 @@ type NodeConfigPanelProps = {
243
252
  node: FlowNode | null;
244
253
  /** Called when the user edits the node label, description, or config. */
245
254
  onChange: (next: FlowNode) => void;
255
+ /**
256
+ * Called when the user deletes the node from the panel. When provided, the
257
+ * panel renders a "Delete node" button while a node is selected — so the
258
+ * delete affordance lives WITH the panel (a dev composing their own editor
259
+ * gets it for free), rather than in a host toolbar it has to re-implement.
260
+ */
261
+ onDelete?: (node: FlowNode) => void;
262
+ /** Label for the delete button. Default "Delete node". */
263
+ deleteLabel?: string;
246
264
  /** Optional header content (e.g. close button). */
247
265
  header?: ReactNode;
248
266
  /** Optional credential picker hook — host renders the picker. */
@@ -268,7 +286,7 @@ type NodeConfigPanelProps = {
268
286
  * NodeConfigPanel — schema-driven form for the selected node. Defers to
269
287
  * `kind.renderPanel` if the kind opts out of the auto-form.
270
288
  */
271
- declare function NodeConfigPanel({ node, onChange, header, renderCredentialField, renderDocumentField, className, style, }: NodeConfigPanelProps): react.JSX.Element;
289
+ declare function NodeConfigPanel({ node, onChange, onDelete, deleteLabel, header, renderCredentialField, renderDocumentField, className, style, }: NodeConfigPanelProps): react.JSX.Element;
272
290
 
273
291
  type ConfigFieldRendererProps = {
274
292
  field: ConfigField;
@@ -435,4 +453,4 @@ type FlowRunFeedProps = {
435
453
  /** FlowRunFeed — scrolling log panel. Auto-scrolls to bottom on new entries. */
436
454
  declare function FlowRunFeed({ entries, className, style }: FlowRunFeedProps): react.JSX.Element;
437
455
 
438
- export { ActionNode, ConfigField, ConfigFieldRenderer, type ConfigFieldRendererProps, 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, 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, defaultNodeTypes, defineNode, paletteDropHandlers, useFlowEditor, useFlowEditorOptional };
456
+ export { ActionNode, 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, 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, defaultNodeTypes, defineNode, paletteDropHandlers, useFlowEditor, useFlowEditorOptional };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { useFlowState, useFlowRun, applyStatusesToNodes } from './chunk-MFMRTRPO.js';
2
2
  export { applyStatusesToNodes, useFlowRun, useFlowState } from './chunk-MFMRTRPO.js';
3
- import { buildNodeTypes, registerBuiltinKinds } from './chunk-M2QTDA3B.js';
4
- export { BUILTIN_KINDS, RegistryNode, buildNodeTypes, registerBuiltinKinds } from './chunk-M2QTDA3B.js';
3
+ import { buildNodeTypes, registerBuiltinKinds, createConnectionValidator } from './chunk-FSC64BPD.js';
4
+ export { ANY_PORT_TYPE, BUILTIN_KINDS, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility, registerBuiltinKinds } from './chunk-FSC64BPD.js';
5
5
  import { ReactFlowProvider, useReactFlow, addEdge, applyEdgeChanges, applyNodeChanges, Position, Handle, index, BackgroundVariant, Background, Controls, MiniMap } from './chunk-NF6NPY5N.js';
6
6
  export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, decodePause, encodePause, isPause, pauseForHuman } from './chunk-UEOE6B52.js';
7
7
  export { runFlow } from './chunk-L4AX73Q6.js';
@@ -151,6 +151,8 @@ function FlowCanvas({
151
151
  showControls = true,
152
152
  showMinimap = false,
153
153
  height = 600,
154
+ validateConnections = true,
155
+ isValidConnection,
154
156
  toolbar,
155
157
  nodeTypes,
156
158
  edgeTypes,
@@ -162,6 +164,16 @@ function FlowCanvas({
162
164
  () => ({ ...defaultNodeTypes, ...nodeTypes ?? {} }),
163
165
  [nodeTypes]
164
166
  );
167
+ const nodesRef = useRef(nodes);
168
+ nodesRef.current = nodes;
169
+ const builtinValidator = useMemo(
170
+ () => validateConnections === false ? void 0 : createConnectionValidator(
171
+ () => nodesRef.current,
172
+ validateConnections === true ? void 0 : validateConnections
173
+ ),
174
+ [validateConnections]
175
+ );
176
+ const resolvedIsValidConnection = isValidConnection ?? builtinValidator;
165
177
  const mergedEdgeTypes = useMemo(
166
178
  () => edgeTypes ? { ...edgeTypes } : void 0,
167
179
  [edgeTypes]
@@ -181,6 +193,7 @@ function FlowCanvas({
181
193
  proOptions: { hideAttribution: true },
182
194
  zoomActivationKeyCode: "Shift",
183
195
  preventScrolling: false,
196
+ isValidConnection: resolvedIsValidConnection,
184
197
  ...rest,
185
198
  children: [
186
199
  background !== "none" && /* @__PURE__ */ jsx(Background, { variant: background, gap: 20, size: 1, color: "rgba(0,0,0,0.18)" }),
@@ -649,6 +662,8 @@ function JsonField({ value, onChange, rows }) {
649
662
  function NodeConfigPanel({
650
663
  node,
651
664
  onChange,
665
+ onDelete,
666
+ deleteLabel = "Delete node",
652
667
  header,
653
668
  renderCredentialField,
654
669
  renderDocumentField,
@@ -670,7 +685,21 @@ function NodeConfigPanel({
670
685
  /* @__PURE__ */ jsxs("p", { className: "ff-panel__empty", children: [
671
686
  "Unknown kind: ",
672
687
  kindName
673
- ] })
688
+ ] }),
689
+ onDelete && /* @__PURE__ */ jsx("div", { className: "ff-panel__actions", children: /* @__PURE__ */ jsxs(
690
+ "button",
691
+ {
692
+ type: "button",
693
+ className: "ff-panel__delete",
694
+ "data-action": "delete-node",
695
+ onClick: () => onDelete(node),
696
+ title: "Delete this node (Del / Backspace)",
697
+ children: [
698
+ "\u2715 ",
699
+ deleteLabel
700
+ ]
701
+ }
702
+ ) })
674
703
  ] });
675
704
  }
676
705
  const setLabel = (label) => onChange({ ...node, data: { ...node.data, label } });
@@ -736,7 +765,21 @@ function NodeConfigPanel({
736
765
  issues.length > 0 && /* @__PURE__ */ jsx("div", { className: "ff-panel__issues", children: issues.map((iss) => /* @__PURE__ */ jsxs("p", { className: "ff-panel__issue", children: [
737
766
  "\u26A0 ",
738
767
  iss.message
739
- ] }, iss.key)) })
768
+ ] }, iss.key)) }),
769
+ onDelete && /* @__PURE__ */ jsx("div", { className: "ff-panel__actions", children: /* @__PURE__ */ jsxs(
770
+ "button",
771
+ {
772
+ type: "button",
773
+ className: "ff-panel__delete",
774
+ "data-action": "delete-node",
775
+ onClick: () => onDelete(node),
776
+ title: "Delete this node (Del / Backspace)",
777
+ children: [
778
+ "\u2715 ",
779
+ deleteLabel
780
+ ]
781
+ }
782
+ ) })
740
783
  ] });
741
784
  }
742
785
  function FlowRunControls({ running, onRun, onCancel, onReset, className, style }) {
@@ -993,18 +1036,7 @@ function FlowEditorInner({
993
1036
  const toolbar = slots.toolbar ? slots.toolbar(api) : /* @__PURE__ */ jsxs(Fragment, { children: [
994
1037
  startActions.map((a) => renderAction(a, api)),
995
1038
  builtins.run !== false && /* @__PURE__ */ jsx(FlowRunControls, { running: api.running, onRun: api.run, onCancel: api.cancel, onReset: api.reset }),
996
- (builtins.delete !== false || builtins.export !== false || builtins.import !== false) && /* @__PURE__ */ jsx("span", { className: "ff-editor__sep" }),
997
- builtins.delete !== false && /* @__PURE__ */ jsx(
998
- "button",
999
- {
1000
- className: "ff-editor__btn",
1001
- "data-action": "delete",
1002
- onClick: api.deleteSelected,
1003
- disabled: api.selected === null,
1004
- title: "Delete the selected node (Del / Backspace)",
1005
- children: "\u2715 Delete"
1006
- }
1007
- ),
1039
+ (builtins.export !== false || builtins.import !== false) && /* @__PURE__ */ jsx("span", { className: "ff-editor__sep" }),
1008
1040
  builtins.export !== false && /* @__PURE__ */ jsx("button", { className: "ff-editor__btn", "data-action": "export", onClick: api.exportWorkflow, children: "\u2193 Export" }),
1009
1041
  builtins.import !== false && /* @__PURE__ */ jsx("button", { className: "ff-editor__btn", "data-action": "import", onClick: api.importWorkflow, children: "\u2191 Import" }),
1010
1042
  endActions.map((a) => renderAction(a, api)),
@@ -1135,7 +1167,15 @@ function FlowEditorInner({
1135
1167
  showFeed && (slots.feed ? slots.feed(api) : /* @__PURE__ */ jsx(FlowRunFeed, { entries: runner.feed, className: "ff-editor__feed" }))
1136
1168
  ] }),
1137
1169
  showPanel && (slots.panel ? slots.panel(api) : /* @__PURE__ */ jsxs("div", { className: "ff-editor__panel-wrap", children: [
1138
- /* @__PURE__ */ jsx(NodeConfigPanel, { className: "ff-editor__panel", node: api.selected, onChange: api.updateNode }),
1170
+ /* @__PURE__ */ jsx(
1171
+ NodeConfigPanel,
1172
+ {
1173
+ className: "ff-editor__panel",
1174
+ node: api.selected,
1175
+ onChange: api.updateNode,
1176
+ onDelete: builtins.delete === false ? void 0 : (n) => api.deleteNodes([n.id])
1177
+ }
1178
+ ),
1139
1179
  slots.panelFooter && /* @__PURE__ */ jsx("div", { className: "ff-editor__panel-footer", children: slots.panelFooter(api) })
1140
1180
  ] }))
1141
1181
  ] });