@particle-academy/fancy-flow 0.59.0 → 0.63.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 (63) hide show
  1. package/dist/{HumanPrompt-Bw09OyS3.d.ts → HumanPrompt-BKThiyjB.d.ts} +1 -1
  2. package/dist/{HumanPrompt-DV5-xnDa.d.cts → HumanPrompt-Bpp3JiVH.d.cts} +1 -1
  3. package/dist/{chunk-M7M6GLFV.js → chunk-5H54OTKT.js} +3 -3
  4. package/dist/{chunk-M7M6GLFV.js.map → chunk-5H54OTKT.js.map} +1 -1
  5. package/dist/{chunk-MX4SJDNI.js → chunk-EO6444T2.js} +4 -4
  6. package/dist/{chunk-MX4SJDNI.js.map → chunk-EO6444T2.js.map} +1 -1
  7. package/dist/{chunk-HBE4LVPX.js → chunk-JF6WCRBU.js} +9 -7
  8. package/dist/chunk-JF6WCRBU.js.map +1 -0
  9. package/dist/{chunk-LGLOBK6Q.js → chunk-MBVX4ZRB.js} +3 -3
  10. package/dist/{chunk-LGLOBK6Q.js.map → chunk-MBVX4ZRB.js.map} +1 -1
  11. package/dist/{chunk-FGYG5JVW.js → chunk-MEIDPBKE.js} +3 -3
  12. package/dist/{chunk-FGYG5JVW.js.map → chunk-MEIDPBKE.js.map} +1 -1
  13. package/dist/{chunk-A3TLZS5B.js → chunk-RIAFHQT5.js} +3 -3
  14. package/dist/{chunk-A3TLZS5B.js.map → chunk-RIAFHQT5.js.map} +1 -1
  15. package/dist/{chunk-BHM5HGXH.js → chunk-UM4C46AF.js} +38 -14
  16. package/dist/chunk-UM4C46AF.js.map +1 -0
  17. package/dist/connectors.d.cts +1 -1
  18. package/dist/connectors.d.ts +1 -1
  19. package/dist/durable.cjs +7 -5
  20. package/dist/durable.cjs.map +1 -1
  21. package/dist/durable.js +2 -2
  22. package/dist/engine.cjs +138 -29
  23. package/dist/engine.cjs.map +1 -1
  24. package/dist/engine.d.cts +3 -2
  25. package/dist/engine.d.ts +3 -2
  26. package/dist/engine.js +6 -5
  27. package/dist/engine.js.map +1 -1
  28. package/dist/expr-BfXDrs4H.d.cts +149 -0
  29. package/dist/expr-BfXDrs4H.d.ts +149 -0
  30. package/dist/fields/react-fancy.d.cts +2 -2
  31. package/dist/fields/react-fancy.d.ts +2 -2
  32. package/dist/index.cjs +44 -16
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.d.cts +7 -84
  35. package/dist/index.d.ts +7 -84
  36. package/dist/index.js +12 -12
  37. package/dist/index.js.map +1 -1
  38. package/dist/registry/index.d.cts +3 -3
  39. package/dist/registry/index.d.ts +3 -3
  40. package/dist/{registry-1qhmRtvC.d.cts → registry-CntAdUcY.d.cts} +1 -1
  41. package/dist/{registry-D2qocEsY.d.ts → registry-DYoV-MQi.d.ts} +1 -1
  42. package/dist/registry.cjs +7 -5
  43. package/dist/registry.cjs.map +1 -1
  44. package/dist/registry.js +2 -2
  45. package/dist/runtime.cjs +7 -5
  46. package/dist/runtime.cjs.map +1 -1
  47. package/dist/runtime.js +3 -3
  48. package/dist/schema.cjs +7 -5
  49. package/dist/schema.cjs.map +1 -1
  50. package/dist/schema.js +2 -2
  51. package/dist/screens.cjs +7 -5
  52. package/dist/screens.cjs.map +1 -1
  53. package/dist/screens.js +4 -4
  54. package/dist/{types-CLSUZW8c.d.ts → types-Ckhz-YwC.d.ts} +7 -2
  55. package/dist/{types-BLVpNNLN.d.cts → types-D71SKA5A.d.cts} +7 -2
  56. package/dist/ux.cjs +7 -5
  57. package/dist/ux.cjs.map +1 -1
  58. package/dist/ux.d.cts +1 -1
  59. package/dist/ux.d.ts +1 -1
  60. package/dist/ux.js +1 -1
  61. package/package.json +2 -2
  62. package/dist/chunk-BHM5HGXH.js.map +0 -1
  63. package/dist/chunk-HBE4LVPX.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -5,21 +5,22 @@ 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
6
  import { a as FlowNode, F as FlowGraph, g as NodeRunStatus, E as ExecutorRegistry } from './types-JFYjPJAG.cjs';
7
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-JFYjPJAG.cjs';
8
- import { C as ConfigFieldRenderFn, H as HumanFieldRenderers } from './HumanPrompt-DV5-xnDa.cjs';
9
- export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './HumanPrompt-DV5-xnDa.cjs';
8
+ import { C as ConfigFieldRenderFn, H as HumanFieldRenderers } from './HumanPrompt-Bpp3JiVH.cjs';
9
+ export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './HumanPrompt-Bpp3JiVH.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-BLVpNNLN.cjs';
15
- export { A as AvailableVariable, C as ConfigField, D as DocumentConfigField, E as EmitsRelation, t as ExpressionForm, u as ExpressionGrammarHelp, K as KeyValueConfigField, O as OutputField, h as OutputShape, P as PortSpec, R as RenderBodyContext, n as RepeaterConfigField, o as RepeaterRowField, w as availableVariables, x as baseVariables, y as describeExpressionGrammar, z as outputFieldsFor } from './types-BLVpNNLN.cjs';
14
+ import { a as NodeCategory, N as NodeKindDefinition } from './types-D71SKA5A.cjs';
15
+ export { A as AvailableVariable, C as ConfigField, D as DocumentConfigField, E as EmitsRelation, t as ExpressionForm, u as ExpressionGrammarHelp, K as KeyValueConfigField, O as OutputField, h as OutputShape, P as PortSpec, R as RenderBodyContext, n as RepeaterConfigField, o as RepeaterRowField, w as availableVariables, x as baseVariables, y as describeExpressionGrammar, z as outputFieldsFor } from './types-D71SKA5A.cjs';
16
16
  export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-DABx-6A-.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
19
  export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-2XsHBwpd.cjs';
20
20
  export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-CBRAUj-z.cjs';
21
+ export { E as EvaluateOptions, a as ExprContext, b as ExprValue, R as Resolution, U as UnresolvedPathError, c as UnresolvedPolicy, e as evaluateConfig, d as evaluateExpression, r as resolvePath, t as text, f as truthy, g as tryResolvePath } from './expr-BfXDrs4H.cjs';
21
22
  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, e as ensureBuiltinKinds, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, v as validateConfig } from './registry-1qhmRtvC.cjs';
23
+ export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, v as validateConfig } from './registry-CntAdUcY.cjs';
23
24
  import './capabilities-BYa5p5jw.cjs';
24
25
 
25
26
  type FlowCanvasProps = Omit<ReactFlowProps<FlowNode, Edge>, "nodes" | "edges" | "height"> & {
@@ -674,82 +675,4 @@ type ExpressionFieldProps = {
674
675
  */
675
676
  declare function ExpressionField({ value, onChange, placeholder, rows, handle, graph, nodeId, }: ExpressionFieldProps): react.JSX.Element;
676
677
 
677
- /**
678
- * `{{ }}` resolution — the TypeScript twin of `FancyFlow\Nodes\Support\Expr`.
679
- *
680
- * ## Why this is opt-in and not wired into `runFlow`
681
- *
682
- * The PHP runtime resolves expressions inside its batteries-included executors.
683
- * The JS runtime never has: `runFlow` hands `node.data.config` to your executor
684
- * verbatim, so every host that uses `{{ }}` today already resolves it itself.
685
- * Turning resolution on inside `runFlow` would interpolate a second time over
686
- * values those hosts had already substituted — silently, and only for graphs
687
- * that happen to contain `{{` in their DATA.
688
- *
689
- * So this exports the semantics and changes no behaviour. Call it yourself:
690
- *
691
- * ```ts
692
- * const url = evaluateExpression(node.data.config.url, inputs);
693
- * ```
694
- *
695
- * ## The semantics are the PHP file's, deliberately
696
- *
697
- * This is not a general expression language and must not grow into one. It
698
- * resolves a dot-path against a context and nothing else — no arithmetic, no
699
- * comparisons, no calls. Hosts that want real expressions override the executor
700
- * (the PHP docblock points at symfony/expression-language for the same reason).
701
- *
702
- * Divergence here is a correctness bug rather than a style difference: the same
703
- * graph is authored once and may run on either runtime. `suites/shared/expr`
704
- * in `@particle-academy/fancy-conformance` is the fixture table both sides run,
705
- * so parity is a test result instead of a claim.
706
- */
707
- /** Anything a context or a resolved value can be. */
708
- type ExprValue = unknown;
709
- /** The context an expression resolves against — the executor's `inputs`. */
710
- type ExprContext = Record<string, ExprValue>;
711
- /**
712
- * Resolve a dot-path against the context, honouring the `$json` / `$input`
713
- * alias.
714
- *
715
- * Both aliases point at the `in` port value when the context has one, and at
716
- * the whole context otherwise — the same fallback the PHP does, which is what
717
- * makes `{{ $json.x }}` work on a trigger node that has no upstream input.
718
- *
719
- * A path that does not resolve returns `null`, never `undefined`: PHP has one
720
- * absent value and JS has two, and letting the difference leak would make the
721
- * two runtimes disagree about `{{ missing }}` for no useful reason.
722
- */
723
- declare function resolvePath(path: string, context: ExprContext): ExprValue;
724
- /**
725
- * Evaluate a template against a context.
726
- *
727
- * A string that is EXACTLY one expression returns the resolved value with its
728
- * type intact — `{{ $json.count }}` gives you a number, not `"3"`. Anything
729
- * else interpolates each run as text. That distinction is load-bearing: it is
730
- * what lets a config field carry either a value or a sentence.
731
- *
732
- * Non-string templates pass through untouched, so this is safe to map over a
733
- * whole config object.
734
- */
735
- declare function evaluateExpression(template: ExprValue, context: ExprContext): ExprValue;
736
- /**
737
- * Truthiness for branch / switch decisions.
738
- *
739
- * Mirrors PHP's rules rather than JavaScript's, because the graph is authored
740
- * once and may run on either side. The two disagree in exactly the places a
741
- * workflow hits: `"0"` and `"false"` are truthy in JS and falsy here, and an
742
- * empty array is truthy in JS and falsy here.
743
- */
744
- declare function truthy(value: ExprValue): boolean;
745
- /** Coerce a value to text the way interpolation does. */
746
- declare function text(value: ExprValue): string;
747
- /**
748
- * Resolve every string in a config object, one level of nesting at a time.
749
- *
750
- * The convenience most hosts actually want, and the shape their hand-rolled
751
- * version usually takes. Opt-in like the rest of this module.
752
- */
753
- declare function evaluateConfig<T extends Record<string, ExprValue>>(config: T, context: ExprContext): T;
754
-
755
- export { ActionNode, type AlignEdge, AutoLayoutOptions, ConfigFieldRenderFn, ConnectionValidatorOptions, DecisionNode, ExecutorRegistry, type ExprContext, type ExprValue, ExpressionField, type ExpressionFieldProps, 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, evaluateConfig, evaluateExpression, flowKeys, flowLive, paletteDropHandlers, reconnectEdge, resolvePath, text, truthy, useFlowEditor, useFlowEditorOptional };
678
+ export { ActionNode, type AlignEdge, AutoLayoutOptions, ConfigFieldRenderFn, ConnectionValidatorOptions, DecisionNode, ExecutorRegistry, ExpressionField, type ExpressionFieldProps, 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, flowKeys, flowLive, paletteDropHandlers, reconnectEdge, useFlowEditor, useFlowEditorOptional };
package/dist/index.d.ts CHANGED
@@ -5,21 +5,22 @@ 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
6
  import { a as FlowNode, F as FlowGraph, g as NodeRunStatus, E as ExecutorRegistry } from './types-JFYjPJAG.js';
7
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-JFYjPJAG.js';
8
- import { C as ConfigFieldRenderFn, H as HumanFieldRenderers } from './HumanPrompt-Bw09OyS3.js';
9
- export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './HumanPrompt-Bw09OyS3.js';
8
+ import { C as ConfigFieldRenderFn, H as HumanFieldRenderers } from './HumanPrompt-BKThiyjB.js';
9
+ export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './HumanPrompt-BKThiyjB.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-CLSUZW8c.js';
15
- export { A as AvailableVariable, C as ConfigField, D as DocumentConfigField, E as EmitsRelation, t as ExpressionForm, u as ExpressionGrammarHelp, K as KeyValueConfigField, O as OutputField, h as OutputShape, P as PortSpec, R as RenderBodyContext, n as RepeaterConfigField, o as RepeaterRowField, w as availableVariables, x as baseVariables, y as describeExpressionGrammar, z as outputFieldsFor } from './types-CLSUZW8c.js';
14
+ import { a as NodeCategory, N as NodeKindDefinition } from './types-Ckhz-YwC.js';
15
+ export { A as AvailableVariable, C as ConfigField, D as DocumentConfigField, E as EmitsRelation, t as ExpressionForm, u as ExpressionGrammarHelp, K as KeyValueConfigField, O as OutputField, h as OutputShape, P as PortSpec, R as RenderBodyContext, n as RepeaterConfigField, o as RepeaterRowField, w as availableVariables, x as baseVariables, y as describeExpressionGrammar, z as outputFieldsFor } from './types-Ckhz-YwC.js';
16
16
  export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-BI_AyyvU.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
19
  export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-D7AOCcfE.js';
20
20
  export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-C1nRh_mi.js';
21
+ export { E as EvaluateOptions, a as ExprContext, b as ExprValue, R as Resolution, U as UnresolvedPathError, c as UnresolvedPolicy, e as evaluateConfig, d as evaluateExpression, r as resolvePath, t as text, f as truthy, g as tryResolvePath } from './expr-BfXDrs4H.js';
21
22
  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, e as ensureBuiltinKinds, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, v as validateConfig } from './registry-D2qocEsY.js';
23
+ export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, v as validateConfig } from './registry-DYoV-MQi.js';
23
24
  import './capabilities-COOXRiNL.js';
24
25
 
25
26
  type FlowCanvasProps = Omit<ReactFlowProps<FlowNode, Edge>, "nodes" | "edges" | "height"> & {
@@ -674,82 +675,4 @@ type ExpressionFieldProps = {
674
675
  */
675
676
  declare function ExpressionField({ value, onChange, placeholder, rows, handle, graph, nodeId, }: ExpressionFieldProps): react.JSX.Element;
676
677
 
677
- /**
678
- * `{{ }}` resolution — the TypeScript twin of `FancyFlow\Nodes\Support\Expr`.
679
- *
680
- * ## Why this is opt-in and not wired into `runFlow`
681
- *
682
- * The PHP runtime resolves expressions inside its batteries-included executors.
683
- * The JS runtime never has: `runFlow` hands `node.data.config` to your executor
684
- * verbatim, so every host that uses `{{ }}` today already resolves it itself.
685
- * Turning resolution on inside `runFlow` would interpolate a second time over
686
- * values those hosts had already substituted — silently, and only for graphs
687
- * that happen to contain `{{` in their DATA.
688
- *
689
- * So this exports the semantics and changes no behaviour. Call it yourself:
690
- *
691
- * ```ts
692
- * const url = evaluateExpression(node.data.config.url, inputs);
693
- * ```
694
- *
695
- * ## The semantics are the PHP file's, deliberately
696
- *
697
- * This is not a general expression language and must not grow into one. It
698
- * resolves a dot-path against a context and nothing else — no arithmetic, no
699
- * comparisons, no calls. Hosts that want real expressions override the executor
700
- * (the PHP docblock points at symfony/expression-language for the same reason).
701
- *
702
- * Divergence here is a correctness bug rather than a style difference: the same
703
- * graph is authored once and may run on either runtime. `suites/shared/expr`
704
- * in `@particle-academy/fancy-conformance` is the fixture table both sides run,
705
- * so parity is a test result instead of a claim.
706
- */
707
- /** Anything a context or a resolved value can be. */
708
- type ExprValue = unknown;
709
- /** The context an expression resolves against — the executor's `inputs`. */
710
- type ExprContext = Record<string, ExprValue>;
711
- /**
712
- * Resolve a dot-path against the context, honouring the `$json` / `$input`
713
- * alias.
714
- *
715
- * Both aliases point at the `in` port value when the context has one, and at
716
- * the whole context otherwise — the same fallback the PHP does, which is what
717
- * makes `{{ $json.x }}` work on a trigger node that has no upstream input.
718
- *
719
- * A path that does not resolve returns `null`, never `undefined`: PHP has one
720
- * absent value and JS has two, and letting the difference leak would make the
721
- * two runtimes disagree about `{{ missing }}` for no useful reason.
722
- */
723
- declare function resolvePath(path: string, context: ExprContext): ExprValue;
724
- /**
725
- * Evaluate a template against a context.
726
- *
727
- * A string that is EXACTLY one expression returns the resolved value with its
728
- * type intact — `{{ $json.count }}` gives you a number, not `"3"`. Anything
729
- * else interpolates each run as text. That distinction is load-bearing: it is
730
- * what lets a config field carry either a value or a sentence.
731
- *
732
- * Non-string templates pass through untouched, so this is safe to map over a
733
- * whole config object.
734
- */
735
- declare function evaluateExpression(template: ExprValue, context: ExprContext): ExprValue;
736
- /**
737
- * Truthiness for branch / switch decisions.
738
- *
739
- * Mirrors PHP's rules rather than JavaScript's, because the graph is authored
740
- * once and may run on either side. The two disagree in exactly the places a
741
- * workflow hits: `"0"` and `"false"` are truthy in JS and falsy here, and an
742
- * empty array is truthy in JS and falsy here.
743
- */
744
- declare function truthy(value: ExprValue): boolean;
745
- /** Coerce a value to text the way interpolation does. */
746
- declare function text(value: ExprValue): string;
747
- /**
748
- * Resolve every string in a config object, one level of nesting at a time.
749
- *
750
- * The convenience most hosts actually want, and the shape their hand-rolled
751
- * version usually takes. Opt-in like the rest of this module.
752
- */
753
- declare function evaluateConfig<T extends Record<string, ExprValue>>(config: T, context: ExprContext): T;
754
-
755
- export { ActionNode, type AlignEdge, AutoLayoutOptions, ConfigFieldRenderFn, ConnectionValidatorOptions, DecisionNode, ExecutorRegistry, type ExprContext, type ExprValue, ExpressionField, type ExpressionFieldProps, 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, evaluateConfig, evaluateExpression, flowKeys, flowLive, paletteDropHandlers, reconnectEdge, resolvePath, text, truthy, useFlowEditor, useFlowEditorOptional };
678
+ export { ActionNode, type AlignEdge, AutoLayoutOptions, ConfigFieldRenderFn, ConnectionValidatorOptions, DecisionNode, ExecutorRegistry, ExpressionField, type ExpressionFieldProps, 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, flowKeys, flowLive, paletteDropHandlers, reconnectEdge, useFlowEditor, useFlowEditorOptional };
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
- import { removeNodes, removeEdges, cloneSubgraph, alignNodes, distributeNodes, reconnectEdge, assignToLane, removeFromLane, duplicateNode, setEdgeLabel, FlowCanvas } from './chunk-MX4SJDNI.js';
2
- export { ActionNode, DecisionNode, FlowCanvas, FlowViewer, NodeShell, OutputNode, SubgraphNode, TriggerNode, alignNodes, cloneSubgraph, defaultNodeTypes, distributeNodes, reconnectEdge } from './chunk-MX4SJDNI.js';
3
- import { useFlowState, useFlowRun, useFlowHistory, applyOutputsToNodes, applyStatusesToNodes } from './chunk-LGLOBK6Q.js';
4
- export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-LGLOBK6Q.js';
5
- export { runCohort } from './chunk-A3TLZS5B.js';
6
- export { evaluateConfig, evaluateExpression, resolvePath, text, truthy } from './chunk-BHM5HGXH.js';
7
- import { buildNodeTypes } from './chunk-M7M6GLFV.js';
8
- export { ANY_PORT_TYPE, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility } from './chunk-M7M6GLFV.js';
1
+ import { removeNodes, removeEdges, cloneSubgraph, alignNodes, distributeNodes, reconnectEdge, assignToLane, removeFromLane, duplicateNode, setEdgeLabel, FlowCanvas } from './chunk-EO6444T2.js';
2
+ export { ActionNode, DecisionNode, FlowCanvas, FlowViewer, NodeShell, OutputNode, SubgraphNode, TriggerNode, alignNodes, cloneSubgraph, defaultNodeTypes, distributeNodes, reconnectEdge } from './chunk-EO6444T2.js';
3
+ import { useFlowState, useFlowRun, useFlowHistory, applyOutputsToNodes, applyStatusesToNodes } from './chunk-MBVX4ZRB.js';
4
+ export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-MBVX4ZRB.js';
5
+ export { runCohort } from './chunk-RIAFHQT5.js';
6
+ export { UnresolvedPathError, evaluateConfig, evaluateExpression, resolvePath, text, truthy, tryResolvePath } from './chunk-UM4C46AF.js';
7
+ import { buildNodeTypes } from './chunk-5H54OTKT.js';
8
+ export { ANY_PORT_TYPE, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility } from './chunk-5H54OTKT.js';
9
9
  export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, decodePause, encodePause, isPause, pauseForHuman } from './chunk-UEOE6B52.js';
10
- import { workflowToBlob, importWorkflow, exportWorkflow } from './chunk-FGYG5JVW.js';
11
- export { WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './chunk-FGYG5JVW.js';
12
- import { ReactFlowProvider, useReactFlow, humanInputFields, onNodeKindsChanged, listNodeKinds, getNodeKind, defaultConfigFor, FlowEditorProvider, addEdge, applyEdgeChanges, applyNodeChanges, Position, ensureBuiltinKinds, validateConfig, categoryAccent, Handle } from './chunk-HBE4LVPX.js';
13
- export { BUILTIN_KINDS, LaneNode, NoteNode, categoryAccent, clearNodeKindOverrides, defaultConfigFor, ensureBuiltinKinds, getNodeKind, listNodeKinds, onNodeKindsChanged, overrideNodeKind, registerBuiltinKinds, registerNodeKind, resolveNodePorts, resolvePortSpec, runFlow, useFlowEditor, useFlowEditorOptional, validateConfig } from './chunk-HBE4LVPX.js';
10
+ import { workflowToBlob, importWorkflow, exportWorkflow } from './chunk-MEIDPBKE.js';
11
+ export { WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './chunk-MEIDPBKE.js';
12
+ import { ReactFlowProvider, useReactFlow, humanInputFields, onNodeKindsChanged, listNodeKinds, getNodeKind, defaultConfigFor, FlowEditorProvider, addEdge, applyEdgeChanges, applyNodeChanges, Position, ensureBuiltinKinds, validateConfig, categoryAccent, Handle } from './chunk-JF6WCRBU.js';
13
+ export { BUILTIN_KINDS, LaneNode, NoteNode, categoryAccent, clearNodeKindOverrides, defaultConfigFor, ensureBuiltinKinds, getNodeKind, listNodeKinds, onNodeKindsChanged, overrideNodeKind, registerBuiltinKinds, registerNodeKind, resolveNodePorts, resolvePortSpec, runFlow, useFlowEditor, useFlowEditorOptional, validateConfig } from './chunk-JF6WCRBU.js';
14
14
  import { getRichInputAdapter } from './chunk-F5RPRB7A.js';
15
15
  export { RichInputPreview, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerRichInputAdapter } from './chunk-F5RPRB7A.js';
16
16
  import './chunk-USL4FMFU.js';