@pipelex/mthds-ui 0.52.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.
- package/dist/form/index.d.ts +1 -1
- package/dist/form/react/index.d.ts +23 -6
- package/dist/form/react/index.js +8 -3
- package/dist/form/react/index.js.map +1 -1
- package/dist/graph/react/detail/DetailPanel.css +7 -0
- package/dist/graph/react/index.d.ts +51 -2
- package/dist/graph/react/index.js +304 -183
- package/dist/graph/react/index.js.map +1 -1
- package/dist/standalone/graph-standalone.html +140 -133
- package/dist/standalone/graph-viewer.css +8 -1
- package/dist/standalone/graph-viewer.js +132 -132
- package/package.json +2 -2
|
@@ -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,
|
|
@@ -366,25 +447,41 @@ function StuffResultPanel({
|
|
|
366
447
|
producerPipeRef,
|
|
367
448
|
consumer,
|
|
368
449
|
resolveUrl,
|
|
450
|
+
loadText,
|
|
369
451
|
resolveRendition,
|
|
370
452
|
resolveDocumentPdf,
|
|
371
453
|
resolveShareUrl,
|
|
372
454
|
saveFiles,
|
|
373
455
|
downloads
|
|
374
456
|
}) {
|
|
375
|
-
|
|
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(
|
|
376
461
|
() => {
|
|
377
|
-
var
|
|
378
|
-
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
|
+
);
|
|
379
468
|
},
|
|
380
|
-
[pipeIoContracts, outputForm, inputForm, producerPipeRef,
|
|
469
|
+
[pipeIoContracts, outputForm, inputForm, producerPipeRef, consumerPipeRef, consumerSlot]
|
|
381
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");
|
|
382
478
|
if (field) {
|
|
383
|
-
const panel = /* @__PURE__ */ jsx3(
|
|
384
|
-
return resolveUrl || resolveRendition || resolveDocumentPdf || resolveShareUrl || saveFiles || downloads ? /* @__PURE__ */ jsx3(
|
|
479
|
+
const panel = /* @__PURE__ */ jsx3(LoadedStuffViewer, { field, nodeKey, value: stuff.data, name: stuff.name });
|
|
480
|
+
return resolveUrl || loadText || resolveRendition || resolveDocumentPdf || resolveShareUrl || saveFiles || downloads ? /* @__PURE__ */ jsx3(
|
|
385
481
|
ResultEnvProvider,
|
|
386
482
|
{
|
|
387
483
|
resolveUrl,
|
|
484
|
+
loadText,
|
|
388
485
|
resolveRendition,
|
|
389
486
|
resolveDocumentPdf,
|
|
390
487
|
resolveShareUrl,
|
|
@@ -396,6 +493,19 @@ function StuffResultPanel({
|
|
|
396
493
|
}
|
|
397
494
|
return stuff.data === void 0 || stuff.data === null ? null : /* @__PURE__ */ jsx3(UndescribedValue, { value: stuff.data });
|
|
398
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
|
+
}
|
|
399
509
|
function UndescribedValue({ value }) {
|
|
400
510
|
const s = useFieldStrings();
|
|
401
511
|
return /* @__PURE__ */ jsxs3("div", { className: "space-y-2", children: [
|
|
@@ -429,10 +539,10 @@ function fromConsumer(contracts, inputForm, consumer) {
|
|
|
429
539
|
}
|
|
430
540
|
|
|
431
541
|
// src/graph/react/detail/PipeDetailPanel.tsx
|
|
432
|
-
import
|
|
542
|
+
import React7 from "react";
|
|
433
543
|
|
|
434
544
|
// src/graph/react/detail/sections/shared.tsx
|
|
435
|
-
import { useState } from "react";
|
|
545
|
+
import { useState as useState2 } from "react";
|
|
436
546
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
437
547
|
function formatDuration(seconds) {
|
|
438
548
|
if (seconds < 1) return `${(seconds * 1e3).toFixed(0)}ms`;
|
|
@@ -478,9 +588,9 @@ function PromptToggle({
|
|
|
478
588
|
templateText,
|
|
479
589
|
renderedText
|
|
480
590
|
}) {
|
|
481
|
-
const [showTemplate, setShowTemplate] =
|
|
482
|
-
const [copied, setCopied] =
|
|
483
|
-
const [expanded, setExpanded] =
|
|
591
|
+
const [showTemplate, setShowTemplate] = useState2(false);
|
|
592
|
+
const [copied, setCopied] = useState2(false);
|
|
593
|
+
const [expanded, setExpanded] = useState2(false);
|
|
484
594
|
const hasTemplate = !!templateText;
|
|
485
595
|
const hasRendered = !!renderedText;
|
|
486
596
|
if (!hasTemplate && !hasRendered) return null;
|
|
@@ -764,7 +874,7 @@ function UsageDetails({
|
|
|
764
874
|
}
|
|
765
875
|
|
|
766
876
|
// src/graph/react/detail/sections/PipeLLMDetail.tsx
|
|
767
|
-
import { Fragment as
|
|
877
|
+
import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
768
878
|
function PipeLLMSection({
|
|
769
879
|
blueprint,
|
|
770
880
|
executionData,
|
|
@@ -788,7 +898,7 @@ function PipeLLMSection({
|
|
|
788
898
|
const hasDistinctObjectRequest = Boolean(
|
|
789
899
|
authoredModelForObject && authoredModelForObject !== authoredModel
|
|
790
900
|
);
|
|
791
|
-
return /* @__PURE__ */ jsxs6(
|
|
901
|
+
return /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
792
902
|
/* @__PURE__ */ jsx6(ModelRows, { modelsRan, authored: authoredModel, handle: resolvedModel }),
|
|
793
903
|
hasDistinctObjectRequest && /* @__PURE__ */ jsx6(
|
|
794
904
|
ModelRows,
|
|
@@ -844,7 +954,7 @@ function PipeLLMSection({
|
|
|
844
954
|
}
|
|
845
955
|
|
|
846
956
|
// src/graph/react/detail/sections/PipeImgGenDetail.tsx
|
|
847
|
-
import { Fragment as
|
|
957
|
+
import { Fragment as Fragment4, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
848
958
|
function PipeImgGenSection({
|
|
849
959
|
blueprint,
|
|
850
960
|
executionData,
|
|
@@ -856,7 +966,7 @@ function PipeImgGenSection({
|
|
|
856
966
|
const resolvedModel = modelHandles == null ? void 0 : modelHandles.resolved_model;
|
|
857
967
|
const renderedPrompt = executionData == null ? void 0 : executionData.rendered_prompt;
|
|
858
968
|
const renderedNegative = executionData == null ? void 0 : executionData.rendered_negative_prompt;
|
|
859
|
-
return /* @__PURE__ */ jsxs7(
|
|
969
|
+
return /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
860
970
|
/* @__PURE__ */ jsx7(ModelRows, { modelsRan, authored: blueprint.img_gen_choice, handle: resolvedModel }),
|
|
861
971
|
/* @__PURE__ */ jsx7(
|
|
862
972
|
PromptToggle,
|
|
@@ -890,14 +1000,14 @@ function PipeImgGenSection({
|
|
|
890
1000
|
}
|
|
891
1001
|
|
|
892
1002
|
// src/graph/react/detail/sections/PipeExtractDetail.tsx
|
|
893
|
-
import { Fragment as
|
|
1003
|
+
import { Fragment as Fragment5, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
894
1004
|
function PipeExtractSection({
|
|
895
1005
|
blueprint,
|
|
896
1006
|
modelsRan,
|
|
897
1007
|
modelHandles
|
|
898
1008
|
}) {
|
|
899
1009
|
const resolvedModel = modelHandles == null ? void 0 : modelHandles.resolved_model;
|
|
900
|
-
return /* @__PURE__ */ jsxs8(
|
|
1010
|
+
return /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
|
901
1011
|
/* @__PURE__ */ jsx8(ModelRows, { modelsRan, authored: blueprint.extract_choice, handle: resolvedModel }),
|
|
902
1012
|
/* @__PURE__ */ jsx8(KV, { label: "Document Variable", value: blueprint.document_stuff_name }),
|
|
903
1013
|
/* @__PURE__ */ jsx8(KV, { label: "Caption Images", value: blueprint.should_caption_images }),
|
|
@@ -911,7 +1021,7 @@ function PipeExtractSection({
|
|
|
911
1021
|
}
|
|
912
1022
|
|
|
913
1023
|
// src/graph/react/detail/sections/PipeSearchDetail.tsx
|
|
914
|
-
import { Fragment as
|
|
1024
|
+
import { Fragment as Fragment6, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
915
1025
|
function PipeSearchSection({
|
|
916
1026
|
blueprint,
|
|
917
1027
|
executionData,
|
|
@@ -920,7 +1030,7 @@ function PipeSearchSection({
|
|
|
920
1030
|
}) {
|
|
921
1031
|
const resolvedModel = modelHandles == null ? void 0 : modelHandles.resolved_model;
|
|
922
1032
|
const renderedQuery = executionData == null ? void 0 : executionData.rendered_query;
|
|
923
|
-
return /* @__PURE__ */ jsxs9(
|
|
1033
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
924
1034
|
/* @__PURE__ */ jsx9(ModelRows, { modelsRan, authored: blueprint.search_choice, handle: resolvedModel }),
|
|
925
1035
|
/* @__PURE__ */ jsx9(
|
|
926
1036
|
PromptToggle,
|
|
@@ -959,7 +1069,7 @@ function labelFromLlmChoice(choice) {
|
|
|
959
1069
|
}
|
|
960
1070
|
|
|
961
1071
|
// src/graph/react/detail/sections/PipeStructureDetail.tsx
|
|
962
|
-
import { Fragment as
|
|
1072
|
+
import { Fragment as Fragment7, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
963
1073
|
function PipeStructureSection({
|
|
964
1074
|
blueprint,
|
|
965
1075
|
executionData,
|
|
@@ -970,7 +1080,7 @@ function PipeStructureSection({
|
|
|
970
1080
|
const isMultipleOutput = executionData == null ? void 0 : executionData.is_multiple_output;
|
|
971
1081
|
const renderedUser = executionData == null ? void 0 : executionData.rendered_user_prompt;
|
|
972
1082
|
const authoredModel = labelFromLlmChoice(blueprint.llm_choice);
|
|
973
|
-
return /* @__PURE__ */ jsxs10(
|
|
1083
|
+
return /* @__PURE__ */ jsxs10(Fragment7, { children: [
|
|
974
1084
|
/* @__PURE__ */ jsx10(ModelRows, { modelsRan, authored: authoredModel, handle: resolvedModel }),
|
|
975
1085
|
/* @__PURE__ */ jsx10(KV, { label: "Text Variable", value: blueprint.text_input_name }),
|
|
976
1086
|
/* @__PURE__ */ jsx10(KV, { label: "Multiple Output", value: isMultipleOutput }),
|
|
@@ -980,7 +1090,7 @@ function PipeStructureSection({
|
|
|
980
1090
|
}
|
|
981
1091
|
|
|
982
1092
|
// src/graph/react/detail/sections/PipeComposeDetail.tsx
|
|
983
|
-
import { Fragment as
|
|
1093
|
+
import { Fragment as Fragment8, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
984
1094
|
function formatLeafField(field) {
|
|
985
1095
|
var _a, _b;
|
|
986
1096
|
switch (field.method) {
|
|
@@ -1024,7 +1134,7 @@ function ConstructFieldsBlock({
|
|
|
1024
1134
|
}
|
|
1025
1135
|
}
|
|
1026
1136
|
const indentStyle = depth > 0 ? { paddingLeft: depth * 12 } : void 0;
|
|
1027
|
-
return /* @__PURE__ */ jsxs11(
|
|
1137
|
+
return /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
|
1028
1138
|
leafFields.map(([name, field]) => {
|
|
1029
1139
|
const display = formatLeafField(field);
|
|
1030
1140
|
if (isLongValue(display)) {
|
|
@@ -1085,7 +1195,7 @@ function PipeComposeSection({
|
|
|
1085
1195
|
const fieldResolutions = (_a = executionData == null ? void 0 : executionData.fields) != null ? _a : null;
|
|
1086
1196
|
const constructBlueprint = blueprint.construct_blueprint;
|
|
1087
1197
|
const hasConstruct = constructBlueprint != null && Object.keys(constructBlueprint.fields).length > 0;
|
|
1088
|
-
return /* @__PURE__ */ jsxs11(
|
|
1198
|
+
return /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
|
1089
1199
|
/* @__PURE__ */ jsx11(KV, { label: "Mode", value: composeMode || (hasConstruct ? "construct" : "template") }),
|
|
1090
1200
|
/* @__PURE__ */ jsx11(KV, { label: "Category", value: blueprint.category }),
|
|
1091
1201
|
/* @__PURE__ */ jsx11(KV, { label: "Templating Style", value: blueprint.templating_style }),
|
|
@@ -1097,7 +1207,7 @@ function PipeComposeSection({
|
|
|
1097
1207
|
renderedText
|
|
1098
1208
|
}
|
|
1099
1209
|
),
|
|
1100
|
-
hasConstruct && /* @__PURE__ */ jsxs11(
|
|
1210
|
+
hasConstruct && /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
|
1101
1211
|
/* @__PURE__ */ jsx11("div", { className: "detail-section-label", children: "FIELDS" }),
|
|
1102
1212
|
/* @__PURE__ */ jsx11(
|
|
1103
1213
|
ConstructFieldsBlock,
|
|
@@ -1112,7 +1222,7 @@ function PipeComposeSection({
|
|
|
1112
1222
|
}
|
|
1113
1223
|
|
|
1114
1224
|
// src/graph/react/detail/sections/PipeDocGenDetail.tsx
|
|
1115
|
-
import { Fragment as
|
|
1225
|
+
import { Fragment as Fragment9, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1116
1226
|
var DOC_GEN_SOURCE_LABELS = {
|
|
1117
1227
|
layout: "auto-layout",
|
|
1118
1228
|
html: "HTML template",
|
|
@@ -1139,7 +1249,7 @@ function PipeDocGenSection({
|
|
|
1139
1249
|
const hasEngine = !!authoredEngine || !!resolvedEngine || ((_a = modelsRan == null ? void 0 : modelsRan.length) != null ? _a : 0) > 0;
|
|
1140
1250
|
const source = (_b = nonEmpty(modelHandles == null ? void 0 : modelHandles.source)) != null ? _b : declaredSource(blueprint);
|
|
1141
1251
|
const renderedFilename = nonEmpty(executionData == null ? void 0 : executionData.filename);
|
|
1142
|
-
return /* @__PURE__ */ jsxs12(
|
|
1252
|
+
return /* @__PURE__ */ jsxs12(Fragment9, { children: [
|
|
1143
1253
|
/* @__PURE__ */ jsx12(KV, { label: "Format", value: format == null ? void 0 : format.toUpperCase() }),
|
|
1144
1254
|
hasEngine ? /* @__PURE__ */ jsx12(
|
|
1145
1255
|
ModelRows,
|
|
@@ -1159,14 +1269,14 @@ function PipeDocGenSection({
|
|
|
1159
1269
|
}
|
|
1160
1270
|
|
|
1161
1271
|
// src/graph/react/detail/sections/PipeConditionDetail.tsx
|
|
1162
|
-
import { Fragment as
|
|
1272
|
+
import { Fragment as Fragment10, jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1163
1273
|
function PipeConditionSection({
|
|
1164
1274
|
blueprint,
|
|
1165
1275
|
executionData
|
|
1166
1276
|
}) {
|
|
1167
1277
|
const evaluatedExpression = executionData == null ? void 0 : executionData.evaluated_expression;
|
|
1168
1278
|
const selectedOutcome = executionData == null ? void 0 : executionData.selected_outcome;
|
|
1169
|
-
return /* @__PURE__ */ jsxs13(
|
|
1279
|
+
return /* @__PURE__ */ jsxs13(Fragment10, { children: [
|
|
1170
1280
|
/* @__PURE__ */ jsx13(PromptBlock, { label: "Expression", text: blueprint.expression }),
|
|
1171
1281
|
evaluatedExpression && /* @__PURE__ */ jsx13(KV, { label: "Expression Result", value: evaluatedExpression }),
|
|
1172
1282
|
/* @__PURE__ */ jsxs13("div", { children: [
|
|
@@ -1224,11 +1334,11 @@ function PipeSequenceSection({
|
|
|
1224
1334
|
}
|
|
1225
1335
|
|
|
1226
1336
|
// src/graph/react/detail/sections/PipeParallelDetail.tsx
|
|
1227
|
-
import { Fragment as
|
|
1337
|
+
import { Fragment as Fragment11, jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1228
1338
|
function PipeParallelSection({
|
|
1229
1339
|
blueprint
|
|
1230
1340
|
}) {
|
|
1231
|
-
return /* @__PURE__ */ jsxs15(
|
|
1341
|
+
return /* @__PURE__ */ jsxs15(Fragment11, { children: [
|
|
1232
1342
|
/* @__PURE__ */ jsxs15("div", { children: [
|
|
1233
1343
|
/* @__PURE__ */ jsx15("div", { className: "detail-section-label", children: "Branches" }),
|
|
1234
1344
|
/* @__PURE__ */ jsx15("div", { className: "detail-steps-list", children: blueprint.parallel_sub_pipes.map((branch, idx) => /* @__PURE__ */ jsxs15("div", { className: "detail-step-item", children: [
|
|
@@ -1245,13 +1355,13 @@ function PipeParallelSection({
|
|
|
1245
1355
|
}
|
|
1246
1356
|
|
|
1247
1357
|
// src/graph/react/detail/sections/PipeBatchDetail.tsx
|
|
1248
|
-
import { Fragment as
|
|
1358
|
+
import { Fragment as Fragment12, jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1249
1359
|
function PipeBatchSection({
|
|
1250
1360
|
blueprint,
|
|
1251
1361
|
executionData
|
|
1252
1362
|
}) {
|
|
1253
1363
|
const itemCount = executionData == null ? void 0 : executionData.item_count;
|
|
1254
|
-
return /* @__PURE__ */ jsxs16(
|
|
1364
|
+
return /* @__PURE__ */ jsxs16(Fragment12, { children: [
|
|
1255
1365
|
/* @__PURE__ */ jsx16(KV, { label: "Branch Pipe", value: blueprint.branch_pipe_code }),
|
|
1256
1366
|
/* @__PURE__ */ jsx16(KV, { label: "Input List Variable", value: blueprint.batch_params.input_list_stuff_name }),
|
|
1257
1367
|
/* @__PURE__ */ jsx16(KV, { label: "Input Item Variable", value: blueprint.batch_params.input_item_stuff_name }),
|
|
@@ -1334,7 +1444,7 @@ function dumpableExecutionData(pipeType, executionData) {
|
|
|
1334
1444
|
}
|
|
1335
1445
|
|
|
1336
1446
|
// src/graph/react/detail/PipeDetailPanel.tsx
|
|
1337
|
-
import { Fragment as
|
|
1447
|
+
import { Fragment as Fragment13, jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1338
1448
|
var PIPE_TYPE_BADGES = {
|
|
1339
1449
|
PipeLLM: "LLM",
|
|
1340
1450
|
PipeExtract: "Extract",
|
|
@@ -1376,12 +1486,12 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
|
|
|
1376
1486
|
const badge = PIPE_TYPE_BADGES[pipeType];
|
|
1377
1487
|
const status = node.status;
|
|
1378
1488
|
const statusColor = (_a = STATUS_COLORS[status]) != null ? _a : "#6272a4";
|
|
1379
|
-
const blueprint =
|
|
1380
|
-
const [usageExpanded, setUsageExpanded] =
|
|
1489
|
+
const blueprint = React7.useMemo(() => resolveNodeBlueprint(spec, node), [spec, node]);
|
|
1490
|
+
const [usageExpanded, setUsageExpanded] = React7.useState(false);
|
|
1381
1491
|
const inputs = (_c = (_b = node.io) == null ? void 0 : _b.inputs) != null ? _c : [];
|
|
1382
1492
|
const outputs = (_e = (_d = node.io) == null ? void 0 : _d.outputs) != null ? _e : [];
|
|
1383
1493
|
const description = (_f = blueprint == null ? void 0 : blueprint.description) != null ? _f : node.description;
|
|
1384
|
-
return /* @__PURE__ */ jsxs19(
|
|
1494
|
+
return /* @__PURE__ */ jsxs19(Fragment13, { children: [
|
|
1385
1495
|
/* @__PURE__ */ jsxs19("div", { className: "detail-sticky-header", children: [
|
|
1386
1496
|
/* @__PURE__ */ jsxs19("div", { className: "detail-header", children: [
|
|
1387
1497
|
/* @__PURE__ */ jsx19(
|
|
@@ -1591,17 +1701,17 @@ function ExecutionDataSection({
|
|
|
1591
1701
|
}
|
|
1592
1702
|
function GenericExecutionData({ entries }) {
|
|
1593
1703
|
if (entries.length === 0) return null;
|
|
1594
|
-
return /* @__PURE__ */ jsxs19(
|
|
1704
|
+
return /* @__PURE__ */ jsxs19(Fragment13, { children: [
|
|
1595
1705
|
/* @__PURE__ */ jsx19("div", { className: "detail-section-label", children: "Execution" }),
|
|
1596
1706
|
entries.map(([key, value]) => /* @__PURE__ */ jsx19(KV, { label: key, value: String(value) }, key))
|
|
1597
1707
|
] });
|
|
1598
1708
|
}
|
|
1599
1709
|
|
|
1600
1710
|
// src/graph/react/styles/simple/SimpleDetailPanel.tsx
|
|
1601
|
-
import
|
|
1711
|
+
import React8 from "react";
|
|
1602
1712
|
|
|
1603
1713
|
// src/graph/react/styles/simple/simpleIcons.tsx
|
|
1604
|
-
import { Fragment as
|
|
1714
|
+
import { Fragment as Fragment14, jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1605
1715
|
var ICON_PROPS = {
|
|
1606
1716
|
viewBox: "0 0 24 24",
|
|
1607
1717
|
fill: "none",
|
|
@@ -1615,12 +1725,12 @@ function Icon({ size = 13, children }) {
|
|
|
1615
1725
|
return /* @__PURE__ */ jsx20("svg", __spreadProps(__spreadValues({}, ICON_PROPS), { width: size, height: size, children }));
|
|
1616
1726
|
}
|
|
1617
1727
|
var CATEGORY_ICONS = {
|
|
1618
|
-
ai: /* @__PURE__ */ jsxs20(
|
|
1728
|
+
ai: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1619
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" }),
|
|
1620
1730
|
/* @__PURE__ */ jsx20("path", { d: "M20 3v4" }),
|
|
1621
1731
|
/* @__PURE__ */ jsx20("path", { d: "M22 5h-4" })
|
|
1622
1732
|
] }),
|
|
1623
|
-
extract: /* @__PURE__ */ jsxs20(
|
|
1733
|
+
extract: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1624
1734
|
/* @__PURE__ */ jsx20("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
|
|
1625
1735
|
/* @__PURE__ */ jsx20("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }),
|
|
1626
1736
|
/* @__PURE__ */ jsx20("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }),
|
|
@@ -1629,32 +1739,32 @@ var CATEGORY_ICONS = {
|
|
|
1629
1739
|
/* @__PURE__ */ jsx20("path", { d: "M7 12h10" }),
|
|
1630
1740
|
/* @__PURE__ */ jsx20("path", { d: "M7 16h6" })
|
|
1631
1741
|
] }),
|
|
1632
|
-
image: /* @__PURE__ */ jsxs20(
|
|
1742
|
+
image: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1633
1743
|
/* @__PURE__ */ jsx20("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
1634
1744
|
/* @__PURE__ */ jsx20("circle", { cx: "9", cy: "9", r: "2" }),
|
|
1635
1745
|
/* @__PURE__ */ jsx20("path", { d: "m21 15-3.09-3.09a2 2 0 0 0-2.82 0L6 21" })
|
|
1636
1746
|
] }),
|
|
1637
|
-
search: /* @__PURE__ */ jsxs20(
|
|
1747
|
+
search: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1638
1748
|
/* @__PURE__ */ jsx20("circle", { cx: "11", cy: "11", r: "8" }),
|
|
1639
1749
|
/* @__PURE__ */ jsx20("path", { d: "m21 21-4.3-4.3" })
|
|
1640
1750
|
] }),
|
|
1641
|
-
code: /* @__PURE__ */ jsxs20(
|
|
1751
|
+
code: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1642
1752
|
/* @__PURE__ */ jsx20("polyline", { points: "16 18 22 12 16 6" }),
|
|
1643
1753
|
/* @__PURE__ */ jsx20("polyline", { points: "8 6 2 12 8 18" })
|
|
1644
1754
|
] }),
|
|
1645
|
-
template: /* @__PURE__ */ jsxs20(
|
|
1755
|
+
template: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1646
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" }),
|
|
1647
1757
|
/* @__PURE__ */ jsx20("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
1648
1758
|
/* @__PURE__ */ jsx20("path", { d: "M16 13H8" }),
|
|
1649
1759
|
/* @__PURE__ */ jsx20("path", { d: "M16 17H8" })
|
|
1650
1760
|
] }),
|
|
1651
|
-
document: /* @__PURE__ */ jsxs20(
|
|
1761
|
+
document: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1652
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" }),
|
|
1653
1763
|
/* @__PURE__ */ jsx20("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
1654
1764
|
/* @__PURE__ */ jsx20("path", { d: "M12 18v-6" }),
|
|
1655
1765
|
/* @__PURE__ */ jsx20("path", { d: "m9 15 3 3 3-3" })
|
|
1656
1766
|
] }),
|
|
1657
|
-
judge: /* @__PURE__ */ jsxs20(
|
|
1767
|
+
judge: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1658
1768
|
/* @__PURE__ */ jsx20("path", { d: "m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
|
|
1659
1769
|
/* @__PURE__ */ jsx20("path", { d: "m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
|
|
1660
1770
|
/* @__PURE__ */ jsx20("path", { d: "M7 21h10" }),
|
|
@@ -1662,25 +1772,25 @@ var CATEGORY_ICONS = {
|
|
|
1662
1772
|
/* @__PURE__ */ jsx20("path", { d: "M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2" })
|
|
1663
1773
|
] }),
|
|
1664
1774
|
planned: /* @__PURE__ */ jsx20("circle", { cx: "12", cy: "12", r: "9", strokeDasharray: "3 3" }),
|
|
1665
|
-
steps: /* @__PURE__ */ jsxs20(
|
|
1775
|
+
steps: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1666
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" }),
|
|
1667
1777
|
/* @__PURE__ */ jsx20("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }),
|
|
1668
1778
|
/* @__PURE__ */ jsx20("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" })
|
|
1669
1779
|
] }),
|
|
1670
|
-
parallel: /* @__PURE__ */ jsxs20(
|
|
1780
|
+
parallel: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1671
1781
|
/* @__PURE__ */ jsx20("path", { d: "M16 3h5v5" }),
|
|
1672
1782
|
/* @__PURE__ */ jsx20("path", { d: "M8 3H3v5" }),
|
|
1673
1783
|
/* @__PURE__ */ jsx20("path", { d: "M12 22v-8.3a4 4 0 0 0-1.17-2.87L3 3" }),
|
|
1674
1784
|
/* @__PURE__ */ jsx20("path", { d: "m15 9 6-6" })
|
|
1675
1785
|
] }),
|
|
1676
1786
|
decision: /* @__PURE__ */ jsx20("path", { d: "M12 2 22 12 12 22 2 12Z" }),
|
|
1677
|
-
repeat: /* @__PURE__ */ jsxs20(
|
|
1787
|
+
repeat: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1678
1788
|
/* @__PURE__ */ jsx20("path", { d: "m17 2 4 4-4 4" }),
|
|
1679
1789
|
/* @__PURE__ */ jsx20("path", { d: "M3 11v-1a4 4 0 0 1 4-4h14" }),
|
|
1680
1790
|
/* @__PURE__ */ jsx20("path", { d: "m7 22-4-4 4-4" }),
|
|
1681
1791
|
/* @__PURE__ */ jsx20("path", { d: "M21 13v1a4 4 0 0 1-4 4H3" })
|
|
1682
1792
|
] }),
|
|
1683
|
-
pick: /* @__PURE__ */ jsxs20(
|
|
1793
|
+
pick: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1684
1794
|
/* @__PURE__ */ jsx20("polyline", { points: "15 10 20 15 15 20" }),
|
|
1685
1795
|
/* @__PURE__ */ jsx20("path", { d: "M4 4v7a4 4 0 0 0 4 4h12" })
|
|
1686
1796
|
] })
|
|
@@ -1695,7 +1805,7 @@ var STATUS_LABELS = {
|
|
|
1695
1805
|
};
|
|
1696
1806
|
var STATUS_ICONS = {
|
|
1697
1807
|
succeeded: /* @__PURE__ */ jsx20("polyline", { points: "20 6 9 17 4 12" }),
|
|
1698
|
-
failed: /* @__PURE__ */ jsxs20(
|
|
1808
|
+
failed: /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
1699
1809
|
/* @__PURE__ */ jsx20("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1700
1810
|
/* @__PURE__ */ jsx20("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1701
1811
|
] }),
|
|
@@ -1801,7 +1911,7 @@ var SIMPLE_DETAIL_STRINGS = {
|
|
|
1801
1911
|
};
|
|
1802
1912
|
|
|
1803
1913
|
// src/graph/react/styles/simple/SimpleDetailPanel.tsx
|
|
1804
|
-
import { Fragment as
|
|
1914
|
+
import { Fragment as Fragment15, jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1805
1915
|
function SimpleDetailPanel(props) {
|
|
1806
1916
|
const { detail } = props;
|
|
1807
1917
|
return /* @__PURE__ */ jsxs21("div", { className: "simple-detail", "data-kind": detail.kind, children: [
|
|
@@ -1824,7 +1934,7 @@ function StepView({
|
|
|
1824
1934
|
}) {
|
|
1825
1935
|
var _a, _b;
|
|
1826
1936
|
const runs = (_b = (_a = detail.run) == null ? void 0 : _a.runs) != null ? _b : 1;
|
|
1827
|
-
return /* @__PURE__ */ jsxs21(
|
|
1937
|
+
return /* @__PURE__ */ jsxs21(Fragment15, { children: [
|
|
1828
1938
|
/* @__PURE__ */ jsx21(
|
|
1829
1939
|
Header,
|
|
1830
1940
|
{
|
|
@@ -1897,7 +2007,7 @@ function DecisionView({
|
|
|
1897
2007
|
renderTechnical,
|
|
1898
2008
|
onOpenNode
|
|
1899
2009
|
}) {
|
|
1900
|
-
return /* @__PURE__ */ jsxs21(
|
|
2010
|
+
return /* @__PURE__ */ jsxs21(Fragment15, { children: [
|
|
1901
2011
|
/* @__PURE__ */ jsx21(Header, { category: "decision", word: SIMPLE_DETAIL_STRINGS.decisionKind, run: detail.run }),
|
|
1902
2012
|
/* @__PURE__ */ jsx21("h2", { className: "simple-detail-title", children: detail.title }),
|
|
1903
2013
|
detail.problem && /* @__PURE__ */ jsx21(PlainProblem, { problem: detail.problem }),
|
|
@@ -1938,7 +2048,7 @@ function FrameView({
|
|
|
1938
2048
|
renderTechnical,
|
|
1939
2049
|
onOpenNode
|
|
1940
2050
|
}) {
|
|
1941
|
-
return /* @__PURE__ */ jsxs21(
|
|
2051
|
+
return /* @__PURE__ */ jsxs21(Fragment15, { children: [
|
|
1942
2052
|
/* @__PURE__ */ jsx21(Header, { category: "repeat", word: SIMPLE_DETAIL_STRINGS.frameKind, run: detail.run, items: detail.items }),
|
|
1943
2053
|
/* @__PURE__ */ jsx21("h2", { className: "simple-detail-title", children: detail.title }),
|
|
1944
2054
|
detail.problem && /* @__PURE__ */ jsx21(PlainProblem, { problem: detail.problem }),
|
|
@@ -1966,7 +2076,7 @@ function ValueView({
|
|
|
1966
2076
|
const { value, role } = detail;
|
|
1967
2077
|
const shown = showsValues(mode) ? renderValue == null ? void 0 : renderValue(value) : null;
|
|
1968
2078
|
const links = role === "input" ? value.to : value.from;
|
|
1969
|
-
return /* @__PURE__ */ jsxs21(
|
|
2079
|
+
return /* @__PURE__ */ jsxs21(Fragment15, { children: [
|
|
1970
2080
|
/* @__PURE__ */ jsx21("div", { className: "simple-detail-header", children: /* @__PURE__ */ jsxs21("span", { className: `simple-detail-kind simple-detail-kind--${role}`, children: [
|
|
1971
2081
|
/* @__PURE__ */ jsx21(DocumentIcon, { list: value.isList }),
|
|
1972
2082
|
role === "input" ? SIMPLE_DETAIL_STRINGS.inputKind : SIMPLE_DETAIL_STRINGS.outputKind
|
|
@@ -1977,7 +2087,7 @@ function ValueView({
|
|
|
1977
2087
|
mode === GRAPH_SPEC_MODE.DRY && /* @__PURE__ */ jsx21("p", { className: "simple-detail-note", children: SIMPLE_DETAIL_STRINGS.dryRunValues }),
|
|
1978
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)) }) }),
|
|
1979
2089
|
shown && /* @__PURE__ */ jsx21("div", { className: "simple-detail-value", children: shown }),
|
|
1980
|
-
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(
|
|
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: [
|
|
1981
2091
|
/* @__PURE__ */ jsx21("dt", { children: field.title }),
|
|
1982
2092
|
field.description && /* @__PURE__ */ jsx21("dd", { children: field.description })
|
|
1983
2093
|
] }, field.title)) }) }),
|
|
@@ -1985,7 +2095,7 @@ function ValueView({
|
|
|
1985
2095
|
] });
|
|
1986
2096
|
}
|
|
1987
2097
|
function ArrowView({ detail, mode, renderValue, onOpenNode }) {
|
|
1988
|
-
return /* @__PURE__ */ jsxs21(
|
|
2098
|
+
return /* @__PURE__ */ jsxs21(Fragment15, { children: [
|
|
1989
2099
|
/* @__PURE__ */ jsx21("div", { className: "simple-detail-header", children: /* @__PURE__ */ jsxs21("span", { className: "simple-detail-kind", children: [
|
|
1990
2100
|
/* @__PURE__ */ jsxs21(Icon, { children: [
|
|
1991
2101
|
/* @__PURE__ */ jsx21("path", { d: "M5 12h14" }),
|
|
@@ -2062,7 +2172,7 @@ function Fold({
|
|
|
2062
2172
|
children,
|
|
2063
2173
|
defaultOpen = false
|
|
2064
2174
|
}) {
|
|
2065
|
-
const [open, setOpen] =
|
|
2175
|
+
const [open, setOpen] = React8.useState(defaultOpen);
|
|
2066
2176
|
return /* @__PURE__ */ jsxs21(
|
|
2067
2177
|
"details",
|
|
2068
2178
|
{
|
|
@@ -2133,7 +2243,7 @@ function ValueLinks({
|
|
|
2133
2243
|
if (links.length === 0) return null;
|
|
2134
2244
|
return /* @__PURE__ */ jsxs21("p", { className: "simple-value-links", children: [
|
|
2135
2245
|
/* @__PURE__ */ jsx21("span", { className: "simple-value-links-label", children: side === "from" ? SIMPLE_DETAIL_STRINGS.from : SIMPLE_DETAIL_STRINGS.usedBy }),
|
|
2136
|
-
links.map((link, index) => /* @__PURE__ */ jsxs21(
|
|
2246
|
+
links.map((link, index) => /* @__PURE__ */ jsxs21(React8.Fragment, { children: [
|
|
2137
2247
|
index > 0 && /* @__PURE__ */ jsx21("span", { className: "simple-value-links-sep", children: ", " }),
|
|
2138
2248
|
/* @__PURE__ */ jsx21(NodeLink, { link, onOpenNode })
|
|
2139
2249
|
] }, link.nodeId))
|
|
@@ -2203,7 +2313,7 @@ function resultDescriptors(graph) {
|
|
|
2203
2313
|
}
|
|
2204
2314
|
|
|
2205
2315
|
// src/graph/react/viewer/styleDetailPanels.tsx
|
|
2206
|
-
import { Fragment as
|
|
2316
|
+
import { Fragment as Fragment16, jsx as jsx22 } from "react/jsx-runtime";
|
|
2207
2317
|
function selectedNodeId(selection) {
|
|
2208
2318
|
return selection && selection.kind !== "arrow" ? selection.nodeId : null;
|
|
2209
2319
|
}
|
|
@@ -2285,7 +2395,7 @@ function StuffNodeDetail(_a) {
|
|
|
2285
2395
|
);
|
|
2286
2396
|
}
|
|
2287
2397
|
if (isDryRun) return /* @__PURE__ */ jsx22("div", { className: "detail-not-available", children: "Dry run data hidden" });
|
|
2288
|
-
return /* @__PURE__ */ jsx22(
|
|
2398
|
+
return /* @__PURE__ */ jsx22(Fragment16, { children: (_a2 = renderData == null ? void 0 : renderData()) != null ? _a2 : /* @__PURE__ */ jsx22("div", { className: "detail-not-available", children: "No data" }) });
|
|
2289
2399
|
}
|
|
2290
2400
|
function ResultView({
|
|
2291
2401
|
artifacts,
|
|
@@ -2301,6 +2411,7 @@ function ResultView({
|
|
|
2301
2411
|
const concept = stuff.concept && graphspec ? resolveConceptRef(graphspec, stuff.concept) : void 0;
|
|
2302
2412
|
const {
|
|
2303
2413
|
resolveUrl,
|
|
2414
|
+
loadText,
|
|
2304
2415
|
resolveRendition,
|
|
2305
2416
|
resolveDocumentPdf,
|
|
2306
2417
|
resolveShareUrl,
|
|
@@ -2309,16 +2420,16 @@ function ResultView({
|
|
|
2309
2420
|
} = valueOptions;
|
|
2310
2421
|
return /* @__PURE__ */ jsx22(
|
|
2311
2422
|
StuffResultPanel,
|
|
2312
|
-
__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, descriptors), {
|
|
2423
|
+
__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, descriptors), {
|
|
2313
2424
|
stuff
|
|
2314
|
-
}), concept ? { concept } : {}), producerPipeRef ? { producerPipeRef } : {}), consumer ? { consumer } : {}), resolveUrl ? { resolveUrl } : {}), resolveRendition ? { resolveRendition } : {}), resolveDocumentPdf ? { resolveDocumentPdf } : {}), resolveShareUrl ? { resolveShareUrl } : {}), saveFiles ? { saveFiles } : {}), downloads ? { downloads } : {}), {
|
|
2425
|
+
}), concept ? { concept } : {}), producerPipeRef ? { producerPipeRef } : {}), consumer ? { consumer } : {}), resolveUrl ? { resolveUrl } : {}), loadText ? { loadText } : {}), resolveRendition ? { resolveRendition } : {}), resolveDocumentPdf ? { resolveDocumentPdf } : {}), resolveShareUrl ? { resolveShareUrl } : {}), saveFiles ? { saveFiles } : {}), downloads ? { downloads } : {}), {
|
|
2315
2426
|
theme
|
|
2316
2427
|
})
|
|
2317
2428
|
);
|
|
2318
2429
|
}
|
|
2319
2430
|
function SimpleStylePanel(props) {
|
|
2320
2431
|
const { selection, graphspec, artifacts, theme, valueOptions, nodes, drawing, onOpenNode } = props;
|
|
2321
|
-
const detail =
|
|
2432
|
+
const detail = React9.useMemo(() => {
|
|
2322
2433
|
if (!graphspec || !drawing) return null;
|
|
2323
2434
|
const target = selection.kind === "arrow" ? { kind: "arrow", source: selection.source, target: selection.target } : { kind: "node", id: selection.nodeId };
|
|
2324
2435
|
return buildSimpleNodeDetail(
|
|
@@ -2563,7 +2674,7 @@ function placeCanvasFailure({
|
|
|
2563
2674
|
}
|
|
2564
2675
|
|
|
2565
2676
|
// src/graph/react/viewer/GraphErrorState.tsx
|
|
2566
|
-
import
|
|
2677
|
+
import React10 from "react";
|
|
2567
2678
|
import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2568
2679
|
var GRAPH_ERROR_STATE_TITLE = "This method graph could not be drawn";
|
|
2569
2680
|
function GraphErrorState({ failure }) {
|
|
@@ -2592,7 +2703,7 @@ function GraphRelayoutFailure({
|
|
|
2592
2703
|
}
|
|
2593
2704
|
);
|
|
2594
2705
|
}
|
|
2595
|
-
var GraphFailureBoundary = class extends
|
|
2706
|
+
var GraphFailureBoundary = class extends React10.Component {
|
|
2596
2707
|
constructor() {
|
|
2597
2708
|
super(...arguments);
|
|
2598
2709
|
this.state = { failure: null, resetKey: this.props.resetKey };
|
|
@@ -2613,7 +2724,7 @@ var GraphFailureBoundary = class extends React9.Component {
|
|
|
2613
2724
|
};
|
|
2614
2725
|
|
|
2615
2726
|
// src/graph/react/viewer/GraphToolbar.tsx
|
|
2616
|
-
import
|
|
2727
|
+
import React11 from "react";
|
|
2617
2728
|
import { Panel } from "@xyflow/react";
|
|
2618
2729
|
|
|
2619
2730
|
// src/graph/react/viewer/ValidationPanel.tsx
|
|
@@ -2733,7 +2844,7 @@ function ValidationPanel({
|
|
|
2733
2844
|
}
|
|
2734
2845
|
|
|
2735
2846
|
// src/graph/react/viewer/GraphToolbar.tsx
|
|
2736
|
-
import { Fragment as
|
|
2847
|
+
import { Fragment as Fragment17, jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2737
2848
|
var REACTFLOW_PANEL_MARGIN = 15;
|
|
2738
2849
|
var ARROW_RIGHT_ICON = /* @__PURE__ */ jsxs25(
|
|
2739
2850
|
"svg",
|
|
@@ -3095,11 +3206,11 @@ function GraphToolbar({
|
|
|
3095
3206
|
const orientation = toolbarOrientation(position);
|
|
3096
3207
|
const setValidationOpen = onValidationOpenChange != null ? onValidationOpenChange : (() => {
|
|
3097
3208
|
});
|
|
3098
|
-
const setValidationOpenRef =
|
|
3209
|
+
const setValidationOpenRef = React11.useRef(setValidationOpen);
|
|
3099
3210
|
setValidationOpenRef.current = setValidationOpen;
|
|
3100
|
-
const validationRef =
|
|
3101
|
-
const validationPanelId =
|
|
3102
|
-
|
|
3211
|
+
const validationRef = React11.useRef(null);
|
|
3212
|
+
const validationPanelId = React11.useId();
|
|
3213
|
+
React11.useEffect(() => {
|
|
3103
3214
|
if (validationState === void 0) setValidationOpenRef.current(false);
|
|
3104
3215
|
}, [validationState]);
|
|
3105
3216
|
usePopoverDismiss(validationOpen, validationRef, () => setValidationOpenRef.current(false));
|
|
@@ -3119,7 +3230,7 @@ function GraphToolbar({
|
|
|
3119
3230
|
className: `graph-toolbar-panel graph-toolbar-panel--${orientation}`,
|
|
3120
3231
|
style: panelStyle,
|
|
3121
3232
|
children: /* @__PURE__ */ jsxs25("div", { className: `graph-toolbar graph-toolbar--${orientation}`, children: [
|
|
3122
|
-
validationState !== void 0 && /* @__PURE__ */ jsxs25(
|
|
3233
|
+
validationState !== void 0 && /* @__PURE__ */ jsxs25(Fragment17, { children: [
|
|
3123
3234
|
/* @__PURE__ */ jsxs25("div", { className: "graph-toolbar-validation", ref: validationRef, children: [
|
|
3124
3235
|
/* @__PURE__ */ jsxs25(
|
|
3125
3236
|
"button",
|
|
@@ -3151,7 +3262,7 @@ function GraphToolbar({
|
|
|
3151
3262
|
] }),
|
|
3152
3263
|
/* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" })
|
|
3153
3264
|
] }),
|
|
3154
|
-
styleMenuEnabled && /* @__PURE__ */ jsxs25(
|
|
3265
|
+
styleMenuEnabled && /* @__PURE__ */ jsxs25(Fragment17, { children: [
|
|
3155
3266
|
/* @__PURE__ */ jsx26(
|
|
3156
3267
|
StyleMenu,
|
|
3157
3268
|
{
|
|
@@ -3248,7 +3359,7 @@ function GraphToolbar({
|
|
|
3248
3359
|
children: FIT_VIEW_ICON
|
|
3249
3360
|
}
|
|
3250
3361
|
),
|
|
3251
|
-
themeToggleEnabled && /* @__PURE__ */ jsxs25(
|
|
3362
|
+
themeToggleEnabled && /* @__PURE__ */ jsxs25(Fragment17, { children: [
|
|
3252
3363
|
/* @__PURE__ */ jsx26("div", { className: "graph-toolbar-separator" }),
|
|
3253
3364
|
/* @__PURE__ */ jsx26(
|
|
3254
3365
|
"button",
|
|
@@ -3268,7 +3379,7 @@ function GraphToolbar({
|
|
|
3268
3379
|
}
|
|
3269
3380
|
|
|
3270
3381
|
// src/graph/react/viewer/StillFit.tsx
|
|
3271
|
-
import
|
|
3382
|
+
import React12 from "react";
|
|
3272
3383
|
import { useEdges, useNodes, useNodesInitialized, useReactFlow, useStore } from "@xyflow/react";
|
|
3273
3384
|
|
|
3274
3385
|
// src/graph/react/viewer/stillViewport.ts
|
|
@@ -3315,7 +3426,7 @@ function StillFit({ onHeight }) {
|
|
|
3315
3426
|
const nodes = useNodes();
|
|
3316
3427
|
const edges = useEdges();
|
|
3317
3428
|
const { getNodesBounds, setViewport } = useReactFlow();
|
|
3318
|
-
|
|
3429
|
+
React12.useLayoutEffect(() => {
|
|
3319
3430
|
if (!nodesInitialized || nodes.length === 0) return;
|
|
3320
3431
|
const bounds = stillContentBounds(
|
|
3321
3432
|
getNodesBounds(nodes),
|
|
@@ -3436,7 +3547,7 @@ var controllerNodeTypes = { controllerGroup: ControllerGroupNode };
|
|
|
3436
3547
|
import { Handle, Position } from "@xyflow/react";
|
|
3437
3548
|
|
|
3438
3549
|
// src/graph/react/nodes/pipe/PipeCardBase.tsx
|
|
3439
|
-
import { useState as
|
|
3550
|
+
import { useState as useState3 } from "react";
|
|
3440
3551
|
import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3441
3552
|
var PIPE_TYPE_BADGES2 = {
|
|
3442
3553
|
PipeLLM: "LLM",
|
|
@@ -3487,7 +3598,7 @@ function PipeCardBase({ data, children }) {
|
|
|
3487
3598
|
const isStatic = data.graphMode === "static";
|
|
3488
3599
|
const outcome = isStatic ? (_a = data.tags) == null ? void 0 : _a.outcome : void 0;
|
|
3489
3600
|
const batchMultiplicity = isStatic ? (_b = data.tags) == null ? void 0 : _b.batch_multiplicity : void 0;
|
|
3490
|
-
const [inputsExpanded, setInputsExpanded] =
|
|
3601
|
+
const [inputsExpanded, setInputsExpanded] = useState3(false);
|
|
3491
3602
|
const hasMany = data.inputs.length > MAX_VISIBLE_INPUTS;
|
|
3492
3603
|
const visibleInputs = hasMany && !inputsExpanded ? data.inputs.slice(0, MAX_VISIBLE_INPUTS) : data.inputs;
|
|
3493
3604
|
const hiddenCount = data.inputs.length - MAX_VISIBLE_INPUTS;
|
|
@@ -3620,7 +3731,7 @@ function getPipeCardComponent(pipeType) {
|
|
|
3620
3731
|
}
|
|
3621
3732
|
|
|
3622
3733
|
// src/graph/react/nodes/pipe/PipeCardNode.tsx
|
|
3623
|
-
import { Fragment as
|
|
3734
|
+
import { Fragment as Fragment18, jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3624
3735
|
function PipeCardNode({ data }) {
|
|
3625
3736
|
var _a;
|
|
3626
3737
|
const Card = (_a = getPipeCardComponent(data.pipeType)) != null ? _a : PipeCardBase;
|
|
@@ -3633,7 +3744,7 @@ function PipeCardRFNode({
|
|
|
3633
3744
|
}) {
|
|
3634
3745
|
const payload = data.pipeCardData;
|
|
3635
3746
|
if (!payload) return null;
|
|
3636
|
-
return /* @__PURE__ */ jsxs28(
|
|
3747
|
+
return /* @__PURE__ */ jsxs28(Fragment18, { children: [
|
|
3637
3748
|
/* @__PURE__ */ jsx30(Handle, { type: "target", position: targetPosition }),
|
|
3638
3749
|
/* @__PURE__ */ jsx30(PipeCardNode, { data: payload }),
|
|
3639
3750
|
/* @__PURE__ */ jsx30(Handle, { type: "source", position: sourcePosition })
|
|
@@ -3642,7 +3753,7 @@ function PipeCardRFNode({
|
|
|
3642
3753
|
|
|
3643
3754
|
// src/graph/react/styles/simple/SimpleNodes.tsx
|
|
3644
3755
|
import { Handle as Handle2, Position as Position2 } from "@xyflow/react";
|
|
3645
|
-
import { Fragment as
|
|
3756
|
+
import { Fragment as Fragment19, jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3646
3757
|
var EXPAND_ICON2 = /* @__PURE__ */ jsxs29(Icon, { size: 12, children: [
|
|
3647
3758
|
/* @__PURE__ */ jsx31("polyline", { points: "15 3 21 3 21 9" }),
|
|
3648
3759
|
/* @__PURE__ */ jsx31("polyline", { points: "9 21 3 21 3 15" }),
|
|
@@ -3672,7 +3783,7 @@ function Handles({
|
|
|
3672
3783
|
targetPosition = Position2.Left,
|
|
3673
3784
|
children
|
|
3674
3785
|
}) {
|
|
3675
|
-
return /* @__PURE__ */ jsxs29(
|
|
3786
|
+
return /* @__PURE__ */ jsxs29(Fragment19, { children: [
|
|
3676
3787
|
/* @__PURE__ */ jsx31(Handle2, { type: "target", position: targetPosition, className: "simple-handle" }),
|
|
3677
3788
|
children,
|
|
3678
3789
|
/* @__PURE__ */ jsx31(Handle2, { type: "source", position: sourcePosition, className: "simple-handle" })
|
|
@@ -3757,7 +3868,7 @@ function SimpleTerminalNode({ data, sourcePosition, targetPosition }) {
|
|
|
3757
3868
|
{
|
|
3758
3869
|
className: `simple-terminal simple-terminal--${terminal.kind}${terminal.isList ? " simple-terminal--list" : ""}`,
|
|
3759
3870
|
children: [
|
|
3760
|
-
terminal.isList && /* @__PURE__ */ jsxs29(
|
|
3871
|
+
terminal.isList && /* @__PURE__ */ jsxs29(Fragment19, { children: [
|
|
3761
3872
|
/* @__PURE__ */ jsx31(DocumentShape, { className: "simple-terminal-shape simple-terminal-shape--back2" }),
|
|
3762
3873
|
/* @__PURE__ */ jsx31(DocumentShape, { className: "simple-terminal-shape simple-terminal-shape--back1" })
|
|
3763
3874
|
] }),
|
|
@@ -3890,7 +4001,7 @@ function RoutedEdge({
|
|
|
3890
4001
|
}
|
|
3891
4002
|
|
|
3892
4003
|
// src/graph/react/viewer/GraphViewer.tsx
|
|
3893
|
-
import { Fragment as
|
|
4004
|
+
import { Fragment as Fragment20, jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3894
4005
|
var nodeTypes = __spreadValues(__spreadProps(__spreadValues({}, controllerNodeTypes), {
|
|
3895
4006
|
pipeCard: PipeCardRFNode
|
|
3896
4007
|
}), simpleNodeTypes);
|
|
@@ -4038,6 +4149,7 @@ function GraphViewerCanvas(props) {
|
|
|
4038
4149
|
onPaneClick,
|
|
4039
4150
|
renderDetailExtra,
|
|
4040
4151
|
resolveUrl,
|
|
4152
|
+
loadText,
|
|
4041
4153
|
resolveRendition,
|
|
4042
4154
|
resolveDocumentPdf,
|
|
4043
4155
|
resolveShareUrl,
|
|
@@ -4049,31 +4161,31 @@ function GraphViewerCanvas(props) {
|
|
|
4049
4161
|
onFailure
|
|
4050
4162
|
} = props;
|
|
4051
4163
|
const graphspecProp = (_a = graph == null ? void 0 : graph.graphSpec) != null ? _a : null;
|
|
4052
|
-
const { graphspec, failure: specFailure } =
|
|
4164
|
+
const { graphspec, failure: specFailure } = React14.useMemo(
|
|
4053
4165
|
() => readGraphSpec(graphspecProp),
|
|
4054
4166
|
[graphspecProp]
|
|
4055
4167
|
);
|
|
4056
|
-
const graphspecRef =
|
|
4168
|
+
const graphspecRef = React14.useRef(graphspec);
|
|
4057
4169
|
graphspecRef.current = graphspec;
|
|
4058
|
-
const [layoutFailure, setLayoutFailure] =
|
|
4170
|
+
const [layoutFailure, setLayoutFailure] = React14.useState(null);
|
|
4059
4171
|
const canvasFailure = placeCanvasFailure({
|
|
4060
4172
|
specFailure,
|
|
4061
4173
|
layoutFailure: layoutFailureFor(layoutFailure, graphspec),
|
|
4062
4174
|
interactive
|
|
4063
4175
|
});
|
|
4064
4176
|
const failed = canvasFailure.inPlace !== null;
|
|
4065
|
-
const onFailureRef =
|
|
4177
|
+
const onFailureRef = React14.useRef(onFailure);
|
|
4066
4178
|
onFailureRef.current = onFailure;
|
|
4067
|
-
const [direction, setDirection] =
|
|
4179
|
+
const [direction, setDirection] = React14.useState(
|
|
4068
4180
|
() => {
|
|
4069
4181
|
var _a2, _b2;
|
|
4070
4182
|
return (_b2 = (_a2 = initialDirection != null ? initialDirection : config.direction) != null ? _a2 : DEFAULT_GRAPH_CONFIG.direction) != null ? _b2 : GRAPH_DIRECTION.TB;
|
|
4071
4183
|
}
|
|
4072
4184
|
);
|
|
4073
4185
|
const externalMode = resolveExternalThemeMode(themeProp, config.theme);
|
|
4074
|
-
const [mode, setMode] =
|
|
4075
|
-
const prevExternalModeRef =
|
|
4076
|
-
|
|
4186
|
+
const [mode, setMode] = React14.useState(externalMode);
|
|
4187
|
+
const prevExternalModeRef = React14.useRef(externalMode);
|
|
4188
|
+
React14.useEffect(() => {
|
|
4077
4189
|
if (externalMode !== prevExternalModeRef.current) {
|
|
4078
4190
|
prevExternalModeRef.current = externalMode;
|
|
4079
4191
|
setMode(externalMode);
|
|
@@ -4081,13 +4193,13 @@ function GraphViewerCanvas(props) {
|
|
|
4081
4193
|
}, [externalMode]);
|
|
4082
4194
|
const systemTheme = useSystemTheme(systemThemeProp);
|
|
4083
4195
|
const resolvedTheme = resolveActiveTheme(mode, systemTheme);
|
|
4084
|
-
const onThemeChangeRef =
|
|
4196
|
+
const onThemeChangeRef = React14.useRef(onThemeChange);
|
|
4085
4197
|
onThemeChangeRef.current = onThemeChange;
|
|
4086
|
-
const prevReportedRef =
|
|
4198
|
+
const prevReportedRef = React14.useRef({
|
|
4087
4199
|
mode,
|
|
4088
4200
|
resolvedTheme
|
|
4089
4201
|
});
|
|
4090
|
-
|
|
4202
|
+
React14.useEffect(() => {
|
|
4091
4203
|
var _a2;
|
|
4092
4204
|
const prev = prevReportedRef.current;
|
|
4093
4205
|
if (prev.mode !== mode || prev.resolvedTheme !== resolvedTheme) {
|
|
@@ -4096,48 +4208,48 @@ function GraphViewerCanvas(props) {
|
|
|
4096
4208
|
}
|
|
4097
4209
|
}, [mode, resolvedTheme]);
|
|
4098
4210
|
const externalStyle = resolveGraphStyle(graphStyleProp, config.graphStyle);
|
|
4099
|
-
const [graphStyle, setGraphStyle] =
|
|
4100
|
-
const prevExternalStyleRef =
|
|
4101
|
-
|
|
4211
|
+
const [graphStyle, setGraphStyle] = React14.useState(externalStyle);
|
|
4212
|
+
const prevExternalStyleRef = React14.useRef(externalStyle);
|
|
4213
|
+
React14.useEffect(() => {
|
|
4102
4214
|
if (externalStyle !== prevExternalStyleRef.current) {
|
|
4103
4215
|
prevExternalStyleRef.current = externalStyle;
|
|
4104
4216
|
setGraphStyle(externalStyle);
|
|
4105
4217
|
}
|
|
4106
4218
|
}, [externalStyle]);
|
|
4107
|
-
const onGraphStyleChangeRef =
|
|
4219
|
+
const onGraphStyleChangeRef = React14.useRef(onGraphStyleChange);
|
|
4108
4220
|
onGraphStyleChangeRef.current = onGraphStyleChange;
|
|
4109
|
-
const prevReportedStyleRef =
|
|
4110
|
-
|
|
4221
|
+
const prevReportedStyleRef = React14.useRef(graphStyle);
|
|
4222
|
+
React14.useEffect(() => {
|
|
4111
4223
|
var _a2;
|
|
4112
4224
|
if (prevReportedStyleRef.current !== graphStyle) {
|
|
4113
4225
|
prevReportedStyleRef.current = graphStyle;
|
|
4114
4226
|
(_a2 = onGraphStyleChangeRef.current) == null ? void 0 : _a2.call(onGraphStyleChangeRef, graphStyle);
|
|
4115
4227
|
}
|
|
4116
4228
|
}, [graphStyle]);
|
|
4117
|
-
const graphStyleRef =
|
|
4229
|
+
const graphStyleRef = React14.useRef(graphStyle);
|
|
4118
4230
|
graphStyleRef.current = graphStyle;
|
|
4119
4231
|
const styleCapabilities = GRAPH_STYLES[graphStyle].capabilities;
|
|
4120
4232
|
const effectiveFoldMode = (_c = (_b = initialFoldMode != null ? initialFoldMode : config.foldMode) != null ? _b : DEFAULT_GRAPH_CONFIG.foldMode) != null ? _c : FOLD_MODE.EXPANDED;
|
|
4121
|
-
const [showControllers, setShowControllers] =
|
|
4233
|
+
const [showControllers, setShowControllers] = React14.useState(() => {
|
|
4122
4234
|
var _a2, _b2;
|
|
4123
4235
|
if (effectiveFoldMode === FOLD_MODE.FOLDED) return true;
|
|
4124
4236
|
return (_b2 = (_a2 = initialShowControllers != null ? initialShowControllers : config.showControllers) != null ? _a2 : DEFAULT_GRAPH_CONFIG.showControllers) != null ? _b2 : false;
|
|
4125
4237
|
});
|
|
4126
|
-
const foldModeRef =
|
|
4238
|
+
const foldModeRef = React14.useRef(effectiveFoldMode);
|
|
4127
4239
|
foldModeRef.current = effectiveFoldMode;
|
|
4128
|
-
const containerRef =
|
|
4129
|
-
const [detailSelection, setDetailSelection] =
|
|
4130
|
-
const [conceptOverride, setConceptOverride] =
|
|
4240
|
+
const containerRef = React14.useRef(null);
|
|
4241
|
+
const [detailSelection, setDetailSelection] = React14.useState(null);
|
|
4242
|
+
const [conceptOverride, setConceptOverride] = React14.useState(null);
|
|
4131
4243
|
const {
|
|
4132
4244
|
width: panelWidth,
|
|
4133
4245
|
isDragging: isPanelDragging,
|
|
4134
4246
|
handleMouseDown: onResizeMouseDown
|
|
4135
4247
|
} = useResizable({ defaultWidth: 380, minWidth: 280, maxWidth: 800, containerRef });
|
|
4136
|
-
|
|
4248
|
+
React14.useEffect(() => {
|
|
4137
4249
|
setDetailSelection(null);
|
|
4138
4250
|
setConceptOverride(null);
|
|
4139
4251
|
}, [graphspec]);
|
|
4140
|
-
|
|
4252
|
+
React14.useEffect(() => {
|
|
4141
4253
|
const el = containerRef.current;
|
|
4142
4254
|
if (!el) return;
|
|
4143
4255
|
const themePalette = getPaletteForTheme(resolvedTheme);
|
|
@@ -4152,15 +4264,15 @@ function GraphViewerCanvas(props) {
|
|
|
4152
4264
|
}
|
|
4153
4265
|
};
|
|
4154
4266
|
}, [config.paletteColors, resolvedTheme]);
|
|
4155
|
-
const [stillHeight, setStillHeight] =
|
|
4267
|
+
const [stillHeight, setStillHeight] = React14.useState(STILL_PLACEHOLDER_HEIGHT_PX);
|
|
4156
4268
|
const [nodes, setNodes, onNodesChange] = useNodesState([]);
|
|
4157
4269
|
const [edges, setEdges, onEdgesChange] = useEdgesState([]);
|
|
4158
|
-
const reactFlowRef =
|
|
4159
|
-
const initialDataRef =
|
|
4160
|
-
const rawGraphDataRef =
|
|
4161
|
-
const layoutCacheRef =
|
|
4162
|
-
const [expandedControllers, setExpandedControllers] =
|
|
4163
|
-
const toggleCollapse =
|
|
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) => {
|
|
4164
4276
|
setExpandedControllers((prev) => {
|
|
4165
4277
|
const next = new Set(prev);
|
|
4166
4278
|
if (next.has(controllerId)) next.delete(controllerId);
|
|
@@ -4168,17 +4280,17 @@ function GraphViewerCanvas(props) {
|
|
|
4168
4280
|
return next;
|
|
4169
4281
|
});
|
|
4170
4282
|
}, []);
|
|
4171
|
-
const [foldedControllers, setFoldedControllers] =
|
|
4172
|
-
const styleDefaultFoldsRef =
|
|
4173
|
-
const readerOpenedRef =
|
|
4174
|
-
const markReaderFolds =
|
|
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) => {
|
|
4175
4287
|
for (const id of ids) {
|
|
4176
4288
|
styleDefaultFoldsRef.current.delete(id);
|
|
4177
4289
|
if (folded) readerOpenedRef.current.delete(id);
|
|
4178
4290
|
else readerOpenedRef.current.add(id);
|
|
4179
4291
|
}
|
|
4180
4292
|
}, []);
|
|
4181
|
-
const toggleFold =
|
|
4293
|
+
const toggleFold = React14.useCallback(
|
|
4182
4294
|
(controllerId, options) => {
|
|
4183
4295
|
setFoldedControllers((prev) => {
|
|
4184
4296
|
const next = new Set(prev);
|
|
@@ -4196,53 +4308,53 @@ function GraphViewerCanvas(props) {
|
|
|
4196
4308
|
[markReaderFolds]
|
|
4197
4309
|
);
|
|
4198
4310
|
const edgeType = config.edgeType || EDGE_TYPE.DEFAULT;
|
|
4199
|
-
const layoutConfig =
|
|
4311
|
+
const layoutConfig = React14.useMemo(
|
|
4200
4312
|
() => ({ nodesep: config.nodesep, ranksep: config.ranksep }),
|
|
4201
4313
|
[config.nodesep, config.ranksep]
|
|
4202
4314
|
);
|
|
4203
|
-
const showControllersRef =
|
|
4315
|
+
const showControllersRef = React14.useRef(showControllers);
|
|
4204
4316
|
showControllersRef.current = showControllers;
|
|
4205
|
-
const directionRef =
|
|
4317
|
+
const directionRef = React14.useRef(direction);
|
|
4206
4318
|
directionRef.current = direction;
|
|
4207
|
-
const layoutConfigRef =
|
|
4319
|
+
const layoutConfigRef = React14.useRef(layoutConfig);
|
|
4208
4320
|
layoutConfigRef.current = layoutConfig;
|
|
4209
|
-
const initialZoomRef =
|
|
4321
|
+
const initialZoomRef = React14.useRef(config.initialZoom);
|
|
4210
4322
|
initialZoomRef.current = config.initialZoom;
|
|
4211
|
-
const panToTopRef =
|
|
4323
|
+
const panToTopRef = React14.useRef(config.panToTop);
|
|
4212
4324
|
panToTopRef.current = config.panToTop;
|
|
4213
|
-
const interactiveRef =
|
|
4325
|
+
const interactiveRef = React14.useRef(interactive);
|
|
4214
4326
|
interactiveRef.current = interactive;
|
|
4215
|
-
const expandedRef =
|
|
4327
|
+
const expandedRef = React14.useRef(expandedControllers);
|
|
4216
4328
|
expandedRef.current = expandedControllers;
|
|
4217
|
-
const toggleCollapseRef =
|
|
4329
|
+
const toggleCollapseRef = React14.useRef(toggleCollapse);
|
|
4218
4330
|
toggleCollapseRef.current = toggleCollapse;
|
|
4219
|
-
const foldedRef =
|
|
4331
|
+
const foldedRef = React14.useRef(foldedControllers);
|
|
4220
4332
|
foldedRef.current = foldedControllers;
|
|
4221
|
-
const toggleFoldRef =
|
|
4333
|
+
const toggleFoldRef = React14.useRef(toggleFold);
|
|
4222
4334
|
toggleFoldRef.current = toggleFold;
|
|
4223
|
-
const isFirstFoldEffect =
|
|
4224
|
-
const prevFoldSizeRef =
|
|
4225
|
-
const skipNextFoldEffectRef =
|
|
4226
|
-
const statusMapRef =
|
|
4335
|
+
const isFirstFoldEffect = React14.useRef(true);
|
|
4336
|
+
const prevFoldSizeRef = React14.useRef(0);
|
|
4337
|
+
const skipNextFoldEffectRef = React14.useRef(false);
|
|
4338
|
+
const statusMapRef = React14.useRef(statusMap);
|
|
4227
4339
|
statusMapRef.current = statusMap;
|
|
4228
|
-
const validationIssuesRef =
|
|
4340
|
+
const validationIssuesRef = React14.useRef(validationIssues);
|
|
4229
4341
|
validationIssuesRef.current = validationIssues;
|
|
4230
|
-
const selectedNodeIdRef =
|
|
4342
|
+
const selectedNodeIdRef = React14.useRef(null);
|
|
4231
4343
|
selectedNodeIdRef.current = selectedNodeId(detailSelection);
|
|
4232
|
-
const selectedArrowRef =
|
|
4344
|
+
const selectedArrowRef = React14.useRef(null);
|
|
4233
4345
|
selectedArrowRef.current = (detailSelection == null ? void 0 : detailSelection.kind) === "arrow" ? detailSelection : null;
|
|
4234
|
-
|
|
4346
|
+
React14.useEffect(() => {
|
|
4235
4347
|
if ((detailSelection == null ? void 0 : detailSelection.kind) !== "arrow") return;
|
|
4236
4348
|
const { source, target } = detailSelection;
|
|
4237
4349
|
const drawn = edges.some((e) => e.source === source && e.target === target);
|
|
4238
4350
|
if (!styleCapabilities.valueArrows || !drawn) setDetailSelection(null);
|
|
4239
4351
|
}, [detailSelection, edges, styleCapabilities.valueArrows]);
|
|
4240
|
-
const [validationOpen, setValidationOpen] =
|
|
4241
|
-
const openValidationPanel =
|
|
4352
|
+
const [validationOpen, setValidationOpen] = React14.useState(false);
|
|
4353
|
+
const openValidationPanel = React14.useCallback(() => setValidationOpen(true), []);
|
|
4242
4354
|
const validationWidgetAvailable = validationState !== void 0 && !hideToolbar && interactive;
|
|
4243
|
-
const validationWidgetAvailableRef =
|
|
4355
|
+
const validationWidgetAvailableRef = React14.useRef(validationWidgetAvailable);
|
|
4244
4356
|
validationWidgetAvailableRef.current = validationWidgetAvailable;
|
|
4245
|
-
const decorateNodes =
|
|
4357
|
+
const decorateNodes = React14.useCallback(
|
|
4246
4358
|
(nodes2) => {
|
|
4247
4359
|
var _a2, _b2, _c2;
|
|
4248
4360
|
const raw = rawGraphDataRef.current;
|
|
@@ -4263,7 +4375,7 @@ function GraphViewerCanvas(props) {
|
|
|
4263
4375
|
},
|
|
4264
4376
|
[openValidationPanel]
|
|
4265
4377
|
);
|
|
4266
|
-
const decorateEdges =
|
|
4378
|
+
const decorateEdges = React14.useCallback((graphEdges) => {
|
|
4267
4379
|
const appEdges = toAppEdges(graphEdges);
|
|
4268
4380
|
const arrow = selectedArrowRef.current;
|
|
4269
4381
|
if (!arrow) return appEdges;
|
|
@@ -4271,7 +4383,7 @@ function GraphViewerCanvas(props) {
|
|
|
4271
4383
|
(e) => e.source === arrow.source && e.target === arrow.target ? __spreadProps(__spreadValues({}, e), { selected: true }) : e
|
|
4272
4384
|
);
|
|
4273
4385
|
}, []);
|
|
4274
|
-
const frameLayout =
|
|
4386
|
+
const frameLayout = React14.useCallback(
|
|
4275
4387
|
(style, layout, graphspec2, analysis) => GRAPH_STYLE_PIPELINES[style].frame({
|
|
4276
4388
|
nodes: cloneCachedNodes(layout.nodes),
|
|
4277
4389
|
edges: layout.edges,
|
|
@@ -4290,18 +4402,18 @@ function GraphViewerCanvas(props) {
|
|
|
4290
4402
|
const data = initialDataRef.current;
|
|
4291
4403
|
return cache !== null && data !== null && cache.graphspec === data._graphspec && cache.graphStyle === data._graphStyle;
|
|
4292
4404
|
};
|
|
4293
|
-
const nodesRef =
|
|
4405
|
+
const nodesRef = React14.useRef([]);
|
|
4294
4406
|
nodesRef.current = nodes;
|
|
4295
|
-
const onValidationIssueClickRef =
|
|
4407
|
+
const onValidationIssueClickRef = React14.useRef(onValidationIssueClick);
|
|
4296
4408
|
onValidationIssueClickRef.current = onValidationIssueClick;
|
|
4297
|
-
const flashTimeoutRef =
|
|
4298
|
-
|
|
4409
|
+
const flashTimeoutRef = React14.useRef(null);
|
|
4410
|
+
React14.useEffect(
|
|
4299
4411
|
() => () => {
|
|
4300
4412
|
if (flashTimeoutRef.current) clearTimeout(flashTimeoutRef.current);
|
|
4301
4413
|
},
|
|
4302
4414
|
[]
|
|
4303
4415
|
);
|
|
4304
|
-
const handleValidationIssueClick =
|
|
4416
|
+
const handleValidationIssueClick = React14.useCallback(
|
|
4305
4417
|
(index, issue) => {
|
|
4306
4418
|
var _a2, _b2, _c2;
|
|
4307
4419
|
(_a2 = onValidationIssueClickRef.current) == null ? void 0 : _a2.call(onValidationIssueClickRef, index, issue);
|
|
@@ -4344,8 +4456,8 @@ function GraphViewerCanvas(props) {
|
|
|
4344
4456
|
},
|
|
4345
4457
|
[setNodes]
|
|
4346
4458
|
);
|
|
4347
|
-
const drawnSpecRef =
|
|
4348
|
-
const reportLayoutFailure =
|
|
4459
|
+
const drawnSpecRef = React14.useRef(null);
|
|
4460
|
+
const reportLayoutFailure = React14.useCallback(
|
|
4349
4461
|
(error, spec, stale) => {
|
|
4350
4462
|
console.error("[GraphViewer] ELK layout failed:", error);
|
|
4351
4463
|
const route = routeLayoutFailure({ stale, specDrawn: drawnSpecRef.current === spec });
|
|
@@ -4358,7 +4470,7 @@ function GraphViewerCanvas(props) {
|
|
|
4358
4470
|
},
|
|
4359
4471
|
[]
|
|
4360
4472
|
);
|
|
4361
|
-
|
|
4473
|
+
React14.useEffect(() => {
|
|
4362
4474
|
const data = initialDataRef.current;
|
|
4363
4475
|
if (!data) return;
|
|
4364
4476
|
let cancelled = false;
|
|
@@ -4405,7 +4517,7 @@ function GraphViewerCanvas(props) {
|
|
|
4405
4517
|
cancelled = true;
|
|
4406
4518
|
};
|
|
4407
4519
|
}, [direction, layoutConfig]);
|
|
4408
|
-
|
|
4520
|
+
React14.useEffect(() => {
|
|
4409
4521
|
const cache = layoutCacheRef.current;
|
|
4410
4522
|
const data = initialDataRef.current;
|
|
4411
4523
|
if (!cache || !data || !cacheMatchesData()) return;
|
|
@@ -4420,7 +4532,7 @@ function GraphViewerCanvas(props) {
|
|
|
4420
4532
|
decorateNodes,
|
|
4421
4533
|
decorateEdges
|
|
4422
4534
|
]);
|
|
4423
|
-
|
|
4535
|
+
React14.useEffect(() => {
|
|
4424
4536
|
var _a2;
|
|
4425
4537
|
if (!graphspec) {
|
|
4426
4538
|
initialDataRef.current = null;
|
|
@@ -4545,7 +4657,7 @@ function GraphViewerCanvas(props) {
|
|
|
4545
4657
|
cancelled = true;
|
|
4546
4658
|
};
|
|
4547
4659
|
}, [graphspec, edgeType, graphStyle]);
|
|
4548
|
-
|
|
4660
|
+
React14.useEffect(() => {
|
|
4549
4661
|
if (isFirstFoldEffect.current) {
|
|
4550
4662
|
isFirstFoldEffect.current = false;
|
|
4551
4663
|
prevFoldSizeRef.current = foldedControllers.size;
|
|
@@ -4625,7 +4737,7 @@ function GraphViewerCanvas(props) {
|
|
|
4625
4737
|
cancelled = true;
|
|
4626
4738
|
};
|
|
4627
4739
|
}, [foldedControllers, toggleFold]);
|
|
4628
|
-
|
|
4740
|
+
React14.useEffect(() => {
|
|
4629
4741
|
const cache = layoutCacheRef.current;
|
|
4630
4742
|
const data = initialDataRef.current;
|
|
4631
4743
|
if (!cache || !data || !cacheMatchesData()) return;
|
|
@@ -4633,14 +4745,14 @@ function GraphViewerCanvas(props) {
|
|
|
4633
4745
|
setNodes(decorateNodes(withControllers.nodes));
|
|
4634
4746
|
setEdges(decorateEdges(withControllers.edges));
|
|
4635
4747
|
}, [statusMap, decorateNodes, decorateEdges]);
|
|
4636
|
-
|
|
4748
|
+
React14.useEffect(() => {
|
|
4637
4749
|
const cache = layoutCacheRef.current;
|
|
4638
4750
|
const data = initialDataRef.current;
|
|
4639
4751
|
if (!cache || !data || !cacheMatchesData()) return;
|
|
4640
4752
|
const withControllers = frameLayout(cache.graphStyle, cache, data._graphspec, data._analysis);
|
|
4641
4753
|
setNodes(decorateNodes(withControllers.nodes));
|
|
4642
4754
|
}, [validationIssues, validationWidgetAvailable, decorateNodes]);
|
|
4643
|
-
const onNodeClick =
|
|
4755
|
+
const onNodeClick = React14.useCallback(
|
|
4644
4756
|
(event, node) => {
|
|
4645
4757
|
const nodeData = node.data;
|
|
4646
4758
|
onNodeSelect == null ? void 0 : onNodeSelect(node.id, nodeData, event);
|
|
@@ -4683,7 +4795,7 @@ function GraphViewerCanvas(props) {
|
|
|
4683
4795
|
conceptOverride
|
|
4684
4796
|
]
|
|
4685
4797
|
);
|
|
4686
|
-
const onEdgeClick =
|
|
4798
|
+
const onEdgeClick = React14.useCallback(
|
|
4687
4799
|
(_event, edge) => {
|
|
4688
4800
|
setConceptOverride(null);
|
|
4689
4801
|
const open = (detailSelection == null ? void 0 : detailSelection.kind) === "arrow" && detailSelection.source === edge.source && detailSelection.target === edge.target;
|
|
@@ -4695,7 +4807,7 @@ function GraphViewerCanvas(props) {
|
|
|
4695
4807
|
},
|
|
4696
4808
|
[setNodes, setEdges, detailSelection]
|
|
4697
4809
|
);
|
|
4698
|
-
const onOpenNodeFromPanel =
|
|
4810
|
+
const onOpenNodeFromPanel = React14.useCallback(
|
|
4699
4811
|
(nodeId, event) => {
|
|
4700
4812
|
const node = nodesRef.current.find((n) => n.id === nodeId);
|
|
4701
4813
|
if (!node) return;
|
|
@@ -4711,7 +4823,7 @@ function GraphViewerCanvas(props) {
|
|
|
4711
4823
|
},
|
|
4712
4824
|
[onNodeClick]
|
|
4713
4825
|
);
|
|
4714
|
-
const onInit =
|
|
4826
|
+
const onInit = React14.useCallback(
|
|
4715
4827
|
(reactFlowInstance) => {
|
|
4716
4828
|
reactFlowRef.current = reactFlowInstance;
|
|
4717
4829
|
if (onReactFlowInit) {
|
|
@@ -4720,8 +4832,8 @@ function GraphViewerCanvas(props) {
|
|
|
4720
4832
|
},
|
|
4721
4833
|
[onReactFlowInit]
|
|
4722
4834
|
);
|
|
4723
|
-
const prevInteractiveRef =
|
|
4724
|
-
|
|
4835
|
+
const prevInteractiveRef = React14.useRef(interactive);
|
|
4836
|
+
React14.useEffect(() => {
|
|
4725
4837
|
if (prevInteractiveRef.current === interactive) return;
|
|
4726
4838
|
prevInteractiveRef.current = interactive;
|
|
4727
4839
|
if (!interactive) {
|
|
@@ -4736,13 +4848,13 @@ function GraphViewerCanvas(props) {
|
|
|
4736
4848
|
}, 50);
|
|
4737
4849
|
return () => clearTimeout(timer);
|
|
4738
4850
|
}, [interactive]);
|
|
4739
|
-
const handlePaneClick =
|
|
4851
|
+
const handlePaneClick = React14.useCallback(() => {
|
|
4740
4852
|
setDetailSelection(null);
|
|
4741
4853
|
setConceptOverride(null);
|
|
4742
4854
|
setEdges((eds) => eds.some((e) => e.selected) ? eds.map(deselect) : eds);
|
|
4743
4855
|
onPaneClick == null ? void 0 : onPaneClick();
|
|
4744
4856
|
}, [onPaneClick, setEdges]);
|
|
4745
|
-
const handleConceptClick =
|
|
4857
|
+
const handleConceptClick = React14.useCallback(
|
|
4746
4858
|
(conceptCode) => {
|
|
4747
4859
|
if (!graphspec) return;
|
|
4748
4860
|
const info = resolveConceptRef(graphspec, conceptCode);
|
|
@@ -4753,7 +4865,7 @@ function GraphViewerCanvas(props) {
|
|
|
4753
4865
|
const detailOpen = detailSelection !== null || conceptOverride !== null;
|
|
4754
4866
|
const StylePanel = STYLE_DETAIL_PANELS[graphStyle];
|
|
4755
4867
|
const projectedData = initialDataRef.current;
|
|
4756
|
-
const drawing =
|
|
4868
|
+
const drawing = React14.useMemo(
|
|
4757
4869
|
() => {
|
|
4758
4870
|
var _a2, _b2;
|
|
4759
4871
|
return projectedData && projectedData._graphStyle === graphStyle && projectedData._valueFlows && projectedData._runs ? {
|
|
@@ -4765,16 +4877,25 @@ function GraphViewerCanvas(props) {
|
|
|
4765
4877
|
},
|
|
4766
4878
|
[projectedData, graphStyle]
|
|
4767
4879
|
);
|
|
4768
|
-
const valueOptions =
|
|
4880
|
+
const valueOptions = React14.useMemo(
|
|
4769
4881
|
() => ({
|
|
4770
4882
|
resolveUrl,
|
|
4883
|
+
loadText,
|
|
4771
4884
|
resolveRendition,
|
|
4772
4885
|
resolveDocumentPdf,
|
|
4773
4886
|
resolveShareUrl,
|
|
4774
4887
|
saveFiles,
|
|
4775
4888
|
downloads
|
|
4776
4889
|
}),
|
|
4777
|
-
[
|
|
4890
|
+
[
|
|
4891
|
+
resolveUrl,
|
|
4892
|
+
loadText,
|
|
4893
|
+
resolveRendition,
|
|
4894
|
+
resolveDocumentPdf,
|
|
4895
|
+
resolveShareUrl,
|
|
4896
|
+
saveFiles,
|
|
4897
|
+
downloads
|
|
4898
|
+
]
|
|
4778
4899
|
);
|
|
4779
4900
|
const effectiveToolbarPosition = resolveToolbarPosition(
|
|
4780
4901
|
toolbarPositionProp,
|
|
@@ -4783,7 +4904,7 @@ function GraphViewerCanvas(props) {
|
|
|
4783
4904
|
const rawAnalysis = (_d = rawGraphDataRef.current) == null ? void 0 : _d.analysis;
|
|
4784
4905
|
const allControllerIds = rawAnalysis == null ? void 0 : rawAnalysis.controllerNodeIds;
|
|
4785
4906
|
const foldControlsAvailable = styleCapabilities.foldAll && (!styleCapabilities.controllerFrameToggle || showControllers);
|
|
4786
|
-
const foldAllProps =
|
|
4907
|
+
const foldAllProps = React14.useMemo(() => {
|
|
4787
4908
|
if (!foldControlsAvailable || !allControllerIds || allControllerIds.size === 0) {
|
|
4788
4909
|
return {
|
|
4789
4910
|
onFoldAll: void 0,
|
|
@@ -4805,8 +4926,8 @@ function GraphViewerCanvas(props) {
|
|
|
4805
4926
|
expandAllDisabled: foldedControllers.size === 0
|
|
4806
4927
|
};
|
|
4807
4928
|
}, [foldControlsAvailable, allControllerIds, foldedControllers, markReaderFolds]);
|
|
4808
|
-
const styleMenuOptions =
|
|
4809
|
-
|
|
4929
|
+
const styleMenuOptions = React14.useMemo(() => resolveStyleMenu(styleMenu), [styleMenu]);
|
|
4930
|
+
React14.useEffect(() => {
|
|
4810
4931
|
if (failed) reactFlowRef.current = null;
|
|
4811
4932
|
}, [failed]);
|
|
4812
4933
|
return /* @__PURE__ */ jsx33(
|
|
@@ -4821,7 +4942,7 @@ function GraphViewerCanvas(props) {
|
|
|
4821
4942
|
}),
|
|
4822
4943
|
style: interactive || failed ? void 0 : { height: stillHeight },
|
|
4823
4944
|
inert: !interactive && !failed,
|
|
4824
|
-
children: canvasFailure.inPlace !== null ? /* @__PURE__ */ jsx33(GraphErrorState, { failure: canvasFailure.inPlace }) : /* @__PURE__ */ jsxs30(
|
|
4945
|
+
children: canvasFailure.inPlace !== null ? /* @__PURE__ */ jsx33(GraphErrorState, { failure: canvasFailure.inPlace }) : /* @__PURE__ */ jsxs30(Fragment20, { children: [
|
|
4825
4946
|
/* @__PURE__ */ jsxs30(
|
|
4826
4947
|
ReactFlow,
|
|
4827
4948
|
__spreadProps(__spreadValues({
|