@particle-academy/fancy-flow 0.45.0 → 0.46.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 (77) hide show
  1. package/dist/{ConfigFieldRenderer-Dzy4f6rG.d.cts → ConfigFieldRenderer-Cyir8-B8.d.cts} +2 -2
  2. package/dist/{ConfigFieldRenderer-WqJr-td_.d.ts → ConfigFieldRenderer-iMkZj0VK.d.ts} +2 -2
  3. package/dist/{FlowViewer-BbbUJe2b.d.cts → FlowViewer-CY3_vHSg.d.cts} +1 -1
  4. package/dist/{FlowViewer-csuaTL5t.d.ts → FlowViewer-DGW6t-80.d.ts} +1 -1
  5. package/dist/{capabilities-Brn74URS.d.ts → capabilities-DMUhnyZD.d.ts} +1 -1
  6. package/dist/{capabilities-CYCeIx6I.d.cts → capabilities-Dmd26aAs.d.cts} +1 -1
  7. package/dist/chunk-BHM5HGXH.js +79 -0
  8. package/dist/chunk-BHM5HGXH.js.map +1 -0
  9. package/dist/{chunk-DHUFUDEX.js → chunk-HFUBVT7W.js} +3 -3
  10. package/dist/{chunk-DHUFUDEX.js.map → chunk-HFUBVT7W.js.map} +1 -1
  11. package/dist/{chunk-VLATLVGH.js → chunk-L43CWD63.js} +129 -5
  12. package/dist/chunk-L43CWD63.js.map +1 -0
  13. package/dist/{chunk-A6RFLGWV.js → chunk-MH4ZW4DJ.js} +3 -3
  14. package/dist/{chunk-A6RFLGWV.js.map → chunk-MH4ZW4DJ.js.map} +1 -1
  15. package/dist/{chunk-QZTGV3ZL.js → chunk-P5SYH6M6.js} +3 -3
  16. package/dist/{chunk-QZTGV3ZL.js.map → chunk-P5SYH6M6.js.map} +1 -1
  17. package/dist/{chunk-WBXGZVLB.js → chunk-RMU6YCIQ.js} +11 -5
  18. package/dist/chunk-RMU6YCIQ.js.map +1 -0
  19. package/dist/durable/index.d.cts +490 -0
  20. package/dist/durable/index.d.ts +490 -0
  21. package/dist/durable.cjs +927 -0
  22. package/dist/durable.cjs.map +1 -0
  23. package/dist/durable.js +552 -0
  24. package/dist/durable.js.map +1 -0
  25. package/dist/engine.cjs +128 -2
  26. package/dist/engine.cjs.map +1 -1
  27. package/dist/engine.d.cts +9 -7
  28. package/dist/engine.d.ts +9 -7
  29. package/dist/engine.js +4 -4
  30. package/dist/fields/react-fancy.d.cts +4 -3
  31. package/dist/fields/react-fancy.d.ts +4 -3
  32. package/dist/index.cjs +133 -3
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.d.cts +12 -10
  35. package/dist/index.d.ts +12 -10
  36. package/dist/index.js +13 -88
  37. package/dist/index.js.map +1 -1
  38. package/dist/layout/index.d.cts +1 -1
  39. package/dist/layout/index.d.ts +1 -1
  40. package/dist/llm/prism.d.cts +2 -2
  41. package/dist/llm/prism.d.ts +2 -2
  42. package/dist/llm/vercel-ai.d.cts +2 -2
  43. package/dist/llm/vercel-ai.d.ts +2 -2
  44. package/dist/pause-9iT4tCEV.d.cts +96 -0
  45. package/dist/pause-9iT4tCEV.d.ts +96 -0
  46. package/dist/registry/index.d.cts +7 -6
  47. package/dist/registry/index.d.ts +7 -6
  48. package/dist/{registry-Budds73w.d.cts → registry-D_kyUZEf.d.cts} +1 -1
  49. package/dist/{registry-D0I20HJ3.d.ts → registry-LHB3MlR9.d.ts} +1 -1
  50. package/dist/registry.cjs +133 -3
  51. package/dist/registry.cjs.map +1 -1
  52. package/dist/registry.js +4 -4
  53. package/dist/{run-cohort-CV7EcwGG.d.ts → run-cohort-Cyeny2Uu.d.ts} +3 -34
  54. package/dist/{run-cohort-DitsaYgS.d.cts → run-cohort-DdPPowJ3.d.cts} +3 -34
  55. package/dist/run-flow-1KiXhy59.d.cts +55 -0
  56. package/dist/run-flow-CQvTDBYk.d.ts +55 -0
  57. package/dist/runtime/index.d.cts +5 -3
  58. package/dist/runtime/index.d.ts +5 -3
  59. package/dist/runtime.cjs +128 -2
  60. package/dist/runtime.cjs.map +1 -1
  61. package/dist/runtime.js +3 -3
  62. package/dist/schema/index.d.cts +1 -1
  63. package/dist/schema/index.d.ts +1 -1
  64. package/dist/screens.d.cts +2 -2
  65. package/dist/screens.d.ts +2 -2
  66. package/dist/screens.js +6 -6
  67. package/dist/{types-D6ZSKBly.d.ts → types--S2Kzx7w.d.cts} +3 -97
  68. package/dist/{types-nQOA8jpk.d.cts → types-ChkCRonF.d.ts} +3 -97
  69. package/dist/types-Jx1TwehV.d.cts +247 -0
  70. package/dist/types-Jx1TwehV.d.ts +247 -0
  71. package/dist/ux.d.cts +3 -2
  72. package/dist/ux.d.ts +3 -2
  73. package/package.json +12 -2
  74. package/dist/chunk-VLATLVGH.js.map +0 -1
  75. package/dist/chunk-WBXGZVLB.js.map +0 -1
  76. package/dist/types-CMSrWVYM.d.cts +0 -109
  77. package/dist/types-CMSrWVYM.d.ts +0 -109
package/dist/index.d.cts CHANGED
@@ -3,22 +3,24 @@ import { ReactNode, CSSProperties, ComponentProps, ComponentType } from 'react';
3
3
  import { ReactFlowProps, Edge, BackgroundVariant, Connection, NodeProps, NodeTypes } from '@xyflow/react';
4
4
  import { ConnectionValidatorOptions } from './registry/index.cjs';
5
5
  export { ANY_PORT_TYPE, BUILTIN_KINDS, PortCompatibility, RegistryNode, RichInputAdapter, RichInputPreview, buildNodeTypes, createConnectionValidator, defaultPortCompatibility, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerBuiltinKinds, registerRichInputAdapter, resolveNodePorts, resolvePortSpec } from './registry/index.cjs';
6
- import { a as FlowNode, F as FlowGraph, e as NodeRunStatus, E as ExecutorRegistry } from './types-CMSrWVYM.cjs';
7
- export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, b 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-CMSrWVYM.cjs';
8
- import { C as ConfigFieldRenderFn } from './ConfigFieldRenderer-Dzy4f6rG.cjs';
9
- export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './ConfigFieldRenderer-Dzy4f6rG.cjs';
6
+ import { a as FlowNode, F as FlowGraph, g as NodeRunStatus, E as ExecutorRegistry } from './types-Jx1TwehV.cjs';
7
+ export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, d as FlowEdge, e as FlowNodeData, f as FlowNodeKind, N as NodeExecutor, h as NoteNodeData, O as OutputNodeData, P as PortDescriptor, R as RunEvent, S as SubgraphNodeData, T as TriggerNodeData } from './types-Jx1TwehV.cjs';
8
+ import { C as ConfigFieldRenderFn } from './ConfigFieldRenderer-Cyir8-B8.cjs';
9
+ export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './ConfigFieldRenderer-Cyir8-B8.cjs';
10
10
  import { WorkflowSchema, WorkflowMetadata } from './schema/index.cjs';
11
11
  export { ImportIssue, ImportOptions, ImportResult, WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, WorkflowSchemaEdge, WorkflowSchemaNode, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './schema/index.cjs';
12
12
  import { AutoLayoutOptions } from './layout/index.cjs';
13
13
  export { AutoLayoutDirection } from './layout/index.cjs';
14
- import { a as NodeCategory, N as NodeKindDefinition } from './types-nQOA8jpk.cjs';
15
- export { A as AvailableVariable, C as ConfigField, D as DocumentConfigField, z as ExpressionForm, B as ExpressionGrammarHelp, K as KeyValueConfigField, L as LEGACY_PAUSE_PREFIXES, O as OutputField, F as OutputShape, h as PAUSE_PREFIX, P as PauseAwaiting, i as PauseSignal, j as PortSpec, R as RenderBodyContext, t as RepeaterConfigField, u as RepeaterRowField, G as availableVariables, H as baseVariables, m as decodePause, I as describeExpressionGrammar, n as encodePause, o as isPause, Q as outputFieldsFor, p as pauseForHuman } from './types-nQOA8jpk.cjs';
16
- export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-BbbUJe2b.cjs';
14
+ import { a as NodeCategory, N as NodeKindDefinition } from './types--S2Kzx7w.cjs';
15
+ export { A as AvailableVariable, C as ConfigField, D as DocumentConfigField, q as ExpressionForm, r as ExpressionGrammarHelp, K as KeyValueConfigField, O as OutputField, t as OutputShape, P as PortSpec, R as RenderBodyContext, l as RepeaterConfigField, m as RepeaterRowField, u as availableVariables, w as baseVariables, x as describeExpressionGrammar, y as outputFieldsFor } from './types--S2Kzx7w.cjs';
16
+ export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-CY3_vHSg.cjs';
17
17
  import { FlowRunFeedEntry } from './runtime/index.cjs';
18
18
  export { HistoryController, UseFlowHistoryReturn, UseFlowRunOptions, UseFlowRunReturn, UseFlowStateReturn, applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './runtime/index.cjs';
19
- export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, R as RunOptions, d as RunResult, r as runCohort, e as runFlow } from './run-cohort-DitsaYgS.cjs';
20
- export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, e as overrideNodeKind, r as registerNodeKind, v as validateConfig } from './registry-Budds73w.cjs';
21
- import './capabilities-CYCeIx6I.cjs';
19
+ export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-1KiXhy59.cjs';
20
+ export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-DdPPowJ3.cjs';
21
+ 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';
22
+ export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, e as overrideNodeKind, r as registerNodeKind, v as validateConfig } from './registry-D_kyUZEf.cjs';
23
+ import './capabilities-Dmd26aAs.cjs';
22
24
 
23
25
  type FlowCanvasProps = Omit<ReactFlowProps<FlowNode, Edge>, "nodes" | "edges" | "height"> & {
24
26
  nodes: FlowNode[];
package/dist/index.d.ts CHANGED
@@ -3,22 +3,24 @@ import { ReactNode, CSSProperties, ComponentProps, ComponentType } from 'react';
3
3
  import { ReactFlowProps, Edge, BackgroundVariant, Connection, NodeProps, NodeTypes } from '@xyflow/react';
4
4
  import { ConnectionValidatorOptions } from './registry/index.js';
5
5
  export { ANY_PORT_TYPE, BUILTIN_KINDS, PortCompatibility, RegistryNode, RichInputAdapter, RichInputPreview, buildNodeTypes, createConnectionValidator, defaultPortCompatibility, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerBuiltinKinds, registerRichInputAdapter, resolveNodePorts, resolvePortSpec } from './registry/index.js';
6
- import { a as FlowNode, F as FlowGraph, e as NodeRunStatus, E as ExecutorRegistry } from './types-CMSrWVYM.js';
7
- export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, b 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-CMSrWVYM.js';
8
- import { C as ConfigFieldRenderFn } from './ConfigFieldRenderer-WqJr-td_.js';
9
- export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './ConfigFieldRenderer-WqJr-td_.js';
6
+ import { a as FlowNode, F as FlowGraph, g as NodeRunStatus, E as ExecutorRegistry } from './types-Jx1TwehV.js';
7
+ export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, d as FlowEdge, e as FlowNodeData, f as FlowNodeKind, N as NodeExecutor, h as NoteNodeData, O as OutputNodeData, P as PortDescriptor, R as RunEvent, S as SubgraphNodeData, T as TriggerNodeData } from './types-Jx1TwehV.js';
8
+ import { C as ConfigFieldRenderFn } from './ConfigFieldRenderer-iMkZj0VK.js';
9
+ export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './ConfigFieldRenderer-iMkZj0VK.js';
10
10
  import { WorkflowSchema, WorkflowMetadata } from './schema/index.js';
11
11
  export { ImportIssue, ImportOptions, ImportResult, WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, WorkflowSchemaEdge, WorkflowSchemaNode, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './schema/index.js';
12
12
  import { AutoLayoutOptions } from './layout/index.js';
13
13
  export { AutoLayoutDirection } from './layout/index.js';
14
- import { a as NodeCategory, N as NodeKindDefinition } from './types-D6ZSKBly.js';
15
- export { A as AvailableVariable, C as ConfigField, D as DocumentConfigField, z as ExpressionForm, B as ExpressionGrammarHelp, K as KeyValueConfigField, L as LEGACY_PAUSE_PREFIXES, O as OutputField, F as OutputShape, h as PAUSE_PREFIX, P as PauseAwaiting, i as PauseSignal, j as PortSpec, R as RenderBodyContext, t as RepeaterConfigField, u as RepeaterRowField, G as availableVariables, H as baseVariables, m as decodePause, I as describeExpressionGrammar, n as encodePause, o as isPause, Q as outputFieldsFor, p as pauseForHuman } from './types-D6ZSKBly.js';
16
- export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-csuaTL5t.js';
14
+ import { a as NodeCategory, N as NodeKindDefinition } from './types-ChkCRonF.js';
15
+ export { A as AvailableVariable, C as ConfigField, D as DocumentConfigField, q as ExpressionForm, r as ExpressionGrammarHelp, K as KeyValueConfigField, O as OutputField, t as OutputShape, P as PortSpec, R as RenderBodyContext, l as RepeaterConfigField, m as RepeaterRowField, u as availableVariables, w as baseVariables, x as describeExpressionGrammar, y as outputFieldsFor } from './types-ChkCRonF.js';
16
+ export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-DGW6t-80.js';
17
17
  import { FlowRunFeedEntry } from './runtime/index.js';
18
18
  export { HistoryController, UseFlowHistoryReturn, UseFlowRunOptions, UseFlowRunReturn, UseFlowStateReturn, applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './runtime/index.js';
19
- export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, R as RunOptions, d as RunResult, r as runCohort, e as runFlow } from './run-cohort-CV7EcwGG.js';
20
- export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, e as overrideNodeKind, r as registerNodeKind, v as validateConfig } from './registry-D0I20HJ3.js';
21
- import './capabilities-Brn74URS.js';
19
+ export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-CQvTDBYk.js';
20
+ export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-Cyeny2Uu.js';
21
+ 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';
22
+ export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, e as overrideNodeKind, r as registerNodeKind, v as validateConfig } from './registry-LHB3MlR9.js';
23
+ import './capabilities-DMUhnyZD.js';
22
24
 
23
25
  type FlowCanvasProps = Omit<ReactFlowProps<FlowNode, Edge>, "nodes" | "edges" | "height"> & {
24
26
  nodes: FlowNode[];
package/dist/index.js CHANGED
@@ -1,21 +1,22 @@
1
- import { removeNodes, removeEdges, cloneSubgraph, alignNodes, distributeNodes, reconnectEdge, assignToLane, removeFromLane, duplicateNode, setEdgeLabel, FlowCanvas } from './chunk-DHUFUDEX.js';
2
- export { ActionNode, DecisionNode, FlowCanvas, FlowViewer, NodeShell, OutputNode, SubgraphNode, TriggerNode, alignNodes, cloneSubgraph, defaultNodeTypes, distributeNodes, reconnectEdge } from './chunk-DHUFUDEX.js';
3
- import { useFlowState, useFlowRun, useFlowHistory, applyOutputsToNodes, applyStatusesToNodes } from './chunk-A6RFLGWV.js';
4
- export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-A6RFLGWV.js';
5
- export { runCohort } from './chunk-QZTGV3ZL.js';
6
- import { buildNodeTypes, FlowEditorProvider, registerBuiltinKinds } from './chunk-WBXGZVLB.js';
7
- export { ANY_PORT_TYPE, BUILTIN_KINDS, LaneNode, NoteNode, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility, registerBuiltinKinds, useFlowEditor, useFlowEditorOptional } from './chunk-WBXGZVLB.js';
1
+ import { removeNodes, removeEdges, cloneSubgraph, alignNodes, distributeNodes, reconnectEdge, assignToLane, removeFromLane, duplicateNode, setEdgeLabel, FlowCanvas } from './chunk-HFUBVT7W.js';
2
+ export { ActionNode, DecisionNode, FlowCanvas, FlowViewer, NodeShell, OutputNode, SubgraphNode, TriggerNode, alignNodes, cloneSubgraph, defaultNodeTypes, distributeNodes, reconnectEdge } from './chunk-HFUBVT7W.js';
3
+ import { useFlowState, useFlowRun, useFlowHistory, applyOutputsToNodes, applyStatusesToNodes } from './chunk-MH4ZW4DJ.js';
4
+ export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-MH4ZW4DJ.js';
5
+ export { runCohort } from './chunk-P5SYH6M6.js';
6
+ export { evaluateConfig, evaluateExpression, resolvePath, text, truthy } from './chunk-BHM5HGXH.js';
7
+ import { buildNodeTypes, FlowEditorProvider, registerBuiltinKinds } from './chunk-RMU6YCIQ.js';
8
+ export { ANY_PORT_TYPE, BUILTIN_KINDS, LaneNode, NoteNode, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility, registerBuiltinKinds, useFlowEditor, useFlowEditorOptional } from './chunk-RMU6YCIQ.js';
9
+ import { getRichInputAdapter } from './chunk-F5RPRB7A.js';
10
+ export { RichInputPreview, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerRichInputAdapter } from './chunk-F5RPRB7A.js';
8
11
  import { ReactFlowProvider, useReactFlow, addEdge, applyEdgeChanges, applyNodeChanges, Position, Handle } from './chunk-OWENS2H5.js';
9
- export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, decodePause, encodePause, isPause, pauseForHuman } from './chunk-UEOE6B52.js';
10
12
  import './chunk-USL4FMFU.js';
11
- export { runFlow } from './chunk-VLATLVGH.js';
13
+ export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, decodePause, encodePause, isPause, pauseForHuman } from './chunk-UEOE6B52.js';
14
+ export { runFlow } from './chunk-L43CWD63.js';
12
15
  import { workflowToBlob, importWorkflow, exportWorkflow } from './chunk-3BKU4SQZ.js';
13
16
  export { WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './chunk-3BKU4SQZ.js';
14
17
  export { resolveNodePorts, resolvePortSpec } from './chunk-TITD5W4Y.js';
15
18
  import { onNodeKindsChanged, listNodeKinds, getNodeKind, defaultConfigFor, validateConfig, categoryAccent } from './chunk-PVROYW7C.js';
16
19
  export { categoryAccent, clearNodeKindOverrides, defaultConfigFor, getNodeKind, listNodeKinds, onNodeKindsChanged, overrideNodeKind, registerNodeKind, validateConfig } from './chunk-PVROYW7C.js';
17
- import { getRichInputAdapter } from './chunk-F5RPRB7A.js';
18
- export { RichInputPreview, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerRichInputAdapter } from './chunk-F5RPRB7A.js';
19
20
  import { forwardRef, useState, useMemo, useEffect, useCallback, useRef, useImperativeHandle, useId, memo } from 'react';
20
21
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
21
22
 
@@ -1823,85 +1824,9 @@ var flowKeys = {
1823
1824
  run: (runId) => ["flow", "runs", runId]
1824
1825
  };
1825
1826
 
1826
- // src/expressions/expr.ts
1827
- function wholeExpression(trimmed) {
1828
- if (trimmed.length < 4) return null;
1829
- if (!trimmed.startsWith("{{") || !trimmed.endsWith("}}")) return null;
1830
- return trimmed.slice(2, -2);
1831
- }
1832
- function interpolate(template, resolve) {
1833
- let out = "";
1834
- let i = 0;
1835
- for (; ; ) {
1836
- const open = template.indexOf("{{", i);
1837
- if (open === -1) return out + template.slice(i);
1838
- const close = template.indexOf("}}", open + 2);
1839
- if (close === -1) return out + template.slice(i);
1840
- out += template.slice(i, open) + resolve(template.slice(open + 2, close));
1841
- i = close + 2;
1842
- }
1843
- }
1844
- var FALSY_STRINGS = /* @__PURE__ */ new Set(["", "0", "false", "no", "off", "null"]);
1845
- function resolvePath(path, context) {
1846
- const trimmed = path.trim();
1847
- if (trimmed === "") return null;
1848
- const segments = trimmed.split(".");
1849
- let cursor;
1850
- const head = segments[0];
1851
- if (head === "$json" || head === "$input") {
1852
- cursor = context !== null && typeof context === "object" && "in" in context ? context.in : context;
1853
- segments.shift();
1854
- } else {
1855
- cursor = context;
1856
- }
1857
- for (const segment of segments) {
1858
- if (cursor === null || cursor === void 0) return null;
1859
- if (typeof cursor !== "object") return null;
1860
- const next = cursor[segment];
1861
- if (next === void 0) return null;
1862
- cursor = next;
1863
- }
1864
- return cursor === void 0 ? null : cursor;
1865
- }
1866
- function evaluateExpression(template, context) {
1867
- if (typeof template !== "string") return template;
1868
- const whole = wholeExpression(template.trim());
1869
- if (whole !== null) return resolvePath(whole, context);
1870
- return interpolate(template, (path) => stringify(resolvePath(path, context)));
1871
- }
1872
- function truthy(value) {
1873
- if (typeof value === "boolean") return value;
1874
- if (value === null || value === void 0) return false;
1875
- if (typeof value === "string") return !FALSY_STRINGS.has(value.trim().toLowerCase());
1876
- if (Array.isArray(value)) return value.length > 0;
1877
- if (typeof value === "number") return value !== 0;
1878
- return Boolean(value);
1879
- }
1880
- function text(value) {
1881
- return stringify(value);
1882
- }
1883
- function stringify(value) {
1884
- if (typeof value === "string") return value;
1885
- if (typeof value === "boolean") return value ? "true" : "false";
1886
- if (value === null || value === void 0) return "";
1887
- if (typeof value === "number" || typeof value === "bigint") return String(value);
1888
- try {
1889
- return JSON.stringify(value) ?? "";
1890
- } catch {
1891
- return "";
1892
- }
1893
- }
1894
- function evaluateConfig(config, context) {
1895
- const out = {};
1896
- for (const [key, value] of Object.entries(config)) {
1897
- out[key] = Array.isArray(value) ? value.map((v) => evaluateExpression(v, context)) : value !== null && typeof value === "object" ? evaluateConfig(value, context) : evaluateExpression(value, context);
1898
- }
1899
- return out;
1900
- }
1901
-
1902
1827
  // src/index.ts
1903
1828
  registerBuiltinKinds();
1904
1829
 
1905
- export { ConfigFieldRenderer, ExpressionField, FlowEditor, FlowRunControls, FlowRunFeed, NodeConfigPanel, NodePalette, NodePort, availableVariables, baseVariables, defineNode, describeExpressionGrammar, evaluateConfig, evaluateExpression, flowKeys, flowLive, outputFieldsFor, paletteDropHandlers, resolvePath, text, truthy };
1830
+ export { ConfigFieldRenderer, ExpressionField, FlowEditor, FlowRunControls, FlowRunFeed, NodeConfigPanel, NodePalette, NodePort, availableVariables, baseVariables, defineNode, describeExpressionGrammar, flowKeys, flowLive, outputFieldsFor, paletteDropHandlers };
1906
1831
  //# sourceMappingURL=index.js.map
1907
1832
  //# sourceMappingURL=index.js.map