@burdenoff/fluidgrids-fe-sdk 2026.1105.4 → 2026.1107.1
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 +4 -0
- package/dist/{ExecutionDetailPage-OOHJQR2L.js → ExecutionDetailPage-TQST7JKC.js} +7 -7
- package/dist/{ExecutionsListPage-6HS5VQOV.js → ExecutionsListPage-QQKEGXSC.js} +6 -6
- package/dist/{WorkflowBuilder-PICIS7FI.js → WorkflowBuilder-R7VIOVRO.js} +11 -11
- package/dist/{WorkflowsList-SD5XQC4Q.js → WorkflowsList-2WX7N526.js} +7 -7
- package/dist/{agentTools-UH4LU6LA.js → agentTools-MEEGOAE2.js} +4 -4
- package/dist/assistant.d.ts +1 -61
- package/dist/{chunk-OTOQFZFO.js → chunk-4F54UT62.js} +10 -10
- package/dist/{chunk-XNARCHMT.js → chunk-5KK3ALQ4.js} +1 -1
- package/dist/{chunk-Y4UCHFGK.js → chunk-752BT4WM.js} +1 -1
- package/dist/{chunk-KJT5TAOE.js → chunk-BLLBUHVF.js} +1 -1
- package/dist/{chunk-GBQC5WDH.js → chunk-E3PNEIBJ.js} +4 -4
- package/dist/{chunk-UYTPURFW.js → chunk-GA3V3X7Q.js} +2 -2
- package/dist/{chunk-HSTP2RX3.js → chunk-HUCRE45R.js} +1 -1
- package/dist/{chunk-LLCVVRCE.js → chunk-HY3XCZLB.js} +6 -6
- package/dist/{chunk-UWCD7JUU.js → chunk-JOOGRWYY.js} +4 -4
- package/dist/{chunk-43GSC5Y6.js → chunk-JRSCUUBT.js} +1 -1
- package/dist/{chunk-6VIG44VF.js → chunk-KE677WYY.js} +1 -1
- package/dist/{chunk-5GG2FEKW.js → chunk-KXCJPWYE.js} +2 -2
- package/dist/{chunk-OLRIWGYM.js → chunk-MESGVHUU.js} +4 -4
- package/dist/{chunk-WBRW67HX.js → chunk-MYAFMXFI.js} +2 -2
- package/dist/{chunk-XWINH6CR.js → chunk-NMYENCP2.js} +1 -1
- package/dist/{chunk-GBJWPSLJ.js → chunk-NSDBXKIC.js} +2 -2
- package/dist/{chunk-5Z4F24QT.js → chunk-OHKSDHNC.js} +1 -1
- package/dist/{chunk-4XAXF5VP.js → chunk-PYSEOWLW.js} +4 -4
- package/dist/{chunk-M72SMQOS.js → chunk-RI4NFNDX.js} +6 -6
- package/dist/{chunk-JRLBPR5U.js → chunk-TDFC5U66.js} +1 -1
- package/dist/{chunk-TGWDFLEX.js → chunk-UZJKX5FN.js} +5 -4
- package/dist/{chunk-EIMTOK6E.js → chunk-V2K4HJY4.js} +1 -1
- package/dist/{chunk-UIS7KGHW.js → chunk-VKC3ICRA.js} +4 -4
- package/dist/{chunk-GPABUQTD.js → chunk-WBVBRXDI.js} +5 -5
- package/dist/{chunk-ASYYYJG2.js → chunk-ZTZNQ5GF.js} +1 -1
- package/dist/{chunk-WC526MLS.js → chunk-ZWDKN6PU.js} +1 -1
- package/dist/executions.js +8 -8
- package/dist/history.js +6 -6
- package/dist/index.d.ts +6 -25757
- package/dist/index.js +35 -35
- package/dist/{node-detail-view-P5NV5CMO.js → node-detail-view-AQCGO4XQ.js} +7 -7
- package/dist/observability.js +4 -4
- package/dist/pageControlsBridge-kfcowd-2.d.ts +37 -0
- package/dist/{quick-config-panel-ZNSBVF4G.js → quick-config-panel-G3T4JCF6.js} +5 -5
- package/dist/settings.d.ts +0 -8
- package/dist/settings.js +5 -5
- package/dist/templates.d.ts +0 -10
- package/dist/templates.js +10 -10
- package/dist/workflow-builder-C261exmL.d.ts +688 -0
- package/dist/workflow-builder.d.ts +1 -1
- package/dist/workflow-builder.js +12 -12
- package/dist/workflow-preview.d.ts +0 -88
- package/dist/workflow-preview.js +78 -43
- package/dist/workflows-list.js +7 -7
- package/package.json +1 -1
- package/dist/pageControlsBridge-D6y36qi5.d.ts +0 -87
- package/dist/workflow-builder-C-ekFbwR.d.ts +0 -1210
package/dist/workflow-builder.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
export { WorkflowBuilder, WorkflowBuilderCore, WorkflowSearchRedirect } from './chunk-
|
|
2
|
-
export { WorkflowBuilder as WorkflowBuilderPage } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { WorkflowBuilder, WorkflowBuilderCore, WorkflowSearchRedirect } from './chunk-E3PNEIBJ.js';
|
|
2
|
+
export { WorkflowBuilder as WorkflowBuilderPage } from './chunk-HY3XCZLB.js';
|
|
3
|
+
import './chunk-752BT4WM.js';
|
|
4
4
|
import './chunk-PIKYQE7P.js';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
5
|
+
import './chunk-4F54UT62.js';
|
|
6
|
+
import './chunk-NMYENCP2.js';
|
|
7
7
|
import './chunk-GEMNVFPK.js';
|
|
8
8
|
import './chunk-B6CCE2RW.js';
|
|
9
9
|
import './chunk-IEVSFCFS.js';
|
|
10
10
|
import './chunk-YXMFRQYV.js';
|
|
11
11
|
import './chunk-BQXVT32O.js';
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
12
|
+
import './chunk-JRSCUUBT.js';
|
|
13
|
+
import './chunk-TDFC5U66.js';
|
|
14
14
|
import './chunk-PASKZCII.js';
|
|
15
15
|
import './chunk-JDLQ6QIB.js';
|
|
16
16
|
import './chunk-KHS2DZHH.js';
|
|
17
17
|
import './chunk-Y53CVZVV.js';
|
|
18
|
-
import './chunk-
|
|
19
|
-
import './chunk-
|
|
20
|
-
import './chunk-
|
|
18
|
+
import './chunk-OHKSDHNC.js';
|
|
19
|
+
import './chunk-KE677WYY.js';
|
|
20
|
+
import './chunk-V2K4HJY4.js';
|
|
21
21
|
import './chunk-GLYINMOR.js';
|
|
22
22
|
import './chunk-H4ERTSMX.js';
|
|
23
23
|
import './chunk-4VJ3MDOV.js';
|
|
24
|
-
export { refetchStoreNodes } from './chunk-
|
|
24
|
+
export { refetchStoreNodes } from './chunk-HUCRE45R.js';
|
|
25
25
|
import './chunk-5375NUIO.js';
|
|
26
26
|
import './chunk-JL7CASN5.js';
|
|
27
27
|
import './chunk-SDZEAIIE.js';
|
|
28
|
-
export { useFlowStore } from './chunk-
|
|
28
|
+
export { useFlowStore } from './chunk-UZJKX5FN.js';
|
|
29
29
|
import './chunk-Y7FKJJMF.js';
|
|
30
30
|
import './chunk-TYI2XOSI.js';
|
|
31
31
|
import './chunk-G77IGC3Y.js';
|
|
@@ -3,81 +3,35 @@ import { ReactNode, CSSProperties } from 'react';
|
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { Node, Edge } from '@xyflow/react';
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* Pure handle-spec resolution for node cards — split from the rendering in
|
|
8
|
-
* output-handles.tsx so non-UI code (attach helpers, tests) can use it
|
|
9
|
-
* without dragging React/fe-libs into the import graph.
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Connection handle spec — mirrors IInternalNodeManifest.outputHandles in
|
|
13
|
-
* wspace-workflow-svc (seeded into node_endpoint_configs.operations and
|
|
14
|
-
* surfaced by the nodeManifest resolver).
|
|
15
|
-
*/
|
|
16
6
|
interface NodeHandleSpec {
|
|
17
|
-
/** Handle id — MUST match the activeHandle values the executor returns */
|
|
18
7
|
id: string;
|
|
19
|
-
/** Short label rendered next to the handle (n8n-style) */
|
|
20
8
|
label: string;
|
|
21
|
-
/** Visual tone for the handle/label */
|
|
22
9
|
tone?: "success" | "error" | "warning" | "info" | "neutral";
|
|
23
10
|
}
|
|
24
11
|
|
|
25
|
-
/**
|
|
26
|
-
* Pure model behind `WorkflowPreviewCanvas` (BOFF-9806): what each node card
|
|
27
|
-
* of a read-only workflow preview shows, read from a stored `definitionJson`
|
|
28
|
-
* with no node registry, store, config or network.
|
|
29
|
-
*
|
|
30
|
-
* The derivations mirror the builder's node component (`blocks/nodes/node/
|
|
31
|
-
* node.tsx`) so a preview card reads like the builder card for the same node:
|
|
32
|
-
* the same trigger / logic / action role accent, the same compact logic card
|
|
33
|
-
* for internal control-flow nodes, the same labelled output handles. Where the
|
|
34
|
-
* builder reads the node registry (manifest name, icon, description), the
|
|
35
|
-
* preview asks an optional resolver, then the node's own saved manifest
|
|
36
|
-
* snapshot (`data.nodeData`), then a fallback derived from the node type.
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
/** What a host knows about a node type (typically from the node registry). */
|
|
40
12
|
interface WorkflowPreviewNodeMeta {
|
|
41
|
-
/** Display name of the node type ("Gmail", "Schedule"). */
|
|
42
13
|
title?: string;
|
|
43
|
-
/** Iconify name ("logos:slack-icon") or an image URL / data URI. */
|
|
44
14
|
icon?: string;
|
|
45
15
|
description?: string;
|
|
46
16
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Optional lookup of node-type metadata. Return `undefined` for a type the
|
|
49
|
-
* host does not know; the preview then uses the node's saved manifest snapshot
|
|
50
|
-
* and, failing that, a name and icon derived from the type.
|
|
51
|
-
*/
|
|
52
17
|
type WorkflowPreviewNodeMetaResolver = (nodeType: string) => WorkflowPreviewNodeMeta | undefined;
|
|
53
|
-
/** Everything one preview card draws. */
|
|
54
18
|
interface PreviewCardModel {
|
|
55
|
-
/** `app`: the rich card (header + operation); `logic`: the compact card. */
|
|
56
19
|
variant: "app" | "logic";
|
|
57
20
|
nodeType: string;
|
|
58
|
-
/** Header text: the node's own label, else the node type's name (`""`
|
|
59
|
-
* when neither is known; the card then shows its translated fallback). */
|
|
60
21
|
title: string;
|
|
61
|
-
/** The node type's name (the rename placeholder in the builder). */
|
|
62
22
|
appName: string;
|
|
63
23
|
icon: string;
|
|
64
|
-
/** Operation shown in the card body; `null` shows the description only. */
|
|
65
24
|
operation: string | null;
|
|
66
25
|
description: string;
|
|
67
|
-
/** Logic card: short config summary under the title. */
|
|
68
26
|
subtitle?: string;
|
|
69
27
|
trigger: boolean;
|
|
70
28
|
disabled: boolean;
|
|
71
|
-
/** Role accent (trigger / logic / action node-category token). */
|
|
72
29
|
accent: string;
|
|
73
|
-
/** Key that picks the header's icon-square accent (`nodeAccent`). */
|
|
74
30
|
accentKey: string;
|
|
75
31
|
inputHandles: NodeHandleSpec[];
|
|
76
32
|
outputHandles: NodeHandleSpec[];
|
|
77
|
-
/** Extra body height so many-output cards do not crowd. */
|
|
78
33
|
handleSpacer: number;
|
|
79
34
|
}
|
|
80
|
-
/** A canvas node the preview renders (`type` is always the preview card). */
|
|
81
35
|
type PreviewFlowNode = Node<{
|
|
82
36
|
card: PreviewCardModel;
|
|
83
37
|
}, "preview">;
|
|
@@ -85,62 +39,23 @@ interface PreviewCanvasModel {
|
|
|
85
39
|
nodes: PreviewFlowNode[];
|
|
86
40
|
edges: Edge[];
|
|
87
41
|
}
|
|
88
|
-
/** "store/gmail_reader" → "Gmail Reader"; "internal:http-request" → "Http Request". */
|
|
89
42
|
declare function humanizeNodeType(nodeType: string): string;
|
|
90
|
-
/** Icon for a node type with no manifest at hand. */
|
|
91
43
|
declare function fallbackNodeIcon(nodeType: string): string;
|
|
92
|
-
/** The card model of one stored node (sticky notes are not cards). */
|
|
93
44
|
declare function previewCardModel(raw: Node, resolveMeta?: WorkflowPreviewNodeMetaResolver): PreviewCardModel;
|
|
94
|
-
/**
|
|
95
|
-
* The preview canvas of a stored definition, or `null` when it carries no
|
|
96
|
-
* canvas. Sticky notes are annotations, not steps, so they are left out; an
|
|
97
|
-
* edge to a node the preview does not draw is dropped, and a target handle
|
|
98
|
-
* the target card does not have falls back to its first input.
|
|
99
|
-
*/
|
|
100
45
|
declare function previewCanvasFromDefinition(definitionJson: unknown, resolveMeta?: WorkflowPreviewNodeMetaResolver): PreviewCanvasModel | null;
|
|
101
|
-
/**
|
|
102
|
-
* The order a sequenced reveal shows nodes in: along the flow (left to right),
|
|
103
|
-
* then top to bottom. Ids in `shown` are already on screen and are skipped.
|
|
104
|
-
*/
|
|
105
46
|
declare function previewRevealOrder(nodes: ReadonlyArray<Pick<Node, "id" | "position">>, shown?: ReadonlySet<string>): string[];
|
|
106
|
-
/** An edge is drawn once both of its ends are on screen. */
|
|
107
47
|
declare function edgesBetweenVisible<E extends Pick<Edge, "source" | "target">>(edges: readonly E[], visible: ReadonlySet<string>): E[];
|
|
108
|
-
/**
|
|
109
|
-
* The node that just appeared: the last id of `next` (in `order`) that was not
|
|
110
|
-
* in `previous`. Keeps the current newest when nothing was added, and drops it
|
|
111
|
-
* when it left the canvas.
|
|
112
|
-
*/
|
|
113
48
|
declare function newestNodeId(previous: ReadonlySet<string>, next: ReadonlySet<string>, order: readonly string[], current: string | null): string | null;
|
|
114
49
|
|
|
115
50
|
interface WorkflowPreviewCanvasProps {
|
|
116
|
-
/**
|
|
117
|
-
* The stored `definitionJson` (object or JSON string): `{ data: { nodes,
|
|
118
|
-
* edges } }` or a flat `{ nodes, edges }`, read the way the builder loads
|
|
119
|
-
* it. A definition with no `nodes` array renders `emptyState`.
|
|
120
|
-
*/
|
|
121
51
|
definition: unknown;
|
|
122
|
-
/**
|
|
123
|
-
* Ids of the nodes on screen. Omit to show every node. Ids the definition
|
|
124
|
-
* does not have are ignored.
|
|
125
|
-
*/
|
|
126
52
|
visibleNodeIds?: Iterable<string>;
|
|
127
|
-
/** Ids of nodes that just appeared: drawn with a highlight ring. */
|
|
128
53
|
freshNodeIds?: Iterable<string>;
|
|
129
|
-
/** The build is in progress: flow runs along the edges and the newest node pulses. */
|
|
130
54
|
running?: boolean;
|
|
131
|
-
/**
|
|
132
|
-
* Node-type metadata (name, icon, description), e.g. from a loaded node
|
|
133
|
-
* registry. Without it, cards use each node's saved manifest snapshot, then
|
|
134
|
-
* a name and icon derived from the node type. Keep the function stable.
|
|
135
|
-
*/
|
|
136
55
|
resolveNodeMeta?: WorkflowPreviewNodeMetaResolver;
|
|
137
|
-
/** Upper zoom bound for the camera and the viewer. Default 1.5. */
|
|
138
56
|
maxZoom?: number;
|
|
139
|
-
/** Padding the camera keeps around the visible nodes. Default 0.25. */
|
|
140
57
|
fitPadding?: number;
|
|
141
|
-
/** Rendered instead of the canvas when the definition has no canvas. */
|
|
142
58
|
emptyState?: ReactNode;
|
|
143
|
-
/** Accessible name of the canvas region. */
|
|
144
59
|
ariaLabel?: string;
|
|
145
60
|
className?: string;
|
|
146
61
|
style?: CSSProperties;
|
|
@@ -148,11 +63,8 @@ interface WorkflowPreviewCanvasProps {
|
|
|
148
63
|
declare function WorkflowPreviewCanvasComponent({ definition, visibleNodeIds, freshNodeIds, running, resolveNodeMeta, maxZoom, fitPadding, emptyState, ariaLabel, className, style, }: WorkflowPreviewCanvasProps): react_jsx_runtime.JSX.Element;
|
|
149
64
|
declare const WorkflowPreviewCanvas: React.MemoExoticComponent<typeof WorkflowPreviewCanvasComponent>;
|
|
150
65
|
|
|
151
|
-
/** Node enter: fade + pop. */
|
|
152
66
|
declare const NODE_ENTER_MS = 260;
|
|
153
|
-
/** Edge enter: the path draws from source to target. */
|
|
154
67
|
declare const EDGE_DRAW_MS = 360;
|
|
155
|
-
/** Camera move to take in a new node. */
|
|
156
68
|
declare const CAMERA_MS = 350;
|
|
157
69
|
|
|
158
70
|
export { type PreviewCanvasModel, type PreviewCardModel, type PreviewFlowNode, CAMERA_MS as WORKFLOW_PREVIEW_CAMERA_MS, EDGE_DRAW_MS as WORKFLOW_PREVIEW_EDGE_DRAW_MS, NODE_ENTER_MS as WORKFLOW_PREVIEW_NODE_ENTER_MS, WorkflowPreviewCanvas, type WorkflowPreviewCanvasProps, type WorkflowPreviewNodeMeta, type WorkflowPreviewNodeMetaResolver, edgesBetweenVisible, fallbackNodeIcon, humanizeNodeType, newestNodeId, previewCanvasFromDefinition, previewCardModel, previewRevealOrder };
|
package/dist/workflow-preview.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { canvasFromDefinition } from './chunk-
|
|
2
|
-
import { LogicNodeCard, NodeCard, NodeCardHeader, NodeCardBody, InputHandles, OutputHandles, STICKY_NOTE_TYPE,
|
|
1
|
+
import { canvasFromDefinition } from './chunk-KE677WYY.js';
|
|
2
|
+
import { LogicNodeCard, NodeCard, NodeCardHeader, NodeCardBody, InputHandles, OutputHandles, STICKY_NOTE_TYPE, isNodeTrigger, resolveOutputHandles, resolveInputHandles, resolveOperationName, outputHandlesSpacerHeight, WAIT_FOR_SIGNAL_NODE_TYPE, CODE_WORKFLOW_NODE_TYPE, readSignalName } from './chunk-UZJKX5FN.js';
|
|
3
3
|
import './chunk-Y7FKJJMF.js';
|
|
4
4
|
import { useTr } from './chunk-UULVIT25.js';
|
|
5
5
|
import { memo, useMemo, useState, useCallback, useSyncExternalStore, useRef, useEffect } from 'react';
|
|
@@ -119,27 +119,14 @@ function previewCardModel(raw, resolveMeta) {
|
|
|
119
119
|
)
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
const key = id.toLowerCase();
|
|
124
|
-
if (key === "true" || key === "success" || key === "approved")
|
|
125
|
-
return "success";
|
|
126
|
-
if (key === "false" || key === "done") return "neutral";
|
|
127
|
-
if (key === "error" || key === "failed" || key === "declined") return "error";
|
|
128
|
-
return void 0;
|
|
129
|
-
}
|
|
130
|
-
function withEdgeSourceHandles(card, edgeHandleIds) {
|
|
122
|
+
function withAdapterPorts(card, edgeHandleIds) {
|
|
131
123
|
const known = new Set(card.outputHandles.map((handle) => handle.id));
|
|
132
124
|
const missing = [...new Set(edgeHandleIds)].filter((id) => !known.has(id));
|
|
133
125
|
if (missing.length === 0) return card;
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
id,
|
|
137
|
-
|
|
138
|
-
tone: branchTone(id)
|
|
139
|
-
}));
|
|
140
|
-
if (isDefault && named.length === 1)
|
|
141
|
-
return { ...card, outputHandles: [{ id: named[0].id, label: "" }] };
|
|
142
|
-
const outputHandles = isDefault ? named : [...card.outputHandles, ...named];
|
|
126
|
+
const outputHandles = [
|
|
127
|
+
...card.outputHandles,
|
|
128
|
+
...missing.map((id) => ({ id, label: id }))
|
|
129
|
+
];
|
|
143
130
|
return {
|
|
144
131
|
...card,
|
|
145
132
|
outputHandles,
|
|
@@ -148,28 +135,82 @@ function withEdgeSourceHandles(card, edgeHandleIds) {
|
|
|
148
135
|
)
|
|
149
136
|
};
|
|
150
137
|
}
|
|
138
|
+
function adapterPortNames(data) {
|
|
139
|
+
const manifest = isRecord(data.nodeData) ? data.nodeData : {};
|
|
140
|
+
const adapters = Array.isArray(manifest.nodeAdapters) ? manifest.nodeAdapters : [];
|
|
141
|
+
return adapters.map((adapter) => isRecord(adapter) ? adapter.name : void 0).filter((name) => typeof name === "string" && !!name);
|
|
142
|
+
}
|
|
143
|
+
function builderCardPorts(nodes, edges, cards) {
|
|
144
|
+
const adapters = /* @__PURE__ */ new Map();
|
|
145
|
+
for (const node of nodes)
|
|
146
|
+
adapters.set(node.id, adapterPortNames(cardData(node)));
|
|
147
|
+
const adapterSets = new Map(
|
|
148
|
+
[...adapters].map(([id, names]) => [id, new Set(names)])
|
|
149
|
+
);
|
|
150
|
+
const subNodes = /* @__PURE__ */ new Set();
|
|
151
|
+
for (const node of nodes) {
|
|
152
|
+
if (cardData(node).isAdapterInstance) subNodes.add(node.id);
|
|
153
|
+
}
|
|
154
|
+
for (const edge of edges) {
|
|
155
|
+
const handle = edge.sourceHandle;
|
|
156
|
+
if (!handle || handle === "source") continue;
|
|
157
|
+
if (adapterSets.get(edge.source)?.has(handle)) subNodes.add(edge.target);
|
|
158
|
+
}
|
|
159
|
+
const ports = /* @__PURE__ */ new Map();
|
|
160
|
+
for (const node of nodes) {
|
|
161
|
+
const card = cards.get(node.id);
|
|
162
|
+
if (!card) continue;
|
|
163
|
+
const own = adapters.get(node.id) ?? [];
|
|
164
|
+
if (subNodes.has(node.id)) {
|
|
165
|
+
ports.set(node.id, { sources: own, targets: ["target"] });
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
const hasInputs = card.variant === "logic" || !card.trigger;
|
|
169
|
+
ports.set(node.id, {
|
|
170
|
+
sources: [...card.outputHandles.map((handle) => handle.id), ...own],
|
|
171
|
+
targets: hasInputs ? card.inputHandles.map((handle) => handle.id) : []
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
return ports;
|
|
175
|
+
}
|
|
176
|
+
function builderHandle(ports, handle) {
|
|
177
|
+
if (!handle) return ports[0] ?? null;
|
|
178
|
+
return ports.includes(handle) ? handle : null;
|
|
179
|
+
}
|
|
151
180
|
function previewCanvasFromDefinition(definitionJson, resolveMeta) {
|
|
152
181
|
const canvas = canvasFromDefinition(definitionJson);
|
|
153
182
|
if (!canvas) return null;
|
|
154
183
|
const steps = canvas.nodes.filter((node) => node.type !== STICKY_NOTE_TYPE);
|
|
155
184
|
const ids = new Set(steps.map((node) => node.id));
|
|
156
|
-
const
|
|
185
|
+
const betweenSteps = canvas.edges.filter(
|
|
157
186
|
(edge) => ids.has(edge.source) && ids.has(edge.target)
|
|
158
187
|
);
|
|
188
|
+
const resolved = /* @__PURE__ */ new Map();
|
|
189
|
+
for (const raw of steps)
|
|
190
|
+
resolved.set(raw.id, previewCardModel(raw, resolveMeta));
|
|
191
|
+
const ports = builderCardPorts(steps, betweenSteps, resolved);
|
|
192
|
+
const rawEdges = betweenSteps.flatMap((edge) => {
|
|
193
|
+
const sourceHandle = builderHandle(
|
|
194
|
+
ports.get(edge.source)?.sources ?? [],
|
|
195
|
+
edge.sourceHandle
|
|
196
|
+
);
|
|
197
|
+
const targetHandle = builderHandle(
|
|
198
|
+
ports.get(edge.target)?.targets ?? [],
|
|
199
|
+
edge.targetHandle
|
|
200
|
+
);
|
|
201
|
+
return sourceHandle && targetHandle ? [{ ...edge, sourceHandle, targetHandle }] : [];
|
|
202
|
+
});
|
|
159
203
|
const sourceHandles = /* @__PURE__ */ new Map();
|
|
160
204
|
for (const edge of rawEdges) {
|
|
161
|
-
if (!edge.sourceHandle) continue;
|
|
162
205
|
const list = sourceHandles.get(edge.source) ?? [];
|
|
163
206
|
list.push(edge.sourceHandle);
|
|
164
207
|
sourceHandles.set(edge.source, list);
|
|
165
208
|
}
|
|
166
|
-
const cards = /* @__PURE__ */ new Map();
|
|
167
209
|
const nodes = steps.map((raw) => {
|
|
168
|
-
const card =
|
|
169
|
-
previewCardModel(raw, resolveMeta),
|
|
210
|
+
const card = withAdapterPorts(
|
|
211
|
+
resolved.get(raw.id) ?? previewCardModel(raw, resolveMeta),
|
|
170
212
|
sourceHandles.get(raw.id) ?? []
|
|
171
213
|
);
|
|
172
|
-
cards.set(raw.id, card);
|
|
173
214
|
const position = isRecord(raw.position) ? raw.position : {};
|
|
174
215
|
return {
|
|
175
216
|
id: raw.id,
|
|
@@ -185,23 +226,17 @@ function previewCanvasFromDefinition(definitionJson, resolveMeta) {
|
|
|
185
226
|
deletable: false
|
|
186
227
|
};
|
|
187
228
|
});
|
|
188
|
-
const edges = rawEdges.map((edge) => {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
type: PREVIEW_EDGE_TYPE,
|
|
200
|
-
selectable: false,
|
|
201
|
-
deletable: false,
|
|
202
|
-
focusable: false
|
|
203
|
-
};
|
|
204
|
-
});
|
|
229
|
+
const edges = rawEdges.map((edge) => ({
|
|
230
|
+
id: edge.id,
|
|
231
|
+
source: edge.source,
|
|
232
|
+
target: edge.target,
|
|
233
|
+
sourceHandle: edge.sourceHandle,
|
|
234
|
+
targetHandle: edge.targetHandle,
|
|
235
|
+
type: PREVIEW_EDGE_TYPE,
|
|
236
|
+
selectable: false,
|
|
237
|
+
deletable: false,
|
|
238
|
+
focusable: false
|
|
239
|
+
}));
|
|
205
240
|
return { nodes, edges };
|
|
206
241
|
}
|
|
207
242
|
function previewRevealOrder(nodes, shown = /* @__PURE__ */ new Set()) {
|
package/dist/workflows-list.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { WorkflowsList } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { WorkflowsList } from './chunk-RI4NFNDX.js';
|
|
2
|
+
import './chunk-752BT4WM.js';
|
|
3
|
+
import './chunk-ZWDKN6PU.js';
|
|
4
4
|
import './chunk-5ERAJC2I.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-TDFC5U66.js';
|
|
6
6
|
import './chunk-FNZZ5JJL.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-V2K4HJY4.js';
|
|
8
8
|
import './chunk-PJAWNFJV.js';
|
|
9
9
|
import './chunk-H4ERTSMX.js';
|
|
10
10
|
import './chunk-4VJ3MDOV.js';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-HUCRE45R.js';
|
|
12
12
|
import './chunk-5375NUIO.js';
|
|
13
13
|
import './chunk-JL7CASN5.js';
|
|
14
14
|
import './chunk-SDZEAIIE.js';
|
|
15
|
-
import './chunk-
|
|
15
|
+
import './chunk-UZJKX5FN.js';
|
|
16
16
|
import './chunk-Y7FKJJMF.js';
|
|
17
17
|
import './chunk-TYI2XOSI.js';
|
|
18
18
|
import './chunk-G77IGC3Y.js';
|
package/package.json
CHANGED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Assistant page-controls bridge (BOFF-8679 / BOFF-8988, P3).
|
|
5
|
-
*
|
|
6
|
-
* The pages in this SDK can tell a host's assistant which controls they show
|
|
7
|
-
* right now (tabs, filters, search), so a typed or spoken "show failed runs"
|
|
8
|
-
* does exactly what a click on the page's own Status dropdown does.
|
|
9
|
-
*
|
|
10
|
-
* The SDK deliberately does NOT import `@burdenoff/fe-libs/shared/assistant/*`:
|
|
11
|
-
* many consumers pin an older fe-libs, and a runtime import would raise their
|
|
12
|
-
* floor. Instead the host mounts {@link FluidGridsAssistantBridge} with a
|
|
13
|
-
* `register` function (the host maps a spec onto its own assistant), and the
|
|
14
|
-
* pages call {@link useFluidGridsPageControls}. The types below are structural
|
|
15
|
-
* mirrors of the fe-libs `TabsSpec` / `EnumFilterSpec`, so a host can pass a
|
|
16
|
-
* spec straight into `tabsOf` / `enumFilter` with no conversion.
|
|
17
|
-
*
|
|
18
|
-
* Contract:
|
|
19
|
-
* - No provider mounted: every hook call is a no-op (the SDK works unchanged).
|
|
20
|
-
* - A spec describes ONLY what the page shows on screen at this moment; a page
|
|
21
|
-
* passes `null` while it shows no toolbar.
|
|
22
|
-
* - Every `set` is the page's own state setter (the one its dropdown calls).
|
|
23
|
-
* There is no submit, save, create, delete, run or retry in a spec.
|
|
24
|
-
* - Pass a memoised spec; a new object every render re-registers every render.
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
/** One option of an enum filter, in the page's own words. */
|
|
28
|
-
interface FgFilterOption {
|
|
29
|
-
value: string;
|
|
30
|
-
label: string;
|
|
31
|
-
}
|
|
32
|
-
/** A single-choice filter (a dropdown or a chip group). */
|
|
33
|
-
interface FgEnumFilterSpec {
|
|
34
|
-
id: string;
|
|
35
|
-
/** The filter's own name on the page ("Status"). */
|
|
36
|
-
label: string;
|
|
37
|
-
/**
|
|
38
|
-
* The options the page offers. The NEUTRAL one ("All") must be included so
|
|
39
|
-
* the host can clear the filter; the host does not list it as a choice.
|
|
40
|
-
*/
|
|
41
|
-
options: readonly FgFilterOption[];
|
|
42
|
-
/** The value that means "no filter". */
|
|
43
|
-
neutral: string;
|
|
44
|
-
/** The value applied now. */
|
|
45
|
-
value: string;
|
|
46
|
-
/** The page's own setter. */
|
|
47
|
-
set(value: string): void;
|
|
48
|
-
}
|
|
49
|
-
interface FgTabsSpec {
|
|
50
|
-
items: readonly {
|
|
51
|
-
id: string;
|
|
52
|
-
label: string;
|
|
53
|
-
}[];
|
|
54
|
-
/** The tab shown now. */
|
|
55
|
-
value: string;
|
|
56
|
-
/** The page's own setter. */
|
|
57
|
-
set(id: string): void;
|
|
58
|
-
}
|
|
59
|
-
interface FgPageControlsSpec {
|
|
60
|
-
/** The page's title in the product's words ("Workflows"). */
|
|
61
|
-
page: string;
|
|
62
|
-
tabs?: FgTabsSpec;
|
|
63
|
-
filters?: readonly FgEnumFilterSpec[];
|
|
64
|
-
/** The page's own search setter; `""` clears the search. */
|
|
65
|
-
search?(query: string): void;
|
|
66
|
-
}
|
|
67
|
-
/** Registers a page's controls; the returned function removes exactly that registration. */
|
|
68
|
-
type FgRegisterPageControls = (spec: FgPageControlsSpec) => () => void;
|
|
69
|
-
interface FluidGridsAssistantBridgeProps {
|
|
70
|
-
/**
|
|
71
|
-
* The host's registration function. Give it a STABLE identity (a module
|
|
72
|
-
* constant or `useCallback`): a new function every render re-registers the
|
|
73
|
-
* mounted page every render.
|
|
74
|
-
*/
|
|
75
|
-
register: FgRegisterPageControls;
|
|
76
|
-
children: ReactNode;
|
|
77
|
-
}
|
|
78
|
-
/** Context provider a host mounts around the FluidGrids routes. */
|
|
79
|
-
declare const FluidGridsAssistantBridge: FC<FluidGridsAssistantBridgeProps>;
|
|
80
|
-
/**
|
|
81
|
-
* Register a page's controls for as long as the calling component is mounted
|
|
82
|
-
* (and `spec` is non-null). With no {@link FluidGridsAssistantBridge} above,
|
|
83
|
-
* this does nothing.
|
|
84
|
-
*/
|
|
85
|
-
declare function useFluidGridsPageControls(spec: FgPageControlsSpec | null): void;
|
|
86
|
-
|
|
87
|
-
export { type FgEnumFilterSpec as F, type FgFilterOption as a, type FgPageControlsSpec as b, type FgRegisterPageControls as c, type FgTabsSpec as d, FluidGridsAssistantBridge as e, type FluidGridsAssistantBridgeProps as f, useFluidGridsPageControls as u };
|