@pipelex/mthds-ui 0.37.0 → 0.38.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 +8 -1
- package/dist/form/brand/index.d.ts +1 -0
- package/dist/form/brand/index.js +3 -0
- package/dist/form/brand/index.js.map +1 -0
- package/dist/form/index.d.ts +1 -0
- package/dist/graph/react/graph-core.css +80 -0
- package/dist/graph/react/index.d.ts +15 -0
- package/dist/graph/react/index.js +604 -417
- package/dist/graph/react/index.js.map +1 -1
- package/dist/standalone/graph-standalone.html +192 -112
- package/dist/standalone/graph-viewer.css +81 -1
- package/dist/standalone/graph-viewer.js +111 -111
- package/dist/timeline/react/index.js +3 -3
- package/package.json +6 -2
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
GRAPH_STYLES,
|
|
8
8
|
GRAPH_STYLE_PIPELINES,
|
|
9
|
+
GraphSpecValidationError,
|
|
9
10
|
MAX_VISIBLE_CONTROLLER_CHILDREN,
|
|
10
11
|
STEP_CATEGORY_WORDS,
|
|
11
12
|
applyFolds,
|
|
@@ -74,7 +75,7 @@ import "./viewer/GraphToolbar.css";
|
|
|
74
75
|
import "./styles/simple/SimpleStyle.css";
|
|
75
76
|
|
|
76
77
|
// src/graph/react/viewer/GraphViewer.tsx
|
|
77
|
-
import
|
|
78
|
+
import React13 from "react";
|
|
78
79
|
import {
|
|
79
80
|
ReactFlow,
|
|
80
81
|
useNodesState,
|
|
@@ -1719,12 +1720,107 @@ function hydrateLabels(nodes) {
|
|
|
1719
1720
|
});
|
|
1720
1721
|
}
|
|
1721
1722
|
|
|
1723
|
+
// src/graph/react/viewer/graphFailure.ts
|
|
1724
|
+
function describeGraphFailure(error) {
|
|
1725
|
+
if (error instanceof GraphSpecValidationError) return error.message;
|
|
1726
|
+
if (error instanceof Error) return `${error.name}: ${error.message}`;
|
|
1727
|
+
return String(error);
|
|
1728
|
+
}
|
|
1729
|
+
function readGraphSpec(raw) {
|
|
1730
|
+
if (raw === null) return { graphspec: null, failure: null };
|
|
1731
|
+
try {
|
|
1732
|
+
return { graphspec: validateGraphSpec(raw), failure: null };
|
|
1733
|
+
} catch (error) {
|
|
1734
|
+
return { graphspec: null, failure: describeGraphFailure(error) };
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
function isLayoutStale(cancelled, laidOutSpec, currentSpec) {
|
|
1738
|
+
return cancelled || laidOutSpec !== currentSpec;
|
|
1739
|
+
}
|
|
1740
|
+
var LAYOUT_FAILURE_ROUTE = {
|
|
1741
|
+
/** Nowhere: the layout was stale, so its failure belongs to a spec no longer drawn. */
|
|
1742
|
+
DROP: "drop",
|
|
1743
|
+
/** Over the canvas, which keeps its toolbar, so the reader can change the view back. */
|
|
1744
|
+
CANVAS: "canvas",
|
|
1745
|
+
/** To the boundary, which draws the error state in place of the canvas. */
|
|
1746
|
+
BOUNDARY: "boundary"
|
|
1747
|
+
};
|
|
1748
|
+
function routeLayoutFailure({
|
|
1749
|
+
stale,
|
|
1750
|
+
specDrawn
|
|
1751
|
+
}) {
|
|
1752
|
+
if (stale) return LAYOUT_FAILURE_ROUTE.DROP;
|
|
1753
|
+
return specDrawn ? LAYOUT_FAILURE_ROUTE.CANVAS : LAYOUT_FAILURE_ROUTE.BOUNDARY;
|
|
1754
|
+
}
|
|
1755
|
+
function layoutFailureFor(failure, spec) {
|
|
1756
|
+
return failure !== null && failure.spec === spec ? failure.message : null;
|
|
1757
|
+
}
|
|
1758
|
+
function placeCanvasFailure({
|
|
1759
|
+
specFailure,
|
|
1760
|
+
layoutFailure,
|
|
1761
|
+
interactive
|
|
1762
|
+
}) {
|
|
1763
|
+
if (specFailure !== null) return { inPlace: specFailure, overFlow: null };
|
|
1764
|
+
if (layoutFailure === null) return { inPlace: null, overFlow: null };
|
|
1765
|
+
return interactive ? { inPlace: null, overFlow: layoutFailure } : { inPlace: layoutFailure, overFlow: null };
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
// src/graph/react/viewer/GraphErrorState.tsx
|
|
1769
|
+
import React7 from "react";
|
|
1770
|
+
import { jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1771
|
+
var GRAPH_ERROR_STATE_TITLE = "This method graph could not be drawn";
|
|
1772
|
+
function GraphErrorState({ failure }) {
|
|
1773
|
+
return /* @__PURE__ */ jsxs21("div", { className: "graph-error-state", role: "alert", children: [
|
|
1774
|
+
/* @__PURE__ */ jsx21("p", { className: "graph-error-state-title", children: GRAPH_ERROR_STATE_TITLE }),
|
|
1775
|
+
/* @__PURE__ */ jsx21("p", { className: "graph-error-state-detail", children: failure })
|
|
1776
|
+
] });
|
|
1777
|
+
}
|
|
1778
|
+
var GRAPH_RELAYOUT_FAILURE_TITLE = "This view of the method graph could not be drawn";
|
|
1779
|
+
var GRAPH_RELAYOUT_FAILURE_HINT = "The view drawn before it is dimmed beneath. Change the direction, the folds or the style back from the toolbar.";
|
|
1780
|
+
function GraphRelayoutFailure({
|
|
1781
|
+
failure,
|
|
1782
|
+
toolbarShown,
|
|
1783
|
+
rightOffset = 0
|
|
1784
|
+
}) {
|
|
1785
|
+
return /* @__PURE__ */ jsx21(
|
|
1786
|
+
"div",
|
|
1787
|
+
{
|
|
1788
|
+
className: "graph-relayout-failure",
|
|
1789
|
+
style: rightOffset > 0 ? { right: rightOffset } : void 0,
|
|
1790
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "graph-error-state graph-error-state--floating", role: "alert", children: [
|
|
1791
|
+
/* @__PURE__ */ jsx21("p", { className: "graph-error-state-title", children: GRAPH_RELAYOUT_FAILURE_TITLE }),
|
|
1792
|
+
/* @__PURE__ */ jsx21("p", { className: "graph-error-state-detail", children: failure }),
|
|
1793
|
+
toolbarShown && /* @__PURE__ */ jsx21("p", { className: "graph-error-state-hint", children: GRAPH_RELAYOUT_FAILURE_HINT })
|
|
1794
|
+
] })
|
|
1795
|
+
}
|
|
1796
|
+
);
|
|
1797
|
+
}
|
|
1798
|
+
var GraphFailureBoundary = class extends React7.Component {
|
|
1799
|
+
constructor() {
|
|
1800
|
+
super(...arguments);
|
|
1801
|
+
this.state = { failure: null, resetKey: this.props.resetKey };
|
|
1802
|
+
this.fail = (error) => {
|
|
1803
|
+
this.setState({ failure: describeGraphFailure(error) });
|
|
1804
|
+
};
|
|
1805
|
+
}
|
|
1806
|
+
static getDerivedStateFromError(error) {
|
|
1807
|
+
return { failure: describeGraphFailure(error) };
|
|
1808
|
+
}
|
|
1809
|
+
static getDerivedStateFromProps(props, state) {
|
|
1810
|
+
return props.resetKey === state.resetKey ? null : { failure: null, resetKey: props.resetKey };
|
|
1811
|
+
}
|
|
1812
|
+
render() {
|
|
1813
|
+
const { failure } = this.state;
|
|
1814
|
+
return failure === null ? this.props.children(this.fail) : this.props.fallback(failure);
|
|
1815
|
+
}
|
|
1816
|
+
};
|
|
1817
|
+
|
|
1722
1818
|
// src/graph/react/viewer/GraphToolbar.tsx
|
|
1723
|
-
import
|
|
1819
|
+
import React10 from "react";
|
|
1724
1820
|
import { Panel } from "@xyflow/react";
|
|
1725
1821
|
|
|
1726
1822
|
// src/graph/react/viewer/ValidationPanel.tsx
|
|
1727
|
-
import { jsx as
|
|
1823
|
+
import { jsx as jsx22, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1728
1824
|
function validationLabel(state, issueCount) {
|
|
1729
1825
|
const issues = issueCount === 1 ? "1 issue" : `${issueCount} issues`;
|
|
1730
1826
|
switch (state) {
|
|
@@ -1791,7 +1887,7 @@ function ValidationPanel({
|
|
|
1791
1887
|
placement,
|
|
1792
1888
|
id
|
|
1793
1889
|
}) {
|
|
1794
|
-
return /* @__PURE__ */
|
|
1890
|
+
return /* @__PURE__ */ jsxs22(
|
|
1795
1891
|
"div",
|
|
1796
1892
|
{
|
|
1797
1893
|
id,
|
|
@@ -1799,18 +1895,18 @@ function ValidationPanel({
|
|
|
1799
1895
|
role: "region",
|
|
1800
1896
|
"aria-label": "Validation issues",
|
|
1801
1897
|
children: [
|
|
1802
|
-
/* @__PURE__ */
|
|
1803
|
-
issues.length === 0 ? /* @__PURE__ */
|
|
1898
|
+
/* @__PURE__ */ jsx22("div", { className: "graph-validation-panel-header", children: validationLabel(state, issues.length) }),
|
|
1899
|
+
issues.length === 0 ? /* @__PURE__ */ jsx22("div", { className: "graph-validation-empty", children: validationEmptyText(state) }) : /* @__PURE__ */ jsx22("ul", { className: "graph-validation-issues", role: "list", children: issues.map((issue, index) => {
|
|
1804
1900
|
const clickable = onIssueClick !== void 0;
|
|
1805
|
-
const meta = (issue.context || issue.file) && /* @__PURE__ */
|
|
1806
|
-
issue.context && /* @__PURE__ */
|
|
1807
|
-
issue.file && /* @__PURE__ */
|
|
1901
|
+
const meta = (issue.context || issue.file) && /* @__PURE__ */ jsxs22("div", { className: "graph-validation-issue-meta", children: [
|
|
1902
|
+
issue.context && /* @__PURE__ */ jsx22("span", { className: "graph-validation-issue-context", children: issue.context }),
|
|
1903
|
+
issue.file && /* @__PURE__ */ jsx22("span", { className: "graph-validation-issue-file", children: issue.file })
|
|
1808
1904
|
] });
|
|
1809
|
-
return /* @__PURE__ */
|
|
1905
|
+
return /* @__PURE__ */ jsx22(
|
|
1810
1906
|
"li",
|
|
1811
1907
|
{
|
|
1812
1908
|
className: `graph-validation-issue graph-validation-issue--${issue.severity}` + (clickable ? " graph-validation-issue--clickable" : ""),
|
|
1813
|
-
children: /* @__PURE__ */
|
|
1909
|
+
children: /* @__PURE__ */ jsxs22(
|
|
1814
1910
|
"div",
|
|
1815
1911
|
{
|
|
1816
1912
|
className: "graph-validation-issue-body",
|
|
@@ -1825,8 +1921,8 @@ function ValidationPanel({
|
|
|
1825
1921
|
} : void 0,
|
|
1826
1922
|
children: [
|
|
1827
1923
|
meta,
|
|
1828
|
-
/* @__PURE__ */
|
|
1829
|
-
issue.suggestedFix && /* @__PURE__ */
|
|
1924
|
+
/* @__PURE__ */ jsx22("div", { className: "graph-validation-issue-message", children: issue.message }),
|
|
1925
|
+
issue.suggestedFix && /* @__PURE__ */ jsx22("div", { className: "graph-validation-issue-fix", children: issue.suggestedFix })
|
|
1830
1926
|
]
|
|
1831
1927
|
}
|
|
1832
1928
|
)
|
|
@@ -1840,14 +1936,14 @@ function ValidationPanel({
|
|
|
1840
1936
|
}
|
|
1841
1937
|
|
|
1842
1938
|
// src/graph/react/viewer/StyleMenu.tsx
|
|
1843
|
-
import
|
|
1939
|
+
import React9 from "react";
|
|
1844
1940
|
|
|
1845
1941
|
// src/graph/react/viewer/usePopoverDismiss.ts
|
|
1846
|
-
import
|
|
1942
|
+
import React8 from "react";
|
|
1847
1943
|
function usePopoverDismiss(open, wrapperRef, onDismiss) {
|
|
1848
|
-
const onDismissRef =
|
|
1944
|
+
const onDismissRef = React8.useRef(onDismiss);
|
|
1849
1945
|
onDismissRef.current = onDismiss;
|
|
1850
|
-
|
|
1946
|
+
React8.useEffect(() => {
|
|
1851
1947
|
if (!open) return;
|
|
1852
1948
|
const onPointerDown = (event) => {
|
|
1853
1949
|
const wrapper = wrapperRef.current;
|
|
@@ -1868,7 +1964,7 @@ function usePopoverDismiss(open, wrapperRef, onDismiss) {
|
|
|
1868
1964
|
}
|
|
1869
1965
|
|
|
1870
1966
|
// src/graph/react/viewer/StyleMenu.tsx
|
|
1871
|
-
import { jsx as
|
|
1967
|
+
import { jsx as jsx23, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1872
1968
|
var ICON_PROPS = {
|
|
1873
1969
|
viewBox: "0 0 24 24",
|
|
1874
1970
|
width: 14,
|
|
@@ -1881,22 +1977,22 @@ var ICON_PROPS = {
|
|
|
1881
1977
|
};
|
|
1882
1978
|
var STYLE_ICONS = {
|
|
1883
1979
|
// Cards with their rows: every pipe with its slots.
|
|
1884
|
-
[GRAPH_STYLE.DETAILED]: /* @__PURE__ */
|
|
1885
|
-
/* @__PURE__ */
|
|
1886
|
-
/* @__PURE__ */
|
|
1887
|
-
/* @__PURE__ */
|
|
1888
|
-
/* @__PURE__ */
|
|
1889
|
-
/* @__PURE__ */
|
|
1890
|
-
/* @__PURE__ */
|
|
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" })
|
|
1891
1987
|
] })),
|
|
1892
1988
|
// Two steps and the arrow between them: a flowchart.
|
|
1893
|
-
[GRAPH_STYLE.SIMPLE]: /* @__PURE__ */
|
|
1894
|
-
/* @__PURE__ */
|
|
1895
|
-
/* @__PURE__ */
|
|
1896
|
-
/* @__PURE__ */
|
|
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" })
|
|
1897
1993
|
] }))
|
|
1898
1994
|
};
|
|
1899
|
-
var CHECK_ICON2 = /* @__PURE__ */
|
|
1995
|
+
var CHECK_ICON2 = /* @__PURE__ */ jsx23("svg", __spreadProps(__spreadValues({}, ICON_PROPS), { children: /* @__PURE__ */ jsx23("polyline", { points: "20 6 9 17 4 12" }) }));
|
|
1900
1996
|
function graphStyleIcon(style) {
|
|
1901
1997
|
return STYLE_ICONS[style];
|
|
1902
1998
|
}
|
|
@@ -1904,18 +2000,18 @@ function styleMenuLabel(style) {
|
|
|
1904
2000
|
return `Graph style: ${GRAPH_STYLES[style].name} \u2014 choose how the graph is drawn`;
|
|
1905
2001
|
}
|
|
1906
2002
|
function StyleMenu({ value, options, onChange, placement }) {
|
|
1907
|
-
const [open, setOpen] =
|
|
1908
|
-
const [activeIndex, setActiveIndex] =
|
|
1909
|
-
const wrapperRef =
|
|
1910
|
-
const buttonRef =
|
|
1911
|
-
const itemRefs =
|
|
1912
|
-
const menuId =
|
|
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();
|
|
1913
2009
|
usePopoverDismiss(open, wrapperRef, (reason) => {
|
|
1914
2010
|
var _a;
|
|
1915
2011
|
setOpen(false);
|
|
1916
2012
|
if (reason === "escape") (_a = buttonRef.current) == null ? void 0 : _a.focus();
|
|
1917
2013
|
});
|
|
1918
|
-
|
|
2014
|
+
React9.useEffect(() => {
|
|
1919
2015
|
var _a;
|
|
1920
2016
|
if (!open) return;
|
|
1921
2017
|
const index = Math.max(0, options.indexOf(value));
|
|
@@ -1961,8 +2057,8 @@ function StyleMenu({ value, options, onChange, placement }) {
|
|
|
1961
2057
|
if (style !== value) onChange(style);
|
|
1962
2058
|
};
|
|
1963
2059
|
const label = styleMenuLabel(value);
|
|
1964
|
-
return /* @__PURE__ */
|
|
1965
|
-
/* @__PURE__ */
|
|
2060
|
+
return /* @__PURE__ */ jsxs23("div", { className: "graph-toolbar-style", ref: wrapperRef, children: [
|
|
2061
|
+
/* @__PURE__ */ jsx23(
|
|
1966
2062
|
"button",
|
|
1967
2063
|
{
|
|
1968
2064
|
ref: buttonRef,
|
|
@@ -1983,7 +2079,7 @@ function StyleMenu({ value, options, onChange, placement }) {
|
|
|
1983
2079
|
children: graphStyleIcon(value)
|
|
1984
2080
|
}
|
|
1985
2081
|
),
|
|
1986
|
-
open && /* @__PURE__ */
|
|
2082
|
+
open && /* @__PURE__ */ jsx23(
|
|
1987
2083
|
"div",
|
|
1988
2084
|
{
|
|
1989
2085
|
id: menuId,
|
|
@@ -1994,7 +2090,7 @@ function StyleMenu({ value, options, onChange, placement }) {
|
|
|
1994
2090
|
children: options.map((style, index) => {
|
|
1995
2091
|
const descriptor = GRAPH_STYLES[style];
|
|
1996
2092
|
const checked = style === value;
|
|
1997
|
-
return /* @__PURE__ */
|
|
2093
|
+
return /* @__PURE__ */ jsxs23(
|
|
1998
2094
|
"button",
|
|
1999
2095
|
{
|
|
2000
2096
|
ref: (el) => {
|
|
@@ -2007,12 +2103,12 @@ function StyleMenu({ value, options, onChange, placement }) {
|
|
|
2007
2103
|
className: `graph-style-menu-item${checked ? " graph-style-menu-item--checked" : ""}`,
|
|
2008
2104
|
onClick: () => choose(style),
|
|
2009
2105
|
children: [
|
|
2010
|
-
/* @__PURE__ */
|
|
2011
|
-
/* @__PURE__ */
|
|
2012
|
-
/* @__PURE__ */
|
|
2013
|
-
/* @__PURE__ */
|
|
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 })
|
|
2014
2110
|
] }),
|
|
2015
|
-
/* @__PURE__ */
|
|
2111
|
+
/* @__PURE__ */ jsx23("span", { className: "graph-style-menu-check", "aria-hidden": "true", children: checked ? CHECK_ICON2 : null })
|
|
2016
2112
|
]
|
|
2017
2113
|
},
|
|
2018
2114
|
style
|
|
@@ -2024,9 +2120,9 @@ function StyleMenu({ value, options, onChange, placement }) {
|
|
|
2024
2120
|
}
|
|
2025
2121
|
|
|
2026
2122
|
// src/graph/react/viewer/GraphToolbar.tsx
|
|
2027
|
-
import { Fragment as Fragment13, jsx as
|
|
2123
|
+
import { Fragment as Fragment13, jsx as jsx24, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2028
2124
|
var REACTFLOW_PANEL_MARGIN = 15;
|
|
2029
|
-
var ARROW_RIGHT_ICON = /* @__PURE__ */
|
|
2125
|
+
var ARROW_RIGHT_ICON = /* @__PURE__ */ jsxs24(
|
|
2030
2126
|
"svg",
|
|
2031
2127
|
{
|
|
2032
2128
|
viewBox: "0 0 24 24",
|
|
@@ -2038,12 +2134,12 @@ var ARROW_RIGHT_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2038
2134
|
strokeLinecap: "round",
|
|
2039
2135
|
strokeLinejoin: "round",
|
|
2040
2136
|
children: [
|
|
2041
|
-
/* @__PURE__ */
|
|
2042
|
-
/* @__PURE__ */
|
|
2137
|
+
/* @__PURE__ */ jsx24("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
2138
|
+
/* @__PURE__ */ jsx24("polyline", { points: "12 5 19 12 12 19" })
|
|
2043
2139
|
]
|
|
2044
2140
|
}
|
|
2045
2141
|
);
|
|
2046
|
-
var ARROW_DOWN_ICON = /* @__PURE__ */
|
|
2142
|
+
var ARROW_DOWN_ICON = /* @__PURE__ */ jsxs24(
|
|
2047
2143
|
"svg",
|
|
2048
2144
|
{
|
|
2049
2145
|
viewBox: "0 0 24 24",
|
|
@@ -2055,12 +2151,12 @@ var ARROW_DOWN_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2055
2151
|
strokeLinecap: "round",
|
|
2056
2152
|
strokeLinejoin: "round",
|
|
2057
2153
|
children: [
|
|
2058
|
-
/* @__PURE__ */
|
|
2059
|
-
/* @__PURE__ */
|
|
2154
|
+
/* @__PURE__ */ jsx24("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
2155
|
+
/* @__PURE__ */ jsx24("polyline", { points: "19 12 12 19 5 12" })
|
|
2060
2156
|
]
|
|
2061
2157
|
}
|
|
2062
2158
|
);
|
|
2063
|
-
var MINUS_ICON = /* @__PURE__ */
|
|
2159
|
+
var MINUS_ICON = /* @__PURE__ */ jsx24(
|
|
2064
2160
|
"svg",
|
|
2065
2161
|
{
|
|
2066
2162
|
viewBox: "0 0 24 24",
|
|
@@ -2071,10 +2167,10 @@ var MINUS_ICON = /* @__PURE__ */ jsx23(
|
|
|
2071
2167
|
strokeWidth: "2",
|
|
2072
2168
|
strokeLinecap: "round",
|
|
2073
2169
|
strokeLinejoin: "round",
|
|
2074
|
-
children: /* @__PURE__ */
|
|
2170
|
+
children: /* @__PURE__ */ jsx24("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
2075
2171
|
}
|
|
2076
2172
|
);
|
|
2077
|
-
var PLUS_ICON = /* @__PURE__ */
|
|
2173
|
+
var PLUS_ICON = /* @__PURE__ */ jsxs24(
|
|
2078
2174
|
"svg",
|
|
2079
2175
|
{
|
|
2080
2176
|
viewBox: "0 0 24 24",
|
|
@@ -2086,12 +2182,12 @@ var PLUS_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2086
2182
|
strokeLinecap: "round",
|
|
2087
2183
|
strokeLinejoin: "round",
|
|
2088
2184
|
children: [
|
|
2089
|
-
/* @__PURE__ */
|
|
2090
|
-
/* @__PURE__ */
|
|
2185
|
+
/* @__PURE__ */ jsx24("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
2186
|
+
/* @__PURE__ */ jsx24("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
2091
2187
|
]
|
|
2092
2188
|
}
|
|
2093
2189
|
);
|
|
2094
|
-
var FIT_VIEW_ICON = /* @__PURE__ */
|
|
2190
|
+
var FIT_VIEW_ICON = /* @__PURE__ */ jsxs24(
|
|
2095
2191
|
"svg",
|
|
2096
2192
|
{
|
|
2097
2193
|
viewBox: "0 0 24 24",
|
|
@@ -2103,14 +2199,14 @@ var FIT_VIEW_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2103
2199
|
strokeLinecap: "round",
|
|
2104
2200
|
strokeLinejoin: "round",
|
|
2105
2201
|
children: [
|
|
2106
|
-
/* @__PURE__ */
|
|
2107
|
-
/* @__PURE__ */
|
|
2108
|
-
/* @__PURE__ */
|
|
2109
|
-
/* @__PURE__ */
|
|
2202
|
+
/* @__PURE__ */ jsx24("polyline", { points: "15 3 21 3 21 9" }),
|
|
2203
|
+
/* @__PURE__ */ jsx24("polyline", { points: "9 21 3 21 3 15" }),
|
|
2204
|
+
/* @__PURE__ */ jsx24("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
2205
|
+
/* @__PURE__ */ jsx24("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
2110
2206
|
]
|
|
2111
2207
|
}
|
|
2112
2208
|
);
|
|
2113
|
-
var BOXES_ICON = /* @__PURE__ */
|
|
2209
|
+
var BOXES_ICON = /* @__PURE__ */ jsxs24(
|
|
2114
2210
|
"svg",
|
|
2115
2211
|
{
|
|
2116
2212
|
viewBox: "0 0 24 24",
|
|
@@ -2122,22 +2218,22 @@ var BOXES_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2122
2218
|
strokeLinecap: "round",
|
|
2123
2219
|
strokeLinejoin: "round",
|
|
2124
2220
|
children: [
|
|
2125
|
-
/* @__PURE__ */
|
|
2126
|
-
/* @__PURE__ */
|
|
2127
|
-
/* @__PURE__ */
|
|
2128
|
-
/* @__PURE__ */
|
|
2129
|
-
/* @__PURE__ */
|
|
2130
|
-
/* @__PURE__ */
|
|
2131
|
-
/* @__PURE__ */
|
|
2132
|
-
/* @__PURE__ */
|
|
2133
|
-
/* @__PURE__ */
|
|
2134
|
-
/* @__PURE__ */
|
|
2135
|
-
/* @__PURE__ */
|
|
2136
|
-
/* @__PURE__ */
|
|
2221
|
+
/* @__PURE__ */ jsx24("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" }),
|
|
2222
|
+
/* @__PURE__ */ jsx24("path", { d: "m7 16.5-4.74-2.85" }),
|
|
2223
|
+
/* @__PURE__ */ jsx24("path", { d: "m7 16.5 5-3" }),
|
|
2224
|
+
/* @__PURE__ */ jsx24("path", { d: "M7 16.5v5.17" }),
|
|
2225
|
+
/* @__PURE__ */ jsx24("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" }),
|
|
2226
|
+
/* @__PURE__ */ jsx24("path", { d: "m17 16.5-5-3" }),
|
|
2227
|
+
/* @__PURE__ */ jsx24("path", { d: "m17 16.5 4.74-2.85" }),
|
|
2228
|
+
/* @__PURE__ */ jsx24("path", { d: "M17 16.5v5.17" }),
|
|
2229
|
+
/* @__PURE__ */ jsx24("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" }),
|
|
2230
|
+
/* @__PURE__ */ jsx24("path", { d: "M12 8 7.26 5.15" }),
|
|
2231
|
+
/* @__PURE__ */ jsx24("path", { d: "m12 8 4.74-2.85" }),
|
|
2232
|
+
/* @__PURE__ */ jsx24("path", { d: "M12 13.5V8" })
|
|
2137
2233
|
]
|
|
2138
2234
|
}
|
|
2139
2235
|
);
|
|
2140
|
-
var FOLD_ALL_ICON = /* @__PURE__ */
|
|
2236
|
+
var FOLD_ALL_ICON = /* @__PURE__ */ jsxs24(
|
|
2141
2237
|
"svg",
|
|
2142
2238
|
{
|
|
2143
2239
|
viewBox: "0 0 24 24",
|
|
@@ -2149,15 +2245,15 @@ var FOLD_ALL_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2149
2245
|
strokeLinecap: "round",
|
|
2150
2246
|
strokeLinejoin: "round",
|
|
2151
2247
|
children: [
|
|
2152
|
-
/* @__PURE__ */
|
|
2153
|
-
/* @__PURE__ */
|
|
2154
|
-
/* @__PURE__ */
|
|
2155
|
-
/* @__PURE__ */
|
|
2156
|
-
/* @__PURE__ */
|
|
2248
|
+
/* @__PURE__ */ jsx24("rect", { x: "6", y: "6", width: "12", height: "12", rx: "2" }),
|
|
2249
|
+
/* @__PURE__ */ jsx24("polyline", { points: "2 2 6 6 2 6" }),
|
|
2250
|
+
/* @__PURE__ */ jsx24("polyline", { points: "22 2 18 6 22 6" }),
|
|
2251
|
+
/* @__PURE__ */ jsx24("polyline", { points: "2 22 6 18 2 18" }),
|
|
2252
|
+
/* @__PURE__ */ jsx24("polyline", { points: "22 22 18 18 22 18" })
|
|
2157
2253
|
]
|
|
2158
2254
|
}
|
|
2159
2255
|
);
|
|
2160
|
-
var EXPAND_ALL_ICON = /* @__PURE__ */
|
|
2256
|
+
var EXPAND_ALL_ICON = /* @__PURE__ */ jsxs24(
|
|
2161
2257
|
"svg",
|
|
2162
2258
|
{
|
|
2163
2259
|
viewBox: "0 0 24 24",
|
|
@@ -2169,15 +2265,15 @@ var EXPAND_ALL_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2169
2265
|
strokeLinecap: "round",
|
|
2170
2266
|
strokeLinejoin: "round",
|
|
2171
2267
|
children: [
|
|
2172
|
-
/* @__PURE__ */
|
|
2173
|
-
/* @__PURE__ */
|
|
2174
|
-
/* @__PURE__ */
|
|
2175
|
-
/* @__PURE__ */
|
|
2176
|
-
/* @__PURE__ */
|
|
2268
|
+
/* @__PURE__ */ jsx24("rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" }),
|
|
2269
|
+
/* @__PURE__ */ jsx24("polyline", { points: "3 3 7 7 3 7" }),
|
|
2270
|
+
/* @__PURE__ */ jsx24("polyline", { points: "21 3 17 7 21 7" }),
|
|
2271
|
+
/* @__PURE__ */ jsx24("polyline", { points: "3 21 7 17 3 17" }),
|
|
2272
|
+
/* @__PURE__ */ jsx24("polyline", { points: "21 21 17 17 21 17" })
|
|
2177
2273
|
]
|
|
2178
2274
|
}
|
|
2179
2275
|
);
|
|
2180
|
-
var SUN_ICON = /* @__PURE__ */
|
|
2276
|
+
var SUN_ICON = /* @__PURE__ */ jsxs24(
|
|
2181
2277
|
"svg",
|
|
2182
2278
|
{
|
|
2183
2279
|
viewBox: "0 0 24 24",
|
|
@@ -2189,19 +2285,19 @@ var SUN_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2189
2285
|
strokeLinecap: "round",
|
|
2190
2286
|
strokeLinejoin: "round",
|
|
2191
2287
|
children: [
|
|
2192
|
-
/* @__PURE__ */
|
|
2193
|
-
/* @__PURE__ */
|
|
2194
|
-
/* @__PURE__ */
|
|
2195
|
-
/* @__PURE__ */
|
|
2196
|
-
/* @__PURE__ */
|
|
2197
|
-
/* @__PURE__ */
|
|
2198
|
-
/* @__PURE__ */
|
|
2199
|
-
/* @__PURE__ */
|
|
2200
|
-
/* @__PURE__ */
|
|
2288
|
+
/* @__PURE__ */ jsx24("circle", { cx: "12", cy: "12", r: "4" }),
|
|
2289
|
+
/* @__PURE__ */ jsx24("line", { x1: "12", y1: "2", x2: "12", y2: "4" }),
|
|
2290
|
+
/* @__PURE__ */ jsx24("line", { x1: "12", y1: "20", x2: "12", y2: "22" }),
|
|
2291
|
+
/* @__PURE__ */ jsx24("line", { x1: "4.93", y1: "4.93", x2: "6.34", y2: "6.34" }),
|
|
2292
|
+
/* @__PURE__ */ jsx24("line", { x1: "17.66", y1: "17.66", x2: "19.07", y2: "19.07" }),
|
|
2293
|
+
/* @__PURE__ */ jsx24("line", { x1: "2", y1: "12", x2: "4", y2: "12" }),
|
|
2294
|
+
/* @__PURE__ */ jsx24("line", { x1: "20", y1: "12", x2: "22", y2: "12" }),
|
|
2295
|
+
/* @__PURE__ */ jsx24("line", { x1: "4.93", y1: "19.07", x2: "6.34", y2: "17.66" }),
|
|
2296
|
+
/* @__PURE__ */ jsx24("line", { x1: "17.66", y1: "6.34", x2: "19.07", y2: "4.93" })
|
|
2201
2297
|
]
|
|
2202
2298
|
}
|
|
2203
2299
|
);
|
|
2204
|
-
var MOON_ICON = /* @__PURE__ */
|
|
2300
|
+
var MOON_ICON = /* @__PURE__ */ jsx24(
|
|
2205
2301
|
"svg",
|
|
2206
2302
|
{
|
|
2207
2303
|
viewBox: "0 0 24 24",
|
|
@@ -2212,10 +2308,10 @@ var MOON_ICON = /* @__PURE__ */ jsx23(
|
|
|
2212
2308
|
strokeWidth: "2",
|
|
2213
2309
|
strokeLinecap: "round",
|
|
2214
2310
|
strokeLinejoin: "round",
|
|
2215
|
-
children: /* @__PURE__ */
|
|
2311
|
+
children: /* @__PURE__ */ jsx24("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
|
|
2216
2312
|
}
|
|
2217
2313
|
);
|
|
2218
|
-
var MONITOR_ICON = /* @__PURE__ */
|
|
2314
|
+
var MONITOR_ICON = /* @__PURE__ */ jsxs24(
|
|
2219
2315
|
"svg",
|
|
2220
2316
|
{
|
|
2221
2317
|
viewBox: "0 0 24 24",
|
|
@@ -2227,13 +2323,13 @@ var MONITOR_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2227
2323
|
strokeLinecap: "round",
|
|
2228
2324
|
strokeLinejoin: "round",
|
|
2229
2325
|
children: [
|
|
2230
|
-
/* @__PURE__ */
|
|
2231
|
-
/* @__PURE__ */
|
|
2232
|
-
/* @__PURE__ */
|
|
2326
|
+
/* @__PURE__ */ jsx24("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
|
|
2327
|
+
/* @__PURE__ */ jsx24("line", { x1: "8", y1: "21", x2: "16", y2: "21" }),
|
|
2328
|
+
/* @__PURE__ */ jsx24("line", { x1: "12", y1: "17", x2: "12", y2: "21" })
|
|
2233
2329
|
]
|
|
2234
2330
|
}
|
|
2235
2331
|
);
|
|
2236
|
-
var SPINNER_ICON = /* @__PURE__ */
|
|
2332
|
+
var SPINNER_ICON = /* @__PURE__ */ jsx24(
|
|
2237
2333
|
"svg",
|
|
2238
2334
|
{
|
|
2239
2335
|
className: "graph-toolbar-validation-spin",
|
|
@@ -2245,10 +2341,10 @@ var SPINNER_ICON = /* @__PURE__ */ jsx23(
|
|
|
2245
2341
|
strokeWidth: "2",
|
|
2246
2342
|
strokeLinecap: "round",
|
|
2247
2343
|
strokeLinejoin: "round",
|
|
2248
|
-
children: /* @__PURE__ */
|
|
2344
|
+
children: /* @__PURE__ */ jsx24("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
|
|
2249
2345
|
}
|
|
2250
2346
|
);
|
|
2251
|
-
var CHECK_ICON3 = /* @__PURE__ */
|
|
2347
|
+
var CHECK_ICON3 = /* @__PURE__ */ jsx24(
|
|
2252
2348
|
"svg",
|
|
2253
2349
|
{
|
|
2254
2350
|
viewBox: "0 0 24 24",
|
|
@@ -2259,10 +2355,10 @@ var CHECK_ICON3 = /* @__PURE__ */ jsx23(
|
|
|
2259
2355
|
strokeWidth: "2",
|
|
2260
2356
|
strokeLinecap: "round",
|
|
2261
2357
|
strokeLinejoin: "round",
|
|
2262
|
-
children: /* @__PURE__ */
|
|
2358
|
+
children: /* @__PURE__ */ jsx24("polyline", { points: "20 6 9 17 4 12" })
|
|
2263
2359
|
}
|
|
2264
2360
|
);
|
|
2265
|
-
var X_CIRCLE_ICON = /* @__PURE__ */
|
|
2361
|
+
var X_CIRCLE_ICON = /* @__PURE__ */ jsxs24(
|
|
2266
2362
|
"svg",
|
|
2267
2363
|
{
|
|
2268
2364
|
viewBox: "0 0 24 24",
|
|
@@ -2274,13 +2370,13 @@ var X_CIRCLE_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2274
2370
|
strokeLinecap: "round",
|
|
2275
2371
|
strokeLinejoin: "round",
|
|
2276
2372
|
children: [
|
|
2277
|
-
/* @__PURE__ */
|
|
2278
|
-
/* @__PURE__ */
|
|
2279
|
-
/* @__PURE__ */
|
|
2373
|
+
/* @__PURE__ */ jsx24("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2374
|
+
/* @__PURE__ */ jsx24("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
|
|
2375
|
+
/* @__PURE__ */ jsx24("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
|
|
2280
2376
|
]
|
|
2281
2377
|
}
|
|
2282
2378
|
);
|
|
2283
|
-
var ALERT_TRIANGLE_ICON = /* @__PURE__ */
|
|
2379
|
+
var ALERT_TRIANGLE_ICON = /* @__PURE__ */ jsxs24(
|
|
2284
2380
|
"svg",
|
|
2285
2381
|
{
|
|
2286
2382
|
viewBox: "0 0 24 24",
|
|
@@ -2292,13 +2388,13 @@ var ALERT_TRIANGLE_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2292
2388
|
strokeLinecap: "round",
|
|
2293
2389
|
strokeLinejoin: "round",
|
|
2294
2390
|
children: [
|
|
2295
|
-
/* @__PURE__ */
|
|
2296
|
-
/* @__PURE__ */
|
|
2297
|
-
/* @__PURE__ */
|
|
2391
|
+
/* @__PURE__ */ jsx24("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" }),
|
|
2392
|
+
/* @__PURE__ */ jsx24("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
2393
|
+
/* @__PURE__ */ jsx24("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
2298
2394
|
]
|
|
2299
2395
|
}
|
|
2300
2396
|
);
|
|
2301
|
-
var INFO_CIRCLE_ICON = /* @__PURE__ */
|
|
2397
|
+
var INFO_CIRCLE_ICON = /* @__PURE__ */ jsxs24(
|
|
2302
2398
|
"svg",
|
|
2303
2399
|
{
|
|
2304
2400
|
viewBox: "0 0 24 24",
|
|
@@ -2310,9 +2406,9 @@ var INFO_CIRCLE_ICON = /* @__PURE__ */ jsxs23(
|
|
|
2310
2406
|
strokeLinecap: "round",
|
|
2311
2407
|
strokeLinejoin: "round",
|
|
2312
2408
|
children: [
|
|
2313
|
-
/* @__PURE__ */
|
|
2314
|
-
/* @__PURE__ */
|
|
2315
|
-
/* @__PURE__ */
|
|
2409
|
+
/* @__PURE__ */ jsx24("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2410
|
+
/* @__PURE__ */ jsx24("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
2411
|
+
/* @__PURE__ */ jsx24("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
2316
2412
|
]
|
|
2317
2413
|
}
|
|
2318
2414
|
);
|
|
@@ -2386,11 +2482,11 @@ function GraphToolbar({
|
|
|
2386
2482
|
const orientation = toolbarOrientation(position);
|
|
2387
2483
|
const setValidationOpen = onValidationOpenChange != null ? onValidationOpenChange : (() => {
|
|
2388
2484
|
});
|
|
2389
|
-
const setValidationOpenRef =
|
|
2485
|
+
const setValidationOpenRef = React10.useRef(setValidationOpen);
|
|
2390
2486
|
setValidationOpenRef.current = setValidationOpen;
|
|
2391
|
-
const validationRef =
|
|
2392
|
-
const validationPanelId =
|
|
2393
|
-
|
|
2487
|
+
const validationRef = React10.useRef(null);
|
|
2488
|
+
const validationPanelId = React10.useId();
|
|
2489
|
+
React10.useEffect(() => {
|
|
2394
2490
|
if (validationState === void 0) setValidationOpenRef.current(false);
|
|
2395
2491
|
}, [validationState]);
|
|
2396
2492
|
usePopoverDismiss(validationOpen, validationRef, () => setValidationOpenRef.current(false));
|
|
@@ -2403,16 +2499,16 @@ function GraphToolbar({
|
|
|
2403
2499
|
const foldAllSection = onFoldAll || onExpandAll;
|
|
2404
2500
|
const foldAllTitle = foldAllDisabled ? "Fold all controllers (nothing to fold)" : "Fold all controllers";
|
|
2405
2501
|
const expandAllTitle = expandAllDisabled ? "Expand all controllers (nothing to expand)" : "Expand all controllers";
|
|
2406
|
-
return /* @__PURE__ */
|
|
2502
|
+
return /* @__PURE__ */ jsx24(
|
|
2407
2503
|
Panel,
|
|
2408
2504
|
{
|
|
2409
2505
|
position,
|
|
2410
2506
|
className: `graph-toolbar-panel graph-toolbar-panel--${orientation}`,
|
|
2411
2507
|
style: panelStyle,
|
|
2412
|
-
children: /* @__PURE__ */
|
|
2413
|
-
validationState !== void 0 && /* @__PURE__ */
|
|
2414
|
-
/* @__PURE__ */
|
|
2415
|
-
/* @__PURE__ */
|
|
2508
|
+
children: /* @__PURE__ */ jsxs24("div", { className: `graph-toolbar graph-toolbar--${orientation}`, children: [
|
|
2509
|
+
validationState !== void 0 && /* @__PURE__ */ jsxs24(Fragment13, { children: [
|
|
2510
|
+
/* @__PURE__ */ jsxs24("div", { className: "graph-toolbar-validation", ref: validationRef, children: [
|
|
2511
|
+
/* @__PURE__ */ jsxs24(
|
|
2416
2512
|
"button",
|
|
2417
2513
|
{
|
|
2418
2514
|
type: "button",
|
|
@@ -2425,11 +2521,11 @@ function GraphToolbar({
|
|
|
2425
2521
|
"aria-controls": validationPanelId,
|
|
2426
2522
|
children: [
|
|
2427
2523
|
validationIcon(validationState),
|
|
2428
|
-
validationIssues.length > 0 && /* @__PURE__ */
|
|
2524
|
+
validationIssues.length > 0 && /* @__PURE__ */ jsx24("span", { className: "graph-toolbar-validation-badge", children: validationIssues.length > 99 ? "99+" : validationIssues.length })
|
|
2429
2525
|
]
|
|
2430
2526
|
}
|
|
2431
2527
|
),
|
|
2432
|
-
validationOpen && /* @__PURE__ */
|
|
2528
|
+
validationOpen && /* @__PURE__ */ jsx24(
|
|
2433
2529
|
ValidationPanel,
|
|
2434
2530
|
{
|
|
2435
2531
|
id: validationPanelId,
|
|
@@ -2440,10 +2536,10 @@ function GraphToolbar({
|
|
|
2440
2536
|
}
|
|
2441
2537
|
)
|
|
2442
2538
|
] }),
|
|
2443
|
-
/* @__PURE__ */
|
|
2539
|
+
/* @__PURE__ */ jsx24("div", { className: "graph-toolbar-separator" })
|
|
2444
2540
|
] }),
|
|
2445
|
-
styleMenuEnabled && /* @__PURE__ */
|
|
2446
|
-
/* @__PURE__ */
|
|
2541
|
+
styleMenuEnabled && /* @__PURE__ */ jsxs24(Fragment13, { children: [
|
|
2542
|
+
/* @__PURE__ */ jsx24(
|
|
2447
2543
|
StyleMenu,
|
|
2448
2544
|
{
|
|
2449
2545
|
value: graphStyle,
|
|
@@ -2452,9 +2548,9 @@ function GraphToolbar({
|
|
|
2452
2548
|
placement: validationPanelPlacement(position)
|
|
2453
2549
|
}
|
|
2454
2550
|
),
|
|
2455
|
-
/* @__PURE__ */
|
|
2551
|
+
/* @__PURE__ */ jsx24("div", { className: "graph-toolbar-separator" })
|
|
2456
2552
|
] }),
|
|
2457
|
-
onFoldAll && /* @__PURE__ */
|
|
2553
|
+
onFoldAll && /* @__PURE__ */ jsx24(
|
|
2458
2554
|
"button",
|
|
2459
2555
|
{
|
|
2460
2556
|
type: "button",
|
|
@@ -2466,7 +2562,7 @@ function GraphToolbar({
|
|
|
2466
2562
|
children: FOLD_ALL_ICON
|
|
2467
2563
|
}
|
|
2468
2564
|
),
|
|
2469
|
-
onExpandAll && /* @__PURE__ */
|
|
2565
|
+
onExpandAll && /* @__PURE__ */ jsx24(
|
|
2470
2566
|
"button",
|
|
2471
2567
|
{
|
|
2472
2568
|
type: "button",
|
|
@@ -2478,8 +2574,8 @@ function GraphToolbar({
|
|
|
2478
2574
|
children: EXPAND_ALL_ICON
|
|
2479
2575
|
}
|
|
2480
2576
|
),
|
|
2481
|
-
foldAllSection && /* @__PURE__ */
|
|
2482
|
-
onShowControllersChange && /* @__PURE__ */
|
|
2577
|
+
foldAllSection && /* @__PURE__ */ jsx24("div", { className: "graph-toolbar-separator" }),
|
|
2578
|
+
onShowControllersChange && /* @__PURE__ */ jsx24(
|
|
2483
2579
|
"button",
|
|
2484
2580
|
{
|
|
2485
2581
|
type: "button",
|
|
@@ -2490,7 +2586,7 @@ function GraphToolbar({
|
|
|
2490
2586
|
children: BOXES_ICON
|
|
2491
2587
|
}
|
|
2492
2588
|
),
|
|
2493
|
-
/* @__PURE__ */
|
|
2589
|
+
/* @__PURE__ */ jsx24(
|
|
2494
2590
|
"button",
|
|
2495
2591
|
{
|
|
2496
2592
|
type: "button",
|
|
@@ -2501,8 +2597,8 @@ function GraphToolbar({
|
|
|
2501
2597
|
children: isVertical ? ARROW_RIGHT_ICON : ARROW_DOWN_ICON
|
|
2502
2598
|
}
|
|
2503
2599
|
),
|
|
2504
|
-
(onZoomOut || onZoomIn || onFitView) && /* @__PURE__ */
|
|
2505
|
-
onZoomOut && /* @__PURE__ */
|
|
2600
|
+
(onZoomOut || onZoomIn || onFitView) && /* @__PURE__ */ jsx24("div", { className: "graph-toolbar-separator" }),
|
|
2601
|
+
onZoomOut && /* @__PURE__ */ jsx24(
|
|
2506
2602
|
"button",
|
|
2507
2603
|
{
|
|
2508
2604
|
type: "button",
|
|
@@ -2513,7 +2609,7 @@ function GraphToolbar({
|
|
|
2513
2609
|
children: MINUS_ICON
|
|
2514
2610
|
}
|
|
2515
2611
|
),
|
|
2516
|
-
onZoomIn && /* @__PURE__ */
|
|
2612
|
+
onZoomIn && /* @__PURE__ */ jsx24(
|
|
2517
2613
|
"button",
|
|
2518
2614
|
{
|
|
2519
2615
|
type: "button",
|
|
@@ -2524,7 +2620,7 @@ function GraphToolbar({
|
|
|
2524
2620
|
children: PLUS_ICON
|
|
2525
2621
|
}
|
|
2526
2622
|
),
|
|
2527
|
-
onFitView && /* @__PURE__ */
|
|
2623
|
+
onFitView && /* @__PURE__ */ jsx24(
|
|
2528
2624
|
"button",
|
|
2529
2625
|
{
|
|
2530
2626
|
type: "button",
|
|
@@ -2535,9 +2631,9 @@ function GraphToolbar({
|
|
|
2535
2631
|
children: FIT_VIEW_ICON
|
|
2536
2632
|
}
|
|
2537
2633
|
),
|
|
2538
|
-
themeToggleEnabled && /* @__PURE__ */
|
|
2539
|
-
/* @__PURE__ */
|
|
2540
|
-
/* @__PURE__ */
|
|
2634
|
+
themeToggleEnabled && /* @__PURE__ */ jsxs24(Fragment13, { children: [
|
|
2635
|
+
/* @__PURE__ */ jsx24("div", { className: "graph-toolbar-separator" }),
|
|
2636
|
+
/* @__PURE__ */ jsx24(
|
|
2541
2637
|
"button",
|
|
2542
2638
|
{
|
|
2543
2639
|
type: "button",
|
|
@@ -2555,7 +2651,7 @@ function GraphToolbar({
|
|
|
2555
2651
|
}
|
|
2556
2652
|
|
|
2557
2653
|
// src/graph/react/viewer/StillFit.tsx
|
|
2558
|
-
import
|
|
2654
|
+
import React11 from "react";
|
|
2559
2655
|
import { useEdges, useNodes, useNodesInitialized, useReactFlow, useStore } from "@xyflow/react";
|
|
2560
2656
|
|
|
2561
2657
|
// src/graph/react/viewer/stillViewport.ts
|
|
@@ -2602,7 +2698,7 @@ function StillFit({ onHeight }) {
|
|
|
2602
2698
|
const nodes = useNodes();
|
|
2603
2699
|
const edges = useEdges();
|
|
2604
2700
|
const { getNodesBounds, setViewport } = useReactFlow();
|
|
2605
|
-
|
|
2701
|
+
React11.useLayoutEffect(() => {
|
|
2606
2702
|
if (!nodesInitialized || nodes.length === 0) return;
|
|
2607
2703
|
const bounds = stillContentBounds(
|
|
2608
2704
|
getNodesBounds(nodes),
|
|
@@ -2620,7 +2716,7 @@ function StillFit({ onHeight }) {
|
|
|
2620
2716
|
}
|
|
2621
2717
|
|
|
2622
2718
|
// src/graph/react/nodes/NodeValidationBadge.tsx
|
|
2623
|
-
import { jsx as
|
|
2719
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2624
2720
|
function NodeValidationBadge({
|
|
2625
2721
|
validation,
|
|
2626
2722
|
onClick
|
|
@@ -2630,9 +2726,9 @@ function NodeValidationBadge({
|
|
|
2630
2726
|
const className = `node-validation-badge node-validation-badge--${validation.severity}`;
|
|
2631
2727
|
const text = validation.count > 99 ? "99+" : String(validation.count);
|
|
2632
2728
|
if (!onClick) {
|
|
2633
|
-
return /* @__PURE__ */
|
|
2729
|
+
return /* @__PURE__ */ jsx25("span", { className, title: tooltip, "aria-label": label, children: text });
|
|
2634
2730
|
}
|
|
2635
|
-
return /* @__PURE__ */
|
|
2731
|
+
return /* @__PURE__ */ jsx25(
|
|
2636
2732
|
"button",
|
|
2637
2733
|
{
|
|
2638
2734
|
type: "button",
|
|
@@ -2652,7 +2748,7 @@ function validationRingClass(validation) {
|
|
|
2652
2748
|
}
|
|
2653
2749
|
|
|
2654
2750
|
// src/graph/react/nodes/controller/ControllerGroupNode.tsx
|
|
2655
|
-
import { jsx as
|
|
2751
|
+
import { jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2656
2752
|
var CONTROLLER_CONFIG = {
|
|
2657
2753
|
PipeSequence: { badge: "Sequence", icon: "\u2192" },
|
|
2658
2754
|
PipeParallel: { badge: "Parallel", icon: "//" },
|
|
@@ -2675,16 +2771,16 @@ function ControllerGroupNode({ data }) {
|
|
|
2675
2771
|
const isCollapsible = (data.pipeType === "PipeParallel" || data.pipeType === "PipeBatch") && ((_a = data.childCount) != null ? _a : 0) > MAX_VISIBLE_CONTROLLER_CHILDREN;
|
|
2676
2772
|
const hiddenCount = isCollapsible ? ((_b = data.childCount) != null ? _b : 0) - MAX_VISIBLE_CONTROLLER_CHILDREN : 0;
|
|
2677
2773
|
const failingClass = data.failingPipe ? " controller-group-node--failing-pipe" : "";
|
|
2678
|
-
return /* @__PURE__ */
|
|
2774
|
+
return /* @__PURE__ */ jsxs25(
|
|
2679
2775
|
"div",
|
|
2680
2776
|
{
|
|
2681
2777
|
className: `controller-group-node ${modifier}${failingClass}${validationRingClass(data.validation)}`,
|
|
2682
2778
|
children: [
|
|
2683
|
-
/* @__PURE__ */
|
|
2684
|
-
/* @__PURE__ */
|
|
2685
|
-
/* @__PURE__ */
|
|
2686
|
-
data.label && /* @__PURE__ */
|
|
2687
|
-
data.onToggleFold && /* @__PURE__ */
|
|
2779
|
+
/* @__PURE__ */ jsxs25("div", { className: "controller-group-header", children: [
|
|
2780
|
+
/* @__PURE__ */ jsx26("span", { className: "controller-group-icon", children: config.icon }),
|
|
2781
|
+
/* @__PURE__ */ jsx26("span", { className: "controller-group-badge", children: config.badge }),
|
|
2782
|
+
data.label && /* @__PURE__ */ jsx26("span", { className: "controller-group-label", children: data.label }),
|
|
2783
|
+
data.onToggleFold && /* @__PURE__ */ jsx26(
|
|
2688
2784
|
"button",
|
|
2689
2785
|
{
|
|
2690
2786
|
type: "button",
|
|
@@ -2699,9 +2795,9 @@ function ControllerGroupNode({ data }) {
|
|
|
2699
2795
|
children: "\u2921"
|
|
2700
2796
|
}
|
|
2701
2797
|
),
|
|
2702
|
-
data.validation && /* @__PURE__ */
|
|
2798
|
+
data.validation && /* @__PURE__ */ jsx26(NodeValidationBadge, { validation: data.validation, onClick: data.onValidationBadgeClick })
|
|
2703
2799
|
] }),
|
|
2704
|
-
isCollapsible && /* @__PURE__ */
|
|
2800
|
+
isCollapsible && /* @__PURE__ */ jsx26(
|
|
2705
2801
|
"button",
|
|
2706
2802
|
{
|
|
2707
2803
|
className: "controller-group-collapse",
|
|
@@ -2724,7 +2820,7 @@ import { Handle, Position } from "@xyflow/react";
|
|
|
2724
2820
|
|
|
2725
2821
|
// src/graph/react/nodes/pipe/PipeCardBase.tsx
|
|
2726
2822
|
import { useState as useState2 } from "react";
|
|
2727
|
-
import { jsx as
|
|
2823
|
+
import { jsx as jsx27, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2728
2824
|
var PIPE_TYPE_BADGES2 = {
|
|
2729
2825
|
PipeLLM: "LLM",
|
|
2730
2826
|
PipeExtract: "Extract",
|
|
@@ -2786,22 +2882,22 @@ function PipeCardBase({ data, children }) {
|
|
|
2786
2882
|
const failingClass = data.failingPipe ? " pipe-card--failing-pipe" : "";
|
|
2787
2883
|
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";
|
|
2788
2884
|
const ringClass = validationRingClass(data.validation);
|
|
2789
|
-
return /* @__PURE__ */
|
|
2885
|
+
return /* @__PURE__ */ jsxs26(
|
|
2790
2886
|
"div",
|
|
2791
2887
|
{
|
|
2792
2888
|
className: `pipe-card ${dirClass}${controllerClass}${signatureClass}${bindingClass}${staticClass}${failingClass}${ringClass}`,
|
|
2793
2889
|
children: [
|
|
2794
|
-
/* @__PURE__ */
|
|
2795
|
-
/* @__PURE__ */
|
|
2796
|
-
data.docGenFormat && /* @__PURE__ */
|
|
2797
|
-
/* @__PURE__ */
|
|
2798
|
-
!isStatic && /* @__PURE__ */
|
|
2890
|
+
/* @__PURE__ */ jsxs26("div", { className: "pipe-card-header", children: [
|
|
2891
|
+
/* @__PURE__ */ jsx27("span", { className: badgeClass, children: badge }),
|
|
2892
|
+
data.docGenFormat && /* @__PURE__ */ jsx27("span", { className: "pipe-card-format", title: `Document format: ${data.docGenFormat}`, children: data.docGenFormat.toUpperCase() }),
|
|
2893
|
+
/* @__PURE__ */ jsx27("span", { className: "pipe-card-code", title: data.pipeCode, children: data.pipeCode }),
|
|
2894
|
+
!isStatic && /* @__PURE__ */ jsx27(
|
|
2799
2895
|
"span",
|
|
2800
2896
|
{
|
|
2801
2897
|
className: "pipe-card-status",
|
|
2802
2898
|
style: { color: statusConfig.color },
|
|
2803
2899
|
title: data.failingPipe ? "Failed here: the run failed in this pipe" : statusConfig.label,
|
|
2804
|
-
children: /* @__PURE__ */
|
|
2900
|
+
children: /* @__PURE__ */ jsx27(
|
|
2805
2901
|
"span",
|
|
2806
2902
|
{
|
|
2807
2903
|
className: `pipe-card-status-dot ${isRunning ? "pipe-card-status-dot--pulse" : ""}`,
|
|
@@ -2810,7 +2906,7 @@ function PipeCardBase({ data, children }) {
|
|
|
2810
2906
|
)
|
|
2811
2907
|
}
|
|
2812
2908
|
),
|
|
2813
|
-
data.onExpand && /* @__PURE__ */
|
|
2909
|
+
data.onExpand && /* @__PURE__ */ jsx27(
|
|
2814
2910
|
"button",
|
|
2815
2911
|
{
|
|
2816
2912
|
type: "button",
|
|
@@ -2825,32 +2921,32 @@ function PipeCardBase({ data, children }) {
|
|
|
2825
2921
|
children: "\u2922"
|
|
2826
2922
|
}
|
|
2827
2923
|
),
|
|
2828
|
-
data.validation && /* @__PURE__ */
|
|
2924
|
+
data.validation && /* @__PURE__ */ jsx27(NodeValidationBadge, { validation: data.validation, onClick: data.onValidationBadgeClick })
|
|
2829
2925
|
] }),
|
|
2830
|
-
(outcome || batchMultiplicity) && /* @__PURE__ */
|
|
2831
|
-
outcome && /* @__PURE__ */
|
|
2926
|
+
(outcome || batchMultiplicity) && /* @__PURE__ */ jsxs26("div", { className: "pipe-card-annotations", children: [
|
|
2927
|
+
outcome && /* @__PURE__ */ jsxs26("span", { className: "pipe-card-annotation pipe-card-annotation--outcome", children: [
|
|
2832
2928
|
"outcome: ",
|
|
2833
2929
|
outcome
|
|
2834
2930
|
] }),
|
|
2835
|
-
batchMultiplicity && /* @__PURE__ */
|
|
2931
|
+
batchMultiplicity && /* @__PURE__ */ jsx27("span", { className: "pipe-card-annotation pipe-card-annotation--batch", children: batchMultiplicity })
|
|
2836
2932
|
] }),
|
|
2837
|
-
data.description && /* @__PURE__ */
|
|
2838
|
-
data.inputs.length > 0 && /* @__PURE__ */
|
|
2839
|
-
/* @__PURE__ */
|
|
2840
|
-
/* @__PURE__ */
|
|
2841
|
-
visibleInputs.map((input) => /* @__PURE__ */
|
|
2933
|
+
data.description && /* @__PURE__ */ jsx27("span", { className: "pipe-card-description", title: data.description, children: data.description }),
|
|
2934
|
+
data.inputs.length > 0 && /* @__PURE__ */ jsxs26("div", { className: "pipe-card-io", children: [
|
|
2935
|
+
/* @__PURE__ */ jsx27("span", { className: "pipe-card-io-label", children: "INPUTS" }),
|
|
2936
|
+
/* @__PURE__ */ jsxs26("div", { className: "pipe-card-io-pills", children: [
|
|
2937
|
+
visibleInputs.map((input) => /* @__PURE__ */ jsxs26(
|
|
2842
2938
|
"span",
|
|
2843
2939
|
{
|
|
2844
2940
|
className: "pipe-card-io-pill",
|
|
2845
2941
|
title: `${input.name}: ${input.concept}`,
|
|
2846
2942
|
children: [
|
|
2847
|
-
/* @__PURE__ */
|
|
2848
|
-
/* @__PURE__ */
|
|
2943
|
+
/* @__PURE__ */ jsx27("span", { className: "pipe-card-io-pill-name", children: input.name }),
|
|
2944
|
+
/* @__PURE__ */ jsx27("span", { className: "pipe-card-io-pill-concept", children: input.concept })
|
|
2849
2945
|
]
|
|
2850
2946
|
},
|
|
2851
2947
|
input.name
|
|
2852
2948
|
)),
|
|
2853
|
-
hasMany && /* @__PURE__ */
|
|
2949
|
+
hasMany && /* @__PURE__ */ jsx27(
|
|
2854
2950
|
"button",
|
|
2855
2951
|
{
|
|
2856
2952
|
className: "pipe-card-io-more",
|
|
@@ -2863,16 +2959,16 @@ function PipeCardBase({ data, children }) {
|
|
|
2863
2959
|
)
|
|
2864
2960
|
] })
|
|
2865
2961
|
] }),
|
|
2866
|
-
data.outputs.length > 0 && /* @__PURE__ */
|
|
2867
|
-
/* @__PURE__ */
|
|
2868
|
-
/* @__PURE__ */
|
|
2962
|
+
data.outputs.length > 0 && /* @__PURE__ */ jsxs26("div", { className: "pipe-card-io", children: [
|
|
2963
|
+
/* @__PURE__ */ jsx27("span", { className: "pipe-card-io-label", children: "OUTPUT" }),
|
|
2964
|
+
/* @__PURE__ */ jsx27("div", { className: "pipe-card-io-pills", children: data.outputs.map((output) => /* @__PURE__ */ jsxs26(
|
|
2869
2965
|
"span",
|
|
2870
2966
|
{
|
|
2871
2967
|
className: "pipe-card-io-pill",
|
|
2872
2968
|
title: `${output.name}: ${output.concept}`,
|
|
2873
2969
|
children: [
|
|
2874
|
-
/* @__PURE__ */
|
|
2875
|
-
/* @__PURE__ */
|
|
2970
|
+
/* @__PURE__ */ jsx27("span", { className: "pipe-card-io-pill-name", children: output.name }),
|
|
2971
|
+
/* @__PURE__ */ jsx27("span", { className: "pipe-card-io-pill-concept", children: output.concept })
|
|
2876
2972
|
]
|
|
2877
2973
|
},
|
|
2878
2974
|
output.name
|
|
@@ -2907,11 +3003,11 @@ function getPipeCardComponent(pipeType) {
|
|
|
2907
3003
|
}
|
|
2908
3004
|
|
|
2909
3005
|
// src/graph/react/nodes/pipe/PipeCardNode.tsx
|
|
2910
|
-
import { Fragment as Fragment14, jsx as
|
|
3006
|
+
import { Fragment as Fragment14, jsx as jsx28, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2911
3007
|
function PipeCardNode({ data }) {
|
|
2912
3008
|
var _a;
|
|
2913
3009
|
const Card = (_a = getPipeCardComponent(data.pipeType)) != null ? _a : PipeCardBase;
|
|
2914
|
-
return /* @__PURE__ */
|
|
3010
|
+
return /* @__PURE__ */ jsx28(Card, { data });
|
|
2915
3011
|
}
|
|
2916
3012
|
function PipeCardRFNode({
|
|
2917
3013
|
data,
|
|
@@ -2920,16 +3016,16 @@ function PipeCardRFNode({
|
|
|
2920
3016
|
}) {
|
|
2921
3017
|
const payload = data.pipeCardData;
|
|
2922
3018
|
if (!payload) return null;
|
|
2923
|
-
return /* @__PURE__ */
|
|
2924
|
-
/* @__PURE__ */
|
|
2925
|
-
/* @__PURE__ */
|
|
2926
|
-
/* @__PURE__ */
|
|
3019
|
+
return /* @__PURE__ */ jsxs27(Fragment14, { children: [
|
|
3020
|
+
/* @__PURE__ */ jsx28(Handle, { type: "target", position: targetPosition }),
|
|
3021
|
+
/* @__PURE__ */ jsx28(PipeCardNode, { data: payload }),
|
|
3022
|
+
/* @__PURE__ */ jsx28(Handle, { type: "source", position: sourcePosition })
|
|
2927
3023
|
] });
|
|
2928
3024
|
}
|
|
2929
3025
|
|
|
2930
3026
|
// src/graph/react/styles/simple/SimpleNodes.tsx
|
|
2931
3027
|
import { Handle as Handle2, Position as Position2 } from "@xyflow/react";
|
|
2932
|
-
import { Fragment as Fragment15, jsx as
|
|
3028
|
+
import { Fragment as Fragment15, jsx as jsx29, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2933
3029
|
var ICON_PROPS2 = {
|
|
2934
3030
|
viewBox: "0 0 24 24",
|
|
2935
3031
|
fill: "none",
|
|
@@ -2940,90 +3036,90 @@ var ICON_PROPS2 = {
|
|
|
2940
3036
|
"aria-hidden": true
|
|
2941
3037
|
};
|
|
2942
3038
|
function Icon({ size = 13, children }) {
|
|
2943
|
-
return /* @__PURE__ */
|
|
3039
|
+
return /* @__PURE__ */ jsx29("svg", __spreadProps(__spreadValues({}, ICON_PROPS2), { width: size, height: size, children }));
|
|
2944
3040
|
}
|
|
2945
3041
|
var CATEGORY_ICONS = {
|
|
2946
|
-
ai: /* @__PURE__ */
|
|
2947
|
-
/* @__PURE__ */
|
|
2948
|
-
/* @__PURE__ */
|
|
2949
|
-
/* @__PURE__ */
|
|
3042
|
+
ai: /* @__PURE__ */ jsxs28(Fragment15, { children: [
|
|
3043
|
+
/* @__PURE__ */ jsx29("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" }),
|
|
3044
|
+
/* @__PURE__ */ jsx29("path", { d: "M20 3v4" }),
|
|
3045
|
+
/* @__PURE__ */ jsx29("path", { d: "M22 5h-4" })
|
|
2950
3046
|
] }),
|
|
2951
|
-
extract: /* @__PURE__ */
|
|
2952
|
-
/* @__PURE__ */
|
|
2953
|
-
/* @__PURE__ */
|
|
2954
|
-
/* @__PURE__ */
|
|
2955
|
-
/* @__PURE__ */
|
|
2956
|
-
/* @__PURE__ */
|
|
2957
|
-
/* @__PURE__ */
|
|
2958
|
-
/* @__PURE__ */
|
|
3047
|
+
extract: /* @__PURE__ */ jsxs28(Fragment15, { children: [
|
|
3048
|
+
/* @__PURE__ */ jsx29("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
|
|
3049
|
+
/* @__PURE__ */ jsx29("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }),
|
|
3050
|
+
/* @__PURE__ */ jsx29("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }),
|
|
3051
|
+
/* @__PURE__ */ jsx29("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }),
|
|
3052
|
+
/* @__PURE__ */ jsx29("path", { d: "M7 8h8" }),
|
|
3053
|
+
/* @__PURE__ */ jsx29("path", { d: "M7 12h10" }),
|
|
3054
|
+
/* @__PURE__ */ jsx29("path", { d: "M7 16h6" })
|
|
2959
3055
|
] }),
|
|
2960
|
-
image: /* @__PURE__ */
|
|
2961
|
-
/* @__PURE__ */
|
|
2962
|
-
/* @__PURE__ */
|
|
2963
|
-
/* @__PURE__ */
|
|
3056
|
+
image: /* @__PURE__ */ jsxs28(Fragment15, { children: [
|
|
3057
|
+
/* @__PURE__ */ jsx29("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
3058
|
+
/* @__PURE__ */ jsx29("circle", { cx: "9", cy: "9", r: "2" }),
|
|
3059
|
+
/* @__PURE__ */ jsx29("path", { d: "m21 15-3.09-3.09a2 2 0 0 0-2.82 0L6 21" })
|
|
2964
3060
|
] }),
|
|
2965
|
-
search: /* @__PURE__ */
|
|
2966
|
-
/* @__PURE__ */
|
|
2967
|
-
/* @__PURE__ */
|
|
3061
|
+
search: /* @__PURE__ */ jsxs28(Fragment15, { children: [
|
|
3062
|
+
/* @__PURE__ */ jsx29("circle", { cx: "11", cy: "11", r: "8" }),
|
|
3063
|
+
/* @__PURE__ */ jsx29("path", { d: "m21 21-4.3-4.3" })
|
|
2968
3064
|
] }),
|
|
2969
|
-
code: /* @__PURE__ */
|
|
2970
|
-
/* @__PURE__ */
|
|
2971
|
-
/* @__PURE__ */
|
|
3065
|
+
code: /* @__PURE__ */ jsxs28(Fragment15, { children: [
|
|
3066
|
+
/* @__PURE__ */ jsx29("polyline", { points: "16 18 22 12 16 6" }),
|
|
3067
|
+
/* @__PURE__ */ jsx29("polyline", { points: "8 6 2 12 8 18" })
|
|
2972
3068
|
] }),
|
|
2973
|
-
template: /* @__PURE__ */
|
|
2974
|
-
/* @__PURE__ */
|
|
2975
|
-
/* @__PURE__ */
|
|
2976
|
-
/* @__PURE__ */
|
|
2977
|
-
/* @__PURE__ */
|
|
3069
|
+
template: /* @__PURE__ */ jsxs28(Fragment15, { children: [
|
|
3070
|
+
/* @__PURE__ */ jsx29("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
3071
|
+
/* @__PURE__ */ jsx29("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
3072
|
+
/* @__PURE__ */ jsx29("path", { d: "M16 13H8" }),
|
|
3073
|
+
/* @__PURE__ */ jsx29("path", { d: "M16 17H8" })
|
|
2978
3074
|
] }),
|
|
2979
|
-
document: /* @__PURE__ */
|
|
2980
|
-
/* @__PURE__ */
|
|
2981
|
-
/* @__PURE__ */
|
|
2982
|
-
/* @__PURE__ */
|
|
2983
|
-
/* @__PURE__ */
|
|
3075
|
+
document: /* @__PURE__ */ jsxs28(Fragment15, { children: [
|
|
3076
|
+
/* @__PURE__ */ jsx29("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
3077
|
+
/* @__PURE__ */ jsx29("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
3078
|
+
/* @__PURE__ */ jsx29("path", { d: "M12 18v-6" }),
|
|
3079
|
+
/* @__PURE__ */ jsx29("path", { d: "m9 15 3 3 3-3" })
|
|
2984
3080
|
] }),
|
|
2985
|
-
judge: /* @__PURE__ */
|
|
2986
|
-
/* @__PURE__ */
|
|
2987
|
-
/* @__PURE__ */
|
|
2988
|
-
/* @__PURE__ */
|
|
2989
|
-
/* @__PURE__ */
|
|
2990
|
-
/* @__PURE__ */
|
|
3081
|
+
judge: /* @__PURE__ */ jsxs28(Fragment15, { children: [
|
|
3082
|
+
/* @__PURE__ */ jsx29("path", { d: "m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
|
|
3083
|
+
/* @__PURE__ */ jsx29("path", { d: "m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z" }),
|
|
3084
|
+
/* @__PURE__ */ jsx29("path", { d: "M7 21h10" }),
|
|
3085
|
+
/* @__PURE__ */ jsx29("path", { d: "M12 3v18" }),
|
|
3086
|
+
/* @__PURE__ */ jsx29("path", { d: "M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2" })
|
|
2991
3087
|
] }),
|
|
2992
|
-
planned: /* @__PURE__ */
|
|
2993
|
-
steps: /* @__PURE__ */
|
|
2994
|
-
/* @__PURE__ */
|
|
2995
|
-
/* @__PURE__ */
|
|
2996
|
-
/* @__PURE__ */
|
|
3088
|
+
planned: /* @__PURE__ */ jsx29("circle", { cx: "12", cy: "12", r: "9", strokeDasharray: "3 3" }),
|
|
3089
|
+
steps: /* @__PURE__ */ jsxs28(Fragment15, { children: [
|
|
3090
|
+
/* @__PURE__ */ jsx29("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" }),
|
|
3091
|
+
/* @__PURE__ */ jsx29("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }),
|
|
3092
|
+
/* @__PURE__ */ jsx29("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" })
|
|
2997
3093
|
] }),
|
|
2998
|
-
parallel: /* @__PURE__ */
|
|
2999
|
-
/* @__PURE__ */
|
|
3000
|
-
/* @__PURE__ */
|
|
3001
|
-
/* @__PURE__ */
|
|
3002
|
-
/* @__PURE__ */
|
|
3094
|
+
parallel: /* @__PURE__ */ jsxs28(Fragment15, { children: [
|
|
3095
|
+
/* @__PURE__ */ jsx29("path", { d: "M16 3h5v5" }),
|
|
3096
|
+
/* @__PURE__ */ jsx29("path", { d: "M8 3H3v5" }),
|
|
3097
|
+
/* @__PURE__ */ jsx29("path", { d: "M12 22v-8.3a4 4 0 0 0-1.17-2.87L3 3" }),
|
|
3098
|
+
/* @__PURE__ */ jsx29("path", { d: "m15 9 6-6" })
|
|
3003
3099
|
] }),
|
|
3004
|
-
decision: /* @__PURE__ */
|
|
3005
|
-
repeat: /* @__PURE__ */
|
|
3006
|
-
/* @__PURE__ */
|
|
3007
|
-
/* @__PURE__ */
|
|
3008
|
-
/* @__PURE__ */
|
|
3009
|
-
/* @__PURE__ */
|
|
3100
|
+
decision: /* @__PURE__ */ jsx29("path", { d: "M12 2 22 12 12 22 2 12Z" }),
|
|
3101
|
+
repeat: /* @__PURE__ */ jsxs28(Fragment15, { children: [
|
|
3102
|
+
/* @__PURE__ */ jsx29("path", { d: "m17 2 4 4-4 4" }),
|
|
3103
|
+
/* @__PURE__ */ jsx29("path", { d: "M3 11v-1a4 4 0 0 1 4-4h14" }),
|
|
3104
|
+
/* @__PURE__ */ jsx29("path", { d: "m7 22-4-4 4-4" }),
|
|
3105
|
+
/* @__PURE__ */ jsx29("path", { d: "M21 13v1a4 4 0 0 1-4 4H3" })
|
|
3010
3106
|
] }),
|
|
3011
|
-
pick: /* @__PURE__ */
|
|
3012
|
-
/* @__PURE__ */
|
|
3013
|
-
/* @__PURE__ */
|
|
3107
|
+
pick: /* @__PURE__ */ jsxs28(Fragment15, { children: [
|
|
3108
|
+
/* @__PURE__ */ jsx29("polyline", { points: "15 10 20 15 15 20" }),
|
|
3109
|
+
/* @__PURE__ */ jsx29("path", { d: "M4 4v7a4 4 0 0 0 4 4h12" })
|
|
3014
3110
|
] })
|
|
3015
3111
|
};
|
|
3016
|
-
var EXPAND_ICON2 = /* @__PURE__ */
|
|
3017
|
-
/* @__PURE__ */
|
|
3018
|
-
/* @__PURE__ */
|
|
3019
|
-
/* @__PURE__ */
|
|
3020
|
-
/* @__PURE__ */
|
|
3112
|
+
var EXPAND_ICON2 = /* @__PURE__ */ jsxs28(Icon, { size: 12, children: [
|
|
3113
|
+
/* @__PURE__ */ jsx29("polyline", { points: "15 3 21 3 21 9" }),
|
|
3114
|
+
/* @__PURE__ */ jsx29("polyline", { points: "9 21 3 21 3 15" }),
|
|
3115
|
+
/* @__PURE__ */ jsx29("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
3116
|
+
/* @__PURE__ */ jsx29("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
3021
3117
|
] });
|
|
3022
|
-
var COLLAPSE_ICON2 = /* @__PURE__ */
|
|
3023
|
-
/* @__PURE__ */
|
|
3024
|
-
/* @__PURE__ */
|
|
3025
|
-
/* @__PURE__ */
|
|
3026
|
-
/* @__PURE__ */
|
|
3118
|
+
var COLLAPSE_ICON2 = /* @__PURE__ */ jsxs28(Icon, { size: 12, children: [
|
|
3119
|
+
/* @__PURE__ */ jsx29("polyline", { points: "4 14 10 14 10 20" }),
|
|
3120
|
+
/* @__PURE__ */ jsx29("polyline", { points: "20 10 14 10 14 4" }),
|
|
3121
|
+
/* @__PURE__ */ jsx29("line", { x1: "14", y1: "10", x2: "21", y2: "3" }),
|
|
3122
|
+
/* @__PURE__ */ jsx29("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
3027
3123
|
] });
|
|
3028
3124
|
var STATUS_LABELS = {
|
|
3029
3125
|
succeeded: "Done",
|
|
@@ -3034,25 +3130,25 @@ var STATUS_LABELS = {
|
|
|
3034
3130
|
canceled: "Canceled"
|
|
3035
3131
|
};
|
|
3036
3132
|
var STATUS_ICONS = {
|
|
3037
|
-
succeeded: /* @__PURE__ */
|
|
3038
|
-
failed: /* @__PURE__ */
|
|
3039
|
-
/* @__PURE__ */
|
|
3040
|
-
/* @__PURE__ */
|
|
3133
|
+
succeeded: /* @__PURE__ */ jsx29("polyline", { points: "20 6 9 17 4 12" }),
|
|
3134
|
+
failed: /* @__PURE__ */ jsxs28(Fragment15, { children: [
|
|
3135
|
+
/* @__PURE__ */ jsx29("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
3136
|
+
/* @__PURE__ */ jsx29("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
3041
3137
|
] }),
|
|
3042
|
-
running: /* @__PURE__ */
|
|
3043
|
-
scheduled: /* @__PURE__ */
|
|
3044
|
-
skipped: /* @__PURE__ */
|
|
3045
|
-
canceled: /* @__PURE__ */
|
|
3138
|
+
running: /* @__PURE__ */ jsx29("path", { d: "M21 12a9 9 0 1 1-6.22-8.56" }),
|
|
3139
|
+
scheduled: /* @__PURE__ */ jsx29("circle", { cx: "12", cy: "12", r: "8" }),
|
|
3140
|
+
skipped: /* @__PURE__ */ jsx29("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
3141
|
+
canceled: /* @__PURE__ */ jsx29("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
3046
3142
|
};
|
|
3047
3143
|
function StatusMark({ status, graphMode }) {
|
|
3048
3144
|
if (graphMode === "static") return null;
|
|
3049
|
-
return /* @__PURE__ */
|
|
3145
|
+
return /* @__PURE__ */ jsx29(
|
|
3050
3146
|
"span",
|
|
3051
3147
|
{
|
|
3052
3148
|
className: `simple-status simple-status--${status}`,
|
|
3053
3149
|
title: STATUS_LABELS[status],
|
|
3054
3150
|
"aria-label": STATUS_LABELS[status],
|
|
3055
|
-
children: /* @__PURE__ */
|
|
3151
|
+
children: /* @__PURE__ */ jsx29(Icon, { size: 11, children: STATUS_ICONS[status] })
|
|
3056
3152
|
}
|
|
3057
3153
|
);
|
|
3058
3154
|
}
|
|
@@ -3061,17 +3157,17 @@ function Handles({
|
|
|
3061
3157
|
targetPosition = Position2.Left,
|
|
3062
3158
|
children
|
|
3063
3159
|
}) {
|
|
3064
|
-
return /* @__PURE__ */
|
|
3065
|
-
/* @__PURE__ */
|
|
3160
|
+
return /* @__PURE__ */ jsxs28(Fragment15, { children: [
|
|
3161
|
+
/* @__PURE__ */ jsx29(Handle2, { type: "target", position: targetPosition, className: "simple-handle" }),
|
|
3066
3162
|
children,
|
|
3067
|
-
/* @__PURE__ */
|
|
3163
|
+
/* @__PURE__ */ jsx29(Handle2, { type: "source", position: sourcePosition, className: "simple-handle" })
|
|
3068
3164
|
] });
|
|
3069
3165
|
}
|
|
3070
3166
|
function ValidationMark({
|
|
3071
3167
|
validation,
|
|
3072
3168
|
onClick
|
|
3073
3169
|
}) {
|
|
3074
|
-
return validation ? /* @__PURE__ */
|
|
3170
|
+
return validation ? /* @__PURE__ */ jsx29(NodeValidationBadge, { validation, onClick }) : null;
|
|
3075
3171
|
}
|
|
3076
3172
|
function payloadOf(data, kinds) {
|
|
3077
3173
|
const simple = data.simple;
|
|
@@ -3082,20 +3178,20 @@ function SimpleStepNode({ data, sourcePosition, targetPosition }) {
|
|
|
3082
3178
|
const step = payloadOf(data, ["step"]);
|
|
3083
3179
|
if (!step) return null;
|
|
3084
3180
|
const statusClass = step.graphMode !== "static" ? ` simple-step--${step.status}` : "";
|
|
3085
|
-
return /* @__PURE__ */
|
|
3181
|
+
return /* @__PURE__ */ jsx29(Handles, { sourcePosition, targetPosition, children: /* @__PURE__ */ jsxs28(
|
|
3086
3182
|
"div",
|
|
3087
3183
|
{
|
|
3088
3184
|
className: `simple-step simple-step--${step.category}${statusClass}${validationRingClass(data.validation)}`,
|
|
3089
3185
|
children: [
|
|
3090
|
-
/* @__PURE__ */
|
|
3091
|
-
/* @__PURE__ */
|
|
3092
|
-
/* @__PURE__ */
|
|
3186
|
+
/* @__PURE__ */ jsxs28("div", { className: "simple-step-header", children: [
|
|
3187
|
+
/* @__PURE__ */ jsxs28("span", { className: "simple-step-category", children: [
|
|
3188
|
+
/* @__PURE__ */ jsx29(Icon, { children: CATEGORY_ICONS[step.category] }),
|
|
3093
3189
|
STEP_CATEGORY_WORDS[step.category]
|
|
3094
3190
|
] }),
|
|
3095
|
-
/* @__PURE__ */
|
|
3096
|
-
/* @__PURE__ */
|
|
3191
|
+
/* @__PURE__ */ jsx29(StatusMark, { status: step.status, graphMode: step.graphMode }),
|
|
3192
|
+
/* @__PURE__ */ jsx29(ValidationMark, { validation: data.validation, onClick: data.onValidationBadgeClick })
|
|
3097
3193
|
] }),
|
|
3098
|
-
/* @__PURE__ */
|
|
3194
|
+
/* @__PURE__ */ jsx29(
|
|
3099
3195
|
"div",
|
|
3100
3196
|
{
|
|
3101
3197
|
className: "simple-step-title",
|
|
@@ -3108,11 +3204,11 @@ function SimpleStepNode({ data, sourcePosition, targetPosition }) {
|
|
|
3108
3204
|
children: step.title
|
|
3109
3205
|
}
|
|
3110
3206
|
),
|
|
3111
|
-
step.forEach && /* @__PURE__ */
|
|
3112
|
-
/* @__PURE__ */
|
|
3207
|
+
step.forEach && /* @__PURE__ */ jsxs28("span", { className: "simple-step-foreach", children: [
|
|
3208
|
+
/* @__PURE__ */ jsx29(Icon, { size: 11, children: CATEGORY_ICONS.repeat }),
|
|
3113
3209
|
step.forEach
|
|
3114
3210
|
] }),
|
|
3115
|
-
step.innerStepCount !== void 0 && /* @__PURE__ */
|
|
3211
|
+
step.innerStepCount !== void 0 && /* @__PURE__ */ jsxs28(
|
|
3116
3212
|
"button",
|
|
3117
3213
|
{
|
|
3118
3214
|
type: "button",
|
|
@@ -3136,24 +3232,24 @@ function SimpleStepNode({ data, sourcePosition, targetPosition }) {
|
|
|
3136
3232
|
}
|
|
3137
3233
|
var DOCUMENT_PATH = "M1 1 H99 V84 C80 98 62 74 44 86 C28 96 14 96 1 88 Z";
|
|
3138
3234
|
function DocumentShape({ className }) {
|
|
3139
|
-
return /* @__PURE__ */
|
|
3235
|
+
return /* @__PURE__ */ jsx29("svg", { className, viewBox: "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx29("path", { d: DOCUMENT_PATH, vectorEffect: "non-scaling-stroke" }) });
|
|
3140
3236
|
}
|
|
3141
3237
|
function SimpleTerminalNode({ data, sourcePosition, targetPosition }) {
|
|
3142
3238
|
const terminal = payloadOf(data, ["input", "output"]);
|
|
3143
3239
|
if (!terminal) return null;
|
|
3144
|
-
return /* @__PURE__ */
|
|
3240
|
+
return /* @__PURE__ */ jsx29(Handles, { sourcePosition, targetPosition, children: /* @__PURE__ */ jsxs28(
|
|
3145
3241
|
"div",
|
|
3146
3242
|
{
|
|
3147
3243
|
className: `simple-terminal simple-terminal--${terminal.kind}${terminal.isList ? " simple-terminal--list" : ""}`,
|
|
3148
3244
|
children: [
|
|
3149
|
-
terminal.isList && /* @__PURE__ */
|
|
3150
|
-
/* @__PURE__ */
|
|
3151
|
-
/* @__PURE__ */
|
|
3245
|
+
terminal.isList && /* @__PURE__ */ jsxs28(Fragment15, { children: [
|
|
3246
|
+
/* @__PURE__ */ jsx29(DocumentShape, { className: "simple-terminal-shape simple-terminal-shape--back2" }),
|
|
3247
|
+
/* @__PURE__ */ jsx29(DocumentShape, { className: "simple-terminal-shape simple-terminal-shape--back1" })
|
|
3152
3248
|
] }),
|
|
3153
|
-
/* @__PURE__ */
|
|
3154
|
-
/* @__PURE__ */
|
|
3155
|
-
/* @__PURE__ */
|
|
3156
|
-
terminal.subtitle && /* @__PURE__ */
|
|
3249
|
+
/* @__PURE__ */ jsx29(DocumentShape, { className: "simple-terminal-shape" }),
|
|
3250
|
+
/* @__PURE__ */ jsxs28("div", { className: "simple-terminal-text", children: [
|
|
3251
|
+
/* @__PURE__ */ jsx29("span", { className: "simple-terminal-title", title: terminal.title, children: terminal.title }),
|
|
3252
|
+
terminal.subtitle && /* @__PURE__ */ jsx29("span", { className: "simple-terminal-subtitle", children: terminal.subtitle })
|
|
3157
3253
|
] })
|
|
3158
3254
|
]
|
|
3159
3255
|
}
|
|
@@ -3163,35 +3259,35 @@ function SimpleDecisionNode({ data, sourcePosition, targetPosition }) {
|
|
|
3163
3259
|
const decision = payloadOf(data, ["decision"]);
|
|
3164
3260
|
if (!decision) return null;
|
|
3165
3261
|
const statusClass = decision.graphMode !== "static" ? ` simple-decision--${decision.status}` : "";
|
|
3166
|
-
return /* @__PURE__ */
|
|
3167
|
-
/* @__PURE__ */
|
|
3262
|
+
return /* @__PURE__ */ jsx29(Handles, { sourcePosition, targetPosition, children: /* @__PURE__ */ jsxs28("div", { className: `simple-decision${statusClass}${validationRingClass(data.validation)}`, children: [
|
|
3263
|
+
/* @__PURE__ */ jsx29(
|
|
3168
3264
|
"svg",
|
|
3169
3265
|
{
|
|
3170
3266
|
className: "simple-decision-shape",
|
|
3171
3267
|
viewBox: "0 0 100 100",
|
|
3172
3268
|
preserveAspectRatio: "none",
|
|
3173
3269
|
"aria-hidden": "true",
|
|
3174
|
-
children: /* @__PURE__ */
|
|
3270
|
+
children: /* @__PURE__ */ jsx29("path", { d: "M50 1 L99 50 L50 99 L1 50 Z", vectorEffect: "non-scaling-stroke" })
|
|
3175
3271
|
}
|
|
3176
3272
|
),
|
|
3177
|
-
/* @__PURE__ */
|
|
3178
|
-
/* @__PURE__ */
|
|
3179
|
-
/* @__PURE__ */
|
|
3180
|
-
/* @__PURE__ */
|
|
3273
|
+
/* @__PURE__ */ jsx29("div", { className: "simple-decision-text", title: decision.title, children: decision.title }),
|
|
3274
|
+
/* @__PURE__ */ jsxs28("div", { className: "simple-decision-marks", children: [
|
|
3275
|
+
/* @__PURE__ */ jsx29(StatusMark, { status: decision.status, graphMode: decision.graphMode }),
|
|
3276
|
+
/* @__PURE__ */ jsx29(ValidationMark, { validation: data.validation, onClick: data.onValidationBadgeClick })
|
|
3181
3277
|
] })
|
|
3182
3278
|
] }) });
|
|
3183
3279
|
}
|
|
3184
3280
|
function SimpleFrameNode({ data }) {
|
|
3185
3281
|
const frame = payloadOf(data, ["frame"]);
|
|
3186
3282
|
if (!frame) return null;
|
|
3187
|
-
return /* @__PURE__ */
|
|
3188
|
-
/* @__PURE__ */
|
|
3189
|
-
/* @__PURE__ */
|
|
3283
|
+
return /* @__PURE__ */ jsx29("div", { className: `simple-frame${validationRingClass(data.validation)}`, children: /* @__PURE__ */ jsxs28("div", { className: "simple-frame-header", children: [
|
|
3284
|
+
/* @__PURE__ */ jsxs28("span", { className: "simple-frame-title", children: [
|
|
3285
|
+
/* @__PURE__ */ jsx29(Icon, { size: 12, children: CATEGORY_ICONS.repeat }),
|
|
3190
3286
|
frame.title
|
|
3191
3287
|
] }),
|
|
3192
|
-
/* @__PURE__ */
|
|
3193
|
-
/* @__PURE__ */
|
|
3194
|
-
frame.onFold && /* @__PURE__ */
|
|
3288
|
+
/* @__PURE__ */ jsx29(StatusMark, { status: frame.status, graphMode: frame.graphMode }),
|
|
3289
|
+
/* @__PURE__ */ jsx29(ValidationMark, { validation: data.validation, onClick: data.onValidationBadgeClick }),
|
|
3290
|
+
frame.onFold && /* @__PURE__ */ jsx29(
|
|
3195
3291
|
"button",
|
|
3196
3292
|
{
|
|
3197
3293
|
type: "button",
|
|
@@ -3217,7 +3313,7 @@ var simpleNodeTypes = {
|
|
|
3217
3313
|
|
|
3218
3314
|
// src/graph/react/edges/RoutedEdge.tsx
|
|
3219
3315
|
import { BaseEdge, getSmoothStepPath } from "@xyflow/react";
|
|
3220
|
-
import { jsx as
|
|
3316
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
3221
3317
|
function RoutedEdge({
|
|
3222
3318
|
id,
|
|
3223
3319
|
sourceX,
|
|
@@ -3257,7 +3353,7 @@ function RoutedEdge({
|
|
|
3257
3353
|
borderRadius: 8
|
|
3258
3354
|
});
|
|
3259
3355
|
}
|
|
3260
|
-
return /* @__PURE__ */
|
|
3356
|
+
return /* @__PURE__ */ jsx30(
|
|
3261
3357
|
BaseEdge,
|
|
3262
3358
|
{
|
|
3263
3359
|
id,
|
|
@@ -3279,7 +3375,7 @@ function RoutedEdge({
|
|
|
3279
3375
|
}
|
|
3280
3376
|
|
|
3281
3377
|
// src/graph/react/viewer/GraphViewer.tsx
|
|
3282
|
-
import { Fragment as Fragment16, jsx as
|
|
3378
|
+
import { Fragment as Fragment16, jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3283
3379
|
var nodeTypes = __spreadValues(__spreadProps(__spreadValues({}, controllerNodeTypes), {
|
|
3284
3380
|
pipeCard: PipeCardRFNode
|
|
3285
3381
|
}), simpleNodeTypes);
|
|
@@ -3314,7 +3410,7 @@ function StuffNodeDetail({
|
|
|
3314
3410
|
const conceptInfo = stuffData.concept && graphspec ? resolveConceptRef(graphspec, stuffData.concept) : void 0;
|
|
3315
3411
|
const isDryRun = graphSpecMode(graphspec) === GRAPH_SPEC_MODE.DRY;
|
|
3316
3412
|
const descriptors = resultDescriptors(artifacts);
|
|
3317
|
-
const renderData = descriptors ? () => /* @__PURE__ */
|
|
3413
|
+
const renderData = descriptors ? () => /* @__PURE__ */ jsx31(
|
|
3318
3414
|
StuffResultPanel,
|
|
3319
3415
|
__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, descriptors), {
|
|
3320
3416
|
stuff: stuffData
|
|
@@ -3323,7 +3419,7 @@ function StuffNodeDetail({
|
|
|
3323
3419
|
})
|
|
3324
3420
|
) : void 0;
|
|
3325
3421
|
if (conceptInfo) {
|
|
3326
|
-
return /* @__PURE__ */
|
|
3422
|
+
return /* @__PURE__ */ jsx31(
|
|
3327
3423
|
ConceptDetailPanel,
|
|
3328
3424
|
{
|
|
3329
3425
|
concept: conceptInfo,
|
|
@@ -3334,8 +3430,8 @@ function StuffNodeDetail({
|
|
|
3334
3430
|
}
|
|
3335
3431
|
);
|
|
3336
3432
|
}
|
|
3337
|
-
if (isDryRun) return /* @__PURE__ */
|
|
3338
|
-
return /* @__PURE__ */
|
|
3433
|
+
if (isDryRun) return /* @__PURE__ */ jsx31("div", { className: "detail-not-available", children: "Dry run data hidden" });
|
|
3434
|
+
return /* @__PURE__ */ jsx31(Fragment16, { children: (_a = renderData == null ? void 0 : renderData()) != null ? _a : /* @__PURE__ */ jsx31("div", { className: "detail-not-available", children: "No data" }) });
|
|
3339
3435
|
}
|
|
3340
3436
|
function seedFoldedControllers(mode, controllerIds) {
|
|
3341
3437
|
if (mode === FOLD_MODE.FOLDED) return new Set(controllerIds);
|
|
@@ -3400,7 +3496,44 @@ function applyStatusOverrides(nodes, statusMap) {
|
|
|
3400
3496
|
});
|
|
3401
3497
|
});
|
|
3402
3498
|
}
|
|
3499
|
+
function containerClassName(theme, mode, {
|
|
3500
|
+
interactive,
|
|
3501
|
+
failed,
|
|
3502
|
+
relayoutFailed = false
|
|
3503
|
+
}) {
|
|
3504
|
+
return `react-flow-container react-flow-container--theme-${theme} react-flow-container--mode-${mode}` + (interactive ? "" : " react-flow-container--still") + (failed ? " react-flow-container--failed" : "") + (relayoutFailed ? " react-flow-container--relayout-failed" : "");
|
|
3505
|
+
}
|
|
3403
3506
|
function GraphViewer(props) {
|
|
3507
|
+
var _a, _b;
|
|
3508
|
+
return /* @__PURE__ */ jsx31(
|
|
3509
|
+
GraphFailureBoundary,
|
|
3510
|
+
{
|
|
3511
|
+
resetKey: (_b = (_a = props.graph) == null ? void 0 : _a.graphSpec) != null ? _b : null,
|
|
3512
|
+
fallback: (failure) => /* @__PURE__ */ jsx31(GraphViewerFailed, __spreadProps(__spreadValues({}, props), { failure })),
|
|
3513
|
+
children: (fail) => /* @__PURE__ */ jsx31(GraphViewerCanvas, __spreadProps(__spreadValues({}, props), { onFailure: fail }))
|
|
3514
|
+
}
|
|
3515
|
+
);
|
|
3516
|
+
}
|
|
3517
|
+
function GraphViewerFailed({
|
|
3518
|
+
failure,
|
|
3519
|
+
config = DEFAULT_GRAPH_CONFIG,
|
|
3520
|
+
theme: themeProp,
|
|
3521
|
+
systemTheme: systemThemeProp,
|
|
3522
|
+
interactive = true
|
|
3523
|
+
}) {
|
|
3524
|
+
const mode = resolveExternalThemeMode(themeProp, config.theme);
|
|
3525
|
+
const resolvedTheme = resolveActiveTheme(mode, useSystemTheme(systemThemeProp));
|
|
3526
|
+
const palette = __spreadValues(__spreadValues({}, getPaletteForTheme(resolvedTheme)), config.paletteColors);
|
|
3527
|
+
return /* @__PURE__ */ jsx31(
|
|
3528
|
+
"div",
|
|
3529
|
+
{
|
|
3530
|
+
className: containerClassName(resolvedTheme, mode, { interactive, failed: true }),
|
|
3531
|
+
style: palette,
|
|
3532
|
+
children: /* @__PURE__ */ jsx31(GraphErrorState, { failure })
|
|
3533
|
+
}
|
|
3534
|
+
);
|
|
3535
|
+
}
|
|
3536
|
+
function GraphViewerCanvas(props) {
|
|
3404
3537
|
var _a, _b, _c, _d, _e;
|
|
3405
3538
|
const {
|
|
3406
3539
|
graph,
|
|
@@ -3431,23 +3564,35 @@ function GraphViewer(props) {
|
|
|
3431
3564
|
downloads,
|
|
3432
3565
|
validationState,
|
|
3433
3566
|
validationIssues,
|
|
3434
|
-
onValidationIssueClick
|
|
3567
|
+
onValidationIssueClick,
|
|
3568
|
+
onFailure
|
|
3435
3569
|
} = props;
|
|
3436
3570
|
const graphspecProp = (_a = graph == null ? void 0 : graph.graphSpec) != null ? _a : null;
|
|
3437
|
-
const graphspec =
|
|
3438
|
-
() =>
|
|
3571
|
+
const { graphspec, failure: specFailure } = React13.useMemo(
|
|
3572
|
+
() => readGraphSpec(graphspecProp),
|
|
3439
3573
|
[graphspecProp]
|
|
3440
3574
|
);
|
|
3441
|
-
const
|
|
3575
|
+
const graphspecRef = React13.useRef(graphspec);
|
|
3576
|
+
graphspecRef.current = graphspec;
|
|
3577
|
+
const [layoutFailure, setLayoutFailure] = React13.useState(null);
|
|
3578
|
+
const canvasFailure = placeCanvasFailure({
|
|
3579
|
+
specFailure,
|
|
3580
|
+
layoutFailure: layoutFailureFor(layoutFailure, graphspec),
|
|
3581
|
+
interactive
|
|
3582
|
+
});
|
|
3583
|
+
const failed = canvasFailure.inPlace !== null;
|
|
3584
|
+
const onFailureRef = React13.useRef(onFailure);
|
|
3585
|
+
onFailureRef.current = onFailure;
|
|
3586
|
+
const [direction, setDirection] = React13.useState(
|
|
3442
3587
|
() => {
|
|
3443
3588
|
var _a2, _b2;
|
|
3444
3589
|
return (_b2 = (_a2 = initialDirection != null ? initialDirection : config.direction) != null ? _a2 : DEFAULT_GRAPH_CONFIG.direction) != null ? _b2 : GRAPH_DIRECTION.TB;
|
|
3445
3590
|
}
|
|
3446
3591
|
);
|
|
3447
3592
|
const externalMode = resolveExternalThemeMode(themeProp, config.theme);
|
|
3448
|
-
const [mode, setMode] =
|
|
3449
|
-
const prevExternalModeRef =
|
|
3450
|
-
|
|
3593
|
+
const [mode, setMode] = React13.useState(externalMode);
|
|
3594
|
+
const prevExternalModeRef = React13.useRef(externalMode);
|
|
3595
|
+
React13.useEffect(() => {
|
|
3451
3596
|
if (externalMode !== prevExternalModeRef.current) {
|
|
3452
3597
|
prevExternalModeRef.current = externalMode;
|
|
3453
3598
|
setMode(externalMode);
|
|
@@ -3455,13 +3600,13 @@ function GraphViewer(props) {
|
|
|
3455
3600
|
}, [externalMode]);
|
|
3456
3601
|
const systemTheme = useSystemTheme(systemThemeProp);
|
|
3457
3602
|
const resolvedTheme = resolveActiveTheme(mode, systemTheme);
|
|
3458
|
-
const onThemeChangeRef =
|
|
3603
|
+
const onThemeChangeRef = React13.useRef(onThemeChange);
|
|
3459
3604
|
onThemeChangeRef.current = onThemeChange;
|
|
3460
|
-
const prevReportedRef =
|
|
3605
|
+
const prevReportedRef = React13.useRef({
|
|
3461
3606
|
mode,
|
|
3462
3607
|
resolvedTheme
|
|
3463
3608
|
});
|
|
3464
|
-
|
|
3609
|
+
React13.useEffect(() => {
|
|
3465
3610
|
var _a2;
|
|
3466
3611
|
const prev = prevReportedRef.current;
|
|
3467
3612
|
if (prev.mode !== mode || prev.resolvedTheme !== resolvedTheme) {
|
|
@@ -3470,48 +3615,48 @@ function GraphViewer(props) {
|
|
|
3470
3615
|
}
|
|
3471
3616
|
}, [mode, resolvedTheme]);
|
|
3472
3617
|
const externalStyle = resolveGraphStyle(graphStyleProp, config.graphStyle);
|
|
3473
|
-
const [graphStyle, setGraphStyle] =
|
|
3474
|
-
const prevExternalStyleRef =
|
|
3475
|
-
|
|
3618
|
+
const [graphStyle, setGraphStyle] = React13.useState(externalStyle);
|
|
3619
|
+
const prevExternalStyleRef = React13.useRef(externalStyle);
|
|
3620
|
+
React13.useEffect(() => {
|
|
3476
3621
|
if (externalStyle !== prevExternalStyleRef.current) {
|
|
3477
3622
|
prevExternalStyleRef.current = externalStyle;
|
|
3478
3623
|
setGraphStyle(externalStyle);
|
|
3479
3624
|
}
|
|
3480
3625
|
}, [externalStyle]);
|
|
3481
|
-
const onGraphStyleChangeRef =
|
|
3626
|
+
const onGraphStyleChangeRef = React13.useRef(onGraphStyleChange);
|
|
3482
3627
|
onGraphStyleChangeRef.current = onGraphStyleChange;
|
|
3483
|
-
const prevReportedStyleRef =
|
|
3484
|
-
|
|
3628
|
+
const prevReportedStyleRef = React13.useRef(graphStyle);
|
|
3629
|
+
React13.useEffect(() => {
|
|
3485
3630
|
var _a2;
|
|
3486
3631
|
if (prevReportedStyleRef.current !== graphStyle) {
|
|
3487
3632
|
prevReportedStyleRef.current = graphStyle;
|
|
3488
3633
|
(_a2 = onGraphStyleChangeRef.current) == null ? void 0 : _a2.call(onGraphStyleChangeRef, graphStyle);
|
|
3489
3634
|
}
|
|
3490
3635
|
}, [graphStyle]);
|
|
3491
|
-
const graphStyleRef =
|
|
3636
|
+
const graphStyleRef = React13.useRef(graphStyle);
|
|
3492
3637
|
graphStyleRef.current = graphStyle;
|
|
3493
3638
|
const styleCapabilities = GRAPH_STYLES[graphStyle].capabilities;
|
|
3494
3639
|
const effectiveFoldMode = (_c = (_b = initialFoldMode != null ? initialFoldMode : config.foldMode) != null ? _b : DEFAULT_GRAPH_CONFIG.foldMode) != null ? _c : FOLD_MODE.EXPANDED;
|
|
3495
|
-
const [showControllers, setShowControllers] =
|
|
3640
|
+
const [showControllers, setShowControllers] = React13.useState(() => {
|
|
3496
3641
|
var _a2, _b2;
|
|
3497
3642
|
if (effectiveFoldMode === FOLD_MODE.FOLDED) return true;
|
|
3498
3643
|
return (_b2 = (_a2 = initialShowControllers != null ? initialShowControllers : config.showControllers) != null ? _a2 : DEFAULT_GRAPH_CONFIG.showControllers) != null ? _b2 : false;
|
|
3499
3644
|
});
|
|
3500
|
-
const foldModeRef =
|
|
3645
|
+
const foldModeRef = React13.useRef(effectiveFoldMode);
|
|
3501
3646
|
foldModeRef.current = effectiveFoldMode;
|
|
3502
|
-
const containerRef =
|
|
3503
|
-
const [detailSelection, setDetailSelection] =
|
|
3504
|
-
const [conceptOverride, setConceptOverride] =
|
|
3647
|
+
const containerRef = React13.useRef(null);
|
|
3648
|
+
const [detailSelection, setDetailSelection] = React13.useState(null);
|
|
3649
|
+
const [conceptOverride, setConceptOverride] = React13.useState(null);
|
|
3505
3650
|
const {
|
|
3506
3651
|
width: panelWidth,
|
|
3507
3652
|
isDragging: isPanelDragging,
|
|
3508
3653
|
handleMouseDown: onResizeMouseDown
|
|
3509
3654
|
} = useResizable({ defaultWidth: 380, minWidth: 280, maxWidth: 800, containerRef });
|
|
3510
|
-
|
|
3655
|
+
React13.useEffect(() => {
|
|
3511
3656
|
setDetailSelection(null);
|
|
3512
3657
|
setConceptOverride(null);
|
|
3513
3658
|
}, [graphspec]);
|
|
3514
|
-
|
|
3659
|
+
React13.useEffect(() => {
|
|
3515
3660
|
const el = containerRef.current;
|
|
3516
3661
|
if (!el) return;
|
|
3517
3662
|
const themePalette = getPaletteForTheme(resolvedTheme);
|
|
@@ -3526,15 +3671,15 @@ function GraphViewer(props) {
|
|
|
3526
3671
|
}
|
|
3527
3672
|
};
|
|
3528
3673
|
}, [config.paletteColors, resolvedTheme]);
|
|
3529
|
-
const [stillHeight, setStillHeight] =
|
|
3674
|
+
const [stillHeight, setStillHeight] = React13.useState(STILL_PLACEHOLDER_HEIGHT_PX);
|
|
3530
3675
|
const [nodes, setNodes, onNodesChange] = useNodesState([]);
|
|
3531
3676
|
const [edges, setEdges, onEdgesChange] = useEdgesState([]);
|
|
3532
|
-
const reactFlowRef =
|
|
3533
|
-
const initialDataRef =
|
|
3534
|
-
const rawGraphDataRef =
|
|
3535
|
-
const layoutCacheRef =
|
|
3536
|
-
const [expandedControllers, setExpandedControllers] =
|
|
3537
|
-
const toggleCollapse =
|
|
3677
|
+
const reactFlowRef = React13.useRef(null);
|
|
3678
|
+
const initialDataRef = React13.useRef(null);
|
|
3679
|
+
const rawGraphDataRef = React13.useRef(null);
|
|
3680
|
+
const layoutCacheRef = React13.useRef(null);
|
|
3681
|
+
const [expandedControllers, setExpandedControllers] = React13.useState(/* @__PURE__ */ new Set());
|
|
3682
|
+
const toggleCollapse = React13.useCallback((controllerId) => {
|
|
3538
3683
|
setExpandedControllers((prev) => {
|
|
3539
3684
|
const next = new Set(prev);
|
|
3540
3685
|
if (next.has(controllerId)) next.delete(controllerId);
|
|
@@ -3542,17 +3687,17 @@ function GraphViewer(props) {
|
|
|
3542
3687
|
return next;
|
|
3543
3688
|
});
|
|
3544
3689
|
}, []);
|
|
3545
|
-
const [foldedControllers, setFoldedControllers] =
|
|
3546
|
-
const styleDefaultFoldsRef =
|
|
3547
|
-
const readerOpenedRef =
|
|
3548
|
-
const markReaderFolds =
|
|
3690
|
+
const [foldedControllers, setFoldedControllers] = React13.useState(/* @__PURE__ */ new Set());
|
|
3691
|
+
const styleDefaultFoldsRef = React13.useRef(/* @__PURE__ */ new Set());
|
|
3692
|
+
const readerOpenedRef = React13.useRef(/* @__PURE__ */ new Set());
|
|
3693
|
+
const markReaderFolds = React13.useCallback((ids, folded) => {
|
|
3549
3694
|
for (const id of ids) {
|
|
3550
3695
|
styleDefaultFoldsRef.current.delete(id);
|
|
3551
3696
|
if (folded) readerOpenedRef.current.delete(id);
|
|
3552
3697
|
else readerOpenedRef.current.add(id);
|
|
3553
3698
|
}
|
|
3554
3699
|
}, []);
|
|
3555
|
-
const toggleFold =
|
|
3700
|
+
const toggleFold = React13.useCallback(
|
|
3556
3701
|
(controllerId, options) => {
|
|
3557
3702
|
setFoldedControllers((prev) => {
|
|
3558
3703
|
const next = new Set(prev);
|
|
@@ -3570,45 +3715,45 @@ function GraphViewer(props) {
|
|
|
3570
3715
|
[markReaderFolds]
|
|
3571
3716
|
);
|
|
3572
3717
|
const edgeType = config.edgeType || EDGE_TYPE.DEFAULT;
|
|
3573
|
-
const layoutConfig =
|
|
3718
|
+
const layoutConfig = React13.useMemo(
|
|
3574
3719
|
() => ({ nodesep: config.nodesep, ranksep: config.ranksep }),
|
|
3575
3720
|
[config.nodesep, config.ranksep]
|
|
3576
3721
|
);
|
|
3577
|
-
const showControllersRef =
|
|
3722
|
+
const showControllersRef = React13.useRef(showControllers);
|
|
3578
3723
|
showControllersRef.current = showControllers;
|
|
3579
|
-
const directionRef =
|
|
3724
|
+
const directionRef = React13.useRef(direction);
|
|
3580
3725
|
directionRef.current = direction;
|
|
3581
|
-
const layoutConfigRef =
|
|
3726
|
+
const layoutConfigRef = React13.useRef(layoutConfig);
|
|
3582
3727
|
layoutConfigRef.current = layoutConfig;
|
|
3583
|
-
const initialZoomRef =
|
|
3728
|
+
const initialZoomRef = React13.useRef(config.initialZoom);
|
|
3584
3729
|
initialZoomRef.current = config.initialZoom;
|
|
3585
|
-
const panToTopRef =
|
|
3730
|
+
const panToTopRef = React13.useRef(config.panToTop);
|
|
3586
3731
|
panToTopRef.current = config.panToTop;
|
|
3587
|
-
const interactiveRef =
|
|
3732
|
+
const interactiveRef = React13.useRef(interactive);
|
|
3588
3733
|
interactiveRef.current = interactive;
|
|
3589
|
-
const expandedRef =
|
|
3734
|
+
const expandedRef = React13.useRef(expandedControllers);
|
|
3590
3735
|
expandedRef.current = expandedControllers;
|
|
3591
|
-
const toggleCollapseRef =
|
|
3736
|
+
const toggleCollapseRef = React13.useRef(toggleCollapse);
|
|
3592
3737
|
toggleCollapseRef.current = toggleCollapse;
|
|
3593
|
-
const foldedRef =
|
|
3738
|
+
const foldedRef = React13.useRef(foldedControllers);
|
|
3594
3739
|
foldedRef.current = foldedControllers;
|
|
3595
|
-
const toggleFoldRef =
|
|
3740
|
+
const toggleFoldRef = React13.useRef(toggleFold);
|
|
3596
3741
|
toggleFoldRef.current = toggleFold;
|
|
3597
|
-
const isFirstFoldEffect =
|
|
3598
|
-
const prevFoldSizeRef =
|
|
3599
|
-
const skipNextFoldEffectRef =
|
|
3600
|
-
const statusMapRef =
|
|
3742
|
+
const isFirstFoldEffect = React13.useRef(true);
|
|
3743
|
+
const prevFoldSizeRef = React13.useRef(0);
|
|
3744
|
+
const skipNextFoldEffectRef = React13.useRef(false);
|
|
3745
|
+
const statusMapRef = React13.useRef(statusMap);
|
|
3601
3746
|
statusMapRef.current = statusMap;
|
|
3602
|
-
const validationIssuesRef =
|
|
3747
|
+
const validationIssuesRef = React13.useRef(validationIssues);
|
|
3603
3748
|
validationIssuesRef.current = validationIssues;
|
|
3604
|
-
const selectedNodeIdRef =
|
|
3749
|
+
const selectedNodeIdRef = React13.useRef(null);
|
|
3605
3750
|
selectedNodeIdRef.current = (_d = detailSelection == null ? void 0 : detailSelection.nodeId) != null ? _d : null;
|
|
3606
|
-
const [validationOpen, setValidationOpen] =
|
|
3607
|
-
const openValidationPanel =
|
|
3751
|
+
const [validationOpen, setValidationOpen] = React13.useState(false);
|
|
3752
|
+
const openValidationPanel = React13.useCallback(() => setValidationOpen(true), []);
|
|
3608
3753
|
const validationWidgetAvailable = validationState !== void 0 && !hideToolbar && interactive;
|
|
3609
|
-
const validationWidgetAvailableRef =
|
|
3754
|
+
const validationWidgetAvailableRef = React13.useRef(validationWidgetAvailable);
|
|
3610
3755
|
validationWidgetAvailableRef.current = validationWidgetAvailable;
|
|
3611
|
-
const decorateNodes =
|
|
3756
|
+
const decorateNodes = React13.useCallback(
|
|
3612
3757
|
(nodes2) => {
|
|
3613
3758
|
var _a2, _b2, _c2;
|
|
3614
3759
|
const raw = rawGraphDataRef.current;
|
|
@@ -3629,7 +3774,7 @@ function GraphViewer(props) {
|
|
|
3629
3774
|
},
|
|
3630
3775
|
[openValidationPanel]
|
|
3631
3776
|
);
|
|
3632
|
-
const frameLayout =
|
|
3777
|
+
const frameLayout = React13.useCallback(
|
|
3633
3778
|
(style, layout, graphspec2, analysis) => GRAPH_STYLE_PIPELINES[style].frame({
|
|
3634
3779
|
nodes: cloneCachedNodes(layout.nodes),
|
|
3635
3780
|
edges: layout.edges,
|
|
@@ -3648,18 +3793,18 @@ function GraphViewer(props) {
|
|
|
3648
3793
|
const data = initialDataRef.current;
|
|
3649
3794
|
return cache !== null && data !== null && cache.graphspec === data._graphspec && cache.graphStyle === data._graphStyle;
|
|
3650
3795
|
};
|
|
3651
|
-
const nodesRef =
|
|
3796
|
+
const nodesRef = React13.useRef([]);
|
|
3652
3797
|
nodesRef.current = nodes;
|
|
3653
|
-
const onValidationIssueClickRef =
|
|
3798
|
+
const onValidationIssueClickRef = React13.useRef(onValidationIssueClick);
|
|
3654
3799
|
onValidationIssueClickRef.current = onValidationIssueClick;
|
|
3655
|
-
const flashTimeoutRef =
|
|
3656
|
-
|
|
3800
|
+
const flashTimeoutRef = React13.useRef(null);
|
|
3801
|
+
React13.useEffect(
|
|
3657
3802
|
() => () => {
|
|
3658
3803
|
if (flashTimeoutRef.current) clearTimeout(flashTimeoutRef.current);
|
|
3659
3804
|
},
|
|
3660
3805
|
[]
|
|
3661
3806
|
);
|
|
3662
|
-
const handleValidationIssueClick =
|
|
3807
|
+
const handleValidationIssueClick = React13.useCallback(
|
|
3663
3808
|
(index, issue) => {
|
|
3664
3809
|
var _a2, _b2, _c2;
|
|
3665
3810
|
(_a2 = onValidationIssueClickRef.current) == null ? void 0 : _a2.call(onValidationIssueClickRef, index, issue);
|
|
@@ -3702,14 +3847,28 @@ function GraphViewer(props) {
|
|
|
3702
3847
|
},
|
|
3703
3848
|
[setNodes]
|
|
3704
3849
|
);
|
|
3705
|
-
|
|
3706
|
-
|
|
3850
|
+
const drawnSpecRef = React13.useRef(null);
|
|
3851
|
+
const reportLayoutFailure = React13.useCallback(
|
|
3852
|
+
(error, spec, stale) => {
|
|
3853
|
+
console.error("[GraphViewer] ELK layout failed:", error);
|
|
3854
|
+
const route = routeLayoutFailure({ stale, specDrawn: drawnSpecRef.current === spec });
|
|
3855
|
+
if (route === LAYOUT_FAILURE_ROUTE.BOUNDARY) {
|
|
3856
|
+
onFailureRef.current(error);
|
|
3857
|
+
} else if (route === LAYOUT_FAILURE_ROUTE.CANVAS) {
|
|
3858
|
+
layoutCacheRef.current = null;
|
|
3859
|
+
setLayoutFailure({ spec, message: describeGraphFailure(error) });
|
|
3860
|
+
}
|
|
3861
|
+
},
|
|
3862
|
+
[]
|
|
3863
|
+
);
|
|
3864
|
+
React13.useEffect(() => {
|
|
3865
|
+
const data = initialDataRef.current;
|
|
3866
|
+
if (!data) return;
|
|
3707
3867
|
let cancelled = false;
|
|
3868
|
+
const isStale = () => isLayoutStale(cancelled, data._graphspec, graphspecRef.current);
|
|
3708
3869
|
void (async () => {
|
|
3709
3870
|
var _a2;
|
|
3710
3871
|
try {
|
|
3711
|
-
const data = initialDataRef.current;
|
|
3712
|
-
if (!data) return;
|
|
3713
3872
|
const relayouted = await getLayoutedElements(
|
|
3714
3873
|
data.nodes,
|
|
3715
3874
|
data.edges,
|
|
@@ -3718,7 +3877,7 @@ function GraphViewer(props) {
|
|
|
3718
3877
|
data._graphspec,
|
|
3719
3878
|
data._analysis
|
|
3720
3879
|
);
|
|
3721
|
-
if (
|
|
3880
|
+
if (isStale()) return;
|
|
3722
3881
|
layoutCacheRef.current = {
|
|
3723
3882
|
nodes: relayouted.nodes,
|
|
3724
3883
|
edges: relayouted.edges,
|
|
@@ -3734,20 +3893,22 @@ function GraphViewer(props) {
|
|
|
3734
3893
|
);
|
|
3735
3894
|
setNodes(decorateNodes(withControllers.nodes));
|
|
3736
3895
|
setEdges(toAppEdges(withControllers.edges));
|
|
3896
|
+
drawnSpecRef.current = data._graphspec;
|
|
3897
|
+
setLayoutFailure(null);
|
|
3737
3898
|
setTimeout(() => {
|
|
3738
|
-
if (!
|
|
3899
|
+
if (!isStale() && reactFlowRef.current && interactiveRef.current) {
|
|
3739
3900
|
void reactFlowRef.current.fitView({ padding: 0.1 });
|
|
3740
3901
|
}
|
|
3741
3902
|
}, 50);
|
|
3742
3903
|
} catch (err) {
|
|
3743
|
-
|
|
3904
|
+
reportLayoutFailure(err, data._graphspec, isStale());
|
|
3744
3905
|
}
|
|
3745
3906
|
})();
|
|
3746
3907
|
return () => {
|
|
3747
3908
|
cancelled = true;
|
|
3748
3909
|
};
|
|
3749
3910
|
}, [direction, layoutConfig]);
|
|
3750
|
-
|
|
3911
|
+
React13.useEffect(() => {
|
|
3751
3912
|
const cache = layoutCacheRef.current;
|
|
3752
3913
|
const data = initialDataRef.current;
|
|
3753
3914
|
if (!cache || !data || !cacheMatchesData()) return;
|
|
@@ -3755,21 +3916,25 @@ function GraphViewer(props) {
|
|
|
3755
3916
|
setNodes(decorateNodes(withControllers.nodes));
|
|
3756
3917
|
setEdges(toAppEdges(withControllers.edges));
|
|
3757
3918
|
}, [showControllers, expandedControllers, toggleCollapse, toggleFold, decorateNodes]);
|
|
3758
|
-
|
|
3919
|
+
React13.useEffect(() => {
|
|
3759
3920
|
var _a2;
|
|
3760
3921
|
if (!graphspec) {
|
|
3761
3922
|
initialDataRef.current = null;
|
|
3762
3923
|
rawGraphDataRef.current = null;
|
|
3763
3924
|
layoutCacheRef.current = null;
|
|
3925
|
+
drawnSpecRef.current = null;
|
|
3764
3926
|
setNodes([]);
|
|
3765
3927
|
setEdges([]);
|
|
3928
|
+
setLayoutFailure(null);
|
|
3766
3929
|
return;
|
|
3767
3930
|
}
|
|
3768
3931
|
let cancelled = false;
|
|
3932
|
+
const isStale = () => isLayoutStale(cancelled, graphspec, graphspecRef.current);
|
|
3769
3933
|
const sameSpec = ((_a2 = rawGraphDataRef.current) == null ? void 0 : _a2.graphspec) === graphspec;
|
|
3770
3934
|
if (!sameSpec) {
|
|
3771
3935
|
setExpandedControllers(/* @__PURE__ */ new Set());
|
|
3772
3936
|
expandedRef.current = /* @__PURE__ */ new Set();
|
|
3937
|
+
setLayoutFailure(null);
|
|
3773
3938
|
}
|
|
3774
3939
|
const style = graphStyleRef.current;
|
|
3775
3940
|
const pipeline = GRAPH_STYLE_PIPELINES[style];
|
|
@@ -3843,7 +4008,7 @@ function GraphViewer(props) {
|
|
|
3843
4008
|
edges: projected.edges,
|
|
3844
4009
|
controllerPositions: {}
|
|
3845
4010
|
};
|
|
3846
|
-
if (
|
|
4011
|
+
if (isStale()) return;
|
|
3847
4012
|
layoutCacheRef.current = {
|
|
3848
4013
|
nodes: layouted.nodes,
|
|
3849
4014
|
edges: layouted.edges,
|
|
@@ -3854,8 +4019,10 @@ function GraphViewer(props) {
|
|
|
3854
4019
|
const withControllers = frameLayout(style, layouted, graphspec, projected.analysis);
|
|
3855
4020
|
setNodes(decorateNodes(withControllers.nodes));
|
|
3856
4021
|
setEdges(toAppEdges(withControllers.edges));
|
|
4022
|
+
drawnSpecRef.current = graphspec;
|
|
4023
|
+
setLayoutFailure(null);
|
|
3857
4024
|
setTimeout(() => {
|
|
3858
|
-
if (!
|
|
4025
|
+
if (!isStale() && reactFlowRef.current && interactiveRef.current) {
|
|
3859
4026
|
void reactFlowRef.current.fitView({ padding: 0.1 });
|
|
3860
4027
|
if (initialZoomRef.current !== void 0 && initialZoomRef.current !== null) {
|
|
3861
4028
|
void reactFlowRef.current.zoomTo(initialZoomRef.current);
|
|
@@ -3867,14 +4034,14 @@ function GraphViewer(props) {
|
|
|
3867
4034
|
}
|
|
3868
4035
|
}, 100);
|
|
3869
4036
|
} catch (err) {
|
|
3870
|
-
|
|
4037
|
+
reportLayoutFailure(err, graphspec, isStale());
|
|
3871
4038
|
}
|
|
3872
4039
|
})();
|
|
3873
4040
|
return () => {
|
|
3874
4041
|
cancelled = true;
|
|
3875
4042
|
};
|
|
3876
4043
|
}, [graphspec, edgeType, graphStyle]);
|
|
3877
|
-
|
|
4044
|
+
React13.useEffect(() => {
|
|
3878
4045
|
if (isFirstFoldEffect.current) {
|
|
3879
4046
|
isFirstFoldEffect.current = false;
|
|
3880
4047
|
prevFoldSizeRef.current = foldedControllers.size;
|
|
@@ -3894,6 +4061,7 @@ function GraphViewer(props) {
|
|
|
3894
4061
|
const currentAnalysis = raw.analysis;
|
|
3895
4062
|
if (!currentGraphspec || !currentAnalysis) return;
|
|
3896
4063
|
let cancelled = false;
|
|
4064
|
+
const isStale = () => isLayoutStale(cancelled, currentGraphspec, graphspecRef.current);
|
|
3897
4065
|
const style = graphStyleRef.current;
|
|
3898
4066
|
const folded = applyFolds(
|
|
3899
4067
|
{ nodes: raw.nodes, edges: raw.edges },
|
|
@@ -3927,7 +4095,7 @@ function GraphViewer(props) {
|
|
|
3927
4095
|
currentGraphspec,
|
|
3928
4096
|
projected.analysis
|
|
3929
4097
|
);
|
|
3930
|
-
if (
|
|
4098
|
+
if (isStale()) return;
|
|
3931
4099
|
layoutCacheRef.current = {
|
|
3932
4100
|
nodes: layouted.nodes,
|
|
3933
4101
|
edges: layouted.edges,
|
|
@@ -3938,20 +4106,22 @@ function GraphViewer(props) {
|
|
|
3938
4106
|
const withControllers = frameLayout(style, layouted, currentGraphspec, projected.analysis);
|
|
3939
4107
|
setNodes(decorateNodes(withControllers.nodes));
|
|
3940
4108
|
setEdges(toAppEdges(withControllers.edges));
|
|
4109
|
+
drawnSpecRef.current = currentGraphspec;
|
|
4110
|
+
setLayoutFailure(null);
|
|
3941
4111
|
setTimeout(() => {
|
|
3942
|
-
if (!
|
|
4112
|
+
if (!isStale() && reactFlowRef.current && interactiveRef.current) {
|
|
3943
4113
|
void reactFlowRef.current.fitView({ padding: 0.1 });
|
|
3944
4114
|
}
|
|
3945
4115
|
}, 50);
|
|
3946
4116
|
} catch (err) {
|
|
3947
|
-
|
|
4117
|
+
reportLayoutFailure(err, currentGraphspec, isStale());
|
|
3948
4118
|
}
|
|
3949
4119
|
})();
|
|
3950
4120
|
return () => {
|
|
3951
4121
|
cancelled = true;
|
|
3952
4122
|
};
|
|
3953
4123
|
}, [foldedControllers, toggleFold]);
|
|
3954
|
-
|
|
4124
|
+
React13.useEffect(() => {
|
|
3955
4125
|
const cache = layoutCacheRef.current;
|
|
3956
4126
|
const data = initialDataRef.current;
|
|
3957
4127
|
if (!cache || !data || !cacheMatchesData()) return;
|
|
@@ -3959,14 +4129,14 @@ function GraphViewer(props) {
|
|
|
3959
4129
|
setNodes(decorateNodes(withControllers.nodes));
|
|
3960
4130
|
setEdges(toAppEdges(withControllers.edges));
|
|
3961
4131
|
}, [statusMap, decorateNodes]);
|
|
3962
|
-
|
|
4132
|
+
React13.useEffect(() => {
|
|
3963
4133
|
const cache = layoutCacheRef.current;
|
|
3964
4134
|
const data = initialDataRef.current;
|
|
3965
4135
|
if (!cache || !data || !cacheMatchesData()) return;
|
|
3966
4136
|
const withControllers = frameLayout(cache.graphStyle, cache, data._graphspec, data._analysis);
|
|
3967
4137
|
setNodes(decorateNodes(withControllers.nodes));
|
|
3968
4138
|
}, [validationIssues, validationWidgetAvailable, decorateNodes]);
|
|
3969
|
-
const onNodeClick =
|
|
4139
|
+
const onNodeClick = React13.useCallback(
|
|
3970
4140
|
(event, node) => {
|
|
3971
4141
|
const nodeData = node.data;
|
|
3972
4142
|
onNodeSelect == null ? void 0 : onNodeSelect(node.id, nodeData, event);
|
|
@@ -4007,7 +4177,7 @@ function GraphViewer(props) {
|
|
|
4007
4177
|
conceptOverride
|
|
4008
4178
|
]
|
|
4009
4179
|
);
|
|
4010
|
-
const onInit =
|
|
4180
|
+
const onInit = React13.useCallback(
|
|
4011
4181
|
(reactFlowInstance) => {
|
|
4012
4182
|
reactFlowRef.current = reactFlowInstance;
|
|
4013
4183
|
if (onReactFlowInit) {
|
|
@@ -4016,8 +4186,8 @@ function GraphViewer(props) {
|
|
|
4016
4186
|
},
|
|
4017
4187
|
[onReactFlowInit]
|
|
4018
4188
|
);
|
|
4019
|
-
const prevInteractiveRef =
|
|
4020
|
-
|
|
4189
|
+
const prevInteractiveRef = React13.useRef(interactive);
|
|
4190
|
+
React13.useEffect(() => {
|
|
4021
4191
|
if (prevInteractiveRef.current === interactive) return;
|
|
4022
4192
|
prevInteractiveRef.current = interactive;
|
|
4023
4193
|
if (!interactive) {
|
|
@@ -4032,12 +4202,12 @@ function GraphViewer(props) {
|
|
|
4032
4202
|
}, 50);
|
|
4033
4203
|
return () => clearTimeout(timer);
|
|
4034
4204
|
}, [interactive]);
|
|
4035
|
-
const handlePaneClick =
|
|
4205
|
+
const handlePaneClick = React13.useCallback(() => {
|
|
4036
4206
|
setDetailSelection(null);
|
|
4037
4207
|
setConceptOverride(null);
|
|
4038
4208
|
onPaneClick == null ? void 0 : onPaneClick();
|
|
4039
4209
|
}, [onPaneClick]);
|
|
4040
|
-
const handleConceptClick =
|
|
4210
|
+
const handleConceptClick = React13.useCallback(
|
|
4041
4211
|
(conceptCode) => {
|
|
4042
4212
|
if (!graphspec) return;
|
|
4043
4213
|
const info = resolveConceptRef(graphspec, conceptCode);
|
|
@@ -4054,7 +4224,7 @@ function GraphViewer(props) {
|
|
|
4054
4224
|
const rawAnalysis = (_e = rawGraphDataRef.current) == null ? void 0 : _e.analysis;
|
|
4055
4225
|
const allControllerIds = rawAnalysis == null ? void 0 : rawAnalysis.controllerNodeIds;
|
|
4056
4226
|
const foldControlsAvailable = styleCapabilities.foldAll && (!styleCapabilities.controllerFrameToggle || showControllers);
|
|
4057
|
-
const foldAllProps =
|
|
4227
|
+
const foldAllProps = React13.useMemo(() => {
|
|
4058
4228
|
if (!foldControlsAvailable || !allControllerIds || allControllerIds.size === 0) {
|
|
4059
4229
|
return {
|
|
4060
4230
|
onFoldAll: void 0,
|
|
@@ -4076,16 +4246,23 @@ function GraphViewer(props) {
|
|
|
4076
4246
|
expandAllDisabled: foldedControllers.size === 0
|
|
4077
4247
|
};
|
|
4078
4248
|
}, [foldControlsAvailable, allControllerIds, foldedControllers, markReaderFolds]);
|
|
4079
|
-
const styleMenuOptions =
|
|
4080
|
-
|
|
4249
|
+
const styleMenuOptions = React13.useMemo(() => resolveStyleMenu(styleMenu), [styleMenu]);
|
|
4250
|
+
React13.useEffect(() => {
|
|
4251
|
+
if (failed) reactFlowRef.current = null;
|
|
4252
|
+
}, [failed]);
|
|
4253
|
+
return /* @__PURE__ */ jsx31(
|
|
4081
4254
|
"div",
|
|
4082
4255
|
{
|
|
4083
4256
|
ref: containerRef,
|
|
4084
|
-
className:
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4257
|
+
className: containerClassName(resolvedTheme, mode, {
|
|
4258
|
+
interactive,
|
|
4259
|
+
failed,
|
|
4260
|
+
relayoutFailed: canvasFailure.overFlow !== null
|
|
4261
|
+
}),
|
|
4262
|
+
style: interactive || failed ? void 0 : { height: stillHeight },
|
|
4263
|
+
inert: !interactive && !failed,
|
|
4264
|
+
children: canvasFailure.inPlace !== null ? /* @__PURE__ */ jsx31(GraphErrorState, { failure: canvasFailure.inPlace }) : /* @__PURE__ */ jsxs29(Fragment16, { children: [
|
|
4265
|
+
/* @__PURE__ */ jsxs29(
|
|
4089
4266
|
ReactFlow,
|
|
4090
4267
|
__spreadProps(__spreadValues({
|
|
4091
4268
|
nodes,
|
|
@@ -4106,7 +4283,7 @@ function GraphViewer(props) {
|
|
|
4106
4283
|
panActivationKeyCode: null
|
|
4107
4284
|
}, interactive ? {} : STILL_FLOW_PROPS), {
|
|
4108
4285
|
children: [
|
|
4109
|
-
interactive ? /* @__PURE__ */
|
|
4286
|
+
interactive ? /* @__PURE__ */ jsx31(
|
|
4110
4287
|
Background,
|
|
4111
4288
|
{
|
|
4112
4289
|
variant: BackgroundVariant.Dots,
|
|
@@ -4114,8 +4291,18 @@ function GraphViewer(props) {
|
|
|
4114
4291
|
size: 1,
|
|
4115
4292
|
color: "var(--color-bg-dots)"
|
|
4116
4293
|
}
|
|
4117
|
-
) : /* @__PURE__ */
|
|
4118
|
-
|
|
4294
|
+
) : /* @__PURE__ */ jsx31(StillFit, { onHeight: setStillHeight }),
|
|
4295
|
+
canvasFailure.overFlow !== null && // Inside the flow, beneath the toolbar: the toolbar stays on top
|
|
4296
|
+
// and usable, so the reader can change the view back.
|
|
4297
|
+
/* @__PURE__ */ jsx31(
|
|
4298
|
+
GraphRelayoutFailure,
|
|
4299
|
+
{
|
|
4300
|
+
failure: canvasFailure.overFlow,
|
|
4301
|
+
toolbarShown: !hideToolbar,
|
|
4302
|
+
rightOffset: detailOpen ? panelWidth : 0
|
|
4303
|
+
}
|
|
4304
|
+
),
|
|
4305
|
+
interactive && !hideToolbar && /* @__PURE__ */ jsx31(
|
|
4119
4306
|
GraphToolbar,
|
|
4120
4307
|
{
|
|
4121
4308
|
direction,
|
|
@@ -4155,7 +4342,7 @@ function GraphViewer(props) {
|
|
|
4155
4342
|
]
|
|
4156
4343
|
})
|
|
4157
4344
|
),
|
|
4158
|
-
interactive && /* @__PURE__ */
|
|
4345
|
+
interactive && /* @__PURE__ */ jsxs29(
|
|
4159
4346
|
DetailPanel,
|
|
4160
4347
|
{
|
|
4161
4348
|
isOpen: detailOpen,
|
|
@@ -4164,14 +4351,14 @@ function GraphViewer(props) {
|
|
|
4164
4351
|
isDragging: isPanelDragging,
|
|
4165
4352
|
onResizeHandleMouseDown: onResizeMouseDown,
|
|
4166
4353
|
children: [
|
|
4167
|
-
conceptOverride ? /* @__PURE__ */
|
|
4354
|
+
conceptOverride ? /* @__PURE__ */ jsx31(ConceptDetailPanel, { concept: conceptOverride }) : selectedSpecNode && graphspec ? /* @__PURE__ */ jsx31(
|
|
4168
4355
|
PipeDetailPanel,
|
|
4169
4356
|
{
|
|
4170
4357
|
node: selectedSpecNode,
|
|
4171
4358
|
spec: graphspec,
|
|
4172
4359
|
onConceptClick: handleConceptClick
|
|
4173
4360
|
}
|
|
4174
|
-
) : (detailSelection == null ? void 0 : detailSelection.stuffData) ? /* @__PURE__ */
|
|
4361
|
+
) : (detailSelection == null ? void 0 : detailSelection.stuffData) ? /* @__PURE__ */ jsx31(
|
|
4175
4362
|
StuffNodeDetail,
|
|
4176
4363
|
{
|
|
4177
4364
|
nodeId: detailSelection.nodeId,
|
|
@@ -4191,7 +4378,7 @@ function GraphViewer(props) {
|
|
|
4191
4378
|
]
|
|
4192
4379
|
}
|
|
4193
4380
|
)
|
|
4194
|
-
]
|
|
4381
|
+
] })
|
|
4195
4382
|
}
|
|
4196
4383
|
);
|
|
4197
4384
|
}
|