@pipelex/mthds-ui 0.44.0 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/{chunk-ENRYQOCO.js → chunk-CZGIDVT7.js} +2 -2
  2. package/dist/{chunk-7JZBXBZS.js → chunk-DNYJEPHT.js} +3 -3
  3. package/dist/{chunk-6S5TQPTO.js → chunk-DUBNSW66.js} +2 -2
  4. package/dist/{chunk-5E3UJI2I.js → chunk-SCKRIESM.js} +411 -29
  5. package/dist/chunk-SCKRIESM.js.map +1 -0
  6. package/dist/{chunk-N2F62MW7.js → chunk-UAYO53EO.js} +5 -5
  7. package/dist/chunk-UAYO53EO.js.map +1 -0
  8. package/dist/{chunk-4KLE62AN.js → chunk-X7GHQ3SD.js} +1 -1
  9. package/dist/{chunk-4KLE62AN.js.map → chunk-X7GHQ3SD.js.map} +1 -1
  10. package/dist/form/react/index.d.ts +17 -11
  11. package/dist/form/react/index.js +2 -2
  12. package/dist/form/react/index.js.map +1 -1
  13. package/dist/graph/index.d.ts +226 -4
  14. package/dist/graph/index.js +8 -4
  15. package/dist/graph/react/index.d.ts +2 -2
  16. package/dist/graph/react/index.js +1679 -985
  17. package/dist/graph/react/index.js.map +1 -1
  18. package/dist/graph/react/styles/simple/SimpleDetailPanel.css +492 -0
  19. package/dist/index.d.ts +2 -2
  20. package/dist/index.js +8 -4
  21. package/dist/{registryJoin-C6Wfkik-.d.ts → registryJoin-C7paykZ2.d.ts} +1 -1
  22. package/dist/standalone/graph-standalone.html +620 -127
  23. package/dist/standalone/graph-viewer.css +493 -0
  24. package/dist/standalone/graph-viewer.js +127 -127
  25. package/dist/static-graph/index.d.ts +1 -1
  26. package/dist/static-graph/index.js +1 -1
  27. package/dist/timeline/index.d.ts +3 -3
  28. package/dist/timeline/index.js +2 -2
  29. package/dist/timeline/react/index.d.ts +2 -2
  30. package/dist/timeline/react/index.js +5 -5
  31. package/dist/{types-DLAnYNoi.d.ts → types-DgYaVX6K.d.ts} +8 -0
  32. package/package.json +3 -2
  33. package/dist/chunk-5E3UJI2I.js.map +0 -1
  34. package/dist/chunk-N2F62MW7.js.map +0 -1
  35. /package/dist/{chunk-ENRYQOCO.js.map → chunk-CZGIDVT7.js.map} +0 -0
  36. /package/dist/{chunk-7JZBXBZS.js.map → chunk-DNYJEPHT.js.map} +0 -0
  37. /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-7JZBXBZS.js";
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-5E3UJI2I.js";
31
+ } from "../../chunk-SCKRIESM.js";
31
32
  import {
32
33
  GRAPH_STYLES,
33
34
  resolveGraphStyle,
34
35
  resolveStyleMenu
35
- } from "../../chunk-N2F62MW7.js";
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-ENRYQOCO.js";
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-4KLE62AN.js";
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 React11 from "react";
88
+ import React13 from "react";
86
89
  import {
87
90
  ReactFlow,
88
91
  useNodesState,
@@ -91,111 +94,9 @@ import {
91
94
  BackgroundVariant
92
95
  } from "@xyflow/react";
93
96
 
94
- // src/graph/react/detail/StuffResultPanel.tsx
95
- import * as React from "react";
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";
108
- import { jsx, jsxs } from "react/jsx-runtime";
109
- function StuffResultPanel({
110
- pipeIoContracts,
111
- outputForm,
112
- inputForm,
113
- stuff,
114
- producerPipeRef,
115
- consumer,
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 });
144
- }
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
97
  // src/graph/react/detail/DetailPanel.tsx
197
- import React2 from "react";
198
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
98
+ import React from "react";
99
+ import { jsx, jsxs } from "react/jsx-runtime";
199
100
  var DIALOG_LAYER_SELECTOR = 'dialog, [role="dialog"], [role="alertdialog"]';
200
101
  function escapeBelongsAbove(event, panel) {
201
102
  if (event.defaultPrevented) return true;
@@ -213,8 +114,8 @@ function DetailPanel({
213
114
  onResizeHandleMouseDown,
214
115
  closeOnEscape = true
215
116
  }) {
216
- const panelRef = React2.useRef(null);
217
- React2.useEffect(() => {
117
+ const panelRef = React.useRef(null);
118
+ React.useEffect(() => {
218
119
  if (!isOpen || !closeOnEscape) return;
219
120
  const onKeyDown = (e) => {
220
121
  if (e.key === "Escape" && !escapeBelongsAbove(e, panelRef.current)) onClose();
@@ -227,8 +128,8 @@ function DetailPanel({
227
128
  !isOpen && "detail-panel--closed",
228
129
  isDragging && "detail-panel--dragging"
229
130
  ].filter(Boolean).join(" ");
230
- return /* @__PURE__ */ jsxs2("div", { ref: panelRef, className, style: width ? { width: `${width}px` } : void 0, children: [
231
- onResizeHandleMouseDown && /* @__PURE__ */ jsx2(
131
+ return /* @__PURE__ */ jsxs("div", { ref: panelRef, className, style: width ? { width: `${width}px` } : void 0, children: [
132
+ onResizeHandleMouseDown && /* @__PURE__ */ jsx(
232
133
  "div",
233
134
  {
234
135
  className: "detail-panel-resize-handle",
@@ -238,15 +139,15 @@ function DetailPanel({
238
139
  "aria-label": "Resize panel"
239
140
  }
240
141
  ),
241
- /* @__PURE__ */ jsxs2("div", { className: "detail-panel-content", children: [
242
- /* @__PURE__ */ jsx2("div", { className: "detail-panel-close-row", children: /* @__PURE__ */ jsx2("button", { className: "detail-panel-close", onClick: onClose, "aria-label": "Close panel", children: "x" }) }),
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" }) }),
243
144
  children
244
145
  ] })
245
146
  ] });
246
147
  }
247
148
 
248
149
  // src/graph/react/detail/useResizable.ts
249
- import React3 from "react";
150
+ import React2 from "react";
250
151
  var MAX_WIDTH_RATIO = 0.6;
251
152
  function useResizable({
252
153
  defaultWidth,
@@ -254,11 +155,11 @@ function useResizable({
254
155
  maxWidth,
255
156
  containerRef
256
157
  }) {
257
- const [width, setWidth] = React3.useState(defaultWidth);
258
- const [isDragging, setIsDragging] = React3.useState(false);
259
- const dragRef = React3.useRef({ startX: 0, startWidth: 0, maxAllowed: maxWidth });
260
- const rafRef = React3.useRef(null);
261
- const handleMouseDown = React3.useCallback(
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(
262
163
  (e) => {
263
164
  var _a;
264
165
  e.preventDefault();
@@ -272,7 +173,7 @@ function useResizable({
272
173
  },
273
174
  [width, maxWidth, containerRef]
274
175
  );
275
- React3.useEffect(() => {
176
+ React2.useEffect(() => {
276
177
  if (!isDragging) return;
277
178
  const onMouseMove = (e) => {
278
179
  if (rafRef.current !== null) cancelAnimationFrame(rafRef.current);
@@ -309,12 +210,228 @@ function useResizable({
309
210
  return { width, isDragging, handleMouseDown };
310
211
  }
311
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
+
312
429
  // src/graph/react/detail/PipeDetailPanel.tsx
313
- import React5 from "react";
430
+ import React6 from "react";
314
431
 
315
432
  // src/graph/react/detail/sections/shared.tsx
316
433
  import { useState } from "react";
317
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
434
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
318
435
  function formatDuration(seconds) {
319
436
  if (seconds < 1) return `${(seconds * 1e3).toFixed(0)}ms`;
320
437
  return `${seconds.toFixed(2)}s`;
@@ -324,22 +441,22 @@ function KV({
324
441
  value
325
442
  }) {
326
443
  if (value === null || value === void 0) return null;
327
- return /* @__PURE__ */ jsxs3("div", { className: "detail-kv-row", children: [
328
- /* @__PURE__ */ jsx3("span", { className: "detail-kv-key", children: label }),
329
- /* @__PURE__ */ jsx3("span", { className: "detail-kv-value", children: String(value) })
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) })
330
447
  ] });
331
448
  }
332
449
  function PromptBlock({ label, text }) {
333
450
  if (!text) return null;
334
- return /* @__PURE__ */ jsxs3("div", { children: [
335
- /* @__PURE__ */ jsx3("div", { className: "detail-section-label", children: label }),
336
- /* @__PURE__ */ jsx3("div", { className: "detail-prompt-block", children: text })
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 })
337
454
  ] });
338
455
  }
339
- var EXPAND_ICON = /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "10", height: "10", fill: "currentColor", children: /* @__PURE__ */ jsx3("path", { d: "M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z" }) });
340
- var COLLAPSE_ICON = /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "10", height: "10", fill: "currentColor", children: /* @__PURE__ */ jsx3("path", { d: "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z" }) });
341
- var COPY_ICON = /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "10", height: "10", fill: "currentColor", children: /* @__PURE__ */ jsx3("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" }) });
342
- var CHECK_ICON = /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "10", height: "10", fill: "currentColor", children: /* @__PURE__ */ jsx3("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }) });
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" }) });
343
460
  var promptActionStyle = {
344
461
  all: "unset",
345
462
  cursor: "pointer",
@@ -375,15 +492,15 @@ function PromptToggle({
375
492
  }).catch(() => {
376
493
  });
377
494
  }
378
- return /* @__PURE__ */ jsxs3("div", { children: [
379
- /* @__PURE__ */ jsxs3(
495
+ return /* @__PURE__ */ jsxs4("div", { children: [
496
+ /* @__PURE__ */ jsxs4(
380
497
  "div",
381
498
  {
382
499
  style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 4 },
383
500
  children: [
384
- /* @__PURE__ */ jsx3("div", { className: "detail-section-label", style: { marginBottom: 0 }, children: label }),
385
- /* @__PURE__ */ jsxs3("div", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
386
- /* @__PURE__ */ jsx3(
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(
387
504
  "button",
388
505
  {
389
506
  onClick: () => setExpanded((prev) => !prev),
@@ -393,7 +510,7 @@ function PromptToggle({
393
510
  children: expanded ? COLLAPSE_ICON : EXPAND_ICON
394
511
  }
395
512
  ),
396
- /* @__PURE__ */ jsx3(
513
+ /* @__PURE__ */ jsx4(
397
514
  "button",
398
515
  {
399
516
  onClick: handleCopy,
@@ -405,8 +522,8 @@ function PromptToggle({
405
522
  children: copied ? CHECK_ICON : COPY_ICON
406
523
  }
407
524
  ),
408
- canToggle && /* @__PURE__ */ jsxs3("button", { onClick: () => setShowTemplate((prev) => !prev), style: promptActionStyle, children: [
409
- /* @__PURE__ */ jsx3(
525
+ canToggle && /* @__PURE__ */ jsxs4("button", { onClick: () => setShowTemplate((prev) => !prev), style: promptActionStyle, children: [
526
+ /* @__PURE__ */ jsx4(
410
527
  "span",
411
528
  {
412
529
  style: {
@@ -418,7 +535,7 @@ function PromptToggle({
418
535
  display: "inline-block",
419
536
  transition: "background 0.15s"
420
537
  },
421
- children: /* @__PURE__ */ jsx3(
538
+ children: /* @__PURE__ */ jsx4(
422
539
  "span",
423
540
  {
424
541
  style: {
@@ -441,7 +558,7 @@ function PromptToggle({
441
558
  ]
442
559
  }
443
560
  ),
444
- /* @__PURE__ */ jsx3(
561
+ /* @__PURE__ */ jsx4(
445
562
  "div",
446
563
  {
447
564
  className: `detail-prompt-block ${expanded ? "detail-prompt-block--expanded" : "detail-prompt-block--collapsed"}`,
@@ -487,9 +604,9 @@ function ModelRows({
487
604
  }
488
605
  const chain = [...requested, ...ranRungs];
489
606
  if (chain.length === 0) return null;
490
- return /* @__PURE__ */ jsxs3("div", { className: "detail-kv-row", children: [
491
- /* @__PURE__ */ jsx3("span", { className: "detail-kv-key", children: label }),
492
- /* @__PURE__ */ jsx3("span", { className: "detail-kv-value detail-model-value", children: chain.map((rung, index) => /* @__PURE__ */ jsx3("span", { className: index === 0 ? void 0 : "detail-model-resolved", children: rung.text }, rung.key)) })
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)) })
493
610
  ] });
494
611
  }
495
612
  var MODEL_TYPE_LABELS = {
@@ -547,7 +664,7 @@ function hasRealTokenCounts(scoped) {
547
664
  }
548
665
 
549
666
  // src/graph/react/detail/sections/UsageSection.tsx
550
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
667
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
551
668
  function usageHeadlineScope(usage, isController) {
552
669
  return scopeUsage(usage, isController ? "subtree" : "own");
553
670
  }
@@ -567,7 +684,7 @@ function costTitle(scoped, isController) {
567
684
  return `${scopeWord}: ${scoped.inferenceCalls} inference call(s). Click for the breakdown.`;
568
685
  }
569
686
  function Chevron({ open }) {
570
- return /* @__PURE__ */ jsx4(
687
+ return /* @__PURE__ */ jsx5(
571
688
  "svg",
572
689
  {
573
690
  className: `detail-usage-chevron ${open ? "detail-usage-chevron--open" : ""}`,
@@ -580,7 +697,7 @@ function Chevron({ open }) {
580
697
  strokeLinecap: "round",
581
698
  strokeLinejoin: "round",
582
699
  "aria-hidden": "true",
583
- children: /* @__PURE__ */ jsx4("polyline", { points: "6 9 12 15 18 9" })
700
+ children: /* @__PURE__ */ jsx5("polyline", { points: "6 9 12 15 18 9" })
584
701
  }
585
702
  );
586
703
  }
@@ -593,7 +710,7 @@ function UsageCostInline({
593
710
  const scoped = usageHeadlineScope(usage, isController);
594
711
  const text = costText(scoped);
595
712
  if (text === null) return null;
596
- return /* @__PURE__ */ jsxs4(
713
+ return /* @__PURE__ */ jsxs5(
597
714
  "button",
598
715
  {
599
716
  type: "button",
@@ -602,8 +719,8 @@ function UsageCostInline({
602
719
  onClick: onToggle,
603
720
  title: costTitle(scoped, isController),
604
721
  children: [
605
- /* @__PURE__ */ jsx4("span", { className: "detail-usage-value", children: text }),
606
- /* @__PURE__ */ jsx4(Chevron, { open: expanded })
722
+ /* @__PURE__ */ jsx5("span", { className: "detail-usage-value", children: text }),
723
+ /* @__PURE__ */ jsx5(Chevron, { open: expanded })
607
724
  ]
608
725
  }
609
726
  );
@@ -618,17 +735,17 @@ function UsageColumn({ scoped, label }) {
618
735
  const isPriced = scoped.cost !== null;
619
736
  const nbTokensInput = (_a = scoped.nbTokensByCategory.input) != null ? _a : 0;
620
737
  const nbTokensOutput = (_b = scoped.nbTokensByCategory.output) != null ? _b : 0;
621
- return /* @__PURE__ */ jsxs4("div", { children: [
622
- /* @__PURE__ */ jsx4("div", { className: "detail-section-label", children: label }),
623
- /* @__PURE__ */ jsx4(KV, { label: "inference calls", value: scoped.inferenceCalls }),
624
- /* @__PURE__ */ jsx4(KV, { label: "priced calls", value: scoped.ratedInferenceCalls }),
625
- showsTokens && /* @__PURE__ */ jsx4(KV, { label: "input tokens", value: nbTokensInput.toLocaleString() }),
626
- isPriced && scoped.costInput !== null && /* @__PURE__ */ jsx4(KV, { label: "input cost", value: formatCost(scoped.costInput) }),
627
- showsTokens && /* @__PURE__ */ jsx4(KV, { label: "output tokens", value: nbTokensOutput.toLocaleString() }),
628
- isPriced && scoped.costOutput !== null && /* @__PURE__ */ jsx4(KV, { label: "output cost", value: formatCost(scoped.costOutput) }),
629
- showsTokens && /* @__PURE__ */ jsx4(KV, { label: "total tokens", value: scoped.totalTokens.toLocaleString() }),
630
- /* @__PURE__ */ jsx4(KV, { label: "total cost", value: isPriced ? formatCost((_c = scoped.cost) != null ? _c : 0) : "not priced" }),
631
- showsTokens && extraCategories(scoped.nbTokensByCategory).map(([category, nbTokens]) => /* @__PURE__ */ jsx4(KV, { label: `tokens \xB7 ${category}`, value: nbTokens.toLocaleString() }, category))
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))
632
749
  ] });
633
750
  }
634
751
  function UsageDetails({
@@ -638,14 +755,14 @@ function UsageDetails({
638
755
  const own = scopeUsage(usage, "own");
639
756
  const subtree = scopeUsage(usage, "subtree");
640
757
  const showsSubtree = isController || subtree.inferenceCalls !== own.inferenceCalls;
641
- return /* @__PURE__ */ jsxs4("div", { className: "detail-usage-details", children: [
642
- /* @__PURE__ */ jsx4(UsageColumn, { scoped: own, label: isController ? "This pipe itself" : "Usage" }),
643
- showsSubtree && /* @__PURE__ */ jsx4(UsageColumn, { scoped: subtree, label: "This pipe and everything below it" })
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" })
644
761
  ] });
645
762
  }
646
763
 
647
764
  // src/graph/react/detail/sections/PipeLLMDetail.tsx
648
- import { Fragment, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
765
+ import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
649
766
  function PipeLLMSection({
650
767
  blueprint,
651
768
  executionData,
@@ -669,9 +786,9 @@ function PipeLLMSection({
669
786
  const hasDistinctObjectRequest = Boolean(
670
787
  authoredModelForObject && authoredModelForObject !== authoredModel
671
788
  );
672
- return /* @__PURE__ */ jsxs5(Fragment, { children: [
673
- /* @__PURE__ */ jsx5(ModelRows, { modelsRan, authored: authoredModel, handle: resolvedModel }),
674
- hasDistinctObjectRequest && /* @__PURE__ */ jsx5(
789
+ return /* @__PURE__ */ jsxs6(Fragment2, { children: [
790
+ /* @__PURE__ */ jsx6(ModelRows, { modelsRan, authored: authoredModel, handle: resolvedModel }),
791
+ hasDistinctObjectRequest && /* @__PURE__ */ jsx6(
675
792
  ModelRows,
676
793
  {
677
794
  authored: authoredModelForObject,
@@ -679,33 +796,33 @@ function PipeLLMSection({
679
796
  label: "Model (object)"
680
797
  }
681
798
  ),
682
- /* @__PURE__ */ jsx5(KV, { label: "Structuring", value: structuringPath || blueprint.structuring_method }),
683
- /* @__PURE__ */ jsx5(KV, { label: "Multiple Output", value: isMultipleOutput }),
684
- /* @__PURE__ */ jsx5(KV, { label: "Output Multiplicity", value: blueprint.output_multiplicity }),
685
- /* @__PURE__ */ jsx5(KV, { label: "Prompt Category", value: (_c = spec.prompt_blueprint) == null ? void 0 : _c.category }),
686
- hasImageRefs && /* @__PURE__ */ jsx5(KV, { label: "User Image Refs", value: `${spec.user_image_references.length} references` }),
687
- hasDocRefs && /* @__PURE__ */ jsx5(
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(
688
805
  KV,
689
806
  {
690
807
  label: "User Document Refs",
691
808
  value: `${spec.user_document_references.length} references`
692
809
  }
693
810
  ),
694
- hasSysImageRefs && /* @__PURE__ */ jsx5(
811
+ hasSysImageRefs && /* @__PURE__ */ jsx6(
695
812
  KV,
696
813
  {
697
814
  label: "System Image Refs",
698
815
  value: `${spec.system_image_references.length} references`
699
816
  }
700
817
  ),
701
- hasSysDocRefs && /* @__PURE__ */ jsx5(
818
+ hasSysDocRefs && /* @__PURE__ */ jsx6(
702
819
  KV,
703
820
  {
704
821
  label: "System Document Refs",
705
822
  value: `${spec.system_document_references.length} references`
706
823
  }
707
824
  ),
708
- /* @__PURE__ */ jsx5(
825
+ /* @__PURE__ */ jsx6(
709
826
  PromptToggle,
710
827
  {
711
828
  label: "System Prompt",
@@ -713,7 +830,7 @@ function PipeLLMSection({
713
830
  renderedText: renderedSystem
714
831
  }
715
832
  ),
716
- /* @__PURE__ */ jsx5(
833
+ /* @__PURE__ */ jsx6(
717
834
  PromptToggle,
718
835
  {
719
836
  label: "Prompt",
@@ -725,7 +842,7 @@ function PipeLLMSection({
725
842
  }
726
843
 
727
844
  // src/graph/react/detail/sections/PipeImgGenDetail.tsx
728
- import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
845
+ import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
729
846
  function PipeImgGenSection({
730
847
  blueprint,
731
848
  executionData,
@@ -737,9 +854,9 @@ function PipeImgGenSection({
737
854
  const resolvedModel = modelHandles == null ? void 0 : modelHandles.resolved_model;
738
855
  const renderedPrompt = executionData == null ? void 0 : executionData.rendered_prompt;
739
856
  const renderedNegative = executionData == null ? void 0 : executionData.rendered_negative_prompt;
740
- return /* @__PURE__ */ jsxs6(Fragment2, { children: [
741
- /* @__PURE__ */ jsx6(ModelRows, { modelsRan, authored: blueprint.img_gen_choice, handle: resolvedModel }),
742
- /* @__PURE__ */ jsx6(
857
+ return /* @__PURE__ */ jsxs7(Fragment3, { children: [
858
+ /* @__PURE__ */ jsx7(ModelRows, { modelsRan, authored: blueprint.img_gen_choice, handle: resolvedModel }),
859
+ /* @__PURE__ */ jsx7(
743
860
  PromptToggle,
744
861
  {
745
862
  label: "Prompt",
@@ -747,7 +864,7 @@ function PipeImgGenSection({
747
864
  renderedText: renderedPrompt
748
865
  }
749
866
  ),
750
- /* @__PURE__ */ jsx6(
867
+ /* @__PURE__ */ jsx7(
751
868
  PromptToggle,
752
869
  {
753
870
  label: "Negative Prompt",
@@ -755,12 +872,12 @@ function PipeImgGenSection({
755
872
  renderedText: renderedNegative
756
873
  }
757
874
  ),
758
- /* @__PURE__ */ jsx6(KV, { label: "Aspect Ratio", value: blueprint.aspect_ratio }),
759
- /* @__PURE__ */ jsx6(KV, { label: "Output Format", value: blueprint.output_format }),
760
- /* @__PURE__ */ jsx6(KV, { label: "Background", value: blueprint.background }),
761
- /* @__PURE__ */ jsx6(KV, { label: "Is Raw", value: blueprint.is_raw }),
762
- /* @__PURE__ */ jsx6(KV, { label: "Seed", value: blueprint.seed }),
763
- /* @__PURE__ */ jsx6(
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(
764
881
  KV,
765
882
  {
766
883
  label: "Images",
@@ -771,28 +888,28 @@ function PipeImgGenSection({
771
888
  }
772
889
 
773
890
  // src/graph/react/detail/sections/PipeExtractDetail.tsx
774
- import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
891
+ import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
775
892
  function PipeExtractSection({
776
893
  blueprint,
777
894
  modelsRan,
778
895
  modelHandles
779
896
  }) {
780
897
  const resolvedModel = modelHandles == null ? void 0 : modelHandles.resolved_model;
781
- return /* @__PURE__ */ jsxs7(Fragment3, { children: [
782
- /* @__PURE__ */ jsx7(ModelRows, { modelsRan, authored: blueprint.extract_choice, handle: resolvedModel }),
783
- /* @__PURE__ */ jsx7(KV, { label: "Document Variable", value: blueprint.document_stuff_name }),
784
- /* @__PURE__ */ jsx7(KV, { label: "Caption Images", value: blueprint.should_caption_images }),
785
- /* @__PURE__ */ jsx7(KV, { label: "Max Page Images", value: blueprint.max_page_images }),
786
- /* @__PURE__ */ jsx7(KV, { label: "Include Page Views", value: blueprint.should_include_page_views }),
787
- /* @__PURE__ */ jsx7(KV, { label: "Page Views DPI", value: blueprint.page_views_dpi }),
788
- /* @__PURE__ */ jsx7(KV, { label: "Render JS", value: blueprint.render_js }),
789
- /* @__PURE__ */ jsx7(KV, { label: "Include Raw HTML", value: blueprint.include_raw_html }),
790
- /* @__PURE__ */ jsx7(KV, { label: "Image Variable", value: blueprint.image_stuff_name })
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 })
791
908
  ] });
792
909
  }
793
910
 
794
911
  // src/graph/react/detail/sections/PipeSearchDetail.tsx
795
- import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
912
+ import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
796
913
  function PipeSearchSection({
797
914
  blueprint,
798
915
  executionData,
@@ -801,9 +918,9 @@ function PipeSearchSection({
801
918
  }) {
802
919
  const resolvedModel = modelHandles == null ? void 0 : modelHandles.resolved_model;
803
920
  const renderedQuery = executionData == null ? void 0 : executionData.rendered_query;
804
- return /* @__PURE__ */ jsxs8(Fragment4, { children: [
805
- /* @__PURE__ */ jsx8(ModelRows, { modelsRan, authored: blueprint.search_choice, handle: resolvedModel }),
806
- /* @__PURE__ */ jsx8(
921
+ return /* @__PURE__ */ jsxs9(Fragment5, { children: [
922
+ /* @__PURE__ */ jsx9(ModelRows, { modelsRan, authored: blueprint.search_choice, handle: resolvedModel }),
923
+ /* @__PURE__ */ jsx9(
807
924
  PromptToggle,
808
925
  {
809
926
  label: "Search Query",
@@ -811,13 +928,13 @@ function PipeSearchSection({
811
928
  renderedText: renderedQuery
812
929
  }
813
930
  ),
814
- /* @__PURE__ */ jsx8(KV, { label: "Max Results", value: blueprint.max_results_override }),
815
- /* @__PURE__ */ jsx8(KV, { label: "Include Images", value: blueprint.include_images_override }),
816
- /* @__PURE__ */ jsx8(KV, { label: "Structured Output", value: blueprint.is_structured_output }),
817
- /* @__PURE__ */ jsx8(KV, { label: "From Date", value: blueprint.from_date }),
818
- /* @__PURE__ */ jsx8(KV, { label: "To Date", value: blueprint.to_date }),
819
- blueprint.include_domains && blueprint.include_domains.length > 0 && /* @__PURE__ */ jsx8(KV, { label: "Include Domains", value: blueprint.include_domains.join(", ") }),
820
- blueprint.exclude_domains && blueprint.exclude_domains.length > 0 && /* @__PURE__ */ jsx8(KV, { label: "Exclude Domains", value: blueprint.exclude_domains.join(", ") })
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(", ") })
821
938
  ] });
822
939
  }
823
940
 
@@ -840,7 +957,7 @@ function labelFromLlmChoice(choice) {
840
957
  }
841
958
 
842
959
  // src/graph/react/detail/sections/PipeStructureDetail.tsx
843
- import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
960
+ import { Fragment as Fragment6, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
844
961
  function PipeStructureSection({
845
962
  blueprint,
846
963
  executionData,
@@ -851,17 +968,17 @@ function PipeStructureSection({
851
968
  const isMultipleOutput = executionData == null ? void 0 : executionData.is_multiple_output;
852
969
  const renderedUser = executionData == null ? void 0 : executionData.rendered_user_prompt;
853
970
  const authoredModel = labelFromLlmChoice(blueprint.llm_choice);
854
- return /* @__PURE__ */ jsxs9(Fragment5, { children: [
855
- /* @__PURE__ */ jsx9(ModelRows, { modelsRan, authored: authoredModel, handle: resolvedModel }),
856
- /* @__PURE__ */ jsx9(KV, { label: "Text Variable", value: blueprint.text_input_name }),
857
- /* @__PURE__ */ jsx9(KV, { label: "Multiple Output", value: isMultipleOutput }),
858
- /* @__PURE__ */ jsx9(KV, { label: "Output Multiplicity", value: blueprint.output_multiplicity }),
859
- /* @__PURE__ */ jsx9(PromptToggle, { label: "Prompt", templateText: void 0, renderedText: renderedUser })
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 })
860
977
  ] });
861
978
  }
862
979
 
863
980
  // src/graph/react/detail/sections/PipeComposeDetail.tsx
864
- import { Fragment as Fragment6, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
981
+ import { Fragment as Fragment7, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
865
982
  function formatLeafField(field) {
866
983
  var _a, _b;
867
984
  switch (field.method) {
@@ -882,9 +999,9 @@ function isLongValue(text) {
882
999
  return text.length > LONG_VALUE_THRESHOLD_CHARS || text.includes("\n");
883
1000
  }
884
1001
  function FieldBlock({ label, value }) {
885
- return /* @__PURE__ */ jsxs10("div", { className: "detail-field-block", children: [
886
- /* @__PURE__ */ jsx10("div", { className: "detail-field-block-label", children: label }),
887
- /* @__PURE__ */ jsx10("div", { className: "detail-field-block-value", children: value })
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 })
888
1005
  ] });
889
1006
  }
890
1007
  function ConstructFieldsBlock({
@@ -905,18 +1022,18 @@ function ConstructFieldsBlock({
905
1022
  }
906
1023
  }
907
1024
  const indentStyle = depth > 0 ? { paddingLeft: depth * 12 } : void 0;
908
- return /* @__PURE__ */ jsxs10(Fragment6, { children: [
1025
+ return /* @__PURE__ */ jsxs11(Fragment7, { children: [
909
1026
  leafFields.map(([name, field]) => {
910
1027
  const display = formatLeafField(field);
911
1028
  if (isLongValue(display)) {
912
- return /* @__PURE__ */ jsx10("div", { style: indentStyle, children: /* @__PURE__ */ jsx10(FieldBlock, { label: name, value: display }) }, name);
1029
+ return /* @__PURE__ */ jsx11("div", { style: indentStyle, children: /* @__PURE__ */ jsx11(FieldBlock, { label: name, value: display }) }, name);
913
1030
  }
914
- return /* @__PURE__ */ jsx10("div", { style: indentStyle, children: /* @__PURE__ */ jsx10(KV, { label: name, value: display }) }, name);
1031
+ return /* @__PURE__ */ jsx11("div", { style: indentStyle, children: /* @__PURE__ */ jsx11(KV, { label: name, value: display }) }, name);
915
1032
  }),
916
1033
  templateFields.map(([name, field]) => {
917
1034
  var _a, _b;
918
1035
  const renderedForField = (_a = fieldResolutions == null ? void 0 : fieldResolutions[name]) == null ? void 0 : _a.rendered;
919
- return /* @__PURE__ */ jsx10("div", { style: indentStyle, children: /* @__PURE__ */ jsx10(
1036
+ return /* @__PURE__ */ jsx11("div", { style: indentStyle, children: /* @__PURE__ */ jsx11(
920
1037
  PromptToggle,
921
1038
  {
922
1039
  label: `Template \u2014 ${name}`,
@@ -927,15 +1044,15 @@ function ConstructFieldsBlock({
927
1044
  }),
928
1045
  nestedFields.map(([name, field]) => {
929
1046
  if (!field.nested) return null;
930
- return /* @__PURE__ */ jsxs10("div", { children: [
931
- /* @__PURE__ */ jsxs10(
1047
+ return /* @__PURE__ */ jsxs11("div", { children: [
1048
+ /* @__PURE__ */ jsxs11(
932
1049
  "div",
933
1050
  {
934
1051
  className: "detail-nested-header",
935
1052
  style: depth > 0 ? { paddingLeft: depth * 12 } : void 0,
936
1053
  children: [
937
- /* @__PURE__ */ jsx10("span", { className: "detail-nested-header-name", children: name }),
938
- /* @__PURE__ */ jsxs10("span", { className: "detail-nested-header-meta", children: [
1054
+ /* @__PURE__ */ jsx11("span", { className: "detail-nested-header-name", children: name }),
1055
+ /* @__PURE__ */ jsxs11("span", { className: "detail-nested-header-meta", children: [
939
1056
  "nested \xB7 ",
940
1057
  Object.keys(field.nested.fields).length,
941
1058
  " field",
@@ -944,7 +1061,7 @@ function ConstructFieldsBlock({
944
1061
  ]
945
1062
  }
946
1063
  ),
947
- /* @__PURE__ */ jsx10(
1064
+ /* @__PURE__ */ jsx11(
948
1065
  ConstructFieldsBlock,
949
1066
  {
950
1067
  blueprint: field.nested,
@@ -966,11 +1083,11 @@ function PipeComposeSection({
966
1083
  const fieldResolutions = (_a = executionData == null ? void 0 : executionData.fields) != null ? _a : null;
967
1084
  const constructBlueprint = blueprint.construct_blueprint;
968
1085
  const hasConstruct = constructBlueprint != null && Object.keys(constructBlueprint.fields).length > 0;
969
- return /* @__PURE__ */ jsxs10(Fragment6, { children: [
970
- /* @__PURE__ */ jsx10(KV, { label: "Mode", value: composeMode || (hasConstruct ? "construct" : "template") }),
971
- /* @__PURE__ */ jsx10(KV, { label: "Category", value: blueprint.category }),
972
- /* @__PURE__ */ jsx10(KV, { label: "Templating Style", value: blueprint.templating_style }),
973
- blueprint.template && /* @__PURE__ */ jsx10(
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(
974
1091
  PromptToggle,
975
1092
  {
976
1093
  label: "Template",
@@ -978,9 +1095,9 @@ function PipeComposeSection({
978
1095
  renderedText
979
1096
  }
980
1097
  ),
981
- hasConstruct && /* @__PURE__ */ jsxs10(Fragment6, { children: [
982
- /* @__PURE__ */ jsx10("div", { className: "detail-section-label", children: "FIELDS" }),
983
- /* @__PURE__ */ jsx10(
1098
+ hasConstruct && /* @__PURE__ */ jsxs11(Fragment7, { children: [
1099
+ /* @__PURE__ */ jsx11("div", { className: "detail-section-label", children: "FIELDS" }),
1100
+ /* @__PURE__ */ jsx11(
984
1101
  ConstructFieldsBlock,
985
1102
  {
986
1103
  blueprint: constructBlueprint,
@@ -993,7 +1110,7 @@ function PipeComposeSection({
993
1110
  }
994
1111
 
995
1112
  // src/graph/react/detail/sections/PipeDocGenDetail.tsx
996
- import { Fragment as Fragment7, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
1113
+ import { Fragment as Fragment8, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
997
1114
  var DOC_GEN_SOURCE_LABELS = {
998
1115
  layout: "auto-layout",
999
1116
  html: "HTML template",
@@ -1020,9 +1137,9 @@ function PipeDocGenSection({
1020
1137
  const hasEngine = !!authoredEngine || !!resolvedEngine || ((_a = modelsRan == null ? void 0 : modelsRan.length) != null ? _a : 0) > 0;
1021
1138
  const source = (_b = nonEmpty(modelHandles == null ? void 0 : modelHandles.source)) != null ? _b : declaredSource(blueprint);
1022
1139
  const renderedFilename = nonEmpty(executionData == null ? void 0 : executionData.filename);
1023
- return /* @__PURE__ */ jsxs11(Fragment7, { children: [
1024
- /* @__PURE__ */ jsx11(KV, { label: "Format", value: format == null ? void 0 : format.toUpperCase() }),
1025
- hasEngine ? /* @__PURE__ */ jsx11(
1140
+ return /* @__PURE__ */ jsxs12(Fragment8, { children: [
1141
+ /* @__PURE__ */ jsx12(KV, { label: "Format", value: format == null ? void 0 : format.toUpperCase() }),
1142
+ hasEngine ? /* @__PURE__ */ jsx12(
1026
1143
  ModelRows,
1027
1144
  {
1028
1145
  label: "Engine",
@@ -1030,36 +1147,36 @@ function PipeDocGenSection({
1030
1147
  authored: authoredEngine,
1031
1148
  handle: resolvedEngine
1032
1149
  }
1033
- ) : /* @__PURE__ */ jsx11(KV, { label: "Engine", value: "deck default" }),
1034
- /* @__PURE__ */ jsx11(KV, { label: "Source", value: (_c = DOC_GEN_SOURCE_LABELS[source]) != null ? _c : source }),
1035
- /* @__PURE__ */ jsx11(KV, { label: "Template File", value: blueprint.template_file }),
1036
- /* @__PURE__ */ jsx11(KV, { label: "File Name", value: blueprint.filename }),
1037
- renderedFilename && renderedFilename !== blueprint.filename && /* @__PURE__ */ jsx11(KV, { label: "Stored As", value: renderedFilename }),
1038
- blueprint.template && /* @__PURE__ */ jsx11(PromptToggle, { label: "Template", templateText: blueprint.template, renderedText: null })
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 })
1039
1156
  ] });
1040
1157
  }
1041
1158
 
1042
1159
  // src/graph/react/detail/sections/PipeConditionDetail.tsx
1043
- import { Fragment as Fragment8, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
1160
+ import { Fragment as Fragment9, jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
1044
1161
  function PipeConditionSection({
1045
1162
  blueprint,
1046
1163
  executionData
1047
1164
  }) {
1048
1165
  const evaluatedExpression = executionData == null ? void 0 : executionData.evaluated_expression;
1049
1166
  const selectedOutcome = executionData == null ? void 0 : executionData.selected_outcome;
1050
- return /* @__PURE__ */ jsxs12(Fragment8, { children: [
1051
- /* @__PURE__ */ jsx12(PromptBlock, { label: "Expression", text: blueprint.expression }),
1052
- evaluatedExpression && /* @__PURE__ */ jsx12(KV, { label: "Expression Result", value: evaluatedExpression }),
1053
- /* @__PURE__ */ jsxs12("div", { children: [
1054
- /* @__PURE__ */ jsx12("div", { className: "detail-section-label", children: "Outcomes" }),
1055
- Object.entries(blueprint.outcome_map).map(([outcome, pipeCode]) => /* @__PURE__ */ jsxs12(
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(
1056
1173
  "div",
1057
1174
  {
1058
1175
  className: "detail-kv-row",
1059
1176
  style: selectedOutcome === pipeCode ? { background: "rgba(80,250,123,0.08)" } : void 0,
1060
1177
  children: [
1061
- /* @__PURE__ */ jsx12("span", { className: "detail-kv-key", children: outcome }),
1062
- /* @__PURE__ */ jsx12(
1178
+ /* @__PURE__ */ jsx13("span", { className: "detail-kv-key", children: outcome }),
1179
+ /* @__PURE__ */ jsx13(
1063
1180
  "span",
1064
1181
  {
1065
1182
  className: "detail-kv-value",
@@ -1071,32 +1188,32 @@ function PipeConditionSection({
1071
1188
  },
1072
1189
  outcome
1073
1190
  )),
1074
- /* @__PURE__ */ jsxs12("div", { className: "detail-kv-row", children: [
1075
- /* @__PURE__ */ jsx12("span", { className: "detail-kv-key", children: "default" }),
1076
- /* @__PURE__ */ jsx12("span", { className: "detail-kv-value", children: blueprint.default_outcome })
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 })
1077
1194
  ] })
1078
1195
  ] }),
1079
- /* @__PURE__ */ jsx12(KV, { label: "Alias Expression To", value: blueprint.add_alias_from_expression_to })
1196
+ /* @__PURE__ */ jsx13(KV, { label: "Alias Expression To", value: blueprint.add_alias_from_expression_to })
1080
1197
  ] });
1081
1198
  }
1082
1199
 
1083
1200
  // src/graph/react/detail/sections/PipeSequenceDetail.tsx
1084
- import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
1201
+ import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
1085
1202
  function PipeSequenceSection({
1086
1203
  blueprint
1087
1204
  }) {
1088
- return /* @__PURE__ */ jsxs13("div", { children: [
1089
- /* @__PURE__ */ jsx13("div", { className: "detail-section-label", children: "Steps" }),
1090
- /* @__PURE__ */ jsx13("div", { className: "detail-steps-list", children: blueprint.sequential_sub_pipes.map((step, idx) => /* @__PURE__ */ jsxs13("div", { className: "detail-step-item", children: [
1091
- /* @__PURE__ */ jsx13("span", { className: "detail-step-index", children: idx + 1 }),
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 }),
1092
1209
  isBindingStepSpec(step) ? (
1093
1210
  // A binding step runs no pipe: it names the path it binds.
1094
- /* @__PURE__ */ jsxs13("span", { className: "detail-step-code", title: "Binding step", children: [
1211
+ /* @__PURE__ */ jsxs14("span", { className: "detail-step-code", title: "Binding step", children: [
1095
1212
  "from ",
1096
1213
  step.from_path
1097
1214
  ] })
1098
- ) : /* @__PURE__ */ jsx13("span", { className: "detail-step-code", children: step.pipe_code }),
1099
- step.output_name && /* @__PURE__ */ jsxs13("span", { className: "detail-io-concept", children: [
1215
+ ) : /* @__PURE__ */ jsx14("span", { className: "detail-step-code", children: step.pipe_code }),
1216
+ step.output_name && /* @__PURE__ */ jsxs14("span", { className: "detail-io-concept", children: [
1100
1217
  "-> ",
1101
1218
  step.output_name
1102
1219
  ] })
@@ -1105,57 +1222,57 @@ function PipeSequenceSection({
1105
1222
  }
1106
1223
 
1107
1224
  // src/graph/react/detail/sections/PipeParallelDetail.tsx
1108
- import { Fragment as Fragment9, jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
1225
+ import { Fragment as Fragment10, jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
1109
1226
  function PipeParallelSection({
1110
1227
  blueprint
1111
1228
  }) {
1112
- return /* @__PURE__ */ jsxs14(Fragment9, { children: [
1113
- /* @__PURE__ */ jsxs14("div", { children: [
1114
- /* @__PURE__ */ jsx14("div", { className: "detail-section-label", children: "Branches" }),
1115
- /* @__PURE__ */ jsx14("div", { className: "detail-steps-list", children: blueprint.parallel_sub_pipes.map((branch, idx) => /* @__PURE__ */ jsxs14("div", { className: "detail-step-item", children: [
1116
- /* @__PURE__ */ jsx14("span", { className: "detail-step-code", children: branch.pipe_code }),
1117
- branch.output_name && /* @__PURE__ */ jsxs14("span", { className: "detail-io-concept", children: [
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: [
1118
1235
  "-> ",
1119
1236
  branch.output_name
1120
1237
  ] })
1121
1238
  ] }, idx)) })
1122
1239
  ] }),
1123
- /* @__PURE__ */ jsx14(KV, { label: "Add Each Output", value: blueprint.add_each_output }),
1124
- /* @__PURE__ */ jsx14(KV, { label: "Combined Output", value: blueprint.combined_output })
1240
+ /* @__PURE__ */ jsx15(KV, { label: "Add Each Output", value: blueprint.add_each_output }),
1241
+ /* @__PURE__ */ jsx15(KV, { label: "Combined Output", value: blueprint.combined_output })
1125
1242
  ] });
1126
1243
  }
1127
1244
 
1128
1245
  // src/graph/react/detail/sections/PipeBatchDetail.tsx
1129
- import { Fragment as Fragment10, jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
1246
+ import { Fragment as Fragment11, jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
1130
1247
  function PipeBatchSection({
1131
1248
  blueprint,
1132
1249
  executionData
1133
1250
  }) {
1134
1251
  const itemCount = executionData == null ? void 0 : executionData.item_count;
1135
- return /* @__PURE__ */ jsxs15(Fragment10, { children: [
1136
- /* @__PURE__ */ jsx15(KV, { label: "Branch Pipe", value: blueprint.branch_pipe_code }),
1137
- /* @__PURE__ */ jsx15(KV, { label: "Input List Variable", value: blueprint.batch_params.input_list_stuff_name }),
1138
- /* @__PURE__ */ jsx15(KV, { label: "Input Item Variable", value: blueprint.batch_params.input_item_stuff_name }),
1139
- itemCount != null && /* @__PURE__ */ jsx15(KV, { label: "Items Processed", value: itemCount })
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 })
1140
1257
  ] });
1141
1258
  }
1142
1259
 
1143
1260
  // src/graph/react/detail/sections/BindingStepDetail.tsx
1144
- import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
1261
+ import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
1145
1262
  function BindingStepSection({ node }) {
1146
1263
  var _a, _b;
1147
1264
  const executionData = (_a = node.execution_data) != null ? _a : {};
1148
1265
  const fromPath = typeof executionData.from === "string" ? executionData.from : node.pipe_code;
1149
1266
  const result = typeof executionData.result === "string" ? executionData.result : (_b = node.io.outputs[0]) == null ? void 0 : _b.name;
1150
- return /* @__PURE__ */ jsxs16("div", { children: [
1151
- /* @__PURE__ */ jsx16("div", { className: "detail-section-label", children: "Binding" }),
1152
- /* @__PURE__ */ jsx16(KV, { label: "From", value: fromPath }),
1153
- /* @__PURE__ */ jsx16(KV, { label: "Result", value: result })
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 })
1154
1271
  ] });
1155
1272
  }
1156
1273
 
1157
1274
  // src/graph/react/detail/sections/ProblemSection.tsx
1158
- import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
1275
+ import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
1159
1276
  function ProblemSection({
1160
1277
  problem,
1161
1278
  failedHere
@@ -1163,15 +1280,15 @@ function ProblemSection({
1163
1280
  var _a, _b;
1164
1281
  const failingPipe = problemFailingPipe(problem);
1165
1282
  const pipePath = (_b = (_a = problem.location) == null ? void 0 : _a.path) != null ? _b : [];
1166
- return /* @__PURE__ */ jsxs17("div", { className: "detail-problem", children: [
1167
- /* @__PURE__ */ jsxs17("div", { className: "detail-problem-header", children: [
1168
- problem.title && /* @__PURE__ */ jsx17("span", { className: "detail-problem-title", children: problem.title }),
1169
- /* @__PURE__ */ jsx17("code", { className: "detail-problem-code", title: "Problem code", children: problem.code })
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 })
1170
1287
  ] }),
1171
- problem.detail && /* @__PURE__ */ jsx17("div", { className: "detail-problem-detail", children: problem.detail }),
1172
- failingPipe !== void 0 && /* @__PURE__ */ jsxs17("div", { className: "detail-problem-location", children: [
1173
- /* @__PURE__ */ jsx17(KV, { label: "Failed in", value: failedHere ? `${failingPipe} (this pipe)` : failingPipe }),
1174
- pipePath.length > 1 && /* @__PURE__ */ jsx17(
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(
1175
1292
  "div",
1176
1293
  {
1177
1294
  className: "detail-problem-path",
@@ -1180,9 +1297,9 @@ function ProblemSection({
1180
1297
  }
1181
1298
  )
1182
1299
  ] }),
1183
- problem.next_step.detail && /* @__PURE__ */ jsxs17("div", { className: "detail-problem-next-step", children: [
1184
- /* @__PURE__ */ jsx17("div", { className: "detail-section-label", children: "Next step" }),
1185
- /* @__PURE__ */ jsx17("div", { className: "detail-problem-next-step-detail", children: problem.next_step.detail })
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 })
1186
1303
  ] })
1187
1304
  ] });
1188
1305
  }
@@ -1215,7 +1332,7 @@ function dumpableExecutionData(pipeType, executionData) {
1215
1332
  }
1216
1333
 
1217
1334
  // src/graph/react/detail/PipeDetailPanel.tsx
1218
- import { Fragment as Fragment11, jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
1335
+ import { Fragment as Fragment12, jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
1219
1336
  var PIPE_TYPE_BADGES = {
1220
1337
  PipeLLM: "LLM",
1221
1338
  PipeExtract: "Extract",
@@ -1257,22 +1374,22 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
1257
1374
  const badge = PIPE_TYPE_BADGES[pipeType];
1258
1375
  const status = node.status;
1259
1376
  const statusColor = (_a = STATUS_COLORS[status]) != null ? _a : "#6272a4";
1260
- const blueprint = React5.useMemo(() => resolveNodeBlueprint(spec, node), [spec, node]);
1261
- const [usageExpanded, setUsageExpanded] = React5.useState(false);
1377
+ const blueprint = React6.useMemo(() => resolveNodeBlueprint(spec, node), [spec, node]);
1378
+ const [usageExpanded, setUsageExpanded] = React6.useState(false);
1262
1379
  const inputs = (_c = (_b = node.io) == null ? void 0 : _b.inputs) != null ? _c : [];
1263
1380
  const outputs = (_e = (_d = node.io) == null ? void 0 : _d.outputs) != null ? _e : [];
1264
1381
  const description = (_f = blueprint == null ? void 0 : blueprint.description) != null ? _f : node.description;
1265
- return /* @__PURE__ */ jsxs18(Fragment11, { children: [
1266
- /* @__PURE__ */ jsxs18("div", { className: "detail-sticky-header", children: [
1267
- /* @__PURE__ */ jsxs18("div", { className: "detail-header", children: [
1268
- /* @__PURE__ */ jsx18(
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(
1269
1386
  "span",
1270
1387
  {
1271
1388
  className: `detail-badge ${isController ? "detail-badge--controller" : "detail-badge--operator"}`,
1272
1389
  children: badge
1273
1390
  }
1274
1391
  ),
1275
- /* @__PURE__ */ jsx18(
1392
+ /* @__PURE__ */ jsx19(
1276
1393
  "span",
1277
1394
  {
1278
1395
  className: `detail-pipe-code ${isController ? "detail-pipe-code--controller" : ""}`,
@@ -1280,11 +1397,11 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
1280
1397
  }
1281
1398
  )
1282
1399
  ] }),
1283
- !isStatic && /* @__PURE__ */ jsxs18("div", { className: "detail-status", children: [
1284
- /* @__PURE__ */ jsx18("span", { className: "detail-status-dot", style: { background: statusColor } }),
1285
- /* @__PURE__ */ jsx18("span", { className: "detail-status-label", style: { color: statusColor }, children: status }),
1286
- ((_g = node.timing) == null ? void 0 : _g.duration) != null && /* @__PURE__ */ jsx18("span", { className: "detail-duration", children: formatDuration(node.timing.duration) }),
1287
- showsGeneratedData && node.usage && /* @__PURE__ */ jsx18(
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(
1288
1405
  UsageCostInline,
1289
1406
  {
1290
1407
  usage: node.usage,
@@ -1294,45 +1411,45 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
1294
1411
  }
1295
1412
  )
1296
1413
  ] }),
1297
- showsGeneratedData && node.usage && usageExpanded && /* @__PURE__ */ jsx18(UsageDetails, { usage: node.usage, isController }),
1298
- description && /* @__PURE__ */ jsx18("div", { className: "detail-description", children: description }),
1299
- inputs.length > 0 && /* @__PURE__ */ jsxs18("div", { children: [
1300
- /* @__PURE__ */ jsx18("div", { className: "detail-section-label", children: "Inputs" }),
1301
- /* @__PURE__ */ jsx18("div", { className: "detail-io-list", children: inputs.map((input, idx) => /* @__PURE__ */ jsxs18(
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(
1302
1419
  "div",
1303
1420
  {
1304
1421
  className: "detail-io-pill",
1305
1422
  style: { cursor: input.concept && onConceptClick ? "pointer" : void 0 },
1306
1423
  onClick: () => input.concept && (onConceptClick == null ? void 0 : onConceptClick(input.concept)),
1307
1424
  children: [
1308
- /* @__PURE__ */ jsx18("span", { className: "detail-io-name", children: input.name }),
1309
- input.concept && /* @__PURE__ */ jsx18("span", { className: "detail-io-concept", children: input.concept + multiplicitySuffix(input.multiplicity) })
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) })
1310
1427
  ]
1311
1428
  },
1312
1429
  idx
1313
1430
  )) })
1314
1431
  ] }),
1315
- outputs.length > 0 && /* @__PURE__ */ jsxs18("div", { children: [
1316
- /* @__PURE__ */ jsx18("div", { className: "detail-section-label", children: "Output" }),
1317
- /* @__PURE__ */ jsx18("div", { className: "detail-io-list", children: outputs.map((output, idx) => /* @__PURE__ */ jsxs18(
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(
1318
1435
  "div",
1319
1436
  {
1320
1437
  className: "detail-io-pill",
1321
1438
  style: { cursor: output.concept && onConceptClick ? "pointer" : void 0 },
1322
1439
  onClick: () => output.concept && (onConceptClick == null ? void 0 : onConceptClick(output.concept)),
1323
1440
  children: [
1324
- /* @__PURE__ */ jsx18("span", { className: "detail-io-name", children: output.name }),
1325
- output.concept && /* @__PURE__ */ jsx18("span", { className: "detail-io-concept", children: output.concept + multiplicitySuffix(output.multiplicity) })
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) })
1326
1443
  ]
1327
1444
  },
1328
1445
  idx
1329
1446
  )) })
1330
1447
  ] }),
1331
- (inputs.length > 0 || outputs.length > 0) && /* @__PURE__ */ jsx18("div", { style: { borderTop: "1px solid rgba(255,255,255,0.06)", margin: "4px 0" } })
1448
+ (inputs.length > 0 || outputs.length > 0) && /* @__PURE__ */ jsx19("div", { style: { borderTop: "1px solid rgba(255,255,255,0.06)", margin: "4px 0" } })
1332
1449
  ] }),
1333
- node.error && /* @__PURE__ */ jsx18(ProblemSection, { problem: node.error, failedHere: isFailingPipeNode(node) }),
1334
- isBinding && /* @__PURE__ */ jsx18(BindingStepSection, { node }),
1335
- blueprint && /* @__PURE__ */ jsx18(
1450
+ node.error && /* @__PURE__ */ jsx19(ProblemSection, { problem: node.error, failedHere: isFailingPipeNode(node) }),
1451
+ isBinding && /* @__PURE__ */ jsx19(BindingStepSection, { node }),
1452
+ blueprint && /* @__PURE__ */ jsx19(
1336
1453
  BlueprintSection,
1337
1454
  {
1338
1455
  blueprint,
@@ -1341,7 +1458,7 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
1341
1458
  modelHandles: node.execution_data
1342
1459
  }
1343
1460
  ),
1344
- showsGeneratedData && !isBinding && node.execution_data && Object.keys(node.execution_data).length > 0 && /* @__PURE__ */ jsx18(
1461
+ showsGeneratedData && !isBinding && node.execution_data && Object.keys(node.execution_data).length > 0 && /* @__PURE__ */ jsx19(
1345
1462
  ExecutionDataSection,
1346
1463
  {
1347
1464
  executionData: node.execution_data,
@@ -1349,9 +1466,9 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
1349
1466
  hasBlueprint: !!blueprint
1350
1467
  }
1351
1468
  ),
1352
- showsGeneratedData && node.metrics && Object.keys(node.metrics).length > 0 && /* @__PURE__ */ jsxs18("div", { children: [
1353
- /* @__PURE__ */ jsx18("div", { className: "detail-section-label", children: "Metrics" }),
1354
- Object.entries(node.metrics).map(([key, value]) => /* @__PURE__ */ jsx18(
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(
1355
1472
  KV,
1356
1473
  {
1357
1474
  label: key,
@@ -1360,17 +1477,17 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
1360
1477
  key
1361
1478
  ))
1362
1479
  ] }),
1363
- node.tags && Object.keys(node.tags).length > 0 && /* @__PURE__ */ jsxs18("div", { children: [
1364
- /* @__PURE__ */ jsx18("div", { className: "detail-section-label", children: "Tags" }),
1365
- /* @__PURE__ */ jsx18("div", { className: "detail-tags", children: Object.entries(node.tags).map(([key, value]) => /* @__PURE__ */ jsxs18("span", { className: "detail-tag", children: [
1366
- /* @__PURE__ */ jsxs18("span", { className: "detail-tag-key", children: [
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: [
1367
1484
  key,
1368
1485
  ": "
1369
1486
  ] }),
1370
- /* @__PURE__ */ jsx18("span", { className: "detail-tag-value", children: value })
1487
+ /* @__PURE__ */ jsx19("span", { className: "detail-tag-value", children: value })
1371
1488
  ] }, key)) })
1372
1489
  ] }),
1373
- !blueprint && !isBinding && /* @__PURE__ */ jsx18("div", { className: "detail-not-available", children: "Blueprint not available" })
1490
+ !blueprint && !isBinding && /* @__PURE__ */ jsx19("div", { className: "detail-not-available", children: "Blueprint not available" })
1374
1491
  ] });
1375
1492
  }
1376
1493
  function BlueprintSection({
@@ -1381,7 +1498,7 @@ function BlueprintSection({
1381
1498
  }) {
1382
1499
  switch (blueprint.type) {
1383
1500
  case "PipeLLM":
1384
- return /* @__PURE__ */ jsx18(
1501
+ return /* @__PURE__ */ jsx19(
1385
1502
  PipeLLMSection,
1386
1503
  {
1387
1504
  blueprint,
@@ -1391,7 +1508,7 @@ function BlueprintSection({
1391
1508
  }
1392
1509
  );
1393
1510
  case "PipeImgGen":
1394
- return /* @__PURE__ */ jsx18(
1511
+ return /* @__PURE__ */ jsx19(
1395
1512
  PipeImgGenSection,
1396
1513
  {
1397
1514
  blueprint,
@@ -1401,9 +1518,9 @@ function BlueprintSection({
1401
1518
  }
1402
1519
  );
1403
1520
  case "PipeCompose":
1404
- return /* @__PURE__ */ jsx18(PipeComposeSection, { blueprint, executionData });
1521
+ return /* @__PURE__ */ jsx19(PipeComposeSection, { blueprint, executionData });
1405
1522
  case "PipeDocGen":
1406
- return /* @__PURE__ */ jsx18(
1523
+ return /* @__PURE__ */ jsx19(
1407
1524
  PipeDocGenSection,
1408
1525
  {
1409
1526
  blueprint,
@@ -1413,7 +1530,7 @@ function BlueprintSection({
1413
1530
  }
1414
1531
  );
1415
1532
  case "PipeExtract":
1416
- return /* @__PURE__ */ jsx18(
1533
+ return /* @__PURE__ */ jsx19(
1417
1534
  PipeExtractSection,
1418
1535
  {
1419
1536
  blueprint,
@@ -1422,7 +1539,7 @@ function BlueprintSection({
1422
1539
  }
1423
1540
  );
1424
1541
  case "PipeSearch":
1425
- return /* @__PURE__ */ jsx18(
1542
+ return /* @__PURE__ */ jsx19(
1426
1543
  PipeSearchSection,
1427
1544
  {
1428
1545
  blueprint,
@@ -1432,7 +1549,7 @@ function BlueprintSection({
1432
1549
  }
1433
1550
  );
1434
1551
  case "PipeStructure":
1435
- return /* @__PURE__ */ jsx18(
1552
+ return /* @__PURE__ */ jsx19(
1436
1553
  PipeStructureSection,
1437
1554
  {
1438
1555
  blueprint,
@@ -1442,19 +1559,19 @@ function BlueprintSection({
1442
1559
  }
1443
1560
  );
1444
1561
  case "PipeSequence":
1445
- return /* @__PURE__ */ jsx18(PipeSequenceSection, { blueprint, executionData });
1562
+ return /* @__PURE__ */ jsx19(PipeSequenceSection, { blueprint, executionData });
1446
1563
  case "PipeParallel":
1447
- return /* @__PURE__ */ jsx18(PipeParallelSection, { blueprint, executionData });
1564
+ return /* @__PURE__ */ jsx19(PipeParallelSection, { blueprint, executionData });
1448
1565
  case "PipeCondition":
1449
- return /* @__PURE__ */ jsx18(PipeConditionSection, { blueprint, executionData });
1566
+ return /* @__PURE__ */ jsx19(PipeConditionSection, { blueprint, executionData });
1450
1567
  case "PipeBatch":
1451
- return /* @__PURE__ */ jsx18(PipeBatchSection, { blueprint, executionData });
1568
+ return /* @__PURE__ */ jsx19(PipeBatchSection, { blueprint, executionData });
1452
1569
  case "PipeFunc":
1453
1570
  return null;
1454
1571
  case "PipeJudge":
1455
1572
  return null;
1456
1573
  case "PipeSignature":
1457
- return /* @__PURE__ */ jsx18("div", { className: "detail-not-available", children: "Signature stub \u2014 declared but not yet implemented." });
1574
+ return /* @__PURE__ */ jsx19("div", { className: "detail-not-available", children: "Signature stub \u2014 declared but not yet implemented." });
1458
1575
  default: {
1459
1576
  const _unhandled = blueprint;
1460
1577
  void _unhandled;
@@ -1468,144 +1585,797 @@ function ExecutionDataSection({
1468
1585
  hasBlueprint
1469
1586
  }) {
1470
1587
  if (!shouldDumpExecutionData(pipeType, hasBlueprint)) return null;
1471
- return /* @__PURE__ */ jsx18(GenericExecutionData, { entries: dumpableExecutionData(pipeType, executionData) });
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
+ };
1472
2194
  }
1473
- function GenericExecutionData({ entries }) {
1474
- if (entries.length === 0) return null;
1475
- return /* @__PURE__ */ jsxs18(Fragment11, { children: [
1476
- /* @__PURE__ */ jsx18("div", { className: "detail-section-label", children: "Execution" }),
1477
- entries.map(([key, value]) => /* @__PURE__ */ jsx18(KV, { label: key, value: String(value) }, key))
1478
- ] });
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 };
1479
2201
  }
1480
2202
 
1481
- // src/graph/react/detail/ConceptDetailPanel.tsx
1482
- import React6 from "react";
1483
- import { Fragment as Fragment12, jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
1484
- function ConceptDetailPanel({
1485
- concept,
1486
- ioData,
1487
- isDryRun,
1488
- renderData,
1489
- instanceKey
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
1490
2219
  }) {
1491
- var _a;
1492
- const multiplicity = ioData == null ? void 0 : ioData.multiplicity;
1493
- return /* @__PURE__ */ jsxs19(Fragment12, { children: [
1494
- /* @__PURE__ */ jsxs19("div", { className: "detail-header", children: [
1495
- /* @__PURE__ */ jsx19("span", { className: "detail-concept-code", children: concept.code + multiplicitySuffix(multiplicity) }),
1496
- /* @__PURE__ */ jsx19("span", { className: "detail-concept-domain", children: concept.domain_code })
1497
- ] }),
1498
- isPluralMultiplicity(multiplicity) && /* @__PURE__ */ jsx19("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` }),
1499
- concept.description && /* @__PURE__ */ jsx19("div", { className: "detail-description", children: concept.description }),
1500
- concept.refines && /* @__PURE__ */ jsxs19("div", { className: "detail-refines", children: [
1501
- "refines ",
1502
- /* @__PURE__ */ jsx19("span", { className: "detail-refines-code", children: concept.refines })
1503
- ] }),
1504
- /* @__PURE__ */ jsx19(
1505
- ConceptBody,
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,
1506
2276
  {
1507
- concept,
1508
- ioData,
2277
+ concept: conceptInfo,
2278
+ ioData: stuffData,
1509
2279
  isDryRun,
2280
+ instanceKey: nodeId,
1510
2281
  renderData
1511
- },
1512
- instanceKey != null ? instanceKey : `${concept.code}:${ioData && "digest" in ioData ? ioData.digest : (_a = ioData == null ? void 0 : ioData.name) != null ? _a : ""}`
1513
- )
1514
- ] });
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" }) });
1515
2287
  }
1516
- function ConceptBody({ concept, ioData, isDryRun, renderData }) {
1517
- const dataView = ioData && !isDryRun ? renderData == null ? void 0 : renderData() : void 0;
1518
- const hasData = Boolean(dataView);
1519
- const [activeTab, setActiveTab] = React6.useState(hasData ? "data" : "structure");
1520
- const baseId = React6.useId();
1521
- const tabId = (tab) => `${baseId}-tab-${tab}`;
1522
- const panelId = (tab) => `${baseId}-tabpanel-${tab}`;
1523
- const structure = concept.json_schema ? /* @__PURE__ */ jsxs19("div", { children: [
1524
- /* @__PURE__ */ jsx19("div", { className: "detail-section-label", children: "Structure" }),
1525
- /* @__PURE__ */ jsx19(SchemaTable, { schema: concept.json_schema })
1526
- ] }) : /* @__PURE__ */ jsx19("div", { className: "detail-not-available", children: "Schema not available" });
1527
- if (!hasData) return structure;
1528
- const onTabKeyDown = (event) => {
1529
- var _a;
1530
- let next;
1531
- switch (event.key) {
1532
- case "ArrowLeft":
1533
- case "ArrowRight":
1534
- next = activeTab === "data" ? "structure" : "data";
1535
- break;
1536
- case "Home":
1537
- next = "data";
1538
- break;
1539
- case "End":
1540
- next = "structure";
1541
- break;
1542
- default:
1543
- return;
1544
- }
1545
- event.preventDefault();
1546
- setActiveTab(next);
1547
- (_a = document.getElementById(tabId(next))) == null ? void 0 : _a.focus();
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
+ );
1548
2347
  };
1549
- const renderTab = (tab, label) => /* @__PURE__ */ jsx19(
1550
- "button",
2348
+ return /* @__PURE__ */ jsx22(
2349
+ SimpleDetailPanel,
1551
2350
  {
1552
- type: "button",
1553
- role: "tab",
1554
- id: tabId(tab),
1555
- "aria-selected": activeTab === tab,
1556
- "aria-controls": panelId(tab),
1557
- tabIndex: activeTab === tab ? 0 : -1,
1558
- className: `detail-tab ${activeTab === tab ? "detail-tab--active" : ""}`,
1559
- onClick: () => setActiveTab(tab),
1560
- onKeyDown: onTabKeyDown,
1561
- children: label
1562
- }
2351
+ detail,
2352
+ mode: graphSpecMode(graphspec),
2353
+ renderValue,
2354
+ renderTechnical: technicalFor(detail, graphspec),
2355
+ onOpenNode
2356
+ },
2357
+ detailKey(detail)
1563
2358
  );
1564
- return /* @__PURE__ */ jsxs19(Fragment12, { children: [
1565
- /* @__PURE__ */ jsxs19("div", { className: "detail-tabs", role: "tablist", "aria-label": "Concept views", children: [
1566
- renderTab("data", "Data"),
1567
- renderTab("structure", "Structure")
1568
- ] }),
1569
- /* @__PURE__ */ jsx19("div", { role: "tabpanel", id: panelId(activeTab), "aria-labelledby": tabId(activeTab), children: activeTab === "data" ? dataView : structure })
1570
- ] });
1571
2359
  }
1572
- function SchemaTable({ schema }) {
1573
- var _a;
1574
- const properties = schema.properties;
1575
- const required = new Set((_a = schema.required) != null ? _a : []);
1576
- if (!properties || Object.keys(properties).length === 0) {
1577
- return /* @__PURE__ */ jsx19("div", { className: "detail-not-available", children: "No fields defined" });
1578
- }
1579
- const fields = Object.entries(properties);
1580
- return /* @__PURE__ */ jsxs19("table", { className: "detail-schema-table", children: [
1581
- /* @__PURE__ */ jsx19("thead", { children: /* @__PURE__ */ jsxs19("tr", { children: [
1582
- /* @__PURE__ */ jsx19("th", { children: "Field" }),
1583
- /* @__PURE__ */ jsx19("th", { children: "Type" }),
1584
- /* @__PURE__ */ jsx19("th", {}),
1585
- /* @__PURE__ */ jsx19("th", { children: "Description" })
1586
- ] }) }),
1587
- /* @__PURE__ */ jsx19("tbody", { children: fields.map(([fieldName, fieldSchema]) => {
1588
- var _a2;
1589
- return /* @__PURE__ */ jsxs19("tr", { children: [
1590
- /* @__PURE__ */ jsx19("td", { className: "detail-schema-field", children: fieldName }),
1591
- /* @__PURE__ */ jsx19("td", { className: "detail-schema-type", children: extractType(fieldSchema) }),
1592
- /* @__PURE__ */ jsx19("td", { children: required.has(fieldName) && /* @__PURE__ */ jsx19("span", { className: "detail-schema-required", children: "req" }) }),
1593
- /* @__PURE__ */ jsx19("td", { children: (_a2 = fieldSchema.description) != null ? _a2 : "" })
1594
- ] }, fieldName);
1595
- }) })
1596
- ] });
2360
+ function detailKey(detail) {
2361
+ return detail.kind === "arrow" ? `arrow:${detail.edgeId}` : `node:${detail.nodeId}`;
1597
2362
  }
1598
- function extractType(schema) {
2363
+ function technicalFor(detail, graphspec) {
1599
2364
  var _a;
1600
- if (typeof schema.type === "string") return schema.type;
1601
- if (Array.isArray(schema.type)) return schema.type.join(" | ");
1602
- if (schema.anyOf) return "union";
1603
- if (schema.allOf) return "all";
1604
- if (typeof schema.$ref === "string") {
1605
- const ref = schema.$ref;
1606
- return (_a = ref.split("/").pop()) != null ? _a : "(unresolved type)";
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;
1607
2378
  }
1608
- return "(unresolved type)";
1609
2379
  }
1610
2380
 
1611
2381
  // src/graph/react/rfTypes.ts
@@ -1641,10 +2411,10 @@ function toAppEdges(edges) {
1641
2411
  }
1642
2412
 
1643
2413
  // src/graph/react/viewer/renderLabel.tsx
1644
- import { jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
2414
+ import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
1645
2415
  function renderLabel(desc) {
1646
2416
  if (desc.kind === "pipe") {
1647
- return /* @__PURE__ */ jsx20(
2417
+ return /* @__PURE__ */ jsx23(
1648
2418
  "div",
1649
2419
  {
1650
2420
  style: {
@@ -1658,7 +2428,7 @@ function renderLabel(desc) {
1658
2428
  minWidth: 0
1659
2429
  },
1660
2430
  title: desc.label,
1661
- children: /* @__PURE__ */ jsx20(
2431
+ children: /* @__PURE__ */ jsx23(
1662
2432
  "span",
1663
2433
  {
1664
2434
  style: {
@@ -1677,7 +2447,7 @@ function renderLabel(desc) {
1677
2447
  }
1678
2448
  );
1679
2449
  }
1680
- return /* @__PURE__ */ jsxs20(
2450
+ return /* @__PURE__ */ jsxs22(
1681
2451
  "div",
1682
2452
  {
1683
2453
  style: {
@@ -1693,7 +2463,7 @@ function renderLabel(desc) {
1693
2463
  },
1694
2464
  title: desc.concept ? `${desc.label}: ${desc.concept}` : desc.label,
1695
2465
  children: [
1696
- /* @__PURE__ */ jsx20(
2466
+ /* @__PURE__ */ jsx23(
1697
2467
  "span",
1698
2468
  {
1699
2469
  style: {
@@ -1709,7 +2479,7 @@ function renderLabel(desc) {
1709
2479
  children: desc.label
1710
2480
  }
1711
2481
  ),
1712
- desc.concept && /* @__PURE__ */ jsx20(
2482
+ desc.concept && /* @__PURE__ */ jsx23(
1713
2483
  "span",
1714
2484
  {
1715
2485
  style: {
@@ -1784,13 +2554,13 @@ function placeCanvasFailure({
1784
2554
  }
1785
2555
 
1786
2556
  // src/graph/react/viewer/GraphErrorState.tsx
1787
- import React7 from "react";
1788
- import { jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
2557
+ import React9 from "react";
2558
+ import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
1789
2559
  var GRAPH_ERROR_STATE_TITLE = "This method graph could not be drawn";
1790
2560
  function GraphErrorState({ failure }) {
1791
- return /* @__PURE__ */ jsxs21("div", { className: "graph-error-state", role: "alert", children: [
1792
- /* @__PURE__ */ jsx21("p", { className: "graph-error-state-title", children: GRAPH_ERROR_STATE_TITLE }),
1793
- /* @__PURE__ */ jsx21("p", { className: "graph-error-state-detail", children: failure })
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 })
1794
2564
  ] });
1795
2565
  }
1796
2566
  var GRAPH_RELAYOUT_FAILURE_TITLE = "This view of the method graph could not be drawn";
@@ -1800,20 +2570,20 @@ function GraphRelayoutFailure({
1800
2570
  toolbarShown,
1801
2571
  rightOffset = 0
1802
2572
  }) {
1803
- return /* @__PURE__ */ jsx21(
2573
+ return /* @__PURE__ */ jsx24(
1804
2574
  "div",
1805
2575
  {
1806
2576
  className: "graph-relayout-failure",
1807
2577
  style: rightOffset > 0 ? { right: rightOffset } : void 0,
1808
- children: /* @__PURE__ */ jsxs21("div", { className: "graph-error-state graph-error-state--floating", role: "alert", children: [
1809
- /* @__PURE__ */ jsx21("p", { className: "graph-error-state-title", children: GRAPH_RELAYOUT_FAILURE_TITLE }),
1810
- /* @__PURE__ */ jsx21("p", { className: "graph-error-state-detail", children: failure }),
1811
- toolbarShown && /* @__PURE__ */ jsx21("p", { className: "graph-error-state-hint", children: GRAPH_RELAYOUT_FAILURE_HINT })
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 })
1812
2582
  ] })
1813
2583
  }
1814
2584
  );
1815
2585
  }
1816
- var GraphFailureBoundary = class extends React7.Component {
2586
+ var GraphFailureBoundary = class extends React9.Component {
1817
2587
  constructor() {
1818
2588
  super(...arguments);
1819
2589
  this.state = { failure: null, resetKey: this.props.resetKey };
@@ -1834,11 +2604,11 @@ var GraphFailureBoundary = class extends React7.Component {
1834
2604
  };
1835
2605
 
1836
2606
  // src/graph/react/viewer/GraphToolbar.tsx
1837
- import React8 from "react";
2607
+ import React10 from "react";
1838
2608
  import { Panel } from "@xyflow/react";
1839
2609
 
1840
2610
  // src/graph/react/viewer/ValidationPanel.tsx
1841
- import { jsx as jsx22, jsxs as jsxs22 } from "react/jsx-runtime";
2611
+ import { jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
1842
2612
  function validationLabel(state, issueCount) {
1843
2613
  const issues = issueCount === 1 ? "1 issue" : `${issueCount} issues`;
1844
2614
  switch (state) {
@@ -1905,7 +2675,7 @@ function ValidationPanel({
1905
2675
  placement,
1906
2676
  id
1907
2677
  }) {
1908
- return /* @__PURE__ */ jsxs22(
2678
+ return /* @__PURE__ */ jsxs24(
1909
2679
  "div",
1910
2680
  {
1911
2681
  id,
@@ -1913,18 +2683,18 @@ function ValidationPanel({
1913
2683
  role: "region",
1914
2684
  "aria-label": "Validation issues",
1915
2685
  children: [
1916
- /* @__PURE__ */ jsx22("div", { className: "graph-validation-panel-header", children: validationLabel(state, issues.length) }),
1917
- issues.length === 0 ? /* @__PURE__ */ jsx22("div", { className: "graph-validation-empty", children: validationEmptyText(state) }) : /* @__PURE__ */ jsx22("ul", { className: "graph-validation-issues", role: "list", children: issues.map((issue, index) => {
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) => {
1918
2688
  const clickable = onIssueClick !== void 0;
1919
- const meta = (issue.context || issue.file) && /* @__PURE__ */ jsxs22("div", { className: "graph-validation-issue-meta", children: [
1920
- issue.context && /* @__PURE__ */ jsx22("span", { className: "graph-validation-issue-context", children: issue.context }),
1921
- issue.file && /* @__PURE__ */ jsx22("span", { className: "graph-validation-issue-file", children: issue.file })
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 })
1922
2692
  ] });
1923
- return /* @__PURE__ */ jsx22(
2693
+ return /* @__PURE__ */ jsx25(
1924
2694
  "li",
1925
2695
  {
1926
2696
  className: `graph-validation-issue graph-validation-issue--${issue.severity}` + (clickable ? " graph-validation-issue--clickable" : ""),
1927
- children: /* @__PURE__ */ jsxs22(
2697
+ children: /* @__PURE__ */ jsxs24(
1928
2698
  "div",
1929
2699
  {
1930
2700
  className: "graph-validation-issue-body",
@@ -1939,8 +2709,8 @@ function ValidationPanel({
1939
2709
  } : void 0,
1940
2710
  children: [
1941
2711
  meta,
1942
- /* @__PURE__ */ jsx22("div", { className: "graph-validation-issue-message", children: issue.message }),
1943
- issue.suggestedFix && /* @__PURE__ */ jsx22("div", { className: "graph-validation-issue-fix", children: issue.suggestedFix })
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 })
1944
2714
  ]
1945
2715
  }
1946
2716
  )
@@ -1954,9 +2724,9 @@ function ValidationPanel({
1954
2724
  }
1955
2725
 
1956
2726
  // src/graph/react/viewer/GraphToolbar.tsx
1957
- import { Fragment as Fragment13, jsx as jsx23, jsxs as jsxs23 } from "react/jsx-runtime";
2727
+ import { Fragment as Fragment16, jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
1958
2728
  var REACTFLOW_PANEL_MARGIN = 15;
1959
- var ARROW_RIGHT_ICON = /* @__PURE__ */ jsxs23(
2729
+ var ARROW_RIGHT_ICON = /* @__PURE__ */ jsxs25(
1960
2730
  "svg",
1961
2731
  {
1962
2732
  viewBox: "0 0 24 24",
@@ -1968,12 +2738,12 @@ var ARROW_RIGHT_ICON = /* @__PURE__ */ jsxs23(
1968
2738
  strokeLinecap: "round",
1969
2739
  strokeLinejoin: "round",
1970
2740
  children: [
1971
- /* @__PURE__ */ jsx23("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
1972
- /* @__PURE__ */ jsx23("polyline", { points: "12 5 19 12 12 19" })
2741
+ /* @__PURE__ */ jsx26("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
2742
+ /* @__PURE__ */ jsx26("polyline", { points: "12 5 19 12 12 19" })
1973
2743
  ]
1974
2744
  }
1975
2745
  );
1976
- var ARROW_DOWN_ICON = /* @__PURE__ */ jsxs23(
2746
+ var ARROW_DOWN_ICON = /* @__PURE__ */ jsxs25(
1977
2747
  "svg",
1978
2748
  {
1979
2749
  viewBox: "0 0 24 24",
@@ -1985,12 +2755,12 @@ var ARROW_DOWN_ICON = /* @__PURE__ */ jsxs23(
1985
2755
  strokeLinecap: "round",
1986
2756
  strokeLinejoin: "round",
1987
2757
  children: [
1988
- /* @__PURE__ */ jsx23("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
1989
- /* @__PURE__ */ jsx23("polyline", { points: "19 12 12 19 5 12" })
2758
+ /* @__PURE__ */ jsx26("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
2759
+ /* @__PURE__ */ jsx26("polyline", { points: "19 12 12 19 5 12" })
1990
2760
  ]
1991
2761
  }
1992
2762
  );
1993
- var MINUS_ICON = /* @__PURE__ */ jsx23(
2763
+ var MINUS_ICON = /* @__PURE__ */ jsx26(
1994
2764
  "svg",
1995
2765
  {
1996
2766
  viewBox: "0 0 24 24",
@@ -2001,10 +2771,10 @@ var MINUS_ICON = /* @__PURE__ */ jsx23(
2001
2771
  strokeWidth: "2",
2002
2772
  strokeLinecap: "round",
2003
2773
  strokeLinejoin: "round",
2004
- children: /* @__PURE__ */ jsx23("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
2774
+ children: /* @__PURE__ */ jsx26("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
2005
2775
  }
2006
2776
  );
2007
- var PLUS_ICON = /* @__PURE__ */ jsxs23(
2777
+ var PLUS_ICON = /* @__PURE__ */ jsxs25(
2008
2778
  "svg",
2009
2779
  {
2010
2780
  viewBox: "0 0 24 24",
@@ -2016,12 +2786,12 @@ var PLUS_ICON = /* @__PURE__ */ jsxs23(
2016
2786
  strokeLinecap: "round",
2017
2787
  strokeLinejoin: "round",
2018
2788
  children: [
2019
- /* @__PURE__ */ jsx23("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
2020
- /* @__PURE__ */ jsx23("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
2789
+ /* @__PURE__ */ jsx26("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
2790
+ /* @__PURE__ */ jsx26("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
2021
2791
  ]
2022
2792
  }
2023
2793
  );
2024
- var FIT_VIEW_ICON = /* @__PURE__ */ jsxs23(
2794
+ var FIT_VIEW_ICON = /* @__PURE__ */ jsxs25(
2025
2795
  "svg",
2026
2796
  {
2027
2797
  viewBox: "0 0 24 24",
@@ -2033,14 +2803,14 @@ var FIT_VIEW_ICON = /* @__PURE__ */ jsxs23(
2033
2803
  strokeLinecap: "round",
2034
2804
  strokeLinejoin: "round",
2035
2805
  children: [
2036
- /* @__PURE__ */ jsx23("polyline", { points: "15 3 21 3 21 9" }),
2037
- /* @__PURE__ */ jsx23("polyline", { points: "9 21 3 21 3 15" }),
2038
- /* @__PURE__ */ jsx23("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
2039
- /* @__PURE__ */ jsx23("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
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" })
2040
2810
  ]
2041
2811
  }
2042
2812
  );
2043
- var BOXES_ICON = /* @__PURE__ */ jsxs23(
2813
+ var BOXES_ICON = /* @__PURE__ */ jsxs25(
2044
2814
  "svg",
2045
2815
  {
2046
2816
  viewBox: "0 0 24 24",
@@ -2052,22 +2822,22 @@ var BOXES_ICON = /* @__PURE__ */ jsxs23(
2052
2822
  strokeLinecap: "round",
2053
2823
  strokeLinejoin: "round",
2054
2824
  children: [
2055
- /* @__PURE__ */ jsx23("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" }),
2056
- /* @__PURE__ */ jsx23("path", { d: "m7 16.5-4.74-2.85" }),
2057
- /* @__PURE__ */ jsx23("path", { d: "m7 16.5 5-3" }),
2058
- /* @__PURE__ */ jsx23("path", { d: "M7 16.5v5.17" }),
2059
- /* @__PURE__ */ jsx23("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" }),
2060
- /* @__PURE__ */ jsx23("path", { d: "m17 16.5-5-3" }),
2061
- /* @__PURE__ */ jsx23("path", { d: "m17 16.5 4.74-2.85" }),
2062
- /* @__PURE__ */ jsx23("path", { d: "M17 16.5v5.17" }),
2063
- /* @__PURE__ */ jsx23("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" }),
2064
- /* @__PURE__ */ jsx23("path", { d: "M12 8 7.26 5.15" }),
2065
- /* @__PURE__ */ jsx23("path", { d: "m12 8 4.74-2.85" }),
2066
- /* @__PURE__ */ jsx23("path", { d: "M12 13.5V8" })
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" })
2067
2837
  ]
2068
2838
  }
2069
2839
  );
2070
- var FOLD_ALL_ICON = /* @__PURE__ */ jsxs23(
2840
+ var FOLD_ALL_ICON = /* @__PURE__ */ jsxs25(
2071
2841
  "svg",
2072
2842
  {
2073
2843
  viewBox: "0 0 24 24",
@@ -2079,15 +2849,15 @@ var FOLD_ALL_ICON = /* @__PURE__ */ jsxs23(
2079
2849
  strokeLinecap: "round",
2080
2850
  strokeLinejoin: "round",
2081
2851
  children: [
2082
- /* @__PURE__ */ jsx23("rect", { x: "6", y: "6", width: "12", height: "12", rx: "2" }),
2083
- /* @__PURE__ */ jsx23("polyline", { points: "2 2 6 6 2 6" }),
2084
- /* @__PURE__ */ jsx23("polyline", { points: "22 2 18 6 22 6" }),
2085
- /* @__PURE__ */ jsx23("polyline", { points: "2 22 6 18 2 18" }),
2086
- /* @__PURE__ */ jsx23("polyline", { points: "22 22 18 18 22 18" })
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" })
2087
2857
  ]
2088
2858
  }
2089
2859
  );
2090
- var EXPAND_ALL_ICON = /* @__PURE__ */ jsxs23(
2860
+ var EXPAND_ALL_ICON = /* @__PURE__ */ jsxs25(
2091
2861
  "svg",
2092
2862
  {
2093
2863
  viewBox: "0 0 24 24",
@@ -2099,15 +2869,15 @@ var EXPAND_ALL_ICON = /* @__PURE__ */ jsxs23(
2099
2869
  strokeLinecap: "round",
2100
2870
  strokeLinejoin: "round",
2101
2871
  children: [
2102
- /* @__PURE__ */ jsx23("rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" }),
2103
- /* @__PURE__ */ jsx23("polyline", { points: "3 3 7 7 3 7" }),
2104
- /* @__PURE__ */ jsx23("polyline", { points: "21 3 17 7 21 7" }),
2105
- /* @__PURE__ */ jsx23("polyline", { points: "3 21 7 17 3 17" }),
2106
- /* @__PURE__ */ jsx23("polyline", { points: "21 21 17 17 21 17" })
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" })
2107
2877
  ]
2108
2878
  }
2109
2879
  );
2110
- var SUN_ICON = /* @__PURE__ */ jsxs23(
2880
+ var SUN_ICON = /* @__PURE__ */ jsxs25(
2111
2881
  "svg",
2112
2882
  {
2113
2883
  viewBox: "0 0 24 24",
@@ -2119,19 +2889,19 @@ var SUN_ICON = /* @__PURE__ */ jsxs23(
2119
2889
  strokeLinecap: "round",
2120
2890
  strokeLinejoin: "round",
2121
2891
  children: [
2122
- /* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "4" }),
2123
- /* @__PURE__ */ jsx23("line", { x1: "12", y1: "2", x2: "12", y2: "4" }),
2124
- /* @__PURE__ */ jsx23("line", { x1: "12", y1: "20", x2: "12", y2: "22" }),
2125
- /* @__PURE__ */ jsx23("line", { x1: "4.93", y1: "4.93", x2: "6.34", y2: "6.34" }),
2126
- /* @__PURE__ */ jsx23("line", { x1: "17.66", y1: "17.66", x2: "19.07", y2: "19.07" }),
2127
- /* @__PURE__ */ jsx23("line", { x1: "2", y1: "12", x2: "4", y2: "12" }),
2128
- /* @__PURE__ */ jsx23("line", { x1: "20", y1: "12", x2: "22", y2: "12" }),
2129
- /* @__PURE__ */ jsx23("line", { x1: "4.93", y1: "19.07", x2: "6.34", y2: "17.66" }),
2130
- /* @__PURE__ */ jsx23("line", { x1: "17.66", y1: "6.34", x2: "19.07", y2: "4.93" })
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" })
2131
2901
  ]
2132
2902
  }
2133
2903
  );
2134
- var MOON_ICON = /* @__PURE__ */ jsx23(
2904
+ var MOON_ICON = /* @__PURE__ */ jsx26(
2135
2905
  "svg",
2136
2906
  {
2137
2907
  viewBox: "0 0 24 24",
@@ -2142,10 +2912,10 @@ var MOON_ICON = /* @__PURE__ */ jsx23(
2142
2912
  strokeWidth: "2",
2143
2913
  strokeLinecap: "round",
2144
2914
  strokeLinejoin: "round",
2145
- children: /* @__PURE__ */ jsx23("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
2915
+ children: /* @__PURE__ */ jsx26("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
2146
2916
  }
2147
2917
  );
2148
- var MONITOR_ICON = /* @__PURE__ */ jsxs23(
2918
+ var MONITOR_ICON = /* @__PURE__ */ jsxs25(
2149
2919
  "svg",
2150
2920
  {
2151
2921
  viewBox: "0 0 24 24",
@@ -2157,13 +2927,13 @@ var MONITOR_ICON = /* @__PURE__ */ jsxs23(
2157
2927
  strokeLinecap: "round",
2158
2928
  strokeLinejoin: "round",
2159
2929
  children: [
2160
- /* @__PURE__ */ jsx23("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
2161
- /* @__PURE__ */ jsx23("line", { x1: "8", y1: "21", x2: "16", y2: "21" }),
2162
- /* @__PURE__ */ jsx23("line", { x1: "12", y1: "17", x2: "12", y2: "21" })
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" })
2163
2933
  ]
2164
2934
  }
2165
2935
  );
2166
- var SPINNER_ICON = /* @__PURE__ */ jsx23(
2936
+ var SPINNER_ICON = /* @__PURE__ */ jsx26(
2167
2937
  "svg",
2168
2938
  {
2169
2939
  className: "graph-toolbar-validation-spin",
@@ -2175,10 +2945,10 @@ var SPINNER_ICON = /* @__PURE__ */ jsx23(
2175
2945
  strokeWidth: "2",
2176
2946
  strokeLinecap: "round",
2177
2947
  strokeLinejoin: "round",
2178
- children: /* @__PURE__ */ jsx23("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
2948
+ children: /* @__PURE__ */ jsx26("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
2179
2949
  }
2180
2950
  );
2181
- var CHECK_ICON2 = /* @__PURE__ */ jsx23(
2951
+ var CHECK_ICON2 = /* @__PURE__ */ jsx26(
2182
2952
  "svg",
2183
2953
  {
2184
2954
  viewBox: "0 0 24 24",
@@ -2189,10 +2959,10 @@ var CHECK_ICON2 = /* @__PURE__ */ jsx23(
2189
2959
  strokeWidth: "2",
2190
2960
  strokeLinecap: "round",
2191
2961
  strokeLinejoin: "round",
2192
- children: /* @__PURE__ */ jsx23("polyline", { points: "20 6 9 17 4 12" })
2962
+ children: /* @__PURE__ */ jsx26("polyline", { points: "20 6 9 17 4 12" })
2193
2963
  }
2194
2964
  );
2195
- var X_CIRCLE_ICON = /* @__PURE__ */ jsxs23(
2965
+ var X_CIRCLE_ICON = /* @__PURE__ */ jsxs25(
2196
2966
  "svg",
2197
2967
  {
2198
2968
  viewBox: "0 0 24 24",
@@ -2204,13 +2974,13 @@ var X_CIRCLE_ICON = /* @__PURE__ */ jsxs23(
2204
2974
  strokeLinecap: "round",
2205
2975
  strokeLinejoin: "round",
2206
2976
  children: [
2207
- /* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "10" }),
2208
- /* @__PURE__ */ jsx23("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
2209
- /* @__PURE__ */ jsx23("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
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" })
2210
2980
  ]
2211
2981
  }
2212
2982
  );
2213
- var ALERT_TRIANGLE_ICON = /* @__PURE__ */ jsxs23(
2983
+ var ALERT_TRIANGLE_ICON = /* @__PURE__ */ jsxs25(
2214
2984
  "svg",
2215
2985
  {
2216
2986
  viewBox: "0 0 24 24",
@@ -2222,13 +2992,13 @@ var ALERT_TRIANGLE_ICON = /* @__PURE__ */ jsxs23(
2222
2992
  strokeLinecap: "round",
2223
2993
  strokeLinejoin: "round",
2224
2994
  children: [
2225
- /* @__PURE__ */ jsx23("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" }),
2226
- /* @__PURE__ */ jsx23("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
2227
- /* @__PURE__ */ jsx23("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
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" })
2228
2998
  ]
2229
2999
  }
2230
3000
  );
2231
- var INFO_CIRCLE_ICON = /* @__PURE__ */ jsxs23(
3001
+ var INFO_CIRCLE_ICON = /* @__PURE__ */ jsxs25(
2232
3002
  "svg",
2233
3003
  {
2234
3004
  viewBox: "0 0 24 24",
@@ -2240,9 +3010,9 @@ var INFO_CIRCLE_ICON = /* @__PURE__ */ jsxs23(
2240
3010
  strokeLinecap: "round",
2241
3011
  strokeLinejoin: "round",
2242
3012
  children: [
2243
- /* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "10" }),
2244
- /* @__PURE__ */ jsx23("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
2245
- /* @__PURE__ */ jsx23("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
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" })
2246
3016
  ]
2247
3017
  }
2248
3018
  );
@@ -2316,11 +3086,11 @@ function GraphToolbar({
2316
3086
  const orientation = toolbarOrientation(position);
2317
3087
  const setValidationOpen = onValidationOpenChange != null ? onValidationOpenChange : (() => {
2318
3088
  });
2319
- const setValidationOpenRef = React8.useRef(setValidationOpen);
3089
+ const setValidationOpenRef = React10.useRef(setValidationOpen);
2320
3090
  setValidationOpenRef.current = setValidationOpen;
2321
- const validationRef = React8.useRef(null);
2322
- const validationPanelId = React8.useId();
2323
- React8.useEffect(() => {
3091
+ const validationRef = React10.useRef(null);
3092
+ const validationPanelId = React10.useId();
3093
+ React10.useEffect(() => {
2324
3094
  if (validationState === void 0) setValidationOpenRef.current(false);
2325
3095
  }, [validationState]);
2326
3096
  usePopoverDismiss(validationOpen, validationRef, () => setValidationOpenRef.current(false));
@@ -2333,16 +3103,16 @@ function GraphToolbar({
2333
3103
  const foldAllSection = onFoldAll || onExpandAll;
2334
3104
  const foldAllTitle = foldAllDisabled ? "Fold all controllers (nothing to fold)" : "Fold all controllers";
2335
3105
  const expandAllTitle = expandAllDisabled ? "Expand all controllers (nothing to expand)" : "Expand all controllers";
2336
- return /* @__PURE__ */ jsx23(
3106
+ return /* @__PURE__ */ jsx26(
2337
3107
  Panel,
2338
3108
  {
2339
3109
  position,
2340
3110
  className: `graph-toolbar-panel graph-toolbar-panel--${orientation}`,
2341
3111
  style: panelStyle,
2342
- children: /* @__PURE__ */ jsxs23("div", { className: `graph-toolbar graph-toolbar--${orientation}`, children: [
2343
- validationState !== void 0 && /* @__PURE__ */ jsxs23(Fragment13, { children: [
2344
- /* @__PURE__ */ jsxs23("div", { className: "graph-toolbar-validation", ref: validationRef, children: [
2345
- /* @__PURE__ */ jsxs23(
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(
2346
3116
  "button",
2347
3117
  {
2348
3118
  type: "button",
@@ -2355,11 +3125,11 @@ function GraphToolbar({
2355
3125
  "aria-controls": validationPanelId,
2356
3126
  children: [
2357
3127
  validationIcon(validationState),
2358
- validationIssues.length > 0 && /* @__PURE__ */ jsx23("span", { className: "graph-toolbar-validation-badge", children: validationIssues.length > 99 ? "99+" : validationIssues.length })
3128
+ validationIssues.length > 0 && /* @__PURE__ */ jsx26("span", { className: "graph-toolbar-validation-badge", children: validationIssues.length > 99 ? "99+" : validationIssues.length })
2359
3129
  ]
2360
3130
  }
2361
3131
  ),
2362
- validationOpen && /* @__PURE__ */ jsx23(
3132
+ validationOpen && /* @__PURE__ */ jsx26(
2363
3133
  ValidationPanel,
2364
3134
  {
2365
3135
  id: validationPanelId,
@@ -2370,10 +3140,10 @@ function GraphToolbar({
2370
3140
  }
2371
3141
  )
2372
3142
  ] }),
2373
- /* @__PURE__ */ jsx23("div", { className: "graph-toolbar-separator" })
3143
+ /* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" })
2374
3144
  ] }),
2375
- styleMenuEnabled && /* @__PURE__ */ jsxs23(Fragment13, { children: [
2376
- /* @__PURE__ */ jsx23(
3145
+ styleMenuEnabled && /* @__PURE__ */ jsxs25(Fragment16, { children: [
3146
+ /* @__PURE__ */ jsx26(
2377
3147
  StyleMenu,
2378
3148
  {
2379
3149
  value: graphStyle,
@@ -2386,9 +3156,9 @@ function GraphToolbar({
2386
3156
  buttonClassName: "graph-toolbar-btn"
2387
3157
  }
2388
3158
  ),
2389
- /* @__PURE__ */ jsx23("div", { className: "graph-toolbar-separator" })
3159
+ /* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" })
2390
3160
  ] }),
2391
- onFoldAll && /* @__PURE__ */ jsx23(
3161
+ onFoldAll && /* @__PURE__ */ jsx26(
2392
3162
  "button",
2393
3163
  {
2394
3164
  type: "button",
@@ -2400,7 +3170,7 @@ function GraphToolbar({
2400
3170
  children: FOLD_ALL_ICON
2401
3171
  }
2402
3172
  ),
2403
- onExpandAll && /* @__PURE__ */ jsx23(
3173
+ onExpandAll && /* @__PURE__ */ jsx26(
2404
3174
  "button",
2405
3175
  {
2406
3176
  type: "button",
@@ -2412,8 +3182,8 @@ function GraphToolbar({
2412
3182
  children: EXPAND_ALL_ICON
2413
3183
  }
2414
3184
  ),
2415
- foldAllSection && /* @__PURE__ */ jsx23("div", { className: "graph-toolbar-separator" }),
2416
- onShowControllersChange && /* @__PURE__ */ jsx23(
3185
+ foldAllSection && /* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" }),
3186
+ onShowControllersChange && /* @__PURE__ */ jsx26(
2417
3187
  "button",
2418
3188
  {
2419
3189
  type: "button",
@@ -2424,7 +3194,7 @@ function GraphToolbar({
2424
3194
  children: BOXES_ICON
2425
3195
  }
2426
3196
  ),
2427
- /* @__PURE__ */ jsx23(
3197
+ /* @__PURE__ */ jsx26(
2428
3198
  "button",
2429
3199
  {
2430
3200
  type: "button",
@@ -2435,8 +3205,8 @@ function GraphToolbar({
2435
3205
  children: isVertical ? ARROW_RIGHT_ICON : ARROW_DOWN_ICON
2436
3206
  }
2437
3207
  ),
2438
- (onZoomOut || onZoomIn || onFitView) && /* @__PURE__ */ jsx23("div", { className: "graph-toolbar-separator" }),
2439
- onZoomOut && /* @__PURE__ */ jsx23(
3208
+ (onZoomOut || onZoomIn || onFitView) && /* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" }),
3209
+ onZoomOut && /* @__PURE__ */ jsx26(
2440
3210
  "button",
2441
3211
  {
2442
3212
  type: "button",
@@ -2447,7 +3217,7 @@ function GraphToolbar({
2447
3217
  children: MINUS_ICON
2448
3218
  }
2449
3219
  ),
2450
- onZoomIn && /* @__PURE__ */ jsx23(
3220
+ onZoomIn && /* @__PURE__ */ jsx26(
2451
3221
  "button",
2452
3222
  {
2453
3223
  type: "button",
@@ -2458,7 +3228,7 @@ function GraphToolbar({
2458
3228
  children: PLUS_ICON
2459
3229
  }
2460
3230
  ),
2461
- onFitView && /* @__PURE__ */ jsx23(
3231
+ onFitView && /* @__PURE__ */ jsx26(
2462
3232
  "button",
2463
3233
  {
2464
3234
  type: "button",
@@ -2469,9 +3239,9 @@ function GraphToolbar({
2469
3239
  children: FIT_VIEW_ICON
2470
3240
  }
2471
3241
  ),
2472
- themeToggleEnabled && /* @__PURE__ */ jsxs23(Fragment13, { children: [
2473
- /* @__PURE__ */ jsx23("div", { className: "graph-toolbar-separator" }),
2474
- /* @__PURE__ */ jsx23(
3242
+ themeToggleEnabled && /* @__PURE__ */ jsxs25(Fragment16, { children: [
3243
+ /* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" }),
3244
+ /* @__PURE__ */ jsx26(
2475
3245
  "button",
2476
3246
  {
2477
3247
  type: "button",
@@ -2489,7 +3259,7 @@ function GraphToolbar({
2489
3259
  }
2490
3260
 
2491
3261
  // src/graph/react/viewer/StillFit.tsx
2492
- import React9 from "react";
3262
+ import React11 from "react";
2493
3263
  import { useEdges, useNodes, useNodesInitialized, useReactFlow, useStore } from "@xyflow/react";
2494
3264
 
2495
3265
  // src/graph/react/viewer/stillViewport.ts
@@ -2536,7 +3306,7 @@ function StillFit({ onHeight }) {
2536
3306
  const nodes = useNodes();
2537
3307
  const edges = useEdges();
2538
3308
  const { getNodesBounds, setViewport } = useReactFlow();
2539
- React9.useLayoutEffect(() => {
3309
+ React11.useLayoutEffect(() => {
2540
3310
  if (!nodesInitialized || nodes.length === 0) return;
2541
3311
  const bounds = stillContentBounds(
2542
3312
  getNodesBounds(nodes),
@@ -2554,7 +3324,7 @@ function StillFit({ onHeight }) {
2554
3324
  }
2555
3325
 
2556
3326
  // src/graph/react/nodes/NodeValidationBadge.tsx
2557
- import { jsx as jsx24 } from "react/jsx-runtime";
3327
+ import { jsx as jsx27 } from "react/jsx-runtime";
2558
3328
  function NodeValidationBadge({
2559
3329
  validation,
2560
3330
  onClick
@@ -2564,9 +3334,9 @@ function NodeValidationBadge({
2564
3334
  const className = `node-validation-badge node-validation-badge--${validation.severity}`;
2565
3335
  const text = validation.count > 99 ? "99+" : String(validation.count);
2566
3336
  if (!onClick) {
2567
- return /* @__PURE__ */ jsx24("span", { className, title: tooltip, "aria-label": label, children: text });
3337
+ return /* @__PURE__ */ jsx27("span", { className, title: tooltip, "aria-label": label, children: text });
2568
3338
  }
2569
- return /* @__PURE__ */ jsx24(
3339
+ return /* @__PURE__ */ jsx27(
2570
3340
  "button",
2571
3341
  {
2572
3342
  type: "button",
@@ -2586,7 +3356,7 @@ function validationRingClass(validation) {
2586
3356
  }
2587
3357
 
2588
3358
  // src/graph/react/nodes/controller/ControllerGroupNode.tsx
2589
- import { jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
3359
+ import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
2590
3360
  var CONTROLLER_CONFIG = {
2591
3361
  PipeSequence: { badge: "Sequence", icon: "\u2192" },
2592
3362
  PipeParallel: { badge: "Parallel", icon: "//" },
@@ -2609,16 +3379,16 @@ function ControllerGroupNode({ data }) {
2609
3379
  const isCollapsible = (data.pipeType === "PipeParallel" || data.pipeType === "PipeBatch") && ((_a = data.childCount) != null ? _a : 0) > MAX_VISIBLE_CONTROLLER_CHILDREN;
2610
3380
  const hiddenCount = isCollapsible ? ((_b = data.childCount) != null ? _b : 0) - MAX_VISIBLE_CONTROLLER_CHILDREN : 0;
2611
3381
  const failingClass = data.failingPipe ? " controller-group-node--failing-pipe" : "";
2612
- return /* @__PURE__ */ jsxs24(
3382
+ return /* @__PURE__ */ jsxs26(
2613
3383
  "div",
2614
3384
  {
2615
3385
  className: `controller-group-node ${modifier}${failingClass}${validationRingClass(data.validation)}`,
2616
3386
  children: [
2617
- /* @__PURE__ */ jsxs24("div", { className: "controller-group-header", children: [
2618
- /* @__PURE__ */ jsx25("span", { className: "controller-group-icon", children: config.icon }),
2619
- /* @__PURE__ */ jsx25("span", { className: "controller-group-badge", children: config.badge }),
2620
- data.label && /* @__PURE__ */ jsx25("span", { className: "controller-group-label", children: data.label }),
2621
- data.onToggleFold && /* @__PURE__ */ jsx25(
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(
2622
3392
  "button",
2623
3393
  {
2624
3394
  type: "button",
@@ -2633,9 +3403,9 @@ function ControllerGroupNode({ data }) {
2633
3403
  children: "\u2921"
2634
3404
  }
2635
3405
  ),
2636
- data.validation && /* @__PURE__ */ jsx25(NodeValidationBadge, { validation: data.validation, onClick: data.onValidationBadgeClick })
3406
+ data.validation && /* @__PURE__ */ jsx28(NodeValidationBadge, { validation: data.validation, onClick: data.onValidationBadgeClick })
2637
3407
  ] }),
2638
- isCollapsible && /* @__PURE__ */ jsx25(
3408
+ isCollapsible && /* @__PURE__ */ jsx28(
2639
3409
  "button",
2640
3410
  {
2641
3411
  className: "controller-group-collapse",
@@ -2658,7 +3428,7 @@ import { Handle, Position } from "@xyflow/react";
2658
3428
 
2659
3429
  // src/graph/react/nodes/pipe/PipeCardBase.tsx
2660
3430
  import { useState as useState2 } from "react";
2661
- import { jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
3431
+ import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
2662
3432
  var PIPE_TYPE_BADGES2 = {
2663
3433
  PipeLLM: "LLM",
2664
3434
  PipeExtract: "Extract",
@@ -2720,22 +3490,22 @@ function PipeCardBase({ data, children }) {
2720
3490
  const failingClass = data.failingPipe ? " pipe-card--failing-pipe" : "";
2721
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";
2722
3492
  const ringClass = validationRingClass(data.validation);
2723
- return /* @__PURE__ */ jsxs25(
3493
+ return /* @__PURE__ */ jsxs27(
2724
3494
  "div",
2725
3495
  {
2726
3496
  className: `pipe-card ${dirClass}${controllerClass}${signatureClass}${bindingClass}${staticClass}${failingClass}${ringClass}`,
2727
3497
  children: [
2728
- /* @__PURE__ */ jsxs25("div", { className: "pipe-card-header", children: [
2729
- /* @__PURE__ */ jsx26("span", { className: badgeClass, children: badge }),
2730
- data.docGenFormat && /* @__PURE__ */ jsx26("span", { className: "pipe-card-format", title: `Document format: ${data.docGenFormat}`, children: data.docGenFormat.toUpperCase() }),
2731
- /* @__PURE__ */ jsx26("span", { className: "pipe-card-code", title: data.pipeCode, children: data.pipeCode }),
2732
- !isStatic && /* @__PURE__ */ jsx26(
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(
2733
3503
  "span",
2734
3504
  {
2735
3505
  className: "pipe-card-status",
2736
3506
  style: { color: statusConfig.color },
2737
3507
  title: data.failingPipe ? "Failed here: the run failed in this pipe" : statusConfig.label,
2738
- children: /* @__PURE__ */ jsx26(
3508
+ children: /* @__PURE__ */ jsx29(
2739
3509
  "span",
2740
3510
  {
2741
3511
  className: `pipe-card-status-dot ${isRunning ? "pipe-card-status-dot--pulse" : ""}`,
@@ -2744,7 +3514,7 @@ function PipeCardBase({ data, children }) {
2744
3514
  )
2745
3515
  }
2746
3516
  ),
2747
- data.onExpand && /* @__PURE__ */ jsx26(
3517
+ data.onExpand && /* @__PURE__ */ jsx29(
2748
3518
  "button",
2749
3519
  {
2750
3520
  type: "button",
@@ -2759,32 +3529,32 @@ function PipeCardBase({ data, children }) {
2759
3529
  children: "\u2922"
2760
3530
  }
2761
3531
  ),
2762
- data.validation && /* @__PURE__ */ jsx26(NodeValidationBadge, { validation: data.validation, onClick: data.onValidationBadgeClick })
3532
+ data.validation && /* @__PURE__ */ jsx29(NodeValidationBadge, { validation: data.validation, onClick: data.onValidationBadgeClick })
2763
3533
  ] }),
2764
- (outcome || batchMultiplicity) && /* @__PURE__ */ jsxs25("div", { className: "pipe-card-annotations", children: [
2765
- outcome && /* @__PURE__ */ jsxs25("span", { className: "pipe-card-annotation pipe-card-annotation--outcome", children: [
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: [
2766
3536
  "outcome: ",
2767
3537
  outcome
2768
3538
  ] }),
2769
- batchMultiplicity && /* @__PURE__ */ jsx26("span", { className: "pipe-card-annotation pipe-card-annotation--batch", children: batchMultiplicity })
3539
+ batchMultiplicity && /* @__PURE__ */ jsx29("span", { className: "pipe-card-annotation pipe-card-annotation--batch", children: batchMultiplicity })
2770
3540
  ] }),
2771
- data.description && /* @__PURE__ */ jsx26("span", { className: "pipe-card-description", title: data.description, children: data.description }),
2772
- data.inputs.length > 0 && /* @__PURE__ */ jsxs25("div", { className: "pipe-card-io", children: [
2773
- /* @__PURE__ */ jsx26("span", { className: "pipe-card-io-label", children: "INPUTS" }),
2774
- /* @__PURE__ */ jsxs25("div", { className: "pipe-card-io-pills", children: [
2775
- visibleInputs.map((input) => /* @__PURE__ */ jsxs25(
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(
2776
3546
  "span",
2777
3547
  {
2778
3548
  className: "pipe-card-io-pill",
2779
3549
  title: `${input.name}: ${input.concept}`,
2780
3550
  children: [
2781
- /* @__PURE__ */ jsx26("span", { className: "pipe-card-io-pill-name", children: input.name }),
2782
- /* @__PURE__ */ jsx26("span", { className: "pipe-card-io-pill-concept", children: input.concept })
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 })
2783
3553
  ]
2784
3554
  },
2785
3555
  input.name
2786
3556
  )),
2787
- hasMany && /* @__PURE__ */ jsx26(
3557
+ hasMany && /* @__PURE__ */ jsx29(
2788
3558
  "button",
2789
3559
  {
2790
3560
  className: "pipe-card-io-more",
@@ -2797,16 +3567,16 @@ function PipeCardBase({ data, children }) {
2797
3567
  )
2798
3568
  ] })
2799
3569
  ] }),
2800
- data.outputs.length > 0 && /* @__PURE__ */ jsxs25("div", { className: "pipe-card-io", children: [
2801
- /* @__PURE__ */ jsx26("span", { className: "pipe-card-io-label", children: "OUTPUT" }),
2802
- /* @__PURE__ */ jsx26("div", { className: "pipe-card-io-pills", children: data.outputs.map((output) => /* @__PURE__ */ jsxs25(
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(
2803
3573
  "span",
2804
3574
  {
2805
3575
  className: "pipe-card-io-pill",
2806
3576
  title: `${output.name}: ${output.concept}`,
2807
3577
  children: [
2808
- /* @__PURE__ */ jsx26("span", { className: "pipe-card-io-pill-name", children: output.name }),
2809
- /* @__PURE__ */ jsx26("span", { className: "pipe-card-io-pill-concept", children: output.concept })
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 })
2810
3580
  ]
2811
3581
  },
2812
3582
  output.name
@@ -2841,11 +3611,11 @@ function getPipeCardComponent(pipeType) {
2841
3611
  }
2842
3612
 
2843
3613
  // src/graph/react/nodes/pipe/PipeCardNode.tsx
2844
- import { Fragment as Fragment14, jsx as jsx27, jsxs as jsxs26 } from "react/jsx-runtime";
3614
+ import { Fragment as Fragment17, jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
2845
3615
  function PipeCardNode({ data }) {
2846
3616
  var _a;
2847
3617
  const Card = (_a = getPipeCardComponent(data.pipeType)) != null ? _a : PipeCardBase;
2848
- return /* @__PURE__ */ jsx27(Card, { data });
3618
+ return /* @__PURE__ */ jsx30(Card, { data });
2849
3619
  }
2850
3620
  function PipeCardRFNode({
2851
3621
  data,
@@ -2854,139 +3624,37 @@ function PipeCardRFNode({
2854
3624
  }) {
2855
3625
  const payload = data.pipeCardData;
2856
3626
  if (!payload) return null;
2857
- return /* @__PURE__ */ jsxs26(Fragment14, { children: [
2858
- /* @__PURE__ */ jsx27(Handle, { type: "target", position: targetPosition }),
2859
- /* @__PURE__ */ jsx27(PipeCardNode, { data: payload }),
2860
- /* @__PURE__ */ jsx27(Handle, { type: "source", position: sourcePosition })
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 })
2861
3631
  ] });
2862
3632
  }
2863
3633
 
2864
3634
  // src/graph/react/styles/simple/SimpleNodes.tsx
2865
3635
  import { Handle as Handle2, Position as Position2 } from "@xyflow/react";
2866
- import { Fragment as Fragment15, jsx as jsx28, jsxs as jsxs27 } from "react/jsx-runtime";
2867
- var ICON_PROPS = {
2868
- viewBox: "0 0 24 24",
2869
- fill: "none",
2870
- stroke: "currentColor",
2871
- strokeWidth: 2,
2872
- strokeLinecap: "round",
2873
- strokeLinejoin: "round",
2874
- "aria-hidden": true
2875
- };
2876
- function Icon({ size = 13, children }) {
2877
- return /* @__PURE__ */ jsx28("svg", __spreadProps(__spreadValues({}, ICON_PROPS), { width: size, height: size, children }));
2878
- }
2879
- var CATEGORY_ICONS = {
2880
- ai: /* @__PURE__ */ jsxs27(Fragment15, { children: [
2881
- /* @__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" }),
2882
- /* @__PURE__ */ jsx28("path", { d: "M20 3v4" }),
2883
- /* @__PURE__ */ jsx28("path", { d: "M22 5h-4" })
2884
- ] }),
2885
- extract: /* @__PURE__ */ jsxs27(Fragment15, { children: [
2886
- /* @__PURE__ */ jsx28("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
2887
- /* @__PURE__ */ jsx28("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }),
2888
- /* @__PURE__ */ jsx28("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }),
2889
- /* @__PURE__ */ jsx28("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }),
2890
- /* @__PURE__ */ jsx28("path", { d: "M7 8h8" }),
2891
- /* @__PURE__ */ jsx28("path", { d: "M7 12h10" }),
2892
- /* @__PURE__ */ jsx28("path", { d: "M7 16h6" })
2893
- ] }),
2894
- image: /* @__PURE__ */ jsxs27(Fragment15, { children: [
2895
- /* @__PURE__ */ jsx28("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
2896
- /* @__PURE__ */ jsx28("circle", { cx: "9", cy: "9", r: "2" }),
2897
- /* @__PURE__ */ jsx28("path", { d: "m21 15-3.09-3.09a2 2 0 0 0-2.82 0L6 21" })
2898
- ] }),
2899
- search: /* @__PURE__ */ jsxs27(Fragment15, { children: [
2900
- /* @__PURE__ */ jsx28("circle", { cx: "11", cy: "11", r: "8" }),
2901
- /* @__PURE__ */ jsx28("path", { d: "m21 21-4.3-4.3" })
2902
- ] }),
2903
- code: /* @__PURE__ */ jsxs27(Fragment15, { children: [
2904
- /* @__PURE__ */ jsx28("polyline", { points: "16 18 22 12 16 6" }),
2905
- /* @__PURE__ */ jsx28("polyline", { points: "8 6 2 12 8 18" })
2906
- ] }),
2907
- template: /* @__PURE__ */ jsxs27(Fragment15, { children: [
2908
- /* @__PURE__ */ jsx28("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
2909
- /* @__PURE__ */ jsx28("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
2910
- /* @__PURE__ */ jsx28("path", { d: "M16 13H8" }),
2911
- /* @__PURE__ */ jsx28("path", { d: "M16 17H8" })
2912
- ] }),
2913
- document: /* @__PURE__ */ jsxs27(Fragment15, { children: [
2914
- /* @__PURE__ */ jsx28("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
2915
- /* @__PURE__ */ jsx28("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
2916
- /* @__PURE__ */ jsx28("path", { d: "M12 18v-6" }),
2917
- /* @__PURE__ */ jsx28("path", { d: "m9 15 3 3 3-3" })
2918
- ] }),
2919
- judge: /* @__PURE__ */ jsxs27(Fragment15, { children: [
2920
- /* @__PURE__ */ jsx28("path", { d: "m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
2921
- /* @__PURE__ */ jsx28("path", { d: "m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
2922
- /* @__PURE__ */ jsx28("path", { d: "M7 21h10" }),
2923
- /* @__PURE__ */ jsx28("path", { d: "M12 3v18" }),
2924
- /* @__PURE__ */ jsx28("path", { d: "M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2" })
2925
- ] }),
2926
- planned: /* @__PURE__ */ jsx28("circle", { cx: "12", cy: "12", r: "9", strokeDasharray: "3 3" }),
2927
- steps: /* @__PURE__ */ jsxs27(Fragment15, { children: [
2928
- /* @__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" }),
2929
- /* @__PURE__ */ jsx28("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }),
2930
- /* @__PURE__ */ jsx28("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" })
2931
- ] }),
2932
- parallel: /* @__PURE__ */ jsxs27(Fragment15, { children: [
2933
- /* @__PURE__ */ jsx28("path", { d: "M16 3h5v5" }),
2934
- /* @__PURE__ */ jsx28("path", { d: "M8 3H3v5" }),
2935
- /* @__PURE__ */ jsx28("path", { d: "M12 22v-8.3a4 4 0 0 0-1.17-2.87L3 3" }),
2936
- /* @__PURE__ */ jsx28("path", { d: "m15 9 6-6" })
2937
- ] }),
2938
- decision: /* @__PURE__ */ jsx28("path", { d: "M12 2 22 12 12 22 2 12Z" }),
2939
- repeat: /* @__PURE__ */ jsxs27(Fragment15, { children: [
2940
- /* @__PURE__ */ jsx28("path", { d: "m17 2 4 4-4 4" }),
2941
- /* @__PURE__ */ jsx28("path", { d: "M3 11v-1a4 4 0 0 1 4-4h14" }),
2942
- /* @__PURE__ */ jsx28("path", { d: "m7 22-4-4 4-4" }),
2943
- /* @__PURE__ */ jsx28("path", { d: "M21 13v1a4 4 0 0 1-4 4H3" })
2944
- ] }),
2945
- pick: /* @__PURE__ */ jsxs27(Fragment15, { children: [
2946
- /* @__PURE__ */ jsx28("polyline", { points: "15 10 20 15 15 20" }),
2947
- /* @__PURE__ */ jsx28("path", { d: "M4 4v7a4 4 0 0 0 4 4h12" })
2948
- ] })
2949
- };
2950
- var EXPAND_ICON2 = /* @__PURE__ */ jsxs27(Icon, { size: 12, children: [
2951
- /* @__PURE__ */ jsx28("polyline", { points: "15 3 21 3 21 9" }),
2952
- /* @__PURE__ */ jsx28("polyline", { points: "9 21 3 21 3 15" }),
2953
- /* @__PURE__ */ jsx28("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
2954
- /* @__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" })
2955
3642
  ] });
2956
- var COLLAPSE_ICON2 = /* @__PURE__ */ jsxs27(Icon, { size: 12, children: [
2957
- /* @__PURE__ */ jsx28("polyline", { points: "4 14 10 14 10 20" }),
2958
- /* @__PURE__ */ jsx28("polyline", { points: "20 10 14 10 14 4" }),
2959
- /* @__PURE__ */ jsx28("line", { x1: "14", y1: "10", x2: "21", y2: "3" }),
2960
- /* @__PURE__ */ jsx28("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
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" })
2961
3648
  ] });
2962
- var STATUS_LABELS = {
2963
- succeeded: "Done",
2964
- failed: "Failed",
2965
- running: "Running",
2966
- scheduled: "Waiting",
2967
- skipped: "Skipped",
2968
- canceled: "Canceled"
2969
- };
2970
- var STATUS_ICONS = {
2971
- succeeded: /* @__PURE__ */ jsx28("polyline", { points: "20 6 9 17 4 12" }),
2972
- failed: /* @__PURE__ */ jsxs27(Fragment15, { children: [
2973
- /* @__PURE__ */ jsx28("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
2974
- /* @__PURE__ */ jsx28("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
2975
- ] }),
2976
- running: /* @__PURE__ */ jsx28("path", { d: "M21 12a9 9 0 1 1-6.22-8.56" }),
2977
- scheduled: /* @__PURE__ */ jsx28("circle", { cx: "12", cy: "12", r: "8" }),
2978
- skipped: /* @__PURE__ */ jsx28("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
2979
- canceled: /* @__PURE__ */ jsx28("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
2980
- };
2981
3649
  function StatusMark({ status, graphMode }) {
2982
3650
  if (graphMode === "static") return null;
2983
- return /* @__PURE__ */ jsx28(
3651
+ return /* @__PURE__ */ jsx31(
2984
3652
  "span",
2985
3653
  {
2986
3654
  className: `simple-status simple-status--${status}`,
2987
3655
  title: STATUS_LABELS[status],
2988
3656
  "aria-label": STATUS_LABELS[status],
2989
- children: /* @__PURE__ */ jsx28(Icon, { size: 11, children: STATUS_ICONS[status] })
3657
+ children: /* @__PURE__ */ jsx31(Icon, { size: 11, children: STATUS_ICONS[status] })
2990
3658
  }
2991
3659
  );
2992
3660
  }
@@ -2995,17 +3663,17 @@ function Handles({
2995
3663
  targetPosition = Position2.Left,
2996
3664
  children
2997
3665
  }) {
2998
- return /* @__PURE__ */ jsxs27(Fragment15, { children: [
2999
- /* @__PURE__ */ jsx28(Handle2, { type: "target", position: targetPosition, className: "simple-handle" }),
3666
+ return /* @__PURE__ */ jsxs29(Fragment18, { children: [
3667
+ /* @__PURE__ */ jsx31(Handle2, { type: "target", position: targetPosition, className: "simple-handle" }),
3000
3668
  children,
3001
- /* @__PURE__ */ jsx28(Handle2, { type: "source", position: sourcePosition, className: "simple-handle" })
3669
+ /* @__PURE__ */ jsx31(Handle2, { type: "source", position: sourcePosition, className: "simple-handle" })
3002
3670
  ] });
3003
3671
  }
3004
3672
  function ValidationMark({
3005
3673
  validation,
3006
3674
  onClick
3007
3675
  }) {
3008
- return validation ? /* @__PURE__ */ jsx28(NodeValidationBadge, { validation, onClick }) : null;
3676
+ return validation ? /* @__PURE__ */ jsx31(NodeValidationBadge, { validation, onClick }) : null;
3009
3677
  }
3010
3678
  function payloadOf(data, kinds) {
3011
3679
  const simple = data.simple;
@@ -3016,20 +3684,20 @@ function SimpleStepNode({ data, sourcePosition, targetPosition }) {
3016
3684
  const step = payloadOf(data, ["step"]);
3017
3685
  if (!step) return null;
3018
3686
  const statusClass = step.graphMode !== "static" ? ` simple-step--${step.status}` : "";
3019
- return /* @__PURE__ */ jsx28(Handles, { sourcePosition, targetPosition, children: /* @__PURE__ */ jsxs27(
3687
+ return /* @__PURE__ */ jsx31(Handles, { sourcePosition, targetPosition, children: /* @__PURE__ */ jsxs29(
3020
3688
  "div",
3021
3689
  {
3022
3690
  className: `simple-step simple-step--${step.category}${statusClass}${validationRingClass(data.validation)}`,
3023
3691
  children: [
3024
- /* @__PURE__ */ jsxs27("div", { className: "simple-step-header", children: [
3025
- /* @__PURE__ */ jsxs27("span", { className: "simple-step-category", children: [
3026
- /* @__PURE__ */ jsx28(Icon, { children: CATEGORY_ICONS[step.category] }),
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] }),
3027
3695
  STEP_CATEGORY_WORDS[step.category]
3028
3696
  ] }),
3029
- /* @__PURE__ */ jsx28(StatusMark, { status: step.status, graphMode: step.graphMode }),
3030
- /* @__PURE__ */ jsx28(ValidationMark, { validation: data.validation, onClick: data.onValidationBadgeClick })
3697
+ /* @__PURE__ */ jsx31(StatusMark, { status: step.status, graphMode: step.graphMode }),
3698
+ /* @__PURE__ */ jsx31(ValidationMark, { validation: data.validation, onClick: data.onValidationBadgeClick })
3031
3699
  ] }),
3032
- /* @__PURE__ */ jsx28(
3700
+ /* @__PURE__ */ jsx31(
3033
3701
  "div",
3034
3702
  {
3035
3703
  className: "simple-step-title",
@@ -3042,11 +3710,11 @@ function SimpleStepNode({ data, sourcePosition, targetPosition }) {
3042
3710
  children: step.title
3043
3711
  }
3044
3712
  ),
3045
- step.forEach && /* @__PURE__ */ jsxs27("span", { className: "simple-step-foreach", children: [
3046
- /* @__PURE__ */ jsx28(Icon, { size: 11, children: CATEGORY_ICONS.repeat }),
3713
+ step.forEach && /* @__PURE__ */ jsxs29("span", { className: "simple-step-foreach", children: [
3714
+ /* @__PURE__ */ jsx31(Icon, { size: 11, children: CATEGORY_ICONS.repeat }),
3047
3715
  step.forEach
3048
3716
  ] }),
3049
- step.innerStepCount !== void 0 && /* @__PURE__ */ jsxs27(
3717
+ step.innerStepCount !== void 0 && /* @__PURE__ */ jsxs29(
3050
3718
  "button",
3051
3719
  {
3052
3720
  type: "button",
@@ -3070,24 +3738,24 @@ function SimpleStepNode({ data, sourcePosition, targetPosition }) {
3070
3738
  }
3071
3739
  var DOCUMENT_PATH = "M1 1 H99 V84 C80 98 62 74 44 86 C28 96 14 96 1 88 Z";
3072
3740
  function DocumentShape({ className }) {
3073
- return /* @__PURE__ */ jsx28("svg", { className, viewBox: "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx28("path", { d: DOCUMENT_PATH, vectorEffect: "non-scaling-stroke" }) });
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" }) });
3074
3742
  }
3075
3743
  function SimpleTerminalNode({ data, sourcePosition, targetPosition }) {
3076
3744
  const terminal = payloadOf(data, ["input", "output"]);
3077
3745
  if (!terminal) return null;
3078
- return /* @__PURE__ */ jsx28(Handles, { sourcePosition, targetPosition, children: /* @__PURE__ */ jsxs27(
3746
+ return /* @__PURE__ */ jsx31(Handles, { sourcePosition, targetPosition, children: /* @__PURE__ */ jsxs29(
3079
3747
  "div",
3080
3748
  {
3081
3749
  className: `simple-terminal simple-terminal--${terminal.kind}${terminal.isList ? " simple-terminal--list" : ""}`,
3082
3750
  children: [
3083
- terminal.isList && /* @__PURE__ */ jsxs27(Fragment15, { children: [
3084
- /* @__PURE__ */ jsx28(DocumentShape, { className: "simple-terminal-shape simple-terminal-shape--back2" }),
3085
- /* @__PURE__ */ jsx28(DocumentShape, { className: "simple-terminal-shape simple-terminal-shape--back1" })
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" })
3086
3754
  ] }),
3087
- /* @__PURE__ */ jsx28(DocumentShape, { className: "simple-terminal-shape" }),
3088
- /* @__PURE__ */ jsxs27("div", { className: "simple-terminal-text", children: [
3089
- /* @__PURE__ */ jsx28("span", { className: "simple-terminal-title", title: terminal.title, children: terminal.title }),
3090
- terminal.subtitle && /* @__PURE__ */ jsx28("span", { className: "simple-terminal-subtitle", children: terminal.subtitle })
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 })
3091
3759
  ] })
3092
3760
  ]
3093
3761
  }
@@ -3097,35 +3765,35 @@ function SimpleDecisionNode({ data, sourcePosition, targetPosition }) {
3097
3765
  const decision = payloadOf(data, ["decision"]);
3098
3766
  if (!decision) return null;
3099
3767
  const statusClass = decision.graphMode !== "static" ? ` simple-decision--${decision.status}` : "";
3100
- return /* @__PURE__ */ jsx28(Handles, { sourcePosition, targetPosition, children: /* @__PURE__ */ jsxs27("div", { className: `simple-decision${statusClass}${validationRingClass(data.validation)}`, children: [
3101
- /* @__PURE__ */ jsx28(
3768
+ return /* @__PURE__ */ jsx31(Handles, { sourcePosition, targetPosition, children: /* @__PURE__ */ jsxs29("div", { className: `simple-decision${statusClass}${validationRingClass(data.validation)}`, children: [
3769
+ /* @__PURE__ */ jsx31(
3102
3770
  "svg",
3103
3771
  {
3104
3772
  className: "simple-decision-shape",
3105
3773
  viewBox: "0 0 100 100",
3106
3774
  preserveAspectRatio: "none",
3107
3775
  "aria-hidden": "true",
3108
- children: /* @__PURE__ */ jsx28("path", { d: "M50 1 L99 50 L50 99 L1 50 Z", vectorEffect: "non-scaling-stroke" })
3776
+ children: /* @__PURE__ */ jsx31("path", { d: "M50 1 L99 50 L50 99 L1 50 Z", vectorEffect: "non-scaling-stroke" })
3109
3777
  }
3110
3778
  ),
3111
- /* @__PURE__ */ jsx28("div", { className: "simple-decision-text", title: decision.title, children: decision.title }),
3112
- /* @__PURE__ */ jsxs27("div", { className: "simple-decision-marks", children: [
3113
- /* @__PURE__ */ jsx28(StatusMark, { status: decision.status, graphMode: decision.graphMode }),
3114
- /* @__PURE__ */ jsx28(ValidationMark, { validation: data.validation, onClick: data.onValidationBadgeClick })
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 })
3115
3783
  ] })
3116
3784
  ] }) });
3117
3785
  }
3118
3786
  function SimpleFrameNode({ data }) {
3119
3787
  const frame = payloadOf(data, ["frame"]);
3120
3788
  if (!frame) return null;
3121
- return /* @__PURE__ */ jsx28("div", { className: `simple-frame${validationRingClass(data.validation)}`, children: /* @__PURE__ */ jsxs27("div", { className: "simple-frame-header", children: [
3122
- /* @__PURE__ */ jsxs27("span", { className: "simple-frame-title", children: [
3123
- /* @__PURE__ */ jsx28(Icon, { size: 12, children: CATEGORY_ICONS.repeat }),
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 }),
3124
3792
  frame.title
3125
3793
  ] }),
3126
- /* @__PURE__ */ jsx28(StatusMark, { status: frame.status, graphMode: frame.graphMode }),
3127
- /* @__PURE__ */ jsx28(ValidationMark, { validation: data.validation, onClick: data.onValidationBadgeClick }),
3128
- frame.onFold && /* @__PURE__ */ jsx28(
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(
3129
3797
  "button",
3130
3798
  {
3131
3799
  type: "button",
@@ -3151,7 +3819,7 @@ var simpleNodeTypes = {
3151
3819
 
3152
3820
  // src/graph/react/edges/RoutedEdge.tsx
3153
3821
  import { BaseEdge, getSmoothStepPath } from "@xyflow/react";
3154
- import { jsx as jsx29 } from "react/jsx-runtime";
3822
+ import { jsx as jsx32 } from "react/jsx-runtime";
3155
3823
  function RoutedEdge({
3156
3824
  id,
3157
3825
  sourceX,
@@ -3191,7 +3859,7 @@ function RoutedEdge({
3191
3859
  borderRadius: 8
3192
3860
  });
3193
3861
  }
3194
- return /* @__PURE__ */ jsx29(
3862
+ return /* @__PURE__ */ jsx32(
3195
3863
  BaseEdge,
3196
3864
  {
3197
3865
  id,
@@ -3213,7 +3881,7 @@ function RoutedEdge({
3213
3881
  }
3214
3882
 
3215
3883
  // src/graph/react/viewer/GraphViewer.tsx
3216
- import { Fragment as Fragment16, jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
3884
+ import { Fragment as Fragment19, jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
3217
3885
  var nodeTypes = __spreadValues(__spreadProps(__spreadValues({}, controllerNodeTypes), {
3218
3886
  pipeCard: PipeCardRFNode
3219
3887
  }), simpleNodeTypes);
@@ -3231,47 +3899,6 @@ var STILL_FLOW_PROPS = {
3231
3899
  elementsSelectable: false,
3232
3900
  disableKeyboardA11y: true
3233
3901
  };
3234
- function StuffNodeDetail({
3235
- nodeId,
3236
- stuffData,
3237
- producerPipeRef,
3238
- consumer,
3239
- graphspec,
3240
- artifacts,
3241
- theme,
3242
- resolveUrl,
3243
- resolveRendition,
3244
- resolveShareUrl,
3245
- saveFiles,
3246
- downloads
3247
- }) {
3248
- var _a;
3249
- const conceptInfo = stuffData.concept && graphspec ? resolveConceptRef(graphspec, stuffData.concept) : void 0;
3250
- const isDryRun = graphSpecMode(graphspec) === GRAPH_SPEC_MODE.DRY;
3251
- const descriptors = resultDescriptors(artifacts);
3252
- const renderData = descriptors ? () => /* @__PURE__ */ jsx30(
3253
- StuffResultPanel,
3254
- __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, descriptors), {
3255
- stuff: stuffData
3256
- }), conceptInfo ? { concept: conceptInfo } : {}), producerPipeRef ? { producerPipeRef } : {}), consumer ? { consumer } : {}), resolveUrl ? { resolveUrl } : {}), resolveRendition ? { resolveRendition } : {}), resolveShareUrl ? { resolveShareUrl } : {}), saveFiles ? { saveFiles } : {}), downloads ? { downloads } : {}), {
3257
- theme
3258
- })
3259
- ) : void 0;
3260
- if (conceptInfo) {
3261
- return /* @__PURE__ */ jsx30(
3262
- ConceptDetailPanel,
3263
- {
3264
- concept: conceptInfo,
3265
- ioData: stuffData,
3266
- isDryRun,
3267
- instanceKey: nodeId,
3268
- renderData
3269
- }
3270
- );
3271
- }
3272
- if (isDryRun) return /* @__PURE__ */ jsx30("div", { className: "detail-not-available", children: "Dry run data hidden" });
3273
- return /* @__PURE__ */ jsx30(Fragment16, { children: (_a = renderData == null ? void 0 : renderData()) != null ? _a : /* @__PURE__ */ jsx30("div", { className: "detail-not-available", children: "No data" }) });
3274
- }
3275
3902
  function seedFoldedControllers(mode, controllerIds) {
3276
3903
  if (mode === FOLD_MODE.FOLDED) return new Set(controllerIds);
3277
3904
  return /* @__PURE__ */ new Set();
@@ -3287,6 +3914,9 @@ function resolveToolbarPosition(positionProp, configPosition) {
3287
3914
  var _a;
3288
3915
  return (_a = positionProp != null ? positionProp : configPosition) != null ? _a : DEFAULT_GRAPH_CONFIG.toolbarPosition;
3289
3916
  }
3917
+ function deselect(element) {
3918
+ return element.selected ? __spreadProps(__spreadValues({}, element), { selected: false }) : element;
3919
+ }
3290
3920
  function stripFlash(className) {
3291
3921
  return (className == null ? void 0 : className.replace(/\s*\bnode-validation-flash\b/, "")) || void 0;
3292
3922
  }
@@ -3338,18 +3968,19 @@ function applyStatusOverrides(nodes, statusMap) {
3338
3968
  function containerClassName(theme, mode, {
3339
3969
  interactive,
3340
3970
  failed,
3341
- relayoutFailed = false
3971
+ relayoutFailed = false,
3972
+ valueArrows = false
3342
3973
  }) {
3343
- 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" : "");
3344
3975
  }
3345
3976
  function GraphViewer(props) {
3346
3977
  var _a, _b;
3347
- return /* @__PURE__ */ jsx30(
3978
+ return /* @__PURE__ */ jsx33(
3348
3979
  GraphFailureBoundary,
3349
3980
  {
3350
3981
  resetKey: (_b = (_a = props.graph) == null ? void 0 : _a.graphSpec) != null ? _b : null,
3351
- fallback: (failure) => /* @__PURE__ */ jsx30(GraphViewerFailed, __spreadProps(__spreadValues({}, props), { failure })),
3352
- children: (fail) => /* @__PURE__ */ jsx30(GraphViewerCanvas, __spreadProps(__spreadValues({}, props), { onFailure: fail }))
3982
+ fallback: (failure) => /* @__PURE__ */ jsx33(GraphViewerFailed, __spreadProps(__spreadValues({}, props), { failure })),
3983
+ children: (fail) => /* @__PURE__ */ jsx33(GraphViewerCanvas, __spreadProps(__spreadValues({}, props), { onFailure: fail }))
3353
3984
  }
3354
3985
  );
3355
3986
  }
@@ -3363,17 +3994,17 @@ function GraphViewerFailed({
3363
3994
  const mode = resolveExternalThemeMode(themeProp, config.theme);
3364
3995
  const resolvedTheme = resolveActiveTheme(mode, useSystemTheme(systemThemeProp));
3365
3996
  const palette = __spreadValues(__spreadValues({}, getPaletteForTheme(resolvedTheme)), config.paletteColors);
3366
- return /* @__PURE__ */ jsx30(
3997
+ return /* @__PURE__ */ jsx33(
3367
3998
  "div",
3368
3999
  {
3369
4000
  className: containerClassName(resolvedTheme, mode, { interactive, failed: true }),
3370
4001
  style: palette,
3371
- children: /* @__PURE__ */ jsx30(GraphErrorState, { failure })
4002
+ children: /* @__PURE__ */ jsx33(GraphErrorState, { failure })
3372
4003
  }
3373
4004
  );
3374
4005
  }
3375
4006
  function GraphViewerCanvas(props) {
3376
- var _a, _b, _c, _d, _e;
4007
+ var _a, _b, _c, _d;
3377
4008
  const {
3378
4009
  graph,
3379
4010
  config = DEFAULT_GRAPH_CONFIG,
@@ -3408,31 +4039,31 @@ function GraphViewerCanvas(props) {
3408
4039
  onFailure
3409
4040
  } = props;
3410
4041
  const graphspecProp = (_a = graph == null ? void 0 : graph.graphSpec) != null ? _a : null;
3411
- const { graphspec, failure: specFailure } = React11.useMemo(
4042
+ const { graphspec, failure: specFailure } = React13.useMemo(
3412
4043
  () => readGraphSpec(graphspecProp),
3413
4044
  [graphspecProp]
3414
4045
  );
3415
- const graphspecRef = React11.useRef(graphspec);
4046
+ const graphspecRef = React13.useRef(graphspec);
3416
4047
  graphspecRef.current = graphspec;
3417
- const [layoutFailure, setLayoutFailure] = React11.useState(null);
4048
+ const [layoutFailure, setLayoutFailure] = React13.useState(null);
3418
4049
  const canvasFailure = placeCanvasFailure({
3419
4050
  specFailure,
3420
4051
  layoutFailure: layoutFailureFor(layoutFailure, graphspec),
3421
4052
  interactive
3422
4053
  });
3423
4054
  const failed = canvasFailure.inPlace !== null;
3424
- const onFailureRef = React11.useRef(onFailure);
4055
+ const onFailureRef = React13.useRef(onFailure);
3425
4056
  onFailureRef.current = onFailure;
3426
- const [direction, setDirection] = React11.useState(
4057
+ const [direction, setDirection] = React13.useState(
3427
4058
  () => {
3428
4059
  var _a2, _b2;
3429
4060
  return (_b2 = (_a2 = initialDirection != null ? initialDirection : config.direction) != null ? _a2 : DEFAULT_GRAPH_CONFIG.direction) != null ? _b2 : GRAPH_DIRECTION.TB;
3430
4061
  }
3431
4062
  );
3432
4063
  const externalMode = resolveExternalThemeMode(themeProp, config.theme);
3433
- const [mode, setMode] = React11.useState(externalMode);
3434
- const prevExternalModeRef = React11.useRef(externalMode);
3435
- React11.useEffect(() => {
4064
+ const [mode, setMode] = React13.useState(externalMode);
4065
+ const prevExternalModeRef = React13.useRef(externalMode);
4066
+ React13.useEffect(() => {
3436
4067
  if (externalMode !== prevExternalModeRef.current) {
3437
4068
  prevExternalModeRef.current = externalMode;
3438
4069
  setMode(externalMode);
@@ -3440,13 +4071,13 @@ function GraphViewerCanvas(props) {
3440
4071
  }, [externalMode]);
3441
4072
  const systemTheme = useSystemTheme(systemThemeProp);
3442
4073
  const resolvedTheme = resolveActiveTheme(mode, systemTheme);
3443
- const onThemeChangeRef = React11.useRef(onThemeChange);
4074
+ const onThemeChangeRef = React13.useRef(onThemeChange);
3444
4075
  onThemeChangeRef.current = onThemeChange;
3445
- const prevReportedRef = React11.useRef({
4076
+ const prevReportedRef = React13.useRef({
3446
4077
  mode,
3447
4078
  resolvedTheme
3448
4079
  });
3449
- React11.useEffect(() => {
4080
+ React13.useEffect(() => {
3450
4081
  var _a2;
3451
4082
  const prev = prevReportedRef.current;
3452
4083
  if (prev.mode !== mode || prev.resolvedTheme !== resolvedTheme) {
@@ -3455,48 +4086,48 @@ function GraphViewerCanvas(props) {
3455
4086
  }
3456
4087
  }, [mode, resolvedTheme]);
3457
4088
  const externalStyle = resolveGraphStyle(graphStyleProp, config.graphStyle);
3458
- const [graphStyle, setGraphStyle] = React11.useState(externalStyle);
3459
- const prevExternalStyleRef = React11.useRef(externalStyle);
3460
- React11.useEffect(() => {
4089
+ const [graphStyle, setGraphStyle] = React13.useState(externalStyle);
4090
+ const prevExternalStyleRef = React13.useRef(externalStyle);
4091
+ React13.useEffect(() => {
3461
4092
  if (externalStyle !== prevExternalStyleRef.current) {
3462
4093
  prevExternalStyleRef.current = externalStyle;
3463
4094
  setGraphStyle(externalStyle);
3464
4095
  }
3465
4096
  }, [externalStyle]);
3466
- const onGraphStyleChangeRef = React11.useRef(onGraphStyleChange);
4097
+ const onGraphStyleChangeRef = React13.useRef(onGraphStyleChange);
3467
4098
  onGraphStyleChangeRef.current = onGraphStyleChange;
3468
- const prevReportedStyleRef = React11.useRef(graphStyle);
3469
- React11.useEffect(() => {
4099
+ const prevReportedStyleRef = React13.useRef(graphStyle);
4100
+ React13.useEffect(() => {
3470
4101
  var _a2;
3471
4102
  if (prevReportedStyleRef.current !== graphStyle) {
3472
4103
  prevReportedStyleRef.current = graphStyle;
3473
4104
  (_a2 = onGraphStyleChangeRef.current) == null ? void 0 : _a2.call(onGraphStyleChangeRef, graphStyle);
3474
4105
  }
3475
4106
  }, [graphStyle]);
3476
- const graphStyleRef = React11.useRef(graphStyle);
4107
+ const graphStyleRef = React13.useRef(graphStyle);
3477
4108
  graphStyleRef.current = graphStyle;
3478
4109
  const styleCapabilities = GRAPH_STYLES[graphStyle].capabilities;
3479
4110
  const effectiveFoldMode = (_c = (_b = initialFoldMode != null ? initialFoldMode : config.foldMode) != null ? _b : DEFAULT_GRAPH_CONFIG.foldMode) != null ? _c : FOLD_MODE.EXPANDED;
3480
- const [showControllers, setShowControllers] = React11.useState(() => {
4111
+ const [showControllers, setShowControllers] = React13.useState(() => {
3481
4112
  var _a2, _b2;
3482
4113
  if (effectiveFoldMode === FOLD_MODE.FOLDED) return true;
3483
4114
  return (_b2 = (_a2 = initialShowControllers != null ? initialShowControllers : config.showControllers) != null ? _a2 : DEFAULT_GRAPH_CONFIG.showControllers) != null ? _b2 : false;
3484
4115
  });
3485
- const foldModeRef = React11.useRef(effectiveFoldMode);
4116
+ const foldModeRef = React13.useRef(effectiveFoldMode);
3486
4117
  foldModeRef.current = effectiveFoldMode;
3487
- const containerRef = React11.useRef(null);
3488
- const [detailSelection, setDetailSelection] = React11.useState(null);
3489
- const [conceptOverride, setConceptOverride] = React11.useState(null);
4118
+ const containerRef = React13.useRef(null);
4119
+ const [detailSelection, setDetailSelection] = React13.useState(null);
4120
+ const [conceptOverride, setConceptOverride] = React13.useState(null);
3490
4121
  const {
3491
4122
  width: panelWidth,
3492
4123
  isDragging: isPanelDragging,
3493
4124
  handleMouseDown: onResizeMouseDown
3494
4125
  } = useResizable({ defaultWidth: 380, minWidth: 280, maxWidth: 800, containerRef });
3495
- React11.useEffect(() => {
4126
+ React13.useEffect(() => {
3496
4127
  setDetailSelection(null);
3497
4128
  setConceptOverride(null);
3498
4129
  }, [graphspec]);
3499
- React11.useEffect(() => {
4130
+ React13.useEffect(() => {
3500
4131
  const el = containerRef.current;
3501
4132
  if (!el) return;
3502
4133
  const themePalette = getPaletteForTheme(resolvedTheme);
@@ -3511,15 +4142,15 @@ function GraphViewerCanvas(props) {
3511
4142
  }
3512
4143
  };
3513
4144
  }, [config.paletteColors, resolvedTheme]);
3514
- const [stillHeight, setStillHeight] = React11.useState(STILL_PLACEHOLDER_HEIGHT_PX);
4145
+ const [stillHeight, setStillHeight] = React13.useState(STILL_PLACEHOLDER_HEIGHT_PX);
3515
4146
  const [nodes, setNodes, onNodesChange] = useNodesState([]);
3516
4147
  const [edges, setEdges, onEdgesChange] = useEdgesState([]);
3517
- const reactFlowRef = React11.useRef(null);
3518
- const initialDataRef = React11.useRef(null);
3519
- const rawGraphDataRef = React11.useRef(null);
3520
- const layoutCacheRef = React11.useRef(null);
3521
- const [expandedControllers, setExpandedControllers] = React11.useState(/* @__PURE__ */ new Set());
3522
- const toggleCollapse = React11.useCallback((controllerId) => {
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) => {
3523
4154
  setExpandedControllers((prev) => {
3524
4155
  const next = new Set(prev);
3525
4156
  if (next.has(controllerId)) next.delete(controllerId);
@@ -3527,17 +4158,17 @@ function GraphViewerCanvas(props) {
3527
4158
  return next;
3528
4159
  });
3529
4160
  }, []);
3530
- const [foldedControllers, setFoldedControllers] = React11.useState(/* @__PURE__ */ new Set());
3531
- const styleDefaultFoldsRef = React11.useRef(/* @__PURE__ */ new Set());
3532
- const readerOpenedRef = React11.useRef(/* @__PURE__ */ new Set());
3533
- const markReaderFolds = React11.useCallback((ids, folded) => {
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) => {
3534
4165
  for (const id of ids) {
3535
4166
  styleDefaultFoldsRef.current.delete(id);
3536
4167
  if (folded) readerOpenedRef.current.delete(id);
3537
4168
  else readerOpenedRef.current.add(id);
3538
4169
  }
3539
4170
  }, []);
3540
- const toggleFold = React11.useCallback(
4171
+ const toggleFold = React13.useCallback(
3541
4172
  (controllerId, options) => {
3542
4173
  setFoldedControllers((prev) => {
3543
4174
  const next = new Set(prev);
@@ -3555,45 +4186,53 @@ function GraphViewerCanvas(props) {
3555
4186
  [markReaderFolds]
3556
4187
  );
3557
4188
  const edgeType = config.edgeType || EDGE_TYPE.DEFAULT;
3558
- const layoutConfig = React11.useMemo(
4189
+ const layoutConfig = React13.useMemo(
3559
4190
  () => ({ nodesep: config.nodesep, ranksep: config.ranksep }),
3560
4191
  [config.nodesep, config.ranksep]
3561
4192
  );
3562
- const showControllersRef = React11.useRef(showControllers);
4193
+ const showControllersRef = React13.useRef(showControllers);
3563
4194
  showControllersRef.current = showControllers;
3564
- const directionRef = React11.useRef(direction);
4195
+ const directionRef = React13.useRef(direction);
3565
4196
  directionRef.current = direction;
3566
- const layoutConfigRef = React11.useRef(layoutConfig);
4197
+ const layoutConfigRef = React13.useRef(layoutConfig);
3567
4198
  layoutConfigRef.current = layoutConfig;
3568
- const initialZoomRef = React11.useRef(config.initialZoom);
4199
+ const initialZoomRef = React13.useRef(config.initialZoom);
3569
4200
  initialZoomRef.current = config.initialZoom;
3570
- const panToTopRef = React11.useRef(config.panToTop);
4201
+ const panToTopRef = React13.useRef(config.panToTop);
3571
4202
  panToTopRef.current = config.panToTop;
3572
- const interactiveRef = React11.useRef(interactive);
4203
+ const interactiveRef = React13.useRef(interactive);
3573
4204
  interactiveRef.current = interactive;
3574
- const expandedRef = React11.useRef(expandedControllers);
4205
+ const expandedRef = React13.useRef(expandedControllers);
3575
4206
  expandedRef.current = expandedControllers;
3576
- const toggleCollapseRef = React11.useRef(toggleCollapse);
4207
+ const toggleCollapseRef = React13.useRef(toggleCollapse);
3577
4208
  toggleCollapseRef.current = toggleCollapse;
3578
- const foldedRef = React11.useRef(foldedControllers);
4209
+ const foldedRef = React13.useRef(foldedControllers);
3579
4210
  foldedRef.current = foldedControllers;
3580
- const toggleFoldRef = React11.useRef(toggleFold);
4211
+ const toggleFoldRef = React13.useRef(toggleFold);
3581
4212
  toggleFoldRef.current = toggleFold;
3582
- const isFirstFoldEffect = React11.useRef(true);
3583
- const prevFoldSizeRef = React11.useRef(0);
3584
- const skipNextFoldEffectRef = React11.useRef(false);
3585
- const statusMapRef = React11.useRef(statusMap);
4213
+ const isFirstFoldEffect = React13.useRef(true);
4214
+ const prevFoldSizeRef = React13.useRef(0);
4215
+ const skipNextFoldEffectRef = React13.useRef(false);
4216
+ const statusMapRef = React13.useRef(statusMap);
3586
4217
  statusMapRef.current = statusMap;
3587
- const validationIssuesRef = React11.useRef(validationIssues);
4218
+ const validationIssuesRef = React13.useRef(validationIssues);
3588
4219
  validationIssuesRef.current = validationIssues;
3589
- const selectedNodeIdRef = React11.useRef(null);
3590
- selectedNodeIdRef.current = (_d = detailSelection == null ? void 0 : detailSelection.nodeId) != null ? _d : null;
3591
- const [validationOpen, setValidationOpen] = React11.useState(false);
3592
- const openValidationPanel = React11.useCallback(() => setValidationOpen(true), []);
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), []);
3593
4232
  const validationWidgetAvailable = validationState !== void 0 && !hideToolbar && interactive;
3594
- const validationWidgetAvailableRef = React11.useRef(validationWidgetAvailable);
4233
+ const validationWidgetAvailableRef = React13.useRef(validationWidgetAvailable);
3595
4234
  validationWidgetAvailableRef.current = validationWidgetAvailable;
3596
- const decorateNodes = React11.useCallback(
4235
+ const decorateNodes = React13.useCallback(
3597
4236
  (nodes2) => {
3598
4237
  var _a2, _b2, _c2;
3599
4238
  const raw = rawGraphDataRef.current;
@@ -3614,7 +4253,15 @@ function GraphViewerCanvas(props) {
3614
4253
  },
3615
4254
  [openValidationPanel]
3616
4255
  );
3617
- const frameLayout = React11.useCallback(
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(
3618
4265
  (style, layout, graphspec2, analysis) => GRAPH_STYLE_PIPELINES[style].frame({
3619
4266
  nodes: cloneCachedNodes(layout.nodes),
3620
4267
  edges: layout.edges,
@@ -3633,18 +4280,18 @@ function GraphViewerCanvas(props) {
3633
4280
  const data = initialDataRef.current;
3634
4281
  return cache !== null && data !== null && cache.graphspec === data._graphspec && cache.graphStyle === data._graphStyle;
3635
4282
  };
3636
- const nodesRef = React11.useRef([]);
4283
+ const nodesRef = React13.useRef([]);
3637
4284
  nodesRef.current = nodes;
3638
- const onValidationIssueClickRef = React11.useRef(onValidationIssueClick);
4285
+ const onValidationIssueClickRef = React13.useRef(onValidationIssueClick);
3639
4286
  onValidationIssueClickRef.current = onValidationIssueClick;
3640
- const flashTimeoutRef = React11.useRef(null);
3641
- React11.useEffect(
4287
+ const flashTimeoutRef = React13.useRef(null);
4288
+ React13.useEffect(
3642
4289
  () => () => {
3643
4290
  if (flashTimeoutRef.current) clearTimeout(flashTimeoutRef.current);
3644
4291
  },
3645
4292
  []
3646
4293
  );
3647
- const handleValidationIssueClick = React11.useCallback(
4294
+ const handleValidationIssueClick = React13.useCallback(
3648
4295
  (index, issue) => {
3649
4296
  var _a2, _b2, _c2;
3650
4297
  (_a2 = onValidationIssueClickRef.current) == null ? void 0 : _a2.call(onValidationIssueClickRef, index, issue);
@@ -3687,8 +4334,8 @@ function GraphViewerCanvas(props) {
3687
4334
  },
3688
4335
  [setNodes]
3689
4336
  );
3690
- const drawnSpecRef = React11.useRef(null);
3691
- const reportLayoutFailure = React11.useCallback(
4337
+ const drawnSpecRef = React13.useRef(null);
4338
+ const reportLayoutFailure = React13.useCallback(
3692
4339
  (error, spec, stale) => {
3693
4340
  console.error("[GraphViewer] ELK layout failed:", error);
3694
4341
  const route = routeLayoutFailure({ stale, specDrawn: drawnSpecRef.current === spec });
@@ -3701,7 +4348,7 @@ function GraphViewerCanvas(props) {
3701
4348
  },
3702
4349
  []
3703
4350
  );
3704
- React11.useEffect(() => {
4351
+ React13.useEffect(() => {
3705
4352
  const data = initialDataRef.current;
3706
4353
  if (!data) return;
3707
4354
  let cancelled = false;
@@ -3732,7 +4379,7 @@ function GraphViewerCanvas(props) {
3732
4379
  data._analysis
3733
4380
  );
3734
4381
  setNodes(decorateNodes(withControllers.nodes));
3735
- setEdges(toAppEdges(withControllers.edges));
4382
+ setEdges(decorateEdges(withControllers.edges));
3736
4383
  drawnSpecRef.current = data._graphspec;
3737
4384
  setLayoutFailure(null);
3738
4385
  setTimeout(() => {
@@ -3748,15 +4395,22 @@ function GraphViewerCanvas(props) {
3748
4395
  cancelled = true;
3749
4396
  };
3750
4397
  }, [direction, layoutConfig]);
3751
- React11.useEffect(() => {
4398
+ React13.useEffect(() => {
3752
4399
  const cache = layoutCacheRef.current;
3753
4400
  const data = initialDataRef.current;
3754
4401
  if (!cache || !data || !cacheMatchesData()) return;
3755
4402
  const withControllers = frameLayout(cache.graphStyle, cache, data._graphspec, data._analysis);
3756
4403
  setNodes(decorateNodes(withControllers.nodes));
3757
- setEdges(toAppEdges(withControllers.edges));
3758
- }, [showControllers, expandedControllers, toggleCollapse, toggleFold, decorateNodes]);
3759
- React11.useEffect(() => {
4404
+ setEdges(decorateEdges(withControllers.edges));
4405
+ }, [
4406
+ showControllers,
4407
+ expandedControllers,
4408
+ toggleCollapse,
4409
+ toggleFold,
4410
+ decorateNodes,
4411
+ decorateEdges
4412
+ ]);
4413
+ React13.useEffect(() => {
3760
4414
  var _a2;
3761
4415
  if (!graphspec) {
3762
4416
  initialDataRef.current = null;
@@ -3821,13 +4475,13 @@ function GraphViewerCanvas(props) {
3821
4475
  analysis: folded.analysis,
3822
4476
  rawAnalysis: analysis
3823
4477
  });
3824
- initialDataRef.current = __spreadValues({
4478
+ initialDataRef.current = __spreadValues(__spreadValues(__spreadValues({
3825
4479
  nodes: projected.nodes,
3826
4480
  edges: projected.edges,
3827
4481
  _analysis: projected.analysis,
3828
4482
  _graphspec: graphspec,
3829
4483
  _graphStyle: style
3830
- }, projected.standIns ? { _standIns: projected.standIns } : {});
4484
+ }, projected.standIns ? { _standIns: projected.standIns } : {}), projected.valueFlows ? { _valueFlows: projected.valueFlows } : {}), projected.runs ? { _runs: projected.runs } : {});
3831
4485
  void (async () => {
3832
4486
  var _a3;
3833
4487
  try {
@@ -3858,7 +4512,7 @@ function GraphViewerCanvas(props) {
3858
4512
  };
3859
4513
  const withControllers = frameLayout(style, layouted, graphspec, projected.analysis);
3860
4514
  setNodes(decorateNodes(withControllers.nodes));
3861
- setEdges(toAppEdges(withControllers.edges));
4515
+ setEdges(decorateEdges(withControllers.edges));
3862
4516
  drawnSpecRef.current = graphspec;
3863
4517
  setLayoutFailure(null);
3864
4518
  setTimeout(() => {
@@ -3881,7 +4535,7 @@ function GraphViewerCanvas(props) {
3881
4535
  cancelled = true;
3882
4536
  };
3883
4537
  }, [graphspec, edgeType, graphStyle]);
3884
- React11.useEffect(() => {
4538
+ React13.useEffect(() => {
3885
4539
  if (isFirstFoldEffect.current) {
3886
4540
  isFirstFoldEffect.current = false;
3887
4541
  prevFoldSizeRef.current = foldedControllers.size;
@@ -3917,13 +4571,13 @@ function GraphViewerCanvas(props) {
3917
4571
  analysis: folded.analysis,
3918
4572
  rawAnalysis: currentAnalysis
3919
4573
  });
3920
- initialDataRef.current = __spreadValues({
4574
+ initialDataRef.current = __spreadValues(__spreadValues(__spreadValues({
3921
4575
  nodes: projected.nodes,
3922
4576
  edges: projected.edges,
3923
4577
  _analysis: projected.analysis,
3924
4578
  _graphspec: currentGraphspec,
3925
4579
  _graphStyle: style
3926
- }, projected.standIns ? { _standIns: projected.standIns } : {});
4580
+ }, projected.standIns ? { _standIns: projected.standIns } : {}), projected.valueFlows ? { _valueFlows: projected.valueFlows } : {}), projected.runs ? { _runs: projected.runs } : {});
3927
4581
  void (async () => {
3928
4582
  var _a2;
3929
4583
  try {
@@ -3945,7 +4599,7 @@ function GraphViewerCanvas(props) {
3945
4599
  };
3946
4600
  const withControllers = frameLayout(style, layouted, currentGraphspec, projected.analysis);
3947
4601
  setNodes(decorateNodes(withControllers.nodes));
3948
- setEdges(toAppEdges(withControllers.edges));
4602
+ setEdges(decorateEdges(withControllers.edges));
3949
4603
  drawnSpecRef.current = currentGraphspec;
3950
4604
  setLayoutFailure(null);
3951
4605
  setTimeout(() => {
@@ -3961,22 +4615,22 @@ function GraphViewerCanvas(props) {
3961
4615
  cancelled = true;
3962
4616
  };
3963
4617
  }, [foldedControllers, toggleFold]);
3964
- React11.useEffect(() => {
4618
+ React13.useEffect(() => {
3965
4619
  const cache = layoutCacheRef.current;
3966
4620
  const data = initialDataRef.current;
3967
4621
  if (!cache || !data || !cacheMatchesData()) return;
3968
4622
  const withControllers = frameLayout(cache.graphStyle, cache, data._graphspec, data._analysis);
3969
4623
  setNodes(decorateNodes(withControllers.nodes));
3970
- setEdges(toAppEdges(withControllers.edges));
3971
- }, [statusMap, decorateNodes]);
3972
- React11.useEffect(() => {
4624
+ setEdges(decorateEdges(withControllers.edges));
4625
+ }, [statusMap, decorateNodes, decorateEdges]);
4626
+ React13.useEffect(() => {
3973
4627
  const cache = layoutCacheRef.current;
3974
4628
  const data = initialDataRef.current;
3975
4629
  if (!cache || !data || !cacheMatchesData()) return;
3976
4630
  const withControllers = frameLayout(cache.graphStyle, cache, data._graphspec, data._analysis);
3977
4631
  setNodes(decorateNodes(withControllers.nodes));
3978
4632
  }, [validationIssues, validationWidgetAvailable, decorateNodes]);
3979
- const onNodeClick = React11.useCallback(
4633
+ const onNodeClick = React13.useCallback(
3980
4634
  (event, node) => {
3981
4635
  const nodeData = node.data;
3982
4636
  onNodeSelect == null ? void 0 : onNodeSelect(node.id, nodeData, event);
@@ -3990,7 +4644,7 @@ function GraphViewerCanvas(props) {
3990
4644
  if (found) onStuffNodeClick(found.item);
3991
4645
  }
3992
4646
  setConceptOverride(null);
3993
- if ((detailSelection == null ? void 0 : detailSelection.nodeId) === node.id && !conceptOverride) {
4647
+ if (selectedNodeId(detailSelection) === node.id && !conceptOverride) {
3994
4648
  setDetailSelection(null);
3995
4649
  } else if (nodeData.isPipe || nodeData.isController) {
3996
4650
  setDetailSelection({ kind: "pipe", nodeId: node.id, nodeData });
@@ -4006,9 +4660,11 @@ function GraphViewerCanvas(props) {
4006
4660
  });
4007
4661
  }
4008
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);
4009
4664
  },
4010
4665
  [
4011
4666
  setNodes,
4667
+ setEdges,
4012
4668
  onNavigateToPipe,
4013
4669
  onNodeSelect,
4014
4670
  onStuffNodeClick,
@@ -4017,7 +4673,35 @@ function GraphViewerCanvas(props) {
4017
4673
  conceptOverride
4018
4674
  ]
4019
4675
  );
4020
- const onInit = React11.useCallback(
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(
4021
4705
  (reactFlowInstance) => {
4022
4706
  reactFlowRef.current = reactFlowInstance;
4023
4707
  if (onReactFlowInit) {
@@ -4026,8 +4710,8 @@ function GraphViewerCanvas(props) {
4026
4710
  },
4027
4711
  [onReactFlowInit]
4028
4712
  );
4029
- const prevInteractiveRef = React11.useRef(interactive);
4030
- React11.useEffect(() => {
4713
+ const prevInteractiveRef = React13.useRef(interactive);
4714
+ React13.useEffect(() => {
4031
4715
  if (prevInteractiveRef.current === interactive) return;
4032
4716
  prevInteractiveRef.current = interactive;
4033
4717
  if (!interactive) {
@@ -4042,12 +4726,13 @@ function GraphViewerCanvas(props) {
4042
4726
  }, 50);
4043
4727
  return () => clearTimeout(timer);
4044
4728
  }, [interactive]);
4045
- const handlePaneClick = React11.useCallback(() => {
4729
+ const handlePaneClick = React13.useCallback(() => {
4046
4730
  setDetailSelection(null);
4047
4731
  setConceptOverride(null);
4732
+ setEdges((eds) => eds.some((e) => e.selected) ? eds.map(deselect) : eds);
4048
4733
  onPaneClick == null ? void 0 : onPaneClick();
4049
- }, [onPaneClick]);
4050
- const handleConceptClick = React11.useCallback(
4734
+ }, [onPaneClick, setEdges]);
4735
+ const handleConceptClick = React13.useCallback(
4051
4736
  (conceptCode) => {
4052
4737
  if (!graphspec) return;
4053
4738
  const info = resolveConceptRef(graphspec, conceptCode);
@@ -4055,16 +4740,33 @@ function GraphViewerCanvas(props) {
4055
4740
  },
4056
4741
  [graphspec]
4057
4742
  );
4058
- const selectedSpecNode = (detailSelection == null ? void 0 : detailSelection.kind) === "pipe" && graphspec ? graphspec.nodes.find((n) => n.id === detailSelection.nodeId) : void 0;
4059
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
+ );
4060
4762
  const effectiveToolbarPosition = resolveToolbarPosition(
4061
4763
  toolbarPositionProp,
4062
4764
  config.toolbarPosition
4063
4765
  );
4064
- const rawAnalysis = (_e = rawGraphDataRef.current) == null ? void 0 : _e.analysis;
4766
+ const rawAnalysis = (_d = rawGraphDataRef.current) == null ? void 0 : _d.analysis;
4065
4767
  const allControllerIds = rawAnalysis == null ? void 0 : rawAnalysis.controllerNodeIds;
4066
4768
  const foldControlsAvailable = styleCapabilities.foldAll && (!styleCapabilities.controllerFrameToggle || showControllers);
4067
- const foldAllProps = React11.useMemo(() => {
4769
+ const foldAllProps = React13.useMemo(() => {
4068
4770
  if (!foldControlsAvailable || !allControllerIds || allControllerIds.size === 0) {
4069
4771
  return {
4070
4772
  onFoldAll: void 0,
@@ -4086,23 +4788,24 @@ function GraphViewerCanvas(props) {
4086
4788
  expandAllDisabled: foldedControllers.size === 0
4087
4789
  };
4088
4790
  }, [foldControlsAvailable, allControllerIds, foldedControllers, markReaderFolds]);
4089
- const styleMenuOptions = React11.useMemo(() => resolveStyleMenu(styleMenu), [styleMenu]);
4090
- React11.useEffect(() => {
4791
+ const styleMenuOptions = React13.useMemo(() => resolveStyleMenu(styleMenu), [styleMenu]);
4792
+ React13.useEffect(() => {
4091
4793
  if (failed) reactFlowRef.current = null;
4092
4794
  }, [failed]);
4093
- return /* @__PURE__ */ jsx30(
4795
+ return /* @__PURE__ */ jsx33(
4094
4796
  "div",
4095
4797
  {
4096
4798
  ref: containerRef,
4097
4799
  className: containerClassName(resolvedTheme, mode, {
4098
4800
  interactive,
4099
4801
  failed,
4100
- relayoutFailed: canvasFailure.overFlow !== null
4802
+ relayoutFailed: canvasFailure.overFlow !== null,
4803
+ valueArrows: styleCapabilities.valueArrows
4101
4804
  }),
4102
4805
  style: interactive || failed ? void 0 : { height: stillHeight },
4103
4806
  inert: !interactive && !failed,
4104
- children: canvasFailure.inPlace !== null ? /* @__PURE__ */ jsx30(GraphErrorState, { failure: canvasFailure.inPlace }) : /* @__PURE__ */ jsxs28(Fragment16, { children: [
4105
- /* @__PURE__ */ jsxs28(
4807
+ children: canvasFailure.inPlace !== null ? /* @__PURE__ */ jsx33(GraphErrorState, { failure: canvasFailure.inPlace }) : /* @__PURE__ */ jsxs30(Fragment19, { children: [
4808
+ /* @__PURE__ */ jsxs30(
4106
4809
  ReactFlow,
4107
4810
  __spreadProps(__spreadValues({
4108
4811
  nodes,
@@ -4112,6 +4815,7 @@ function GraphViewerCanvas(props) {
4112
4815
  onNodesChange,
4113
4816
  onEdgesChange,
4114
4817
  onNodeClick: interactive ? onNodeClick : void 0,
4818
+ onEdgeClick: interactive && styleCapabilities.valueArrows ? onEdgeClick : void 0,
4115
4819
  onPaneClick: interactive ? handlePaneClick : void 0,
4116
4820
  onInit,
4117
4821
  fitView: interactive,
@@ -4123,7 +4827,7 @@ function GraphViewerCanvas(props) {
4123
4827
  panActivationKeyCode: null
4124
4828
  }, interactive ? {} : STILL_FLOW_PROPS), {
4125
4829
  children: [
4126
- interactive ? /* @__PURE__ */ jsx30(
4830
+ interactive ? /* @__PURE__ */ jsx33(
4127
4831
  Background,
4128
4832
  {
4129
4833
  variant: BackgroundVariant.Dots,
@@ -4131,10 +4835,10 @@ function GraphViewerCanvas(props) {
4131
4835
  size: 1,
4132
4836
  color: "var(--color-bg-dots)"
4133
4837
  }
4134
- ) : /* @__PURE__ */ jsx30(StillFit, { onHeight: setStillHeight }),
4838
+ ) : /* @__PURE__ */ jsx33(StillFit, { onHeight: setStillHeight }),
4135
4839
  canvasFailure.overFlow !== null && // Inside the flow, beneath the toolbar: the toolbar stays on top
4136
4840
  // and usable, so the reader can change the view back.
4137
- /* @__PURE__ */ jsx30(
4841
+ /* @__PURE__ */ jsx33(
4138
4842
  GraphRelayoutFailure,
4139
4843
  {
4140
4844
  failure: canvasFailure.overFlow,
@@ -4142,7 +4846,7 @@ function GraphViewerCanvas(props) {
4142
4846
  rightOffset: detailOpen ? panelWidth : 0
4143
4847
  }
4144
4848
  ),
4145
- interactive && !hideToolbar && /* @__PURE__ */ jsx30(
4849
+ interactive && !hideToolbar && /* @__PURE__ */ jsx33(
4146
4850
  GraphToolbar,
4147
4851
  {
4148
4852
  direction,
@@ -4182,7 +4886,7 @@ function GraphViewerCanvas(props) {
4182
4886
  ]
4183
4887
  })
4184
4888
  ),
4185
- interactive && /* @__PURE__ */ jsxs28(
4889
+ interactive && /* @__PURE__ */ jsxs30(
4186
4890
  DetailPanel,
4187
4891
  {
4188
4892
  isOpen: detailOpen,
@@ -4191,31 +4895,21 @@ function GraphViewerCanvas(props) {
4191
4895
  isDragging: isPanelDragging,
4192
4896
  onResizeHandleMouseDown: onResizeMouseDown,
4193
4897
  children: [
4194
- conceptOverride ? /* @__PURE__ */ jsx30(ConceptDetailPanel, { concept: conceptOverride }) : selectedSpecNode && graphspec ? /* @__PURE__ */ jsx30(
4195
- PipeDetailPanel,
4898
+ conceptOverride ? /* @__PURE__ */ jsx33(ConceptDetailPanel, { concept: conceptOverride }) : detailSelection ? /* @__PURE__ */ jsx33(
4899
+ StylePanel,
4196
4900
  {
4197
- node: selectedSpecNode,
4198
- spec: graphspec,
4199
- onConceptClick: handleConceptClick
4200
- }
4201
- ) : (detailSelection == null ? void 0 : detailSelection.stuffData) ? /* @__PURE__ */ jsx30(
4202
- StuffNodeDetail,
4203
- {
4204
- nodeId: detailSelection.nodeId,
4205
- stuffData: detailSelection.stuffData,
4206
- producerPipeRef: detailSelection.producerPipeRef,
4207
- consumer: detailSelection.consumer,
4901
+ selection: detailSelection,
4208
4902
  graphspec,
4209
- theme: resolvedTheme,
4210
4903
  artifacts: graph,
4211
- resolveUrl,
4212
- resolveRendition,
4213
- resolveShareUrl,
4214
- saveFiles,
4215
- downloads
4904
+ theme: resolvedTheme,
4905
+ valueOptions,
4906
+ nodes,
4907
+ drawing,
4908
+ onConceptClick: handleConceptClick,
4909
+ onOpenNode: onOpenNodeFromPanel
4216
4910
  }
4217
4911
  ) : null,
4218
- renderDetailExtra && detailSelection && !conceptOverride && renderDetailExtra(detailSelection.nodeId, detailSelection.nodeData)
4912
+ renderDetailExtra && detailSelection && detailSelection.kind !== "arrow" && !conceptOverride && renderDetailExtra(detailSelection.nodeId, detailSelection.nodeData)
4219
4913
  ]
4220
4914
  }
4221
4915
  )