@eventcatalog/visualiser 5.0.0-beta.5 → 5.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-Q3OM5AL5.mjs +1 -0
- package/dist/chunk-Q3OM5AL5.mjs.map +1 -0
- package/dist/chunk-R3QHQ7LF.mjs +427 -0
- package/dist/chunk-R3QHQ7LF.mjs.map +1 -0
- package/dist/chunk-T4UBHBKL.mjs +15698 -0
- package/dist/chunk-T4UBHBKL.mjs.map +1 -0
- package/dist/chunk-Z3G354GF.mjs +464 -0
- package/dist/chunk-Z3G354GF.mjs.map +1 -0
- package/dist/fonts/Excalifont-Regular.woff2 +0 -0
- package/dist/fonts/OFL.txt +93 -0
- package/dist/fonts/README.md +2 -0
- package/dist/index.js +742 -719
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +104 -16003
- package/dist/index.mjs.map +1 -1
- package/dist/layout.mjs +10 -374
- package/dist/layout.mjs.map +1 -1
- package/dist/model.d.mts +18 -0
- package/dist/model.mjs +51 -0
- package/dist/model.mjs.map +1 -0
- package/dist/schema-DKA0EQ_H.d.mts +484 -0
- package/dist/studio-fonts.css +10 -0
- package/dist/studio.css +509 -0
- package/dist/studio.d.mts +1312 -0
- package/dist/studio.mjs +6719 -0
- package/dist/studio.mjs.map +1 -0
- package/dist/styles-core.css +580 -0
- package/dist/styles.css +580 -0
- package/package.json +26 -8
package/dist/index.js
CHANGED
|
@@ -28,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var src_exports = {};
|
|
32
|
+
__export(src_exports, {
|
|
33
33
|
ACTOR: () => ACTOR,
|
|
34
34
|
AGENT: () => AGENT,
|
|
35
35
|
AGENT_TOOL: () => AGENT_TOOL,
|
|
@@ -133,12 +133,12 @@ __export(index_exports, {
|
|
|
133
133
|
normalizeOwners: () => normalizeOwners,
|
|
134
134
|
pauseEdgeAnimations: () => pauseEdgeAnimations
|
|
135
135
|
});
|
|
136
|
-
module.exports = __toCommonJS(
|
|
136
|
+
module.exports = __toCommonJS(src_exports);
|
|
137
137
|
|
|
138
138
|
// src/components/NodeGraph.tsx
|
|
139
|
-
var
|
|
140
|
-
var
|
|
141
|
-
var
|
|
139
|
+
var import_react112 = require("react");
|
|
140
|
+
var import_react_dom2 = require("react-dom");
|
|
141
|
+
var import_react113 = require("@xyflow/react");
|
|
142
142
|
var import_lucide_react43 = require("lucide-react");
|
|
143
143
|
var DropdownMenu3 = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
144
144
|
var import_html_to_image = require("html-to-image");
|
|
@@ -492,7 +492,7 @@ var NoteNode_default = (0, import_react3.memo)(function NoteNodeComponent({
|
|
|
492
492
|
});
|
|
493
493
|
|
|
494
494
|
// src/nodes/service/ServiceNode.tsx
|
|
495
|
-
var
|
|
495
|
+
var import_react11 = require("react");
|
|
496
496
|
var import_lucide_react4 = require("lucide-react");
|
|
497
497
|
|
|
498
498
|
// src/utils/custom-icon.tsx
|
|
@@ -605,19 +605,33 @@ var OwnerIndicator = (0, import_react5.memo)(function OwnerIndicator2({
|
|
|
605
605
|
});
|
|
606
606
|
|
|
607
607
|
// src/nodes/service/ServiceNode.tsx
|
|
608
|
-
var
|
|
608
|
+
var import_react12 = require("@xyflow/react");
|
|
609
|
+
|
|
610
|
+
// src/utils/node-connections.ts
|
|
611
|
+
var import_react6 = require("react");
|
|
612
|
+
var import_react7 = require("@xyflow/react");
|
|
613
|
+
function useNodeHasConnections() {
|
|
614
|
+
const id = (0, import_react7.useNodeId)();
|
|
615
|
+
const keys = (0, import_react6.useMemo)(() => [`${id}-target`, `${id}-source`], [id]);
|
|
616
|
+
const selector = (0, import_react6.useCallback)(
|
|
617
|
+
(state) => (state.connectionLookup.get(keys[0])?.size ? 1 : 0) | (state.connectionLookup.get(keys[1])?.size ? 2 : 0),
|
|
618
|
+
[keys]
|
|
619
|
+
);
|
|
620
|
+
const connected = (0, import_react7.useStore)(selector);
|
|
621
|
+
return { target: (connected & 1) > 0, source: (connected & 2) > 0 };
|
|
622
|
+
}
|
|
609
623
|
|
|
610
624
|
// src/nodes/NotesIndicator.tsx
|
|
611
625
|
var import_lucide_react2 = require("lucide-react");
|
|
612
|
-
var
|
|
626
|
+
var import_react9 = require("react");
|
|
613
627
|
var Dialog = __toESM(require("@radix-ui/react-dialog"));
|
|
614
628
|
|
|
615
629
|
// src/context/PortalContainerContext.tsx
|
|
616
|
-
var
|
|
617
|
-
var PortalContainerContext = (0,
|
|
630
|
+
var import_react8 = require("react");
|
|
631
|
+
var PortalContainerContext = (0, import_react8.createContext)(null);
|
|
618
632
|
var PortalContainerProvider = PortalContainerContext.Provider;
|
|
619
633
|
function usePortalContainer() {
|
|
620
|
-
const container = (0,
|
|
634
|
+
const container = (0, import_react8.useContext)(PortalContainerContext);
|
|
621
635
|
return container ?? void 0;
|
|
622
636
|
}
|
|
623
637
|
|
|
@@ -1160,13 +1174,13 @@ function NotesModal({
|
|
|
1160
1174
|
}
|
|
1161
1175
|
) }) });
|
|
1162
1176
|
}
|
|
1163
|
-
var NotesIndicator = (0,
|
|
1177
|
+
var NotesIndicator = (0, import_react9.memo)(function NotesIndicator2({
|
|
1164
1178
|
notes,
|
|
1165
1179
|
resourceName
|
|
1166
1180
|
}) {
|
|
1167
|
-
const [isHovered, setIsHovered] = (0,
|
|
1168
|
-
const [isModalOpen, setIsModalOpen] = (0,
|
|
1169
|
-
const handleClick = (0,
|
|
1181
|
+
const [isHovered, setIsHovered] = (0, import_react9.useState)(false);
|
|
1182
|
+
const [isModalOpen, setIsModalOpen] = (0, import_react9.useState)(false);
|
|
1183
|
+
const handleClick = (0, import_react9.useCallback)((e) => {
|
|
1170
1184
|
e.stopPropagation();
|
|
1171
1185
|
setIsHovered(false);
|
|
1172
1186
|
setIsModalOpen(true);
|
|
@@ -1354,7 +1368,7 @@ var NotesIndicator = (0, import_react7.memo)(function NotesIndicator2({
|
|
|
1354
1368
|
});
|
|
1355
1369
|
|
|
1356
1370
|
// src/nodes/TruncatedResourceName.tsx
|
|
1357
|
-
var
|
|
1371
|
+
var import_react10 = require("react");
|
|
1358
1372
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1359
1373
|
function TruncatedResourceName({
|
|
1360
1374
|
as: Component = "span",
|
|
@@ -1364,9 +1378,9 @@ function TruncatedResourceName({
|
|
|
1364
1378
|
tooltipBorderColor = "rgb(var(--ec-page-border))",
|
|
1365
1379
|
value
|
|
1366
1380
|
}) {
|
|
1367
|
-
const ref = (0,
|
|
1368
|
-
const [isTruncated, setIsTruncated] = (0,
|
|
1369
|
-
(0,
|
|
1381
|
+
const ref = (0, import_react10.useRef)(null);
|
|
1382
|
+
const [isTruncated, setIsTruncated] = (0, import_react10.useState)(false);
|
|
1383
|
+
(0, import_react10.useEffect)(() => {
|
|
1370
1384
|
const element = ref.current;
|
|
1371
1385
|
if (!element) return;
|
|
1372
1386
|
const updateTruncation = () => {
|
|
@@ -1477,11 +1491,11 @@ function normalizeSpecTypes(specs) {
|
|
|
1477
1491
|
}
|
|
1478
1492
|
return Array.from(types);
|
|
1479
1493
|
}
|
|
1480
|
-
var SpecBadges = (0,
|
|
1494
|
+
var SpecBadges = (0, import_react11.memo)(function SpecBadges2({
|
|
1481
1495
|
specifications,
|
|
1482
1496
|
isDark
|
|
1483
1497
|
}) {
|
|
1484
|
-
const specTypes = (0,
|
|
1498
|
+
const specTypes = (0, import_react11.useMemo)(
|
|
1485
1499
|
() => normalizeSpecTypes(specifications),
|
|
1486
1500
|
[specifications]
|
|
1487
1501
|
);
|
|
@@ -1502,7 +1516,7 @@ var SpecBadges = (0, import_react9.memo)(function SpecBadges2({
|
|
|
1502
1516
|
);
|
|
1503
1517
|
}) });
|
|
1504
1518
|
});
|
|
1505
|
-
var MiniEnvelope = (0,
|
|
1519
|
+
var MiniEnvelope = (0, import_react11.memo)(function MiniEnvelope2({
|
|
1506
1520
|
side,
|
|
1507
1521
|
delay
|
|
1508
1522
|
}) {
|
|
@@ -1543,7 +1557,7 @@ var MiniEnvelope = (0, import_react9.memo)(function MiniEnvelope2({
|
|
|
1543
1557
|
}
|
|
1544
1558
|
);
|
|
1545
1559
|
});
|
|
1546
|
-
var ServiceMessageFlow = (0,
|
|
1560
|
+
var ServiceMessageFlow = (0, import_react11.memo)(function ServiceMessageFlow2({
|
|
1547
1561
|
side
|
|
1548
1562
|
}) {
|
|
1549
1563
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
@@ -1568,7 +1582,7 @@ var ServiceMessageFlow = (0, import_react9.memo)(function ServiceMessageFlow2({
|
|
|
1568
1582
|
}
|
|
1569
1583
|
);
|
|
1570
1584
|
});
|
|
1571
|
-
var GlowHandle = (0,
|
|
1585
|
+
var GlowHandle = (0, import_react11.memo)(function GlowHandle2({
|
|
1572
1586
|
side,
|
|
1573
1587
|
external
|
|
1574
1588
|
}) {
|
|
@@ -1686,18 +1700,18 @@ function PostItService(props) {
|
|
|
1686
1700
|
children: [
|
|
1687
1701
|
props.data.isFocused && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FocusedResourceIndicator, {}),
|
|
1688
1702
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1689
|
-
|
|
1703
|
+
import_react12.Handle,
|
|
1690
1704
|
{
|
|
1691
1705
|
type: "target",
|
|
1692
|
-
position:
|
|
1706
|
+
position: import_react12.Position.Left,
|
|
1693
1707
|
style: HIDDEN_HANDLE_STYLE
|
|
1694
1708
|
}
|
|
1695
1709
|
),
|
|
1696
1710
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1697
|
-
|
|
1711
|
+
import_react12.Handle,
|
|
1698
1712
|
{
|
|
1699
1713
|
type: "source",
|
|
1700
|
-
position:
|
|
1714
|
+
position: import_react12.Position.Right,
|
|
1701
1715
|
style: HIDDEN_HANDLE_STYLE
|
|
1702
1716
|
}
|
|
1703
1717
|
),
|
|
@@ -1798,12 +1812,11 @@ function DefaultService(props) {
|
|
|
1798
1812
|
} = props.data.service;
|
|
1799
1813
|
const mode = props.data.mode || "simple";
|
|
1800
1814
|
const customIcon = isIconPath(styles?.icon) ? styles.icon : void 0;
|
|
1801
|
-
const owners = (0,
|
|
1815
|
+
const owners = (0, import_react11.useMemo)(
|
|
1802
1816
|
() => normalizeOwners(props.data.service.owners),
|
|
1803
1817
|
[props.data.service.owners]
|
|
1804
1818
|
);
|
|
1805
|
-
const
|
|
1806
|
-
const sourceConnections = (0, import_react10.useNodeConnections)({ handleType: "source" });
|
|
1819
|
+
const connected = useNodeHasConnections();
|
|
1807
1820
|
const isDark = useDarkMode();
|
|
1808
1821
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
1809
1822
|
const p = externalSystem ? DEFAULT_EXTERNAL : DEFAULT_SERVICE;
|
|
@@ -1824,24 +1837,24 @@ function DefaultService(props) {
|
|
|
1824
1837
|
children: [
|
|
1825
1838
|
props.data.isFocused && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FocusedResourceIndicator, {}),
|
|
1826
1839
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1827
|
-
|
|
1840
|
+
import_react12.Handle,
|
|
1828
1841
|
{
|
|
1829
1842
|
type: "target",
|
|
1830
|
-
position:
|
|
1843
|
+
position: import_react12.Position.Left,
|
|
1831
1844
|
style: HIDDEN_HANDLE_STYLE
|
|
1832
1845
|
}
|
|
1833
1846
|
),
|
|
1834
1847
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1835
|
-
|
|
1848
|
+
import_react12.Handle,
|
|
1836
1849
|
{
|
|
1837
1850
|
type: "source",
|
|
1838
|
-
position:
|
|
1851
|
+
position: import_react12.Position.Right,
|
|
1839
1852
|
style: HIDDEN_HANDLE_STYLE
|
|
1840
1853
|
}
|
|
1841
1854
|
),
|
|
1842
1855
|
notes && notes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NotesIndicator, { notes, resourceName: name }),
|
|
1843
|
-
|
|
1844
|
-
|
|
1856
|
+
connected.target && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(GlowHandle, { side: "left", external: externalSystem }),
|
|
1857
|
+
connected.source && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(GlowHandle, { side: "right", external: externalSystem }),
|
|
1845
1858
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "absolute -top-2.5 left-2.5 flex items-center gap-1.5 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1846
1859
|
"span",
|
|
1847
1860
|
{
|
|
@@ -1910,7 +1923,7 @@ function DefaultService(props) {
|
|
|
1910
1923
|
}
|
|
1911
1924
|
);
|
|
1912
1925
|
}
|
|
1913
|
-
var ServiceNode_default = (0,
|
|
1926
|
+
var ServiceNode_default = (0, import_react11.memo)(function Service(props) {
|
|
1914
1927
|
const nodeStyle = props?.data?.style;
|
|
1915
1928
|
if (nodeStyle === "post-it") {
|
|
1916
1929
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PostItService, { ...props });
|
|
@@ -1919,9 +1932,9 @@ var ServiceNode_default = (0, import_react9.memo)(function Service(props) {
|
|
|
1919
1932
|
});
|
|
1920
1933
|
|
|
1921
1934
|
// src/nodes/Agent.tsx
|
|
1922
|
-
var
|
|
1935
|
+
var import_react13 = require("react");
|
|
1923
1936
|
var import_lucide_react5 = require("lucide-react");
|
|
1924
|
-
var
|
|
1937
|
+
var import_react14 = require("@xyflow/react");
|
|
1925
1938
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1926
1939
|
function classNames3(...classes) {
|
|
1927
1940
|
return classes.filter(Boolean).join(" ");
|
|
@@ -1968,9 +1981,8 @@ function Agent(props) {
|
|
|
1968
1981
|
} = props.data.agent;
|
|
1969
1982
|
const mode = props.data.mode || "simple";
|
|
1970
1983
|
const customIcon = isIconPath(styles?.icon) ? styles.icon : void 0;
|
|
1971
|
-
const normalizedOwners = (0,
|
|
1972
|
-
const
|
|
1973
|
-
const sourceConnections = (0, import_react12.useNodeConnections)({ handleType: "source" });
|
|
1984
|
+
const normalizedOwners = (0, import_react13.useMemo)(() => normalizeOwners(owners), [owners]);
|
|
1985
|
+
const connected = useNodeHasConnections();
|
|
1974
1986
|
const isDark = useDarkMode();
|
|
1975
1987
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
1976
1988
|
const draftStripe = isDark ? "rgba(14,165,233,0.25)" : "rgba(14,165,233,0.15)";
|
|
@@ -1991,24 +2003,24 @@ function Agent(props) {
|
|
|
1991
2003
|
},
|
|
1992
2004
|
children: [
|
|
1993
2005
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1994
|
-
|
|
2006
|
+
import_react14.Handle,
|
|
1995
2007
|
{
|
|
1996
2008
|
type: "target",
|
|
1997
|
-
position:
|
|
2009
|
+
position: import_react14.Position.Left,
|
|
1998
2010
|
style: HIDDEN_HANDLE_STYLE
|
|
1999
2011
|
}
|
|
2000
2012
|
),
|
|
2001
2013
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2002
|
-
|
|
2014
|
+
import_react14.Handle,
|
|
2003
2015
|
{
|
|
2004
2016
|
type: "source",
|
|
2005
|
-
position:
|
|
2017
|
+
position: import_react14.Position.Right,
|
|
2006
2018
|
style: HIDDEN_HANDLE_STYLE
|
|
2007
2019
|
}
|
|
2008
2020
|
),
|
|
2009
2021
|
notes && notes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(NotesIndicator, { notes, resourceName: name }),
|
|
2010
|
-
|
|
2011
|
-
|
|
2022
|
+
connected.target && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(GlowHandle3, { side: "left" }),
|
|
2023
|
+
connected.source && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(GlowHandle3, { side: "right" }),
|
|
2012
2024
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "absolute -top-2.5 left-2.5 flex items-center gap-1.5 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2013
2025
|
"span",
|
|
2014
2026
|
{
|
|
@@ -2089,12 +2101,12 @@ function Agent(props) {
|
|
|
2089
2101
|
}
|
|
2090
2102
|
);
|
|
2091
2103
|
}
|
|
2092
|
-
var Agent_default = (0,
|
|
2104
|
+
var Agent_default = (0, import_react13.memo)(Agent);
|
|
2093
2105
|
|
|
2094
2106
|
// src/nodes/AgentTool.tsx
|
|
2095
|
-
var
|
|
2107
|
+
var import_react15 = require("react");
|
|
2096
2108
|
var import_lucide_react6 = require("lucide-react");
|
|
2097
|
-
var
|
|
2109
|
+
var import_react16 = require("@xyflow/react");
|
|
2098
2110
|
|
|
2099
2111
|
// src/icons/protocols/mcp-dark.svg?raw
|
|
2100
2112
|
var mcp_dark_default = '<svg fill="#ffffff" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>ModelContextProtocol</title><path d="M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z"/><path d="M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z"/></svg>';
|
|
@@ -2151,8 +2163,7 @@ function GlowHandle4({ side }) {
|
|
|
2151
2163
|
function AgentTool(props) {
|
|
2152
2164
|
const { name, type, icon, url, description } = props.data.agentTool;
|
|
2153
2165
|
const customIcon = isIconPath(icon) ? icon : void 0;
|
|
2154
|
-
const
|
|
2155
|
-
const sourceConnections = (0, import_react14.useNodeConnections)({ handleType: "source" });
|
|
2166
|
+
const connected = useNodeHasConnections();
|
|
2156
2167
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2157
2168
|
"div",
|
|
2158
2169
|
{
|
|
@@ -2166,23 +2177,23 @@ function AgentTool(props) {
|
|
|
2166
2177
|
},
|
|
2167
2178
|
children: [
|
|
2168
2179
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2169
|
-
|
|
2180
|
+
import_react16.Handle,
|
|
2170
2181
|
{
|
|
2171
2182
|
type: "target",
|
|
2172
|
-
position:
|
|
2183
|
+
position: import_react16.Position.Left,
|
|
2173
2184
|
style: HIDDEN_HANDLE_STYLE
|
|
2174
2185
|
}
|
|
2175
2186
|
),
|
|
2176
2187
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2177
|
-
|
|
2188
|
+
import_react16.Handle,
|
|
2178
2189
|
{
|
|
2179
2190
|
type: "source",
|
|
2180
|
-
position:
|
|
2191
|
+
position: import_react16.Position.Right,
|
|
2181
2192
|
style: HIDDEN_HANDLE_STYLE
|
|
2182
2193
|
}
|
|
2183
2194
|
),
|
|
2184
|
-
|
|
2185
|
-
|
|
2195
|
+
connected.target && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(GlowHandle4, { side: "left" }),
|
|
2196
|
+
connected.source && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(GlowHandle4, { side: "right" }),
|
|
2186
2197
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "absolute -top-2.5 left-2.5 flex items-center gap-1.5 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "inline-flex items-center gap-1 text-[7px] font-bold uppercase tracking-widest text-white px-1.5 py-0.5 rounded shadow-sm bg-violet-500", children: [
|
|
2187
2198
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react6.Wrench, { className: "w-2.5 h-2.5", strokeWidth: 2.5 }),
|
|
2188
2199
|
"Tool"
|
|
@@ -2225,15 +2236,15 @@ function AgentTool(props) {
|
|
|
2225
2236
|
}
|
|
2226
2237
|
);
|
|
2227
2238
|
}
|
|
2228
|
-
var AgentTool_default = (0,
|
|
2239
|
+
var AgentTool_default = (0, import_react15.memo)(AgentTool);
|
|
2229
2240
|
|
|
2230
2241
|
// src/nodes/event/EventNode.tsx
|
|
2231
|
-
var
|
|
2242
|
+
var import_react18 = require("react");
|
|
2232
2243
|
var import_lucide_react7 = require("lucide-react");
|
|
2233
|
-
var
|
|
2244
|
+
var import_react19 = require("@xyflow/react");
|
|
2234
2245
|
|
|
2235
2246
|
// src/nodes/ApiInfo.tsx
|
|
2236
|
-
var
|
|
2247
|
+
var import_react17 = require("react");
|
|
2237
2248
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2238
2249
|
var METHOD_COLORS = {
|
|
2239
2250
|
GET: { bg: "rgba(34,197,94,0.15)", text: "#22c55e" },
|
|
@@ -2254,7 +2265,7 @@ function getStatusColor(code) {
|
|
|
2254
2265
|
const prefix = String(code)[0];
|
|
2255
2266
|
return STATUS_COLORS[prefix] || STATUS_COLORS["2"];
|
|
2256
2267
|
}
|
|
2257
|
-
var MethodBadge = (0,
|
|
2268
|
+
var MethodBadge = (0, import_react17.memo)(function MethodBadge2({
|
|
2258
2269
|
method
|
|
2259
2270
|
}) {
|
|
2260
2271
|
const upper = method.toUpperCase();
|
|
@@ -2268,7 +2279,7 @@ var MethodBadge = (0, import_react15.memo)(function MethodBadge2({
|
|
|
2268
2279
|
}
|
|
2269
2280
|
);
|
|
2270
2281
|
});
|
|
2271
|
-
var StatusCodes = (0,
|
|
2282
|
+
var StatusCodes = (0, import_react17.memo)(function StatusCodes2({
|
|
2272
2283
|
codes
|
|
2273
2284
|
}) {
|
|
2274
2285
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex items-center gap-1 flex-wrap mt-1.5", children: codes.map((code) => {
|
|
@@ -2284,7 +2295,7 @@ var StatusCodes = (0, import_react15.memo)(function StatusCodes2({
|
|
|
2284
2295
|
);
|
|
2285
2296
|
}) });
|
|
2286
2297
|
});
|
|
2287
|
-
var ApiPath = (0,
|
|
2298
|
+
var ApiPath = (0, import_react17.memo)(function ApiPath2({ path }) {
|
|
2288
2299
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2289
2300
|
"span",
|
|
2290
2301
|
{
|
|
@@ -2297,7 +2308,7 @@ var ApiPath = (0, import_react15.memo)(function ApiPath2({ path }) {
|
|
|
2297
2308
|
|
|
2298
2309
|
// src/nodes/event/EventNode.tsx
|
|
2299
2310
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2300
|
-
var GlowHandle5 = (0,
|
|
2311
|
+
var GlowHandle5 = (0, import_react18.memo)(function GlowHandle6({
|
|
2301
2312
|
side
|
|
2302
2313
|
}) {
|
|
2303
2314
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
@@ -2338,18 +2349,18 @@ function PostItEvent(props) {
|
|
|
2338
2349
|
children: [
|
|
2339
2350
|
props.data.isFocused && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FocusedResourceIndicator, {}),
|
|
2340
2351
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2341
|
-
|
|
2352
|
+
import_react19.Handle,
|
|
2342
2353
|
{
|
|
2343
2354
|
type: "target",
|
|
2344
|
-
position:
|
|
2355
|
+
position: import_react19.Position.Left,
|
|
2345
2356
|
style: HIDDEN_HANDLE_STYLE
|
|
2346
2357
|
}
|
|
2347
2358
|
),
|
|
2348
2359
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2349
|
-
|
|
2360
|
+
import_react19.Handle,
|
|
2350
2361
|
{
|
|
2351
2362
|
type: "source",
|
|
2352
|
-
position:
|
|
2363
|
+
position: import_react19.Position.Right,
|
|
2353
2364
|
style: HIDDEN_HANDLE_STYLE
|
|
2354
2365
|
}
|
|
2355
2366
|
),
|
|
@@ -2452,12 +2463,11 @@ function DefaultEvent(props) {
|
|
|
2452
2463
|
const mode = props?.data?.mode || "simple";
|
|
2453
2464
|
const hasApiInfo = !!(method || path);
|
|
2454
2465
|
const customIcon = isIconPath(styles?.icon) ? styles.icon : void 0;
|
|
2455
|
-
const owners = (0,
|
|
2466
|
+
const owners = (0, import_react18.useMemo)(
|
|
2456
2467
|
() => normalizeOwners(props?.data?.message?.owners),
|
|
2457
2468
|
[props?.data?.message?.owners]
|
|
2458
2469
|
);
|
|
2459
|
-
const
|
|
2460
|
-
const sourceConnections = (0, import_react17.useNodeConnections)({ handleType: "source" });
|
|
2470
|
+
const connected = useNodeHasConnections();
|
|
2461
2471
|
const isDark = useDarkMode();
|
|
2462
2472
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
2463
2473
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
@@ -2475,23 +2485,23 @@ function DefaultEvent(props) {
|
|
|
2475
2485
|
children: [
|
|
2476
2486
|
props.data.isFocused && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FocusedResourceIndicator, {}),
|
|
2477
2487
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2478
|
-
|
|
2488
|
+
import_react19.Handle,
|
|
2479
2489
|
{
|
|
2480
2490
|
type: "target",
|
|
2481
|
-
position:
|
|
2491
|
+
position: import_react19.Position.Left,
|
|
2482
2492
|
style: HIDDEN_HANDLE_STYLE
|
|
2483
2493
|
}
|
|
2484
2494
|
),
|
|
2485
2495
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2486
|
-
|
|
2496
|
+
import_react19.Handle,
|
|
2487
2497
|
{
|
|
2488
2498
|
type: "source",
|
|
2489
|
-
position:
|
|
2499
|
+
position: import_react19.Position.Right,
|
|
2490
2500
|
style: HIDDEN_HANDLE_STYLE
|
|
2491
2501
|
}
|
|
2492
2502
|
),
|
|
2493
|
-
|
|
2494
|
-
|
|
2503
|
+
connected.target && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(GlowHandle5, { side: "left" }),
|
|
2504
|
+
connected.source && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(GlowHandle5, { side: "right" }),
|
|
2495
2505
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "absolute -top-2.5 left-2.5 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2496
2506
|
"span",
|
|
2497
2507
|
{
|
|
@@ -2583,7 +2593,7 @@ function DefaultEvent(props) {
|
|
|
2583
2593
|
}
|
|
2584
2594
|
);
|
|
2585
2595
|
}
|
|
2586
|
-
var EventNode_default = (0,
|
|
2596
|
+
var EventNode_default = (0, import_react18.memo)(function Event(props) {
|
|
2587
2597
|
const nodeStyle = props?.data?.style;
|
|
2588
2598
|
if (nodeStyle === "post-it") {
|
|
2589
2599
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PostItEvent, { ...props });
|
|
@@ -2592,7 +2602,7 @@ var EventNode_default = (0, import_react16.memo)(function Event(props) {
|
|
|
2592
2602
|
});
|
|
2593
2603
|
|
|
2594
2604
|
// src/nodes/event/config.ts
|
|
2595
|
-
var
|
|
2605
|
+
var import_react20 = require("@xyflow/react");
|
|
2596
2606
|
var import_lucide_react8 = require("lucide-react");
|
|
2597
2607
|
|
|
2598
2608
|
// src/nodes/node-types.ts
|
|
@@ -2622,12 +2632,12 @@ var config_default = {
|
|
|
2622
2632
|
if (EVENT.includes(connection.source) && SERVICE.includes(connection.target)) {
|
|
2623
2633
|
return {
|
|
2624
2634
|
label: "Publishes",
|
|
2625
|
-
markerEnd: { type:
|
|
2635
|
+
markerEnd: { type: import_react20.MarkerType.ArrowClosed, color: "#000000" }
|
|
2626
2636
|
};
|
|
2627
2637
|
}
|
|
2628
2638
|
return {
|
|
2629
2639
|
label: "Subscribes",
|
|
2630
|
-
markerEnd: { type:
|
|
2640
|
+
markerEnd: { type: import_react20.MarkerType.ArrowClosed, color: "#000000" }
|
|
2631
2641
|
};
|
|
2632
2642
|
},
|
|
2633
2643
|
defaultData: {
|
|
@@ -2668,11 +2678,11 @@ var config_default = {
|
|
|
2668
2678
|
};
|
|
2669
2679
|
|
|
2670
2680
|
// src/nodes/query/QueryNode.tsx
|
|
2671
|
-
var
|
|
2681
|
+
var import_react21 = require("react");
|
|
2672
2682
|
var import_lucide_react9 = require("lucide-react");
|
|
2673
|
-
var
|
|
2683
|
+
var import_react22 = require("@xyflow/react");
|
|
2674
2684
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2675
|
-
var GlowHandle7 = (0,
|
|
2685
|
+
var GlowHandle7 = (0, import_react21.memo)(function GlowHandle8({
|
|
2676
2686
|
side
|
|
2677
2687
|
}) {
|
|
2678
2688
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
@@ -2713,18 +2723,18 @@ function PostItQuery(props) {
|
|
|
2713
2723
|
children: [
|
|
2714
2724
|
props.data.isFocused && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FocusedResourceIndicator, {}),
|
|
2715
2725
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2716
|
-
|
|
2726
|
+
import_react22.Handle,
|
|
2717
2727
|
{
|
|
2718
2728
|
type: "target",
|
|
2719
|
-
position:
|
|
2729
|
+
position: import_react22.Position.Left,
|
|
2720
2730
|
style: HIDDEN_HANDLE_STYLE
|
|
2721
2731
|
}
|
|
2722
2732
|
),
|
|
2723
2733
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2724
|
-
|
|
2734
|
+
import_react22.Handle,
|
|
2725
2735
|
{
|
|
2726
2736
|
type: "source",
|
|
2727
|
-
position:
|
|
2737
|
+
position: import_react22.Position.Right,
|
|
2728
2738
|
style: HIDDEN_HANDLE_STYLE
|
|
2729
2739
|
}
|
|
2730
2740
|
),
|
|
@@ -2827,12 +2837,11 @@ function DefaultQuery(props) {
|
|
|
2827
2837
|
const mode = props.data.mode || "simple";
|
|
2828
2838
|
const hasApiInfo = !!(method || path);
|
|
2829
2839
|
const customIcon = isIconPath(styles?.icon) ? styles.icon : void 0;
|
|
2830
|
-
const owners = (0,
|
|
2840
|
+
const owners = (0, import_react21.useMemo)(
|
|
2831
2841
|
() => normalizeOwners(props.data.message?.owners),
|
|
2832
2842
|
[props.data.message?.owners]
|
|
2833
2843
|
);
|
|
2834
|
-
const
|
|
2835
|
-
const sourceConnections = (0, import_react20.useNodeConnections)({ handleType: "source" });
|
|
2844
|
+
const connected = useNodeHasConnections();
|
|
2836
2845
|
const isDark = useDarkMode();
|
|
2837
2846
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
2838
2847
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
@@ -2850,24 +2859,24 @@ function DefaultQuery(props) {
|
|
|
2850
2859
|
children: [
|
|
2851
2860
|
props.data.isFocused && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FocusedResourceIndicator, {}),
|
|
2852
2861
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2853
|
-
|
|
2862
|
+
import_react22.Handle,
|
|
2854
2863
|
{
|
|
2855
2864
|
type: "target",
|
|
2856
|
-
position:
|
|
2865
|
+
position: import_react22.Position.Left,
|
|
2857
2866
|
style: HIDDEN_HANDLE_STYLE
|
|
2858
2867
|
}
|
|
2859
2868
|
),
|
|
2860
2869
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2861
|
-
|
|
2870
|
+
import_react22.Handle,
|
|
2862
2871
|
{
|
|
2863
2872
|
type: "source",
|
|
2864
|
-
position:
|
|
2873
|
+
position: import_react22.Position.Right,
|
|
2865
2874
|
style: HIDDEN_HANDLE_STYLE
|
|
2866
2875
|
}
|
|
2867
2876
|
),
|
|
2868
2877
|
notes && notes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(NotesIndicator, { notes, resourceName: name }),
|
|
2869
|
-
|
|
2870
|
-
|
|
2878
|
+
connected.target && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GlowHandle7, { side: "left" }),
|
|
2879
|
+
connected.source && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GlowHandle7, { side: "right" }),
|
|
2871
2880
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "absolute -top-2.5 left-2.5 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2872
2881
|
"span",
|
|
2873
2882
|
{
|
|
@@ -2946,7 +2955,7 @@ function DefaultQuery(props) {
|
|
|
2946
2955
|
}
|
|
2947
2956
|
);
|
|
2948
2957
|
}
|
|
2949
|
-
var QueryNode_default = (0,
|
|
2958
|
+
var QueryNode_default = (0, import_react21.memo)(function Query(props) {
|
|
2950
2959
|
const nodeStyle = props?.data?.style;
|
|
2951
2960
|
if (nodeStyle === "post-it") {
|
|
2952
2961
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PostItQuery, { ...props });
|
|
@@ -2955,11 +2964,11 @@ var QueryNode_default = (0, import_react19.memo)(function Query(props) {
|
|
|
2955
2964
|
});
|
|
2956
2965
|
|
|
2957
2966
|
// src/nodes/command/CommandNode.tsx
|
|
2958
|
-
var
|
|
2967
|
+
var import_react23 = require("react");
|
|
2959
2968
|
var import_lucide_react10 = require("lucide-react");
|
|
2960
|
-
var
|
|
2969
|
+
var import_react24 = require("@xyflow/react");
|
|
2961
2970
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2962
|
-
var GlowHandle9 = (0,
|
|
2971
|
+
var GlowHandle9 = (0, import_react23.memo)(function GlowHandle10({
|
|
2963
2972
|
side
|
|
2964
2973
|
}) {
|
|
2965
2974
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
@@ -3000,18 +3009,18 @@ function PostItCommand(props) {
|
|
|
3000
3009
|
children: [
|
|
3001
3010
|
props.data.isFocused && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FocusedResourceIndicator, {}),
|
|
3002
3011
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3003
|
-
|
|
3012
|
+
import_react24.Handle,
|
|
3004
3013
|
{
|
|
3005
3014
|
type: "target",
|
|
3006
|
-
position:
|
|
3015
|
+
position: import_react24.Position.Left,
|
|
3007
3016
|
style: HIDDEN_HANDLE_STYLE
|
|
3008
3017
|
}
|
|
3009
3018
|
),
|
|
3010
3019
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3011
|
-
|
|
3020
|
+
import_react24.Handle,
|
|
3012
3021
|
{
|
|
3013
3022
|
type: "source",
|
|
3014
|
-
position:
|
|
3023
|
+
position: import_react24.Position.Right,
|
|
3015
3024
|
style: HIDDEN_HANDLE_STYLE
|
|
3016
3025
|
}
|
|
3017
3026
|
),
|
|
@@ -3120,12 +3129,11 @@ function DefaultCommand(props) {
|
|
|
3120
3129
|
const mode = props.data.mode || "simple";
|
|
3121
3130
|
const hasApiInfo = !!(method || path);
|
|
3122
3131
|
const customIcon = isIconPath(styles?.icon) ? styles.icon : void 0;
|
|
3123
|
-
const owners = (0,
|
|
3132
|
+
const owners = (0, import_react23.useMemo)(
|
|
3124
3133
|
() => normalizeOwners(props.data.message?.owners),
|
|
3125
3134
|
[props.data.message?.owners]
|
|
3126
3135
|
);
|
|
3127
|
-
const
|
|
3128
|
-
const sourceConnections = (0, import_react22.useNodeConnections)({ handleType: "source" });
|
|
3136
|
+
const connected = useNodeHasConnections();
|
|
3129
3137
|
const isDark = useDarkMode();
|
|
3130
3138
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
3131
3139
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
@@ -3143,24 +3151,24 @@ function DefaultCommand(props) {
|
|
|
3143
3151
|
children: [
|
|
3144
3152
|
props.data.isFocused && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FocusedResourceIndicator, {}),
|
|
3145
3153
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3146
|
-
|
|
3154
|
+
import_react24.Handle,
|
|
3147
3155
|
{
|
|
3148
3156
|
type: "target",
|
|
3149
|
-
position:
|
|
3157
|
+
position: import_react24.Position.Left,
|
|
3150
3158
|
style: HIDDEN_HANDLE_STYLE
|
|
3151
3159
|
}
|
|
3152
3160
|
),
|
|
3153
3161
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3154
|
-
|
|
3162
|
+
import_react24.Handle,
|
|
3155
3163
|
{
|
|
3156
3164
|
type: "source",
|
|
3157
|
-
position:
|
|
3165
|
+
position: import_react24.Position.Right,
|
|
3158
3166
|
style: HIDDEN_HANDLE_STYLE
|
|
3159
3167
|
}
|
|
3160
3168
|
),
|
|
3161
3169
|
notes && notes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(NotesIndicator, { notes, resourceName: name }),
|
|
3162
|
-
|
|
3163
|
-
|
|
3170
|
+
connected.target && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(GlowHandle9, { side: "left" }),
|
|
3171
|
+
connected.source && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(GlowHandle9, { side: "right" }),
|
|
3164
3172
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "absolute -top-2.5 left-2.5 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3165
3173
|
"span",
|
|
3166
3174
|
{
|
|
@@ -3239,7 +3247,7 @@ function DefaultCommand(props) {
|
|
|
3239
3247
|
}
|
|
3240
3248
|
);
|
|
3241
3249
|
}
|
|
3242
|
-
var CommandNode_default = (0,
|
|
3250
|
+
var CommandNode_default = (0, import_react23.memo)(function Command(props) {
|
|
3243
3251
|
const nodeStyle = props?.data?.style;
|
|
3244
3252
|
if (nodeStyle === "post-it") {
|
|
3245
3253
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PostItCommand, { ...props });
|
|
@@ -3249,8 +3257,8 @@ var CommandNode_default = (0, import_react21.memo)(function Command(props) {
|
|
|
3249
3257
|
|
|
3250
3258
|
// src/nodes/channel/ChannelNode.tsx
|
|
3251
3259
|
var import_lucide_react11 = require("lucide-react");
|
|
3252
|
-
var
|
|
3253
|
-
var
|
|
3260
|
+
var import_react25 = require("@xyflow/react");
|
|
3261
|
+
var import_react26 = require("react");
|
|
3254
3262
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3255
3263
|
var DELIVERY_GUARANTEE_LABELS = {
|
|
3256
3264
|
"at-most-once": "At most once",
|
|
@@ -3359,18 +3367,18 @@ function PostItChannel(props) {
|
|
|
3359
3367
|
children: [
|
|
3360
3368
|
props.data.isFocused && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FocusedResourceIndicator, {}),
|
|
3361
3369
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3362
|
-
|
|
3370
|
+
import_react25.Handle,
|
|
3363
3371
|
{
|
|
3364
3372
|
type: "target",
|
|
3365
|
-
position:
|
|
3373
|
+
position: import_react25.Position.Left,
|
|
3366
3374
|
style: HIDDEN_HANDLE_STYLE
|
|
3367
3375
|
}
|
|
3368
3376
|
),
|
|
3369
3377
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3370
|
-
|
|
3378
|
+
import_react25.Handle,
|
|
3371
3379
|
{
|
|
3372
3380
|
type: "source",
|
|
3373
|
-
position:
|
|
3381
|
+
position: import_react25.Position.Right,
|
|
3374
3382
|
style: HIDDEN_HANDLE_STYLE
|
|
3375
3383
|
}
|
|
3376
3384
|
),
|
|
@@ -3499,12 +3507,11 @@ function DefaultChannel(props) {
|
|
|
3499
3507
|
} = data.channel;
|
|
3500
3508
|
const mode = props.data.mode || "simple";
|
|
3501
3509
|
const customIcon = isIconPath(styles?.icon) ? styles.icon : void 0;
|
|
3502
|
-
const owners = (0,
|
|
3510
|
+
const owners = (0, import_react26.useMemo)(
|
|
3503
3511
|
() => normalizeOwners(data.channel?.owners),
|
|
3504
3512
|
[data.channel?.owners]
|
|
3505
3513
|
);
|
|
3506
|
-
const
|
|
3507
|
-
const targetConnections = (0, import_react23.useNodeConnections)({ handleType: "target" });
|
|
3514
|
+
const connected = useNodeHasConnections();
|
|
3508
3515
|
const isDark = useDarkMode();
|
|
3509
3516
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
3510
3517
|
const guarantee = getGuarantee(deliveryGuarantee);
|
|
@@ -3523,24 +3530,24 @@ function DefaultChannel(props) {
|
|
|
3523
3530
|
children: [
|
|
3524
3531
|
props.data.isFocused && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FocusedResourceIndicator, {}),
|
|
3525
3532
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3526
|
-
|
|
3533
|
+
import_react25.Handle,
|
|
3527
3534
|
{
|
|
3528
3535
|
type: "target",
|
|
3529
|
-
position:
|
|
3536
|
+
position: import_react25.Position.Left,
|
|
3530
3537
|
style: HIDDEN_HANDLE_STYLE
|
|
3531
3538
|
}
|
|
3532
3539
|
),
|
|
3533
3540
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3534
|
-
|
|
3541
|
+
import_react25.Handle,
|
|
3535
3542
|
{
|
|
3536
3543
|
type: "source",
|
|
3537
|
-
position:
|
|
3544
|
+
position: import_react25.Position.Right,
|
|
3538
3545
|
style: HIDDEN_HANDLE_STYLE
|
|
3539
3546
|
}
|
|
3540
3547
|
),
|
|
3541
3548
|
notes && notes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(NotesIndicator, { notes, resourceName: name }),
|
|
3542
|
-
|
|
3543
|
-
|
|
3549
|
+
connected.target && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(GlowHandle11, { side: "left" }),
|
|
3550
|
+
connected.source && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(GlowHandle11, { side: "right" }),
|
|
3544
3551
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "absolute -top-2.5 left-2.5 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
3545
3552
|
"span",
|
|
3546
3553
|
{
|
|
@@ -3646,7 +3653,7 @@ function DefaultChannel(props) {
|
|
|
3646
3653
|
}
|
|
3647
3654
|
);
|
|
3648
3655
|
}
|
|
3649
|
-
var ChannelNode_default = (0,
|
|
3656
|
+
var ChannelNode_default = (0, import_react26.memo)(function Channel(props) {
|
|
3650
3657
|
const nodeStyle = props?.data?.style;
|
|
3651
3658
|
if (nodeStyle === "post-it") {
|
|
3652
3659
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PostItChannel, { ...props });
|
|
@@ -3655,9 +3662,9 @@ var ChannelNode_default = (0, import_react24.memo)(function Channel(props) {
|
|
|
3655
3662
|
});
|
|
3656
3663
|
|
|
3657
3664
|
// src/nodes/data/DataNode.tsx
|
|
3658
|
-
var
|
|
3665
|
+
var import_react27 = require("react");
|
|
3659
3666
|
var import_lucide_react12 = require("lucide-react");
|
|
3660
|
-
var
|
|
3667
|
+
var import_react28 = require("@xyflow/react");
|
|
3661
3668
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
3662
3669
|
function GlowHandle12({ side }) {
|
|
3663
3670
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
@@ -3724,18 +3731,18 @@ function PostItData(props) {
|
|
|
3724
3731
|
children: [
|
|
3725
3732
|
props.data.isFocused && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FocusedResourceIndicator, {}),
|
|
3726
3733
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3727
|
-
|
|
3734
|
+
import_react28.Handle,
|
|
3728
3735
|
{
|
|
3729
3736
|
type: "target",
|
|
3730
|
-
position:
|
|
3737
|
+
position: import_react28.Position.Left,
|
|
3731
3738
|
style: HIDDEN_HANDLE_STYLE
|
|
3732
3739
|
}
|
|
3733
3740
|
),
|
|
3734
3741
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3735
|
-
|
|
3742
|
+
import_react28.Handle,
|
|
3736
3743
|
{
|
|
3737
3744
|
type: "source",
|
|
3738
|
-
position:
|
|
3745
|
+
position: import_react28.Position.Right,
|
|
3739
3746
|
style: HIDDEN_HANDLE_STYLE
|
|
3740
3747
|
}
|
|
3741
3748
|
),
|
|
@@ -3844,9 +3851,8 @@ function DefaultData(props) {
|
|
|
3844
3851
|
const typeLabel = getDataNodeTypeLabel(container_type, type);
|
|
3845
3852
|
const mode = props.data.mode || "simple";
|
|
3846
3853
|
const customIcon = isIconPath(styles?.icon) ? styles.icon : void 0;
|
|
3847
|
-
const ownersNormalized = (0,
|
|
3848
|
-
const
|
|
3849
|
-
const sourceConnections = (0, import_react26.useNodeConnections)({ handleType: "source" });
|
|
3854
|
+
const ownersNormalized = (0, import_react27.useMemo)(() => normalizeOwners(owners), [owners]);
|
|
3855
|
+
const connected = useNodeHasConnections();
|
|
3850
3856
|
const isDark = useDarkMode();
|
|
3851
3857
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
3852
3858
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
@@ -3864,24 +3870,24 @@ function DefaultData(props) {
|
|
|
3864
3870
|
children: [
|
|
3865
3871
|
props.data.isFocused && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FocusedResourceIndicator, {}),
|
|
3866
3872
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3867
|
-
|
|
3873
|
+
import_react28.Handle,
|
|
3868
3874
|
{
|
|
3869
3875
|
type: "target",
|
|
3870
|
-
position:
|
|
3876
|
+
position: import_react28.Position.Left,
|
|
3871
3877
|
style: HIDDEN_HANDLE_STYLE
|
|
3872
3878
|
}
|
|
3873
3879
|
),
|
|
3874
3880
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3875
|
-
|
|
3881
|
+
import_react28.Handle,
|
|
3876
3882
|
{
|
|
3877
3883
|
type: "source",
|
|
3878
|
-
position:
|
|
3884
|
+
position: import_react28.Position.Right,
|
|
3879
3885
|
style: HIDDEN_HANDLE_STYLE
|
|
3880
3886
|
}
|
|
3881
3887
|
),
|
|
3882
3888
|
notes && notes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(NotesIndicator, { notes, resourceName: name }),
|
|
3883
|
-
|
|
3884
|
-
|
|
3889
|
+
connected.target && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(GlowHandle12, { side: "left" }),
|
|
3890
|
+
connected.source && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(GlowHandle12, { side: "right" }),
|
|
3885
3891
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "absolute -top-2.5 left-2.5 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3886
3892
|
"span",
|
|
3887
3893
|
{
|
|
@@ -3955,7 +3961,7 @@ function DefaultData(props) {
|
|
|
3955
3961
|
}
|
|
3956
3962
|
);
|
|
3957
3963
|
}
|
|
3958
|
-
var DataNode_default = (0,
|
|
3964
|
+
var DataNode_default = (0, import_react27.memo)(function Data(props) {
|
|
3959
3965
|
const nodeStyle = props?.data?.style;
|
|
3960
3966
|
if (nodeStyle === "post-it") {
|
|
3961
3967
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PostItData, { ...props });
|
|
@@ -3964,7 +3970,7 @@ var DataNode_default = (0, import_react25.memo)(function Data(props) {
|
|
|
3964
3970
|
});
|
|
3965
3971
|
|
|
3966
3972
|
// src/nodes/data/config.ts
|
|
3967
|
-
var
|
|
3973
|
+
var import_react29 = require("@xyflow/react");
|
|
3968
3974
|
var import_lucide_react13 = require("lucide-react");
|
|
3969
3975
|
var config_default2 = {
|
|
3970
3976
|
type: "data",
|
|
@@ -3979,18 +3985,18 @@ var config_default2 = {
|
|
|
3979
3985
|
if (connection.source === "data" && connection.target === "service") {
|
|
3980
3986
|
return {
|
|
3981
3987
|
label: "Provides data to",
|
|
3982
|
-
markerEnd: { type:
|
|
3988
|
+
markerEnd: { type: import_react29.MarkerType.ArrowClosed, color: "#000000" }
|
|
3983
3989
|
};
|
|
3984
3990
|
}
|
|
3985
3991
|
if (connection.source === "service" && connection.target === "data") {
|
|
3986
3992
|
return {
|
|
3987
3993
|
label: "Stores data in",
|
|
3988
|
-
markerEnd: { type:
|
|
3994
|
+
markerEnd: { type: import_react29.MarkerType.ArrowClosed, color: "#000000" }
|
|
3989
3995
|
};
|
|
3990
3996
|
}
|
|
3991
3997
|
return {
|
|
3992
3998
|
label: "Connected to",
|
|
3993
|
-
markerEnd: { type:
|
|
3999
|
+
markerEnd: { type: import_react29.MarkerType.ArrowClosed, color: "#000000" }
|
|
3994
4000
|
};
|
|
3995
4001
|
},
|
|
3996
4002
|
defaultData: {
|
|
@@ -4046,12 +4052,12 @@ var config_default2 = {
|
|
|
4046
4052
|
};
|
|
4047
4053
|
|
|
4048
4054
|
// src/nodes/view/ViewNode.tsx
|
|
4049
|
-
var
|
|
4055
|
+
var import_react30 = require("react");
|
|
4050
4056
|
var import_lucide_react14 = require("lucide-react");
|
|
4051
|
-
var
|
|
4057
|
+
var import_react31 = require("@xyflow/react");
|
|
4052
4058
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
4053
4059
|
var VIEW_COLOR = "#0ea5e9";
|
|
4054
|
-
var GlowHandle13 = (0,
|
|
4060
|
+
var GlowHandle13 = (0, import_react30.memo)(function GlowHandle14({
|
|
4055
4061
|
side
|
|
4056
4062
|
}) {
|
|
4057
4063
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
@@ -4075,7 +4081,7 @@ var GlowHandle13 = (0, import_react28.memo)(function GlowHandle14({
|
|
|
4075
4081
|
}
|
|
4076
4082
|
);
|
|
4077
4083
|
});
|
|
4078
|
-
var ViewNode_default = (0,
|
|
4084
|
+
var ViewNode_default = (0, import_react30.memo)(function View(props) {
|
|
4079
4085
|
const {
|
|
4080
4086
|
name,
|
|
4081
4087
|
version,
|
|
@@ -4085,9 +4091,8 @@ var ViewNode_default = (0, import_react28.memo)(function View(props) {
|
|
|
4085
4091
|
notes
|
|
4086
4092
|
} = props.data.view;
|
|
4087
4093
|
const mode = props.data.mode || "simple";
|
|
4088
|
-
const ownersNormalized = (0,
|
|
4089
|
-
const
|
|
4090
|
-
const sourceConnections = (0, import_react29.useNodeConnections)({ handleType: "source" });
|
|
4094
|
+
const ownersNormalized = (0, import_react30.useMemo)(() => normalizeOwners(owners), [owners]);
|
|
4095
|
+
const connected = useNodeHasConnections();
|
|
4091
4096
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
4092
4097
|
"div",
|
|
4093
4098
|
{
|
|
@@ -4102,24 +4107,24 @@ var ViewNode_default = (0, import_react28.memo)(function View(props) {
|
|
|
4102
4107
|
children: [
|
|
4103
4108
|
props.data.isFocused && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FocusedResourceIndicator, {}),
|
|
4104
4109
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4105
|
-
|
|
4110
|
+
import_react31.Handle,
|
|
4106
4111
|
{
|
|
4107
4112
|
type: "target",
|
|
4108
|
-
position:
|
|
4113
|
+
position: import_react31.Position.Left,
|
|
4109
4114
|
style: HIDDEN_HANDLE_STYLE
|
|
4110
4115
|
}
|
|
4111
4116
|
),
|
|
4112
4117
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4113
|
-
|
|
4118
|
+
import_react31.Handle,
|
|
4114
4119
|
{
|
|
4115
4120
|
type: "source",
|
|
4116
|
-
position:
|
|
4121
|
+
position: import_react31.Position.Right,
|
|
4117
4122
|
style: HIDDEN_HANDLE_STYLE
|
|
4118
4123
|
}
|
|
4119
4124
|
),
|
|
4120
4125
|
notes && notes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(NotesIndicator, { notes, resourceName: name }),
|
|
4121
|
-
|
|
4122
|
-
|
|
4126
|
+
connected.target && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GlowHandle13, { side: "left" }),
|
|
4127
|
+
connected.source && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GlowHandle13, { side: "right" }),
|
|
4123
4128
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "absolute -top-2.5 left-2.5 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "inline-flex items-center gap-1 text-[7px] font-bold uppercase tracking-widest text-white px-1.5 py-0.5 rounded shadow-sm bg-sky-500", children: [
|
|
4124
4129
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react14.MonitorIcon, { className: "w-2.5 h-2.5", strokeWidth: 2.5 }),
|
|
4125
4130
|
"View"
|
|
@@ -4174,9 +4179,9 @@ var ViewNode_default = (0, import_react28.memo)(function View(props) {
|
|
|
4174
4179
|
});
|
|
4175
4180
|
|
|
4176
4181
|
// src/nodes/actor/ActorNode.tsx
|
|
4177
|
-
var
|
|
4182
|
+
var import_react32 = require("react");
|
|
4178
4183
|
var import_lucide_react15 = require("lucide-react");
|
|
4179
|
-
var
|
|
4184
|
+
var import_react33 = require("@xyflow/react");
|
|
4180
4185
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
4181
4186
|
function GlowHandle15({ side }) {
|
|
4182
4187
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
@@ -4215,18 +4220,18 @@ function PostItActor(props) {
|
|
|
4215
4220
|
),
|
|
4216
4221
|
children: [
|
|
4217
4222
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4218
|
-
|
|
4223
|
+
import_react33.Handle,
|
|
4219
4224
|
{
|
|
4220
4225
|
type: "target",
|
|
4221
|
-
position:
|
|
4226
|
+
position: import_react33.Position.Left,
|
|
4222
4227
|
style: HIDDEN_HANDLE_STYLE
|
|
4223
4228
|
}
|
|
4224
4229
|
),
|
|
4225
4230
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4226
|
-
|
|
4231
|
+
import_react33.Handle,
|
|
4227
4232
|
{
|
|
4228
4233
|
type: "source",
|
|
4229
|
-
position:
|
|
4234
|
+
position: import_react33.Position.Right,
|
|
4230
4235
|
style: HIDDEN_HANDLE_STYLE
|
|
4231
4236
|
}
|
|
4232
4237
|
),
|
|
@@ -4301,8 +4306,7 @@ function PostItActor(props) {
|
|
|
4301
4306
|
function DefaultActor(props) {
|
|
4302
4307
|
const { name, summary, deprecated, draft, notes } = props?.data;
|
|
4303
4308
|
const mode = props?.data?.mode || "simple";
|
|
4304
|
-
const
|
|
4305
|
-
const sourceConnections = (0, import_react31.useNodeConnections)({ handleType: "source" });
|
|
4309
|
+
const connected = useNodeHasConnections();
|
|
4306
4310
|
const isDark = useDarkMode();
|
|
4307
4311
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
4308
4312
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
@@ -4319,24 +4323,24 @@ function DefaultActor(props) {
|
|
|
4319
4323
|
},
|
|
4320
4324
|
children: [
|
|
4321
4325
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4322
|
-
|
|
4326
|
+
import_react33.Handle,
|
|
4323
4327
|
{
|
|
4324
4328
|
type: "target",
|
|
4325
|
-
position:
|
|
4329
|
+
position: import_react33.Position.Left,
|
|
4326
4330
|
style: HIDDEN_HANDLE_STYLE
|
|
4327
4331
|
}
|
|
4328
4332
|
),
|
|
4329
4333
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4330
|
-
|
|
4334
|
+
import_react33.Handle,
|
|
4331
4335
|
{
|
|
4332
4336
|
type: "source",
|
|
4333
|
-
position:
|
|
4337
|
+
position: import_react33.Position.Right,
|
|
4334
4338
|
style: HIDDEN_HANDLE_STYLE
|
|
4335
4339
|
}
|
|
4336
4340
|
),
|
|
4337
4341
|
notes && notes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NotesIndicator, { notes, resourceName: name }),
|
|
4338
|
-
|
|
4339
|
-
|
|
4342
|
+
connected.target && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GlowHandle15, { side: "left" }),
|
|
4343
|
+
connected.source && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GlowHandle15, { side: "right" }),
|
|
4340
4344
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "absolute -top-2.5 left-2.5 flex items-center gap-1.5 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
4341
4345
|
"span",
|
|
4342
4346
|
{
|
|
@@ -4377,7 +4381,7 @@ function DefaultActor(props) {
|
|
|
4377
4381
|
}
|
|
4378
4382
|
);
|
|
4379
4383
|
}
|
|
4380
|
-
var ActorNode_default = (0,
|
|
4384
|
+
var ActorNode_default = (0, import_react32.memo)(function Actor(props) {
|
|
4381
4385
|
const nodeStyle = props?.data?.style;
|
|
4382
4386
|
if (nodeStyle === "post-it") {
|
|
4383
4387
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PostItActor, { ...props });
|
|
@@ -4386,7 +4390,7 @@ var ActorNode_default = (0, import_react30.memo)(function Actor(props) {
|
|
|
4386
4390
|
});
|
|
4387
4391
|
|
|
4388
4392
|
// src/nodes/actor/config.ts
|
|
4389
|
-
var
|
|
4393
|
+
var import_react34 = require("@xyflow/react");
|
|
4390
4394
|
var import_lucide_react16 = require("lucide-react");
|
|
4391
4395
|
var config_default3 = {
|
|
4392
4396
|
type: "actor",
|
|
@@ -4412,7 +4416,7 @@ var config_default3 = {
|
|
|
4412
4416
|
getEdgeOptions: (_connection) => {
|
|
4413
4417
|
return {
|
|
4414
4418
|
label: "Interacts",
|
|
4415
|
-
markerEnd: { type:
|
|
4419
|
+
markerEnd: { type: import_react34.MarkerType.ArrowClosed, color: "#000000" }
|
|
4416
4420
|
};
|
|
4417
4421
|
},
|
|
4418
4422
|
defaultData: {
|
|
@@ -4445,9 +4449,9 @@ var config_default3 = {
|
|
|
4445
4449
|
};
|
|
4446
4450
|
|
|
4447
4451
|
// src/nodes/field/FieldNode.tsx
|
|
4448
|
-
var
|
|
4452
|
+
var import_react35 = require("react");
|
|
4449
4453
|
var import_lucide_react17 = require("lucide-react");
|
|
4450
|
-
var
|
|
4454
|
+
var import_react36 = require("@xyflow/react");
|
|
4451
4455
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
4452
4456
|
function GlowHandle16({ side }) {
|
|
4453
4457
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
@@ -4474,11 +4478,10 @@ function GlowHandle16({ side }) {
|
|
|
4474
4478
|
function classNames11(...classes) {
|
|
4475
4479
|
return classes.filter(Boolean).join(" ");
|
|
4476
4480
|
}
|
|
4477
|
-
var FieldNode_default = (0,
|
|
4481
|
+
var FieldNode_default = (0, import_react35.memo)(function Field(props) {
|
|
4478
4482
|
const { name, type: fieldType } = props.data;
|
|
4479
4483
|
const mode = props.data.mode || "simple";
|
|
4480
|
-
const
|
|
4481
|
-
const sourceConnections = (0, import_react34.useNodeConnections)({ handleType: "source" });
|
|
4484
|
+
const connected = useNodeHasConnections();
|
|
4482
4485
|
const isDark = useDarkMode();
|
|
4483
4486
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
4484
4487
|
"div",
|
|
@@ -4494,23 +4497,23 @@ var FieldNode_default = (0, import_react33.memo)(function Field(props) {
|
|
|
4494
4497
|
},
|
|
4495
4498
|
children: [
|
|
4496
4499
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4497
|
-
|
|
4500
|
+
import_react36.Handle,
|
|
4498
4501
|
{
|
|
4499
4502
|
type: "target",
|
|
4500
|
-
position:
|
|
4503
|
+
position: import_react36.Position.Left,
|
|
4501
4504
|
style: HIDDEN_HANDLE_STYLE
|
|
4502
4505
|
}
|
|
4503
4506
|
),
|
|
4504
4507
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4505
|
-
|
|
4508
|
+
import_react36.Handle,
|
|
4506
4509
|
{
|
|
4507
4510
|
type: "source",
|
|
4508
|
-
position:
|
|
4511
|
+
position: import_react36.Position.Right,
|
|
4509
4512
|
style: HIDDEN_HANDLE_STYLE
|
|
4510
4513
|
}
|
|
4511
4514
|
),
|
|
4512
|
-
|
|
4513
|
-
|
|
4515
|
+
connected.target && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(GlowHandle16, { side: "left" }),
|
|
4516
|
+
connected.source && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(GlowHandle16, { side: "right" }),
|
|
4514
4517
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "absolute -top-2.5 left-2.5 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "inline-flex items-center gap-1 text-[7px] font-bold uppercase tracking-widest text-white px-1.5 py-0.5 rounded shadow-sm bg-cyan-600", children: [
|
|
4515
4518
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react17.Database, { className: "w-2.5 h-2.5", strokeWidth: 2.5 }),
|
|
4516
4519
|
"Field"
|
|
@@ -4543,7 +4546,7 @@ var FieldNode_default = (0, import_react33.memo)(function Field(props) {
|
|
|
4543
4546
|
});
|
|
4544
4547
|
|
|
4545
4548
|
// src/nodes/field/config.ts
|
|
4546
|
-
var
|
|
4549
|
+
var import_react37 = require("@xyflow/react");
|
|
4547
4550
|
var import_lucide_react18 = require("lucide-react");
|
|
4548
4551
|
var config_default4 = {
|
|
4549
4552
|
type: "field",
|
|
@@ -4554,7 +4557,7 @@ var config_default4 = {
|
|
|
4554
4557
|
validateConnection: () => false,
|
|
4555
4558
|
getEdgeOptions: () => ({
|
|
4556
4559
|
label: "contains",
|
|
4557
|
-
markerEnd: { type:
|
|
4560
|
+
markerEnd: { type: import_react37.MarkerType.ArrowClosed, color: "#06b6d4" }
|
|
4558
4561
|
}),
|
|
4559
4562
|
defaultData: { name: "New Field", type: "string", mode: "full" },
|
|
4560
4563
|
editor: {
|
|
@@ -4572,9 +4575,9 @@ var config_default4 = {
|
|
|
4572
4575
|
};
|
|
4573
4576
|
|
|
4574
4577
|
// src/nodes/external-system/ExternalSystem.tsx
|
|
4575
|
-
var
|
|
4578
|
+
var import_react38 = require("react");
|
|
4576
4579
|
var import_lucide_react19 = require("lucide-react");
|
|
4577
|
-
var
|
|
4580
|
+
var import_react39 = require("@xyflow/react");
|
|
4578
4581
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
4579
4582
|
function GlowHandle17({ side }) {
|
|
4580
4583
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
@@ -4613,18 +4616,18 @@ function PostItExternalSystem(props) {
|
|
|
4613
4616
|
),
|
|
4614
4617
|
children: [
|
|
4615
4618
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4616
|
-
|
|
4619
|
+
import_react39.Handle,
|
|
4617
4620
|
{
|
|
4618
4621
|
type: "target",
|
|
4619
|
-
position:
|
|
4622
|
+
position: import_react39.Position.Left,
|
|
4620
4623
|
style: HIDDEN_HANDLE_STYLE
|
|
4621
4624
|
}
|
|
4622
4625
|
),
|
|
4623
4626
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4624
|
-
|
|
4627
|
+
import_react39.Handle,
|
|
4625
4628
|
{
|
|
4626
4629
|
type: "source",
|
|
4627
|
-
position:
|
|
4630
|
+
position: import_react39.Position.Right,
|
|
4628
4631
|
style: HIDDEN_HANDLE_STYLE
|
|
4629
4632
|
}
|
|
4630
4633
|
),
|
|
@@ -4703,8 +4706,7 @@ function PostItExternalSystem(props) {
|
|
|
4703
4706
|
function DefaultExternalSystem(props) {
|
|
4704
4707
|
const { version, name, summary, deprecated, draft, notes } = props.data.externalSystem;
|
|
4705
4708
|
const mode = props.data.mode || "simple";
|
|
4706
|
-
const
|
|
4707
|
-
const sourceConnections = (0, import_react37.useNodeConnections)({ handleType: "source" });
|
|
4709
|
+
const connected = useNodeHasConnections();
|
|
4708
4710
|
const isDark = useDarkMode();
|
|
4709
4711
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
4710
4712
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
@@ -4721,24 +4723,24 @@ function DefaultExternalSystem(props) {
|
|
|
4721
4723
|
},
|
|
4722
4724
|
children: [
|
|
4723
4725
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4724
|
-
|
|
4726
|
+
import_react39.Handle,
|
|
4725
4727
|
{
|
|
4726
4728
|
type: "target",
|
|
4727
|
-
position:
|
|
4729
|
+
position: import_react39.Position.Left,
|
|
4728
4730
|
style: HIDDEN_HANDLE_STYLE
|
|
4729
4731
|
}
|
|
4730
4732
|
),
|
|
4731
4733
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4732
|
-
|
|
4734
|
+
import_react39.Handle,
|
|
4733
4735
|
{
|
|
4734
4736
|
type: "source",
|
|
4735
|
-
position:
|
|
4737
|
+
position: import_react39.Position.Right,
|
|
4736
4738
|
style: HIDDEN_HANDLE_STYLE
|
|
4737
4739
|
}
|
|
4738
4740
|
),
|
|
4739
4741
|
notes && notes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(NotesIndicator, { notes, resourceName: name }),
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
+
connected.target && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(GlowHandle17, { side: "left" }),
|
|
4743
|
+
connected.source && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(GlowHandle17, { side: "right" }),
|
|
4742
4744
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "absolute -top-2.5 left-2.5 flex items-center gap-1.5 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4743
4745
|
"span",
|
|
4744
4746
|
{
|
|
@@ -4785,7 +4787,7 @@ function DefaultExternalSystem(props) {
|
|
|
4785
4787
|
}
|
|
4786
4788
|
);
|
|
4787
4789
|
}
|
|
4788
|
-
var ExternalSystem_default = (0,
|
|
4790
|
+
var ExternalSystem_default = (0, import_react38.memo)(function ExternalSystem(props) {
|
|
4789
4791
|
const nodeStyle = props?.data?.style;
|
|
4790
4792
|
if (nodeStyle === "post-it") {
|
|
4791
4793
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PostItExternalSystem, { ...props });
|
|
@@ -4794,7 +4796,7 @@ var ExternalSystem_default = (0, import_react36.memo)(function ExternalSystem(pr
|
|
|
4794
4796
|
});
|
|
4795
4797
|
|
|
4796
4798
|
// src/nodes/external-system/config.ts
|
|
4797
|
-
var
|
|
4799
|
+
var import_react40 = require("@xyflow/react");
|
|
4798
4800
|
var import_lucide_react20 = require("lucide-react");
|
|
4799
4801
|
var config_default5 = {
|
|
4800
4802
|
type: "external-system",
|
|
@@ -4808,7 +4810,7 @@ var config_default5 = {
|
|
|
4808
4810
|
getEdgeOptions: (connection) => {
|
|
4809
4811
|
return {
|
|
4810
4812
|
label: "Connects",
|
|
4811
|
-
markerEnd: { type:
|
|
4813
|
+
markerEnd: { type: import_react40.MarkerType.ArrowClosed, color: "#000000" }
|
|
4812
4814
|
};
|
|
4813
4815
|
},
|
|
4814
4816
|
defaultData: {
|
|
@@ -4858,11 +4860,11 @@ var config_default5 = {
|
|
|
4858
4860
|
};
|
|
4859
4861
|
|
|
4860
4862
|
// src/nodes/ContextActor.tsx
|
|
4861
|
-
var
|
|
4862
|
-
var
|
|
4863
|
+
var import_react41 = require("react");
|
|
4864
|
+
var import_react42 = require("@xyflow/react");
|
|
4863
4865
|
var import_lucide_react21 = require("lucide-react");
|
|
4864
4866
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
4865
|
-
var ContextActor_default = (0,
|
|
4867
|
+
var ContextActor_default = (0, import_react41.memo)(function ContextActorNode({ data }) {
|
|
4866
4868
|
const { name } = data;
|
|
4867
4869
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4868
4870
|
"div",
|
|
@@ -4871,18 +4873,18 @@ var ContextActor_default = (0, import_react39.memo)(function ContextActorNode({
|
|
|
4871
4873
|
style: { boxShadow: "0 2px 12px rgba(234, 179, 8, 0.15)" },
|
|
4872
4874
|
children: [
|
|
4873
4875
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4874
|
-
|
|
4876
|
+
import_react42.Handle,
|
|
4875
4877
|
{
|
|
4876
4878
|
type: "target",
|
|
4877
|
-
position:
|
|
4879
|
+
position: import_react42.Position.Left,
|
|
4878
4880
|
style: HIDDEN_HANDLE_STYLE
|
|
4879
4881
|
}
|
|
4880
4882
|
),
|
|
4881
4883
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4882
|
-
|
|
4884
|
+
import_react42.Handle,
|
|
4883
4885
|
{
|
|
4884
4886
|
type: "source",
|
|
4885
|
-
position:
|
|
4887
|
+
position: import_react42.Position.Right,
|
|
4886
4888
|
style: HIDDEN_HANDLE_STYLE
|
|
4887
4889
|
}
|
|
4888
4890
|
),
|
|
@@ -4903,8 +4905,8 @@ var ContextActor_default = (0, import_react39.memo)(function ContextActorNode({
|
|
|
4903
4905
|
});
|
|
4904
4906
|
|
|
4905
4907
|
// src/nodes/SystemGroupNode.tsx
|
|
4906
|
-
var
|
|
4907
|
-
var
|
|
4908
|
+
var import_react43 = require("react");
|
|
4909
|
+
var import_react44 = require("@xyflow/react");
|
|
4908
4910
|
var import_lucide_react22 = require("lucide-react");
|
|
4909
4911
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
4910
4912
|
var CONTAINER_STYLE = {
|
|
@@ -4981,7 +4983,7 @@ var DOMAIN_NAME_STYLE = {
|
|
|
4981
4983
|
...NAME_STYLE,
|
|
4982
4984
|
color: "var(--ec-domain-group-text, rgb(var(--ec-page-text)))"
|
|
4983
4985
|
};
|
|
4984
|
-
var SystemGroupNode_default = (0,
|
|
4986
|
+
var SystemGroupNode_default = (0, import_react43.memo)(function SystemGroupNode({ data }) {
|
|
4985
4987
|
const { system, domain, subdomain, isFocused } = data;
|
|
4986
4988
|
const isDomain = !!domain;
|
|
4987
4989
|
const resource = domain ?? system;
|
|
@@ -4989,18 +4991,18 @@ var SystemGroupNode_default = (0, import_react41.memo)(function SystemGroupNode(
|
|
|
4989
4991
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: isDomain ? DOMAIN_CONTAINER_STYLE : CONTAINER_STYLE, children: [
|
|
4990
4992
|
isFocused && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FocusedResourceIndicator, {}),
|
|
4991
4993
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4992
|
-
|
|
4994
|
+
import_react44.Handle,
|
|
4993
4995
|
{
|
|
4994
4996
|
type: "target",
|
|
4995
|
-
position:
|
|
4997
|
+
position: import_react44.Position.Left,
|
|
4996
4998
|
style: HIDDEN_HANDLE_STYLE
|
|
4997
4999
|
}
|
|
4998
5000
|
),
|
|
4999
5001
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5000
|
-
|
|
5002
|
+
import_react44.Handle,
|
|
5001
5003
|
{
|
|
5002
5004
|
type: "source",
|
|
5003
|
-
position:
|
|
5005
|
+
position: import_react44.Position.Right,
|
|
5004
5006
|
style: HIDDEN_HANDLE_STYLE
|
|
5005
5007
|
}
|
|
5006
5008
|
),
|
|
@@ -5028,15 +5030,15 @@ var SystemGroupNode_default = (0, import_react41.memo)(function SystemGroupNode(
|
|
|
5028
5030
|
});
|
|
5029
5031
|
|
|
5030
5032
|
// src/nodes/DomainCard.tsx
|
|
5031
|
-
var
|
|
5033
|
+
var import_react45 = require("@xyflow/react");
|
|
5032
5034
|
var import_lucide_react23 = require("lucide-react");
|
|
5033
|
-
var
|
|
5035
|
+
var import_react46 = require("react");
|
|
5034
5036
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
5035
5037
|
var CARD_STYLE = {
|
|
5036
5038
|
background: "var(--ec-domain-node-bg, rgb(var(--ec-card-bg)))",
|
|
5037
5039
|
boxShadow: "0 2px 12px rgba(234, 179, 8, 0.15)"
|
|
5038
5040
|
};
|
|
5039
|
-
var DomainCard_default = (0,
|
|
5041
|
+
var DomainCard_default = (0, import_react46.memo)(function DomainCardNode({ data }) {
|
|
5040
5042
|
const {
|
|
5041
5043
|
domain,
|
|
5042
5044
|
mode = "simple",
|
|
@@ -5069,18 +5071,18 @@ var DomainCard_default = (0, import_react44.memo)(function DomainCardNode({ data
|
|
|
5069
5071
|
style: CARD_STYLE,
|
|
5070
5072
|
children: [
|
|
5071
5073
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5072
|
-
|
|
5074
|
+
import_react45.Handle,
|
|
5073
5075
|
{
|
|
5074
5076
|
type: "target",
|
|
5075
|
-
position:
|
|
5077
|
+
position: import_react45.Position.Left,
|
|
5076
5078
|
style: HIDDEN_HANDLE_STYLE
|
|
5077
5079
|
}
|
|
5078
5080
|
),
|
|
5079
5081
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5080
|
-
|
|
5082
|
+
import_react45.Handle,
|
|
5081
5083
|
{
|
|
5082
5084
|
type: "source",
|
|
5083
|
-
position:
|
|
5085
|
+
position: import_react45.Position.Right,
|
|
5084
5086
|
style: HIDDEN_HANDLE_STYLE
|
|
5085
5087
|
}
|
|
5086
5088
|
),
|
|
@@ -5133,8 +5135,8 @@ var DomainCard_default = (0, import_react44.memo)(function DomainCardNode({ data
|
|
|
5133
5135
|
});
|
|
5134
5136
|
|
|
5135
5137
|
// src/nodes/Flow.tsx
|
|
5136
|
-
var
|
|
5137
|
-
var
|
|
5138
|
+
var import_react47 = require("react");
|
|
5139
|
+
var import_react48 = require("@xyflow/react");
|
|
5138
5140
|
var import_lucide_react25 = require("lucide-react");
|
|
5139
5141
|
var ContextMenu = __toESM(require("@radix-ui/react-context-menu"));
|
|
5140
5142
|
|
|
@@ -5249,7 +5251,7 @@ var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
|
5249
5251
|
function classNames13(...classes) {
|
|
5250
5252
|
return classes.filter(Boolean).join(" ");
|
|
5251
5253
|
}
|
|
5252
|
-
var Flow_default = (0,
|
|
5254
|
+
var Flow_default = (0, import_react47.memo)(function FlowNode({
|
|
5253
5255
|
data,
|
|
5254
5256
|
sourcePosition,
|
|
5255
5257
|
targetPosition
|
|
@@ -5258,7 +5260,7 @@ var Flow_default = (0, import_react45.memo)(function FlowNode({
|
|
|
5258
5260
|
const canExpand = Array.isArray(data?.expandedNodes) && data.expandedNodes.length > 0;
|
|
5259
5261
|
const { id, version, owners = EMPTY_ARRAY, name, styles } = flow.data;
|
|
5260
5262
|
const { node: { color = "teal", label } = {}, icon = "QueueListIcon" } = styles || {};
|
|
5261
|
-
const Icon = (0,
|
|
5263
|
+
const Icon = (0, import_react47.useMemo)(() => getIcon(icon), [icon]);
|
|
5262
5264
|
const portalContainer = usePortalContainer();
|
|
5263
5265
|
const nodeLabel = label || flow?.data?.sidebar?.badge || "Flow";
|
|
5264
5266
|
const fontSize = nodeLabel.length > 10 ? "7px" : "9px";
|
|
@@ -5316,8 +5318,8 @@ var Flow_default = (0, import_react45.memo)(function FlowNode({
|
|
|
5316
5318
|
}
|
|
5317
5319
|
),
|
|
5318
5320
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "p-1 flex-1 min-w-0", children: [
|
|
5319
|
-
targetPosition && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5320
|
-
sourcePosition && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5321
|
+
targetPosition && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react48.Handle, { type: "target", position: targetPosition }),
|
|
5322
|
+
sourcePosition && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react48.Handle, { type: "source", position: sourcePosition }),
|
|
5321
5323
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
5322
5324
|
"div",
|
|
5323
5325
|
{
|
|
@@ -5396,7 +5398,7 @@ var Flow_default = (0, import_react45.memo)(function FlowNode({
|
|
|
5396
5398
|
});
|
|
5397
5399
|
|
|
5398
5400
|
// src/nodes/FlowExpandedNode.tsx
|
|
5399
|
-
var
|
|
5401
|
+
var import_react49 = require("react");
|
|
5400
5402
|
var import_lucide_react26 = require("lucide-react");
|
|
5401
5403
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
5402
5404
|
var CONTAINER_STYLE2 = {
|
|
@@ -5474,7 +5476,7 @@ var COLLAPSE_BUTTON_STYLE = {
|
|
|
5474
5476
|
fontWeight: 600,
|
|
5475
5477
|
color: "white"
|
|
5476
5478
|
};
|
|
5477
|
-
var FlowExpandedNode_default = (0,
|
|
5479
|
+
var FlowExpandedNode_default = (0, import_react49.memo)(function FlowExpandedNode({
|
|
5478
5480
|
data
|
|
5479
5481
|
}) {
|
|
5480
5482
|
const { flowName, version } = data;
|
|
@@ -5528,9 +5530,9 @@ var FlowExpandedNode_default = (0, import_react47.memo)(function FlowExpandedNod
|
|
|
5528
5530
|
});
|
|
5529
5531
|
|
|
5530
5532
|
// src/nodes/Entity.tsx
|
|
5531
|
-
var
|
|
5533
|
+
var import_react50 = require("@xyflow/react");
|
|
5532
5534
|
var ContextMenu2 = __toESM(require("@radix-ui/react-context-menu"));
|
|
5533
|
-
var
|
|
5535
|
+
var import_react51 = require("react");
|
|
5534
5536
|
var import_solid = require("@heroicons/react/20/solid");
|
|
5535
5537
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
5536
5538
|
var ENTITY_TARGET_HANDLE_ID = "__eventcatalog-entity-target";
|
|
@@ -5550,7 +5552,7 @@ var getNestedEntityProperties = (property) => {
|
|
|
5550
5552
|
}
|
|
5551
5553
|
return [];
|
|
5552
5554
|
};
|
|
5553
|
-
var Entity_default = (0,
|
|
5555
|
+
var Entity_default = (0, import_react51.memo)(function EntityNode({
|
|
5554
5556
|
id,
|
|
5555
5557
|
data,
|
|
5556
5558
|
sourcePosition,
|
|
@@ -5576,19 +5578,19 @@ var Entity_default = (0, import_react49.memo)(function EntityNode({
|
|
|
5576
5578
|
node: { color: _color = "blue", label: _label } = {},
|
|
5577
5579
|
icon = "CubeIcon"
|
|
5578
5580
|
} = styles || {};
|
|
5579
|
-
const Icon = (0,
|
|
5580
|
-
const [hoveredProperty, setHoveredProperty] = (0,
|
|
5581
|
-
const [expandedProperties, setExpandedProperties] = (0,
|
|
5581
|
+
const Icon = (0, import_react51.useMemo)(() => getIcon(icon), [icon]);
|
|
5582
|
+
const [hoveredProperty, setHoveredProperty] = (0, import_react51.useState)(null);
|
|
5583
|
+
const [expandedProperties, setExpandedProperties] = (0, import_react51.useState)(
|
|
5582
5584
|
() => /* @__PURE__ */ new Set()
|
|
5583
5585
|
);
|
|
5584
|
-
const previousExpandedProperties = (0,
|
|
5585
|
-
const updateNodeInternals = (0,
|
|
5586
|
+
const previousExpandedProperties = (0, import_react51.useRef)(expandedProperties);
|
|
5587
|
+
const updateNodeInternals = (0, import_react50.useUpdateNodeInternals)();
|
|
5586
5588
|
const portalContainer = usePortalContainer();
|
|
5587
|
-
const referenceProperties = (0,
|
|
5589
|
+
const referenceProperties = (0, import_react51.useMemo)(
|
|
5588
5590
|
() => new Set(referencePropertyNames),
|
|
5589
5591
|
[referencePropertyNames]
|
|
5590
5592
|
);
|
|
5591
|
-
const toggleProperty = (0,
|
|
5593
|
+
const toggleProperty = (0, import_react51.useCallback)((propertyPath) => {
|
|
5592
5594
|
setExpandedProperties((current) => {
|
|
5593
5595
|
const next = new Set(current);
|
|
5594
5596
|
if (next.has(propertyPath)) {
|
|
@@ -5599,7 +5601,7 @@ var Entity_default = (0, import_react49.memo)(function EntityNode({
|
|
|
5599
5601
|
return next;
|
|
5600
5602
|
});
|
|
5601
5603
|
}, []);
|
|
5602
|
-
(0,
|
|
5604
|
+
(0, import_react51.useEffect)(() => {
|
|
5603
5605
|
if (previousExpandedProperties.current === expandedProperties) return;
|
|
5604
5606
|
previousExpandedProperties.current = expandedProperties;
|
|
5605
5607
|
updateNodeInternals(id);
|
|
@@ -5643,20 +5645,20 @@ var Entity_default = (0, import_react49.memo)(function EntityNode({
|
|
|
5643
5645
|
children: [
|
|
5644
5646
|
isTopLevel && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
5645
5647
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5646
|
-
|
|
5648
|
+
import_react50.Handle,
|
|
5647
5649
|
{
|
|
5648
5650
|
type: "target",
|
|
5649
|
-
position:
|
|
5651
|
+
position: import_react50.Position.Left,
|
|
5650
5652
|
id: `${property.name}-target`,
|
|
5651
5653
|
className: "!w-3 !h-3 !bg-[rgb(var(--ec-card-bg))] !border-2 !border-[rgb(var(--ec-page-border))] !rounded-full !left-[-0px]",
|
|
5652
5654
|
style: HANDLE_LEFT_OFFSET_STYLE
|
|
5653
5655
|
}
|
|
5654
5656
|
),
|
|
5655
5657
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5656
|
-
|
|
5658
|
+
import_react50.Handle,
|
|
5657
5659
|
{
|
|
5658
5660
|
type: "source",
|
|
5659
|
-
position:
|
|
5661
|
+
position: import_react50.Position.Right,
|
|
5660
5662
|
id: `${property.name}-source`,
|
|
5661
5663
|
className: "!w-3 !h-3 !bg-[rgb(var(--ec-card-bg))] !border-2 !border-[rgb(var(--ec-page-border))] !rounded-full !right-[-0px]",
|
|
5662
5664
|
style: HANDLE_RIGHT_OFFSET_STYLE
|
|
@@ -5713,10 +5715,10 @@ var Entity_default = (0, import_react49.memo)(function EntityNode({
|
|
|
5713
5715
|
),
|
|
5714
5716
|
children: [
|
|
5715
5717
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5716
|
-
|
|
5718
|
+
import_react50.Handle,
|
|
5717
5719
|
{
|
|
5718
5720
|
type: "target",
|
|
5719
|
-
position:
|
|
5721
|
+
position: import_react50.Position.Left,
|
|
5720
5722
|
id: entityTargetHandle,
|
|
5721
5723
|
className: "!w-3 !h-3 !bg-[rgb(var(--ec-card-bg))] !border-2 !border-[rgb(var(--ec-page-border))] !rounded-full !left-[-0px]",
|
|
5722
5724
|
style: HANDLE_LEFT_OFFSET_STYLE
|
|
@@ -5749,8 +5751,8 @@ var Entity_default = (0, import_react49.memo)(function EntityNode({
|
|
|
5749
5751
|
),
|
|
5750
5752
|
properties.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "divide-y divide-[rgb(var(--ec-page-border))] relative", children: renderPropertyRows(properties) }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "px-4 py-3 text-sm text-[rgb(var(--ec-page-text-muted))] text-center", children: "No properties defined" }),
|
|
5751
5753
|
properties.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
5752
|
-
targetPosition && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5753
|
-
sourcePosition && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5754
|
+
targetPosition && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react50.Handle, { type: "target", position: targetPosition }),
|
|
5755
|
+
sourcePosition && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react50.Handle, { type: "source", position: sourcePosition })
|
|
5754
5756
|
] })
|
|
5755
5757
|
]
|
|
5756
5758
|
}
|
|
@@ -5792,14 +5794,14 @@ var Entity_default = (0, import_react49.memo)(function EntityNode({
|
|
|
5792
5794
|
});
|
|
5793
5795
|
|
|
5794
5796
|
// src/nodes/User.tsx
|
|
5795
|
-
var
|
|
5797
|
+
var import_react52 = require("react");
|
|
5796
5798
|
var import_solid2 = require("@heroicons/react/20/solid");
|
|
5797
|
-
var
|
|
5799
|
+
var import_react53 = require("@xyflow/react");
|
|
5798
5800
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
5799
5801
|
function classNames15(...classes) {
|
|
5800
5802
|
return classes.filter(Boolean).join(" ");
|
|
5801
5803
|
}
|
|
5802
|
-
var User_default = (0,
|
|
5804
|
+
var User_default = (0, import_react52.memo)(function UserNode({
|
|
5803
5805
|
data,
|
|
5804
5806
|
sourcePosition,
|
|
5805
5807
|
targetPosition
|
|
@@ -5842,8 +5844,8 @@ var User_default = (0, import_react50.memo)(function UserNode({
|
|
|
5842
5844
|
}
|
|
5843
5845
|
),
|
|
5844
5846
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "p-1 flex-1 min-w-0", children: [
|
|
5845
|
-
targetPosition && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
5846
|
-
sourcePosition && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
5847
|
+
targetPosition && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react53.Handle, { type: "target", position: targetPosition }),
|
|
5848
|
+
sourcePosition && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react53.Handle, { type: "source", position: sourcePosition }),
|
|
5847
5849
|
(!summary || mode !== "full") && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "h-full min-w-0", children: [
|
|
5848
5850
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
5849
5851
|
TruncatedResourceName,
|
|
@@ -5885,13 +5887,13 @@ var User_default = (0, import_react50.memo)(function UserNode({
|
|
|
5885
5887
|
});
|
|
5886
5888
|
|
|
5887
5889
|
// src/nodes/Step.tsx
|
|
5888
|
-
var
|
|
5889
|
-
var
|
|
5890
|
+
var import_react54 = require("react");
|
|
5891
|
+
var import_react55 = require("@xyflow/react");
|
|
5890
5892
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
5891
5893
|
function classNames16(...classes) {
|
|
5892
5894
|
return classes.filter(Boolean).join(" ");
|
|
5893
5895
|
}
|
|
5894
|
-
var Step_default = (0,
|
|
5896
|
+
var Step_default = (0, import_react54.memo)(function StepNode({
|
|
5895
5897
|
data,
|
|
5896
5898
|
sourcePosition,
|
|
5897
5899
|
targetPosition
|
|
@@ -5925,18 +5927,18 @@ var Step_default = (0, import_react52.memo)(function StepNode({
|
|
|
5925
5927
|
),
|
|
5926
5928
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "p-1 flex-1 min-w-0", children: [
|
|
5927
5929
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5928
|
-
|
|
5930
|
+
import_react55.Handle,
|
|
5929
5931
|
{
|
|
5930
5932
|
type: "target",
|
|
5931
|
-
position: targetPosition ||
|
|
5933
|
+
position: targetPosition || import_react55.Position.Left,
|
|
5932
5934
|
style: HIDDEN_HANDLE_STYLE
|
|
5933
5935
|
}
|
|
5934
5936
|
),
|
|
5935
5937
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5936
|
-
|
|
5938
|
+
import_react55.Handle,
|
|
5937
5939
|
{
|
|
5938
5940
|
type: "source",
|
|
5939
|
-
position: sourcePosition ||
|
|
5941
|
+
position: sourcePosition || import_react55.Position.Right,
|
|
5940
5942
|
style: HIDDEN_HANDLE_STYLE
|
|
5941
5943
|
}
|
|
5942
5944
|
),
|
|
@@ -5978,28 +5980,28 @@ var Step_default = (0, import_react52.memo)(function StepNode({
|
|
|
5978
5980
|
});
|
|
5979
5981
|
|
|
5980
5982
|
// src/nodes/Domain.tsx
|
|
5981
|
-
var
|
|
5983
|
+
var import_react56 = require("@xyflow/react");
|
|
5982
5984
|
var ContextMenu3 = __toESM(require("@radix-ui/react-context-menu"));
|
|
5983
|
-
var
|
|
5985
|
+
var import_react57 = require("react");
|
|
5984
5986
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
5985
|
-
var Domain_default = (0,
|
|
5987
|
+
var Domain_default = (0, import_react57.memo)(function DomainNode({ data, id: nodeId }) {
|
|
5986
5988
|
const { mode, domain } = data;
|
|
5987
|
-
const reactFlow = (0,
|
|
5988
|
-
const [highlightedServices, setHighlightedServices] = (0,
|
|
5989
|
+
const reactFlow = (0, import_react56.useReactFlow)();
|
|
5990
|
+
const [highlightedServices, setHighlightedServices] = (0, import_react57.useState)(
|
|
5989
5991
|
/* @__PURE__ */ new Set()
|
|
5990
5992
|
);
|
|
5991
5993
|
const { id, version, name, services = [], styles } = domain.data;
|
|
5992
5994
|
const { icon = "RectangleGroupIcon" } = styles || {};
|
|
5993
|
-
const Icon = (0,
|
|
5994
|
-
const ServerIcon6 = (0,
|
|
5995
|
+
const Icon = (0, import_react57.useMemo)(() => getIcon(icon), [icon]);
|
|
5996
|
+
const ServerIcon6 = (0, import_react57.useMemo)(() => getIcon("ServerIcon"), []);
|
|
5995
5997
|
const portalContainer = usePortalContainer();
|
|
5996
|
-
const highlight = (0,
|
|
5998
|
+
const highlight = (0, import_react57.useCallback)(
|
|
5997
5999
|
(ids) => setHighlightedServices(
|
|
5998
6000
|
(current) => current.size === ids.size && [...ids].every((id2) => current.has(id2)) ? current : ids
|
|
5999
6001
|
),
|
|
6000
6002
|
[]
|
|
6001
6003
|
);
|
|
6002
|
-
const handleSelectionChange = (0,
|
|
6004
|
+
const handleSelectionChange = (0, import_react57.useCallback)(
|
|
6003
6005
|
({ nodes: selectedNodes }) => {
|
|
6004
6006
|
const selectedNode = selectedNodes[0];
|
|
6005
6007
|
if (!selectedNode) {
|
|
@@ -6024,24 +6026,24 @@ var Domain_default = (0, import_react55.memo)(function DomainNode({ data, id: no
|
|
|
6024
6026
|
},
|
|
6025
6027
|
[nodeId, reactFlow, highlight]
|
|
6026
6028
|
);
|
|
6027
|
-
(0,
|
|
6029
|
+
(0, import_react56.useOnSelectionChange)({
|
|
6028
6030
|
onChange: handleSelectionChange
|
|
6029
6031
|
});
|
|
6030
6032
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(ContextMenu3.Root, { children: [
|
|
6031
6033
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ContextMenu3.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "w-full rounded-lg border-2 border-yellow-400 bg-[rgb(var(--ec-card-bg))] shadow-lg", children: [
|
|
6032
6034
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
6033
|
-
|
|
6035
|
+
import_react56.Handle,
|
|
6034
6036
|
{
|
|
6035
6037
|
type: "target",
|
|
6036
|
-
position:
|
|
6038
|
+
position: import_react56.Position.Left,
|
|
6037
6039
|
style: HIDDEN_HANDLE_STYLE
|
|
6038
6040
|
}
|
|
6039
6041
|
),
|
|
6040
6042
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
6041
|
-
|
|
6043
|
+
import_react56.Handle,
|
|
6042
6044
|
{
|
|
6043
6045
|
type: "source",
|
|
6044
|
-
position:
|
|
6046
|
+
position: import_react56.Position.Right,
|
|
6045
6047
|
style: HIDDEN_HANDLE_STYLE
|
|
6046
6048
|
}
|
|
6047
6049
|
),
|
|
@@ -6064,20 +6066,20 @@ var Domain_default = (0, import_react55.memo)(function DomainNode({ data, id: no
|
|
|
6064
6066
|
className: `relative flex items-center justify-between px-3 py-2 cursor-pointer ${index !== services.length - 1 ? "border-b border-[rgb(var(--ec-page-border))]" : ""} ${isHighlighted ? "bg-pink-100 border-pink-300" : ""}`,
|
|
6065
6067
|
children: [
|
|
6066
6068
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
6067
|
-
|
|
6069
|
+
import_react56.Handle,
|
|
6068
6070
|
{
|
|
6069
6071
|
type: "target",
|
|
6070
|
-
position:
|
|
6072
|
+
position: import_react56.Position.Left,
|
|
6071
6073
|
id: `${service.data.id}-target`,
|
|
6072
6074
|
className: "!left-[-1px] !w-2 !h-2 !bg-gray-400 !border !border-gray-500 !rounded-full !z-10",
|
|
6073
6075
|
style: HANDLE_LEFT_STYLE
|
|
6074
6076
|
}
|
|
6075
6077
|
),
|
|
6076
6078
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
6077
|
-
|
|
6079
|
+
import_react56.Handle,
|
|
6078
6080
|
{
|
|
6079
6081
|
type: "source",
|
|
6080
|
-
position:
|
|
6082
|
+
position: import_react56.Position.Right,
|
|
6081
6083
|
id: `${service.data.id}-source`,
|
|
6082
6084
|
className: "!right-[-1px] !w-2 !h-2 !bg-gray-400 !border !border-gray-500 !rounded-full !z-10",
|
|
6083
6085
|
style: HANDLE_RIGHT_STYLE
|
|
@@ -6145,14 +6147,14 @@ var Domain_default = (0, import_react55.memo)(function DomainNode({ data, id: no
|
|
|
6145
6147
|
});
|
|
6146
6148
|
|
|
6147
6149
|
// src/nodes/System.tsx
|
|
6148
|
-
var
|
|
6150
|
+
var import_react58 = require("@xyflow/react");
|
|
6149
6151
|
var import_lucide_react27 = require("lucide-react");
|
|
6150
|
-
var
|
|
6152
|
+
var import_react59 = require("react");
|
|
6151
6153
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
6152
6154
|
function classNames17(...classes) {
|
|
6153
6155
|
return classes.filter(Boolean).join(" ");
|
|
6154
6156
|
}
|
|
6155
|
-
var System_default = (0,
|
|
6157
|
+
var System_default = (0, import_react59.memo)(function SystemNode({ data }) {
|
|
6156
6158
|
const {
|
|
6157
6159
|
system,
|
|
6158
6160
|
mode = "simple",
|
|
@@ -6202,18 +6204,18 @@ var System_default = (0, import_react57.memo)(function SystemNode({ data }) {
|
|
|
6202
6204
|
children: [
|
|
6203
6205
|
isFocused && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(FocusedResourceIndicator, {}),
|
|
6204
6206
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6205
|
-
|
|
6207
|
+
import_react58.Handle,
|
|
6206
6208
|
{
|
|
6207
6209
|
type: "target",
|
|
6208
|
-
position:
|
|
6210
|
+
position: import_react58.Position.Left,
|
|
6209
6211
|
style: HIDDEN_HANDLE_STYLE
|
|
6210
6212
|
}
|
|
6211
6213
|
),
|
|
6212
6214
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6213
|
-
|
|
6215
|
+
import_react58.Handle,
|
|
6214
6216
|
{
|
|
6215
6217
|
type: "source",
|
|
6216
|
-
position:
|
|
6218
|
+
position: import_react58.Position.Right,
|
|
6217
6219
|
style: HIDDEN_HANDLE_STYLE
|
|
6218
6220
|
}
|
|
6219
6221
|
),
|
|
@@ -6268,7 +6270,7 @@ var System_default = (0, import_react57.memo)(function SystemNode({ data }) {
|
|
|
6268
6270
|
});
|
|
6269
6271
|
|
|
6270
6272
|
// src/nodes/GroupNode.tsx
|
|
6271
|
-
var
|
|
6273
|
+
var import_react60 = require("react");
|
|
6272
6274
|
var import_lucide_react28 = require("lucide-react");
|
|
6273
6275
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
6274
6276
|
var GROUP_CONTAINER_STYLE = {
|
|
@@ -6344,7 +6346,7 @@ var GROUP_VERSION_STYLE = {
|
|
|
6344
6346
|
};
|
|
6345
6347
|
var GROUP_ICON_COLOR_STYLE = { color: "#7c3aed" };
|
|
6346
6348
|
var GROUP_ICON_WHITE_STYLE = { color: "white" };
|
|
6347
|
-
var GroupNode_default = (0,
|
|
6349
|
+
var GroupNode_default = (0, import_react60.memo)(function GroupNode({ data }) {
|
|
6348
6350
|
const { domain } = data;
|
|
6349
6351
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { style: GROUP_CONTAINER_STYLE, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: GROUP_HEADER_STYLE, children: [
|
|
6350
6352
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { style: GROUP_WATERMARK_STYLE, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react28.BoxesIcon, { size: 28, strokeWidth: 2, style: GROUP_ICON_COLOR_STYLE }) }),
|
|
@@ -6376,8 +6378,8 @@ var GroupNode_default = (0, import_react58.memo)(function GroupNode({ data }) {
|
|
|
6376
6378
|
});
|
|
6377
6379
|
|
|
6378
6380
|
// src/nodes/Custom.tsx
|
|
6379
|
-
var
|
|
6380
|
-
var
|
|
6381
|
+
var import_react61 = require("react");
|
|
6382
|
+
var import_react62 = require("@xyflow/react");
|
|
6381
6383
|
var Icons = __toESM(require("@heroicons/react/24/solid"));
|
|
6382
6384
|
var ContextMenu4 = __toESM(require("@radix-ui/react-context-menu"));
|
|
6383
6385
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
@@ -6542,7 +6544,7 @@ function GlowHandle18({
|
|
|
6542
6544
|
}
|
|
6543
6545
|
);
|
|
6544
6546
|
}
|
|
6545
|
-
var Custom_default = (0,
|
|
6547
|
+
var Custom_default = (0, import_react61.memo)(function CustomNode({ data, selected }) {
|
|
6546
6548
|
const { mode, custom: customProps, step } = data;
|
|
6547
6549
|
const {
|
|
6548
6550
|
color = "blue",
|
|
@@ -6556,10 +6558,9 @@ var Custom_default = (0, import_react59.memo)(function CustomNode({ data, select
|
|
|
6556
6558
|
height = 5
|
|
6557
6559
|
} = customProps;
|
|
6558
6560
|
const palette = getPalette(color);
|
|
6559
|
-
const IconComponent = (0,
|
|
6561
|
+
const IconComponent = (0, import_react61.useMemo)(() => Icons[icon] || Icons.CubeIcon, [icon]);
|
|
6560
6562
|
const portalContainer = usePortalContainer();
|
|
6561
|
-
const
|
|
6562
|
-
const sourceConnections = (0, import_react60.useNodeConnections)({ handleType: "source" });
|
|
6563
|
+
const connected = useNodeHasConnections();
|
|
6563
6564
|
const propertyEntries = Object.entries(properties);
|
|
6564
6565
|
const contextMenuItems = url ? [{ label: `Open ${type.toLowerCase()}`, url }, ...menu] : menu;
|
|
6565
6566
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(ContextMenu4.Root, { children: [
|
|
@@ -6578,23 +6579,23 @@ var Custom_default = (0, import_react59.memo)(function CustomNode({ data, select
|
|
|
6578
6579
|
},
|
|
6579
6580
|
children: [
|
|
6580
6581
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6581
|
-
|
|
6582
|
+
import_react62.Handle,
|
|
6582
6583
|
{
|
|
6583
6584
|
type: "target",
|
|
6584
|
-
position:
|
|
6585
|
+
position: import_react62.Position.Left,
|
|
6585
6586
|
style: HIDDEN_HANDLE_STYLE
|
|
6586
6587
|
}
|
|
6587
6588
|
),
|
|
6588
6589
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6589
|
-
|
|
6590
|
+
import_react62.Handle,
|
|
6590
6591
|
{
|
|
6591
6592
|
type: "source",
|
|
6592
|
-
position:
|
|
6593
|
+
position: import_react62.Position.Right,
|
|
6593
6594
|
style: HIDDEN_HANDLE_STYLE
|
|
6594
6595
|
}
|
|
6595
6596
|
),
|
|
6596
|
-
|
|
6597
|
-
|
|
6597
|
+
connected.target && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(GlowHandle18, { side: "left", gradient: palette.glow }),
|
|
6598
|
+
connected.source && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(GlowHandle18, { side: "right", gradient: palette.glow }),
|
|
6598
6599
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "absolute -top-3 left-2.5 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
6599
6600
|
"span",
|
|
6600
6601
|
{
|
|
@@ -6674,25 +6675,25 @@ var Custom_default = (0, import_react59.memo)(function CustomNode({ data, select
|
|
|
6674
6675
|
});
|
|
6675
6676
|
|
|
6676
6677
|
// src/nodes/ExternalSystem2.tsx
|
|
6677
|
-
var
|
|
6678
|
-
var
|
|
6678
|
+
var import_react63 = require("react");
|
|
6679
|
+
var import_react64 = require("@xyflow/react");
|
|
6679
6680
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
6680
|
-
var ExternalSystem2_default = (0,
|
|
6681
|
+
var ExternalSystem2_default = (0, import_react63.memo)(function ExternalSystemNode(props) {
|
|
6681
6682
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative", children: [
|
|
6682
6683
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6683
|
-
|
|
6684
|
+
import_react64.Handle,
|
|
6684
6685
|
{
|
|
6685
6686
|
type: "target",
|
|
6686
|
-
position:
|
|
6687
|
+
position: import_react64.Position.Left,
|
|
6687
6688
|
style: EXTERNAL_SYSTEM_HANDLE_STYLE,
|
|
6688
6689
|
className: "bg-gray-500"
|
|
6689
6690
|
}
|
|
6690
6691
|
),
|
|
6691
6692
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6692
|
-
|
|
6693
|
+
import_react64.Handle,
|
|
6693
6694
|
{
|
|
6694
6695
|
type: "source",
|
|
6695
|
-
position:
|
|
6696
|
+
position: import_react64.Position.Right,
|
|
6696
6697
|
style: EXTERNAL_SYSTEM_HANDLE_STYLE,
|
|
6697
6698
|
className: "bg-gray-500"
|
|
6698
6699
|
}
|
|
@@ -6702,9 +6703,9 @@ var ExternalSystem2_default = (0, import_react61.memo)(function ExternalSystemNo
|
|
|
6702
6703
|
});
|
|
6703
6704
|
|
|
6704
6705
|
// src/nodes/DataProduct.tsx
|
|
6705
|
-
var
|
|
6706
|
+
var import_react65 = require("react");
|
|
6706
6707
|
var import_lucide_react29 = require("lucide-react");
|
|
6707
|
-
var
|
|
6708
|
+
var import_react66 = require("@xyflow/react");
|
|
6708
6709
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
6709
6710
|
function GlowHandle19({ side }) {
|
|
6710
6711
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
@@ -6744,18 +6745,18 @@ function PostItDataProduct(props) {
|
|
|
6744
6745
|
),
|
|
6745
6746
|
children: [
|
|
6746
6747
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6747
|
-
|
|
6748
|
+
import_react66.Handle,
|
|
6748
6749
|
{
|
|
6749
6750
|
type: "target",
|
|
6750
|
-
position:
|
|
6751
|
+
position: import_react66.Position.Left,
|
|
6751
6752
|
style: HIDDEN_HANDLE_STYLE
|
|
6752
6753
|
}
|
|
6753
6754
|
),
|
|
6754
6755
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6755
|
-
|
|
6756
|
+
import_react66.Handle,
|
|
6756
6757
|
{
|
|
6757
6758
|
type: "source",
|
|
6758
|
-
position:
|
|
6759
|
+
position: import_react66.Position.Right,
|
|
6759
6760
|
style: HIDDEN_HANDLE_STYLE
|
|
6760
6761
|
}
|
|
6761
6762
|
),
|
|
@@ -6845,8 +6846,7 @@ function DefaultDataProduct(props) {
|
|
|
6845
6846
|
const { version, name, summary, deprecated, draft, notes, styles } = props.data.dataProduct;
|
|
6846
6847
|
const mode = props.data.mode || "simple";
|
|
6847
6848
|
const customIcon = isIconPath(styles?.icon) ? styles.icon : void 0;
|
|
6848
|
-
const
|
|
6849
|
-
const sourceConnections = (0, import_react64.useNodeConnections)({ handleType: "source" });
|
|
6849
|
+
const connected = useNodeHasConnections();
|
|
6850
6850
|
const isDark = useDarkMode();
|
|
6851
6851
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
6852
6852
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
@@ -6863,24 +6863,24 @@ function DefaultDataProduct(props) {
|
|
|
6863
6863
|
},
|
|
6864
6864
|
children: [
|
|
6865
6865
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6866
|
-
|
|
6866
|
+
import_react66.Handle,
|
|
6867
6867
|
{
|
|
6868
6868
|
type: "target",
|
|
6869
|
-
position:
|
|
6869
|
+
position: import_react66.Position.Left,
|
|
6870
6870
|
style: HIDDEN_HANDLE_STYLE
|
|
6871
6871
|
}
|
|
6872
6872
|
),
|
|
6873
6873
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6874
|
-
|
|
6874
|
+
import_react66.Handle,
|
|
6875
6875
|
{
|
|
6876
6876
|
type: "source",
|
|
6877
|
-
position:
|
|
6877
|
+
position: import_react66.Position.Right,
|
|
6878
6878
|
style: HIDDEN_HANDLE_STYLE
|
|
6879
6879
|
}
|
|
6880
6880
|
),
|
|
6881
6881
|
notes && notes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(NotesIndicator, { notes, resourceName: name }),
|
|
6882
|
-
|
|
6883
|
-
|
|
6882
|
+
connected.target && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(GlowHandle19, { side: "left" }),
|
|
6883
|
+
connected.source && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(GlowHandle19, { side: "right" }),
|
|
6884
6884
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "absolute -top-2.5 left-2.5 flex items-center gap-1.5 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
6885
6885
|
"span",
|
|
6886
6886
|
{
|
|
@@ -6937,7 +6937,7 @@ function DefaultDataProduct(props) {
|
|
|
6937
6937
|
}
|
|
6938
6938
|
);
|
|
6939
6939
|
}
|
|
6940
|
-
var DataProduct_default = (0,
|
|
6940
|
+
var DataProduct_default = (0, import_react65.memo)(function DataProductNode(props) {
|
|
6941
6941
|
const nodeStyle = props?.data?.style;
|
|
6942
6942
|
if (nodeStyle === "post-it") {
|
|
6943
6943
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(PostItDataProduct, { ...props });
|
|
@@ -6946,11 +6946,11 @@ var DataProduct_default = (0, import_react63.memo)(function DataProductNode(prop
|
|
|
6946
6946
|
});
|
|
6947
6947
|
|
|
6948
6948
|
// src/nodes/SwimlaneNode.tsx
|
|
6949
|
-
var
|
|
6949
|
+
var import_react68 = require("react");
|
|
6950
6950
|
var import_lucide_react30 = require("lucide-react");
|
|
6951
6951
|
|
|
6952
6952
|
// src/utils/utils/utils.ts
|
|
6953
|
-
var
|
|
6953
|
+
var import_react67 = require("@xyflow/react");
|
|
6954
6954
|
var generateIdForNode = (node) => {
|
|
6955
6955
|
return `${node.data.id}-${node.data.version}`;
|
|
6956
6956
|
};
|
|
@@ -7015,7 +7015,7 @@ var createEdge = (edgeOptions) => {
|
|
|
7015
7015
|
// height: 40,
|
|
7016
7016
|
// },
|
|
7017
7017
|
markerEnd: {
|
|
7018
|
-
type:
|
|
7018
|
+
type: import_react67.MarkerType.ArrowClosed,
|
|
7019
7019
|
width: 40,
|
|
7020
7020
|
height: 40,
|
|
7021
7021
|
color: "rgb(var(--ec-page-text-muted))"
|
|
@@ -7030,8 +7030,8 @@ var createEdge = (edgeOptions) => {
|
|
|
7030
7030
|
};
|
|
7031
7031
|
var createNode = (values) => {
|
|
7032
7032
|
return {
|
|
7033
|
-
sourcePosition:
|
|
7034
|
-
targetPosition:
|
|
7033
|
+
sourcePosition: import_react67.Position.Right,
|
|
7034
|
+
targetPosition: import_react67.Position.Left,
|
|
7035
7035
|
...values
|
|
7036
7036
|
};
|
|
7037
7037
|
};
|
|
@@ -7548,7 +7548,7 @@ var LABEL_STYLE = {
|
|
|
7548
7548
|
letterSpacing: "0.01em",
|
|
7549
7549
|
color: "rgb(var(--ec-page-text))"
|
|
7550
7550
|
};
|
|
7551
|
-
var SwimlaneNode_default = (0,
|
|
7551
|
+
var SwimlaneNode_default = (0, import_react68.memo)(function SwimlaneNode({ data }) {
|
|
7552
7552
|
const { label, level, kind, index, style } = data;
|
|
7553
7553
|
const Icon = kind === "external" ? import_lucide_react30.Globe : kind === "unassigned" ? import_lucide_react30.HelpCircle : LANE_ICONS[level];
|
|
7554
7554
|
const tint = kind === "lane" ? LANE_TINTS[level] : NEUTRAL_TINT;
|
|
@@ -7573,9 +7573,9 @@ var SwimlaneNode_default = (0, import_react66.memo)(function SwimlaneNode({ data
|
|
|
7573
7573
|
});
|
|
7574
7574
|
|
|
7575
7575
|
// src/nodes/message-group/MessageGroupNode.tsx
|
|
7576
|
-
var
|
|
7576
|
+
var import_react69 = require("react");
|
|
7577
7577
|
var import_lucide_react31 = require("lucide-react");
|
|
7578
|
-
var
|
|
7578
|
+
var import_react70 = require("@xyflow/react");
|
|
7579
7579
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
7580
7580
|
var TYPE_ICONS = {
|
|
7581
7581
|
events: import_lucide_react31.Zap,
|
|
@@ -7588,13 +7588,12 @@ var CARD_STYLE2 = {
|
|
|
7588
7588
|
background: "var(--ec-message-group-node-bg, rgb(var(--ec-card-bg)))",
|
|
7589
7589
|
pointerEvents: "none"
|
|
7590
7590
|
};
|
|
7591
|
-
var MessageGroupNode_default = (0,
|
|
7591
|
+
var MessageGroupNode_default = (0, import_react69.memo)(function MessageGroupNode(props) {
|
|
7592
7592
|
const { groupName, messageCount } = props.data;
|
|
7593
7593
|
const isDark = useDarkMode();
|
|
7594
|
-
const
|
|
7595
|
-
const sourceConnections = (0, import_react68.useNodeConnections)({ handleType: "source" });
|
|
7594
|
+
const connected = useNodeHasConnections();
|
|
7596
7595
|
const stackDepth = messageCount >= 3 ? 3 : messageCount;
|
|
7597
|
-
const typeBreakdown = (0,
|
|
7596
|
+
const typeBreakdown = (0, import_react69.useMemo)(() => {
|
|
7598
7597
|
const counts = {};
|
|
7599
7598
|
props.data.messages.forEach(({ message }) => {
|
|
7600
7599
|
const type = message?.collection || "unknown";
|
|
@@ -7637,22 +7636,22 @@ var MessageGroupNode_default = (0, import_react67.memo)(function MessageGroupNod
|
|
|
7637
7636
|
},
|
|
7638
7637
|
children: [
|
|
7639
7638
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7640
|
-
|
|
7639
|
+
import_react70.Handle,
|
|
7641
7640
|
{
|
|
7642
7641
|
type: "target",
|
|
7643
|
-
position:
|
|
7642
|
+
position: import_react70.Position.Left,
|
|
7644
7643
|
style: HIDDEN_HANDLE_STYLE
|
|
7645
7644
|
}
|
|
7646
7645
|
),
|
|
7647
7646
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7648
|
-
|
|
7647
|
+
import_react70.Handle,
|
|
7649
7648
|
{
|
|
7650
7649
|
type: "source",
|
|
7651
|
-
position:
|
|
7650
|
+
position: import_react70.Position.Right,
|
|
7652
7651
|
style: HIDDEN_HANDLE_STYLE
|
|
7653
7652
|
}
|
|
7654
7653
|
),
|
|
7655
|
-
|
|
7654
|
+
connected.target && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7656
7655
|
"div",
|
|
7657
7656
|
{
|
|
7658
7657
|
className: "ec-handle-glow",
|
|
@@ -7672,7 +7671,7 @@ var MessageGroupNode_default = (0, import_react67.memo)(function MessageGroupNod
|
|
|
7672
7671
|
}
|
|
7673
7672
|
}
|
|
7674
7673
|
),
|
|
7675
|
-
|
|
7674
|
+
connected.source && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7676
7675
|
"div",
|
|
7677
7676
|
{
|
|
7678
7677
|
className: "ec-handle-glow",
|
|
@@ -7750,7 +7749,7 @@ var MessageGroupNode_default = (0, import_react67.memo)(function MessageGroupNod
|
|
|
7750
7749
|
});
|
|
7751
7750
|
|
|
7752
7751
|
// src/nodes/message-group/MessageGroupExpandedNode.tsx
|
|
7753
|
-
var
|
|
7752
|
+
var import_react71 = require("react");
|
|
7754
7753
|
var import_lucide_react32 = require("lucide-react");
|
|
7755
7754
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
7756
7755
|
var CONTAINER_STYLE3 = {
|
|
@@ -7821,7 +7820,7 @@ var COLLAPSE_BUTTON_STYLE2 = {
|
|
|
7821
7820
|
fontWeight: 600,
|
|
7822
7821
|
color: "white"
|
|
7823
7822
|
};
|
|
7824
|
-
var MessageGroupExpandedNode_default = (0,
|
|
7823
|
+
var MessageGroupExpandedNode_default = (0, import_react71.memo)(function MessageGroupExpandedNode({
|
|
7825
7824
|
data
|
|
7826
7825
|
}) {
|
|
7827
7826
|
const { groupName, messageCount } = data;
|
|
@@ -7949,11 +7948,35 @@ var RESOURCE_NODE_TYPES = /* @__PURE__ */ new Set([
|
|
|
7949
7948
|
]);
|
|
7950
7949
|
|
|
7951
7950
|
// src/edges/AnimatedMessageEdge.tsx
|
|
7952
|
-
var
|
|
7953
|
-
var
|
|
7951
|
+
var import_react75 = require("react");
|
|
7952
|
+
var import_react76 = require("@xyflow/react");
|
|
7954
7953
|
|
|
7955
|
-
// src/
|
|
7956
|
-
var
|
|
7954
|
+
// src/utils/flow-portals.tsx
|
|
7955
|
+
var import_react_dom = require("react-dom");
|
|
7956
|
+
var import_react72 = require("@xyflow/react");
|
|
7957
|
+
var layerSelector = (className) => {
|
|
7958
|
+
const found = /* @__PURE__ */ new WeakMap();
|
|
7959
|
+
return (state) => {
|
|
7960
|
+
const root = state.domNode;
|
|
7961
|
+
if (!root) return null;
|
|
7962
|
+
let layer = found.get(root);
|
|
7963
|
+
if (!layer?.isConnected) {
|
|
7964
|
+
layer = root.querySelector(className);
|
|
7965
|
+
found.set(root, layer);
|
|
7966
|
+
}
|
|
7967
|
+
return layer;
|
|
7968
|
+
};
|
|
7969
|
+
};
|
|
7970
|
+
var selectEdgeLabelLayer = layerSelector(".react-flow__edgelabel-renderer");
|
|
7971
|
+
var selectViewportLayer = layerSelector(".react-flow__viewport-portal");
|
|
7972
|
+
function EdgeLabelPortal({ children }) {
|
|
7973
|
+
const layer = (0, import_react72.useStore)(selectEdgeLabelLayer);
|
|
7974
|
+
return layer ? (0, import_react_dom.createPortal)(children, layer) : null;
|
|
7975
|
+
}
|
|
7976
|
+
function CanvasPortal({ children }) {
|
|
7977
|
+
const layer = (0, import_react72.useStore)(selectViewportLayer);
|
|
7978
|
+
return layer ? (0, import_react_dom.createPortal)(children, layer) : null;
|
|
7979
|
+
}
|
|
7957
7980
|
|
|
7958
7981
|
// src/edges/use-cross-domain.ts
|
|
7959
7982
|
var CROSS_DOMAIN_CLASS = "ec-cross-domain";
|
|
@@ -7971,7 +7994,7 @@ function EdgeLabel({
|
|
|
7971
7994
|
}) {
|
|
7972
7995
|
if (label === void 0 || label === null || label === "") return null;
|
|
7973
7996
|
const lines = String(label).split("\n");
|
|
7974
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
7997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(EdgeLabelPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
7975
7998
|
"div",
|
|
7976
7999
|
{
|
|
7977
8000
|
className: `ec-edge-label ${crossDomain ? CROSS_DOMAIN_CLASS : ""} nodrag nopan rounded-md border border-[rgb(var(--ec-page-border))] px-2 py-1 text-center text-[10px] font-medium leading-tight text-[rgb(var(--ec-page-text))] shadow-sm`,
|
|
@@ -7996,8 +8019,8 @@ function EdgeLabel({
|
|
|
7996
8019
|
}
|
|
7997
8020
|
|
|
7998
8021
|
// src/edges/route.ts
|
|
7999
|
-
var
|
|
8000
|
-
var
|
|
8022
|
+
var import_react73 = require("react");
|
|
8023
|
+
var import_react74 = require("@xyflow/react");
|
|
8001
8024
|
var ROUTE_TOLERANCE = { x: 60, y: 400 };
|
|
8002
8025
|
var isStraight = (a, b) => a.x === b.x || a.y === b.y;
|
|
8003
8026
|
var add = (a, b) => ({ x: a.x + b.x, y: a.y + b.y });
|
|
@@ -8082,8 +8105,8 @@ var useRoute = ({
|
|
|
8082
8105
|
targetHandleId
|
|
8083
8106
|
}, [path, labelX, labelY]) => {
|
|
8084
8107
|
const route = data?.route;
|
|
8085
|
-
const { moved, zIndex } = (0,
|
|
8086
|
-
(0,
|
|
8108
|
+
const { moved, zIndex } = (0, import_react74.useStore)(
|
|
8109
|
+
(0, import_react73.useCallback)(
|
|
8087
8110
|
(state) => {
|
|
8088
8111
|
const z = (nodeId) => {
|
|
8089
8112
|
const node = state.nodeLookup.get(nodeId);
|
|
@@ -8136,7 +8159,7 @@ function messageColor(collection) {
|
|
|
8136
8159
|
return "gray";
|
|
8137
8160
|
}
|
|
8138
8161
|
}
|
|
8139
|
-
var AnimatedMessageEdge = (0,
|
|
8162
|
+
var AnimatedMessageEdge = (0, import_react75.memo)(
|
|
8140
8163
|
({
|
|
8141
8164
|
id,
|
|
8142
8165
|
sourceX,
|
|
@@ -8166,7 +8189,7 @@ var AnimatedMessageEdge = (0, import_react73.memo)(
|
|
|
8166
8189
|
sourceHandleId,
|
|
8167
8190
|
targetHandleId
|
|
8168
8191
|
},
|
|
8169
|
-
(0,
|
|
8192
|
+
(0, import_react76.getSmoothStepPath)({
|
|
8170
8193
|
sourceX,
|
|
8171
8194
|
sourceY,
|
|
8172
8195
|
sourcePosition,
|
|
@@ -8180,9 +8203,9 @@ var AnimatedMessageEdge = (0, import_react73.memo)(
|
|
|
8180
8203
|
const customColor = data?.customColor || messageColor(collection ?? "default");
|
|
8181
8204
|
const warning = data?.warning;
|
|
8182
8205
|
const customColors = Array.isArray(customColor) ? customColor : [customColor];
|
|
8183
|
-
const randomDelay = (0,
|
|
8206
|
+
const randomDelay = (0, import_react75.useMemo)(() => Math.random() * 1, []);
|
|
8184
8207
|
const opacityClass = opacity === 1 ? "z-30 opacity-100" : "z-30 opacity-10";
|
|
8185
|
-
const animatedNodes = (0,
|
|
8208
|
+
const animatedNodes = (0, import_react75.useMemo)(
|
|
8186
8209
|
() => customColors.map((color, index) => {
|
|
8187
8210
|
const delay = randomDelay + index * 0.3;
|
|
8188
8211
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
@@ -8235,7 +8258,7 @@ var AnimatedMessageEdge = (0, import_react73.memo)(
|
|
|
8235
8258
|
const crossDomain = isCrossDomain(data);
|
|
8236
8259
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
8237
8260
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8238
|
-
|
|
8261
|
+
import_react76.BaseEdge,
|
|
8239
8262
|
{
|
|
8240
8263
|
id,
|
|
8241
8264
|
path: edgePath,
|
|
@@ -8262,10 +8285,10 @@ var AnimatedMessageEdge = (0, import_react73.memo)(
|
|
|
8262
8285
|
var AnimatedMessageEdge_default = AnimatedMessageEdge;
|
|
8263
8286
|
|
|
8264
8287
|
// src/edges/MultilineEdgeLabel.tsx
|
|
8265
|
-
var
|
|
8266
|
-
var
|
|
8288
|
+
var import_react77 = require("react");
|
|
8289
|
+
var import_react78 = require("@xyflow/react");
|
|
8267
8290
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
8268
|
-
var MultilineEdgeLabel_default = (0,
|
|
8291
|
+
var MultilineEdgeLabel_default = (0, import_react77.memo)(function MultilineEdgeLabel(props) {
|
|
8269
8292
|
const {
|
|
8270
8293
|
id,
|
|
8271
8294
|
sourceX,
|
|
@@ -8298,7 +8321,7 @@ var MultilineEdgeLabel_default = (0, import_react75.memo)(function MultilineEdge
|
|
|
8298
8321
|
sourceHandleId,
|
|
8299
8322
|
targetHandleId
|
|
8300
8323
|
},
|
|
8301
|
-
(0,
|
|
8324
|
+
(0, import_react78.getSmoothStepPath)({
|
|
8302
8325
|
sourceX,
|
|
8303
8326
|
sourceY,
|
|
8304
8327
|
targetX,
|
|
@@ -8334,8 +8357,8 @@ var MultilineEdgeLabel_default = (0, import_react75.memo)(function MultilineEdge
|
|
|
8334
8357
|
});
|
|
8335
8358
|
|
|
8336
8359
|
// src/edges/FlowEdge.tsx
|
|
8337
|
-
var
|
|
8338
|
-
var
|
|
8360
|
+
var import_react79 = require("react");
|
|
8361
|
+
var import_react80 = require("@xyflow/react");
|
|
8339
8362
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
8340
8363
|
function messageColor2(collection) {
|
|
8341
8364
|
switch (collection) {
|
|
@@ -8350,7 +8373,7 @@ function messageColor2(collection) {
|
|
|
8350
8373
|
}
|
|
8351
8374
|
}
|
|
8352
8375
|
var EMPTY_STYLE = {};
|
|
8353
|
-
var FlowEdge_default = (0,
|
|
8376
|
+
var FlowEdge_default = (0, import_react79.memo)(function CustomEdge({
|
|
8354
8377
|
id,
|
|
8355
8378
|
sourceX,
|
|
8356
8379
|
sourceY,
|
|
@@ -8380,7 +8403,7 @@ var FlowEdge_default = (0, import_react77.memo)(function CustomEdge({
|
|
|
8380
8403
|
sourceHandleId,
|
|
8381
8404
|
targetHandleId
|
|
8382
8405
|
},
|
|
8383
|
-
(0,
|
|
8406
|
+
(0, import_react80.getSmoothStepPath)({
|
|
8384
8407
|
sourceX,
|
|
8385
8408
|
sourceY,
|
|
8386
8409
|
sourcePosition,
|
|
@@ -8389,15 +8412,15 @@ var FlowEdge_default = (0, import_react77.memo)(function CustomEdge({
|
|
|
8389
8412
|
targetPosition
|
|
8390
8413
|
})
|
|
8391
8414
|
);
|
|
8392
|
-
const randomDelay = (0,
|
|
8415
|
+
const randomDelay = (0, import_react79.useMemo)(() => Math.random() * 1, []);
|
|
8393
8416
|
const collection = data?.message?.collection;
|
|
8394
8417
|
const opacity = data?.opacity ?? 1;
|
|
8395
|
-
const mergedStyle = (0,
|
|
8418
|
+
const mergedStyle = (0, import_react79.useMemo)(
|
|
8396
8419
|
() => ({ ...EDGE_FLOW_BASE_STYLE, ...style }),
|
|
8397
8420
|
[style]
|
|
8398
8421
|
);
|
|
8399
8422
|
const crossDomain = isCrossDomain(data);
|
|
8400
|
-
const labelPositionStyle = (0,
|
|
8423
|
+
const labelPositionStyle = (0, import_react79.useMemo)(
|
|
8401
8424
|
() => ({
|
|
8402
8425
|
position: "absolute",
|
|
8403
8426
|
transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`,
|
|
@@ -8408,7 +8431,7 @@ var FlowEdge_default = (0, import_react77.memo)(function CustomEdge({
|
|
|
8408
8431
|
);
|
|
8409
8432
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
8410
8433
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
8411
|
-
|
|
8434
|
+
import_react80.BaseEdge,
|
|
8412
8435
|
{
|
|
8413
8436
|
path: edgePath,
|
|
8414
8437
|
markerEnd,
|
|
@@ -8442,7 +8465,7 @@ var FlowEdge_default = (0, import_react77.memo)(function CustomEdge({
|
|
|
8442
8465
|
)
|
|
8443
8466
|
}
|
|
8444
8467
|
),
|
|
8445
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
8468
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(EdgeLabelPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
8446
8469
|
"div",
|
|
8447
8470
|
{
|
|
8448
8471
|
style: labelPositionStyle,
|
|
@@ -8454,8 +8477,8 @@ var FlowEdge_default = (0, import_react77.memo)(function CustomEdge({
|
|
|
8454
8477
|
});
|
|
8455
8478
|
|
|
8456
8479
|
// src/edges/LabelledEdge.tsx
|
|
8457
|
-
var
|
|
8458
|
-
var
|
|
8480
|
+
var import_react81 = require("@xyflow/react");
|
|
8481
|
+
var import_react82 = require("react");
|
|
8459
8482
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
8460
8483
|
function LabelledEdge({
|
|
8461
8484
|
pathType,
|
|
@@ -8500,7 +8523,7 @@ function LabelledEdge({
|
|
|
8500
8523
|
sourceHandleId,
|
|
8501
8524
|
targetHandleId
|
|
8502
8525
|
},
|
|
8503
|
-
pathType === "bezier" ? (0,
|
|
8526
|
+
pathType === "bezier" ? (0, import_react81.getBezierPath)(pathProps) : (0, import_react81.getSmoothStepPath)({
|
|
8504
8527
|
...pathProps,
|
|
8505
8528
|
...pathType === "step" ? { borderRadius: 0 } : {}
|
|
8506
8529
|
})
|
|
@@ -8508,7 +8531,7 @@ function LabelledEdge({
|
|
|
8508
8531
|
const crossDomain = isCrossDomain(data);
|
|
8509
8532
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
8510
8533
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8511
|
-
|
|
8534
|
+
import_react81.BaseEdge,
|
|
8512
8535
|
{
|
|
8513
8536
|
id,
|
|
8514
8537
|
path: edgePath,
|
|
@@ -8531,18 +8554,18 @@ function LabelledEdge({
|
|
|
8531
8554
|
)
|
|
8532
8555
|
] });
|
|
8533
8556
|
}
|
|
8534
|
-
var LabelledDefaultEdge = (0,
|
|
8557
|
+
var LabelledDefaultEdge = (0, import_react82.memo)(function LabelledDefaultEdge2(props) {
|
|
8535
8558
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(LabelledEdge, { ...props, pathType: "bezier" });
|
|
8536
8559
|
});
|
|
8537
|
-
var LabelledSmoothStepEdge = (0,
|
|
8560
|
+
var LabelledSmoothStepEdge = (0, import_react82.memo)(function LabelledSmoothStepEdge2(props) {
|
|
8538
8561
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(LabelledEdge, { ...props, pathType: "smoothstep" });
|
|
8539
8562
|
});
|
|
8540
|
-
var LabelledStepEdge = (0,
|
|
8563
|
+
var LabelledStepEdge = (0, import_react82.memo)(function LabelledStepEdge2(props) {
|
|
8541
8564
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(LabelledEdge, { ...props, pathType: "step" });
|
|
8542
8565
|
});
|
|
8543
8566
|
|
|
8544
8567
|
// src/components/VisualiserSearch.tsx
|
|
8545
|
-
var
|
|
8568
|
+
var import_react83 = require("react");
|
|
8546
8569
|
var import_lucide_react33 = require("lucide-react");
|
|
8547
8570
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
8548
8571
|
var formatVersionedName = (name, version) => {
|
|
@@ -8602,29 +8625,29 @@ var getNodeResourceData = (data, key) => {
|
|
|
8602
8625
|
if (!resource || typeof resource !== "object") return void 0;
|
|
8603
8626
|
return "data" in resource && resource.data ? resource.data : resource;
|
|
8604
8627
|
};
|
|
8605
|
-
var VisualiserSearch = (0,
|
|
8606
|
-
(0,
|
|
8628
|
+
var VisualiserSearch = (0, import_react83.memo)(
|
|
8629
|
+
(0, import_react83.forwardRef)(
|
|
8607
8630
|
({ nodes, onNodeSelect, onClear, onPaneClick: _onPaneClick }, ref) => {
|
|
8608
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
8609
|
-
const [filteredSuggestions, setFilteredSuggestions] = (0,
|
|
8610
|
-
const [showSuggestions, setShowSuggestions] = (0,
|
|
8611
|
-
const [selectedSuggestionIndex, setSelectedSuggestionIndex] = (0,
|
|
8612
|
-
const searchInputRef = (0,
|
|
8613
|
-
const containerRef = (0,
|
|
8614
|
-
const suggestionsListRef = (0,
|
|
8615
|
-
const suggestionItemRefs = (0,
|
|
8616
|
-
const hideSuggestions = (0,
|
|
8631
|
+
const [searchQuery, setSearchQuery] = (0, import_react83.useState)("");
|
|
8632
|
+
const [filteredSuggestions, setFilteredSuggestions] = (0, import_react83.useState)([]);
|
|
8633
|
+
const [showSuggestions, setShowSuggestions] = (0, import_react83.useState)(false);
|
|
8634
|
+
const [selectedSuggestionIndex, setSelectedSuggestionIndex] = (0, import_react83.useState)(-1);
|
|
8635
|
+
const searchInputRef = (0, import_react83.useRef)(null);
|
|
8636
|
+
const containerRef = (0, import_react83.useRef)(null);
|
|
8637
|
+
const suggestionsListRef = (0, import_react83.useRef)(null);
|
|
8638
|
+
const suggestionItemRefs = (0, import_react83.useRef)([]);
|
|
8639
|
+
const hideSuggestions = (0, import_react83.useCallback)(() => {
|
|
8617
8640
|
setShowSuggestions(false);
|
|
8618
8641
|
setSelectedSuggestionIndex(-1);
|
|
8619
8642
|
}, []);
|
|
8620
|
-
(0,
|
|
8643
|
+
(0, import_react83.useImperativeHandle)(
|
|
8621
8644
|
ref,
|
|
8622
8645
|
() => ({
|
|
8623
8646
|
hideSuggestions
|
|
8624
8647
|
}),
|
|
8625
8648
|
[hideSuggestions]
|
|
8626
8649
|
);
|
|
8627
|
-
const getNodeDisplayName = (0,
|
|
8650
|
+
const getNodeDisplayName = (0, import_react83.useCallback)((node) => {
|
|
8628
8651
|
if (node.type === "messageGroup") {
|
|
8629
8652
|
return node.data?.groupName || node.id;
|
|
8630
8653
|
}
|
|
@@ -8645,7 +8668,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8645
8668
|
const version = message?.version || agent?.version || agentTool?.version || service?.version || domain?.version || system?.version || entity?.version || channel?.version || dataProduct?.version || data?.version || node.data?.version;
|
|
8646
8669
|
return formatVersionedName(name, version);
|
|
8647
8670
|
}, []);
|
|
8648
|
-
const getNodeResourceKey = (0,
|
|
8671
|
+
const getNodeResourceKey = (0, import_react83.useCallback)(
|
|
8649
8672
|
(node, label) => {
|
|
8650
8673
|
if (node.type === "messageGroup" || node.type === "messageGroupExpanded") {
|
|
8651
8674
|
return `${node.type}:${node.id}`.toLowerCase();
|
|
@@ -8661,7 +8684,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8661
8684
|
},
|
|
8662
8685
|
[]
|
|
8663
8686
|
);
|
|
8664
|
-
const dedupeSearchSuggestions = (0,
|
|
8687
|
+
const dedupeSearchSuggestions = (0, import_react83.useCallback)(
|
|
8665
8688
|
(suggestions) => {
|
|
8666
8689
|
const uniqueSuggestions = [];
|
|
8667
8690
|
const indexByResourceKey = /* @__PURE__ */ new Map();
|
|
@@ -8685,7 +8708,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8685
8708
|
},
|
|
8686
8709
|
[]
|
|
8687
8710
|
);
|
|
8688
|
-
const getSearchSuggestions = (0,
|
|
8711
|
+
const getSearchSuggestions = (0, import_react83.useCallback)(
|
|
8689
8712
|
(nodesToIndex) => {
|
|
8690
8713
|
const suggestions = nodesToIndex.flatMap((node) => {
|
|
8691
8714
|
if (node.type === "system-group") return [];
|
|
@@ -8731,7 +8754,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8731
8754
|
},
|
|
8732
8755
|
[dedupeSearchSuggestions, getNodeDisplayName, getNodeResourceKey]
|
|
8733
8756
|
);
|
|
8734
|
-
const getNodeTypeMeta = (0,
|
|
8757
|
+
const getNodeTypeMeta = (0, import_react83.useCallback)((nodeType) => {
|
|
8735
8758
|
const meta = {
|
|
8736
8759
|
events: {
|
|
8737
8760
|
label: "Event",
|
|
@@ -8879,7 +8902,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8879
8902
|
badgeClass: "border-gray-500/25 bg-gray-500/10 text-gray-700 dark:text-gray-300"
|
|
8880
8903
|
};
|
|
8881
8904
|
}, []);
|
|
8882
|
-
const handleSearchChange = (0,
|
|
8905
|
+
const handleSearchChange = (0, import_react83.useCallback)(
|
|
8883
8906
|
(event) => {
|
|
8884
8907
|
const query = event.target.value;
|
|
8885
8908
|
setSearchQuery(query);
|
|
@@ -8899,7 +8922,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8899
8922
|
},
|
|
8900
8923
|
[nodes, getSearchSuggestions]
|
|
8901
8924
|
);
|
|
8902
|
-
const handleSearchFocus = (0,
|
|
8925
|
+
const handleSearchFocus = (0, import_react83.useCallback)(() => {
|
|
8903
8926
|
const suggestions = getSearchSuggestions(nodes);
|
|
8904
8927
|
const search = searchQuery.toLowerCase();
|
|
8905
8928
|
setFilteredSuggestions(
|
|
@@ -8910,7 +8933,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8910
8933
|
setShowSuggestions(true);
|
|
8911
8934
|
setSelectedSuggestionIndex(-1);
|
|
8912
8935
|
}, [nodes, searchQuery, getSearchSuggestions]);
|
|
8913
|
-
const handleSuggestionClick = (0,
|
|
8936
|
+
const handleSuggestionClick = (0, import_react83.useCallback)(
|
|
8914
8937
|
(suggestion) => {
|
|
8915
8938
|
setSearchQuery("");
|
|
8916
8939
|
setFilteredSuggestions([]);
|
|
@@ -8920,7 +8943,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8920
8943
|
},
|
|
8921
8944
|
[onNodeSelect]
|
|
8922
8945
|
);
|
|
8923
|
-
const handleSearchKeyDown = (0,
|
|
8946
|
+
const handleSearchKeyDown = (0, import_react83.useCallback)(
|
|
8924
8947
|
(event) => {
|
|
8925
8948
|
switch (event.key) {
|
|
8926
8949
|
case "ArrowDown":
|
|
@@ -8960,7 +8983,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8960
8983
|
handleSuggestionClick
|
|
8961
8984
|
]
|
|
8962
8985
|
);
|
|
8963
|
-
const clearSearch = (0,
|
|
8986
|
+
const clearSearch = (0, import_react83.useCallback)(() => {
|
|
8964
8987
|
setSearchQuery("");
|
|
8965
8988
|
setShowSuggestions(false);
|
|
8966
8989
|
setFilteredSuggestions([]);
|
|
@@ -8970,13 +8993,13 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8970
8993
|
searchInputRef.current.focus();
|
|
8971
8994
|
}
|
|
8972
8995
|
}, [onClear]);
|
|
8973
|
-
(0,
|
|
8996
|
+
(0, import_react83.useEffect)(() => {
|
|
8974
8997
|
suggestionItemRefs.current = suggestionItemRefs.current.slice(
|
|
8975
8998
|
0,
|
|
8976
8999
|
filteredSuggestions.length
|
|
8977
9000
|
);
|
|
8978
9001
|
}, [filteredSuggestions.length]);
|
|
8979
|
-
(0,
|
|
9002
|
+
(0, import_react83.useEffect)(() => {
|
|
8980
9003
|
if (!showSuggestions || selectedSuggestionIndex < 0) return;
|
|
8981
9004
|
const list = suggestionsListRef.current;
|
|
8982
9005
|
const item = suggestionItemRefs.current[selectedSuggestionIndex];
|
|
@@ -8995,7 +9018,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8995
9018
|
selectedSuggestionIndex,
|
|
8996
9019
|
filteredSuggestions.length
|
|
8997
9020
|
]);
|
|
8998
|
-
(0,
|
|
9021
|
+
(0, import_react83.useEffect)(() => {
|
|
8999
9022
|
const handleClickOutside = (event) => {
|
|
9000
9023
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
9001
9024
|
setShowSuggestions(false);
|
|
@@ -9104,7 +9127,7 @@ VisualiserSearch.displayName = "VisualiserSearch";
|
|
|
9104
9127
|
var VisualiserSearch_default = VisualiserSearch;
|
|
9105
9128
|
|
|
9106
9129
|
// src/components/StepWalkthrough.tsx
|
|
9107
|
-
var
|
|
9130
|
+
var import_react84 = require("react");
|
|
9108
9131
|
var import_lucide_react34 = require("lucide-react");
|
|
9109
9132
|
|
|
9110
9133
|
// src/utils/keyboard.ts
|
|
@@ -9288,32 +9311,32 @@ var BUTTON = "flex items-center justify-center gap-1 h-7 text-xs rounded-md focu
|
|
|
9288
9311
|
var PRIMARY_BUTTON = `${BUTTON} px-2.5 font-semibold text-white bg-[rgb(var(--ec-accent))] hover:bg-[rgb(var(--ec-accent-hover))]`;
|
|
9289
9312
|
var QUIET_BUTTON = `${BUTTON} px-2 font-medium text-[rgb(var(--ec-page-text-muted))] hover:text-[rgb(var(--ec-page-text))] hover:bg-[rgb(var(--ec-page-border)/0.4)]`;
|
|
9290
9313
|
var ICON_BUTTON = "flex items-center justify-center w-6 h-6 rounded text-[rgb(var(--ec-page-text-muted))] hover:text-[rgb(var(--ec-page-text))] hover:bg-[rgb(var(--ec-page-border)/0.4)]";
|
|
9291
|
-
var StepWalkthrough_default = (0,
|
|
9314
|
+
var StepWalkthrough_default = (0, import_react84.memo)(function StepWalkthrough({
|
|
9292
9315
|
nodes,
|
|
9293
9316
|
edges,
|
|
9294
9317
|
isFlowVisualization,
|
|
9295
9318
|
onStepChange
|
|
9296
9319
|
}) {
|
|
9297
|
-
const [trail, setTrail] = (0,
|
|
9320
|
+
const [trail, setTrail] = (0, import_react84.useState)([]);
|
|
9298
9321
|
const currentNodeId = trail[trail.length - 1] ?? null;
|
|
9299
|
-
const [startNodeId, setStartNodeId] = (0,
|
|
9300
|
-
const nodeIdsKeyRef = (0,
|
|
9322
|
+
const [startNodeId, setStartNodeId] = (0, import_react84.useState)(null);
|
|
9323
|
+
const nodeIdsKeyRef = (0, import_react84.useRef)("");
|
|
9301
9324
|
const computedNodeIdsKey = nodes.map((n) => n.id).join(",");
|
|
9302
9325
|
if (computedNodeIdsKey !== nodeIdsKeyRef.current) {
|
|
9303
9326
|
nodeIdsKeyRef.current = computedNodeIdsKey;
|
|
9304
9327
|
}
|
|
9305
9328
|
const nodeIdsKey = nodeIdsKeyRef.current;
|
|
9306
|
-
const edgeKeyRef = (0,
|
|
9329
|
+
const edgeKeyRef = (0, import_react84.useRef)("");
|
|
9307
9330
|
const computedEdgeKey = edges.map((e) => `${e.source}-${e.target}`).join(",");
|
|
9308
9331
|
if (computedEdgeKey !== edgeKeyRef.current) {
|
|
9309
9332
|
edgeKeyRef.current = computedEdgeKey;
|
|
9310
9333
|
}
|
|
9311
9334
|
const edgeKey = edgeKeyRef.current;
|
|
9312
|
-
const nodesById = (0,
|
|
9335
|
+
const nodesById = (0, import_react84.useMemo)(
|
|
9313
9336
|
() => new Map(nodes.map((node) => [node.id, node])),
|
|
9314
9337
|
[nodeIdsKey]
|
|
9315
9338
|
);
|
|
9316
|
-
(0,
|
|
9339
|
+
(0, import_react84.useEffect)(() => {
|
|
9317
9340
|
if (!isFlowVisualization || nodes.length === 0) return;
|
|
9318
9341
|
const targets = new Set(edges.map((edge) => edge.target));
|
|
9319
9342
|
const start2 = nodes.find((node) => !targets.has(node.id));
|
|
@@ -9321,10 +9344,10 @@ var StepWalkthrough_default = (0, import_react82.memo)(function StepWalkthrough(
|
|
|
9321
9344
|
setStartNodeId(start2.id);
|
|
9322
9345
|
}
|
|
9323
9346
|
}, [nodeIdsKey, edgeKey, isFlowVisualization, startNodeId]);
|
|
9324
|
-
(0,
|
|
9347
|
+
(0, import_react84.useEffect)(() => {
|
|
9325
9348
|
if (currentNodeId && !nodesById.has(currentNodeId)) setTrail([]);
|
|
9326
9349
|
}, [currentNodeId, nodesById]);
|
|
9327
|
-
const pathsFrom = (0,
|
|
9350
|
+
const pathsFrom = (0, import_react84.useCallback)(
|
|
9328
9351
|
(nodeId) => nodeId ? edges.filter((edge) => edge.source === nodeId).map((edge) => ({
|
|
9329
9352
|
targetId: edge.target,
|
|
9330
9353
|
label: edge.label,
|
|
@@ -9332,11 +9355,11 @@ var StepWalkthrough_default = (0, import_react82.memo)(function StepWalkthrough(
|
|
|
9332
9355
|
})).filter((path) => !!path.targetNode) : [],
|
|
9333
9356
|
[edgeKey, nodesById]
|
|
9334
9357
|
);
|
|
9335
|
-
const availablePaths = (0,
|
|
9358
|
+
const availablePaths = (0, import_react84.useMemo)(
|
|
9336
9359
|
() => pathsFrom(currentNodeId),
|
|
9337
9360
|
[pathsFrom, currentNodeId]
|
|
9338
9361
|
);
|
|
9339
|
-
const stepsAfter = (0,
|
|
9362
|
+
const stepsAfter = (0, import_react84.useCallback)(
|
|
9340
9363
|
(nodeId, walked) => {
|
|
9341
9364
|
const seen = new Set(walked);
|
|
9342
9365
|
let steps = 0;
|
|
@@ -9350,15 +9373,15 @@ var StepWalkthrough_default = (0, import_react82.memo)(function StepWalkthrough(
|
|
|
9350
9373
|
},
|
|
9351
9374
|
[pathsFrom]
|
|
9352
9375
|
);
|
|
9353
|
-
const totalSteps = (0,
|
|
9376
|
+
const totalSteps = (0, import_react84.useMemo)(
|
|
9354
9377
|
() => currentNodeId ? trail.length + stepsAfter(currentNodeId, trail) : 0,
|
|
9355
9378
|
[trail, currentNodeId, stepsAfter]
|
|
9356
9379
|
);
|
|
9357
|
-
const startSteps = (0,
|
|
9380
|
+
const startSteps = (0, import_react84.useMemo)(
|
|
9358
9381
|
() => startNodeId ? 1 + stepsAfter(startNodeId, [startNodeId]) : 0,
|
|
9359
9382
|
[startNodeId, stepsAfter]
|
|
9360
9383
|
);
|
|
9361
|
-
const goTo = (0,
|
|
9384
|
+
const goTo = (0, import_react84.useCallback)(
|
|
9362
9385
|
(nextTrail) => {
|
|
9363
9386
|
setTrail(nextTrail);
|
|
9364
9387
|
const nodeId = nextTrail[nextTrail.length - 1];
|
|
@@ -9370,25 +9393,25 @@ var StepWalkthrough_default = (0, import_react82.memo)(function StepWalkthrough(
|
|
|
9370
9393
|
},
|
|
9371
9394
|
[onStepChange]
|
|
9372
9395
|
);
|
|
9373
|
-
const start = (0,
|
|
9396
|
+
const start = (0, import_react84.useCallback)(() => {
|
|
9374
9397
|
if (startNodeId) goTo([startNodeId]);
|
|
9375
9398
|
}, [startNodeId, goTo]);
|
|
9376
|
-
const [selectedPath, setSelectedPath] = (0,
|
|
9377
|
-
(0,
|
|
9378
|
-
const next = (0,
|
|
9399
|
+
const [selectedPath, setSelectedPath] = (0, import_react84.useState)(0);
|
|
9400
|
+
(0, import_react84.useEffect)(() => setSelectedPath(0), [currentNodeId]);
|
|
9401
|
+
const next = (0, import_react84.useCallback)(
|
|
9379
9402
|
(index = selectedPath) => {
|
|
9380
9403
|
const path = availablePaths[index];
|
|
9381
9404
|
if (path) goTo([...trail, path.targetId]);
|
|
9382
9405
|
},
|
|
9383
9406
|
[availablePaths, selectedPath, trail, goTo]
|
|
9384
9407
|
);
|
|
9385
|
-
const previous = (0,
|
|
9386
|
-
const finish = (0,
|
|
9408
|
+
const previous = (0, import_react84.useCallback)(() => goTo(trail.slice(0, -1)), [trail, goTo]);
|
|
9409
|
+
const finish = (0, import_react84.useCallback)(() => {
|
|
9387
9410
|
setTrail([]);
|
|
9388
9411
|
onStepChange(null, true);
|
|
9389
9412
|
}, [onStepChange]);
|
|
9390
9413
|
const isWalking = trail.length > 0;
|
|
9391
|
-
(0,
|
|
9414
|
+
(0, import_react84.useEffect)(() => {
|
|
9392
9415
|
if (!isWalking) return;
|
|
9393
9416
|
const onKeyDown = (event) => {
|
|
9394
9417
|
if (event.metaKey || event.ctrlKey || event.altKey) return;
|
|
@@ -9405,16 +9428,16 @@ var StepWalkthrough_default = (0, import_react82.memo)(function StepWalkthrough(
|
|
|
9405
9428
|
return () => window.removeEventListener("keydown", onKeyDown);
|
|
9406
9429
|
}, [isWalking, availablePaths, next, previous, finish]);
|
|
9407
9430
|
const currentNode = currentNodeId ? nodesById.get(currentNodeId) : void 0;
|
|
9408
|
-
const info = (0,
|
|
9431
|
+
const info = (0, import_react84.useMemo)(
|
|
9409
9432
|
() => currentNode ? getStepInfo(currentNode) : void 0,
|
|
9410
9433
|
[currentNode]
|
|
9411
9434
|
);
|
|
9412
|
-
const [expanded, setExpanded] = (0,
|
|
9413
|
-
const [isCut, setIsCut] = (0,
|
|
9414
|
-
const titleRef = (0,
|
|
9415
|
-
const summaryRef = (0,
|
|
9416
|
-
(0,
|
|
9417
|
-
(0,
|
|
9435
|
+
const [expanded, setExpanded] = (0, import_react84.useState)(false);
|
|
9436
|
+
const [isCut, setIsCut] = (0, import_react84.useState)(false);
|
|
9437
|
+
const titleRef = (0, import_react84.useRef)(null);
|
|
9438
|
+
const summaryRef = (0, import_react84.useRef)(null);
|
|
9439
|
+
(0, import_react84.useEffect)(() => setExpanded(false), [currentNodeId]);
|
|
9440
|
+
(0, import_react84.useLayoutEffect)(() => {
|
|
9418
9441
|
if (expanded) return;
|
|
9419
9442
|
const title = titleRef.current;
|
|
9420
9443
|
const summary = summaryRef.current;
|
|
@@ -9422,7 +9445,7 @@ var StepWalkthrough_default = (0, import_react82.memo)(function StepWalkthrough(
|
|
|
9422
9445
|
!!info?.detail || !!title && title.scrollWidth > title.clientWidth || !!summary && summary.scrollHeight > summary.clientHeight + 1
|
|
9423
9446
|
);
|
|
9424
9447
|
}, [info, expanded]);
|
|
9425
|
-
const startInfo = (0,
|
|
9448
|
+
const startInfo = (0, import_react84.useMemo)(() => {
|
|
9426
9449
|
const startNode = startNodeId ? nodesById.get(startNodeId) : void 0;
|
|
9427
9450
|
return startNode ? getStepInfo(startNode) : void 0;
|
|
9428
9451
|
}, [startNodeId, nodesById]);
|
|
@@ -9620,16 +9643,16 @@ var StepWalkthrough_default = (0, import_react82.memo)(function StepWalkthrough(
|
|
|
9620
9643
|
});
|
|
9621
9644
|
|
|
9622
9645
|
// src/components/WalkthroughBadges.tsx
|
|
9623
|
-
var
|
|
9624
|
-
var
|
|
9646
|
+
var import_react85 = require("react");
|
|
9647
|
+
var import_react86 = require("@xyflow/react");
|
|
9625
9648
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
9626
9649
|
var BADGE_SIZE = 30;
|
|
9627
|
-
var Badge = (0,
|
|
9650
|
+
var Badge = (0, import_react85.memo)(function Badge2({
|
|
9628
9651
|
nodeId,
|
|
9629
9652
|
number,
|
|
9630
9653
|
current
|
|
9631
9654
|
}) {
|
|
9632
|
-
const node = (0,
|
|
9655
|
+
const node = (0, import_react86.useInternalNode)(nodeId);
|
|
9633
9656
|
if (!node) return null;
|
|
9634
9657
|
const { x, y } = node.internals.positionAbsolute;
|
|
9635
9658
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
@@ -9649,12 +9672,12 @@ var Badge = (0, import_react83.memo)(function Badge2({
|
|
|
9649
9672
|
}
|
|
9650
9673
|
);
|
|
9651
9674
|
});
|
|
9652
|
-
var WalkthroughBadges_default = (0,
|
|
9675
|
+
var WalkthroughBadges_default = (0, import_react85.memo)(function WalkthroughBadges({ trail }) {
|
|
9653
9676
|
if (trail.length === 0) return null;
|
|
9654
9677
|
const numbers = /* @__PURE__ */ new Map();
|
|
9655
9678
|
trail.forEach((nodeId, index) => numbers.set(nodeId, index + 1));
|
|
9656
9679
|
const current = trail[trail.length - 1];
|
|
9657
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CanvasPortal, { children: [...numbers].map(([nodeId, number]) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9658
9681
|
Badge,
|
|
9659
9682
|
{
|
|
9660
9683
|
nodeId,
|
|
@@ -9666,8 +9689,8 @@ var WalkthroughBadges_default = (0, import_react83.memo)(function WalkthroughBad
|
|
|
9666
9689
|
});
|
|
9667
9690
|
|
|
9668
9691
|
// src/components/CanvasToolbar.tsx
|
|
9669
|
-
var
|
|
9670
|
-
var
|
|
9692
|
+
var import_react87 = require("react");
|
|
9693
|
+
var import_react88 = require("@xyflow/react");
|
|
9671
9694
|
var import_lucide_react35 = require("lucide-react");
|
|
9672
9695
|
|
|
9673
9696
|
// src/components/Tip.tsx
|
|
@@ -9726,10 +9749,10 @@ var ToolbarButton = ({
|
|
|
9726
9749
|
}
|
|
9727
9750
|
) });
|
|
9728
9751
|
};
|
|
9729
|
-
var ZoomLevel = (0,
|
|
9752
|
+
var ZoomLevel = (0, import_react87.memo)(function ZoomLevel2({
|
|
9730
9753
|
className = ""
|
|
9731
9754
|
}) {
|
|
9732
|
-
const zoom = (0,
|
|
9755
|
+
const zoom = (0, import_react88.useStore)((state) => Math.round(state.transform[2] * 100));
|
|
9733
9756
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
9734
9757
|
"div",
|
|
9735
9758
|
{
|
|
@@ -9743,7 +9766,7 @@ var ZoomLevel = (0, import_react85.memo)(function ZoomLevel2({
|
|
|
9743
9766
|
});
|
|
9744
9767
|
var ToolbarDivider = () => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "w-px h-5 mx-1 bg-[rgb(var(--ec-page-border))]" });
|
|
9745
9768
|
var Toolbar = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex items-center gap-0.5 p-1 rounded-lg border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-card-bg))] shadow-md", children }) });
|
|
9746
|
-
var CanvasToolbar = (0,
|
|
9769
|
+
var CanvasToolbar = (0, import_react87.memo)(function CanvasToolbar2({
|
|
9747
9770
|
levels,
|
|
9748
9771
|
tools = [],
|
|
9749
9772
|
animateMessages,
|
|
@@ -9753,7 +9776,7 @@ var CanvasToolbar = (0, import_react85.memo)(function CanvasToolbar2({
|
|
|
9753
9776
|
setShowMinimap,
|
|
9754
9777
|
handleFitView
|
|
9755
9778
|
}) {
|
|
9756
|
-
const { zoomIn, zoomOut } = (0,
|
|
9779
|
+
const { zoomIn, zoomOut } = (0, import_react88.useReactFlow)();
|
|
9757
9780
|
const groups = [
|
|
9758
9781
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
9759
9782
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ToolbarButton, { label: "Fit view", onClick: handleFitView, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react35.Maximize, { className: "w-4 h-4" }) }),
|
|
@@ -9829,7 +9852,7 @@ var CanvasToolbar = (0, import_react85.memo)(function CanvasToolbar2({
|
|
|
9829
9852
|
)
|
|
9830
9853
|
] })
|
|
9831
9854
|
].filter(Boolean);
|
|
9832
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react88.Panel, { position: "bottom-center", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Toolbar, { children: groups.map((group, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react87.Fragment, { children: [
|
|
9833
9856
|
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ToolbarDivider, {}),
|
|
9834
9857
|
group
|
|
9835
9858
|
] }, index)) }) });
|
|
@@ -9837,7 +9860,7 @@ var CanvasToolbar = (0, import_react85.memo)(function CanvasToolbar2({
|
|
|
9837
9860
|
var CanvasToolbar_default = CanvasToolbar;
|
|
9838
9861
|
|
|
9839
9862
|
// src/components/SwimlanePicker.tsx
|
|
9840
|
-
var
|
|
9863
|
+
var import_react89 = require("react");
|
|
9841
9864
|
var DropdownMenu = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
9842
9865
|
var import_lucide_react36 = require("lucide-react");
|
|
9843
9866
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
@@ -10015,7 +10038,7 @@ var STYLES = [
|
|
|
10015
10038
|
{ value: "boxes", label: "Boxes", Preview: BoxesPreview },
|
|
10016
10039
|
{ value: "lanes", label: "Lanes", Preview: LanesPreview }
|
|
10017
10040
|
];
|
|
10018
|
-
var SwimlanePicker_default = (0,
|
|
10041
|
+
var SwimlanePicker_default = (0, import_react89.memo)(function SwimlanePicker({
|
|
10019
10042
|
options,
|
|
10020
10043
|
counts,
|
|
10021
10044
|
value,
|
|
@@ -10023,8 +10046,8 @@ var SwimlanePicker_default = (0, import_react87.memo)(function SwimlanePicker({
|
|
|
10023
10046
|
onChange
|
|
10024
10047
|
}) {
|
|
10025
10048
|
const portalContainer = usePortalContainer();
|
|
10026
|
-
const [open, setOpen] = (0,
|
|
10027
|
-
(0,
|
|
10049
|
+
const [open, setOpen] = (0, import_react89.useState)(false);
|
|
10050
|
+
(0, import_react89.useEffect)(() => {
|
|
10028
10051
|
const onKeyDown = (event) => {
|
|
10029
10052
|
if (event.key.toLowerCase() !== "g" || event.metaKey || event.ctrlKey || event.altKey || isTyping(event.target))
|
|
10030
10053
|
return;
|
|
@@ -10178,18 +10201,18 @@ var SwimlanePicker_default = (0, import_react87.memo)(function SwimlanePicker({
|
|
|
10178
10201
|
});
|
|
10179
10202
|
|
|
10180
10203
|
// src/components/FocusModeModal.tsx
|
|
10181
|
-
var
|
|
10204
|
+
var import_react95 = require("react");
|
|
10182
10205
|
var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
|
|
10183
10206
|
var import_lucide_react38 = require("lucide-react");
|
|
10184
|
-
var
|
|
10207
|
+
var import_react96 = require("@xyflow/react");
|
|
10185
10208
|
|
|
10186
10209
|
// src/components/FocusMode/FocusModeContent.tsx
|
|
10187
|
-
var
|
|
10188
|
-
var
|
|
10210
|
+
var import_react93 = require("react");
|
|
10211
|
+
var import_react94 = require("@xyflow/react");
|
|
10189
10212
|
|
|
10190
10213
|
// src/components/FocusMode/FocusModeNodeActions.tsx
|
|
10191
|
-
var
|
|
10192
|
-
var
|
|
10214
|
+
var import_react90 = require("react");
|
|
10215
|
+
var import_react91 = require("@xyflow/react");
|
|
10193
10216
|
var import_lucide_react37 = require("lucide-react");
|
|
10194
10217
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
10195
10218
|
var selectScaleFactor = (state) => Math.max(0.4, Math.min(1, state.transform[2]));
|
|
@@ -10198,7 +10221,7 @@ var FocusModeNodeActions = ({
|
|
|
10198
10221
|
isCenter,
|
|
10199
10222
|
onSwitch
|
|
10200
10223
|
}) => {
|
|
10201
|
-
const scaleFactor = (0,
|
|
10224
|
+
const scaleFactor = (0, import_react91.useStore)(selectScaleFactor);
|
|
10202
10225
|
if (node.type === "placeholder") return null;
|
|
10203
10226
|
const docUrl = getNodeDocUrl(node);
|
|
10204
10227
|
const direction = (node.position?.x ?? 0) < 0 ? "left" : "right";
|
|
@@ -10219,10 +10242,10 @@ var FocusModeNodeActions = ({
|
|
|
10219
10242
|
if (isCenter) {
|
|
10220
10243
|
if (!docUrl) return null;
|
|
10221
10244
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10222
|
-
|
|
10245
|
+
import_react91.NodeToolbar,
|
|
10223
10246
|
{
|
|
10224
10247
|
nodeId: node.id,
|
|
10225
|
-
position:
|
|
10248
|
+
position: import_react91.Position.Bottom,
|
|
10226
10249
|
isVisible: true,
|
|
10227
10250
|
offset: -16,
|
|
10228
10251
|
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
@@ -10246,10 +10269,10 @@ var FocusModeNodeActions = ({
|
|
|
10246
10269
|
);
|
|
10247
10270
|
}
|
|
10248
10271
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10249
|
-
|
|
10272
|
+
import_react91.NodeToolbar,
|
|
10250
10273
|
{
|
|
10251
10274
|
nodeId: node.id,
|
|
10252
|
-
position:
|
|
10275
|
+
position: import_react91.Position.Bottom,
|
|
10253
10276
|
isVisible: true,
|
|
10254
10277
|
offset: -16,
|
|
10255
10278
|
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
@@ -10284,10 +10307,10 @@ var FocusModeNodeActions = ({
|
|
|
10284
10307
|
}
|
|
10285
10308
|
);
|
|
10286
10309
|
};
|
|
10287
|
-
var FocusModeNodeActions_default = (0,
|
|
10310
|
+
var FocusModeNodeActions_default = (0, import_react90.memo)(FocusModeNodeActions);
|
|
10288
10311
|
|
|
10289
10312
|
// src/components/FocusMode/FocusModePlaceholder.tsx
|
|
10290
|
-
var
|
|
10313
|
+
var import_react92 = require("@xyflow/react");
|
|
10291
10314
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
10292
10315
|
var FocusModePlaceholder = ({
|
|
10293
10316
|
data
|
|
@@ -10300,19 +10323,19 @@ var FocusModePlaceholder = ({
|
|
|
10300
10323
|
style: { opacity: 0.6, minHeight: "130px" },
|
|
10301
10324
|
children: [
|
|
10302
10325
|
side === "right" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10303
|
-
|
|
10326
|
+
import_react92.Handle,
|
|
10304
10327
|
{
|
|
10305
10328
|
type: "target",
|
|
10306
|
-
position:
|
|
10329
|
+
position: import_react92.Position.Left,
|
|
10307
10330
|
style: { visibility: "hidden" }
|
|
10308
10331
|
}
|
|
10309
10332
|
),
|
|
10310
10333
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "text-center text-sm text-[rgb(var(--ec-page-text-muted))] italic", children: label }),
|
|
10311
10334
|
side === "left" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10312
|
-
|
|
10335
|
+
import_react92.Handle,
|
|
10313
10336
|
{
|
|
10314
10337
|
type: "source",
|
|
10315
|
-
position:
|
|
10338
|
+
position: import_react92.Position.Right,
|
|
10316
10339
|
style: { visibility: "hidden" }
|
|
10317
10340
|
}
|
|
10318
10341
|
)
|
|
@@ -10336,21 +10359,21 @@ var FocusModeContent = ({
|
|
|
10336
10359
|
edgeTypes: edgeTypes2,
|
|
10337
10360
|
onSwitchCenter
|
|
10338
10361
|
}) => {
|
|
10339
|
-
const { fitView } = (0,
|
|
10340
|
-
const [isAnimating, setIsAnimating] = (0,
|
|
10341
|
-
const [needsFitView, setNeedsFitView] = (0,
|
|
10342
|
-
const [hoveredEdgeId, setHoveredEdgeId] = (0,
|
|
10343
|
-
const [isReady, setIsReady] = (0,
|
|
10344
|
-
const reactFlowInitialized = (0,
|
|
10345
|
-
const animationTimeoutRef = (0,
|
|
10346
|
-
(0,
|
|
10362
|
+
const { fitView } = (0, import_react94.useReactFlow)();
|
|
10363
|
+
const [isAnimating, setIsAnimating] = (0, import_react93.useState)(false);
|
|
10364
|
+
const [needsFitView, setNeedsFitView] = (0, import_react93.useState)(false);
|
|
10365
|
+
const [hoveredEdgeId, setHoveredEdgeId] = (0, import_react93.useState)(null);
|
|
10366
|
+
const [isReady, setIsReady] = (0, import_react93.useState)(false);
|
|
10367
|
+
const reactFlowInitialized = (0, import_react93.useRef)(false);
|
|
10368
|
+
const animationTimeoutRef = (0, import_react93.useRef)(null);
|
|
10369
|
+
(0, import_react93.useEffect)(() => {
|
|
10347
10370
|
return () => {
|
|
10348
10371
|
if (animationTimeoutRef.current) {
|
|
10349
10372
|
clearTimeout(animationTimeoutRef.current);
|
|
10350
10373
|
}
|
|
10351
10374
|
};
|
|
10352
10375
|
}, []);
|
|
10353
|
-
const calculateFocusedGraph = (0,
|
|
10376
|
+
const calculateFocusedGraph = (0, import_react93.useCallback)(
|
|
10354
10377
|
(centerId) => {
|
|
10355
10378
|
const centerNode = allNodes.find((n) => n.id === centerId);
|
|
10356
10379
|
if (!centerNode) {
|
|
@@ -10433,19 +10456,19 @@ var FocusModeContent = ({
|
|
|
10433
10456
|
},
|
|
10434
10457
|
[allNodes, allEdges]
|
|
10435
10458
|
);
|
|
10436
|
-
const initialGraph = (0,
|
|
10459
|
+
const initialGraph = (0, import_react93.useMemo)(
|
|
10437
10460
|
() => calculateFocusedGraph(centerNodeId),
|
|
10438
10461
|
[centerNodeId, calculateFocusedGraph]
|
|
10439
10462
|
);
|
|
10440
|
-
const [displayNodes, setDisplayNodes] = (0,
|
|
10441
|
-
const [displayEdges, setDisplayEdges] = (0,
|
|
10442
|
-
(0,
|
|
10463
|
+
const [displayNodes, setDisplayNodes] = (0, import_react94.useNodesState)(initialGraph.nodes);
|
|
10464
|
+
const [displayEdges, setDisplayEdges] = (0, import_react94.useEdgesState)(initialGraph.edges);
|
|
10465
|
+
(0, import_react93.useEffect)(() => {
|
|
10443
10466
|
const { nodes, edges } = calculateFocusedGraph(centerNodeId);
|
|
10444
10467
|
setDisplayNodes(nodes);
|
|
10445
10468
|
setDisplayEdges(edges);
|
|
10446
10469
|
setNeedsFitView(true);
|
|
10447
10470
|
}, [centerNodeId, calculateFocusedGraph, setDisplayNodes, setDisplayEdges]);
|
|
10448
|
-
(0,
|
|
10471
|
+
(0, import_react93.useEffect)(() => {
|
|
10449
10472
|
if (needsFitView && reactFlowInitialized.current) {
|
|
10450
10473
|
const timer = setTimeout(() => {
|
|
10451
10474
|
fitView({ padding: 0.2, duration: 300 });
|
|
@@ -10454,14 +10477,14 @@ var FocusModeContent = ({
|
|
|
10454
10477
|
return () => clearTimeout(timer);
|
|
10455
10478
|
}
|
|
10456
10479
|
}, [needsFitView, displayNodes, fitView]);
|
|
10457
|
-
const handleInit = (0,
|
|
10480
|
+
const handleInit = (0, import_react93.useCallback)(() => {
|
|
10458
10481
|
reactFlowInitialized.current = true;
|
|
10459
10482
|
requestAnimationFrame(() => {
|
|
10460
10483
|
fitView({ padding: 0.2, duration: 0 });
|
|
10461
10484
|
setIsReady(true);
|
|
10462
10485
|
});
|
|
10463
10486
|
}, [fitView]);
|
|
10464
|
-
const handleSwitchNode = (0,
|
|
10487
|
+
const handleSwitchNode = (0, import_react93.useCallback)(
|
|
10465
10488
|
(nodeId, direction) => {
|
|
10466
10489
|
if (nodeId === centerNodeId || isAnimating) return;
|
|
10467
10490
|
setIsAnimating(true);
|
|
@@ -10497,7 +10520,7 @@ var FocusModeContent = ({
|
|
|
10497
10520
|
},
|
|
10498
10521
|
[centerNodeId, isAnimating, setDisplayNodes, onSwitchCenter]
|
|
10499
10522
|
);
|
|
10500
|
-
const handleNodeClick = (0,
|
|
10523
|
+
const handleNodeClick = (0, import_react93.useCallback)(
|
|
10501
10524
|
(_, clickedNode) => {
|
|
10502
10525
|
if (clickedNode.id === centerNodeId || isAnimating) return;
|
|
10503
10526
|
const direction = (clickedNode.position?.x ?? 0) < 0 ? "left" : "right";
|
|
@@ -10505,16 +10528,16 @@ var FocusModeContent = ({
|
|
|
10505
10528
|
},
|
|
10506
10529
|
[centerNodeId, isAnimating, handleSwitchNode]
|
|
10507
10530
|
);
|
|
10508
|
-
const handleEdgeMouseEnter = (0,
|
|
10531
|
+
const handleEdgeMouseEnter = (0, import_react93.useCallback)(
|
|
10509
10532
|
(_, edge) => {
|
|
10510
10533
|
setHoveredEdgeId(edge.id);
|
|
10511
10534
|
},
|
|
10512
10535
|
[]
|
|
10513
10536
|
);
|
|
10514
|
-
const handleEdgeMouseLeave = (0,
|
|
10537
|
+
const handleEdgeMouseLeave = (0, import_react93.useCallback)(() => {
|
|
10515
10538
|
setHoveredEdgeId(null);
|
|
10516
10539
|
}, []);
|
|
10517
|
-
const edgesWithHover = (0,
|
|
10540
|
+
const edgesWithHover = (0, import_react93.useMemo)(() => {
|
|
10518
10541
|
return displayEdges.map((edge) => {
|
|
10519
10542
|
if (edge.id === hoveredEdgeId) {
|
|
10520
10543
|
return {
|
|
@@ -10525,7 +10548,7 @@ var FocusModeContent = ({
|
|
|
10525
10548
|
return edge;
|
|
10526
10549
|
});
|
|
10527
10550
|
}, [displayEdges, hoveredEdgeId]);
|
|
10528
|
-
const mergedNodeTypes = (0,
|
|
10551
|
+
const mergedNodeTypes = (0, import_react93.useMemo)(
|
|
10529
10552
|
() => ({
|
|
10530
10553
|
...nodeTypes,
|
|
10531
10554
|
placeholder: FocusModePlaceholder_default
|
|
@@ -10541,7 +10564,7 @@ var FocusModeContent = ({
|
|
|
10541
10564
|
className: "h-full w-full focus-mode-container",
|
|
10542
10565
|
style: { opacity: isReady ? 1 : 0 },
|
|
10543
10566
|
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
10544
|
-
|
|
10567
|
+
import_react94.ReactFlow,
|
|
10545
10568
|
{
|
|
10546
10569
|
nodes: displayNodes,
|
|
10547
10570
|
edges: edgesWithHover,
|
|
@@ -10560,8 +10583,8 @@ var FocusModeContent = ({
|
|
|
10560
10583
|
minZoom: 0.3,
|
|
10561
10584
|
maxZoom: 2,
|
|
10562
10585
|
children: [
|
|
10563
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
10564
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
10586
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react94.Background, { color: "rgb(var(--ec-page-border))", gap: 20 }),
|
|
10587
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react94.Controls, { showInteractive: false }),
|
|
10565
10588
|
displayNodes.map((node, index) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
10566
10589
|
FocusModeNodeActions_default,
|
|
10567
10590
|
{
|
|
@@ -10590,17 +10613,17 @@ var FocusModeModal = ({
|
|
|
10590
10613
|
nodeTypes,
|
|
10591
10614
|
edgeTypes: edgeTypes2
|
|
10592
10615
|
}) => {
|
|
10593
|
-
const [centerNodeId, setCenterNodeId] = (0,
|
|
10616
|
+
const [centerNodeId, setCenterNodeId] = (0, import_react95.useState)(
|
|
10594
10617
|
initialNodeId
|
|
10595
10618
|
);
|
|
10596
10619
|
const isDark = useDarkMode();
|
|
10597
10620
|
const portalContainer = usePortalContainer();
|
|
10598
|
-
(0,
|
|
10621
|
+
(0, import_react95.useEffect)(() => {
|
|
10599
10622
|
if (isOpen && initialNodeId) {
|
|
10600
10623
|
setCenterNodeId(initialNodeId);
|
|
10601
10624
|
}
|
|
10602
10625
|
}, [isOpen, initialNodeId]);
|
|
10603
|
-
const handleSwitchCenter = (0,
|
|
10626
|
+
const handleSwitchCenter = (0, import_react95.useCallback)(
|
|
10604
10627
|
(newCenterNodeId, _direction) => {
|
|
10605
10628
|
setCenterNodeId(newCenterNodeId);
|
|
10606
10629
|
},
|
|
@@ -10733,7 +10756,7 @@ var FocusModeModal = ({
|
|
|
10733
10756
|
]
|
|
10734
10757
|
}
|
|
10735
10758
|
),
|
|
10736
|
-
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { style: { flex: 1, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
10759
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { style: { flex: 1, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react96.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
10737
10760
|
FocusModeContent_default,
|
|
10738
10761
|
{
|
|
10739
10762
|
centerNodeId,
|
|
@@ -10754,17 +10777,17 @@ var FocusModeModal = ({
|
|
|
10754
10777
|
var FocusModeModal_default = FocusModeModal;
|
|
10755
10778
|
|
|
10756
10779
|
// src/components/DiagramBackground.tsx
|
|
10757
|
-
var
|
|
10758
|
-
var
|
|
10780
|
+
var import_react97 = require("react");
|
|
10781
|
+
var import_react98 = require("@xyflow/react");
|
|
10759
10782
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
10760
|
-
var DiagramBackground = (0,
|
|
10761
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10783
|
+
var DiagramBackground = (0, import_react97.memo)(function DiagramBackground2() {
|
|
10784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react98.Background, { color: "var(--ec-bg-dots)", gap: 16 });
|
|
10762
10785
|
});
|
|
10763
10786
|
var DiagramBackground_default = DiagramBackground;
|
|
10764
10787
|
|
|
10765
10788
|
// src/components/Legend.tsx
|
|
10766
|
-
var
|
|
10767
|
-
var
|
|
10789
|
+
var import_react99 = require("react");
|
|
10790
|
+
var import_react100 = require("@xyflow/react");
|
|
10768
10791
|
var import_lucide_react39 = require("lucide-react");
|
|
10769
10792
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
10770
10793
|
var GROUP_NODE_TYPES = ["group", "system-group", "domain-group", "swimlane"];
|
|
@@ -10859,7 +10882,7 @@ var getLegend = (nodes) => {
|
|
|
10859
10882
|
return legend;
|
|
10860
10883
|
};
|
|
10861
10884
|
var LEGEND_PANEL_STYLE_WITH_MINIMAP = { marginRight: "230px" };
|
|
10862
|
-
var LegendPanel = (0,
|
|
10885
|
+
var LegendPanel = (0, import_react99.memo)(function LegendPanel2({
|
|
10863
10886
|
legend,
|
|
10864
10887
|
hiddenKeys,
|
|
10865
10888
|
showMinimap = false,
|
|
@@ -10867,7 +10890,7 @@ var LegendPanel = (0, import_react97.memo)(function LegendPanel2({
|
|
|
10867
10890
|
}) {
|
|
10868
10891
|
if (Object.keys(legend).length === 0) return null;
|
|
10869
10892
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
10870
|
-
|
|
10893
|
+
import_react100.Panel,
|
|
10871
10894
|
{
|
|
10872
10895
|
position: "bottom-right",
|
|
10873
10896
|
style: showMinimap ? LEGEND_PANEL_STYLE_WITH_MINIMAP : void 0,
|
|
@@ -10911,7 +10934,7 @@ var DIAGRAM_FIT_VIEW_OPTIONS = {
|
|
|
10911
10934
|
};
|
|
10912
10935
|
|
|
10913
10936
|
// src/components/MermaidView.tsx
|
|
10914
|
-
var
|
|
10937
|
+
var import_react101 = require("react");
|
|
10915
10938
|
var import_lucide_react40 = require("lucide-react");
|
|
10916
10939
|
|
|
10917
10940
|
// src/utils/export-mermaid.ts
|
|
@@ -11211,22 +11234,22 @@ var MermaidView = ({
|
|
|
11211
11234
|
edges,
|
|
11212
11235
|
maxTextSize = 1e5
|
|
11213
11236
|
}) => {
|
|
11214
|
-
const [copySuccess, setCopySuccess] = (0,
|
|
11215
|
-
const [mermaidCode, setMermaidCode] = (0,
|
|
11216
|
-
const [previewSvg, setPreviewSvg] = (0,
|
|
11217
|
-
const [previewError, setPreviewError] = (0,
|
|
11218
|
-
const [isRendering, setIsRendering] = (0,
|
|
11219
|
-
const containerRef = (0,
|
|
11220
|
-
const svgContainerRef = (0,
|
|
11221
|
-
const panZoomInstanceRef = (0,
|
|
11222
|
-
(0,
|
|
11237
|
+
const [copySuccess, setCopySuccess] = (0, import_react101.useState)(false);
|
|
11238
|
+
const [mermaidCode, setMermaidCode] = (0, import_react101.useState)("");
|
|
11239
|
+
const [previewSvg, setPreviewSvg] = (0, import_react101.useState)(null);
|
|
11240
|
+
const [previewError, setPreviewError] = (0, import_react101.useState)(null);
|
|
11241
|
+
const [isRendering, setIsRendering] = (0, import_react101.useState)(true);
|
|
11242
|
+
const containerRef = (0, import_react101.useRef)(null);
|
|
11243
|
+
const svgContainerRef = (0, import_react101.useRef)(null);
|
|
11244
|
+
const panZoomInstanceRef = (0, import_react101.useRef)(null);
|
|
11245
|
+
(0, import_react101.useEffect)(() => {
|
|
11223
11246
|
const code = convertToMermaid(nodes, edges, {
|
|
11224
11247
|
includeStyles: true,
|
|
11225
11248
|
direction: "LR"
|
|
11226
11249
|
});
|
|
11227
11250
|
setMermaidCode(code);
|
|
11228
11251
|
}, [nodes, edges]);
|
|
11229
|
-
(0,
|
|
11252
|
+
(0, import_react101.useEffect)(() => {
|
|
11230
11253
|
if (!mermaidCode) return;
|
|
11231
11254
|
let cancelled = false;
|
|
11232
11255
|
setIsRendering(true);
|
|
@@ -11271,7 +11294,7 @@ var MermaidView = ({
|
|
|
11271
11294
|
cancelled = true;
|
|
11272
11295
|
};
|
|
11273
11296
|
}, [mermaidCode]);
|
|
11274
|
-
(0,
|
|
11297
|
+
(0, import_react101.useEffect)(() => {
|
|
11275
11298
|
if (!previewSvg || !svgContainerRef.current) return;
|
|
11276
11299
|
const initZoom = async () => {
|
|
11277
11300
|
const svgElement = svgContainerRef.current?.querySelector("svg");
|
|
@@ -11310,7 +11333,7 @@ var MermaidView = ({
|
|
|
11310
11333
|
}
|
|
11311
11334
|
};
|
|
11312
11335
|
}, [previewSvg]);
|
|
11313
|
-
const handleCopyToClipboard = (0,
|
|
11336
|
+
const handleCopyToClipboard = (0, import_react101.useCallback)(async () => {
|
|
11314
11337
|
await copyToClipboard(mermaidCode);
|
|
11315
11338
|
setCopySuccess(true);
|
|
11316
11339
|
setTimeout(() => setCopySuccess(false), 2e3);
|
|
@@ -11423,11 +11446,11 @@ var MermaidView = ({
|
|
|
11423
11446
|
var MermaidView_default = MermaidView;
|
|
11424
11447
|
|
|
11425
11448
|
// src/hooks/use-node-visibility.ts
|
|
11426
|
-
var
|
|
11427
|
-
var
|
|
11449
|
+
var import_react103 = require("react");
|
|
11450
|
+
var import_react104 = require("@xyflow/react");
|
|
11428
11451
|
|
|
11429
11452
|
// src/utils/hide-messages.ts
|
|
11430
|
-
var
|
|
11453
|
+
var import_react102 = require("@xyflow/react");
|
|
11431
11454
|
var MESSAGE_NODE_TYPES = [...MESSAGE, "messageGroup", "messageGroupExpanded"];
|
|
11432
11455
|
var isMessageNode = (node) => MESSAGE_NODE_TYPES.includes(node.type || "");
|
|
11433
11456
|
var getCollection = (type = "") => {
|
|
@@ -11549,7 +11572,7 @@ var hideNodes = (nodes, edges, isHidden) => {
|
|
|
11549
11572
|
label: getMessagesLabel(bridged.messages),
|
|
11550
11573
|
// The same size arrow as the rest of the graph's edges
|
|
11551
11574
|
markerEnd: {
|
|
11552
|
-
type:
|
|
11575
|
+
type: import_react102.MarkerType.ArrowClosed,
|
|
11553
11576
|
width: 20,
|
|
11554
11577
|
height: 20,
|
|
11555
11578
|
color: "rgb(var(--ec-page-text-muted))"
|
|
@@ -11811,7 +11834,7 @@ var useNodeVisibility = ({
|
|
|
11811
11834
|
}) => {
|
|
11812
11835
|
const hideMessagesKey = `EventCatalog:hideMessages${preferenceScope ? `:${preferenceScope}` : ""}`;
|
|
11813
11836
|
const hideChannelsKey = `EventCatalog:hideChannels${preferenceScope ? `:${preferenceScope}` : ""}`;
|
|
11814
|
-
const [urlLevel] = (0,
|
|
11837
|
+
const [urlLevel] = (0, import_react103.useState)(() => {
|
|
11815
11838
|
if (ignoreSavedLevel) return 3;
|
|
11816
11839
|
const level = Number(
|
|
11817
11840
|
new URLSearchParams(window.location.search).get("level")
|
|
@@ -11819,25 +11842,25 @@ var useNodeVisibility = ({
|
|
|
11819
11842
|
if (level === 1 || level === 2) return 2;
|
|
11820
11843
|
return level === 3 ? 3 : void 0;
|
|
11821
11844
|
});
|
|
11822
|
-
const [hideChannels, setHideChannels] = (0,
|
|
11845
|
+
const [hideChannels, setHideChannels] = (0, import_react103.useState)(
|
|
11823
11846
|
() => !ignoreSavedLevel && !urlLevel && localStorage.getItem(hideChannelsKey) === "true"
|
|
11824
11847
|
);
|
|
11825
|
-
const [hideMessages, setHideMessages] = (0,
|
|
11848
|
+
const [hideMessages, setHideMessages] = (0, import_react103.useState)(
|
|
11826
11849
|
() => urlLevel ? urlLevel === 2 : localStorage.getItem(hideMessagesKey) === "true"
|
|
11827
11850
|
);
|
|
11828
|
-
const fullGraph = (0,
|
|
11829
|
-
const { fitView, fitBounds } = (0,
|
|
11830
|
-
const animateNextChange = (0,
|
|
11831
|
-
const isAnimating = (0,
|
|
11832
|
-
const cancelAnimation = (0,
|
|
11851
|
+
const fullGraph = (0, import_react103.useRef)({ nodes, edges });
|
|
11852
|
+
const { fitView, fitBounds } = (0, import_react104.useReactFlow)();
|
|
11853
|
+
const animateNextChange = (0, import_react103.useRef)(false);
|
|
11854
|
+
const isAnimating = (0, import_react103.useRef)(false);
|
|
11855
|
+
const cancelAnimation = (0, import_react103.useRef)(void 0);
|
|
11833
11856
|
const messagesHidden = hideMessages && hasMessages;
|
|
11834
11857
|
const channelsHidden = hasChannels && (hideChannels || messagesHidden);
|
|
11835
|
-
const [hiddenLegendKeys, setHiddenLegendKeys] = (0,
|
|
11858
|
+
const [hiddenLegendKeys, setHiddenLegendKeys] = (0, import_react103.useState)(
|
|
11836
11859
|
initialHiddenLegendKeys
|
|
11837
11860
|
);
|
|
11838
|
-
const onHiddenLegendKeysChangeRef = (0,
|
|
11861
|
+
const onHiddenLegendKeysChangeRef = (0, import_react103.useRef)(onHiddenLegendKeysChange);
|
|
11839
11862
|
onHiddenLegendKeysChangeRef.current = onHiddenLegendKeysChange;
|
|
11840
|
-
const toggleLegendKey = (0,
|
|
11863
|
+
const toggleLegendKey = (0, import_react103.useCallback)(
|
|
11841
11864
|
(key) => {
|
|
11842
11865
|
animateNextChange.current = true;
|
|
11843
11866
|
const keys = hiddenLegendKeys.includes(key) ? hiddenLegendKeys.filter((hiddenKey) => hiddenKey !== key) : [...hiddenLegendKeys, key];
|
|
@@ -11846,14 +11869,14 @@ var useNodeVisibility = ({
|
|
|
11846
11869
|
},
|
|
11847
11870
|
[hiddenLegendKeys]
|
|
11848
11871
|
);
|
|
11849
|
-
const matchesLegendKeyRef = (0,
|
|
11872
|
+
const matchesLegendKeyRef = (0, import_react103.useRef)(matchesLegendKey);
|
|
11850
11873
|
matchesLegendKeyRef.current = matchesLegendKey;
|
|
11851
11874
|
const isHiddenByLegend = (node) => hiddenLegendKeys.some((key) => matchesLegendKeyRef.current(node, key));
|
|
11852
11875
|
const legendHidden = fullGraph.current.nodes.some(isHiddenByLegend);
|
|
11853
|
-
const [highlightCrossDomain, setHighlightCrossDomain] = (0,
|
|
11876
|
+
const [highlightCrossDomain, setHighlightCrossDomain] = (0, import_react103.useState)(
|
|
11854
11877
|
() => localStorage.getItem("EventCatalog:highlightCrossDomain") === "true"
|
|
11855
11878
|
);
|
|
11856
|
-
const toggleHighlightCrossDomain = (0,
|
|
11879
|
+
const toggleHighlightCrossDomain = (0, import_react103.useCallback)(() => {
|
|
11857
11880
|
const highlight = !highlightCrossDomain;
|
|
11858
11881
|
setHighlightCrossDomain(highlight);
|
|
11859
11882
|
localStorage.setItem(
|
|
@@ -11861,7 +11884,7 @@ var useNodeVisibility = ({
|
|
|
11861
11884
|
JSON.stringify(highlight)
|
|
11862
11885
|
);
|
|
11863
11886
|
}, [highlightCrossDomain]);
|
|
11864
|
-
(0,
|
|
11887
|
+
(0, import_react103.useEffect)(() => {
|
|
11865
11888
|
if (isAnimating.current) return;
|
|
11866
11889
|
const containsHiddenNodes = nodes.some(
|
|
11867
11890
|
(node) => channelsHidden && node.type === "channels" || messagesHidden && isMessageNode(node) || legendHidden && isHiddenByLegend(node)
|
|
@@ -11870,20 +11893,20 @@ var useNodeVisibility = ({
|
|
|
11870
11893
|
fullGraph.current = { nodes, edges };
|
|
11871
11894
|
}
|
|
11872
11895
|
}, [nodes, edges]);
|
|
11873
|
-
const toggleChannelsVisibility = (0,
|
|
11896
|
+
const toggleChannelsVisibility = (0, import_react103.useCallback)(() => {
|
|
11874
11897
|
animateNextChange.current = true;
|
|
11875
11898
|
const hide = !hideChannels;
|
|
11876
11899
|
setHideChannels(hide);
|
|
11877
11900
|
localStorage.setItem(hideChannelsKey, JSON.stringify(hide));
|
|
11878
11901
|
}, [hideChannels]);
|
|
11879
|
-
const toggleMessagesVisibility = (0,
|
|
11902
|
+
const toggleMessagesVisibility = (0, import_react103.useCallback)(() => {
|
|
11880
11903
|
animateNextChange.current = true;
|
|
11881
11904
|
const hide = !hideMessages;
|
|
11882
11905
|
setHideMessages(hide);
|
|
11883
11906
|
localStorage.setItem(hideMessagesKey, JSON.stringify(hide));
|
|
11884
11907
|
setLevelInUrl(hide ? 2 : 3);
|
|
11885
11908
|
}, [hideMessages]);
|
|
11886
|
-
const setDetailLevel = (0,
|
|
11909
|
+
const setDetailLevel = (0, import_react103.useCallback)((level) => {
|
|
11887
11910
|
animateNextChange.current = true;
|
|
11888
11911
|
const hide = level === 2;
|
|
11889
11912
|
setHideMessages(hide);
|
|
@@ -11894,20 +11917,20 @@ var useNodeVisibility = ({
|
|
|
11894
11917
|
}
|
|
11895
11918
|
setLevelInUrl(level);
|
|
11896
11919
|
}, []);
|
|
11897
|
-
const nodesRef = (0,
|
|
11920
|
+
const nodesRef = (0, import_react103.useRef)(nodes);
|
|
11898
11921
|
nodesRef.current = nodes;
|
|
11899
|
-
const edgesRef = (0,
|
|
11922
|
+
const edgesRef = (0, import_react103.useRef)(edges);
|
|
11900
11923
|
edgesRef.current = edges;
|
|
11901
|
-
const prepareEdgesRef = (0,
|
|
11924
|
+
const prepareEdgesRef = (0, import_react103.useRef)(prepareEdges);
|
|
11902
11925
|
prepareEdgesRef.current = prepareEdges;
|
|
11903
|
-
const beforeLayoutRef = (0,
|
|
11926
|
+
const beforeLayoutRef = (0, import_react103.useRef)(beforeLayout);
|
|
11904
11927
|
beforeLayoutRef.current = beforeLayout;
|
|
11905
|
-
const afterLayoutRef = (0,
|
|
11928
|
+
const afterLayoutRef = (0, import_react103.useRef)(afterLayout);
|
|
11906
11929
|
afterLayoutRef.current = afterLayout;
|
|
11907
|
-
const latestRun = (0,
|
|
11908
|
-
const [isLayingOut, setIsLayingOut] = (0,
|
|
11909
|
-
const isFirstRun = (0,
|
|
11910
|
-
(0,
|
|
11930
|
+
const latestRun = (0, import_react103.useRef)(0);
|
|
11931
|
+
const [isLayingOut, setIsLayingOut] = (0, import_react103.useState)(false);
|
|
11932
|
+
const isFirstRun = (0, import_react103.useRef)(true);
|
|
11933
|
+
(0, import_react103.useLayoutEffect)(() => {
|
|
11911
11934
|
const firstRun = isFirstRun.current;
|
|
11912
11935
|
isFirstRun.current = false;
|
|
11913
11936
|
const from = firstRun ? transitionFrom : void 0;
|
|
@@ -12025,7 +12048,7 @@ var shouldAnimateMessages = ({
|
|
|
12025
12048
|
};
|
|
12026
12049
|
|
|
12027
12050
|
// src/components/VisualizerDropdownContent.tsx
|
|
12028
|
-
var
|
|
12051
|
+
var import_react105 = require("react");
|
|
12029
12052
|
var DropdownMenu2 = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
12030
12053
|
var import_lucide_react41 = require("lucide-react");
|
|
12031
12054
|
var import_outline = require("@heroicons/react/24/outline");
|
|
@@ -12043,7 +12066,7 @@ var DIAGRAM_MENU_SEPARATOR = "my-1 h-px bg-[rgb(var(--ec-page-border))]";
|
|
|
12043
12066
|
|
|
12044
12067
|
// src/components/VisualizerDropdownContent.tsx
|
|
12045
12068
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
12046
|
-
var VisualizerDropdownContent = (0,
|
|
12069
|
+
var VisualizerDropdownContent = (0, import_react105.memo)(
|
|
12047
12070
|
({
|
|
12048
12071
|
isMermaidView,
|
|
12049
12072
|
setIsMermaidView,
|
|
@@ -12073,7 +12096,7 @@ var VisualizerDropdownContent = (0, import_react103.memo)(
|
|
|
12073
12096
|
onOpenNotes,
|
|
12074
12097
|
onOpenInStudio
|
|
12075
12098
|
}) => {
|
|
12076
|
-
const [layoutStatus, setLayoutStatus] = (0,
|
|
12099
|
+
const [layoutStatus, setLayoutStatus] = (0, import_react105.useState)("idle");
|
|
12077
12100
|
const portalContainer = usePortalContainer();
|
|
12078
12101
|
const handleSaveLayout = async () => {
|
|
12079
12102
|
if (!onSaveLayout) return;
|
|
@@ -12446,10 +12469,10 @@ VisualizerDropdownContent.displayName = "VisualizerDropdownContent";
|
|
|
12446
12469
|
var VisualizerDropdownContent_default = VisualizerDropdownContent;
|
|
12447
12470
|
|
|
12448
12471
|
// src/components/NodeContextMenu.tsx
|
|
12449
|
-
var
|
|
12472
|
+
var import_react106 = require("react");
|
|
12450
12473
|
var ContextMenu5 = __toESM(require("@radix-ui/react-context-menu"));
|
|
12451
12474
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
12452
|
-
var NodeContextMenu_default = (0,
|
|
12475
|
+
var NodeContextMenu_default = (0, import_react106.memo)(function NodeContextMenu({
|
|
12453
12476
|
items,
|
|
12454
12477
|
children
|
|
12455
12478
|
}) {
|
|
@@ -12487,7 +12510,7 @@ var NodeContextMenu_default = (0, import_react104.memo)(function NodeContextMenu
|
|
|
12487
12510
|
});
|
|
12488
12511
|
|
|
12489
12512
|
// src/utils/node-memo.ts
|
|
12490
|
-
var
|
|
12513
|
+
var import_react107 = require("react");
|
|
12491
12514
|
var POSITION_PROPS = /* @__PURE__ */ new Set(["positionAbsoluteX", "positionAbsoluteY"]);
|
|
12492
12515
|
var equalExceptPosition = (previous, next) => {
|
|
12493
12516
|
const keys = /* @__PURE__ */ new Set([...Object.keys(previous), ...Object.keys(next)]);
|
|
@@ -12501,7 +12524,7 @@ var equalExceptPosition = (previous, next) => {
|
|
|
12501
12524
|
}
|
|
12502
12525
|
return true;
|
|
12503
12526
|
};
|
|
12504
|
-
var memoNode = (Component) => (0,
|
|
12527
|
+
var memoNode = (Component) => (0, import_react107.memo)(Component, equalExceptPosition);
|
|
12505
12528
|
|
|
12506
12529
|
// src/utils/edge-animations.ts
|
|
12507
12530
|
var pauseEdgeAnimations = (canvas, paused) => canvas?.querySelectorAll(".react-flow__edges > svg").forEach(
|
|
@@ -12509,7 +12532,7 @@ var pauseEdgeAnimations = (canvas, paused) => canvas?.querySelectorAll(".react-f
|
|
|
12509
12532
|
);
|
|
12510
12533
|
|
|
12511
12534
|
// src/utils/export-image.ts
|
|
12512
|
-
var
|
|
12535
|
+
var import_react108 = require("@xyflow/react");
|
|
12513
12536
|
var MIN_IMAGE_WIDTH = 1024;
|
|
12514
12537
|
var MIN_IMAGE_HEIGHT = 768;
|
|
12515
12538
|
var EXPORT_PADDING = 40;
|
|
@@ -12522,7 +12545,7 @@ function getExportImageDimensions(nodesBounds) {
|
|
|
12522
12545
|
};
|
|
12523
12546
|
const width = Math.max(MIN_IMAGE_WIDTH, Math.ceil(paddedBounds.width));
|
|
12524
12547
|
const height = Math.max(MIN_IMAGE_HEIGHT, Math.ceil(paddedBounds.height));
|
|
12525
|
-
const viewport = (0,
|
|
12548
|
+
const viewport = (0, import_react108.getViewportForBounds)(paddedBounds, width, height, 0.5, 2, 0);
|
|
12526
12549
|
return { width, height, viewport };
|
|
12527
12550
|
}
|
|
12528
12551
|
function extractEcVarNames(cssText) {
|
|
@@ -12609,7 +12632,7 @@ function injectExportStyles(viewport) {
|
|
|
12609
12632
|
}
|
|
12610
12633
|
|
|
12611
12634
|
// src/utils/layout.ts
|
|
12612
|
-
var
|
|
12635
|
+
var import_react109 = require("@xyflow/react");
|
|
12613
12636
|
var EMPTY_GROUP_WIDTH = 200;
|
|
12614
12637
|
var EMPTY_GROUP_HEIGHT = 80;
|
|
12615
12638
|
var defaultSizes = {
|
|
@@ -12799,7 +12822,7 @@ async function layoutGraph(nodes, edges, { style } = {}) {
|
|
|
12799
12822
|
const isCalls = edge.type === "calls";
|
|
12800
12823
|
const isBidirectional = edge.type === "reads-writes";
|
|
12801
12824
|
const arrowMarker = {
|
|
12802
|
-
type:
|
|
12825
|
+
type: import_react109.MarkerType.ArrowClosed,
|
|
12803
12826
|
width: 20,
|
|
12804
12827
|
height: 20,
|
|
12805
12828
|
color: "rgb(var(--ec-page-text-muted))"
|
|
@@ -12948,9 +12971,9 @@ var buildMessageGroupExpansionNodes = ({
|
|
|
12948
12971
|
};
|
|
12949
12972
|
|
|
12950
12973
|
// src/components/NotesToolbarButton.tsx
|
|
12951
|
-
var
|
|
12974
|
+
var import_react110 = require("react");
|
|
12952
12975
|
var import_lucide_react42 = require("lucide-react");
|
|
12953
|
-
var
|
|
12976
|
+
var import_react111 = require("@xyflow/react");
|
|
12954
12977
|
var Dialog3 = __toESM(require("@radix-ui/react-dialog"));
|
|
12955
12978
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
12956
12979
|
var NODE_TYPE_META = {
|
|
@@ -13213,12 +13236,12 @@ function AllNotesModal({
|
|
|
13213
13236
|
onClose,
|
|
13214
13237
|
nodes
|
|
13215
13238
|
}) {
|
|
13216
|
-
const { setCenter, getZoom } = (0,
|
|
13217
|
-
const [selectedIdx, setSelectedIdx] = (0,
|
|
13239
|
+
const { setCenter, getZoom } = (0, import_react111.useReactFlow)();
|
|
13240
|
+
const [selectedIdx, setSelectedIdx] = (0, import_react110.useState)(0);
|
|
13218
13241
|
const portalContainer = usePortalContainer();
|
|
13219
13242
|
const totalNotes = noteGroups.reduce((sum, g) => sum + g.notes.length, 0);
|
|
13220
13243
|
const selected = noteGroups[selectedIdx] || noteGroups[0];
|
|
13221
|
-
const handleNavigate = (0,
|
|
13244
|
+
const handleNavigate = (0, import_react110.useCallback)(
|
|
13222
13245
|
(nodeId) => {
|
|
13223
13246
|
const node = nodes.find((n) => n.id === nodeId);
|
|
13224
13247
|
if (!node) return;
|
|
@@ -13821,7 +13844,7 @@ var GROUP_EDGE_STYLE = {
|
|
|
13821
13844
|
stroke: "var(--ec-edge-stroke, #6b7280)"
|
|
13822
13845
|
};
|
|
13823
13846
|
var GROUP_EDGE_MARKER = {
|
|
13824
|
-
type:
|
|
13847
|
+
type: import_react113.MarkerType.ArrowClosed,
|
|
13825
13848
|
width: 20,
|
|
13826
13849
|
height: 20
|
|
13827
13850
|
};
|
|
@@ -13927,12 +13950,12 @@ var NodeGraphBuilder = ({
|
|
|
13927
13950
|
onOpenInStudio,
|
|
13928
13951
|
studioGraphs
|
|
13929
13952
|
}) => {
|
|
13930
|
-
(0,
|
|
13953
|
+
(0, import_react112.useEffect)(() => {
|
|
13931
13954
|
if (onBuildUrl) {
|
|
13932
13955
|
setBuildUrlFn(onBuildUrl);
|
|
13933
13956
|
}
|
|
13934
13957
|
}, []);
|
|
13935
|
-
const nodeTypes = (0,
|
|
13958
|
+
const nodeTypes = (0, import_react112.useMemo)(() => {
|
|
13936
13959
|
const wrapWithContextMenu = (Component) => {
|
|
13937
13960
|
const Wrapped = (props) => {
|
|
13938
13961
|
const items = props.data?.contextMenu;
|
|
@@ -13960,7 +13983,7 @@ var NodeGraphBuilder = ({
|
|
|
13960
13983
|
])
|
|
13961
13984
|
);
|
|
13962
13985
|
}, []);
|
|
13963
|
-
const edgeTypes2 = (0,
|
|
13986
|
+
const edgeTypes2 = (0, import_react112.useMemo)(
|
|
13964
13987
|
() => ({
|
|
13965
13988
|
animated: AnimatedMessageEdge_default,
|
|
13966
13989
|
multiline: MultilineEdgeLabel_default,
|
|
@@ -13971,20 +13994,20 @@ var NodeGraphBuilder = ({
|
|
|
13971
13994
|
}),
|
|
13972
13995
|
[]
|
|
13973
13996
|
);
|
|
13974
|
-
const [animateMessages, setAnimateMessages] = (0,
|
|
13997
|
+
const [animateMessages, setAnimateMessages] = (0, import_react112.useState)(
|
|
13975
13998
|
() => shouldAnimateMessages({
|
|
13976
13999
|
disabled: disableMessageAnimation,
|
|
13977
14000
|
animated,
|
|
13978
14001
|
nodeCount: initialNodes.length
|
|
13979
14002
|
})
|
|
13980
14003
|
);
|
|
13981
|
-
const prepareEdges = (0,
|
|
14004
|
+
const prepareEdges = (0, import_react112.useCallback)(
|
|
13982
14005
|
(eds) => applyMessageAnimation(eds, animateMessages),
|
|
13983
14006
|
[animateMessages]
|
|
13984
14007
|
);
|
|
13985
|
-
const [firstEdges] = (0,
|
|
13986
|
-
const [nodes, setNodes, onNodesChange] = (0,
|
|
13987
|
-
const [edges, setEdges, onEdgesChange] = (0,
|
|
14008
|
+
const [firstEdges] = (0, import_react112.useState)(() => prepareEdges(initialEdges));
|
|
14009
|
+
const [nodes, setNodes, onNodesChange] = (0, import_react113.useNodesState)(initialNodes);
|
|
14010
|
+
const [edges, setEdges, onEdgesChange] = (0, import_react113.useEdgesState)(firstEdges);
|
|
13988
14011
|
const {
|
|
13989
14012
|
fitView,
|
|
13990
14013
|
getNodes,
|
|
@@ -13995,13 +14018,13 @@ var NodeGraphBuilder = ({
|
|
|
13995
14018
|
getViewport,
|
|
13996
14019
|
setViewport,
|
|
13997
14020
|
getInternalNode
|
|
13998
|
-
} = (0,
|
|
13999
|
-
const storeApi = (0,
|
|
14000
|
-
const previousGraphInputRef = (0,
|
|
14021
|
+
} = (0, import_react113.useReactFlow)();
|
|
14022
|
+
const storeApi = (0, import_react113.useStoreApi)();
|
|
14023
|
+
const previousGraphInputRef = (0, import_react112.useRef)({
|
|
14001
14024
|
nodes: initialNodes,
|
|
14002
14025
|
edges: initialEdges
|
|
14003
14026
|
});
|
|
14004
|
-
(0,
|
|
14027
|
+
(0, import_react112.useEffect)(() => {
|
|
14005
14028
|
const previousGraphInput = previousGraphInputRef.current;
|
|
14006
14029
|
previousGraphInputRef.current = {
|
|
14007
14030
|
nodes: initialNodes,
|
|
@@ -14016,43 +14039,43 @@ var NodeGraphBuilder = ({
|
|
|
14016
14039
|
fitView({ duration: 300, padding: 0.2 });
|
|
14017
14040
|
});
|
|
14018
14041
|
}, [initialNodes, initialEdges, setNodes, setEdges, fitView, prepareEdges]);
|
|
14019
|
-
const [_activeStepIndex, _setActiveStepIndex] = (0,
|
|
14020
|
-
const [_isFullscreen, _setIsFullscreen] = (0,
|
|
14021
|
-
const [isShareModalOpen, setIsShareModalOpen] = (0,
|
|
14022
|
-
const [shareUrlCopySuccess, setShareUrlCopySuccess] = (0,
|
|
14023
|
-
const [isMermaidView, setIsMermaidView] = (0,
|
|
14024
|
-
const [showMinimap, setShowMinimap] = (0,
|
|
14025
|
-
const [hasLayoutChanges, setHasLayoutChanges] = (0,
|
|
14026
|
-
const [isSavingLayout, setIsSavingLayout] = (0,
|
|
14027
|
-
const initialPositionsRef = (0,
|
|
14042
|
+
const [_activeStepIndex, _setActiveStepIndex] = (0, import_react112.useState)(null);
|
|
14043
|
+
const [_isFullscreen, _setIsFullscreen] = (0, import_react112.useState)(false);
|
|
14044
|
+
const [isShareModalOpen, setIsShareModalOpen] = (0, import_react112.useState)(false);
|
|
14045
|
+
const [shareUrlCopySuccess, setShareUrlCopySuccess] = (0, import_react112.useState)(false);
|
|
14046
|
+
const [isMermaidView, setIsMermaidView] = (0, import_react112.useState)(false);
|
|
14047
|
+
const [showMinimap, setShowMinimap] = (0, import_react112.useState)(false);
|
|
14048
|
+
const [hasLayoutChanges, setHasLayoutChanges] = (0, import_react112.useState)(false);
|
|
14049
|
+
const [isSavingLayout, setIsSavingLayout] = (0, import_react112.useState)(false);
|
|
14050
|
+
const initialPositionsRef = (0, import_react112.useRef)(
|
|
14028
14051
|
{}
|
|
14029
14052
|
);
|
|
14030
|
-
const [focusModeOpen, setFocusModeOpen] = (0,
|
|
14031
|
-
const [focusedNodeId, setFocusedNodeId] = (0,
|
|
14032
|
-
const [swimlanes, setSwimlanes] = (0,
|
|
14033
|
-
const swimlanesRef = (0,
|
|
14034
|
-
const [swimlaneStyle, setSwimlaneStyle] = (0,
|
|
14035
|
-
const swimlaneStyleRef = (0,
|
|
14036
|
-
const unlanedGraphRef = (0,
|
|
14037
|
-
const [isNotesModalOpen, setIsNotesModalOpen] = (0,
|
|
14038
|
-
const openNotesModal = (0,
|
|
14039
|
-
const interactionCountRef = (0,
|
|
14040
|
-
const startInteraction = (0,
|
|
14053
|
+
const [focusModeOpen, setFocusModeOpen] = (0, import_react112.useState)(false);
|
|
14054
|
+
const [focusedNodeId, setFocusedNodeId] = (0, import_react112.useState)(null);
|
|
14055
|
+
const [swimlanes, setSwimlanes] = (0, import_react112.useState)(null);
|
|
14056
|
+
const swimlanesRef = (0, import_react112.useRef)(null);
|
|
14057
|
+
const [swimlaneStyle, setSwimlaneStyle] = (0, import_react112.useState)("boxes");
|
|
14058
|
+
const swimlaneStyleRef = (0, import_react112.useRef)("boxes");
|
|
14059
|
+
const unlanedGraphRef = (0, import_react112.useRef)(null);
|
|
14060
|
+
const [isNotesModalOpen, setIsNotesModalOpen] = (0, import_react112.useState)(false);
|
|
14061
|
+
const openNotesModal = (0, import_react112.useCallback)(() => setIsNotesModalOpen(true), []);
|
|
14062
|
+
const interactionCountRef = (0, import_react112.useRef)(0);
|
|
14063
|
+
const startInteraction = (0, import_react112.useCallback)(() => {
|
|
14041
14064
|
interactionCountRef.current += 1;
|
|
14042
14065
|
if (interactionCountRef.current === 1) {
|
|
14043
14066
|
reactFlowWrapperRef.current?.classList.add("ec-interaction-active");
|
|
14044
14067
|
pauseEdgeAnimations(reactFlowWrapperRef.current, true);
|
|
14045
14068
|
}
|
|
14046
14069
|
}, []);
|
|
14047
|
-
const endInteraction = (0,
|
|
14070
|
+
const endInteraction = (0, import_react112.useCallback)(() => {
|
|
14048
14071
|
interactionCountRef.current = Math.max(0, interactionCountRef.current - 1);
|
|
14049
14072
|
if (interactionCountRef.current === 0) {
|
|
14050
14073
|
reactFlowWrapperRef.current?.classList.remove("ec-interaction-active");
|
|
14051
14074
|
pauseEdgeAnimations(reactFlowWrapperRef.current, false);
|
|
14052
14075
|
}
|
|
14053
14076
|
}, []);
|
|
14054
|
-
const hoveredEdgeNodesRef = (0,
|
|
14055
|
-
const handleEdgeMouseEnter = (0,
|
|
14077
|
+
const hoveredEdgeNodesRef = (0, import_react112.useRef)([]);
|
|
14078
|
+
const handleEdgeMouseEnter = (0, import_react112.useCallback)(
|
|
14056
14079
|
(_, edge) => {
|
|
14057
14080
|
const wrapper = reactFlowWrapperRef.current;
|
|
14058
14081
|
if (!wrapper) return;
|
|
@@ -14064,15 +14087,15 @@ var NodeGraphBuilder = ({
|
|
|
14064
14087
|
},
|
|
14065
14088
|
[]
|
|
14066
14089
|
);
|
|
14067
|
-
const handleEdgeMouseLeave = (0,
|
|
14090
|
+
const handleEdgeMouseLeave = (0, import_react112.useCallback)(() => {
|
|
14068
14091
|
hoveredEdgeNodesRef.current.forEach(
|
|
14069
14092
|
(el) => el.classList.remove("ec-edge-hover-node")
|
|
14070
14093
|
);
|
|
14071
14094
|
hoveredEdgeNodesRef.current = [];
|
|
14072
14095
|
}, []);
|
|
14073
|
-
const hoveredNodeEdgesRef = (0,
|
|
14074
|
-
const hoveredNodePeersRef = (0,
|
|
14075
|
-
const handleNodeMouseEnter = (0,
|
|
14096
|
+
const hoveredNodeEdgesRef = (0, import_react112.useRef)([]);
|
|
14097
|
+
const hoveredNodePeersRef = (0, import_react112.useRef)([]);
|
|
14098
|
+
const handleNodeMouseEnter = (0, import_react112.useCallback)(
|
|
14076
14099
|
(_, node) => {
|
|
14077
14100
|
const wrapper = reactFlowWrapperRef.current;
|
|
14078
14101
|
if (!wrapper) return;
|
|
@@ -14101,7 +14124,7 @@ var NodeGraphBuilder = ({
|
|
|
14101
14124
|
},
|
|
14102
14125
|
[]
|
|
14103
14126
|
);
|
|
14104
|
-
const handleNodeMouseLeave = (0,
|
|
14127
|
+
const handleNodeMouseLeave = (0, import_react112.useCallback)(() => {
|
|
14105
14128
|
hoveredNodeEdgesRef.current.forEach(
|
|
14106
14129
|
(el) => el.classList.remove("ec-node-hover-edge")
|
|
14107
14130
|
);
|
|
@@ -14111,30 +14134,30 @@ var NodeGraphBuilder = ({
|
|
|
14111
14134
|
);
|
|
14112
14135
|
hoveredNodePeersRef.current = [];
|
|
14113
14136
|
}, []);
|
|
14114
|
-
const hasChannels = (0,
|
|
14137
|
+
const hasChannels = (0, import_react112.useMemo)(
|
|
14115
14138
|
() => initialNodes.some((node) => node.type === "channels"),
|
|
14116
14139
|
[initialNodes]
|
|
14117
14140
|
);
|
|
14118
|
-
const hasMessages = (0,
|
|
14141
|
+
const hasMessages = (0, import_react112.useMemo)(
|
|
14119
14142
|
() => initialNodes.some(isMessageNode),
|
|
14120
14143
|
[initialNodes]
|
|
14121
14144
|
);
|
|
14122
|
-
const isFlowGraph = (0,
|
|
14145
|
+
const isFlowGraph = (0, import_react112.useMemo)(
|
|
14123
14146
|
() => initialEdges.some((edge) => edge.type === "flow-edge"),
|
|
14124
14147
|
[initialEdges]
|
|
14125
14148
|
);
|
|
14126
|
-
const renderedSizeOf = (0,
|
|
14149
|
+
const renderedSizeOf = (0, import_react112.useCallback)(
|
|
14127
14150
|
(node) => {
|
|
14128
14151
|
const measured = storeApi.getState().nodeLookup.get(node.id)?.measured;
|
|
14129
14152
|
return measured?.width && measured?.height ? { width: measured.width, height: measured.height } : getNodeSize(node);
|
|
14130
14153
|
},
|
|
14131
14154
|
[storeApi]
|
|
14132
14155
|
);
|
|
14133
|
-
const beforeLayout = (0,
|
|
14156
|
+
const beforeLayout = (0, import_react112.useCallback)(
|
|
14134
14157
|
(graph) => swimlaneStyleRef.current === "lanes" ? removeSwimlanes(graph) : graph,
|
|
14135
14158
|
[]
|
|
14136
14159
|
);
|
|
14137
|
-
const afterLayout = (0,
|
|
14160
|
+
const afterLayout = (0, import_react112.useCallback)((graph) => {
|
|
14138
14161
|
const groupBy = swimlanesRef.current;
|
|
14139
14162
|
const style = swimlaneStyleRef.current;
|
|
14140
14163
|
const current = getGrouping(graph.nodes);
|
|
@@ -14146,24 +14169,24 @@ var NodeGraphBuilder = ({
|
|
|
14146
14169
|
unlanedGraphRef.current = unlaned;
|
|
14147
14170
|
return layoutSwimlanes(unlaned, groupBy, { sizeOf: renderedSizeOf });
|
|
14148
14171
|
}, []);
|
|
14149
|
-
const hasLevels = (0,
|
|
14172
|
+
const hasLevels = (0, import_react112.useMemo)(
|
|
14150
14173
|
() => initialNodes.some(
|
|
14151
14174
|
(node) => LEVEL_NODE_TYPES.includes(node.type || "")
|
|
14152
14175
|
),
|
|
14153
14176
|
[initialNodes]
|
|
14154
14177
|
);
|
|
14155
|
-
const isContextGraph = (0,
|
|
14178
|
+
const isContextGraph = (0, import_react112.useMemo)(
|
|
14156
14179
|
() => initialNodes.every(
|
|
14157
14180
|
(node) => CONTEXT_NODE_TYPES.includes(node.type || "")
|
|
14158
14181
|
),
|
|
14159
14182
|
[initialNodes]
|
|
14160
14183
|
);
|
|
14161
|
-
const hasOtherDomains = (0,
|
|
14184
|
+
const hasOtherDomains = (0, import_react112.useMemo)(
|
|
14162
14185
|
() => mode === "full" && initialNodes.some((node) => !!node.data?.otherDomain),
|
|
14163
14186
|
[initialNodes, mode]
|
|
14164
14187
|
);
|
|
14165
|
-
const legendRef = (0,
|
|
14166
|
-
const matchesLegendKey = (0,
|
|
14188
|
+
const legendRef = (0, import_react112.useRef)({});
|
|
14189
|
+
const matchesLegendKey = (0, import_react112.useCallback)((node, key) => {
|
|
14167
14190
|
const groupId = legendRef.current[key]?.groupId;
|
|
14168
14191
|
return groupId ? node.data?.group?.id === groupId : node.type === key;
|
|
14169
14192
|
}, []);
|
|
@@ -14199,7 +14222,7 @@ var NodeGraphBuilder = ({
|
|
|
14199
14222
|
beforeLayout,
|
|
14200
14223
|
afterLayout
|
|
14201
14224
|
});
|
|
14202
|
-
const switchGraph = (0,
|
|
14225
|
+
const switchGraph = (0, import_react112.useCallback)(
|
|
14203
14226
|
(showOverview) => onShowOverview?.(showOverview, {
|
|
14204
14227
|
nodes: getNodes(),
|
|
14205
14228
|
edges: getEdges(),
|
|
@@ -14207,7 +14230,7 @@ var NodeGraphBuilder = ({
|
|
|
14207
14230
|
}),
|
|
14208
14231
|
[onShowOverview, getNodes, getEdges, getViewport]
|
|
14209
14232
|
);
|
|
14210
|
-
const levels = (0,
|
|
14233
|
+
const levels = (0, import_react112.useMemo)(() => {
|
|
14211
14234
|
if (isFlowGraph) return [];
|
|
14212
14235
|
if (!overviewLabel && !isContextGraph && !hasLevels) return [];
|
|
14213
14236
|
const selectDetailLevel = (level) => {
|
|
@@ -14249,7 +14272,7 @@ var NodeGraphBuilder = ({
|
|
|
14249
14272
|
setDetailLevel,
|
|
14250
14273
|
switchGraph
|
|
14251
14274
|
]);
|
|
14252
|
-
const canvasTools = (0,
|
|
14275
|
+
const canvasTools = (0, import_react112.useMemo)(
|
|
14253
14276
|
() => hasOtherDomains ? [
|
|
14254
14277
|
{
|
|
14255
14278
|
label: highlightCrossDomain ? "Stop highlighting cross-domain communication" : "Highlight cross-domain communication",
|
|
@@ -14260,23 +14283,23 @@ var NodeGraphBuilder = ({
|
|
|
14260
14283
|
] : [],
|
|
14261
14284
|
[hasOtherDomains, highlightCrossDomain, toggleHighlightCrossDomain]
|
|
14262
14285
|
);
|
|
14263
|
-
const searchRef = (0,
|
|
14264
|
-
const reactFlowWrapperRef = (0,
|
|
14265
|
-
const scrollableContainerRef = (0,
|
|
14266
|
-
const nodesRef = (0,
|
|
14286
|
+
const searchRef = (0, import_react112.useRef)(null);
|
|
14287
|
+
const reactFlowWrapperRef = (0, import_react112.useRef)(null);
|
|
14288
|
+
const scrollableContainerRef = (0, import_react112.useRef)(null);
|
|
14289
|
+
const nodesRef = (0, import_react112.useRef)(nodes);
|
|
14267
14290
|
nodesRef.current = nodes;
|
|
14268
|
-
const edgesRef = (0,
|
|
14291
|
+
const edgesRef = (0, import_react112.useRef)(edges);
|
|
14269
14292
|
edgesRef.current = edges;
|
|
14270
|
-
const subFlowLayoutRun = (0,
|
|
14271
|
-
const hideChannelsRef = (0,
|
|
14293
|
+
const subFlowLayoutRun = (0, import_react112.useRef)(0);
|
|
14294
|
+
const hideChannelsRef = (0, import_react112.useRef)(hideChannels);
|
|
14272
14295
|
hideChannelsRef.current = hideChannels;
|
|
14273
|
-
const walkthroughKeyRef = (0,
|
|
14296
|
+
const walkthroughKeyRef = (0, import_react112.useRef)("");
|
|
14274
14297
|
const computedWalkthroughKey = `${nodes.map((n) => `${n.id}:${n.type}`).join(",")}|${edges.map((e) => `${e.source}>${e.target}`).join(",")}`;
|
|
14275
14298
|
if (computedWalkthroughKey !== walkthroughKeyRef.current) {
|
|
14276
14299
|
walkthroughKeyRef.current = computedWalkthroughKey;
|
|
14277
14300
|
}
|
|
14278
14301
|
const walkthroughKey = walkthroughKeyRef.current;
|
|
14279
|
-
const { walkthroughNodes, walkthroughEdges } = (0,
|
|
14302
|
+
const { walkthroughNodes, walkthroughEdges } = (0, import_react112.useMemo)(() => {
|
|
14280
14303
|
const wrapperNodeIds = new Set(
|
|
14281
14304
|
nodes.filter((n) => isExpandedWrapper(n.type) || isSwimlaneNode(n)).map((n) => n.id)
|
|
14282
14305
|
);
|
|
@@ -14287,13 +14310,13 @@ var NodeGraphBuilder = ({
|
|
|
14287
14310
|
)
|
|
14288
14311
|
};
|
|
14289
14312
|
}, [walkthroughKey]);
|
|
14290
|
-
const animateLayout2 = (0,
|
|
14313
|
+
const animateLayout2 = (0, import_react112.useCallback)(() => {
|
|
14291
14314
|
const wrapper = reactFlowWrapperRef.current;
|
|
14292
14315
|
if (!wrapper) return;
|
|
14293
14316
|
wrapper.classList.add("ec-animating-layout");
|
|
14294
14317
|
setTimeout(() => wrapper.classList.remove("ec-animating-layout"), 400);
|
|
14295
14318
|
}, []);
|
|
14296
|
-
const makeRoomForRenderedExpandedGroup = (0,
|
|
14319
|
+
const makeRoomForRenderedExpandedGroup = (0, import_react112.useCallback)(
|
|
14297
14320
|
(groupNodeId, groupBounds) => {
|
|
14298
14321
|
const padding = 80;
|
|
14299
14322
|
const protectedBounds = {
|
|
@@ -14322,7 +14345,7 @@ var NodeGraphBuilder = ({
|
|
|
14322
14345
|
},
|
|
14323
14346
|
[getIntersectingNodes, setNodes]
|
|
14324
14347
|
);
|
|
14325
|
-
const handleCollapseGroup = (0,
|
|
14348
|
+
const handleCollapseGroup = (0, import_react112.useCallback)(
|
|
14326
14349
|
(e) => {
|
|
14327
14350
|
const target = e.target;
|
|
14328
14351
|
const collapseBtn = target.closest(
|
|
@@ -14396,7 +14419,7 @@ var NodeGraphBuilder = ({
|
|
|
14396
14419
|
},
|
|
14397
14420
|
[initialNodes, initialEdges, setNodes, setEdges, animateLayout2]
|
|
14398
14421
|
);
|
|
14399
|
-
(0,
|
|
14422
|
+
(0, import_react112.useEffect)(() => {
|
|
14400
14423
|
if (isDevMode && initialNodes.length > 0) {
|
|
14401
14424
|
const positions = {};
|
|
14402
14425
|
initialNodes.forEach((node) => {
|
|
@@ -14405,7 +14428,7 @@ var NodeGraphBuilder = ({
|
|
|
14405
14428
|
initialPositionsRef.current = positions;
|
|
14406
14429
|
}
|
|
14407
14430
|
}, [isDevMode, initialNodes]);
|
|
14408
|
-
const checkForLayoutChanges = (0,
|
|
14431
|
+
const checkForLayoutChanges = (0, import_react112.useCallback)(() => {
|
|
14409
14432
|
if (!isDevMode) return;
|
|
14410
14433
|
const initial = initialPositionsRef.current;
|
|
14411
14434
|
if (Object.keys(initial).length === 0) return;
|
|
@@ -14415,7 +14438,7 @@ var NodeGraphBuilder = ({
|
|
|
14415
14438
|
});
|
|
14416
14439
|
setHasLayoutChanges(hasChanges);
|
|
14417
14440
|
}, [isDevMode]);
|
|
14418
|
-
const handleNodesChange = (0,
|
|
14441
|
+
const handleNodesChange = (0, import_react112.useCallback)(
|
|
14419
14442
|
(changes) => {
|
|
14420
14443
|
onNodesChange(changes);
|
|
14421
14444
|
const hasDragEnd = changes.some(
|
|
@@ -14427,13 +14450,13 @@ var NodeGraphBuilder = ({
|
|
|
14427
14450
|
},
|
|
14428
14451
|
[onNodesChange, checkForLayoutChanges]
|
|
14429
14452
|
);
|
|
14430
|
-
const resetNodesAndEdges = (0,
|
|
14453
|
+
const resetNodesAndEdges = (0, import_react112.useCallback)(() => {
|
|
14431
14454
|
setNodes((nds) => mapChanged(nds, unpickedNode));
|
|
14432
14455
|
setEdges(
|
|
14433
14456
|
(eds) => mapChanged(eds, (edge) => unpickedEdge(edge, animateMessages))
|
|
14434
14457
|
);
|
|
14435
14458
|
}, [setNodes, setEdges, animateMessages]);
|
|
14436
|
-
(0,
|
|
14459
|
+
(0, import_react112.useEffect)(() => {
|
|
14437
14460
|
if (!focusNodeId) return;
|
|
14438
14461
|
const targetNode = nodesRef.current.find((node) => node.id === focusNodeId);
|
|
14439
14462
|
if (!targetNode) return;
|
|
@@ -14451,13 +14474,13 @@ var NodeGraphBuilder = ({
|
|
|
14451
14474
|
});
|
|
14452
14475
|
});
|
|
14453
14476
|
}, [focusNodeId, focusRequestId, fitView, setNodes]);
|
|
14454
|
-
(0,
|
|
14477
|
+
(0, import_react112.useEffect)(() => {
|
|
14455
14478
|
if (fitRequestId == null) return;
|
|
14456
14479
|
requestAnimationFrame(() => {
|
|
14457
14480
|
fitView({ duration: 400, padding: 0.2 });
|
|
14458
14481
|
});
|
|
14459
14482
|
}, [fitRequestId, fitView]);
|
|
14460
|
-
const handleNodeClick = (0,
|
|
14483
|
+
const handleNodeClick = (0, import_react112.useCallback)(
|
|
14461
14484
|
(_, node) => {
|
|
14462
14485
|
if (onNodeClick) {
|
|
14463
14486
|
onNodeClick(node);
|
|
@@ -14805,17 +14828,17 @@ var NodeGraphBuilder = ({
|
|
|
14805
14828
|
prepareEdges
|
|
14806
14829
|
]
|
|
14807
14830
|
);
|
|
14808
|
-
const toggleAnimateMessages = (0,
|
|
14831
|
+
const toggleAnimateMessages = (0, import_react112.useCallback)(() => {
|
|
14809
14832
|
setAnimateMessages((prev) => {
|
|
14810
14833
|
const next = !prev;
|
|
14811
14834
|
localStorage.setItem(ANIMATE_MESSAGES_STORAGE_KEY, JSON.stringify(next));
|
|
14812
14835
|
return next;
|
|
14813
14836
|
});
|
|
14814
14837
|
}, []);
|
|
14815
|
-
const handleFitView = (0,
|
|
14838
|
+
const handleFitView = (0, import_react112.useCallback)(() => {
|
|
14816
14839
|
fitView({ ...DIAGRAM_FIT_VIEW_OPTIONS, duration: 400 });
|
|
14817
14840
|
}, [fitView]);
|
|
14818
|
-
(0,
|
|
14841
|
+
(0, import_react112.useEffect)(() => {
|
|
14819
14842
|
setAnimateMessages(
|
|
14820
14843
|
shouldAnimateMessages({
|
|
14821
14844
|
disabled: disableMessageAnimation,
|
|
@@ -14824,19 +14847,19 @@ var NodeGraphBuilder = ({
|
|
|
14824
14847
|
})
|
|
14825
14848
|
);
|
|
14826
14849
|
}, [animated, disableMessageAnimation, initialNodes.length]);
|
|
14827
|
-
const animatedEdgesFor = (0,
|
|
14828
|
-
(0,
|
|
14850
|
+
const animatedEdgesFor = (0, import_react112.useRef)(animateMessages);
|
|
14851
|
+
(0, import_react112.useEffect)(() => {
|
|
14829
14852
|
if (animatedEdgesFor.current === animateMessages) return;
|
|
14830
14853
|
animatedEdgesFor.current = animateMessages;
|
|
14831
14854
|
setEdges((eds) => applyMessageAnimation(eds, animateMessages));
|
|
14832
14855
|
}, [animateMessages]);
|
|
14833
|
-
(0,
|
|
14856
|
+
(0, import_react112.useEffect)(() => {
|
|
14834
14857
|
if (transitionFrom) return;
|
|
14835
14858
|
setTimeout(() => {
|
|
14836
14859
|
fitView({ maxZoom: 1, duration: 800 });
|
|
14837
14860
|
}, 150);
|
|
14838
14861
|
}, []);
|
|
14839
|
-
const generateMermaidCode = (0,
|
|
14862
|
+
const generateMermaidCode = (0, import_react112.useCallback)(() => {
|
|
14840
14863
|
try {
|
|
14841
14864
|
return convertToMermaid(nodesRef.current, edgesRef.current, {
|
|
14842
14865
|
includeStyles: true,
|
|
@@ -14847,7 +14870,7 @@ var NodeGraphBuilder = ({
|
|
|
14847
14870
|
return "";
|
|
14848
14871
|
}
|
|
14849
14872
|
}, []);
|
|
14850
|
-
(0,
|
|
14873
|
+
(0, import_react112.useEffect)(() => {
|
|
14851
14874
|
if (zoomOnScroll) return;
|
|
14852
14875
|
const findScrollableContainer = () => {
|
|
14853
14876
|
const selectors = [
|
|
@@ -14892,31 +14915,31 @@ var NodeGraphBuilder = ({
|
|
|
14892
14915
|
};
|
|
14893
14916
|
}
|
|
14894
14917
|
}, [zoomOnScroll]);
|
|
14895
|
-
const handlePaneClick = (0,
|
|
14918
|
+
const handlePaneClick = (0, import_react112.useCallback)(() => {
|
|
14896
14919
|
searchRef.current?.hideSuggestions();
|
|
14897
14920
|
resetNodesAndEdges();
|
|
14898
14921
|
fitView({ maxZoom: 1, duration: 800 });
|
|
14899
14922
|
}, [resetNodesAndEdges, fitView]);
|
|
14900
|
-
const handleNodeSelect = (0,
|
|
14923
|
+
const handleNodeSelect = (0, import_react112.useCallback)(
|
|
14901
14924
|
(node) => {
|
|
14902
14925
|
handleNodeClick(null, node);
|
|
14903
14926
|
},
|
|
14904
14927
|
[handleNodeClick]
|
|
14905
14928
|
);
|
|
14906
|
-
const handleSearchClear = (0,
|
|
14929
|
+
const handleSearchClear = (0, import_react112.useCallback)(() => {
|
|
14907
14930
|
resetNodesAndEdges();
|
|
14908
14931
|
fitView({ maxZoom: 1, duration: 800 });
|
|
14909
14932
|
}, [resetNodesAndEdges, fitView]);
|
|
14910
|
-
const downloadImage = (0,
|
|
14933
|
+
const downloadImage = (0, import_react112.useCallback)((dataUrl, filename) => {
|
|
14911
14934
|
const a = document.createElement("a");
|
|
14912
14935
|
a.setAttribute("download", `${filename || "eventcatalog"}.png`);
|
|
14913
14936
|
a.setAttribute("href", dataUrl);
|
|
14914
14937
|
a.click();
|
|
14915
14938
|
}, []);
|
|
14916
|
-
const openChat = (0,
|
|
14939
|
+
const openChat = (0, import_react112.useCallback)(() => {
|
|
14917
14940
|
window.dispatchEvent(new CustomEvent("eventcatalog:open-chat"));
|
|
14918
14941
|
}, []);
|
|
14919
|
-
const handleSaveLayout = (0,
|
|
14942
|
+
const handleSaveLayout = (0, import_react112.useCallback)(async () => {
|
|
14920
14943
|
if (!resourceKey || !onSaveLayout) return false;
|
|
14921
14944
|
if (swimlanesRef.current) return false;
|
|
14922
14945
|
const positions = {};
|
|
@@ -14929,7 +14952,7 @@ var NodeGraphBuilder = ({
|
|
|
14929
14952
|
});
|
|
14930
14953
|
return await onSaveLayout(resourceKey, positions);
|
|
14931
14954
|
}, [resourceKey, onSaveLayout]);
|
|
14932
|
-
const getStudioSnapshot = (0,
|
|
14955
|
+
const getStudioSnapshot = (0, import_react112.useCallback)(async () => {
|
|
14933
14956
|
const { detail, overview, hiddenMessages } = studioGraphs;
|
|
14934
14957
|
const level = levels.findIndex((entry) => entry.active) + 1 || 3;
|
|
14935
14958
|
const shown = {
|
|
@@ -14990,15 +15013,15 @@ var NodeGraphBuilder = ({
|
|
|
14990
15013
|
getEdges,
|
|
14991
15014
|
getInternalNode
|
|
14992
15015
|
]);
|
|
14993
|
-
const handleOpenInStudio = (0,
|
|
15016
|
+
const handleOpenInStudio = (0, import_react112.useCallback)(() => {
|
|
14994
15017
|
if (onOpenInStudio && studioGraphs)
|
|
14995
15018
|
onOpenInStudio({ title, getSnapshot: getStudioSnapshot });
|
|
14996
15019
|
}, [onOpenInStudio, studioGraphs, title, getStudioSnapshot]);
|
|
14997
|
-
const handleResetLayout = (0,
|
|
15020
|
+
const handleResetLayout = (0, import_react112.useCallback)(async () => {
|
|
14998
15021
|
if (!resourceKey || !onResetLayout) return false;
|
|
14999
15022
|
return await onResetLayout(resourceKey);
|
|
15000
15023
|
}, [resourceKey, onResetLayout]);
|
|
15001
|
-
const handleQuickSaveLayout = (0,
|
|
15024
|
+
const handleQuickSaveLayout = (0, import_react112.useCallback)(async () => {
|
|
15002
15025
|
setIsSavingLayout(true);
|
|
15003
15026
|
const success = await handleSaveLayout();
|
|
15004
15027
|
setIsSavingLayout(false);
|
|
@@ -15011,17 +15034,17 @@ var NodeGraphBuilder = ({
|
|
|
15011
15034
|
setHasLayoutChanges(false);
|
|
15012
15035
|
}
|
|
15013
15036
|
}, [handleSaveLayout]);
|
|
15014
|
-
const handleCopyArchitectureCode = (0,
|
|
15037
|
+
const handleCopyArchitectureCode = (0, import_react112.useCallback)(async () => {
|
|
15015
15038
|
const code = generateMermaidCode();
|
|
15016
15039
|
await copyToClipboard(code);
|
|
15017
15040
|
}, [generateMermaidCode]);
|
|
15018
|
-
const handleCopyShareUrl = (0,
|
|
15041
|
+
const handleCopyShareUrl = (0, import_react112.useCallback)(async () => {
|
|
15019
15042
|
const url = typeof window !== "undefined" ? window.location.href : "";
|
|
15020
15043
|
await copyToClipboard(url);
|
|
15021
15044
|
setShareUrlCopySuccess(true);
|
|
15022
15045
|
setTimeout(() => setShareUrlCopySuccess(false), 2e3);
|
|
15023
15046
|
}, []);
|
|
15024
|
-
const toggleFullScreen = (0,
|
|
15047
|
+
const toggleFullScreen = (0, import_react112.useCallback)(() => {
|
|
15025
15048
|
if (!document.fullscreenElement) {
|
|
15026
15049
|
reactFlowWrapperRef.current?.requestFullscreen().catch((err) => {
|
|
15027
15050
|
console.error(
|
|
@@ -15032,7 +15055,7 @@ var NodeGraphBuilder = ({
|
|
|
15032
15055
|
document.exitFullscreen();
|
|
15033
15056
|
}
|
|
15034
15057
|
}, []);
|
|
15035
|
-
(0,
|
|
15058
|
+
(0, import_react112.useEffect)(() => {
|
|
15036
15059
|
const handleFullscreenChange = () => {
|
|
15037
15060
|
_setIsFullscreen(!!document.fullscreenElement);
|
|
15038
15061
|
setTimeout(() => {
|
|
@@ -15044,8 +15067,8 @@ var NodeGraphBuilder = ({
|
|
|
15044
15067
|
document.removeEventListener("fullscreenchange", handleFullscreenChange);
|
|
15045
15068
|
};
|
|
15046
15069
|
}, [fitView]);
|
|
15047
|
-
const handleExportVisual = (0,
|
|
15048
|
-
const nodesBounds = (0,
|
|
15070
|
+
const handleExportVisual = (0, import_react112.useCallback)(() => {
|
|
15071
|
+
const nodesBounds = (0, import_react113.getNodesBounds)(getNodes(), {
|
|
15049
15072
|
nodeLookup: storeApi.getState().nodeLookup
|
|
15050
15073
|
});
|
|
15051
15074
|
const { width, height, viewport } = getExportImageDimensions(nodesBounds);
|
|
@@ -15073,15 +15096,15 @@ var NodeGraphBuilder = ({
|
|
|
15073
15096
|
if (controls) controls.style.display = "block";
|
|
15074
15097
|
});
|
|
15075
15098
|
}, [getNodes, storeApi, downloadImage, title]);
|
|
15076
|
-
const legendKeyRef = (0,
|
|
15099
|
+
const legendKeyRef = (0, import_react112.useRef)("");
|
|
15077
15100
|
const computedLegendKey = nodes.map((n) => `${n.id}:${n.type}:${n.data.group?.id || ""}`).join(",");
|
|
15078
15101
|
if (computedLegendKey !== legendKeyRef.current) {
|
|
15079
15102
|
legendKeyRef.current = computedLegendKey;
|
|
15080
15103
|
}
|
|
15081
15104
|
const legendKey = legendKeyRef.current;
|
|
15082
|
-
const graphLegend = (0,
|
|
15083
|
-
const legendEntries = (0,
|
|
15084
|
-
const legend = (0,
|
|
15105
|
+
const graphLegend = (0, import_react112.useMemo)(() => getLegend(nodes), [legendKey]);
|
|
15106
|
+
const legendEntries = (0, import_react112.useRef)(null);
|
|
15107
|
+
const legend = (0, import_react112.useMemo)(() => {
|
|
15085
15108
|
legendEntries.current ?? (legendEntries.current = getLegend(initialNodes));
|
|
15086
15109
|
Object.assign(legendEntries.current, graphLegend);
|
|
15087
15110
|
return Object.fromEntries(
|
|
@@ -15091,17 +15114,17 @@ var NodeGraphBuilder = ({
|
|
|
15091
15114
|
);
|
|
15092
15115
|
}, [graphLegend, hiddenLegendKeys]);
|
|
15093
15116
|
legendRef.current = legend;
|
|
15094
|
-
const nodeIdsKeyRef = (0,
|
|
15117
|
+
const nodeIdsKeyRef = (0, import_react112.useRef)("");
|
|
15095
15118
|
const computedNodeIdsKey = nodes.map((n) => n.id).join(",");
|
|
15096
15119
|
if (computedNodeIdsKey !== nodeIdsKeyRef.current) {
|
|
15097
15120
|
nodeIdsKeyRef.current = computedNodeIdsKey;
|
|
15098
15121
|
}
|
|
15099
15122
|
const nodeIdsKey = nodeIdsKeyRef.current;
|
|
15100
|
-
const searchNodes = (0,
|
|
15123
|
+
const searchNodes = (0, import_react112.useMemo)(
|
|
15101
15124
|
() => nodes.filter((node) => !isSwimlaneNode(node)),
|
|
15102
15125
|
[nodeIdsKey]
|
|
15103
15126
|
);
|
|
15104
|
-
const allNoteGroups = (0,
|
|
15127
|
+
const allNoteGroups = (0, import_react112.useMemo)(() => {
|
|
15105
15128
|
const groups = [];
|
|
15106
15129
|
for (const node of nodes) {
|
|
15107
15130
|
const result = getNotesFromNode(node);
|
|
@@ -15116,13 +15139,13 @@ var NodeGraphBuilder = ({
|
|
|
15116
15139
|
}
|
|
15117
15140
|
return groups;
|
|
15118
15141
|
}, [nodeIdsKey]);
|
|
15119
|
-
const totalNotesCount = (0,
|
|
15142
|
+
const totalNotesCount = (0, import_react112.useMemo)(
|
|
15120
15143
|
() => allNoteGroups.reduce((sum, g) => sum + g.notes.length, 0),
|
|
15121
15144
|
[allNoteGroups]
|
|
15122
15145
|
);
|
|
15123
|
-
const [walkthroughTrail, setWalkthroughTrail] = (0,
|
|
15124
|
-
const walkthroughTrailRef = (0,
|
|
15125
|
-
const handleStepChange = (0,
|
|
15146
|
+
const [walkthroughTrail, setWalkthroughTrail] = (0, import_react112.useState)([]);
|
|
15147
|
+
const walkthroughTrailRef = (0, import_react112.useRef)([]);
|
|
15148
|
+
const handleStepChange = (0, import_react112.useCallback)(
|
|
15126
15149
|
(nodeId, shouldZoomOut, trail = nodeId ? [nodeId] : []) => {
|
|
15127
15150
|
if (nodeId === null) {
|
|
15128
15151
|
resetNodesAndEdges();
|
|
@@ -15180,12 +15203,12 @@ var NodeGraphBuilder = ({
|
|
|
15180
15203
|
walkthroughTrailRef.current = trail;
|
|
15181
15204
|
const canvas = reactFlowWrapperRef.current?.getBoundingClientRect();
|
|
15182
15205
|
if (!canvas) return;
|
|
15183
|
-
const bounds = (0,
|
|
15206
|
+
const bounds = (0, import_react113.getNodesBounds)([nodeId, ...nextNodeIds], {
|
|
15184
15207
|
nodeLookup: storeApi.getState().nodeLookup
|
|
15185
15208
|
});
|
|
15186
15209
|
const cardSpace = Math.min(WALKTHROUGH_CARD_SPACE, canvas.height * 0.35);
|
|
15187
15210
|
setViewport(
|
|
15188
|
-
(0,
|
|
15211
|
+
(0, import_react113.getViewportForBounds)(
|
|
15189
15212
|
bounds,
|
|
15190
15213
|
canvas.width,
|
|
15191
15214
|
canvas.height - cardSpace,
|
|
@@ -15198,13 +15221,13 @@ var NodeGraphBuilder = ({
|
|
|
15198
15221
|
},
|
|
15199
15222
|
[setNodes, setEdges, resetNodesAndEdges, setViewport, storeApi]
|
|
15200
15223
|
);
|
|
15201
|
-
const swimlaneOptions = (0,
|
|
15224
|
+
const swimlaneOptions = (0, import_react112.useMemo)(
|
|
15202
15225
|
() => isFlowGraph ? FLOW_GROUP_BYS.filter(
|
|
15203
15226
|
(groupBy) => hasSwimlanes(initialNodes, groupBy)
|
|
15204
15227
|
) : [],
|
|
15205
15228
|
[isFlowGraph, initialNodes]
|
|
15206
15229
|
);
|
|
15207
|
-
const swimlaneCounts = (0,
|
|
15230
|
+
const swimlaneCounts = (0, import_react112.useMemo)(
|
|
15208
15231
|
() => Object.fromEntries(
|
|
15209
15232
|
swimlaneOptions.map((groupBy) => [
|
|
15210
15233
|
groupBy,
|
|
@@ -15213,9 +15236,9 @@ var NodeGraphBuilder = ({
|
|
|
15213
15236
|
),
|
|
15214
15237
|
[swimlaneOptions, initialNodes]
|
|
15215
15238
|
);
|
|
15216
|
-
const [groupingShown, setGroupingShown] = (0,
|
|
15217
|
-
const groupingRun = (0,
|
|
15218
|
-
const handleSwimlanesChange = (0,
|
|
15239
|
+
const [groupingShown, setGroupingShown] = (0, import_react112.useState)(0);
|
|
15240
|
+
const groupingRun = (0, import_react112.useRef)(0);
|
|
15241
|
+
const handleSwimlanesChange = (0, import_react112.useCallback)(
|
|
15219
15242
|
(requested, style = swimlaneStyleRef.current) => {
|
|
15220
15243
|
const groupBy = style === "lanes" && requested === "domain-system" ? "domain" : requested;
|
|
15221
15244
|
if (groupBy === swimlanesRef.current && style === swimlaneStyleRef.current)
|
|
@@ -15246,7 +15269,7 @@ var NodeGraphBuilder = ({
|
|
|
15246
15269
|
},
|
|
15247
15270
|
[animateLayout2, setNodes, setEdges, renderedSizeOf]
|
|
15248
15271
|
);
|
|
15249
|
-
(0,
|
|
15272
|
+
(0, import_react112.useEffect)(() => {
|
|
15250
15273
|
if (groupingShown === 0) return;
|
|
15251
15274
|
const trail = walkthroughTrailRef.current;
|
|
15252
15275
|
if (trail.length > 0) {
|
|
@@ -15256,9 +15279,9 @@ var NodeGraphBuilder = ({
|
|
|
15256
15279
|
fitView({ duration: 400, padding: 0.1 });
|
|
15257
15280
|
}
|
|
15258
15281
|
}, [groupingShown]);
|
|
15259
|
-
const nodesInitialized = (0,
|
|
15260
|
-
const groupedOnLoad = (0,
|
|
15261
|
-
(0,
|
|
15282
|
+
const nodesInitialized = (0, import_react113.useNodesInitialized)();
|
|
15283
|
+
const groupedOnLoad = (0, import_react112.useRef)(false);
|
|
15284
|
+
(0, import_react112.useEffect)(() => {
|
|
15262
15285
|
if (!nodesInitialized || groupedOnLoad.current) return;
|
|
15263
15286
|
groupedOnLoad.current = true;
|
|
15264
15287
|
const fromUrl = readGroupFromUrl();
|
|
@@ -15360,7 +15383,7 @@ var NodeGraphBuilder = ({
|
|
|
15360
15383
|
}
|
|
15361
15384
|
) })
|
|
15362
15385
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
15363
|
-
|
|
15386
|
+
import_react113.ReactFlow,
|
|
15364
15387
|
{
|
|
15365
15388
|
nodeTypes,
|
|
15366
15389
|
proOptions: hideAttribution ? HIDE_ATTRIBUTION2 : void 0,
|
|
@@ -15375,7 +15398,7 @@ var NodeGraphBuilder = ({
|
|
|
15375
15398
|
onEdgesChange,
|
|
15376
15399
|
onEdgeMouseEnter: handleEdgeMouseEnter,
|
|
15377
15400
|
onEdgeMouseLeave: handleEdgeMouseLeave,
|
|
15378
|
-
connectionLineType:
|
|
15401
|
+
connectionLineType: import_react113.ConnectionLineType.SmoothStep,
|
|
15379
15402
|
nodeOrigin: NODE_ORIGIN,
|
|
15380
15403
|
elevateNodesOnSelect: false,
|
|
15381
15404
|
onNodeClick: handleNodeClick,
|
|
@@ -15390,7 +15413,7 @@ var NodeGraphBuilder = ({
|
|
|
15390
15413
|
className: `relative${isLayingOut ? " ec-laying-out" : ""}${hasOtherDomains && highlightCrossDomain ? " ec-highlight-cross-domain" : ""}`,
|
|
15391
15414
|
children: [
|
|
15392
15415
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
15393
|
-
|
|
15416
|
+
import_react113.Panel,
|
|
15394
15417
|
{
|
|
15395
15418
|
position: "top-center",
|
|
15396
15419
|
className: "w-full pr-6 pointer-events-none",
|
|
@@ -15512,7 +15535,7 @@ var NodeGraphBuilder = ({
|
|
|
15512
15535
|
}
|
|
15513
15536
|
),
|
|
15514
15537
|
includeBackground && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DiagramBackground_default, {}),
|
|
15515
|
-
includeBackground && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15538
|
+
includeBackground && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react113.Controls, {}),
|
|
15516
15539
|
mode === "full" && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15517
15540
|
CanvasToolbar_default,
|
|
15518
15541
|
{
|
|
@@ -15527,7 +15550,7 @@ var NodeGraphBuilder = ({
|
|
|
15527
15550
|
}
|
|
15528
15551
|
),
|
|
15529
15552
|
showMinimap && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15530
|
-
|
|
15553
|
+
import_react113.MiniMap,
|
|
15531
15554
|
{
|
|
15532
15555
|
nodeStrokeWidth: 3,
|
|
15533
15556
|
zoomable: true,
|
|
@@ -15536,7 +15559,7 @@ var NodeGraphBuilder = ({
|
|
|
15536
15559
|
}
|
|
15537
15560
|
),
|
|
15538
15561
|
swimlaneOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15539
|
-
|
|
15562
|
+
import_react113.Panel,
|
|
15540
15563
|
{
|
|
15541
15564
|
position: "top-right",
|
|
15542
15565
|
style: mode === "full" && showSearch ? SWIMLANE_PICKER_PANEL_STYLE_UNDER_SEARCH : void 0,
|
|
@@ -15553,7 +15576,7 @@ var NodeGraphBuilder = ({
|
|
|
15553
15576
|
}
|
|
15554
15577
|
),
|
|
15555
15578
|
isFlowGraph && showFlowWalkthrough && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(WalkthroughBadges_default, { trail: walkthroughTrail }),
|
|
15556
|
-
isFlowGraph && showFlowWalkthrough && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15579
|
+
isFlowGraph && showFlowWalkthrough && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react113.Panel, { position: "bottom-left", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15557
15580
|
StepWalkthrough_default,
|
|
15558
15581
|
{
|
|
15559
15582
|
nodes: walkthroughNodes,
|
|
@@ -15564,7 +15587,7 @@ var NodeGraphBuilder = ({
|
|
|
15564
15587
|
}
|
|
15565
15588
|
) }),
|
|
15566
15589
|
isDevMode && hasLayoutChanges && !swimlanes && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15567
|
-
|
|
15590
|
+
import_react113.Panel,
|
|
15568
15591
|
{
|
|
15569
15592
|
position: "bottom-left",
|
|
15570
15593
|
style: isFlowGraph && showFlowWalkthrough ? LAYOUT_CHANGE_PANEL_STYLE_WITH_WALKTHROUGH : LAYOUT_CHANGE_PANEL_STYLE_DEFAULT,
|
|
@@ -15728,8 +15751,8 @@ var NodeGraph = ({
|
|
|
15728
15751
|
onResetLayout,
|
|
15729
15752
|
onOpenInStudio
|
|
15730
15753
|
}) => {
|
|
15731
|
-
const [graphLayout, setGraphLayout] = (0,
|
|
15732
|
-
(0,
|
|
15754
|
+
const [graphLayout, setGraphLayout] = (0, import_react112.useState)(null);
|
|
15755
|
+
(0, import_react112.useEffect)(() => {
|
|
15733
15756
|
if (!graph) return setGraphLayout(null);
|
|
15734
15757
|
let current = true;
|
|
15735
15758
|
layoutGraph(graph.nodes, graph.edges, {
|
|
@@ -15743,7 +15766,7 @@ var NodeGraph = ({
|
|
|
15743
15766
|
}, [graph]);
|
|
15744
15767
|
const nodes = graphLayout?.nodes ?? nodesProp ?? NO_NODES;
|
|
15745
15768
|
const edges = graphLayout?.edges ?? edgesProp ?? NO_EDGES;
|
|
15746
|
-
const studioGraphs = (0,
|
|
15769
|
+
const studioGraphs = (0, import_react112.useMemo)(
|
|
15747
15770
|
() => ({
|
|
15748
15771
|
detail: { nodes, edges },
|
|
15749
15772
|
overview: overviewGraph,
|
|
@@ -15755,16 +15778,16 @@ var NodeGraph = ({
|
|
|
15755
15778
|
const includeKey = includeKeyProp !== void 0 ? includeKeyProp : graph?.options?.legend !== false;
|
|
15756
15779
|
const showSearch = showSearchProp !== void 0 ? showSearchProp : graph?.options?.search !== false;
|
|
15757
15780
|
const animated = animatedProp ?? graph?.options?.animated;
|
|
15758
|
-
const [elem, setElem] = (0,
|
|
15759
|
-
const [showFooter, setShowFooter] = (0,
|
|
15781
|
+
const [elem, setElem] = (0, import_react112.useState)(null);
|
|
15782
|
+
const [showFooter, setShowFooter] = (0, import_react112.useState)(true);
|
|
15760
15783
|
const containerToRenderInto = portalId || `${id}-portal`;
|
|
15761
|
-
const [showOverview, setShowOverview] = (0,
|
|
15784
|
+
const [showOverview, setShowOverview] = (0, import_react112.useState)(() => {
|
|
15762
15785
|
if (!overviewGraph) return false;
|
|
15763
15786
|
const level = new URLSearchParams(window.location.search).get("level");
|
|
15764
15787
|
return level === null || level === "1";
|
|
15765
15788
|
});
|
|
15766
|
-
const [transitionFrom, setTransitionFrom] = (0,
|
|
15767
|
-
const handleShowOverview = (0,
|
|
15789
|
+
const [transitionFrom, setTransitionFrom] = (0, import_react112.useState)();
|
|
15790
|
+
const handleShowOverview = (0, import_react112.useCallback)(
|
|
15768
15791
|
(show, from) => {
|
|
15769
15792
|
setTransitionFrom(from);
|
|
15770
15793
|
setShowOverview(show);
|
|
@@ -15773,14 +15796,14 @@ var NodeGraph = ({
|
|
|
15773
15796
|
[]
|
|
15774
15797
|
);
|
|
15775
15798
|
const overview = showOverview ? overviewGraph : void 0;
|
|
15776
|
-
const hiddenLegendKeys = (0,
|
|
15777
|
-
const handleHiddenLegendKeysChange = (0,
|
|
15799
|
+
const hiddenLegendKeys = (0, import_react112.useRef)([]);
|
|
15800
|
+
const handleHiddenLegendKeysChange = (0, import_react112.useCallback)((keys) => {
|
|
15778
15801
|
hiddenLegendKeys.current = keys;
|
|
15779
15802
|
}, []);
|
|
15780
|
-
(0,
|
|
15803
|
+
(0, import_react112.useEffect)(() => {
|
|
15781
15804
|
setElem(document.getElementById(containerToRenderInto));
|
|
15782
15805
|
}, []);
|
|
15783
|
-
(0,
|
|
15806
|
+
(0, import_react112.useEffect)(() => {
|
|
15784
15807
|
const urlParams = new URLSearchParams(window.location.search);
|
|
15785
15808
|
const embed = urlParams.get("embed");
|
|
15786
15809
|
if (embed === "true") {
|
|
@@ -15788,9 +15811,9 @@ var NodeGraph = ({
|
|
|
15788
15811
|
}
|
|
15789
15812
|
}, []);
|
|
15790
15813
|
if (!elem || graph && !graphLayout) return null;
|
|
15791
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: (0,
|
|
15814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: (0, import_react_dom2.createPortal)(
|
|
15792
15815
|
// Remount when switching graphs so each starts from a clean state
|
|
15793
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
15816
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react113.ReactFlowProvider, { children: [
|
|
15794
15817
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15795
15818
|
NodeGraphBuilder,
|
|
15796
15819
|
{
|