@eventcatalog/visualiser 5.0.0-beta.5 → 5.0.0-beta.7
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-Y2IJ5XR6.mjs +15705 -0
- package/dist/chunk-Y2IJ5XR6.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 +749 -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 });
|
|
@@ -8064,6 +8087,13 @@ var moveLabel = (label, points, moved) => {
|
|
|
8064
8087
|
const [a, b] = [shift(segment), shift(segment + 1)];
|
|
8065
8088
|
return { x: label.x + (a.x + b.x) / 2, y: label.y + (a.y + b.y) / 2 };
|
|
8066
8089
|
};
|
|
8090
|
+
var getStepPath = (props) => {
|
|
8091
|
+
const [path, labelX, labelY, offsetX, offsetY] = (0, import_react74.getSmoothStepPath)(props);
|
|
8092
|
+
const { sourceX, targetX, targetY } = props;
|
|
8093
|
+
const forwards = (props.sourcePosition ?? import_react74.Position.Bottom) === import_react74.Position.Right && (props.targetPosition ?? import_react74.Position.Top) === import_react74.Position.Left && targetX > sourceX;
|
|
8094
|
+
if (!forwards) return [path, labelX, labelY, offsetX, offsetY];
|
|
8095
|
+
return [path, (labelX + targetX) / 2, targetY, offsetX, offsetY];
|
|
8096
|
+
};
|
|
8067
8097
|
var getMoved = (state, nodeId, at) => {
|
|
8068
8098
|
const position = state.nodeLookup.get(nodeId)?.internals.positionAbsolute;
|
|
8069
8099
|
return position && { x: position.x - at.x, y: position.y - at.y };
|
|
@@ -8082,8 +8112,8 @@ var useRoute = ({
|
|
|
8082
8112
|
targetHandleId
|
|
8083
8113
|
}, [path, labelX, labelY]) => {
|
|
8084
8114
|
const route = data?.route;
|
|
8085
|
-
const { moved, zIndex } = (0,
|
|
8086
|
-
(0,
|
|
8115
|
+
const { moved, zIndex } = (0, import_react74.useStore)(
|
|
8116
|
+
(0, import_react73.useCallback)(
|
|
8087
8117
|
(state) => {
|
|
8088
8118
|
const z = (nodeId) => {
|
|
8089
8119
|
const node = state.nodeLookup.get(nodeId);
|
|
@@ -8136,7 +8166,7 @@ function messageColor(collection) {
|
|
|
8136
8166
|
return "gray";
|
|
8137
8167
|
}
|
|
8138
8168
|
}
|
|
8139
|
-
var AnimatedMessageEdge = (0,
|
|
8169
|
+
var AnimatedMessageEdge = (0, import_react75.memo)(
|
|
8140
8170
|
({
|
|
8141
8171
|
id,
|
|
8142
8172
|
sourceX,
|
|
@@ -8166,7 +8196,7 @@ var AnimatedMessageEdge = (0, import_react73.memo)(
|
|
|
8166
8196
|
sourceHandleId,
|
|
8167
8197
|
targetHandleId
|
|
8168
8198
|
},
|
|
8169
|
-
(
|
|
8199
|
+
getStepPath({
|
|
8170
8200
|
sourceX,
|
|
8171
8201
|
sourceY,
|
|
8172
8202
|
sourcePosition,
|
|
@@ -8180,9 +8210,9 @@ var AnimatedMessageEdge = (0, import_react73.memo)(
|
|
|
8180
8210
|
const customColor = data?.customColor || messageColor(collection ?? "default");
|
|
8181
8211
|
const warning = data?.warning;
|
|
8182
8212
|
const customColors = Array.isArray(customColor) ? customColor : [customColor];
|
|
8183
|
-
const randomDelay = (0,
|
|
8213
|
+
const randomDelay = (0, import_react75.useMemo)(() => Math.random() * 1, []);
|
|
8184
8214
|
const opacityClass = opacity === 1 ? "z-30 opacity-100" : "z-30 opacity-10";
|
|
8185
|
-
const animatedNodes = (0,
|
|
8215
|
+
const animatedNodes = (0, import_react75.useMemo)(
|
|
8186
8216
|
() => customColors.map((color, index) => {
|
|
8187
8217
|
const delay = randomDelay + index * 0.3;
|
|
8188
8218
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
@@ -8235,7 +8265,7 @@ var AnimatedMessageEdge = (0, import_react73.memo)(
|
|
|
8235
8265
|
const crossDomain = isCrossDomain(data);
|
|
8236
8266
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
8237
8267
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8238
|
-
|
|
8268
|
+
import_react76.BaseEdge,
|
|
8239
8269
|
{
|
|
8240
8270
|
id,
|
|
8241
8271
|
path: edgePath,
|
|
@@ -8262,10 +8292,10 @@ var AnimatedMessageEdge = (0, import_react73.memo)(
|
|
|
8262
8292
|
var AnimatedMessageEdge_default = AnimatedMessageEdge;
|
|
8263
8293
|
|
|
8264
8294
|
// src/edges/MultilineEdgeLabel.tsx
|
|
8265
|
-
var
|
|
8266
|
-
var
|
|
8295
|
+
var import_react77 = require("react");
|
|
8296
|
+
var import_react78 = require("@xyflow/react");
|
|
8267
8297
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
8268
|
-
var MultilineEdgeLabel_default = (0,
|
|
8298
|
+
var MultilineEdgeLabel_default = (0, import_react77.memo)(function MultilineEdgeLabel(props) {
|
|
8269
8299
|
const {
|
|
8270
8300
|
id,
|
|
8271
8301
|
sourceX,
|
|
@@ -8298,7 +8328,7 @@ var MultilineEdgeLabel_default = (0, import_react75.memo)(function MultilineEdge
|
|
|
8298
8328
|
sourceHandleId,
|
|
8299
8329
|
targetHandleId
|
|
8300
8330
|
},
|
|
8301
|
-
(0,
|
|
8331
|
+
(0, import_react78.getSmoothStepPath)({
|
|
8302
8332
|
sourceX,
|
|
8303
8333
|
sourceY,
|
|
8304
8334
|
targetX,
|
|
@@ -8334,8 +8364,8 @@ var MultilineEdgeLabel_default = (0, import_react75.memo)(function MultilineEdge
|
|
|
8334
8364
|
});
|
|
8335
8365
|
|
|
8336
8366
|
// src/edges/FlowEdge.tsx
|
|
8337
|
-
var
|
|
8338
|
-
var
|
|
8367
|
+
var import_react79 = require("react");
|
|
8368
|
+
var import_react80 = require("@xyflow/react");
|
|
8339
8369
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
8340
8370
|
function messageColor2(collection) {
|
|
8341
8371
|
switch (collection) {
|
|
@@ -8350,7 +8380,7 @@ function messageColor2(collection) {
|
|
|
8350
8380
|
}
|
|
8351
8381
|
}
|
|
8352
8382
|
var EMPTY_STYLE = {};
|
|
8353
|
-
var FlowEdge_default = (0,
|
|
8383
|
+
var FlowEdge_default = (0, import_react79.memo)(function CustomEdge({
|
|
8354
8384
|
id,
|
|
8355
8385
|
sourceX,
|
|
8356
8386
|
sourceY,
|
|
@@ -8380,7 +8410,7 @@ var FlowEdge_default = (0, import_react77.memo)(function CustomEdge({
|
|
|
8380
8410
|
sourceHandleId,
|
|
8381
8411
|
targetHandleId
|
|
8382
8412
|
},
|
|
8383
|
-
(0,
|
|
8413
|
+
(0, import_react80.getSmoothStepPath)({
|
|
8384
8414
|
sourceX,
|
|
8385
8415
|
sourceY,
|
|
8386
8416
|
sourcePosition,
|
|
@@ -8389,15 +8419,15 @@ var FlowEdge_default = (0, import_react77.memo)(function CustomEdge({
|
|
|
8389
8419
|
targetPosition
|
|
8390
8420
|
})
|
|
8391
8421
|
);
|
|
8392
|
-
const randomDelay = (0,
|
|
8422
|
+
const randomDelay = (0, import_react79.useMemo)(() => Math.random() * 1, []);
|
|
8393
8423
|
const collection = data?.message?.collection;
|
|
8394
8424
|
const opacity = data?.opacity ?? 1;
|
|
8395
|
-
const mergedStyle = (0,
|
|
8425
|
+
const mergedStyle = (0, import_react79.useMemo)(
|
|
8396
8426
|
() => ({ ...EDGE_FLOW_BASE_STYLE, ...style }),
|
|
8397
8427
|
[style]
|
|
8398
8428
|
);
|
|
8399
8429
|
const crossDomain = isCrossDomain(data);
|
|
8400
|
-
const labelPositionStyle = (0,
|
|
8430
|
+
const labelPositionStyle = (0, import_react79.useMemo)(
|
|
8401
8431
|
() => ({
|
|
8402
8432
|
position: "absolute",
|
|
8403
8433
|
transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`,
|
|
@@ -8408,7 +8438,7 @@ var FlowEdge_default = (0, import_react77.memo)(function CustomEdge({
|
|
|
8408
8438
|
);
|
|
8409
8439
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
8410
8440
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
8411
|
-
|
|
8441
|
+
import_react80.BaseEdge,
|
|
8412
8442
|
{
|
|
8413
8443
|
path: edgePath,
|
|
8414
8444
|
markerEnd,
|
|
@@ -8442,7 +8472,7 @@ var FlowEdge_default = (0, import_react77.memo)(function CustomEdge({
|
|
|
8442
8472
|
)
|
|
8443
8473
|
}
|
|
8444
8474
|
),
|
|
8445
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
8475
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(EdgeLabelPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
8446
8476
|
"div",
|
|
8447
8477
|
{
|
|
8448
8478
|
style: labelPositionStyle,
|
|
@@ -8454,8 +8484,8 @@ var FlowEdge_default = (0, import_react77.memo)(function CustomEdge({
|
|
|
8454
8484
|
});
|
|
8455
8485
|
|
|
8456
8486
|
// src/edges/LabelledEdge.tsx
|
|
8457
|
-
var
|
|
8458
|
-
var
|
|
8487
|
+
var import_react81 = require("@xyflow/react");
|
|
8488
|
+
var import_react82 = require("react");
|
|
8459
8489
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
8460
8490
|
function LabelledEdge({
|
|
8461
8491
|
pathType,
|
|
@@ -8500,7 +8530,7 @@ function LabelledEdge({
|
|
|
8500
8530
|
sourceHandleId,
|
|
8501
8531
|
targetHandleId
|
|
8502
8532
|
},
|
|
8503
|
-
pathType === "bezier" ? (0,
|
|
8533
|
+
pathType === "bezier" ? (0, import_react81.getBezierPath)(pathProps) : getStepPath({
|
|
8504
8534
|
...pathProps,
|
|
8505
8535
|
...pathType === "step" ? { borderRadius: 0 } : {}
|
|
8506
8536
|
})
|
|
@@ -8508,7 +8538,7 @@ function LabelledEdge({
|
|
|
8508
8538
|
const crossDomain = isCrossDomain(data);
|
|
8509
8539
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
8510
8540
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8511
|
-
|
|
8541
|
+
import_react81.BaseEdge,
|
|
8512
8542
|
{
|
|
8513
8543
|
id,
|
|
8514
8544
|
path: edgePath,
|
|
@@ -8531,18 +8561,18 @@ function LabelledEdge({
|
|
|
8531
8561
|
)
|
|
8532
8562
|
] });
|
|
8533
8563
|
}
|
|
8534
|
-
var LabelledDefaultEdge = (0,
|
|
8564
|
+
var LabelledDefaultEdge = (0, import_react82.memo)(function LabelledDefaultEdge2(props) {
|
|
8535
8565
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(LabelledEdge, { ...props, pathType: "bezier" });
|
|
8536
8566
|
});
|
|
8537
|
-
var LabelledSmoothStepEdge = (0,
|
|
8567
|
+
var LabelledSmoothStepEdge = (0, import_react82.memo)(function LabelledSmoothStepEdge2(props) {
|
|
8538
8568
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(LabelledEdge, { ...props, pathType: "smoothstep" });
|
|
8539
8569
|
});
|
|
8540
|
-
var LabelledStepEdge = (0,
|
|
8570
|
+
var LabelledStepEdge = (0, import_react82.memo)(function LabelledStepEdge2(props) {
|
|
8541
8571
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(LabelledEdge, { ...props, pathType: "step" });
|
|
8542
8572
|
});
|
|
8543
8573
|
|
|
8544
8574
|
// src/components/VisualiserSearch.tsx
|
|
8545
|
-
var
|
|
8575
|
+
var import_react83 = require("react");
|
|
8546
8576
|
var import_lucide_react33 = require("lucide-react");
|
|
8547
8577
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
8548
8578
|
var formatVersionedName = (name, version) => {
|
|
@@ -8602,29 +8632,29 @@ var getNodeResourceData = (data, key) => {
|
|
|
8602
8632
|
if (!resource || typeof resource !== "object") return void 0;
|
|
8603
8633
|
return "data" in resource && resource.data ? resource.data : resource;
|
|
8604
8634
|
};
|
|
8605
|
-
var VisualiserSearch = (0,
|
|
8606
|
-
(0,
|
|
8635
|
+
var VisualiserSearch = (0, import_react83.memo)(
|
|
8636
|
+
(0, import_react83.forwardRef)(
|
|
8607
8637
|
({ 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,
|
|
8638
|
+
const [searchQuery, setSearchQuery] = (0, import_react83.useState)("");
|
|
8639
|
+
const [filteredSuggestions, setFilteredSuggestions] = (0, import_react83.useState)([]);
|
|
8640
|
+
const [showSuggestions, setShowSuggestions] = (0, import_react83.useState)(false);
|
|
8641
|
+
const [selectedSuggestionIndex, setSelectedSuggestionIndex] = (0, import_react83.useState)(-1);
|
|
8642
|
+
const searchInputRef = (0, import_react83.useRef)(null);
|
|
8643
|
+
const containerRef = (0, import_react83.useRef)(null);
|
|
8644
|
+
const suggestionsListRef = (0, import_react83.useRef)(null);
|
|
8645
|
+
const suggestionItemRefs = (0, import_react83.useRef)([]);
|
|
8646
|
+
const hideSuggestions = (0, import_react83.useCallback)(() => {
|
|
8617
8647
|
setShowSuggestions(false);
|
|
8618
8648
|
setSelectedSuggestionIndex(-1);
|
|
8619
8649
|
}, []);
|
|
8620
|
-
(0,
|
|
8650
|
+
(0, import_react83.useImperativeHandle)(
|
|
8621
8651
|
ref,
|
|
8622
8652
|
() => ({
|
|
8623
8653
|
hideSuggestions
|
|
8624
8654
|
}),
|
|
8625
8655
|
[hideSuggestions]
|
|
8626
8656
|
);
|
|
8627
|
-
const getNodeDisplayName = (0,
|
|
8657
|
+
const getNodeDisplayName = (0, import_react83.useCallback)((node) => {
|
|
8628
8658
|
if (node.type === "messageGroup") {
|
|
8629
8659
|
return node.data?.groupName || node.id;
|
|
8630
8660
|
}
|
|
@@ -8645,7 +8675,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8645
8675
|
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
8676
|
return formatVersionedName(name, version);
|
|
8647
8677
|
}, []);
|
|
8648
|
-
const getNodeResourceKey = (0,
|
|
8678
|
+
const getNodeResourceKey = (0, import_react83.useCallback)(
|
|
8649
8679
|
(node, label) => {
|
|
8650
8680
|
if (node.type === "messageGroup" || node.type === "messageGroupExpanded") {
|
|
8651
8681
|
return `${node.type}:${node.id}`.toLowerCase();
|
|
@@ -8661,7 +8691,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8661
8691
|
},
|
|
8662
8692
|
[]
|
|
8663
8693
|
);
|
|
8664
|
-
const dedupeSearchSuggestions = (0,
|
|
8694
|
+
const dedupeSearchSuggestions = (0, import_react83.useCallback)(
|
|
8665
8695
|
(suggestions) => {
|
|
8666
8696
|
const uniqueSuggestions = [];
|
|
8667
8697
|
const indexByResourceKey = /* @__PURE__ */ new Map();
|
|
@@ -8685,7 +8715,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8685
8715
|
},
|
|
8686
8716
|
[]
|
|
8687
8717
|
);
|
|
8688
|
-
const getSearchSuggestions = (0,
|
|
8718
|
+
const getSearchSuggestions = (0, import_react83.useCallback)(
|
|
8689
8719
|
(nodesToIndex) => {
|
|
8690
8720
|
const suggestions = nodesToIndex.flatMap((node) => {
|
|
8691
8721
|
if (node.type === "system-group") return [];
|
|
@@ -8731,7 +8761,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8731
8761
|
},
|
|
8732
8762
|
[dedupeSearchSuggestions, getNodeDisplayName, getNodeResourceKey]
|
|
8733
8763
|
);
|
|
8734
|
-
const getNodeTypeMeta = (0,
|
|
8764
|
+
const getNodeTypeMeta = (0, import_react83.useCallback)((nodeType) => {
|
|
8735
8765
|
const meta = {
|
|
8736
8766
|
events: {
|
|
8737
8767
|
label: "Event",
|
|
@@ -8879,7 +8909,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8879
8909
|
badgeClass: "border-gray-500/25 bg-gray-500/10 text-gray-700 dark:text-gray-300"
|
|
8880
8910
|
};
|
|
8881
8911
|
}, []);
|
|
8882
|
-
const handleSearchChange = (0,
|
|
8912
|
+
const handleSearchChange = (0, import_react83.useCallback)(
|
|
8883
8913
|
(event) => {
|
|
8884
8914
|
const query = event.target.value;
|
|
8885
8915
|
setSearchQuery(query);
|
|
@@ -8899,7 +8929,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8899
8929
|
},
|
|
8900
8930
|
[nodes, getSearchSuggestions]
|
|
8901
8931
|
);
|
|
8902
|
-
const handleSearchFocus = (0,
|
|
8932
|
+
const handleSearchFocus = (0, import_react83.useCallback)(() => {
|
|
8903
8933
|
const suggestions = getSearchSuggestions(nodes);
|
|
8904
8934
|
const search = searchQuery.toLowerCase();
|
|
8905
8935
|
setFilteredSuggestions(
|
|
@@ -8910,7 +8940,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8910
8940
|
setShowSuggestions(true);
|
|
8911
8941
|
setSelectedSuggestionIndex(-1);
|
|
8912
8942
|
}, [nodes, searchQuery, getSearchSuggestions]);
|
|
8913
|
-
const handleSuggestionClick = (0,
|
|
8943
|
+
const handleSuggestionClick = (0, import_react83.useCallback)(
|
|
8914
8944
|
(suggestion) => {
|
|
8915
8945
|
setSearchQuery("");
|
|
8916
8946
|
setFilteredSuggestions([]);
|
|
@@ -8920,7 +8950,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8920
8950
|
},
|
|
8921
8951
|
[onNodeSelect]
|
|
8922
8952
|
);
|
|
8923
|
-
const handleSearchKeyDown = (0,
|
|
8953
|
+
const handleSearchKeyDown = (0, import_react83.useCallback)(
|
|
8924
8954
|
(event) => {
|
|
8925
8955
|
switch (event.key) {
|
|
8926
8956
|
case "ArrowDown":
|
|
@@ -8960,7 +8990,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8960
8990
|
handleSuggestionClick
|
|
8961
8991
|
]
|
|
8962
8992
|
);
|
|
8963
|
-
const clearSearch = (0,
|
|
8993
|
+
const clearSearch = (0, import_react83.useCallback)(() => {
|
|
8964
8994
|
setSearchQuery("");
|
|
8965
8995
|
setShowSuggestions(false);
|
|
8966
8996
|
setFilteredSuggestions([]);
|
|
@@ -8970,13 +9000,13 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8970
9000
|
searchInputRef.current.focus();
|
|
8971
9001
|
}
|
|
8972
9002
|
}, [onClear]);
|
|
8973
|
-
(0,
|
|
9003
|
+
(0, import_react83.useEffect)(() => {
|
|
8974
9004
|
suggestionItemRefs.current = suggestionItemRefs.current.slice(
|
|
8975
9005
|
0,
|
|
8976
9006
|
filteredSuggestions.length
|
|
8977
9007
|
);
|
|
8978
9008
|
}, [filteredSuggestions.length]);
|
|
8979
|
-
(0,
|
|
9009
|
+
(0, import_react83.useEffect)(() => {
|
|
8980
9010
|
if (!showSuggestions || selectedSuggestionIndex < 0) return;
|
|
8981
9011
|
const list = suggestionsListRef.current;
|
|
8982
9012
|
const item = suggestionItemRefs.current[selectedSuggestionIndex];
|
|
@@ -8995,7 +9025,7 @@ var VisualiserSearch = (0, import_react81.memo)(
|
|
|
8995
9025
|
selectedSuggestionIndex,
|
|
8996
9026
|
filteredSuggestions.length
|
|
8997
9027
|
]);
|
|
8998
|
-
(0,
|
|
9028
|
+
(0, import_react83.useEffect)(() => {
|
|
8999
9029
|
const handleClickOutside = (event) => {
|
|
9000
9030
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
9001
9031
|
setShowSuggestions(false);
|
|
@@ -9104,7 +9134,7 @@ VisualiserSearch.displayName = "VisualiserSearch";
|
|
|
9104
9134
|
var VisualiserSearch_default = VisualiserSearch;
|
|
9105
9135
|
|
|
9106
9136
|
// src/components/StepWalkthrough.tsx
|
|
9107
|
-
var
|
|
9137
|
+
var import_react84 = require("react");
|
|
9108
9138
|
var import_lucide_react34 = require("lucide-react");
|
|
9109
9139
|
|
|
9110
9140
|
// src/utils/keyboard.ts
|
|
@@ -9288,32 +9318,32 @@ var BUTTON = "flex items-center justify-center gap-1 h-7 text-xs rounded-md focu
|
|
|
9288
9318
|
var PRIMARY_BUTTON = `${BUTTON} px-2.5 font-semibold text-white bg-[rgb(var(--ec-accent))] hover:bg-[rgb(var(--ec-accent-hover))]`;
|
|
9289
9319
|
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
9320
|
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,
|
|
9321
|
+
var StepWalkthrough_default = (0, import_react84.memo)(function StepWalkthrough({
|
|
9292
9322
|
nodes,
|
|
9293
9323
|
edges,
|
|
9294
9324
|
isFlowVisualization,
|
|
9295
9325
|
onStepChange
|
|
9296
9326
|
}) {
|
|
9297
|
-
const [trail, setTrail] = (0,
|
|
9327
|
+
const [trail, setTrail] = (0, import_react84.useState)([]);
|
|
9298
9328
|
const currentNodeId = trail[trail.length - 1] ?? null;
|
|
9299
|
-
const [startNodeId, setStartNodeId] = (0,
|
|
9300
|
-
const nodeIdsKeyRef = (0,
|
|
9329
|
+
const [startNodeId, setStartNodeId] = (0, import_react84.useState)(null);
|
|
9330
|
+
const nodeIdsKeyRef = (0, import_react84.useRef)("");
|
|
9301
9331
|
const computedNodeIdsKey = nodes.map((n) => n.id).join(",");
|
|
9302
9332
|
if (computedNodeIdsKey !== nodeIdsKeyRef.current) {
|
|
9303
9333
|
nodeIdsKeyRef.current = computedNodeIdsKey;
|
|
9304
9334
|
}
|
|
9305
9335
|
const nodeIdsKey = nodeIdsKeyRef.current;
|
|
9306
|
-
const edgeKeyRef = (0,
|
|
9336
|
+
const edgeKeyRef = (0, import_react84.useRef)("");
|
|
9307
9337
|
const computedEdgeKey = edges.map((e) => `${e.source}-${e.target}`).join(",");
|
|
9308
9338
|
if (computedEdgeKey !== edgeKeyRef.current) {
|
|
9309
9339
|
edgeKeyRef.current = computedEdgeKey;
|
|
9310
9340
|
}
|
|
9311
9341
|
const edgeKey = edgeKeyRef.current;
|
|
9312
|
-
const nodesById = (0,
|
|
9342
|
+
const nodesById = (0, import_react84.useMemo)(
|
|
9313
9343
|
() => new Map(nodes.map((node) => [node.id, node])),
|
|
9314
9344
|
[nodeIdsKey]
|
|
9315
9345
|
);
|
|
9316
|
-
(0,
|
|
9346
|
+
(0, import_react84.useEffect)(() => {
|
|
9317
9347
|
if (!isFlowVisualization || nodes.length === 0) return;
|
|
9318
9348
|
const targets = new Set(edges.map((edge) => edge.target));
|
|
9319
9349
|
const start2 = nodes.find((node) => !targets.has(node.id));
|
|
@@ -9321,10 +9351,10 @@ var StepWalkthrough_default = (0, import_react82.memo)(function StepWalkthrough(
|
|
|
9321
9351
|
setStartNodeId(start2.id);
|
|
9322
9352
|
}
|
|
9323
9353
|
}, [nodeIdsKey, edgeKey, isFlowVisualization, startNodeId]);
|
|
9324
|
-
(0,
|
|
9354
|
+
(0, import_react84.useEffect)(() => {
|
|
9325
9355
|
if (currentNodeId && !nodesById.has(currentNodeId)) setTrail([]);
|
|
9326
9356
|
}, [currentNodeId, nodesById]);
|
|
9327
|
-
const pathsFrom = (0,
|
|
9357
|
+
const pathsFrom = (0, import_react84.useCallback)(
|
|
9328
9358
|
(nodeId) => nodeId ? edges.filter((edge) => edge.source === nodeId).map((edge) => ({
|
|
9329
9359
|
targetId: edge.target,
|
|
9330
9360
|
label: edge.label,
|
|
@@ -9332,11 +9362,11 @@ var StepWalkthrough_default = (0, import_react82.memo)(function StepWalkthrough(
|
|
|
9332
9362
|
})).filter((path) => !!path.targetNode) : [],
|
|
9333
9363
|
[edgeKey, nodesById]
|
|
9334
9364
|
);
|
|
9335
|
-
const availablePaths = (0,
|
|
9365
|
+
const availablePaths = (0, import_react84.useMemo)(
|
|
9336
9366
|
() => pathsFrom(currentNodeId),
|
|
9337
9367
|
[pathsFrom, currentNodeId]
|
|
9338
9368
|
);
|
|
9339
|
-
const stepsAfter = (0,
|
|
9369
|
+
const stepsAfter = (0, import_react84.useCallback)(
|
|
9340
9370
|
(nodeId, walked) => {
|
|
9341
9371
|
const seen = new Set(walked);
|
|
9342
9372
|
let steps = 0;
|
|
@@ -9350,15 +9380,15 @@ var StepWalkthrough_default = (0, import_react82.memo)(function StepWalkthrough(
|
|
|
9350
9380
|
},
|
|
9351
9381
|
[pathsFrom]
|
|
9352
9382
|
);
|
|
9353
|
-
const totalSteps = (0,
|
|
9383
|
+
const totalSteps = (0, import_react84.useMemo)(
|
|
9354
9384
|
() => currentNodeId ? trail.length + stepsAfter(currentNodeId, trail) : 0,
|
|
9355
9385
|
[trail, currentNodeId, stepsAfter]
|
|
9356
9386
|
);
|
|
9357
|
-
const startSteps = (0,
|
|
9387
|
+
const startSteps = (0, import_react84.useMemo)(
|
|
9358
9388
|
() => startNodeId ? 1 + stepsAfter(startNodeId, [startNodeId]) : 0,
|
|
9359
9389
|
[startNodeId, stepsAfter]
|
|
9360
9390
|
);
|
|
9361
|
-
const goTo = (0,
|
|
9391
|
+
const goTo = (0, import_react84.useCallback)(
|
|
9362
9392
|
(nextTrail) => {
|
|
9363
9393
|
setTrail(nextTrail);
|
|
9364
9394
|
const nodeId = nextTrail[nextTrail.length - 1];
|
|
@@ -9370,25 +9400,25 @@ var StepWalkthrough_default = (0, import_react82.memo)(function StepWalkthrough(
|
|
|
9370
9400
|
},
|
|
9371
9401
|
[onStepChange]
|
|
9372
9402
|
);
|
|
9373
|
-
const start = (0,
|
|
9403
|
+
const start = (0, import_react84.useCallback)(() => {
|
|
9374
9404
|
if (startNodeId) goTo([startNodeId]);
|
|
9375
9405
|
}, [startNodeId, goTo]);
|
|
9376
|
-
const [selectedPath, setSelectedPath] = (0,
|
|
9377
|
-
(0,
|
|
9378
|
-
const next = (0,
|
|
9406
|
+
const [selectedPath, setSelectedPath] = (0, import_react84.useState)(0);
|
|
9407
|
+
(0, import_react84.useEffect)(() => setSelectedPath(0), [currentNodeId]);
|
|
9408
|
+
const next = (0, import_react84.useCallback)(
|
|
9379
9409
|
(index = selectedPath) => {
|
|
9380
9410
|
const path = availablePaths[index];
|
|
9381
9411
|
if (path) goTo([...trail, path.targetId]);
|
|
9382
9412
|
},
|
|
9383
9413
|
[availablePaths, selectedPath, trail, goTo]
|
|
9384
9414
|
);
|
|
9385
|
-
const previous = (0,
|
|
9386
|
-
const finish = (0,
|
|
9415
|
+
const previous = (0, import_react84.useCallback)(() => goTo(trail.slice(0, -1)), [trail, goTo]);
|
|
9416
|
+
const finish = (0, import_react84.useCallback)(() => {
|
|
9387
9417
|
setTrail([]);
|
|
9388
9418
|
onStepChange(null, true);
|
|
9389
9419
|
}, [onStepChange]);
|
|
9390
9420
|
const isWalking = trail.length > 0;
|
|
9391
|
-
(0,
|
|
9421
|
+
(0, import_react84.useEffect)(() => {
|
|
9392
9422
|
if (!isWalking) return;
|
|
9393
9423
|
const onKeyDown = (event) => {
|
|
9394
9424
|
if (event.metaKey || event.ctrlKey || event.altKey) return;
|
|
@@ -9405,16 +9435,16 @@ var StepWalkthrough_default = (0, import_react82.memo)(function StepWalkthrough(
|
|
|
9405
9435
|
return () => window.removeEventListener("keydown", onKeyDown);
|
|
9406
9436
|
}, [isWalking, availablePaths, next, previous, finish]);
|
|
9407
9437
|
const currentNode = currentNodeId ? nodesById.get(currentNodeId) : void 0;
|
|
9408
|
-
const info = (0,
|
|
9438
|
+
const info = (0, import_react84.useMemo)(
|
|
9409
9439
|
() => currentNode ? getStepInfo(currentNode) : void 0,
|
|
9410
9440
|
[currentNode]
|
|
9411
9441
|
);
|
|
9412
|
-
const [expanded, setExpanded] = (0,
|
|
9413
|
-
const [isCut, setIsCut] = (0,
|
|
9414
|
-
const titleRef = (0,
|
|
9415
|
-
const summaryRef = (0,
|
|
9416
|
-
(0,
|
|
9417
|
-
(0,
|
|
9442
|
+
const [expanded, setExpanded] = (0, import_react84.useState)(false);
|
|
9443
|
+
const [isCut, setIsCut] = (0, import_react84.useState)(false);
|
|
9444
|
+
const titleRef = (0, import_react84.useRef)(null);
|
|
9445
|
+
const summaryRef = (0, import_react84.useRef)(null);
|
|
9446
|
+
(0, import_react84.useEffect)(() => setExpanded(false), [currentNodeId]);
|
|
9447
|
+
(0, import_react84.useLayoutEffect)(() => {
|
|
9418
9448
|
if (expanded) return;
|
|
9419
9449
|
const title = titleRef.current;
|
|
9420
9450
|
const summary = summaryRef.current;
|
|
@@ -9422,7 +9452,7 @@ var StepWalkthrough_default = (0, import_react82.memo)(function StepWalkthrough(
|
|
|
9422
9452
|
!!info?.detail || !!title && title.scrollWidth > title.clientWidth || !!summary && summary.scrollHeight > summary.clientHeight + 1
|
|
9423
9453
|
);
|
|
9424
9454
|
}, [info, expanded]);
|
|
9425
|
-
const startInfo = (0,
|
|
9455
|
+
const startInfo = (0, import_react84.useMemo)(() => {
|
|
9426
9456
|
const startNode = startNodeId ? nodesById.get(startNodeId) : void 0;
|
|
9427
9457
|
return startNode ? getStepInfo(startNode) : void 0;
|
|
9428
9458
|
}, [startNodeId, nodesById]);
|
|
@@ -9620,16 +9650,16 @@ var StepWalkthrough_default = (0, import_react82.memo)(function StepWalkthrough(
|
|
|
9620
9650
|
});
|
|
9621
9651
|
|
|
9622
9652
|
// src/components/WalkthroughBadges.tsx
|
|
9623
|
-
var
|
|
9624
|
-
var
|
|
9653
|
+
var import_react85 = require("react");
|
|
9654
|
+
var import_react86 = require("@xyflow/react");
|
|
9625
9655
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
9626
9656
|
var BADGE_SIZE = 30;
|
|
9627
|
-
var Badge = (0,
|
|
9657
|
+
var Badge = (0, import_react85.memo)(function Badge2({
|
|
9628
9658
|
nodeId,
|
|
9629
9659
|
number,
|
|
9630
9660
|
current
|
|
9631
9661
|
}) {
|
|
9632
|
-
const node = (0,
|
|
9662
|
+
const node = (0, import_react86.useInternalNode)(nodeId);
|
|
9633
9663
|
if (!node) return null;
|
|
9634
9664
|
const { x, y } = node.internals.positionAbsolute;
|
|
9635
9665
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
@@ -9649,12 +9679,12 @@ var Badge = (0, import_react83.memo)(function Badge2({
|
|
|
9649
9679
|
}
|
|
9650
9680
|
);
|
|
9651
9681
|
});
|
|
9652
|
-
var WalkthroughBadges_default = (0,
|
|
9682
|
+
var WalkthroughBadges_default = (0, import_react85.memo)(function WalkthroughBadges({ trail }) {
|
|
9653
9683
|
if (trail.length === 0) return null;
|
|
9654
9684
|
const numbers = /* @__PURE__ */ new Map();
|
|
9655
9685
|
trail.forEach((nodeId, index) => numbers.set(nodeId, index + 1));
|
|
9656
9686
|
const current = trail[trail.length - 1];
|
|
9657
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CanvasPortal, { children: [...numbers].map(([nodeId, number]) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9658
9688
|
Badge,
|
|
9659
9689
|
{
|
|
9660
9690
|
nodeId,
|
|
@@ -9666,8 +9696,8 @@ var WalkthroughBadges_default = (0, import_react83.memo)(function WalkthroughBad
|
|
|
9666
9696
|
});
|
|
9667
9697
|
|
|
9668
9698
|
// src/components/CanvasToolbar.tsx
|
|
9669
|
-
var
|
|
9670
|
-
var
|
|
9699
|
+
var import_react87 = require("react");
|
|
9700
|
+
var import_react88 = require("@xyflow/react");
|
|
9671
9701
|
var import_lucide_react35 = require("lucide-react");
|
|
9672
9702
|
|
|
9673
9703
|
// src/components/Tip.tsx
|
|
@@ -9726,10 +9756,10 @@ var ToolbarButton = ({
|
|
|
9726
9756
|
}
|
|
9727
9757
|
) });
|
|
9728
9758
|
};
|
|
9729
|
-
var ZoomLevel = (0,
|
|
9759
|
+
var ZoomLevel = (0, import_react87.memo)(function ZoomLevel2({
|
|
9730
9760
|
className = ""
|
|
9731
9761
|
}) {
|
|
9732
|
-
const zoom = (0,
|
|
9762
|
+
const zoom = (0, import_react88.useStore)((state) => Math.round(state.transform[2] * 100));
|
|
9733
9763
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
9734
9764
|
"div",
|
|
9735
9765
|
{
|
|
@@ -9743,7 +9773,7 @@ var ZoomLevel = (0, import_react85.memo)(function ZoomLevel2({
|
|
|
9743
9773
|
});
|
|
9744
9774
|
var ToolbarDivider = () => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "w-px h-5 mx-1 bg-[rgb(var(--ec-page-border))]" });
|
|
9745
9775
|
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,
|
|
9776
|
+
var CanvasToolbar = (0, import_react87.memo)(function CanvasToolbar2({
|
|
9747
9777
|
levels,
|
|
9748
9778
|
tools = [],
|
|
9749
9779
|
animateMessages,
|
|
@@ -9753,7 +9783,7 @@ var CanvasToolbar = (0, import_react85.memo)(function CanvasToolbar2({
|
|
|
9753
9783
|
setShowMinimap,
|
|
9754
9784
|
handleFitView
|
|
9755
9785
|
}) {
|
|
9756
|
-
const { zoomIn, zoomOut } = (0,
|
|
9786
|
+
const { zoomIn, zoomOut } = (0, import_react88.useReactFlow)();
|
|
9757
9787
|
const groups = [
|
|
9758
9788
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
9759
9789
|
/* @__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 +9859,7 @@ var CanvasToolbar = (0, import_react85.memo)(function CanvasToolbar2({
|
|
|
9829
9859
|
)
|
|
9830
9860
|
] })
|
|
9831
9861
|
].filter(Boolean);
|
|
9832
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9862
|
+
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
9863
|
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ToolbarDivider, {}),
|
|
9834
9864
|
group
|
|
9835
9865
|
] }, index)) }) });
|
|
@@ -9837,7 +9867,7 @@ var CanvasToolbar = (0, import_react85.memo)(function CanvasToolbar2({
|
|
|
9837
9867
|
var CanvasToolbar_default = CanvasToolbar;
|
|
9838
9868
|
|
|
9839
9869
|
// src/components/SwimlanePicker.tsx
|
|
9840
|
-
var
|
|
9870
|
+
var import_react89 = require("react");
|
|
9841
9871
|
var DropdownMenu = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
9842
9872
|
var import_lucide_react36 = require("lucide-react");
|
|
9843
9873
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
@@ -10015,7 +10045,7 @@ var STYLES = [
|
|
|
10015
10045
|
{ value: "boxes", label: "Boxes", Preview: BoxesPreview },
|
|
10016
10046
|
{ value: "lanes", label: "Lanes", Preview: LanesPreview }
|
|
10017
10047
|
];
|
|
10018
|
-
var SwimlanePicker_default = (0,
|
|
10048
|
+
var SwimlanePicker_default = (0, import_react89.memo)(function SwimlanePicker({
|
|
10019
10049
|
options,
|
|
10020
10050
|
counts,
|
|
10021
10051
|
value,
|
|
@@ -10023,8 +10053,8 @@ var SwimlanePicker_default = (0, import_react87.memo)(function SwimlanePicker({
|
|
|
10023
10053
|
onChange
|
|
10024
10054
|
}) {
|
|
10025
10055
|
const portalContainer = usePortalContainer();
|
|
10026
|
-
const [open, setOpen] = (0,
|
|
10027
|
-
(0,
|
|
10056
|
+
const [open, setOpen] = (0, import_react89.useState)(false);
|
|
10057
|
+
(0, import_react89.useEffect)(() => {
|
|
10028
10058
|
const onKeyDown = (event) => {
|
|
10029
10059
|
if (event.key.toLowerCase() !== "g" || event.metaKey || event.ctrlKey || event.altKey || isTyping(event.target))
|
|
10030
10060
|
return;
|
|
@@ -10178,18 +10208,18 @@ var SwimlanePicker_default = (0, import_react87.memo)(function SwimlanePicker({
|
|
|
10178
10208
|
});
|
|
10179
10209
|
|
|
10180
10210
|
// src/components/FocusModeModal.tsx
|
|
10181
|
-
var
|
|
10211
|
+
var import_react95 = require("react");
|
|
10182
10212
|
var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
|
|
10183
10213
|
var import_lucide_react38 = require("lucide-react");
|
|
10184
|
-
var
|
|
10214
|
+
var import_react96 = require("@xyflow/react");
|
|
10185
10215
|
|
|
10186
10216
|
// src/components/FocusMode/FocusModeContent.tsx
|
|
10187
|
-
var
|
|
10188
|
-
var
|
|
10217
|
+
var import_react93 = require("react");
|
|
10218
|
+
var import_react94 = require("@xyflow/react");
|
|
10189
10219
|
|
|
10190
10220
|
// src/components/FocusMode/FocusModeNodeActions.tsx
|
|
10191
|
-
var
|
|
10192
|
-
var
|
|
10221
|
+
var import_react90 = require("react");
|
|
10222
|
+
var import_react91 = require("@xyflow/react");
|
|
10193
10223
|
var import_lucide_react37 = require("lucide-react");
|
|
10194
10224
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
10195
10225
|
var selectScaleFactor = (state) => Math.max(0.4, Math.min(1, state.transform[2]));
|
|
@@ -10198,7 +10228,7 @@ var FocusModeNodeActions = ({
|
|
|
10198
10228
|
isCenter,
|
|
10199
10229
|
onSwitch
|
|
10200
10230
|
}) => {
|
|
10201
|
-
const scaleFactor = (0,
|
|
10231
|
+
const scaleFactor = (0, import_react91.useStore)(selectScaleFactor);
|
|
10202
10232
|
if (node.type === "placeholder") return null;
|
|
10203
10233
|
const docUrl = getNodeDocUrl(node);
|
|
10204
10234
|
const direction = (node.position?.x ?? 0) < 0 ? "left" : "right";
|
|
@@ -10219,10 +10249,10 @@ var FocusModeNodeActions = ({
|
|
|
10219
10249
|
if (isCenter) {
|
|
10220
10250
|
if (!docUrl) return null;
|
|
10221
10251
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10222
|
-
|
|
10252
|
+
import_react91.NodeToolbar,
|
|
10223
10253
|
{
|
|
10224
10254
|
nodeId: node.id,
|
|
10225
|
-
position:
|
|
10255
|
+
position: import_react91.Position.Bottom,
|
|
10226
10256
|
isVisible: true,
|
|
10227
10257
|
offset: -16,
|
|
10228
10258
|
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
@@ -10246,10 +10276,10 @@ var FocusModeNodeActions = ({
|
|
|
10246
10276
|
);
|
|
10247
10277
|
}
|
|
10248
10278
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10249
|
-
|
|
10279
|
+
import_react91.NodeToolbar,
|
|
10250
10280
|
{
|
|
10251
10281
|
nodeId: node.id,
|
|
10252
|
-
position:
|
|
10282
|
+
position: import_react91.Position.Bottom,
|
|
10253
10283
|
isVisible: true,
|
|
10254
10284
|
offset: -16,
|
|
10255
10285
|
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
@@ -10284,10 +10314,10 @@ var FocusModeNodeActions = ({
|
|
|
10284
10314
|
}
|
|
10285
10315
|
);
|
|
10286
10316
|
};
|
|
10287
|
-
var FocusModeNodeActions_default = (0,
|
|
10317
|
+
var FocusModeNodeActions_default = (0, import_react90.memo)(FocusModeNodeActions);
|
|
10288
10318
|
|
|
10289
10319
|
// src/components/FocusMode/FocusModePlaceholder.tsx
|
|
10290
|
-
var
|
|
10320
|
+
var import_react92 = require("@xyflow/react");
|
|
10291
10321
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
10292
10322
|
var FocusModePlaceholder = ({
|
|
10293
10323
|
data
|
|
@@ -10300,19 +10330,19 @@ var FocusModePlaceholder = ({
|
|
|
10300
10330
|
style: { opacity: 0.6, minHeight: "130px" },
|
|
10301
10331
|
children: [
|
|
10302
10332
|
side === "right" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10303
|
-
|
|
10333
|
+
import_react92.Handle,
|
|
10304
10334
|
{
|
|
10305
10335
|
type: "target",
|
|
10306
|
-
position:
|
|
10336
|
+
position: import_react92.Position.Left,
|
|
10307
10337
|
style: { visibility: "hidden" }
|
|
10308
10338
|
}
|
|
10309
10339
|
),
|
|
10310
10340
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "text-center text-sm text-[rgb(var(--ec-page-text-muted))] italic", children: label }),
|
|
10311
10341
|
side === "left" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10312
|
-
|
|
10342
|
+
import_react92.Handle,
|
|
10313
10343
|
{
|
|
10314
10344
|
type: "source",
|
|
10315
|
-
position:
|
|
10345
|
+
position: import_react92.Position.Right,
|
|
10316
10346
|
style: { visibility: "hidden" }
|
|
10317
10347
|
}
|
|
10318
10348
|
)
|
|
@@ -10336,21 +10366,21 @@ var FocusModeContent = ({
|
|
|
10336
10366
|
edgeTypes: edgeTypes2,
|
|
10337
10367
|
onSwitchCenter
|
|
10338
10368
|
}) => {
|
|
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,
|
|
10369
|
+
const { fitView } = (0, import_react94.useReactFlow)();
|
|
10370
|
+
const [isAnimating, setIsAnimating] = (0, import_react93.useState)(false);
|
|
10371
|
+
const [needsFitView, setNeedsFitView] = (0, import_react93.useState)(false);
|
|
10372
|
+
const [hoveredEdgeId, setHoveredEdgeId] = (0, import_react93.useState)(null);
|
|
10373
|
+
const [isReady, setIsReady] = (0, import_react93.useState)(false);
|
|
10374
|
+
const reactFlowInitialized = (0, import_react93.useRef)(false);
|
|
10375
|
+
const animationTimeoutRef = (0, import_react93.useRef)(null);
|
|
10376
|
+
(0, import_react93.useEffect)(() => {
|
|
10347
10377
|
return () => {
|
|
10348
10378
|
if (animationTimeoutRef.current) {
|
|
10349
10379
|
clearTimeout(animationTimeoutRef.current);
|
|
10350
10380
|
}
|
|
10351
10381
|
};
|
|
10352
10382
|
}, []);
|
|
10353
|
-
const calculateFocusedGraph = (0,
|
|
10383
|
+
const calculateFocusedGraph = (0, import_react93.useCallback)(
|
|
10354
10384
|
(centerId) => {
|
|
10355
10385
|
const centerNode = allNodes.find((n) => n.id === centerId);
|
|
10356
10386
|
if (!centerNode) {
|
|
@@ -10433,19 +10463,19 @@ var FocusModeContent = ({
|
|
|
10433
10463
|
},
|
|
10434
10464
|
[allNodes, allEdges]
|
|
10435
10465
|
);
|
|
10436
|
-
const initialGraph = (0,
|
|
10466
|
+
const initialGraph = (0, import_react93.useMemo)(
|
|
10437
10467
|
() => calculateFocusedGraph(centerNodeId),
|
|
10438
10468
|
[centerNodeId, calculateFocusedGraph]
|
|
10439
10469
|
);
|
|
10440
|
-
const [displayNodes, setDisplayNodes] = (0,
|
|
10441
|
-
const [displayEdges, setDisplayEdges] = (0,
|
|
10442
|
-
(0,
|
|
10470
|
+
const [displayNodes, setDisplayNodes] = (0, import_react94.useNodesState)(initialGraph.nodes);
|
|
10471
|
+
const [displayEdges, setDisplayEdges] = (0, import_react94.useEdgesState)(initialGraph.edges);
|
|
10472
|
+
(0, import_react93.useEffect)(() => {
|
|
10443
10473
|
const { nodes, edges } = calculateFocusedGraph(centerNodeId);
|
|
10444
10474
|
setDisplayNodes(nodes);
|
|
10445
10475
|
setDisplayEdges(edges);
|
|
10446
10476
|
setNeedsFitView(true);
|
|
10447
10477
|
}, [centerNodeId, calculateFocusedGraph, setDisplayNodes, setDisplayEdges]);
|
|
10448
|
-
(0,
|
|
10478
|
+
(0, import_react93.useEffect)(() => {
|
|
10449
10479
|
if (needsFitView && reactFlowInitialized.current) {
|
|
10450
10480
|
const timer = setTimeout(() => {
|
|
10451
10481
|
fitView({ padding: 0.2, duration: 300 });
|
|
@@ -10454,14 +10484,14 @@ var FocusModeContent = ({
|
|
|
10454
10484
|
return () => clearTimeout(timer);
|
|
10455
10485
|
}
|
|
10456
10486
|
}, [needsFitView, displayNodes, fitView]);
|
|
10457
|
-
const handleInit = (0,
|
|
10487
|
+
const handleInit = (0, import_react93.useCallback)(() => {
|
|
10458
10488
|
reactFlowInitialized.current = true;
|
|
10459
10489
|
requestAnimationFrame(() => {
|
|
10460
10490
|
fitView({ padding: 0.2, duration: 0 });
|
|
10461
10491
|
setIsReady(true);
|
|
10462
10492
|
});
|
|
10463
10493
|
}, [fitView]);
|
|
10464
|
-
const handleSwitchNode = (0,
|
|
10494
|
+
const handleSwitchNode = (0, import_react93.useCallback)(
|
|
10465
10495
|
(nodeId, direction) => {
|
|
10466
10496
|
if (nodeId === centerNodeId || isAnimating) return;
|
|
10467
10497
|
setIsAnimating(true);
|
|
@@ -10497,7 +10527,7 @@ var FocusModeContent = ({
|
|
|
10497
10527
|
},
|
|
10498
10528
|
[centerNodeId, isAnimating, setDisplayNodes, onSwitchCenter]
|
|
10499
10529
|
);
|
|
10500
|
-
const handleNodeClick = (0,
|
|
10530
|
+
const handleNodeClick = (0, import_react93.useCallback)(
|
|
10501
10531
|
(_, clickedNode) => {
|
|
10502
10532
|
if (clickedNode.id === centerNodeId || isAnimating) return;
|
|
10503
10533
|
const direction = (clickedNode.position?.x ?? 0) < 0 ? "left" : "right";
|
|
@@ -10505,16 +10535,16 @@ var FocusModeContent = ({
|
|
|
10505
10535
|
},
|
|
10506
10536
|
[centerNodeId, isAnimating, handleSwitchNode]
|
|
10507
10537
|
);
|
|
10508
|
-
const handleEdgeMouseEnter = (0,
|
|
10538
|
+
const handleEdgeMouseEnter = (0, import_react93.useCallback)(
|
|
10509
10539
|
(_, edge) => {
|
|
10510
10540
|
setHoveredEdgeId(edge.id);
|
|
10511
10541
|
},
|
|
10512
10542
|
[]
|
|
10513
10543
|
);
|
|
10514
|
-
const handleEdgeMouseLeave = (0,
|
|
10544
|
+
const handleEdgeMouseLeave = (0, import_react93.useCallback)(() => {
|
|
10515
10545
|
setHoveredEdgeId(null);
|
|
10516
10546
|
}, []);
|
|
10517
|
-
const edgesWithHover = (0,
|
|
10547
|
+
const edgesWithHover = (0, import_react93.useMemo)(() => {
|
|
10518
10548
|
return displayEdges.map((edge) => {
|
|
10519
10549
|
if (edge.id === hoveredEdgeId) {
|
|
10520
10550
|
return {
|
|
@@ -10525,7 +10555,7 @@ var FocusModeContent = ({
|
|
|
10525
10555
|
return edge;
|
|
10526
10556
|
});
|
|
10527
10557
|
}, [displayEdges, hoveredEdgeId]);
|
|
10528
|
-
const mergedNodeTypes = (0,
|
|
10558
|
+
const mergedNodeTypes = (0, import_react93.useMemo)(
|
|
10529
10559
|
() => ({
|
|
10530
10560
|
...nodeTypes,
|
|
10531
10561
|
placeholder: FocusModePlaceholder_default
|
|
@@ -10541,7 +10571,7 @@ var FocusModeContent = ({
|
|
|
10541
10571
|
className: "h-full w-full focus-mode-container",
|
|
10542
10572
|
style: { opacity: isReady ? 1 : 0 },
|
|
10543
10573
|
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
10544
|
-
|
|
10574
|
+
import_react94.ReactFlow,
|
|
10545
10575
|
{
|
|
10546
10576
|
nodes: displayNodes,
|
|
10547
10577
|
edges: edgesWithHover,
|
|
@@ -10560,8 +10590,8 @@ var FocusModeContent = ({
|
|
|
10560
10590
|
minZoom: 0.3,
|
|
10561
10591
|
maxZoom: 2,
|
|
10562
10592
|
children: [
|
|
10563
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
10564
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
10593
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react94.Background, { color: "rgb(var(--ec-page-border))", gap: 20 }),
|
|
10594
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react94.Controls, { showInteractive: false }),
|
|
10565
10595
|
displayNodes.map((node, index) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
10566
10596
|
FocusModeNodeActions_default,
|
|
10567
10597
|
{
|
|
@@ -10590,17 +10620,17 @@ var FocusModeModal = ({
|
|
|
10590
10620
|
nodeTypes,
|
|
10591
10621
|
edgeTypes: edgeTypes2
|
|
10592
10622
|
}) => {
|
|
10593
|
-
const [centerNodeId, setCenterNodeId] = (0,
|
|
10623
|
+
const [centerNodeId, setCenterNodeId] = (0, import_react95.useState)(
|
|
10594
10624
|
initialNodeId
|
|
10595
10625
|
);
|
|
10596
10626
|
const isDark = useDarkMode();
|
|
10597
10627
|
const portalContainer = usePortalContainer();
|
|
10598
|
-
(0,
|
|
10628
|
+
(0, import_react95.useEffect)(() => {
|
|
10599
10629
|
if (isOpen && initialNodeId) {
|
|
10600
10630
|
setCenterNodeId(initialNodeId);
|
|
10601
10631
|
}
|
|
10602
10632
|
}, [isOpen, initialNodeId]);
|
|
10603
|
-
const handleSwitchCenter = (0,
|
|
10633
|
+
const handleSwitchCenter = (0, import_react95.useCallback)(
|
|
10604
10634
|
(newCenterNodeId, _direction) => {
|
|
10605
10635
|
setCenterNodeId(newCenterNodeId);
|
|
10606
10636
|
},
|
|
@@ -10733,7 +10763,7 @@ var FocusModeModal = ({
|
|
|
10733
10763
|
]
|
|
10734
10764
|
}
|
|
10735
10765
|
),
|
|
10736
|
-
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { style: { flex: 1, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
10766
|
+
/* @__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
10767
|
FocusModeContent_default,
|
|
10738
10768
|
{
|
|
10739
10769
|
centerNodeId,
|
|
@@ -10754,17 +10784,17 @@ var FocusModeModal = ({
|
|
|
10754
10784
|
var FocusModeModal_default = FocusModeModal;
|
|
10755
10785
|
|
|
10756
10786
|
// src/components/DiagramBackground.tsx
|
|
10757
|
-
var
|
|
10758
|
-
var
|
|
10787
|
+
var import_react97 = require("react");
|
|
10788
|
+
var import_react98 = require("@xyflow/react");
|
|
10759
10789
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
10760
|
-
var DiagramBackground = (0,
|
|
10761
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10790
|
+
var DiagramBackground = (0, import_react97.memo)(function DiagramBackground2() {
|
|
10791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react98.Background, { color: "var(--ec-bg-dots)", gap: 16 });
|
|
10762
10792
|
});
|
|
10763
10793
|
var DiagramBackground_default = DiagramBackground;
|
|
10764
10794
|
|
|
10765
10795
|
// src/components/Legend.tsx
|
|
10766
|
-
var
|
|
10767
|
-
var
|
|
10796
|
+
var import_react99 = require("react");
|
|
10797
|
+
var import_react100 = require("@xyflow/react");
|
|
10768
10798
|
var import_lucide_react39 = require("lucide-react");
|
|
10769
10799
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
10770
10800
|
var GROUP_NODE_TYPES = ["group", "system-group", "domain-group", "swimlane"];
|
|
@@ -10859,7 +10889,7 @@ var getLegend = (nodes) => {
|
|
|
10859
10889
|
return legend;
|
|
10860
10890
|
};
|
|
10861
10891
|
var LEGEND_PANEL_STYLE_WITH_MINIMAP = { marginRight: "230px" };
|
|
10862
|
-
var LegendPanel = (0,
|
|
10892
|
+
var LegendPanel = (0, import_react99.memo)(function LegendPanel2({
|
|
10863
10893
|
legend,
|
|
10864
10894
|
hiddenKeys,
|
|
10865
10895
|
showMinimap = false,
|
|
@@ -10867,7 +10897,7 @@ var LegendPanel = (0, import_react97.memo)(function LegendPanel2({
|
|
|
10867
10897
|
}) {
|
|
10868
10898
|
if (Object.keys(legend).length === 0) return null;
|
|
10869
10899
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
10870
|
-
|
|
10900
|
+
import_react100.Panel,
|
|
10871
10901
|
{
|
|
10872
10902
|
position: "bottom-right",
|
|
10873
10903
|
style: showMinimap ? LEGEND_PANEL_STYLE_WITH_MINIMAP : void 0,
|
|
@@ -10911,7 +10941,7 @@ var DIAGRAM_FIT_VIEW_OPTIONS = {
|
|
|
10911
10941
|
};
|
|
10912
10942
|
|
|
10913
10943
|
// src/components/MermaidView.tsx
|
|
10914
|
-
var
|
|
10944
|
+
var import_react101 = require("react");
|
|
10915
10945
|
var import_lucide_react40 = require("lucide-react");
|
|
10916
10946
|
|
|
10917
10947
|
// src/utils/export-mermaid.ts
|
|
@@ -11211,22 +11241,22 @@ var MermaidView = ({
|
|
|
11211
11241
|
edges,
|
|
11212
11242
|
maxTextSize = 1e5
|
|
11213
11243
|
}) => {
|
|
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,
|
|
11244
|
+
const [copySuccess, setCopySuccess] = (0, import_react101.useState)(false);
|
|
11245
|
+
const [mermaidCode, setMermaidCode] = (0, import_react101.useState)("");
|
|
11246
|
+
const [previewSvg, setPreviewSvg] = (0, import_react101.useState)(null);
|
|
11247
|
+
const [previewError, setPreviewError] = (0, import_react101.useState)(null);
|
|
11248
|
+
const [isRendering, setIsRendering] = (0, import_react101.useState)(true);
|
|
11249
|
+
const containerRef = (0, import_react101.useRef)(null);
|
|
11250
|
+
const svgContainerRef = (0, import_react101.useRef)(null);
|
|
11251
|
+
const panZoomInstanceRef = (0, import_react101.useRef)(null);
|
|
11252
|
+
(0, import_react101.useEffect)(() => {
|
|
11223
11253
|
const code = convertToMermaid(nodes, edges, {
|
|
11224
11254
|
includeStyles: true,
|
|
11225
11255
|
direction: "LR"
|
|
11226
11256
|
});
|
|
11227
11257
|
setMermaidCode(code);
|
|
11228
11258
|
}, [nodes, edges]);
|
|
11229
|
-
(0,
|
|
11259
|
+
(0, import_react101.useEffect)(() => {
|
|
11230
11260
|
if (!mermaidCode) return;
|
|
11231
11261
|
let cancelled = false;
|
|
11232
11262
|
setIsRendering(true);
|
|
@@ -11271,7 +11301,7 @@ var MermaidView = ({
|
|
|
11271
11301
|
cancelled = true;
|
|
11272
11302
|
};
|
|
11273
11303
|
}, [mermaidCode]);
|
|
11274
|
-
(0,
|
|
11304
|
+
(0, import_react101.useEffect)(() => {
|
|
11275
11305
|
if (!previewSvg || !svgContainerRef.current) return;
|
|
11276
11306
|
const initZoom = async () => {
|
|
11277
11307
|
const svgElement = svgContainerRef.current?.querySelector("svg");
|
|
@@ -11310,7 +11340,7 @@ var MermaidView = ({
|
|
|
11310
11340
|
}
|
|
11311
11341
|
};
|
|
11312
11342
|
}, [previewSvg]);
|
|
11313
|
-
const handleCopyToClipboard = (0,
|
|
11343
|
+
const handleCopyToClipboard = (0, import_react101.useCallback)(async () => {
|
|
11314
11344
|
await copyToClipboard(mermaidCode);
|
|
11315
11345
|
setCopySuccess(true);
|
|
11316
11346
|
setTimeout(() => setCopySuccess(false), 2e3);
|
|
@@ -11423,11 +11453,11 @@ var MermaidView = ({
|
|
|
11423
11453
|
var MermaidView_default = MermaidView;
|
|
11424
11454
|
|
|
11425
11455
|
// src/hooks/use-node-visibility.ts
|
|
11426
|
-
var
|
|
11427
|
-
var
|
|
11456
|
+
var import_react103 = require("react");
|
|
11457
|
+
var import_react104 = require("@xyflow/react");
|
|
11428
11458
|
|
|
11429
11459
|
// src/utils/hide-messages.ts
|
|
11430
|
-
var
|
|
11460
|
+
var import_react102 = require("@xyflow/react");
|
|
11431
11461
|
var MESSAGE_NODE_TYPES = [...MESSAGE, "messageGroup", "messageGroupExpanded"];
|
|
11432
11462
|
var isMessageNode = (node) => MESSAGE_NODE_TYPES.includes(node.type || "");
|
|
11433
11463
|
var getCollection = (type = "") => {
|
|
@@ -11549,7 +11579,7 @@ var hideNodes = (nodes, edges, isHidden) => {
|
|
|
11549
11579
|
label: getMessagesLabel(bridged.messages),
|
|
11550
11580
|
// The same size arrow as the rest of the graph's edges
|
|
11551
11581
|
markerEnd: {
|
|
11552
|
-
type:
|
|
11582
|
+
type: import_react102.MarkerType.ArrowClosed,
|
|
11553
11583
|
width: 20,
|
|
11554
11584
|
height: 20,
|
|
11555
11585
|
color: "rgb(var(--ec-page-text-muted))"
|
|
@@ -11811,7 +11841,7 @@ var useNodeVisibility = ({
|
|
|
11811
11841
|
}) => {
|
|
11812
11842
|
const hideMessagesKey = `EventCatalog:hideMessages${preferenceScope ? `:${preferenceScope}` : ""}`;
|
|
11813
11843
|
const hideChannelsKey = `EventCatalog:hideChannels${preferenceScope ? `:${preferenceScope}` : ""}`;
|
|
11814
|
-
const [urlLevel] = (0,
|
|
11844
|
+
const [urlLevel] = (0, import_react103.useState)(() => {
|
|
11815
11845
|
if (ignoreSavedLevel) return 3;
|
|
11816
11846
|
const level = Number(
|
|
11817
11847
|
new URLSearchParams(window.location.search).get("level")
|
|
@@ -11819,25 +11849,25 @@ var useNodeVisibility = ({
|
|
|
11819
11849
|
if (level === 1 || level === 2) return 2;
|
|
11820
11850
|
return level === 3 ? 3 : void 0;
|
|
11821
11851
|
});
|
|
11822
|
-
const [hideChannels, setHideChannels] = (0,
|
|
11852
|
+
const [hideChannels, setHideChannels] = (0, import_react103.useState)(
|
|
11823
11853
|
() => !ignoreSavedLevel && !urlLevel && localStorage.getItem(hideChannelsKey) === "true"
|
|
11824
11854
|
);
|
|
11825
|
-
const [hideMessages, setHideMessages] = (0,
|
|
11855
|
+
const [hideMessages, setHideMessages] = (0, import_react103.useState)(
|
|
11826
11856
|
() => urlLevel ? urlLevel === 2 : localStorage.getItem(hideMessagesKey) === "true"
|
|
11827
11857
|
);
|
|
11828
|
-
const fullGraph = (0,
|
|
11829
|
-
const { fitView, fitBounds } = (0,
|
|
11830
|
-
const animateNextChange = (0,
|
|
11831
|
-
const isAnimating = (0,
|
|
11832
|
-
const cancelAnimation = (0,
|
|
11858
|
+
const fullGraph = (0, import_react103.useRef)({ nodes, edges });
|
|
11859
|
+
const { fitView, fitBounds } = (0, import_react104.useReactFlow)();
|
|
11860
|
+
const animateNextChange = (0, import_react103.useRef)(false);
|
|
11861
|
+
const isAnimating = (0, import_react103.useRef)(false);
|
|
11862
|
+
const cancelAnimation = (0, import_react103.useRef)(void 0);
|
|
11833
11863
|
const messagesHidden = hideMessages && hasMessages;
|
|
11834
11864
|
const channelsHidden = hasChannels && (hideChannels || messagesHidden);
|
|
11835
|
-
const [hiddenLegendKeys, setHiddenLegendKeys] = (0,
|
|
11865
|
+
const [hiddenLegendKeys, setHiddenLegendKeys] = (0, import_react103.useState)(
|
|
11836
11866
|
initialHiddenLegendKeys
|
|
11837
11867
|
);
|
|
11838
|
-
const onHiddenLegendKeysChangeRef = (0,
|
|
11868
|
+
const onHiddenLegendKeysChangeRef = (0, import_react103.useRef)(onHiddenLegendKeysChange);
|
|
11839
11869
|
onHiddenLegendKeysChangeRef.current = onHiddenLegendKeysChange;
|
|
11840
|
-
const toggleLegendKey = (0,
|
|
11870
|
+
const toggleLegendKey = (0, import_react103.useCallback)(
|
|
11841
11871
|
(key) => {
|
|
11842
11872
|
animateNextChange.current = true;
|
|
11843
11873
|
const keys = hiddenLegendKeys.includes(key) ? hiddenLegendKeys.filter((hiddenKey) => hiddenKey !== key) : [...hiddenLegendKeys, key];
|
|
@@ -11846,14 +11876,14 @@ var useNodeVisibility = ({
|
|
|
11846
11876
|
},
|
|
11847
11877
|
[hiddenLegendKeys]
|
|
11848
11878
|
);
|
|
11849
|
-
const matchesLegendKeyRef = (0,
|
|
11879
|
+
const matchesLegendKeyRef = (0, import_react103.useRef)(matchesLegendKey);
|
|
11850
11880
|
matchesLegendKeyRef.current = matchesLegendKey;
|
|
11851
11881
|
const isHiddenByLegend = (node) => hiddenLegendKeys.some((key) => matchesLegendKeyRef.current(node, key));
|
|
11852
11882
|
const legendHidden = fullGraph.current.nodes.some(isHiddenByLegend);
|
|
11853
|
-
const [highlightCrossDomain, setHighlightCrossDomain] = (0,
|
|
11883
|
+
const [highlightCrossDomain, setHighlightCrossDomain] = (0, import_react103.useState)(
|
|
11854
11884
|
() => localStorage.getItem("EventCatalog:highlightCrossDomain") === "true"
|
|
11855
11885
|
);
|
|
11856
|
-
const toggleHighlightCrossDomain = (0,
|
|
11886
|
+
const toggleHighlightCrossDomain = (0, import_react103.useCallback)(() => {
|
|
11857
11887
|
const highlight = !highlightCrossDomain;
|
|
11858
11888
|
setHighlightCrossDomain(highlight);
|
|
11859
11889
|
localStorage.setItem(
|
|
@@ -11861,7 +11891,7 @@ var useNodeVisibility = ({
|
|
|
11861
11891
|
JSON.stringify(highlight)
|
|
11862
11892
|
);
|
|
11863
11893
|
}, [highlightCrossDomain]);
|
|
11864
|
-
(0,
|
|
11894
|
+
(0, import_react103.useEffect)(() => {
|
|
11865
11895
|
if (isAnimating.current) return;
|
|
11866
11896
|
const containsHiddenNodes = nodes.some(
|
|
11867
11897
|
(node) => channelsHidden && node.type === "channels" || messagesHidden && isMessageNode(node) || legendHidden && isHiddenByLegend(node)
|
|
@@ -11870,20 +11900,20 @@ var useNodeVisibility = ({
|
|
|
11870
11900
|
fullGraph.current = { nodes, edges };
|
|
11871
11901
|
}
|
|
11872
11902
|
}, [nodes, edges]);
|
|
11873
|
-
const toggleChannelsVisibility = (0,
|
|
11903
|
+
const toggleChannelsVisibility = (0, import_react103.useCallback)(() => {
|
|
11874
11904
|
animateNextChange.current = true;
|
|
11875
11905
|
const hide = !hideChannels;
|
|
11876
11906
|
setHideChannels(hide);
|
|
11877
11907
|
localStorage.setItem(hideChannelsKey, JSON.stringify(hide));
|
|
11878
11908
|
}, [hideChannels]);
|
|
11879
|
-
const toggleMessagesVisibility = (0,
|
|
11909
|
+
const toggleMessagesVisibility = (0, import_react103.useCallback)(() => {
|
|
11880
11910
|
animateNextChange.current = true;
|
|
11881
11911
|
const hide = !hideMessages;
|
|
11882
11912
|
setHideMessages(hide);
|
|
11883
11913
|
localStorage.setItem(hideMessagesKey, JSON.stringify(hide));
|
|
11884
11914
|
setLevelInUrl(hide ? 2 : 3);
|
|
11885
11915
|
}, [hideMessages]);
|
|
11886
|
-
const setDetailLevel = (0,
|
|
11916
|
+
const setDetailLevel = (0, import_react103.useCallback)((level) => {
|
|
11887
11917
|
animateNextChange.current = true;
|
|
11888
11918
|
const hide = level === 2;
|
|
11889
11919
|
setHideMessages(hide);
|
|
@@ -11894,20 +11924,20 @@ var useNodeVisibility = ({
|
|
|
11894
11924
|
}
|
|
11895
11925
|
setLevelInUrl(level);
|
|
11896
11926
|
}, []);
|
|
11897
|
-
const nodesRef = (0,
|
|
11927
|
+
const nodesRef = (0, import_react103.useRef)(nodes);
|
|
11898
11928
|
nodesRef.current = nodes;
|
|
11899
|
-
const edgesRef = (0,
|
|
11929
|
+
const edgesRef = (0, import_react103.useRef)(edges);
|
|
11900
11930
|
edgesRef.current = edges;
|
|
11901
|
-
const prepareEdgesRef = (0,
|
|
11931
|
+
const prepareEdgesRef = (0, import_react103.useRef)(prepareEdges);
|
|
11902
11932
|
prepareEdgesRef.current = prepareEdges;
|
|
11903
|
-
const beforeLayoutRef = (0,
|
|
11933
|
+
const beforeLayoutRef = (0, import_react103.useRef)(beforeLayout);
|
|
11904
11934
|
beforeLayoutRef.current = beforeLayout;
|
|
11905
|
-
const afterLayoutRef = (0,
|
|
11935
|
+
const afterLayoutRef = (0, import_react103.useRef)(afterLayout);
|
|
11906
11936
|
afterLayoutRef.current = afterLayout;
|
|
11907
|
-
const latestRun = (0,
|
|
11908
|
-
const [isLayingOut, setIsLayingOut] = (0,
|
|
11909
|
-
const isFirstRun = (0,
|
|
11910
|
-
(0,
|
|
11937
|
+
const latestRun = (0, import_react103.useRef)(0);
|
|
11938
|
+
const [isLayingOut, setIsLayingOut] = (0, import_react103.useState)(false);
|
|
11939
|
+
const isFirstRun = (0, import_react103.useRef)(true);
|
|
11940
|
+
(0, import_react103.useLayoutEffect)(() => {
|
|
11911
11941
|
const firstRun = isFirstRun.current;
|
|
11912
11942
|
isFirstRun.current = false;
|
|
11913
11943
|
const from = firstRun ? transitionFrom : void 0;
|
|
@@ -12025,7 +12055,7 @@ var shouldAnimateMessages = ({
|
|
|
12025
12055
|
};
|
|
12026
12056
|
|
|
12027
12057
|
// src/components/VisualizerDropdownContent.tsx
|
|
12028
|
-
var
|
|
12058
|
+
var import_react105 = require("react");
|
|
12029
12059
|
var DropdownMenu2 = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
12030
12060
|
var import_lucide_react41 = require("lucide-react");
|
|
12031
12061
|
var import_outline = require("@heroicons/react/24/outline");
|
|
@@ -12043,7 +12073,7 @@ var DIAGRAM_MENU_SEPARATOR = "my-1 h-px bg-[rgb(var(--ec-page-border))]";
|
|
|
12043
12073
|
|
|
12044
12074
|
// src/components/VisualizerDropdownContent.tsx
|
|
12045
12075
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
12046
|
-
var VisualizerDropdownContent = (0,
|
|
12076
|
+
var VisualizerDropdownContent = (0, import_react105.memo)(
|
|
12047
12077
|
({
|
|
12048
12078
|
isMermaidView,
|
|
12049
12079
|
setIsMermaidView,
|
|
@@ -12073,7 +12103,7 @@ var VisualizerDropdownContent = (0, import_react103.memo)(
|
|
|
12073
12103
|
onOpenNotes,
|
|
12074
12104
|
onOpenInStudio
|
|
12075
12105
|
}) => {
|
|
12076
|
-
const [layoutStatus, setLayoutStatus] = (0,
|
|
12106
|
+
const [layoutStatus, setLayoutStatus] = (0, import_react105.useState)("idle");
|
|
12077
12107
|
const portalContainer = usePortalContainer();
|
|
12078
12108
|
const handleSaveLayout = async () => {
|
|
12079
12109
|
if (!onSaveLayout) return;
|
|
@@ -12446,10 +12476,10 @@ VisualizerDropdownContent.displayName = "VisualizerDropdownContent";
|
|
|
12446
12476
|
var VisualizerDropdownContent_default = VisualizerDropdownContent;
|
|
12447
12477
|
|
|
12448
12478
|
// src/components/NodeContextMenu.tsx
|
|
12449
|
-
var
|
|
12479
|
+
var import_react106 = require("react");
|
|
12450
12480
|
var ContextMenu5 = __toESM(require("@radix-ui/react-context-menu"));
|
|
12451
12481
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
12452
|
-
var NodeContextMenu_default = (0,
|
|
12482
|
+
var NodeContextMenu_default = (0, import_react106.memo)(function NodeContextMenu({
|
|
12453
12483
|
items,
|
|
12454
12484
|
children
|
|
12455
12485
|
}) {
|
|
@@ -12487,7 +12517,7 @@ var NodeContextMenu_default = (0, import_react104.memo)(function NodeContextMenu
|
|
|
12487
12517
|
});
|
|
12488
12518
|
|
|
12489
12519
|
// src/utils/node-memo.ts
|
|
12490
|
-
var
|
|
12520
|
+
var import_react107 = require("react");
|
|
12491
12521
|
var POSITION_PROPS = /* @__PURE__ */ new Set(["positionAbsoluteX", "positionAbsoluteY"]);
|
|
12492
12522
|
var equalExceptPosition = (previous, next) => {
|
|
12493
12523
|
const keys = /* @__PURE__ */ new Set([...Object.keys(previous), ...Object.keys(next)]);
|
|
@@ -12501,7 +12531,7 @@ var equalExceptPosition = (previous, next) => {
|
|
|
12501
12531
|
}
|
|
12502
12532
|
return true;
|
|
12503
12533
|
};
|
|
12504
|
-
var memoNode = (Component) => (0,
|
|
12534
|
+
var memoNode = (Component) => (0, import_react107.memo)(Component, equalExceptPosition);
|
|
12505
12535
|
|
|
12506
12536
|
// src/utils/edge-animations.ts
|
|
12507
12537
|
var pauseEdgeAnimations = (canvas, paused) => canvas?.querySelectorAll(".react-flow__edges > svg").forEach(
|
|
@@ -12509,7 +12539,7 @@ var pauseEdgeAnimations = (canvas, paused) => canvas?.querySelectorAll(".react-f
|
|
|
12509
12539
|
);
|
|
12510
12540
|
|
|
12511
12541
|
// src/utils/export-image.ts
|
|
12512
|
-
var
|
|
12542
|
+
var import_react108 = require("@xyflow/react");
|
|
12513
12543
|
var MIN_IMAGE_WIDTH = 1024;
|
|
12514
12544
|
var MIN_IMAGE_HEIGHT = 768;
|
|
12515
12545
|
var EXPORT_PADDING = 40;
|
|
@@ -12522,7 +12552,7 @@ function getExportImageDimensions(nodesBounds) {
|
|
|
12522
12552
|
};
|
|
12523
12553
|
const width = Math.max(MIN_IMAGE_WIDTH, Math.ceil(paddedBounds.width));
|
|
12524
12554
|
const height = Math.max(MIN_IMAGE_HEIGHT, Math.ceil(paddedBounds.height));
|
|
12525
|
-
const viewport = (0,
|
|
12555
|
+
const viewport = (0, import_react108.getViewportForBounds)(paddedBounds, width, height, 0.5, 2, 0);
|
|
12526
12556
|
return { width, height, viewport };
|
|
12527
12557
|
}
|
|
12528
12558
|
function extractEcVarNames(cssText) {
|
|
@@ -12609,7 +12639,7 @@ function injectExportStyles(viewport) {
|
|
|
12609
12639
|
}
|
|
12610
12640
|
|
|
12611
12641
|
// src/utils/layout.ts
|
|
12612
|
-
var
|
|
12642
|
+
var import_react109 = require("@xyflow/react");
|
|
12613
12643
|
var EMPTY_GROUP_WIDTH = 200;
|
|
12614
12644
|
var EMPTY_GROUP_HEIGHT = 80;
|
|
12615
12645
|
var defaultSizes = {
|
|
@@ -12799,7 +12829,7 @@ async function layoutGraph(nodes, edges, { style } = {}) {
|
|
|
12799
12829
|
const isCalls = edge.type === "calls";
|
|
12800
12830
|
const isBidirectional = edge.type === "reads-writes";
|
|
12801
12831
|
const arrowMarker = {
|
|
12802
|
-
type:
|
|
12832
|
+
type: import_react109.MarkerType.ArrowClosed,
|
|
12803
12833
|
width: 20,
|
|
12804
12834
|
height: 20,
|
|
12805
12835
|
color: "rgb(var(--ec-page-text-muted))"
|
|
@@ -12948,9 +12978,9 @@ var buildMessageGroupExpansionNodes = ({
|
|
|
12948
12978
|
};
|
|
12949
12979
|
|
|
12950
12980
|
// src/components/NotesToolbarButton.tsx
|
|
12951
|
-
var
|
|
12981
|
+
var import_react110 = require("react");
|
|
12952
12982
|
var import_lucide_react42 = require("lucide-react");
|
|
12953
|
-
var
|
|
12983
|
+
var import_react111 = require("@xyflow/react");
|
|
12954
12984
|
var Dialog3 = __toESM(require("@radix-ui/react-dialog"));
|
|
12955
12985
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
12956
12986
|
var NODE_TYPE_META = {
|
|
@@ -13213,12 +13243,12 @@ function AllNotesModal({
|
|
|
13213
13243
|
onClose,
|
|
13214
13244
|
nodes
|
|
13215
13245
|
}) {
|
|
13216
|
-
const { setCenter, getZoom } = (0,
|
|
13217
|
-
const [selectedIdx, setSelectedIdx] = (0,
|
|
13246
|
+
const { setCenter, getZoom } = (0, import_react111.useReactFlow)();
|
|
13247
|
+
const [selectedIdx, setSelectedIdx] = (0, import_react110.useState)(0);
|
|
13218
13248
|
const portalContainer = usePortalContainer();
|
|
13219
13249
|
const totalNotes = noteGroups.reduce((sum, g) => sum + g.notes.length, 0);
|
|
13220
13250
|
const selected = noteGroups[selectedIdx] || noteGroups[0];
|
|
13221
|
-
const handleNavigate = (0,
|
|
13251
|
+
const handleNavigate = (0, import_react110.useCallback)(
|
|
13222
13252
|
(nodeId) => {
|
|
13223
13253
|
const node = nodes.find((n) => n.id === nodeId);
|
|
13224
13254
|
if (!node) return;
|
|
@@ -13821,7 +13851,7 @@ var GROUP_EDGE_STYLE = {
|
|
|
13821
13851
|
stroke: "var(--ec-edge-stroke, #6b7280)"
|
|
13822
13852
|
};
|
|
13823
13853
|
var GROUP_EDGE_MARKER = {
|
|
13824
|
-
type:
|
|
13854
|
+
type: import_react113.MarkerType.ArrowClosed,
|
|
13825
13855
|
width: 20,
|
|
13826
13856
|
height: 20
|
|
13827
13857
|
};
|
|
@@ -13927,12 +13957,12 @@ var NodeGraphBuilder = ({
|
|
|
13927
13957
|
onOpenInStudio,
|
|
13928
13958
|
studioGraphs
|
|
13929
13959
|
}) => {
|
|
13930
|
-
(0,
|
|
13960
|
+
(0, import_react112.useEffect)(() => {
|
|
13931
13961
|
if (onBuildUrl) {
|
|
13932
13962
|
setBuildUrlFn(onBuildUrl);
|
|
13933
13963
|
}
|
|
13934
13964
|
}, []);
|
|
13935
|
-
const nodeTypes = (0,
|
|
13965
|
+
const nodeTypes = (0, import_react112.useMemo)(() => {
|
|
13936
13966
|
const wrapWithContextMenu = (Component) => {
|
|
13937
13967
|
const Wrapped = (props) => {
|
|
13938
13968
|
const items = props.data?.contextMenu;
|
|
@@ -13960,7 +13990,7 @@ var NodeGraphBuilder = ({
|
|
|
13960
13990
|
])
|
|
13961
13991
|
);
|
|
13962
13992
|
}, []);
|
|
13963
|
-
const edgeTypes2 = (0,
|
|
13993
|
+
const edgeTypes2 = (0, import_react112.useMemo)(
|
|
13964
13994
|
() => ({
|
|
13965
13995
|
animated: AnimatedMessageEdge_default,
|
|
13966
13996
|
multiline: MultilineEdgeLabel_default,
|
|
@@ -13971,20 +14001,20 @@ var NodeGraphBuilder = ({
|
|
|
13971
14001
|
}),
|
|
13972
14002
|
[]
|
|
13973
14003
|
);
|
|
13974
|
-
const [animateMessages, setAnimateMessages] = (0,
|
|
14004
|
+
const [animateMessages, setAnimateMessages] = (0, import_react112.useState)(
|
|
13975
14005
|
() => shouldAnimateMessages({
|
|
13976
14006
|
disabled: disableMessageAnimation,
|
|
13977
14007
|
animated,
|
|
13978
14008
|
nodeCount: initialNodes.length
|
|
13979
14009
|
})
|
|
13980
14010
|
);
|
|
13981
|
-
const prepareEdges = (0,
|
|
14011
|
+
const prepareEdges = (0, import_react112.useCallback)(
|
|
13982
14012
|
(eds) => applyMessageAnimation(eds, animateMessages),
|
|
13983
14013
|
[animateMessages]
|
|
13984
14014
|
);
|
|
13985
|
-
const [firstEdges] = (0,
|
|
13986
|
-
const [nodes, setNodes, onNodesChange] = (0,
|
|
13987
|
-
const [edges, setEdges, onEdgesChange] = (0,
|
|
14015
|
+
const [firstEdges] = (0, import_react112.useState)(() => prepareEdges(initialEdges));
|
|
14016
|
+
const [nodes, setNodes, onNodesChange] = (0, import_react113.useNodesState)(initialNodes);
|
|
14017
|
+
const [edges, setEdges, onEdgesChange] = (0, import_react113.useEdgesState)(firstEdges);
|
|
13988
14018
|
const {
|
|
13989
14019
|
fitView,
|
|
13990
14020
|
getNodes,
|
|
@@ -13995,13 +14025,13 @@ var NodeGraphBuilder = ({
|
|
|
13995
14025
|
getViewport,
|
|
13996
14026
|
setViewport,
|
|
13997
14027
|
getInternalNode
|
|
13998
|
-
} = (0,
|
|
13999
|
-
const storeApi = (0,
|
|
14000
|
-
const previousGraphInputRef = (0,
|
|
14028
|
+
} = (0, import_react113.useReactFlow)();
|
|
14029
|
+
const storeApi = (0, import_react113.useStoreApi)();
|
|
14030
|
+
const previousGraphInputRef = (0, import_react112.useRef)({
|
|
14001
14031
|
nodes: initialNodes,
|
|
14002
14032
|
edges: initialEdges
|
|
14003
14033
|
});
|
|
14004
|
-
(0,
|
|
14034
|
+
(0, import_react112.useEffect)(() => {
|
|
14005
14035
|
const previousGraphInput = previousGraphInputRef.current;
|
|
14006
14036
|
previousGraphInputRef.current = {
|
|
14007
14037
|
nodes: initialNodes,
|
|
@@ -14016,43 +14046,43 @@ var NodeGraphBuilder = ({
|
|
|
14016
14046
|
fitView({ duration: 300, padding: 0.2 });
|
|
14017
14047
|
});
|
|
14018
14048
|
}, [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,
|
|
14049
|
+
const [_activeStepIndex, _setActiveStepIndex] = (0, import_react112.useState)(null);
|
|
14050
|
+
const [_isFullscreen, _setIsFullscreen] = (0, import_react112.useState)(false);
|
|
14051
|
+
const [isShareModalOpen, setIsShareModalOpen] = (0, import_react112.useState)(false);
|
|
14052
|
+
const [shareUrlCopySuccess, setShareUrlCopySuccess] = (0, import_react112.useState)(false);
|
|
14053
|
+
const [isMermaidView, setIsMermaidView] = (0, import_react112.useState)(false);
|
|
14054
|
+
const [showMinimap, setShowMinimap] = (0, import_react112.useState)(false);
|
|
14055
|
+
const [hasLayoutChanges, setHasLayoutChanges] = (0, import_react112.useState)(false);
|
|
14056
|
+
const [isSavingLayout, setIsSavingLayout] = (0, import_react112.useState)(false);
|
|
14057
|
+
const initialPositionsRef = (0, import_react112.useRef)(
|
|
14028
14058
|
{}
|
|
14029
14059
|
);
|
|
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,
|
|
14060
|
+
const [focusModeOpen, setFocusModeOpen] = (0, import_react112.useState)(false);
|
|
14061
|
+
const [focusedNodeId, setFocusedNodeId] = (0, import_react112.useState)(null);
|
|
14062
|
+
const [swimlanes, setSwimlanes] = (0, import_react112.useState)(null);
|
|
14063
|
+
const swimlanesRef = (0, import_react112.useRef)(null);
|
|
14064
|
+
const [swimlaneStyle, setSwimlaneStyle] = (0, import_react112.useState)("boxes");
|
|
14065
|
+
const swimlaneStyleRef = (0, import_react112.useRef)("boxes");
|
|
14066
|
+
const unlanedGraphRef = (0, import_react112.useRef)(null);
|
|
14067
|
+
const [isNotesModalOpen, setIsNotesModalOpen] = (0, import_react112.useState)(false);
|
|
14068
|
+
const openNotesModal = (0, import_react112.useCallback)(() => setIsNotesModalOpen(true), []);
|
|
14069
|
+
const interactionCountRef = (0, import_react112.useRef)(0);
|
|
14070
|
+
const startInteraction = (0, import_react112.useCallback)(() => {
|
|
14041
14071
|
interactionCountRef.current += 1;
|
|
14042
14072
|
if (interactionCountRef.current === 1) {
|
|
14043
14073
|
reactFlowWrapperRef.current?.classList.add("ec-interaction-active");
|
|
14044
14074
|
pauseEdgeAnimations(reactFlowWrapperRef.current, true);
|
|
14045
14075
|
}
|
|
14046
14076
|
}, []);
|
|
14047
|
-
const endInteraction = (0,
|
|
14077
|
+
const endInteraction = (0, import_react112.useCallback)(() => {
|
|
14048
14078
|
interactionCountRef.current = Math.max(0, interactionCountRef.current - 1);
|
|
14049
14079
|
if (interactionCountRef.current === 0) {
|
|
14050
14080
|
reactFlowWrapperRef.current?.classList.remove("ec-interaction-active");
|
|
14051
14081
|
pauseEdgeAnimations(reactFlowWrapperRef.current, false);
|
|
14052
14082
|
}
|
|
14053
14083
|
}, []);
|
|
14054
|
-
const hoveredEdgeNodesRef = (0,
|
|
14055
|
-
const handleEdgeMouseEnter = (0,
|
|
14084
|
+
const hoveredEdgeNodesRef = (0, import_react112.useRef)([]);
|
|
14085
|
+
const handleEdgeMouseEnter = (0, import_react112.useCallback)(
|
|
14056
14086
|
(_, edge) => {
|
|
14057
14087
|
const wrapper = reactFlowWrapperRef.current;
|
|
14058
14088
|
if (!wrapper) return;
|
|
@@ -14064,15 +14094,15 @@ var NodeGraphBuilder = ({
|
|
|
14064
14094
|
},
|
|
14065
14095
|
[]
|
|
14066
14096
|
);
|
|
14067
|
-
const handleEdgeMouseLeave = (0,
|
|
14097
|
+
const handleEdgeMouseLeave = (0, import_react112.useCallback)(() => {
|
|
14068
14098
|
hoveredEdgeNodesRef.current.forEach(
|
|
14069
14099
|
(el) => el.classList.remove("ec-edge-hover-node")
|
|
14070
14100
|
);
|
|
14071
14101
|
hoveredEdgeNodesRef.current = [];
|
|
14072
14102
|
}, []);
|
|
14073
|
-
const hoveredNodeEdgesRef = (0,
|
|
14074
|
-
const hoveredNodePeersRef = (0,
|
|
14075
|
-
const handleNodeMouseEnter = (0,
|
|
14103
|
+
const hoveredNodeEdgesRef = (0, import_react112.useRef)([]);
|
|
14104
|
+
const hoveredNodePeersRef = (0, import_react112.useRef)([]);
|
|
14105
|
+
const handleNodeMouseEnter = (0, import_react112.useCallback)(
|
|
14076
14106
|
(_, node) => {
|
|
14077
14107
|
const wrapper = reactFlowWrapperRef.current;
|
|
14078
14108
|
if (!wrapper) return;
|
|
@@ -14101,7 +14131,7 @@ var NodeGraphBuilder = ({
|
|
|
14101
14131
|
},
|
|
14102
14132
|
[]
|
|
14103
14133
|
);
|
|
14104
|
-
const handleNodeMouseLeave = (0,
|
|
14134
|
+
const handleNodeMouseLeave = (0, import_react112.useCallback)(() => {
|
|
14105
14135
|
hoveredNodeEdgesRef.current.forEach(
|
|
14106
14136
|
(el) => el.classList.remove("ec-node-hover-edge")
|
|
14107
14137
|
);
|
|
@@ -14111,30 +14141,30 @@ var NodeGraphBuilder = ({
|
|
|
14111
14141
|
);
|
|
14112
14142
|
hoveredNodePeersRef.current = [];
|
|
14113
14143
|
}, []);
|
|
14114
|
-
const hasChannels = (0,
|
|
14144
|
+
const hasChannels = (0, import_react112.useMemo)(
|
|
14115
14145
|
() => initialNodes.some((node) => node.type === "channels"),
|
|
14116
14146
|
[initialNodes]
|
|
14117
14147
|
);
|
|
14118
|
-
const hasMessages = (0,
|
|
14148
|
+
const hasMessages = (0, import_react112.useMemo)(
|
|
14119
14149
|
() => initialNodes.some(isMessageNode),
|
|
14120
14150
|
[initialNodes]
|
|
14121
14151
|
);
|
|
14122
|
-
const isFlowGraph = (0,
|
|
14152
|
+
const isFlowGraph = (0, import_react112.useMemo)(
|
|
14123
14153
|
() => initialEdges.some((edge) => edge.type === "flow-edge"),
|
|
14124
14154
|
[initialEdges]
|
|
14125
14155
|
);
|
|
14126
|
-
const renderedSizeOf = (0,
|
|
14156
|
+
const renderedSizeOf = (0, import_react112.useCallback)(
|
|
14127
14157
|
(node) => {
|
|
14128
14158
|
const measured = storeApi.getState().nodeLookup.get(node.id)?.measured;
|
|
14129
14159
|
return measured?.width && measured?.height ? { width: measured.width, height: measured.height } : getNodeSize(node);
|
|
14130
14160
|
},
|
|
14131
14161
|
[storeApi]
|
|
14132
14162
|
);
|
|
14133
|
-
const beforeLayout = (0,
|
|
14163
|
+
const beforeLayout = (0, import_react112.useCallback)(
|
|
14134
14164
|
(graph) => swimlaneStyleRef.current === "lanes" ? removeSwimlanes(graph) : graph,
|
|
14135
14165
|
[]
|
|
14136
14166
|
);
|
|
14137
|
-
const afterLayout = (0,
|
|
14167
|
+
const afterLayout = (0, import_react112.useCallback)((graph) => {
|
|
14138
14168
|
const groupBy = swimlanesRef.current;
|
|
14139
14169
|
const style = swimlaneStyleRef.current;
|
|
14140
14170
|
const current = getGrouping(graph.nodes);
|
|
@@ -14146,24 +14176,24 @@ var NodeGraphBuilder = ({
|
|
|
14146
14176
|
unlanedGraphRef.current = unlaned;
|
|
14147
14177
|
return layoutSwimlanes(unlaned, groupBy, { sizeOf: renderedSizeOf });
|
|
14148
14178
|
}, []);
|
|
14149
|
-
const hasLevels = (0,
|
|
14179
|
+
const hasLevels = (0, import_react112.useMemo)(
|
|
14150
14180
|
() => initialNodes.some(
|
|
14151
14181
|
(node) => LEVEL_NODE_TYPES.includes(node.type || "")
|
|
14152
14182
|
),
|
|
14153
14183
|
[initialNodes]
|
|
14154
14184
|
);
|
|
14155
|
-
const isContextGraph = (0,
|
|
14185
|
+
const isContextGraph = (0, import_react112.useMemo)(
|
|
14156
14186
|
() => initialNodes.every(
|
|
14157
14187
|
(node) => CONTEXT_NODE_TYPES.includes(node.type || "")
|
|
14158
14188
|
),
|
|
14159
14189
|
[initialNodes]
|
|
14160
14190
|
);
|
|
14161
|
-
const hasOtherDomains = (0,
|
|
14191
|
+
const hasOtherDomains = (0, import_react112.useMemo)(
|
|
14162
14192
|
() => mode === "full" && initialNodes.some((node) => !!node.data?.otherDomain),
|
|
14163
14193
|
[initialNodes, mode]
|
|
14164
14194
|
);
|
|
14165
|
-
const legendRef = (0,
|
|
14166
|
-
const matchesLegendKey = (0,
|
|
14195
|
+
const legendRef = (0, import_react112.useRef)({});
|
|
14196
|
+
const matchesLegendKey = (0, import_react112.useCallback)((node, key) => {
|
|
14167
14197
|
const groupId = legendRef.current[key]?.groupId;
|
|
14168
14198
|
return groupId ? node.data?.group?.id === groupId : node.type === key;
|
|
14169
14199
|
}, []);
|
|
@@ -14199,7 +14229,7 @@ var NodeGraphBuilder = ({
|
|
|
14199
14229
|
beforeLayout,
|
|
14200
14230
|
afterLayout
|
|
14201
14231
|
});
|
|
14202
|
-
const switchGraph = (0,
|
|
14232
|
+
const switchGraph = (0, import_react112.useCallback)(
|
|
14203
14233
|
(showOverview) => onShowOverview?.(showOverview, {
|
|
14204
14234
|
nodes: getNodes(),
|
|
14205
14235
|
edges: getEdges(),
|
|
@@ -14207,7 +14237,7 @@ var NodeGraphBuilder = ({
|
|
|
14207
14237
|
}),
|
|
14208
14238
|
[onShowOverview, getNodes, getEdges, getViewport]
|
|
14209
14239
|
);
|
|
14210
|
-
const levels = (0,
|
|
14240
|
+
const levels = (0, import_react112.useMemo)(() => {
|
|
14211
14241
|
if (isFlowGraph) return [];
|
|
14212
14242
|
if (!overviewLabel && !isContextGraph && !hasLevels) return [];
|
|
14213
14243
|
const selectDetailLevel = (level) => {
|
|
@@ -14249,7 +14279,7 @@ var NodeGraphBuilder = ({
|
|
|
14249
14279
|
setDetailLevel,
|
|
14250
14280
|
switchGraph
|
|
14251
14281
|
]);
|
|
14252
|
-
const canvasTools = (0,
|
|
14282
|
+
const canvasTools = (0, import_react112.useMemo)(
|
|
14253
14283
|
() => hasOtherDomains ? [
|
|
14254
14284
|
{
|
|
14255
14285
|
label: highlightCrossDomain ? "Stop highlighting cross-domain communication" : "Highlight cross-domain communication",
|
|
@@ -14260,23 +14290,23 @@ var NodeGraphBuilder = ({
|
|
|
14260
14290
|
] : [],
|
|
14261
14291
|
[hasOtherDomains, highlightCrossDomain, toggleHighlightCrossDomain]
|
|
14262
14292
|
);
|
|
14263
|
-
const searchRef = (0,
|
|
14264
|
-
const reactFlowWrapperRef = (0,
|
|
14265
|
-
const scrollableContainerRef = (0,
|
|
14266
|
-
const nodesRef = (0,
|
|
14293
|
+
const searchRef = (0, import_react112.useRef)(null);
|
|
14294
|
+
const reactFlowWrapperRef = (0, import_react112.useRef)(null);
|
|
14295
|
+
const scrollableContainerRef = (0, import_react112.useRef)(null);
|
|
14296
|
+
const nodesRef = (0, import_react112.useRef)(nodes);
|
|
14267
14297
|
nodesRef.current = nodes;
|
|
14268
|
-
const edgesRef = (0,
|
|
14298
|
+
const edgesRef = (0, import_react112.useRef)(edges);
|
|
14269
14299
|
edgesRef.current = edges;
|
|
14270
|
-
const subFlowLayoutRun = (0,
|
|
14271
|
-
const hideChannelsRef = (0,
|
|
14300
|
+
const subFlowLayoutRun = (0, import_react112.useRef)(0);
|
|
14301
|
+
const hideChannelsRef = (0, import_react112.useRef)(hideChannels);
|
|
14272
14302
|
hideChannelsRef.current = hideChannels;
|
|
14273
|
-
const walkthroughKeyRef = (0,
|
|
14303
|
+
const walkthroughKeyRef = (0, import_react112.useRef)("");
|
|
14274
14304
|
const computedWalkthroughKey = `${nodes.map((n) => `${n.id}:${n.type}`).join(",")}|${edges.map((e) => `${e.source}>${e.target}`).join(",")}`;
|
|
14275
14305
|
if (computedWalkthroughKey !== walkthroughKeyRef.current) {
|
|
14276
14306
|
walkthroughKeyRef.current = computedWalkthroughKey;
|
|
14277
14307
|
}
|
|
14278
14308
|
const walkthroughKey = walkthroughKeyRef.current;
|
|
14279
|
-
const { walkthroughNodes, walkthroughEdges } = (0,
|
|
14309
|
+
const { walkthroughNodes, walkthroughEdges } = (0, import_react112.useMemo)(() => {
|
|
14280
14310
|
const wrapperNodeIds = new Set(
|
|
14281
14311
|
nodes.filter((n) => isExpandedWrapper(n.type) || isSwimlaneNode(n)).map((n) => n.id)
|
|
14282
14312
|
);
|
|
@@ -14287,13 +14317,13 @@ var NodeGraphBuilder = ({
|
|
|
14287
14317
|
)
|
|
14288
14318
|
};
|
|
14289
14319
|
}, [walkthroughKey]);
|
|
14290
|
-
const animateLayout2 = (0,
|
|
14320
|
+
const animateLayout2 = (0, import_react112.useCallback)(() => {
|
|
14291
14321
|
const wrapper = reactFlowWrapperRef.current;
|
|
14292
14322
|
if (!wrapper) return;
|
|
14293
14323
|
wrapper.classList.add("ec-animating-layout");
|
|
14294
14324
|
setTimeout(() => wrapper.classList.remove("ec-animating-layout"), 400);
|
|
14295
14325
|
}, []);
|
|
14296
|
-
const makeRoomForRenderedExpandedGroup = (0,
|
|
14326
|
+
const makeRoomForRenderedExpandedGroup = (0, import_react112.useCallback)(
|
|
14297
14327
|
(groupNodeId, groupBounds) => {
|
|
14298
14328
|
const padding = 80;
|
|
14299
14329
|
const protectedBounds = {
|
|
@@ -14322,7 +14352,7 @@ var NodeGraphBuilder = ({
|
|
|
14322
14352
|
},
|
|
14323
14353
|
[getIntersectingNodes, setNodes]
|
|
14324
14354
|
);
|
|
14325
|
-
const handleCollapseGroup = (0,
|
|
14355
|
+
const handleCollapseGroup = (0, import_react112.useCallback)(
|
|
14326
14356
|
(e) => {
|
|
14327
14357
|
const target = e.target;
|
|
14328
14358
|
const collapseBtn = target.closest(
|
|
@@ -14396,7 +14426,7 @@ var NodeGraphBuilder = ({
|
|
|
14396
14426
|
},
|
|
14397
14427
|
[initialNodes, initialEdges, setNodes, setEdges, animateLayout2]
|
|
14398
14428
|
);
|
|
14399
|
-
(0,
|
|
14429
|
+
(0, import_react112.useEffect)(() => {
|
|
14400
14430
|
if (isDevMode && initialNodes.length > 0) {
|
|
14401
14431
|
const positions = {};
|
|
14402
14432
|
initialNodes.forEach((node) => {
|
|
@@ -14405,7 +14435,7 @@ var NodeGraphBuilder = ({
|
|
|
14405
14435
|
initialPositionsRef.current = positions;
|
|
14406
14436
|
}
|
|
14407
14437
|
}, [isDevMode, initialNodes]);
|
|
14408
|
-
const checkForLayoutChanges = (0,
|
|
14438
|
+
const checkForLayoutChanges = (0, import_react112.useCallback)(() => {
|
|
14409
14439
|
if (!isDevMode) return;
|
|
14410
14440
|
const initial = initialPositionsRef.current;
|
|
14411
14441
|
if (Object.keys(initial).length === 0) return;
|
|
@@ -14415,7 +14445,7 @@ var NodeGraphBuilder = ({
|
|
|
14415
14445
|
});
|
|
14416
14446
|
setHasLayoutChanges(hasChanges);
|
|
14417
14447
|
}, [isDevMode]);
|
|
14418
|
-
const handleNodesChange = (0,
|
|
14448
|
+
const handleNodesChange = (0, import_react112.useCallback)(
|
|
14419
14449
|
(changes) => {
|
|
14420
14450
|
onNodesChange(changes);
|
|
14421
14451
|
const hasDragEnd = changes.some(
|
|
@@ -14427,13 +14457,13 @@ var NodeGraphBuilder = ({
|
|
|
14427
14457
|
},
|
|
14428
14458
|
[onNodesChange, checkForLayoutChanges]
|
|
14429
14459
|
);
|
|
14430
|
-
const resetNodesAndEdges = (0,
|
|
14460
|
+
const resetNodesAndEdges = (0, import_react112.useCallback)(() => {
|
|
14431
14461
|
setNodes((nds) => mapChanged(nds, unpickedNode));
|
|
14432
14462
|
setEdges(
|
|
14433
14463
|
(eds) => mapChanged(eds, (edge) => unpickedEdge(edge, animateMessages))
|
|
14434
14464
|
);
|
|
14435
14465
|
}, [setNodes, setEdges, animateMessages]);
|
|
14436
|
-
(0,
|
|
14466
|
+
(0, import_react112.useEffect)(() => {
|
|
14437
14467
|
if (!focusNodeId) return;
|
|
14438
14468
|
const targetNode = nodesRef.current.find((node) => node.id === focusNodeId);
|
|
14439
14469
|
if (!targetNode) return;
|
|
@@ -14451,13 +14481,13 @@ var NodeGraphBuilder = ({
|
|
|
14451
14481
|
});
|
|
14452
14482
|
});
|
|
14453
14483
|
}, [focusNodeId, focusRequestId, fitView, setNodes]);
|
|
14454
|
-
(0,
|
|
14484
|
+
(0, import_react112.useEffect)(() => {
|
|
14455
14485
|
if (fitRequestId == null) return;
|
|
14456
14486
|
requestAnimationFrame(() => {
|
|
14457
14487
|
fitView({ duration: 400, padding: 0.2 });
|
|
14458
14488
|
});
|
|
14459
14489
|
}, [fitRequestId, fitView]);
|
|
14460
|
-
const handleNodeClick = (0,
|
|
14490
|
+
const handleNodeClick = (0, import_react112.useCallback)(
|
|
14461
14491
|
(_, node) => {
|
|
14462
14492
|
if (onNodeClick) {
|
|
14463
14493
|
onNodeClick(node);
|
|
@@ -14805,17 +14835,17 @@ var NodeGraphBuilder = ({
|
|
|
14805
14835
|
prepareEdges
|
|
14806
14836
|
]
|
|
14807
14837
|
);
|
|
14808
|
-
const toggleAnimateMessages = (0,
|
|
14838
|
+
const toggleAnimateMessages = (0, import_react112.useCallback)(() => {
|
|
14809
14839
|
setAnimateMessages((prev) => {
|
|
14810
14840
|
const next = !prev;
|
|
14811
14841
|
localStorage.setItem(ANIMATE_MESSAGES_STORAGE_KEY, JSON.stringify(next));
|
|
14812
14842
|
return next;
|
|
14813
14843
|
});
|
|
14814
14844
|
}, []);
|
|
14815
|
-
const handleFitView = (0,
|
|
14845
|
+
const handleFitView = (0, import_react112.useCallback)(() => {
|
|
14816
14846
|
fitView({ ...DIAGRAM_FIT_VIEW_OPTIONS, duration: 400 });
|
|
14817
14847
|
}, [fitView]);
|
|
14818
|
-
(0,
|
|
14848
|
+
(0, import_react112.useEffect)(() => {
|
|
14819
14849
|
setAnimateMessages(
|
|
14820
14850
|
shouldAnimateMessages({
|
|
14821
14851
|
disabled: disableMessageAnimation,
|
|
@@ -14824,19 +14854,19 @@ var NodeGraphBuilder = ({
|
|
|
14824
14854
|
})
|
|
14825
14855
|
);
|
|
14826
14856
|
}, [animated, disableMessageAnimation, initialNodes.length]);
|
|
14827
|
-
const animatedEdgesFor = (0,
|
|
14828
|
-
(0,
|
|
14857
|
+
const animatedEdgesFor = (0, import_react112.useRef)(animateMessages);
|
|
14858
|
+
(0, import_react112.useEffect)(() => {
|
|
14829
14859
|
if (animatedEdgesFor.current === animateMessages) return;
|
|
14830
14860
|
animatedEdgesFor.current = animateMessages;
|
|
14831
14861
|
setEdges((eds) => applyMessageAnimation(eds, animateMessages));
|
|
14832
14862
|
}, [animateMessages]);
|
|
14833
|
-
(0,
|
|
14863
|
+
(0, import_react112.useEffect)(() => {
|
|
14834
14864
|
if (transitionFrom) return;
|
|
14835
14865
|
setTimeout(() => {
|
|
14836
14866
|
fitView({ maxZoom: 1, duration: 800 });
|
|
14837
14867
|
}, 150);
|
|
14838
14868
|
}, []);
|
|
14839
|
-
const generateMermaidCode = (0,
|
|
14869
|
+
const generateMermaidCode = (0, import_react112.useCallback)(() => {
|
|
14840
14870
|
try {
|
|
14841
14871
|
return convertToMermaid(nodesRef.current, edgesRef.current, {
|
|
14842
14872
|
includeStyles: true,
|
|
@@ -14847,7 +14877,7 @@ var NodeGraphBuilder = ({
|
|
|
14847
14877
|
return "";
|
|
14848
14878
|
}
|
|
14849
14879
|
}, []);
|
|
14850
|
-
(0,
|
|
14880
|
+
(0, import_react112.useEffect)(() => {
|
|
14851
14881
|
if (zoomOnScroll) return;
|
|
14852
14882
|
const findScrollableContainer = () => {
|
|
14853
14883
|
const selectors = [
|
|
@@ -14892,31 +14922,31 @@ var NodeGraphBuilder = ({
|
|
|
14892
14922
|
};
|
|
14893
14923
|
}
|
|
14894
14924
|
}, [zoomOnScroll]);
|
|
14895
|
-
const handlePaneClick = (0,
|
|
14925
|
+
const handlePaneClick = (0, import_react112.useCallback)(() => {
|
|
14896
14926
|
searchRef.current?.hideSuggestions();
|
|
14897
14927
|
resetNodesAndEdges();
|
|
14898
14928
|
fitView({ maxZoom: 1, duration: 800 });
|
|
14899
14929
|
}, [resetNodesAndEdges, fitView]);
|
|
14900
|
-
const handleNodeSelect = (0,
|
|
14930
|
+
const handleNodeSelect = (0, import_react112.useCallback)(
|
|
14901
14931
|
(node) => {
|
|
14902
14932
|
handleNodeClick(null, node);
|
|
14903
14933
|
},
|
|
14904
14934
|
[handleNodeClick]
|
|
14905
14935
|
);
|
|
14906
|
-
const handleSearchClear = (0,
|
|
14936
|
+
const handleSearchClear = (0, import_react112.useCallback)(() => {
|
|
14907
14937
|
resetNodesAndEdges();
|
|
14908
14938
|
fitView({ maxZoom: 1, duration: 800 });
|
|
14909
14939
|
}, [resetNodesAndEdges, fitView]);
|
|
14910
|
-
const downloadImage = (0,
|
|
14940
|
+
const downloadImage = (0, import_react112.useCallback)((dataUrl, filename) => {
|
|
14911
14941
|
const a = document.createElement("a");
|
|
14912
14942
|
a.setAttribute("download", `${filename || "eventcatalog"}.png`);
|
|
14913
14943
|
a.setAttribute("href", dataUrl);
|
|
14914
14944
|
a.click();
|
|
14915
14945
|
}, []);
|
|
14916
|
-
const openChat = (0,
|
|
14946
|
+
const openChat = (0, import_react112.useCallback)(() => {
|
|
14917
14947
|
window.dispatchEvent(new CustomEvent("eventcatalog:open-chat"));
|
|
14918
14948
|
}, []);
|
|
14919
|
-
const handleSaveLayout = (0,
|
|
14949
|
+
const handleSaveLayout = (0, import_react112.useCallback)(async () => {
|
|
14920
14950
|
if (!resourceKey || !onSaveLayout) return false;
|
|
14921
14951
|
if (swimlanesRef.current) return false;
|
|
14922
14952
|
const positions = {};
|
|
@@ -14929,7 +14959,7 @@ var NodeGraphBuilder = ({
|
|
|
14929
14959
|
});
|
|
14930
14960
|
return await onSaveLayout(resourceKey, positions);
|
|
14931
14961
|
}, [resourceKey, onSaveLayout]);
|
|
14932
|
-
const getStudioSnapshot = (0,
|
|
14962
|
+
const getStudioSnapshot = (0, import_react112.useCallback)(async () => {
|
|
14933
14963
|
const { detail, overview, hiddenMessages } = studioGraphs;
|
|
14934
14964
|
const level = levels.findIndex((entry) => entry.active) + 1 || 3;
|
|
14935
14965
|
const shown = {
|
|
@@ -14990,15 +15020,15 @@ var NodeGraphBuilder = ({
|
|
|
14990
15020
|
getEdges,
|
|
14991
15021
|
getInternalNode
|
|
14992
15022
|
]);
|
|
14993
|
-
const handleOpenInStudio = (0,
|
|
15023
|
+
const handleOpenInStudio = (0, import_react112.useCallback)(() => {
|
|
14994
15024
|
if (onOpenInStudio && studioGraphs)
|
|
14995
15025
|
onOpenInStudio({ title, getSnapshot: getStudioSnapshot });
|
|
14996
15026
|
}, [onOpenInStudio, studioGraphs, title, getStudioSnapshot]);
|
|
14997
|
-
const handleResetLayout = (0,
|
|
15027
|
+
const handleResetLayout = (0, import_react112.useCallback)(async () => {
|
|
14998
15028
|
if (!resourceKey || !onResetLayout) return false;
|
|
14999
15029
|
return await onResetLayout(resourceKey);
|
|
15000
15030
|
}, [resourceKey, onResetLayout]);
|
|
15001
|
-
const handleQuickSaveLayout = (0,
|
|
15031
|
+
const handleQuickSaveLayout = (0, import_react112.useCallback)(async () => {
|
|
15002
15032
|
setIsSavingLayout(true);
|
|
15003
15033
|
const success = await handleSaveLayout();
|
|
15004
15034
|
setIsSavingLayout(false);
|
|
@@ -15011,17 +15041,17 @@ var NodeGraphBuilder = ({
|
|
|
15011
15041
|
setHasLayoutChanges(false);
|
|
15012
15042
|
}
|
|
15013
15043
|
}, [handleSaveLayout]);
|
|
15014
|
-
const handleCopyArchitectureCode = (0,
|
|
15044
|
+
const handleCopyArchitectureCode = (0, import_react112.useCallback)(async () => {
|
|
15015
15045
|
const code = generateMermaidCode();
|
|
15016
15046
|
await copyToClipboard(code);
|
|
15017
15047
|
}, [generateMermaidCode]);
|
|
15018
|
-
const handleCopyShareUrl = (0,
|
|
15048
|
+
const handleCopyShareUrl = (0, import_react112.useCallback)(async () => {
|
|
15019
15049
|
const url = typeof window !== "undefined" ? window.location.href : "";
|
|
15020
15050
|
await copyToClipboard(url);
|
|
15021
15051
|
setShareUrlCopySuccess(true);
|
|
15022
15052
|
setTimeout(() => setShareUrlCopySuccess(false), 2e3);
|
|
15023
15053
|
}, []);
|
|
15024
|
-
const toggleFullScreen = (0,
|
|
15054
|
+
const toggleFullScreen = (0, import_react112.useCallback)(() => {
|
|
15025
15055
|
if (!document.fullscreenElement) {
|
|
15026
15056
|
reactFlowWrapperRef.current?.requestFullscreen().catch((err) => {
|
|
15027
15057
|
console.error(
|
|
@@ -15032,7 +15062,7 @@ var NodeGraphBuilder = ({
|
|
|
15032
15062
|
document.exitFullscreen();
|
|
15033
15063
|
}
|
|
15034
15064
|
}, []);
|
|
15035
|
-
(0,
|
|
15065
|
+
(0, import_react112.useEffect)(() => {
|
|
15036
15066
|
const handleFullscreenChange = () => {
|
|
15037
15067
|
_setIsFullscreen(!!document.fullscreenElement);
|
|
15038
15068
|
setTimeout(() => {
|
|
@@ -15044,8 +15074,8 @@ var NodeGraphBuilder = ({
|
|
|
15044
15074
|
document.removeEventListener("fullscreenchange", handleFullscreenChange);
|
|
15045
15075
|
};
|
|
15046
15076
|
}, [fitView]);
|
|
15047
|
-
const handleExportVisual = (0,
|
|
15048
|
-
const nodesBounds = (0,
|
|
15077
|
+
const handleExportVisual = (0, import_react112.useCallback)(() => {
|
|
15078
|
+
const nodesBounds = (0, import_react113.getNodesBounds)(getNodes(), {
|
|
15049
15079
|
nodeLookup: storeApi.getState().nodeLookup
|
|
15050
15080
|
});
|
|
15051
15081
|
const { width, height, viewport } = getExportImageDimensions(nodesBounds);
|
|
@@ -15073,15 +15103,15 @@ var NodeGraphBuilder = ({
|
|
|
15073
15103
|
if (controls) controls.style.display = "block";
|
|
15074
15104
|
});
|
|
15075
15105
|
}, [getNodes, storeApi, downloadImage, title]);
|
|
15076
|
-
const legendKeyRef = (0,
|
|
15106
|
+
const legendKeyRef = (0, import_react112.useRef)("");
|
|
15077
15107
|
const computedLegendKey = nodes.map((n) => `${n.id}:${n.type}:${n.data.group?.id || ""}`).join(",");
|
|
15078
15108
|
if (computedLegendKey !== legendKeyRef.current) {
|
|
15079
15109
|
legendKeyRef.current = computedLegendKey;
|
|
15080
15110
|
}
|
|
15081
15111
|
const legendKey = legendKeyRef.current;
|
|
15082
|
-
const graphLegend = (0,
|
|
15083
|
-
const legendEntries = (0,
|
|
15084
|
-
const legend = (0,
|
|
15112
|
+
const graphLegend = (0, import_react112.useMemo)(() => getLegend(nodes), [legendKey]);
|
|
15113
|
+
const legendEntries = (0, import_react112.useRef)(null);
|
|
15114
|
+
const legend = (0, import_react112.useMemo)(() => {
|
|
15085
15115
|
legendEntries.current ?? (legendEntries.current = getLegend(initialNodes));
|
|
15086
15116
|
Object.assign(legendEntries.current, graphLegend);
|
|
15087
15117
|
return Object.fromEntries(
|
|
@@ -15091,17 +15121,17 @@ var NodeGraphBuilder = ({
|
|
|
15091
15121
|
);
|
|
15092
15122
|
}, [graphLegend, hiddenLegendKeys]);
|
|
15093
15123
|
legendRef.current = legend;
|
|
15094
|
-
const nodeIdsKeyRef = (0,
|
|
15124
|
+
const nodeIdsKeyRef = (0, import_react112.useRef)("");
|
|
15095
15125
|
const computedNodeIdsKey = nodes.map((n) => n.id).join(",");
|
|
15096
15126
|
if (computedNodeIdsKey !== nodeIdsKeyRef.current) {
|
|
15097
15127
|
nodeIdsKeyRef.current = computedNodeIdsKey;
|
|
15098
15128
|
}
|
|
15099
15129
|
const nodeIdsKey = nodeIdsKeyRef.current;
|
|
15100
|
-
const searchNodes = (0,
|
|
15130
|
+
const searchNodes = (0, import_react112.useMemo)(
|
|
15101
15131
|
() => nodes.filter((node) => !isSwimlaneNode(node)),
|
|
15102
15132
|
[nodeIdsKey]
|
|
15103
15133
|
);
|
|
15104
|
-
const allNoteGroups = (0,
|
|
15134
|
+
const allNoteGroups = (0, import_react112.useMemo)(() => {
|
|
15105
15135
|
const groups = [];
|
|
15106
15136
|
for (const node of nodes) {
|
|
15107
15137
|
const result = getNotesFromNode(node);
|
|
@@ -15116,13 +15146,13 @@ var NodeGraphBuilder = ({
|
|
|
15116
15146
|
}
|
|
15117
15147
|
return groups;
|
|
15118
15148
|
}, [nodeIdsKey]);
|
|
15119
|
-
const totalNotesCount = (0,
|
|
15149
|
+
const totalNotesCount = (0, import_react112.useMemo)(
|
|
15120
15150
|
() => allNoteGroups.reduce((sum, g) => sum + g.notes.length, 0),
|
|
15121
15151
|
[allNoteGroups]
|
|
15122
15152
|
);
|
|
15123
|
-
const [walkthroughTrail, setWalkthroughTrail] = (0,
|
|
15124
|
-
const walkthroughTrailRef = (0,
|
|
15125
|
-
const handleStepChange = (0,
|
|
15153
|
+
const [walkthroughTrail, setWalkthroughTrail] = (0, import_react112.useState)([]);
|
|
15154
|
+
const walkthroughTrailRef = (0, import_react112.useRef)([]);
|
|
15155
|
+
const handleStepChange = (0, import_react112.useCallback)(
|
|
15126
15156
|
(nodeId, shouldZoomOut, trail = nodeId ? [nodeId] : []) => {
|
|
15127
15157
|
if (nodeId === null) {
|
|
15128
15158
|
resetNodesAndEdges();
|
|
@@ -15180,12 +15210,12 @@ var NodeGraphBuilder = ({
|
|
|
15180
15210
|
walkthroughTrailRef.current = trail;
|
|
15181
15211
|
const canvas = reactFlowWrapperRef.current?.getBoundingClientRect();
|
|
15182
15212
|
if (!canvas) return;
|
|
15183
|
-
const bounds = (0,
|
|
15213
|
+
const bounds = (0, import_react113.getNodesBounds)([nodeId, ...nextNodeIds], {
|
|
15184
15214
|
nodeLookup: storeApi.getState().nodeLookup
|
|
15185
15215
|
});
|
|
15186
15216
|
const cardSpace = Math.min(WALKTHROUGH_CARD_SPACE, canvas.height * 0.35);
|
|
15187
15217
|
setViewport(
|
|
15188
|
-
(0,
|
|
15218
|
+
(0, import_react113.getViewportForBounds)(
|
|
15189
15219
|
bounds,
|
|
15190
15220
|
canvas.width,
|
|
15191
15221
|
canvas.height - cardSpace,
|
|
@@ -15198,13 +15228,13 @@ var NodeGraphBuilder = ({
|
|
|
15198
15228
|
},
|
|
15199
15229
|
[setNodes, setEdges, resetNodesAndEdges, setViewport, storeApi]
|
|
15200
15230
|
);
|
|
15201
|
-
const swimlaneOptions = (0,
|
|
15231
|
+
const swimlaneOptions = (0, import_react112.useMemo)(
|
|
15202
15232
|
() => isFlowGraph ? FLOW_GROUP_BYS.filter(
|
|
15203
15233
|
(groupBy) => hasSwimlanes(initialNodes, groupBy)
|
|
15204
15234
|
) : [],
|
|
15205
15235
|
[isFlowGraph, initialNodes]
|
|
15206
15236
|
);
|
|
15207
|
-
const swimlaneCounts = (0,
|
|
15237
|
+
const swimlaneCounts = (0, import_react112.useMemo)(
|
|
15208
15238
|
() => Object.fromEntries(
|
|
15209
15239
|
swimlaneOptions.map((groupBy) => [
|
|
15210
15240
|
groupBy,
|
|
@@ -15213,9 +15243,9 @@ var NodeGraphBuilder = ({
|
|
|
15213
15243
|
),
|
|
15214
15244
|
[swimlaneOptions, initialNodes]
|
|
15215
15245
|
);
|
|
15216
|
-
const [groupingShown, setGroupingShown] = (0,
|
|
15217
|
-
const groupingRun = (0,
|
|
15218
|
-
const handleSwimlanesChange = (0,
|
|
15246
|
+
const [groupingShown, setGroupingShown] = (0, import_react112.useState)(0);
|
|
15247
|
+
const groupingRun = (0, import_react112.useRef)(0);
|
|
15248
|
+
const handleSwimlanesChange = (0, import_react112.useCallback)(
|
|
15219
15249
|
(requested, style = swimlaneStyleRef.current) => {
|
|
15220
15250
|
const groupBy = style === "lanes" && requested === "domain-system" ? "domain" : requested;
|
|
15221
15251
|
if (groupBy === swimlanesRef.current && style === swimlaneStyleRef.current)
|
|
@@ -15246,7 +15276,7 @@ var NodeGraphBuilder = ({
|
|
|
15246
15276
|
},
|
|
15247
15277
|
[animateLayout2, setNodes, setEdges, renderedSizeOf]
|
|
15248
15278
|
);
|
|
15249
|
-
(0,
|
|
15279
|
+
(0, import_react112.useEffect)(() => {
|
|
15250
15280
|
if (groupingShown === 0) return;
|
|
15251
15281
|
const trail = walkthroughTrailRef.current;
|
|
15252
15282
|
if (trail.length > 0) {
|
|
@@ -15256,9 +15286,9 @@ var NodeGraphBuilder = ({
|
|
|
15256
15286
|
fitView({ duration: 400, padding: 0.1 });
|
|
15257
15287
|
}
|
|
15258
15288
|
}, [groupingShown]);
|
|
15259
|
-
const nodesInitialized = (0,
|
|
15260
|
-
const groupedOnLoad = (0,
|
|
15261
|
-
(0,
|
|
15289
|
+
const nodesInitialized = (0, import_react113.useNodesInitialized)();
|
|
15290
|
+
const groupedOnLoad = (0, import_react112.useRef)(false);
|
|
15291
|
+
(0, import_react112.useEffect)(() => {
|
|
15262
15292
|
if (!nodesInitialized || groupedOnLoad.current) return;
|
|
15263
15293
|
groupedOnLoad.current = true;
|
|
15264
15294
|
const fromUrl = readGroupFromUrl();
|
|
@@ -15360,7 +15390,7 @@ var NodeGraphBuilder = ({
|
|
|
15360
15390
|
}
|
|
15361
15391
|
) })
|
|
15362
15392
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
15363
|
-
|
|
15393
|
+
import_react113.ReactFlow,
|
|
15364
15394
|
{
|
|
15365
15395
|
nodeTypes,
|
|
15366
15396
|
proOptions: hideAttribution ? HIDE_ATTRIBUTION2 : void 0,
|
|
@@ -15375,7 +15405,7 @@ var NodeGraphBuilder = ({
|
|
|
15375
15405
|
onEdgesChange,
|
|
15376
15406
|
onEdgeMouseEnter: handleEdgeMouseEnter,
|
|
15377
15407
|
onEdgeMouseLeave: handleEdgeMouseLeave,
|
|
15378
|
-
connectionLineType:
|
|
15408
|
+
connectionLineType: import_react113.ConnectionLineType.SmoothStep,
|
|
15379
15409
|
nodeOrigin: NODE_ORIGIN,
|
|
15380
15410
|
elevateNodesOnSelect: false,
|
|
15381
15411
|
onNodeClick: handleNodeClick,
|
|
@@ -15390,7 +15420,7 @@ var NodeGraphBuilder = ({
|
|
|
15390
15420
|
className: `relative${isLayingOut ? " ec-laying-out" : ""}${hasOtherDomains && highlightCrossDomain ? " ec-highlight-cross-domain" : ""}`,
|
|
15391
15421
|
children: [
|
|
15392
15422
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
15393
|
-
|
|
15423
|
+
import_react113.Panel,
|
|
15394
15424
|
{
|
|
15395
15425
|
position: "top-center",
|
|
15396
15426
|
className: "w-full pr-6 pointer-events-none",
|
|
@@ -15512,7 +15542,7 @@ var NodeGraphBuilder = ({
|
|
|
15512
15542
|
}
|
|
15513
15543
|
),
|
|
15514
15544
|
includeBackground && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DiagramBackground_default, {}),
|
|
15515
|
-
includeBackground && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15545
|
+
includeBackground && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react113.Controls, {}),
|
|
15516
15546
|
mode === "full" && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15517
15547
|
CanvasToolbar_default,
|
|
15518
15548
|
{
|
|
@@ -15527,7 +15557,7 @@ var NodeGraphBuilder = ({
|
|
|
15527
15557
|
}
|
|
15528
15558
|
),
|
|
15529
15559
|
showMinimap && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15530
|
-
|
|
15560
|
+
import_react113.MiniMap,
|
|
15531
15561
|
{
|
|
15532
15562
|
nodeStrokeWidth: 3,
|
|
15533
15563
|
zoomable: true,
|
|
@@ -15536,7 +15566,7 @@ var NodeGraphBuilder = ({
|
|
|
15536
15566
|
}
|
|
15537
15567
|
),
|
|
15538
15568
|
swimlaneOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15539
|
-
|
|
15569
|
+
import_react113.Panel,
|
|
15540
15570
|
{
|
|
15541
15571
|
position: "top-right",
|
|
15542
15572
|
style: mode === "full" && showSearch ? SWIMLANE_PICKER_PANEL_STYLE_UNDER_SEARCH : void 0,
|
|
@@ -15553,7 +15583,7 @@ var NodeGraphBuilder = ({
|
|
|
15553
15583
|
}
|
|
15554
15584
|
),
|
|
15555
15585
|
isFlowGraph && showFlowWalkthrough && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(WalkthroughBadges_default, { trail: walkthroughTrail }),
|
|
15556
|
-
isFlowGraph && showFlowWalkthrough && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15586
|
+
isFlowGraph && showFlowWalkthrough && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react113.Panel, { position: "bottom-left", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15557
15587
|
StepWalkthrough_default,
|
|
15558
15588
|
{
|
|
15559
15589
|
nodes: walkthroughNodes,
|
|
@@ -15564,7 +15594,7 @@ var NodeGraphBuilder = ({
|
|
|
15564
15594
|
}
|
|
15565
15595
|
) }),
|
|
15566
15596
|
isDevMode && hasLayoutChanges && !swimlanes && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15567
|
-
|
|
15597
|
+
import_react113.Panel,
|
|
15568
15598
|
{
|
|
15569
15599
|
position: "bottom-left",
|
|
15570
15600
|
style: isFlowGraph && showFlowWalkthrough ? LAYOUT_CHANGE_PANEL_STYLE_WITH_WALKTHROUGH : LAYOUT_CHANGE_PANEL_STYLE_DEFAULT,
|
|
@@ -15728,8 +15758,8 @@ var NodeGraph = ({
|
|
|
15728
15758
|
onResetLayout,
|
|
15729
15759
|
onOpenInStudio
|
|
15730
15760
|
}) => {
|
|
15731
|
-
const [graphLayout, setGraphLayout] = (0,
|
|
15732
|
-
(0,
|
|
15761
|
+
const [graphLayout, setGraphLayout] = (0, import_react112.useState)(null);
|
|
15762
|
+
(0, import_react112.useEffect)(() => {
|
|
15733
15763
|
if (!graph) return setGraphLayout(null);
|
|
15734
15764
|
let current = true;
|
|
15735
15765
|
layoutGraph(graph.nodes, graph.edges, {
|
|
@@ -15743,7 +15773,7 @@ var NodeGraph = ({
|
|
|
15743
15773
|
}, [graph]);
|
|
15744
15774
|
const nodes = graphLayout?.nodes ?? nodesProp ?? NO_NODES;
|
|
15745
15775
|
const edges = graphLayout?.edges ?? edgesProp ?? NO_EDGES;
|
|
15746
|
-
const studioGraphs = (0,
|
|
15776
|
+
const studioGraphs = (0, import_react112.useMemo)(
|
|
15747
15777
|
() => ({
|
|
15748
15778
|
detail: { nodes, edges },
|
|
15749
15779
|
overview: overviewGraph,
|
|
@@ -15755,16 +15785,16 @@ var NodeGraph = ({
|
|
|
15755
15785
|
const includeKey = includeKeyProp !== void 0 ? includeKeyProp : graph?.options?.legend !== false;
|
|
15756
15786
|
const showSearch = showSearchProp !== void 0 ? showSearchProp : graph?.options?.search !== false;
|
|
15757
15787
|
const animated = animatedProp ?? graph?.options?.animated;
|
|
15758
|
-
const [elem, setElem] = (0,
|
|
15759
|
-
const [showFooter, setShowFooter] = (0,
|
|
15788
|
+
const [elem, setElem] = (0, import_react112.useState)(null);
|
|
15789
|
+
const [showFooter, setShowFooter] = (0, import_react112.useState)(true);
|
|
15760
15790
|
const containerToRenderInto = portalId || `${id}-portal`;
|
|
15761
|
-
const [showOverview, setShowOverview] = (0,
|
|
15791
|
+
const [showOverview, setShowOverview] = (0, import_react112.useState)(() => {
|
|
15762
15792
|
if (!overviewGraph) return false;
|
|
15763
15793
|
const level = new URLSearchParams(window.location.search).get("level");
|
|
15764
15794
|
return level === null || level === "1";
|
|
15765
15795
|
});
|
|
15766
|
-
const [transitionFrom, setTransitionFrom] = (0,
|
|
15767
|
-
const handleShowOverview = (0,
|
|
15796
|
+
const [transitionFrom, setTransitionFrom] = (0, import_react112.useState)();
|
|
15797
|
+
const handleShowOverview = (0, import_react112.useCallback)(
|
|
15768
15798
|
(show, from) => {
|
|
15769
15799
|
setTransitionFrom(from);
|
|
15770
15800
|
setShowOverview(show);
|
|
@@ -15773,14 +15803,14 @@ var NodeGraph = ({
|
|
|
15773
15803
|
[]
|
|
15774
15804
|
);
|
|
15775
15805
|
const overview = showOverview ? overviewGraph : void 0;
|
|
15776
|
-
const hiddenLegendKeys = (0,
|
|
15777
|
-
const handleHiddenLegendKeysChange = (0,
|
|
15806
|
+
const hiddenLegendKeys = (0, import_react112.useRef)([]);
|
|
15807
|
+
const handleHiddenLegendKeysChange = (0, import_react112.useCallback)((keys) => {
|
|
15778
15808
|
hiddenLegendKeys.current = keys;
|
|
15779
15809
|
}, []);
|
|
15780
|
-
(0,
|
|
15810
|
+
(0, import_react112.useEffect)(() => {
|
|
15781
15811
|
setElem(document.getElementById(containerToRenderInto));
|
|
15782
15812
|
}, []);
|
|
15783
|
-
(0,
|
|
15813
|
+
(0, import_react112.useEffect)(() => {
|
|
15784
15814
|
const urlParams = new URLSearchParams(window.location.search);
|
|
15785
15815
|
const embed = urlParams.get("embed");
|
|
15786
15816
|
if (embed === "true") {
|
|
@@ -15788,9 +15818,9 @@ var NodeGraph = ({
|
|
|
15788
15818
|
}
|
|
15789
15819
|
}, []);
|
|
15790
15820
|
if (!elem || graph && !graphLayout) return null;
|
|
15791
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: (0,
|
|
15821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: (0, import_react_dom2.createPortal)(
|
|
15792
15822
|
// Remount when switching graphs so each starts from a clean state
|
|
15793
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
15823
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react113.ReactFlowProvider, { children: [
|
|
15794
15824
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15795
15825
|
NodeGraphBuilder,
|
|
15796
15826
|
{
|