@pipelex/mthds-ui 0.38.0 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/chunk-7JZBXBZS.js +258 -0
- package/dist/chunk-7JZBXBZS.js.map +1 -0
- package/dist/{chunk-AGFLCOWW.js → chunk-HPARBH6K.js} +14 -197
- package/dist/chunk-HPARBH6K.js.map +1 -0
- package/dist/chunk-N2F62MW7.js +55 -0
- package/dist/chunk-N2F62MW7.js.map +1 -0
- package/dist/chunk-P6IGZVWE.js +155 -0
- package/dist/chunk-P6IGZVWE.js.map +1 -0
- package/dist/chunk-RU3CIXFC.js +1251 -0
- package/dist/chunk-RU3CIXFC.js.map +1 -0
- package/dist/form/brand/index.js.map +1 -1
- package/dist/form/react/index.d.ts +36 -3
- package/dist/form/react/index.js +45 -14
- package/dist/form/react/index.js.map +1 -1
- package/dist/graph/index.d.ts +19 -3
- package/dist/graph/index.js +20 -12
- package/dist/graph/react/index.d.ts +13 -13
- package/dist/graph/react/index.js +387 -560
- package/dist/graph/react/index.js.map +1 -1
- package/dist/graph/react/viewer/GraphToolbar.css +2 -107
- package/dist/graph/react/viewer/StyleMenu.css +109 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +20 -12
- package/dist/registryJoin-C6Wfkik-.d.ts +441 -0
- package/dist/standalone/graph-standalone.html +183 -178
- package/dist/standalone/graph-viewer.css +75 -70
- package/dist/standalone/graph-viewer.js +108 -108
- package/dist/static-graph/index.d.ts +1 -1
- package/dist/timeline/index.d.ts +240 -77
- package/dist/timeline/index.js +61 -3
- package/dist/timeline/react/RunTimeline.css +48 -0
- package/dist/timeline/react/index.d.ts +46 -4
- package/dist/timeline/react/index.js +774 -105
- package/dist/timeline/react/index.js.map +1 -1
- package/dist/timeline/react/styles/simple/SimpleProgress.css +354 -0
- package/dist/{types-DsrzH6gM.d.ts → types-DLAnYNoi.d.ts} +1 -1
- package/package.json +5 -3
- package/dist/chunk-AGFLCOWW.js.map +0 -1
- package/dist/chunk-ILZJIORT.js +0 -54
- package/dist/chunk-ILZJIORT.js.map +0 -1
- package/dist/chunk-JJG2TO7P.js +0 -473
- package/dist/chunk-JJG2TO7P.js.map +0 -1
- package/dist/progressSnapshot-VZ4PLul9.d.ts +0 -191
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
+
GRAPH_STYLE_MENU_ENTRIES,
|
|
4
|
+
StyleMenu,
|
|
3
5
|
detectSystemTheme,
|
|
6
|
+
styleMenuLabel,
|
|
7
|
+
usePopoverDismiss,
|
|
4
8
|
useSystemTheme
|
|
5
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-7JZBXBZS.js";
|
|
6
10
|
import {
|
|
7
|
-
GRAPH_STYLES,
|
|
8
11
|
GRAPH_STYLE_PIPELINES,
|
|
9
12
|
GraphSpecValidationError,
|
|
10
13
|
MAX_VISIBLE_CONTROLLER_CHILDREN,
|
|
@@ -19,17 +22,21 @@ import {
|
|
|
19
22
|
fitRoute,
|
|
20
23
|
getLayoutedElements,
|
|
21
24
|
resolveConceptRef,
|
|
22
|
-
resolveGraphStyle,
|
|
23
25
|
resolveIssueTargetNodeId,
|
|
24
26
|
resolveNodeBlueprint,
|
|
25
|
-
resolveStyleMenu,
|
|
26
27
|
roundedPolylinePath,
|
|
27
28
|
routeLabelCenter,
|
|
28
29
|
validateGraphSpec
|
|
29
|
-
} from "../../chunk-
|
|
30
|
+
} from "../../chunk-HPARBH6K.js";
|
|
31
|
+
import {
|
|
32
|
+
GRAPH_STYLES,
|
|
33
|
+
resolveGraphStyle,
|
|
34
|
+
resolveStyleMenu
|
|
35
|
+
} from "../../chunk-N2F62MW7.js";
|
|
30
36
|
import {
|
|
31
37
|
parsePipeRef
|
|
32
38
|
} from "../../chunk-2N65P32H.js";
|
|
39
|
+
import "../../chunk-P6IGZVWE.js";
|
|
33
40
|
import {
|
|
34
41
|
DEFAULT_GRAPH_CONFIG,
|
|
35
42
|
getPaletteForTheme
|
|
@@ -41,7 +48,6 @@ import {
|
|
|
41
48
|
FOLD_MODE,
|
|
42
49
|
GRAPH_DIRECTION,
|
|
43
50
|
GRAPH_SPEC_MODE,
|
|
44
|
-
GRAPH_STYLE,
|
|
45
51
|
GRAPH_THEME_MODE,
|
|
46
52
|
NODE_TYPE_SIMPLE_DECISION,
|
|
47
53
|
NODE_TYPE_SIMPLE_FRAME,
|
|
@@ -72,10 +78,11 @@ import {
|
|
|
72
78
|
import "./graph-core.css";
|
|
73
79
|
import "./detail/DetailPanel.css";
|
|
74
80
|
import "./viewer/GraphToolbar.css";
|
|
81
|
+
import "./viewer/StyleMenu.css";
|
|
75
82
|
import "./styles/simple/SimpleStyle.css";
|
|
76
83
|
|
|
77
84
|
// src/graph/react/viewer/GraphViewer.tsx
|
|
78
|
-
import
|
|
85
|
+
import React11 from "react";
|
|
79
86
|
import {
|
|
80
87
|
ReactFlow,
|
|
81
88
|
useNodesState,
|
|
@@ -1816,7 +1823,7 @@ var GraphFailureBoundary = class extends React7.Component {
|
|
|
1816
1823
|
};
|
|
1817
1824
|
|
|
1818
1825
|
// src/graph/react/viewer/GraphToolbar.tsx
|
|
1819
|
-
import
|
|
1826
|
+
import React8 from "react";
|
|
1820
1827
|
import { Panel } from "@xyflow/react";
|
|
1821
1828
|
|
|
1822
1829
|
// src/graph/react/viewer/ValidationPanel.tsx
|
|
@@ -1935,194 +1942,10 @@ function ValidationPanel({
|
|
|
1935
1942
|
);
|
|
1936
1943
|
}
|
|
1937
1944
|
|
|
1938
|
-
// src/graph/react/viewer/StyleMenu.tsx
|
|
1939
|
-
import React9 from "react";
|
|
1940
|
-
|
|
1941
|
-
// src/graph/react/viewer/usePopoverDismiss.ts
|
|
1942
|
-
import React8 from "react";
|
|
1943
|
-
function usePopoverDismiss(open, wrapperRef, onDismiss) {
|
|
1944
|
-
const onDismissRef = React8.useRef(onDismiss);
|
|
1945
|
-
onDismissRef.current = onDismiss;
|
|
1946
|
-
React8.useEffect(() => {
|
|
1947
|
-
if (!open) return;
|
|
1948
|
-
const onPointerDown = (event) => {
|
|
1949
|
-
const wrapper = wrapperRef.current;
|
|
1950
|
-
if (wrapper && event.target instanceof Node && !wrapper.contains(event.target)) {
|
|
1951
|
-
onDismissRef.current("outside");
|
|
1952
|
-
}
|
|
1953
|
-
};
|
|
1954
|
-
const onKeyDown = (event) => {
|
|
1955
|
-
if (event.key === "Escape") onDismissRef.current("escape");
|
|
1956
|
-
};
|
|
1957
|
-
document.addEventListener("pointerdown", onPointerDown, true);
|
|
1958
|
-
document.addEventListener("keydown", onKeyDown);
|
|
1959
|
-
return () => {
|
|
1960
|
-
document.removeEventListener("pointerdown", onPointerDown, true);
|
|
1961
|
-
document.removeEventListener("keydown", onKeyDown);
|
|
1962
|
-
};
|
|
1963
|
-
}, [open, wrapperRef]);
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
|
-
// src/graph/react/viewer/StyleMenu.tsx
|
|
1967
|
-
import { jsx as jsx23, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1968
|
-
var ICON_PROPS = {
|
|
1969
|
-
viewBox: "0 0 24 24",
|
|
1970
|
-
width: 14,
|
|
1971
|
-
height: 14,
|
|
1972
|
-
fill: "none",
|
|
1973
|
-
stroke: "currentColor",
|
|
1974
|
-
strokeWidth: 2,
|
|
1975
|
-
strokeLinecap: "round",
|
|
1976
|
-
strokeLinejoin: "round"
|
|
1977
|
-
};
|
|
1978
|
-
var STYLE_ICONS = {
|
|
1979
|
-
// Cards with their rows: every pipe with its slots.
|
|
1980
|
-
[GRAPH_STYLE.DETAILED]: /* @__PURE__ */ jsxs23("svg", __spreadProps(__spreadValues({}, ICON_PROPS), { children: [
|
|
1981
|
-
/* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "7", height: "7", rx: "1" }),
|
|
1982
|
-
/* @__PURE__ */ jsx23("rect", { x: "3", y: "14", width: "7", height: "7", rx: "1" }),
|
|
1983
|
-
/* @__PURE__ */ jsx23("line", { x1: "14", y1: "4", x2: "21", y2: "4" }),
|
|
1984
|
-
/* @__PURE__ */ jsx23("line", { x1: "14", y1: "9", x2: "21", y2: "9" }),
|
|
1985
|
-
/* @__PURE__ */ jsx23("line", { x1: "14", y1: "15", x2: "21", y2: "15" }),
|
|
1986
|
-
/* @__PURE__ */ jsx23("line", { x1: "14", y1: "20", x2: "21", y2: "20" })
|
|
1987
|
-
] })),
|
|
1988
|
-
// Two steps and the arrow between them: a flowchart.
|
|
1989
|
-
[GRAPH_STYLE.SIMPLE]: /* @__PURE__ */ jsxs23("svg", __spreadProps(__spreadValues({}, ICON_PROPS), { children: [
|
|
1990
|
-
/* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "8", height: "8", rx: "2" }),
|
|
1991
|
-
/* @__PURE__ */ jsx23("path", { d: "M7 11v4a2 2 0 0 0 2 2h4" }),
|
|
1992
|
-
/* @__PURE__ */ jsx23("rect", { x: "13", y: "13", width: "8", height: "8", rx: "2" })
|
|
1993
|
-
] }))
|
|
1994
|
-
};
|
|
1995
|
-
var CHECK_ICON2 = /* @__PURE__ */ jsx23("svg", __spreadProps(__spreadValues({}, ICON_PROPS), { children: /* @__PURE__ */ jsx23("polyline", { points: "20 6 9 17 4 12" }) }));
|
|
1996
|
-
function graphStyleIcon(style) {
|
|
1997
|
-
return STYLE_ICONS[style];
|
|
1998
|
-
}
|
|
1999
|
-
function styleMenuLabel(style) {
|
|
2000
|
-
return `Graph style: ${GRAPH_STYLES[style].name} \u2014 choose how the graph is drawn`;
|
|
2001
|
-
}
|
|
2002
|
-
function StyleMenu({ value, options, onChange, placement }) {
|
|
2003
|
-
const [open, setOpen] = React9.useState(false);
|
|
2004
|
-
const [activeIndex, setActiveIndex] = React9.useState(0);
|
|
2005
|
-
const wrapperRef = React9.useRef(null);
|
|
2006
|
-
const buttonRef = React9.useRef(null);
|
|
2007
|
-
const itemRefs = React9.useRef([]);
|
|
2008
|
-
const menuId = React9.useId();
|
|
2009
|
-
usePopoverDismiss(open, wrapperRef, (reason) => {
|
|
2010
|
-
var _a;
|
|
2011
|
-
setOpen(false);
|
|
2012
|
-
if (reason === "escape") (_a = buttonRef.current) == null ? void 0 : _a.focus();
|
|
2013
|
-
});
|
|
2014
|
-
React9.useEffect(() => {
|
|
2015
|
-
var _a;
|
|
2016
|
-
if (!open) return;
|
|
2017
|
-
const index = Math.max(0, options.indexOf(value));
|
|
2018
|
-
setActiveIndex(index);
|
|
2019
|
-
(_a = itemRefs.current[index]) == null ? void 0 : _a.focus();
|
|
2020
|
-
}, [open]);
|
|
2021
|
-
const focusItem = (index) => {
|
|
2022
|
-
var _a;
|
|
2023
|
-
const count = options.length;
|
|
2024
|
-
const next = (index % count + count) % count;
|
|
2025
|
-
setActiveIndex(next);
|
|
2026
|
-
(_a = itemRefs.current[next]) == null ? void 0 : _a.focus();
|
|
2027
|
-
};
|
|
2028
|
-
const onMenuKeyDown = (event) => {
|
|
2029
|
-
switch (event.key) {
|
|
2030
|
-
case "ArrowDown":
|
|
2031
|
-
event.preventDefault();
|
|
2032
|
-
focusItem(activeIndex + 1);
|
|
2033
|
-
break;
|
|
2034
|
-
case "ArrowUp":
|
|
2035
|
-
event.preventDefault();
|
|
2036
|
-
focusItem(activeIndex - 1);
|
|
2037
|
-
break;
|
|
2038
|
-
case "Home":
|
|
2039
|
-
event.preventDefault();
|
|
2040
|
-
focusItem(0);
|
|
2041
|
-
break;
|
|
2042
|
-
case "End":
|
|
2043
|
-
event.preventDefault();
|
|
2044
|
-
focusItem(options.length - 1);
|
|
2045
|
-
break;
|
|
2046
|
-
case "Tab":
|
|
2047
|
-
setOpen(false);
|
|
2048
|
-
break;
|
|
2049
|
-
default:
|
|
2050
|
-
break;
|
|
2051
|
-
}
|
|
2052
|
-
};
|
|
2053
|
-
const choose = (style) => {
|
|
2054
|
-
var _a;
|
|
2055
|
-
setOpen(false);
|
|
2056
|
-
(_a = buttonRef.current) == null ? void 0 : _a.focus();
|
|
2057
|
-
if (style !== value) onChange(style);
|
|
2058
|
-
};
|
|
2059
|
-
const label = styleMenuLabel(value);
|
|
2060
|
-
return /* @__PURE__ */ jsxs23("div", { className: "graph-toolbar-style", ref: wrapperRef, children: [
|
|
2061
|
-
/* @__PURE__ */ jsx23(
|
|
2062
|
-
"button",
|
|
2063
|
-
{
|
|
2064
|
-
ref: buttonRef,
|
|
2065
|
-
type: "button",
|
|
2066
|
-
className: `graph-toolbar-btn${open ? " graph-toolbar-btn--open" : ""}`,
|
|
2067
|
-
onClick: () => setOpen(!open),
|
|
2068
|
-
onKeyDown: (event) => {
|
|
2069
|
-
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
2070
|
-
event.preventDefault();
|
|
2071
|
-
setOpen(true);
|
|
2072
|
-
}
|
|
2073
|
-
},
|
|
2074
|
-
title: label,
|
|
2075
|
-
"aria-label": label,
|
|
2076
|
-
"aria-haspopup": "menu",
|
|
2077
|
-
"aria-expanded": open,
|
|
2078
|
-
"aria-controls": open ? menuId : void 0,
|
|
2079
|
-
children: graphStyleIcon(value)
|
|
2080
|
-
}
|
|
2081
|
-
),
|
|
2082
|
-
open && /* @__PURE__ */ jsx23(
|
|
2083
|
-
"div",
|
|
2084
|
-
{
|
|
2085
|
-
id: menuId,
|
|
2086
|
-
role: "menu",
|
|
2087
|
-
"aria-label": "Graph style",
|
|
2088
|
-
className: `graph-style-menu graph-style-menu--${placement}`,
|
|
2089
|
-
onKeyDown: onMenuKeyDown,
|
|
2090
|
-
children: options.map((style, index) => {
|
|
2091
|
-
const descriptor = GRAPH_STYLES[style];
|
|
2092
|
-
const checked = style === value;
|
|
2093
|
-
return /* @__PURE__ */ jsxs23(
|
|
2094
|
-
"button",
|
|
2095
|
-
{
|
|
2096
|
-
ref: (el) => {
|
|
2097
|
-
itemRefs.current[index] = el;
|
|
2098
|
-
},
|
|
2099
|
-
type: "button",
|
|
2100
|
-
role: "menuitemradio",
|
|
2101
|
-
"aria-checked": checked,
|
|
2102
|
-
tabIndex: index === activeIndex ? 0 : -1,
|
|
2103
|
-
className: `graph-style-menu-item${checked ? " graph-style-menu-item--checked" : ""}`,
|
|
2104
|
-
onClick: () => choose(style),
|
|
2105
|
-
children: [
|
|
2106
|
-
/* @__PURE__ */ jsx23("span", { className: "graph-style-menu-icon", "aria-hidden": "true", children: graphStyleIcon(style) }),
|
|
2107
|
-
/* @__PURE__ */ jsxs23("span", { className: "graph-style-menu-text", children: [
|
|
2108
|
-
/* @__PURE__ */ jsx23("span", { className: "graph-style-menu-name", children: descriptor.name }),
|
|
2109
|
-
/* @__PURE__ */ jsx23("span", { className: "graph-style-menu-description", children: descriptor.description })
|
|
2110
|
-
] }),
|
|
2111
|
-
/* @__PURE__ */ jsx23("span", { className: "graph-style-menu-check", "aria-hidden": "true", children: checked ? CHECK_ICON2 : null })
|
|
2112
|
-
]
|
|
2113
|
-
},
|
|
2114
|
-
style
|
|
2115
|
-
);
|
|
2116
|
-
})
|
|
2117
|
-
}
|
|
2118
|
-
)
|
|
2119
|
-
] });
|
|
2120
|
-
}
|
|
2121
|
-
|
|
2122
1945
|
// src/graph/react/viewer/GraphToolbar.tsx
|
|
2123
|
-
import { Fragment as Fragment13, jsx as
|
|
1946
|
+
import { Fragment as Fragment13, jsx as jsx23, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2124
1947
|
var REACTFLOW_PANEL_MARGIN = 15;
|
|
2125
|
-
var ARROW_RIGHT_ICON = /* @__PURE__ */
|
|
1948
|
+
var ARROW_RIGHT_ICON = /* @__PURE__ */ jsxs23(
|
|
2126
1949
|
"svg",
|
|
2127
1950
|
{
|
|
2128
1951
|
viewBox: "0 0 24 24",
|
|
@@ -2134,12 +1957,12 @@ var ARROW_RIGHT_ICON = /* @__PURE__ */ jsxs24(
|
|
|
2134
1957
|
strokeLinecap: "round",
|
|
2135
1958
|
strokeLinejoin: "round",
|
|
2136
1959
|
children: [
|
|
2137
|
-
/* @__PURE__ */
|
|
2138
|
-
/* @__PURE__ */
|
|
1960
|
+
/* @__PURE__ */ jsx23("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
1961
|
+
/* @__PURE__ */ jsx23("polyline", { points: "12 5 19 12 12 19" })
|
|
2139
1962
|
]
|
|
2140
1963
|
}
|
|
2141
1964
|
);
|
|
2142
|
-
var ARROW_DOWN_ICON = /* @__PURE__ */
|
|
1965
|
+
var ARROW_DOWN_ICON = /* @__PURE__ */ jsxs23(
|
|
2143
1966
|
"svg",
|
|
2144
1967
|
{
|
|
2145
1968
|
viewBox: "0 0 24 24",
|
|
@@ -2151,12 +1974,12 @@ var ARROW_DOWN_ICON = /* @__PURE__ */ jsxs24(
|
|
|
2151
1974
|
strokeLinecap: "round",
|
|
2152
1975
|
strokeLinejoin: "round",
|
|
2153
1976
|
children: [
|
|
2154
|
-
/* @__PURE__ */
|
|
2155
|
-
/* @__PURE__ */
|
|
1977
|
+
/* @__PURE__ */ jsx23("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
1978
|
+
/* @__PURE__ */ jsx23("polyline", { points: "19 12 12 19 5 12" })
|
|
2156
1979
|
]
|
|
2157
1980
|
}
|
|
2158
1981
|
);
|
|
2159
|
-
var MINUS_ICON = /* @__PURE__ */
|
|
1982
|
+
var MINUS_ICON = /* @__PURE__ */ jsx23(
|
|
2160
1983
|
"svg",
|
|
2161
1984
|
{
|
|
2162
1985
|
viewBox: "0 0 24 24",
|
|
@@ -2167,10 +1990,10 @@ var MINUS_ICON = /* @__PURE__ */ jsx24(
|
|
|
2167
1990
|
strokeWidth: "2",
|
|
2168
1991
|
strokeLinecap: "round",
|
|
2169
1992
|
strokeLinejoin: "round",
|
|
2170
|
-
children: /* @__PURE__ */
|
|
1993
|
+
children: /* @__PURE__ */ jsx23("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
2171
1994
|
}
|
|
2172
1995
|
);
|
|
2173
|
-
var PLUS_ICON = /* @__PURE__ */
|
|
1996
|
+
var PLUS_ICON = /* @__PURE__ */ jsxs23(
|
|
2174
1997
|
"svg",
|
|
2175
1998
|
{
|
|
2176
1999
|
viewBox: "0 0 24 24",
|
|
@@ -2182,12 +2005,12 @@ var PLUS_ICON = /* @__PURE__ */ jsxs24(
|
|
|
2182
2005
|
strokeLinecap: "round",
|
|
2183
2006
|
strokeLinejoin: "round",
|
|
2184
2007
|
children: [
|
|
2185
|
-
/* @__PURE__ */
|
|
2186
|
-
/* @__PURE__ */
|
|
2008
|
+
/* @__PURE__ */ jsx23("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
2009
|
+
/* @__PURE__ */ jsx23("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
2187
2010
|
]
|
|
2188
2011
|
}
|
|
2189
2012
|
);
|
|
2190
|
-
var FIT_VIEW_ICON = /* @__PURE__ */
|
|
2013
|
+
var FIT_VIEW_ICON = /* @__PURE__ */ jsxs23(
|
|
2191
2014
|
"svg",
|
|
2192
2015
|
{
|
|
2193
2016
|
viewBox: "0 0 24 24",
|
|
@@ -2199,14 +2022,14 @@ var FIT_VIEW_ICON = /* @__PURE__ */ jsxs24(
|
|
|
2199
2022
|
strokeLinecap: "round",
|
|
2200
2023
|
strokeLinejoin: "round",
|
|
2201
2024
|
children: [
|
|
2202
|
-
/* @__PURE__ */
|
|
2203
|
-
/* @__PURE__ */
|
|
2204
|
-
/* @__PURE__ */
|
|
2205
|
-
/* @__PURE__ */
|
|
2025
|
+
/* @__PURE__ */ jsx23("polyline", { points: "15 3 21 3 21 9" }),
|
|
2026
|
+
/* @__PURE__ */ jsx23("polyline", { points: "9 21 3 21 3 15" }),
|
|
2027
|
+
/* @__PURE__ */ jsx23("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
2028
|
+
/* @__PURE__ */ jsx23("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
2206
2029
|
]
|
|
2207
2030
|
}
|
|
2208
2031
|
);
|
|
2209
|
-
var BOXES_ICON = /* @__PURE__ */
|
|
2032
|
+
var BOXES_ICON = /* @__PURE__ */ jsxs23(
|
|
2210
2033
|
"svg",
|
|
2211
2034
|
{
|
|
2212
2035
|
viewBox: "0 0 24 24",
|
|
@@ -2218,22 +2041,22 @@ var BOXES_ICON = /* @__PURE__ */ jsxs24(
|
|
|
2218
2041
|
strokeLinecap: "round",
|
|
2219
2042
|
strokeLinejoin: "round",
|
|
2220
2043
|
children: [
|
|
2221
|
-
/* @__PURE__ */
|
|
2222
|
-
/* @__PURE__ */
|
|
2223
|
-
/* @__PURE__ */
|
|
2224
|
-
/* @__PURE__ */
|
|
2225
|
-
/* @__PURE__ */
|
|
2226
|
-
/* @__PURE__ */
|
|
2227
|
-
/* @__PURE__ */
|
|
2228
|
-
/* @__PURE__ */
|
|
2229
|
-
/* @__PURE__ */
|
|
2230
|
-
/* @__PURE__ */
|
|
2231
|
-
/* @__PURE__ */
|
|
2232
|
-
/* @__PURE__ */
|
|
2044
|
+
/* @__PURE__ */ jsx23("path", { d: "M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z" }),
|
|
2045
|
+
/* @__PURE__ */ jsx23("path", { d: "m7 16.5-4.74-2.85" }),
|
|
2046
|
+
/* @__PURE__ */ jsx23("path", { d: "m7 16.5 5-3" }),
|
|
2047
|
+
/* @__PURE__ */ jsx23("path", { d: "M7 16.5v5.17" }),
|
|
2048
|
+
/* @__PURE__ */ jsx23("path", { d: "M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z" }),
|
|
2049
|
+
/* @__PURE__ */ jsx23("path", { d: "m17 16.5-5-3" }),
|
|
2050
|
+
/* @__PURE__ */ jsx23("path", { d: "m17 16.5 4.74-2.85" }),
|
|
2051
|
+
/* @__PURE__ */ jsx23("path", { d: "M17 16.5v5.17" }),
|
|
2052
|
+
/* @__PURE__ */ jsx23("path", { d: "M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z" }),
|
|
2053
|
+
/* @__PURE__ */ jsx23("path", { d: "M12 8 7.26 5.15" }),
|
|
2054
|
+
/* @__PURE__ */ jsx23("path", { d: "m12 8 4.74-2.85" }),
|
|
2055
|
+
/* @__PURE__ */ jsx23("path", { d: "M12 13.5V8" })
|
|
2233
2056
|
]
|
|
2234
2057
|
}
|
|
2235
2058
|
);
|
|
2236
|
-
var FOLD_ALL_ICON = /* @__PURE__ */
|
|
2059
|
+
var FOLD_ALL_ICON = /* @__PURE__ */ jsxs23(
|
|
2237
2060
|
"svg",
|
|
2238
2061
|
{
|
|
2239
2062
|
viewBox: "0 0 24 24",
|
|
@@ -2245,15 +2068,15 @@ var FOLD_ALL_ICON = /* @__PURE__ */ jsxs24(
|
|
|
2245
2068
|
strokeLinecap: "round",
|
|
2246
2069
|
strokeLinejoin: "round",
|
|
2247
2070
|
children: [
|
|
2248
|
-
/* @__PURE__ */
|
|
2249
|
-
/* @__PURE__ */
|
|
2250
|
-
/* @__PURE__ */
|
|
2251
|
-
/* @__PURE__ */
|
|
2252
|
-
/* @__PURE__ */
|
|
2071
|
+
/* @__PURE__ */ jsx23("rect", { x: "6", y: "6", width: "12", height: "12", rx: "2" }),
|
|
2072
|
+
/* @__PURE__ */ jsx23("polyline", { points: "2 2 6 6 2 6" }),
|
|
2073
|
+
/* @__PURE__ */ jsx23("polyline", { points: "22 2 18 6 22 6" }),
|
|
2074
|
+
/* @__PURE__ */ jsx23("polyline", { points: "2 22 6 18 2 18" }),
|
|
2075
|
+
/* @__PURE__ */ jsx23("polyline", { points: "22 22 18 18 22 18" })
|
|
2253
2076
|
]
|
|
2254
2077
|
}
|
|
2255
2078
|
);
|
|
2256
|
-
var EXPAND_ALL_ICON = /* @__PURE__ */
|
|
2079
|
+
var EXPAND_ALL_ICON = /* @__PURE__ */ jsxs23(
|
|
2257
2080
|
"svg",
|
|
2258
2081
|
{
|
|
2259
2082
|
viewBox: "0 0 24 24",
|
|
@@ -2265,15 +2088,15 @@ var EXPAND_ALL_ICON = /* @__PURE__ */ jsxs24(
|
|
|
2265
2088
|
strokeLinecap: "round",
|
|
2266
2089
|
strokeLinejoin: "round",
|
|
2267
2090
|
children: [
|
|
2268
|
-
/* @__PURE__ */
|
|
2269
|
-
/* @__PURE__ */
|
|
2270
|
-
/* @__PURE__ */
|
|
2271
|
-
/* @__PURE__ */
|
|
2272
|
-
/* @__PURE__ */
|
|
2091
|
+
/* @__PURE__ */ jsx23("rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" }),
|
|
2092
|
+
/* @__PURE__ */ jsx23("polyline", { points: "3 3 7 7 3 7" }),
|
|
2093
|
+
/* @__PURE__ */ jsx23("polyline", { points: "21 3 17 7 21 7" }),
|
|
2094
|
+
/* @__PURE__ */ jsx23("polyline", { points: "3 21 7 17 3 17" }),
|
|
2095
|
+
/* @__PURE__ */ jsx23("polyline", { points: "21 21 17 17 21 17" })
|
|
2273
2096
|
]
|
|
2274
2097
|
}
|
|
2275
2098
|
);
|
|
2276
|
-
var SUN_ICON = /* @__PURE__ */
|
|
2099
|
+
var SUN_ICON = /* @__PURE__ */ jsxs23(
|
|
2277
2100
|
"svg",
|
|
2278
2101
|
{
|
|
2279
2102
|
viewBox: "0 0 24 24",
|
|
@@ -2285,19 +2108,19 @@ var SUN_ICON = /* @__PURE__ */ jsxs24(
|
|
|
2285
2108
|
strokeLinecap: "round",
|
|
2286
2109
|
strokeLinejoin: "round",
|
|
2287
2110
|
children: [
|
|
2288
|
-
/* @__PURE__ */
|
|
2289
|
-
/* @__PURE__ */
|
|
2290
|
-
/* @__PURE__ */
|
|
2291
|
-
/* @__PURE__ */
|
|
2292
|
-
/* @__PURE__ */
|
|
2293
|
-
/* @__PURE__ */
|
|
2294
|
-
/* @__PURE__ */
|
|
2295
|
-
/* @__PURE__ */
|
|
2296
|
-
/* @__PURE__ */
|
|
2111
|
+
/* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "4" }),
|
|
2112
|
+
/* @__PURE__ */ jsx23("line", { x1: "12", y1: "2", x2: "12", y2: "4" }),
|
|
2113
|
+
/* @__PURE__ */ jsx23("line", { x1: "12", y1: "20", x2: "12", y2: "22" }),
|
|
2114
|
+
/* @__PURE__ */ jsx23("line", { x1: "4.93", y1: "4.93", x2: "6.34", y2: "6.34" }),
|
|
2115
|
+
/* @__PURE__ */ jsx23("line", { x1: "17.66", y1: "17.66", x2: "19.07", y2: "19.07" }),
|
|
2116
|
+
/* @__PURE__ */ jsx23("line", { x1: "2", y1: "12", x2: "4", y2: "12" }),
|
|
2117
|
+
/* @__PURE__ */ jsx23("line", { x1: "20", y1: "12", x2: "22", y2: "12" }),
|
|
2118
|
+
/* @__PURE__ */ jsx23("line", { x1: "4.93", y1: "19.07", x2: "6.34", y2: "17.66" }),
|
|
2119
|
+
/* @__PURE__ */ jsx23("line", { x1: "17.66", y1: "6.34", x2: "19.07", y2: "4.93" })
|
|
2297
2120
|
]
|
|
2298
2121
|
}
|
|
2299
2122
|
);
|
|
2300
|
-
var MOON_ICON = /* @__PURE__ */
|
|
2123
|
+
var MOON_ICON = /* @__PURE__ */ jsx23(
|
|
2301
2124
|
"svg",
|
|
2302
2125
|
{
|
|
2303
2126
|
viewBox: "0 0 24 24",
|
|
@@ -2308,10 +2131,10 @@ var MOON_ICON = /* @__PURE__ */ jsx24(
|
|
|
2308
2131
|
strokeWidth: "2",
|
|
2309
2132
|
strokeLinecap: "round",
|
|
2310
2133
|
strokeLinejoin: "round",
|
|
2311
|
-
children: /* @__PURE__ */
|
|
2134
|
+
children: /* @__PURE__ */ jsx23("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
|
|
2312
2135
|
}
|
|
2313
2136
|
);
|
|
2314
|
-
var MONITOR_ICON = /* @__PURE__ */
|
|
2137
|
+
var MONITOR_ICON = /* @__PURE__ */ jsxs23(
|
|
2315
2138
|
"svg",
|
|
2316
2139
|
{
|
|
2317
2140
|
viewBox: "0 0 24 24",
|
|
@@ -2323,13 +2146,13 @@ var MONITOR_ICON = /* @__PURE__ */ jsxs24(
|
|
|
2323
2146
|
strokeLinecap: "round",
|
|
2324
2147
|
strokeLinejoin: "round",
|
|
2325
2148
|
children: [
|
|
2326
|
-
/* @__PURE__ */
|
|
2327
|
-
/* @__PURE__ */
|
|
2328
|
-
/* @__PURE__ */
|
|
2149
|
+
/* @__PURE__ */ jsx23("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
|
|
2150
|
+
/* @__PURE__ */ jsx23("line", { x1: "8", y1: "21", x2: "16", y2: "21" }),
|
|
2151
|
+
/* @__PURE__ */ jsx23("line", { x1: "12", y1: "17", x2: "12", y2: "21" })
|
|
2329
2152
|
]
|
|
2330
2153
|
}
|
|
2331
2154
|
);
|
|
2332
|
-
var SPINNER_ICON = /* @__PURE__ */
|
|
2155
|
+
var SPINNER_ICON = /* @__PURE__ */ jsx23(
|
|
2333
2156
|
"svg",
|
|
2334
2157
|
{
|
|
2335
2158
|
className: "graph-toolbar-validation-spin",
|
|
@@ -2341,10 +2164,10 @@ var SPINNER_ICON = /* @__PURE__ */ jsx24(
|
|
|
2341
2164
|
strokeWidth: "2",
|
|
2342
2165
|
strokeLinecap: "round",
|
|
2343
2166
|
strokeLinejoin: "round",
|
|
2344
|
-
children: /* @__PURE__ */
|
|
2167
|
+
children: /* @__PURE__ */ jsx23("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
|
|
2345
2168
|
}
|
|
2346
2169
|
);
|
|
2347
|
-
var
|
|
2170
|
+
var CHECK_ICON2 = /* @__PURE__ */ jsx23(
|
|
2348
2171
|
"svg",
|
|
2349
2172
|
{
|
|
2350
2173
|
viewBox: "0 0 24 24",
|
|
@@ -2355,10 +2178,10 @@ var CHECK_ICON3 = /* @__PURE__ */ jsx24(
|
|
|
2355
2178
|
strokeWidth: "2",
|
|
2356
2179
|
strokeLinecap: "round",
|
|
2357
2180
|
strokeLinejoin: "round",
|
|
2358
|
-
children: /* @__PURE__ */
|
|
2181
|
+
children: /* @__PURE__ */ jsx23("polyline", { points: "20 6 9 17 4 12" })
|
|
2359
2182
|
}
|
|
2360
2183
|
);
|
|
2361
|
-
var X_CIRCLE_ICON = /* @__PURE__ */
|
|
2184
|
+
var X_CIRCLE_ICON = /* @__PURE__ */ jsxs23(
|
|
2362
2185
|
"svg",
|
|
2363
2186
|
{
|
|
2364
2187
|
viewBox: "0 0 24 24",
|
|
@@ -2370,13 +2193,13 @@ var X_CIRCLE_ICON = /* @__PURE__ */ jsxs24(
|
|
|
2370
2193
|
strokeLinecap: "round",
|
|
2371
2194
|
strokeLinejoin: "round",
|
|
2372
2195
|
children: [
|
|
2373
|
-
/* @__PURE__ */
|
|
2374
|
-
/* @__PURE__ */
|
|
2375
|
-
/* @__PURE__ */
|
|
2196
|
+
/* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2197
|
+
/* @__PURE__ */ jsx23("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
|
|
2198
|
+
/* @__PURE__ */ jsx23("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
|
|
2376
2199
|
]
|
|
2377
2200
|
}
|
|
2378
2201
|
);
|
|
2379
|
-
var ALERT_TRIANGLE_ICON = /* @__PURE__ */
|
|
2202
|
+
var ALERT_TRIANGLE_ICON = /* @__PURE__ */ jsxs23(
|
|
2380
2203
|
"svg",
|
|
2381
2204
|
{
|
|
2382
2205
|
viewBox: "0 0 24 24",
|
|
@@ -2388,13 +2211,13 @@ var ALERT_TRIANGLE_ICON = /* @__PURE__ */ jsxs24(
|
|
|
2388
2211
|
strokeLinecap: "round",
|
|
2389
2212
|
strokeLinejoin: "round",
|
|
2390
2213
|
children: [
|
|
2391
|
-
/* @__PURE__ */
|
|
2392
|
-
/* @__PURE__ */
|
|
2393
|
-
/* @__PURE__ */
|
|
2214
|
+
/* @__PURE__ */ jsx23("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
|
|
2215
|
+
/* @__PURE__ */ jsx23("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
2216
|
+
/* @__PURE__ */ jsx23("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
2394
2217
|
]
|
|
2395
2218
|
}
|
|
2396
2219
|
);
|
|
2397
|
-
var INFO_CIRCLE_ICON = /* @__PURE__ */
|
|
2220
|
+
var INFO_CIRCLE_ICON = /* @__PURE__ */ jsxs23(
|
|
2398
2221
|
"svg",
|
|
2399
2222
|
{
|
|
2400
2223
|
viewBox: "0 0 24 24",
|
|
@@ -2406,9 +2229,9 @@ var INFO_CIRCLE_ICON = /* @__PURE__ */ jsxs24(
|
|
|
2406
2229
|
strokeLinecap: "round",
|
|
2407
2230
|
strokeLinejoin: "round",
|
|
2408
2231
|
children: [
|
|
2409
|
-
/* @__PURE__ */
|
|
2410
|
-
/* @__PURE__ */
|
|
2411
|
-
/* @__PURE__ */
|
|
2232
|
+
/* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2233
|
+
/* @__PURE__ */ jsx23("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
2234
|
+
/* @__PURE__ */ jsx23("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
2412
2235
|
]
|
|
2413
2236
|
}
|
|
2414
2237
|
);
|
|
@@ -2417,7 +2240,7 @@ function validationIcon(state) {
|
|
|
2417
2240
|
case VALIDATION_STATE.VALIDATING:
|
|
2418
2241
|
return SPINNER_ICON;
|
|
2419
2242
|
case VALIDATION_STATE.VALID:
|
|
2420
|
-
return
|
|
2243
|
+
return CHECK_ICON2;
|
|
2421
2244
|
case VALIDATION_STATE.INVALID:
|
|
2422
2245
|
return X_CIRCLE_ICON;
|
|
2423
2246
|
case VALIDATION_STATE.ERROR:
|
|
@@ -2482,11 +2305,11 @@ function GraphToolbar({
|
|
|
2482
2305
|
const orientation = toolbarOrientation(position);
|
|
2483
2306
|
const setValidationOpen = onValidationOpenChange != null ? onValidationOpenChange : (() => {
|
|
2484
2307
|
});
|
|
2485
|
-
const setValidationOpenRef =
|
|
2308
|
+
const setValidationOpenRef = React8.useRef(setValidationOpen);
|
|
2486
2309
|
setValidationOpenRef.current = setValidationOpen;
|
|
2487
|
-
const validationRef =
|
|
2488
|
-
const validationPanelId =
|
|
2489
|
-
|
|
2310
|
+
const validationRef = React8.useRef(null);
|
|
2311
|
+
const validationPanelId = React8.useId();
|
|
2312
|
+
React8.useEffect(() => {
|
|
2490
2313
|
if (validationState === void 0) setValidationOpenRef.current(false);
|
|
2491
2314
|
}, [validationState]);
|
|
2492
2315
|
usePopoverDismiss(validationOpen, validationRef, () => setValidationOpenRef.current(false));
|
|
@@ -2499,16 +2322,16 @@ function GraphToolbar({
|
|
|
2499
2322
|
const foldAllSection = onFoldAll || onExpandAll;
|
|
2500
2323
|
const foldAllTitle = foldAllDisabled ? "Fold all controllers (nothing to fold)" : "Fold all controllers";
|
|
2501
2324
|
const expandAllTitle = expandAllDisabled ? "Expand all controllers (nothing to expand)" : "Expand all controllers";
|
|
2502
|
-
return /* @__PURE__ */
|
|
2325
|
+
return /* @__PURE__ */ jsx23(
|
|
2503
2326
|
Panel,
|
|
2504
2327
|
{
|
|
2505
2328
|
position,
|
|
2506
2329
|
className: `graph-toolbar-panel graph-toolbar-panel--${orientation}`,
|
|
2507
2330
|
style: panelStyle,
|
|
2508
|
-
children: /* @__PURE__ */
|
|
2509
|
-
validationState !== void 0 && /* @__PURE__ */
|
|
2510
|
-
/* @__PURE__ */
|
|
2511
|
-
/* @__PURE__ */
|
|
2331
|
+
children: /* @__PURE__ */ jsxs23("div", { className: `graph-toolbar graph-toolbar--${orientation}`, children: [
|
|
2332
|
+
validationState !== void 0 && /* @__PURE__ */ jsxs23(Fragment13, { children: [
|
|
2333
|
+
/* @__PURE__ */ jsxs23("div", { className: "graph-toolbar-validation", ref: validationRef, children: [
|
|
2334
|
+
/* @__PURE__ */ jsxs23(
|
|
2512
2335
|
"button",
|
|
2513
2336
|
{
|
|
2514
2337
|
type: "button",
|
|
@@ -2521,11 +2344,11 @@ function GraphToolbar({
|
|
|
2521
2344
|
"aria-controls": validationPanelId,
|
|
2522
2345
|
children: [
|
|
2523
2346
|
validationIcon(validationState),
|
|
2524
|
-
validationIssues.length > 0 && /* @__PURE__ */
|
|
2347
|
+
validationIssues.length > 0 && /* @__PURE__ */ jsx23("span", { className: "graph-toolbar-validation-badge", children: validationIssues.length > 99 ? "99+" : validationIssues.length })
|
|
2525
2348
|
]
|
|
2526
2349
|
}
|
|
2527
2350
|
),
|
|
2528
|
-
validationOpen && /* @__PURE__ */
|
|
2351
|
+
validationOpen && /* @__PURE__ */ jsx23(
|
|
2529
2352
|
ValidationPanel,
|
|
2530
2353
|
{
|
|
2531
2354
|
id: validationPanelId,
|
|
@@ -2536,21 +2359,25 @@ function GraphToolbar({
|
|
|
2536
2359
|
}
|
|
2537
2360
|
)
|
|
2538
2361
|
] }),
|
|
2539
|
-
/* @__PURE__ */
|
|
2362
|
+
/* @__PURE__ */ jsx23("div", { className: "graph-toolbar-separator" })
|
|
2540
2363
|
] }),
|
|
2541
|
-
styleMenuEnabled && /* @__PURE__ */
|
|
2542
|
-
/* @__PURE__ */
|
|
2364
|
+
styleMenuEnabled && /* @__PURE__ */ jsxs23(Fragment13, { children: [
|
|
2365
|
+
/* @__PURE__ */ jsx23(
|
|
2543
2366
|
StyleMenu,
|
|
2544
2367
|
{
|
|
2545
2368
|
value: graphStyle,
|
|
2546
2369
|
options: styleMenuOptions,
|
|
2547
2370
|
onChange: onGraphStyleChange,
|
|
2548
|
-
placement: validationPanelPlacement(position)
|
|
2371
|
+
placement: validationPanelPlacement(position),
|
|
2372
|
+
entries: GRAPH_STYLE_MENU_ENTRIES,
|
|
2373
|
+
menuLabel: "Graph style",
|
|
2374
|
+
buttonLabel: styleMenuLabel,
|
|
2375
|
+
buttonClassName: "graph-toolbar-btn"
|
|
2549
2376
|
}
|
|
2550
2377
|
),
|
|
2551
|
-
/* @__PURE__ */
|
|
2378
|
+
/* @__PURE__ */ jsx23("div", { className: "graph-toolbar-separator" })
|
|
2552
2379
|
] }),
|
|
2553
|
-
onFoldAll && /* @__PURE__ */
|
|
2380
|
+
onFoldAll && /* @__PURE__ */ jsx23(
|
|
2554
2381
|
"button",
|
|
2555
2382
|
{
|
|
2556
2383
|
type: "button",
|
|
@@ -2562,7 +2389,7 @@ function GraphToolbar({
|
|
|
2562
2389
|
children: FOLD_ALL_ICON
|
|
2563
2390
|
}
|
|
2564
2391
|
),
|
|
2565
|
-
onExpandAll && /* @__PURE__ */
|
|
2392
|
+
onExpandAll && /* @__PURE__ */ jsx23(
|
|
2566
2393
|
"button",
|
|
2567
2394
|
{
|
|
2568
2395
|
type: "button",
|
|
@@ -2574,8 +2401,8 @@ function GraphToolbar({
|
|
|
2574
2401
|
children: EXPAND_ALL_ICON
|
|
2575
2402
|
}
|
|
2576
2403
|
),
|
|
2577
|
-
foldAllSection && /* @__PURE__ */
|
|
2578
|
-
onShowControllersChange && /* @__PURE__ */
|
|
2404
|
+
foldAllSection && /* @__PURE__ */ jsx23("div", { className: "graph-toolbar-separator" }),
|
|
2405
|
+
onShowControllersChange && /* @__PURE__ */ jsx23(
|
|
2579
2406
|
"button",
|
|
2580
2407
|
{
|
|
2581
2408
|
type: "button",
|
|
@@ -2586,7 +2413,7 @@ function GraphToolbar({
|
|
|
2586
2413
|
children: BOXES_ICON
|
|
2587
2414
|
}
|
|
2588
2415
|
),
|
|
2589
|
-
/* @__PURE__ */
|
|
2416
|
+
/* @__PURE__ */ jsx23(
|
|
2590
2417
|
"button",
|
|
2591
2418
|
{
|
|
2592
2419
|
type: "button",
|
|
@@ -2597,8 +2424,8 @@ function GraphToolbar({
|
|
|
2597
2424
|
children: isVertical ? ARROW_RIGHT_ICON : ARROW_DOWN_ICON
|
|
2598
2425
|
}
|
|
2599
2426
|
),
|
|
2600
|
-
(onZoomOut || onZoomIn || onFitView) && /* @__PURE__ */
|
|
2601
|
-
onZoomOut && /* @__PURE__ */
|
|
2427
|
+
(onZoomOut || onZoomIn || onFitView) && /* @__PURE__ */ jsx23("div", { className: "graph-toolbar-separator" }),
|
|
2428
|
+
onZoomOut && /* @__PURE__ */ jsx23(
|
|
2602
2429
|
"button",
|
|
2603
2430
|
{
|
|
2604
2431
|
type: "button",
|
|
@@ -2609,7 +2436,7 @@ function GraphToolbar({
|
|
|
2609
2436
|
children: MINUS_ICON
|
|
2610
2437
|
}
|
|
2611
2438
|
),
|
|
2612
|
-
onZoomIn && /* @__PURE__ */
|
|
2439
|
+
onZoomIn && /* @__PURE__ */ jsx23(
|
|
2613
2440
|
"button",
|
|
2614
2441
|
{
|
|
2615
2442
|
type: "button",
|
|
@@ -2620,7 +2447,7 @@ function GraphToolbar({
|
|
|
2620
2447
|
children: PLUS_ICON
|
|
2621
2448
|
}
|
|
2622
2449
|
),
|
|
2623
|
-
onFitView && /* @__PURE__ */
|
|
2450
|
+
onFitView && /* @__PURE__ */ jsx23(
|
|
2624
2451
|
"button",
|
|
2625
2452
|
{
|
|
2626
2453
|
type: "button",
|
|
@@ -2631,9 +2458,9 @@ function GraphToolbar({
|
|
|
2631
2458
|
children: FIT_VIEW_ICON
|
|
2632
2459
|
}
|
|
2633
2460
|
),
|
|
2634
|
-
themeToggleEnabled && /* @__PURE__ */
|
|
2635
|
-
/* @__PURE__ */
|
|
2636
|
-
/* @__PURE__ */
|
|
2461
|
+
themeToggleEnabled && /* @__PURE__ */ jsxs23(Fragment13, { children: [
|
|
2462
|
+
/* @__PURE__ */ jsx23("div", { className: "graph-toolbar-separator" }),
|
|
2463
|
+
/* @__PURE__ */ jsx23(
|
|
2637
2464
|
"button",
|
|
2638
2465
|
{
|
|
2639
2466
|
type: "button",
|
|
@@ -2651,7 +2478,7 @@ function GraphToolbar({
|
|
|
2651
2478
|
}
|
|
2652
2479
|
|
|
2653
2480
|
// src/graph/react/viewer/StillFit.tsx
|
|
2654
|
-
import
|
|
2481
|
+
import React9 from "react";
|
|
2655
2482
|
import { useEdges, useNodes, useNodesInitialized, useReactFlow, useStore } from "@xyflow/react";
|
|
2656
2483
|
|
|
2657
2484
|
// src/graph/react/viewer/stillViewport.ts
|
|
@@ -2698,7 +2525,7 @@ function StillFit({ onHeight }) {
|
|
|
2698
2525
|
const nodes = useNodes();
|
|
2699
2526
|
const edges = useEdges();
|
|
2700
2527
|
const { getNodesBounds, setViewport } = useReactFlow();
|
|
2701
|
-
|
|
2528
|
+
React9.useLayoutEffect(() => {
|
|
2702
2529
|
if (!nodesInitialized || nodes.length === 0) return;
|
|
2703
2530
|
const bounds = stillContentBounds(
|
|
2704
2531
|
getNodesBounds(nodes),
|
|
@@ -2716,7 +2543,7 @@ function StillFit({ onHeight }) {
|
|
|
2716
2543
|
}
|
|
2717
2544
|
|
|
2718
2545
|
// src/graph/react/nodes/NodeValidationBadge.tsx
|
|
2719
|
-
import { jsx as
|
|
2546
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
2720
2547
|
function NodeValidationBadge({
|
|
2721
2548
|
validation,
|
|
2722
2549
|
onClick
|
|
@@ -2726,9 +2553,9 @@ function NodeValidationBadge({
|
|
|
2726
2553
|
const className = `node-validation-badge node-validation-badge--${validation.severity}`;
|
|
2727
2554
|
const text = validation.count > 99 ? "99+" : String(validation.count);
|
|
2728
2555
|
if (!onClick) {
|
|
2729
|
-
return /* @__PURE__ */
|
|
2556
|
+
return /* @__PURE__ */ jsx24("span", { className, title: tooltip, "aria-label": label, children: text });
|
|
2730
2557
|
}
|
|
2731
|
-
return /* @__PURE__ */
|
|
2558
|
+
return /* @__PURE__ */ jsx24(
|
|
2732
2559
|
"button",
|
|
2733
2560
|
{
|
|
2734
2561
|
type: "button",
|
|
@@ -2748,7 +2575,7 @@ function validationRingClass(validation) {
|
|
|
2748
2575
|
}
|
|
2749
2576
|
|
|
2750
2577
|
// src/graph/react/nodes/controller/ControllerGroupNode.tsx
|
|
2751
|
-
import { jsx as
|
|
2578
|
+
import { jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2752
2579
|
var CONTROLLER_CONFIG = {
|
|
2753
2580
|
PipeSequence: { badge: "Sequence", icon: "\u2192" },
|
|
2754
2581
|
PipeParallel: { badge: "Parallel", icon: "//" },
|
|
@@ -2771,16 +2598,16 @@ function ControllerGroupNode({ data }) {
|
|
|
2771
2598
|
const isCollapsible = (data.pipeType === "PipeParallel" || data.pipeType === "PipeBatch") && ((_a = data.childCount) != null ? _a : 0) > MAX_VISIBLE_CONTROLLER_CHILDREN;
|
|
2772
2599
|
const hiddenCount = isCollapsible ? ((_b = data.childCount) != null ? _b : 0) - MAX_VISIBLE_CONTROLLER_CHILDREN : 0;
|
|
2773
2600
|
const failingClass = data.failingPipe ? " controller-group-node--failing-pipe" : "";
|
|
2774
|
-
return /* @__PURE__ */
|
|
2601
|
+
return /* @__PURE__ */ jsxs24(
|
|
2775
2602
|
"div",
|
|
2776
2603
|
{
|
|
2777
2604
|
className: `controller-group-node ${modifier}${failingClass}${validationRingClass(data.validation)}`,
|
|
2778
2605
|
children: [
|
|
2779
|
-
/* @__PURE__ */
|
|
2780
|
-
/* @__PURE__ */
|
|
2781
|
-
/* @__PURE__ */
|
|
2782
|
-
data.label && /* @__PURE__ */
|
|
2783
|
-
data.onToggleFold && /* @__PURE__ */
|
|
2606
|
+
/* @__PURE__ */ jsxs24("div", { className: "controller-group-header", children: [
|
|
2607
|
+
/* @__PURE__ */ jsx25("span", { className: "controller-group-icon", children: config.icon }),
|
|
2608
|
+
/* @__PURE__ */ jsx25("span", { className: "controller-group-badge", children: config.badge }),
|
|
2609
|
+
data.label && /* @__PURE__ */ jsx25("span", { className: "controller-group-label", children: data.label }),
|
|
2610
|
+
data.onToggleFold && /* @__PURE__ */ jsx25(
|
|
2784
2611
|
"button",
|
|
2785
2612
|
{
|
|
2786
2613
|
type: "button",
|
|
@@ -2795,9 +2622,9 @@ function ControllerGroupNode({ data }) {
|
|
|
2795
2622
|
children: "\u2921"
|
|
2796
2623
|
}
|
|
2797
2624
|
),
|
|
2798
|
-
data.validation && /* @__PURE__ */
|
|
2625
|
+
data.validation && /* @__PURE__ */ jsx25(NodeValidationBadge, { validation: data.validation, onClick: data.onValidationBadgeClick })
|
|
2799
2626
|
] }),
|
|
2800
|
-
isCollapsible && /* @__PURE__ */
|
|
2627
|
+
isCollapsible && /* @__PURE__ */ jsx25(
|
|
2801
2628
|
"button",
|
|
2802
2629
|
{
|
|
2803
2630
|
className: "controller-group-collapse",
|
|
@@ -2820,7 +2647,7 @@ import { Handle, Position } from "@xyflow/react";
|
|
|
2820
2647
|
|
|
2821
2648
|
// src/graph/react/nodes/pipe/PipeCardBase.tsx
|
|
2822
2649
|
import { useState as useState2 } from "react";
|
|
2823
|
-
import { jsx as
|
|
2650
|
+
import { jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2824
2651
|
var PIPE_TYPE_BADGES2 = {
|
|
2825
2652
|
PipeLLM: "LLM",
|
|
2826
2653
|
PipeExtract: "Extract",
|
|
@@ -2882,22 +2709,22 @@ function PipeCardBase({ data, children }) {
|
|
|
2882
2709
|
const failingClass = data.failingPipe ? " pipe-card--failing-pipe" : "";
|
|
2883
2710
|
const badgeClass = isController ? "pipe-card-badge pipe-card-badge--controller" : isSignature ? "pipe-card-badge pipe-card-badge--signature" : isBinding ? "pipe-card-badge pipe-card-badge--binding" : "pipe-card-badge";
|
|
2884
2711
|
const ringClass = validationRingClass(data.validation);
|
|
2885
|
-
return /* @__PURE__ */
|
|
2712
|
+
return /* @__PURE__ */ jsxs25(
|
|
2886
2713
|
"div",
|
|
2887
2714
|
{
|
|
2888
2715
|
className: `pipe-card ${dirClass}${controllerClass}${signatureClass}${bindingClass}${staticClass}${failingClass}${ringClass}`,
|
|
2889
2716
|
children: [
|
|
2890
|
-
/* @__PURE__ */
|
|
2891
|
-
/* @__PURE__ */
|
|
2892
|
-
data.docGenFormat && /* @__PURE__ */
|
|
2893
|
-
/* @__PURE__ */
|
|
2894
|
-
!isStatic && /* @__PURE__ */
|
|
2717
|
+
/* @__PURE__ */ jsxs25("div", { className: "pipe-card-header", children: [
|
|
2718
|
+
/* @__PURE__ */ jsx26("span", { className: badgeClass, children: badge }),
|
|
2719
|
+
data.docGenFormat && /* @__PURE__ */ jsx26("span", { className: "pipe-card-format", title: `Document format: ${data.docGenFormat}`, children: data.docGenFormat.toUpperCase() }),
|
|
2720
|
+
/* @__PURE__ */ jsx26("span", { className: "pipe-card-code", title: data.pipeCode, children: data.pipeCode }),
|
|
2721
|
+
!isStatic && /* @__PURE__ */ jsx26(
|
|
2895
2722
|
"span",
|
|
2896
2723
|
{
|
|
2897
2724
|
className: "pipe-card-status",
|
|
2898
2725
|
style: { color: statusConfig.color },
|
|
2899
2726
|
title: data.failingPipe ? "Failed here: the run failed in this pipe" : statusConfig.label,
|
|
2900
|
-
children: /* @__PURE__ */
|
|
2727
|
+
children: /* @__PURE__ */ jsx26(
|
|
2901
2728
|
"span",
|
|
2902
2729
|
{
|
|
2903
2730
|
className: `pipe-card-status-dot ${isRunning ? "pipe-card-status-dot--pulse" : ""}`,
|
|
@@ -2906,7 +2733,7 @@ function PipeCardBase({ data, children }) {
|
|
|
2906
2733
|
)
|
|
2907
2734
|
}
|
|
2908
2735
|
),
|
|
2909
|
-
data.onExpand && /* @__PURE__ */
|
|
2736
|
+
data.onExpand && /* @__PURE__ */ jsx26(
|
|
2910
2737
|
"button",
|
|
2911
2738
|
{
|
|
2912
2739
|
type: "button",
|
|
@@ -2921,32 +2748,32 @@ function PipeCardBase({ data, children }) {
|
|
|
2921
2748
|
children: "\u2922"
|
|
2922
2749
|
}
|
|
2923
2750
|
),
|
|
2924
|
-
data.validation && /* @__PURE__ */
|
|
2751
|
+
data.validation && /* @__PURE__ */ jsx26(NodeValidationBadge, { validation: data.validation, onClick: data.onValidationBadgeClick })
|
|
2925
2752
|
] }),
|
|
2926
|
-
(outcome || batchMultiplicity) && /* @__PURE__ */
|
|
2927
|
-
outcome && /* @__PURE__ */
|
|
2753
|
+
(outcome || batchMultiplicity) && /* @__PURE__ */ jsxs25("div", { className: "pipe-card-annotations", children: [
|
|
2754
|
+
outcome && /* @__PURE__ */ jsxs25("span", { className: "pipe-card-annotation pipe-card-annotation--outcome", children: [
|
|
2928
2755
|
"outcome: ",
|
|
2929
2756
|
outcome
|
|
2930
2757
|
] }),
|
|
2931
|
-
batchMultiplicity && /* @__PURE__ */
|
|
2758
|
+
batchMultiplicity && /* @__PURE__ */ jsx26("span", { className: "pipe-card-annotation pipe-card-annotation--batch", children: batchMultiplicity })
|
|
2932
2759
|
] }),
|
|
2933
|
-
data.description && /* @__PURE__ */
|
|
2934
|
-
data.inputs.length > 0 && /* @__PURE__ */
|
|
2935
|
-
/* @__PURE__ */
|
|
2936
|
-
/* @__PURE__ */
|
|
2937
|
-
visibleInputs.map((input) => /* @__PURE__ */
|
|
2760
|
+
data.description && /* @__PURE__ */ jsx26("span", { className: "pipe-card-description", title: data.description, children: data.description }),
|
|
2761
|
+
data.inputs.length > 0 && /* @__PURE__ */ jsxs25("div", { className: "pipe-card-io", children: [
|
|
2762
|
+
/* @__PURE__ */ jsx26("span", { className: "pipe-card-io-label", children: "INPUTS" }),
|
|
2763
|
+
/* @__PURE__ */ jsxs25("div", { className: "pipe-card-io-pills", children: [
|
|
2764
|
+
visibleInputs.map((input) => /* @__PURE__ */ jsxs25(
|
|
2938
2765
|
"span",
|
|
2939
2766
|
{
|
|
2940
2767
|
className: "pipe-card-io-pill",
|
|
2941
2768
|
title: `${input.name}: ${input.concept}`,
|
|
2942
2769
|
children: [
|
|
2943
|
-
/* @__PURE__ */
|
|
2944
|
-
/* @__PURE__ */
|
|
2770
|
+
/* @__PURE__ */ jsx26("span", { className: "pipe-card-io-pill-name", children: input.name }),
|
|
2771
|
+
/* @__PURE__ */ jsx26("span", { className: "pipe-card-io-pill-concept", children: input.concept })
|
|
2945
2772
|
]
|
|
2946
2773
|
},
|
|
2947
2774
|
input.name
|
|
2948
2775
|
)),
|
|
2949
|
-
hasMany && /* @__PURE__ */
|
|
2776
|
+
hasMany && /* @__PURE__ */ jsx26(
|
|
2950
2777
|
"button",
|
|
2951
2778
|
{
|
|
2952
2779
|
className: "pipe-card-io-more",
|
|
@@ -2959,16 +2786,16 @@ function PipeCardBase({ data, children }) {
|
|
|
2959
2786
|
)
|
|
2960
2787
|
] })
|
|
2961
2788
|
] }),
|
|
2962
|
-
data.outputs.length > 0 && /* @__PURE__ */
|
|
2963
|
-
/* @__PURE__ */
|
|
2964
|
-
/* @__PURE__ */
|
|
2789
|
+
data.outputs.length > 0 && /* @__PURE__ */ jsxs25("div", { className: "pipe-card-io", children: [
|
|
2790
|
+
/* @__PURE__ */ jsx26("span", { className: "pipe-card-io-label", children: "OUTPUT" }),
|
|
2791
|
+
/* @__PURE__ */ jsx26("div", { className: "pipe-card-io-pills", children: data.outputs.map((output) => /* @__PURE__ */ jsxs25(
|
|
2965
2792
|
"span",
|
|
2966
2793
|
{
|
|
2967
2794
|
className: "pipe-card-io-pill",
|
|
2968
2795
|
title: `${output.name}: ${output.concept}`,
|
|
2969
2796
|
children: [
|
|
2970
|
-
/* @__PURE__ */
|
|
2971
|
-
/* @__PURE__ */
|
|
2797
|
+
/* @__PURE__ */ jsx26("span", { className: "pipe-card-io-pill-name", children: output.name }),
|
|
2798
|
+
/* @__PURE__ */ jsx26("span", { className: "pipe-card-io-pill-concept", children: output.concept })
|
|
2972
2799
|
]
|
|
2973
2800
|
},
|
|
2974
2801
|
output.name
|
|
@@ -3003,11 +2830,11 @@ function getPipeCardComponent(pipeType) {
|
|
|
3003
2830
|
}
|
|
3004
2831
|
|
|
3005
2832
|
// src/graph/react/nodes/pipe/PipeCardNode.tsx
|
|
3006
|
-
import { Fragment as Fragment14, jsx as
|
|
2833
|
+
import { Fragment as Fragment14, jsx as jsx27, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3007
2834
|
function PipeCardNode({ data }) {
|
|
3008
2835
|
var _a;
|
|
3009
2836
|
const Card = (_a = getPipeCardComponent(data.pipeType)) != null ? _a : PipeCardBase;
|
|
3010
|
-
return /* @__PURE__ */
|
|
2837
|
+
return /* @__PURE__ */ jsx27(Card, { data });
|
|
3011
2838
|
}
|
|
3012
2839
|
function PipeCardRFNode({
|
|
3013
2840
|
data,
|
|
@@ -3016,17 +2843,17 @@ function PipeCardRFNode({
|
|
|
3016
2843
|
}) {
|
|
3017
2844
|
const payload = data.pipeCardData;
|
|
3018
2845
|
if (!payload) return null;
|
|
3019
|
-
return /* @__PURE__ */
|
|
3020
|
-
/* @__PURE__ */
|
|
3021
|
-
/* @__PURE__ */
|
|
3022
|
-
/* @__PURE__ */
|
|
2846
|
+
return /* @__PURE__ */ jsxs26(Fragment14, { children: [
|
|
2847
|
+
/* @__PURE__ */ jsx27(Handle, { type: "target", position: targetPosition }),
|
|
2848
|
+
/* @__PURE__ */ jsx27(PipeCardNode, { data: payload }),
|
|
2849
|
+
/* @__PURE__ */ jsx27(Handle, { type: "source", position: sourcePosition })
|
|
3023
2850
|
] });
|
|
3024
2851
|
}
|
|
3025
2852
|
|
|
3026
2853
|
// src/graph/react/styles/simple/SimpleNodes.tsx
|
|
3027
2854
|
import { Handle as Handle2, Position as Position2 } from "@xyflow/react";
|
|
3028
|
-
import { Fragment as Fragment15, jsx as
|
|
3029
|
-
var
|
|
2855
|
+
import { Fragment as Fragment15, jsx as jsx28, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2856
|
+
var ICON_PROPS = {
|
|
3030
2857
|
viewBox: "0 0 24 24",
|
|
3031
2858
|
fill: "none",
|
|
3032
2859
|
stroke: "currentColor",
|
|
@@ -3036,90 +2863,90 @@ var ICON_PROPS2 = {
|
|
|
3036
2863
|
"aria-hidden": true
|
|
3037
2864
|
};
|
|
3038
2865
|
function Icon({ size = 13, children }) {
|
|
3039
|
-
return /* @__PURE__ */
|
|
2866
|
+
return /* @__PURE__ */ jsx28("svg", __spreadProps(__spreadValues({}, ICON_PROPS), { width: size, height: size, children }));
|
|
3040
2867
|
}
|
|
3041
2868
|
var CATEGORY_ICONS = {
|
|
3042
|
-
ai: /* @__PURE__ */
|
|
3043
|
-
/* @__PURE__ */
|
|
3044
|
-
/* @__PURE__ */
|
|
3045
|
-
/* @__PURE__ */
|
|
2869
|
+
ai: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2870
|
+
/* @__PURE__ */ jsx28("path", { d: "M9.94 15.5a2 2 0 0 0-1.44-1.44l-6.13-1.58a.5.5 0 0 1 0-.96L8.5 9.94A2 2 0 0 0 9.94 8.5l1.58-6.14a.5.5 0 0 1 .96 0l1.58 6.14a2 2 0 0 0 1.44 1.44l6.14 1.58a.5.5 0 0 1 0 .96l-6.14 1.58a2 2 0 0 0-1.44 1.44l-1.58 6.13a.5.5 0 0 1-.96 0z" }),
|
|
2871
|
+
/* @__PURE__ */ jsx28("path", { d: "M20 3v4" }),
|
|
2872
|
+
/* @__PURE__ */ jsx28("path", { d: "M22 5h-4" })
|
|
3046
2873
|
] }),
|
|
3047
|
-
extract: /* @__PURE__ */
|
|
3048
|
-
/* @__PURE__ */
|
|
3049
|
-
/* @__PURE__ */
|
|
3050
|
-
/* @__PURE__ */
|
|
3051
|
-
/* @__PURE__ */
|
|
3052
|
-
/* @__PURE__ */
|
|
3053
|
-
/* @__PURE__ */
|
|
3054
|
-
/* @__PURE__ */
|
|
2874
|
+
extract: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2875
|
+
/* @__PURE__ */ jsx28("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
|
|
2876
|
+
/* @__PURE__ */ jsx28("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }),
|
|
2877
|
+
/* @__PURE__ */ jsx28("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }),
|
|
2878
|
+
/* @__PURE__ */ jsx28("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }),
|
|
2879
|
+
/* @__PURE__ */ jsx28("path", { d: "M7 8h8" }),
|
|
2880
|
+
/* @__PURE__ */ jsx28("path", { d: "M7 12h10" }),
|
|
2881
|
+
/* @__PURE__ */ jsx28("path", { d: "M7 16h6" })
|
|
3055
2882
|
] }),
|
|
3056
|
-
image: /* @__PURE__ */
|
|
3057
|
-
/* @__PURE__ */
|
|
3058
|
-
/* @__PURE__ */
|
|
3059
|
-
/* @__PURE__ */
|
|
2883
|
+
image: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2884
|
+
/* @__PURE__ */ jsx28("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
2885
|
+
/* @__PURE__ */ jsx28("circle", { cx: "9", cy: "9", r: "2" }),
|
|
2886
|
+
/* @__PURE__ */ jsx28("path", { d: "m21 15-3.09-3.09a2 2 0 0 0-2.82 0L6 21" })
|
|
3060
2887
|
] }),
|
|
3061
|
-
search: /* @__PURE__ */
|
|
3062
|
-
/* @__PURE__ */
|
|
3063
|
-
/* @__PURE__ */
|
|
2888
|
+
search: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2889
|
+
/* @__PURE__ */ jsx28("circle", { cx: "11", cy: "11", r: "8" }),
|
|
2890
|
+
/* @__PURE__ */ jsx28("path", { d: "m21 21-4.3-4.3" })
|
|
3064
2891
|
] }),
|
|
3065
|
-
code: /* @__PURE__ */
|
|
3066
|
-
/* @__PURE__ */
|
|
3067
|
-
/* @__PURE__ */
|
|
2892
|
+
code: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2893
|
+
/* @__PURE__ */ jsx28("polyline", { points: "16 18 22 12 16 6" }),
|
|
2894
|
+
/* @__PURE__ */ jsx28("polyline", { points: "8 6 2 12 8 18" })
|
|
3068
2895
|
] }),
|
|
3069
|
-
template: /* @__PURE__ */
|
|
3070
|
-
/* @__PURE__ */
|
|
3071
|
-
/* @__PURE__ */
|
|
3072
|
-
/* @__PURE__ */
|
|
3073
|
-
/* @__PURE__ */
|
|
2896
|
+
template: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2897
|
+
/* @__PURE__ */ jsx28("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
2898
|
+
/* @__PURE__ */ jsx28("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
2899
|
+
/* @__PURE__ */ jsx28("path", { d: "M16 13H8" }),
|
|
2900
|
+
/* @__PURE__ */ jsx28("path", { d: "M16 17H8" })
|
|
3074
2901
|
] }),
|
|
3075
|
-
document: /* @__PURE__ */
|
|
3076
|
-
/* @__PURE__ */
|
|
3077
|
-
/* @__PURE__ */
|
|
3078
|
-
/* @__PURE__ */
|
|
3079
|
-
/* @__PURE__ */
|
|
2902
|
+
document: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2903
|
+
/* @__PURE__ */ jsx28("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
2904
|
+
/* @__PURE__ */ jsx28("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
2905
|
+
/* @__PURE__ */ jsx28("path", { d: "M12 18v-6" }),
|
|
2906
|
+
/* @__PURE__ */ jsx28("path", { d: "m9 15 3 3 3-3" })
|
|
3080
2907
|
] }),
|
|
3081
|
-
judge: /* @__PURE__ */
|
|
3082
|
-
/* @__PURE__ */
|
|
3083
|
-
/* @__PURE__ */
|
|
3084
|
-
/* @__PURE__ */
|
|
3085
|
-
/* @__PURE__ */
|
|
3086
|
-
/* @__PURE__ */
|
|
2908
|
+
judge: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2909
|
+
/* @__PURE__ */ jsx28("path", { d: "m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
|
|
2910
|
+
/* @__PURE__ */ jsx28("path", { d: "m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
|
|
2911
|
+
/* @__PURE__ */ jsx28("path", { d: "M7 21h10" }),
|
|
2912
|
+
/* @__PURE__ */ jsx28("path", { d: "M12 3v18" }),
|
|
2913
|
+
/* @__PURE__ */ jsx28("path", { d: "M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2" })
|
|
3087
2914
|
] }),
|
|
3088
|
-
planned: /* @__PURE__ */
|
|
3089
|
-
steps: /* @__PURE__ */
|
|
3090
|
-
/* @__PURE__ */
|
|
3091
|
-
/* @__PURE__ */
|
|
3092
|
-
/* @__PURE__ */
|
|
2915
|
+
planned: /* @__PURE__ */ jsx28("circle", { cx: "12", cy: "12", r: "9", strokeDasharray: "3 3" }),
|
|
2916
|
+
steps: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2917
|
+
/* @__PURE__ */ jsx28("path", { d: "m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z" }),
|
|
2918
|
+
/* @__PURE__ */ jsx28("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }),
|
|
2919
|
+
/* @__PURE__ */ jsx28("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" })
|
|
3093
2920
|
] }),
|
|
3094
|
-
parallel: /* @__PURE__ */
|
|
3095
|
-
/* @__PURE__ */
|
|
3096
|
-
/* @__PURE__ */
|
|
3097
|
-
/* @__PURE__ */
|
|
3098
|
-
/* @__PURE__ */
|
|
2921
|
+
parallel: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2922
|
+
/* @__PURE__ */ jsx28("path", { d: "M16 3h5v5" }),
|
|
2923
|
+
/* @__PURE__ */ jsx28("path", { d: "M8 3H3v5" }),
|
|
2924
|
+
/* @__PURE__ */ jsx28("path", { d: "M12 22v-8.3a4 4 0 0 0-1.17-2.87L3 3" }),
|
|
2925
|
+
/* @__PURE__ */ jsx28("path", { d: "m15 9 6-6" })
|
|
3099
2926
|
] }),
|
|
3100
|
-
decision: /* @__PURE__ */
|
|
3101
|
-
repeat: /* @__PURE__ */
|
|
3102
|
-
/* @__PURE__ */
|
|
3103
|
-
/* @__PURE__ */
|
|
3104
|
-
/* @__PURE__ */
|
|
3105
|
-
/* @__PURE__ */
|
|
2927
|
+
decision: /* @__PURE__ */ jsx28("path", { d: "M12 2 22 12 12 22 2 12Z" }),
|
|
2928
|
+
repeat: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2929
|
+
/* @__PURE__ */ jsx28("path", { d: "m17 2 4 4-4 4" }),
|
|
2930
|
+
/* @__PURE__ */ jsx28("path", { d: "M3 11v-1a4 4 0 0 1 4-4h14" }),
|
|
2931
|
+
/* @__PURE__ */ jsx28("path", { d: "m7 22-4-4 4-4" }),
|
|
2932
|
+
/* @__PURE__ */ jsx28("path", { d: "M21 13v1a4 4 0 0 1-4 4H3" })
|
|
3106
2933
|
] }),
|
|
3107
|
-
pick: /* @__PURE__ */
|
|
3108
|
-
/* @__PURE__ */
|
|
3109
|
-
/* @__PURE__ */
|
|
2934
|
+
pick: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2935
|
+
/* @__PURE__ */ jsx28("polyline", { points: "15 10 20 15 15 20" }),
|
|
2936
|
+
/* @__PURE__ */ jsx28("path", { d: "M4 4v7a4 4 0 0 0 4 4h12" })
|
|
3110
2937
|
] })
|
|
3111
2938
|
};
|
|
3112
|
-
var EXPAND_ICON2 = /* @__PURE__ */
|
|
3113
|
-
/* @__PURE__ */
|
|
3114
|
-
/* @__PURE__ */
|
|
3115
|
-
/* @__PURE__ */
|
|
3116
|
-
/* @__PURE__ */
|
|
2939
|
+
var EXPAND_ICON2 = /* @__PURE__ */ jsxs27(Icon, { size: 12, children: [
|
|
2940
|
+
/* @__PURE__ */ jsx28("polyline", { points: "15 3 21 3 21 9" }),
|
|
2941
|
+
/* @__PURE__ */ jsx28("polyline", { points: "9 21 3 21 3 15" }),
|
|
2942
|
+
/* @__PURE__ */ jsx28("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
2943
|
+
/* @__PURE__ */ jsx28("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
3117
2944
|
] });
|
|
3118
|
-
var COLLAPSE_ICON2 = /* @__PURE__ */
|
|
3119
|
-
/* @__PURE__ */
|
|
3120
|
-
/* @__PURE__ */
|
|
3121
|
-
/* @__PURE__ */
|
|
3122
|
-
/* @__PURE__ */
|
|
2945
|
+
var COLLAPSE_ICON2 = /* @__PURE__ */ jsxs27(Icon, { size: 12, children: [
|
|
2946
|
+
/* @__PURE__ */ jsx28("polyline", { points: "4 14 10 14 10 20" }),
|
|
2947
|
+
/* @__PURE__ */ jsx28("polyline", { points: "20 10 14 10 14 4" }),
|
|
2948
|
+
/* @__PURE__ */ jsx28("line", { x1: "14", y1: "10", x2: "21", y2: "3" }),
|
|
2949
|
+
/* @__PURE__ */ jsx28("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
3123
2950
|
] });
|
|
3124
2951
|
var STATUS_LABELS = {
|
|
3125
2952
|
succeeded: "Done",
|
|
@@ -3130,25 +2957,25 @@ var STATUS_LABELS = {
|
|
|
3130
2957
|
canceled: "Canceled"
|
|
3131
2958
|
};
|
|
3132
2959
|
var STATUS_ICONS = {
|
|
3133
|
-
succeeded: /* @__PURE__ */
|
|
3134
|
-
failed: /* @__PURE__ */
|
|
3135
|
-
/* @__PURE__ */
|
|
3136
|
-
/* @__PURE__ */
|
|
2960
|
+
succeeded: /* @__PURE__ */ jsx28("polyline", { points: "20 6 9 17 4 12" }),
|
|
2961
|
+
failed: /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2962
|
+
/* @__PURE__ */ jsx28("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
2963
|
+
/* @__PURE__ */ jsx28("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
3137
2964
|
] }),
|
|
3138
|
-
running: /* @__PURE__ */
|
|
3139
|
-
scheduled: /* @__PURE__ */
|
|
3140
|
-
skipped: /* @__PURE__ */
|
|
3141
|
-
canceled: /* @__PURE__ */
|
|
2965
|
+
running: /* @__PURE__ */ jsx28("path", { d: "M21 12a9 9 0 1 1-6.22-8.56" }),
|
|
2966
|
+
scheduled: /* @__PURE__ */ jsx28("circle", { cx: "12", cy: "12", r: "8" }),
|
|
2967
|
+
skipped: /* @__PURE__ */ jsx28("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
2968
|
+
canceled: /* @__PURE__ */ jsx28("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
3142
2969
|
};
|
|
3143
2970
|
function StatusMark({ status, graphMode }) {
|
|
3144
2971
|
if (graphMode === "static") return null;
|
|
3145
|
-
return /* @__PURE__ */
|
|
2972
|
+
return /* @__PURE__ */ jsx28(
|
|
3146
2973
|
"span",
|
|
3147
2974
|
{
|
|
3148
2975
|
className: `simple-status simple-status--${status}`,
|
|
3149
2976
|
title: STATUS_LABELS[status],
|
|
3150
2977
|
"aria-label": STATUS_LABELS[status],
|
|
3151
|
-
children: /* @__PURE__ */
|
|
2978
|
+
children: /* @__PURE__ */ jsx28(Icon, { size: 11, children: STATUS_ICONS[status] })
|
|
3152
2979
|
}
|
|
3153
2980
|
);
|
|
3154
2981
|
}
|
|
@@ -3157,17 +2984,17 @@ function Handles({
|
|
|
3157
2984
|
targetPosition = Position2.Left,
|
|
3158
2985
|
children
|
|
3159
2986
|
}) {
|
|
3160
|
-
return /* @__PURE__ */
|
|
3161
|
-
/* @__PURE__ */
|
|
2987
|
+
return /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
2988
|
+
/* @__PURE__ */ jsx28(Handle2, { type: "target", position: targetPosition, className: "simple-handle" }),
|
|
3162
2989
|
children,
|
|
3163
|
-
/* @__PURE__ */
|
|
2990
|
+
/* @__PURE__ */ jsx28(Handle2, { type: "source", position: sourcePosition, className: "simple-handle" })
|
|
3164
2991
|
] });
|
|
3165
2992
|
}
|
|
3166
2993
|
function ValidationMark({
|
|
3167
2994
|
validation,
|
|
3168
2995
|
onClick
|
|
3169
2996
|
}) {
|
|
3170
|
-
return validation ? /* @__PURE__ */
|
|
2997
|
+
return validation ? /* @__PURE__ */ jsx28(NodeValidationBadge, { validation, onClick }) : null;
|
|
3171
2998
|
}
|
|
3172
2999
|
function payloadOf(data, kinds) {
|
|
3173
3000
|
const simple = data.simple;
|
|
@@ -3178,20 +3005,20 @@ function SimpleStepNode({ data, sourcePosition, targetPosition }) {
|
|
|
3178
3005
|
const step = payloadOf(data, ["step"]);
|
|
3179
3006
|
if (!step) return null;
|
|
3180
3007
|
const statusClass = step.graphMode !== "static" ? ` simple-step--${step.status}` : "";
|
|
3181
|
-
return /* @__PURE__ */
|
|
3008
|
+
return /* @__PURE__ */ jsx28(Handles, { sourcePosition, targetPosition, children: /* @__PURE__ */ jsxs27(
|
|
3182
3009
|
"div",
|
|
3183
3010
|
{
|
|
3184
3011
|
className: `simple-step simple-step--${step.category}${statusClass}${validationRingClass(data.validation)}`,
|
|
3185
3012
|
children: [
|
|
3186
|
-
/* @__PURE__ */
|
|
3187
|
-
/* @__PURE__ */
|
|
3188
|
-
/* @__PURE__ */
|
|
3013
|
+
/* @__PURE__ */ jsxs27("div", { className: "simple-step-header", children: [
|
|
3014
|
+
/* @__PURE__ */ jsxs27("span", { className: "simple-step-category", children: [
|
|
3015
|
+
/* @__PURE__ */ jsx28(Icon, { children: CATEGORY_ICONS[step.category] }),
|
|
3189
3016
|
STEP_CATEGORY_WORDS[step.category]
|
|
3190
3017
|
] }),
|
|
3191
|
-
/* @__PURE__ */
|
|
3192
|
-
/* @__PURE__ */
|
|
3018
|
+
/* @__PURE__ */ jsx28(StatusMark, { status: step.status, graphMode: step.graphMode }),
|
|
3019
|
+
/* @__PURE__ */ jsx28(ValidationMark, { validation: data.validation, onClick: data.onValidationBadgeClick })
|
|
3193
3020
|
] }),
|
|
3194
|
-
/* @__PURE__ */
|
|
3021
|
+
/* @__PURE__ */ jsx28(
|
|
3195
3022
|
"div",
|
|
3196
3023
|
{
|
|
3197
3024
|
className: "simple-step-title",
|
|
@@ -3204,11 +3031,11 @@ function SimpleStepNode({ data, sourcePosition, targetPosition }) {
|
|
|
3204
3031
|
children: step.title
|
|
3205
3032
|
}
|
|
3206
3033
|
),
|
|
3207
|
-
step.forEach && /* @__PURE__ */
|
|
3208
|
-
/* @__PURE__ */
|
|
3034
|
+
step.forEach && /* @__PURE__ */ jsxs27("span", { className: "simple-step-foreach", children: [
|
|
3035
|
+
/* @__PURE__ */ jsx28(Icon, { size: 11, children: CATEGORY_ICONS.repeat }),
|
|
3209
3036
|
step.forEach
|
|
3210
3037
|
] }),
|
|
3211
|
-
step.innerStepCount !== void 0 && /* @__PURE__ */
|
|
3038
|
+
step.innerStepCount !== void 0 && /* @__PURE__ */ jsxs27(
|
|
3212
3039
|
"button",
|
|
3213
3040
|
{
|
|
3214
3041
|
type: "button",
|
|
@@ -3232,24 +3059,24 @@ function SimpleStepNode({ data, sourcePosition, targetPosition }) {
|
|
|
3232
3059
|
}
|
|
3233
3060
|
var DOCUMENT_PATH = "M1 1 H99 V84 C80 98 62 74 44 86 C28 96 14 96 1 88 Z";
|
|
3234
3061
|
function DocumentShape({ className }) {
|
|
3235
|
-
return /* @__PURE__ */
|
|
3062
|
+
return /* @__PURE__ */ jsx28("svg", { className, viewBox: "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx28("path", { d: DOCUMENT_PATH, vectorEffect: "non-scaling-stroke" }) });
|
|
3236
3063
|
}
|
|
3237
3064
|
function SimpleTerminalNode({ data, sourcePosition, targetPosition }) {
|
|
3238
3065
|
const terminal = payloadOf(data, ["input", "output"]);
|
|
3239
3066
|
if (!terminal) return null;
|
|
3240
|
-
return /* @__PURE__ */
|
|
3067
|
+
return /* @__PURE__ */ jsx28(Handles, { sourcePosition, targetPosition, children: /* @__PURE__ */ jsxs27(
|
|
3241
3068
|
"div",
|
|
3242
3069
|
{
|
|
3243
3070
|
className: `simple-terminal simple-terminal--${terminal.kind}${terminal.isList ? " simple-terminal--list" : ""}`,
|
|
3244
3071
|
children: [
|
|
3245
|
-
terminal.isList && /* @__PURE__ */
|
|
3246
|
-
/* @__PURE__ */
|
|
3247
|
-
/* @__PURE__ */
|
|
3072
|
+
terminal.isList && /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
3073
|
+
/* @__PURE__ */ jsx28(DocumentShape, { className: "simple-terminal-shape simple-terminal-shape--back2" }),
|
|
3074
|
+
/* @__PURE__ */ jsx28(DocumentShape, { className: "simple-terminal-shape simple-terminal-shape--back1" })
|
|
3248
3075
|
] }),
|
|
3249
|
-
/* @__PURE__ */
|
|
3250
|
-
/* @__PURE__ */
|
|
3251
|
-
/* @__PURE__ */
|
|
3252
|
-
terminal.subtitle && /* @__PURE__ */
|
|
3076
|
+
/* @__PURE__ */ jsx28(DocumentShape, { className: "simple-terminal-shape" }),
|
|
3077
|
+
/* @__PURE__ */ jsxs27("div", { className: "simple-terminal-text", children: [
|
|
3078
|
+
/* @__PURE__ */ jsx28("span", { className: "simple-terminal-title", title: terminal.title, children: terminal.title }),
|
|
3079
|
+
terminal.subtitle && /* @__PURE__ */ jsx28("span", { className: "simple-terminal-subtitle", children: terminal.subtitle })
|
|
3253
3080
|
] })
|
|
3254
3081
|
]
|
|
3255
3082
|
}
|
|
@@ -3259,35 +3086,35 @@ function SimpleDecisionNode({ data, sourcePosition, targetPosition }) {
|
|
|
3259
3086
|
const decision = payloadOf(data, ["decision"]);
|
|
3260
3087
|
if (!decision) return null;
|
|
3261
3088
|
const statusClass = decision.graphMode !== "static" ? ` simple-decision--${decision.status}` : "";
|
|
3262
|
-
return /* @__PURE__ */
|
|
3263
|
-
/* @__PURE__ */
|
|
3089
|
+
return /* @__PURE__ */ jsx28(Handles, { sourcePosition, targetPosition, children: /* @__PURE__ */ jsxs27("div", { className: `simple-decision${statusClass}${validationRingClass(data.validation)}`, children: [
|
|
3090
|
+
/* @__PURE__ */ jsx28(
|
|
3264
3091
|
"svg",
|
|
3265
3092
|
{
|
|
3266
3093
|
className: "simple-decision-shape",
|
|
3267
3094
|
viewBox: "0 0 100 100",
|
|
3268
3095
|
preserveAspectRatio: "none",
|
|
3269
3096
|
"aria-hidden": "true",
|
|
3270
|
-
children: /* @__PURE__ */
|
|
3097
|
+
children: /* @__PURE__ */ jsx28("path", { d: "M50 1 L99 50 L50 99 L1 50 Z", vectorEffect: "non-scaling-stroke" })
|
|
3271
3098
|
}
|
|
3272
3099
|
),
|
|
3273
|
-
/* @__PURE__ */
|
|
3274
|
-
/* @__PURE__ */
|
|
3275
|
-
/* @__PURE__ */
|
|
3276
|
-
/* @__PURE__ */
|
|
3100
|
+
/* @__PURE__ */ jsx28("div", { className: "simple-decision-text", title: decision.title, children: decision.title }),
|
|
3101
|
+
/* @__PURE__ */ jsxs27("div", { className: "simple-decision-marks", children: [
|
|
3102
|
+
/* @__PURE__ */ jsx28(StatusMark, { status: decision.status, graphMode: decision.graphMode }),
|
|
3103
|
+
/* @__PURE__ */ jsx28(ValidationMark, { validation: data.validation, onClick: data.onValidationBadgeClick })
|
|
3277
3104
|
] })
|
|
3278
3105
|
] }) });
|
|
3279
3106
|
}
|
|
3280
3107
|
function SimpleFrameNode({ data }) {
|
|
3281
3108
|
const frame = payloadOf(data, ["frame"]);
|
|
3282
3109
|
if (!frame) return null;
|
|
3283
|
-
return /* @__PURE__ */
|
|
3284
|
-
/* @__PURE__ */
|
|
3285
|
-
/* @__PURE__ */
|
|
3110
|
+
return /* @__PURE__ */ jsx28("div", { className: `simple-frame${validationRingClass(data.validation)}`, children: /* @__PURE__ */ jsxs27("div", { className: "simple-frame-header", children: [
|
|
3111
|
+
/* @__PURE__ */ jsxs27("span", { className: "simple-frame-title", children: [
|
|
3112
|
+
/* @__PURE__ */ jsx28(Icon, { size: 12, children: CATEGORY_ICONS.repeat }),
|
|
3286
3113
|
frame.title
|
|
3287
3114
|
] }),
|
|
3288
|
-
/* @__PURE__ */
|
|
3289
|
-
/* @__PURE__ */
|
|
3290
|
-
frame.onFold && /* @__PURE__ */
|
|
3115
|
+
/* @__PURE__ */ jsx28(StatusMark, { status: frame.status, graphMode: frame.graphMode }),
|
|
3116
|
+
/* @__PURE__ */ jsx28(ValidationMark, { validation: data.validation, onClick: data.onValidationBadgeClick }),
|
|
3117
|
+
frame.onFold && /* @__PURE__ */ jsx28(
|
|
3291
3118
|
"button",
|
|
3292
3119
|
{
|
|
3293
3120
|
type: "button",
|
|
@@ -3313,7 +3140,7 @@ var simpleNodeTypes = {
|
|
|
3313
3140
|
|
|
3314
3141
|
// src/graph/react/edges/RoutedEdge.tsx
|
|
3315
3142
|
import { BaseEdge, getSmoothStepPath } from "@xyflow/react";
|
|
3316
|
-
import { jsx as
|
|
3143
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
3317
3144
|
function RoutedEdge({
|
|
3318
3145
|
id,
|
|
3319
3146
|
sourceX,
|
|
@@ -3353,7 +3180,7 @@ function RoutedEdge({
|
|
|
3353
3180
|
borderRadius: 8
|
|
3354
3181
|
});
|
|
3355
3182
|
}
|
|
3356
|
-
return /* @__PURE__ */
|
|
3183
|
+
return /* @__PURE__ */ jsx29(
|
|
3357
3184
|
BaseEdge,
|
|
3358
3185
|
{
|
|
3359
3186
|
id,
|
|
@@ -3375,7 +3202,7 @@ function RoutedEdge({
|
|
|
3375
3202
|
}
|
|
3376
3203
|
|
|
3377
3204
|
// src/graph/react/viewer/GraphViewer.tsx
|
|
3378
|
-
import { Fragment as Fragment16, jsx as
|
|
3205
|
+
import { Fragment as Fragment16, jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3379
3206
|
var nodeTypes = __spreadValues(__spreadProps(__spreadValues({}, controllerNodeTypes), {
|
|
3380
3207
|
pipeCard: PipeCardRFNode
|
|
3381
3208
|
}), simpleNodeTypes);
|
|
@@ -3410,7 +3237,7 @@ function StuffNodeDetail({
|
|
|
3410
3237
|
const conceptInfo = stuffData.concept && graphspec ? resolveConceptRef(graphspec, stuffData.concept) : void 0;
|
|
3411
3238
|
const isDryRun = graphSpecMode(graphspec) === GRAPH_SPEC_MODE.DRY;
|
|
3412
3239
|
const descriptors = resultDescriptors(artifacts);
|
|
3413
|
-
const renderData = descriptors ? () => /* @__PURE__ */
|
|
3240
|
+
const renderData = descriptors ? () => /* @__PURE__ */ jsx30(
|
|
3414
3241
|
StuffResultPanel,
|
|
3415
3242
|
__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, descriptors), {
|
|
3416
3243
|
stuff: stuffData
|
|
@@ -3419,7 +3246,7 @@ function StuffNodeDetail({
|
|
|
3419
3246
|
})
|
|
3420
3247
|
) : void 0;
|
|
3421
3248
|
if (conceptInfo) {
|
|
3422
|
-
return /* @__PURE__ */
|
|
3249
|
+
return /* @__PURE__ */ jsx30(
|
|
3423
3250
|
ConceptDetailPanel,
|
|
3424
3251
|
{
|
|
3425
3252
|
concept: conceptInfo,
|
|
@@ -3430,8 +3257,8 @@ function StuffNodeDetail({
|
|
|
3430
3257
|
}
|
|
3431
3258
|
);
|
|
3432
3259
|
}
|
|
3433
|
-
if (isDryRun) return /* @__PURE__ */
|
|
3434
|
-
return /* @__PURE__ */
|
|
3260
|
+
if (isDryRun) return /* @__PURE__ */ jsx30("div", { className: "detail-not-available", children: "Dry run data hidden" });
|
|
3261
|
+
return /* @__PURE__ */ jsx30(Fragment16, { children: (_a = renderData == null ? void 0 : renderData()) != null ? _a : /* @__PURE__ */ jsx30("div", { className: "detail-not-available", children: "No data" }) });
|
|
3435
3262
|
}
|
|
3436
3263
|
function seedFoldedControllers(mode, controllerIds) {
|
|
3437
3264
|
if (mode === FOLD_MODE.FOLDED) return new Set(controllerIds);
|
|
@@ -3505,12 +3332,12 @@ function containerClassName(theme, mode, {
|
|
|
3505
3332
|
}
|
|
3506
3333
|
function GraphViewer(props) {
|
|
3507
3334
|
var _a, _b;
|
|
3508
|
-
return /* @__PURE__ */
|
|
3335
|
+
return /* @__PURE__ */ jsx30(
|
|
3509
3336
|
GraphFailureBoundary,
|
|
3510
3337
|
{
|
|
3511
3338
|
resetKey: (_b = (_a = props.graph) == null ? void 0 : _a.graphSpec) != null ? _b : null,
|
|
3512
|
-
fallback: (failure) => /* @__PURE__ */
|
|
3513
|
-
children: (fail) => /* @__PURE__ */
|
|
3339
|
+
fallback: (failure) => /* @__PURE__ */ jsx30(GraphViewerFailed, __spreadProps(__spreadValues({}, props), { failure })),
|
|
3340
|
+
children: (fail) => /* @__PURE__ */ jsx30(GraphViewerCanvas, __spreadProps(__spreadValues({}, props), { onFailure: fail }))
|
|
3514
3341
|
}
|
|
3515
3342
|
);
|
|
3516
3343
|
}
|
|
@@ -3524,12 +3351,12 @@ function GraphViewerFailed({
|
|
|
3524
3351
|
const mode = resolveExternalThemeMode(themeProp, config.theme);
|
|
3525
3352
|
const resolvedTheme = resolveActiveTheme(mode, useSystemTheme(systemThemeProp));
|
|
3526
3353
|
const palette = __spreadValues(__spreadValues({}, getPaletteForTheme(resolvedTheme)), config.paletteColors);
|
|
3527
|
-
return /* @__PURE__ */
|
|
3354
|
+
return /* @__PURE__ */ jsx30(
|
|
3528
3355
|
"div",
|
|
3529
3356
|
{
|
|
3530
3357
|
className: containerClassName(resolvedTheme, mode, { interactive, failed: true }),
|
|
3531
3358
|
style: palette,
|
|
3532
|
-
children: /* @__PURE__ */
|
|
3359
|
+
children: /* @__PURE__ */ jsx30(GraphErrorState, { failure })
|
|
3533
3360
|
}
|
|
3534
3361
|
);
|
|
3535
3362
|
}
|
|
@@ -3568,31 +3395,31 @@ function GraphViewerCanvas(props) {
|
|
|
3568
3395
|
onFailure
|
|
3569
3396
|
} = props;
|
|
3570
3397
|
const graphspecProp = (_a = graph == null ? void 0 : graph.graphSpec) != null ? _a : null;
|
|
3571
|
-
const { graphspec, failure: specFailure } =
|
|
3398
|
+
const { graphspec, failure: specFailure } = React11.useMemo(
|
|
3572
3399
|
() => readGraphSpec(graphspecProp),
|
|
3573
3400
|
[graphspecProp]
|
|
3574
3401
|
);
|
|
3575
|
-
const graphspecRef =
|
|
3402
|
+
const graphspecRef = React11.useRef(graphspec);
|
|
3576
3403
|
graphspecRef.current = graphspec;
|
|
3577
|
-
const [layoutFailure, setLayoutFailure] =
|
|
3404
|
+
const [layoutFailure, setLayoutFailure] = React11.useState(null);
|
|
3578
3405
|
const canvasFailure = placeCanvasFailure({
|
|
3579
3406
|
specFailure,
|
|
3580
3407
|
layoutFailure: layoutFailureFor(layoutFailure, graphspec),
|
|
3581
3408
|
interactive
|
|
3582
3409
|
});
|
|
3583
3410
|
const failed = canvasFailure.inPlace !== null;
|
|
3584
|
-
const onFailureRef =
|
|
3411
|
+
const onFailureRef = React11.useRef(onFailure);
|
|
3585
3412
|
onFailureRef.current = onFailure;
|
|
3586
|
-
const [direction, setDirection] =
|
|
3413
|
+
const [direction, setDirection] = React11.useState(
|
|
3587
3414
|
() => {
|
|
3588
3415
|
var _a2, _b2;
|
|
3589
3416
|
return (_b2 = (_a2 = initialDirection != null ? initialDirection : config.direction) != null ? _a2 : DEFAULT_GRAPH_CONFIG.direction) != null ? _b2 : GRAPH_DIRECTION.TB;
|
|
3590
3417
|
}
|
|
3591
3418
|
);
|
|
3592
3419
|
const externalMode = resolveExternalThemeMode(themeProp, config.theme);
|
|
3593
|
-
const [mode, setMode] =
|
|
3594
|
-
const prevExternalModeRef =
|
|
3595
|
-
|
|
3420
|
+
const [mode, setMode] = React11.useState(externalMode);
|
|
3421
|
+
const prevExternalModeRef = React11.useRef(externalMode);
|
|
3422
|
+
React11.useEffect(() => {
|
|
3596
3423
|
if (externalMode !== prevExternalModeRef.current) {
|
|
3597
3424
|
prevExternalModeRef.current = externalMode;
|
|
3598
3425
|
setMode(externalMode);
|
|
@@ -3600,13 +3427,13 @@ function GraphViewerCanvas(props) {
|
|
|
3600
3427
|
}, [externalMode]);
|
|
3601
3428
|
const systemTheme = useSystemTheme(systemThemeProp);
|
|
3602
3429
|
const resolvedTheme = resolveActiveTheme(mode, systemTheme);
|
|
3603
|
-
const onThemeChangeRef =
|
|
3430
|
+
const onThemeChangeRef = React11.useRef(onThemeChange);
|
|
3604
3431
|
onThemeChangeRef.current = onThemeChange;
|
|
3605
|
-
const prevReportedRef =
|
|
3432
|
+
const prevReportedRef = React11.useRef({
|
|
3606
3433
|
mode,
|
|
3607
3434
|
resolvedTheme
|
|
3608
3435
|
});
|
|
3609
|
-
|
|
3436
|
+
React11.useEffect(() => {
|
|
3610
3437
|
var _a2;
|
|
3611
3438
|
const prev = prevReportedRef.current;
|
|
3612
3439
|
if (prev.mode !== mode || prev.resolvedTheme !== resolvedTheme) {
|
|
@@ -3615,48 +3442,48 @@ function GraphViewerCanvas(props) {
|
|
|
3615
3442
|
}
|
|
3616
3443
|
}, [mode, resolvedTheme]);
|
|
3617
3444
|
const externalStyle = resolveGraphStyle(graphStyleProp, config.graphStyle);
|
|
3618
|
-
const [graphStyle, setGraphStyle] =
|
|
3619
|
-
const prevExternalStyleRef =
|
|
3620
|
-
|
|
3445
|
+
const [graphStyle, setGraphStyle] = React11.useState(externalStyle);
|
|
3446
|
+
const prevExternalStyleRef = React11.useRef(externalStyle);
|
|
3447
|
+
React11.useEffect(() => {
|
|
3621
3448
|
if (externalStyle !== prevExternalStyleRef.current) {
|
|
3622
3449
|
prevExternalStyleRef.current = externalStyle;
|
|
3623
3450
|
setGraphStyle(externalStyle);
|
|
3624
3451
|
}
|
|
3625
3452
|
}, [externalStyle]);
|
|
3626
|
-
const onGraphStyleChangeRef =
|
|
3453
|
+
const onGraphStyleChangeRef = React11.useRef(onGraphStyleChange);
|
|
3627
3454
|
onGraphStyleChangeRef.current = onGraphStyleChange;
|
|
3628
|
-
const prevReportedStyleRef =
|
|
3629
|
-
|
|
3455
|
+
const prevReportedStyleRef = React11.useRef(graphStyle);
|
|
3456
|
+
React11.useEffect(() => {
|
|
3630
3457
|
var _a2;
|
|
3631
3458
|
if (prevReportedStyleRef.current !== graphStyle) {
|
|
3632
3459
|
prevReportedStyleRef.current = graphStyle;
|
|
3633
3460
|
(_a2 = onGraphStyleChangeRef.current) == null ? void 0 : _a2.call(onGraphStyleChangeRef, graphStyle);
|
|
3634
3461
|
}
|
|
3635
3462
|
}, [graphStyle]);
|
|
3636
|
-
const graphStyleRef =
|
|
3463
|
+
const graphStyleRef = React11.useRef(graphStyle);
|
|
3637
3464
|
graphStyleRef.current = graphStyle;
|
|
3638
3465
|
const styleCapabilities = GRAPH_STYLES[graphStyle].capabilities;
|
|
3639
3466
|
const effectiveFoldMode = (_c = (_b = initialFoldMode != null ? initialFoldMode : config.foldMode) != null ? _b : DEFAULT_GRAPH_CONFIG.foldMode) != null ? _c : FOLD_MODE.EXPANDED;
|
|
3640
|
-
const [showControllers, setShowControllers] =
|
|
3467
|
+
const [showControllers, setShowControllers] = React11.useState(() => {
|
|
3641
3468
|
var _a2, _b2;
|
|
3642
3469
|
if (effectiveFoldMode === FOLD_MODE.FOLDED) return true;
|
|
3643
3470
|
return (_b2 = (_a2 = initialShowControllers != null ? initialShowControllers : config.showControllers) != null ? _a2 : DEFAULT_GRAPH_CONFIG.showControllers) != null ? _b2 : false;
|
|
3644
3471
|
});
|
|
3645
|
-
const foldModeRef =
|
|
3472
|
+
const foldModeRef = React11.useRef(effectiveFoldMode);
|
|
3646
3473
|
foldModeRef.current = effectiveFoldMode;
|
|
3647
|
-
const containerRef =
|
|
3648
|
-
const [detailSelection, setDetailSelection] =
|
|
3649
|
-
const [conceptOverride, setConceptOverride] =
|
|
3474
|
+
const containerRef = React11.useRef(null);
|
|
3475
|
+
const [detailSelection, setDetailSelection] = React11.useState(null);
|
|
3476
|
+
const [conceptOverride, setConceptOverride] = React11.useState(null);
|
|
3650
3477
|
const {
|
|
3651
3478
|
width: panelWidth,
|
|
3652
3479
|
isDragging: isPanelDragging,
|
|
3653
3480
|
handleMouseDown: onResizeMouseDown
|
|
3654
3481
|
} = useResizable({ defaultWidth: 380, minWidth: 280, maxWidth: 800, containerRef });
|
|
3655
|
-
|
|
3482
|
+
React11.useEffect(() => {
|
|
3656
3483
|
setDetailSelection(null);
|
|
3657
3484
|
setConceptOverride(null);
|
|
3658
3485
|
}, [graphspec]);
|
|
3659
|
-
|
|
3486
|
+
React11.useEffect(() => {
|
|
3660
3487
|
const el = containerRef.current;
|
|
3661
3488
|
if (!el) return;
|
|
3662
3489
|
const themePalette = getPaletteForTheme(resolvedTheme);
|
|
@@ -3671,15 +3498,15 @@ function GraphViewerCanvas(props) {
|
|
|
3671
3498
|
}
|
|
3672
3499
|
};
|
|
3673
3500
|
}, [config.paletteColors, resolvedTheme]);
|
|
3674
|
-
const [stillHeight, setStillHeight] =
|
|
3501
|
+
const [stillHeight, setStillHeight] = React11.useState(STILL_PLACEHOLDER_HEIGHT_PX);
|
|
3675
3502
|
const [nodes, setNodes, onNodesChange] = useNodesState([]);
|
|
3676
3503
|
const [edges, setEdges, onEdgesChange] = useEdgesState([]);
|
|
3677
|
-
const reactFlowRef =
|
|
3678
|
-
const initialDataRef =
|
|
3679
|
-
const rawGraphDataRef =
|
|
3680
|
-
const layoutCacheRef =
|
|
3681
|
-
const [expandedControllers, setExpandedControllers] =
|
|
3682
|
-
const toggleCollapse =
|
|
3504
|
+
const reactFlowRef = React11.useRef(null);
|
|
3505
|
+
const initialDataRef = React11.useRef(null);
|
|
3506
|
+
const rawGraphDataRef = React11.useRef(null);
|
|
3507
|
+
const layoutCacheRef = React11.useRef(null);
|
|
3508
|
+
const [expandedControllers, setExpandedControllers] = React11.useState(/* @__PURE__ */ new Set());
|
|
3509
|
+
const toggleCollapse = React11.useCallback((controllerId) => {
|
|
3683
3510
|
setExpandedControllers((prev) => {
|
|
3684
3511
|
const next = new Set(prev);
|
|
3685
3512
|
if (next.has(controllerId)) next.delete(controllerId);
|
|
@@ -3687,17 +3514,17 @@ function GraphViewerCanvas(props) {
|
|
|
3687
3514
|
return next;
|
|
3688
3515
|
});
|
|
3689
3516
|
}, []);
|
|
3690
|
-
const [foldedControllers, setFoldedControllers] =
|
|
3691
|
-
const styleDefaultFoldsRef =
|
|
3692
|
-
const readerOpenedRef =
|
|
3693
|
-
const markReaderFolds =
|
|
3517
|
+
const [foldedControllers, setFoldedControllers] = React11.useState(/* @__PURE__ */ new Set());
|
|
3518
|
+
const styleDefaultFoldsRef = React11.useRef(/* @__PURE__ */ new Set());
|
|
3519
|
+
const readerOpenedRef = React11.useRef(/* @__PURE__ */ new Set());
|
|
3520
|
+
const markReaderFolds = React11.useCallback((ids, folded) => {
|
|
3694
3521
|
for (const id of ids) {
|
|
3695
3522
|
styleDefaultFoldsRef.current.delete(id);
|
|
3696
3523
|
if (folded) readerOpenedRef.current.delete(id);
|
|
3697
3524
|
else readerOpenedRef.current.add(id);
|
|
3698
3525
|
}
|
|
3699
3526
|
}, []);
|
|
3700
|
-
const toggleFold =
|
|
3527
|
+
const toggleFold = React11.useCallback(
|
|
3701
3528
|
(controllerId, options) => {
|
|
3702
3529
|
setFoldedControllers((prev) => {
|
|
3703
3530
|
const next = new Set(prev);
|
|
@@ -3715,45 +3542,45 @@ function GraphViewerCanvas(props) {
|
|
|
3715
3542
|
[markReaderFolds]
|
|
3716
3543
|
);
|
|
3717
3544
|
const edgeType = config.edgeType || EDGE_TYPE.DEFAULT;
|
|
3718
|
-
const layoutConfig =
|
|
3545
|
+
const layoutConfig = React11.useMemo(
|
|
3719
3546
|
() => ({ nodesep: config.nodesep, ranksep: config.ranksep }),
|
|
3720
3547
|
[config.nodesep, config.ranksep]
|
|
3721
3548
|
);
|
|
3722
|
-
const showControllersRef =
|
|
3549
|
+
const showControllersRef = React11.useRef(showControllers);
|
|
3723
3550
|
showControllersRef.current = showControllers;
|
|
3724
|
-
const directionRef =
|
|
3551
|
+
const directionRef = React11.useRef(direction);
|
|
3725
3552
|
directionRef.current = direction;
|
|
3726
|
-
const layoutConfigRef =
|
|
3553
|
+
const layoutConfigRef = React11.useRef(layoutConfig);
|
|
3727
3554
|
layoutConfigRef.current = layoutConfig;
|
|
3728
|
-
const initialZoomRef =
|
|
3555
|
+
const initialZoomRef = React11.useRef(config.initialZoom);
|
|
3729
3556
|
initialZoomRef.current = config.initialZoom;
|
|
3730
|
-
const panToTopRef =
|
|
3557
|
+
const panToTopRef = React11.useRef(config.panToTop);
|
|
3731
3558
|
panToTopRef.current = config.panToTop;
|
|
3732
|
-
const interactiveRef =
|
|
3559
|
+
const interactiveRef = React11.useRef(interactive);
|
|
3733
3560
|
interactiveRef.current = interactive;
|
|
3734
|
-
const expandedRef =
|
|
3561
|
+
const expandedRef = React11.useRef(expandedControllers);
|
|
3735
3562
|
expandedRef.current = expandedControllers;
|
|
3736
|
-
const toggleCollapseRef =
|
|
3563
|
+
const toggleCollapseRef = React11.useRef(toggleCollapse);
|
|
3737
3564
|
toggleCollapseRef.current = toggleCollapse;
|
|
3738
|
-
const foldedRef =
|
|
3565
|
+
const foldedRef = React11.useRef(foldedControllers);
|
|
3739
3566
|
foldedRef.current = foldedControllers;
|
|
3740
|
-
const toggleFoldRef =
|
|
3567
|
+
const toggleFoldRef = React11.useRef(toggleFold);
|
|
3741
3568
|
toggleFoldRef.current = toggleFold;
|
|
3742
|
-
const isFirstFoldEffect =
|
|
3743
|
-
const prevFoldSizeRef =
|
|
3744
|
-
const skipNextFoldEffectRef =
|
|
3745
|
-
const statusMapRef =
|
|
3569
|
+
const isFirstFoldEffect = React11.useRef(true);
|
|
3570
|
+
const prevFoldSizeRef = React11.useRef(0);
|
|
3571
|
+
const skipNextFoldEffectRef = React11.useRef(false);
|
|
3572
|
+
const statusMapRef = React11.useRef(statusMap);
|
|
3746
3573
|
statusMapRef.current = statusMap;
|
|
3747
|
-
const validationIssuesRef =
|
|
3574
|
+
const validationIssuesRef = React11.useRef(validationIssues);
|
|
3748
3575
|
validationIssuesRef.current = validationIssues;
|
|
3749
|
-
const selectedNodeIdRef =
|
|
3576
|
+
const selectedNodeIdRef = React11.useRef(null);
|
|
3750
3577
|
selectedNodeIdRef.current = (_d = detailSelection == null ? void 0 : detailSelection.nodeId) != null ? _d : null;
|
|
3751
|
-
const [validationOpen, setValidationOpen] =
|
|
3752
|
-
const openValidationPanel =
|
|
3578
|
+
const [validationOpen, setValidationOpen] = React11.useState(false);
|
|
3579
|
+
const openValidationPanel = React11.useCallback(() => setValidationOpen(true), []);
|
|
3753
3580
|
const validationWidgetAvailable = validationState !== void 0 && !hideToolbar && interactive;
|
|
3754
|
-
const validationWidgetAvailableRef =
|
|
3581
|
+
const validationWidgetAvailableRef = React11.useRef(validationWidgetAvailable);
|
|
3755
3582
|
validationWidgetAvailableRef.current = validationWidgetAvailable;
|
|
3756
|
-
const decorateNodes =
|
|
3583
|
+
const decorateNodes = React11.useCallback(
|
|
3757
3584
|
(nodes2) => {
|
|
3758
3585
|
var _a2, _b2, _c2;
|
|
3759
3586
|
const raw = rawGraphDataRef.current;
|
|
@@ -3774,7 +3601,7 @@ function GraphViewerCanvas(props) {
|
|
|
3774
3601
|
},
|
|
3775
3602
|
[openValidationPanel]
|
|
3776
3603
|
);
|
|
3777
|
-
const frameLayout =
|
|
3604
|
+
const frameLayout = React11.useCallback(
|
|
3778
3605
|
(style, layout, graphspec2, analysis) => GRAPH_STYLE_PIPELINES[style].frame({
|
|
3779
3606
|
nodes: cloneCachedNodes(layout.nodes),
|
|
3780
3607
|
edges: layout.edges,
|
|
@@ -3793,18 +3620,18 @@ function GraphViewerCanvas(props) {
|
|
|
3793
3620
|
const data = initialDataRef.current;
|
|
3794
3621
|
return cache !== null && data !== null && cache.graphspec === data._graphspec && cache.graphStyle === data._graphStyle;
|
|
3795
3622
|
};
|
|
3796
|
-
const nodesRef =
|
|
3623
|
+
const nodesRef = React11.useRef([]);
|
|
3797
3624
|
nodesRef.current = nodes;
|
|
3798
|
-
const onValidationIssueClickRef =
|
|
3625
|
+
const onValidationIssueClickRef = React11.useRef(onValidationIssueClick);
|
|
3799
3626
|
onValidationIssueClickRef.current = onValidationIssueClick;
|
|
3800
|
-
const flashTimeoutRef =
|
|
3801
|
-
|
|
3627
|
+
const flashTimeoutRef = React11.useRef(null);
|
|
3628
|
+
React11.useEffect(
|
|
3802
3629
|
() => () => {
|
|
3803
3630
|
if (flashTimeoutRef.current) clearTimeout(flashTimeoutRef.current);
|
|
3804
3631
|
},
|
|
3805
3632
|
[]
|
|
3806
3633
|
);
|
|
3807
|
-
const handleValidationIssueClick =
|
|
3634
|
+
const handleValidationIssueClick = React11.useCallback(
|
|
3808
3635
|
(index, issue) => {
|
|
3809
3636
|
var _a2, _b2, _c2;
|
|
3810
3637
|
(_a2 = onValidationIssueClickRef.current) == null ? void 0 : _a2.call(onValidationIssueClickRef, index, issue);
|
|
@@ -3847,8 +3674,8 @@ function GraphViewerCanvas(props) {
|
|
|
3847
3674
|
},
|
|
3848
3675
|
[setNodes]
|
|
3849
3676
|
);
|
|
3850
|
-
const drawnSpecRef =
|
|
3851
|
-
const reportLayoutFailure =
|
|
3677
|
+
const drawnSpecRef = React11.useRef(null);
|
|
3678
|
+
const reportLayoutFailure = React11.useCallback(
|
|
3852
3679
|
(error, spec, stale) => {
|
|
3853
3680
|
console.error("[GraphViewer] ELK layout failed:", error);
|
|
3854
3681
|
const route = routeLayoutFailure({ stale, specDrawn: drawnSpecRef.current === spec });
|
|
@@ -3861,7 +3688,7 @@ function GraphViewerCanvas(props) {
|
|
|
3861
3688
|
},
|
|
3862
3689
|
[]
|
|
3863
3690
|
);
|
|
3864
|
-
|
|
3691
|
+
React11.useEffect(() => {
|
|
3865
3692
|
const data = initialDataRef.current;
|
|
3866
3693
|
if (!data) return;
|
|
3867
3694
|
let cancelled = false;
|
|
@@ -3908,7 +3735,7 @@ function GraphViewerCanvas(props) {
|
|
|
3908
3735
|
cancelled = true;
|
|
3909
3736
|
};
|
|
3910
3737
|
}, [direction, layoutConfig]);
|
|
3911
|
-
|
|
3738
|
+
React11.useEffect(() => {
|
|
3912
3739
|
const cache = layoutCacheRef.current;
|
|
3913
3740
|
const data = initialDataRef.current;
|
|
3914
3741
|
if (!cache || !data || !cacheMatchesData()) return;
|
|
@@ -3916,7 +3743,7 @@ function GraphViewerCanvas(props) {
|
|
|
3916
3743
|
setNodes(decorateNodes(withControllers.nodes));
|
|
3917
3744
|
setEdges(toAppEdges(withControllers.edges));
|
|
3918
3745
|
}, [showControllers, expandedControllers, toggleCollapse, toggleFold, decorateNodes]);
|
|
3919
|
-
|
|
3746
|
+
React11.useEffect(() => {
|
|
3920
3747
|
var _a2;
|
|
3921
3748
|
if (!graphspec) {
|
|
3922
3749
|
initialDataRef.current = null;
|
|
@@ -4041,7 +3868,7 @@ function GraphViewerCanvas(props) {
|
|
|
4041
3868
|
cancelled = true;
|
|
4042
3869
|
};
|
|
4043
3870
|
}, [graphspec, edgeType, graphStyle]);
|
|
4044
|
-
|
|
3871
|
+
React11.useEffect(() => {
|
|
4045
3872
|
if (isFirstFoldEffect.current) {
|
|
4046
3873
|
isFirstFoldEffect.current = false;
|
|
4047
3874
|
prevFoldSizeRef.current = foldedControllers.size;
|
|
@@ -4121,7 +3948,7 @@ function GraphViewerCanvas(props) {
|
|
|
4121
3948
|
cancelled = true;
|
|
4122
3949
|
};
|
|
4123
3950
|
}, [foldedControllers, toggleFold]);
|
|
4124
|
-
|
|
3951
|
+
React11.useEffect(() => {
|
|
4125
3952
|
const cache = layoutCacheRef.current;
|
|
4126
3953
|
const data = initialDataRef.current;
|
|
4127
3954
|
if (!cache || !data || !cacheMatchesData()) return;
|
|
@@ -4129,14 +3956,14 @@ function GraphViewerCanvas(props) {
|
|
|
4129
3956
|
setNodes(decorateNodes(withControllers.nodes));
|
|
4130
3957
|
setEdges(toAppEdges(withControllers.edges));
|
|
4131
3958
|
}, [statusMap, decorateNodes]);
|
|
4132
|
-
|
|
3959
|
+
React11.useEffect(() => {
|
|
4133
3960
|
const cache = layoutCacheRef.current;
|
|
4134
3961
|
const data = initialDataRef.current;
|
|
4135
3962
|
if (!cache || !data || !cacheMatchesData()) return;
|
|
4136
3963
|
const withControllers = frameLayout(cache.graphStyle, cache, data._graphspec, data._analysis);
|
|
4137
3964
|
setNodes(decorateNodes(withControllers.nodes));
|
|
4138
3965
|
}, [validationIssues, validationWidgetAvailable, decorateNodes]);
|
|
4139
|
-
const onNodeClick =
|
|
3966
|
+
const onNodeClick = React11.useCallback(
|
|
4140
3967
|
(event, node) => {
|
|
4141
3968
|
const nodeData = node.data;
|
|
4142
3969
|
onNodeSelect == null ? void 0 : onNodeSelect(node.id, nodeData, event);
|
|
@@ -4177,7 +4004,7 @@ function GraphViewerCanvas(props) {
|
|
|
4177
4004
|
conceptOverride
|
|
4178
4005
|
]
|
|
4179
4006
|
);
|
|
4180
|
-
const onInit =
|
|
4007
|
+
const onInit = React11.useCallback(
|
|
4181
4008
|
(reactFlowInstance) => {
|
|
4182
4009
|
reactFlowRef.current = reactFlowInstance;
|
|
4183
4010
|
if (onReactFlowInit) {
|
|
@@ -4186,8 +4013,8 @@ function GraphViewerCanvas(props) {
|
|
|
4186
4013
|
},
|
|
4187
4014
|
[onReactFlowInit]
|
|
4188
4015
|
);
|
|
4189
|
-
const prevInteractiveRef =
|
|
4190
|
-
|
|
4016
|
+
const prevInteractiveRef = React11.useRef(interactive);
|
|
4017
|
+
React11.useEffect(() => {
|
|
4191
4018
|
if (prevInteractiveRef.current === interactive) return;
|
|
4192
4019
|
prevInteractiveRef.current = interactive;
|
|
4193
4020
|
if (!interactive) {
|
|
@@ -4202,12 +4029,12 @@ function GraphViewerCanvas(props) {
|
|
|
4202
4029
|
}, 50);
|
|
4203
4030
|
return () => clearTimeout(timer);
|
|
4204
4031
|
}, [interactive]);
|
|
4205
|
-
const handlePaneClick =
|
|
4032
|
+
const handlePaneClick = React11.useCallback(() => {
|
|
4206
4033
|
setDetailSelection(null);
|
|
4207
4034
|
setConceptOverride(null);
|
|
4208
4035
|
onPaneClick == null ? void 0 : onPaneClick();
|
|
4209
4036
|
}, [onPaneClick]);
|
|
4210
|
-
const handleConceptClick =
|
|
4037
|
+
const handleConceptClick = React11.useCallback(
|
|
4211
4038
|
(conceptCode) => {
|
|
4212
4039
|
if (!graphspec) return;
|
|
4213
4040
|
const info = resolveConceptRef(graphspec, conceptCode);
|
|
@@ -4224,7 +4051,7 @@ function GraphViewerCanvas(props) {
|
|
|
4224
4051
|
const rawAnalysis = (_e = rawGraphDataRef.current) == null ? void 0 : _e.analysis;
|
|
4225
4052
|
const allControllerIds = rawAnalysis == null ? void 0 : rawAnalysis.controllerNodeIds;
|
|
4226
4053
|
const foldControlsAvailable = styleCapabilities.foldAll && (!styleCapabilities.controllerFrameToggle || showControllers);
|
|
4227
|
-
const foldAllProps =
|
|
4054
|
+
const foldAllProps = React11.useMemo(() => {
|
|
4228
4055
|
if (!foldControlsAvailable || !allControllerIds || allControllerIds.size === 0) {
|
|
4229
4056
|
return {
|
|
4230
4057
|
onFoldAll: void 0,
|
|
@@ -4246,11 +4073,11 @@ function GraphViewerCanvas(props) {
|
|
|
4246
4073
|
expandAllDisabled: foldedControllers.size === 0
|
|
4247
4074
|
};
|
|
4248
4075
|
}, [foldControlsAvailable, allControllerIds, foldedControllers, markReaderFolds]);
|
|
4249
|
-
const styleMenuOptions =
|
|
4250
|
-
|
|
4076
|
+
const styleMenuOptions = React11.useMemo(() => resolveStyleMenu(styleMenu), [styleMenu]);
|
|
4077
|
+
React11.useEffect(() => {
|
|
4251
4078
|
if (failed) reactFlowRef.current = null;
|
|
4252
4079
|
}, [failed]);
|
|
4253
|
-
return /* @__PURE__ */
|
|
4080
|
+
return /* @__PURE__ */ jsx30(
|
|
4254
4081
|
"div",
|
|
4255
4082
|
{
|
|
4256
4083
|
ref: containerRef,
|
|
@@ -4261,8 +4088,8 @@ function GraphViewerCanvas(props) {
|
|
|
4261
4088
|
}),
|
|
4262
4089
|
style: interactive || failed ? void 0 : { height: stillHeight },
|
|
4263
4090
|
inert: !interactive && !failed,
|
|
4264
|
-
children: canvasFailure.inPlace !== null ? /* @__PURE__ */
|
|
4265
|
-
/* @__PURE__ */
|
|
4091
|
+
children: canvasFailure.inPlace !== null ? /* @__PURE__ */ jsx30(GraphErrorState, { failure: canvasFailure.inPlace }) : /* @__PURE__ */ jsxs28(Fragment16, { children: [
|
|
4092
|
+
/* @__PURE__ */ jsxs28(
|
|
4266
4093
|
ReactFlow,
|
|
4267
4094
|
__spreadProps(__spreadValues({
|
|
4268
4095
|
nodes,
|
|
@@ -4283,7 +4110,7 @@ function GraphViewerCanvas(props) {
|
|
|
4283
4110
|
panActivationKeyCode: null
|
|
4284
4111
|
}, interactive ? {} : STILL_FLOW_PROPS), {
|
|
4285
4112
|
children: [
|
|
4286
|
-
interactive ? /* @__PURE__ */
|
|
4113
|
+
interactive ? /* @__PURE__ */ jsx30(
|
|
4287
4114
|
Background,
|
|
4288
4115
|
{
|
|
4289
4116
|
variant: BackgroundVariant.Dots,
|
|
@@ -4291,10 +4118,10 @@ function GraphViewerCanvas(props) {
|
|
|
4291
4118
|
size: 1,
|
|
4292
4119
|
color: "var(--color-bg-dots)"
|
|
4293
4120
|
}
|
|
4294
|
-
) : /* @__PURE__ */
|
|
4121
|
+
) : /* @__PURE__ */ jsx30(StillFit, { onHeight: setStillHeight }),
|
|
4295
4122
|
canvasFailure.overFlow !== null && // Inside the flow, beneath the toolbar: the toolbar stays on top
|
|
4296
4123
|
// and usable, so the reader can change the view back.
|
|
4297
|
-
/* @__PURE__ */
|
|
4124
|
+
/* @__PURE__ */ jsx30(
|
|
4298
4125
|
GraphRelayoutFailure,
|
|
4299
4126
|
{
|
|
4300
4127
|
failure: canvasFailure.overFlow,
|
|
@@ -4302,7 +4129,7 @@ function GraphViewerCanvas(props) {
|
|
|
4302
4129
|
rightOffset: detailOpen ? panelWidth : 0
|
|
4303
4130
|
}
|
|
4304
4131
|
),
|
|
4305
|
-
interactive && !hideToolbar && /* @__PURE__ */
|
|
4132
|
+
interactive && !hideToolbar && /* @__PURE__ */ jsx30(
|
|
4306
4133
|
GraphToolbar,
|
|
4307
4134
|
{
|
|
4308
4135
|
direction,
|
|
@@ -4342,7 +4169,7 @@ function GraphViewerCanvas(props) {
|
|
|
4342
4169
|
]
|
|
4343
4170
|
})
|
|
4344
4171
|
),
|
|
4345
|
-
interactive && /* @__PURE__ */
|
|
4172
|
+
interactive && /* @__PURE__ */ jsxs28(
|
|
4346
4173
|
DetailPanel,
|
|
4347
4174
|
{
|
|
4348
4175
|
isOpen: detailOpen,
|
|
@@ -4351,14 +4178,14 @@ function GraphViewerCanvas(props) {
|
|
|
4351
4178
|
isDragging: isPanelDragging,
|
|
4352
4179
|
onResizeHandleMouseDown: onResizeMouseDown,
|
|
4353
4180
|
children: [
|
|
4354
|
-
conceptOverride ? /* @__PURE__ */
|
|
4181
|
+
conceptOverride ? /* @__PURE__ */ jsx30(ConceptDetailPanel, { concept: conceptOverride }) : selectedSpecNode && graphspec ? /* @__PURE__ */ jsx30(
|
|
4355
4182
|
PipeDetailPanel,
|
|
4356
4183
|
{
|
|
4357
4184
|
node: selectedSpecNode,
|
|
4358
4185
|
spec: graphspec,
|
|
4359
4186
|
onConceptClick: handleConceptClick
|
|
4360
4187
|
}
|
|
4361
|
-
) : (detailSelection == null ? void 0 : detailSelection.stuffData) ? /* @__PURE__ */
|
|
4188
|
+
) : (detailSelection == null ? void 0 : detailSelection.stuffData) ? /* @__PURE__ */ jsx30(
|
|
4362
4189
|
StuffNodeDetail,
|
|
4363
4190
|
{
|
|
4364
4191
|
nodeId: detailSelection.nodeId,
|