@particle-academy/fancy-flow 0.45.0 → 0.47.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/README.md +29 -0
- package/dist/{ConfigFieldRenderer-Dzy4f6rG.d.cts → ConfigFieldRenderer-Cyir8-B8.d.cts} +2 -2
- package/dist/{ConfigFieldRenderer-WqJr-td_.d.ts → ConfigFieldRenderer-iMkZj0VK.d.ts} +2 -2
- package/dist/{FlowViewer-BbbUJe2b.d.cts → FlowViewer-CY3_vHSg.d.cts} +1 -1
- package/dist/{FlowViewer-csuaTL5t.d.ts → FlowViewer-DGW6t-80.d.ts} +1 -1
- package/dist/{capabilities-Brn74URS.d.ts → capabilities-DMUhnyZD.d.ts} +1 -1
- package/dist/{capabilities-CYCeIx6I.d.cts → capabilities-Dmd26aAs.d.cts} +1 -1
- package/dist/chunk-BHM5HGXH.js +79 -0
- package/dist/chunk-BHM5HGXH.js.map +1 -0
- package/dist/chunk-DR3GWVDG.js +196 -0
- package/dist/chunk-DR3GWVDG.js.map +1 -0
- package/dist/{chunk-3BKU4SQZ.js → chunk-ISXRQELT.js} +3 -4
- package/dist/chunk-ISXRQELT.js.map +1 -0
- package/dist/{chunk-OWENS2H5.js → chunk-NDEX655E.js} +1603 -36
- package/dist/chunk-NDEX655E.js.map +1 -0
- package/dist/{chunk-QZTGV3ZL.js → chunk-QVFVL5LQ.js} +3 -3
- package/dist/{chunk-QZTGV3ZL.js.map → chunk-QVFVL5LQ.js.map} +1 -1
- package/dist/{chunk-DHUFUDEX.js → chunk-Z2GRNYR2.js} +7 -6
- package/dist/chunk-Z2GRNYR2.js.map +1 -0
- package/dist/{chunk-A6RFLGWV.js → chunk-ZKJJWBDJ.js} +3 -5
- package/dist/chunk-ZKJJWBDJ.js.map +1 -0
- package/dist/durable/index.d.cts +490 -0
- package/dist/durable/index.d.ts +490 -0
- package/dist/durable.cjs +10991 -0
- package/dist/durable.cjs.map +1 -0
- package/dist/durable.js +552 -0
- package/dist/durable.js.map +1 -0
- package/dist/engine.cjs +10223 -47
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.d.cts +9 -7
- package/dist/engine.d.ts +9 -7
- package/dist/engine.js +4 -6
- package/dist/engine.js.map +1 -1
- package/dist/fields/react-fancy.d.cts +4 -3
- package/dist/fields/react-fancy.d.ts +4 -3
- package/dist/index.cjs +336 -194
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -10
- package/dist/index.d.ts +12 -10
- package/dist/index.js +15 -93
- package/dist/index.js.map +1 -1
- package/dist/layout/index.d.cts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/llm/prism.d.cts +2 -2
- package/dist/llm/prism.d.ts +2 -2
- package/dist/llm/vercel-ai.d.cts +2 -2
- package/dist/llm/vercel-ai.d.ts +2 -2
- package/dist/pause-9iT4tCEV.d.cts +96 -0
- package/dist/pause-9iT4tCEV.d.ts +96 -0
- package/dist/registry/index.d.cts +7 -6
- package/dist/registry/index.d.ts +7 -6
- package/dist/{registry-Budds73w.d.cts → registry-Bt55f63_.d.ts} +21 -2
- package/dist/{registry-D0I20HJ3.d.ts → registry-CkcSwmfR.d.cts} +21 -2
- package/dist/registry.cjs +3961 -3821
- package/dist/registry.cjs.map +1 -1
- package/dist/registry.js +3 -6
- package/dist/{run-cohort-CV7EcwGG.d.ts → run-cohort-Cyeny2Uu.d.ts} +3 -34
- package/dist/{run-cohort-DitsaYgS.d.cts → run-cohort-DdPPowJ3.d.cts} +3 -34
- package/dist/run-flow-1KiXhy59.d.cts +55 -0
- package/dist/run-flow-CQvTDBYk.d.ts +55 -0
- package/dist/runtime/index.d.cts +5 -3
- package/dist/runtime/index.d.ts +5 -3
- package/dist/runtime.cjs +1712 -430
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.js +5 -6
- package/dist/schema/index.d.cts +1 -1
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema.cjs +10369 -24
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.js +4 -3
- package/dist/screens.cjs +1366 -38
- package/dist/screens.cjs.map +1 -1
- package/dist/screens.d.cts +2 -2
- package/dist/screens.d.ts +2 -2
- package/dist/screens.js +5 -8
- package/dist/screens.js.map +1 -1
- package/dist/{types-D6ZSKBly.d.ts → types--S2Kzx7w.d.cts} +3 -97
- package/dist/{types-nQOA8jpk.d.cts → types-ChkCRonF.d.ts} +3 -97
- package/dist/types-Jx1TwehV.d.cts +247 -0
- package/dist/types-Jx1TwehV.d.ts +247 -0
- package/dist/ux.cjs +10363 -2
- package/dist/ux.cjs.map +1 -1
- package/dist/ux.d.cts +3 -2
- package/dist/ux.d.ts +3 -2
- package/dist/ux.js +3 -1
- package/dist/ux.js.map +1 -1
- package/package.json +17 -3
- package/dist/chunk-3BKU4SQZ.js.map +0 -1
- package/dist/chunk-A6RFLGWV.js.map +0 -1
- package/dist/chunk-DHUFUDEX.js.map +0 -1
- package/dist/chunk-OWENS2H5.js.map +0 -1
- package/dist/chunk-PVROYW7C.js +0 -187
- package/dist/chunk-PVROYW7C.js.map +0 -1
- package/dist/chunk-TITD5W4Y.js +0 -26
- package/dist/chunk-TITD5W4Y.js.map +0 -1
- package/dist/chunk-VLATLVGH.js +0 -158
- package/dist/chunk-VLATLVGH.js.map +0 -1
- package/dist/chunk-WBXGZVLB.js +0 -1268
- package/dist/chunk-WBXGZVLB.js.map +0 -1
- package/dist/types-CMSrWVYM.d.cts +0 -109
- 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,
|
|
7
|
-
export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData,
|
|
8
|
-
import { C as ConfigFieldRenderFn } from './ConfigFieldRenderer-
|
|
9
|
-
export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './ConfigFieldRenderer-
|
|
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
|
|
15
|
-
export { A as AvailableVariable, C as ConfigField, D as DocumentConfigField,
|
|
16
|
-
export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-
|
|
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 {
|
|
20
|
-
export {
|
|
21
|
-
|
|
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, e as ensureBuiltinKinds, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, v as validateConfig } from './registry-CkcSwmfR.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,
|
|
7
|
-
export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData,
|
|
8
|
-
import { C as ConfigFieldRenderFn } from './ConfigFieldRenderer-
|
|
9
|
-
export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './ConfigFieldRenderer-
|
|
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-
|
|
15
|
-
export { A as AvailableVariable, C as ConfigField, D as DocumentConfigField,
|
|
16
|
-
export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-
|
|
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 {
|
|
20
|
-
export {
|
|
21
|
-
|
|
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, e as ensureBuiltinKinds, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, v as validateConfig } from './registry-Bt55f63_.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,19 @@
|
|
|
1
|
-
import { removeNodes, removeEdges, cloneSubgraph, alignNodes, distributeNodes, reconnectEdge, assignToLane, removeFromLane, duplicateNode, setEdgeLabel, FlowCanvas } from './chunk-
|
|
2
|
-
export { ActionNode, DecisionNode, FlowCanvas, FlowViewer, NodeShell, OutputNode, SubgraphNode, TriggerNode, alignNodes, cloneSubgraph, defaultNodeTypes, distributeNodes, reconnectEdge } from './chunk-
|
|
3
|
-
import { useFlowState, useFlowRun, useFlowHistory, applyOutputsToNodes, applyStatusesToNodes } from './chunk-
|
|
4
|
-
export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-
|
|
5
|
-
export { runCohort } from './chunk-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { removeNodes, removeEdges, cloneSubgraph, alignNodes, distributeNodes, reconnectEdge, assignToLane, removeFromLane, duplicateNode, setEdgeLabel, FlowCanvas } from './chunk-Z2GRNYR2.js';
|
|
2
|
+
export { ActionNode, DecisionNode, FlowCanvas, FlowViewer, NodeShell, OutputNode, SubgraphNode, TriggerNode, alignNodes, cloneSubgraph, defaultNodeTypes, distributeNodes, reconnectEdge } from './chunk-Z2GRNYR2.js';
|
|
3
|
+
import { useFlowState, useFlowRun, useFlowHistory, applyOutputsToNodes, applyStatusesToNodes } from './chunk-ZKJJWBDJ.js';
|
|
4
|
+
export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-ZKJJWBDJ.js';
|
|
5
|
+
export { runCohort } from './chunk-QVFVL5LQ.js';
|
|
6
|
+
export { evaluateConfig, evaluateExpression, resolvePath, text, truthy } from './chunk-BHM5HGXH.js';
|
|
7
|
+
import { buildNodeTypes } from './chunk-DR3GWVDG.js';
|
|
8
|
+
export { ANY_PORT_TYPE, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility } from './chunk-DR3GWVDG.js';
|
|
9
9
|
export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, decodePause, encodePause, isPause, pauseForHuman } from './chunk-UEOE6B52.js';
|
|
10
|
-
import './chunk-
|
|
11
|
-
export {
|
|
12
|
-
import {
|
|
13
|
-
export {
|
|
14
|
-
export { resolveNodePorts, resolvePortSpec } from './chunk-TITD5W4Y.js';
|
|
15
|
-
import { onNodeKindsChanged, listNodeKinds, getNodeKind, defaultConfigFor, validateConfig, categoryAccent } from './chunk-PVROYW7C.js';
|
|
16
|
-
export { categoryAccent, clearNodeKindOverrides, defaultConfigFor, getNodeKind, listNodeKinds, onNodeKindsChanged, overrideNodeKind, registerNodeKind, validateConfig } from './chunk-PVROYW7C.js';
|
|
10
|
+
import { workflowToBlob, importWorkflow, exportWorkflow } from './chunk-ISXRQELT.js';
|
|
11
|
+
export { WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './chunk-ISXRQELT.js';
|
|
12
|
+
import { ReactFlowProvider, useReactFlow, onNodeKindsChanged, listNodeKinds, getNodeKind, defaultConfigFor, FlowEditorProvider, addEdge, applyEdgeChanges, applyNodeChanges, Position, ensureBuiltinKinds, validateConfig, categoryAccent, Handle } from './chunk-NDEX655E.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-NDEX655E.js';
|
|
17
14
|
import { getRichInputAdapter } from './chunk-F5RPRB7A.js';
|
|
18
15
|
export { RichInputPreview, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerRichInputAdapter } from './chunk-F5RPRB7A.js';
|
|
16
|
+
import './chunk-USL4FMFU.js';
|
|
19
17
|
import { forwardRef, useState, useMemo, useEffect, useCallback, useRef, useImperativeHandle, useId, memo } from 'react';
|
|
20
18
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
21
19
|
|
|
@@ -1823,85 +1821,9 @@ var flowKeys = {
|
|
|
1823
1821
|
run: (runId) => ["flow", "runs", runId]
|
|
1824
1822
|
};
|
|
1825
1823
|
|
|
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
1824
|
// src/index.ts
|
|
1903
|
-
|
|
1825
|
+
ensureBuiltinKinds();
|
|
1904
1826
|
|
|
1905
|
-
export { ConfigFieldRenderer, ExpressionField, FlowEditor, FlowRunControls, FlowRunFeed, NodeConfigPanel, NodePalette, NodePort, availableVariables, baseVariables, defineNode, describeExpressionGrammar,
|
|
1827
|
+
export { ConfigFieldRenderer, ExpressionField, FlowEditor, FlowRunControls, FlowRunFeed, NodeConfigPanel, NodePalette, NodePort, availableVariables, baseVariables, defineNode, describeExpressionGrammar, flowKeys, flowLive, outputFieldsFor, paletteDropHandlers };
|
|
1906
1828
|
//# sourceMappingURL=index.js.map
|
|
1907
1829
|
//# sourceMappingURL=index.js.map
|