@pipelex/mthds-ui 0.53.0 → 0.53.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,7 +85,7 @@ import "./styles/simple/SimpleStyle.css";
85
85
  import "./styles/simple/SimpleDetailPanel.css";
86
86
 
87
87
  // src/graph/react/viewer/GraphViewer.tsx
88
- import React13 from "react";
88
+ import React14 from "react";
89
89
  import {
90
90
  ReactFlow,
91
91
  useNodesState,
@@ -341,10 +341,10 @@ function extractType(schema) {
341
341
  }
342
342
 
343
343
  // src/graph/react/viewer/styleDetailPanels.tsx
344
- import React8 from "react";
344
+ import React9 from "react";
345
345
 
346
346
  // src/graph/react/detail/StuffResultPanel.tsx
347
- import * as React4 from "react";
347
+ import * as React5 from "react";
348
348
  import {
349
349
  buildResultField,
350
350
  getPipeInputForm,
@@ -355,9 +355,90 @@ import {
355
355
  JsonView,
356
356
  ResultEnvProvider,
357
357
  StuffViewer,
358
- useFieldStrings
358
+ useFieldStrings,
359
+ useLoadText
359
360
  } from "@pipelex/mthds-form/react";
360
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
361
+
362
+ // src/graph/react/detail/nestedStoredTexts.ts
363
+ import * as React4 from "react";
364
+ import {
365
+ loadStoredValues,
366
+ readStoredReference
367
+ } from "@pipelex/mthds-form";
368
+ function holdsStoredTexts(field, value) {
369
+ if (readStoredReference(field, value)) return true;
370
+ if (field.kind === "list" && Array.isArray(value)) {
371
+ return value.some((item) => holdsStoredTexts(field.item, item));
372
+ }
373
+ if (field.kind === "list" && field.contentKey !== void 0 && isRecord(value)) {
374
+ const items = Object.hasOwn(value, field.contentKey) ? value[field.contentKey] : void 0;
375
+ return Array.isArray(items) && holdsStoredTexts(field, items);
376
+ }
377
+ if (field.kind === "object" && isRecord(value)) {
378
+ return field.fields.some(
379
+ (member) => Object.hasOwn(value, member.name) && holdsStoredTexts(member, value[member.name])
380
+ );
381
+ }
382
+ return false;
383
+ }
384
+ async function loadNestedStoredTexts(field, value, load) {
385
+ if (value === null || value === void 0) return value;
386
+ let read = false;
387
+ const loaded = await loadStoredValues(
388
+ field,
389
+ value,
390
+ (url) => load(url).then((text) => {
391
+ read = true;
392
+ return text;
393
+ })
394
+ );
395
+ return read ? loaded.value : value;
396
+ }
397
+ function settledFor(settled, key, value) {
398
+ return settled !== null && settled.key === key && (settled.value === value || sameJsonValue(settled.value, value));
399
+ }
400
+ function useNestedStoredTexts(field, key, value, load) {
401
+ const [settled, setSettled] = React4.useState(null);
402
+ const loadRef = React4.useRef(load);
403
+ loadRef.current = load;
404
+ const canLoad = load !== void 0;
405
+ const holds = React4.useMemo(
406
+ () => field !== null && value !== null && value !== void 0 && holdsStoredTexts(field, value),
407
+ [field, value]
408
+ );
409
+ const loads = canLoad && holds;
410
+ React4.useEffect(() => {
411
+ if (!loads || !field) return;
412
+ let live = true;
413
+ const latest = (url) => {
414
+ const current = loadRef.current;
415
+ return current ? current(url) : Promise.reject(new Error("No loader."));
416
+ };
417
+ void loadNestedStoredTexts(field, value, latest).then((shown) => {
418
+ if (live) setSettled({ key, value, shown });
419
+ });
420
+ return () => {
421
+ live = false;
422
+ };
423
+ }, [loads, field, key, value]);
424
+ if (!loads) return { value, loading: false };
425
+ return settledFor(settled, key, value) ? { value: settled.shown, loading: false } : { value, loading: true };
426
+ }
427
+ function isRecord(value) {
428
+ return typeof value === "object" && value !== null && !Array.isArray(value);
429
+ }
430
+ function sameJsonValue(a, b) {
431
+ if (a === b) return true;
432
+ if (Array.isArray(a)) {
433
+ return Array.isArray(b) && a.length === b.length && a.every((item, i) => sameJsonValue(item, b[i]));
434
+ }
435
+ if (!isRecord(a) || !isRecord(b)) return false;
436
+ const keys = Object.keys(a);
437
+ return keys.length === Object.keys(b).length && keys.every((name) => Object.hasOwn(b, name) && sameJsonValue(a[name], b[name]));
438
+ }
439
+
440
+ // src/graph/react/detail/StuffResultPanel.tsx
441
+ import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
361
442
  function StuffResultPanel({
362
443
  pipeIoContracts,
363
444
  outputForm,
@@ -373,15 +454,29 @@ function StuffResultPanel({
373
454
  saveFiles,
374
455
  downloads
375
456
  }) {
376
- const field = React4.useMemo(
457
+ var _a;
458
+ const consumerPipeRef = consumer == null ? void 0 : consumer.pipeRef;
459
+ const consumerSlot = consumer == null ? void 0 : consumer.slotName;
460
+ const field = React5.useMemo(
377
461
  () => {
378
- var _a;
379
- return (_a = fromProducer(pipeIoContracts, outputForm, producerPipeRef)) != null ? _a : fromConsumer(pipeIoContracts, inputForm, consumer);
462
+ var _a2;
463
+ return (_a2 = fromProducer(pipeIoContracts, outputForm, producerPipeRef)) != null ? _a2 : fromConsumer(
464
+ pipeIoContracts,
465
+ inputForm,
466
+ consumerPipeRef !== void 0 && consumerSlot !== void 0 ? { pipeRef: consumerPipeRef, slotName: consumerSlot } : void 0
467
+ );
380
468
  },
381
- [pipeIoContracts, outputForm, inputForm, producerPipeRef, consumer]
469
+ [pipeIoContracts, outputForm, inputForm, producerPipeRef, consumerPipeRef, consumerSlot]
382
470
  );
471
+ const nodeKey = [
472
+ (_a = stuff.digest) != null ? _a : "",
473
+ stuff.name,
474
+ producerPipeRef != null ? producerPipeRef : "",
475
+ consumerPipeRef != null ? consumerPipeRef : "",
476
+ consumerSlot != null ? consumerSlot : ""
477
+ ].join("\0");
383
478
  if (field) {
384
- const panel = /* @__PURE__ */ jsx3(StuffViewer, { field, value: stuff.data, name: stuff.name });
479
+ const panel = /* @__PURE__ */ jsx3(LoadedStuffViewer, { field, nodeKey, value: stuff.data, name: stuff.name });
385
480
  return resolveUrl || loadText || resolveRendition || resolveDocumentPdf || resolveShareUrl || saveFiles || downloads ? /* @__PURE__ */ jsx3(
386
481
  ResultEnvProvider,
387
482
  {
@@ -398,6 +493,19 @@ function StuffResultPanel({
398
493
  }
399
494
  return stuff.data === void 0 || stuff.data === null ? null : /* @__PURE__ */ jsx3(UndescribedValue, { value: stuff.data });
400
495
  }
496
+ function LoadedStuffViewer({
497
+ field,
498
+ nodeKey,
499
+ value,
500
+ name
501
+ }) {
502
+ const s = useFieldStrings();
503
+ const shown = useNestedStoredTexts(field, nodeKey, value, useLoadText());
504
+ return /* @__PURE__ */ jsxs3(Fragment2, { children: [
505
+ shown.loading && /* @__PURE__ */ jsx3("p", { role: "status", className: "detail-stored-texts-loading", children: s.storedTextLoading(void 0) }),
506
+ /* @__PURE__ */ jsx3(StuffViewer, { field, value: shown.value, name })
507
+ ] });
508
+ }
401
509
  function UndescribedValue({ value }) {
402
510
  const s = useFieldStrings();
403
511
  return /* @__PURE__ */ jsxs3("div", { className: "space-y-2", children: [
@@ -431,10 +539,10 @@ function fromConsumer(contracts, inputForm, consumer) {
431
539
  }
432
540
 
433
541
  // src/graph/react/detail/PipeDetailPanel.tsx
434
- import React6 from "react";
542
+ import React7 from "react";
435
543
 
436
544
  // src/graph/react/detail/sections/shared.tsx
437
- import { useState } from "react";
545
+ import { useState as useState2 } from "react";
438
546
  import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
439
547
  function formatDuration(seconds) {
440
548
  if (seconds < 1) return `${(seconds * 1e3).toFixed(0)}ms`;
@@ -480,9 +588,9 @@ function PromptToggle({
480
588
  templateText,
481
589
  renderedText
482
590
  }) {
483
- const [showTemplate, setShowTemplate] = useState(false);
484
- const [copied, setCopied] = useState(false);
485
- const [expanded, setExpanded] = useState(false);
591
+ const [showTemplate, setShowTemplate] = useState2(false);
592
+ const [copied, setCopied] = useState2(false);
593
+ const [expanded, setExpanded] = useState2(false);
486
594
  const hasTemplate = !!templateText;
487
595
  const hasRendered = !!renderedText;
488
596
  if (!hasTemplate && !hasRendered) return null;
@@ -766,7 +874,7 @@ function UsageDetails({
766
874
  }
767
875
 
768
876
  // src/graph/react/detail/sections/PipeLLMDetail.tsx
769
- import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
877
+ import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
770
878
  function PipeLLMSection({
771
879
  blueprint,
772
880
  executionData,
@@ -790,7 +898,7 @@ function PipeLLMSection({
790
898
  const hasDistinctObjectRequest = Boolean(
791
899
  authoredModelForObject && authoredModelForObject !== authoredModel
792
900
  );
793
- return /* @__PURE__ */ jsxs6(Fragment2, { children: [
901
+ return /* @__PURE__ */ jsxs6(Fragment3, { children: [
794
902
  /* @__PURE__ */ jsx6(ModelRows, { modelsRan, authored: authoredModel, handle: resolvedModel }),
795
903
  hasDistinctObjectRequest && /* @__PURE__ */ jsx6(
796
904
  ModelRows,
@@ -846,7 +954,7 @@ function PipeLLMSection({
846
954
  }
847
955
 
848
956
  // src/graph/react/detail/sections/PipeImgGenDetail.tsx
849
- import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
957
+ import { Fragment as Fragment4, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
850
958
  function PipeImgGenSection({
851
959
  blueprint,
852
960
  executionData,
@@ -858,7 +966,7 @@ function PipeImgGenSection({
858
966
  const resolvedModel = modelHandles == null ? void 0 : modelHandles.resolved_model;
859
967
  const renderedPrompt = executionData == null ? void 0 : executionData.rendered_prompt;
860
968
  const renderedNegative = executionData == null ? void 0 : executionData.rendered_negative_prompt;
861
- return /* @__PURE__ */ jsxs7(Fragment3, { children: [
969
+ return /* @__PURE__ */ jsxs7(Fragment4, { children: [
862
970
  /* @__PURE__ */ jsx7(ModelRows, { modelsRan, authored: blueprint.img_gen_choice, handle: resolvedModel }),
863
971
  /* @__PURE__ */ jsx7(
864
972
  PromptToggle,
@@ -892,14 +1000,14 @@ function PipeImgGenSection({
892
1000
  }
893
1001
 
894
1002
  // src/graph/react/detail/sections/PipeExtractDetail.tsx
895
- import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
1003
+ import { Fragment as Fragment5, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
896
1004
  function PipeExtractSection({
897
1005
  blueprint,
898
1006
  modelsRan,
899
1007
  modelHandles
900
1008
  }) {
901
1009
  const resolvedModel = modelHandles == null ? void 0 : modelHandles.resolved_model;
902
- return /* @__PURE__ */ jsxs8(Fragment4, { children: [
1010
+ return /* @__PURE__ */ jsxs8(Fragment5, { children: [
903
1011
  /* @__PURE__ */ jsx8(ModelRows, { modelsRan, authored: blueprint.extract_choice, handle: resolvedModel }),
904
1012
  /* @__PURE__ */ jsx8(KV, { label: "Document Variable", value: blueprint.document_stuff_name }),
905
1013
  /* @__PURE__ */ jsx8(KV, { label: "Caption Images", value: blueprint.should_caption_images }),
@@ -913,7 +1021,7 @@ function PipeExtractSection({
913
1021
  }
914
1022
 
915
1023
  // src/graph/react/detail/sections/PipeSearchDetail.tsx
916
- import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
1024
+ import { Fragment as Fragment6, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
917
1025
  function PipeSearchSection({
918
1026
  blueprint,
919
1027
  executionData,
@@ -922,7 +1030,7 @@ function PipeSearchSection({
922
1030
  }) {
923
1031
  const resolvedModel = modelHandles == null ? void 0 : modelHandles.resolved_model;
924
1032
  const renderedQuery = executionData == null ? void 0 : executionData.rendered_query;
925
- return /* @__PURE__ */ jsxs9(Fragment5, { children: [
1033
+ return /* @__PURE__ */ jsxs9(Fragment6, { children: [
926
1034
  /* @__PURE__ */ jsx9(ModelRows, { modelsRan, authored: blueprint.search_choice, handle: resolvedModel }),
927
1035
  /* @__PURE__ */ jsx9(
928
1036
  PromptToggle,
@@ -961,7 +1069,7 @@ function labelFromLlmChoice(choice) {
961
1069
  }
962
1070
 
963
1071
  // src/graph/react/detail/sections/PipeStructureDetail.tsx
964
- import { Fragment as Fragment6, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
1072
+ import { Fragment as Fragment7, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
965
1073
  function PipeStructureSection({
966
1074
  blueprint,
967
1075
  executionData,
@@ -972,7 +1080,7 @@ function PipeStructureSection({
972
1080
  const isMultipleOutput = executionData == null ? void 0 : executionData.is_multiple_output;
973
1081
  const renderedUser = executionData == null ? void 0 : executionData.rendered_user_prompt;
974
1082
  const authoredModel = labelFromLlmChoice(blueprint.llm_choice);
975
- return /* @__PURE__ */ jsxs10(Fragment6, { children: [
1083
+ return /* @__PURE__ */ jsxs10(Fragment7, { children: [
976
1084
  /* @__PURE__ */ jsx10(ModelRows, { modelsRan, authored: authoredModel, handle: resolvedModel }),
977
1085
  /* @__PURE__ */ jsx10(KV, { label: "Text Variable", value: blueprint.text_input_name }),
978
1086
  /* @__PURE__ */ jsx10(KV, { label: "Multiple Output", value: isMultipleOutput }),
@@ -982,7 +1090,7 @@ function PipeStructureSection({
982
1090
  }
983
1091
 
984
1092
  // src/graph/react/detail/sections/PipeComposeDetail.tsx
985
- import { Fragment as Fragment7, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
1093
+ import { Fragment as Fragment8, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
986
1094
  function formatLeafField(field) {
987
1095
  var _a, _b;
988
1096
  switch (field.method) {
@@ -1026,7 +1134,7 @@ function ConstructFieldsBlock({
1026
1134
  }
1027
1135
  }
1028
1136
  const indentStyle = depth > 0 ? { paddingLeft: depth * 12 } : void 0;
1029
- return /* @__PURE__ */ jsxs11(Fragment7, { children: [
1137
+ return /* @__PURE__ */ jsxs11(Fragment8, { children: [
1030
1138
  leafFields.map(([name, field]) => {
1031
1139
  const display = formatLeafField(field);
1032
1140
  if (isLongValue(display)) {
@@ -1087,7 +1195,7 @@ function PipeComposeSection({
1087
1195
  const fieldResolutions = (_a = executionData == null ? void 0 : executionData.fields) != null ? _a : null;
1088
1196
  const constructBlueprint = blueprint.construct_blueprint;
1089
1197
  const hasConstruct = constructBlueprint != null && Object.keys(constructBlueprint.fields).length > 0;
1090
- return /* @__PURE__ */ jsxs11(Fragment7, { children: [
1198
+ return /* @__PURE__ */ jsxs11(Fragment8, { children: [
1091
1199
  /* @__PURE__ */ jsx11(KV, { label: "Mode", value: composeMode || (hasConstruct ? "construct" : "template") }),
1092
1200
  /* @__PURE__ */ jsx11(KV, { label: "Category", value: blueprint.category }),
1093
1201
  /* @__PURE__ */ jsx11(KV, { label: "Templating Style", value: blueprint.templating_style }),
@@ -1099,7 +1207,7 @@ function PipeComposeSection({
1099
1207
  renderedText
1100
1208
  }
1101
1209
  ),
1102
- hasConstruct && /* @__PURE__ */ jsxs11(Fragment7, { children: [
1210
+ hasConstruct && /* @__PURE__ */ jsxs11(Fragment8, { children: [
1103
1211
  /* @__PURE__ */ jsx11("div", { className: "detail-section-label", children: "FIELDS" }),
1104
1212
  /* @__PURE__ */ jsx11(
1105
1213
  ConstructFieldsBlock,
@@ -1114,7 +1222,7 @@ function PipeComposeSection({
1114
1222
  }
1115
1223
 
1116
1224
  // src/graph/react/detail/sections/PipeDocGenDetail.tsx
1117
- import { Fragment as Fragment8, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
1225
+ import { Fragment as Fragment9, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
1118
1226
  var DOC_GEN_SOURCE_LABELS = {
1119
1227
  layout: "auto-layout",
1120
1228
  html: "HTML template",
@@ -1141,7 +1249,7 @@ function PipeDocGenSection({
1141
1249
  const hasEngine = !!authoredEngine || !!resolvedEngine || ((_a = modelsRan == null ? void 0 : modelsRan.length) != null ? _a : 0) > 0;
1142
1250
  const source = (_b = nonEmpty(modelHandles == null ? void 0 : modelHandles.source)) != null ? _b : declaredSource(blueprint);
1143
1251
  const renderedFilename = nonEmpty(executionData == null ? void 0 : executionData.filename);
1144
- return /* @__PURE__ */ jsxs12(Fragment8, { children: [
1252
+ return /* @__PURE__ */ jsxs12(Fragment9, { children: [
1145
1253
  /* @__PURE__ */ jsx12(KV, { label: "Format", value: format == null ? void 0 : format.toUpperCase() }),
1146
1254
  hasEngine ? /* @__PURE__ */ jsx12(
1147
1255
  ModelRows,
@@ -1161,14 +1269,14 @@ function PipeDocGenSection({
1161
1269
  }
1162
1270
 
1163
1271
  // src/graph/react/detail/sections/PipeConditionDetail.tsx
1164
- import { Fragment as Fragment9, jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
1272
+ import { Fragment as Fragment10, jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
1165
1273
  function PipeConditionSection({
1166
1274
  blueprint,
1167
1275
  executionData
1168
1276
  }) {
1169
1277
  const evaluatedExpression = executionData == null ? void 0 : executionData.evaluated_expression;
1170
1278
  const selectedOutcome = executionData == null ? void 0 : executionData.selected_outcome;
1171
- return /* @__PURE__ */ jsxs13(Fragment9, { children: [
1279
+ return /* @__PURE__ */ jsxs13(Fragment10, { children: [
1172
1280
  /* @__PURE__ */ jsx13(PromptBlock, { label: "Expression", text: blueprint.expression }),
1173
1281
  evaluatedExpression && /* @__PURE__ */ jsx13(KV, { label: "Expression Result", value: evaluatedExpression }),
1174
1282
  /* @__PURE__ */ jsxs13("div", { children: [
@@ -1226,11 +1334,11 @@ function PipeSequenceSection({
1226
1334
  }
1227
1335
 
1228
1336
  // src/graph/react/detail/sections/PipeParallelDetail.tsx
1229
- import { Fragment as Fragment10, jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
1337
+ import { Fragment as Fragment11, jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
1230
1338
  function PipeParallelSection({
1231
1339
  blueprint
1232
1340
  }) {
1233
- return /* @__PURE__ */ jsxs15(Fragment10, { children: [
1341
+ return /* @__PURE__ */ jsxs15(Fragment11, { children: [
1234
1342
  /* @__PURE__ */ jsxs15("div", { children: [
1235
1343
  /* @__PURE__ */ jsx15("div", { className: "detail-section-label", children: "Branches" }),
1236
1344
  /* @__PURE__ */ jsx15("div", { className: "detail-steps-list", children: blueprint.parallel_sub_pipes.map((branch, idx) => /* @__PURE__ */ jsxs15("div", { className: "detail-step-item", children: [
@@ -1247,13 +1355,13 @@ function PipeParallelSection({
1247
1355
  }
1248
1356
 
1249
1357
  // src/graph/react/detail/sections/PipeBatchDetail.tsx
1250
- import { Fragment as Fragment11, jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
1358
+ import { Fragment as Fragment12, jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
1251
1359
  function PipeBatchSection({
1252
1360
  blueprint,
1253
1361
  executionData
1254
1362
  }) {
1255
1363
  const itemCount = executionData == null ? void 0 : executionData.item_count;
1256
- return /* @__PURE__ */ jsxs16(Fragment11, { children: [
1364
+ return /* @__PURE__ */ jsxs16(Fragment12, { children: [
1257
1365
  /* @__PURE__ */ jsx16(KV, { label: "Branch Pipe", value: blueprint.branch_pipe_code }),
1258
1366
  /* @__PURE__ */ jsx16(KV, { label: "Input List Variable", value: blueprint.batch_params.input_list_stuff_name }),
1259
1367
  /* @__PURE__ */ jsx16(KV, { label: "Input Item Variable", value: blueprint.batch_params.input_item_stuff_name }),
@@ -1336,7 +1444,7 @@ function dumpableExecutionData(pipeType, executionData) {
1336
1444
  }
1337
1445
 
1338
1446
  // src/graph/react/detail/PipeDetailPanel.tsx
1339
- import { Fragment as Fragment12, jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
1447
+ import { Fragment as Fragment13, jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
1340
1448
  var PIPE_TYPE_BADGES = {
1341
1449
  PipeLLM: "LLM",
1342
1450
  PipeExtract: "Extract",
@@ -1378,12 +1486,12 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
1378
1486
  const badge = PIPE_TYPE_BADGES[pipeType];
1379
1487
  const status = node.status;
1380
1488
  const statusColor = (_a = STATUS_COLORS[status]) != null ? _a : "#6272a4";
1381
- const blueprint = React6.useMemo(() => resolveNodeBlueprint(spec, node), [spec, node]);
1382
- const [usageExpanded, setUsageExpanded] = React6.useState(false);
1489
+ const blueprint = React7.useMemo(() => resolveNodeBlueprint(spec, node), [spec, node]);
1490
+ const [usageExpanded, setUsageExpanded] = React7.useState(false);
1383
1491
  const inputs = (_c = (_b = node.io) == null ? void 0 : _b.inputs) != null ? _c : [];
1384
1492
  const outputs = (_e = (_d = node.io) == null ? void 0 : _d.outputs) != null ? _e : [];
1385
1493
  const description = (_f = blueprint == null ? void 0 : blueprint.description) != null ? _f : node.description;
1386
- return /* @__PURE__ */ jsxs19(Fragment12, { children: [
1494
+ return /* @__PURE__ */ jsxs19(Fragment13, { children: [
1387
1495
  /* @__PURE__ */ jsxs19("div", { className: "detail-sticky-header", children: [
1388
1496
  /* @__PURE__ */ jsxs19("div", { className: "detail-header", children: [
1389
1497
  /* @__PURE__ */ jsx19(
@@ -1593,17 +1701,17 @@ function ExecutionDataSection({
1593
1701
  }
1594
1702
  function GenericExecutionData({ entries }) {
1595
1703
  if (entries.length === 0) return null;
1596
- return /* @__PURE__ */ jsxs19(Fragment12, { children: [
1704
+ return /* @__PURE__ */ jsxs19(Fragment13, { children: [
1597
1705
  /* @__PURE__ */ jsx19("div", { className: "detail-section-label", children: "Execution" }),
1598
1706
  entries.map(([key, value]) => /* @__PURE__ */ jsx19(KV, { label: key, value: String(value) }, key))
1599
1707
  ] });
1600
1708
  }
1601
1709
 
1602
1710
  // src/graph/react/styles/simple/SimpleDetailPanel.tsx
1603
- import React7 from "react";
1711
+ import React8 from "react";
1604
1712
 
1605
1713
  // src/graph/react/styles/simple/simpleIcons.tsx
1606
- import { Fragment as Fragment13, jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
1714
+ import { Fragment as Fragment14, jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
1607
1715
  var ICON_PROPS = {
1608
1716
  viewBox: "0 0 24 24",
1609
1717
  fill: "none",
@@ -1617,12 +1725,12 @@ function Icon({ size = 13, children }) {
1617
1725
  return /* @__PURE__ */ jsx20("svg", __spreadProps(__spreadValues({}, ICON_PROPS), { width: size, height: size, children }));
1618
1726
  }
1619
1727
  var CATEGORY_ICONS = {
1620
- ai: /* @__PURE__ */ jsxs20(Fragment13, { children: [
1728
+ ai: /* @__PURE__ */ jsxs20(Fragment14, { children: [
1621
1729
  /* @__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" }),
1622
1730
  /* @__PURE__ */ jsx20("path", { d: "M20 3v4" }),
1623
1731
  /* @__PURE__ */ jsx20("path", { d: "M22 5h-4" })
1624
1732
  ] }),
1625
- extract: /* @__PURE__ */ jsxs20(Fragment13, { children: [
1733
+ extract: /* @__PURE__ */ jsxs20(Fragment14, { children: [
1626
1734
  /* @__PURE__ */ jsx20("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
1627
1735
  /* @__PURE__ */ jsx20("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }),
1628
1736
  /* @__PURE__ */ jsx20("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }),
@@ -1631,32 +1739,32 @@ var CATEGORY_ICONS = {
1631
1739
  /* @__PURE__ */ jsx20("path", { d: "M7 12h10" }),
1632
1740
  /* @__PURE__ */ jsx20("path", { d: "M7 16h6" })
1633
1741
  ] }),
1634
- image: /* @__PURE__ */ jsxs20(Fragment13, { children: [
1742
+ image: /* @__PURE__ */ jsxs20(Fragment14, { children: [
1635
1743
  /* @__PURE__ */ jsx20("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
1636
1744
  /* @__PURE__ */ jsx20("circle", { cx: "9", cy: "9", r: "2" }),
1637
1745
  /* @__PURE__ */ jsx20("path", { d: "m21 15-3.09-3.09a2 2 0 0 0-2.82 0L6 21" })
1638
1746
  ] }),
1639
- search: /* @__PURE__ */ jsxs20(Fragment13, { children: [
1747
+ search: /* @__PURE__ */ jsxs20(Fragment14, { children: [
1640
1748
  /* @__PURE__ */ jsx20("circle", { cx: "11", cy: "11", r: "8" }),
1641
1749
  /* @__PURE__ */ jsx20("path", { d: "m21 21-4.3-4.3" })
1642
1750
  ] }),
1643
- code: /* @__PURE__ */ jsxs20(Fragment13, { children: [
1751
+ code: /* @__PURE__ */ jsxs20(Fragment14, { children: [
1644
1752
  /* @__PURE__ */ jsx20("polyline", { points: "16 18 22 12 16 6" }),
1645
1753
  /* @__PURE__ */ jsx20("polyline", { points: "8 6 2 12 8 18" })
1646
1754
  ] }),
1647
- template: /* @__PURE__ */ jsxs20(Fragment13, { children: [
1755
+ template: /* @__PURE__ */ jsxs20(Fragment14, { children: [
1648
1756
  /* @__PURE__ */ jsx20("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
1649
1757
  /* @__PURE__ */ jsx20("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
1650
1758
  /* @__PURE__ */ jsx20("path", { d: "M16 13H8" }),
1651
1759
  /* @__PURE__ */ jsx20("path", { d: "M16 17H8" })
1652
1760
  ] }),
1653
- document: /* @__PURE__ */ jsxs20(Fragment13, { children: [
1761
+ document: /* @__PURE__ */ jsxs20(Fragment14, { children: [
1654
1762
  /* @__PURE__ */ jsx20("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
1655
1763
  /* @__PURE__ */ jsx20("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
1656
1764
  /* @__PURE__ */ jsx20("path", { d: "M12 18v-6" }),
1657
1765
  /* @__PURE__ */ jsx20("path", { d: "m9 15 3 3 3-3" })
1658
1766
  ] }),
1659
- judge: /* @__PURE__ */ jsxs20(Fragment13, { children: [
1767
+ judge: /* @__PURE__ */ jsxs20(Fragment14, { children: [
1660
1768
  /* @__PURE__ */ jsx20("path", { d: "m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
1661
1769
  /* @__PURE__ */ jsx20("path", { d: "m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
1662
1770
  /* @__PURE__ */ jsx20("path", { d: "M7 21h10" }),
@@ -1664,25 +1772,25 @@ var CATEGORY_ICONS = {
1664
1772
  /* @__PURE__ */ jsx20("path", { d: "M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2" })
1665
1773
  ] }),
1666
1774
  planned: /* @__PURE__ */ jsx20("circle", { cx: "12", cy: "12", r: "9", strokeDasharray: "3 3" }),
1667
- steps: /* @__PURE__ */ jsxs20(Fragment13, { children: [
1775
+ steps: /* @__PURE__ */ jsxs20(Fragment14, { children: [
1668
1776
  /* @__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" }),
1669
1777
  /* @__PURE__ */ jsx20("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }),
1670
1778
  /* @__PURE__ */ jsx20("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" })
1671
1779
  ] }),
1672
- parallel: /* @__PURE__ */ jsxs20(Fragment13, { children: [
1780
+ parallel: /* @__PURE__ */ jsxs20(Fragment14, { children: [
1673
1781
  /* @__PURE__ */ jsx20("path", { d: "M16 3h5v5" }),
1674
1782
  /* @__PURE__ */ jsx20("path", { d: "M8 3H3v5" }),
1675
1783
  /* @__PURE__ */ jsx20("path", { d: "M12 22v-8.3a4 4 0 0 0-1.17-2.87L3 3" }),
1676
1784
  /* @__PURE__ */ jsx20("path", { d: "m15 9 6-6" })
1677
1785
  ] }),
1678
1786
  decision: /* @__PURE__ */ jsx20("path", { d: "M12 2 22 12 12 22 2 12Z" }),
1679
- repeat: /* @__PURE__ */ jsxs20(Fragment13, { children: [
1787
+ repeat: /* @__PURE__ */ jsxs20(Fragment14, { children: [
1680
1788
  /* @__PURE__ */ jsx20("path", { d: "m17 2 4 4-4 4" }),
1681
1789
  /* @__PURE__ */ jsx20("path", { d: "M3 11v-1a4 4 0 0 1 4-4h14" }),
1682
1790
  /* @__PURE__ */ jsx20("path", { d: "m7 22-4-4 4-4" }),
1683
1791
  /* @__PURE__ */ jsx20("path", { d: "M21 13v1a4 4 0 0 1-4 4H3" })
1684
1792
  ] }),
1685
- pick: /* @__PURE__ */ jsxs20(Fragment13, { children: [
1793
+ pick: /* @__PURE__ */ jsxs20(Fragment14, { children: [
1686
1794
  /* @__PURE__ */ jsx20("polyline", { points: "15 10 20 15 15 20" }),
1687
1795
  /* @__PURE__ */ jsx20("path", { d: "M4 4v7a4 4 0 0 0 4 4h12" })
1688
1796
  ] })
@@ -1697,7 +1805,7 @@ var STATUS_LABELS = {
1697
1805
  };
1698
1806
  var STATUS_ICONS = {
1699
1807
  succeeded: /* @__PURE__ */ jsx20("polyline", { points: "20 6 9 17 4 12" }),
1700
- failed: /* @__PURE__ */ jsxs20(Fragment13, { children: [
1808
+ failed: /* @__PURE__ */ jsxs20(Fragment14, { children: [
1701
1809
  /* @__PURE__ */ jsx20("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
1702
1810
  /* @__PURE__ */ jsx20("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
1703
1811
  ] }),
@@ -1803,7 +1911,7 @@ var SIMPLE_DETAIL_STRINGS = {
1803
1911
  };
1804
1912
 
1805
1913
  // src/graph/react/styles/simple/SimpleDetailPanel.tsx
1806
- import { Fragment as Fragment14, jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
1914
+ import { Fragment as Fragment15, jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
1807
1915
  function SimpleDetailPanel(props) {
1808
1916
  const { detail } = props;
1809
1917
  return /* @__PURE__ */ jsxs21("div", { className: "simple-detail", "data-kind": detail.kind, children: [
@@ -1826,7 +1934,7 @@ function StepView({
1826
1934
  }) {
1827
1935
  var _a, _b;
1828
1936
  const runs = (_b = (_a = detail.run) == null ? void 0 : _a.runs) != null ? _b : 1;
1829
- return /* @__PURE__ */ jsxs21(Fragment14, { children: [
1937
+ return /* @__PURE__ */ jsxs21(Fragment15, { children: [
1830
1938
  /* @__PURE__ */ jsx21(
1831
1939
  Header,
1832
1940
  {
@@ -1899,7 +2007,7 @@ function DecisionView({
1899
2007
  renderTechnical,
1900
2008
  onOpenNode
1901
2009
  }) {
1902
- return /* @__PURE__ */ jsxs21(Fragment14, { children: [
2010
+ return /* @__PURE__ */ jsxs21(Fragment15, { children: [
1903
2011
  /* @__PURE__ */ jsx21(Header, { category: "decision", word: SIMPLE_DETAIL_STRINGS.decisionKind, run: detail.run }),
1904
2012
  /* @__PURE__ */ jsx21("h2", { className: "simple-detail-title", children: detail.title }),
1905
2013
  detail.problem && /* @__PURE__ */ jsx21(PlainProblem, { problem: detail.problem }),
@@ -1940,7 +2048,7 @@ function FrameView({
1940
2048
  renderTechnical,
1941
2049
  onOpenNode
1942
2050
  }) {
1943
- return /* @__PURE__ */ jsxs21(Fragment14, { children: [
2051
+ return /* @__PURE__ */ jsxs21(Fragment15, { children: [
1944
2052
  /* @__PURE__ */ jsx21(Header, { category: "repeat", word: SIMPLE_DETAIL_STRINGS.frameKind, run: detail.run, items: detail.items }),
1945
2053
  /* @__PURE__ */ jsx21("h2", { className: "simple-detail-title", children: detail.title }),
1946
2054
  detail.problem && /* @__PURE__ */ jsx21(PlainProblem, { problem: detail.problem }),
@@ -1968,7 +2076,7 @@ function ValueView({
1968
2076
  const { value, role } = detail;
1969
2077
  const shown = showsValues(mode) ? renderValue == null ? void 0 : renderValue(value) : null;
1970
2078
  const links = role === "input" ? value.to : value.from;
1971
- return /* @__PURE__ */ jsxs21(Fragment14, { children: [
2079
+ return /* @__PURE__ */ jsxs21(Fragment15, { children: [
1972
2080
  /* @__PURE__ */ jsx21("div", { className: "simple-detail-header", children: /* @__PURE__ */ jsxs21("span", { className: `simple-detail-kind simple-detail-kind--${role}`, children: [
1973
2081
  /* @__PURE__ */ jsx21(DocumentIcon, { list: value.isList }),
1974
2082
  role === "input" ? SIMPLE_DETAIL_STRINGS.inputKind : SIMPLE_DETAIL_STRINGS.outputKind
@@ -1979,7 +2087,7 @@ function ValueView({
1979
2087
  mode === GRAPH_SPEC_MODE.DRY && /* @__PURE__ */ jsx21("p", { className: "simple-detail-note", children: SIMPLE_DETAIL_STRINGS.dryRunValues }),
1980
2088
  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)) }) }),
1981
2089
  shown && /* @__PURE__ */ jsx21("div", { className: "simple-detail-value", children: shown }),
1982
- 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: [
2090
+ 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(React8.Fragment, { children: [
1983
2091
  /* @__PURE__ */ jsx21("dt", { children: field.title }),
1984
2092
  field.description && /* @__PURE__ */ jsx21("dd", { children: field.description })
1985
2093
  ] }, field.title)) }) }),
@@ -1987,7 +2095,7 @@ function ValueView({
1987
2095
  ] });
1988
2096
  }
1989
2097
  function ArrowView({ detail, mode, renderValue, onOpenNode }) {
1990
- return /* @__PURE__ */ jsxs21(Fragment14, { children: [
2098
+ return /* @__PURE__ */ jsxs21(Fragment15, { children: [
1991
2099
  /* @__PURE__ */ jsx21("div", { className: "simple-detail-header", children: /* @__PURE__ */ jsxs21("span", { className: "simple-detail-kind", children: [
1992
2100
  /* @__PURE__ */ jsxs21(Icon, { children: [
1993
2101
  /* @__PURE__ */ jsx21("path", { d: "M5 12h14" }),
@@ -2064,7 +2172,7 @@ function Fold({
2064
2172
  children,
2065
2173
  defaultOpen = false
2066
2174
  }) {
2067
- const [open, setOpen] = React7.useState(defaultOpen);
2175
+ const [open, setOpen] = React8.useState(defaultOpen);
2068
2176
  return /* @__PURE__ */ jsxs21(
2069
2177
  "details",
2070
2178
  {
@@ -2135,7 +2243,7 @@ function ValueLinks({
2135
2243
  if (links.length === 0) return null;
2136
2244
  return /* @__PURE__ */ jsxs21("p", { className: "simple-value-links", children: [
2137
2245
  /* @__PURE__ */ jsx21("span", { className: "simple-value-links-label", children: side === "from" ? SIMPLE_DETAIL_STRINGS.from : SIMPLE_DETAIL_STRINGS.usedBy }),
2138
- links.map((link, index) => /* @__PURE__ */ jsxs21(React7.Fragment, { children: [
2246
+ links.map((link, index) => /* @__PURE__ */ jsxs21(React8.Fragment, { children: [
2139
2247
  index > 0 && /* @__PURE__ */ jsx21("span", { className: "simple-value-links-sep", children: ", " }),
2140
2248
  /* @__PURE__ */ jsx21(NodeLink, { link, onOpenNode })
2141
2249
  ] }, link.nodeId))
@@ -2205,7 +2313,7 @@ function resultDescriptors(graph) {
2205
2313
  }
2206
2314
 
2207
2315
  // src/graph/react/viewer/styleDetailPanels.tsx
2208
- import { Fragment as Fragment15, jsx as jsx22 } from "react/jsx-runtime";
2316
+ import { Fragment as Fragment16, jsx as jsx22 } from "react/jsx-runtime";
2209
2317
  function selectedNodeId(selection) {
2210
2318
  return selection && selection.kind !== "arrow" ? selection.nodeId : null;
2211
2319
  }
@@ -2287,7 +2395,7 @@ function StuffNodeDetail(_a) {
2287
2395
  );
2288
2396
  }
2289
2397
  if (isDryRun) return /* @__PURE__ */ jsx22("div", { className: "detail-not-available", children: "Dry run data hidden" });
2290
- return /* @__PURE__ */ jsx22(Fragment15, { children: (_a2 = renderData == null ? void 0 : renderData()) != null ? _a2 : /* @__PURE__ */ jsx22("div", { className: "detail-not-available", children: "No data" }) });
2398
+ return /* @__PURE__ */ jsx22(Fragment16, { children: (_a2 = renderData == null ? void 0 : renderData()) != null ? _a2 : /* @__PURE__ */ jsx22("div", { className: "detail-not-available", children: "No data" }) });
2291
2399
  }
2292
2400
  function ResultView({
2293
2401
  artifacts,
@@ -2321,7 +2429,7 @@ function ResultView({
2321
2429
  }
2322
2430
  function SimpleStylePanel(props) {
2323
2431
  const { selection, graphspec, artifacts, theme, valueOptions, nodes, drawing, onOpenNode } = props;
2324
- const detail = React8.useMemo(() => {
2432
+ const detail = React9.useMemo(() => {
2325
2433
  if (!graphspec || !drawing) return null;
2326
2434
  const target = selection.kind === "arrow" ? { kind: "arrow", source: selection.source, target: selection.target } : { kind: "node", id: selection.nodeId };
2327
2435
  return buildSimpleNodeDetail(
@@ -2566,7 +2674,7 @@ function placeCanvasFailure({
2566
2674
  }
2567
2675
 
2568
2676
  // src/graph/react/viewer/GraphErrorState.tsx
2569
- import React9 from "react";
2677
+ import React10 from "react";
2570
2678
  import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
2571
2679
  var GRAPH_ERROR_STATE_TITLE = "This method graph could not be drawn";
2572
2680
  function GraphErrorState({ failure }) {
@@ -2595,7 +2703,7 @@ function GraphRelayoutFailure({
2595
2703
  }
2596
2704
  );
2597
2705
  }
2598
- var GraphFailureBoundary = class extends React9.Component {
2706
+ var GraphFailureBoundary = class extends React10.Component {
2599
2707
  constructor() {
2600
2708
  super(...arguments);
2601
2709
  this.state = { failure: null, resetKey: this.props.resetKey };
@@ -2616,7 +2724,7 @@ var GraphFailureBoundary = class extends React9.Component {
2616
2724
  };
2617
2725
 
2618
2726
  // src/graph/react/viewer/GraphToolbar.tsx
2619
- import React10 from "react";
2727
+ import React11 from "react";
2620
2728
  import { Panel } from "@xyflow/react";
2621
2729
 
2622
2730
  // src/graph/react/viewer/ValidationPanel.tsx
@@ -2736,7 +2844,7 @@ function ValidationPanel({
2736
2844
  }
2737
2845
 
2738
2846
  // src/graph/react/viewer/GraphToolbar.tsx
2739
- import { Fragment as Fragment16, jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
2847
+ import { Fragment as Fragment17, jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
2740
2848
  var REACTFLOW_PANEL_MARGIN = 15;
2741
2849
  var ARROW_RIGHT_ICON = /* @__PURE__ */ jsxs25(
2742
2850
  "svg",
@@ -3098,11 +3206,11 @@ function GraphToolbar({
3098
3206
  const orientation = toolbarOrientation(position);
3099
3207
  const setValidationOpen = onValidationOpenChange != null ? onValidationOpenChange : (() => {
3100
3208
  });
3101
- const setValidationOpenRef = React10.useRef(setValidationOpen);
3209
+ const setValidationOpenRef = React11.useRef(setValidationOpen);
3102
3210
  setValidationOpenRef.current = setValidationOpen;
3103
- const validationRef = React10.useRef(null);
3104
- const validationPanelId = React10.useId();
3105
- React10.useEffect(() => {
3211
+ const validationRef = React11.useRef(null);
3212
+ const validationPanelId = React11.useId();
3213
+ React11.useEffect(() => {
3106
3214
  if (validationState === void 0) setValidationOpenRef.current(false);
3107
3215
  }, [validationState]);
3108
3216
  usePopoverDismiss(validationOpen, validationRef, () => setValidationOpenRef.current(false));
@@ -3122,7 +3230,7 @@ function GraphToolbar({
3122
3230
  className: `graph-toolbar-panel graph-toolbar-panel--${orientation}`,
3123
3231
  style: panelStyle,
3124
3232
  children: /* @__PURE__ */ jsxs25("div", { className: `graph-toolbar graph-toolbar--${orientation}`, children: [
3125
- validationState !== void 0 && /* @__PURE__ */ jsxs25(Fragment16, { children: [
3233
+ validationState !== void 0 && /* @__PURE__ */ jsxs25(Fragment17, { children: [
3126
3234
  /* @__PURE__ */ jsxs25("div", { className: "graph-toolbar-validation", ref: validationRef, children: [
3127
3235
  /* @__PURE__ */ jsxs25(
3128
3236
  "button",
@@ -3154,7 +3262,7 @@ function GraphToolbar({
3154
3262
  ] }),
3155
3263
  /* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" })
3156
3264
  ] }),
3157
- styleMenuEnabled && /* @__PURE__ */ jsxs25(Fragment16, { children: [
3265
+ styleMenuEnabled && /* @__PURE__ */ jsxs25(Fragment17, { children: [
3158
3266
  /* @__PURE__ */ jsx26(
3159
3267
  StyleMenu,
3160
3268
  {
@@ -3251,7 +3359,7 @@ function GraphToolbar({
3251
3359
  children: FIT_VIEW_ICON
3252
3360
  }
3253
3361
  ),
3254
- themeToggleEnabled && /* @__PURE__ */ jsxs25(Fragment16, { children: [
3362
+ themeToggleEnabled && /* @__PURE__ */ jsxs25(Fragment17, { children: [
3255
3363
  /* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" }),
3256
3364
  /* @__PURE__ */ jsx26(
3257
3365
  "button",
@@ -3271,7 +3379,7 @@ function GraphToolbar({
3271
3379
  }
3272
3380
 
3273
3381
  // src/graph/react/viewer/StillFit.tsx
3274
- import React11 from "react";
3382
+ import React12 from "react";
3275
3383
  import { useEdges, useNodes, useNodesInitialized, useReactFlow, useStore } from "@xyflow/react";
3276
3384
 
3277
3385
  // src/graph/react/viewer/stillViewport.ts
@@ -3318,7 +3426,7 @@ function StillFit({ onHeight }) {
3318
3426
  const nodes = useNodes();
3319
3427
  const edges = useEdges();
3320
3428
  const { getNodesBounds, setViewport } = useReactFlow();
3321
- React11.useLayoutEffect(() => {
3429
+ React12.useLayoutEffect(() => {
3322
3430
  if (!nodesInitialized || nodes.length === 0) return;
3323
3431
  const bounds = stillContentBounds(
3324
3432
  getNodesBounds(nodes),
@@ -3439,7 +3547,7 @@ var controllerNodeTypes = { controllerGroup: ControllerGroupNode };
3439
3547
  import { Handle, Position } from "@xyflow/react";
3440
3548
 
3441
3549
  // src/graph/react/nodes/pipe/PipeCardBase.tsx
3442
- import { useState as useState2 } from "react";
3550
+ import { useState as useState3 } from "react";
3443
3551
  import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
3444
3552
  var PIPE_TYPE_BADGES2 = {
3445
3553
  PipeLLM: "LLM",
@@ -3490,7 +3598,7 @@ function PipeCardBase({ data, children }) {
3490
3598
  const isStatic = data.graphMode === "static";
3491
3599
  const outcome = isStatic ? (_a = data.tags) == null ? void 0 : _a.outcome : void 0;
3492
3600
  const batchMultiplicity = isStatic ? (_b = data.tags) == null ? void 0 : _b.batch_multiplicity : void 0;
3493
- const [inputsExpanded, setInputsExpanded] = useState2(false);
3601
+ const [inputsExpanded, setInputsExpanded] = useState3(false);
3494
3602
  const hasMany = data.inputs.length > MAX_VISIBLE_INPUTS;
3495
3603
  const visibleInputs = hasMany && !inputsExpanded ? data.inputs.slice(0, MAX_VISIBLE_INPUTS) : data.inputs;
3496
3604
  const hiddenCount = data.inputs.length - MAX_VISIBLE_INPUTS;
@@ -3623,7 +3731,7 @@ function getPipeCardComponent(pipeType) {
3623
3731
  }
3624
3732
 
3625
3733
  // src/graph/react/nodes/pipe/PipeCardNode.tsx
3626
- import { Fragment as Fragment17, jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
3734
+ import { Fragment as Fragment18, jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
3627
3735
  function PipeCardNode({ data }) {
3628
3736
  var _a;
3629
3737
  const Card = (_a = getPipeCardComponent(data.pipeType)) != null ? _a : PipeCardBase;
@@ -3636,7 +3744,7 @@ function PipeCardRFNode({
3636
3744
  }) {
3637
3745
  const payload = data.pipeCardData;
3638
3746
  if (!payload) return null;
3639
- return /* @__PURE__ */ jsxs28(Fragment17, { children: [
3747
+ return /* @__PURE__ */ jsxs28(Fragment18, { children: [
3640
3748
  /* @__PURE__ */ jsx30(Handle, { type: "target", position: targetPosition }),
3641
3749
  /* @__PURE__ */ jsx30(PipeCardNode, { data: payload }),
3642
3750
  /* @__PURE__ */ jsx30(Handle, { type: "source", position: sourcePosition })
@@ -3645,7 +3753,7 @@ function PipeCardRFNode({
3645
3753
 
3646
3754
  // src/graph/react/styles/simple/SimpleNodes.tsx
3647
3755
  import { Handle as Handle2, Position as Position2 } from "@xyflow/react";
3648
- import { Fragment as Fragment18, jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
3756
+ import { Fragment as Fragment19, jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
3649
3757
  var EXPAND_ICON2 = /* @__PURE__ */ jsxs29(Icon, { size: 12, children: [
3650
3758
  /* @__PURE__ */ jsx31("polyline", { points: "15 3 21 3 21 9" }),
3651
3759
  /* @__PURE__ */ jsx31("polyline", { points: "9 21 3 21 3 15" }),
@@ -3675,7 +3783,7 @@ function Handles({
3675
3783
  targetPosition = Position2.Left,
3676
3784
  children
3677
3785
  }) {
3678
- return /* @__PURE__ */ jsxs29(Fragment18, { children: [
3786
+ return /* @__PURE__ */ jsxs29(Fragment19, { children: [
3679
3787
  /* @__PURE__ */ jsx31(Handle2, { type: "target", position: targetPosition, className: "simple-handle" }),
3680
3788
  children,
3681
3789
  /* @__PURE__ */ jsx31(Handle2, { type: "source", position: sourcePosition, className: "simple-handle" })
@@ -3760,7 +3868,7 @@ function SimpleTerminalNode({ data, sourcePosition, targetPosition }) {
3760
3868
  {
3761
3869
  className: `simple-terminal simple-terminal--${terminal.kind}${terminal.isList ? " simple-terminal--list" : ""}`,
3762
3870
  children: [
3763
- terminal.isList && /* @__PURE__ */ jsxs29(Fragment18, { children: [
3871
+ terminal.isList && /* @__PURE__ */ jsxs29(Fragment19, { children: [
3764
3872
  /* @__PURE__ */ jsx31(DocumentShape, { className: "simple-terminal-shape simple-terminal-shape--back2" }),
3765
3873
  /* @__PURE__ */ jsx31(DocumentShape, { className: "simple-terminal-shape simple-terminal-shape--back1" })
3766
3874
  ] }),
@@ -3893,7 +4001,7 @@ function RoutedEdge({
3893
4001
  }
3894
4002
 
3895
4003
  // src/graph/react/viewer/GraphViewer.tsx
3896
- import { Fragment as Fragment19, jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
4004
+ import { Fragment as Fragment20, jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
3897
4005
  var nodeTypes = __spreadValues(__spreadProps(__spreadValues({}, controllerNodeTypes), {
3898
4006
  pipeCard: PipeCardRFNode
3899
4007
  }), simpleNodeTypes);
@@ -4053,31 +4161,31 @@ function GraphViewerCanvas(props) {
4053
4161
  onFailure
4054
4162
  } = props;
4055
4163
  const graphspecProp = (_a = graph == null ? void 0 : graph.graphSpec) != null ? _a : null;
4056
- const { graphspec, failure: specFailure } = React13.useMemo(
4164
+ const { graphspec, failure: specFailure } = React14.useMemo(
4057
4165
  () => readGraphSpec(graphspecProp),
4058
4166
  [graphspecProp]
4059
4167
  );
4060
- const graphspecRef = React13.useRef(graphspec);
4168
+ const graphspecRef = React14.useRef(graphspec);
4061
4169
  graphspecRef.current = graphspec;
4062
- const [layoutFailure, setLayoutFailure] = React13.useState(null);
4170
+ const [layoutFailure, setLayoutFailure] = React14.useState(null);
4063
4171
  const canvasFailure = placeCanvasFailure({
4064
4172
  specFailure,
4065
4173
  layoutFailure: layoutFailureFor(layoutFailure, graphspec),
4066
4174
  interactive
4067
4175
  });
4068
4176
  const failed = canvasFailure.inPlace !== null;
4069
- const onFailureRef = React13.useRef(onFailure);
4177
+ const onFailureRef = React14.useRef(onFailure);
4070
4178
  onFailureRef.current = onFailure;
4071
- const [direction, setDirection] = React13.useState(
4179
+ const [direction, setDirection] = React14.useState(
4072
4180
  () => {
4073
4181
  var _a2, _b2;
4074
4182
  return (_b2 = (_a2 = initialDirection != null ? initialDirection : config.direction) != null ? _a2 : DEFAULT_GRAPH_CONFIG.direction) != null ? _b2 : GRAPH_DIRECTION.TB;
4075
4183
  }
4076
4184
  );
4077
4185
  const externalMode = resolveExternalThemeMode(themeProp, config.theme);
4078
- const [mode, setMode] = React13.useState(externalMode);
4079
- const prevExternalModeRef = React13.useRef(externalMode);
4080
- React13.useEffect(() => {
4186
+ const [mode, setMode] = React14.useState(externalMode);
4187
+ const prevExternalModeRef = React14.useRef(externalMode);
4188
+ React14.useEffect(() => {
4081
4189
  if (externalMode !== prevExternalModeRef.current) {
4082
4190
  prevExternalModeRef.current = externalMode;
4083
4191
  setMode(externalMode);
@@ -4085,13 +4193,13 @@ function GraphViewerCanvas(props) {
4085
4193
  }, [externalMode]);
4086
4194
  const systemTheme = useSystemTheme(systemThemeProp);
4087
4195
  const resolvedTheme = resolveActiveTheme(mode, systemTheme);
4088
- const onThemeChangeRef = React13.useRef(onThemeChange);
4196
+ const onThemeChangeRef = React14.useRef(onThemeChange);
4089
4197
  onThemeChangeRef.current = onThemeChange;
4090
- const prevReportedRef = React13.useRef({
4198
+ const prevReportedRef = React14.useRef({
4091
4199
  mode,
4092
4200
  resolvedTheme
4093
4201
  });
4094
- React13.useEffect(() => {
4202
+ React14.useEffect(() => {
4095
4203
  var _a2;
4096
4204
  const prev = prevReportedRef.current;
4097
4205
  if (prev.mode !== mode || prev.resolvedTheme !== resolvedTheme) {
@@ -4100,48 +4208,48 @@ function GraphViewerCanvas(props) {
4100
4208
  }
4101
4209
  }, [mode, resolvedTheme]);
4102
4210
  const externalStyle = resolveGraphStyle(graphStyleProp, config.graphStyle);
4103
- const [graphStyle, setGraphStyle] = React13.useState(externalStyle);
4104
- const prevExternalStyleRef = React13.useRef(externalStyle);
4105
- React13.useEffect(() => {
4211
+ const [graphStyle, setGraphStyle] = React14.useState(externalStyle);
4212
+ const prevExternalStyleRef = React14.useRef(externalStyle);
4213
+ React14.useEffect(() => {
4106
4214
  if (externalStyle !== prevExternalStyleRef.current) {
4107
4215
  prevExternalStyleRef.current = externalStyle;
4108
4216
  setGraphStyle(externalStyle);
4109
4217
  }
4110
4218
  }, [externalStyle]);
4111
- const onGraphStyleChangeRef = React13.useRef(onGraphStyleChange);
4219
+ const onGraphStyleChangeRef = React14.useRef(onGraphStyleChange);
4112
4220
  onGraphStyleChangeRef.current = onGraphStyleChange;
4113
- const prevReportedStyleRef = React13.useRef(graphStyle);
4114
- React13.useEffect(() => {
4221
+ const prevReportedStyleRef = React14.useRef(graphStyle);
4222
+ React14.useEffect(() => {
4115
4223
  var _a2;
4116
4224
  if (prevReportedStyleRef.current !== graphStyle) {
4117
4225
  prevReportedStyleRef.current = graphStyle;
4118
4226
  (_a2 = onGraphStyleChangeRef.current) == null ? void 0 : _a2.call(onGraphStyleChangeRef, graphStyle);
4119
4227
  }
4120
4228
  }, [graphStyle]);
4121
- const graphStyleRef = React13.useRef(graphStyle);
4229
+ const graphStyleRef = React14.useRef(graphStyle);
4122
4230
  graphStyleRef.current = graphStyle;
4123
4231
  const styleCapabilities = GRAPH_STYLES[graphStyle].capabilities;
4124
4232
  const effectiveFoldMode = (_c = (_b = initialFoldMode != null ? initialFoldMode : config.foldMode) != null ? _b : DEFAULT_GRAPH_CONFIG.foldMode) != null ? _c : FOLD_MODE.EXPANDED;
4125
- const [showControllers, setShowControllers] = React13.useState(() => {
4233
+ const [showControllers, setShowControllers] = React14.useState(() => {
4126
4234
  var _a2, _b2;
4127
4235
  if (effectiveFoldMode === FOLD_MODE.FOLDED) return true;
4128
4236
  return (_b2 = (_a2 = initialShowControllers != null ? initialShowControllers : config.showControllers) != null ? _a2 : DEFAULT_GRAPH_CONFIG.showControllers) != null ? _b2 : false;
4129
4237
  });
4130
- const foldModeRef = React13.useRef(effectiveFoldMode);
4238
+ const foldModeRef = React14.useRef(effectiveFoldMode);
4131
4239
  foldModeRef.current = effectiveFoldMode;
4132
- const containerRef = React13.useRef(null);
4133
- const [detailSelection, setDetailSelection] = React13.useState(null);
4134
- const [conceptOverride, setConceptOverride] = React13.useState(null);
4240
+ const containerRef = React14.useRef(null);
4241
+ const [detailSelection, setDetailSelection] = React14.useState(null);
4242
+ const [conceptOverride, setConceptOverride] = React14.useState(null);
4135
4243
  const {
4136
4244
  width: panelWidth,
4137
4245
  isDragging: isPanelDragging,
4138
4246
  handleMouseDown: onResizeMouseDown
4139
4247
  } = useResizable({ defaultWidth: 380, minWidth: 280, maxWidth: 800, containerRef });
4140
- React13.useEffect(() => {
4248
+ React14.useEffect(() => {
4141
4249
  setDetailSelection(null);
4142
4250
  setConceptOverride(null);
4143
4251
  }, [graphspec]);
4144
- React13.useEffect(() => {
4252
+ React14.useEffect(() => {
4145
4253
  const el = containerRef.current;
4146
4254
  if (!el) return;
4147
4255
  const themePalette = getPaletteForTheme(resolvedTheme);
@@ -4156,15 +4264,15 @@ function GraphViewerCanvas(props) {
4156
4264
  }
4157
4265
  };
4158
4266
  }, [config.paletteColors, resolvedTheme]);
4159
- const [stillHeight, setStillHeight] = React13.useState(STILL_PLACEHOLDER_HEIGHT_PX);
4267
+ const [stillHeight, setStillHeight] = React14.useState(STILL_PLACEHOLDER_HEIGHT_PX);
4160
4268
  const [nodes, setNodes, onNodesChange] = useNodesState([]);
4161
4269
  const [edges, setEdges, onEdgesChange] = useEdgesState([]);
4162
- const reactFlowRef = React13.useRef(null);
4163
- const initialDataRef = React13.useRef(null);
4164
- const rawGraphDataRef = React13.useRef(null);
4165
- const layoutCacheRef = React13.useRef(null);
4166
- const [expandedControllers, setExpandedControllers] = React13.useState(/* @__PURE__ */ new Set());
4167
- const toggleCollapse = React13.useCallback((controllerId) => {
4270
+ const reactFlowRef = React14.useRef(null);
4271
+ const initialDataRef = React14.useRef(null);
4272
+ const rawGraphDataRef = React14.useRef(null);
4273
+ const layoutCacheRef = React14.useRef(null);
4274
+ const [expandedControllers, setExpandedControllers] = React14.useState(/* @__PURE__ */ new Set());
4275
+ const toggleCollapse = React14.useCallback((controllerId) => {
4168
4276
  setExpandedControllers((prev) => {
4169
4277
  const next = new Set(prev);
4170
4278
  if (next.has(controllerId)) next.delete(controllerId);
@@ -4172,17 +4280,17 @@ function GraphViewerCanvas(props) {
4172
4280
  return next;
4173
4281
  });
4174
4282
  }, []);
4175
- const [foldedControllers, setFoldedControllers] = React13.useState(/* @__PURE__ */ new Set());
4176
- const styleDefaultFoldsRef = React13.useRef(/* @__PURE__ */ new Set());
4177
- const readerOpenedRef = React13.useRef(/* @__PURE__ */ new Set());
4178
- const markReaderFolds = React13.useCallback((ids, folded) => {
4283
+ const [foldedControllers, setFoldedControllers] = React14.useState(/* @__PURE__ */ new Set());
4284
+ const styleDefaultFoldsRef = React14.useRef(/* @__PURE__ */ new Set());
4285
+ const readerOpenedRef = React14.useRef(/* @__PURE__ */ new Set());
4286
+ const markReaderFolds = React14.useCallback((ids, folded) => {
4179
4287
  for (const id of ids) {
4180
4288
  styleDefaultFoldsRef.current.delete(id);
4181
4289
  if (folded) readerOpenedRef.current.delete(id);
4182
4290
  else readerOpenedRef.current.add(id);
4183
4291
  }
4184
4292
  }, []);
4185
- const toggleFold = React13.useCallback(
4293
+ const toggleFold = React14.useCallback(
4186
4294
  (controllerId, options) => {
4187
4295
  setFoldedControllers((prev) => {
4188
4296
  const next = new Set(prev);
@@ -4200,53 +4308,53 @@ function GraphViewerCanvas(props) {
4200
4308
  [markReaderFolds]
4201
4309
  );
4202
4310
  const edgeType = config.edgeType || EDGE_TYPE.DEFAULT;
4203
- const layoutConfig = React13.useMemo(
4311
+ const layoutConfig = React14.useMemo(
4204
4312
  () => ({ nodesep: config.nodesep, ranksep: config.ranksep }),
4205
4313
  [config.nodesep, config.ranksep]
4206
4314
  );
4207
- const showControllersRef = React13.useRef(showControllers);
4315
+ const showControllersRef = React14.useRef(showControllers);
4208
4316
  showControllersRef.current = showControllers;
4209
- const directionRef = React13.useRef(direction);
4317
+ const directionRef = React14.useRef(direction);
4210
4318
  directionRef.current = direction;
4211
- const layoutConfigRef = React13.useRef(layoutConfig);
4319
+ const layoutConfigRef = React14.useRef(layoutConfig);
4212
4320
  layoutConfigRef.current = layoutConfig;
4213
- const initialZoomRef = React13.useRef(config.initialZoom);
4321
+ const initialZoomRef = React14.useRef(config.initialZoom);
4214
4322
  initialZoomRef.current = config.initialZoom;
4215
- const panToTopRef = React13.useRef(config.panToTop);
4323
+ const panToTopRef = React14.useRef(config.panToTop);
4216
4324
  panToTopRef.current = config.panToTop;
4217
- const interactiveRef = React13.useRef(interactive);
4325
+ const interactiveRef = React14.useRef(interactive);
4218
4326
  interactiveRef.current = interactive;
4219
- const expandedRef = React13.useRef(expandedControllers);
4327
+ const expandedRef = React14.useRef(expandedControllers);
4220
4328
  expandedRef.current = expandedControllers;
4221
- const toggleCollapseRef = React13.useRef(toggleCollapse);
4329
+ const toggleCollapseRef = React14.useRef(toggleCollapse);
4222
4330
  toggleCollapseRef.current = toggleCollapse;
4223
- const foldedRef = React13.useRef(foldedControllers);
4331
+ const foldedRef = React14.useRef(foldedControllers);
4224
4332
  foldedRef.current = foldedControllers;
4225
- const toggleFoldRef = React13.useRef(toggleFold);
4333
+ const toggleFoldRef = React14.useRef(toggleFold);
4226
4334
  toggleFoldRef.current = toggleFold;
4227
- const isFirstFoldEffect = React13.useRef(true);
4228
- const prevFoldSizeRef = React13.useRef(0);
4229
- const skipNextFoldEffectRef = React13.useRef(false);
4230
- const statusMapRef = React13.useRef(statusMap);
4335
+ const isFirstFoldEffect = React14.useRef(true);
4336
+ const prevFoldSizeRef = React14.useRef(0);
4337
+ const skipNextFoldEffectRef = React14.useRef(false);
4338
+ const statusMapRef = React14.useRef(statusMap);
4231
4339
  statusMapRef.current = statusMap;
4232
- const validationIssuesRef = React13.useRef(validationIssues);
4340
+ const validationIssuesRef = React14.useRef(validationIssues);
4233
4341
  validationIssuesRef.current = validationIssues;
4234
- const selectedNodeIdRef = React13.useRef(null);
4342
+ const selectedNodeIdRef = React14.useRef(null);
4235
4343
  selectedNodeIdRef.current = selectedNodeId(detailSelection);
4236
- const selectedArrowRef = React13.useRef(null);
4344
+ const selectedArrowRef = React14.useRef(null);
4237
4345
  selectedArrowRef.current = (detailSelection == null ? void 0 : detailSelection.kind) === "arrow" ? detailSelection : null;
4238
- React13.useEffect(() => {
4346
+ React14.useEffect(() => {
4239
4347
  if ((detailSelection == null ? void 0 : detailSelection.kind) !== "arrow") return;
4240
4348
  const { source, target } = detailSelection;
4241
4349
  const drawn = edges.some((e) => e.source === source && e.target === target);
4242
4350
  if (!styleCapabilities.valueArrows || !drawn) setDetailSelection(null);
4243
4351
  }, [detailSelection, edges, styleCapabilities.valueArrows]);
4244
- const [validationOpen, setValidationOpen] = React13.useState(false);
4245
- const openValidationPanel = React13.useCallback(() => setValidationOpen(true), []);
4352
+ const [validationOpen, setValidationOpen] = React14.useState(false);
4353
+ const openValidationPanel = React14.useCallback(() => setValidationOpen(true), []);
4246
4354
  const validationWidgetAvailable = validationState !== void 0 && !hideToolbar && interactive;
4247
- const validationWidgetAvailableRef = React13.useRef(validationWidgetAvailable);
4355
+ const validationWidgetAvailableRef = React14.useRef(validationWidgetAvailable);
4248
4356
  validationWidgetAvailableRef.current = validationWidgetAvailable;
4249
- const decorateNodes = React13.useCallback(
4357
+ const decorateNodes = React14.useCallback(
4250
4358
  (nodes2) => {
4251
4359
  var _a2, _b2, _c2;
4252
4360
  const raw = rawGraphDataRef.current;
@@ -4267,7 +4375,7 @@ function GraphViewerCanvas(props) {
4267
4375
  },
4268
4376
  [openValidationPanel]
4269
4377
  );
4270
- const decorateEdges = React13.useCallback((graphEdges) => {
4378
+ const decorateEdges = React14.useCallback((graphEdges) => {
4271
4379
  const appEdges = toAppEdges(graphEdges);
4272
4380
  const arrow = selectedArrowRef.current;
4273
4381
  if (!arrow) return appEdges;
@@ -4275,7 +4383,7 @@ function GraphViewerCanvas(props) {
4275
4383
  (e) => e.source === arrow.source && e.target === arrow.target ? __spreadProps(__spreadValues({}, e), { selected: true }) : e
4276
4384
  );
4277
4385
  }, []);
4278
- const frameLayout = React13.useCallback(
4386
+ const frameLayout = React14.useCallback(
4279
4387
  (style, layout, graphspec2, analysis) => GRAPH_STYLE_PIPELINES[style].frame({
4280
4388
  nodes: cloneCachedNodes(layout.nodes),
4281
4389
  edges: layout.edges,
@@ -4294,18 +4402,18 @@ function GraphViewerCanvas(props) {
4294
4402
  const data = initialDataRef.current;
4295
4403
  return cache !== null && data !== null && cache.graphspec === data._graphspec && cache.graphStyle === data._graphStyle;
4296
4404
  };
4297
- const nodesRef = React13.useRef([]);
4405
+ const nodesRef = React14.useRef([]);
4298
4406
  nodesRef.current = nodes;
4299
- const onValidationIssueClickRef = React13.useRef(onValidationIssueClick);
4407
+ const onValidationIssueClickRef = React14.useRef(onValidationIssueClick);
4300
4408
  onValidationIssueClickRef.current = onValidationIssueClick;
4301
- const flashTimeoutRef = React13.useRef(null);
4302
- React13.useEffect(
4409
+ const flashTimeoutRef = React14.useRef(null);
4410
+ React14.useEffect(
4303
4411
  () => () => {
4304
4412
  if (flashTimeoutRef.current) clearTimeout(flashTimeoutRef.current);
4305
4413
  },
4306
4414
  []
4307
4415
  );
4308
- const handleValidationIssueClick = React13.useCallback(
4416
+ const handleValidationIssueClick = React14.useCallback(
4309
4417
  (index, issue) => {
4310
4418
  var _a2, _b2, _c2;
4311
4419
  (_a2 = onValidationIssueClickRef.current) == null ? void 0 : _a2.call(onValidationIssueClickRef, index, issue);
@@ -4348,8 +4456,8 @@ function GraphViewerCanvas(props) {
4348
4456
  },
4349
4457
  [setNodes]
4350
4458
  );
4351
- const drawnSpecRef = React13.useRef(null);
4352
- const reportLayoutFailure = React13.useCallback(
4459
+ const drawnSpecRef = React14.useRef(null);
4460
+ const reportLayoutFailure = React14.useCallback(
4353
4461
  (error, spec, stale) => {
4354
4462
  console.error("[GraphViewer] ELK layout failed:", error);
4355
4463
  const route = routeLayoutFailure({ stale, specDrawn: drawnSpecRef.current === spec });
@@ -4362,7 +4470,7 @@ function GraphViewerCanvas(props) {
4362
4470
  },
4363
4471
  []
4364
4472
  );
4365
- React13.useEffect(() => {
4473
+ React14.useEffect(() => {
4366
4474
  const data = initialDataRef.current;
4367
4475
  if (!data) return;
4368
4476
  let cancelled = false;
@@ -4409,7 +4517,7 @@ function GraphViewerCanvas(props) {
4409
4517
  cancelled = true;
4410
4518
  };
4411
4519
  }, [direction, layoutConfig]);
4412
- React13.useEffect(() => {
4520
+ React14.useEffect(() => {
4413
4521
  const cache = layoutCacheRef.current;
4414
4522
  const data = initialDataRef.current;
4415
4523
  if (!cache || !data || !cacheMatchesData()) return;
@@ -4424,7 +4532,7 @@ function GraphViewerCanvas(props) {
4424
4532
  decorateNodes,
4425
4533
  decorateEdges
4426
4534
  ]);
4427
- React13.useEffect(() => {
4535
+ React14.useEffect(() => {
4428
4536
  var _a2;
4429
4537
  if (!graphspec) {
4430
4538
  initialDataRef.current = null;
@@ -4549,7 +4657,7 @@ function GraphViewerCanvas(props) {
4549
4657
  cancelled = true;
4550
4658
  };
4551
4659
  }, [graphspec, edgeType, graphStyle]);
4552
- React13.useEffect(() => {
4660
+ React14.useEffect(() => {
4553
4661
  if (isFirstFoldEffect.current) {
4554
4662
  isFirstFoldEffect.current = false;
4555
4663
  prevFoldSizeRef.current = foldedControllers.size;
@@ -4629,7 +4737,7 @@ function GraphViewerCanvas(props) {
4629
4737
  cancelled = true;
4630
4738
  };
4631
4739
  }, [foldedControllers, toggleFold]);
4632
- React13.useEffect(() => {
4740
+ React14.useEffect(() => {
4633
4741
  const cache = layoutCacheRef.current;
4634
4742
  const data = initialDataRef.current;
4635
4743
  if (!cache || !data || !cacheMatchesData()) return;
@@ -4637,14 +4745,14 @@ function GraphViewerCanvas(props) {
4637
4745
  setNodes(decorateNodes(withControllers.nodes));
4638
4746
  setEdges(decorateEdges(withControllers.edges));
4639
4747
  }, [statusMap, decorateNodes, decorateEdges]);
4640
- React13.useEffect(() => {
4748
+ React14.useEffect(() => {
4641
4749
  const cache = layoutCacheRef.current;
4642
4750
  const data = initialDataRef.current;
4643
4751
  if (!cache || !data || !cacheMatchesData()) return;
4644
4752
  const withControllers = frameLayout(cache.graphStyle, cache, data._graphspec, data._analysis);
4645
4753
  setNodes(decorateNodes(withControllers.nodes));
4646
4754
  }, [validationIssues, validationWidgetAvailable, decorateNodes]);
4647
- const onNodeClick = React13.useCallback(
4755
+ const onNodeClick = React14.useCallback(
4648
4756
  (event, node) => {
4649
4757
  const nodeData = node.data;
4650
4758
  onNodeSelect == null ? void 0 : onNodeSelect(node.id, nodeData, event);
@@ -4687,7 +4795,7 @@ function GraphViewerCanvas(props) {
4687
4795
  conceptOverride
4688
4796
  ]
4689
4797
  );
4690
- const onEdgeClick = React13.useCallback(
4798
+ const onEdgeClick = React14.useCallback(
4691
4799
  (_event, edge) => {
4692
4800
  setConceptOverride(null);
4693
4801
  const open = (detailSelection == null ? void 0 : detailSelection.kind) === "arrow" && detailSelection.source === edge.source && detailSelection.target === edge.target;
@@ -4699,7 +4807,7 @@ function GraphViewerCanvas(props) {
4699
4807
  },
4700
4808
  [setNodes, setEdges, detailSelection]
4701
4809
  );
4702
- const onOpenNodeFromPanel = React13.useCallback(
4810
+ const onOpenNodeFromPanel = React14.useCallback(
4703
4811
  (nodeId, event) => {
4704
4812
  const node = nodesRef.current.find((n) => n.id === nodeId);
4705
4813
  if (!node) return;
@@ -4715,7 +4823,7 @@ function GraphViewerCanvas(props) {
4715
4823
  },
4716
4824
  [onNodeClick]
4717
4825
  );
4718
- const onInit = React13.useCallback(
4826
+ const onInit = React14.useCallback(
4719
4827
  (reactFlowInstance) => {
4720
4828
  reactFlowRef.current = reactFlowInstance;
4721
4829
  if (onReactFlowInit) {
@@ -4724,8 +4832,8 @@ function GraphViewerCanvas(props) {
4724
4832
  },
4725
4833
  [onReactFlowInit]
4726
4834
  );
4727
- const prevInteractiveRef = React13.useRef(interactive);
4728
- React13.useEffect(() => {
4835
+ const prevInteractiveRef = React14.useRef(interactive);
4836
+ React14.useEffect(() => {
4729
4837
  if (prevInteractiveRef.current === interactive) return;
4730
4838
  prevInteractiveRef.current = interactive;
4731
4839
  if (!interactive) {
@@ -4740,13 +4848,13 @@ function GraphViewerCanvas(props) {
4740
4848
  }, 50);
4741
4849
  return () => clearTimeout(timer);
4742
4850
  }, [interactive]);
4743
- const handlePaneClick = React13.useCallback(() => {
4851
+ const handlePaneClick = React14.useCallback(() => {
4744
4852
  setDetailSelection(null);
4745
4853
  setConceptOverride(null);
4746
4854
  setEdges((eds) => eds.some((e) => e.selected) ? eds.map(deselect) : eds);
4747
4855
  onPaneClick == null ? void 0 : onPaneClick();
4748
4856
  }, [onPaneClick, setEdges]);
4749
- const handleConceptClick = React13.useCallback(
4857
+ const handleConceptClick = React14.useCallback(
4750
4858
  (conceptCode) => {
4751
4859
  if (!graphspec) return;
4752
4860
  const info = resolveConceptRef(graphspec, conceptCode);
@@ -4757,7 +4865,7 @@ function GraphViewerCanvas(props) {
4757
4865
  const detailOpen = detailSelection !== null || conceptOverride !== null;
4758
4866
  const StylePanel = STYLE_DETAIL_PANELS[graphStyle];
4759
4867
  const projectedData = initialDataRef.current;
4760
- const drawing = React13.useMemo(
4868
+ const drawing = React14.useMemo(
4761
4869
  () => {
4762
4870
  var _a2, _b2;
4763
4871
  return projectedData && projectedData._graphStyle === graphStyle && projectedData._valueFlows && projectedData._runs ? {
@@ -4769,7 +4877,7 @@ function GraphViewerCanvas(props) {
4769
4877
  },
4770
4878
  [projectedData, graphStyle]
4771
4879
  );
4772
- const valueOptions = React13.useMemo(
4880
+ const valueOptions = React14.useMemo(
4773
4881
  () => ({
4774
4882
  resolveUrl,
4775
4883
  loadText,
@@ -4796,7 +4904,7 @@ function GraphViewerCanvas(props) {
4796
4904
  const rawAnalysis = (_d = rawGraphDataRef.current) == null ? void 0 : _d.analysis;
4797
4905
  const allControllerIds = rawAnalysis == null ? void 0 : rawAnalysis.controllerNodeIds;
4798
4906
  const foldControlsAvailable = styleCapabilities.foldAll && (!styleCapabilities.controllerFrameToggle || showControllers);
4799
- const foldAllProps = React13.useMemo(() => {
4907
+ const foldAllProps = React14.useMemo(() => {
4800
4908
  if (!foldControlsAvailable || !allControllerIds || allControllerIds.size === 0) {
4801
4909
  return {
4802
4910
  onFoldAll: void 0,
@@ -4818,8 +4926,8 @@ function GraphViewerCanvas(props) {
4818
4926
  expandAllDisabled: foldedControllers.size === 0
4819
4927
  };
4820
4928
  }, [foldControlsAvailable, allControllerIds, foldedControllers, markReaderFolds]);
4821
- const styleMenuOptions = React13.useMemo(() => resolveStyleMenu(styleMenu), [styleMenu]);
4822
- React13.useEffect(() => {
4929
+ const styleMenuOptions = React14.useMemo(() => resolveStyleMenu(styleMenu), [styleMenu]);
4930
+ React14.useEffect(() => {
4823
4931
  if (failed) reactFlowRef.current = null;
4824
4932
  }, [failed]);
4825
4933
  return /* @__PURE__ */ jsx33(
@@ -4834,7 +4942,7 @@ function GraphViewerCanvas(props) {
4834
4942
  }),
4835
4943
  style: interactive || failed ? void 0 : { height: stillHeight },
4836
4944
  inert: !interactive && !failed,
4837
- children: canvasFailure.inPlace !== null ? /* @__PURE__ */ jsx33(GraphErrorState, { failure: canvasFailure.inPlace }) : /* @__PURE__ */ jsxs30(Fragment19, { children: [
4945
+ children: canvasFailure.inPlace !== null ? /* @__PURE__ */ jsx33(GraphErrorState, { failure: canvasFailure.inPlace }) : /* @__PURE__ */ jsxs30(Fragment20, { children: [
4838
4946
  /* @__PURE__ */ jsxs30(
4839
4947
  ReactFlow,
4840
4948
  __spreadProps(__spreadValues({