@pipelex/mthds-ui 0.53.0 → 0.53.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-DUBNSW66.js → chunk-5N3MP5TD.js} +2 -2
- package/dist/{chunk-X7GHQ3SD.js → chunk-6KWNAU4F.js} +1 -1
- package/dist/chunk-6KWNAU4F.js.map +1 -0
- package/dist/{chunk-SCKRIESM.js → chunk-PKCT3ZNX.js} +2 -2
- package/dist/{chunk-CZGIDVT7.js → chunk-S4UMMHLE.js} +2 -2
- package/dist/{chunk-UAYO53EO.js → chunk-XMTXWXFO.js} +3 -3
- package/dist/{chunk-DNYJEPHT.js → chunk-ZRSFFUHA.js} +3 -3
- package/dist/form/react/index.d.ts +1 -1
- package/dist/form/react/index.js +2 -2
- package/dist/graph/index.d.ts +2 -2
- package/dist/graph/index.js +4 -4
- package/dist/graph/react/detail/DetailPanel.css +7 -0
- package/dist/graph/react/index.d.ts +15 -2
- package/dist/graph/react/index.js +296 -185
- package/dist/graph/react/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/{registryJoin-C7paykZ2.d.ts → registryJoin-CMfBspIs.d.ts} +1 -1
- package/dist/standalone/graph-standalone.html +117 -110
- package/dist/standalone/graph-viewer.css +7 -0
- package/dist/standalone/graph-viewer.js +110 -110
- package/dist/static-graph/index.d.ts +1 -1
- package/dist/static-graph/index.js +3 -1
- package/dist/static-graph/index.js.map +1 -1
- package/dist/timeline/index.d.ts +3 -3
- package/dist/timeline/index.js +2 -2
- package/dist/timeline/react/index.d.ts +2 -2
- package/dist/timeline/react/index.js +5 -5
- package/dist/{types-DgYaVX6K.d.ts → types-CnDJyLYo.d.ts} +4 -0
- package/package.json +1 -1
- package/dist/chunk-X7GHQ3SD.js.map +0 -1
- /package/dist/{chunk-DUBNSW66.js.map → chunk-5N3MP5TD.js.map} +0 -0
- /package/dist/{chunk-SCKRIESM.js.map → chunk-PKCT3ZNX.js.map} +0 -0
- /package/dist/{chunk-CZGIDVT7.js.map → chunk-S4UMMHLE.js.map} +0 -0
- /package/dist/{chunk-UAYO53EO.js.map → chunk-XMTXWXFO.js.map} +0 -0
- /package/dist/{chunk-DNYJEPHT.js.map → chunk-ZRSFFUHA.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
styleMenuLabel,
|
|
7
7
|
usePopoverDismiss,
|
|
8
8
|
useSystemTheme
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-ZRSFFUHA.js";
|
|
10
10
|
import {
|
|
11
11
|
GRAPH_STYLE_PIPELINES,
|
|
12
12
|
GraphSpecValidationError,
|
|
@@ -28,16 +28,16 @@ import {
|
|
|
28
28
|
roundedPolylinePath,
|
|
29
29
|
routeLabelCenter,
|
|
30
30
|
validateGraphSpec
|
|
31
|
-
} from "../../chunk-
|
|
31
|
+
} from "../../chunk-PKCT3ZNX.js";
|
|
32
32
|
import {
|
|
33
33
|
GRAPH_STYLES,
|
|
34
34
|
resolveGraphStyle,
|
|
35
35
|
resolveStyleMenu
|
|
36
|
-
} from "../../chunk-
|
|
36
|
+
} from "../../chunk-XMTXWXFO.js";
|
|
37
37
|
import {
|
|
38
38
|
DEFAULT_GRAPH_CONFIG,
|
|
39
39
|
getPaletteForTheme
|
|
40
|
-
} from "../../chunk-
|
|
40
|
+
} from "../../chunk-S4UMMHLE.js";
|
|
41
41
|
import {
|
|
42
42
|
parsePipeRef
|
|
43
43
|
} from "../../chunk-2N65P32H.js";
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
stuffDigestFromId,
|
|
70
70
|
toolbarOrientation,
|
|
71
71
|
toolbarSide
|
|
72
|
-
} from "../../chunk-
|
|
72
|
+
} from "../../chunk-6KWNAU4F.js";
|
|
73
73
|
import {
|
|
74
74
|
__objRest,
|
|
75
75
|
__spreadProps,
|
|
@@ -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
|
|
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
|
|
344
|
+
import React9 from "react";
|
|
345
345
|
|
|
346
346
|
// src/graph/react/detail/StuffResultPanel.tsx
|
|
347
|
-
import * as
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
379
|
-
return (
|
|
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,
|
|
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(
|
|
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
|
|
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] =
|
|
484
|
-
const [copied, setCopied] =
|
|
485
|
-
const [expanded, setExpanded] =
|
|
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
|
|
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(
|
|
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
|
|
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(
|
|
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
|
|
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(
|
|
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
|
|
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(
|
|
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
|
|
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(
|
|
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
|
|
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(
|
|
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(
|
|
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(
|
|
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,14 +1222,15 @@ function PipeComposeSection({
|
|
|
1114
1222
|
}
|
|
1115
1223
|
|
|
1116
1224
|
// src/graph/react/detail/sections/PipeDocGenDetail.tsx
|
|
1117
|
-
import { Fragment as
|
|
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",
|
|
1121
1229
|
template_file: "template file"
|
|
1122
1230
|
};
|
|
1123
1231
|
function declaredSource(blueprint) {
|
|
1124
|
-
if (blueprint.template == null && blueprint.template_file == null
|
|
1232
|
+
if (blueprint.template == null && blueprint.template_file == null && blueprint.template_input == null)
|
|
1233
|
+
return "layout";
|
|
1125
1234
|
if (blueprint.template != null || blueprint.doc_gen_format === "pdf") return "html";
|
|
1126
1235
|
return "template_file";
|
|
1127
1236
|
}
|
|
@@ -1141,7 +1250,7 @@ function PipeDocGenSection({
|
|
|
1141
1250
|
const hasEngine = !!authoredEngine || !!resolvedEngine || ((_a = modelsRan == null ? void 0 : modelsRan.length) != null ? _a : 0) > 0;
|
|
1142
1251
|
const source = (_b = nonEmpty(modelHandles == null ? void 0 : modelHandles.source)) != null ? _b : declaredSource(blueprint);
|
|
1143
1252
|
const renderedFilename = nonEmpty(executionData == null ? void 0 : executionData.filename);
|
|
1144
|
-
return /* @__PURE__ */ jsxs12(
|
|
1253
|
+
return /* @__PURE__ */ jsxs12(Fragment9, { children: [
|
|
1145
1254
|
/* @__PURE__ */ jsx12(KV, { label: "Format", value: format == null ? void 0 : format.toUpperCase() }),
|
|
1146
1255
|
hasEngine ? /* @__PURE__ */ jsx12(
|
|
1147
1256
|
ModelRows,
|
|
@@ -1154,6 +1263,8 @@ function PipeDocGenSection({
|
|
|
1154
1263
|
) : /* @__PURE__ */ jsx12(KV, { label: "Engine", value: "deck default" }),
|
|
1155
1264
|
/* @__PURE__ */ jsx12(KV, { label: "Source", value: (_c = DOC_GEN_SOURCE_LABELS[source]) != null ? _c : source }),
|
|
1156
1265
|
/* @__PURE__ */ jsx12(KV, { label: "Template File", value: blueprint.template_file }),
|
|
1266
|
+
/* @__PURE__ */ jsx12(KV, { label: "Template Input", value: blueprint.template_input }),
|
|
1267
|
+
/* @__PURE__ */ jsx12(KV, { label: "Table Fill", value: blueprint.table_fill }),
|
|
1157
1268
|
/* @__PURE__ */ jsx12(KV, { label: "File Name", value: blueprint.filename }),
|
|
1158
1269
|
renderedFilename && renderedFilename !== blueprint.filename && /* @__PURE__ */ jsx12(KV, { label: "Stored As", value: renderedFilename }),
|
|
1159
1270
|
blueprint.template && /* @__PURE__ */ jsx12(PromptToggle, { label: "Template", templateText: blueprint.template, renderedText: null })
|
|
@@ -1161,14 +1272,14 @@ function PipeDocGenSection({
|
|
|
1161
1272
|
}
|
|
1162
1273
|
|
|
1163
1274
|
// src/graph/react/detail/sections/PipeConditionDetail.tsx
|
|
1164
|
-
import { Fragment as
|
|
1275
|
+
import { Fragment as Fragment10, jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1165
1276
|
function PipeConditionSection({
|
|
1166
1277
|
blueprint,
|
|
1167
1278
|
executionData
|
|
1168
1279
|
}) {
|
|
1169
1280
|
const evaluatedExpression = executionData == null ? void 0 : executionData.evaluated_expression;
|
|
1170
1281
|
const selectedOutcome = executionData == null ? void 0 : executionData.selected_outcome;
|
|
1171
|
-
return /* @__PURE__ */ jsxs13(
|
|
1282
|
+
return /* @__PURE__ */ jsxs13(Fragment10, { children: [
|
|
1172
1283
|
/* @__PURE__ */ jsx13(PromptBlock, { label: "Expression", text: blueprint.expression }),
|
|
1173
1284
|
evaluatedExpression && /* @__PURE__ */ jsx13(KV, { label: "Expression Result", value: evaluatedExpression }),
|
|
1174
1285
|
/* @__PURE__ */ jsxs13("div", { children: [
|
|
@@ -1226,11 +1337,11 @@ function PipeSequenceSection({
|
|
|
1226
1337
|
}
|
|
1227
1338
|
|
|
1228
1339
|
// src/graph/react/detail/sections/PipeParallelDetail.tsx
|
|
1229
|
-
import { Fragment as
|
|
1340
|
+
import { Fragment as Fragment11, jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1230
1341
|
function PipeParallelSection({
|
|
1231
1342
|
blueprint
|
|
1232
1343
|
}) {
|
|
1233
|
-
return /* @__PURE__ */ jsxs15(
|
|
1344
|
+
return /* @__PURE__ */ jsxs15(Fragment11, { children: [
|
|
1234
1345
|
/* @__PURE__ */ jsxs15("div", { children: [
|
|
1235
1346
|
/* @__PURE__ */ jsx15("div", { className: "detail-section-label", children: "Branches" }),
|
|
1236
1347
|
/* @__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 +1358,13 @@ function PipeParallelSection({
|
|
|
1247
1358
|
}
|
|
1248
1359
|
|
|
1249
1360
|
// src/graph/react/detail/sections/PipeBatchDetail.tsx
|
|
1250
|
-
import { Fragment as
|
|
1361
|
+
import { Fragment as Fragment12, jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1251
1362
|
function PipeBatchSection({
|
|
1252
1363
|
blueprint,
|
|
1253
1364
|
executionData
|
|
1254
1365
|
}) {
|
|
1255
1366
|
const itemCount = executionData == null ? void 0 : executionData.item_count;
|
|
1256
|
-
return /* @__PURE__ */ jsxs16(
|
|
1367
|
+
return /* @__PURE__ */ jsxs16(Fragment12, { children: [
|
|
1257
1368
|
/* @__PURE__ */ jsx16(KV, { label: "Branch Pipe", value: blueprint.branch_pipe_code }),
|
|
1258
1369
|
/* @__PURE__ */ jsx16(KV, { label: "Input List Variable", value: blueprint.batch_params.input_list_stuff_name }),
|
|
1259
1370
|
/* @__PURE__ */ jsx16(KV, { label: "Input Item Variable", value: blueprint.batch_params.input_item_stuff_name }),
|
|
@@ -1336,7 +1447,7 @@ function dumpableExecutionData(pipeType, executionData) {
|
|
|
1336
1447
|
}
|
|
1337
1448
|
|
|
1338
1449
|
// src/graph/react/detail/PipeDetailPanel.tsx
|
|
1339
|
-
import { Fragment as
|
|
1450
|
+
import { Fragment as Fragment13, jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1340
1451
|
var PIPE_TYPE_BADGES = {
|
|
1341
1452
|
PipeLLM: "LLM",
|
|
1342
1453
|
PipeExtract: "Extract",
|
|
@@ -1378,12 +1489,12 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
|
|
|
1378
1489
|
const badge = PIPE_TYPE_BADGES[pipeType];
|
|
1379
1490
|
const status = node.status;
|
|
1380
1491
|
const statusColor = (_a = STATUS_COLORS[status]) != null ? _a : "#6272a4";
|
|
1381
|
-
const blueprint =
|
|
1382
|
-
const [usageExpanded, setUsageExpanded] =
|
|
1492
|
+
const blueprint = React7.useMemo(() => resolveNodeBlueprint(spec, node), [spec, node]);
|
|
1493
|
+
const [usageExpanded, setUsageExpanded] = React7.useState(false);
|
|
1383
1494
|
const inputs = (_c = (_b = node.io) == null ? void 0 : _b.inputs) != null ? _c : [];
|
|
1384
1495
|
const outputs = (_e = (_d = node.io) == null ? void 0 : _d.outputs) != null ? _e : [];
|
|
1385
1496
|
const description = (_f = blueprint == null ? void 0 : blueprint.description) != null ? _f : node.description;
|
|
1386
|
-
return /* @__PURE__ */ jsxs19(
|
|
1497
|
+
return /* @__PURE__ */ jsxs19(Fragment13, { children: [
|
|
1387
1498
|
/* @__PURE__ */ jsxs19("div", { className: "detail-sticky-header", children: [
|
|
1388
1499
|
/* @__PURE__ */ jsxs19("div", { className: "detail-header", children: [
|
|
1389
1500
|
/* @__PURE__ */ jsx19(
|
|
@@ -1593,17 +1704,17 @@ function ExecutionDataSection({
|
|
|
1593
1704
|
}
|
|
1594
1705
|
function GenericExecutionData({ entries }) {
|
|
1595
1706
|
if (entries.length === 0) return null;
|
|
1596
|
-
return /* @__PURE__ */ jsxs19(
|
|
1707
|
+
return /* @__PURE__ */ jsxs19(Fragment13, { children: [
|
|
1597
1708
|
/* @__PURE__ */ jsx19("div", { className: "detail-section-label", children: "Execution" }),
|
|
1598
1709
|
entries.map(([key, value]) => /* @__PURE__ */ jsx19(KV, { label: key, value: String(value) }, key))
|
|
1599
1710
|
] });
|
|
1600
1711
|
}
|
|
1601
1712
|
|
|
1602
1713
|
// src/graph/react/styles/simple/SimpleDetailPanel.tsx
|
|
1603
|
-
import
|
|
1714
|
+
import React8 from "react";
|
|
1604
1715
|
|
|
1605
1716
|
// src/graph/react/styles/simple/simpleIcons.tsx
|
|
1606
|
-
import { Fragment as
|
|
1717
|
+
import { Fragment as Fragment14, jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1607
1718
|
var ICON_PROPS = {
|
|
1608
1719
|
viewBox: "0 0 24 24",
|
|
1609
1720
|
fill: "none",
|
|
@@ -1617,12 +1728,12 @@ function Icon({ size = 13, children }) {
|
|
|
1617
1728
|
return /* @__PURE__ */ jsx20("svg", __spreadProps(__spreadValues({}, ICON_PROPS), { width: size, height: size, children }));
|
|
1618
1729
|
}
|
|
1619
1730
|
var CATEGORY_ICONS = {
|
|
1620
|
-
ai: /* @__PURE__ */ jsxs20(
|
|
1731
|
+
ai: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1621
1732
|
/* @__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
1733
|
/* @__PURE__ */ jsx20("path", { d: "M20 3v4" }),
|
|
1623
1734
|
/* @__PURE__ */ jsx20("path", { d: "M22 5h-4" })
|
|
1624
1735
|
] }),
|
|
1625
|
-
extract: /* @__PURE__ */ jsxs20(
|
|
1736
|
+
extract: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1626
1737
|
/* @__PURE__ */ jsx20("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
|
|
1627
1738
|
/* @__PURE__ */ jsx20("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }),
|
|
1628
1739
|
/* @__PURE__ */ jsx20("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }),
|
|
@@ -1631,32 +1742,32 @@ var CATEGORY_ICONS = {
|
|
|
1631
1742
|
/* @__PURE__ */ jsx20("path", { d: "M7 12h10" }),
|
|
1632
1743
|
/* @__PURE__ */ jsx20("path", { d: "M7 16h6" })
|
|
1633
1744
|
] }),
|
|
1634
|
-
image: /* @__PURE__ */ jsxs20(
|
|
1745
|
+
image: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1635
1746
|
/* @__PURE__ */ jsx20("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
1636
1747
|
/* @__PURE__ */ jsx20("circle", { cx: "9", cy: "9", r: "2" }),
|
|
1637
1748
|
/* @__PURE__ */ jsx20("path", { d: "m21 15-3.09-3.09a2 2 0 0 0-2.82 0L6 21" })
|
|
1638
1749
|
] }),
|
|
1639
|
-
search: /* @__PURE__ */ jsxs20(
|
|
1750
|
+
search: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1640
1751
|
/* @__PURE__ */ jsx20("circle", { cx: "11", cy: "11", r: "8" }),
|
|
1641
1752
|
/* @__PURE__ */ jsx20("path", { d: "m21 21-4.3-4.3" })
|
|
1642
1753
|
] }),
|
|
1643
|
-
code: /* @__PURE__ */ jsxs20(
|
|
1754
|
+
code: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1644
1755
|
/* @__PURE__ */ jsx20("polyline", { points: "16 18 22 12 16 6" }),
|
|
1645
1756
|
/* @__PURE__ */ jsx20("polyline", { points: "8 6 2 12 8 18" })
|
|
1646
1757
|
] }),
|
|
1647
|
-
template: /* @__PURE__ */ jsxs20(
|
|
1758
|
+
template: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1648
1759
|
/* @__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
1760
|
/* @__PURE__ */ jsx20("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
1650
1761
|
/* @__PURE__ */ jsx20("path", { d: "M16 13H8" }),
|
|
1651
1762
|
/* @__PURE__ */ jsx20("path", { d: "M16 17H8" })
|
|
1652
1763
|
] }),
|
|
1653
|
-
document: /* @__PURE__ */ jsxs20(
|
|
1764
|
+
document: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1654
1765
|
/* @__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
1766
|
/* @__PURE__ */ jsx20("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
1656
1767
|
/* @__PURE__ */ jsx20("path", { d: "M12 18v-6" }),
|
|
1657
1768
|
/* @__PURE__ */ jsx20("path", { d: "m9 15 3 3 3-3" })
|
|
1658
1769
|
] }),
|
|
1659
|
-
judge: /* @__PURE__ */ jsxs20(
|
|
1770
|
+
judge: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1660
1771
|
/* @__PURE__ */ jsx20("path", { d: "m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
|
|
1661
1772
|
/* @__PURE__ */ jsx20("path", { d: "m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
|
|
1662
1773
|
/* @__PURE__ */ jsx20("path", { d: "M7 21h10" }),
|
|
@@ -1664,25 +1775,25 @@ var CATEGORY_ICONS = {
|
|
|
1664
1775
|
/* @__PURE__ */ jsx20("path", { d: "M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2" })
|
|
1665
1776
|
] }),
|
|
1666
1777
|
planned: /* @__PURE__ */ jsx20("circle", { cx: "12", cy: "12", r: "9", strokeDasharray: "3 3" }),
|
|
1667
|
-
steps: /* @__PURE__ */ jsxs20(
|
|
1778
|
+
steps: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1668
1779
|
/* @__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
1780
|
/* @__PURE__ */ jsx20("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }),
|
|
1670
1781
|
/* @__PURE__ */ jsx20("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" })
|
|
1671
1782
|
] }),
|
|
1672
|
-
parallel: /* @__PURE__ */ jsxs20(
|
|
1783
|
+
parallel: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1673
1784
|
/* @__PURE__ */ jsx20("path", { d: "M16 3h5v5" }),
|
|
1674
1785
|
/* @__PURE__ */ jsx20("path", { d: "M8 3H3v5" }),
|
|
1675
1786
|
/* @__PURE__ */ jsx20("path", { d: "M12 22v-8.3a4 4 0 0 0-1.17-2.87L3 3" }),
|
|
1676
1787
|
/* @__PURE__ */ jsx20("path", { d: "m15 9 6-6" })
|
|
1677
1788
|
] }),
|
|
1678
1789
|
decision: /* @__PURE__ */ jsx20("path", { d: "M12 2 22 12 12 22 2 12Z" }),
|
|
1679
|
-
repeat: /* @__PURE__ */ jsxs20(
|
|
1790
|
+
repeat: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1680
1791
|
/* @__PURE__ */ jsx20("path", { d: "m17 2 4 4-4 4" }),
|
|
1681
1792
|
/* @__PURE__ */ jsx20("path", { d: "M3 11v-1a4 4 0 0 1 4-4h14" }),
|
|
1682
1793
|
/* @__PURE__ */ jsx20("path", { d: "m7 22-4-4 4-4" }),
|
|
1683
1794
|
/* @__PURE__ */ jsx20("path", { d: "M21 13v1a4 4 0 0 1-4 4H3" })
|
|
1684
1795
|
] }),
|
|
1685
|
-
pick: /* @__PURE__ */ jsxs20(
|
|
1796
|
+
pick: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1686
1797
|
/* @__PURE__ */ jsx20("polyline", { points: "15 10 20 15 15 20" }),
|
|
1687
1798
|
/* @__PURE__ */ jsx20("path", { d: "M4 4v7a4 4 0 0 0 4 4h12" })
|
|
1688
1799
|
] })
|
|
@@ -1697,7 +1808,7 @@ var STATUS_LABELS = {
|
|
|
1697
1808
|
};
|
|
1698
1809
|
var STATUS_ICONS = {
|
|
1699
1810
|
succeeded: /* @__PURE__ */ jsx20("polyline", { points: "20 6 9 17 4 12" }),
|
|
1700
|
-
failed: /* @__PURE__ */ jsxs20(
|
|
1811
|
+
failed: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1701
1812
|
/* @__PURE__ */ jsx20("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1702
1813
|
/* @__PURE__ */ jsx20("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1703
1814
|
] }),
|
|
@@ -1803,7 +1914,7 @@ var SIMPLE_DETAIL_STRINGS = {
|
|
|
1803
1914
|
};
|
|
1804
1915
|
|
|
1805
1916
|
// src/graph/react/styles/simple/SimpleDetailPanel.tsx
|
|
1806
|
-
import { Fragment as
|
|
1917
|
+
import { Fragment as Fragment15, jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1807
1918
|
function SimpleDetailPanel(props) {
|
|
1808
1919
|
const { detail } = props;
|
|
1809
1920
|
return /* @__PURE__ */ jsxs21("div", { className: "simple-detail", "data-kind": detail.kind, children: [
|
|
@@ -1826,7 +1937,7 @@ function StepView({
|
|
|
1826
1937
|
}) {
|
|
1827
1938
|
var _a, _b;
|
|
1828
1939
|
const runs = (_b = (_a = detail.run) == null ? void 0 : _a.runs) != null ? _b : 1;
|
|
1829
|
-
return /* @__PURE__ */ jsxs21(
|
|
1940
|
+
return /* @__PURE__ */ jsxs21(Fragment15, { children: [
|
|
1830
1941
|
/* @__PURE__ */ jsx21(
|
|
1831
1942
|
Header,
|
|
1832
1943
|
{
|
|
@@ -1899,7 +2010,7 @@ function DecisionView({
|
|
|
1899
2010
|
renderTechnical,
|
|
1900
2011
|
onOpenNode
|
|
1901
2012
|
}) {
|
|
1902
|
-
return /* @__PURE__ */ jsxs21(
|
|
2013
|
+
return /* @__PURE__ */ jsxs21(Fragment15, { children: [
|
|
1903
2014
|
/* @__PURE__ */ jsx21(Header, { category: "decision", word: SIMPLE_DETAIL_STRINGS.decisionKind, run: detail.run }),
|
|
1904
2015
|
/* @__PURE__ */ jsx21("h2", { className: "simple-detail-title", children: detail.title }),
|
|
1905
2016
|
detail.problem && /* @__PURE__ */ jsx21(PlainProblem, { problem: detail.problem }),
|
|
@@ -1940,7 +2051,7 @@ function FrameView({
|
|
|
1940
2051
|
renderTechnical,
|
|
1941
2052
|
onOpenNode
|
|
1942
2053
|
}) {
|
|
1943
|
-
return /* @__PURE__ */ jsxs21(
|
|
2054
|
+
return /* @__PURE__ */ jsxs21(Fragment15, { children: [
|
|
1944
2055
|
/* @__PURE__ */ jsx21(Header, { category: "repeat", word: SIMPLE_DETAIL_STRINGS.frameKind, run: detail.run, items: detail.items }),
|
|
1945
2056
|
/* @__PURE__ */ jsx21("h2", { className: "simple-detail-title", children: detail.title }),
|
|
1946
2057
|
detail.problem && /* @__PURE__ */ jsx21(PlainProblem, { problem: detail.problem }),
|
|
@@ -1968,7 +2079,7 @@ function ValueView({
|
|
|
1968
2079
|
const { value, role } = detail;
|
|
1969
2080
|
const shown = showsValues(mode) ? renderValue == null ? void 0 : renderValue(value) : null;
|
|
1970
2081
|
const links = role === "input" ? value.to : value.from;
|
|
1971
|
-
return /* @__PURE__ */ jsxs21(
|
|
2082
|
+
return /* @__PURE__ */ jsxs21(Fragment15, { children: [
|
|
1972
2083
|
/* @__PURE__ */ jsx21("div", { className: "simple-detail-header", children: /* @__PURE__ */ jsxs21("span", { className: `simple-detail-kind simple-detail-kind--${role}`, children: [
|
|
1973
2084
|
/* @__PURE__ */ jsx21(DocumentIcon, { list: value.isList }),
|
|
1974
2085
|
role === "input" ? SIMPLE_DETAIL_STRINGS.inputKind : SIMPLE_DETAIL_STRINGS.outputKind
|
|
@@ -1979,7 +2090,7 @@ function ValueView({
|
|
|
1979
2090
|
mode === GRAPH_SPEC_MODE.DRY && /* @__PURE__ */ jsx21("p", { className: "simple-detail-note", children: SIMPLE_DETAIL_STRINGS.dryRunValues }),
|
|
1980
2091
|
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
2092
|
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(
|
|
2093
|
+
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
2094
|
/* @__PURE__ */ jsx21("dt", { children: field.title }),
|
|
1984
2095
|
field.description && /* @__PURE__ */ jsx21("dd", { children: field.description })
|
|
1985
2096
|
] }, field.title)) }) }),
|
|
@@ -1987,7 +2098,7 @@ function ValueView({
|
|
|
1987
2098
|
] });
|
|
1988
2099
|
}
|
|
1989
2100
|
function ArrowView({ detail, mode, renderValue, onOpenNode }) {
|
|
1990
|
-
return /* @__PURE__ */ jsxs21(
|
|
2101
|
+
return /* @__PURE__ */ jsxs21(Fragment15, { children: [
|
|
1991
2102
|
/* @__PURE__ */ jsx21("div", { className: "simple-detail-header", children: /* @__PURE__ */ jsxs21("span", { className: "simple-detail-kind", children: [
|
|
1992
2103
|
/* @__PURE__ */ jsxs21(Icon, { children: [
|
|
1993
2104
|
/* @__PURE__ */ jsx21("path", { d: "M5 12h14" }),
|
|
@@ -2064,7 +2175,7 @@ function Fold({
|
|
|
2064
2175
|
children,
|
|
2065
2176
|
defaultOpen = false
|
|
2066
2177
|
}) {
|
|
2067
|
-
const [open, setOpen] =
|
|
2178
|
+
const [open, setOpen] = React8.useState(defaultOpen);
|
|
2068
2179
|
return /* @__PURE__ */ jsxs21(
|
|
2069
2180
|
"details",
|
|
2070
2181
|
{
|
|
@@ -2135,7 +2246,7 @@ function ValueLinks({
|
|
|
2135
2246
|
if (links.length === 0) return null;
|
|
2136
2247
|
return /* @__PURE__ */ jsxs21("p", { className: "simple-value-links", children: [
|
|
2137
2248
|
/* @__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(
|
|
2249
|
+
links.map((link, index) => /* @__PURE__ */ jsxs21(React8.Fragment, { children: [
|
|
2139
2250
|
index > 0 && /* @__PURE__ */ jsx21("span", { className: "simple-value-links-sep", children: ", " }),
|
|
2140
2251
|
/* @__PURE__ */ jsx21(NodeLink, { link, onOpenNode })
|
|
2141
2252
|
] }, link.nodeId))
|
|
@@ -2205,7 +2316,7 @@ function resultDescriptors(graph) {
|
|
|
2205
2316
|
}
|
|
2206
2317
|
|
|
2207
2318
|
// src/graph/react/viewer/styleDetailPanels.tsx
|
|
2208
|
-
import { Fragment as
|
|
2319
|
+
import { Fragment as Fragment16, jsx as jsx22 } from "react/jsx-runtime";
|
|
2209
2320
|
function selectedNodeId(selection) {
|
|
2210
2321
|
return selection && selection.kind !== "arrow" ? selection.nodeId : null;
|
|
2211
2322
|
}
|
|
@@ -2287,7 +2398,7 @@ function StuffNodeDetail(_a) {
|
|
|
2287
2398
|
);
|
|
2288
2399
|
}
|
|
2289
2400
|
if (isDryRun) return /* @__PURE__ */ jsx22("div", { className: "detail-not-available", children: "Dry run data hidden" });
|
|
2290
|
-
return /* @__PURE__ */ jsx22(
|
|
2401
|
+
return /* @__PURE__ */ jsx22(Fragment16, { children: (_a2 = renderData == null ? void 0 : renderData()) != null ? _a2 : /* @__PURE__ */ jsx22("div", { className: "detail-not-available", children: "No data" }) });
|
|
2291
2402
|
}
|
|
2292
2403
|
function ResultView({
|
|
2293
2404
|
artifacts,
|
|
@@ -2321,7 +2432,7 @@ function ResultView({
|
|
|
2321
2432
|
}
|
|
2322
2433
|
function SimpleStylePanel(props) {
|
|
2323
2434
|
const { selection, graphspec, artifacts, theme, valueOptions, nodes, drawing, onOpenNode } = props;
|
|
2324
|
-
const detail =
|
|
2435
|
+
const detail = React9.useMemo(() => {
|
|
2325
2436
|
if (!graphspec || !drawing) return null;
|
|
2326
2437
|
const target = selection.kind === "arrow" ? { kind: "arrow", source: selection.source, target: selection.target } : { kind: "node", id: selection.nodeId };
|
|
2327
2438
|
return buildSimpleNodeDetail(
|
|
@@ -2566,7 +2677,7 @@ function placeCanvasFailure({
|
|
|
2566
2677
|
}
|
|
2567
2678
|
|
|
2568
2679
|
// src/graph/react/viewer/GraphErrorState.tsx
|
|
2569
|
-
import
|
|
2680
|
+
import React10 from "react";
|
|
2570
2681
|
import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2571
2682
|
var GRAPH_ERROR_STATE_TITLE = "This method graph could not be drawn";
|
|
2572
2683
|
function GraphErrorState({ failure }) {
|
|
@@ -2595,7 +2706,7 @@ function GraphRelayoutFailure({
|
|
|
2595
2706
|
}
|
|
2596
2707
|
);
|
|
2597
2708
|
}
|
|
2598
|
-
var GraphFailureBoundary = class extends
|
|
2709
|
+
var GraphFailureBoundary = class extends React10.Component {
|
|
2599
2710
|
constructor() {
|
|
2600
2711
|
super(...arguments);
|
|
2601
2712
|
this.state = { failure: null, resetKey: this.props.resetKey };
|
|
@@ -2616,7 +2727,7 @@ var GraphFailureBoundary = class extends React9.Component {
|
|
|
2616
2727
|
};
|
|
2617
2728
|
|
|
2618
2729
|
// src/graph/react/viewer/GraphToolbar.tsx
|
|
2619
|
-
import
|
|
2730
|
+
import React11 from "react";
|
|
2620
2731
|
import { Panel } from "@xyflow/react";
|
|
2621
2732
|
|
|
2622
2733
|
// src/graph/react/viewer/ValidationPanel.tsx
|
|
@@ -2736,7 +2847,7 @@ function ValidationPanel({
|
|
|
2736
2847
|
}
|
|
2737
2848
|
|
|
2738
2849
|
// src/graph/react/viewer/GraphToolbar.tsx
|
|
2739
|
-
import { Fragment as
|
|
2850
|
+
import { Fragment as Fragment17, jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2740
2851
|
var REACTFLOW_PANEL_MARGIN = 15;
|
|
2741
2852
|
var ARROW_RIGHT_ICON = /* @__PURE__ */ jsxs25(
|
|
2742
2853
|
"svg",
|
|
@@ -3098,11 +3209,11 @@ function GraphToolbar({
|
|
|
3098
3209
|
const orientation = toolbarOrientation(position);
|
|
3099
3210
|
const setValidationOpen = onValidationOpenChange != null ? onValidationOpenChange : (() => {
|
|
3100
3211
|
});
|
|
3101
|
-
const setValidationOpenRef =
|
|
3212
|
+
const setValidationOpenRef = React11.useRef(setValidationOpen);
|
|
3102
3213
|
setValidationOpenRef.current = setValidationOpen;
|
|
3103
|
-
const validationRef =
|
|
3104
|
-
const validationPanelId =
|
|
3105
|
-
|
|
3214
|
+
const validationRef = React11.useRef(null);
|
|
3215
|
+
const validationPanelId = React11.useId();
|
|
3216
|
+
React11.useEffect(() => {
|
|
3106
3217
|
if (validationState === void 0) setValidationOpenRef.current(false);
|
|
3107
3218
|
}, [validationState]);
|
|
3108
3219
|
usePopoverDismiss(validationOpen, validationRef, () => setValidationOpenRef.current(false));
|
|
@@ -3122,7 +3233,7 @@ function GraphToolbar({
|
|
|
3122
3233
|
className: `graph-toolbar-panel graph-toolbar-panel--${orientation}`,
|
|
3123
3234
|
style: panelStyle,
|
|
3124
3235
|
children: /* @__PURE__ */ jsxs25("div", { className: `graph-toolbar graph-toolbar--${orientation}`, children: [
|
|
3125
|
-
validationState !== void 0 && /* @__PURE__ */ jsxs25(
|
|
3236
|
+
validationState !== void 0 && /* @__PURE__ */ jsxs25(Fragment17, { children: [
|
|
3126
3237
|
/* @__PURE__ */ jsxs25("div", { className: "graph-toolbar-validation", ref: validationRef, children: [
|
|
3127
3238
|
/* @__PURE__ */ jsxs25(
|
|
3128
3239
|
"button",
|
|
@@ -3154,7 +3265,7 @@ function GraphToolbar({
|
|
|
3154
3265
|
] }),
|
|
3155
3266
|
/* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" })
|
|
3156
3267
|
] }),
|
|
3157
|
-
styleMenuEnabled && /* @__PURE__ */ jsxs25(
|
|
3268
|
+
styleMenuEnabled && /* @__PURE__ */ jsxs25(Fragment17, { children: [
|
|
3158
3269
|
/* @__PURE__ */ jsx26(
|
|
3159
3270
|
StyleMenu,
|
|
3160
3271
|
{
|
|
@@ -3251,7 +3362,7 @@ function GraphToolbar({
|
|
|
3251
3362
|
children: FIT_VIEW_ICON
|
|
3252
3363
|
}
|
|
3253
3364
|
),
|
|
3254
|
-
themeToggleEnabled && /* @__PURE__ */ jsxs25(
|
|
3365
|
+
themeToggleEnabled && /* @__PURE__ */ jsxs25(Fragment17, { children: [
|
|
3255
3366
|
/* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" }),
|
|
3256
3367
|
/* @__PURE__ */ jsx26(
|
|
3257
3368
|
"button",
|
|
@@ -3271,7 +3382,7 @@ function GraphToolbar({
|
|
|
3271
3382
|
}
|
|
3272
3383
|
|
|
3273
3384
|
// src/graph/react/viewer/StillFit.tsx
|
|
3274
|
-
import
|
|
3385
|
+
import React12 from "react";
|
|
3275
3386
|
import { useEdges, useNodes, useNodesInitialized, useReactFlow, useStore } from "@xyflow/react";
|
|
3276
3387
|
|
|
3277
3388
|
// src/graph/react/viewer/stillViewport.ts
|
|
@@ -3318,7 +3429,7 @@ function StillFit({ onHeight }) {
|
|
|
3318
3429
|
const nodes = useNodes();
|
|
3319
3430
|
const edges = useEdges();
|
|
3320
3431
|
const { getNodesBounds, setViewport } = useReactFlow();
|
|
3321
|
-
|
|
3432
|
+
React12.useLayoutEffect(() => {
|
|
3322
3433
|
if (!nodesInitialized || nodes.length === 0) return;
|
|
3323
3434
|
const bounds = stillContentBounds(
|
|
3324
3435
|
getNodesBounds(nodes),
|
|
@@ -3439,7 +3550,7 @@ var controllerNodeTypes = { controllerGroup: ControllerGroupNode };
|
|
|
3439
3550
|
import { Handle, Position } from "@xyflow/react";
|
|
3440
3551
|
|
|
3441
3552
|
// src/graph/react/nodes/pipe/PipeCardBase.tsx
|
|
3442
|
-
import { useState as
|
|
3553
|
+
import { useState as useState3 } from "react";
|
|
3443
3554
|
import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3444
3555
|
var PIPE_TYPE_BADGES2 = {
|
|
3445
3556
|
PipeLLM: "LLM",
|
|
@@ -3490,7 +3601,7 @@ function PipeCardBase({ data, children }) {
|
|
|
3490
3601
|
const isStatic = data.graphMode === "static";
|
|
3491
3602
|
const outcome = isStatic ? (_a = data.tags) == null ? void 0 : _a.outcome : void 0;
|
|
3492
3603
|
const batchMultiplicity = isStatic ? (_b = data.tags) == null ? void 0 : _b.batch_multiplicity : void 0;
|
|
3493
|
-
const [inputsExpanded, setInputsExpanded] =
|
|
3604
|
+
const [inputsExpanded, setInputsExpanded] = useState3(false);
|
|
3494
3605
|
const hasMany = data.inputs.length > MAX_VISIBLE_INPUTS;
|
|
3495
3606
|
const visibleInputs = hasMany && !inputsExpanded ? data.inputs.slice(0, MAX_VISIBLE_INPUTS) : data.inputs;
|
|
3496
3607
|
const hiddenCount = data.inputs.length - MAX_VISIBLE_INPUTS;
|
|
@@ -3623,7 +3734,7 @@ function getPipeCardComponent(pipeType) {
|
|
|
3623
3734
|
}
|
|
3624
3735
|
|
|
3625
3736
|
// src/graph/react/nodes/pipe/PipeCardNode.tsx
|
|
3626
|
-
import { Fragment as
|
|
3737
|
+
import { Fragment as Fragment18, jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3627
3738
|
function PipeCardNode({ data }) {
|
|
3628
3739
|
var _a;
|
|
3629
3740
|
const Card = (_a = getPipeCardComponent(data.pipeType)) != null ? _a : PipeCardBase;
|
|
@@ -3636,7 +3747,7 @@ function PipeCardRFNode({
|
|
|
3636
3747
|
}) {
|
|
3637
3748
|
const payload = data.pipeCardData;
|
|
3638
3749
|
if (!payload) return null;
|
|
3639
|
-
return /* @__PURE__ */ jsxs28(
|
|
3750
|
+
return /* @__PURE__ */ jsxs28(Fragment18, { children: [
|
|
3640
3751
|
/* @__PURE__ */ jsx30(Handle, { type: "target", position: targetPosition }),
|
|
3641
3752
|
/* @__PURE__ */ jsx30(PipeCardNode, { data: payload }),
|
|
3642
3753
|
/* @__PURE__ */ jsx30(Handle, { type: "source", position: sourcePosition })
|
|
@@ -3645,7 +3756,7 @@ function PipeCardRFNode({
|
|
|
3645
3756
|
|
|
3646
3757
|
// src/graph/react/styles/simple/SimpleNodes.tsx
|
|
3647
3758
|
import { Handle as Handle2, Position as Position2 } from "@xyflow/react";
|
|
3648
|
-
import { Fragment as
|
|
3759
|
+
import { Fragment as Fragment19, jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3649
3760
|
var EXPAND_ICON2 = /* @__PURE__ */ jsxs29(Icon, { size: 12, children: [
|
|
3650
3761
|
/* @__PURE__ */ jsx31("polyline", { points: "15 3 21 3 21 9" }),
|
|
3651
3762
|
/* @__PURE__ */ jsx31("polyline", { points: "9 21 3 21 3 15" }),
|
|
@@ -3675,7 +3786,7 @@ function Handles({
|
|
|
3675
3786
|
targetPosition = Position2.Left,
|
|
3676
3787
|
children
|
|
3677
3788
|
}) {
|
|
3678
|
-
return /* @__PURE__ */ jsxs29(
|
|
3789
|
+
return /* @__PURE__ */ jsxs29(Fragment19, { children: [
|
|
3679
3790
|
/* @__PURE__ */ jsx31(Handle2, { type: "target", position: targetPosition, className: "simple-handle" }),
|
|
3680
3791
|
children,
|
|
3681
3792
|
/* @__PURE__ */ jsx31(Handle2, { type: "source", position: sourcePosition, className: "simple-handle" })
|
|
@@ -3760,7 +3871,7 @@ function SimpleTerminalNode({ data, sourcePosition, targetPosition }) {
|
|
|
3760
3871
|
{
|
|
3761
3872
|
className: `simple-terminal simple-terminal--${terminal.kind}${terminal.isList ? " simple-terminal--list" : ""}`,
|
|
3762
3873
|
children: [
|
|
3763
|
-
terminal.isList && /* @__PURE__ */ jsxs29(
|
|
3874
|
+
terminal.isList && /* @__PURE__ */ jsxs29(Fragment19, { children: [
|
|
3764
3875
|
/* @__PURE__ */ jsx31(DocumentShape, { className: "simple-terminal-shape simple-terminal-shape--back2" }),
|
|
3765
3876
|
/* @__PURE__ */ jsx31(DocumentShape, { className: "simple-terminal-shape simple-terminal-shape--back1" })
|
|
3766
3877
|
] }),
|
|
@@ -3893,7 +4004,7 @@ function RoutedEdge({
|
|
|
3893
4004
|
}
|
|
3894
4005
|
|
|
3895
4006
|
// src/graph/react/viewer/GraphViewer.tsx
|
|
3896
|
-
import { Fragment as
|
|
4007
|
+
import { Fragment as Fragment20, jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3897
4008
|
var nodeTypes = __spreadValues(__spreadProps(__spreadValues({}, controllerNodeTypes), {
|
|
3898
4009
|
pipeCard: PipeCardRFNode
|
|
3899
4010
|
}), simpleNodeTypes);
|
|
@@ -4053,31 +4164,31 @@ function GraphViewerCanvas(props) {
|
|
|
4053
4164
|
onFailure
|
|
4054
4165
|
} = props;
|
|
4055
4166
|
const graphspecProp = (_a = graph == null ? void 0 : graph.graphSpec) != null ? _a : null;
|
|
4056
|
-
const { graphspec, failure: specFailure } =
|
|
4167
|
+
const { graphspec, failure: specFailure } = React14.useMemo(
|
|
4057
4168
|
() => readGraphSpec(graphspecProp),
|
|
4058
4169
|
[graphspecProp]
|
|
4059
4170
|
);
|
|
4060
|
-
const graphspecRef =
|
|
4171
|
+
const graphspecRef = React14.useRef(graphspec);
|
|
4061
4172
|
graphspecRef.current = graphspec;
|
|
4062
|
-
const [layoutFailure, setLayoutFailure] =
|
|
4173
|
+
const [layoutFailure, setLayoutFailure] = React14.useState(null);
|
|
4063
4174
|
const canvasFailure = placeCanvasFailure({
|
|
4064
4175
|
specFailure,
|
|
4065
4176
|
layoutFailure: layoutFailureFor(layoutFailure, graphspec),
|
|
4066
4177
|
interactive
|
|
4067
4178
|
});
|
|
4068
4179
|
const failed = canvasFailure.inPlace !== null;
|
|
4069
|
-
const onFailureRef =
|
|
4180
|
+
const onFailureRef = React14.useRef(onFailure);
|
|
4070
4181
|
onFailureRef.current = onFailure;
|
|
4071
|
-
const [direction, setDirection] =
|
|
4182
|
+
const [direction, setDirection] = React14.useState(
|
|
4072
4183
|
() => {
|
|
4073
4184
|
var _a2, _b2;
|
|
4074
4185
|
return (_b2 = (_a2 = initialDirection != null ? initialDirection : config.direction) != null ? _a2 : DEFAULT_GRAPH_CONFIG.direction) != null ? _b2 : GRAPH_DIRECTION.TB;
|
|
4075
4186
|
}
|
|
4076
4187
|
);
|
|
4077
4188
|
const externalMode = resolveExternalThemeMode(themeProp, config.theme);
|
|
4078
|
-
const [mode, setMode] =
|
|
4079
|
-
const prevExternalModeRef =
|
|
4080
|
-
|
|
4189
|
+
const [mode, setMode] = React14.useState(externalMode);
|
|
4190
|
+
const prevExternalModeRef = React14.useRef(externalMode);
|
|
4191
|
+
React14.useEffect(() => {
|
|
4081
4192
|
if (externalMode !== prevExternalModeRef.current) {
|
|
4082
4193
|
prevExternalModeRef.current = externalMode;
|
|
4083
4194
|
setMode(externalMode);
|
|
@@ -4085,13 +4196,13 @@ function GraphViewerCanvas(props) {
|
|
|
4085
4196
|
}, [externalMode]);
|
|
4086
4197
|
const systemTheme = useSystemTheme(systemThemeProp);
|
|
4087
4198
|
const resolvedTheme = resolveActiveTheme(mode, systemTheme);
|
|
4088
|
-
const onThemeChangeRef =
|
|
4199
|
+
const onThemeChangeRef = React14.useRef(onThemeChange);
|
|
4089
4200
|
onThemeChangeRef.current = onThemeChange;
|
|
4090
|
-
const prevReportedRef =
|
|
4201
|
+
const prevReportedRef = React14.useRef({
|
|
4091
4202
|
mode,
|
|
4092
4203
|
resolvedTheme
|
|
4093
4204
|
});
|
|
4094
|
-
|
|
4205
|
+
React14.useEffect(() => {
|
|
4095
4206
|
var _a2;
|
|
4096
4207
|
const prev = prevReportedRef.current;
|
|
4097
4208
|
if (prev.mode !== mode || prev.resolvedTheme !== resolvedTheme) {
|
|
@@ -4100,48 +4211,48 @@ function GraphViewerCanvas(props) {
|
|
|
4100
4211
|
}
|
|
4101
4212
|
}, [mode, resolvedTheme]);
|
|
4102
4213
|
const externalStyle = resolveGraphStyle(graphStyleProp, config.graphStyle);
|
|
4103
|
-
const [graphStyle, setGraphStyle] =
|
|
4104
|
-
const prevExternalStyleRef =
|
|
4105
|
-
|
|
4214
|
+
const [graphStyle, setGraphStyle] = React14.useState(externalStyle);
|
|
4215
|
+
const prevExternalStyleRef = React14.useRef(externalStyle);
|
|
4216
|
+
React14.useEffect(() => {
|
|
4106
4217
|
if (externalStyle !== prevExternalStyleRef.current) {
|
|
4107
4218
|
prevExternalStyleRef.current = externalStyle;
|
|
4108
4219
|
setGraphStyle(externalStyle);
|
|
4109
4220
|
}
|
|
4110
4221
|
}, [externalStyle]);
|
|
4111
|
-
const onGraphStyleChangeRef =
|
|
4222
|
+
const onGraphStyleChangeRef = React14.useRef(onGraphStyleChange);
|
|
4112
4223
|
onGraphStyleChangeRef.current = onGraphStyleChange;
|
|
4113
|
-
const prevReportedStyleRef =
|
|
4114
|
-
|
|
4224
|
+
const prevReportedStyleRef = React14.useRef(graphStyle);
|
|
4225
|
+
React14.useEffect(() => {
|
|
4115
4226
|
var _a2;
|
|
4116
4227
|
if (prevReportedStyleRef.current !== graphStyle) {
|
|
4117
4228
|
prevReportedStyleRef.current = graphStyle;
|
|
4118
4229
|
(_a2 = onGraphStyleChangeRef.current) == null ? void 0 : _a2.call(onGraphStyleChangeRef, graphStyle);
|
|
4119
4230
|
}
|
|
4120
4231
|
}, [graphStyle]);
|
|
4121
|
-
const graphStyleRef =
|
|
4232
|
+
const graphStyleRef = React14.useRef(graphStyle);
|
|
4122
4233
|
graphStyleRef.current = graphStyle;
|
|
4123
4234
|
const styleCapabilities = GRAPH_STYLES[graphStyle].capabilities;
|
|
4124
4235
|
const effectiveFoldMode = (_c = (_b = initialFoldMode != null ? initialFoldMode : config.foldMode) != null ? _b : DEFAULT_GRAPH_CONFIG.foldMode) != null ? _c : FOLD_MODE.EXPANDED;
|
|
4125
|
-
const [showControllers, setShowControllers] =
|
|
4236
|
+
const [showControllers, setShowControllers] = React14.useState(() => {
|
|
4126
4237
|
var _a2, _b2;
|
|
4127
4238
|
if (effectiveFoldMode === FOLD_MODE.FOLDED) return true;
|
|
4128
4239
|
return (_b2 = (_a2 = initialShowControllers != null ? initialShowControllers : config.showControllers) != null ? _a2 : DEFAULT_GRAPH_CONFIG.showControllers) != null ? _b2 : false;
|
|
4129
4240
|
});
|
|
4130
|
-
const foldModeRef =
|
|
4241
|
+
const foldModeRef = React14.useRef(effectiveFoldMode);
|
|
4131
4242
|
foldModeRef.current = effectiveFoldMode;
|
|
4132
|
-
const containerRef =
|
|
4133
|
-
const [detailSelection, setDetailSelection] =
|
|
4134
|
-
const [conceptOverride, setConceptOverride] =
|
|
4243
|
+
const containerRef = React14.useRef(null);
|
|
4244
|
+
const [detailSelection, setDetailSelection] = React14.useState(null);
|
|
4245
|
+
const [conceptOverride, setConceptOverride] = React14.useState(null);
|
|
4135
4246
|
const {
|
|
4136
4247
|
width: panelWidth,
|
|
4137
4248
|
isDragging: isPanelDragging,
|
|
4138
4249
|
handleMouseDown: onResizeMouseDown
|
|
4139
4250
|
} = useResizable({ defaultWidth: 380, minWidth: 280, maxWidth: 800, containerRef });
|
|
4140
|
-
|
|
4251
|
+
React14.useEffect(() => {
|
|
4141
4252
|
setDetailSelection(null);
|
|
4142
4253
|
setConceptOverride(null);
|
|
4143
4254
|
}, [graphspec]);
|
|
4144
|
-
|
|
4255
|
+
React14.useEffect(() => {
|
|
4145
4256
|
const el = containerRef.current;
|
|
4146
4257
|
if (!el) return;
|
|
4147
4258
|
const themePalette = getPaletteForTheme(resolvedTheme);
|
|
@@ -4156,15 +4267,15 @@ function GraphViewerCanvas(props) {
|
|
|
4156
4267
|
}
|
|
4157
4268
|
};
|
|
4158
4269
|
}, [config.paletteColors, resolvedTheme]);
|
|
4159
|
-
const [stillHeight, setStillHeight] =
|
|
4270
|
+
const [stillHeight, setStillHeight] = React14.useState(STILL_PLACEHOLDER_HEIGHT_PX);
|
|
4160
4271
|
const [nodes, setNodes, onNodesChange] = useNodesState([]);
|
|
4161
4272
|
const [edges, setEdges, onEdgesChange] = useEdgesState([]);
|
|
4162
|
-
const reactFlowRef =
|
|
4163
|
-
const initialDataRef =
|
|
4164
|
-
const rawGraphDataRef =
|
|
4165
|
-
const layoutCacheRef =
|
|
4166
|
-
const [expandedControllers, setExpandedControllers] =
|
|
4167
|
-
const toggleCollapse =
|
|
4273
|
+
const reactFlowRef = React14.useRef(null);
|
|
4274
|
+
const initialDataRef = React14.useRef(null);
|
|
4275
|
+
const rawGraphDataRef = React14.useRef(null);
|
|
4276
|
+
const layoutCacheRef = React14.useRef(null);
|
|
4277
|
+
const [expandedControllers, setExpandedControllers] = React14.useState(/* @__PURE__ */ new Set());
|
|
4278
|
+
const toggleCollapse = React14.useCallback((controllerId) => {
|
|
4168
4279
|
setExpandedControllers((prev) => {
|
|
4169
4280
|
const next = new Set(prev);
|
|
4170
4281
|
if (next.has(controllerId)) next.delete(controllerId);
|
|
@@ -4172,17 +4283,17 @@ function GraphViewerCanvas(props) {
|
|
|
4172
4283
|
return next;
|
|
4173
4284
|
});
|
|
4174
4285
|
}, []);
|
|
4175
|
-
const [foldedControllers, setFoldedControllers] =
|
|
4176
|
-
const styleDefaultFoldsRef =
|
|
4177
|
-
const readerOpenedRef =
|
|
4178
|
-
const markReaderFolds =
|
|
4286
|
+
const [foldedControllers, setFoldedControllers] = React14.useState(/* @__PURE__ */ new Set());
|
|
4287
|
+
const styleDefaultFoldsRef = React14.useRef(/* @__PURE__ */ new Set());
|
|
4288
|
+
const readerOpenedRef = React14.useRef(/* @__PURE__ */ new Set());
|
|
4289
|
+
const markReaderFolds = React14.useCallback((ids, folded) => {
|
|
4179
4290
|
for (const id of ids) {
|
|
4180
4291
|
styleDefaultFoldsRef.current.delete(id);
|
|
4181
4292
|
if (folded) readerOpenedRef.current.delete(id);
|
|
4182
4293
|
else readerOpenedRef.current.add(id);
|
|
4183
4294
|
}
|
|
4184
4295
|
}, []);
|
|
4185
|
-
const toggleFold =
|
|
4296
|
+
const toggleFold = React14.useCallback(
|
|
4186
4297
|
(controllerId, options) => {
|
|
4187
4298
|
setFoldedControllers((prev) => {
|
|
4188
4299
|
const next = new Set(prev);
|
|
@@ -4200,53 +4311,53 @@ function GraphViewerCanvas(props) {
|
|
|
4200
4311
|
[markReaderFolds]
|
|
4201
4312
|
);
|
|
4202
4313
|
const edgeType = config.edgeType || EDGE_TYPE.DEFAULT;
|
|
4203
|
-
const layoutConfig =
|
|
4314
|
+
const layoutConfig = React14.useMemo(
|
|
4204
4315
|
() => ({ nodesep: config.nodesep, ranksep: config.ranksep }),
|
|
4205
4316
|
[config.nodesep, config.ranksep]
|
|
4206
4317
|
);
|
|
4207
|
-
const showControllersRef =
|
|
4318
|
+
const showControllersRef = React14.useRef(showControllers);
|
|
4208
4319
|
showControllersRef.current = showControllers;
|
|
4209
|
-
const directionRef =
|
|
4320
|
+
const directionRef = React14.useRef(direction);
|
|
4210
4321
|
directionRef.current = direction;
|
|
4211
|
-
const layoutConfigRef =
|
|
4322
|
+
const layoutConfigRef = React14.useRef(layoutConfig);
|
|
4212
4323
|
layoutConfigRef.current = layoutConfig;
|
|
4213
|
-
const initialZoomRef =
|
|
4324
|
+
const initialZoomRef = React14.useRef(config.initialZoom);
|
|
4214
4325
|
initialZoomRef.current = config.initialZoom;
|
|
4215
|
-
const panToTopRef =
|
|
4326
|
+
const panToTopRef = React14.useRef(config.panToTop);
|
|
4216
4327
|
panToTopRef.current = config.panToTop;
|
|
4217
|
-
const interactiveRef =
|
|
4328
|
+
const interactiveRef = React14.useRef(interactive);
|
|
4218
4329
|
interactiveRef.current = interactive;
|
|
4219
|
-
const expandedRef =
|
|
4330
|
+
const expandedRef = React14.useRef(expandedControllers);
|
|
4220
4331
|
expandedRef.current = expandedControllers;
|
|
4221
|
-
const toggleCollapseRef =
|
|
4332
|
+
const toggleCollapseRef = React14.useRef(toggleCollapse);
|
|
4222
4333
|
toggleCollapseRef.current = toggleCollapse;
|
|
4223
|
-
const foldedRef =
|
|
4334
|
+
const foldedRef = React14.useRef(foldedControllers);
|
|
4224
4335
|
foldedRef.current = foldedControllers;
|
|
4225
|
-
const toggleFoldRef =
|
|
4336
|
+
const toggleFoldRef = React14.useRef(toggleFold);
|
|
4226
4337
|
toggleFoldRef.current = toggleFold;
|
|
4227
|
-
const isFirstFoldEffect =
|
|
4228
|
-
const prevFoldSizeRef =
|
|
4229
|
-
const skipNextFoldEffectRef =
|
|
4230
|
-
const statusMapRef =
|
|
4338
|
+
const isFirstFoldEffect = React14.useRef(true);
|
|
4339
|
+
const prevFoldSizeRef = React14.useRef(0);
|
|
4340
|
+
const skipNextFoldEffectRef = React14.useRef(false);
|
|
4341
|
+
const statusMapRef = React14.useRef(statusMap);
|
|
4231
4342
|
statusMapRef.current = statusMap;
|
|
4232
|
-
const validationIssuesRef =
|
|
4343
|
+
const validationIssuesRef = React14.useRef(validationIssues);
|
|
4233
4344
|
validationIssuesRef.current = validationIssues;
|
|
4234
|
-
const selectedNodeIdRef =
|
|
4345
|
+
const selectedNodeIdRef = React14.useRef(null);
|
|
4235
4346
|
selectedNodeIdRef.current = selectedNodeId(detailSelection);
|
|
4236
|
-
const selectedArrowRef =
|
|
4347
|
+
const selectedArrowRef = React14.useRef(null);
|
|
4237
4348
|
selectedArrowRef.current = (detailSelection == null ? void 0 : detailSelection.kind) === "arrow" ? detailSelection : null;
|
|
4238
|
-
|
|
4349
|
+
React14.useEffect(() => {
|
|
4239
4350
|
if ((detailSelection == null ? void 0 : detailSelection.kind) !== "arrow") return;
|
|
4240
4351
|
const { source, target } = detailSelection;
|
|
4241
4352
|
const drawn = edges.some((e) => e.source === source && e.target === target);
|
|
4242
4353
|
if (!styleCapabilities.valueArrows || !drawn) setDetailSelection(null);
|
|
4243
4354
|
}, [detailSelection, edges, styleCapabilities.valueArrows]);
|
|
4244
|
-
const [validationOpen, setValidationOpen] =
|
|
4245
|
-
const openValidationPanel =
|
|
4355
|
+
const [validationOpen, setValidationOpen] = React14.useState(false);
|
|
4356
|
+
const openValidationPanel = React14.useCallback(() => setValidationOpen(true), []);
|
|
4246
4357
|
const validationWidgetAvailable = validationState !== void 0 && !hideToolbar && interactive;
|
|
4247
|
-
const validationWidgetAvailableRef =
|
|
4358
|
+
const validationWidgetAvailableRef = React14.useRef(validationWidgetAvailable);
|
|
4248
4359
|
validationWidgetAvailableRef.current = validationWidgetAvailable;
|
|
4249
|
-
const decorateNodes =
|
|
4360
|
+
const decorateNodes = React14.useCallback(
|
|
4250
4361
|
(nodes2) => {
|
|
4251
4362
|
var _a2, _b2, _c2;
|
|
4252
4363
|
const raw = rawGraphDataRef.current;
|
|
@@ -4267,7 +4378,7 @@ function GraphViewerCanvas(props) {
|
|
|
4267
4378
|
},
|
|
4268
4379
|
[openValidationPanel]
|
|
4269
4380
|
);
|
|
4270
|
-
const decorateEdges =
|
|
4381
|
+
const decorateEdges = React14.useCallback((graphEdges) => {
|
|
4271
4382
|
const appEdges = toAppEdges(graphEdges);
|
|
4272
4383
|
const arrow = selectedArrowRef.current;
|
|
4273
4384
|
if (!arrow) return appEdges;
|
|
@@ -4275,7 +4386,7 @@ function GraphViewerCanvas(props) {
|
|
|
4275
4386
|
(e) => e.source === arrow.source && e.target === arrow.target ? __spreadProps(__spreadValues({}, e), { selected: true }) : e
|
|
4276
4387
|
);
|
|
4277
4388
|
}, []);
|
|
4278
|
-
const frameLayout =
|
|
4389
|
+
const frameLayout = React14.useCallback(
|
|
4279
4390
|
(style, layout, graphspec2, analysis) => GRAPH_STYLE_PIPELINES[style].frame({
|
|
4280
4391
|
nodes: cloneCachedNodes(layout.nodes),
|
|
4281
4392
|
edges: layout.edges,
|
|
@@ -4294,18 +4405,18 @@ function GraphViewerCanvas(props) {
|
|
|
4294
4405
|
const data = initialDataRef.current;
|
|
4295
4406
|
return cache !== null && data !== null && cache.graphspec === data._graphspec && cache.graphStyle === data._graphStyle;
|
|
4296
4407
|
};
|
|
4297
|
-
const nodesRef =
|
|
4408
|
+
const nodesRef = React14.useRef([]);
|
|
4298
4409
|
nodesRef.current = nodes;
|
|
4299
|
-
const onValidationIssueClickRef =
|
|
4410
|
+
const onValidationIssueClickRef = React14.useRef(onValidationIssueClick);
|
|
4300
4411
|
onValidationIssueClickRef.current = onValidationIssueClick;
|
|
4301
|
-
const flashTimeoutRef =
|
|
4302
|
-
|
|
4412
|
+
const flashTimeoutRef = React14.useRef(null);
|
|
4413
|
+
React14.useEffect(
|
|
4303
4414
|
() => () => {
|
|
4304
4415
|
if (flashTimeoutRef.current) clearTimeout(flashTimeoutRef.current);
|
|
4305
4416
|
},
|
|
4306
4417
|
[]
|
|
4307
4418
|
);
|
|
4308
|
-
const handleValidationIssueClick =
|
|
4419
|
+
const handleValidationIssueClick = React14.useCallback(
|
|
4309
4420
|
(index, issue) => {
|
|
4310
4421
|
var _a2, _b2, _c2;
|
|
4311
4422
|
(_a2 = onValidationIssueClickRef.current) == null ? void 0 : _a2.call(onValidationIssueClickRef, index, issue);
|
|
@@ -4348,8 +4459,8 @@ function GraphViewerCanvas(props) {
|
|
|
4348
4459
|
},
|
|
4349
4460
|
[setNodes]
|
|
4350
4461
|
);
|
|
4351
|
-
const drawnSpecRef =
|
|
4352
|
-
const reportLayoutFailure =
|
|
4462
|
+
const drawnSpecRef = React14.useRef(null);
|
|
4463
|
+
const reportLayoutFailure = React14.useCallback(
|
|
4353
4464
|
(error, spec, stale) => {
|
|
4354
4465
|
console.error("[GraphViewer] ELK layout failed:", error);
|
|
4355
4466
|
const route = routeLayoutFailure({ stale, specDrawn: drawnSpecRef.current === spec });
|
|
@@ -4362,7 +4473,7 @@ function GraphViewerCanvas(props) {
|
|
|
4362
4473
|
},
|
|
4363
4474
|
[]
|
|
4364
4475
|
);
|
|
4365
|
-
|
|
4476
|
+
React14.useEffect(() => {
|
|
4366
4477
|
const data = initialDataRef.current;
|
|
4367
4478
|
if (!data) return;
|
|
4368
4479
|
let cancelled = false;
|
|
@@ -4409,7 +4520,7 @@ function GraphViewerCanvas(props) {
|
|
|
4409
4520
|
cancelled = true;
|
|
4410
4521
|
};
|
|
4411
4522
|
}, [direction, layoutConfig]);
|
|
4412
|
-
|
|
4523
|
+
React14.useEffect(() => {
|
|
4413
4524
|
const cache = layoutCacheRef.current;
|
|
4414
4525
|
const data = initialDataRef.current;
|
|
4415
4526
|
if (!cache || !data || !cacheMatchesData()) return;
|
|
@@ -4424,7 +4535,7 @@ function GraphViewerCanvas(props) {
|
|
|
4424
4535
|
decorateNodes,
|
|
4425
4536
|
decorateEdges
|
|
4426
4537
|
]);
|
|
4427
|
-
|
|
4538
|
+
React14.useEffect(() => {
|
|
4428
4539
|
var _a2;
|
|
4429
4540
|
if (!graphspec) {
|
|
4430
4541
|
initialDataRef.current = null;
|
|
@@ -4549,7 +4660,7 @@ function GraphViewerCanvas(props) {
|
|
|
4549
4660
|
cancelled = true;
|
|
4550
4661
|
};
|
|
4551
4662
|
}, [graphspec, edgeType, graphStyle]);
|
|
4552
|
-
|
|
4663
|
+
React14.useEffect(() => {
|
|
4553
4664
|
if (isFirstFoldEffect.current) {
|
|
4554
4665
|
isFirstFoldEffect.current = false;
|
|
4555
4666
|
prevFoldSizeRef.current = foldedControllers.size;
|
|
@@ -4629,7 +4740,7 @@ function GraphViewerCanvas(props) {
|
|
|
4629
4740
|
cancelled = true;
|
|
4630
4741
|
};
|
|
4631
4742
|
}, [foldedControllers, toggleFold]);
|
|
4632
|
-
|
|
4743
|
+
React14.useEffect(() => {
|
|
4633
4744
|
const cache = layoutCacheRef.current;
|
|
4634
4745
|
const data = initialDataRef.current;
|
|
4635
4746
|
if (!cache || !data || !cacheMatchesData()) return;
|
|
@@ -4637,14 +4748,14 @@ function GraphViewerCanvas(props) {
|
|
|
4637
4748
|
setNodes(decorateNodes(withControllers.nodes));
|
|
4638
4749
|
setEdges(decorateEdges(withControllers.edges));
|
|
4639
4750
|
}, [statusMap, decorateNodes, decorateEdges]);
|
|
4640
|
-
|
|
4751
|
+
React14.useEffect(() => {
|
|
4641
4752
|
const cache = layoutCacheRef.current;
|
|
4642
4753
|
const data = initialDataRef.current;
|
|
4643
4754
|
if (!cache || !data || !cacheMatchesData()) return;
|
|
4644
4755
|
const withControllers = frameLayout(cache.graphStyle, cache, data._graphspec, data._analysis);
|
|
4645
4756
|
setNodes(decorateNodes(withControllers.nodes));
|
|
4646
4757
|
}, [validationIssues, validationWidgetAvailable, decorateNodes]);
|
|
4647
|
-
const onNodeClick =
|
|
4758
|
+
const onNodeClick = React14.useCallback(
|
|
4648
4759
|
(event, node) => {
|
|
4649
4760
|
const nodeData = node.data;
|
|
4650
4761
|
onNodeSelect == null ? void 0 : onNodeSelect(node.id, nodeData, event);
|
|
@@ -4687,7 +4798,7 @@ function GraphViewerCanvas(props) {
|
|
|
4687
4798
|
conceptOverride
|
|
4688
4799
|
]
|
|
4689
4800
|
);
|
|
4690
|
-
const onEdgeClick =
|
|
4801
|
+
const onEdgeClick = React14.useCallback(
|
|
4691
4802
|
(_event, edge) => {
|
|
4692
4803
|
setConceptOverride(null);
|
|
4693
4804
|
const open = (detailSelection == null ? void 0 : detailSelection.kind) === "arrow" && detailSelection.source === edge.source && detailSelection.target === edge.target;
|
|
@@ -4699,7 +4810,7 @@ function GraphViewerCanvas(props) {
|
|
|
4699
4810
|
},
|
|
4700
4811
|
[setNodes, setEdges, detailSelection]
|
|
4701
4812
|
);
|
|
4702
|
-
const onOpenNodeFromPanel =
|
|
4813
|
+
const onOpenNodeFromPanel = React14.useCallback(
|
|
4703
4814
|
(nodeId, event) => {
|
|
4704
4815
|
const node = nodesRef.current.find((n) => n.id === nodeId);
|
|
4705
4816
|
if (!node) return;
|
|
@@ -4715,7 +4826,7 @@ function GraphViewerCanvas(props) {
|
|
|
4715
4826
|
},
|
|
4716
4827
|
[onNodeClick]
|
|
4717
4828
|
);
|
|
4718
|
-
const onInit =
|
|
4829
|
+
const onInit = React14.useCallback(
|
|
4719
4830
|
(reactFlowInstance) => {
|
|
4720
4831
|
reactFlowRef.current = reactFlowInstance;
|
|
4721
4832
|
if (onReactFlowInit) {
|
|
@@ -4724,8 +4835,8 @@ function GraphViewerCanvas(props) {
|
|
|
4724
4835
|
},
|
|
4725
4836
|
[onReactFlowInit]
|
|
4726
4837
|
);
|
|
4727
|
-
const prevInteractiveRef =
|
|
4728
|
-
|
|
4838
|
+
const prevInteractiveRef = React14.useRef(interactive);
|
|
4839
|
+
React14.useEffect(() => {
|
|
4729
4840
|
if (prevInteractiveRef.current === interactive) return;
|
|
4730
4841
|
prevInteractiveRef.current = interactive;
|
|
4731
4842
|
if (!interactive) {
|
|
@@ -4740,13 +4851,13 @@ function GraphViewerCanvas(props) {
|
|
|
4740
4851
|
}, 50);
|
|
4741
4852
|
return () => clearTimeout(timer);
|
|
4742
4853
|
}, [interactive]);
|
|
4743
|
-
const handlePaneClick =
|
|
4854
|
+
const handlePaneClick = React14.useCallback(() => {
|
|
4744
4855
|
setDetailSelection(null);
|
|
4745
4856
|
setConceptOverride(null);
|
|
4746
4857
|
setEdges((eds) => eds.some((e) => e.selected) ? eds.map(deselect) : eds);
|
|
4747
4858
|
onPaneClick == null ? void 0 : onPaneClick();
|
|
4748
4859
|
}, [onPaneClick, setEdges]);
|
|
4749
|
-
const handleConceptClick =
|
|
4860
|
+
const handleConceptClick = React14.useCallback(
|
|
4750
4861
|
(conceptCode) => {
|
|
4751
4862
|
if (!graphspec) return;
|
|
4752
4863
|
const info = resolveConceptRef(graphspec, conceptCode);
|
|
@@ -4757,7 +4868,7 @@ function GraphViewerCanvas(props) {
|
|
|
4757
4868
|
const detailOpen = detailSelection !== null || conceptOverride !== null;
|
|
4758
4869
|
const StylePanel = STYLE_DETAIL_PANELS[graphStyle];
|
|
4759
4870
|
const projectedData = initialDataRef.current;
|
|
4760
|
-
const drawing =
|
|
4871
|
+
const drawing = React14.useMemo(
|
|
4761
4872
|
() => {
|
|
4762
4873
|
var _a2, _b2;
|
|
4763
4874
|
return projectedData && projectedData._graphStyle === graphStyle && projectedData._valueFlows && projectedData._runs ? {
|
|
@@ -4769,7 +4880,7 @@ function GraphViewerCanvas(props) {
|
|
|
4769
4880
|
},
|
|
4770
4881
|
[projectedData, graphStyle]
|
|
4771
4882
|
);
|
|
4772
|
-
const valueOptions =
|
|
4883
|
+
const valueOptions = React14.useMemo(
|
|
4773
4884
|
() => ({
|
|
4774
4885
|
resolveUrl,
|
|
4775
4886
|
loadText,
|
|
@@ -4796,7 +4907,7 @@ function GraphViewerCanvas(props) {
|
|
|
4796
4907
|
const rawAnalysis = (_d = rawGraphDataRef.current) == null ? void 0 : _d.analysis;
|
|
4797
4908
|
const allControllerIds = rawAnalysis == null ? void 0 : rawAnalysis.controllerNodeIds;
|
|
4798
4909
|
const foldControlsAvailable = styleCapabilities.foldAll && (!styleCapabilities.controllerFrameToggle || showControllers);
|
|
4799
|
-
const foldAllProps =
|
|
4910
|
+
const foldAllProps = React14.useMemo(() => {
|
|
4800
4911
|
if (!foldControlsAvailable || !allControllerIds || allControllerIds.size === 0) {
|
|
4801
4912
|
return {
|
|
4802
4913
|
onFoldAll: void 0,
|
|
@@ -4818,8 +4929,8 @@ function GraphViewerCanvas(props) {
|
|
|
4818
4929
|
expandAllDisabled: foldedControllers.size === 0
|
|
4819
4930
|
};
|
|
4820
4931
|
}, [foldControlsAvailable, allControllerIds, foldedControllers, markReaderFolds]);
|
|
4821
|
-
const styleMenuOptions =
|
|
4822
|
-
|
|
4932
|
+
const styleMenuOptions = React14.useMemo(() => resolveStyleMenu(styleMenu), [styleMenu]);
|
|
4933
|
+
React14.useEffect(() => {
|
|
4823
4934
|
if (failed) reactFlowRef.current = null;
|
|
4824
4935
|
}, [failed]);
|
|
4825
4936
|
return /* @__PURE__ */ jsx33(
|
|
@@ -4834,7 +4945,7 @@ function GraphViewerCanvas(props) {
|
|
|
4834
4945
|
}),
|
|
4835
4946
|
style: interactive || failed ? void 0 : { height: stillHeight },
|
|
4836
4947
|
inert: !interactive && !failed,
|
|
4837
|
-
children: canvasFailure.inPlace !== null ? /* @__PURE__ */ jsx33(GraphErrorState, { failure: canvasFailure.inPlace }) : /* @__PURE__ */ jsxs30(
|
|
4948
|
+
children: canvasFailure.inPlace !== null ? /* @__PURE__ */ jsx33(GraphErrorState, { failure: canvasFailure.inPlace }) : /* @__PURE__ */ jsxs30(Fragment20, { children: [
|
|
4838
4949
|
/* @__PURE__ */ jsxs30(
|
|
4839
4950
|
ReactFlow,
|
|
4840
4951
|
__spreadProps(__spreadValues({
|