@pipelex/mthds-ui 0.43.0 → 0.45.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/{chunk-ENRYQOCO.js → chunk-CZGIDVT7.js} +2 -2
- package/dist/{chunk-7JZBXBZS.js → chunk-DNYJEPHT.js} +3 -3
- package/dist/{chunk-6S5TQPTO.js → chunk-DUBNSW66.js} +2 -2
- package/dist/{chunk-HPARBH6K.js → chunk-SCKRIESM.js} +453 -40
- package/dist/chunk-SCKRIESM.js.map +1 -0
- package/dist/{chunk-N2F62MW7.js → chunk-UAYO53EO.js} +5 -5
- package/dist/chunk-UAYO53EO.js.map +1 -0
- package/dist/{chunk-4KLE62AN.js → chunk-X7GHQ3SD.js} +1 -1
- package/dist/{chunk-4KLE62AN.js.map → chunk-X7GHQ3SD.js.map} +1 -1
- package/dist/form/react/index.d.ts +1 -1
- package/dist/form/react/index.js +2 -2
- package/dist/graph/index.d.ts +226 -4
- package/dist/graph/index.js +8 -4
- package/dist/graph/react/index.d.ts +7 -3
- package/dist/graph/react/index.js +1687 -984
- package/dist/graph/react/index.js.map +1 -1
- package/dist/graph/react/styles/simple/SimpleDetailPanel.css +492 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -4
- package/dist/{registryJoin-C6Wfkik-.d.ts → registryJoin-C7paykZ2.d.ts} +1 -1
- package/dist/standalone/graph-standalone.html +621 -128
- package/dist/standalone/graph-viewer.css +494 -1
- package/dist/standalone/graph-viewer.js +127 -127
- package/dist/static-graph/index.d.ts +1 -1
- package/dist/static-graph/index.js +1 -1
- package/dist/timeline/index.d.ts +3 -3
- package/dist/timeline/index.js +2 -2
- package/dist/timeline/react/index.d.ts +2 -2
- package/dist/timeline/react/index.js +5 -5
- package/dist/{types-DLAnYNoi.d.ts → types-DgYaVX6K.d.ts} +8 -0
- package/package.json +3 -2
- package/dist/chunk-HPARBH6K.js.map +0 -1
- package/dist/chunk-N2F62MW7.js.map +0 -1
- /package/dist/{chunk-ENRYQOCO.js.map → chunk-CZGIDVT7.js.map} +0 -0
- /package/dist/{chunk-7JZBXBZS.js.map → chunk-DNYJEPHT.js.map} +0 -0
- /package/dist/{chunk-6S5TQPTO.js.map → chunk-DUBNSW66.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
styleMenuLabel,
|
|
7
7
|
usePopoverDismiss,
|
|
8
8
|
useSystemTheme
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-DNYJEPHT.js";
|
|
10
10
|
import {
|
|
11
11
|
GRAPH_STYLE_PIPELINES,
|
|
12
12
|
GraphSpecValidationError,
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
applyValidationDecorations,
|
|
17
17
|
buildChildToControllerMap,
|
|
18
18
|
buildGraph,
|
|
19
|
+
buildSimpleNodeDetail,
|
|
19
20
|
buildValidationDecorations,
|
|
20
21
|
findCousinControllers,
|
|
21
22
|
findStuffByDigest,
|
|
@@ -27,12 +28,12 @@ import {
|
|
|
27
28
|
roundedPolylinePath,
|
|
28
29
|
routeLabelCenter,
|
|
29
30
|
validateGraphSpec
|
|
30
|
-
} from "../../chunk-
|
|
31
|
+
} from "../../chunk-SCKRIESM.js";
|
|
31
32
|
import {
|
|
32
33
|
GRAPH_STYLES,
|
|
33
34
|
resolveGraphStyle,
|
|
34
35
|
resolveStyleMenu
|
|
35
|
-
} from "../../chunk-
|
|
36
|
+
} from "../../chunk-UAYO53EO.js";
|
|
36
37
|
import {
|
|
37
38
|
parsePipeRef
|
|
38
39
|
} from "../../chunk-2N65P32H.js";
|
|
@@ -40,7 +41,7 @@ import "../../chunk-P6IGZVWE.js";
|
|
|
40
41
|
import {
|
|
41
42
|
DEFAULT_GRAPH_CONFIG,
|
|
42
43
|
getPaletteForTheme
|
|
43
|
-
} from "../../chunk-
|
|
44
|
+
} from "../../chunk-CZGIDVT7.js";
|
|
44
45
|
import {
|
|
45
46
|
BINDING_STEP_TYPE,
|
|
46
47
|
EDGE_TYPE,
|
|
@@ -48,6 +49,7 @@ import {
|
|
|
48
49
|
FOLD_MODE,
|
|
49
50
|
GRAPH_DIRECTION,
|
|
50
51
|
GRAPH_SPEC_MODE,
|
|
52
|
+
GRAPH_STYLE,
|
|
51
53
|
GRAPH_THEME_MODE,
|
|
52
54
|
NODE_TYPE_SIMPLE_DECISION,
|
|
53
55
|
NODE_TYPE_SIMPLE_FRAME,
|
|
@@ -67,7 +69,7 @@ import {
|
|
|
67
69
|
stuffDigestFromId,
|
|
68
70
|
toolbarOrientation,
|
|
69
71
|
toolbarSide
|
|
70
|
-
} from "../../chunk-
|
|
72
|
+
} from "../../chunk-X7GHQ3SD.js";
|
|
71
73
|
import {
|
|
72
74
|
__objRest,
|
|
73
75
|
__spreadProps,
|
|
@@ -80,9 +82,10 @@ import "./detail/DetailPanel.css";
|
|
|
80
82
|
import "./viewer/GraphToolbar.css";
|
|
81
83
|
import "./viewer/StyleMenu.css";
|
|
82
84
|
import "./styles/simple/SimpleStyle.css";
|
|
85
|
+
import "./styles/simple/SimpleDetailPanel.css";
|
|
83
86
|
|
|
84
87
|
// src/graph/react/viewer/GraphViewer.tsx
|
|
85
|
-
import
|
|
88
|
+
import React13 from "react";
|
|
86
89
|
import {
|
|
87
90
|
ReactFlow,
|
|
88
91
|
useNodesState,
|
|
@@ -91,111 +94,17 @@ import {
|
|
|
91
94
|
BackgroundVariant
|
|
92
95
|
} from "@xyflow/react";
|
|
93
96
|
|
|
94
|
-
// src/graph/react/detail/
|
|
95
|
-
import
|
|
96
|
-
import {
|
|
97
|
-
buildResultField,
|
|
98
|
-
getPipeInputForm,
|
|
99
|
-
getPipeIOContract,
|
|
100
|
-
getPipeOutputForm
|
|
101
|
-
} from "@pipelex/mthds-form";
|
|
102
|
-
import {
|
|
103
|
-
JsonView,
|
|
104
|
-
ResultEnvProvider,
|
|
105
|
-
StuffViewer,
|
|
106
|
-
useFieldStrings
|
|
107
|
-
} from "@pipelex/mthds-form/react";
|
|
97
|
+
// src/graph/react/detail/DetailPanel.tsx
|
|
98
|
+
import React from "react";
|
|
108
99
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
resolveUrl,
|
|
117
|
-
resolveRendition,
|
|
118
|
-
resolveShareUrl,
|
|
119
|
-
saveFiles,
|
|
120
|
-
downloads
|
|
121
|
-
}) {
|
|
122
|
-
const field = React.useMemo(
|
|
123
|
-
() => {
|
|
124
|
-
var _a;
|
|
125
|
-
return (_a = fromProducer(pipeIoContracts, outputForm, producerPipeRef)) != null ? _a : fromConsumer(pipeIoContracts, inputForm, consumer);
|
|
126
|
-
},
|
|
127
|
-
[pipeIoContracts, outputForm, inputForm, producerPipeRef, consumer]
|
|
128
|
-
);
|
|
129
|
-
if (field) {
|
|
130
|
-
const panel = /* @__PURE__ */ jsx(StuffViewer, { field, value: stuff.data, name: stuff.name });
|
|
131
|
-
return resolveUrl || resolveRendition || resolveShareUrl || saveFiles || downloads ? /* @__PURE__ */ jsx(
|
|
132
|
-
ResultEnvProvider,
|
|
133
|
-
{
|
|
134
|
-
resolveUrl,
|
|
135
|
-
resolveRendition,
|
|
136
|
-
resolveShareUrl,
|
|
137
|
-
saveFiles,
|
|
138
|
-
downloads,
|
|
139
|
-
children: panel
|
|
140
|
-
}
|
|
141
|
-
) : panel;
|
|
142
|
-
}
|
|
143
|
-
return stuff.data === void 0 || stuff.data === null ? null : /* @__PURE__ */ jsx(UndescribedValue, { value: stuff.data });
|
|
100
|
+
var DIALOG_LAYER_SELECTOR = 'dialog, [role="dialog"], [role="alertdialog"]';
|
|
101
|
+
function escapeBelongsAbove(event, panel) {
|
|
102
|
+
if (event.defaultPrevented) return true;
|
|
103
|
+
const target = event.target;
|
|
104
|
+
if (!(target instanceof Element)) return false;
|
|
105
|
+
const layer = target.closest(DIALOG_LAYER_SELECTOR);
|
|
106
|
+
return layer !== null && !(panel !== null && layer.contains(panel));
|
|
144
107
|
}
|
|
145
|
-
function UndescribedValue({ value }) {
|
|
146
|
-
const s = useFieldStrings();
|
|
147
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
148
|
-
/* @__PURE__ */ jsx("p", { className: "text-[12px] text-muted-foreground", children: s.resultUndescribed }),
|
|
149
|
-
/* @__PURE__ */ jsx(JsonView, { value })
|
|
150
|
-
] });
|
|
151
|
-
}
|
|
152
|
-
function fromProducer(contracts, outputForm, producerPipeRef) {
|
|
153
|
-
if (!producerPipeRef) return null;
|
|
154
|
-
const parsed = parsePipeRef(producerPipeRef);
|
|
155
|
-
if (!(parsed == null ? void 0 : parsed.domainPath)) return null;
|
|
156
|
-
const descriptor = getPipeOutputForm(outputForm, parsed.domainPath, parsed.pipeCode);
|
|
157
|
-
const contract = getPipeIOContract(contracts, parsed.domainPath, parsed.pipeCode);
|
|
158
|
-
if (!descriptor || !contract) return null;
|
|
159
|
-
return buildResultField(descriptor, contract.output.json_schema);
|
|
160
|
-
}
|
|
161
|
-
function fromConsumer(contracts, inputForm, consumer) {
|
|
162
|
-
if (!inputForm || !consumer) return null;
|
|
163
|
-
const parsed = parsePipeRef(consumer.pipeRef);
|
|
164
|
-
if (!(parsed == null ? void 0 : parsed.domainPath)) return null;
|
|
165
|
-
const descriptor = getPipeInputForm(inputForm, parsed.domainPath, parsed.pipeCode);
|
|
166
|
-
const contract = getPipeIOContract(contracts, parsed.domainPath, parsed.pipeCode);
|
|
167
|
-
if (!descriptor || !contract) return null;
|
|
168
|
-
const slot = contract.inputs[consumer.slotName];
|
|
169
|
-
if (!slot || slot.multiplicity !== "single") return null;
|
|
170
|
-
const node = descriptor.fields.find(
|
|
171
|
-
(candidate) => candidate.name === consumer.slotName
|
|
172
|
-
);
|
|
173
|
-
if (!node) return null;
|
|
174
|
-
return buildResultField({ field: node }, slot.json_schema);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// src/graph/react/viewer/graphArtifacts.ts
|
|
178
|
-
function graphArtifactsFrom(source) {
|
|
179
|
-
var _a, _b, _c;
|
|
180
|
-
if (source.graph_spec === void 0 || source.graph_spec === null) return null;
|
|
181
|
-
return {
|
|
182
|
-
graphSpec: source.graph_spec,
|
|
183
|
-
pipeIoContracts: (_a = source.pipe_io_contracts) != null ? _a : null,
|
|
184
|
-
outputForm: (_b = source.output_form) != null ? _b : null,
|
|
185
|
-
inputForm: (_c = source.input_form) != null ? _c : null
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
function resultDescriptors(graph) {
|
|
189
|
-
const pipeIoContracts = graph == null ? void 0 : graph.pipeIoContracts;
|
|
190
|
-
const outputForm = graph == null ? void 0 : graph.outputForm;
|
|
191
|
-
if (!pipeIoContracts || !outputForm) return null;
|
|
192
|
-
const inputForm = graph == null ? void 0 : graph.inputForm;
|
|
193
|
-
return inputForm ? { pipeIoContracts, outputForm, inputForm } : { pipeIoContracts, outputForm };
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// src/graph/react/detail/DetailPanel.tsx
|
|
197
|
-
import React2 from "react";
|
|
198
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
199
108
|
function DetailPanel({
|
|
200
109
|
isOpen,
|
|
201
110
|
onClose,
|
|
@@ -205,10 +114,11 @@ function DetailPanel({
|
|
|
205
114
|
onResizeHandleMouseDown,
|
|
206
115
|
closeOnEscape = true
|
|
207
116
|
}) {
|
|
208
|
-
|
|
117
|
+
const panelRef = React.useRef(null);
|
|
118
|
+
React.useEffect(() => {
|
|
209
119
|
if (!isOpen || !closeOnEscape) return;
|
|
210
120
|
const onKeyDown = (e) => {
|
|
211
|
-
if (e.key === "Escape") onClose();
|
|
121
|
+
if (e.key === "Escape" && !escapeBelongsAbove(e, panelRef.current)) onClose();
|
|
212
122
|
};
|
|
213
123
|
document.addEventListener("keydown", onKeyDown);
|
|
214
124
|
return () => document.removeEventListener("keydown", onKeyDown);
|
|
@@ -218,8 +128,8 @@ function DetailPanel({
|
|
|
218
128
|
!isOpen && "detail-panel--closed",
|
|
219
129
|
isDragging && "detail-panel--dragging"
|
|
220
130
|
].filter(Boolean).join(" ");
|
|
221
|
-
return /* @__PURE__ */
|
|
222
|
-
onResizeHandleMouseDown && /* @__PURE__ */
|
|
131
|
+
return /* @__PURE__ */ jsxs("div", { ref: panelRef, className, style: width ? { width: `${width}px` } : void 0, children: [
|
|
132
|
+
onResizeHandleMouseDown && /* @__PURE__ */ jsx(
|
|
223
133
|
"div",
|
|
224
134
|
{
|
|
225
135
|
className: "detail-panel-resize-handle",
|
|
@@ -229,15 +139,15 @@ function DetailPanel({
|
|
|
229
139
|
"aria-label": "Resize panel"
|
|
230
140
|
}
|
|
231
141
|
),
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ jsxs("div", { className: "detail-panel-content", children: [
|
|
143
|
+
/* @__PURE__ */ jsx("div", { className: "detail-panel-close-row", children: /* @__PURE__ */ jsx("button", { className: "detail-panel-close", onClick: onClose, "aria-label": "Close panel", children: "x" }) }),
|
|
234
144
|
children
|
|
235
145
|
] })
|
|
236
146
|
] });
|
|
237
147
|
}
|
|
238
148
|
|
|
239
149
|
// src/graph/react/detail/useResizable.ts
|
|
240
|
-
import
|
|
150
|
+
import React2 from "react";
|
|
241
151
|
var MAX_WIDTH_RATIO = 0.6;
|
|
242
152
|
function useResizable({
|
|
243
153
|
defaultWidth,
|
|
@@ -245,11 +155,11 @@ function useResizable({
|
|
|
245
155
|
maxWidth,
|
|
246
156
|
containerRef
|
|
247
157
|
}) {
|
|
248
|
-
const [width, setWidth] =
|
|
249
|
-
const [isDragging, setIsDragging] =
|
|
250
|
-
const dragRef =
|
|
251
|
-
const rafRef =
|
|
252
|
-
const handleMouseDown =
|
|
158
|
+
const [width, setWidth] = React2.useState(defaultWidth);
|
|
159
|
+
const [isDragging, setIsDragging] = React2.useState(false);
|
|
160
|
+
const dragRef = React2.useRef({ startX: 0, startWidth: 0, maxAllowed: maxWidth });
|
|
161
|
+
const rafRef = React2.useRef(null);
|
|
162
|
+
const handleMouseDown = React2.useCallback(
|
|
253
163
|
(e) => {
|
|
254
164
|
var _a;
|
|
255
165
|
e.preventDefault();
|
|
@@ -263,7 +173,7 @@ function useResizable({
|
|
|
263
173
|
},
|
|
264
174
|
[width, maxWidth, containerRef]
|
|
265
175
|
);
|
|
266
|
-
|
|
176
|
+
React2.useEffect(() => {
|
|
267
177
|
if (!isDragging) return;
|
|
268
178
|
const onMouseMove = (e) => {
|
|
269
179
|
if (rafRef.current !== null) cancelAnimationFrame(rafRef.current);
|
|
@@ -300,12 +210,228 @@ function useResizable({
|
|
|
300
210
|
return { width, isDragging, handleMouseDown };
|
|
301
211
|
}
|
|
302
212
|
|
|
213
|
+
// src/graph/react/detail/ConceptDetailPanel.tsx
|
|
214
|
+
import React3 from "react";
|
|
215
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
216
|
+
function ConceptDetailPanel({
|
|
217
|
+
concept,
|
|
218
|
+
ioData,
|
|
219
|
+
isDryRun,
|
|
220
|
+
renderData,
|
|
221
|
+
instanceKey
|
|
222
|
+
}) {
|
|
223
|
+
var _a;
|
|
224
|
+
const multiplicity = ioData == null ? void 0 : ioData.multiplicity;
|
|
225
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
226
|
+
/* @__PURE__ */ jsxs2("div", { className: "detail-header", children: [
|
|
227
|
+
/* @__PURE__ */ jsx2("span", { className: "detail-concept-code", children: concept.code + multiplicitySuffix(multiplicity) }),
|
|
228
|
+
/* @__PURE__ */ jsx2("span", { className: "detail-concept-domain", children: concept.domain_code })
|
|
229
|
+
] }),
|
|
230
|
+
isPluralMultiplicity(multiplicity) && /* @__PURE__ */ jsx2("div", { className: "detail-multiplicity", children: multiplicity === true ? `A variable-length list of ${concept.code} items` : `A fixed-length list of exactly ${multiplicity} ${concept.code} items` }),
|
|
231
|
+
concept.description && /* @__PURE__ */ jsx2("div", { className: "detail-description", children: concept.description }),
|
|
232
|
+
concept.refines && /* @__PURE__ */ jsxs2("div", { className: "detail-refines", children: [
|
|
233
|
+
"refines ",
|
|
234
|
+
/* @__PURE__ */ jsx2("span", { className: "detail-refines-code", children: concept.refines })
|
|
235
|
+
] }),
|
|
236
|
+
/* @__PURE__ */ jsx2(
|
|
237
|
+
ConceptBody,
|
|
238
|
+
{
|
|
239
|
+
concept,
|
|
240
|
+
ioData,
|
|
241
|
+
isDryRun,
|
|
242
|
+
renderData
|
|
243
|
+
},
|
|
244
|
+
instanceKey != null ? instanceKey : `${concept.code}:${ioData && "digest" in ioData ? ioData.digest : (_a = ioData == null ? void 0 : ioData.name) != null ? _a : ""}`
|
|
245
|
+
)
|
|
246
|
+
] });
|
|
247
|
+
}
|
|
248
|
+
function ConceptBody({ concept, ioData, isDryRun, renderData }) {
|
|
249
|
+
const dataView = ioData && !isDryRun ? renderData == null ? void 0 : renderData() : void 0;
|
|
250
|
+
const hasData = Boolean(dataView);
|
|
251
|
+
const [activeTab, setActiveTab] = React3.useState(hasData ? "data" : "structure");
|
|
252
|
+
const baseId = React3.useId();
|
|
253
|
+
const tabId = (tab) => `${baseId}-tab-${tab}`;
|
|
254
|
+
const panelId = (tab) => `${baseId}-tabpanel-${tab}`;
|
|
255
|
+
const structure = concept.json_schema ? /* @__PURE__ */ jsxs2("div", { children: [
|
|
256
|
+
/* @__PURE__ */ jsx2("div", { className: "detail-section-label", children: "Structure" }),
|
|
257
|
+
/* @__PURE__ */ jsx2(SchemaTable, { schema: concept.json_schema })
|
|
258
|
+
] }) : /* @__PURE__ */ jsx2("div", { className: "detail-not-available", children: "Schema not available" });
|
|
259
|
+
if (!hasData) return structure;
|
|
260
|
+
const onTabKeyDown = (event) => {
|
|
261
|
+
var _a;
|
|
262
|
+
let next;
|
|
263
|
+
switch (event.key) {
|
|
264
|
+
case "ArrowLeft":
|
|
265
|
+
case "ArrowRight":
|
|
266
|
+
next = activeTab === "data" ? "structure" : "data";
|
|
267
|
+
break;
|
|
268
|
+
case "Home":
|
|
269
|
+
next = "data";
|
|
270
|
+
break;
|
|
271
|
+
case "End":
|
|
272
|
+
next = "structure";
|
|
273
|
+
break;
|
|
274
|
+
default:
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
event.preventDefault();
|
|
278
|
+
setActiveTab(next);
|
|
279
|
+
(_a = document.getElementById(tabId(next))) == null ? void 0 : _a.focus();
|
|
280
|
+
};
|
|
281
|
+
const renderTab = (tab, label) => /* @__PURE__ */ jsx2(
|
|
282
|
+
"button",
|
|
283
|
+
{
|
|
284
|
+
type: "button",
|
|
285
|
+
role: "tab",
|
|
286
|
+
id: tabId(tab),
|
|
287
|
+
"aria-selected": activeTab === tab,
|
|
288
|
+
"aria-controls": panelId(tab),
|
|
289
|
+
tabIndex: activeTab === tab ? 0 : -1,
|
|
290
|
+
className: `detail-tab ${activeTab === tab ? "detail-tab--active" : ""}`,
|
|
291
|
+
onClick: () => setActiveTab(tab),
|
|
292
|
+
onKeyDown: onTabKeyDown,
|
|
293
|
+
children: label
|
|
294
|
+
}
|
|
295
|
+
);
|
|
296
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
297
|
+
/* @__PURE__ */ jsxs2("div", { className: "detail-tabs", role: "tablist", "aria-label": "Concept views", children: [
|
|
298
|
+
renderTab("data", "Data"),
|
|
299
|
+
renderTab("structure", "Structure")
|
|
300
|
+
] }),
|
|
301
|
+
/* @__PURE__ */ jsx2("div", { role: "tabpanel", id: panelId(activeTab), "aria-labelledby": tabId(activeTab), children: activeTab === "data" ? dataView : structure })
|
|
302
|
+
] });
|
|
303
|
+
}
|
|
304
|
+
function SchemaTable({ schema }) {
|
|
305
|
+
var _a;
|
|
306
|
+
const properties = schema.properties;
|
|
307
|
+
const required = new Set((_a = schema.required) != null ? _a : []);
|
|
308
|
+
if (!properties || Object.keys(properties).length === 0) {
|
|
309
|
+
return /* @__PURE__ */ jsx2("div", { className: "detail-not-available", children: "No fields defined" });
|
|
310
|
+
}
|
|
311
|
+
const fields = Object.entries(properties);
|
|
312
|
+
return /* @__PURE__ */ jsxs2("table", { className: "detail-schema-table", children: [
|
|
313
|
+
/* @__PURE__ */ jsx2("thead", { children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
314
|
+
/* @__PURE__ */ jsx2("th", { children: "Field" }),
|
|
315
|
+
/* @__PURE__ */ jsx2("th", { children: "Type" }),
|
|
316
|
+
/* @__PURE__ */ jsx2("th", {}),
|
|
317
|
+
/* @__PURE__ */ jsx2("th", { children: "Description" })
|
|
318
|
+
] }) }),
|
|
319
|
+
/* @__PURE__ */ jsx2("tbody", { children: fields.map(([fieldName, fieldSchema]) => {
|
|
320
|
+
var _a2;
|
|
321
|
+
return /* @__PURE__ */ jsxs2("tr", { children: [
|
|
322
|
+
/* @__PURE__ */ jsx2("td", { className: "detail-schema-field", children: fieldName }),
|
|
323
|
+
/* @__PURE__ */ jsx2("td", { className: "detail-schema-type", children: extractType(fieldSchema) }),
|
|
324
|
+
/* @__PURE__ */ jsx2("td", { children: required.has(fieldName) && /* @__PURE__ */ jsx2("span", { className: "detail-schema-required", children: "req" }) }),
|
|
325
|
+
/* @__PURE__ */ jsx2("td", { children: (_a2 = fieldSchema.description) != null ? _a2 : "" })
|
|
326
|
+
] }, fieldName);
|
|
327
|
+
}) })
|
|
328
|
+
] });
|
|
329
|
+
}
|
|
330
|
+
function extractType(schema) {
|
|
331
|
+
var _a;
|
|
332
|
+
if (typeof schema.type === "string") return schema.type;
|
|
333
|
+
if (Array.isArray(schema.type)) return schema.type.join(" | ");
|
|
334
|
+
if (schema.anyOf) return "union";
|
|
335
|
+
if (schema.allOf) return "all";
|
|
336
|
+
if (typeof schema.$ref === "string") {
|
|
337
|
+
const ref = schema.$ref;
|
|
338
|
+
return (_a = ref.split("/").pop()) != null ? _a : "(unresolved type)";
|
|
339
|
+
}
|
|
340
|
+
return "(unresolved type)";
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// src/graph/react/viewer/styleDetailPanels.tsx
|
|
344
|
+
import React8 from "react";
|
|
345
|
+
|
|
346
|
+
// src/graph/react/detail/StuffResultPanel.tsx
|
|
347
|
+
import * as React4 from "react";
|
|
348
|
+
import {
|
|
349
|
+
buildResultField,
|
|
350
|
+
getPipeInputForm,
|
|
351
|
+
getPipeIOContract,
|
|
352
|
+
getPipeOutputForm
|
|
353
|
+
} from "@pipelex/mthds-form";
|
|
354
|
+
import {
|
|
355
|
+
JsonView,
|
|
356
|
+
ResultEnvProvider,
|
|
357
|
+
StuffViewer,
|
|
358
|
+
useFieldStrings
|
|
359
|
+
} from "@pipelex/mthds-form/react";
|
|
360
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
361
|
+
function StuffResultPanel({
|
|
362
|
+
pipeIoContracts,
|
|
363
|
+
outputForm,
|
|
364
|
+
inputForm,
|
|
365
|
+
stuff,
|
|
366
|
+
producerPipeRef,
|
|
367
|
+
consumer,
|
|
368
|
+
resolveUrl,
|
|
369
|
+
resolveRendition,
|
|
370
|
+
resolveShareUrl,
|
|
371
|
+
saveFiles,
|
|
372
|
+
downloads
|
|
373
|
+
}) {
|
|
374
|
+
const field = React4.useMemo(
|
|
375
|
+
() => {
|
|
376
|
+
var _a;
|
|
377
|
+
return (_a = fromProducer(pipeIoContracts, outputForm, producerPipeRef)) != null ? _a : fromConsumer(pipeIoContracts, inputForm, consumer);
|
|
378
|
+
},
|
|
379
|
+
[pipeIoContracts, outputForm, inputForm, producerPipeRef, consumer]
|
|
380
|
+
);
|
|
381
|
+
if (field) {
|
|
382
|
+
const panel = /* @__PURE__ */ jsx3(StuffViewer, { field, value: stuff.data, name: stuff.name });
|
|
383
|
+
return resolveUrl || resolveRendition || resolveShareUrl || saveFiles || downloads ? /* @__PURE__ */ jsx3(
|
|
384
|
+
ResultEnvProvider,
|
|
385
|
+
{
|
|
386
|
+
resolveUrl,
|
|
387
|
+
resolveRendition,
|
|
388
|
+
resolveShareUrl,
|
|
389
|
+
saveFiles,
|
|
390
|
+
downloads,
|
|
391
|
+
children: panel
|
|
392
|
+
}
|
|
393
|
+
) : panel;
|
|
394
|
+
}
|
|
395
|
+
return stuff.data === void 0 || stuff.data === null ? null : /* @__PURE__ */ jsx3(UndescribedValue, { value: stuff.data });
|
|
396
|
+
}
|
|
397
|
+
function UndescribedValue({ value }) {
|
|
398
|
+
const s = useFieldStrings();
|
|
399
|
+
return /* @__PURE__ */ jsxs3("div", { className: "space-y-2", children: [
|
|
400
|
+
/* @__PURE__ */ jsx3("p", { className: "text-[12px] text-muted-foreground", children: s.resultUndescribed }),
|
|
401
|
+
/* @__PURE__ */ jsx3(JsonView, { value })
|
|
402
|
+
] });
|
|
403
|
+
}
|
|
404
|
+
function fromProducer(contracts, outputForm, producerPipeRef) {
|
|
405
|
+
if (!producerPipeRef) return null;
|
|
406
|
+
const parsed = parsePipeRef(producerPipeRef);
|
|
407
|
+
if (!(parsed == null ? void 0 : parsed.domainPath)) return null;
|
|
408
|
+
const descriptor = getPipeOutputForm(outputForm, parsed.domainPath, parsed.pipeCode);
|
|
409
|
+
const contract = getPipeIOContract(contracts, parsed.domainPath, parsed.pipeCode);
|
|
410
|
+
if (!descriptor || !contract) return null;
|
|
411
|
+
return buildResultField(descriptor, contract.output.json_schema);
|
|
412
|
+
}
|
|
413
|
+
function fromConsumer(contracts, inputForm, consumer) {
|
|
414
|
+
if (!inputForm || !consumer) return null;
|
|
415
|
+
const parsed = parsePipeRef(consumer.pipeRef);
|
|
416
|
+
if (!(parsed == null ? void 0 : parsed.domainPath)) return null;
|
|
417
|
+
const descriptor = getPipeInputForm(inputForm, parsed.domainPath, parsed.pipeCode);
|
|
418
|
+
const contract = getPipeIOContract(contracts, parsed.domainPath, parsed.pipeCode);
|
|
419
|
+
if (!descriptor || !contract) return null;
|
|
420
|
+
const slot = contract.inputs[consumer.slotName];
|
|
421
|
+
if (!slot || slot.multiplicity !== "single") return null;
|
|
422
|
+
const node = descriptor.fields.find(
|
|
423
|
+
(candidate) => candidate.name === consumer.slotName
|
|
424
|
+
);
|
|
425
|
+
if (!node) return null;
|
|
426
|
+
return buildResultField({ field: node }, slot.json_schema);
|
|
427
|
+
}
|
|
428
|
+
|
|
303
429
|
// src/graph/react/detail/PipeDetailPanel.tsx
|
|
304
|
-
import
|
|
430
|
+
import React6 from "react";
|
|
305
431
|
|
|
306
432
|
// src/graph/react/detail/sections/shared.tsx
|
|
307
433
|
import { useState } from "react";
|
|
308
|
-
import { jsx as
|
|
434
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
309
435
|
function formatDuration(seconds) {
|
|
310
436
|
if (seconds < 1) return `${(seconds * 1e3).toFixed(0)}ms`;
|
|
311
437
|
return `${seconds.toFixed(2)}s`;
|
|
@@ -315,22 +441,22 @@ function KV({
|
|
|
315
441
|
value
|
|
316
442
|
}) {
|
|
317
443
|
if (value === null || value === void 0) return null;
|
|
318
|
-
return /* @__PURE__ */
|
|
319
|
-
/* @__PURE__ */
|
|
320
|
-
/* @__PURE__ */
|
|
444
|
+
return /* @__PURE__ */ jsxs4("div", { className: "detail-kv-row", children: [
|
|
445
|
+
/* @__PURE__ */ jsx4("span", { className: "detail-kv-key", children: label }),
|
|
446
|
+
/* @__PURE__ */ jsx4("span", { className: "detail-kv-value", children: String(value) })
|
|
321
447
|
] });
|
|
322
448
|
}
|
|
323
449
|
function PromptBlock({ label, text }) {
|
|
324
450
|
if (!text) return null;
|
|
325
|
-
return /* @__PURE__ */
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
/* @__PURE__ */
|
|
451
|
+
return /* @__PURE__ */ jsxs4("div", { children: [
|
|
452
|
+
/* @__PURE__ */ jsx4("div", { className: "detail-section-label", children: label }),
|
|
453
|
+
/* @__PURE__ */ jsx4("div", { className: "detail-prompt-block", children: text })
|
|
328
454
|
] });
|
|
329
455
|
}
|
|
330
|
-
var EXPAND_ICON = /* @__PURE__ */
|
|
331
|
-
var COLLAPSE_ICON = /* @__PURE__ */
|
|
332
|
-
var COPY_ICON = /* @__PURE__ */
|
|
333
|
-
var CHECK_ICON = /* @__PURE__ */
|
|
456
|
+
var EXPAND_ICON = /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", width: "10", height: "10", fill: "currentColor", children: /* @__PURE__ */ jsx4("path", { d: "M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z" }) });
|
|
457
|
+
var COLLAPSE_ICON = /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", width: "10", height: "10", fill: "currentColor", children: /* @__PURE__ */ jsx4("path", { d: "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z" }) });
|
|
458
|
+
var COPY_ICON = /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", width: "10", height: "10", fill: "currentColor", children: /* @__PURE__ */ jsx4("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" }) });
|
|
459
|
+
var CHECK_ICON = /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", width: "10", height: "10", fill: "currentColor", children: /* @__PURE__ */ jsx4("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }) });
|
|
334
460
|
var promptActionStyle = {
|
|
335
461
|
all: "unset",
|
|
336
462
|
cursor: "pointer",
|
|
@@ -366,15 +492,15 @@ function PromptToggle({
|
|
|
366
492
|
}).catch(() => {
|
|
367
493
|
});
|
|
368
494
|
}
|
|
369
|
-
return /* @__PURE__ */
|
|
370
|
-
/* @__PURE__ */
|
|
495
|
+
return /* @__PURE__ */ jsxs4("div", { children: [
|
|
496
|
+
/* @__PURE__ */ jsxs4(
|
|
371
497
|
"div",
|
|
372
498
|
{
|
|
373
499
|
style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 4 },
|
|
374
500
|
children: [
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
/* @__PURE__ */
|
|
377
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ jsx4("div", { className: "detail-section-label", style: { marginBottom: 0 }, children: label }),
|
|
502
|
+
/* @__PURE__ */ jsxs4("div", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
503
|
+
/* @__PURE__ */ jsx4(
|
|
378
504
|
"button",
|
|
379
505
|
{
|
|
380
506
|
onClick: () => setExpanded((prev) => !prev),
|
|
@@ -384,7 +510,7 @@ function PromptToggle({
|
|
|
384
510
|
children: expanded ? COLLAPSE_ICON : EXPAND_ICON
|
|
385
511
|
}
|
|
386
512
|
),
|
|
387
|
-
/* @__PURE__ */
|
|
513
|
+
/* @__PURE__ */ jsx4(
|
|
388
514
|
"button",
|
|
389
515
|
{
|
|
390
516
|
onClick: handleCopy,
|
|
@@ -396,8 +522,8 @@ function PromptToggle({
|
|
|
396
522
|
children: copied ? CHECK_ICON : COPY_ICON
|
|
397
523
|
}
|
|
398
524
|
),
|
|
399
|
-
canToggle && /* @__PURE__ */
|
|
400
|
-
/* @__PURE__ */
|
|
525
|
+
canToggle && /* @__PURE__ */ jsxs4("button", { onClick: () => setShowTemplate((prev) => !prev), style: promptActionStyle, children: [
|
|
526
|
+
/* @__PURE__ */ jsx4(
|
|
401
527
|
"span",
|
|
402
528
|
{
|
|
403
529
|
style: {
|
|
@@ -409,7 +535,7 @@ function PromptToggle({
|
|
|
409
535
|
display: "inline-block",
|
|
410
536
|
transition: "background 0.15s"
|
|
411
537
|
},
|
|
412
|
-
children: /* @__PURE__ */
|
|
538
|
+
children: /* @__PURE__ */ jsx4(
|
|
413
539
|
"span",
|
|
414
540
|
{
|
|
415
541
|
style: {
|
|
@@ -432,7 +558,7 @@ function PromptToggle({
|
|
|
432
558
|
]
|
|
433
559
|
}
|
|
434
560
|
),
|
|
435
|
-
/* @__PURE__ */
|
|
561
|
+
/* @__PURE__ */ jsx4(
|
|
436
562
|
"div",
|
|
437
563
|
{
|
|
438
564
|
className: `detail-prompt-block ${expanded ? "detail-prompt-block--expanded" : "detail-prompt-block--collapsed"}`,
|
|
@@ -478,9 +604,9 @@ function ModelRows({
|
|
|
478
604
|
}
|
|
479
605
|
const chain = [...requested, ...ranRungs];
|
|
480
606
|
if (chain.length === 0) return null;
|
|
481
|
-
return /* @__PURE__ */
|
|
482
|
-
/* @__PURE__ */
|
|
483
|
-
/* @__PURE__ */
|
|
607
|
+
return /* @__PURE__ */ jsxs4("div", { className: "detail-kv-row", children: [
|
|
608
|
+
/* @__PURE__ */ jsx4("span", { className: "detail-kv-key", children: label }),
|
|
609
|
+
/* @__PURE__ */ jsx4("span", { className: "detail-kv-value detail-model-value", children: chain.map((rung, index) => /* @__PURE__ */ jsx4("span", { className: index === 0 ? void 0 : "detail-model-resolved", children: rung.text }, rung.key)) })
|
|
484
610
|
] });
|
|
485
611
|
}
|
|
486
612
|
var MODEL_TYPE_LABELS = {
|
|
@@ -538,7 +664,7 @@ function hasRealTokenCounts(scoped) {
|
|
|
538
664
|
}
|
|
539
665
|
|
|
540
666
|
// src/graph/react/detail/sections/UsageSection.tsx
|
|
541
|
-
import { jsx as
|
|
667
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
542
668
|
function usageHeadlineScope(usage, isController) {
|
|
543
669
|
return scopeUsage(usage, isController ? "subtree" : "own");
|
|
544
670
|
}
|
|
@@ -558,7 +684,7 @@ function costTitle(scoped, isController) {
|
|
|
558
684
|
return `${scopeWord}: ${scoped.inferenceCalls} inference call(s). Click for the breakdown.`;
|
|
559
685
|
}
|
|
560
686
|
function Chevron({ open }) {
|
|
561
|
-
return /* @__PURE__ */
|
|
687
|
+
return /* @__PURE__ */ jsx5(
|
|
562
688
|
"svg",
|
|
563
689
|
{
|
|
564
690
|
className: `detail-usage-chevron ${open ? "detail-usage-chevron--open" : ""}`,
|
|
@@ -571,7 +697,7 @@ function Chevron({ open }) {
|
|
|
571
697
|
strokeLinecap: "round",
|
|
572
698
|
strokeLinejoin: "round",
|
|
573
699
|
"aria-hidden": "true",
|
|
574
|
-
children: /* @__PURE__ */
|
|
700
|
+
children: /* @__PURE__ */ jsx5("polyline", { points: "6 9 12 15 18 9" })
|
|
575
701
|
}
|
|
576
702
|
);
|
|
577
703
|
}
|
|
@@ -584,7 +710,7 @@ function UsageCostInline({
|
|
|
584
710
|
const scoped = usageHeadlineScope(usage, isController);
|
|
585
711
|
const text = costText(scoped);
|
|
586
712
|
if (text === null) return null;
|
|
587
|
-
return /* @__PURE__ */
|
|
713
|
+
return /* @__PURE__ */ jsxs5(
|
|
588
714
|
"button",
|
|
589
715
|
{
|
|
590
716
|
type: "button",
|
|
@@ -593,8 +719,8 @@ function UsageCostInline({
|
|
|
593
719
|
onClick: onToggle,
|
|
594
720
|
title: costTitle(scoped, isController),
|
|
595
721
|
children: [
|
|
596
|
-
/* @__PURE__ */
|
|
597
|
-
/* @__PURE__ */
|
|
722
|
+
/* @__PURE__ */ jsx5("span", { className: "detail-usage-value", children: text }),
|
|
723
|
+
/* @__PURE__ */ jsx5(Chevron, { open: expanded })
|
|
598
724
|
]
|
|
599
725
|
}
|
|
600
726
|
);
|
|
@@ -609,17 +735,17 @@ function UsageColumn({ scoped, label }) {
|
|
|
609
735
|
const isPriced = scoped.cost !== null;
|
|
610
736
|
const nbTokensInput = (_a = scoped.nbTokensByCategory.input) != null ? _a : 0;
|
|
611
737
|
const nbTokensOutput = (_b = scoped.nbTokensByCategory.output) != null ? _b : 0;
|
|
612
|
-
return /* @__PURE__ */
|
|
613
|
-
/* @__PURE__ */
|
|
614
|
-
/* @__PURE__ */
|
|
615
|
-
/* @__PURE__ */
|
|
616
|
-
showsTokens && /* @__PURE__ */
|
|
617
|
-
isPriced && scoped.costInput !== null && /* @__PURE__ */
|
|
618
|
-
showsTokens && /* @__PURE__ */
|
|
619
|
-
isPriced && scoped.costOutput !== null && /* @__PURE__ */
|
|
620
|
-
showsTokens && /* @__PURE__ */
|
|
621
|
-
/* @__PURE__ */
|
|
622
|
-
showsTokens && extraCategories(scoped.nbTokensByCategory).map(([category, nbTokens]) => /* @__PURE__ */
|
|
738
|
+
return /* @__PURE__ */ jsxs5("div", { children: [
|
|
739
|
+
/* @__PURE__ */ jsx5("div", { className: "detail-section-label", children: label }),
|
|
740
|
+
/* @__PURE__ */ jsx5(KV, { label: "inference calls", value: scoped.inferenceCalls }),
|
|
741
|
+
/* @__PURE__ */ jsx5(KV, { label: "priced calls", value: scoped.ratedInferenceCalls }),
|
|
742
|
+
showsTokens && /* @__PURE__ */ jsx5(KV, { label: "input tokens", value: nbTokensInput.toLocaleString() }),
|
|
743
|
+
isPriced && scoped.costInput !== null && /* @__PURE__ */ jsx5(KV, { label: "input cost", value: formatCost(scoped.costInput) }),
|
|
744
|
+
showsTokens && /* @__PURE__ */ jsx5(KV, { label: "output tokens", value: nbTokensOutput.toLocaleString() }),
|
|
745
|
+
isPriced && scoped.costOutput !== null && /* @__PURE__ */ jsx5(KV, { label: "output cost", value: formatCost(scoped.costOutput) }),
|
|
746
|
+
showsTokens && /* @__PURE__ */ jsx5(KV, { label: "total tokens", value: scoped.totalTokens.toLocaleString() }),
|
|
747
|
+
/* @__PURE__ */ jsx5(KV, { label: "total cost", value: isPriced ? formatCost((_c = scoped.cost) != null ? _c : 0) : "not priced" }),
|
|
748
|
+
showsTokens && extraCategories(scoped.nbTokensByCategory).map(([category, nbTokens]) => /* @__PURE__ */ jsx5(KV, { label: `tokens \xB7 ${category}`, value: nbTokens.toLocaleString() }, category))
|
|
623
749
|
] });
|
|
624
750
|
}
|
|
625
751
|
function UsageDetails({
|
|
@@ -629,14 +755,14 @@ function UsageDetails({
|
|
|
629
755
|
const own = scopeUsage(usage, "own");
|
|
630
756
|
const subtree = scopeUsage(usage, "subtree");
|
|
631
757
|
const showsSubtree = isController || subtree.inferenceCalls !== own.inferenceCalls;
|
|
632
|
-
return /* @__PURE__ */
|
|
633
|
-
/* @__PURE__ */
|
|
634
|
-
showsSubtree && /* @__PURE__ */
|
|
758
|
+
return /* @__PURE__ */ jsxs5("div", { className: "detail-usage-details", children: [
|
|
759
|
+
/* @__PURE__ */ jsx5(UsageColumn, { scoped: own, label: isController ? "This pipe itself" : "Usage" }),
|
|
760
|
+
showsSubtree && /* @__PURE__ */ jsx5(UsageColumn, { scoped: subtree, label: "This pipe and everything below it" })
|
|
635
761
|
] });
|
|
636
762
|
}
|
|
637
763
|
|
|
638
764
|
// src/graph/react/detail/sections/PipeLLMDetail.tsx
|
|
639
|
-
import { Fragment, jsx as
|
|
765
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
640
766
|
function PipeLLMSection({
|
|
641
767
|
blueprint,
|
|
642
768
|
executionData,
|
|
@@ -660,9 +786,9 @@ function PipeLLMSection({
|
|
|
660
786
|
const hasDistinctObjectRequest = Boolean(
|
|
661
787
|
authoredModelForObject && authoredModelForObject !== authoredModel
|
|
662
788
|
);
|
|
663
|
-
return /* @__PURE__ */
|
|
664
|
-
/* @__PURE__ */
|
|
665
|
-
hasDistinctObjectRequest && /* @__PURE__ */
|
|
789
|
+
return /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
790
|
+
/* @__PURE__ */ jsx6(ModelRows, { modelsRan, authored: authoredModel, handle: resolvedModel }),
|
|
791
|
+
hasDistinctObjectRequest && /* @__PURE__ */ jsx6(
|
|
666
792
|
ModelRows,
|
|
667
793
|
{
|
|
668
794
|
authored: authoredModelForObject,
|
|
@@ -670,33 +796,33 @@ function PipeLLMSection({
|
|
|
670
796
|
label: "Model (object)"
|
|
671
797
|
}
|
|
672
798
|
),
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
-
/* @__PURE__ */
|
|
675
|
-
/* @__PURE__ */
|
|
676
|
-
/* @__PURE__ */
|
|
677
|
-
hasImageRefs && /* @__PURE__ */
|
|
678
|
-
hasDocRefs && /* @__PURE__ */
|
|
799
|
+
/* @__PURE__ */ jsx6(KV, { label: "Structuring", value: structuringPath || blueprint.structuring_method }),
|
|
800
|
+
/* @__PURE__ */ jsx6(KV, { label: "Multiple Output", value: isMultipleOutput }),
|
|
801
|
+
/* @__PURE__ */ jsx6(KV, { label: "Output Multiplicity", value: blueprint.output_multiplicity }),
|
|
802
|
+
/* @__PURE__ */ jsx6(KV, { label: "Prompt Category", value: (_c = spec.prompt_blueprint) == null ? void 0 : _c.category }),
|
|
803
|
+
hasImageRefs && /* @__PURE__ */ jsx6(KV, { label: "User Image Refs", value: `${spec.user_image_references.length} references` }),
|
|
804
|
+
hasDocRefs && /* @__PURE__ */ jsx6(
|
|
679
805
|
KV,
|
|
680
806
|
{
|
|
681
807
|
label: "User Document Refs",
|
|
682
808
|
value: `${spec.user_document_references.length} references`
|
|
683
809
|
}
|
|
684
810
|
),
|
|
685
|
-
hasSysImageRefs && /* @__PURE__ */
|
|
811
|
+
hasSysImageRefs && /* @__PURE__ */ jsx6(
|
|
686
812
|
KV,
|
|
687
813
|
{
|
|
688
814
|
label: "System Image Refs",
|
|
689
815
|
value: `${spec.system_image_references.length} references`
|
|
690
816
|
}
|
|
691
817
|
),
|
|
692
|
-
hasSysDocRefs && /* @__PURE__ */
|
|
818
|
+
hasSysDocRefs && /* @__PURE__ */ jsx6(
|
|
693
819
|
KV,
|
|
694
820
|
{
|
|
695
821
|
label: "System Document Refs",
|
|
696
822
|
value: `${spec.system_document_references.length} references`
|
|
697
823
|
}
|
|
698
824
|
),
|
|
699
|
-
/* @__PURE__ */
|
|
825
|
+
/* @__PURE__ */ jsx6(
|
|
700
826
|
PromptToggle,
|
|
701
827
|
{
|
|
702
828
|
label: "System Prompt",
|
|
@@ -704,7 +830,7 @@ function PipeLLMSection({
|
|
|
704
830
|
renderedText: renderedSystem
|
|
705
831
|
}
|
|
706
832
|
),
|
|
707
|
-
/* @__PURE__ */
|
|
833
|
+
/* @__PURE__ */ jsx6(
|
|
708
834
|
PromptToggle,
|
|
709
835
|
{
|
|
710
836
|
label: "Prompt",
|
|
@@ -716,7 +842,7 @@ function PipeLLMSection({
|
|
|
716
842
|
}
|
|
717
843
|
|
|
718
844
|
// src/graph/react/detail/sections/PipeImgGenDetail.tsx
|
|
719
|
-
import { Fragment as
|
|
845
|
+
import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
720
846
|
function PipeImgGenSection({
|
|
721
847
|
blueprint,
|
|
722
848
|
executionData,
|
|
@@ -728,9 +854,9 @@ function PipeImgGenSection({
|
|
|
728
854
|
const resolvedModel = modelHandles == null ? void 0 : modelHandles.resolved_model;
|
|
729
855
|
const renderedPrompt = executionData == null ? void 0 : executionData.rendered_prompt;
|
|
730
856
|
const renderedNegative = executionData == null ? void 0 : executionData.rendered_negative_prompt;
|
|
731
|
-
return /* @__PURE__ */
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
-
/* @__PURE__ */
|
|
857
|
+
return /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
858
|
+
/* @__PURE__ */ jsx7(ModelRows, { modelsRan, authored: blueprint.img_gen_choice, handle: resolvedModel }),
|
|
859
|
+
/* @__PURE__ */ jsx7(
|
|
734
860
|
PromptToggle,
|
|
735
861
|
{
|
|
736
862
|
label: "Prompt",
|
|
@@ -738,7 +864,7 @@ function PipeImgGenSection({
|
|
|
738
864
|
renderedText: renderedPrompt
|
|
739
865
|
}
|
|
740
866
|
),
|
|
741
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ jsx7(
|
|
742
868
|
PromptToggle,
|
|
743
869
|
{
|
|
744
870
|
label: "Negative Prompt",
|
|
@@ -746,12 +872,12 @@ function PipeImgGenSection({
|
|
|
746
872
|
renderedText: renderedNegative
|
|
747
873
|
}
|
|
748
874
|
),
|
|
749
|
-
/* @__PURE__ */
|
|
750
|
-
/* @__PURE__ */
|
|
751
|
-
/* @__PURE__ */
|
|
752
|
-
/* @__PURE__ */
|
|
753
|
-
/* @__PURE__ */
|
|
754
|
-
/* @__PURE__ */
|
|
875
|
+
/* @__PURE__ */ jsx7(KV, { label: "Aspect Ratio", value: blueprint.aspect_ratio }),
|
|
876
|
+
/* @__PURE__ */ jsx7(KV, { label: "Output Format", value: blueprint.output_format }),
|
|
877
|
+
/* @__PURE__ */ jsx7(KV, { label: "Background", value: blueprint.background }),
|
|
878
|
+
/* @__PURE__ */ jsx7(KV, { label: "Is Raw", value: blueprint.is_raw }),
|
|
879
|
+
/* @__PURE__ */ jsx7(KV, { label: "Seed", value: blueprint.seed }),
|
|
880
|
+
/* @__PURE__ */ jsx7(
|
|
755
881
|
KV,
|
|
756
882
|
{
|
|
757
883
|
label: "Images",
|
|
@@ -762,28 +888,28 @@ function PipeImgGenSection({
|
|
|
762
888
|
}
|
|
763
889
|
|
|
764
890
|
// src/graph/react/detail/sections/PipeExtractDetail.tsx
|
|
765
|
-
import { Fragment as
|
|
891
|
+
import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
766
892
|
function PipeExtractSection({
|
|
767
893
|
blueprint,
|
|
768
894
|
modelsRan,
|
|
769
895
|
modelHandles
|
|
770
896
|
}) {
|
|
771
897
|
const resolvedModel = modelHandles == null ? void 0 : modelHandles.resolved_model;
|
|
772
|
-
return /* @__PURE__ */
|
|
773
|
-
/* @__PURE__ */
|
|
774
|
-
/* @__PURE__ */
|
|
775
|
-
/* @__PURE__ */
|
|
776
|
-
/* @__PURE__ */
|
|
777
|
-
/* @__PURE__ */
|
|
778
|
-
/* @__PURE__ */
|
|
779
|
-
/* @__PURE__ */
|
|
780
|
-
/* @__PURE__ */
|
|
781
|
-
/* @__PURE__ */
|
|
898
|
+
return /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
899
|
+
/* @__PURE__ */ jsx8(ModelRows, { modelsRan, authored: blueprint.extract_choice, handle: resolvedModel }),
|
|
900
|
+
/* @__PURE__ */ jsx8(KV, { label: "Document Variable", value: blueprint.document_stuff_name }),
|
|
901
|
+
/* @__PURE__ */ jsx8(KV, { label: "Caption Images", value: blueprint.should_caption_images }),
|
|
902
|
+
/* @__PURE__ */ jsx8(KV, { label: "Max Page Images", value: blueprint.max_page_images }),
|
|
903
|
+
/* @__PURE__ */ jsx8(KV, { label: "Include Page Views", value: blueprint.should_include_page_views }),
|
|
904
|
+
/* @__PURE__ */ jsx8(KV, { label: "Page Views DPI", value: blueprint.page_views_dpi }),
|
|
905
|
+
/* @__PURE__ */ jsx8(KV, { label: "Render JS", value: blueprint.render_js }),
|
|
906
|
+
/* @__PURE__ */ jsx8(KV, { label: "Include Raw HTML", value: blueprint.include_raw_html }),
|
|
907
|
+
/* @__PURE__ */ jsx8(KV, { label: "Image Variable", value: blueprint.image_stuff_name })
|
|
782
908
|
] });
|
|
783
909
|
}
|
|
784
910
|
|
|
785
911
|
// src/graph/react/detail/sections/PipeSearchDetail.tsx
|
|
786
|
-
import { Fragment as
|
|
912
|
+
import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
787
913
|
function PipeSearchSection({
|
|
788
914
|
blueprint,
|
|
789
915
|
executionData,
|
|
@@ -792,9 +918,9 @@ function PipeSearchSection({
|
|
|
792
918
|
}) {
|
|
793
919
|
const resolvedModel = modelHandles == null ? void 0 : modelHandles.resolved_model;
|
|
794
920
|
const renderedQuery = executionData == null ? void 0 : executionData.rendered_query;
|
|
795
|
-
return /* @__PURE__ */
|
|
796
|
-
/* @__PURE__ */
|
|
797
|
-
/* @__PURE__ */
|
|
921
|
+
return /* @__PURE__ */ jsxs9(Fragment5, { children: [
|
|
922
|
+
/* @__PURE__ */ jsx9(ModelRows, { modelsRan, authored: blueprint.search_choice, handle: resolvedModel }),
|
|
923
|
+
/* @__PURE__ */ jsx9(
|
|
798
924
|
PromptToggle,
|
|
799
925
|
{
|
|
800
926
|
label: "Search Query",
|
|
@@ -802,13 +928,13 @@ function PipeSearchSection({
|
|
|
802
928
|
renderedText: renderedQuery
|
|
803
929
|
}
|
|
804
930
|
),
|
|
805
|
-
/* @__PURE__ */
|
|
806
|
-
/* @__PURE__ */
|
|
807
|
-
/* @__PURE__ */
|
|
808
|
-
/* @__PURE__ */
|
|
809
|
-
/* @__PURE__ */
|
|
810
|
-
blueprint.include_domains && blueprint.include_domains.length > 0 && /* @__PURE__ */
|
|
811
|
-
blueprint.exclude_domains && blueprint.exclude_domains.length > 0 && /* @__PURE__ */
|
|
931
|
+
/* @__PURE__ */ jsx9(KV, { label: "Max Results", value: blueprint.max_results_override }),
|
|
932
|
+
/* @__PURE__ */ jsx9(KV, { label: "Include Images", value: blueprint.include_images_override }),
|
|
933
|
+
/* @__PURE__ */ jsx9(KV, { label: "Structured Output", value: blueprint.is_structured_output }),
|
|
934
|
+
/* @__PURE__ */ jsx9(KV, { label: "From Date", value: blueprint.from_date }),
|
|
935
|
+
/* @__PURE__ */ jsx9(KV, { label: "To Date", value: blueprint.to_date }),
|
|
936
|
+
blueprint.include_domains && blueprint.include_domains.length > 0 && /* @__PURE__ */ jsx9(KV, { label: "Include Domains", value: blueprint.include_domains.join(", ") }),
|
|
937
|
+
blueprint.exclude_domains && blueprint.exclude_domains.length > 0 && /* @__PURE__ */ jsx9(KV, { label: "Exclude Domains", value: blueprint.exclude_domains.join(", ") })
|
|
812
938
|
] });
|
|
813
939
|
}
|
|
814
940
|
|
|
@@ -831,7 +957,7 @@ function labelFromLlmChoice(choice) {
|
|
|
831
957
|
}
|
|
832
958
|
|
|
833
959
|
// src/graph/react/detail/sections/PipeStructureDetail.tsx
|
|
834
|
-
import { Fragment as
|
|
960
|
+
import { Fragment as Fragment6, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
835
961
|
function PipeStructureSection({
|
|
836
962
|
blueprint,
|
|
837
963
|
executionData,
|
|
@@ -842,17 +968,17 @@ function PipeStructureSection({
|
|
|
842
968
|
const isMultipleOutput = executionData == null ? void 0 : executionData.is_multiple_output;
|
|
843
969
|
const renderedUser = executionData == null ? void 0 : executionData.rendered_user_prompt;
|
|
844
970
|
const authoredModel = labelFromLlmChoice(blueprint.llm_choice);
|
|
845
|
-
return /* @__PURE__ */
|
|
846
|
-
/* @__PURE__ */
|
|
847
|
-
/* @__PURE__ */
|
|
848
|
-
/* @__PURE__ */
|
|
849
|
-
/* @__PURE__ */
|
|
850
|
-
/* @__PURE__ */
|
|
971
|
+
return /* @__PURE__ */ jsxs10(Fragment6, { children: [
|
|
972
|
+
/* @__PURE__ */ jsx10(ModelRows, { modelsRan, authored: authoredModel, handle: resolvedModel }),
|
|
973
|
+
/* @__PURE__ */ jsx10(KV, { label: "Text Variable", value: blueprint.text_input_name }),
|
|
974
|
+
/* @__PURE__ */ jsx10(KV, { label: "Multiple Output", value: isMultipleOutput }),
|
|
975
|
+
/* @__PURE__ */ jsx10(KV, { label: "Output Multiplicity", value: blueprint.output_multiplicity }),
|
|
976
|
+
/* @__PURE__ */ jsx10(PromptToggle, { label: "Prompt", templateText: void 0, renderedText: renderedUser })
|
|
851
977
|
] });
|
|
852
978
|
}
|
|
853
979
|
|
|
854
980
|
// src/graph/react/detail/sections/PipeComposeDetail.tsx
|
|
855
|
-
import { Fragment as
|
|
981
|
+
import { Fragment as Fragment7, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
856
982
|
function formatLeafField(field) {
|
|
857
983
|
var _a, _b;
|
|
858
984
|
switch (field.method) {
|
|
@@ -873,9 +999,9 @@ function isLongValue(text) {
|
|
|
873
999
|
return text.length > LONG_VALUE_THRESHOLD_CHARS || text.includes("\n");
|
|
874
1000
|
}
|
|
875
1001
|
function FieldBlock({ label, value }) {
|
|
876
|
-
return /* @__PURE__ */
|
|
877
|
-
/* @__PURE__ */
|
|
878
|
-
/* @__PURE__ */
|
|
1002
|
+
return /* @__PURE__ */ jsxs11("div", { className: "detail-field-block", children: [
|
|
1003
|
+
/* @__PURE__ */ jsx11("div", { className: "detail-field-block-label", children: label }),
|
|
1004
|
+
/* @__PURE__ */ jsx11("div", { className: "detail-field-block-value", children: value })
|
|
879
1005
|
] });
|
|
880
1006
|
}
|
|
881
1007
|
function ConstructFieldsBlock({
|
|
@@ -896,18 +1022,18 @@ function ConstructFieldsBlock({
|
|
|
896
1022
|
}
|
|
897
1023
|
}
|
|
898
1024
|
const indentStyle = depth > 0 ? { paddingLeft: depth * 12 } : void 0;
|
|
899
|
-
return /* @__PURE__ */
|
|
1025
|
+
return /* @__PURE__ */ jsxs11(Fragment7, { children: [
|
|
900
1026
|
leafFields.map(([name, field]) => {
|
|
901
1027
|
const display = formatLeafField(field);
|
|
902
1028
|
if (isLongValue(display)) {
|
|
903
|
-
return /* @__PURE__ */
|
|
1029
|
+
return /* @__PURE__ */ jsx11("div", { style: indentStyle, children: /* @__PURE__ */ jsx11(FieldBlock, { label: name, value: display }) }, name);
|
|
904
1030
|
}
|
|
905
|
-
return /* @__PURE__ */
|
|
1031
|
+
return /* @__PURE__ */ jsx11("div", { style: indentStyle, children: /* @__PURE__ */ jsx11(KV, { label: name, value: display }) }, name);
|
|
906
1032
|
}),
|
|
907
1033
|
templateFields.map(([name, field]) => {
|
|
908
1034
|
var _a, _b;
|
|
909
1035
|
const renderedForField = (_a = fieldResolutions == null ? void 0 : fieldResolutions[name]) == null ? void 0 : _a.rendered;
|
|
910
|
-
return /* @__PURE__ */
|
|
1036
|
+
return /* @__PURE__ */ jsx11("div", { style: indentStyle, children: /* @__PURE__ */ jsx11(
|
|
911
1037
|
PromptToggle,
|
|
912
1038
|
{
|
|
913
1039
|
label: `Template \u2014 ${name}`,
|
|
@@ -918,15 +1044,15 @@ function ConstructFieldsBlock({
|
|
|
918
1044
|
}),
|
|
919
1045
|
nestedFields.map(([name, field]) => {
|
|
920
1046
|
if (!field.nested) return null;
|
|
921
|
-
return /* @__PURE__ */
|
|
922
|
-
/* @__PURE__ */
|
|
1047
|
+
return /* @__PURE__ */ jsxs11("div", { children: [
|
|
1048
|
+
/* @__PURE__ */ jsxs11(
|
|
923
1049
|
"div",
|
|
924
1050
|
{
|
|
925
1051
|
className: "detail-nested-header",
|
|
926
1052
|
style: depth > 0 ? { paddingLeft: depth * 12 } : void 0,
|
|
927
1053
|
children: [
|
|
928
|
-
/* @__PURE__ */
|
|
929
|
-
/* @__PURE__ */
|
|
1054
|
+
/* @__PURE__ */ jsx11("span", { className: "detail-nested-header-name", children: name }),
|
|
1055
|
+
/* @__PURE__ */ jsxs11("span", { className: "detail-nested-header-meta", children: [
|
|
930
1056
|
"nested \xB7 ",
|
|
931
1057
|
Object.keys(field.nested.fields).length,
|
|
932
1058
|
" field",
|
|
@@ -935,7 +1061,7 @@ function ConstructFieldsBlock({
|
|
|
935
1061
|
]
|
|
936
1062
|
}
|
|
937
1063
|
),
|
|
938
|
-
/* @__PURE__ */
|
|
1064
|
+
/* @__PURE__ */ jsx11(
|
|
939
1065
|
ConstructFieldsBlock,
|
|
940
1066
|
{
|
|
941
1067
|
blueprint: field.nested,
|
|
@@ -957,11 +1083,11 @@ function PipeComposeSection({
|
|
|
957
1083
|
const fieldResolutions = (_a = executionData == null ? void 0 : executionData.fields) != null ? _a : null;
|
|
958
1084
|
const constructBlueprint = blueprint.construct_blueprint;
|
|
959
1085
|
const hasConstruct = constructBlueprint != null && Object.keys(constructBlueprint.fields).length > 0;
|
|
960
|
-
return /* @__PURE__ */
|
|
961
|
-
/* @__PURE__ */
|
|
962
|
-
/* @__PURE__ */
|
|
963
|
-
/* @__PURE__ */
|
|
964
|
-
blueprint.template && /* @__PURE__ */
|
|
1086
|
+
return /* @__PURE__ */ jsxs11(Fragment7, { children: [
|
|
1087
|
+
/* @__PURE__ */ jsx11(KV, { label: "Mode", value: composeMode || (hasConstruct ? "construct" : "template") }),
|
|
1088
|
+
/* @__PURE__ */ jsx11(KV, { label: "Category", value: blueprint.category }),
|
|
1089
|
+
/* @__PURE__ */ jsx11(KV, { label: "Templating Style", value: blueprint.templating_style }),
|
|
1090
|
+
blueprint.template && /* @__PURE__ */ jsx11(
|
|
965
1091
|
PromptToggle,
|
|
966
1092
|
{
|
|
967
1093
|
label: "Template",
|
|
@@ -969,9 +1095,9 @@ function PipeComposeSection({
|
|
|
969
1095
|
renderedText
|
|
970
1096
|
}
|
|
971
1097
|
),
|
|
972
|
-
hasConstruct && /* @__PURE__ */
|
|
973
|
-
/* @__PURE__ */
|
|
974
|
-
/* @__PURE__ */
|
|
1098
|
+
hasConstruct && /* @__PURE__ */ jsxs11(Fragment7, { children: [
|
|
1099
|
+
/* @__PURE__ */ jsx11("div", { className: "detail-section-label", children: "FIELDS" }),
|
|
1100
|
+
/* @__PURE__ */ jsx11(
|
|
975
1101
|
ConstructFieldsBlock,
|
|
976
1102
|
{
|
|
977
1103
|
blueprint: constructBlueprint,
|
|
@@ -984,7 +1110,7 @@ function PipeComposeSection({
|
|
|
984
1110
|
}
|
|
985
1111
|
|
|
986
1112
|
// src/graph/react/detail/sections/PipeDocGenDetail.tsx
|
|
987
|
-
import { Fragment as
|
|
1113
|
+
import { Fragment as Fragment8, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
988
1114
|
var DOC_GEN_SOURCE_LABELS = {
|
|
989
1115
|
layout: "auto-layout",
|
|
990
1116
|
html: "HTML template",
|
|
@@ -1011,9 +1137,9 @@ function PipeDocGenSection({
|
|
|
1011
1137
|
const hasEngine = !!authoredEngine || !!resolvedEngine || ((_a = modelsRan == null ? void 0 : modelsRan.length) != null ? _a : 0) > 0;
|
|
1012
1138
|
const source = (_b = nonEmpty(modelHandles == null ? void 0 : modelHandles.source)) != null ? _b : declaredSource(blueprint);
|
|
1013
1139
|
const renderedFilename = nonEmpty(executionData == null ? void 0 : executionData.filename);
|
|
1014
|
-
return /* @__PURE__ */
|
|
1015
|
-
/* @__PURE__ */
|
|
1016
|
-
hasEngine ? /* @__PURE__ */
|
|
1140
|
+
return /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
1141
|
+
/* @__PURE__ */ jsx12(KV, { label: "Format", value: format == null ? void 0 : format.toUpperCase() }),
|
|
1142
|
+
hasEngine ? /* @__PURE__ */ jsx12(
|
|
1017
1143
|
ModelRows,
|
|
1018
1144
|
{
|
|
1019
1145
|
label: "Engine",
|
|
@@ -1021,36 +1147,36 @@ function PipeDocGenSection({
|
|
|
1021
1147
|
authored: authoredEngine,
|
|
1022
1148
|
handle: resolvedEngine
|
|
1023
1149
|
}
|
|
1024
|
-
) : /* @__PURE__ */
|
|
1025
|
-
/* @__PURE__ */
|
|
1026
|
-
/* @__PURE__ */
|
|
1027
|
-
/* @__PURE__ */
|
|
1028
|
-
renderedFilename && renderedFilename !== blueprint.filename && /* @__PURE__ */
|
|
1029
|
-
blueprint.template && /* @__PURE__ */
|
|
1150
|
+
) : /* @__PURE__ */ jsx12(KV, { label: "Engine", value: "deck default" }),
|
|
1151
|
+
/* @__PURE__ */ jsx12(KV, { label: "Source", value: (_c = DOC_GEN_SOURCE_LABELS[source]) != null ? _c : source }),
|
|
1152
|
+
/* @__PURE__ */ jsx12(KV, { label: "Template File", value: blueprint.template_file }),
|
|
1153
|
+
/* @__PURE__ */ jsx12(KV, { label: "File Name", value: blueprint.filename }),
|
|
1154
|
+
renderedFilename && renderedFilename !== blueprint.filename && /* @__PURE__ */ jsx12(KV, { label: "Stored As", value: renderedFilename }),
|
|
1155
|
+
blueprint.template && /* @__PURE__ */ jsx12(PromptToggle, { label: "Template", templateText: blueprint.template, renderedText: null })
|
|
1030
1156
|
] });
|
|
1031
1157
|
}
|
|
1032
1158
|
|
|
1033
1159
|
// src/graph/react/detail/sections/PipeConditionDetail.tsx
|
|
1034
|
-
import { Fragment as
|
|
1160
|
+
import { Fragment as Fragment9, jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1035
1161
|
function PipeConditionSection({
|
|
1036
1162
|
blueprint,
|
|
1037
1163
|
executionData
|
|
1038
1164
|
}) {
|
|
1039
1165
|
const evaluatedExpression = executionData == null ? void 0 : executionData.evaluated_expression;
|
|
1040
1166
|
const selectedOutcome = executionData == null ? void 0 : executionData.selected_outcome;
|
|
1041
|
-
return /* @__PURE__ */
|
|
1042
|
-
/* @__PURE__ */
|
|
1043
|
-
evaluatedExpression && /* @__PURE__ */
|
|
1044
|
-
/* @__PURE__ */
|
|
1045
|
-
/* @__PURE__ */
|
|
1046
|
-
Object.entries(blueprint.outcome_map).map(([outcome, pipeCode]) => /* @__PURE__ */
|
|
1167
|
+
return /* @__PURE__ */ jsxs13(Fragment9, { children: [
|
|
1168
|
+
/* @__PURE__ */ jsx13(PromptBlock, { label: "Expression", text: blueprint.expression }),
|
|
1169
|
+
evaluatedExpression && /* @__PURE__ */ jsx13(KV, { label: "Expression Result", value: evaluatedExpression }),
|
|
1170
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
1171
|
+
/* @__PURE__ */ jsx13("div", { className: "detail-section-label", children: "Outcomes" }),
|
|
1172
|
+
Object.entries(blueprint.outcome_map).map(([outcome, pipeCode]) => /* @__PURE__ */ jsxs13(
|
|
1047
1173
|
"div",
|
|
1048
1174
|
{
|
|
1049
1175
|
className: "detail-kv-row",
|
|
1050
1176
|
style: selectedOutcome === pipeCode ? { background: "rgba(80,250,123,0.08)" } : void 0,
|
|
1051
1177
|
children: [
|
|
1052
|
-
/* @__PURE__ */
|
|
1053
|
-
/* @__PURE__ */
|
|
1178
|
+
/* @__PURE__ */ jsx13("span", { className: "detail-kv-key", children: outcome }),
|
|
1179
|
+
/* @__PURE__ */ jsx13(
|
|
1054
1180
|
"span",
|
|
1055
1181
|
{
|
|
1056
1182
|
className: "detail-kv-value",
|
|
@@ -1062,32 +1188,32 @@ function PipeConditionSection({
|
|
|
1062
1188
|
},
|
|
1063
1189
|
outcome
|
|
1064
1190
|
)),
|
|
1065
|
-
/* @__PURE__ */
|
|
1066
|
-
/* @__PURE__ */
|
|
1067
|
-
/* @__PURE__ */
|
|
1191
|
+
/* @__PURE__ */ jsxs13("div", { className: "detail-kv-row", children: [
|
|
1192
|
+
/* @__PURE__ */ jsx13("span", { className: "detail-kv-key", children: "default" }),
|
|
1193
|
+
/* @__PURE__ */ jsx13("span", { className: "detail-kv-value", children: blueprint.default_outcome })
|
|
1068
1194
|
] })
|
|
1069
1195
|
] }),
|
|
1070
|
-
/* @__PURE__ */
|
|
1196
|
+
/* @__PURE__ */ jsx13(KV, { label: "Alias Expression To", value: blueprint.add_alias_from_expression_to })
|
|
1071
1197
|
] });
|
|
1072
1198
|
}
|
|
1073
1199
|
|
|
1074
1200
|
// src/graph/react/detail/sections/PipeSequenceDetail.tsx
|
|
1075
|
-
import { jsx as
|
|
1201
|
+
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1076
1202
|
function PipeSequenceSection({
|
|
1077
1203
|
blueprint
|
|
1078
1204
|
}) {
|
|
1079
|
-
return /* @__PURE__ */
|
|
1080
|
-
/* @__PURE__ */
|
|
1081
|
-
/* @__PURE__ */
|
|
1082
|
-
/* @__PURE__ */
|
|
1205
|
+
return /* @__PURE__ */ jsxs14("div", { children: [
|
|
1206
|
+
/* @__PURE__ */ jsx14("div", { className: "detail-section-label", children: "Steps" }),
|
|
1207
|
+
/* @__PURE__ */ jsx14("div", { className: "detail-steps-list", children: blueprint.sequential_sub_pipes.map((step, idx) => /* @__PURE__ */ jsxs14("div", { className: "detail-step-item", children: [
|
|
1208
|
+
/* @__PURE__ */ jsx14("span", { className: "detail-step-index", children: idx + 1 }),
|
|
1083
1209
|
isBindingStepSpec(step) ? (
|
|
1084
1210
|
// A binding step runs no pipe: it names the path it binds.
|
|
1085
|
-
/* @__PURE__ */
|
|
1211
|
+
/* @__PURE__ */ jsxs14("span", { className: "detail-step-code", title: "Binding step", children: [
|
|
1086
1212
|
"from ",
|
|
1087
1213
|
step.from_path
|
|
1088
1214
|
] })
|
|
1089
|
-
) : /* @__PURE__ */
|
|
1090
|
-
step.output_name && /* @__PURE__ */
|
|
1215
|
+
) : /* @__PURE__ */ jsx14("span", { className: "detail-step-code", children: step.pipe_code }),
|
|
1216
|
+
step.output_name && /* @__PURE__ */ jsxs14("span", { className: "detail-io-concept", children: [
|
|
1091
1217
|
"-> ",
|
|
1092
1218
|
step.output_name
|
|
1093
1219
|
] })
|
|
@@ -1096,57 +1222,57 @@ function PipeSequenceSection({
|
|
|
1096
1222
|
}
|
|
1097
1223
|
|
|
1098
1224
|
// src/graph/react/detail/sections/PipeParallelDetail.tsx
|
|
1099
|
-
import { Fragment as
|
|
1225
|
+
import { Fragment as Fragment10, jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1100
1226
|
function PipeParallelSection({
|
|
1101
1227
|
blueprint
|
|
1102
1228
|
}) {
|
|
1103
|
-
return /* @__PURE__ */
|
|
1104
|
-
/* @__PURE__ */
|
|
1105
|
-
/* @__PURE__ */
|
|
1106
|
-
/* @__PURE__ */
|
|
1107
|
-
/* @__PURE__ */
|
|
1108
|
-
branch.output_name && /* @__PURE__ */
|
|
1229
|
+
return /* @__PURE__ */ jsxs15(Fragment10, { children: [
|
|
1230
|
+
/* @__PURE__ */ jsxs15("div", { children: [
|
|
1231
|
+
/* @__PURE__ */ jsx15("div", { className: "detail-section-label", children: "Branches" }),
|
|
1232
|
+
/* @__PURE__ */ jsx15("div", { className: "detail-steps-list", children: blueprint.parallel_sub_pipes.map((branch, idx) => /* @__PURE__ */ jsxs15("div", { className: "detail-step-item", children: [
|
|
1233
|
+
/* @__PURE__ */ jsx15("span", { className: "detail-step-code", children: branch.pipe_code }),
|
|
1234
|
+
branch.output_name && /* @__PURE__ */ jsxs15("span", { className: "detail-io-concept", children: [
|
|
1109
1235
|
"-> ",
|
|
1110
1236
|
branch.output_name
|
|
1111
1237
|
] })
|
|
1112
1238
|
] }, idx)) })
|
|
1113
1239
|
] }),
|
|
1114
|
-
/* @__PURE__ */
|
|
1115
|
-
/* @__PURE__ */
|
|
1240
|
+
/* @__PURE__ */ jsx15(KV, { label: "Add Each Output", value: blueprint.add_each_output }),
|
|
1241
|
+
/* @__PURE__ */ jsx15(KV, { label: "Combined Output", value: blueprint.combined_output })
|
|
1116
1242
|
] });
|
|
1117
1243
|
}
|
|
1118
1244
|
|
|
1119
1245
|
// src/graph/react/detail/sections/PipeBatchDetail.tsx
|
|
1120
|
-
import { Fragment as
|
|
1246
|
+
import { Fragment as Fragment11, jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1121
1247
|
function PipeBatchSection({
|
|
1122
1248
|
blueprint,
|
|
1123
1249
|
executionData
|
|
1124
1250
|
}) {
|
|
1125
1251
|
const itemCount = executionData == null ? void 0 : executionData.item_count;
|
|
1126
|
-
return /* @__PURE__ */
|
|
1127
|
-
/* @__PURE__ */
|
|
1128
|
-
/* @__PURE__ */
|
|
1129
|
-
/* @__PURE__ */
|
|
1130
|
-
itemCount != null && /* @__PURE__ */
|
|
1252
|
+
return /* @__PURE__ */ jsxs16(Fragment11, { children: [
|
|
1253
|
+
/* @__PURE__ */ jsx16(KV, { label: "Branch Pipe", value: blueprint.branch_pipe_code }),
|
|
1254
|
+
/* @__PURE__ */ jsx16(KV, { label: "Input List Variable", value: blueprint.batch_params.input_list_stuff_name }),
|
|
1255
|
+
/* @__PURE__ */ jsx16(KV, { label: "Input Item Variable", value: blueprint.batch_params.input_item_stuff_name }),
|
|
1256
|
+
itemCount != null && /* @__PURE__ */ jsx16(KV, { label: "Items Processed", value: itemCount })
|
|
1131
1257
|
] });
|
|
1132
1258
|
}
|
|
1133
1259
|
|
|
1134
1260
|
// src/graph/react/detail/sections/BindingStepDetail.tsx
|
|
1135
|
-
import { jsx as
|
|
1261
|
+
import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1136
1262
|
function BindingStepSection({ node }) {
|
|
1137
1263
|
var _a, _b;
|
|
1138
1264
|
const executionData = (_a = node.execution_data) != null ? _a : {};
|
|
1139
1265
|
const fromPath = typeof executionData.from === "string" ? executionData.from : node.pipe_code;
|
|
1140
1266
|
const result = typeof executionData.result === "string" ? executionData.result : (_b = node.io.outputs[0]) == null ? void 0 : _b.name;
|
|
1141
|
-
return /* @__PURE__ */
|
|
1142
|
-
/* @__PURE__ */
|
|
1143
|
-
/* @__PURE__ */
|
|
1144
|
-
/* @__PURE__ */
|
|
1267
|
+
return /* @__PURE__ */ jsxs17("div", { children: [
|
|
1268
|
+
/* @__PURE__ */ jsx17("div", { className: "detail-section-label", children: "Binding" }),
|
|
1269
|
+
/* @__PURE__ */ jsx17(KV, { label: "From", value: fromPath }),
|
|
1270
|
+
/* @__PURE__ */ jsx17(KV, { label: "Result", value: result })
|
|
1145
1271
|
] });
|
|
1146
1272
|
}
|
|
1147
1273
|
|
|
1148
1274
|
// src/graph/react/detail/sections/ProblemSection.tsx
|
|
1149
|
-
import { jsx as
|
|
1275
|
+
import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1150
1276
|
function ProblemSection({
|
|
1151
1277
|
problem,
|
|
1152
1278
|
failedHere
|
|
@@ -1154,15 +1280,15 @@ function ProblemSection({
|
|
|
1154
1280
|
var _a, _b;
|
|
1155
1281
|
const failingPipe = problemFailingPipe(problem);
|
|
1156
1282
|
const pipePath = (_b = (_a = problem.location) == null ? void 0 : _a.path) != null ? _b : [];
|
|
1157
|
-
return /* @__PURE__ */
|
|
1158
|
-
/* @__PURE__ */
|
|
1159
|
-
problem.title && /* @__PURE__ */
|
|
1160
|
-
/* @__PURE__ */
|
|
1283
|
+
return /* @__PURE__ */ jsxs18("div", { className: "detail-problem", children: [
|
|
1284
|
+
/* @__PURE__ */ jsxs18("div", { className: "detail-problem-header", children: [
|
|
1285
|
+
problem.title && /* @__PURE__ */ jsx18("span", { className: "detail-problem-title", children: problem.title }),
|
|
1286
|
+
/* @__PURE__ */ jsx18("code", { className: "detail-problem-code", title: "Problem code", children: problem.code })
|
|
1161
1287
|
] }),
|
|
1162
|
-
problem.detail && /* @__PURE__ */
|
|
1163
|
-
failingPipe !== void 0 && /* @__PURE__ */
|
|
1164
|
-
/* @__PURE__ */
|
|
1165
|
-
pipePath.length > 1 && /* @__PURE__ */
|
|
1288
|
+
problem.detail && /* @__PURE__ */ jsx18("div", { className: "detail-problem-detail", children: problem.detail }),
|
|
1289
|
+
failingPipe !== void 0 && /* @__PURE__ */ jsxs18("div", { className: "detail-problem-location", children: [
|
|
1290
|
+
/* @__PURE__ */ jsx18(KV, { label: "Failed in", value: failedHere ? `${failingPipe} (this pipe)` : failingPipe }),
|
|
1291
|
+
pipePath.length > 1 && /* @__PURE__ */ jsx18(
|
|
1166
1292
|
"div",
|
|
1167
1293
|
{
|
|
1168
1294
|
className: "detail-problem-path",
|
|
@@ -1171,9 +1297,9 @@ function ProblemSection({
|
|
|
1171
1297
|
}
|
|
1172
1298
|
)
|
|
1173
1299
|
] }),
|
|
1174
|
-
problem.next_step.detail && /* @__PURE__ */
|
|
1175
|
-
/* @__PURE__ */
|
|
1176
|
-
/* @__PURE__ */
|
|
1300
|
+
problem.next_step.detail && /* @__PURE__ */ jsxs18("div", { className: "detail-problem-next-step", children: [
|
|
1301
|
+
/* @__PURE__ */ jsx18("div", { className: "detail-section-label", children: "Next step" }),
|
|
1302
|
+
/* @__PURE__ */ jsx18("div", { className: "detail-problem-next-step-detail", children: problem.next_step.detail })
|
|
1177
1303
|
] })
|
|
1178
1304
|
] });
|
|
1179
1305
|
}
|
|
@@ -1206,7 +1332,7 @@ function dumpableExecutionData(pipeType, executionData) {
|
|
|
1206
1332
|
}
|
|
1207
1333
|
|
|
1208
1334
|
// src/graph/react/detail/PipeDetailPanel.tsx
|
|
1209
|
-
import { Fragment as
|
|
1335
|
+
import { Fragment as Fragment12, jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1210
1336
|
var PIPE_TYPE_BADGES = {
|
|
1211
1337
|
PipeLLM: "LLM",
|
|
1212
1338
|
PipeExtract: "Extract",
|
|
@@ -1248,22 +1374,22 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
|
|
|
1248
1374
|
const badge = PIPE_TYPE_BADGES[pipeType];
|
|
1249
1375
|
const status = node.status;
|
|
1250
1376
|
const statusColor = (_a = STATUS_COLORS[status]) != null ? _a : "#6272a4";
|
|
1251
|
-
const blueprint =
|
|
1252
|
-
const [usageExpanded, setUsageExpanded] =
|
|
1377
|
+
const blueprint = React6.useMemo(() => resolveNodeBlueprint(spec, node), [spec, node]);
|
|
1378
|
+
const [usageExpanded, setUsageExpanded] = React6.useState(false);
|
|
1253
1379
|
const inputs = (_c = (_b = node.io) == null ? void 0 : _b.inputs) != null ? _c : [];
|
|
1254
1380
|
const outputs = (_e = (_d = node.io) == null ? void 0 : _d.outputs) != null ? _e : [];
|
|
1255
1381
|
const description = (_f = blueprint == null ? void 0 : blueprint.description) != null ? _f : node.description;
|
|
1256
|
-
return /* @__PURE__ */
|
|
1257
|
-
/* @__PURE__ */
|
|
1258
|
-
/* @__PURE__ */
|
|
1259
|
-
/* @__PURE__ */
|
|
1382
|
+
return /* @__PURE__ */ jsxs19(Fragment12, { children: [
|
|
1383
|
+
/* @__PURE__ */ jsxs19("div", { className: "detail-sticky-header", children: [
|
|
1384
|
+
/* @__PURE__ */ jsxs19("div", { className: "detail-header", children: [
|
|
1385
|
+
/* @__PURE__ */ jsx19(
|
|
1260
1386
|
"span",
|
|
1261
1387
|
{
|
|
1262
1388
|
className: `detail-badge ${isController ? "detail-badge--controller" : "detail-badge--operator"}`,
|
|
1263
1389
|
children: badge
|
|
1264
1390
|
}
|
|
1265
1391
|
),
|
|
1266
|
-
/* @__PURE__ */
|
|
1392
|
+
/* @__PURE__ */ jsx19(
|
|
1267
1393
|
"span",
|
|
1268
1394
|
{
|
|
1269
1395
|
className: `detail-pipe-code ${isController ? "detail-pipe-code--controller" : ""}`,
|
|
@@ -1271,11 +1397,11 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
|
|
|
1271
1397
|
}
|
|
1272
1398
|
)
|
|
1273
1399
|
] }),
|
|
1274
|
-
!isStatic && /* @__PURE__ */
|
|
1275
|
-
/* @__PURE__ */
|
|
1276
|
-
/* @__PURE__ */
|
|
1277
|
-
((_g = node.timing) == null ? void 0 : _g.duration) != null && /* @__PURE__ */
|
|
1278
|
-
showsGeneratedData && node.usage && /* @__PURE__ */
|
|
1400
|
+
!isStatic && /* @__PURE__ */ jsxs19("div", { className: "detail-status", children: [
|
|
1401
|
+
/* @__PURE__ */ jsx19("span", { className: "detail-status-dot", style: { background: statusColor } }),
|
|
1402
|
+
/* @__PURE__ */ jsx19("span", { className: "detail-status-label", style: { color: statusColor }, children: status }),
|
|
1403
|
+
((_g = node.timing) == null ? void 0 : _g.duration) != null && /* @__PURE__ */ jsx19("span", { className: "detail-duration", children: formatDuration(node.timing.duration) }),
|
|
1404
|
+
showsGeneratedData && node.usage && /* @__PURE__ */ jsx19(
|
|
1279
1405
|
UsageCostInline,
|
|
1280
1406
|
{
|
|
1281
1407
|
usage: node.usage,
|
|
@@ -1285,45 +1411,45 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
|
|
|
1285
1411
|
}
|
|
1286
1412
|
)
|
|
1287
1413
|
] }),
|
|
1288
|
-
showsGeneratedData && node.usage && usageExpanded && /* @__PURE__ */
|
|
1289
|
-
description && /* @__PURE__ */
|
|
1290
|
-
inputs.length > 0 && /* @__PURE__ */
|
|
1291
|
-
/* @__PURE__ */
|
|
1292
|
-
/* @__PURE__ */
|
|
1414
|
+
showsGeneratedData && node.usage && usageExpanded && /* @__PURE__ */ jsx19(UsageDetails, { usage: node.usage, isController }),
|
|
1415
|
+
description && /* @__PURE__ */ jsx19("div", { className: "detail-description", children: description }),
|
|
1416
|
+
inputs.length > 0 && /* @__PURE__ */ jsxs19("div", { children: [
|
|
1417
|
+
/* @__PURE__ */ jsx19("div", { className: "detail-section-label", children: "Inputs" }),
|
|
1418
|
+
/* @__PURE__ */ jsx19("div", { className: "detail-io-list", children: inputs.map((input, idx) => /* @__PURE__ */ jsxs19(
|
|
1293
1419
|
"div",
|
|
1294
1420
|
{
|
|
1295
1421
|
className: "detail-io-pill",
|
|
1296
1422
|
style: { cursor: input.concept && onConceptClick ? "pointer" : void 0 },
|
|
1297
1423
|
onClick: () => input.concept && (onConceptClick == null ? void 0 : onConceptClick(input.concept)),
|
|
1298
1424
|
children: [
|
|
1299
|
-
/* @__PURE__ */
|
|
1300
|
-
input.concept && /* @__PURE__ */
|
|
1425
|
+
/* @__PURE__ */ jsx19("span", { className: "detail-io-name", children: input.name }),
|
|
1426
|
+
input.concept && /* @__PURE__ */ jsx19("span", { className: "detail-io-concept", children: input.concept + multiplicitySuffix(input.multiplicity) })
|
|
1301
1427
|
]
|
|
1302
1428
|
},
|
|
1303
1429
|
idx
|
|
1304
1430
|
)) })
|
|
1305
1431
|
] }),
|
|
1306
|
-
outputs.length > 0 && /* @__PURE__ */
|
|
1307
|
-
/* @__PURE__ */
|
|
1308
|
-
/* @__PURE__ */
|
|
1432
|
+
outputs.length > 0 && /* @__PURE__ */ jsxs19("div", { children: [
|
|
1433
|
+
/* @__PURE__ */ jsx19("div", { className: "detail-section-label", children: "Output" }),
|
|
1434
|
+
/* @__PURE__ */ jsx19("div", { className: "detail-io-list", children: outputs.map((output, idx) => /* @__PURE__ */ jsxs19(
|
|
1309
1435
|
"div",
|
|
1310
1436
|
{
|
|
1311
1437
|
className: "detail-io-pill",
|
|
1312
1438
|
style: { cursor: output.concept && onConceptClick ? "pointer" : void 0 },
|
|
1313
1439
|
onClick: () => output.concept && (onConceptClick == null ? void 0 : onConceptClick(output.concept)),
|
|
1314
1440
|
children: [
|
|
1315
|
-
/* @__PURE__ */
|
|
1316
|
-
output.concept && /* @__PURE__ */
|
|
1441
|
+
/* @__PURE__ */ jsx19("span", { className: "detail-io-name", children: output.name }),
|
|
1442
|
+
output.concept && /* @__PURE__ */ jsx19("span", { className: "detail-io-concept", children: output.concept + multiplicitySuffix(output.multiplicity) })
|
|
1317
1443
|
]
|
|
1318
1444
|
},
|
|
1319
1445
|
idx
|
|
1320
1446
|
)) })
|
|
1321
1447
|
] }),
|
|
1322
|
-
(inputs.length > 0 || outputs.length > 0) && /* @__PURE__ */
|
|
1448
|
+
(inputs.length > 0 || outputs.length > 0) && /* @__PURE__ */ jsx19("div", { style: { borderTop: "1px solid rgba(255,255,255,0.06)", margin: "4px 0" } })
|
|
1323
1449
|
] }),
|
|
1324
|
-
node.error && /* @__PURE__ */
|
|
1325
|
-
isBinding && /* @__PURE__ */
|
|
1326
|
-
blueprint && /* @__PURE__ */
|
|
1450
|
+
node.error && /* @__PURE__ */ jsx19(ProblemSection, { problem: node.error, failedHere: isFailingPipeNode(node) }),
|
|
1451
|
+
isBinding && /* @__PURE__ */ jsx19(BindingStepSection, { node }),
|
|
1452
|
+
blueprint && /* @__PURE__ */ jsx19(
|
|
1327
1453
|
BlueprintSection,
|
|
1328
1454
|
{
|
|
1329
1455
|
blueprint,
|
|
@@ -1332,7 +1458,7 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
|
|
|
1332
1458
|
modelHandles: node.execution_data
|
|
1333
1459
|
}
|
|
1334
1460
|
),
|
|
1335
|
-
showsGeneratedData && !isBinding && node.execution_data && Object.keys(node.execution_data).length > 0 && /* @__PURE__ */
|
|
1461
|
+
showsGeneratedData && !isBinding && node.execution_data && Object.keys(node.execution_data).length > 0 && /* @__PURE__ */ jsx19(
|
|
1336
1462
|
ExecutionDataSection,
|
|
1337
1463
|
{
|
|
1338
1464
|
executionData: node.execution_data,
|
|
@@ -1340,9 +1466,9 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
|
|
|
1340
1466
|
hasBlueprint: !!blueprint
|
|
1341
1467
|
}
|
|
1342
1468
|
),
|
|
1343
|
-
showsGeneratedData && node.metrics && Object.keys(node.metrics).length > 0 && /* @__PURE__ */
|
|
1344
|
-
/* @__PURE__ */
|
|
1345
|
-
Object.entries(node.metrics).map(([key, value]) => /* @__PURE__ */
|
|
1469
|
+
showsGeneratedData && node.metrics && Object.keys(node.metrics).length > 0 && /* @__PURE__ */ jsxs19("div", { children: [
|
|
1470
|
+
/* @__PURE__ */ jsx19("div", { className: "detail-section-label", children: "Metrics" }),
|
|
1471
|
+
Object.entries(node.metrics).map(([key, value]) => /* @__PURE__ */ jsx19(
|
|
1346
1472
|
KV,
|
|
1347
1473
|
{
|
|
1348
1474
|
label: key,
|
|
@@ -1351,17 +1477,17 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
|
|
|
1351
1477
|
key
|
|
1352
1478
|
))
|
|
1353
1479
|
] }),
|
|
1354
|
-
node.tags && Object.keys(node.tags).length > 0 && /* @__PURE__ */
|
|
1355
|
-
/* @__PURE__ */
|
|
1356
|
-
/* @__PURE__ */
|
|
1357
|
-
/* @__PURE__ */
|
|
1480
|
+
node.tags && Object.keys(node.tags).length > 0 && /* @__PURE__ */ jsxs19("div", { children: [
|
|
1481
|
+
/* @__PURE__ */ jsx19("div", { className: "detail-section-label", children: "Tags" }),
|
|
1482
|
+
/* @__PURE__ */ jsx19("div", { className: "detail-tags", children: Object.entries(node.tags).map(([key, value]) => /* @__PURE__ */ jsxs19("span", { className: "detail-tag", children: [
|
|
1483
|
+
/* @__PURE__ */ jsxs19("span", { className: "detail-tag-key", children: [
|
|
1358
1484
|
key,
|
|
1359
1485
|
": "
|
|
1360
1486
|
] }),
|
|
1361
|
-
/* @__PURE__ */
|
|
1487
|
+
/* @__PURE__ */ jsx19("span", { className: "detail-tag-value", children: value })
|
|
1362
1488
|
] }, key)) })
|
|
1363
1489
|
] }),
|
|
1364
|
-
!blueprint && !isBinding && /* @__PURE__ */
|
|
1490
|
+
!blueprint && !isBinding && /* @__PURE__ */ jsx19("div", { className: "detail-not-available", children: "Blueprint not available" })
|
|
1365
1491
|
] });
|
|
1366
1492
|
}
|
|
1367
1493
|
function BlueprintSection({
|
|
@@ -1372,7 +1498,7 @@ function BlueprintSection({
|
|
|
1372
1498
|
}) {
|
|
1373
1499
|
switch (blueprint.type) {
|
|
1374
1500
|
case "PipeLLM":
|
|
1375
|
-
return /* @__PURE__ */
|
|
1501
|
+
return /* @__PURE__ */ jsx19(
|
|
1376
1502
|
PipeLLMSection,
|
|
1377
1503
|
{
|
|
1378
1504
|
blueprint,
|
|
@@ -1382,7 +1508,7 @@ function BlueprintSection({
|
|
|
1382
1508
|
}
|
|
1383
1509
|
);
|
|
1384
1510
|
case "PipeImgGen":
|
|
1385
|
-
return /* @__PURE__ */
|
|
1511
|
+
return /* @__PURE__ */ jsx19(
|
|
1386
1512
|
PipeImgGenSection,
|
|
1387
1513
|
{
|
|
1388
1514
|
blueprint,
|
|
@@ -1392,9 +1518,9 @@ function BlueprintSection({
|
|
|
1392
1518
|
}
|
|
1393
1519
|
);
|
|
1394
1520
|
case "PipeCompose":
|
|
1395
|
-
return /* @__PURE__ */
|
|
1521
|
+
return /* @__PURE__ */ jsx19(PipeComposeSection, { blueprint, executionData });
|
|
1396
1522
|
case "PipeDocGen":
|
|
1397
|
-
return /* @__PURE__ */
|
|
1523
|
+
return /* @__PURE__ */ jsx19(
|
|
1398
1524
|
PipeDocGenSection,
|
|
1399
1525
|
{
|
|
1400
1526
|
blueprint,
|
|
@@ -1404,7 +1530,7 @@ function BlueprintSection({
|
|
|
1404
1530
|
}
|
|
1405
1531
|
);
|
|
1406
1532
|
case "PipeExtract":
|
|
1407
|
-
return /* @__PURE__ */
|
|
1533
|
+
return /* @__PURE__ */ jsx19(
|
|
1408
1534
|
PipeExtractSection,
|
|
1409
1535
|
{
|
|
1410
1536
|
blueprint,
|
|
@@ -1413,7 +1539,7 @@ function BlueprintSection({
|
|
|
1413
1539
|
}
|
|
1414
1540
|
);
|
|
1415
1541
|
case "PipeSearch":
|
|
1416
|
-
return /* @__PURE__ */
|
|
1542
|
+
return /* @__PURE__ */ jsx19(
|
|
1417
1543
|
PipeSearchSection,
|
|
1418
1544
|
{
|
|
1419
1545
|
blueprint,
|
|
@@ -1423,7 +1549,7 @@ function BlueprintSection({
|
|
|
1423
1549
|
}
|
|
1424
1550
|
);
|
|
1425
1551
|
case "PipeStructure":
|
|
1426
|
-
return /* @__PURE__ */
|
|
1552
|
+
return /* @__PURE__ */ jsx19(
|
|
1427
1553
|
PipeStructureSection,
|
|
1428
1554
|
{
|
|
1429
1555
|
blueprint,
|
|
@@ -1433,19 +1559,19 @@ function BlueprintSection({
|
|
|
1433
1559
|
}
|
|
1434
1560
|
);
|
|
1435
1561
|
case "PipeSequence":
|
|
1436
|
-
return /* @__PURE__ */
|
|
1562
|
+
return /* @__PURE__ */ jsx19(PipeSequenceSection, { blueprint, executionData });
|
|
1437
1563
|
case "PipeParallel":
|
|
1438
|
-
return /* @__PURE__ */
|
|
1564
|
+
return /* @__PURE__ */ jsx19(PipeParallelSection, { blueprint, executionData });
|
|
1439
1565
|
case "PipeCondition":
|
|
1440
|
-
return /* @__PURE__ */
|
|
1566
|
+
return /* @__PURE__ */ jsx19(PipeConditionSection, { blueprint, executionData });
|
|
1441
1567
|
case "PipeBatch":
|
|
1442
|
-
return /* @__PURE__ */
|
|
1568
|
+
return /* @__PURE__ */ jsx19(PipeBatchSection, { blueprint, executionData });
|
|
1443
1569
|
case "PipeFunc":
|
|
1444
1570
|
return null;
|
|
1445
1571
|
case "PipeJudge":
|
|
1446
1572
|
return null;
|
|
1447
1573
|
case "PipeSignature":
|
|
1448
|
-
return /* @__PURE__ */
|
|
1574
|
+
return /* @__PURE__ */ jsx19("div", { className: "detail-not-available", children: "Signature stub \u2014 declared but not yet implemented." });
|
|
1449
1575
|
default: {
|
|
1450
1576
|
const _unhandled = blueprint;
|
|
1451
1577
|
void _unhandled;
|
|
@@ -1459,144 +1585,797 @@ function ExecutionDataSection({
|
|
|
1459
1585
|
hasBlueprint
|
|
1460
1586
|
}) {
|
|
1461
1587
|
if (!shouldDumpExecutionData(pipeType, hasBlueprint)) return null;
|
|
1462
|
-
return /* @__PURE__ */
|
|
1588
|
+
return /* @__PURE__ */ jsx19(GenericExecutionData, { entries: dumpableExecutionData(pipeType, executionData) });
|
|
1589
|
+
}
|
|
1590
|
+
function GenericExecutionData({ entries }) {
|
|
1591
|
+
if (entries.length === 0) return null;
|
|
1592
|
+
return /* @__PURE__ */ jsxs19(Fragment12, { children: [
|
|
1593
|
+
/* @__PURE__ */ jsx19("div", { className: "detail-section-label", children: "Execution" }),
|
|
1594
|
+
entries.map(([key, value]) => /* @__PURE__ */ jsx19(KV, { label: key, value: String(value) }, key))
|
|
1595
|
+
] });
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
// src/graph/react/styles/simple/SimpleDetailPanel.tsx
|
|
1599
|
+
import React7 from "react";
|
|
1600
|
+
|
|
1601
|
+
// src/graph/react/styles/simple/simpleIcons.tsx
|
|
1602
|
+
import { Fragment as Fragment13, jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1603
|
+
var ICON_PROPS = {
|
|
1604
|
+
viewBox: "0 0 24 24",
|
|
1605
|
+
fill: "none",
|
|
1606
|
+
stroke: "currentColor",
|
|
1607
|
+
strokeWidth: 2,
|
|
1608
|
+
strokeLinecap: "round",
|
|
1609
|
+
strokeLinejoin: "round",
|
|
1610
|
+
"aria-hidden": true
|
|
1611
|
+
};
|
|
1612
|
+
function Icon({ size = 13, children }) {
|
|
1613
|
+
return /* @__PURE__ */ jsx20("svg", __spreadProps(__spreadValues({}, ICON_PROPS), { width: size, height: size, children }));
|
|
1614
|
+
}
|
|
1615
|
+
var CATEGORY_ICONS = {
|
|
1616
|
+
ai: /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
1617
|
+
/* @__PURE__ */ jsx20("path", { d: "M9.94 15.5a2 2 0 0 0-1.44-1.44l-6.13-1.58a.5.5 0 0 1 0-.96L8.5 9.94A2 2 0 0 0 9.94 8.5l1.58-6.14a.5.5 0 0 1 .96 0l1.58 6.14a2 2 0 0 0 1.44 1.44l6.14 1.58a.5.5 0 0 1 0 .96l-6.14 1.58a2 2 0 0 0-1.44 1.44l-1.58 6.13a.5.5 0 0 1-.96 0z" }),
|
|
1618
|
+
/* @__PURE__ */ jsx20("path", { d: "M20 3v4" }),
|
|
1619
|
+
/* @__PURE__ */ jsx20("path", { d: "M22 5h-4" })
|
|
1620
|
+
] }),
|
|
1621
|
+
extract: /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
1622
|
+
/* @__PURE__ */ jsx20("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
|
|
1623
|
+
/* @__PURE__ */ jsx20("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }),
|
|
1624
|
+
/* @__PURE__ */ jsx20("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }),
|
|
1625
|
+
/* @__PURE__ */ jsx20("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }),
|
|
1626
|
+
/* @__PURE__ */ jsx20("path", { d: "M7 8h8" }),
|
|
1627
|
+
/* @__PURE__ */ jsx20("path", { d: "M7 12h10" }),
|
|
1628
|
+
/* @__PURE__ */ jsx20("path", { d: "M7 16h6" })
|
|
1629
|
+
] }),
|
|
1630
|
+
image: /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
1631
|
+
/* @__PURE__ */ jsx20("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
1632
|
+
/* @__PURE__ */ jsx20("circle", { cx: "9", cy: "9", r: "2" }),
|
|
1633
|
+
/* @__PURE__ */ jsx20("path", { d: "m21 15-3.09-3.09a2 2 0 0 0-2.82 0L6 21" })
|
|
1634
|
+
] }),
|
|
1635
|
+
search: /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
1636
|
+
/* @__PURE__ */ jsx20("circle", { cx: "11", cy: "11", r: "8" }),
|
|
1637
|
+
/* @__PURE__ */ jsx20("path", { d: "m21 21-4.3-4.3" })
|
|
1638
|
+
] }),
|
|
1639
|
+
code: /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
1640
|
+
/* @__PURE__ */ jsx20("polyline", { points: "16 18 22 12 16 6" }),
|
|
1641
|
+
/* @__PURE__ */ jsx20("polyline", { points: "8 6 2 12 8 18" })
|
|
1642
|
+
] }),
|
|
1643
|
+
template: /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
1644
|
+
/* @__PURE__ */ jsx20("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
1645
|
+
/* @__PURE__ */ jsx20("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
1646
|
+
/* @__PURE__ */ jsx20("path", { d: "M16 13H8" }),
|
|
1647
|
+
/* @__PURE__ */ jsx20("path", { d: "M16 17H8" })
|
|
1648
|
+
] }),
|
|
1649
|
+
document: /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
1650
|
+
/* @__PURE__ */ jsx20("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
1651
|
+
/* @__PURE__ */ jsx20("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
1652
|
+
/* @__PURE__ */ jsx20("path", { d: "M12 18v-6" }),
|
|
1653
|
+
/* @__PURE__ */ jsx20("path", { d: "m9 15 3 3 3-3" })
|
|
1654
|
+
] }),
|
|
1655
|
+
judge: /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
1656
|
+
/* @__PURE__ */ jsx20("path", { d: "m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
|
|
1657
|
+
/* @__PURE__ */ jsx20("path", { d: "m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
|
|
1658
|
+
/* @__PURE__ */ jsx20("path", { d: "M7 21h10" }),
|
|
1659
|
+
/* @__PURE__ */ jsx20("path", { d: "M12 3v18" }),
|
|
1660
|
+
/* @__PURE__ */ jsx20("path", { d: "M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2" })
|
|
1661
|
+
] }),
|
|
1662
|
+
planned: /* @__PURE__ */ jsx20("circle", { cx: "12", cy: "12", r: "9", strokeDasharray: "3 3" }),
|
|
1663
|
+
steps: /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
1664
|
+
/* @__PURE__ */ jsx20("path", { d: "m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z" }),
|
|
1665
|
+
/* @__PURE__ */ jsx20("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }),
|
|
1666
|
+
/* @__PURE__ */ jsx20("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" })
|
|
1667
|
+
] }),
|
|
1668
|
+
parallel: /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
1669
|
+
/* @__PURE__ */ jsx20("path", { d: "M16 3h5v5" }),
|
|
1670
|
+
/* @__PURE__ */ jsx20("path", { d: "M8 3H3v5" }),
|
|
1671
|
+
/* @__PURE__ */ jsx20("path", { d: "M12 22v-8.3a4 4 0 0 0-1.17-2.87L3 3" }),
|
|
1672
|
+
/* @__PURE__ */ jsx20("path", { d: "m15 9 6-6" })
|
|
1673
|
+
] }),
|
|
1674
|
+
decision: /* @__PURE__ */ jsx20("path", { d: "M12 2 22 12 12 22 2 12Z" }),
|
|
1675
|
+
repeat: /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
1676
|
+
/* @__PURE__ */ jsx20("path", { d: "m17 2 4 4-4 4" }),
|
|
1677
|
+
/* @__PURE__ */ jsx20("path", { d: "M3 11v-1a4 4 0 0 1 4-4h14" }),
|
|
1678
|
+
/* @__PURE__ */ jsx20("path", { d: "m7 22-4-4 4-4" }),
|
|
1679
|
+
/* @__PURE__ */ jsx20("path", { d: "M21 13v1a4 4 0 0 1-4 4H3" })
|
|
1680
|
+
] }),
|
|
1681
|
+
pick: /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
1682
|
+
/* @__PURE__ */ jsx20("polyline", { points: "15 10 20 15 15 20" }),
|
|
1683
|
+
/* @__PURE__ */ jsx20("path", { d: "M4 4v7a4 4 0 0 0 4 4h12" })
|
|
1684
|
+
] })
|
|
1685
|
+
};
|
|
1686
|
+
var STATUS_LABELS = {
|
|
1687
|
+
succeeded: "Done",
|
|
1688
|
+
failed: "Failed",
|
|
1689
|
+
running: "Running",
|
|
1690
|
+
scheduled: "Waiting",
|
|
1691
|
+
skipped: "Skipped",
|
|
1692
|
+
canceled: "Canceled"
|
|
1693
|
+
};
|
|
1694
|
+
var STATUS_ICONS = {
|
|
1695
|
+
succeeded: /* @__PURE__ */ jsx20("polyline", { points: "20 6 9 17 4 12" }),
|
|
1696
|
+
failed: /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
1697
|
+
/* @__PURE__ */ jsx20("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1698
|
+
/* @__PURE__ */ jsx20("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1699
|
+
] }),
|
|
1700
|
+
running: /* @__PURE__ */ jsx20("path", { d: "M21 12a9 9 0 1 1-6.22-8.56" }),
|
|
1701
|
+
scheduled: /* @__PURE__ */ jsx20("circle", { cx: "12", cy: "12", r: "8" }),
|
|
1702
|
+
skipped: /* @__PURE__ */ jsx20("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
1703
|
+
canceled: /* @__PURE__ */ jsx20("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
1704
|
+
};
|
|
1705
|
+
|
|
1706
|
+
// src/graph/react/styles/simple/simpleDetailStrings.ts
|
|
1707
|
+
function plainDuration(seconds) {
|
|
1708
|
+
const ms = Math.max(0, seconds * 1e3);
|
|
1709
|
+
if (ms === 0) return "0s";
|
|
1710
|
+
if (Math.round(ms) < 1e3) return `${Math.round(ms)}ms`;
|
|
1711
|
+
const tenths = Math.round(ms / 100) / 10;
|
|
1712
|
+
if (tenths < 10) return `${tenths}s`;
|
|
1713
|
+
const totalSeconds = Math.round(ms / 1e3);
|
|
1714
|
+
if (totalSeconds < 60) return `${totalSeconds}s`;
|
|
1715
|
+
if (totalSeconds < 3600) {
|
|
1716
|
+
const minutes2 = Math.floor(totalSeconds / 60);
|
|
1717
|
+
const rest = totalSeconds % 60;
|
|
1718
|
+
return rest === 0 ? `${minutes2}m` : `${minutes2}m ${String(rest).padStart(2, "0")}s`;
|
|
1719
|
+
}
|
|
1720
|
+
const totalMinutes = Math.round(totalSeconds / 60);
|
|
1721
|
+
const hours = Math.floor(totalMinutes / 60);
|
|
1722
|
+
const minutes = totalMinutes % 60;
|
|
1723
|
+
return minutes === 0 ? `${hours}h` : `${hours}h ${String(minutes).padStart(2, "0")}m`;
|
|
1724
|
+
}
|
|
1725
|
+
function tallyCounts(tally) {
|
|
1726
|
+
const count = (status) => {
|
|
1727
|
+
var _a;
|
|
1728
|
+
return (_a = tally.byStatus[status]) != null ? _a : 0;
|
|
1729
|
+
};
|
|
1730
|
+
let text = `${count("succeeded")} of ${tally.total} done`;
|
|
1731
|
+
if (count("running") > 0) text += ` \xB7 ${count("running")} in progress`;
|
|
1732
|
+
if (count("failed") > 0) text += ` \xB7 ${count("failed")} failed`;
|
|
1733
|
+
if (count("skipped") > 0) text += ` \xB7 ${count("skipped")} skipped`;
|
|
1734
|
+
if (count("canceled") > 0) text += ` \xB7 ${count("canceled")} canceled`;
|
|
1735
|
+
if (count("scheduled") > 0) text += ` \xB7 ${count("scheduled")} waiting`;
|
|
1736
|
+
return text;
|
|
1737
|
+
}
|
|
1738
|
+
var SIMPLE_DETAIL_STRINGS = {
|
|
1739
|
+
/** What heads an AI step's prompt, a judge's question and the rest, by the step's category. */
|
|
1740
|
+
instructions: (category) => {
|
|
1741
|
+
switch (category) {
|
|
1742
|
+
case "judge":
|
|
1743
|
+
return "What the AI is asked to judge";
|
|
1744
|
+
case "image":
|
|
1745
|
+
return "What to draw";
|
|
1746
|
+
case "search":
|
|
1747
|
+
return "What to search for";
|
|
1748
|
+
default:
|
|
1749
|
+
return "What the AI is asked";
|
|
1750
|
+
}
|
|
1751
|
+
},
|
|
1752
|
+
uses: "Uses",
|
|
1753
|
+
produces: "Produces",
|
|
1754
|
+
from: "From",
|
|
1755
|
+
usedBy: "Used by",
|
|
1756
|
+
madeBy: "Made by",
|
|
1757
|
+
readBy: "Read by",
|
|
1758
|
+
inputOfMethod: "An input of the method",
|
|
1759
|
+
resultOfMethod: "The result of the method",
|
|
1760
|
+
nothingReadsIt: "Nothing after this step reads it",
|
|
1761
|
+
showValue: "Show the value",
|
|
1762
|
+
value: "The value",
|
|
1763
|
+
dryRunValues: "This was a test run: its values are made up, so none is shown.",
|
|
1764
|
+
oneRunShown: (runs) => `This step ran ${runs} times, once for each item. The values shown are one item's.`,
|
|
1765
|
+
ranOnce: (status, duration) => duration ? `${status} \xB7 ${duration}` : status,
|
|
1766
|
+
ranTimes: (tally) => `Ran ${tally.total} times: ${tallyCounts(tally)}`,
|
|
1767
|
+
items: (tally) => tally.total === 1 ? `1 item: ${tallyCounts(tally)}` : `${tally.total} items: ${tallyCounts(tally)}`,
|
|
1768
|
+
groups: (count) => count === 1 ? "Groups 1 step" : `Groups ${count} steps`,
|
|
1769
|
+
showSteps: "Show the steps",
|
|
1770
|
+
outcomes: "Possible outcomes",
|
|
1771
|
+
/** What an outcome leading to no step does, in place of the step's name. */
|
|
1772
|
+
outcomeEnds: {
|
|
1773
|
+
fail: "The method stops with a failure",
|
|
1774
|
+
continue: "Carries on without a step"
|
|
1775
|
+
},
|
|
1776
|
+
taken: (taken, runs) => {
|
|
1777
|
+
if (taken === 0) return "Not taken";
|
|
1778
|
+
if (runs <= 1 || taken === runs) return "Taken";
|
|
1779
|
+
return `Taken ${taken} of ${runs} times`;
|
|
1780
|
+
},
|
|
1781
|
+
repeatsOver: "Repeats over",
|
|
1782
|
+
stepsRepeated: "Steps it repeats",
|
|
1783
|
+
contains: "What it contains",
|
|
1784
|
+
arrowKind: "Passed along",
|
|
1785
|
+
arrowFrom: "From",
|
|
1786
|
+
arrowTo: "To",
|
|
1787
|
+
whenOutcome: (outcome) => `Taken when the decision says: ${outcome}`,
|
|
1788
|
+
carries: "What it carries",
|
|
1789
|
+
carriesNothing: "Nothing passes here: the arrow only says which way the decision went.",
|
|
1790
|
+
inputKind: "Input",
|
|
1791
|
+
outputKind: "Result",
|
|
1792
|
+
frameKind: "For each",
|
|
1793
|
+
decisionKind: "Decision",
|
|
1794
|
+
technicalDetails: "Technical details",
|
|
1795
|
+
whatToDoNext: "What to do next",
|
|
1796
|
+
// The concept's own name, never pluralized: a plural would be a guess ("Data", "Feedback").
|
|
1797
|
+
listOf: (plain) => `${plain} (list)`,
|
|
1798
|
+
list: "List"
|
|
1799
|
+
};
|
|
1800
|
+
|
|
1801
|
+
// src/graph/react/styles/simple/SimpleDetailPanel.tsx
|
|
1802
|
+
import { Fragment as Fragment14, jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1803
|
+
function SimpleDetailPanel(props) {
|
|
1804
|
+
const { detail } = props;
|
|
1805
|
+
return /* @__PURE__ */ jsxs21("div", { className: "simple-detail", "data-kind": detail.kind, children: [
|
|
1806
|
+
detail.kind === "step" && /* @__PURE__ */ jsx21(StepView, __spreadProps(__spreadValues({}, props), { detail })),
|
|
1807
|
+
detail.kind === "decision" && /* @__PURE__ */ jsx21(DecisionView, __spreadProps(__spreadValues({}, props), { detail })),
|
|
1808
|
+
detail.kind === "frame" && /* @__PURE__ */ jsx21(FrameView, __spreadProps(__spreadValues({}, props), { detail })),
|
|
1809
|
+
detail.kind === "value" && /* @__PURE__ */ jsx21(ValueView, __spreadProps(__spreadValues({}, props), { detail })),
|
|
1810
|
+
detail.kind === "arrow" && /* @__PURE__ */ jsx21(ArrowView, __spreadProps(__spreadValues({}, props), { detail }))
|
|
1811
|
+
] });
|
|
1812
|
+
}
|
|
1813
|
+
function showsValues(mode) {
|
|
1814
|
+
return mode !== GRAPH_SPEC_MODE.STATIC && mode !== GRAPH_SPEC_MODE.DRY;
|
|
1815
|
+
}
|
|
1816
|
+
function StepView({
|
|
1817
|
+
detail,
|
|
1818
|
+
mode,
|
|
1819
|
+
renderValue,
|
|
1820
|
+
renderTechnical,
|
|
1821
|
+
onOpenNode
|
|
1822
|
+
}) {
|
|
1823
|
+
var _a, _b;
|
|
1824
|
+
const runs = (_b = (_a = detail.run) == null ? void 0 : _a.runs) != null ? _b : 1;
|
|
1825
|
+
return /* @__PURE__ */ jsxs21(Fragment14, { children: [
|
|
1826
|
+
/* @__PURE__ */ jsx21(
|
|
1827
|
+
Header,
|
|
1828
|
+
{
|
|
1829
|
+
category: detail.category,
|
|
1830
|
+
word: STEP_CATEGORY_WORDS[detail.category],
|
|
1831
|
+
run: detail.run
|
|
1832
|
+
}
|
|
1833
|
+
),
|
|
1834
|
+
/* @__PURE__ */ jsx21("h2", { className: "simple-detail-title", children: detail.title }),
|
|
1835
|
+
detail.forEach && /* @__PURE__ */ jsxs21("p", { className: "simple-detail-foreach", children: [
|
|
1836
|
+
/* @__PURE__ */ jsx21(Icon, { size: 12, children: CATEGORY_ICONS.repeat }),
|
|
1837
|
+
detail.forEach
|
|
1838
|
+
] }),
|
|
1839
|
+
detail.problem && /* @__PURE__ */ jsx21(PlainProblem, { problem: detail.problem }),
|
|
1840
|
+
runs > 1 && showsValues(mode) && /* @__PURE__ */ jsx21("p", { className: "simple-detail-note", children: SIMPLE_DETAIL_STRINGS.oneRunShown(runs) }),
|
|
1841
|
+
mode === GRAPH_SPEC_MODE.DRY && /* @__PURE__ */ jsx21("p", { className: "simple-detail-note", children: SIMPLE_DETAIL_STRINGS.dryRunValues }),
|
|
1842
|
+
detail.uses.length > 0 && /* @__PURE__ */ jsx21(Section, { title: SIMPLE_DETAIL_STRINGS.uses, children: detail.uses.map((value) => /* @__PURE__ */ jsx21(
|
|
1843
|
+
ValueRow,
|
|
1844
|
+
{
|
|
1845
|
+
value,
|
|
1846
|
+
side: "from",
|
|
1847
|
+
mode,
|
|
1848
|
+
renderValue,
|
|
1849
|
+
onOpenNode
|
|
1850
|
+
},
|
|
1851
|
+
value.digest || value.title
|
|
1852
|
+
)) }),
|
|
1853
|
+
detail.produces.length > 0 && /* @__PURE__ */ jsx21(Section, { title: SIMPLE_DETAIL_STRINGS.produces, children: detail.produces.map((value, index) => /* @__PURE__ */ jsx21(
|
|
1854
|
+
ValueRow,
|
|
1855
|
+
{
|
|
1856
|
+
value,
|
|
1857
|
+
side: "to",
|
|
1858
|
+
mode,
|
|
1859
|
+
renderValue,
|
|
1860
|
+
onOpenNode,
|
|
1861
|
+
openValue: index === 0
|
|
1862
|
+
},
|
|
1863
|
+
value.digest || value.title
|
|
1864
|
+
)) }),
|
|
1865
|
+
detail.inner && /* @__PURE__ */ jsxs21(Section, { title: SIMPLE_DETAIL_STRINGS.groups(detail.inner.count), children: [
|
|
1866
|
+
/* @__PURE__ */ jsx21("ol", { className: "simple-detail-steps", children: detail.inner.steps.map((title, index) => /* @__PURE__ */ jsx21("li", { children: title }, `${index}:${title}`)) }),
|
|
1867
|
+
detail.inner.onExpand && /* @__PURE__ */ jsx21(
|
|
1868
|
+
"button",
|
|
1869
|
+
{
|
|
1870
|
+
type: "button",
|
|
1871
|
+
className: "simple-detail-button",
|
|
1872
|
+
onClick: (event) => {
|
|
1873
|
+
var _a2, _b2;
|
|
1874
|
+
return (_b2 = (_a2 = detail.inner) == null ? void 0 : _a2.onExpand) == null ? void 0 : _b2.call(_a2, { soloMode: event.altKey });
|
|
1875
|
+
},
|
|
1876
|
+
children: SIMPLE_DETAIL_STRINGS.showSteps
|
|
1877
|
+
}
|
|
1878
|
+
)
|
|
1879
|
+
] }),
|
|
1880
|
+
detail.instructions && /* @__PURE__ */ jsx21(
|
|
1881
|
+
Fold,
|
|
1882
|
+
{
|
|
1883
|
+
title: SIMPLE_DETAIL_STRINGS.instructions(detail.instructions.category),
|
|
1884
|
+
className: "simple-detail-instructions",
|
|
1885
|
+
children: /* @__PURE__ */ jsx21("div", { className: "simple-detail-prompt", children: detail.instructions.text })
|
|
1886
|
+
}
|
|
1887
|
+
),
|
|
1888
|
+
/* @__PURE__ */ jsx21(TechnicalFold, { render: renderTechnical })
|
|
1889
|
+
] });
|
|
1890
|
+
}
|
|
1891
|
+
function DecisionView({
|
|
1892
|
+
detail,
|
|
1893
|
+
mode,
|
|
1894
|
+
renderValue,
|
|
1895
|
+
renderTechnical,
|
|
1896
|
+
onOpenNode
|
|
1897
|
+
}) {
|
|
1898
|
+
return /* @__PURE__ */ jsxs21(Fragment14, { children: [
|
|
1899
|
+
/* @__PURE__ */ jsx21(Header, { category: "decision", word: SIMPLE_DETAIL_STRINGS.decisionKind, run: detail.run }),
|
|
1900
|
+
/* @__PURE__ */ jsx21("h2", { className: "simple-detail-title", children: detail.title }),
|
|
1901
|
+
detail.problem && /* @__PURE__ */ jsx21(PlainProblem, { problem: detail.problem }),
|
|
1902
|
+
detail.uses.length > 0 && /* @__PURE__ */ jsx21(Section, { title: SIMPLE_DETAIL_STRINGS.uses, children: detail.uses.map((value) => /* @__PURE__ */ jsx21(
|
|
1903
|
+
ValueRow,
|
|
1904
|
+
{
|
|
1905
|
+
value,
|
|
1906
|
+
side: "from",
|
|
1907
|
+
mode,
|
|
1908
|
+
renderValue,
|
|
1909
|
+
onOpenNode
|
|
1910
|
+
},
|
|
1911
|
+
value.digest || value.title
|
|
1912
|
+
)) }),
|
|
1913
|
+
detail.outcomes.length > 0 && /* @__PURE__ */ jsx21(Section, { title: SIMPLE_DETAIL_STRINGS.outcomes, children: /* @__PURE__ */ jsx21("ul", { className: "simple-detail-outcomes", children: detail.outcomes.map((outcome) => {
|
|
1914
|
+
const state = outcome.taken === void 0 ? void 0 : outcome.taken > 0 ? "taken" : "not-taken";
|
|
1915
|
+
return /* @__PURE__ */ jsxs21(
|
|
1916
|
+
"li",
|
|
1917
|
+
{
|
|
1918
|
+
className: `simple-detail-outcome${state ? ` simple-detail-outcome--${state}` : ""}`,
|
|
1919
|
+
children: [
|
|
1920
|
+
/* @__PURE__ */ jsx21("span", { className: "simple-detail-outcome-label", children: outcome.label }),
|
|
1921
|
+
/* @__PURE__ */ jsx21("span", { className: "simple-detail-outcome-arrow", "aria-hidden": "true", children: "\u2192" }),
|
|
1922
|
+
/* @__PURE__ */ jsx21("span", { className: "simple-detail-outcome-target", children: outcome.ends ? SIMPLE_DETAIL_STRINGS.outcomeEnds[outcome.ends] : outcome.leadsTo ? /* @__PURE__ */ jsx21(NodeLink, { link: outcome.leadsTo, onOpenNode }) : outcome.leadsToTitle }),
|
|
1923
|
+
outcome.taken !== void 0 && /* @__PURE__ */ jsx21("span", { className: "simple-detail-outcome-taken", children: SIMPLE_DETAIL_STRINGS.taken(outcome.taken, detail.runs) })
|
|
1924
|
+
]
|
|
1925
|
+
},
|
|
1926
|
+
outcome.label
|
|
1927
|
+
);
|
|
1928
|
+
}) }) }),
|
|
1929
|
+
/* @__PURE__ */ jsx21(TechnicalFold, { render: renderTechnical })
|
|
1930
|
+
] });
|
|
1931
|
+
}
|
|
1932
|
+
function FrameView({
|
|
1933
|
+
detail,
|
|
1934
|
+
mode,
|
|
1935
|
+
renderValue,
|
|
1936
|
+
renderTechnical,
|
|
1937
|
+
onOpenNode
|
|
1938
|
+
}) {
|
|
1939
|
+
return /* @__PURE__ */ jsxs21(Fragment14, { children: [
|
|
1940
|
+
/* @__PURE__ */ jsx21(Header, { category: "repeat", word: SIMPLE_DETAIL_STRINGS.frameKind, run: detail.run, items: detail.items }),
|
|
1941
|
+
/* @__PURE__ */ jsx21("h2", { className: "simple-detail-title", children: detail.title }),
|
|
1942
|
+
detail.problem && /* @__PURE__ */ jsx21(PlainProblem, { problem: detail.problem }),
|
|
1943
|
+
detail.over && /* @__PURE__ */ jsx21(Section, { title: SIMPLE_DETAIL_STRINGS.repeatsOver, children: /* @__PURE__ */ jsx21(
|
|
1944
|
+
ValueRow,
|
|
1945
|
+
{
|
|
1946
|
+
value: detail.over,
|
|
1947
|
+
side: "from",
|
|
1948
|
+
mode,
|
|
1949
|
+
renderValue,
|
|
1950
|
+
onOpenNode
|
|
1951
|
+
}
|
|
1952
|
+
) }),
|
|
1953
|
+
detail.steps.length > 0 && /* @__PURE__ */ jsx21(Section, { title: SIMPLE_DETAIL_STRINGS.stepsRepeated, children: /* @__PURE__ */ jsx21("ol", { className: "simple-detail-steps", children: detail.steps.map((step) => /* @__PURE__ */ jsx21("li", { children: /* @__PURE__ */ jsx21(NodeLink, { link: step, onOpenNode }) }, step.nodeId)) }) }),
|
|
1954
|
+
/* @__PURE__ */ jsx21(TechnicalFold, { render: renderTechnical })
|
|
1955
|
+
] });
|
|
1956
|
+
}
|
|
1957
|
+
function ValueView({
|
|
1958
|
+
detail,
|
|
1959
|
+
mode,
|
|
1960
|
+
renderValue,
|
|
1961
|
+
renderTechnical,
|
|
1962
|
+
onOpenNode
|
|
1963
|
+
}) {
|
|
1964
|
+
const { value, role } = detail;
|
|
1965
|
+
const shown = showsValues(mode) ? renderValue == null ? void 0 : renderValue(value) : null;
|
|
1966
|
+
const links = role === "input" ? value.to : value.from;
|
|
1967
|
+
return /* @__PURE__ */ jsxs21(Fragment14, { children: [
|
|
1968
|
+
/* @__PURE__ */ jsx21("div", { className: "simple-detail-header", children: /* @__PURE__ */ jsxs21("span", { className: `simple-detail-kind simple-detail-kind--${role}`, children: [
|
|
1969
|
+
/* @__PURE__ */ jsx21(DocumentIcon, { list: value.isList }),
|
|
1970
|
+
role === "input" ? SIMPLE_DETAIL_STRINGS.inputKind : SIMPLE_DETAIL_STRINGS.outputKind
|
|
1971
|
+
] }) }),
|
|
1972
|
+
/* @__PURE__ */ jsx21("h2", { className: "simple-detail-title", children: value.title }),
|
|
1973
|
+
/* @__PURE__ */ jsx21(ValueKind, { value }),
|
|
1974
|
+
value.description && /* @__PURE__ */ jsx21("p", { className: "simple-detail-description", children: value.description }),
|
|
1975
|
+
mode === GRAPH_SPEC_MODE.DRY && /* @__PURE__ */ jsx21("p", { className: "simple-detail-note", children: SIMPLE_DETAIL_STRINGS.dryRunValues }),
|
|
1976
|
+
links.length > 0 && /* @__PURE__ */ jsx21(Section, { title: role === "input" ? SIMPLE_DETAIL_STRINGS.readBy : SIMPLE_DETAIL_STRINGS.madeBy, children: /* @__PURE__ */ jsx21("ul", { className: "simple-detail-links", children: links.map((link) => /* @__PURE__ */ jsx21("li", { children: /* @__PURE__ */ jsx21(NodeLink, { link, onOpenNode }) }, link.nodeId)) }) }),
|
|
1977
|
+
shown && /* @__PURE__ */ jsx21("div", { className: "simple-detail-value", children: shown }),
|
|
1978
|
+
detail.fields.length > 0 && /* @__PURE__ */ jsx21(Section, { title: SIMPLE_DETAIL_STRINGS.contains, children: /* @__PURE__ */ jsx21("dl", { className: "simple-detail-fields", children: detail.fields.map((field) => /* @__PURE__ */ jsxs21(React7.Fragment, { children: [
|
|
1979
|
+
/* @__PURE__ */ jsx21("dt", { children: field.title }),
|
|
1980
|
+
field.description && /* @__PURE__ */ jsx21("dd", { children: field.description })
|
|
1981
|
+
] }, field.title)) }) }),
|
|
1982
|
+
/* @__PURE__ */ jsx21(TechnicalFold, { render: renderTechnical })
|
|
1983
|
+
] });
|
|
1984
|
+
}
|
|
1985
|
+
function ArrowView({ detail, mode, renderValue, onOpenNode }) {
|
|
1986
|
+
return /* @__PURE__ */ jsxs21(Fragment14, { children: [
|
|
1987
|
+
/* @__PURE__ */ jsx21("div", { className: "simple-detail-header", children: /* @__PURE__ */ jsxs21("span", { className: "simple-detail-kind", children: [
|
|
1988
|
+
/* @__PURE__ */ jsxs21(Icon, { children: [
|
|
1989
|
+
/* @__PURE__ */ jsx21("path", { d: "M5 12h14" }),
|
|
1990
|
+
/* @__PURE__ */ jsx21("path", { d: "m13 6 6 6-6 6" })
|
|
1991
|
+
] }),
|
|
1992
|
+
SIMPLE_DETAIL_STRINGS.arrowKind
|
|
1993
|
+
] }) }),
|
|
1994
|
+
/* @__PURE__ */ jsxs21("dl", { className: "simple-detail-ends", children: [
|
|
1995
|
+
/* @__PURE__ */ jsx21("dt", { children: SIMPLE_DETAIL_STRINGS.arrowFrom }),
|
|
1996
|
+
/* @__PURE__ */ jsx21("dd", { children: /* @__PURE__ */ jsx21(NodeLink, { link: detail.from, onOpenNode }) }),
|
|
1997
|
+
/* @__PURE__ */ jsx21("dt", { children: SIMPLE_DETAIL_STRINGS.arrowTo }),
|
|
1998
|
+
/* @__PURE__ */ jsx21("dd", { children: /* @__PURE__ */ jsx21(NodeLink, { link: detail.to, onOpenNode }) })
|
|
1999
|
+
] }),
|
|
2000
|
+
detail.outcome && /* @__PURE__ */ jsx21("p", { className: "simple-detail-outcome-note", children: SIMPLE_DETAIL_STRINGS.whenOutcome(detail.outcome) }),
|
|
2001
|
+
mode === GRAPH_SPEC_MODE.DRY && detail.values.length > 0 && /* @__PURE__ */ jsx21("p", { className: "simple-detail-note", children: SIMPLE_DETAIL_STRINGS.dryRunValues }),
|
|
2002
|
+
detail.values.length > 0 ? /* @__PURE__ */ jsx21(Section, { title: SIMPLE_DETAIL_STRINGS.carries, children: detail.values.map((value) => /* @__PURE__ */ jsx21(
|
|
2003
|
+
ValueRow,
|
|
2004
|
+
{
|
|
2005
|
+
value,
|
|
2006
|
+
mode,
|
|
2007
|
+
renderValue,
|
|
2008
|
+
onOpenNode,
|
|
2009
|
+
openValue: true
|
|
2010
|
+
},
|
|
2011
|
+
value.digest || value.title
|
|
2012
|
+
)) }) : /* @__PURE__ */ jsx21("p", { className: "simple-detail-note", children: SIMPLE_DETAIL_STRINGS.carriesNothing })
|
|
2013
|
+
] });
|
|
2014
|
+
}
|
|
2015
|
+
function Header({
|
|
2016
|
+
category,
|
|
2017
|
+
word,
|
|
2018
|
+
run,
|
|
2019
|
+
items
|
|
2020
|
+
}) {
|
|
2021
|
+
return /* @__PURE__ */ jsxs21("div", { className: `simple-detail-header simple-detail-header--${category}`, children: [
|
|
2022
|
+
/* @__PURE__ */ jsxs21("span", { className: "simple-detail-kind", children: [
|
|
2023
|
+
/* @__PURE__ */ jsx21(Icon, { children: CATEGORY_ICONS[category] }),
|
|
2024
|
+
word
|
|
2025
|
+
] }),
|
|
2026
|
+
run && /* @__PURE__ */ jsx21(RunLine, { run, items })
|
|
2027
|
+
] });
|
|
2028
|
+
}
|
|
2029
|
+
function RunLine({ run, items }) {
|
|
2030
|
+
const status = STATUS_LABELS[run.status];
|
|
2031
|
+
let text;
|
|
2032
|
+
if (items) text = SIMPLE_DETAIL_STRINGS.items(items);
|
|
2033
|
+
else if (run.tally) text = SIMPLE_DETAIL_STRINGS.ranTimes(run.tally);
|
|
2034
|
+
else
|
|
2035
|
+
text = SIMPLE_DETAIL_STRINGS.ranOnce(
|
|
2036
|
+
status,
|
|
2037
|
+
run.durationSeconds !== void 0 ? plainDuration(run.durationSeconds) : null
|
|
2038
|
+
);
|
|
2039
|
+
return /* @__PURE__ */ jsxs21("span", { className: `simple-detail-run simple-detail-run--${run.status}`, children: [
|
|
2040
|
+
/* @__PURE__ */ jsx21("span", { className: `simple-status simple-status--${run.status}`, "aria-hidden": "true", children: /* @__PURE__ */ jsx21(Icon, { size: 11, children: STATUS_ICONS[run.status] }) }),
|
|
2041
|
+
/* @__PURE__ */ jsxs21("span", { className: "simple-detail-run-text", children: [
|
|
2042
|
+
items || run.tally ? /* @__PURE__ */ jsxs21("span", { className: "simple-detail-sr", children: [
|
|
2043
|
+
status,
|
|
2044
|
+
": "
|
|
2045
|
+
] }) : null,
|
|
2046
|
+
text
|
|
2047
|
+
] })
|
|
2048
|
+
] });
|
|
2049
|
+
}
|
|
2050
|
+
function Section({ title, children }) {
|
|
2051
|
+
return /* @__PURE__ */ jsxs21("section", { className: "simple-detail-section", children: [
|
|
2052
|
+
/* @__PURE__ */ jsx21("h3", { className: "simple-detail-section-title", children: title }),
|
|
2053
|
+
children
|
|
2054
|
+
] });
|
|
2055
|
+
}
|
|
2056
|
+
function Fold({
|
|
2057
|
+
title,
|
|
2058
|
+
className,
|
|
2059
|
+
bodyClassName,
|
|
2060
|
+
children,
|
|
2061
|
+
defaultOpen = false
|
|
2062
|
+
}) {
|
|
2063
|
+
const [open, setOpen] = React7.useState(defaultOpen);
|
|
2064
|
+
return /* @__PURE__ */ jsxs21(
|
|
2065
|
+
"details",
|
|
2066
|
+
{
|
|
2067
|
+
className: `simple-detail-fold${className ? ` ${className}` : ""}`,
|
|
2068
|
+
open,
|
|
2069
|
+
onToggle: (event) => setOpen(event.currentTarget.open),
|
|
2070
|
+
children: [
|
|
2071
|
+
/* @__PURE__ */ jsx21("summary", { className: "simple-detail-fold-title", children: title }),
|
|
2072
|
+
open && /* @__PURE__ */ jsx21("div", { className: `simple-detail-fold-body${bodyClassName ? ` ${bodyClassName}` : ""}`, children: typeof children === "function" ? children() : children })
|
|
2073
|
+
]
|
|
2074
|
+
}
|
|
2075
|
+
);
|
|
2076
|
+
}
|
|
2077
|
+
function TechnicalFold({ render }) {
|
|
2078
|
+
if (!render) return null;
|
|
2079
|
+
return /* @__PURE__ */ jsx21(
|
|
2080
|
+
Fold,
|
|
2081
|
+
{
|
|
2082
|
+
title: SIMPLE_DETAIL_STRINGS.technicalDetails,
|
|
2083
|
+
className: "simple-detail-technical",
|
|
2084
|
+
bodyClassName: "simple-detail-technical-body",
|
|
2085
|
+
children: render
|
|
2086
|
+
}
|
|
2087
|
+
);
|
|
2088
|
+
}
|
|
2089
|
+
function ValueRow({
|
|
2090
|
+
value,
|
|
2091
|
+
side,
|
|
2092
|
+
mode,
|
|
2093
|
+
renderValue,
|
|
2094
|
+
onOpenNode,
|
|
2095
|
+
openValue = false
|
|
2096
|
+
}) {
|
|
2097
|
+
const shown = showsValues(mode) ? renderValue == null ? void 0 : renderValue(value) : null;
|
|
2098
|
+
return /* @__PURE__ */ jsxs21("div", { className: "simple-value", children: [
|
|
2099
|
+
/* @__PURE__ */ jsxs21("div", { className: "simple-value-head", children: [
|
|
2100
|
+
/* @__PURE__ */ jsx21(DocumentIcon, { list: value.isList }),
|
|
2101
|
+
/* @__PURE__ */ jsx21("span", { className: "simple-value-title", children: value.title }),
|
|
2102
|
+
/* @__PURE__ */ jsx21(ValueKind, { value, inline: true })
|
|
2103
|
+
] }),
|
|
2104
|
+
value.description && /* @__PURE__ */ jsx21("p", { className: "simple-value-description", children: value.description }),
|
|
2105
|
+
side && /* @__PURE__ */ jsx21(ValueLinks, { value, side, onOpenNode }),
|
|
2106
|
+
shown && /* @__PURE__ */ jsx21(
|
|
2107
|
+
Fold,
|
|
2108
|
+
{
|
|
2109
|
+
title: openValue ? SIMPLE_DETAIL_STRINGS.value : SIMPLE_DETAIL_STRINGS.showValue,
|
|
2110
|
+
className: "simple-value-fold",
|
|
2111
|
+
defaultOpen: openValue,
|
|
2112
|
+
children: shown
|
|
2113
|
+
}
|
|
2114
|
+
)
|
|
2115
|
+
] });
|
|
2116
|
+
}
|
|
2117
|
+
function ValueKind({ value, inline = false }) {
|
|
2118
|
+
const kind = value.subtitle ? value.isList ? SIMPLE_DETAIL_STRINGS.listOf(value.subtitle) : value.subtitle : value.isList ? SIMPLE_DETAIL_STRINGS.list : void 0;
|
|
2119
|
+
if (!kind) return null;
|
|
2120
|
+
return inline ? /* @__PURE__ */ jsx21("span", { className: "simple-value-kind", children: kind }) : /* @__PURE__ */ jsx21("p", { className: "simple-detail-subtitle", children: kind });
|
|
2121
|
+
}
|
|
2122
|
+
function ValueLinks({
|
|
2123
|
+
value,
|
|
2124
|
+
side,
|
|
2125
|
+
onOpenNode
|
|
2126
|
+
}) {
|
|
2127
|
+
const links = side === "from" ? value.from : value.to;
|
|
2128
|
+
if (side === "to" && links.length === 0) {
|
|
2129
|
+
return /* @__PURE__ */ jsx21("p", { className: "simple-value-links simple-value-links--none", children: SIMPLE_DETAIL_STRINGS.nothingReadsIt });
|
|
2130
|
+
}
|
|
2131
|
+
if (links.length === 0) return null;
|
|
2132
|
+
return /* @__PURE__ */ jsxs21("p", { className: "simple-value-links", children: [
|
|
2133
|
+
/* @__PURE__ */ jsx21("span", { className: "simple-value-links-label", children: side === "from" ? SIMPLE_DETAIL_STRINGS.from : SIMPLE_DETAIL_STRINGS.usedBy }),
|
|
2134
|
+
links.map((link, index) => /* @__PURE__ */ jsxs21(React7.Fragment, { children: [
|
|
2135
|
+
index > 0 && /* @__PURE__ */ jsx21("span", { className: "simple-value-links-sep", children: ", " }),
|
|
2136
|
+
/* @__PURE__ */ jsx21(NodeLink, { link, onOpenNode })
|
|
2137
|
+
] }, link.nodeId))
|
|
2138
|
+
] });
|
|
2139
|
+
}
|
|
2140
|
+
function NodeLink({
|
|
2141
|
+
link,
|
|
2142
|
+
onOpenNode
|
|
2143
|
+
}) {
|
|
2144
|
+
const label = link.kind === "input" ? `${SIMPLE_DETAIL_STRINGS.inputOfMethod}: ${link.title}` : link.kind === "output" ? `${SIMPLE_DETAIL_STRINGS.resultOfMethod}: ${link.title}` : link.title;
|
|
2145
|
+
if (!onOpenNode) return /* @__PURE__ */ jsx21("span", { className: "simple-link simple-link--static", children: label });
|
|
2146
|
+
return /* @__PURE__ */ jsx21(
|
|
2147
|
+
"button",
|
|
2148
|
+
{
|
|
2149
|
+
type: "button",
|
|
2150
|
+
className: `simple-link simple-link--${link.kind}`,
|
|
2151
|
+
onClick: (event) => onOpenNode(link.nodeId, event),
|
|
2152
|
+
children: label
|
|
2153
|
+
}
|
|
2154
|
+
);
|
|
2155
|
+
}
|
|
2156
|
+
function PlainProblem({ problem }) {
|
|
2157
|
+
var _a;
|
|
2158
|
+
return /* @__PURE__ */ jsxs21("div", { className: "simple-detail-problem", role: "alert", children: [
|
|
2159
|
+
problem.title && /* @__PURE__ */ jsx21("p", { className: "simple-detail-problem-title", children: problem.title }),
|
|
2160
|
+
problem.detail && /* @__PURE__ */ jsx21("p", { className: "simple-detail-problem-detail", children: problem.detail }),
|
|
2161
|
+
((_a = problem.next_step) == null ? void 0 : _a.detail) && /* @__PURE__ */ jsxs21("p", { className: "simple-detail-problem-next", children: [
|
|
2162
|
+
/* @__PURE__ */ jsxs21("span", { className: "simple-detail-problem-next-label", children: [
|
|
2163
|
+
SIMPLE_DETAIL_STRINGS.whatToDoNext,
|
|
2164
|
+
": "
|
|
2165
|
+
] }),
|
|
2166
|
+
problem.next_step.detail
|
|
2167
|
+
] })
|
|
2168
|
+
] });
|
|
2169
|
+
}
|
|
2170
|
+
function DocumentIcon({ list }) {
|
|
2171
|
+
return /* @__PURE__ */ jsx21(
|
|
2172
|
+
"span",
|
|
2173
|
+
{
|
|
2174
|
+
className: `simple-value-icon${list ? " simple-value-icon--list" : ""}`,
|
|
2175
|
+
"aria-hidden": "true",
|
|
2176
|
+
children: /* @__PURE__ */ jsxs21(Icon, { size: 13, children: [
|
|
2177
|
+
/* @__PURE__ */ jsx21("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
2178
|
+
/* @__PURE__ */ jsx21("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })
|
|
2179
|
+
] })
|
|
2180
|
+
}
|
|
2181
|
+
);
|
|
2182
|
+
}
|
|
2183
|
+
|
|
2184
|
+
// src/graph/react/viewer/graphArtifacts.ts
|
|
2185
|
+
function graphArtifactsFrom(source) {
|
|
2186
|
+
var _a, _b, _c;
|
|
2187
|
+
if (source.graph_spec === void 0 || source.graph_spec === null) return null;
|
|
2188
|
+
return {
|
|
2189
|
+
graphSpec: source.graph_spec,
|
|
2190
|
+
pipeIoContracts: (_a = source.pipe_io_contracts) != null ? _a : null,
|
|
2191
|
+
outputForm: (_b = source.output_form) != null ? _b : null,
|
|
2192
|
+
inputForm: (_c = source.input_form) != null ? _c : null
|
|
2193
|
+
};
|
|
1463
2194
|
}
|
|
1464
|
-
function
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
2195
|
+
function resultDescriptors(graph) {
|
|
2196
|
+
const pipeIoContracts = graph == null ? void 0 : graph.pipeIoContracts;
|
|
2197
|
+
const outputForm = graph == null ? void 0 : graph.outputForm;
|
|
2198
|
+
if (!pipeIoContracts || !outputForm) return null;
|
|
2199
|
+
const inputForm = graph == null ? void 0 : graph.inputForm;
|
|
2200
|
+
return inputForm ? { pipeIoContracts, outputForm, inputForm } : { pipeIoContracts, outputForm };
|
|
1470
2201
|
}
|
|
1471
2202
|
|
|
1472
|
-
// src/graph/react/
|
|
1473
|
-
import
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
2203
|
+
// src/graph/react/viewer/styleDetailPanels.tsx
|
|
2204
|
+
import { Fragment as Fragment15, jsx as jsx22 } from "react/jsx-runtime";
|
|
2205
|
+
function selectedNodeId(selection) {
|
|
2206
|
+
return selection && selection.kind !== "arrow" ? selection.nodeId : null;
|
|
2207
|
+
}
|
|
2208
|
+
var STYLE_DETAIL_PANELS = {
|
|
2209
|
+
[GRAPH_STYLE.DETAILED]: DetailedStylePanel,
|
|
2210
|
+
[GRAPH_STYLE.SIMPLE]: SimpleStylePanel
|
|
2211
|
+
};
|
|
2212
|
+
function DetailedStylePanel({
|
|
2213
|
+
selection,
|
|
2214
|
+
graphspec,
|
|
2215
|
+
artifacts,
|
|
2216
|
+
theme,
|
|
2217
|
+
valueOptions,
|
|
2218
|
+
onConceptClick
|
|
1481
2219
|
}) {
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
/* @__PURE__ */
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
2220
|
+
if (selection.kind === "arrow" || !graphspec) return null;
|
|
2221
|
+
if (selection.kind === "pipe") {
|
|
2222
|
+
const node = graphspec.nodes.find((n) => n.id === selection.nodeId);
|
|
2223
|
+
return node ? /* @__PURE__ */ jsx22(PipeDetailPanel, { node, spec: graphspec, onConceptClick }) : null;
|
|
2224
|
+
}
|
|
2225
|
+
if (!selection.stuffData) return null;
|
|
2226
|
+
return /* @__PURE__ */ jsx22(
|
|
2227
|
+
StuffNodeDetail,
|
|
2228
|
+
__spreadValues({
|
|
2229
|
+
nodeId: selection.nodeId,
|
|
2230
|
+
stuffData: selection.stuffData,
|
|
2231
|
+
producerPipeRef: selection.producerPipeRef,
|
|
2232
|
+
consumer: selection.consumer,
|
|
2233
|
+
graphspec,
|
|
2234
|
+
artifacts,
|
|
2235
|
+
theme
|
|
2236
|
+
}, valueOptions)
|
|
2237
|
+
);
|
|
2238
|
+
}
|
|
2239
|
+
function StuffNodeDetail(_a) {
|
|
2240
|
+
var _b = _a, {
|
|
2241
|
+
nodeId,
|
|
2242
|
+
stuffData,
|
|
2243
|
+
producerPipeRef,
|
|
2244
|
+
consumer,
|
|
2245
|
+
graphspec,
|
|
2246
|
+
artifacts,
|
|
2247
|
+
theme
|
|
2248
|
+
} = _b, valueOptions = __objRest(_b, [
|
|
2249
|
+
"nodeId",
|
|
2250
|
+
"stuffData",
|
|
2251
|
+
"producerPipeRef",
|
|
2252
|
+
"consumer",
|
|
2253
|
+
"graphspec",
|
|
2254
|
+
"artifacts",
|
|
2255
|
+
"theme"
|
|
2256
|
+
]);
|
|
2257
|
+
var _a2;
|
|
2258
|
+
const conceptInfo = stuffData.concept && graphspec ? resolveConceptRef(graphspec, stuffData.concept) : void 0;
|
|
2259
|
+
const isDryRun = graphSpecMode(graphspec) === GRAPH_SPEC_MODE.DRY;
|
|
2260
|
+
const descriptors = resultDescriptors(artifacts);
|
|
2261
|
+
const renderData = descriptors ? () => /* @__PURE__ */ jsx22(
|
|
2262
|
+
ResultView,
|
|
2263
|
+
{
|
|
2264
|
+
artifacts,
|
|
2265
|
+
graphspec,
|
|
2266
|
+
stuff: stuffData,
|
|
2267
|
+
producerPipeRef,
|
|
2268
|
+
consumer,
|
|
2269
|
+
theme,
|
|
2270
|
+
valueOptions
|
|
2271
|
+
}
|
|
2272
|
+
) : void 0;
|
|
2273
|
+
if (conceptInfo) {
|
|
2274
|
+
return /* @__PURE__ */ jsx22(
|
|
2275
|
+
ConceptDetailPanel,
|
|
1497
2276
|
{
|
|
1498
|
-
concept,
|
|
1499
|
-
ioData,
|
|
2277
|
+
concept: conceptInfo,
|
|
2278
|
+
ioData: stuffData,
|
|
1500
2279
|
isDryRun,
|
|
2280
|
+
instanceKey: nodeId,
|
|
1501
2281
|
renderData
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
2282
|
+
}
|
|
2283
|
+
);
|
|
2284
|
+
}
|
|
2285
|
+
if (isDryRun) return /* @__PURE__ */ jsx22("div", { className: "detail-not-available", children: "Dry run data hidden" });
|
|
2286
|
+
return /* @__PURE__ */ jsx22(Fragment15, { children: (_a2 = renderData == null ? void 0 : renderData()) != null ? _a2 : /* @__PURE__ */ jsx22("div", { className: "detail-not-available", children: "No data" }) });
|
|
1506
2287
|
}
|
|
1507
|
-
function
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
const
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
2288
|
+
function ResultView({
|
|
2289
|
+
artifacts,
|
|
2290
|
+
graphspec,
|
|
2291
|
+
stuff,
|
|
2292
|
+
producerPipeRef,
|
|
2293
|
+
consumer,
|
|
2294
|
+
theme,
|
|
2295
|
+
valueOptions
|
|
2296
|
+
}) {
|
|
2297
|
+
const descriptors = resultDescriptors(artifacts);
|
|
2298
|
+
if (!descriptors) return null;
|
|
2299
|
+
const concept = stuff.concept && graphspec ? resolveConceptRef(graphspec, stuff.concept) : void 0;
|
|
2300
|
+
const { resolveUrl, resolveRendition, resolveShareUrl, saveFiles, downloads } = valueOptions;
|
|
2301
|
+
return /* @__PURE__ */ jsx22(
|
|
2302
|
+
StuffResultPanel,
|
|
2303
|
+
__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, descriptors), {
|
|
2304
|
+
stuff
|
|
2305
|
+
}), concept ? { concept } : {}), producerPipeRef ? { producerPipeRef } : {}), consumer ? { consumer } : {}), resolveUrl ? { resolveUrl } : {}), resolveRendition ? { resolveRendition } : {}), resolveShareUrl ? { resolveShareUrl } : {}), saveFiles ? { saveFiles } : {}), downloads ? { downloads } : {}), {
|
|
2306
|
+
theme
|
|
2307
|
+
})
|
|
2308
|
+
);
|
|
2309
|
+
}
|
|
2310
|
+
function SimpleStylePanel(props) {
|
|
2311
|
+
const { selection, graphspec, artifacts, theme, valueOptions, nodes, drawing, onOpenNode } = props;
|
|
2312
|
+
const detail = React8.useMemo(() => {
|
|
2313
|
+
if (!graphspec || !drawing) return null;
|
|
2314
|
+
const target = selection.kind === "arrow" ? { kind: "arrow", source: selection.source, target: selection.target } : { kind: "node", id: selection.nodeId };
|
|
2315
|
+
return buildSimpleNodeDetail(
|
|
2316
|
+
{
|
|
2317
|
+
graphspec,
|
|
2318
|
+
nodes: nodes.map((n) => {
|
|
2319
|
+
var _a;
|
|
2320
|
+
return { id: n.id, type: (_a = n.type) != null ? _a : "", data: n.data };
|
|
2321
|
+
}),
|
|
2322
|
+
edges: drawing.edges,
|
|
2323
|
+
valueFlows: drawing.valueFlows,
|
|
2324
|
+
runs: drawing.runs,
|
|
2325
|
+
frameContents: drawing.frameContents
|
|
2326
|
+
},
|
|
2327
|
+
target
|
|
2328
|
+
);
|
|
2329
|
+
}, [graphspec, drawing, nodes, selection]);
|
|
2330
|
+
if (!detail || !graphspec) return /* @__PURE__ */ jsx22(DetailedStylePanel, __spreadValues({}, props));
|
|
2331
|
+
const renderValue = (value) => {
|
|
2332
|
+
const location = value.location;
|
|
2333
|
+
if (!location || location.item.data === void 0 || location.item.data === null) return null;
|
|
2334
|
+
if (!resultDescriptors(artifacts)) return null;
|
|
2335
|
+
return /* @__PURE__ */ jsx22(
|
|
2336
|
+
ResultView,
|
|
2337
|
+
{
|
|
2338
|
+
artifacts,
|
|
2339
|
+
graphspec,
|
|
2340
|
+
stuff: location.item,
|
|
2341
|
+
producerPipeRef: location.producerPipeRef,
|
|
2342
|
+
consumer: location.consumer,
|
|
2343
|
+
theme,
|
|
2344
|
+
valueOptions
|
|
2345
|
+
}
|
|
2346
|
+
);
|
|
1539
2347
|
};
|
|
1540
|
-
|
|
1541
|
-
|
|
2348
|
+
return /* @__PURE__ */ jsx22(
|
|
2349
|
+
SimpleDetailPanel,
|
|
1542
2350
|
{
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
onClick: () => setActiveTab(tab),
|
|
1551
|
-
onKeyDown: onTabKeyDown,
|
|
1552
|
-
children: label
|
|
1553
|
-
}
|
|
2351
|
+
detail,
|
|
2352
|
+
mode: graphSpecMode(graphspec),
|
|
2353
|
+
renderValue,
|
|
2354
|
+
renderTechnical: technicalFor(detail, graphspec),
|
|
2355
|
+
onOpenNode
|
|
2356
|
+
},
|
|
2357
|
+
detailKey(detail)
|
|
1554
2358
|
);
|
|
1555
|
-
return /* @__PURE__ */ jsxs19(Fragment12, { children: [
|
|
1556
|
-
/* @__PURE__ */ jsxs19("div", { className: "detail-tabs", role: "tablist", "aria-label": "Concept views", children: [
|
|
1557
|
-
renderTab("data", "Data"),
|
|
1558
|
-
renderTab("structure", "Structure")
|
|
1559
|
-
] }),
|
|
1560
|
-
/* @__PURE__ */ jsx19("div", { role: "tabpanel", id: panelId(activeTab), "aria-labelledby": tabId(activeTab), children: activeTab === "data" ? dataView : structure })
|
|
1561
|
-
] });
|
|
1562
2359
|
}
|
|
1563
|
-
function
|
|
1564
|
-
|
|
1565
|
-
const properties = schema.properties;
|
|
1566
|
-
const required = new Set((_a = schema.required) != null ? _a : []);
|
|
1567
|
-
if (!properties || Object.keys(properties).length === 0) {
|
|
1568
|
-
return /* @__PURE__ */ jsx19("div", { className: "detail-not-available", children: "No fields defined" });
|
|
1569
|
-
}
|
|
1570
|
-
const fields = Object.entries(properties);
|
|
1571
|
-
return /* @__PURE__ */ jsxs19("table", { className: "detail-schema-table", children: [
|
|
1572
|
-
/* @__PURE__ */ jsx19("thead", { children: /* @__PURE__ */ jsxs19("tr", { children: [
|
|
1573
|
-
/* @__PURE__ */ jsx19("th", { children: "Field" }),
|
|
1574
|
-
/* @__PURE__ */ jsx19("th", { children: "Type" }),
|
|
1575
|
-
/* @__PURE__ */ jsx19("th", {}),
|
|
1576
|
-
/* @__PURE__ */ jsx19("th", { children: "Description" })
|
|
1577
|
-
] }) }),
|
|
1578
|
-
/* @__PURE__ */ jsx19("tbody", { children: fields.map(([fieldName, fieldSchema]) => {
|
|
1579
|
-
var _a2;
|
|
1580
|
-
return /* @__PURE__ */ jsxs19("tr", { children: [
|
|
1581
|
-
/* @__PURE__ */ jsx19("td", { className: "detail-schema-field", children: fieldName }),
|
|
1582
|
-
/* @__PURE__ */ jsx19("td", { className: "detail-schema-type", children: extractType(fieldSchema) }),
|
|
1583
|
-
/* @__PURE__ */ jsx19("td", { children: required.has(fieldName) && /* @__PURE__ */ jsx19("span", { className: "detail-schema-required", children: "req" }) }),
|
|
1584
|
-
/* @__PURE__ */ jsx19("td", { children: (_a2 = fieldSchema.description) != null ? _a2 : "" })
|
|
1585
|
-
] }, fieldName);
|
|
1586
|
-
}) })
|
|
1587
|
-
] });
|
|
2360
|
+
function detailKey(detail) {
|
|
2361
|
+
return detail.kind === "arrow" ? `arrow:${detail.edgeId}` : `node:${detail.nodeId}`;
|
|
1588
2362
|
}
|
|
1589
|
-
function
|
|
2363
|
+
function technicalFor(detail, graphspec) {
|
|
1590
2364
|
var _a;
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
2365
|
+
switch (detail.kind) {
|
|
2366
|
+
case "step":
|
|
2367
|
+
case "decision":
|
|
2368
|
+
case "frame":
|
|
2369
|
+
return () => /* @__PURE__ */ jsx22(PipeDetailPanel, { node: detail.specNode, spec: graphspec });
|
|
2370
|
+
case "value": {
|
|
2371
|
+
const item = (_a = detail.value.location) == null ? void 0 : _a.item;
|
|
2372
|
+
const concept = (item == null ? void 0 : item.concept) ? resolveConceptRef(graphspec, item.concept) : void 0;
|
|
2373
|
+
if (!concept) return void 0;
|
|
2374
|
+
return () => /* @__PURE__ */ jsx22(ConceptDetailPanel, { concept, ioData: item });
|
|
2375
|
+
}
|
|
2376
|
+
case "arrow":
|
|
2377
|
+
return void 0;
|
|
1598
2378
|
}
|
|
1599
|
-
return "(unresolved type)";
|
|
1600
2379
|
}
|
|
1601
2380
|
|
|
1602
2381
|
// src/graph/react/rfTypes.ts
|
|
@@ -1632,10 +2411,10 @@ function toAppEdges(edges) {
|
|
|
1632
2411
|
}
|
|
1633
2412
|
|
|
1634
2413
|
// src/graph/react/viewer/renderLabel.tsx
|
|
1635
|
-
import { jsx as
|
|
2414
|
+
import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1636
2415
|
function renderLabel(desc) {
|
|
1637
2416
|
if (desc.kind === "pipe") {
|
|
1638
|
-
return /* @__PURE__ */
|
|
2417
|
+
return /* @__PURE__ */ jsx23(
|
|
1639
2418
|
"div",
|
|
1640
2419
|
{
|
|
1641
2420
|
style: {
|
|
@@ -1649,7 +2428,7 @@ function renderLabel(desc) {
|
|
|
1649
2428
|
minWidth: 0
|
|
1650
2429
|
},
|
|
1651
2430
|
title: desc.label,
|
|
1652
|
-
children: /* @__PURE__ */
|
|
2431
|
+
children: /* @__PURE__ */ jsx23(
|
|
1653
2432
|
"span",
|
|
1654
2433
|
{
|
|
1655
2434
|
style: {
|
|
@@ -1668,7 +2447,7 @@ function renderLabel(desc) {
|
|
|
1668
2447
|
}
|
|
1669
2448
|
);
|
|
1670
2449
|
}
|
|
1671
|
-
return /* @__PURE__ */
|
|
2450
|
+
return /* @__PURE__ */ jsxs22(
|
|
1672
2451
|
"div",
|
|
1673
2452
|
{
|
|
1674
2453
|
style: {
|
|
@@ -1684,7 +2463,7 @@ function renderLabel(desc) {
|
|
|
1684
2463
|
},
|
|
1685
2464
|
title: desc.concept ? `${desc.label}: ${desc.concept}` : desc.label,
|
|
1686
2465
|
children: [
|
|
1687
|
-
/* @__PURE__ */
|
|
2466
|
+
/* @__PURE__ */ jsx23(
|
|
1688
2467
|
"span",
|
|
1689
2468
|
{
|
|
1690
2469
|
style: {
|
|
@@ -1700,7 +2479,7 @@ function renderLabel(desc) {
|
|
|
1700
2479
|
children: desc.label
|
|
1701
2480
|
}
|
|
1702
2481
|
),
|
|
1703
|
-
desc.concept && /* @__PURE__ */
|
|
2482
|
+
desc.concept && /* @__PURE__ */ jsx23(
|
|
1704
2483
|
"span",
|
|
1705
2484
|
{
|
|
1706
2485
|
style: {
|
|
@@ -1775,13 +2554,13 @@ function placeCanvasFailure({
|
|
|
1775
2554
|
}
|
|
1776
2555
|
|
|
1777
2556
|
// src/graph/react/viewer/GraphErrorState.tsx
|
|
1778
|
-
import
|
|
1779
|
-
import { jsx as
|
|
2557
|
+
import React9 from "react";
|
|
2558
|
+
import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1780
2559
|
var GRAPH_ERROR_STATE_TITLE = "This method graph could not be drawn";
|
|
1781
2560
|
function GraphErrorState({ failure }) {
|
|
1782
|
-
return /* @__PURE__ */
|
|
1783
|
-
/* @__PURE__ */
|
|
1784
|
-
/* @__PURE__ */
|
|
2561
|
+
return /* @__PURE__ */ jsxs23("div", { className: "graph-error-state", role: "alert", children: [
|
|
2562
|
+
/* @__PURE__ */ jsx24("p", { className: "graph-error-state-title", children: GRAPH_ERROR_STATE_TITLE }),
|
|
2563
|
+
/* @__PURE__ */ jsx24("p", { className: "graph-error-state-detail", children: failure })
|
|
1785
2564
|
] });
|
|
1786
2565
|
}
|
|
1787
2566
|
var GRAPH_RELAYOUT_FAILURE_TITLE = "This view of the method graph could not be drawn";
|
|
@@ -1791,20 +2570,20 @@ function GraphRelayoutFailure({
|
|
|
1791
2570
|
toolbarShown,
|
|
1792
2571
|
rightOffset = 0
|
|
1793
2572
|
}) {
|
|
1794
|
-
return /* @__PURE__ */
|
|
2573
|
+
return /* @__PURE__ */ jsx24(
|
|
1795
2574
|
"div",
|
|
1796
2575
|
{
|
|
1797
2576
|
className: "graph-relayout-failure",
|
|
1798
2577
|
style: rightOffset > 0 ? { right: rightOffset } : void 0,
|
|
1799
|
-
children: /* @__PURE__ */
|
|
1800
|
-
/* @__PURE__ */
|
|
1801
|
-
/* @__PURE__ */
|
|
1802
|
-
toolbarShown && /* @__PURE__ */
|
|
2578
|
+
children: /* @__PURE__ */ jsxs23("div", { className: "graph-error-state graph-error-state--floating", role: "alert", children: [
|
|
2579
|
+
/* @__PURE__ */ jsx24("p", { className: "graph-error-state-title", children: GRAPH_RELAYOUT_FAILURE_TITLE }),
|
|
2580
|
+
/* @__PURE__ */ jsx24("p", { className: "graph-error-state-detail", children: failure }),
|
|
2581
|
+
toolbarShown && /* @__PURE__ */ jsx24("p", { className: "graph-error-state-hint", children: GRAPH_RELAYOUT_FAILURE_HINT })
|
|
1803
2582
|
] })
|
|
1804
2583
|
}
|
|
1805
2584
|
);
|
|
1806
2585
|
}
|
|
1807
|
-
var GraphFailureBoundary = class extends
|
|
2586
|
+
var GraphFailureBoundary = class extends React9.Component {
|
|
1808
2587
|
constructor() {
|
|
1809
2588
|
super(...arguments);
|
|
1810
2589
|
this.state = { failure: null, resetKey: this.props.resetKey };
|
|
@@ -1825,11 +2604,11 @@ var GraphFailureBoundary = class extends React7.Component {
|
|
|
1825
2604
|
};
|
|
1826
2605
|
|
|
1827
2606
|
// src/graph/react/viewer/GraphToolbar.tsx
|
|
1828
|
-
import
|
|
2607
|
+
import React10 from "react";
|
|
1829
2608
|
import { Panel } from "@xyflow/react";
|
|
1830
2609
|
|
|
1831
2610
|
// src/graph/react/viewer/ValidationPanel.tsx
|
|
1832
|
-
import { jsx as
|
|
2611
|
+
import { jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1833
2612
|
function validationLabel(state, issueCount) {
|
|
1834
2613
|
const issues = issueCount === 1 ? "1 issue" : `${issueCount} issues`;
|
|
1835
2614
|
switch (state) {
|
|
@@ -1896,7 +2675,7 @@ function ValidationPanel({
|
|
|
1896
2675
|
placement,
|
|
1897
2676
|
id
|
|
1898
2677
|
}) {
|
|
1899
|
-
return /* @__PURE__ */
|
|
2678
|
+
return /* @__PURE__ */ jsxs24(
|
|
1900
2679
|
"div",
|
|
1901
2680
|
{
|
|
1902
2681
|
id,
|
|
@@ -1904,18 +2683,18 @@ function ValidationPanel({
|
|
|
1904
2683
|
role: "region",
|
|
1905
2684
|
"aria-label": "Validation issues",
|
|
1906
2685
|
children: [
|
|
1907
|
-
/* @__PURE__ */
|
|
1908
|
-
issues.length === 0 ? /* @__PURE__ */
|
|
2686
|
+
/* @__PURE__ */ jsx25("div", { className: "graph-validation-panel-header", children: validationLabel(state, issues.length) }),
|
|
2687
|
+
issues.length === 0 ? /* @__PURE__ */ jsx25("div", { className: "graph-validation-empty", children: validationEmptyText(state) }) : /* @__PURE__ */ jsx25("ul", { className: "graph-validation-issues", role: "list", children: issues.map((issue, index) => {
|
|
1909
2688
|
const clickable = onIssueClick !== void 0;
|
|
1910
|
-
const meta = (issue.context || issue.file) && /* @__PURE__ */
|
|
1911
|
-
issue.context && /* @__PURE__ */
|
|
1912
|
-
issue.file && /* @__PURE__ */
|
|
2689
|
+
const meta = (issue.context || issue.file) && /* @__PURE__ */ jsxs24("div", { className: "graph-validation-issue-meta", children: [
|
|
2690
|
+
issue.context && /* @__PURE__ */ jsx25("span", { className: "graph-validation-issue-context", children: issue.context }),
|
|
2691
|
+
issue.file && /* @__PURE__ */ jsx25("span", { className: "graph-validation-issue-file", children: issue.file })
|
|
1913
2692
|
] });
|
|
1914
|
-
return /* @__PURE__ */
|
|
2693
|
+
return /* @__PURE__ */ jsx25(
|
|
1915
2694
|
"li",
|
|
1916
2695
|
{
|
|
1917
2696
|
className: `graph-validation-issue graph-validation-issue--${issue.severity}` + (clickable ? " graph-validation-issue--clickable" : ""),
|
|
1918
|
-
children: /* @__PURE__ */
|
|
2697
|
+
children: /* @__PURE__ */ jsxs24(
|
|
1919
2698
|
"div",
|
|
1920
2699
|
{
|
|
1921
2700
|
className: "graph-validation-issue-body",
|
|
@@ -1930,8 +2709,8 @@ function ValidationPanel({
|
|
|
1930
2709
|
} : void 0,
|
|
1931
2710
|
children: [
|
|
1932
2711
|
meta,
|
|
1933
|
-
/* @__PURE__ */
|
|
1934
|
-
issue.suggestedFix && /* @__PURE__ */
|
|
2712
|
+
/* @__PURE__ */ jsx25("div", { className: "graph-validation-issue-message", children: issue.message }),
|
|
2713
|
+
issue.suggestedFix && /* @__PURE__ */ jsx25("div", { className: "graph-validation-issue-fix", children: issue.suggestedFix })
|
|
1935
2714
|
]
|
|
1936
2715
|
}
|
|
1937
2716
|
)
|
|
@@ -1945,9 +2724,9 @@ function ValidationPanel({
|
|
|
1945
2724
|
}
|
|
1946
2725
|
|
|
1947
2726
|
// src/graph/react/viewer/GraphToolbar.tsx
|
|
1948
|
-
import { Fragment as
|
|
2727
|
+
import { Fragment as Fragment16, jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1949
2728
|
var REACTFLOW_PANEL_MARGIN = 15;
|
|
1950
|
-
var ARROW_RIGHT_ICON = /* @__PURE__ */
|
|
2729
|
+
var ARROW_RIGHT_ICON = /* @__PURE__ */ jsxs25(
|
|
1951
2730
|
"svg",
|
|
1952
2731
|
{
|
|
1953
2732
|
viewBox: "0 0 24 24",
|
|
@@ -1959,12 +2738,12 @@ var ARROW_RIGHT_ICON = /* @__PURE__ */ jsxs23(
|
|
|
1959
2738
|
strokeLinecap: "round",
|
|
1960
2739
|
strokeLinejoin: "round",
|
|
1961
2740
|
children: [
|
|
1962
|
-
/* @__PURE__ */
|
|
1963
|
-
/* @__PURE__ */
|
|
2741
|
+
/* @__PURE__ */ jsx26("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
2742
|
+
/* @__PURE__ */ jsx26("polyline", { points: "12 5 19 12 12 19" })
|
|
1964
2743
|
]
|
|
1965
2744
|
}
|
|
1966
2745
|
);
|
|
1967
|
-
var ARROW_DOWN_ICON = /* @__PURE__ */
|
|
2746
|
+
var ARROW_DOWN_ICON = /* @__PURE__ */ jsxs25(
|
|
1968
2747
|
"svg",
|
|
1969
2748
|
{
|
|
1970
2749
|
viewBox: "0 0 24 24",
|
|
@@ -1976,12 +2755,12 @@ var ARROW_DOWN_ICON = /* @__PURE__ */ jsxs23(
|
|
|
1976
2755
|
strokeLinecap: "round",
|
|
1977
2756
|
strokeLinejoin: "round",
|
|
1978
2757
|
children: [
|
|
1979
|
-
/* @__PURE__ */
|
|
1980
|
-
/* @__PURE__ */
|
|
2758
|
+
/* @__PURE__ */ jsx26("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
2759
|
+
/* @__PURE__ */ jsx26("polyline", { points: "19 12 12 19 5 12" })
|
|
1981
2760
|
]
|
|
1982
2761
|
}
|
|
1983
2762
|
);
|
|
1984
|
-
var MINUS_ICON = /* @__PURE__ */
|
|
2763
|
+
var MINUS_ICON = /* @__PURE__ */ jsx26(
|
|
1985
2764
|
"svg",
|
|
1986
2765
|
{
|
|
1987
2766
|
viewBox: "0 0 24 24",
|
|
@@ -1992,10 +2771,10 @@ var MINUS_ICON = /* @__PURE__ */ jsx23(
|
|
|
1992
2771
|
strokeWidth: "2",
|
|
1993
2772
|
strokeLinecap: "round",
|
|
1994
2773
|
strokeLinejoin: "round",
|
|
1995
|
-
children: /* @__PURE__ */
|
|
2774
|
+
children: /* @__PURE__ */ jsx26("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
1996
2775
|
}
|
|
1997
2776
|
);
|
|
1998
|
-
var PLUS_ICON = /* @__PURE__ */
|
|
2777
|
+
var PLUS_ICON = /* @__PURE__ */ jsxs25(
|
|
1999
2778
|
"svg",
|
|
2000
2779
|
{
|
|
2001
2780
|
viewBox: "0 0 24 24",
|
|
@@ -2007,12 +2786,12 @@ var PLUS_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2007
2786
|
strokeLinecap: "round",
|
|
2008
2787
|
strokeLinejoin: "round",
|
|
2009
2788
|
children: [
|
|
2010
|
-
/* @__PURE__ */
|
|
2011
|
-
/* @__PURE__ */
|
|
2789
|
+
/* @__PURE__ */ jsx26("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
2790
|
+
/* @__PURE__ */ jsx26("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
2012
2791
|
]
|
|
2013
2792
|
}
|
|
2014
2793
|
);
|
|
2015
|
-
var FIT_VIEW_ICON = /* @__PURE__ */
|
|
2794
|
+
var FIT_VIEW_ICON = /* @__PURE__ */ jsxs25(
|
|
2016
2795
|
"svg",
|
|
2017
2796
|
{
|
|
2018
2797
|
viewBox: "0 0 24 24",
|
|
@@ -2024,14 +2803,14 @@ var FIT_VIEW_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2024
2803
|
strokeLinecap: "round",
|
|
2025
2804
|
strokeLinejoin: "round",
|
|
2026
2805
|
children: [
|
|
2027
|
-
/* @__PURE__ */
|
|
2028
|
-
/* @__PURE__ */
|
|
2029
|
-
/* @__PURE__ */
|
|
2030
|
-
/* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ jsx26("polyline", { points: "15 3 21 3 21 9" }),
|
|
2807
|
+
/* @__PURE__ */ jsx26("polyline", { points: "9 21 3 21 3 15" }),
|
|
2808
|
+
/* @__PURE__ */ jsx26("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
2809
|
+
/* @__PURE__ */ jsx26("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
2031
2810
|
]
|
|
2032
2811
|
}
|
|
2033
2812
|
);
|
|
2034
|
-
var BOXES_ICON = /* @__PURE__ */
|
|
2813
|
+
var BOXES_ICON = /* @__PURE__ */ jsxs25(
|
|
2035
2814
|
"svg",
|
|
2036
2815
|
{
|
|
2037
2816
|
viewBox: "0 0 24 24",
|
|
@@ -2043,22 +2822,22 @@ var BOXES_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2043
2822
|
strokeLinecap: "round",
|
|
2044
2823
|
strokeLinejoin: "round",
|
|
2045
2824
|
children: [
|
|
2046
|
-
/* @__PURE__ */
|
|
2047
|
-
/* @__PURE__ */
|
|
2048
|
-
/* @__PURE__ */
|
|
2049
|
-
/* @__PURE__ */
|
|
2050
|
-
/* @__PURE__ */
|
|
2051
|
-
/* @__PURE__ */
|
|
2052
|
-
/* @__PURE__ */
|
|
2053
|
-
/* @__PURE__ */
|
|
2054
|
-
/* @__PURE__ */
|
|
2055
|
-
/* @__PURE__ */
|
|
2056
|
-
/* @__PURE__ */
|
|
2057
|
-
/* @__PURE__ */
|
|
2825
|
+
/* @__PURE__ */ jsx26("path", { d: "M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z" }),
|
|
2826
|
+
/* @__PURE__ */ jsx26("path", { d: "m7 16.5-4.74-2.85" }),
|
|
2827
|
+
/* @__PURE__ */ jsx26("path", { d: "m7 16.5 5-3" }),
|
|
2828
|
+
/* @__PURE__ */ jsx26("path", { d: "M7 16.5v5.17" }),
|
|
2829
|
+
/* @__PURE__ */ jsx26("path", { d: "M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z" }),
|
|
2830
|
+
/* @__PURE__ */ jsx26("path", { d: "m17 16.5-5-3" }),
|
|
2831
|
+
/* @__PURE__ */ jsx26("path", { d: "m17 16.5 4.74-2.85" }),
|
|
2832
|
+
/* @__PURE__ */ jsx26("path", { d: "M17 16.5v5.17" }),
|
|
2833
|
+
/* @__PURE__ */ jsx26("path", { d: "M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z" }),
|
|
2834
|
+
/* @__PURE__ */ jsx26("path", { d: "M12 8 7.26 5.15" }),
|
|
2835
|
+
/* @__PURE__ */ jsx26("path", { d: "m12 8 4.74-2.85" }),
|
|
2836
|
+
/* @__PURE__ */ jsx26("path", { d: "M12 13.5V8" })
|
|
2058
2837
|
]
|
|
2059
2838
|
}
|
|
2060
2839
|
);
|
|
2061
|
-
var FOLD_ALL_ICON = /* @__PURE__ */
|
|
2840
|
+
var FOLD_ALL_ICON = /* @__PURE__ */ jsxs25(
|
|
2062
2841
|
"svg",
|
|
2063
2842
|
{
|
|
2064
2843
|
viewBox: "0 0 24 24",
|
|
@@ -2070,15 +2849,15 @@ var FOLD_ALL_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2070
2849
|
strokeLinecap: "round",
|
|
2071
2850
|
strokeLinejoin: "round",
|
|
2072
2851
|
children: [
|
|
2073
|
-
/* @__PURE__ */
|
|
2074
|
-
/* @__PURE__ */
|
|
2075
|
-
/* @__PURE__ */
|
|
2076
|
-
/* @__PURE__ */
|
|
2077
|
-
/* @__PURE__ */
|
|
2852
|
+
/* @__PURE__ */ jsx26("rect", { x: "6", y: "6", width: "12", height: "12", rx: "2" }),
|
|
2853
|
+
/* @__PURE__ */ jsx26("polyline", { points: "2 2 6 6 2 6" }),
|
|
2854
|
+
/* @__PURE__ */ jsx26("polyline", { points: "22 2 18 6 22 6" }),
|
|
2855
|
+
/* @__PURE__ */ jsx26("polyline", { points: "2 22 6 18 2 18" }),
|
|
2856
|
+
/* @__PURE__ */ jsx26("polyline", { points: "22 22 18 18 22 18" })
|
|
2078
2857
|
]
|
|
2079
2858
|
}
|
|
2080
2859
|
);
|
|
2081
|
-
var EXPAND_ALL_ICON = /* @__PURE__ */
|
|
2860
|
+
var EXPAND_ALL_ICON = /* @__PURE__ */ jsxs25(
|
|
2082
2861
|
"svg",
|
|
2083
2862
|
{
|
|
2084
2863
|
viewBox: "0 0 24 24",
|
|
@@ -2090,15 +2869,15 @@ var EXPAND_ALL_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2090
2869
|
strokeLinecap: "round",
|
|
2091
2870
|
strokeLinejoin: "round",
|
|
2092
2871
|
children: [
|
|
2093
|
-
/* @__PURE__ */
|
|
2094
|
-
/* @__PURE__ */
|
|
2095
|
-
/* @__PURE__ */
|
|
2096
|
-
/* @__PURE__ */
|
|
2097
|
-
/* @__PURE__ */
|
|
2872
|
+
/* @__PURE__ */ jsx26("rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" }),
|
|
2873
|
+
/* @__PURE__ */ jsx26("polyline", { points: "3 3 7 7 3 7" }),
|
|
2874
|
+
/* @__PURE__ */ jsx26("polyline", { points: "21 3 17 7 21 7" }),
|
|
2875
|
+
/* @__PURE__ */ jsx26("polyline", { points: "3 21 7 17 3 17" }),
|
|
2876
|
+
/* @__PURE__ */ jsx26("polyline", { points: "21 21 17 17 21 17" })
|
|
2098
2877
|
]
|
|
2099
2878
|
}
|
|
2100
2879
|
);
|
|
2101
|
-
var SUN_ICON = /* @__PURE__ */
|
|
2880
|
+
var SUN_ICON = /* @__PURE__ */ jsxs25(
|
|
2102
2881
|
"svg",
|
|
2103
2882
|
{
|
|
2104
2883
|
viewBox: "0 0 24 24",
|
|
@@ -2110,19 +2889,19 @@ var SUN_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2110
2889
|
strokeLinecap: "round",
|
|
2111
2890
|
strokeLinejoin: "round",
|
|
2112
2891
|
children: [
|
|
2113
|
-
/* @__PURE__ */
|
|
2114
|
-
/* @__PURE__ */
|
|
2115
|
-
/* @__PURE__ */
|
|
2116
|
-
/* @__PURE__ */
|
|
2117
|
-
/* @__PURE__ */
|
|
2118
|
-
/* @__PURE__ */
|
|
2119
|
-
/* @__PURE__ */
|
|
2120
|
-
/* @__PURE__ */
|
|
2121
|
-
/* @__PURE__ */
|
|
2892
|
+
/* @__PURE__ */ jsx26("circle", { cx: "12", cy: "12", r: "4" }),
|
|
2893
|
+
/* @__PURE__ */ jsx26("line", { x1: "12", y1: "2", x2: "12", y2: "4" }),
|
|
2894
|
+
/* @__PURE__ */ jsx26("line", { x1: "12", y1: "20", x2: "12", y2: "22" }),
|
|
2895
|
+
/* @__PURE__ */ jsx26("line", { x1: "4.93", y1: "4.93", x2: "6.34", y2: "6.34" }),
|
|
2896
|
+
/* @__PURE__ */ jsx26("line", { x1: "17.66", y1: "17.66", x2: "19.07", y2: "19.07" }),
|
|
2897
|
+
/* @__PURE__ */ jsx26("line", { x1: "2", y1: "12", x2: "4", y2: "12" }),
|
|
2898
|
+
/* @__PURE__ */ jsx26("line", { x1: "20", y1: "12", x2: "22", y2: "12" }),
|
|
2899
|
+
/* @__PURE__ */ jsx26("line", { x1: "4.93", y1: "19.07", x2: "6.34", y2: "17.66" }),
|
|
2900
|
+
/* @__PURE__ */ jsx26("line", { x1: "17.66", y1: "6.34", x2: "19.07", y2: "4.93" })
|
|
2122
2901
|
]
|
|
2123
2902
|
}
|
|
2124
2903
|
);
|
|
2125
|
-
var MOON_ICON = /* @__PURE__ */
|
|
2904
|
+
var MOON_ICON = /* @__PURE__ */ jsx26(
|
|
2126
2905
|
"svg",
|
|
2127
2906
|
{
|
|
2128
2907
|
viewBox: "0 0 24 24",
|
|
@@ -2133,10 +2912,10 @@ var MOON_ICON = /* @__PURE__ */ jsx23(
|
|
|
2133
2912
|
strokeWidth: "2",
|
|
2134
2913
|
strokeLinecap: "round",
|
|
2135
2914
|
strokeLinejoin: "round",
|
|
2136
|
-
children: /* @__PURE__ */
|
|
2915
|
+
children: /* @__PURE__ */ jsx26("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
|
|
2137
2916
|
}
|
|
2138
2917
|
);
|
|
2139
|
-
var MONITOR_ICON = /* @__PURE__ */
|
|
2918
|
+
var MONITOR_ICON = /* @__PURE__ */ jsxs25(
|
|
2140
2919
|
"svg",
|
|
2141
2920
|
{
|
|
2142
2921
|
viewBox: "0 0 24 24",
|
|
@@ -2148,13 +2927,13 @@ var MONITOR_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2148
2927
|
strokeLinecap: "round",
|
|
2149
2928
|
strokeLinejoin: "round",
|
|
2150
2929
|
children: [
|
|
2151
|
-
/* @__PURE__ */
|
|
2152
|
-
/* @__PURE__ */
|
|
2153
|
-
/* @__PURE__ */
|
|
2930
|
+
/* @__PURE__ */ jsx26("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
|
|
2931
|
+
/* @__PURE__ */ jsx26("line", { x1: "8", y1: "21", x2: "16", y2: "21" }),
|
|
2932
|
+
/* @__PURE__ */ jsx26("line", { x1: "12", y1: "17", x2: "12", y2: "21" })
|
|
2154
2933
|
]
|
|
2155
2934
|
}
|
|
2156
2935
|
);
|
|
2157
|
-
var SPINNER_ICON = /* @__PURE__ */
|
|
2936
|
+
var SPINNER_ICON = /* @__PURE__ */ jsx26(
|
|
2158
2937
|
"svg",
|
|
2159
2938
|
{
|
|
2160
2939
|
className: "graph-toolbar-validation-spin",
|
|
@@ -2166,10 +2945,10 @@ var SPINNER_ICON = /* @__PURE__ */ jsx23(
|
|
|
2166
2945
|
strokeWidth: "2",
|
|
2167
2946
|
strokeLinecap: "round",
|
|
2168
2947
|
strokeLinejoin: "round",
|
|
2169
|
-
children: /* @__PURE__ */
|
|
2948
|
+
children: /* @__PURE__ */ jsx26("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
|
|
2170
2949
|
}
|
|
2171
2950
|
);
|
|
2172
|
-
var CHECK_ICON2 = /* @__PURE__ */
|
|
2951
|
+
var CHECK_ICON2 = /* @__PURE__ */ jsx26(
|
|
2173
2952
|
"svg",
|
|
2174
2953
|
{
|
|
2175
2954
|
viewBox: "0 0 24 24",
|
|
@@ -2180,10 +2959,10 @@ var CHECK_ICON2 = /* @__PURE__ */ jsx23(
|
|
|
2180
2959
|
strokeWidth: "2",
|
|
2181
2960
|
strokeLinecap: "round",
|
|
2182
2961
|
strokeLinejoin: "round",
|
|
2183
|
-
children: /* @__PURE__ */
|
|
2962
|
+
children: /* @__PURE__ */ jsx26("polyline", { points: "20 6 9 17 4 12" })
|
|
2184
2963
|
}
|
|
2185
2964
|
);
|
|
2186
|
-
var X_CIRCLE_ICON = /* @__PURE__ */
|
|
2965
|
+
var X_CIRCLE_ICON = /* @__PURE__ */ jsxs25(
|
|
2187
2966
|
"svg",
|
|
2188
2967
|
{
|
|
2189
2968
|
viewBox: "0 0 24 24",
|
|
@@ -2195,13 +2974,13 @@ var X_CIRCLE_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2195
2974
|
strokeLinecap: "round",
|
|
2196
2975
|
strokeLinejoin: "round",
|
|
2197
2976
|
children: [
|
|
2198
|
-
/* @__PURE__ */
|
|
2199
|
-
/* @__PURE__ */
|
|
2200
|
-
/* @__PURE__ */
|
|
2977
|
+
/* @__PURE__ */ jsx26("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2978
|
+
/* @__PURE__ */ jsx26("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
|
|
2979
|
+
/* @__PURE__ */ jsx26("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
|
|
2201
2980
|
]
|
|
2202
2981
|
}
|
|
2203
2982
|
);
|
|
2204
|
-
var ALERT_TRIANGLE_ICON = /* @__PURE__ */
|
|
2983
|
+
var ALERT_TRIANGLE_ICON = /* @__PURE__ */ jsxs25(
|
|
2205
2984
|
"svg",
|
|
2206
2985
|
{
|
|
2207
2986
|
viewBox: "0 0 24 24",
|
|
@@ -2213,13 +2992,13 @@ var ALERT_TRIANGLE_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2213
2992
|
strokeLinecap: "round",
|
|
2214
2993
|
strokeLinejoin: "round",
|
|
2215
2994
|
children: [
|
|
2216
|
-
/* @__PURE__ */
|
|
2217
|
-
/* @__PURE__ */
|
|
2218
|
-
/* @__PURE__ */
|
|
2995
|
+
/* @__PURE__ */ jsx26("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
|
|
2996
|
+
/* @__PURE__ */ jsx26("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
2997
|
+
/* @__PURE__ */ jsx26("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
2219
2998
|
]
|
|
2220
2999
|
}
|
|
2221
3000
|
);
|
|
2222
|
-
var INFO_CIRCLE_ICON = /* @__PURE__ */
|
|
3001
|
+
var INFO_CIRCLE_ICON = /* @__PURE__ */ jsxs25(
|
|
2223
3002
|
"svg",
|
|
2224
3003
|
{
|
|
2225
3004
|
viewBox: "0 0 24 24",
|
|
@@ -2231,9 +3010,9 @@ var INFO_CIRCLE_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2231
3010
|
strokeLinecap: "round",
|
|
2232
3011
|
strokeLinejoin: "round",
|
|
2233
3012
|
children: [
|
|
2234
|
-
/* @__PURE__ */
|
|
2235
|
-
/* @__PURE__ */
|
|
2236
|
-
/* @__PURE__ */
|
|
3013
|
+
/* @__PURE__ */ jsx26("circle", { cx: "12", cy: "12", r: "10" }),
|
|
3014
|
+
/* @__PURE__ */ jsx26("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
3015
|
+
/* @__PURE__ */ jsx26("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
2237
3016
|
]
|
|
2238
3017
|
}
|
|
2239
3018
|
);
|
|
@@ -2307,11 +3086,11 @@ function GraphToolbar({
|
|
|
2307
3086
|
const orientation = toolbarOrientation(position);
|
|
2308
3087
|
const setValidationOpen = onValidationOpenChange != null ? onValidationOpenChange : (() => {
|
|
2309
3088
|
});
|
|
2310
|
-
const setValidationOpenRef =
|
|
3089
|
+
const setValidationOpenRef = React10.useRef(setValidationOpen);
|
|
2311
3090
|
setValidationOpenRef.current = setValidationOpen;
|
|
2312
|
-
const validationRef =
|
|
2313
|
-
const validationPanelId =
|
|
2314
|
-
|
|
3091
|
+
const validationRef = React10.useRef(null);
|
|
3092
|
+
const validationPanelId = React10.useId();
|
|
3093
|
+
React10.useEffect(() => {
|
|
2315
3094
|
if (validationState === void 0) setValidationOpenRef.current(false);
|
|
2316
3095
|
}, [validationState]);
|
|
2317
3096
|
usePopoverDismiss(validationOpen, validationRef, () => setValidationOpenRef.current(false));
|
|
@@ -2324,16 +3103,16 @@ function GraphToolbar({
|
|
|
2324
3103
|
const foldAllSection = onFoldAll || onExpandAll;
|
|
2325
3104
|
const foldAllTitle = foldAllDisabled ? "Fold all controllers (nothing to fold)" : "Fold all controllers";
|
|
2326
3105
|
const expandAllTitle = expandAllDisabled ? "Expand all controllers (nothing to expand)" : "Expand all controllers";
|
|
2327
|
-
return /* @__PURE__ */
|
|
3106
|
+
return /* @__PURE__ */ jsx26(
|
|
2328
3107
|
Panel,
|
|
2329
3108
|
{
|
|
2330
3109
|
position,
|
|
2331
3110
|
className: `graph-toolbar-panel graph-toolbar-panel--${orientation}`,
|
|
2332
3111
|
style: panelStyle,
|
|
2333
|
-
children: /* @__PURE__ */
|
|
2334
|
-
validationState !== void 0 && /* @__PURE__ */
|
|
2335
|
-
/* @__PURE__ */
|
|
2336
|
-
/* @__PURE__ */
|
|
3112
|
+
children: /* @__PURE__ */ jsxs25("div", { className: `graph-toolbar graph-toolbar--${orientation}`, children: [
|
|
3113
|
+
validationState !== void 0 && /* @__PURE__ */ jsxs25(Fragment16, { children: [
|
|
3114
|
+
/* @__PURE__ */ jsxs25("div", { className: "graph-toolbar-validation", ref: validationRef, children: [
|
|
3115
|
+
/* @__PURE__ */ jsxs25(
|
|
2337
3116
|
"button",
|
|
2338
3117
|
{
|
|
2339
3118
|
type: "button",
|
|
@@ -2346,11 +3125,11 @@ function GraphToolbar({
|
|
|
2346
3125
|
"aria-controls": validationPanelId,
|
|
2347
3126
|
children: [
|
|
2348
3127
|
validationIcon(validationState),
|
|
2349
|
-
validationIssues.length > 0 && /* @__PURE__ */
|
|
3128
|
+
validationIssues.length > 0 && /* @__PURE__ */ jsx26("span", { className: "graph-toolbar-validation-badge", children: validationIssues.length > 99 ? "99+" : validationIssues.length })
|
|
2350
3129
|
]
|
|
2351
3130
|
}
|
|
2352
3131
|
),
|
|
2353
|
-
validationOpen && /* @__PURE__ */
|
|
3132
|
+
validationOpen && /* @__PURE__ */ jsx26(
|
|
2354
3133
|
ValidationPanel,
|
|
2355
3134
|
{
|
|
2356
3135
|
id: validationPanelId,
|
|
@@ -2361,10 +3140,10 @@ function GraphToolbar({
|
|
|
2361
3140
|
}
|
|
2362
3141
|
)
|
|
2363
3142
|
] }),
|
|
2364
|
-
/* @__PURE__ */
|
|
3143
|
+
/* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" })
|
|
2365
3144
|
] }),
|
|
2366
|
-
styleMenuEnabled && /* @__PURE__ */
|
|
2367
|
-
/* @__PURE__ */
|
|
3145
|
+
styleMenuEnabled && /* @__PURE__ */ jsxs25(Fragment16, { children: [
|
|
3146
|
+
/* @__PURE__ */ jsx26(
|
|
2368
3147
|
StyleMenu,
|
|
2369
3148
|
{
|
|
2370
3149
|
value: graphStyle,
|
|
@@ -2377,9 +3156,9 @@ function GraphToolbar({
|
|
|
2377
3156
|
buttonClassName: "graph-toolbar-btn"
|
|
2378
3157
|
}
|
|
2379
3158
|
),
|
|
2380
|
-
/* @__PURE__ */
|
|
3159
|
+
/* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" })
|
|
2381
3160
|
] }),
|
|
2382
|
-
onFoldAll && /* @__PURE__ */
|
|
3161
|
+
onFoldAll && /* @__PURE__ */ jsx26(
|
|
2383
3162
|
"button",
|
|
2384
3163
|
{
|
|
2385
3164
|
type: "button",
|
|
@@ -2391,7 +3170,7 @@ function GraphToolbar({
|
|
|
2391
3170
|
children: FOLD_ALL_ICON
|
|
2392
3171
|
}
|
|
2393
3172
|
),
|
|
2394
|
-
onExpandAll && /* @__PURE__ */
|
|
3173
|
+
onExpandAll && /* @__PURE__ */ jsx26(
|
|
2395
3174
|
"button",
|
|
2396
3175
|
{
|
|
2397
3176
|
type: "button",
|
|
@@ -2403,8 +3182,8 @@ function GraphToolbar({
|
|
|
2403
3182
|
children: EXPAND_ALL_ICON
|
|
2404
3183
|
}
|
|
2405
3184
|
),
|
|
2406
|
-
foldAllSection && /* @__PURE__ */
|
|
2407
|
-
onShowControllersChange && /* @__PURE__ */
|
|
3185
|
+
foldAllSection && /* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" }),
|
|
3186
|
+
onShowControllersChange && /* @__PURE__ */ jsx26(
|
|
2408
3187
|
"button",
|
|
2409
3188
|
{
|
|
2410
3189
|
type: "button",
|
|
@@ -2415,7 +3194,7 @@ function GraphToolbar({
|
|
|
2415
3194
|
children: BOXES_ICON
|
|
2416
3195
|
}
|
|
2417
3196
|
),
|
|
2418
|
-
/* @__PURE__ */
|
|
3197
|
+
/* @__PURE__ */ jsx26(
|
|
2419
3198
|
"button",
|
|
2420
3199
|
{
|
|
2421
3200
|
type: "button",
|
|
@@ -2426,8 +3205,8 @@ function GraphToolbar({
|
|
|
2426
3205
|
children: isVertical ? ARROW_RIGHT_ICON : ARROW_DOWN_ICON
|
|
2427
3206
|
}
|
|
2428
3207
|
),
|
|
2429
|
-
(onZoomOut || onZoomIn || onFitView) && /* @__PURE__ */
|
|
2430
|
-
onZoomOut && /* @__PURE__ */
|
|
3208
|
+
(onZoomOut || onZoomIn || onFitView) && /* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" }),
|
|
3209
|
+
onZoomOut && /* @__PURE__ */ jsx26(
|
|
2431
3210
|
"button",
|
|
2432
3211
|
{
|
|
2433
3212
|
type: "button",
|
|
@@ -2438,7 +3217,7 @@ function GraphToolbar({
|
|
|
2438
3217
|
children: MINUS_ICON
|
|
2439
3218
|
}
|
|
2440
3219
|
),
|
|
2441
|
-
onZoomIn && /* @__PURE__ */
|
|
3220
|
+
onZoomIn && /* @__PURE__ */ jsx26(
|
|
2442
3221
|
"button",
|
|
2443
3222
|
{
|
|
2444
3223
|
type: "button",
|
|
@@ -2449,7 +3228,7 @@ function GraphToolbar({
|
|
|
2449
3228
|
children: PLUS_ICON
|
|
2450
3229
|
}
|
|
2451
3230
|
),
|
|
2452
|
-
onFitView && /* @__PURE__ */
|
|
3231
|
+
onFitView && /* @__PURE__ */ jsx26(
|
|
2453
3232
|
"button",
|
|
2454
3233
|
{
|
|
2455
3234
|
type: "button",
|
|
@@ -2460,9 +3239,9 @@ function GraphToolbar({
|
|
|
2460
3239
|
children: FIT_VIEW_ICON
|
|
2461
3240
|
}
|
|
2462
3241
|
),
|
|
2463
|
-
themeToggleEnabled && /* @__PURE__ */
|
|
2464
|
-
/* @__PURE__ */
|
|
2465
|
-
/* @__PURE__ */
|
|
3242
|
+
themeToggleEnabled && /* @__PURE__ */ jsxs25(Fragment16, { children: [
|
|
3243
|
+
/* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" }),
|
|
3244
|
+
/* @__PURE__ */ jsx26(
|
|
2466
3245
|
"button",
|
|
2467
3246
|
{
|
|
2468
3247
|
type: "button",
|
|
@@ -2480,7 +3259,7 @@ function GraphToolbar({
|
|
|
2480
3259
|
}
|
|
2481
3260
|
|
|
2482
3261
|
// src/graph/react/viewer/StillFit.tsx
|
|
2483
|
-
import
|
|
3262
|
+
import React11 from "react";
|
|
2484
3263
|
import { useEdges, useNodes, useNodesInitialized, useReactFlow, useStore } from "@xyflow/react";
|
|
2485
3264
|
|
|
2486
3265
|
// src/graph/react/viewer/stillViewport.ts
|
|
@@ -2527,7 +3306,7 @@ function StillFit({ onHeight }) {
|
|
|
2527
3306
|
const nodes = useNodes();
|
|
2528
3307
|
const edges = useEdges();
|
|
2529
3308
|
const { getNodesBounds, setViewport } = useReactFlow();
|
|
2530
|
-
|
|
3309
|
+
React11.useLayoutEffect(() => {
|
|
2531
3310
|
if (!nodesInitialized || nodes.length === 0) return;
|
|
2532
3311
|
const bounds = stillContentBounds(
|
|
2533
3312
|
getNodesBounds(nodes),
|
|
@@ -2545,7 +3324,7 @@ function StillFit({ onHeight }) {
|
|
|
2545
3324
|
}
|
|
2546
3325
|
|
|
2547
3326
|
// src/graph/react/nodes/NodeValidationBadge.tsx
|
|
2548
|
-
import { jsx as
|
|
3327
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
2549
3328
|
function NodeValidationBadge({
|
|
2550
3329
|
validation,
|
|
2551
3330
|
onClick
|
|
@@ -2555,9 +3334,9 @@ function NodeValidationBadge({
|
|
|
2555
3334
|
const className = `node-validation-badge node-validation-badge--${validation.severity}`;
|
|
2556
3335
|
const text = validation.count > 99 ? "99+" : String(validation.count);
|
|
2557
3336
|
if (!onClick) {
|
|
2558
|
-
return /* @__PURE__ */
|
|
3337
|
+
return /* @__PURE__ */ jsx27("span", { className, title: tooltip, "aria-label": label, children: text });
|
|
2559
3338
|
}
|
|
2560
|
-
return /* @__PURE__ */
|
|
3339
|
+
return /* @__PURE__ */ jsx27(
|
|
2561
3340
|
"button",
|
|
2562
3341
|
{
|
|
2563
3342
|
type: "button",
|
|
@@ -2577,7 +3356,7 @@ function validationRingClass(validation) {
|
|
|
2577
3356
|
}
|
|
2578
3357
|
|
|
2579
3358
|
// src/graph/react/nodes/controller/ControllerGroupNode.tsx
|
|
2580
|
-
import { jsx as
|
|
3359
|
+
import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2581
3360
|
var CONTROLLER_CONFIG = {
|
|
2582
3361
|
PipeSequence: { badge: "Sequence", icon: "\u2192" },
|
|
2583
3362
|
PipeParallel: { badge: "Parallel", icon: "//" },
|
|
@@ -2600,16 +3379,16 @@ function ControllerGroupNode({ data }) {
|
|
|
2600
3379
|
const isCollapsible = (data.pipeType === "PipeParallel" || data.pipeType === "PipeBatch") && ((_a = data.childCount) != null ? _a : 0) > MAX_VISIBLE_CONTROLLER_CHILDREN;
|
|
2601
3380
|
const hiddenCount = isCollapsible ? ((_b = data.childCount) != null ? _b : 0) - MAX_VISIBLE_CONTROLLER_CHILDREN : 0;
|
|
2602
3381
|
const failingClass = data.failingPipe ? " controller-group-node--failing-pipe" : "";
|
|
2603
|
-
return /* @__PURE__ */
|
|
3382
|
+
return /* @__PURE__ */ jsxs26(
|
|
2604
3383
|
"div",
|
|
2605
3384
|
{
|
|
2606
3385
|
className: `controller-group-node ${modifier}${failingClass}${validationRingClass(data.validation)}`,
|
|
2607
3386
|
children: [
|
|
2608
|
-
/* @__PURE__ */
|
|
2609
|
-
/* @__PURE__ */
|
|
2610
|
-
/* @__PURE__ */
|
|
2611
|
-
data.label && /* @__PURE__ */
|
|
2612
|
-
data.onToggleFold && /* @__PURE__ */
|
|
3387
|
+
/* @__PURE__ */ jsxs26("div", { className: "controller-group-header", children: [
|
|
3388
|
+
/* @__PURE__ */ jsx28("span", { className: "controller-group-icon", children: config.icon }),
|
|
3389
|
+
/* @__PURE__ */ jsx28("span", { className: "controller-group-badge", children: config.badge }),
|
|
3390
|
+
data.label && /* @__PURE__ */ jsx28("span", { className: "controller-group-label", children: data.label }),
|
|
3391
|
+
data.onToggleFold && /* @__PURE__ */ jsx28(
|
|
2613
3392
|
"button",
|
|
2614
3393
|
{
|
|
2615
3394
|
type: "button",
|
|
@@ -2624,9 +3403,9 @@ function ControllerGroupNode({ data }) {
|
|
|
2624
3403
|
children: "\u2921"
|
|
2625
3404
|
}
|
|
2626
3405
|
),
|
|
2627
|
-
data.validation && /* @__PURE__ */
|
|
3406
|
+
data.validation && /* @__PURE__ */ jsx28(NodeValidationBadge, { validation: data.validation, onClick: data.onValidationBadgeClick })
|
|
2628
3407
|
] }),
|
|
2629
|
-
isCollapsible && /* @__PURE__ */
|
|
3408
|
+
isCollapsible && /* @__PURE__ */ jsx28(
|
|
2630
3409
|
"button",
|
|
2631
3410
|
{
|
|
2632
3411
|
className: "controller-group-collapse",
|
|
@@ -2649,7 +3428,7 @@ import { Handle, Position } from "@xyflow/react";
|
|
|
2649
3428
|
|
|
2650
3429
|
// src/graph/react/nodes/pipe/PipeCardBase.tsx
|
|
2651
3430
|
import { useState as useState2 } from "react";
|
|
2652
|
-
import { jsx as
|
|
3431
|
+
import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2653
3432
|
var PIPE_TYPE_BADGES2 = {
|
|
2654
3433
|
PipeLLM: "LLM",
|
|
2655
3434
|
PipeExtract: "Extract",
|
|
@@ -2711,22 +3490,22 @@ function PipeCardBase({ data, children }) {
|
|
|
2711
3490
|
const failingClass = data.failingPipe ? " pipe-card--failing-pipe" : "";
|
|
2712
3491
|
const badgeClass = isController ? "pipe-card-badge pipe-card-badge--controller" : isSignature ? "pipe-card-badge pipe-card-badge--signature" : isBinding ? "pipe-card-badge pipe-card-badge--binding" : "pipe-card-badge";
|
|
2713
3492
|
const ringClass = validationRingClass(data.validation);
|
|
2714
|
-
return /* @__PURE__ */
|
|
3493
|
+
return /* @__PURE__ */ jsxs27(
|
|
2715
3494
|
"div",
|
|
2716
3495
|
{
|
|
2717
3496
|
className: `pipe-card ${dirClass}${controllerClass}${signatureClass}${bindingClass}${staticClass}${failingClass}${ringClass}`,
|
|
2718
3497
|
children: [
|
|
2719
|
-
/* @__PURE__ */
|
|
2720
|
-
/* @__PURE__ */
|
|
2721
|
-
data.docGenFormat && /* @__PURE__ */
|
|
2722
|
-
/* @__PURE__ */
|
|
2723
|
-
!isStatic && /* @__PURE__ */
|
|
3498
|
+
/* @__PURE__ */ jsxs27("div", { className: "pipe-card-header", children: [
|
|
3499
|
+
/* @__PURE__ */ jsx29("span", { className: badgeClass, children: badge }),
|
|
3500
|
+
data.docGenFormat && /* @__PURE__ */ jsx29("span", { className: "pipe-card-format", title: `Document format: ${data.docGenFormat}`, children: data.docGenFormat.toUpperCase() }),
|
|
3501
|
+
/* @__PURE__ */ jsx29("span", { className: "pipe-card-code", title: data.pipeCode, children: data.pipeCode }),
|
|
3502
|
+
!isStatic && /* @__PURE__ */ jsx29(
|
|
2724
3503
|
"span",
|
|
2725
3504
|
{
|
|
2726
3505
|
className: "pipe-card-status",
|
|
2727
3506
|
style: { color: statusConfig.color },
|
|
2728
3507
|
title: data.failingPipe ? "Failed here: the run failed in this pipe" : statusConfig.label,
|
|
2729
|
-
children: /* @__PURE__ */
|
|
3508
|
+
children: /* @__PURE__ */ jsx29(
|
|
2730
3509
|
"span",
|
|
2731
3510
|
{
|
|
2732
3511
|
className: `pipe-card-status-dot ${isRunning ? "pipe-card-status-dot--pulse" : ""}`,
|
|
@@ -2735,7 +3514,7 @@ function PipeCardBase({ data, children }) {
|
|
|
2735
3514
|
)
|
|
2736
3515
|
}
|
|
2737
3516
|
),
|
|
2738
|
-
data.onExpand && /* @__PURE__ */
|
|
3517
|
+
data.onExpand && /* @__PURE__ */ jsx29(
|
|
2739
3518
|
"button",
|
|
2740
3519
|
{
|
|
2741
3520
|
type: "button",
|
|
@@ -2750,32 +3529,32 @@ function PipeCardBase({ data, children }) {
|
|
|
2750
3529
|
children: "\u2922"
|
|
2751
3530
|
}
|
|
2752
3531
|
),
|
|
2753
|
-
data.validation && /* @__PURE__ */
|
|
3532
|
+
data.validation && /* @__PURE__ */ jsx29(NodeValidationBadge, { validation: data.validation, onClick: data.onValidationBadgeClick })
|
|
2754
3533
|
] }),
|
|
2755
|
-
(outcome || batchMultiplicity) && /* @__PURE__ */
|
|
2756
|
-
outcome && /* @__PURE__ */
|
|
3534
|
+
(outcome || batchMultiplicity) && /* @__PURE__ */ jsxs27("div", { className: "pipe-card-annotations", children: [
|
|
3535
|
+
outcome && /* @__PURE__ */ jsxs27("span", { className: "pipe-card-annotation pipe-card-annotation--outcome", children: [
|
|
2757
3536
|
"outcome: ",
|
|
2758
3537
|
outcome
|
|
2759
3538
|
] }),
|
|
2760
|
-
batchMultiplicity && /* @__PURE__ */
|
|
3539
|
+
batchMultiplicity && /* @__PURE__ */ jsx29("span", { className: "pipe-card-annotation pipe-card-annotation--batch", children: batchMultiplicity })
|
|
2761
3540
|
] }),
|
|
2762
|
-
data.description && /* @__PURE__ */
|
|
2763
|
-
data.inputs.length > 0 && /* @__PURE__ */
|
|
2764
|
-
/* @__PURE__ */
|
|
2765
|
-
/* @__PURE__ */
|
|
2766
|
-
visibleInputs.map((input) => /* @__PURE__ */
|
|
3541
|
+
data.description && /* @__PURE__ */ jsx29("span", { className: "pipe-card-description", title: data.description, children: data.description }),
|
|
3542
|
+
data.inputs.length > 0 && /* @__PURE__ */ jsxs27("div", { className: "pipe-card-io", children: [
|
|
3543
|
+
/* @__PURE__ */ jsx29("span", { className: "pipe-card-io-label", children: "INPUTS" }),
|
|
3544
|
+
/* @__PURE__ */ jsxs27("div", { className: "pipe-card-io-pills", children: [
|
|
3545
|
+
visibleInputs.map((input) => /* @__PURE__ */ jsxs27(
|
|
2767
3546
|
"span",
|
|
2768
3547
|
{
|
|
2769
3548
|
className: "pipe-card-io-pill",
|
|
2770
3549
|
title: `${input.name}: ${input.concept}`,
|
|
2771
3550
|
children: [
|
|
2772
|
-
/* @__PURE__ */
|
|
2773
|
-
/* @__PURE__ */
|
|
3551
|
+
/* @__PURE__ */ jsx29("span", { className: "pipe-card-io-pill-name", children: input.name }),
|
|
3552
|
+
/* @__PURE__ */ jsx29("span", { className: "pipe-card-io-pill-concept", children: input.concept })
|
|
2774
3553
|
]
|
|
2775
3554
|
},
|
|
2776
3555
|
input.name
|
|
2777
3556
|
)),
|
|
2778
|
-
hasMany && /* @__PURE__ */
|
|
3557
|
+
hasMany && /* @__PURE__ */ jsx29(
|
|
2779
3558
|
"button",
|
|
2780
3559
|
{
|
|
2781
3560
|
className: "pipe-card-io-more",
|
|
@@ -2788,16 +3567,16 @@ function PipeCardBase({ data, children }) {
|
|
|
2788
3567
|
)
|
|
2789
3568
|
] })
|
|
2790
3569
|
] }),
|
|
2791
|
-
data.outputs.length > 0 && /* @__PURE__ */
|
|
2792
|
-
/* @__PURE__ */
|
|
2793
|
-
/* @__PURE__ */
|
|
3570
|
+
data.outputs.length > 0 && /* @__PURE__ */ jsxs27("div", { className: "pipe-card-io", children: [
|
|
3571
|
+
/* @__PURE__ */ jsx29("span", { className: "pipe-card-io-label", children: "OUTPUT" }),
|
|
3572
|
+
/* @__PURE__ */ jsx29("div", { className: "pipe-card-io-pills", children: data.outputs.map((output) => /* @__PURE__ */ jsxs27(
|
|
2794
3573
|
"span",
|
|
2795
3574
|
{
|
|
2796
3575
|
className: "pipe-card-io-pill",
|
|
2797
3576
|
title: `${output.name}: ${output.concept}`,
|
|
2798
3577
|
children: [
|
|
2799
|
-
/* @__PURE__ */
|
|
2800
|
-
/* @__PURE__ */
|
|
3578
|
+
/* @__PURE__ */ jsx29("span", { className: "pipe-card-io-pill-name", children: output.name }),
|
|
3579
|
+
/* @__PURE__ */ jsx29("span", { className: "pipe-card-io-pill-concept", children: output.concept })
|
|
2801
3580
|
]
|
|
2802
3581
|
},
|
|
2803
3582
|
output.name
|
|
@@ -2832,11 +3611,11 @@ function getPipeCardComponent(pipeType) {
|
|
|
2832
3611
|
}
|
|
2833
3612
|
|
|
2834
3613
|
// src/graph/react/nodes/pipe/PipeCardNode.tsx
|
|
2835
|
-
import { Fragment as
|
|
3614
|
+
import { Fragment as Fragment17, jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2836
3615
|
function PipeCardNode({ data }) {
|
|
2837
3616
|
var _a;
|
|
2838
3617
|
const Card = (_a = getPipeCardComponent(data.pipeType)) != null ? _a : PipeCardBase;
|
|
2839
|
-
return /* @__PURE__ */
|
|
3618
|
+
return /* @__PURE__ */ jsx30(Card, { data });
|
|
2840
3619
|
}
|
|
2841
3620
|
function PipeCardRFNode({
|
|
2842
3621
|
data,
|
|
@@ -2845,139 +3624,37 @@ function PipeCardRFNode({
|
|
|
2845
3624
|
}) {
|
|
2846
3625
|
const payload = data.pipeCardData;
|
|
2847
3626
|
if (!payload) return null;
|
|
2848
|
-
return /* @__PURE__ */
|
|
2849
|
-
/* @__PURE__ */
|
|
2850
|
-
/* @__PURE__ */
|
|
2851
|
-
/* @__PURE__ */
|
|
3627
|
+
return /* @__PURE__ */ jsxs28(Fragment17, { children: [
|
|
3628
|
+
/* @__PURE__ */ jsx30(Handle, { type: "target", position: targetPosition }),
|
|
3629
|
+
/* @__PURE__ */ jsx30(PipeCardNode, { data: payload }),
|
|
3630
|
+
/* @__PURE__ */ jsx30(Handle, { type: "source", position: sourcePosition })
|
|
2852
3631
|
] });
|
|
2853
3632
|
}
|
|
2854
3633
|
|
|
2855
3634
|
// src/graph/react/styles/simple/SimpleNodes.tsx
|
|
2856
3635
|
import { Handle as Handle2, Position as Position2 } from "@xyflow/react";
|
|
2857
|
-
import { Fragment as
|
|
2858
|
-
var
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
strokeLinecap: "round",
|
|
2864
|
-
strokeLinejoin: "round",
|
|
2865
|
-
"aria-hidden": true
|
|
2866
|
-
};
|
|
2867
|
-
function Icon({ size = 13, children }) {
|
|
2868
|
-
return /* @__PURE__ */ jsx28("svg", __spreadProps(__spreadValues({}, ICON_PROPS), { width: size, height: size, children }));
|
|
2869
|
-
}
|
|
2870
|
-
var CATEGORY_ICONS = {
|
|
2871
|
-
ai: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2872
|
-
/* @__PURE__ */ jsx28("path", { d: "M9.94 15.5a2 2 0 0 0-1.44-1.44l-6.13-1.58a.5.5 0 0 1 0-.96L8.5 9.94A2 2 0 0 0 9.94 8.5l1.58-6.14a.5.5 0 0 1 .96 0l1.58 6.14a2 2 0 0 0 1.44 1.44l6.14 1.58a.5.5 0 0 1 0 .96l-6.14 1.58a2 2 0 0 0-1.44 1.44l-1.58 6.13a.5.5 0 0 1-.96 0z" }),
|
|
2873
|
-
/* @__PURE__ */ jsx28("path", { d: "M20 3v4" }),
|
|
2874
|
-
/* @__PURE__ */ jsx28("path", { d: "M22 5h-4" })
|
|
2875
|
-
] }),
|
|
2876
|
-
extract: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2877
|
-
/* @__PURE__ */ jsx28("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
|
|
2878
|
-
/* @__PURE__ */ jsx28("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }),
|
|
2879
|
-
/* @__PURE__ */ jsx28("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }),
|
|
2880
|
-
/* @__PURE__ */ jsx28("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }),
|
|
2881
|
-
/* @__PURE__ */ jsx28("path", { d: "M7 8h8" }),
|
|
2882
|
-
/* @__PURE__ */ jsx28("path", { d: "M7 12h10" }),
|
|
2883
|
-
/* @__PURE__ */ jsx28("path", { d: "M7 16h6" })
|
|
2884
|
-
] }),
|
|
2885
|
-
image: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2886
|
-
/* @__PURE__ */ jsx28("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
2887
|
-
/* @__PURE__ */ jsx28("circle", { cx: "9", cy: "9", r: "2" }),
|
|
2888
|
-
/* @__PURE__ */ jsx28("path", { d: "m21 15-3.09-3.09a2 2 0 0 0-2.82 0L6 21" })
|
|
2889
|
-
] }),
|
|
2890
|
-
search: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2891
|
-
/* @__PURE__ */ jsx28("circle", { cx: "11", cy: "11", r: "8" }),
|
|
2892
|
-
/* @__PURE__ */ jsx28("path", { d: "m21 21-4.3-4.3" })
|
|
2893
|
-
] }),
|
|
2894
|
-
code: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2895
|
-
/* @__PURE__ */ jsx28("polyline", { points: "16 18 22 12 16 6" }),
|
|
2896
|
-
/* @__PURE__ */ jsx28("polyline", { points: "8 6 2 12 8 18" })
|
|
2897
|
-
] }),
|
|
2898
|
-
template: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2899
|
-
/* @__PURE__ */ jsx28("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
2900
|
-
/* @__PURE__ */ jsx28("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
2901
|
-
/* @__PURE__ */ jsx28("path", { d: "M16 13H8" }),
|
|
2902
|
-
/* @__PURE__ */ jsx28("path", { d: "M16 17H8" })
|
|
2903
|
-
] }),
|
|
2904
|
-
document: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2905
|
-
/* @__PURE__ */ jsx28("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
2906
|
-
/* @__PURE__ */ jsx28("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
2907
|
-
/* @__PURE__ */ jsx28("path", { d: "M12 18v-6" }),
|
|
2908
|
-
/* @__PURE__ */ jsx28("path", { d: "m9 15 3 3 3-3" })
|
|
2909
|
-
] }),
|
|
2910
|
-
judge: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2911
|
-
/* @__PURE__ */ jsx28("path", { d: "m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
|
|
2912
|
-
/* @__PURE__ */ jsx28("path", { d: "m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
|
|
2913
|
-
/* @__PURE__ */ jsx28("path", { d: "M7 21h10" }),
|
|
2914
|
-
/* @__PURE__ */ jsx28("path", { d: "M12 3v18" }),
|
|
2915
|
-
/* @__PURE__ */ jsx28("path", { d: "M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2" })
|
|
2916
|
-
] }),
|
|
2917
|
-
planned: /* @__PURE__ */ jsx28("circle", { cx: "12", cy: "12", r: "9", strokeDasharray: "3 3" }),
|
|
2918
|
-
steps: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2919
|
-
/* @__PURE__ */ jsx28("path", { d: "m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z" }),
|
|
2920
|
-
/* @__PURE__ */ jsx28("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }),
|
|
2921
|
-
/* @__PURE__ */ jsx28("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" })
|
|
2922
|
-
] }),
|
|
2923
|
-
parallel: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2924
|
-
/* @__PURE__ */ jsx28("path", { d: "M16 3h5v5" }),
|
|
2925
|
-
/* @__PURE__ */ jsx28("path", { d: "M8 3H3v5" }),
|
|
2926
|
-
/* @__PURE__ */ jsx28("path", { d: "M12 22v-8.3a4 4 0 0 0-1.17-2.87L3 3" }),
|
|
2927
|
-
/* @__PURE__ */ jsx28("path", { d: "m15 9 6-6" })
|
|
2928
|
-
] }),
|
|
2929
|
-
decision: /* @__PURE__ */ jsx28("path", { d: "M12 2 22 12 12 22 2 12Z" }),
|
|
2930
|
-
repeat: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2931
|
-
/* @__PURE__ */ jsx28("path", { d: "m17 2 4 4-4 4" }),
|
|
2932
|
-
/* @__PURE__ */ jsx28("path", { d: "M3 11v-1a4 4 0 0 1 4-4h14" }),
|
|
2933
|
-
/* @__PURE__ */ jsx28("path", { d: "m7 22-4-4 4-4" }),
|
|
2934
|
-
/* @__PURE__ */ jsx28("path", { d: "M21 13v1a4 4 0 0 1-4 4H3" })
|
|
2935
|
-
] }),
|
|
2936
|
-
pick: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2937
|
-
/* @__PURE__ */ jsx28("polyline", { points: "15 10 20 15 15 20" }),
|
|
2938
|
-
/* @__PURE__ */ jsx28("path", { d: "M4 4v7a4 4 0 0 0 4 4h12" })
|
|
2939
|
-
] })
|
|
2940
|
-
};
|
|
2941
|
-
var EXPAND_ICON2 = /* @__PURE__ */ jsxs27(Icon, { size: 12, children: [
|
|
2942
|
-
/* @__PURE__ */ jsx28("polyline", { points: "15 3 21 3 21 9" }),
|
|
2943
|
-
/* @__PURE__ */ jsx28("polyline", { points: "9 21 3 21 3 15" }),
|
|
2944
|
-
/* @__PURE__ */ jsx28("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
2945
|
-
/* @__PURE__ */ jsx28("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
3636
|
+
import { Fragment as Fragment18, jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3637
|
+
var EXPAND_ICON2 = /* @__PURE__ */ jsxs29(Icon, { size: 12, children: [
|
|
3638
|
+
/* @__PURE__ */ jsx31("polyline", { points: "15 3 21 3 21 9" }),
|
|
3639
|
+
/* @__PURE__ */ jsx31("polyline", { points: "9 21 3 21 3 15" }),
|
|
3640
|
+
/* @__PURE__ */ jsx31("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
3641
|
+
/* @__PURE__ */ jsx31("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
2946
3642
|
] });
|
|
2947
|
-
var COLLAPSE_ICON2 = /* @__PURE__ */
|
|
2948
|
-
/* @__PURE__ */
|
|
2949
|
-
/* @__PURE__ */
|
|
2950
|
-
/* @__PURE__ */
|
|
2951
|
-
/* @__PURE__ */
|
|
3643
|
+
var COLLAPSE_ICON2 = /* @__PURE__ */ jsxs29(Icon, { size: 12, children: [
|
|
3644
|
+
/* @__PURE__ */ jsx31("polyline", { points: "4 14 10 14 10 20" }),
|
|
3645
|
+
/* @__PURE__ */ jsx31("polyline", { points: "20 10 14 10 14 4" }),
|
|
3646
|
+
/* @__PURE__ */ jsx31("line", { x1: "14", y1: "10", x2: "21", y2: "3" }),
|
|
3647
|
+
/* @__PURE__ */ jsx31("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
2952
3648
|
] });
|
|
2953
|
-
var STATUS_LABELS = {
|
|
2954
|
-
succeeded: "Done",
|
|
2955
|
-
failed: "Failed",
|
|
2956
|
-
running: "Running",
|
|
2957
|
-
scheduled: "Waiting",
|
|
2958
|
-
skipped: "Skipped",
|
|
2959
|
-
canceled: "Canceled"
|
|
2960
|
-
};
|
|
2961
|
-
var STATUS_ICONS = {
|
|
2962
|
-
succeeded: /* @__PURE__ */ jsx28("polyline", { points: "20 6 9 17 4 12" }),
|
|
2963
|
-
failed: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2964
|
-
/* @__PURE__ */ jsx28("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
2965
|
-
/* @__PURE__ */ jsx28("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
2966
|
-
] }),
|
|
2967
|
-
running: /* @__PURE__ */ jsx28("path", { d: "M21 12a9 9 0 1 1-6.22-8.56" }),
|
|
2968
|
-
scheduled: /* @__PURE__ */ jsx28("circle", { cx: "12", cy: "12", r: "8" }),
|
|
2969
|
-
skipped: /* @__PURE__ */ jsx28("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
2970
|
-
canceled: /* @__PURE__ */ jsx28("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
2971
|
-
};
|
|
2972
3649
|
function StatusMark({ status, graphMode }) {
|
|
2973
3650
|
if (graphMode === "static") return null;
|
|
2974
|
-
return /* @__PURE__ */
|
|
3651
|
+
return /* @__PURE__ */ jsx31(
|
|
2975
3652
|
"span",
|
|
2976
3653
|
{
|
|
2977
3654
|
className: `simple-status simple-status--${status}`,
|
|
2978
3655
|
title: STATUS_LABELS[status],
|
|
2979
3656
|
"aria-label": STATUS_LABELS[status],
|
|
2980
|
-
children: /* @__PURE__ */
|
|
3657
|
+
children: /* @__PURE__ */ jsx31(Icon, { size: 11, children: STATUS_ICONS[status] })
|
|
2981
3658
|
}
|
|
2982
3659
|
);
|
|
2983
3660
|
}
|
|
@@ -2986,17 +3663,17 @@ function Handles({
|
|
|
2986
3663
|
targetPosition = Position2.Left,
|
|
2987
3664
|
children
|
|
2988
3665
|
}) {
|
|
2989
|
-
return /* @__PURE__ */
|
|
2990
|
-
/* @__PURE__ */
|
|
3666
|
+
return /* @__PURE__ */ jsxs29(Fragment18, { children: [
|
|
3667
|
+
/* @__PURE__ */ jsx31(Handle2, { type: "target", position: targetPosition, className: "simple-handle" }),
|
|
2991
3668
|
children,
|
|
2992
|
-
/* @__PURE__ */
|
|
3669
|
+
/* @__PURE__ */ jsx31(Handle2, { type: "source", position: sourcePosition, className: "simple-handle" })
|
|
2993
3670
|
] });
|
|
2994
3671
|
}
|
|
2995
3672
|
function ValidationMark({
|
|
2996
3673
|
validation,
|
|
2997
3674
|
onClick
|
|
2998
3675
|
}) {
|
|
2999
|
-
return validation ? /* @__PURE__ */
|
|
3676
|
+
return validation ? /* @__PURE__ */ jsx31(NodeValidationBadge, { validation, onClick }) : null;
|
|
3000
3677
|
}
|
|
3001
3678
|
function payloadOf(data, kinds) {
|
|
3002
3679
|
const simple = data.simple;
|
|
@@ -3007,20 +3684,20 @@ function SimpleStepNode({ data, sourcePosition, targetPosition }) {
|
|
|
3007
3684
|
const step = payloadOf(data, ["step"]);
|
|
3008
3685
|
if (!step) return null;
|
|
3009
3686
|
const statusClass = step.graphMode !== "static" ? ` simple-step--${step.status}` : "";
|
|
3010
|
-
return /* @__PURE__ */
|
|
3687
|
+
return /* @__PURE__ */ jsx31(Handles, { sourcePosition, targetPosition, children: /* @__PURE__ */ jsxs29(
|
|
3011
3688
|
"div",
|
|
3012
3689
|
{
|
|
3013
3690
|
className: `simple-step simple-step--${step.category}${statusClass}${validationRingClass(data.validation)}`,
|
|
3014
3691
|
children: [
|
|
3015
|
-
/* @__PURE__ */
|
|
3016
|
-
/* @__PURE__ */
|
|
3017
|
-
/* @__PURE__ */
|
|
3692
|
+
/* @__PURE__ */ jsxs29("div", { className: "simple-step-header", children: [
|
|
3693
|
+
/* @__PURE__ */ jsxs29("span", { className: "simple-step-category", children: [
|
|
3694
|
+
/* @__PURE__ */ jsx31(Icon, { children: CATEGORY_ICONS[step.category] }),
|
|
3018
3695
|
STEP_CATEGORY_WORDS[step.category]
|
|
3019
3696
|
] }),
|
|
3020
|
-
/* @__PURE__ */
|
|
3021
|
-
/* @__PURE__ */
|
|
3697
|
+
/* @__PURE__ */ jsx31(StatusMark, { status: step.status, graphMode: step.graphMode }),
|
|
3698
|
+
/* @__PURE__ */ jsx31(ValidationMark, { validation: data.validation, onClick: data.onValidationBadgeClick })
|
|
3022
3699
|
] }),
|
|
3023
|
-
/* @__PURE__ */
|
|
3700
|
+
/* @__PURE__ */ jsx31(
|
|
3024
3701
|
"div",
|
|
3025
3702
|
{
|
|
3026
3703
|
className: "simple-step-title",
|
|
@@ -3033,11 +3710,11 @@ function SimpleStepNode({ data, sourcePosition, targetPosition }) {
|
|
|
3033
3710
|
children: step.title
|
|
3034
3711
|
}
|
|
3035
3712
|
),
|
|
3036
|
-
step.forEach && /* @__PURE__ */
|
|
3037
|
-
/* @__PURE__ */
|
|
3713
|
+
step.forEach && /* @__PURE__ */ jsxs29("span", { className: "simple-step-foreach", children: [
|
|
3714
|
+
/* @__PURE__ */ jsx31(Icon, { size: 11, children: CATEGORY_ICONS.repeat }),
|
|
3038
3715
|
step.forEach
|
|
3039
3716
|
] }),
|
|
3040
|
-
step.innerStepCount !== void 0 && /* @__PURE__ */
|
|
3717
|
+
step.innerStepCount !== void 0 && /* @__PURE__ */ jsxs29(
|
|
3041
3718
|
"button",
|
|
3042
3719
|
{
|
|
3043
3720
|
type: "button",
|
|
@@ -3061,24 +3738,24 @@ function SimpleStepNode({ data, sourcePosition, targetPosition }) {
|
|
|
3061
3738
|
}
|
|
3062
3739
|
var DOCUMENT_PATH = "M1 1 H99 V84 C80 98 62 74 44 86 C28 96 14 96 1 88 Z";
|
|
3063
3740
|
function DocumentShape({ className }) {
|
|
3064
|
-
return /* @__PURE__ */
|
|
3741
|
+
return /* @__PURE__ */ jsx31("svg", { className, viewBox: "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx31("path", { d: DOCUMENT_PATH, vectorEffect: "non-scaling-stroke" }) });
|
|
3065
3742
|
}
|
|
3066
3743
|
function SimpleTerminalNode({ data, sourcePosition, targetPosition }) {
|
|
3067
3744
|
const terminal = payloadOf(data, ["input", "output"]);
|
|
3068
3745
|
if (!terminal) return null;
|
|
3069
|
-
return /* @__PURE__ */
|
|
3746
|
+
return /* @__PURE__ */ jsx31(Handles, { sourcePosition, targetPosition, children: /* @__PURE__ */ jsxs29(
|
|
3070
3747
|
"div",
|
|
3071
3748
|
{
|
|
3072
3749
|
className: `simple-terminal simple-terminal--${terminal.kind}${terminal.isList ? " simple-terminal--list" : ""}`,
|
|
3073
3750
|
children: [
|
|
3074
|
-
terminal.isList && /* @__PURE__ */
|
|
3075
|
-
/* @__PURE__ */
|
|
3076
|
-
/* @__PURE__ */
|
|
3751
|
+
terminal.isList && /* @__PURE__ */ jsxs29(Fragment18, { children: [
|
|
3752
|
+
/* @__PURE__ */ jsx31(DocumentShape, { className: "simple-terminal-shape simple-terminal-shape--back2" }),
|
|
3753
|
+
/* @__PURE__ */ jsx31(DocumentShape, { className: "simple-terminal-shape simple-terminal-shape--back1" })
|
|
3077
3754
|
] }),
|
|
3078
|
-
/* @__PURE__ */
|
|
3079
|
-
/* @__PURE__ */
|
|
3080
|
-
/* @__PURE__ */
|
|
3081
|
-
terminal.subtitle && /* @__PURE__ */
|
|
3755
|
+
/* @__PURE__ */ jsx31(DocumentShape, { className: "simple-terminal-shape" }),
|
|
3756
|
+
/* @__PURE__ */ jsxs29("div", { className: "simple-terminal-text", children: [
|
|
3757
|
+
/* @__PURE__ */ jsx31("span", { className: "simple-terminal-title", title: terminal.title, children: terminal.title }),
|
|
3758
|
+
terminal.subtitle && /* @__PURE__ */ jsx31("span", { className: "simple-terminal-subtitle", children: terminal.subtitle })
|
|
3082
3759
|
] })
|
|
3083
3760
|
]
|
|
3084
3761
|
}
|
|
@@ -3088,35 +3765,35 @@ function SimpleDecisionNode({ data, sourcePosition, targetPosition }) {
|
|
|
3088
3765
|
const decision = payloadOf(data, ["decision"]);
|
|
3089
3766
|
if (!decision) return null;
|
|
3090
3767
|
const statusClass = decision.graphMode !== "static" ? ` simple-decision--${decision.status}` : "";
|
|
3091
|
-
return /* @__PURE__ */
|
|
3092
|
-
/* @__PURE__ */
|
|
3768
|
+
return /* @__PURE__ */ jsx31(Handles, { sourcePosition, targetPosition, children: /* @__PURE__ */ jsxs29("div", { className: `simple-decision${statusClass}${validationRingClass(data.validation)}`, children: [
|
|
3769
|
+
/* @__PURE__ */ jsx31(
|
|
3093
3770
|
"svg",
|
|
3094
3771
|
{
|
|
3095
3772
|
className: "simple-decision-shape",
|
|
3096
3773
|
viewBox: "0 0 100 100",
|
|
3097
3774
|
preserveAspectRatio: "none",
|
|
3098
3775
|
"aria-hidden": "true",
|
|
3099
|
-
children: /* @__PURE__ */
|
|
3776
|
+
children: /* @__PURE__ */ jsx31("path", { d: "M50 1 L99 50 L50 99 L1 50 Z", vectorEffect: "non-scaling-stroke" })
|
|
3100
3777
|
}
|
|
3101
3778
|
),
|
|
3102
|
-
/* @__PURE__ */
|
|
3103
|
-
/* @__PURE__ */
|
|
3104
|
-
/* @__PURE__ */
|
|
3105
|
-
/* @__PURE__ */
|
|
3779
|
+
/* @__PURE__ */ jsx31("div", { className: "simple-decision-text", title: decision.title, children: decision.title }),
|
|
3780
|
+
/* @__PURE__ */ jsxs29("div", { className: "simple-decision-marks", children: [
|
|
3781
|
+
/* @__PURE__ */ jsx31(StatusMark, { status: decision.status, graphMode: decision.graphMode }),
|
|
3782
|
+
/* @__PURE__ */ jsx31(ValidationMark, { validation: data.validation, onClick: data.onValidationBadgeClick })
|
|
3106
3783
|
] })
|
|
3107
3784
|
] }) });
|
|
3108
3785
|
}
|
|
3109
3786
|
function SimpleFrameNode({ data }) {
|
|
3110
3787
|
const frame = payloadOf(data, ["frame"]);
|
|
3111
3788
|
if (!frame) return null;
|
|
3112
|
-
return /* @__PURE__ */
|
|
3113
|
-
/* @__PURE__ */
|
|
3114
|
-
/* @__PURE__ */
|
|
3789
|
+
return /* @__PURE__ */ jsx31("div", { className: `simple-frame${validationRingClass(data.validation)}`, children: /* @__PURE__ */ jsxs29("div", { className: "simple-frame-header", children: [
|
|
3790
|
+
/* @__PURE__ */ jsxs29("span", { className: "simple-frame-title", children: [
|
|
3791
|
+
/* @__PURE__ */ jsx31(Icon, { size: 12, children: CATEGORY_ICONS.repeat }),
|
|
3115
3792
|
frame.title
|
|
3116
3793
|
] }),
|
|
3117
|
-
/* @__PURE__ */
|
|
3118
|
-
/* @__PURE__ */
|
|
3119
|
-
frame.onFold && /* @__PURE__ */
|
|
3794
|
+
/* @__PURE__ */ jsx31(StatusMark, { status: frame.status, graphMode: frame.graphMode }),
|
|
3795
|
+
/* @__PURE__ */ jsx31(ValidationMark, { validation: data.validation, onClick: data.onValidationBadgeClick }),
|
|
3796
|
+
frame.onFold && /* @__PURE__ */ jsx31(
|
|
3120
3797
|
"button",
|
|
3121
3798
|
{
|
|
3122
3799
|
type: "button",
|
|
@@ -3142,7 +3819,7 @@ var simpleNodeTypes = {
|
|
|
3142
3819
|
|
|
3143
3820
|
// src/graph/react/edges/RoutedEdge.tsx
|
|
3144
3821
|
import { BaseEdge, getSmoothStepPath } from "@xyflow/react";
|
|
3145
|
-
import { jsx as
|
|
3822
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
3146
3823
|
function RoutedEdge({
|
|
3147
3824
|
id,
|
|
3148
3825
|
sourceX,
|
|
@@ -3182,7 +3859,7 @@ function RoutedEdge({
|
|
|
3182
3859
|
borderRadius: 8
|
|
3183
3860
|
});
|
|
3184
3861
|
}
|
|
3185
|
-
return /* @__PURE__ */
|
|
3862
|
+
return /* @__PURE__ */ jsx32(
|
|
3186
3863
|
BaseEdge,
|
|
3187
3864
|
{
|
|
3188
3865
|
id,
|
|
@@ -3204,7 +3881,7 @@ function RoutedEdge({
|
|
|
3204
3881
|
}
|
|
3205
3882
|
|
|
3206
3883
|
// src/graph/react/viewer/GraphViewer.tsx
|
|
3207
|
-
import { Fragment as
|
|
3884
|
+
import { Fragment as Fragment19, jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3208
3885
|
var nodeTypes = __spreadValues(__spreadProps(__spreadValues({}, controllerNodeTypes), {
|
|
3209
3886
|
pipeCard: PipeCardRFNode
|
|
3210
3887
|
}), simpleNodeTypes);
|
|
@@ -3222,47 +3899,6 @@ var STILL_FLOW_PROPS = {
|
|
|
3222
3899
|
elementsSelectable: false,
|
|
3223
3900
|
disableKeyboardA11y: true
|
|
3224
3901
|
};
|
|
3225
|
-
function StuffNodeDetail({
|
|
3226
|
-
nodeId,
|
|
3227
|
-
stuffData,
|
|
3228
|
-
producerPipeRef,
|
|
3229
|
-
consumer,
|
|
3230
|
-
graphspec,
|
|
3231
|
-
artifacts,
|
|
3232
|
-
theme,
|
|
3233
|
-
resolveUrl,
|
|
3234
|
-
resolveRendition,
|
|
3235
|
-
resolveShareUrl,
|
|
3236
|
-
saveFiles,
|
|
3237
|
-
downloads
|
|
3238
|
-
}) {
|
|
3239
|
-
var _a;
|
|
3240
|
-
const conceptInfo = stuffData.concept && graphspec ? resolveConceptRef(graphspec, stuffData.concept) : void 0;
|
|
3241
|
-
const isDryRun = graphSpecMode(graphspec) === GRAPH_SPEC_MODE.DRY;
|
|
3242
|
-
const descriptors = resultDescriptors(artifacts);
|
|
3243
|
-
const renderData = descriptors ? () => /* @__PURE__ */ jsx30(
|
|
3244
|
-
StuffResultPanel,
|
|
3245
|
-
__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, descriptors), {
|
|
3246
|
-
stuff: stuffData
|
|
3247
|
-
}), conceptInfo ? { concept: conceptInfo } : {}), producerPipeRef ? { producerPipeRef } : {}), consumer ? { consumer } : {}), resolveUrl ? { resolveUrl } : {}), resolveRendition ? { resolveRendition } : {}), resolveShareUrl ? { resolveShareUrl } : {}), saveFiles ? { saveFiles } : {}), downloads ? { downloads } : {}), {
|
|
3248
|
-
theme
|
|
3249
|
-
})
|
|
3250
|
-
) : void 0;
|
|
3251
|
-
if (conceptInfo) {
|
|
3252
|
-
return /* @__PURE__ */ jsx30(
|
|
3253
|
-
ConceptDetailPanel,
|
|
3254
|
-
{
|
|
3255
|
-
concept: conceptInfo,
|
|
3256
|
-
ioData: stuffData,
|
|
3257
|
-
isDryRun,
|
|
3258
|
-
instanceKey: nodeId,
|
|
3259
|
-
renderData
|
|
3260
|
-
}
|
|
3261
|
-
);
|
|
3262
|
-
}
|
|
3263
|
-
if (isDryRun) return /* @__PURE__ */ jsx30("div", { className: "detail-not-available", children: "Dry run data hidden" });
|
|
3264
|
-
return /* @__PURE__ */ jsx30(Fragment16, { children: (_a = renderData == null ? void 0 : renderData()) != null ? _a : /* @__PURE__ */ jsx30("div", { className: "detail-not-available", children: "No data" }) });
|
|
3265
|
-
}
|
|
3266
3902
|
function seedFoldedControllers(mode, controllerIds) {
|
|
3267
3903
|
if (mode === FOLD_MODE.FOLDED) return new Set(controllerIds);
|
|
3268
3904
|
return /* @__PURE__ */ new Set();
|
|
@@ -3278,6 +3914,9 @@ function resolveToolbarPosition(positionProp, configPosition) {
|
|
|
3278
3914
|
var _a;
|
|
3279
3915
|
return (_a = positionProp != null ? positionProp : configPosition) != null ? _a : DEFAULT_GRAPH_CONFIG.toolbarPosition;
|
|
3280
3916
|
}
|
|
3917
|
+
function deselect(element) {
|
|
3918
|
+
return element.selected ? __spreadProps(__spreadValues({}, element), { selected: false }) : element;
|
|
3919
|
+
}
|
|
3281
3920
|
function stripFlash(className) {
|
|
3282
3921
|
return (className == null ? void 0 : className.replace(/\s*\bnode-validation-flash\b/, "")) || void 0;
|
|
3283
3922
|
}
|
|
@@ -3329,18 +3968,19 @@ function applyStatusOverrides(nodes, statusMap) {
|
|
|
3329
3968
|
function containerClassName(theme, mode, {
|
|
3330
3969
|
interactive,
|
|
3331
3970
|
failed,
|
|
3332
|
-
relayoutFailed = false
|
|
3971
|
+
relayoutFailed = false,
|
|
3972
|
+
valueArrows = false
|
|
3333
3973
|
}) {
|
|
3334
|
-
return `react-flow-container react-flow-container--theme-${theme} react-flow-container--mode-${mode}` + (interactive ? "" : " react-flow-container--still") + (failed ? " react-flow-container--failed" : "") + (relayoutFailed ? " react-flow-container--relayout-failed" : "");
|
|
3974
|
+
return `react-flow-container react-flow-container--theme-${theme} react-flow-container--mode-${mode}` + (interactive ? "" : " react-flow-container--still") + (failed ? " react-flow-container--failed" : "") + (relayoutFailed ? " react-flow-container--relayout-failed" : "") + (valueArrows && interactive ? " react-flow-container--value-arrows" : "");
|
|
3335
3975
|
}
|
|
3336
3976
|
function GraphViewer(props) {
|
|
3337
3977
|
var _a, _b;
|
|
3338
|
-
return /* @__PURE__ */
|
|
3978
|
+
return /* @__PURE__ */ jsx33(
|
|
3339
3979
|
GraphFailureBoundary,
|
|
3340
3980
|
{
|
|
3341
3981
|
resetKey: (_b = (_a = props.graph) == null ? void 0 : _a.graphSpec) != null ? _b : null,
|
|
3342
|
-
fallback: (failure) => /* @__PURE__ */
|
|
3343
|
-
children: (fail) => /* @__PURE__ */
|
|
3982
|
+
fallback: (failure) => /* @__PURE__ */ jsx33(GraphViewerFailed, __spreadProps(__spreadValues({}, props), { failure })),
|
|
3983
|
+
children: (fail) => /* @__PURE__ */ jsx33(GraphViewerCanvas, __spreadProps(__spreadValues({}, props), { onFailure: fail }))
|
|
3344
3984
|
}
|
|
3345
3985
|
);
|
|
3346
3986
|
}
|
|
@@ -3354,17 +3994,17 @@ function GraphViewerFailed({
|
|
|
3354
3994
|
const mode = resolveExternalThemeMode(themeProp, config.theme);
|
|
3355
3995
|
const resolvedTheme = resolveActiveTheme(mode, useSystemTheme(systemThemeProp));
|
|
3356
3996
|
const palette = __spreadValues(__spreadValues({}, getPaletteForTheme(resolvedTheme)), config.paletteColors);
|
|
3357
|
-
return /* @__PURE__ */
|
|
3997
|
+
return /* @__PURE__ */ jsx33(
|
|
3358
3998
|
"div",
|
|
3359
3999
|
{
|
|
3360
4000
|
className: containerClassName(resolvedTheme, mode, { interactive, failed: true }),
|
|
3361
4001
|
style: palette,
|
|
3362
|
-
children: /* @__PURE__ */
|
|
4002
|
+
children: /* @__PURE__ */ jsx33(GraphErrorState, { failure })
|
|
3363
4003
|
}
|
|
3364
4004
|
);
|
|
3365
4005
|
}
|
|
3366
4006
|
function GraphViewerCanvas(props) {
|
|
3367
|
-
var _a, _b, _c, _d
|
|
4007
|
+
var _a, _b, _c, _d;
|
|
3368
4008
|
const {
|
|
3369
4009
|
graph,
|
|
3370
4010
|
config = DEFAULT_GRAPH_CONFIG,
|
|
@@ -3399,31 +4039,31 @@ function GraphViewerCanvas(props) {
|
|
|
3399
4039
|
onFailure
|
|
3400
4040
|
} = props;
|
|
3401
4041
|
const graphspecProp = (_a = graph == null ? void 0 : graph.graphSpec) != null ? _a : null;
|
|
3402
|
-
const { graphspec, failure: specFailure } =
|
|
4042
|
+
const { graphspec, failure: specFailure } = React13.useMemo(
|
|
3403
4043
|
() => readGraphSpec(graphspecProp),
|
|
3404
4044
|
[graphspecProp]
|
|
3405
4045
|
);
|
|
3406
|
-
const graphspecRef =
|
|
4046
|
+
const graphspecRef = React13.useRef(graphspec);
|
|
3407
4047
|
graphspecRef.current = graphspec;
|
|
3408
|
-
const [layoutFailure, setLayoutFailure] =
|
|
4048
|
+
const [layoutFailure, setLayoutFailure] = React13.useState(null);
|
|
3409
4049
|
const canvasFailure = placeCanvasFailure({
|
|
3410
4050
|
specFailure,
|
|
3411
4051
|
layoutFailure: layoutFailureFor(layoutFailure, graphspec),
|
|
3412
4052
|
interactive
|
|
3413
4053
|
});
|
|
3414
4054
|
const failed = canvasFailure.inPlace !== null;
|
|
3415
|
-
const onFailureRef =
|
|
4055
|
+
const onFailureRef = React13.useRef(onFailure);
|
|
3416
4056
|
onFailureRef.current = onFailure;
|
|
3417
|
-
const [direction, setDirection] =
|
|
4057
|
+
const [direction, setDirection] = React13.useState(
|
|
3418
4058
|
() => {
|
|
3419
4059
|
var _a2, _b2;
|
|
3420
4060
|
return (_b2 = (_a2 = initialDirection != null ? initialDirection : config.direction) != null ? _a2 : DEFAULT_GRAPH_CONFIG.direction) != null ? _b2 : GRAPH_DIRECTION.TB;
|
|
3421
4061
|
}
|
|
3422
4062
|
);
|
|
3423
4063
|
const externalMode = resolveExternalThemeMode(themeProp, config.theme);
|
|
3424
|
-
const [mode, setMode] =
|
|
3425
|
-
const prevExternalModeRef =
|
|
3426
|
-
|
|
4064
|
+
const [mode, setMode] = React13.useState(externalMode);
|
|
4065
|
+
const prevExternalModeRef = React13.useRef(externalMode);
|
|
4066
|
+
React13.useEffect(() => {
|
|
3427
4067
|
if (externalMode !== prevExternalModeRef.current) {
|
|
3428
4068
|
prevExternalModeRef.current = externalMode;
|
|
3429
4069
|
setMode(externalMode);
|
|
@@ -3431,13 +4071,13 @@ function GraphViewerCanvas(props) {
|
|
|
3431
4071
|
}, [externalMode]);
|
|
3432
4072
|
const systemTheme = useSystemTheme(systemThemeProp);
|
|
3433
4073
|
const resolvedTheme = resolveActiveTheme(mode, systemTheme);
|
|
3434
|
-
const onThemeChangeRef =
|
|
4074
|
+
const onThemeChangeRef = React13.useRef(onThemeChange);
|
|
3435
4075
|
onThemeChangeRef.current = onThemeChange;
|
|
3436
|
-
const prevReportedRef =
|
|
4076
|
+
const prevReportedRef = React13.useRef({
|
|
3437
4077
|
mode,
|
|
3438
4078
|
resolvedTheme
|
|
3439
4079
|
});
|
|
3440
|
-
|
|
4080
|
+
React13.useEffect(() => {
|
|
3441
4081
|
var _a2;
|
|
3442
4082
|
const prev = prevReportedRef.current;
|
|
3443
4083
|
if (prev.mode !== mode || prev.resolvedTheme !== resolvedTheme) {
|
|
@@ -3446,48 +4086,48 @@ function GraphViewerCanvas(props) {
|
|
|
3446
4086
|
}
|
|
3447
4087
|
}, [mode, resolvedTheme]);
|
|
3448
4088
|
const externalStyle = resolveGraphStyle(graphStyleProp, config.graphStyle);
|
|
3449
|
-
const [graphStyle, setGraphStyle] =
|
|
3450
|
-
const prevExternalStyleRef =
|
|
3451
|
-
|
|
4089
|
+
const [graphStyle, setGraphStyle] = React13.useState(externalStyle);
|
|
4090
|
+
const prevExternalStyleRef = React13.useRef(externalStyle);
|
|
4091
|
+
React13.useEffect(() => {
|
|
3452
4092
|
if (externalStyle !== prevExternalStyleRef.current) {
|
|
3453
4093
|
prevExternalStyleRef.current = externalStyle;
|
|
3454
4094
|
setGraphStyle(externalStyle);
|
|
3455
4095
|
}
|
|
3456
4096
|
}, [externalStyle]);
|
|
3457
|
-
const onGraphStyleChangeRef =
|
|
4097
|
+
const onGraphStyleChangeRef = React13.useRef(onGraphStyleChange);
|
|
3458
4098
|
onGraphStyleChangeRef.current = onGraphStyleChange;
|
|
3459
|
-
const prevReportedStyleRef =
|
|
3460
|
-
|
|
4099
|
+
const prevReportedStyleRef = React13.useRef(graphStyle);
|
|
4100
|
+
React13.useEffect(() => {
|
|
3461
4101
|
var _a2;
|
|
3462
4102
|
if (prevReportedStyleRef.current !== graphStyle) {
|
|
3463
4103
|
prevReportedStyleRef.current = graphStyle;
|
|
3464
4104
|
(_a2 = onGraphStyleChangeRef.current) == null ? void 0 : _a2.call(onGraphStyleChangeRef, graphStyle);
|
|
3465
4105
|
}
|
|
3466
4106
|
}, [graphStyle]);
|
|
3467
|
-
const graphStyleRef =
|
|
4107
|
+
const graphStyleRef = React13.useRef(graphStyle);
|
|
3468
4108
|
graphStyleRef.current = graphStyle;
|
|
3469
4109
|
const styleCapabilities = GRAPH_STYLES[graphStyle].capabilities;
|
|
3470
4110
|
const effectiveFoldMode = (_c = (_b = initialFoldMode != null ? initialFoldMode : config.foldMode) != null ? _b : DEFAULT_GRAPH_CONFIG.foldMode) != null ? _c : FOLD_MODE.EXPANDED;
|
|
3471
|
-
const [showControllers, setShowControllers] =
|
|
4111
|
+
const [showControllers, setShowControllers] = React13.useState(() => {
|
|
3472
4112
|
var _a2, _b2;
|
|
3473
4113
|
if (effectiveFoldMode === FOLD_MODE.FOLDED) return true;
|
|
3474
4114
|
return (_b2 = (_a2 = initialShowControllers != null ? initialShowControllers : config.showControllers) != null ? _a2 : DEFAULT_GRAPH_CONFIG.showControllers) != null ? _b2 : false;
|
|
3475
4115
|
});
|
|
3476
|
-
const foldModeRef =
|
|
4116
|
+
const foldModeRef = React13.useRef(effectiveFoldMode);
|
|
3477
4117
|
foldModeRef.current = effectiveFoldMode;
|
|
3478
|
-
const containerRef =
|
|
3479
|
-
const [detailSelection, setDetailSelection] =
|
|
3480
|
-
const [conceptOverride, setConceptOverride] =
|
|
4118
|
+
const containerRef = React13.useRef(null);
|
|
4119
|
+
const [detailSelection, setDetailSelection] = React13.useState(null);
|
|
4120
|
+
const [conceptOverride, setConceptOverride] = React13.useState(null);
|
|
3481
4121
|
const {
|
|
3482
4122
|
width: panelWidth,
|
|
3483
4123
|
isDragging: isPanelDragging,
|
|
3484
4124
|
handleMouseDown: onResizeMouseDown
|
|
3485
4125
|
} = useResizable({ defaultWidth: 380, minWidth: 280, maxWidth: 800, containerRef });
|
|
3486
|
-
|
|
4126
|
+
React13.useEffect(() => {
|
|
3487
4127
|
setDetailSelection(null);
|
|
3488
4128
|
setConceptOverride(null);
|
|
3489
4129
|
}, [graphspec]);
|
|
3490
|
-
|
|
4130
|
+
React13.useEffect(() => {
|
|
3491
4131
|
const el = containerRef.current;
|
|
3492
4132
|
if (!el) return;
|
|
3493
4133
|
const themePalette = getPaletteForTheme(resolvedTheme);
|
|
@@ -3502,15 +4142,15 @@ function GraphViewerCanvas(props) {
|
|
|
3502
4142
|
}
|
|
3503
4143
|
};
|
|
3504
4144
|
}, [config.paletteColors, resolvedTheme]);
|
|
3505
|
-
const [stillHeight, setStillHeight] =
|
|
4145
|
+
const [stillHeight, setStillHeight] = React13.useState(STILL_PLACEHOLDER_HEIGHT_PX);
|
|
3506
4146
|
const [nodes, setNodes, onNodesChange] = useNodesState([]);
|
|
3507
4147
|
const [edges, setEdges, onEdgesChange] = useEdgesState([]);
|
|
3508
|
-
const reactFlowRef =
|
|
3509
|
-
const initialDataRef =
|
|
3510
|
-
const rawGraphDataRef =
|
|
3511
|
-
const layoutCacheRef =
|
|
3512
|
-
const [expandedControllers, setExpandedControllers] =
|
|
3513
|
-
const toggleCollapse =
|
|
4148
|
+
const reactFlowRef = React13.useRef(null);
|
|
4149
|
+
const initialDataRef = React13.useRef(null);
|
|
4150
|
+
const rawGraphDataRef = React13.useRef(null);
|
|
4151
|
+
const layoutCacheRef = React13.useRef(null);
|
|
4152
|
+
const [expandedControllers, setExpandedControllers] = React13.useState(/* @__PURE__ */ new Set());
|
|
4153
|
+
const toggleCollapse = React13.useCallback((controllerId) => {
|
|
3514
4154
|
setExpandedControllers((prev) => {
|
|
3515
4155
|
const next = new Set(prev);
|
|
3516
4156
|
if (next.has(controllerId)) next.delete(controllerId);
|
|
@@ -3518,17 +4158,17 @@ function GraphViewerCanvas(props) {
|
|
|
3518
4158
|
return next;
|
|
3519
4159
|
});
|
|
3520
4160
|
}, []);
|
|
3521
|
-
const [foldedControllers, setFoldedControllers] =
|
|
3522
|
-
const styleDefaultFoldsRef =
|
|
3523
|
-
const readerOpenedRef =
|
|
3524
|
-
const markReaderFolds =
|
|
4161
|
+
const [foldedControllers, setFoldedControllers] = React13.useState(/* @__PURE__ */ new Set());
|
|
4162
|
+
const styleDefaultFoldsRef = React13.useRef(/* @__PURE__ */ new Set());
|
|
4163
|
+
const readerOpenedRef = React13.useRef(/* @__PURE__ */ new Set());
|
|
4164
|
+
const markReaderFolds = React13.useCallback((ids, folded) => {
|
|
3525
4165
|
for (const id of ids) {
|
|
3526
4166
|
styleDefaultFoldsRef.current.delete(id);
|
|
3527
4167
|
if (folded) readerOpenedRef.current.delete(id);
|
|
3528
4168
|
else readerOpenedRef.current.add(id);
|
|
3529
4169
|
}
|
|
3530
4170
|
}, []);
|
|
3531
|
-
const toggleFold =
|
|
4171
|
+
const toggleFold = React13.useCallback(
|
|
3532
4172
|
(controllerId, options) => {
|
|
3533
4173
|
setFoldedControllers((prev) => {
|
|
3534
4174
|
const next = new Set(prev);
|
|
@@ -3546,45 +4186,53 @@ function GraphViewerCanvas(props) {
|
|
|
3546
4186
|
[markReaderFolds]
|
|
3547
4187
|
);
|
|
3548
4188
|
const edgeType = config.edgeType || EDGE_TYPE.DEFAULT;
|
|
3549
|
-
const layoutConfig =
|
|
4189
|
+
const layoutConfig = React13.useMemo(
|
|
3550
4190
|
() => ({ nodesep: config.nodesep, ranksep: config.ranksep }),
|
|
3551
4191
|
[config.nodesep, config.ranksep]
|
|
3552
4192
|
);
|
|
3553
|
-
const showControllersRef =
|
|
4193
|
+
const showControllersRef = React13.useRef(showControllers);
|
|
3554
4194
|
showControllersRef.current = showControllers;
|
|
3555
|
-
const directionRef =
|
|
4195
|
+
const directionRef = React13.useRef(direction);
|
|
3556
4196
|
directionRef.current = direction;
|
|
3557
|
-
const layoutConfigRef =
|
|
4197
|
+
const layoutConfigRef = React13.useRef(layoutConfig);
|
|
3558
4198
|
layoutConfigRef.current = layoutConfig;
|
|
3559
|
-
const initialZoomRef =
|
|
4199
|
+
const initialZoomRef = React13.useRef(config.initialZoom);
|
|
3560
4200
|
initialZoomRef.current = config.initialZoom;
|
|
3561
|
-
const panToTopRef =
|
|
4201
|
+
const panToTopRef = React13.useRef(config.panToTop);
|
|
3562
4202
|
panToTopRef.current = config.panToTop;
|
|
3563
|
-
const interactiveRef =
|
|
4203
|
+
const interactiveRef = React13.useRef(interactive);
|
|
3564
4204
|
interactiveRef.current = interactive;
|
|
3565
|
-
const expandedRef =
|
|
4205
|
+
const expandedRef = React13.useRef(expandedControllers);
|
|
3566
4206
|
expandedRef.current = expandedControllers;
|
|
3567
|
-
const toggleCollapseRef =
|
|
4207
|
+
const toggleCollapseRef = React13.useRef(toggleCollapse);
|
|
3568
4208
|
toggleCollapseRef.current = toggleCollapse;
|
|
3569
|
-
const foldedRef =
|
|
4209
|
+
const foldedRef = React13.useRef(foldedControllers);
|
|
3570
4210
|
foldedRef.current = foldedControllers;
|
|
3571
|
-
const toggleFoldRef =
|
|
4211
|
+
const toggleFoldRef = React13.useRef(toggleFold);
|
|
3572
4212
|
toggleFoldRef.current = toggleFold;
|
|
3573
|
-
const isFirstFoldEffect =
|
|
3574
|
-
const prevFoldSizeRef =
|
|
3575
|
-
const skipNextFoldEffectRef =
|
|
3576
|
-
const statusMapRef =
|
|
4213
|
+
const isFirstFoldEffect = React13.useRef(true);
|
|
4214
|
+
const prevFoldSizeRef = React13.useRef(0);
|
|
4215
|
+
const skipNextFoldEffectRef = React13.useRef(false);
|
|
4216
|
+
const statusMapRef = React13.useRef(statusMap);
|
|
3577
4217
|
statusMapRef.current = statusMap;
|
|
3578
|
-
const validationIssuesRef =
|
|
4218
|
+
const validationIssuesRef = React13.useRef(validationIssues);
|
|
3579
4219
|
validationIssuesRef.current = validationIssues;
|
|
3580
|
-
const selectedNodeIdRef =
|
|
3581
|
-
selectedNodeIdRef.current = (
|
|
3582
|
-
const
|
|
3583
|
-
|
|
4220
|
+
const selectedNodeIdRef = React13.useRef(null);
|
|
4221
|
+
selectedNodeIdRef.current = selectedNodeId(detailSelection);
|
|
4222
|
+
const selectedArrowRef = React13.useRef(null);
|
|
4223
|
+
selectedArrowRef.current = (detailSelection == null ? void 0 : detailSelection.kind) === "arrow" ? detailSelection : null;
|
|
4224
|
+
React13.useEffect(() => {
|
|
4225
|
+
if ((detailSelection == null ? void 0 : detailSelection.kind) !== "arrow") return;
|
|
4226
|
+
const { source, target } = detailSelection;
|
|
4227
|
+
const drawn = edges.some((e) => e.source === source && e.target === target);
|
|
4228
|
+
if (!styleCapabilities.valueArrows || !drawn) setDetailSelection(null);
|
|
4229
|
+
}, [detailSelection, edges, styleCapabilities.valueArrows]);
|
|
4230
|
+
const [validationOpen, setValidationOpen] = React13.useState(false);
|
|
4231
|
+
const openValidationPanel = React13.useCallback(() => setValidationOpen(true), []);
|
|
3584
4232
|
const validationWidgetAvailable = validationState !== void 0 && !hideToolbar && interactive;
|
|
3585
|
-
const validationWidgetAvailableRef =
|
|
4233
|
+
const validationWidgetAvailableRef = React13.useRef(validationWidgetAvailable);
|
|
3586
4234
|
validationWidgetAvailableRef.current = validationWidgetAvailable;
|
|
3587
|
-
const decorateNodes =
|
|
4235
|
+
const decorateNodes = React13.useCallback(
|
|
3588
4236
|
(nodes2) => {
|
|
3589
4237
|
var _a2, _b2, _c2;
|
|
3590
4238
|
const raw = rawGraphDataRef.current;
|
|
@@ -3605,7 +4253,15 @@ function GraphViewerCanvas(props) {
|
|
|
3605
4253
|
},
|
|
3606
4254
|
[openValidationPanel]
|
|
3607
4255
|
);
|
|
3608
|
-
const
|
|
4256
|
+
const decorateEdges = React13.useCallback((graphEdges) => {
|
|
4257
|
+
const appEdges = toAppEdges(graphEdges);
|
|
4258
|
+
const arrow = selectedArrowRef.current;
|
|
4259
|
+
if (!arrow) return appEdges;
|
|
4260
|
+
return appEdges.map(
|
|
4261
|
+
(e) => e.source === arrow.source && e.target === arrow.target ? __spreadProps(__spreadValues({}, e), { selected: true }) : e
|
|
4262
|
+
);
|
|
4263
|
+
}, []);
|
|
4264
|
+
const frameLayout = React13.useCallback(
|
|
3609
4265
|
(style, layout, graphspec2, analysis) => GRAPH_STYLE_PIPELINES[style].frame({
|
|
3610
4266
|
nodes: cloneCachedNodes(layout.nodes),
|
|
3611
4267
|
edges: layout.edges,
|
|
@@ -3624,18 +4280,18 @@ function GraphViewerCanvas(props) {
|
|
|
3624
4280
|
const data = initialDataRef.current;
|
|
3625
4281
|
return cache !== null && data !== null && cache.graphspec === data._graphspec && cache.graphStyle === data._graphStyle;
|
|
3626
4282
|
};
|
|
3627
|
-
const nodesRef =
|
|
4283
|
+
const nodesRef = React13.useRef([]);
|
|
3628
4284
|
nodesRef.current = nodes;
|
|
3629
|
-
const onValidationIssueClickRef =
|
|
4285
|
+
const onValidationIssueClickRef = React13.useRef(onValidationIssueClick);
|
|
3630
4286
|
onValidationIssueClickRef.current = onValidationIssueClick;
|
|
3631
|
-
const flashTimeoutRef =
|
|
3632
|
-
|
|
4287
|
+
const flashTimeoutRef = React13.useRef(null);
|
|
4288
|
+
React13.useEffect(
|
|
3633
4289
|
() => () => {
|
|
3634
4290
|
if (flashTimeoutRef.current) clearTimeout(flashTimeoutRef.current);
|
|
3635
4291
|
},
|
|
3636
4292
|
[]
|
|
3637
4293
|
);
|
|
3638
|
-
const handleValidationIssueClick =
|
|
4294
|
+
const handleValidationIssueClick = React13.useCallback(
|
|
3639
4295
|
(index, issue) => {
|
|
3640
4296
|
var _a2, _b2, _c2;
|
|
3641
4297
|
(_a2 = onValidationIssueClickRef.current) == null ? void 0 : _a2.call(onValidationIssueClickRef, index, issue);
|
|
@@ -3678,8 +4334,8 @@ function GraphViewerCanvas(props) {
|
|
|
3678
4334
|
},
|
|
3679
4335
|
[setNodes]
|
|
3680
4336
|
);
|
|
3681
|
-
const drawnSpecRef =
|
|
3682
|
-
const reportLayoutFailure =
|
|
4337
|
+
const drawnSpecRef = React13.useRef(null);
|
|
4338
|
+
const reportLayoutFailure = React13.useCallback(
|
|
3683
4339
|
(error, spec, stale) => {
|
|
3684
4340
|
console.error("[GraphViewer] ELK layout failed:", error);
|
|
3685
4341
|
const route = routeLayoutFailure({ stale, specDrawn: drawnSpecRef.current === spec });
|
|
@@ -3692,7 +4348,7 @@ function GraphViewerCanvas(props) {
|
|
|
3692
4348
|
},
|
|
3693
4349
|
[]
|
|
3694
4350
|
);
|
|
3695
|
-
|
|
4351
|
+
React13.useEffect(() => {
|
|
3696
4352
|
const data = initialDataRef.current;
|
|
3697
4353
|
if (!data) return;
|
|
3698
4354
|
let cancelled = false;
|
|
@@ -3723,7 +4379,7 @@ function GraphViewerCanvas(props) {
|
|
|
3723
4379
|
data._analysis
|
|
3724
4380
|
);
|
|
3725
4381
|
setNodes(decorateNodes(withControllers.nodes));
|
|
3726
|
-
setEdges(
|
|
4382
|
+
setEdges(decorateEdges(withControllers.edges));
|
|
3727
4383
|
drawnSpecRef.current = data._graphspec;
|
|
3728
4384
|
setLayoutFailure(null);
|
|
3729
4385
|
setTimeout(() => {
|
|
@@ -3739,15 +4395,22 @@ function GraphViewerCanvas(props) {
|
|
|
3739
4395
|
cancelled = true;
|
|
3740
4396
|
};
|
|
3741
4397
|
}, [direction, layoutConfig]);
|
|
3742
|
-
|
|
4398
|
+
React13.useEffect(() => {
|
|
3743
4399
|
const cache = layoutCacheRef.current;
|
|
3744
4400
|
const data = initialDataRef.current;
|
|
3745
4401
|
if (!cache || !data || !cacheMatchesData()) return;
|
|
3746
4402
|
const withControllers = frameLayout(cache.graphStyle, cache, data._graphspec, data._analysis);
|
|
3747
4403
|
setNodes(decorateNodes(withControllers.nodes));
|
|
3748
|
-
setEdges(
|
|
3749
|
-
}, [
|
|
3750
|
-
|
|
4404
|
+
setEdges(decorateEdges(withControllers.edges));
|
|
4405
|
+
}, [
|
|
4406
|
+
showControllers,
|
|
4407
|
+
expandedControllers,
|
|
4408
|
+
toggleCollapse,
|
|
4409
|
+
toggleFold,
|
|
4410
|
+
decorateNodes,
|
|
4411
|
+
decorateEdges
|
|
4412
|
+
]);
|
|
4413
|
+
React13.useEffect(() => {
|
|
3751
4414
|
var _a2;
|
|
3752
4415
|
if (!graphspec) {
|
|
3753
4416
|
initialDataRef.current = null;
|
|
@@ -3812,13 +4475,13 @@ function GraphViewerCanvas(props) {
|
|
|
3812
4475
|
analysis: folded.analysis,
|
|
3813
4476
|
rawAnalysis: analysis
|
|
3814
4477
|
});
|
|
3815
|
-
initialDataRef.current = __spreadValues({
|
|
4478
|
+
initialDataRef.current = __spreadValues(__spreadValues(__spreadValues({
|
|
3816
4479
|
nodes: projected.nodes,
|
|
3817
4480
|
edges: projected.edges,
|
|
3818
4481
|
_analysis: projected.analysis,
|
|
3819
4482
|
_graphspec: graphspec,
|
|
3820
4483
|
_graphStyle: style
|
|
3821
|
-
}, projected.standIns ? { _standIns: projected.standIns } : {});
|
|
4484
|
+
}, projected.standIns ? { _standIns: projected.standIns } : {}), projected.valueFlows ? { _valueFlows: projected.valueFlows } : {}), projected.runs ? { _runs: projected.runs } : {});
|
|
3822
4485
|
void (async () => {
|
|
3823
4486
|
var _a3;
|
|
3824
4487
|
try {
|
|
@@ -3849,7 +4512,7 @@ function GraphViewerCanvas(props) {
|
|
|
3849
4512
|
};
|
|
3850
4513
|
const withControllers = frameLayout(style, layouted, graphspec, projected.analysis);
|
|
3851
4514
|
setNodes(decorateNodes(withControllers.nodes));
|
|
3852
|
-
setEdges(
|
|
4515
|
+
setEdges(decorateEdges(withControllers.edges));
|
|
3853
4516
|
drawnSpecRef.current = graphspec;
|
|
3854
4517
|
setLayoutFailure(null);
|
|
3855
4518
|
setTimeout(() => {
|
|
@@ -3872,7 +4535,7 @@ function GraphViewerCanvas(props) {
|
|
|
3872
4535
|
cancelled = true;
|
|
3873
4536
|
};
|
|
3874
4537
|
}, [graphspec, edgeType, graphStyle]);
|
|
3875
|
-
|
|
4538
|
+
React13.useEffect(() => {
|
|
3876
4539
|
if (isFirstFoldEffect.current) {
|
|
3877
4540
|
isFirstFoldEffect.current = false;
|
|
3878
4541
|
prevFoldSizeRef.current = foldedControllers.size;
|
|
@@ -3908,13 +4571,13 @@ function GraphViewerCanvas(props) {
|
|
|
3908
4571
|
analysis: folded.analysis,
|
|
3909
4572
|
rawAnalysis: currentAnalysis
|
|
3910
4573
|
});
|
|
3911
|
-
initialDataRef.current = __spreadValues({
|
|
4574
|
+
initialDataRef.current = __spreadValues(__spreadValues(__spreadValues({
|
|
3912
4575
|
nodes: projected.nodes,
|
|
3913
4576
|
edges: projected.edges,
|
|
3914
4577
|
_analysis: projected.analysis,
|
|
3915
4578
|
_graphspec: currentGraphspec,
|
|
3916
4579
|
_graphStyle: style
|
|
3917
|
-
}, projected.standIns ? { _standIns: projected.standIns } : {});
|
|
4580
|
+
}, projected.standIns ? { _standIns: projected.standIns } : {}), projected.valueFlows ? { _valueFlows: projected.valueFlows } : {}), projected.runs ? { _runs: projected.runs } : {});
|
|
3918
4581
|
void (async () => {
|
|
3919
4582
|
var _a2;
|
|
3920
4583
|
try {
|
|
@@ -3936,7 +4599,7 @@ function GraphViewerCanvas(props) {
|
|
|
3936
4599
|
};
|
|
3937
4600
|
const withControllers = frameLayout(style, layouted, currentGraphspec, projected.analysis);
|
|
3938
4601
|
setNodes(decorateNodes(withControllers.nodes));
|
|
3939
|
-
setEdges(
|
|
4602
|
+
setEdges(decorateEdges(withControllers.edges));
|
|
3940
4603
|
drawnSpecRef.current = currentGraphspec;
|
|
3941
4604
|
setLayoutFailure(null);
|
|
3942
4605
|
setTimeout(() => {
|
|
@@ -3952,22 +4615,22 @@ function GraphViewerCanvas(props) {
|
|
|
3952
4615
|
cancelled = true;
|
|
3953
4616
|
};
|
|
3954
4617
|
}, [foldedControllers, toggleFold]);
|
|
3955
|
-
|
|
4618
|
+
React13.useEffect(() => {
|
|
3956
4619
|
const cache = layoutCacheRef.current;
|
|
3957
4620
|
const data = initialDataRef.current;
|
|
3958
4621
|
if (!cache || !data || !cacheMatchesData()) return;
|
|
3959
4622
|
const withControllers = frameLayout(cache.graphStyle, cache, data._graphspec, data._analysis);
|
|
3960
4623
|
setNodes(decorateNodes(withControllers.nodes));
|
|
3961
|
-
setEdges(
|
|
3962
|
-
}, [statusMap, decorateNodes]);
|
|
3963
|
-
|
|
4624
|
+
setEdges(decorateEdges(withControllers.edges));
|
|
4625
|
+
}, [statusMap, decorateNodes, decorateEdges]);
|
|
4626
|
+
React13.useEffect(() => {
|
|
3964
4627
|
const cache = layoutCacheRef.current;
|
|
3965
4628
|
const data = initialDataRef.current;
|
|
3966
4629
|
if (!cache || !data || !cacheMatchesData()) return;
|
|
3967
4630
|
const withControllers = frameLayout(cache.graphStyle, cache, data._graphspec, data._analysis);
|
|
3968
4631
|
setNodes(decorateNodes(withControllers.nodes));
|
|
3969
4632
|
}, [validationIssues, validationWidgetAvailable, decorateNodes]);
|
|
3970
|
-
const onNodeClick =
|
|
4633
|
+
const onNodeClick = React13.useCallback(
|
|
3971
4634
|
(event, node) => {
|
|
3972
4635
|
const nodeData = node.data;
|
|
3973
4636
|
onNodeSelect == null ? void 0 : onNodeSelect(node.id, nodeData, event);
|
|
@@ -3981,7 +4644,7 @@ function GraphViewerCanvas(props) {
|
|
|
3981
4644
|
if (found) onStuffNodeClick(found.item);
|
|
3982
4645
|
}
|
|
3983
4646
|
setConceptOverride(null);
|
|
3984
|
-
if ((detailSelection
|
|
4647
|
+
if (selectedNodeId(detailSelection) === node.id && !conceptOverride) {
|
|
3985
4648
|
setDetailSelection(null);
|
|
3986
4649
|
} else if (nodeData.isPipe || nodeData.isController) {
|
|
3987
4650
|
setDetailSelection({ kind: "pipe", nodeId: node.id, nodeData });
|
|
@@ -3997,9 +4660,11 @@ function GraphViewerCanvas(props) {
|
|
|
3997
4660
|
});
|
|
3998
4661
|
}
|
|
3999
4662
|
setNodes((nds) => nds.map((n) => __spreadProps(__spreadValues({}, n), { selected: n.id === node.id })));
|
|
4663
|
+
setEdges((eds) => eds.some((e) => e.selected) ? eds.map(deselect) : eds);
|
|
4000
4664
|
},
|
|
4001
4665
|
[
|
|
4002
4666
|
setNodes,
|
|
4667
|
+
setEdges,
|
|
4003
4668
|
onNavigateToPipe,
|
|
4004
4669
|
onNodeSelect,
|
|
4005
4670
|
onStuffNodeClick,
|
|
@@ -4008,7 +4673,35 @@ function GraphViewerCanvas(props) {
|
|
|
4008
4673
|
conceptOverride
|
|
4009
4674
|
]
|
|
4010
4675
|
);
|
|
4011
|
-
const
|
|
4676
|
+
const onEdgeClick = React13.useCallback(
|
|
4677
|
+
(_event, edge) => {
|
|
4678
|
+
setConceptOverride(null);
|
|
4679
|
+
const open = (detailSelection == null ? void 0 : detailSelection.kind) === "arrow" && detailSelection.source === edge.source && detailSelection.target === edge.target;
|
|
4680
|
+
setDetailSelection(
|
|
4681
|
+
open ? null : { kind: "arrow", edgeId: edge.id, source: edge.source, target: edge.target }
|
|
4682
|
+
);
|
|
4683
|
+
setNodes((nds) => nds.some((n) => n.selected) ? nds.map(deselect) : nds);
|
|
4684
|
+
setEdges((eds) => eds.map((e) => __spreadProps(__spreadValues({}, e), { selected: !open && e.id === edge.id })));
|
|
4685
|
+
},
|
|
4686
|
+
[setNodes, setEdges, detailSelection]
|
|
4687
|
+
);
|
|
4688
|
+
const onOpenNodeFromPanel = React13.useCallback(
|
|
4689
|
+
(nodeId, event) => {
|
|
4690
|
+
const node = nodesRef.current.find((n) => n.id === nodeId);
|
|
4691
|
+
if (!node) return;
|
|
4692
|
+
onNodeClick(event, node);
|
|
4693
|
+
const flow = reactFlowRef.current;
|
|
4694
|
+
if (!flow) return;
|
|
4695
|
+
void flow.fitView({
|
|
4696
|
+
nodes: [{ id: nodeId }],
|
|
4697
|
+
duration: 400,
|
|
4698
|
+
padding: 0.4,
|
|
4699
|
+
maxZoom: flow.getZoom()
|
|
4700
|
+
});
|
|
4701
|
+
},
|
|
4702
|
+
[onNodeClick]
|
|
4703
|
+
);
|
|
4704
|
+
const onInit = React13.useCallback(
|
|
4012
4705
|
(reactFlowInstance) => {
|
|
4013
4706
|
reactFlowRef.current = reactFlowInstance;
|
|
4014
4707
|
if (onReactFlowInit) {
|
|
@@ -4017,8 +4710,8 @@ function GraphViewerCanvas(props) {
|
|
|
4017
4710
|
},
|
|
4018
4711
|
[onReactFlowInit]
|
|
4019
4712
|
);
|
|
4020
|
-
const prevInteractiveRef =
|
|
4021
|
-
|
|
4713
|
+
const prevInteractiveRef = React13.useRef(interactive);
|
|
4714
|
+
React13.useEffect(() => {
|
|
4022
4715
|
if (prevInteractiveRef.current === interactive) return;
|
|
4023
4716
|
prevInteractiveRef.current = interactive;
|
|
4024
4717
|
if (!interactive) {
|
|
@@ -4033,12 +4726,13 @@ function GraphViewerCanvas(props) {
|
|
|
4033
4726
|
}, 50);
|
|
4034
4727
|
return () => clearTimeout(timer);
|
|
4035
4728
|
}, [interactive]);
|
|
4036
|
-
const handlePaneClick =
|
|
4729
|
+
const handlePaneClick = React13.useCallback(() => {
|
|
4037
4730
|
setDetailSelection(null);
|
|
4038
4731
|
setConceptOverride(null);
|
|
4732
|
+
setEdges((eds) => eds.some((e) => e.selected) ? eds.map(deselect) : eds);
|
|
4039
4733
|
onPaneClick == null ? void 0 : onPaneClick();
|
|
4040
|
-
}, [onPaneClick]);
|
|
4041
|
-
const handleConceptClick =
|
|
4734
|
+
}, [onPaneClick, setEdges]);
|
|
4735
|
+
const handleConceptClick = React13.useCallback(
|
|
4042
4736
|
(conceptCode) => {
|
|
4043
4737
|
if (!graphspec) return;
|
|
4044
4738
|
const info = resolveConceptRef(graphspec, conceptCode);
|
|
@@ -4046,16 +4740,33 @@ function GraphViewerCanvas(props) {
|
|
|
4046
4740
|
},
|
|
4047
4741
|
[graphspec]
|
|
4048
4742
|
);
|
|
4049
|
-
const selectedSpecNode = (detailSelection == null ? void 0 : detailSelection.kind) === "pipe" && graphspec ? graphspec.nodes.find((n) => n.id === detailSelection.nodeId) : void 0;
|
|
4050
4743
|
const detailOpen = detailSelection !== null || conceptOverride !== null;
|
|
4744
|
+
const StylePanel = STYLE_DETAIL_PANELS[graphStyle];
|
|
4745
|
+
const projectedData = initialDataRef.current;
|
|
4746
|
+
const drawing = React13.useMemo(
|
|
4747
|
+
() => {
|
|
4748
|
+
var _a2, _b2;
|
|
4749
|
+
return projectedData && projectedData._graphStyle === graphStyle && projectedData._valueFlows && projectedData._runs ? {
|
|
4750
|
+
edges: projectedData.edges,
|
|
4751
|
+
valueFlows: projectedData._valueFlows,
|
|
4752
|
+
runs: projectedData._runs,
|
|
4753
|
+
frameContents: (_b2 = (_a2 = projectedData._analysis) == null ? void 0 : _a2.containmentTree) != null ? _b2 : {}
|
|
4754
|
+
} : null;
|
|
4755
|
+
},
|
|
4756
|
+
[projectedData, graphStyle]
|
|
4757
|
+
);
|
|
4758
|
+
const valueOptions = React13.useMemo(
|
|
4759
|
+
() => ({ resolveUrl, resolveRendition, resolveShareUrl, saveFiles, downloads }),
|
|
4760
|
+
[resolveUrl, resolveRendition, resolveShareUrl, saveFiles, downloads]
|
|
4761
|
+
);
|
|
4051
4762
|
const effectiveToolbarPosition = resolveToolbarPosition(
|
|
4052
4763
|
toolbarPositionProp,
|
|
4053
4764
|
config.toolbarPosition
|
|
4054
4765
|
);
|
|
4055
|
-
const rawAnalysis = (
|
|
4766
|
+
const rawAnalysis = (_d = rawGraphDataRef.current) == null ? void 0 : _d.analysis;
|
|
4056
4767
|
const allControllerIds = rawAnalysis == null ? void 0 : rawAnalysis.controllerNodeIds;
|
|
4057
4768
|
const foldControlsAvailable = styleCapabilities.foldAll && (!styleCapabilities.controllerFrameToggle || showControllers);
|
|
4058
|
-
const foldAllProps =
|
|
4769
|
+
const foldAllProps = React13.useMemo(() => {
|
|
4059
4770
|
if (!foldControlsAvailable || !allControllerIds || allControllerIds.size === 0) {
|
|
4060
4771
|
return {
|
|
4061
4772
|
onFoldAll: void 0,
|
|
@@ -4077,23 +4788,24 @@ function GraphViewerCanvas(props) {
|
|
|
4077
4788
|
expandAllDisabled: foldedControllers.size === 0
|
|
4078
4789
|
};
|
|
4079
4790
|
}, [foldControlsAvailable, allControllerIds, foldedControllers, markReaderFolds]);
|
|
4080
|
-
const styleMenuOptions =
|
|
4081
|
-
|
|
4791
|
+
const styleMenuOptions = React13.useMemo(() => resolveStyleMenu(styleMenu), [styleMenu]);
|
|
4792
|
+
React13.useEffect(() => {
|
|
4082
4793
|
if (failed) reactFlowRef.current = null;
|
|
4083
4794
|
}, [failed]);
|
|
4084
|
-
return /* @__PURE__ */
|
|
4795
|
+
return /* @__PURE__ */ jsx33(
|
|
4085
4796
|
"div",
|
|
4086
4797
|
{
|
|
4087
4798
|
ref: containerRef,
|
|
4088
4799
|
className: containerClassName(resolvedTheme, mode, {
|
|
4089
4800
|
interactive,
|
|
4090
4801
|
failed,
|
|
4091
|
-
relayoutFailed: canvasFailure.overFlow !== null
|
|
4802
|
+
relayoutFailed: canvasFailure.overFlow !== null,
|
|
4803
|
+
valueArrows: styleCapabilities.valueArrows
|
|
4092
4804
|
}),
|
|
4093
4805
|
style: interactive || failed ? void 0 : { height: stillHeight },
|
|
4094
4806
|
inert: !interactive && !failed,
|
|
4095
|
-
children: canvasFailure.inPlace !== null ? /* @__PURE__ */
|
|
4096
|
-
/* @__PURE__ */
|
|
4807
|
+
children: canvasFailure.inPlace !== null ? /* @__PURE__ */ jsx33(GraphErrorState, { failure: canvasFailure.inPlace }) : /* @__PURE__ */ jsxs30(Fragment19, { children: [
|
|
4808
|
+
/* @__PURE__ */ jsxs30(
|
|
4097
4809
|
ReactFlow,
|
|
4098
4810
|
__spreadProps(__spreadValues({
|
|
4099
4811
|
nodes,
|
|
@@ -4103,6 +4815,7 @@ function GraphViewerCanvas(props) {
|
|
|
4103
4815
|
onNodesChange,
|
|
4104
4816
|
onEdgesChange,
|
|
4105
4817
|
onNodeClick: interactive ? onNodeClick : void 0,
|
|
4818
|
+
onEdgeClick: interactive && styleCapabilities.valueArrows ? onEdgeClick : void 0,
|
|
4106
4819
|
onPaneClick: interactive ? handlePaneClick : void 0,
|
|
4107
4820
|
onInit,
|
|
4108
4821
|
fitView: interactive,
|
|
@@ -4114,7 +4827,7 @@ function GraphViewerCanvas(props) {
|
|
|
4114
4827
|
panActivationKeyCode: null
|
|
4115
4828
|
}, interactive ? {} : STILL_FLOW_PROPS), {
|
|
4116
4829
|
children: [
|
|
4117
|
-
interactive ? /* @__PURE__ */
|
|
4830
|
+
interactive ? /* @__PURE__ */ jsx33(
|
|
4118
4831
|
Background,
|
|
4119
4832
|
{
|
|
4120
4833
|
variant: BackgroundVariant.Dots,
|
|
@@ -4122,10 +4835,10 @@ function GraphViewerCanvas(props) {
|
|
|
4122
4835
|
size: 1,
|
|
4123
4836
|
color: "var(--color-bg-dots)"
|
|
4124
4837
|
}
|
|
4125
|
-
) : /* @__PURE__ */
|
|
4838
|
+
) : /* @__PURE__ */ jsx33(StillFit, { onHeight: setStillHeight }),
|
|
4126
4839
|
canvasFailure.overFlow !== null && // Inside the flow, beneath the toolbar: the toolbar stays on top
|
|
4127
4840
|
// and usable, so the reader can change the view back.
|
|
4128
|
-
/* @__PURE__ */
|
|
4841
|
+
/* @__PURE__ */ jsx33(
|
|
4129
4842
|
GraphRelayoutFailure,
|
|
4130
4843
|
{
|
|
4131
4844
|
failure: canvasFailure.overFlow,
|
|
@@ -4133,7 +4846,7 @@ function GraphViewerCanvas(props) {
|
|
|
4133
4846
|
rightOffset: detailOpen ? panelWidth : 0
|
|
4134
4847
|
}
|
|
4135
4848
|
),
|
|
4136
|
-
interactive && !hideToolbar && /* @__PURE__ */
|
|
4849
|
+
interactive && !hideToolbar && /* @__PURE__ */ jsx33(
|
|
4137
4850
|
GraphToolbar,
|
|
4138
4851
|
{
|
|
4139
4852
|
direction,
|
|
@@ -4173,7 +4886,7 @@ function GraphViewerCanvas(props) {
|
|
|
4173
4886
|
]
|
|
4174
4887
|
})
|
|
4175
4888
|
),
|
|
4176
|
-
interactive && /* @__PURE__ */
|
|
4889
|
+
interactive && /* @__PURE__ */ jsxs30(
|
|
4177
4890
|
DetailPanel,
|
|
4178
4891
|
{
|
|
4179
4892
|
isOpen: detailOpen,
|
|
@@ -4182,31 +4895,21 @@ function GraphViewerCanvas(props) {
|
|
|
4182
4895
|
isDragging: isPanelDragging,
|
|
4183
4896
|
onResizeHandleMouseDown: onResizeMouseDown,
|
|
4184
4897
|
children: [
|
|
4185
|
-
conceptOverride ? /* @__PURE__ */
|
|
4186
|
-
|
|
4898
|
+
conceptOverride ? /* @__PURE__ */ jsx33(ConceptDetailPanel, { concept: conceptOverride }) : detailSelection ? /* @__PURE__ */ jsx33(
|
|
4899
|
+
StylePanel,
|
|
4187
4900
|
{
|
|
4188
|
-
|
|
4189
|
-
spec: graphspec,
|
|
4190
|
-
onConceptClick: handleConceptClick
|
|
4191
|
-
}
|
|
4192
|
-
) : (detailSelection == null ? void 0 : detailSelection.stuffData) ? /* @__PURE__ */ jsx30(
|
|
4193
|
-
StuffNodeDetail,
|
|
4194
|
-
{
|
|
4195
|
-
nodeId: detailSelection.nodeId,
|
|
4196
|
-
stuffData: detailSelection.stuffData,
|
|
4197
|
-
producerPipeRef: detailSelection.producerPipeRef,
|
|
4198
|
-
consumer: detailSelection.consumer,
|
|
4901
|
+
selection: detailSelection,
|
|
4199
4902
|
graphspec,
|
|
4200
|
-
theme: resolvedTheme,
|
|
4201
4903
|
artifacts: graph,
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4904
|
+
theme: resolvedTheme,
|
|
4905
|
+
valueOptions,
|
|
4906
|
+
nodes,
|
|
4907
|
+
drawing,
|
|
4908
|
+
onConceptClick: handleConceptClick,
|
|
4909
|
+
onOpenNode: onOpenNodeFromPanel
|
|
4207
4910
|
}
|
|
4208
4911
|
) : null,
|
|
4209
|
-
renderDetailExtra && detailSelection && !conceptOverride && renderDetailExtra(detailSelection.nodeId, detailSelection.nodeData)
|
|
4912
|
+
renderDetailExtra && detailSelection && detailSelection.kind !== "arrow" && !conceptOverride && renderDetailExtra(detailSelection.nodeId, detailSelection.nodeData)
|
|
4210
4913
|
]
|
|
4211
4914
|
}
|
|
4212
4915
|
)
|