@particle-academy/fancy-flow 0.21.0 → 0.22.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/{capabilities-DUhAc-EJ.d.ts → capabilities-85Mjn4uW.d.ts} +1 -1
- package/dist/{capabilities-ChE3Xi8R.d.cts → capabilities-exVeADXz.d.cts} +1 -1
- package/dist/{chunk-L4AX73Q6.js → chunk-KDHLKBL2.js} +11 -5
- package/dist/chunk-KDHLKBL2.js.map +1 -0
- package/dist/{chunk-G3WHXMZ3.js → chunk-O7F6SGV4.js} +3 -3
- package/dist/{chunk-G3WHXMZ3.js.map → chunk-O7F6SGV4.js.map} +1 -1
- package/dist/{chunk-HMWYJIRP.js → chunk-OHVSEHDC.js} +3 -3
- package/dist/{chunk-HMWYJIRP.js.map → chunk-OHVSEHDC.js.map} +1 -1
- package/dist/{chunk-U5F22BHV.js → chunk-YXRLIV7A.js} +4 -2
- package/dist/chunk-YXRLIV7A.js.map +1 -0
- package/dist/{chunk-JE4ENQSE.js → chunk-YZTBRXBZ.js} +54 -6
- package/dist/chunk-YZTBRXBZ.js.map +1 -0
- package/dist/engine.cjs +8 -2
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.d.cts +3 -3
- package/dist/engine.d.ts +3 -3
- package/dist/engine.js +3 -3
- package/dist/index.cjs +4522 -4374
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -7
- package/dist/index.d.ts +24 -7
- package/dist/index.js +199 -106
- package/dist/index.js.map +1 -1
- package/dist/llm/vercel-ai.d.cts +2 -2
- package/dist/llm/vercel-ai.d.ts +2 -2
- package/dist/registry/index.d.cts +5 -5
- package/dist/registry/index.d.ts +5 -5
- package/dist/registry.cjs +59 -3
- package/dist/registry.cjs.map +1 -1
- package/dist/registry.js +3 -3
- package/dist/{run-flow-ChBi6q-W.d.ts → run-flow-9U-gaYVF.d.ts} +1 -1
- package/dist/{run-flow-VKm57Hcj.d.cts → run-flow-AXzOR-Wq.d.cts} +1 -1
- package/dist/runtime/index.d.cts +3 -3
- package/dist/runtime/index.d.ts +3 -3
- package/dist/runtime.cjs +8 -2
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.js +3 -3
- package/dist/schema/index.d.cts +1 -1
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/styles.css +41 -0
- package/dist/styles.css.map +1 -1
- package/dist/{types-VGkCXEO6.d.ts → types-CFEtuRWJ.d.ts} +11 -3
- package/dist/{types-sOmpCitB.d.cts → types-CMSrWVYM.d.cts} +1 -1
- package/dist/{types-sOmpCitB.d.ts → types-CMSrWVYM.d.ts} +1 -1
- package/dist/{types-LG-YckGh.d.cts → types-DneUoivl.d.cts} +11 -3
- package/dist/ux.cjs.map +1 -1
- package/dist/ux.d.cts +3 -3
- package/dist/ux.d.ts +3 -3
- package/dist/ux.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-JE4ENQSE.js.map +0 -1
- package/dist/chunk-L4AX73Q6.js.map +0 -1
- package/dist/chunk-U5F22BHV.js.map +0 -1
package/dist/llm/vercel-ai.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LanguageModel } from 'ai';
|
|
2
|
-
import { L as LlmRouteRequest, a as LlmClient } from '../capabilities-
|
|
3
|
-
import '../types-
|
|
2
|
+
import { L as LlmRouteRequest, a as LlmClient } from '../capabilities-exVeADXz.cjs';
|
|
3
|
+
import '../types-CMSrWVYM.cjs';
|
|
4
4
|
import '@xyflow/react';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/llm/vercel-ai.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LanguageModel } from 'ai';
|
|
2
|
-
import { L as LlmRouteRequest, a as LlmClient } from '../capabilities-
|
|
3
|
-
import '../types-
|
|
2
|
+
import { L as LlmRouteRequest, a as LlmClient } from '../capabilities-85Mjn4uW.js';
|
|
3
|
+
import '../types-CMSrWVYM.js';
|
|
4
4
|
import '@xyflow/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as NodeKindDefinition, P as PortSpec } from '../types-
|
|
2
|
-
export { C as ConfigField, b as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, N as NodeCategory, c as NumberConfigField, R as RenderBodyContext, d as RepeaterConfigField, e as RepeaterRowField, S as SelectConfigField, f as SwitchConfigField, T as TextConfigField, g as TextareaConfigField } from '../types-
|
|
3
|
-
import { P as PortDescriptor,
|
|
1
|
+
import { a as NodeKindDefinition, P as PortSpec } from '../types-DneUoivl.cjs';
|
|
2
|
+
export { C as ConfigField, b as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, N as NodeCategory, c as NumberConfigField, R as RenderBodyContext, d as RepeaterConfigField, e as RepeaterRowField, S as SelectConfigField, f as SwitchConfigField, T as TextConfigField, g as TextareaConfigField } from '../types-DneUoivl.cjs';
|
|
3
|
+
import { P as PortDescriptor, a as FlowNode, N as NodeExecutor } from '../types-CMSrWVYM.cjs';
|
|
4
4
|
import { Connection, Edge, NodeProps, NodeTypes } from '@xyflow/react';
|
|
5
|
-
import { b as LlmRoute } from '../capabilities-
|
|
6
|
-
export { C as CapabilityId, a as LlmClient, c as LlmRouteChoice, L as LlmRouteRequest, W as WorkflowResolution, d as WorkflowResolutionFailure, e as WorkflowResolver, f as capabilityStatus, g as getLlmClient, h as getWorkflowResolver, i as isResolutionFailure, r as registerLlmClient, j as registerWorkflowResolver } from '../capabilities-
|
|
5
|
+
import { b as LlmRoute } from '../capabilities-exVeADXz.cjs';
|
|
6
|
+
export { C as CapabilityId, a as LlmClient, c as LlmRouteChoice, L as LlmRouteRequest, W as WorkflowResolution, d as WorkflowResolutionFailure, e as WorkflowResolver, f as capabilityStatus, g as getLlmClient, h as getWorkflowResolver, i as isResolutionFailure, r as registerLlmClient, j as registerWorkflowResolver } from '../capabilities-exVeADXz.cjs';
|
|
7
7
|
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';
|
|
8
8
|
import * as react from 'react';
|
|
9
9
|
import { ComponentType, ReactNode } from 'react';
|
package/dist/registry/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as NodeKindDefinition, P as PortSpec } from '../types-
|
|
2
|
-
export { C as ConfigField, b as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, N as NodeCategory, c as NumberConfigField, R as RenderBodyContext, d as RepeaterConfigField, e as RepeaterRowField, S as SelectConfigField, f as SwitchConfigField, T as TextConfigField, g as TextareaConfigField } from '../types-
|
|
3
|
-
import { P as PortDescriptor,
|
|
1
|
+
import { a as NodeKindDefinition, P as PortSpec } from '../types-CFEtuRWJ.js';
|
|
2
|
+
export { C as ConfigField, b as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, N as NodeCategory, c as NumberConfigField, R as RenderBodyContext, d as RepeaterConfigField, e as RepeaterRowField, S as SelectConfigField, f as SwitchConfigField, T as TextConfigField, g as TextareaConfigField } from '../types-CFEtuRWJ.js';
|
|
3
|
+
import { P as PortDescriptor, a as FlowNode, N as NodeExecutor } from '../types-CMSrWVYM.js';
|
|
4
4
|
import { Connection, Edge, NodeProps, NodeTypes } from '@xyflow/react';
|
|
5
|
-
import { b as LlmRoute } from '../capabilities-
|
|
6
|
-
export { C as CapabilityId, a as LlmClient, c as LlmRouteChoice, L as LlmRouteRequest, W as WorkflowResolution, d as WorkflowResolutionFailure, e as WorkflowResolver, f as capabilityStatus, g as getLlmClient, h as getWorkflowResolver, i as isResolutionFailure, r as registerLlmClient, j as registerWorkflowResolver } from '../capabilities-
|
|
5
|
+
import { b as LlmRoute } from '../capabilities-85Mjn4uW.js';
|
|
6
|
+
export { C as CapabilityId, a as LlmClient, c as LlmRouteChoice, L as LlmRouteRequest, W as WorkflowResolution, d as WorkflowResolutionFailure, e as WorkflowResolver, f as capabilityStatus, g as getLlmClient, h as getWorkflowResolver, i as isResolutionFailure, r as registerLlmClient, j as registerWorkflowResolver } from '../capabilities-85Mjn4uW.js';
|
|
7
7
|
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';
|
|
8
8
|
import * as react from 'react';
|
|
9
9
|
import { ComponentType, ReactNode } from 'react';
|
package/dist/registry.cjs
CHANGED
|
@@ -179,6 +179,8 @@ function categoryAccent(category) {
|
|
|
179
179
|
return "#ec4899";
|
|
180
180
|
case "output":
|
|
181
181
|
return "#a855f7";
|
|
182
|
+
case "layout":
|
|
183
|
+
return "#64748b";
|
|
182
184
|
default:
|
|
183
185
|
return "#71717a";
|
|
184
186
|
}
|
|
@@ -321,8 +323,14 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
321
323
|
continue;
|
|
322
324
|
}
|
|
323
325
|
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
+
const visualKind = getNodeKind(node.type ?? "");
|
|
327
|
+
if (node.type === "note" || visualKind?.category === "layout") {
|
|
328
|
+
onEvent({
|
|
329
|
+
type: "node-status",
|
|
330
|
+
nodeId: node.id,
|
|
331
|
+
status: "idle",
|
|
332
|
+
text: visualKind?.category === "layout" ? "lane" : "annotation"
|
|
333
|
+
});
|
|
326
334
|
continue;
|
|
327
335
|
}
|
|
328
336
|
onEvent({ type: "node-status", nodeId: node.id, status: "running" });
|
|
@@ -9745,6 +9753,27 @@ function previewValue(v) {
|
|
|
9745
9753
|
}
|
|
9746
9754
|
return "\u2026";
|
|
9747
9755
|
}
|
|
9756
|
+
function LaneNodeInner(props) {
|
|
9757
|
+
const data = props.data;
|
|
9758
|
+
const config = data.config ?? {};
|
|
9759
|
+
const title = config.title ?? data.label ?? "Lane";
|
|
9760
|
+
const orientation = config.orientation ?? "horizontal";
|
|
9761
|
+
const accent = config.color ?? data.color ?? categoryAccent("layout");
|
|
9762
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9763
|
+
"div",
|
|
9764
|
+
{
|
|
9765
|
+
className: ["ff-lane", `ff-lane--${orientation}`, props.selected ? "ff-lane--selected" : ""].filter(Boolean).join(" "),
|
|
9766
|
+
style: { borderColor: props.selected ? accent : void 0 },
|
|
9767
|
+
children: [
|
|
9768
|
+
/* @__PURE__ */ jsxRuntime.jsx(NodeResizer, { isVisible: props.selected ?? false, color: accent, minWidth: 160, minHeight: 72 }),
|
|
9769
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ff-lane__header", style: { background: accent }, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ff-lane__title", children: title }) })
|
|
9770
|
+
]
|
|
9771
|
+
}
|
|
9772
|
+
);
|
|
9773
|
+
}
|
|
9774
|
+
var LaneNode = ReactExports.memo(LaneNodeInner);
|
|
9775
|
+
|
|
9776
|
+
// src/registry/builtin.ts
|
|
9748
9777
|
function casePorts(cases) {
|
|
9749
9778
|
const byPort = /* @__PURE__ */ new Map();
|
|
9750
9779
|
if (cases && typeof cases === "object" && !Array.isArray(cases)) {
|
|
@@ -10485,6 +10514,32 @@ var KINDS = [
|
|
|
10485
10514
|
},
|
|
10486
10515
|
{ type: "expression", key: "message", label: "Message", required: true, example: "{{ $json }}" }
|
|
10487
10516
|
]
|
|
10517
|
+
},
|
|
10518
|
+
{
|
|
10519
|
+
// Swimlane — a portless, resizable container. Child nodes are parented into
|
|
10520
|
+
// it; it never runs (the runtime skips the `layout` category). Uses its own
|
|
10521
|
+
// renderer (LaneNode) instead of the default card.
|
|
10522
|
+
name: "@particle-academy/lane",
|
|
10523
|
+
aliases: ["lane", "@fancy/lane"],
|
|
10524
|
+
category: "layout",
|
|
10525
|
+
label: "Lane",
|
|
10526
|
+
description: "A resizable swimlane \u2014 drop nodes into it to group them.",
|
|
10527
|
+
icon: "\u25A4",
|
|
10528
|
+
inputs: [],
|
|
10529
|
+
outputs: [],
|
|
10530
|
+
configSchema: [
|
|
10531
|
+
{ type: "text", key: "title", label: "Title", default: "Lane" },
|
|
10532
|
+
{
|
|
10533
|
+
type: "select",
|
|
10534
|
+
key: "orientation",
|
|
10535
|
+
label: "Orientation",
|
|
10536
|
+
default: "horizontal",
|
|
10537
|
+
options: [{ value: "horizontal", label: "Row" }, { value: "vertical", label: "Column" }]
|
|
10538
|
+
}
|
|
10539
|
+
],
|
|
10540
|
+
defaultConfig: { title: "Lane", orientation: "horizontal" },
|
|
10541
|
+
resizable: { minWidth: 160, minHeight: 72 },
|
|
10542
|
+
component: LaneNode
|
|
10488
10543
|
}
|
|
10489
10544
|
];
|
|
10490
10545
|
function registerBuiltinKinds() {
|
|
@@ -10496,7 +10551,8 @@ var BUILTIN_KINDS = KINDS;
|
|
|
10496
10551
|
function buildNodeTypes() {
|
|
10497
10552
|
const map = {};
|
|
10498
10553
|
for (const k of listNodeKinds()) {
|
|
10499
|
-
|
|
10554
|
+
const renderer = k.component ?? RegistryNode;
|
|
10555
|
+
for (const id2 of kindIds(k)) map[id2] = renderer;
|
|
10500
10556
|
}
|
|
10501
10557
|
return map;
|
|
10502
10558
|
}
|