@nice2dev/ui-diagrams 1.2.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +376 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +497 -491
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as b, jsx as c, Fragment as Je } from "react/jsx-runtime";
|
|
2
|
-
import { useNiceTranslation as Ot, NiceButton as q, NiceIcon as j, NiceSelect as Ie, NiceNumberInput as Ee, NiceTextInput as st, NiceColorPicker as Le, NiceCheckbox as Ke, NiceSlider as Ze, NiceAppShell as
|
|
3
|
-
import
|
|
4
|
-
class
|
|
2
|
+
import { useNiceTranslation as Ot, NiceButton as q, NiceIcon as j, clickOnActivationKey as Ft, NiceSelect as Ie, NiceNumberInput as Ee, NiceTextInput as st, NiceColorPicker as Le, NiceCheckbox as Ke, NiceSlider as Ze, NiceAppShell as ur, NiceTutorialButton as Wt, resolveTutorial as Lt } from "@nice2dev/ui";
|
|
3
|
+
import qt, { useMemo as se, useContext as hr, createContext as fr, useRef as Ge, useState as te, useCallback as Y, useEffect as Be } from "react";
|
|
4
|
+
class pr {
|
|
5
5
|
constructor(e) {
|
|
6
6
|
this.liquidFlows = /* @__PURE__ */ new Map(), this.glowStates = /* @__PURE__ */ new Map(), this.particles = [], this.emitters = [], this.rafId = 0, this.running = !1, this.lastTime = 0, this.tick = () => {
|
|
7
7
|
if (!this.running)
|
|
@@ -92,7 +92,7 @@ class fr {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function Ma(i, e, t) {
|
|
96
96
|
if (!t)
|
|
97
97
|
return { x: 0, y: 0 };
|
|
98
98
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -104,10 +104,10 @@ function za(i, e, t) {
|
|
|
104
104
|
t.removeChild(r);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function gr(i) {
|
|
108
108
|
return `nd-glow-${i.replace(/[^a-zA-Z0-9]/g, "_")}`;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function mr(i, e) {
|
|
111
111
|
const t = i * 12, r = 1 + Math.sin(e) * 0.3;
|
|
112
112
|
return t * r;
|
|
113
113
|
}
|
|
@@ -170,7 +170,7 @@ function It(i, e) {
|
|
|
170
170
|
return u.push("</g>"), u.push("</svg>"), u.join(`
|
|
171
171
|
`);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function yr(i) {
|
|
174
174
|
const e = [], t = i.diagramType === "orgchart" || i.diagramType === "mindmap" ? "graph TB" : i.diagramType === "stateMachine" ? "stateDiagram-v2" : "flowchart TD";
|
|
175
175
|
e.push(t);
|
|
176
176
|
for (const r of i.nodes) {
|
|
@@ -1014,20 +1014,20 @@ const wt = {
|
|
|
1014
1014
|
"orgChartVisualizer.organizationChart": "Organigrama",
|
|
1015
1015
|
"processMiningDiagram.processMiningDiagram": "Diagrama de minería de procesos"
|
|
1016
1016
|
}
|
|
1017
|
-
},
|
|
1018
|
-
function
|
|
1017
|
+
}, Vt = /* @__PURE__ */ fr(null);
|
|
1018
|
+
function Gt(i, e) {
|
|
1019
1019
|
const t = { ...wt.en, ...wt[i], ...e };
|
|
1020
1020
|
return { locale: i, t: (o, a) => t[o] ?? a ?? o };
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1023
|
-
const r = se(() =>
|
|
1024
|
-
return
|
|
1022
|
+
function Bt({ locale: i = "en", overrides: e, children: t }) {
|
|
1023
|
+
const r = se(() => Gt(i, e), [i, e]);
|
|
1024
|
+
return qt.createElement(Vt.Provider, { value: r }, t);
|
|
1025
1025
|
}
|
|
1026
1026
|
function Ne() {
|
|
1027
|
-
const i =
|
|
1027
|
+
const i = hr(Vt), { lang: e } = Ot(), t = wt[e] ? e : "en", r = se(() => Gt(t), [t]);
|
|
1028
1028
|
return i ?? r;
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1030
|
+
function Sa(i) {
|
|
1031
1031
|
const e = [];
|
|
1032
1032
|
let t;
|
|
1033
1033
|
try {
|
|
@@ -1045,7 +1045,7 @@ function Ma(i) {
|
|
|
1045
1045
|
}
|
|
1046
1046
|
return e.length > 0 ? { ok: !1, errors: e } : { ok: !0, document: t, errors: [] };
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1048
|
+
function br(i, e = !0) {
|
|
1049
1049
|
return JSON.stringify(i, null, e ? 2 : void 0);
|
|
1050
1050
|
}
|
|
1051
1051
|
class xt {
|
|
@@ -1121,7 +1121,7 @@ class xt {
|
|
|
1121
1121
|
// ── Node operations ──────────────────────────────────────────
|
|
1122
1122
|
addNode(e, t, r = "roundedRect", o = { width: 160, height: 60 }) {
|
|
1123
1123
|
this.pushUndo("Add node");
|
|
1124
|
-
const a =
|
|
1124
|
+
const a = vr(), s = {
|
|
1125
1125
|
id: qe(),
|
|
1126
1126
|
label: e,
|
|
1127
1127
|
position: t,
|
|
@@ -1305,7 +1305,7 @@ class xt {
|
|
|
1305
1305
|
function qe() {
|
|
1306
1306
|
return `ndd_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function vr() {
|
|
1309
1309
|
return [
|
|
1310
1310
|
{ id: "top", side: "top", offset: 0.5 },
|
|
1311
1311
|
{ id: "right", side: "right", offset: 0.5 },
|
|
@@ -1313,24 +1313,24 @@ function br() {
|
|
|
1313
1313
|
{ id: "left", side: "left", offset: 0.5 }
|
|
1314
1314
|
];
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1316
|
+
function wr(i, e, t) {
|
|
1317
1317
|
switch (t.algorithm) {
|
|
1318
1318
|
case "dagre":
|
|
1319
|
-
return
|
|
1319
|
+
return jt(i, e, t);
|
|
1320
1320
|
case "grid":
|
|
1321
|
-
return
|
|
1321
|
+
return xr(i, t);
|
|
1322
1322
|
case "radial":
|
|
1323
|
-
return
|
|
1323
|
+
return kr(i, e);
|
|
1324
1324
|
case "tree":
|
|
1325
|
-
return kr(i, e, t);
|
|
1326
|
-
case "forceDirected":
|
|
1327
1325
|
return Cr(i, e, t);
|
|
1326
|
+
case "forceDirected":
|
|
1327
|
+
return _r(i, e, t);
|
|
1328
1328
|
case "manual":
|
|
1329
1329
|
default:
|
|
1330
1330
|
return { positions: new Map(i.map((r) => [r.id, { ...r.position }])) };
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1333
|
+
function jt(i, e, t) {
|
|
1334
1334
|
const r = t.direction ?? "TB", o = t.nodeSpacing ?? 60, a = t.rankSpacing ?? 100, s = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), l = new Set(i.map((m) => m.id));
|
|
1335
1335
|
i.forEach((m) => {
|
|
1336
1336
|
s.set(m.id, []), n.set(m.id, []);
|
|
@@ -1369,7 +1369,7 @@ function Bt(i, e, t) {
|
|
|
1369
1369
|
});
|
|
1370
1370
|
}), t.centerGraph && kt(u), { positions: u };
|
|
1371
1371
|
}
|
|
1372
|
-
function
|
|
1372
|
+
function xr(i, e) {
|
|
1373
1373
|
const t = e.nodeSpacing ?? 80, r = Math.ceil(Math.sqrt(i.length)), o = /* @__PURE__ */ new Map();
|
|
1374
1374
|
return i.forEach((a, s) => {
|
|
1375
1375
|
const n = s % r, l = Math.floor(s / r);
|
|
@@ -1379,7 +1379,7 @@ function wr(i, e) {
|
|
|
1379
1379
|
});
|
|
1380
1380
|
}), e.centerGraph && kt(o), { positions: o };
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1382
|
+
function kr(i, e) {
|
|
1383
1383
|
const t = /* @__PURE__ */ new Map();
|
|
1384
1384
|
if (i.length === 0)
|
|
1385
1385
|
return { positions: t };
|
|
@@ -1400,15 +1400,15 @@ function xr(i, e) {
|
|
|
1400
1400
|
});
|
|
1401
1401
|
}), { positions: t };
|
|
1402
1402
|
}
|
|
1403
|
-
function
|
|
1404
|
-
return
|
|
1403
|
+
function Cr(i, e, t) {
|
|
1404
|
+
return jt(i, e, {
|
|
1405
1405
|
...t,
|
|
1406
1406
|
direction: t.direction ?? "TB",
|
|
1407
1407
|
nodeSpacing: t.nodeSpacing ?? 40,
|
|
1408
1408
|
rankSpacing: t.rankSpacing ?? 80
|
|
1409
1409
|
});
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1411
|
+
function _r(i, e, t) {
|
|
1412
1412
|
const r = /* @__PURE__ */ new Map();
|
|
1413
1413
|
if (i.length === 0)
|
|
1414
1414
|
return { positions: r };
|
|
@@ -1463,14 +1463,14 @@ function kt(i) {
|
|
|
1463
1463
|
n.x -= a, n.y -= s;
|
|
1464
1464
|
});
|
|
1465
1465
|
}
|
|
1466
|
-
function
|
|
1466
|
+
function zr(i) {
|
|
1467
1467
|
const e = Ge(null);
|
|
1468
1468
|
e.current || (e.current = new xt(i));
|
|
1469
1469
|
const t = e.current, [, r] = te(0), o = Y(() => r((n) => n + 1), []);
|
|
1470
1470
|
Be(() => t.subscribe(o), [t, o]);
|
|
1471
1471
|
const a = t.getDocument(), s = Y(
|
|
1472
1472
|
(n) => {
|
|
1473
|
-
|
|
1473
|
+
wr(t.getNodes(), t.getEdges(), n).positions.forEach((h, d) => {
|
|
1474
1474
|
t.moveNode(d, h);
|
|
1475
1475
|
});
|
|
1476
1476
|
},
|
|
@@ -1546,7 +1546,7 @@ function ge(i) {
|
|
|
1546
1546
|
...i
|
|
1547
1547
|
};
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function Mr(i, e = {}) {
|
|
1550
1550
|
return {
|
|
1551
1551
|
backgroundColor: i.surface,
|
|
1552
1552
|
borderColor: i.primary,
|
|
@@ -1560,7 +1560,7 @@ function zr(i, e = {}) {
|
|
|
1560
1560
|
...e
|
|
1561
1561
|
};
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function Sr(i, e = {}) {
|
|
1564
1564
|
return {
|
|
1565
1565
|
strokeColor: i.border,
|
|
1566
1566
|
strokeWidth: 2,
|
|
@@ -1569,7 +1569,7 @@ function Mr(i, e = {}) {
|
|
|
1569
1569
|
...e
|
|
1570
1570
|
};
|
|
1571
1571
|
}
|
|
1572
|
-
function
|
|
1572
|
+
function Ar(i, e = {}) {
|
|
1573
1573
|
return {
|
|
1574
1574
|
backgroundColor: `${i.primaryLight}18`,
|
|
1575
1575
|
borderColor: i.primaryLight,
|
|
@@ -1584,15 +1584,15 @@ function Sr(i, e = {}) {
|
|
|
1584
1584
|
function me(i, e, t, r, o, a, s) {
|
|
1585
1585
|
return {
|
|
1586
1586
|
canvas: i,
|
|
1587
|
-
nodeDefaults:
|
|
1588
|
-
edgeDefaults:
|
|
1589
|
-
groupDefaults:
|
|
1587
|
+
nodeDefaults: Mr(e, r),
|
|
1588
|
+
edgeDefaults: Sr(e, o),
|
|
1589
|
+
groupDefaults: Ar(e, a),
|
|
1590
1590
|
fontFamily: t,
|
|
1591
1591
|
palette: e,
|
|
1592
1592
|
effects: s
|
|
1593
1593
|
};
|
|
1594
1594
|
}
|
|
1595
|
-
const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code', monospace",
|
|
1595
|
+
const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code', monospace", Ir = "'Merriweather', 'Georgia', serif", Nr = {
|
|
1596
1596
|
id: "default-light",
|
|
1597
1597
|
name: "Default Light",
|
|
1598
1598
|
category: "corporate",
|
|
@@ -1607,7 +1607,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1607
1607
|
ge({}),
|
|
1608
1608
|
De
|
|
1609
1609
|
)
|
|
1610
|
-
},
|
|
1610
|
+
}, Dr = /* @__PURE__ */ ge({
|
|
1611
1611
|
primary: "var(--nice-primary-light, #60a5fa)",
|
|
1612
1612
|
primaryLight: "var(--nice-primary, #3b82f6)",
|
|
1613
1613
|
secondary: "var(--nice-accent, #818cf8)",
|
|
@@ -1621,7 +1621,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1621
1621
|
border: "var(--nice-border-color, #334155)",
|
|
1622
1622
|
surface: "var(--nice-bg-secondary, #1e293b)",
|
|
1623
1623
|
surfaceAlt: "var(--nice-bg-primary, #0f172a)"
|
|
1624
|
-
}),
|
|
1624
|
+
}), $r = {
|
|
1625
1625
|
id: "default-dark",
|
|
1626
1626
|
name: "Default Dark",
|
|
1627
1627
|
category: "dark",
|
|
@@ -1633,13 +1633,13 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1633
1633
|
gridSize: 20,
|
|
1634
1634
|
selectionColor: "var(--nice-primary-light, #60a5fa)"
|
|
1635
1635
|
},
|
|
1636
|
-
|
|
1636
|
+
Dr,
|
|
1637
1637
|
De,
|
|
1638
1638
|
{ shadow: !1 },
|
|
1639
1639
|
{ strokeColor: "var(--nice-text-secondary, #475569)" },
|
|
1640
1640
|
{ backgroundColor: "#60a5fa10", borderColor: "#3b82f680" }
|
|
1641
1641
|
)
|
|
1642
|
-
},
|
|
1642
|
+
}, Tr = /* @__PURE__ */ ge({
|
|
1643
1643
|
primary: "var(--nice-primary-dark, #1d4ed8)",
|
|
1644
1644
|
primaryLight: "var(--nice-primary-light, #93c5fd)",
|
|
1645
1645
|
secondary: "var(--nice-primary, #3b82f6)",
|
|
@@ -1648,7 +1648,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1648
1648
|
border: "var(--nice-primary-light, #93c5fd)",
|
|
1649
1649
|
surface: "var(--nice-primary-bg, #eff6ff)",
|
|
1650
1650
|
surfaceAlt: "var(--nice-primary-bg, #dbeafe)"
|
|
1651
|
-
}),
|
|
1651
|
+
}), Pr = {
|
|
1652
1652
|
id: "corporate-blue",
|
|
1653
1653
|
name: "Corporate Blue",
|
|
1654
1654
|
category: "corporate",
|
|
@@ -1660,12 +1660,12 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1660
1660
|
gridSize: 20,
|
|
1661
1661
|
selectionColor: "var(--nice-primary-dark, #1d4ed8)"
|
|
1662
1662
|
},
|
|
1663
|
-
|
|
1663
|
+
Tr,
|
|
1664
1664
|
De,
|
|
1665
1665
|
{ borderWidth: 2, borderRadius: 6 },
|
|
1666
1666
|
{ strokeColor: "var(--nice-primary-light, #93c5fd)", strokeWidth: 2 }
|
|
1667
1667
|
)
|
|
1668
|
-
},
|
|
1668
|
+
}, Rr = /* @__PURE__ */ ge({
|
|
1669
1669
|
primary: "var(--nice-success, #00ff88)",
|
|
1670
1670
|
primaryLight: "#00cc6b",
|
|
1671
1671
|
secondary: "#ff00ff",
|
|
@@ -1679,7 +1679,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1679
1679
|
border: "#00ff8840",
|
|
1680
1680
|
surface: "var(--nice-bg, #1a1a2e)",
|
|
1681
1681
|
surfaceAlt: "var(--nice-bg, #16213e)"
|
|
1682
|
-
}),
|
|
1682
|
+
}), Er = {
|
|
1683
1683
|
id: "neon-glow",
|
|
1684
1684
|
name: "Neon Glow",
|
|
1685
1685
|
category: "dark",
|
|
@@ -1690,7 +1690,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1690
1690
|
gridSize: 20,
|
|
1691
1691
|
selectionColor: "var(--nice-success, #00ff88)"
|
|
1692
1692
|
},
|
|
1693
|
-
|
|
1693
|
+
Rr,
|
|
1694
1694
|
Ct,
|
|
1695
1695
|
{
|
|
1696
1696
|
borderColor: "var(--nice-success, #00ff88)",
|
|
@@ -1709,7 +1709,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1709
1709
|
liquidColorEnd: "var(--nice-info, #00ffff)"
|
|
1710
1710
|
}
|
|
1711
1711
|
)
|
|
1712
|
-
},
|
|
1712
|
+
}, Or = /* @__PURE__ */ ge({
|
|
1713
1713
|
primary: "var(--nice-color-accent-pink, #ff2d95)",
|
|
1714
1714
|
primaryLight: "#ff6db6",
|
|
1715
1715
|
secondary: "#7928ca",
|
|
@@ -1723,7 +1723,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1723
1723
|
border: "#ff2d9540",
|
|
1724
1724
|
surface: "#1a0030",
|
|
1725
1725
|
surfaceAlt: "#2d004a"
|
|
1726
|
-
}),
|
|
1726
|
+
}), Fr = {
|
|
1727
1727
|
id: "cyberpunk",
|
|
1728
1728
|
name: "Cyberpunk",
|
|
1729
1729
|
category: "dark",
|
|
@@ -1734,7 +1734,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1734
1734
|
gridSize: 24,
|
|
1735
1735
|
selectionColor: "var(--nice-color-accent-pink, #ff2d95)"
|
|
1736
1736
|
},
|
|
1737
|
-
|
|
1737
|
+
Or,
|
|
1738
1738
|
Ct,
|
|
1739
1739
|
{
|
|
1740
1740
|
borderColor: "var(--nice-color-accent-pink, #ff2d95)",
|
|
@@ -1755,7 +1755,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1755
1755
|
liquidColorEnd: "#7928ca"
|
|
1756
1756
|
}
|
|
1757
1757
|
)
|
|
1758
|
-
},
|
|
1758
|
+
}, Wr = /* @__PURE__ */ ge({
|
|
1759
1759
|
primary: "var(--nice-bg, #fff)",
|
|
1760
1760
|
primaryLight: "#ffffffaa",
|
|
1761
1761
|
secondary: "#4da6ff",
|
|
@@ -1765,7 +1765,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1765
1765
|
border: "#ffffff40",
|
|
1766
1766
|
surface: "#1e3d6e",
|
|
1767
1767
|
surfaceAlt: "#163050"
|
|
1768
|
-
}),
|
|
1768
|
+
}), Lr = {
|
|
1769
1769
|
id: "blueprint",
|
|
1770
1770
|
name: "Technical Blueprint",
|
|
1771
1771
|
category: "technical",
|
|
@@ -1776,7 +1776,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1776
1776
|
gridSize: 16,
|
|
1777
1777
|
selectionColor: "var(--nice-color-white, #fff)"
|
|
1778
1778
|
},
|
|
1779
|
-
|
|
1779
|
+
Wr,
|
|
1780
1780
|
Ct,
|
|
1781
1781
|
{
|
|
1782
1782
|
backgroundColor: "transparent",
|
|
@@ -1794,7 +1794,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1794
1794
|
borderWidth: 1
|
|
1795
1795
|
}
|
|
1796
1796
|
)
|
|
1797
|
-
},
|
|
1797
|
+
}, qr = /* @__PURE__ */ ge({
|
|
1798
1798
|
primary: "var(--nice-accent, #a78bfa)",
|
|
1799
1799
|
primaryLight: "var(--nice-accent, #c4b5fd)",
|
|
1800
1800
|
secondary: "var(--nice-color-accent-pink, #f472b6)",
|
|
@@ -1808,7 +1808,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1808
1808
|
border: "#e2d8f4",
|
|
1809
1809
|
surface: "#faf5ff",
|
|
1810
1810
|
surfaceAlt: "#f3e8ff"
|
|
1811
|
-
}),
|
|
1811
|
+
}), Vr = {
|
|
1812
1812
|
id: "pastel-dream",
|
|
1813
1813
|
name: "Pastel Dream",
|
|
1814
1814
|
category: "pastel",
|
|
@@ -1819,13 +1819,13 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1819
1819
|
gridSize: 20,
|
|
1820
1820
|
selectionColor: "var(--nice-accent, #a78bfa)"
|
|
1821
1821
|
},
|
|
1822
|
-
|
|
1822
|
+
qr,
|
|
1823
1823
|
"'Nunito', 'Quicksand', sans-serif",
|
|
1824
1824
|
{ borderColor: "var(--nice-accent, #c4b5fd)", borderWidth: 2, borderRadius: 16, shadow: !0 },
|
|
1825
1825
|
{ strokeColor: "var(--nice-accent, #c4b5fd)", strokeWidth: 2 },
|
|
1826
1826
|
{ backgroundColor: "#a78bfa10", borderColor: "var(--nice-accent, #c4b5fd)", borderRadius: 16 }
|
|
1827
1827
|
)
|
|
1828
|
-
},
|
|
1828
|
+
}, Gr = /* @__PURE__ */ ge({
|
|
1829
1829
|
primary: "var(--nice-success, #059669)",
|
|
1830
1830
|
primaryLight: "var(--nice-success-light, #6ee7b7)",
|
|
1831
1831
|
secondary: "#065f46",
|
|
@@ -1839,7 +1839,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1839
1839
|
border: "#a7d7c5",
|
|
1840
1840
|
surface: "#ecfdf5",
|
|
1841
1841
|
surfaceAlt: "#d1fae5"
|
|
1842
|
-
}),
|
|
1842
|
+
}), Br = {
|
|
1843
1843
|
id: "nature-forest",
|
|
1844
1844
|
name: "Nature Forest",
|
|
1845
1845
|
category: "nature",
|
|
@@ -1850,7 +1850,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1850
1850
|
gridSize: 20,
|
|
1851
1851
|
selectionColor: "var(--nice-success, #059669)"
|
|
1852
1852
|
},
|
|
1853
|
-
|
|
1853
|
+
Gr,
|
|
1854
1854
|
De,
|
|
1855
1855
|
{ borderColor: "var(--nice-success, #059669)", borderRadius: 12 },
|
|
1856
1856
|
{ strokeColor: "var(--nice-success-light, #6ee7b7)" },
|
|
@@ -1861,7 +1861,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1861
1861
|
particleColor: "var(--nice-warning, #f59e0b)"
|
|
1862
1862
|
}
|
|
1863
1863
|
)
|
|
1864
|
-
},
|
|
1864
|
+
}, jr = /* @__PURE__ */ ge({
|
|
1865
1865
|
primary: "var(--nice-success, #00ff00)",
|
|
1866
1866
|
primaryLight: "#00cc00",
|
|
1867
1867
|
secondary: "var(--nice-success, #00ff00)",
|
|
@@ -1871,7 +1871,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1871
1871
|
border: "#00ff0040",
|
|
1872
1872
|
surface: "#001100",
|
|
1873
1873
|
surfaceAlt: "#002200"
|
|
1874
|
-
}),
|
|
1874
|
+
}), Yr = {
|
|
1875
1875
|
id: "retro-terminal",
|
|
1876
1876
|
name: "Retro Terminal",
|
|
1877
1877
|
category: "retro",
|
|
@@ -1882,7 +1882,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1882
1882
|
gridSize: 16,
|
|
1883
1883
|
selectionColor: "var(--nice-success, #00ff00)"
|
|
1884
1884
|
},
|
|
1885
|
-
|
|
1885
|
+
jr,
|
|
1886
1886
|
"'Courier New', 'Fira Code', monospace",
|
|
1887
1887
|
{
|
|
1888
1888
|
backgroundColor: "#001100",
|
|
@@ -1902,7 +1902,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1902
1902
|
liquidColor: "var(--nice-success, #00ff00)"
|
|
1903
1903
|
}
|
|
1904
1904
|
)
|
|
1905
|
-
},
|
|
1905
|
+
}, Hr = /* @__PURE__ */ ge({
|
|
1906
1906
|
primary: "#0000ff",
|
|
1907
1907
|
primaryLight: "#6666ff",
|
|
1908
1908
|
secondary: "#ff00ff",
|
|
@@ -1912,7 +1912,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1912
1912
|
border: "var(--nice-border-color, #000000)",
|
|
1913
1913
|
surface: "var(--nice-bg, #fff)",
|
|
1914
1914
|
surfaceAlt: "var(--nice-border, #eeeeee)"
|
|
1915
|
-
}),
|
|
1915
|
+
}), Ur = {
|
|
1916
1916
|
id: "high-contrast",
|
|
1917
1917
|
name: "High Contrast",
|
|
1918
1918
|
category: "accessibility",
|
|
@@ -1924,7 +1924,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1924
1924
|
gridSize: 20,
|
|
1925
1925
|
selectionColor: "#0000ff"
|
|
1926
1926
|
},
|
|
1927
|
-
|
|
1927
|
+
Hr,
|
|
1928
1928
|
"Arial, sans-serif",
|
|
1929
1929
|
{
|
|
1930
1930
|
borderColor: "var(--nice-border-color, #000000)",
|
|
@@ -1935,7 +1935,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1935
1935
|
{ strokeColor: "var(--nice-text, #000000)", strokeWidth: 3 },
|
|
1936
1936
|
{ borderColor: "var(--nice-border-color, #000000)", borderWidth: 2 }
|
|
1937
1937
|
)
|
|
1938
|
-
},
|
|
1938
|
+
}, Xr = /* @__PURE__ */ ge({
|
|
1939
1939
|
primary: "var(--nice-primary-hover, #1976d2)",
|
|
1940
1940
|
primaryLight: "#64b5f6",
|
|
1941
1941
|
secondary: "var(--nice-accent, #9c27b0)",
|
|
@@ -1949,7 +1949,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1949
1949
|
border: "var(--nice-border, #e0e0e0)",
|
|
1950
1950
|
surface: "var(--nice-bg-secondary, #fafafa)",
|
|
1951
1951
|
surfaceAlt: "var(--nice-bg-secondary, #f5f5f5)"
|
|
1952
|
-
}),
|
|
1952
|
+
}), Kr = {
|
|
1953
1953
|
id: "material-design",
|
|
1954
1954
|
name: "Material Design",
|
|
1955
1955
|
category: "theme-based",
|
|
@@ -1961,13 +1961,13 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1961
1961
|
gridSize: 20,
|
|
1962
1962
|
selectionColor: "var(--nice-primary-hover, #1976d2)"
|
|
1963
1963
|
},
|
|
1964
|
-
|
|
1964
|
+
Xr,
|
|
1965
1965
|
"'Roboto', 'Noto Sans', sans-serif",
|
|
1966
1966
|
{ borderRadius: 4, borderWidth: 0, shadow: !0 },
|
|
1967
1967
|
{ strokeColor: "#bdbdbd", strokeWidth: 2 },
|
|
1968
1968
|
{ borderRadius: 8 }
|
|
1969
1969
|
)
|
|
1970
|
-
},
|
|
1970
|
+
}, Zr = /* @__PURE__ */ ge({
|
|
1971
1971
|
primary: "#0078d4",
|
|
1972
1972
|
primaryLight: "#6cb8f7",
|
|
1973
1973
|
secondary: "#8661c5",
|
|
@@ -1981,19 +1981,19 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
1981
1981
|
border: "#edebe9",
|
|
1982
1982
|
surface: "var(--nice-bg, #fff)",
|
|
1983
1983
|
surfaceAlt: "#faf9f8"
|
|
1984
|
-
}),
|
|
1984
|
+
}), Jr = {
|
|
1985
1985
|
id: "fluent-ui",
|
|
1986
1986
|
name: "Fluent UI",
|
|
1987
1987
|
category: "theme-based",
|
|
1988
1988
|
themeSource: "Fluent",
|
|
1989
1989
|
config: me(
|
|
1990
1990
|
{ background: "#faf9f8", gridColor: "#edebe920", gridSize: 20, selectionColor: "#0078d4" },
|
|
1991
|
-
|
|
1991
|
+
Zr,
|
|
1992
1992
|
"'Segoe UI', system-ui, sans-serif",
|
|
1993
1993
|
{ borderRadius: 4, borderWidth: 1, shadow: !0 },
|
|
1994
1994
|
{ strokeColor: "#c8c6c4", strokeWidth: 1 }
|
|
1995
1995
|
)
|
|
1996
|
-
},
|
|
1996
|
+
}, Qr = /* @__PURE__ */ ge({
|
|
1997
1997
|
primary: "var(--nice-warning-dark, #e65100)",
|
|
1998
1998
|
primaryLight: "#ff9e80",
|
|
1999
1999
|
secondary: "#ff6f00",
|
|
@@ -2007,7 +2007,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2007
2007
|
border: "#ffccbc",
|
|
2008
2008
|
surface: "#fff8e1",
|
|
2009
2009
|
surfaceAlt: "var(--nice-warning-bg, #fff3e0)"
|
|
2010
|
-
}),
|
|
2010
|
+
}), ei = {
|
|
2011
2011
|
id: "sunset-warm",
|
|
2012
2012
|
name: "Sunset Warm",
|
|
2013
2013
|
category: "creative",
|
|
@@ -2018,7 +2018,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2018
2018
|
gridSize: 20,
|
|
2019
2019
|
selectionColor: "var(--nice-warning-dark, #e65100)"
|
|
2020
2020
|
},
|
|
2021
|
-
|
|
2021
|
+
Qr,
|
|
2022
2022
|
De,
|
|
2023
2023
|
{
|
|
2024
2024
|
borderColor: "#ff9e80",
|
|
@@ -2033,7 +2033,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2033
2033
|
particleColor: "#ffd600"
|
|
2034
2034
|
}
|
|
2035
2035
|
)
|
|
2036
|
-
},
|
|
2036
|
+
}, ti = /* @__PURE__ */ ge({
|
|
2037
2037
|
primary: "#006064",
|
|
2038
2038
|
primaryLight: "#4dd0e1",
|
|
2039
2039
|
secondary: "#00838f",
|
|
@@ -2047,20 +2047,20 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2047
2047
|
border: "#b2ebf2",
|
|
2048
2048
|
surface: "#e0f7fa",
|
|
2049
2049
|
surfaceAlt: "#b2ebf2"
|
|
2050
|
-
}),
|
|
2050
|
+
}), ri = {
|
|
2051
2051
|
id: "ocean-deep",
|
|
2052
2052
|
name: "Ocean Deep",
|
|
2053
2053
|
category: "nature",
|
|
2054
2054
|
config: me(
|
|
2055
2055
|
{ background: "#e0f7fa", gridColor: "#b2ebf220", gridSize: 20, selectionColor: "#006064" },
|
|
2056
|
-
|
|
2056
|
+
ti,
|
|
2057
2057
|
De,
|
|
2058
2058
|
{ borderColor: "#00838f", borderRadius: 12 },
|
|
2059
2059
|
{ strokeColor: "#4dd0e1" },
|
|
2060
2060
|
{},
|
|
2061
2061
|
{ liquidColor: "#006064", liquidColorEnd: "#4dd0e1", particleColor: "#ffd54f" }
|
|
2062
2062
|
)
|
|
2063
|
-
},
|
|
2063
|
+
}, ii = /* @__PURE__ */ ge({
|
|
2064
2064
|
primary: "#5d4037",
|
|
2065
2065
|
primaryLight: "#a1887f",
|
|
2066
2066
|
secondary: "#795548",
|
|
@@ -2070,19 +2070,19 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2070
2070
|
border: "#bcaaa4",
|
|
2071
2071
|
surface: "#fdf6f0",
|
|
2072
2072
|
surfaceAlt: "#efebe9"
|
|
2073
|
-
}),
|
|
2073
|
+
}), oi = {
|
|
2074
2074
|
id: "elegant-serif",
|
|
2075
2075
|
name: "Elegant Serif",
|
|
2076
2076
|
category: "creative",
|
|
2077
2077
|
config: me(
|
|
2078
2078
|
{ background: "#fdf6f0", gridColor: "#bcaaa420", gridSize: 24, selectionColor: "#5d4037" },
|
|
2079
|
-
|
|
2080
|
-
|
|
2079
|
+
ii,
|
|
2080
|
+
Ir,
|
|
2081
2081
|
{ borderColor: "#a1887f", borderWidth: 1, borderRadius: 2, fontStyle: "normal" },
|
|
2082
2082
|
{ strokeColor: "#bcaaa4", strokeWidth: 1 },
|
|
2083
2083
|
{ borderRadius: 4 }
|
|
2084
2084
|
)
|
|
2085
|
-
},
|
|
2085
|
+
}, ai = /* @__PURE__ */ ge({
|
|
2086
2086
|
primary: "var(--nice-text, #333333)",
|
|
2087
2087
|
primaryLight: "var(--nice-text-secondary, #666666)",
|
|
2088
2088
|
secondary: "var(--nice-text-secondary, #555555)",
|
|
@@ -2092,7 +2092,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2092
2092
|
border: "var(--nice-border, #cccccc)",
|
|
2093
2093
|
surface: "var(--nice-bg, #fff)",
|
|
2094
2094
|
surfaceAlt: "var(--nice-bg-secondary, #f5f5f5)"
|
|
2095
|
-
}),
|
|
2095
|
+
}), ni = {
|
|
2096
2096
|
id: "wireframe",
|
|
2097
2097
|
name: "Wireframe",
|
|
2098
2098
|
category: "technical",
|
|
@@ -2103,7 +2103,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2103
2103
|
gridSize: 16,
|
|
2104
2104
|
selectionColor: "#ff6600"
|
|
2105
2105
|
},
|
|
2106
|
-
|
|
2106
|
+
ai,
|
|
2107
2107
|
"'Balsamiq Sans', 'Comic Sans MS', cursive",
|
|
2108
2108
|
{
|
|
2109
2109
|
backgroundColor: "transparent",
|
|
@@ -2121,7 +2121,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2121
2121
|
borderColor: "var(--nice-border, #cccccc)"
|
|
2122
2122
|
}
|
|
2123
2123
|
)
|
|
2124
|
-
},
|
|
2124
|
+
}, si = /* @__PURE__ */ ge({
|
|
2125
2125
|
primary: "#00bfa5",
|
|
2126
2126
|
primaryLight: "#64ffda",
|
|
2127
2127
|
secondary: "#00897b",
|
|
@@ -2135,7 +2135,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2135
2135
|
border: "#a7ffeb",
|
|
2136
2136
|
surface: "#e0f2f1",
|
|
2137
2137
|
surfaceAlt: "#b2dfdb"
|
|
2138
|
-
}),
|
|
2138
|
+
}), li = {
|
|
2139
2139
|
id: "mint-fresh",
|
|
2140
2140
|
name: "Mint Fresh",
|
|
2141
2141
|
category: "nature",
|
|
@@ -2146,7 +2146,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2146
2146
|
gridSize: 20,
|
|
2147
2147
|
selectionColor: "#00bfa5"
|
|
2148
2148
|
},
|
|
2149
|
-
|
|
2149
|
+
si,
|
|
2150
2150
|
De,
|
|
2151
2151
|
{
|
|
2152
2152
|
borderColor: "#00bfa5",
|
|
@@ -2159,7 +2159,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2159
2159
|
{ borderRadius: 16 },
|
|
2160
2160
|
{ liquidColor: "#00bfa5", liquidColorEnd: "#64ffda", particleColor: "#ff6e40" }
|
|
2161
2161
|
)
|
|
2162
|
-
},
|
|
2162
|
+
}, ci = /* @__PURE__ */ ge({
|
|
2163
2163
|
primary: "#424242",
|
|
2164
2164
|
primaryLight: "var(--nice-text-secondary, #9e9e9e)",
|
|
2165
2165
|
secondary: "#616161",
|
|
@@ -2169,7 +2169,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2169
2169
|
border: "var(--nice-border, #e0e0e0)",
|
|
2170
2170
|
surface: "var(--nice-bg-secondary, #fafafa)",
|
|
2171
2171
|
surfaceAlt: "var(--nice-bg-secondary, #f5f5f5)"
|
|
2172
|
-
}),
|
|
2172
|
+
}), di = {
|
|
2173
2173
|
id: "monochrome",
|
|
2174
2174
|
name: "Monochrome",
|
|
2175
2175
|
category: "corporate",
|
|
@@ -2180,7 +2180,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2180
2180
|
gridSize: 20,
|
|
2181
2181
|
selectionColor: "#424242"
|
|
2182
2182
|
},
|
|
2183
|
-
|
|
2183
|
+
ci,
|
|
2184
2184
|
De,
|
|
2185
2185
|
{
|
|
2186
2186
|
borderColor: "var(--nice-border-color, #9e9e9e)",
|
|
@@ -2190,7 +2190,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2190
2190
|
},
|
|
2191
2191
|
{ strokeColor: "var(--nice-text-secondary, #9e9e9e)", strokeWidth: 1.5 }
|
|
2192
2192
|
)
|
|
2193
|
-
},
|
|
2193
|
+
}, ui = /* @__PURE__ */ ge({
|
|
2194
2194
|
primary: "var(--nice-color-accent-pink, #e91e63)",
|
|
2195
2195
|
primaryLight: "#f48fb1",
|
|
2196
2196
|
secondary: "var(--nice-accent, #9c27b0)",
|
|
@@ -2204,7 +2204,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2204
2204
|
border: "#f8bbd0",
|
|
2205
2205
|
surface: "#fce4ec",
|
|
2206
2206
|
surfaceAlt: "#f3e5f5"
|
|
2207
|
-
}),
|
|
2207
|
+
}), hi = {
|
|
2208
2208
|
id: "candy-pop",
|
|
2209
2209
|
name: "Candy Pop",
|
|
2210
2210
|
category: "creative",
|
|
@@ -2215,7 +2215,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2215
2215
|
gridSize: 20,
|
|
2216
2216
|
selectionColor: "var(--nice-color-accent-pink, #e91e63)"
|
|
2217
2217
|
},
|
|
2218
|
-
|
|
2218
|
+
ui,
|
|
2219
2219
|
"'Quicksand', 'Nunito', sans-serif",
|
|
2220
2220
|
{
|
|
2221
2221
|
borderColor: "var(--nice-color-accent-pink, #e91e63)",
|
|
@@ -2232,7 +2232,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2232
2232
|
particleColor: "var(--nice-warning, #ffeb3b)"
|
|
2233
2233
|
}
|
|
2234
2234
|
)
|
|
2235
|
-
},
|
|
2235
|
+
}, fi = /* @__PURE__ */ ge({
|
|
2236
2236
|
primary: "var(--nice-text-secondary, #475569)",
|
|
2237
2237
|
primaryLight: "var(--nice-text-muted, #94a3b8)",
|
|
2238
2238
|
secondary: "var(--nice-text, #334155)",
|
|
@@ -2242,7 +2242,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2242
2242
|
border: "var(--nice-border, #cbd5e1)",
|
|
2243
2243
|
surface: "var(--nice-bg-secondary, #f8fafc)",
|
|
2244
2244
|
surfaceAlt: "var(--nice-bg-secondary, #f1f5f9)"
|
|
2245
|
-
}),
|
|
2245
|
+
}), pi = {
|
|
2246
2246
|
id: "slate-professional",
|
|
2247
2247
|
name: "Slate Professional",
|
|
2248
2248
|
category: "corporate",
|
|
@@ -2253,13 +2253,13 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2253
2253
|
gridSize: 20,
|
|
2254
2254
|
selectionColor: "var(--nice-text-secondary, #475569)"
|
|
2255
2255
|
},
|
|
2256
|
-
|
|
2256
|
+
fi,
|
|
2257
2257
|
"'Inter', system-ui, sans-serif",
|
|
2258
2258
|
{ borderColor: "var(--nice-border, #cbd5e1)", borderWidth: 1, borderRadius: 6, shadow: !0 },
|
|
2259
2259
|
{ strokeColor: "var(--nice-text-muted, #94a3b8)", strokeWidth: 1.5 },
|
|
2260
2260
|
{ borderColor: "var(--nice-border, #cbd5e1)", borderRadius: 8 }
|
|
2261
2261
|
)
|
|
2262
|
-
},
|
|
2262
|
+
}, gi = /* @__PURE__ */ ge({
|
|
2263
2263
|
primary: "var(--nice-accent, #7c3aed)",
|
|
2264
2264
|
primaryLight: "var(--nice-accent, #a78bfa)",
|
|
2265
2265
|
secondary: "var(--nice-info, #06b6d4)",
|
|
@@ -2273,7 +2273,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2273
2273
|
border: "#7c3aed40",
|
|
2274
2274
|
surface: "#1e1b4b",
|
|
2275
2275
|
surfaceAlt: "#312e81"
|
|
2276
|
-
}),
|
|
2276
|
+
}), mi = {
|
|
2277
2277
|
id: "aurora-borealis",
|
|
2278
2278
|
name: "Aurora Borealis",
|
|
2279
2279
|
category: "dark",
|
|
@@ -2284,7 +2284,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2284
2284
|
gridSize: 24,
|
|
2285
2285
|
selectionColor: "var(--nice-accent, #a78bfa)"
|
|
2286
2286
|
},
|
|
2287
|
-
|
|
2287
|
+
gi,
|
|
2288
2288
|
De,
|
|
2289
2289
|
{
|
|
2290
2290
|
borderColor: "var(--nice-accent, #7c3aed)",
|
|
@@ -2304,7 +2304,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2304
2304
|
liquidColorEnd: "var(--nice-info, #06b6d4)"
|
|
2305
2305
|
}
|
|
2306
2306
|
)
|
|
2307
|
-
},
|
|
2307
|
+
}, yi = /* @__PURE__ */ ge({
|
|
2308
2308
|
primary: "#2c3e50",
|
|
2309
2309
|
primaryLight: "#7f8c8d",
|
|
2310
2310
|
secondary: "#2980b9",
|
|
@@ -2314,13 +2314,13 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2314
2314
|
border: "#bdc3c7",
|
|
2315
2315
|
surface: "#fdfaf6",
|
|
2316
2316
|
surfaceAlt: "#f5f0e8"
|
|
2317
|
-
}),
|
|
2317
|
+
}), bi = {
|
|
2318
2318
|
id: "sketch-hand-drawn",
|
|
2319
2319
|
name: "Sketch / Hand-drawn",
|
|
2320
2320
|
category: "creative",
|
|
2321
2321
|
config: me(
|
|
2322
2322
|
{ background: "#fdfaf6", gridColor: "#bdc3c720", gridSize: 20, selectionColor: "#2980b9" },
|
|
2323
|
-
|
|
2323
|
+
yi,
|
|
2324
2324
|
"'Caveat', 'Patrick Hand', cursive",
|
|
2325
2325
|
{
|
|
2326
2326
|
backgroundColor: "#fdfaf6",
|
|
@@ -2332,7 +2332,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2332
2332
|
{ strokeColor: "#2c3e50", strokeWidth: 2 },
|
|
2333
2333
|
{ borderStyle: "dashed", borderWidth: 2 }
|
|
2334
2334
|
)
|
|
2335
|
-
},
|
|
2335
|
+
}, vi = /* @__PURE__ */ ge({
|
|
2336
2336
|
primary: "var(--nice-primary, #2196f3)",
|
|
2337
2337
|
primaryLight: "#64b5f6",
|
|
2338
2338
|
secondary: "var(--nice-warning, #ff9800)",
|
|
@@ -2346,7 +2346,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2346
2346
|
border: "#ffffff40",
|
|
2347
2347
|
surface: "var(--nice-primary, #2196f3)",
|
|
2348
2348
|
surfaceAlt: "var(--nice-primary-dark, #1565c0)"
|
|
2349
|
-
}),
|
|
2349
|
+
}), wi = {
|
|
2350
2350
|
id: "infographic-bold",
|
|
2351
2351
|
name: "Infographic Bold",
|
|
2352
2352
|
category: "creative",
|
|
@@ -2357,7 +2357,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2357
2357
|
gridSize: 24,
|
|
2358
2358
|
selectionColor: "var(--nice-danger, #ff5722)"
|
|
2359
2359
|
},
|
|
2360
|
-
|
|
2360
|
+
vi,
|
|
2361
2361
|
"'Montserrat', 'Roboto', sans-serif",
|
|
2362
2362
|
{
|
|
2363
2363
|
backgroundColor: "var(--nice-primary, #2196f3)",
|
|
@@ -2371,7 +2371,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2371
2371
|
{ strokeColor: "#90a4ae", strokeWidth: 3 },
|
|
2372
2372
|
{ backgroundColor: "#2196f320", borderWidth: 2, borderRadius: 16 }
|
|
2373
2373
|
)
|
|
2374
|
-
},
|
|
2374
|
+
}, xi = /* @__PURE__ */ ge({
|
|
2375
2375
|
primary: "#9333ea",
|
|
2376
2376
|
primaryLight: "var(--nice-accent, #c084fc)",
|
|
2377
2377
|
secondary: "var(--nice-info, #6366f1)",
|
|
@@ -2381,7 +2381,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2381
2381
|
border: "#7c3aed40",
|
|
2382
2382
|
surface: "#1c1033",
|
|
2383
2383
|
surfaceAlt: "#2d1b69"
|
|
2384
|
-
}),
|
|
2384
|
+
}), ki = {
|
|
2385
2385
|
id: "midnight-purple",
|
|
2386
2386
|
name: "Midnight Purple",
|
|
2387
2387
|
category: "dark",
|
|
@@ -2392,7 +2392,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2392
2392
|
gridSize: 20,
|
|
2393
2393
|
selectionColor: "var(--nice-accent, #c084fc)"
|
|
2394
2394
|
},
|
|
2395
|
-
|
|
2395
|
+
xi,
|
|
2396
2396
|
De,
|
|
2397
2397
|
{
|
|
2398
2398
|
borderColor: "#9333ea",
|
|
@@ -2411,31 +2411,31 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2411
2411
|
}
|
|
2412
2412
|
)
|
|
2413
2413
|
}, _t = [
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
],
|
|
2414
|
+
Nr,
|
|
2415
|
+
$r,
|
|
2416
|
+
Pr,
|
|
2417
|
+
Kr,
|
|
2418
|
+
Jr,
|
|
2419
|
+
Er,
|
|
2420
|
+
Fr,
|
|
2421
|
+
Lr,
|
|
2422
|
+
Yr,
|
|
2423
|
+
Vr,
|
|
2424
|
+
ei,
|
|
2425
|
+
ri,
|
|
2426
|
+
oi,
|
|
2427
|
+
Br,
|
|
2428
|
+
ni,
|
|
2429
|
+
Ur,
|
|
2430
|
+
li,
|
|
2431
|
+
di,
|
|
2432
|
+
hi,
|
|
2433
|
+
pi,
|
|
2434
|
+
mi,
|
|
2435
|
+
bi,
|
|
2436
|
+
wi,
|
|
2437
|
+
ki
|
|
2438
|
+
], Aa = [
|
|
2439
2439
|
// Fills
|
|
2440
2440
|
{ id: "fill-solid", name: "Solid Fill", category: "fill", style: { opacity: 1 } },
|
|
2441
2441
|
{
|
|
@@ -2553,7 +2553,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2553
2553
|
category: "effect",
|
|
2554
2554
|
style: { glowColor: "var(--nice-success, #00ff88)", glowIntensity: 0.8 }
|
|
2555
2555
|
}
|
|
2556
|
-
],
|
|
2556
|
+
], Ia = [
|
|
2557
2557
|
// Line types
|
|
2558
2558
|
{ id: "line-straight", name: "Straight", category: "type", style: { lineType: "straight" } },
|
|
2559
2559
|
{ id: "line-bezier", name: "Bezier Curve", category: "type", style: { lineType: "bezier" } },
|
|
@@ -2712,7 +2712,7 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2712
2712
|
}
|
|
2713
2713
|
}
|
|
2714
2714
|
}
|
|
2715
|
-
],
|
|
2715
|
+
], Ci = [
|
|
2716
2716
|
{
|
|
2717
2717
|
id: "tp-fade-in",
|
|
2718
2718
|
name: "Fade In",
|
|
@@ -2882,13 +2882,13 @@ const De = "'Inter', system-ui, sans-serif", Ct = "'Fira Code', 'Cascadia Code',
|
|
|
2882
2882
|
description: "Text appears letter by letter"
|
|
2883
2883
|
}
|
|
2884
2884
|
];
|
|
2885
|
-
function
|
|
2885
|
+
function Na(i) {
|
|
2886
2886
|
return _t.find((e) => e.id === i);
|
|
2887
2887
|
}
|
|
2888
|
-
function
|
|
2888
|
+
function Da(i) {
|
|
2889
2889
|
return _t.filter((e) => e.category === i);
|
|
2890
2890
|
}
|
|
2891
|
-
function
|
|
2891
|
+
function $a(i) {
|
|
2892
2892
|
return {
|
|
2893
2893
|
canvasBackground: i.canvas.background,
|
|
2894
2894
|
gridColor: i.canvas.gridColor,
|
|
@@ -2902,7 +2902,7 @@ function Da(i) {
|
|
|
2902
2902
|
effects: i.effects
|
|
2903
2903
|
};
|
|
2904
2904
|
}
|
|
2905
|
-
function
|
|
2905
|
+
function Ta(i, e, t, r, o, a) {
|
|
2906
2906
|
const s = ge({
|
|
2907
2907
|
primary: t.primary,
|
|
2908
2908
|
primaryLight: t.primaryHover,
|
|
@@ -2917,7 +2917,7 @@ function $a(i, e, t, r, o, a) {
|
|
|
2917
2917
|
border: a.color,
|
|
2918
2918
|
surface: r.primary,
|
|
2919
2919
|
surfaceAlt: r.secondary
|
|
2920
|
-
}), n =
|
|
2920
|
+
}), n = _i(r.primary);
|
|
2921
2921
|
return {
|
|
2922
2922
|
id: i,
|
|
2923
2923
|
name: `${e} Theme`,
|
|
@@ -2937,14 +2937,14 @@ function $a(i, e, t, r, o, a) {
|
|
|
2937
2937
|
)
|
|
2938
2938
|
};
|
|
2939
2939
|
}
|
|
2940
|
-
function
|
|
2940
|
+
function _i(i) {
|
|
2941
2941
|
const e = i.replace("#", "");
|
|
2942
2942
|
if (e.length < 6)
|
|
2943
2943
|
return !1;
|
|
2944
2944
|
const t = parseInt(e.slice(0, 2), 16), r = parseInt(e.slice(2, 4), 16), o = parseInt(e.slice(4, 6), 16);
|
|
2945
2945
|
return (t * 299 + r * 587 + o * 114) / 1e3 < 128;
|
|
2946
2946
|
}
|
|
2947
|
-
const
|
|
2947
|
+
const zi = [
|
|
2948
2948
|
"fadeIn",
|
|
2949
2949
|
"fadeOut",
|
|
2950
2950
|
"slideInLeft",
|
|
@@ -2968,7 +2968,7 @@ const _i = [
|
|
|
2968
2968
|
"morphShape",
|
|
2969
2969
|
"drawPath",
|
|
2970
2970
|
"particleTrail"
|
|
2971
|
-
],
|
|
2971
|
+
], Mi = ["linear", "easeIn", "easeOut", "easeInOut", "spring", "bounce"], Yt = ({
|
|
2972
2972
|
animations: i,
|
|
2973
2973
|
onAdd: e,
|
|
2974
2974
|
onRemove: t,
|
|
@@ -3091,7 +3091,7 @@ const _i = [
|
|
|
3091
3091
|
width: 200,
|
|
3092
3092
|
zIndex: 100
|
|
3093
3093
|
},
|
|
3094
|
-
children:
|
|
3094
|
+
children: Ci.map((m) => /* @__PURE__ */ c(
|
|
3095
3095
|
q,
|
|
3096
3096
|
{
|
|
3097
3097
|
variant: "ghost",
|
|
@@ -3124,6 +3124,9 @@ const _i = [
|
|
|
3124
3124
|
/* @__PURE__ */ c(
|
|
3125
3125
|
"span",
|
|
3126
3126
|
{
|
|
3127
|
+
role: "button",
|
|
3128
|
+
tabIndex: 0,
|
|
3129
|
+
onKeyDown: Ft,
|
|
3127
3130
|
className: "nice-diagram-timeline__track-name",
|
|
3128
3131
|
onClick: () => u(N ? null : m.id),
|
|
3129
3132
|
style: { cursor: "pointer" },
|
|
@@ -3161,7 +3164,7 @@ const _i = [
|
|
|
3161
3164
|
{
|
|
3162
3165
|
value: m.effect,
|
|
3163
3166
|
onChange: (_) => r == null ? void 0 : r(m.id, { effect: _ }),
|
|
3164
|
-
options:
|
|
3167
|
+
options: zi.map((_) => ({ value: _, label: _ })),
|
|
3165
3168
|
style: { fontSize: 11, padding: "1px 4px" }
|
|
3166
3169
|
}
|
|
3167
3170
|
),
|
|
@@ -3170,7 +3173,7 @@ const _i = [
|
|
|
3170
3173
|
{
|
|
3171
3174
|
value: m.easing,
|
|
3172
3175
|
onChange: (_) => r == null ? void 0 : r(m.id, { easing: _ }),
|
|
3173
|
-
options:
|
|
3176
|
+
options: Mi.map((_) => ({ value: _, label: _ })),
|
|
3174
3177
|
style: { fontSize: 11, padding: "1px 4px" }
|
|
3175
3178
|
}
|
|
3176
3179
|
),
|
|
@@ -3242,8 +3245,8 @@ const _i = [
|
|
|
3242
3245
|
}) })
|
|
3243
3246
|
] });
|
|
3244
3247
|
};
|
|
3245
|
-
process.env.NODE_ENV !== "production" && (
|
|
3246
|
-
const
|
|
3248
|
+
process.env.NODE_ENV !== "production" && (Yt.displayName = "AnimationTimeline");
|
|
3249
|
+
const Si = /^[a-z][a-z0-9-]*$/, Ai = 0.1, Ii = 5, nt = 8, bt = [
|
|
3247
3250
|
{ cursor: "nw-resize", dx: 0, dy: 0, resizeX: -1, resizeY: -1 },
|
|
3248
3251
|
{ cursor: "n-resize", dx: 0.5, dy: 0, resizeX: 0, resizeY: -1 },
|
|
3249
3252
|
{ cursor: "ne-resize", dx: 1, dy: 0, resizeX: 1, resizeY: -1 },
|
|
@@ -3306,7 +3309,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Si = 0.1, Ai = 5, nt = 8, bt = [
|
|
|
3306
3309
|
(f) => {
|
|
3307
3310
|
if (f.preventDefault(), !o)
|
|
3308
3311
|
return;
|
|
3309
|
-
const k = f.deltaY > 0 ? 0.9 : 1.1, M = Math.min(
|
|
3312
|
+
const k = f.deltaY > 0 ? 0.9 : 1.1, M = Math.min(Ii, Math.max(Ai, r.zoom * k)), I = V.current;
|
|
3310
3313
|
if (!I)
|
|
3311
3314
|
return;
|
|
3312
3315
|
const F = I.getBoundingClientRect(), S = f.clientX - F.left, D = f.clientY - F.top, ne = M / r.zoom, Q = S - (S - r.x) * ne, ee = D - (D - r.y) * ne;
|
|
@@ -3509,7 +3512,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Si = 0.1, Ai = 5, nt = 8, bt = [
|
|
|
3509
3512
|
}
|
|
3510
3513
|
},
|
|
3511
3514
|
[i, gt]
|
|
3512
|
-
),
|
|
3515
|
+
), ar = Y(
|
|
3513
3516
|
(f) => {
|
|
3514
3517
|
const k = Ue(f.sourceNodeId, f.sourcePortId), M = Ue(f.targetNodeId, f.targetPortId);
|
|
3515
3518
|
switch (f.style.lineType ?? "bezier") {
|
|
@@ -3531,7 +3534,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Si = 0.1, Ai = 5, nt = 8, bt = [
|
|
|
3531
3534
|
}
|
|
3532
3535
|
},
|
|
3533
3536
|
[Ue]
|
|
3534
|
-
),
|
|
3537
|
+
), nr = Y((f, k) => {
|
|
3535
3538
|
const { size: M, style: I, shape: F } = f, S = M.width, D = M.height, Q = !!(I.gradientColor && I.backgroundColor) ? `url(#${k})` : I.backgroundColor ?? "var(--nice-bg, #fff)", ee = I.borderColor ?? "var(--nice-text, #333333)", ce = I.borderWidth ?? 1, ye = I.borderRadius ?? (F === "roundedRect" ? 8 : 0), ue = I.borderStyle === "dashed" ? "8,4" : I.borderStyle === "dotted" ? "2,4" : void 0, pe = I.shadow ? "url(#nd-shadow)" : void 0;
|
|
3536
3539
|
switch (F) {
|
|
3537
3540
|
case "ellipse":
|
|
@@ -3702,12 +3705,12 @@ const Mi = /^[a-z][a-z0-9-]*$/, Si = 0.1, Ai = 5, nt = 8, bt = [
|
|
|
3702
3705
|
};
|
|
3703
3706
|
},
|
|
3704
3707
|
[y]
|
|
3705
|
-
),
|
|
3708
|
+
), sr = se(() => {
|
|
3706
3709
|
if (!x)
|
|
3707
3710
|
return null;
|
|
3708
3711
|
const f = [];
|
|
3709
3712
|
for (const [, k] of x.glowStates) {
|
|
3710
|
-
const M =
|
|
3713
|
+
const M = gr(k.elementId), I = mr(k.intensity, k.pulse);
|
|
3711
3714
|
f.push(
|
|
3712
3715
|
/* @__PURE__ */ b("filter", { id: M, x: "-50%", y: "-50%", width: "200%", height: "200%", children: [
|
|
3713
3716
|
/* @__PURE__ */ c("feGaussianBlur", { in: "SourceGraphic", stdDeviation: I, result: "blur" }),
|
|
@@ -3721,7 +3724,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Si = 0.1, Ai = 5, nt = 8, bt = [
|
|
|
3721
3724
|
);
|
|
3722
3725
|
}
|
|
3723
3726
|
return f;
|
|
3724
|
-
}, [x]),
|
|
3727
|
+
}, [x]), lr = se(() => {
|
|
3725
3728
|
if (!x)
|
|
3726
3729
|
return null;
|
|
3727
3730
|
const f = [];
|
|
@@ -3748,7 +3751,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Si = 0.1, Ai = 5, nt = 8, bt = [
|
|
|
3748
3751
|
);
|
|
3749
3752
|
}
|
|
3750
3753
|
return f;
|
|
3751
|
-
}, [x, e]),
|
|
3754
|
+
}, [x, e]), cr = se(() => i.filter((f) => f.style.gradientColor && f.style.backgroundColor).map((f) => {
|
|
3752
3755
|
const k = `nd-grad-${f.id}`, M = f.style.gradientDirection ?? "vertical";
|
|
3753
3756
|
return M === "radial" ? /* @__PURE__ */ b("radialGradient", { id: k, children: [
|
|
3754
3757
|
/* @__PURE__ */ c("stop", { offset: "0%", stopColor: f.style.backgroundColor }),
|
|
@@ -3850,9 +3853,9 @@ const Mi = /^[a-z][a-z0-9-]*$/, Si = 0.1, Ai = 5, nt = 8, bt = [
|
|
|
3850
3853
|
strokeWidth: "0.5"
|
|
3851
3854
|
}
|
|
3852
3855
|
) }),
|
|
3853
|
-
|
|
3854
|
-
nr,
|
|
3856
|
+
cr,
|
|
3855
3857
|
sr,
|
|
3858
|
+
lr,
|
|
3856
3859
|
i.filter((f) => f.style.glowColor).map((f) => {
|
|
3857
3860
|
const k = `nd-node-glow-${f.id}`, M = (f.style.glowIntensity ?? 0.5) * 10;
|
|
3858
3861
|
return /* @__PURE__ */ b("filter", { id: k, x: "-50%", y: "-50%", width: "200%", height: "200%", children: [
|
|
@@ -4068,7 +4071,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Si = 0.1, Ai = 5, nt = 8, bt = [
|
|
|
4068
4071
|
)),
|
|
4069
4072
|
e.map((f) => {
|
|
4070
4073
|
var ye;
|
|
4071
|
-
const k =
|
|
4074
|
+
const k = ar(f), M = et.has(f.id), I = f.style.targetArrow === "diamond" ? "url(#nd-diamond-marker)" : f.style.targetArrow === "circle" ? "url(#nd-circle-marker)" : f.style.targetArrow === "openArrow" ? "url(#nd-open-arrow)" : f.style.targetArrow !== "none" ? "url(#nd-arrow)" : void 0, F = f.style.sourceArrow === "diamond" ? "url(#nd-diamond-marker)" : f.style.sourceArrow === "circle" ? "url(#nd-circle-marker)" : f.style.sourceArrow === "openArrow" ? "url(#nd-open-arrow)" : f.style.sourceArrow === "arrow" ? "url(#nd-arrow)" : void 0, S = At(f.id), D = y == null ? void 0 : y.get(f.id), ne = D == null ? void 0 : D.strokeProgress, Q = ne != null && ne >= 0 && ne < 1 ? { strokeDasharray: "1000", strokeDashoffset: `${1e3 * (1 - ne)}` } : void 0, ee = f.style.liquidFlow, ce = x == null ? void 0 : x.liquidFlows.get(f.id);
|
|
4072
4075
|
return /* @__PURE__ */ b(
|
|
4073
4076
|
"g",
|
|
4074
4077
|
{
|
|
@@ -4195,7 +4198,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Si = 0.1, Ai = 5, nt = 8, bt = [
|
|
|
4195
4198
|
);
|
|
4196
4199
|
}),
|
|
4197
4200
|
i.filter((f) => !f.hidden || m === "editor").map((f) => {
|
|
4198
|
-
const k = et.has(f.id), M = At(f.id), I = y == null ? void 0 : y.get(f.id), F = f.style.fontFamily ?? (a == null ? void 0 : a.fontFamily) ?? "sans-serif", S = f.style.fontSize ?? 14, D = f.style.fontColor ?? "var(--nice-text, #222)", ne = f.style.fontWeight ?? "normal", Q = f.style.fontStyle ?? "normal", ee = f.style.textAlign ?? "center", ce = f.style.rotation ?? 0, ye = `nd-grad-${f.id}`, ue = !!f.hidden, pe = ue ? C ?? 0.3 : f.style.opacity ?? 1, be = f.style.glowColor ? `url(#nd-node-glow-${f.id})` : void 0, Se = ee === "left" ? "start" : ee === "right" ? "end" : "middle", Te = ee === "left" ? 8 : ee === "right" ? f.size.width - 8 : f.size.width / 2, Ae = I == null ? void 0 : I.typewriterChars, ot = Ae != null && Ae >= 0 ? f.label.slice(0, Ae) : f.label, he = I == null ? void 0 : I.liquidFillProgress, Ve = I == null ? void 0 : I.rippleRadius, at = I == null ? void 0 : I.rippleOpacity, mt = f.childNodeIds && f.childNodeIds.length > 0,
|
|
4201
|
+
const k = et.has(f.id), M = At(f.id), I = y == null ? void 0 : y.get(f.id), F = f.style.fontFamily ?? (a == null ? void 0 : a.fontFamily) ?? "sans-serif", S = f.style.fontSize ?? 14, D = f.style.fontColor ?? "var(--nice-text, #222)", ne = f.style.fontWeight ?? "normal", Q = f.style.fontStyle ?? "normal", ee = f.style.textAlign ?? "center", ce = f.style.rotation ?? 0, ye = `nd-grad-${f.id}`, ue = !!f.hidden, pe = ue ? C ?? 0.3 : f.style.opacity ?? 1, be = f.style.glowColor ? `url(#nd-node-glow-${f.id})` : void 0, Se = ee === "left" ? "start" : ee === "right" ? "end" : "middle", Te = ee === "left" ? 8 : ee === "right" ? f.size.width - 8 : f.size.width / 2, Ae = I == null ? void 0 : I.typewriterChars, ot = Ae != null && Ae >= 0 ? f.label.slice(0, Ae) : f.label, he = I == null ? void 0 : I.liquidFillProgress, Ve = I == null ? void 0 : I.rippleRadius, at = I == null ? void 0 : I.rippleOpacity, mt = f.childNodeIds && f.childNodeIds.length > 0, dr = !!f.collapsed;
|
|
4199
4202
|
return /* @__PURE__ */ b(
|
|
4200
4203
|
"g",
|
|
4201
4204
|
{
|
|
@@ -4236,7 +4239,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Si = 0.1, Ai = 5, nt = 8, bt = [
|
|
|
4236
4239
|
opacity: 0.5
|
|
4237
4240
|
}
|
|
4238
4241
|
),
|
|
4239
|
-
|
|
4242
|
+
nr(f, ye),
|
|
4240
4243
|
he != null && he > 0 && he < 1 && /* @__PURE__ */ c("clipPath", { id: `nd-liquid-clip-${f.id}`, children: /* @__PURE__ */ c(
|
|
4241
4244
|
"rect",
|
|
4242
4245
|
{
|
|
@@ -4368,7 +4371,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Si = 0.1, Ai = 5, nt = 8, bt = [
|
|
|
4368
4371
|
children: f.description
|
|
4369
4372
|
}
|
|
4370
4373
|
),
|
|
4371
|
-
f.icon && (
|
|
4374
|
+
f.icon && (Si.test(f.icon) ? /* @__PURE__ */ c(
|
|
4372
4375
|
"g",
|
|
4373
4376
|
{
|
|
4374
4377
|
transform: `translate(${f.size.width / 2 - 8}, 4)`,
|
|
@@ -4429,7 +4432,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Si = 0.1, Ai = 5, nt = 8, bt = [
|
|
|
4429
4432
|
children: /* @__PURE__ */ c(
|
|
4430
4433
|
j,
|
|
4431
4434
|
{
|
|
4432
|
-
name:
|
|
4435
|
+
name: dr ? "chevron-right" : "chevron-down",
|
|
4433
4436
|
size: 10,
|
|
4434
4437
|
color: "var(--nice-text-secondary, #666)"
|
|
4435
4438
|
}
|
|
@@ -4441,7 +4444,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Si = 0.1, Ai = 5, nt = 8, bt = [
|
|
|
4441
4444
|
)
|
|
4442
4445
|
] }),
|
|
4443
4446
|
$ && f.ports.map((xe) => {
|
|
4444
|
-
const Pe =
|
|
4447
|
+
const Pe = Ni(f, xe.id);
|
|
4445
4448
|
return /* @__PURE__ */ c(
|
|
4446
4449
|
"circle",
|
|
4447
4450
|
{
|
|
@@ -4491,7 +4494,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Si = 0.1, Ai = 5, nt = 8, bt = [
|
|
|
4491
4494
|
);
|
|
4492
4495
|
};
|
|
4493
4496
|
process.env.NODE_ENV !== "production" && (Re.displayName = "DiagramCanvas");
|
|
4494
|
-
function
|
|
4497
|
+
function Ni(i, e) {
|
|
4495
4498
|
const t = i.ports.find((o) => o.id === e);
|
|
4496
4499
|
if (!t)
|
|
4497
4500
|
return { x: 0, y: 0 };
|
|
@@ -4509,15 +4512,15 @@ function Ii(i, e) {
|
|
|
4509
4512
|
return { x: 0, y: 0 };
|
|
4510
4513
|
}
|
|
4511
4514
|
}
|
|
4512
|
-
const
|
|
4515
|
+
const Di = 180, $i = 120, Ht = ({
|
|
4513
4516
|
nodes: i,
|
|
4514
4517
|
edges: e,
|
|
4515
4518
|
viewport: t,
|
|
4516
4519
|
onViewportChange: r,
|
|
4517
4520
|
canvasWidth: o = 800,
|
|
4518
4521
|
canvasHeight: a = 600,
|
|
4519
|
-
width: s =
|
|
4520
|
-
height: n =
|
|
4522
|
+
width: s = Di,
|
|
4523
|
+
height: n = $i,
|
|
4521
4524
|
className: l
|
|
4522
4525
|
}) => {
|
|
4523
4526
|
const h = se(() => {
|
|
@@ -4605,8 +4608,8 @@ const Ni = 180, Di = 120, Yt = ({
|
|
|
4605
4608
|
}
|
|
4606
4609
|
);
|
|
4607
4610
|
};
|
|
4608
|
-
process.env.NODE_ENV !== "production" && (
|
|
4609
|
-
const
|
|
4611
|
+
process.env.NODE_ENV !== "production" && (Ht.displayName = "DiagramMinimap");
|
|
4612
|
+
const Ti = [
|
|
4610
4613
|
"rectangle",
|
|
4611
4614
|
"roundedRect",
|
|
4612
4615
|
"ellipse",
|
|
@@ -4619,7 +4622,7 @@ const $i = [
|
|
|
4619
4622
|
"cloud",
|
|
4620
4623
|
"document",
|
|
4621
4624
|
"actor"
|
|
4622
|
-
],
|
|
4625
|
+
], Ut = ({
|
|
4623
4626
|
selectedNode: i,
|
|
4624
4627
|
selectedEdge: e,
|
|
4625
4628
|
onNodeChange: t,
|
|
@@ -4680,7 +4683,7 @@ const $i = [
|
|
|
4680
4683
|
{
|
|
4681
4684
|
value: i.shape,
|
|
4682
4685
|
onChange: (p) => t == null ? void 0 : t(i.id, { shape: p }),
|
|
4683
|
-
options:
|
|
4686
|
+
options: Ti.map((p) => ({ value: p, label: p })),
|
|
4684
4687
|
className: "nice-diagram-property-panel__select"
|
|
4685
4688
|
}
|
|
4686
4689
|
)
|
|
@@ -5167,7 +5170,7 @@ const $i = [
|
|
|
5167
5170
|
)
|
|
5168
5171
|
] }) : null;
|
|
5169
5172
|
};
|
|
5170
|
-
process.env.NODE_ENV !== "production" && (
|
|
5173
|
+
process.env.NODE_ENV !== "production" && (Ut.displayName = "DiagramPropertyPanel");
|
|
5171
5174
|
const Dt = {
|
|
5172
5175
|
flowchart: [
|
|
5173
5176
|
"rectangle",
|
|
@@ -5201,7 +5204,7 @@ const Dt = {
|
|
|
5201
5204
|
"document",
|
|
5202
5205
|
"actor"
|
|
5203
5206
|
]
|
|
5204
|
-
},
|
|
5207
|
+
}, Pi = ["dagre", "forceDirected", "grid", "radial", "tree"], Ri = [
|
|
5205
5208
|
"sans-serif",
|
|
5206
5209
|
"serif",
|
|
5207
5210
|
"monospace",
|
|
@@ -5213,7 +5216,7 @@ const Dt = {
|
|
|
5213
5216
|
"Verdana",
|
|
5214
5217
|
"Tahoma",
|
|
5215
5218
|
"Trebuchet MS"
|
|
5216
|
-
],
|
|
5219
|
+
], Ei = [8, 9, 10, 11, 12, 14, 16, 18, 20, 24, 28, 32, 36, 48, 72], Xt = ({
|
|
5217
5220
|
activeTool: i,
|
|
5218
5221
|
onToolChange: e,
|
|
5219
5222
|
diagramType: t,
|
|
@@ -5368,7 +5371,7 @@ const Dt = {
|
|
|
5368
5371
|
size: "sm",
|
|
5369
5372
|
onClick: () => ft(J),
|
|
5370
5373
|
children: [
|
|
5371
|
-
/* @__PURE__ */ c(j, { name:
|
|
5374
|
+
/* @__PURE__ */ c(j, { name: Oi(J), size: 14 }),
|
|
5372
5375
|
" ",
|
|
5373
5376
|
J
|
|
5374
5377
|
]
|
|
@@ -5586,7 +5589,7 @@ const Dt = {
|
|
|
5586
5589
|
className: "nice-diagram-toolbar__font-select",
|
|
5587
5590
|
value: A,
|
|
5588
5591
|
onChange: (J) => C == null ? void 0 : C(J),
|
|
5589
|
-
options:
|
|
5592
|
+
options: Ri.map((J) => ({ value: J, label: J })),
|
|
5590
5593
|
title: O("toolbar.fontFamily", "Font Family")
|
|
5591
5594
|
}
|
|
5592
5595
|
),
|
|
@@ -5596,7 +5599,7 @@ const Dt = {
|
|
|
5596
5599
|
className: "nice-diagram-toolbar__size-select",
|
|
5597
5600
|
value: String(_),
|
|
5598
5601
|
onChange: (J) => N == null ? void 0 : N(Number(J)),
|
|
5599
|
-
options:
|
|
5602
|
+
options: Ei.map((J) => ({
|
|
5600
5603
|
value: String(J),
|
|
5601
5604
|
label: String(J)
|
|
5602
5605
|
})),
|
|
@@ -5890,7 +5893,7 @@ const Dt = {
|
|
|
5890
5893
|
]
|
|
5891
5894
|
}
|
|
5892
5895
|
),
|
|
5893
|
-
ut && /* @__PURE__ */ c("div", { className: "nice-diagram-toolbar__dropdown", children:
|
|
5896
|
+
ut && /* @__PURE__ */ c("div", { className: "nice-diagram-toolbar__dropdown", children: Pi.map((J) => /* @__PURE__ */ c(
|
|
5894
5897
|
q,
|
|
5895
5898
|
{
|
|
5896
5899
|
className: "nice-diagram-toolbar__dropdown-item",
|
|
@@ -6033,8 +6036,8 @@ const Dt = {
|
|
|
6033
6036
|
] })
|
|
6034
6037
|
] });
|
|
6035
6038
|
};
|
|
6036
|
-
process.env.NODE_ENV !== "production" && (
|
|
6037
|
-
function
|
|
6039
|
+
process.env.NODE_ENV !== "production" && (Xt.displayName = "DiagramToolbar");
|
|
6040
|
+
function Oi(i) {
|
|
6038
6041
|
switch (i) {
|
|
6039
6042
|
case "rectangle":
|
|
6040
6043
|
return "square";
|
|
@@ -6064,7 +6067,7 @@ function Ei(i) {
|
|
|
6064
6067
|
return "card";
|
|
6065
6068
|
}
|
|
6066
6069
|
}
|
|
6067
|
-
const
|
|
6070
|
+
const Fi = [
|
|
6068
6071
|
{
|
|
6069
6072
|
target: ".nice-diagram-editor",
|
|
6070
6073
|
titleKey: "tutorial.diagramEditor.intro.title",
|
|
@@ -6073,7 +6076,7 @@ const Oi = [
|
|
|
6073
6076
|
content: "Pick a tool to add and connect nodes on the canvas, edit them in the property panel, and export the diagram from the toolbar.",
|
|
6074
6077
|
placement: "auto"
|
|
6075
6078
|
}
|
|
6076
|
-
],
|
|
6079
|
+
], Wi = ({
|
|
6077
6080
|
initialDocument: i,
|
|
6078
6081
|
diagramType: e = "flowchart",
|
|
6079
6082
|
onChange: t,
|
|
@@ -6088,13 +6091,13 @@ const Oi = [
|
|
|
6088
6091
|
tutorial: g
|
|
6089
6092
|
}) => {
|
|
6090
6093
|
var ke;
|
|
6091
|
-
const { t: v } = Ot(), u =
|
|
6094
|
+
const { t: v } = Ot(), u = zr(i), [p, y] = te("select"), [x, m] = te(null), C = Ge(null), [A, N] = te("editor"), _ = Ge(null), [w, W] = te({
|
|
6092
6095
|
particles: [],
|
|
6093
6096
|
liquidFlows: /* @__PURE__ */ new Map(),
|
|
6094
6097
|
glowStates: /* @__PURE__ */ new Map()
|
|
6095
6098
|
});
|
|
6096
6099
|
Be(() => {
|
|
6097
|
-
const E = new
|
|
6100
|
+
const E = new pr((re) => {
|
|
6098
6101
|
W(re);
|
|
6099
6102
|
});
|
|
6100
6103
|
return _.current = E, E.start(), () => {
|
|
@@ -6198,13 +6201,13 @@ const Oi = [
|
|
|
6198
6201
|
let ae;
|
|
6199
6202
|
switch (E) {
|
|
6200
6203
|
case "ndd":
|
|
6201
|
-
ae =
|
|
6204
|
+
ae = br(re, !0);
|
|
6202
6205
|
break;
|
|
6203
6206
|
case "svg":
|
|
6204
6207
|
ae = It(re);
|
|
6205
6208
|
break;
|
|
6206
6209
|
case "mermaid":
|
|
6207
|
-
ae =
|
|
6210
|
+
ae = yr(re);
|
|
6208
6211
|
break;
|
|
6209
6212
|
case "png":
|
|
6210
6213
|
ae = It(re);
|
|
@@ -6227,7 +6230,7 @@ const Oi = [
|
|
|
6227
6230
|
[u.nodes, u.edges]
|
|
6228
6231
|
), ie = a || u.animationModes.length > 0 ? /* @__PURE__ */ b("div", { style: { display: "flex", flexDirection: "column", gap: 0, width: "100%" }, children: [
|
|
6229
6232
|
a && /* @__PURE__ */ c(
|
|
6230
|
-
|
|
6233
|
+
Xt,
|
|
6231
6234
|
{
|
|
6232
6235
|
activeTool: p,
|
|
6233
6236
|
onToolChange: y,
|
|
@@ -6297,8 +6300,8 @@ const Oi = [
|
|
|
6297
6300
|
}
|
|
6298
6301
|
)
|
|
6299
6302
|
] }) : void 0;
|
|
6300
|
-
return /* @__PURE__ */ c(
|
|
6301
|
-
|
|
6303
|
+
return /* @__PURE__ */ c(Bt, { locale: o, children: /* @__PURE__ */ b(
|
|
6304
|
+
ur,
|
|
6302
6305
|
{
|
|
6303
6306
|
ref: C,
|
|
6304
6307
|
flush: !0,
|
|
@@ -6311,7 +6314,7 @@ const Oi = [
|
|
|
6311
6314
|
className: "nice-diagram-editor__panel",
|
|
6312
6315
|
style: { width: 260, overflowY: "auto", height: "100%" },
|
|
6313
6316
|
children: /* @__PURE__ */ c(
|
|
6314
|
-
|
|
6317
|
+
Ut,
|
|
6315
6318
|
{
|
|
6316
6319
|
selectedNode: H,
|
|
6317
6320
|
selectedEdge: B,
|
|
@@ -6323,7 +6326,7 @@ const Oi = [
|
|
|
6323
6326
|
}
|
|
6324
6327
|
) : void 0,
|
|
6325
6328
|
bottomPanel: l ? /* @__PURE__ */ c("div", { className: "nice-diagram-editor__timeline", children: /* @__PURE__ */ c(
|
|
6326
|
-
|
|
6329
|
+
Yt,
|
|
6327
6330
|
{
|
|
6328
6331
|
animations: u.animations,
|
|
6329
6332
|
onAdd: u.addAnimation,
|
|
@@ -6332,7 +6335,7 @@ const Oi = [
|
|
|
6332
6335
|
}
|
|
6333
6336
|
) }) : void 0,
|
|
6334
6337
|
children: [
|
|
6335
|
-
/* @__PURE__ */ c("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ c(
|
|
6338
|
+
/* @__PURE__ */ c("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ c(Wt, { steps: Lt(g, Fi) }) }),
|
|
6336
6339
|
/* @__PURE__ */ b(
|
|
6337
6340
|
"div",
|
|
6338
6341
|
{
|
|
@@ -6362,7 +6365,7 @@ const Oi = [
|
|
|
6362
6365
|
}
|
|
6363
6366
|
),
|
|
6364
6367
|
n && /* @__PURE__ */ c("div", { style: { position: "absolute", bottom: 8, left: 8 }, children: /* @__PURE__ */ c(
|
|
6365
|
-
|
|
6368
|
+
Ht,
|
|
6366
6369
|
{
|
|
6367
6370
|
nodes: u.nodes,
|
|
6368
6371
|
edges: u.edges,
|
|
@@ -6377,7 +6380,7 @@ const Oi = [
|
|
|
6377
6380
|
}
|
|
6378
6381
|
) });
|
|
6379
6382
|
};
|
|
6380
|
-
process.env.NODE_ENV !== "production" && (
|
|
6383
|
+
process.env.NODE_ENV !== "production" && (Wi.displayName = "NiceDiagramEditor");
|
|
6381
6384
|
const $t = {
|
|
6382
6385
|
linear: (i) => i,
|
|
6383
6386
|
easeIn: (i) => i * i,
|
|
@@ -6399,10 +6402,10 @@ const $t = {
|
|
|
6399
6402
|
return 7.5625 * e * e + 0.984375;
|
|
6400
6403
|
}
|
|
6401
6404
|
};
|
|
6402
|
-
function
|
|
6405
|
+
function Li(i) {
|
|
6403
6406
|
return $t[i] ?? $t.linear;
|
|
6404
6407
|
}
|
|
6405
|
-
const
|
|
6408
|
+
const Kt = {
|
|
6406
6409
|
opacity: 1,
|
|
6407
6410
|
scale: 1,
|
|
6408
6411
|
translateX: 0,
|
|
@@ -6416,7 +6419,7 @@ const Xt = {
|
|
|
6416
6419
|
liquidFillProgress: -1,
|
|
6417
6420
|
particleTrailT: -1
|
|
6418
6421
|
};
|
|
6419
|
-
class
|
|
6422
|
+
class qi {
|
|
6420
6423
|
constructor(e, t) {
|
|
6421
6424
|
this.startTime = 0, this.playing = !1, this.rafId = 0, this.stateMap = /* @__PURE__ */ new Map(), this.tick = () => {
|
|
6422
6425
|
if (!this.playing)
|
|
@@ -6430,7 +6433,7 @@ class Li {
|
|
|
6430
6433
|
const n = a.repeat ?? 0;
|
|
6431
6434
|
let l = r - s;
|
|
6432
6435
|
if (l < 0) {
|
|
6433
|
-
this.stateMap.set(a.targetId,
|
|
6436
|
+
this.stateMap.set(a.targetId, Gi(a)), o = !0;
|
|
6434
6437
|
continue;
|
|
6435
6438
|
}
|
|
6436
6439
|
if (n === -1)
|
|
@@ -6445,7 +6448,7 @@ class Li {
|
|
|
6445
6448
|
continue;
|
|
6446
6449
|
o = !0;
|
|
6447
6450
|
}
|
|
6448
|
-
const h = Math.min(l / a.durationMs, 1), d =
|
|
6451
|
+
const h = Math.min(l / a.durationMs, 1), d = Li(a.easing)(h), g = Vi(a, d);
|
|
6449
6452
|
this.stateMap.set(a.targetId, g);
|
|
6450
6453
|
}
|
|
6451
6454
|
this.onFrame(this.stateMap), o ? this.rafId = requestAnimationFrame(this.tick) : this.playing = !1;
|
|
@@ -6464,8 +6467,8 @@ class Li {
|
|
|
6464
6467
|
return this.playing;
|
|
6465
6468
|
}
|
|
6466
6469
|
}
|
|
6467
|
-
function
|
|
6468
|
-
const t = { ...
|
|
6470
|
+
function Vi(i, e) {
|
|
6471
|
+
const t = { ...Kt };
|
|
6469
6472
|
switch (i.effect) {
|
|
6470
6473
|
case "fadeIn":
|
|
6471
6474
|
t.opacity = e;
|
|
@@ -6539,8 +6542,8 @@ function qi(i, e) {
|
|
|
6539
6542
|
}
|
|
6540
6543
|
return t;
|
|
6541
6544
|
}
|
|
6542
|
-
function
|
|
6543
|
-
const e = { ...
|
|
6545
|
+
function Gi(i) {
|
|
6546
|
+
const e = { ...Kt };
|
|
6544
6547
|
switch (i.effect) {
|
|
6545
6548
|
case "fadeIn":
|
|
6546
6549
|
case "slideInLeft":
|
|
@@ -6563,7 +6566,7 @@ function Vi(i) {
|
|
|
6563
6566
|
}
|
|
6564
6567
|
return e;
|
|
6565
6568
|
}
|
|
6566
|
-
function
|
|
6569
|
+
function Bi(i) {
|
|
6567
6570
|
return {
|
|
6568
6571
|
rectangle: "rectangle",
|
|
6569
6572
|
roundedRect: "roundedRect",
|
|
@@ -6576,7 +6579,7 @@ function Gi(i) {
|
|
|
6576
6579
|
triangle: "triangle"
|
|
6577
6580
|
}[i || "rectangle"] || "rectangle";
|
|
6578
6581
|
}
|
|
6579
|
-
function
|
|
6582
|
+
function ji(i) {
|
|
6580
6583
|
return i ? {
|
|
6581
6584
|
backgroundColor: i.fill,
|
|
6582
6585
|
borderColor: i.stroke,
|
|
@@ -6587,7 +6590,7 @@ function Bi(i) {
|
|
|
6587
6590
|
borderStyle: i.strokeDasharray ? "dashed" : "solid"
|
|
6588
6591
|
} : {};
|
|
6589
6592
|
}
|
|
6590
|
-
function
|
|
6593
|
+
function Yi(i) {
|
|
6591
6594
|
if (!i)
|
|
6592
6595
|
return {};
|
|
6593
6596
|
let e = "straight";
|
|
@@ -6601,7 +6604,7 @@ function ji(i) {
|
|
|
6601
6604
|
opacity: i.opacity
|
|
6602
6605
|
};
|
|
6603
6606
|
}
|
|
6604
|
-
function
|
|
6607
|
+
function Hi(i) {
|
|
6605
6608
|
if (i)
|
|
6606
6609
|
return {
|
|
6607
6610
|
backgroundColor: i.fill,
|
|
@@ -6609,14 +6612,14 @@ function Yi(i) {
|
|
|
6609
6612
|
borderWidth: i.strokeWidth
|
|
6610
6613
|
};
|
|
6611
6614
|
}
|
|
6612
|
-
function
|
|
6615
|
+
function Ui(i) {
|
|
6613
6616
|
return {
|
|
6614
6617
|
id: i.id,
|
|
6615
6618
|
label: i.label,
|
|
6616
6619
|
position: { x: i.x, y: i.y },
|
|
6617
6620
|
size: { width: i.width, height: i.height },
|
|
6618
|
-
shape:
|
|
6619
|
-
style:
|
|
6621
|
+
shape: Bi(i.shape),
|
|
6622
|
+
style: ji(i.style),
|
|
6620
6623
|
ports: (i.ports || []).map((e, t) => ({
|
|
6621
6624
|
id: e.id,
|
|
6622
6625
|
side: e.position || "right",
|
|
@@ -6625,7 +6628,7 @@ function Hi(i) {
|
|
|
6625
6628
|
data: i.data
|
|
6626
6629
|
};
|
|
6627
6630
|
}
|
|
6628
|
-
function
|
|
6631
|
+
function Xi(i, e) {
|
|
6629
6632
|
var s, n;
|
|
6630
6633
|
const t = e.find((l) => l.id === i.source), r = e.find((l) => l.id === i.target), o = i.sourcePort || ((s = t == null ? void 0 : t.ports[0]) == null ? void 0 : s.id) || `${i.source}-out`, a = i.targetPort || ((n = r == null ? void 0 : r.ports[0]) == null ? void 0 : n.id) || `${i.target}-in`;
|
|
6631
6634
|
return {
|
|
@@ -6635,19 +6638,19 @@ function Ui(i, e) {
|
|
|
6635
6638
|
targetNodeId: i.target,
|
|
6636
6639
|
targetPortId: a,
|
|
6637
6640
|
label: i.label,
|
|
6638
|
-
style:
|
|
6641
|
+
style: Yi(i.style),
|
|
6639
6642
|
data: i.data
|
|
6640
6643
|
};
|
|
6641
6644
|
}
|
|
6642
|
-
function
|
|
6645
|
+
function Ki(i) {
|
|
6643
6646
|
return {
|
|
6644
6647
|
id: i.id,
|
|
6645
6648
|
label: i.label,
|
|
6646
6649
|
nodeIds: i.nodeIds,
|
|
6647
|
-
style:
|
|
6650
|
+
style: Hi(i.style)
|
|
6648
6651
|
};
|
|
6649
6652
|
}
|
|
6650
|
-
function
|
|
6653
|
+
function Zi(i) {
|
|
6651
6654
|
var e;
|
|
6652
6655
|
return {
|
|
6653
6656
|
id: i.id,
|
|
@@ -6661,7 +6664,7 @@ function Ki(i) {
|
|
|
6661
6664
|
};
|
|
6662
6665
|
}
|
|
6663
6666
|
function Oe(i) {
|
|
6664
|
-
const e = i.nodes.map(
|
|
6667
|
+
const e = i.nodes.map(Ui);
|
|
6665
6668
|
return e.forEach((t, r) => {
|
|
6666
6669
|
t.ports.length === 0 && (t.ports = [
|
|
6667
6670
|
{ id: `${t.id}-out`, side: "right", offset: 0.5 },
|
|
@@ -6675,9 +6678,9 @@ function Oe(i) {
|
|
|
6675
6678
|
title: i.title,
|
|
6676
6679
|
diagramType: i.diagramType,
|
|
6677
6680
|
nodes: e,
|
|
6678
|
-
edges: i.edges.map((t) =>
|
|
6679
|
-
groups: (i.groups || []).map(
|
|
6680
|
-
animations: (i.animations || []).map(
|
|
6681
|
+
edges: i.edges.map((t) => Xi(t, e)),
|
|
6682
|
+
groups: (i.groups || []).map(Ki),
|
|
6683
|
+
animations: (i.animations || []).map(Zi),
|
|
6681
6684
|
viewport: { x: 0, y: 0, zoom: 1 },
|
|
6682
6685
|
metadata: {
|
|
6683
6686
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -6686,14 +6689,14 @@ function Oe(i) {
|
|
|
6686
6689
|
}
|
|
6687
6690
|
};
|
|
6688
6691
|
}
|
|
6689
|
-
const
|
|
6692
|
+
const Ji = Oe({
|
|
6690
6693
|
id: "empty",
|
|
6691
6694
|
title: "",
|
|
6692
6695
|
diagramType: "flowchart",
|
|
6693
6696
|
nodes: [],
|
|
6694
6697
|
edges: []
|
|
6695
|
-
}),
|
|
6696
|
-
document: i =
|
|
6698
|
+
}), Qi = ({
|
|
6699
|
+
document: i = Ji,
|
|
6697
6700
|
lang: e = "en",
|
|
6698
6701
|
autoPlay: t = !1,
|
|
6699
6702
|
showControls: r,
|
|
@@ -6704,7 +6707,7 @@ const Zi = Oe({
|
|
|
6704
6707
|
}) => {
|
|
6705
6708
|
const l = r ?? a, h = o ?? a, [d, g] = te({ ...i.viewport }), [v, u] = te(/* @__PURE__ */ new Map()), [p, y] = te(!1), x = Ge(null), m = Y(() => {
|
|
6706
6709
|
x.current && x.current.stop();
|
|
6707
|
-
const w = new
|
|
6710
|
+
const w = new qi(i.animations, (W) => {
|
|
6708
6711
|
u(new Map(W)), w.isPlaying() || y(!1);
|
|
6709
6712
|
});
|
|
6710
6713
|
x.current = w, w.play(), y(!0);
|
|
@@ -6712,7 +6715,7 @@ const Zi = Oe({
|
|
|
6712
6715
|
var w;
|
|
6713
6716
|
(w = x.current) == null || w.stop(), y(!1), u(/* @__PURE__ */ new Map());
|
|
6714
6717
|
}, []);
|
|
6715
|
-
|
|
6718
|
+
qt.useEffect(() => (t && i.animations.length > 0 && m(), () => {
|
|
6716
6719
|
var w;
|
|
6717
6720
|
(w = x.current) == null || w.stop();
|
|
6718
6721
|
}), [t]);
|
|
@@ -6723,14 +6726,14 @@ const Zi = Oe({
|
|
|
6723
6726
|
() => g((w) => ({ ...w, zoom: Math.max(0.1, w.zoom / 1.2) })),
|
|
6724
6727
|
[]
|
|
6725
6728
|
), _ = Y(() => g({ x: 0, y: 0, zoom: 1 }), []);
|
|
6726
|
-
return /* @__PURE__ */ c(
|
|
6729
|
+
return /* @__PURE__ */ c(Bt, { locale: e, children: /* @__PURE__ */ b(
|
|
6727
6730
|
"div",
|
|
6728
6731
|
{
|
|
6729
6732
|
className: `nice-diagram-viewer ${s ?? ""}`,
|
|
6730
6733
|
style: { display: "flex", flexDirection: "column", height: "100%", ...n },
|
|
6731
6734
|
children: [
|
|
6732
6735
|
l && /* @__PURE__ */ c(
|
|
6733
|
-
|
|
6736
|
+
eo,
|
|
6734
6737
|
{
|
|
6735
6738
|
isPlaying: p,
|
|
6736
6739
|
hasAnimations: i.animations.length > 0,
|
|
@@ -6759,8 +6762,8 @@ const Zi = Oe({
|
|
|
6759
6762
|
}
|
|
6760
6763
|
) });
|
|
6761
6764
|
};
|
|
6762
|
-
process.env.NODE_ENV !== "production" && (
|
|
6763
|
-
const
|
|
6765
|
+
process.env.NODE_ENV !== "production" && (Qi.displayName = "NiceDiagramViewer");
|
|
6766
|
+
const eo = ({
|
|
6764
6767
|
isPlaying: i,
|
|
6765
6768
|
hasAnimations: e,
|
|
6766
6769
|
onPlay: t,
|
|
@@ -6845,23 +6848,23 @@ const Qi = ({
|
|
|
6845
6848
|
]
|
|
6846
6849
|
}
|
|
6847
6850
|
);
|
|
6848
|
-
},
|
|
6849
|
-
cell:
|
|
6850
|
-
expandable:
|
|
6851
|
-
svg:
|
|
6852
|
-
emptyText:
|
|
6853
|
-
badge:
|
|
6854
|
-
expandIcon:
|
|
6855
|
-
modalOverlay:
|
|
6856
|
-
modalContent:
|
|
6857
|
-
modalHeader:
|
|
6858
|
-
modalTitle:
|
|
6859
|
-
modalClose:
|
|
6860
|
-
modalBody:
|
|
6861
|
-
modalSvg:
|
|
6862
|
-
modalFooter:
|
|
6863
|
-
modalInfo:
|
|
6864
|
-
},
|
|
6851
|
+
}, to = "_cell_95fwm_9", ro = "_expandable_95fwm_29", io = "_svg_95fwm_57", oo = "_emptyText_95fwm_67", ao = "_badge_95fwm_79", no = "_expandIcon_95fwm_117", so = "_modalOverlay_95fwm_169", lo = "_modalContent_95fwm_217", co = "_modalHeader_95fwm_267", uo = "_modalTitle_95fwm_285", ho = "_modalClose_95fwm_299", fo = "_modalBody_95fwm_337", po = "_modalSvg_95fwm_357", go = "_modalFooter_95fwm_371", mo = "_modalInfo_95fwm_389", Ce = {
|
|
6852
|
+
cell: to,
|
|
6853
|
+
expandable: ro,
|
|
6854
|
+
svg: io,
|
|
6855
|
+
emptyText: oo,
|
|
6856
|
+
badge: ao,
|
|
6857
|
+
expandIcon: no,
|
|
6858
|
+
modalOverlay: so,
|
|
6859
|
+
modalContent: lo,
|
|
6860
|
+
modalHeader: co,
|
|
6861
|
+
modalTitle: uo,
|
|
6862
|
+
modalClose: ho,
|
|
6863
|
+
modalBody: fo,
|
|
6864
|
+
modalSvg: po,
|
|
6865
|
+
modalFooter: go,
|
|
6866
|
+
modalInfo: mo
|
|
6867
|
+
}, yo = 120, bo = 48, vo = 4, Tt = {
|
|
6865
6868
|
default: "var(--nice-primary, #3b82f6)",
|
|
6866
6869
|
process: "var(--nice-success, #22c55e)",
|
|
6867
6870
|
decision: "var(--nice-warning, #f59e0b)",
|
|
@@ -6887,21 +6890,21 @@ function zt(i) {
|
|
|
6887
6890
|
height: o - t
|
|
6888
6891
|
};
|
|
6889
6892
|
}
|
|
6890
|
-
function
|
|
6893
|
+
function Zt(i) {
|
|
6891
6894
|
var t;
|
|
6892
6895
|
if ((t = i.style) != null && t.backgroundColor)
|
|
6893
6896
|
return i.style.backgroundColor;
|
|
6894
6897
|
const e = i.shape ?? "default";
|
|
6895
6898
|
return Tt[e] ?? Tt.default;
|
|
6896
6899
|
}
|
|
6897
|
-
function
|
|
6900
|
+
function Jt(i, e) {
|
|
6898
6901
|
const t = e.get(i.sourceNodeId), r = e.get(i.targetNodeId);
|
|
6899
6902
|
if (!t || !r)
|
|
6900
6903
|
return null;
|
|
6901
6904
|
const o = t.position.x + t.size.width / 2, a = t.position.y + t.size.height / 2, s = r.position.x + r.size.width / 2, n = r.position.y + r.size.height / 2;
|
|
6902
6905
|
return `M ${o} ${a} L ${s} ${n}`;
|
|
6903
6906
|
}
|
|
6904
|
-
function
|
|
6907
|
+
function wo(i, e) {
|
|
6905
6908
|
const t = zt(i);
|
|
6906
6909
|
return {
|
|
6907
6910
|
version: "1.0",
|
|
@@ -6923,9 +6926,9 @@ function vo(i, e) {
|
|
|
6923
6926
|
}
|
|
6924
6927
|
};
|
|
6925
6928
|
}
|
|
6926
|
-
const
|
|
6929
|
+
const xo = ({ document: i, onClose: e }) => {
|
|
6927
6930
|
const { t } = Ne(), r = zt(i.nodes), o = 40, a = r.width + o * 2, s = r.height + o * 2, n = se(() => new Map(i.nodes.map((l) => [l.id, l])), [i.nodes]);
|
|
6928
|
-
return /* @__PURE__ */ c("div", { className: Ce.modalOverlay, onClick: e, children: /* @__PURE__ */ b("div", { className: Ce.modalContent, onClick: (l) => l.stopPropagation(), children: [
|
|
6931
|
+
return /* @__PURE__ */ c("div", { role: "presentation", className: Ce.modalOverlay, onClick: e, children: /* @__PURE__ */ b("div", { role: "presentation", className: Ce.modalContent, onClick: (l) => l.stopPropagation(), children: [
|
|
6929
6932
|
/* @__PURE__ */ b("div", { className: Ce.modalHeader, children: [
|
|
6930
6933
|
/* @__PURE__ */ c("h3", { className: Ce.modalTitle, children: i.title || t("diagramCellRenderer.diagram", "Diagram") }),
|
|
6931
6934
|
/* @__PURE__ */ c("button", { className: Ce.modalClose, onClick: e, children: /* @__PURE__ */ c(j, { name: "close", size: 20 }) })
|
|
@@ -6938,7 +6941,7 @@ const wo = ({ document: i, onClose: e }) => {
|
|
|
6938
6941
|
children: [
|
|
6939
6942
|
i.edges.map((l) => {
|
|
6940
6943
|
var d, g, v;
|
|
6941
|
-
const h =
|
|
6944
|
+
const h = Jt(l, n);
|
|
6942
6945
|
return h ? /* @__PURE__ */ c(
|
|
6943
6946
|
"path",
|
|
6944
6947
|
{
|
|
@@ -6962,7 +6965,7 @@ const wo = ({ document: i, onClose: e }) => {
|
|
|
6962
6965
|
width: l.size.width,
|
|
6963
6966
|
height: l.size.height,
|
|
6964
6967
|
rx: ((h = l.style) == null ? void 0 : h.borderRadius) ?? 4,
|
|
6965
|
-
fill:
|
|
6968
|
+
fill: Zt(l),
|
|
6966
6969
|
stroke: ((d = l.style) == null ? void 0 : d.borderColor) ?? "var(--nice-text, #1e293b)",
|
|
6967
6970
|
strokeWidth: 1
|
|
6968
6971
|
}
|
|
@@ -6999,23 +7002,23 @@ const wo = ({ document: i, onClose: e }) => {
|
|
|
6999
7002
|
) }),
|
|
7000
7003
|
/* @__PURE__ */ c("div", { className: Ce.modalFooter, children: /* @__PURE__ */ c("span", { className: Ce.modalInfo, children: t("diagramCellRenderer.nodesEdges", "{nodes} nodes • {edges} edges").replace("{nodes}", String(i.nodes.length)).replace("{edges}", String(i.edges.length)) }) })
|
|
7001
7004
|
] }) });
|
|
7002
|
-
},
|
|
7005
|
+
}, Pa = ({
|
|
7003
7006
|
document: i,
|
|
7004
7007
|
nodes: e,
|
|
7005
7008
|
edges: t,
|
|
7006
|
-
width: r =
|
|
7007
|
-
height: o =
|
|
7009
|
+
width: r = yo,
|
|
7010
|
+
height: o = bo,
|
|
7008
7011
|
showCount: a = !0,
|
|
7009
7012
|
expandable: s = !0,
|
|
7010
7013
|
onExpand: n,
|
|
7011
|
-
padding: l =
|
|
7014
|
+
padding: l = vo,
|
|
7012
7015
|
backgroundColor: h = "transparent",
|
|
7013
7016
|
borderRadius: d = 4,
|
|
7014
7017
|
showLabels: g = !1,
|
|
7015
7018
|
edgeColor: v = "var(--nice-text-muted, #94a3b8)",
|
|
7016
7019
|
tooltip: u
|
|
7017
7020
|
}) => {
|
|
7018
|
-
const { t: p } = Ne(), [y, x] = te(!1), m = se(() => i || (e || t ?
|
|
7021
|
+
const { t: p } = Ne(), [y, x] = te(!1), m = se(() => i || (e || t ? wo(e ?? [], t ?? []) : null), [i, e, t]), C = se(() => m ? new Map(m.nodes.map(($) => [$.id, $])) : /* @__PURE__ */ new Map(), [m]), {
|
|
7019
7022
|
bounds: A,
|
|
7020
7023
|
scale: N,
|
|
7021
7024
|
translateX: _,
|
|
@@ -7050,6 +7053,9 @@ const wo = ({ document: i, onClose: e }) => {
|
|
|
7050
7053
|
/* @__PURE__ */ b(
|
|
7051
7054
|
"div",
|
|
7052
7055
|
{
|
|
7056
|
+
role: "button",
|
|
7057
|
+
tabIndex: 0,
|
|
7058
|
+
onKeyDown: Ft,
|
|
7053
7059
|
className: `${Ce.cell} ${s ? Ce.expandable : ""}`,
|
|
7054
7060
|
style: {
|
|
7055
7061
|
width: r,
|
|
@@ -7069,7 +7075,7 @@ const wo = ({ document: i, onClose: e }) => {
|
|
|
7069
7075
|
className: Ce.svg,
|
|
7070
7076
|
children: /* @__PURE__ */ b("g", { transform: `translate(${_}, ${w}) scale(${N})`, children: [
|
|
7071
7077
|
m.edges.map(($) => {
|
|
7072
|
-
const P =
|
|
7078
|
+
const P = Jt($, C);
|
|
7073
7079
|
return P ? /* @__PURE__ */ c(
|
|
7074
7080
|
"path",
|
|
7075
7081
|
{
|
|
@@ -7082,7 +7088,7 @@ const wo = ({ document: i, onClose: e }) => {
|
|
|
7082
7088
|
) : null;
|
|
7083
7089
|
}),
|
|
7084
7090
|
m.nodes.map(($) => {
|
|
7085
|
-
const P =
|
|
7091
|
+
const P = Zt($);
|
|
7086
7092
|
return /* @__PURE__ */ b("g", { children: [
|
|
7087
7093
|
/* @__PURE__ */ c(
|
|
7088
7094
|
"rect",
|
|
@@ -7118,10 +7124,10 @@ const wo = ({ document: i, onClose: e }) => {
|
|
|
7118
7124
|
]
|
|
7119
7125
|
}
|
|
7120
7126
|
),
|
|
7121
|
-
y && m && /* @__PURE__ */ c(
|
|
7127
|
+
y && m && /* @__PURE__ */ c(xo, { document: m, onClose: () => x(!1) })
|
|
7122
7128
|
] });
|
|
7123
7129
|
};
|
|
7124
|
-
function
|
|
7130
|
+
function ko(i, e, t = "roundedRect") {
|
|
7125
7131
|
const r = [], o = [], a = /* @__PURE__ */ new Map();
|
|
7126
7132
|
for (const s of i) {
|
|
7127
7133
|
const n = String(s[e.nodeMapping.idField] ?? "");
|
|
@@ -7182,14 +7188,14 @@ function xo(i, e, t = "roundedRect") {
|
|
|
7182
7188
|
}
|
|
7183
7189
|
return { nodes: r, edges: o };
|
|
7184
7190
|
}
|
|
7185
|
-
async function
|
|
7191
|
+
async function Ra(i, e, t) {
|
|
7186
7192
|
const r = await fetch(i.sourceUrl, { signal: t });
|
|
7187
7193
|
if (!r.ok)
|
|
7188
7194
|
throw new Error(`Failed to fetch data: ${r.status} ${r.statusText}`);
|
|
7189
7195
|
const o = await r.json(), a = Array.isArray(o) ? o : o.value ?? [];
|
|
7190
|
-
return
|
|
7196
|
+
return ko(a, i, e);
|
|
7191
7197
|
}
|
|
7192
|
-
const
|
|
7198
|
+
const Co = {
|
|
7193
7199
|
pending: "var(--nice-text-muted, #9ca3af)",
|
|
7194
7200
|
// gray
|
|
7195
7201
|
active: "var(--nice-primary, #3b82f6)",
|
|
@@ -7202,7 +7208,7 @@ const ko = {
|
|
|
7202
7208
|
// yellow
|
|
7203
7209
|
waiting: "var(--nice-accent, #8b5cf6)"
|
|
7204
7210
|
// purple
|
|
7205
|
-
},
|
|
7211
|
+
}, _o = {
|
|
7206
7212
|
start: "ellipse",
|
|
7207
7213
|
end: "ellipse",
|
|
7208
7214
|
task: "rectangle",
|
|
@@ -7213,7 +7219,7 @@ const ko = {
|
|
|
7213
7219
|
timer: "ellipse",
|
|
7214
7220
|
message: "rectangle",
|
|
7215
7221
|
error: "rectangle"
|
|
7216
|
-
},
|
|
7222
|
+
}, zo = {
|
|
7217
7223
|
start: "play",
|
|
7218
7224
|
end: "stop",
|
|
7219
7225
|
task: "clipboard",
|
|
@@ -7224,7 +7230,7 @@ const ko = {
|
|
|
7224
7230
|
timer: "clock",
|
|
7225
7231
|
message: "mail",
|
|
7226
7232
|
error: "warning"
|
|
7227
|
-
},
|
|
7233
|
+
}, Ea = ({
|
|
7228
7234
|
data: i,
|
|
7229
7235
|
onStepClick: e,
|
|
7230
7236
|
onTransitionClick: t,
|
|
@@ -7232,8 +7238,8 @@ const ko = {
|
|
|
7232
7238
|
animationDelay: o = 1e3,
|
|
7233
7239
|
showTooltips: a = !0,
|
|
7234
7240
|
showMinimap: s = !0,
|
|
7235
|
-
statusColors: n =
|
|
7236
|
-
typeShapes: l =
|
|
7241
|
+
statusColors: n = Co,
|
|
7242
|
+
typeShapes: l = _o,
|
|
7237
7243
|
direction: h = "horizontal",
|
|
7238
7244
|
className: d,
|
|
7239
7245
|
style: g
|
|
@@ -7262,7 +7268,7 @@ const ko = {
|
|
|
7262
7268
|
status: _.status,
|
|
7263
7269
|
assignee: _.assignee,
|
|
7264
7270
|
dueDate: _.dueDate,
|
|
7265
|
-
icon:
|
|
7271
|
+
icon: zo[_.type],
|
|
7266
7272
|
..._.metadata
|
|
7267
7273
|
},
|
|
7268
7274
|
ports: [
|
|
@@ -7290,7 +7296,7 @@ const ko = {
|
|
|
7290
7296
|
condition: _.condition
|
|
7291
7297
|
}
|
|
7292
7298
|
};
|
|
7293
|
-
}), N = r ?
|
|
7299
|
+
}), N = r ? Mo(i.steps) : [];
|
|
7294
7300
|
return Oe({
|
|
7295
7301
|
id: i.id,
|
|
7296
7302
|
title: i.name,
|
|
@@ -7348,7 +7354,7 @@ const ko = {
|
|
|
7348
7354
|
}
|
|
7349
7355
|
);
|
|
7350
7356
|
};
|
|
7351
|
-
function
|
|
7357
|
+
function Mo(i) {
|
|
7352
7358
|
return i.filter((t) => t.status === "completed").map((t, r) => ({
|
|
7353
7359
|
id: `anim-${t.id}`,
|
|
7354
7360
|
targetId: t.id,
|
|
@@ -7358,7 +7364,7 @@ function zo(i) {
|
|
|
7358
7364
|
easing: "ease-out"
|
|
7359
7365
|
}));
|
|
7360
7366
|
}
|
|
7361
|
-
function
|
|
7367
|
+
function Oa(i) {
|
|
7362
7368
|
var a, s;
|
|
7363
7369
|
const t = new DOMParser().parseFromString(i, "text/xml"), r = [], o = [];
|
|
7364
7370
|
return t.querySelectorAll("startEvent").forEach((n) => {
|
|
@@ -7400,7 +7406,7 @@ function Ea(i) {
|
|
|
7400
7406
|
transitions: o
|
|
7401
7407
|
};
|
|
7402
7408
|
}
|
|
7403
|
-
function
|
|
7409
|
+
function Fa(i, e) {
|
|
7404
7410
|
const t = [], r = [];
|
|
7405
7411
|
t.push({
|
|
7406
7412
|
id: "start",
|
|
@@ -7441,18 +7447,18 @@ function Oa(i, e) {
|
|
|
7441
7447
|
transitions: r
|
|
7442
7448
|
};
|
|
7443
7449
|
}
|
|
7444
|
-
const
|
|
7450
|
+
const So = {
|
|
7445
7451
|
dbo: "var(--nice-primary, #3b82f6)",
|
|
7446
7452
|
public: "var(--nice-success, #10b981)",
|
|
7447
7453
|
auth: "var(--nice-accent, #8b5cf6)",
|
|
7448
7454
|
billing: "var(--nice-warning, #f59e0b)",
|
|
7449
7455
|
audit: "var(--nice-danger, #ef4444)"
|
|
7450
|
-
},
|
|
7456
|
+
}, Ao = {
|
|
7451
7457
|
"one-to-one": { left: "1", right: "1" },
|
|
7452
7458
|
"one-to-many": { left: "1", right: "*" },
|
|
7453
7459
|
"many-to-one": { left: "*", right: "1" },
|
|
7454
7460
|
"many-to-many": { left: "*", right: "*" }
|
|
7455
|
-
},
|
|
7461
|
+
}, Wa = ({
|
|
7456
7462
|
schema: i,
|
|
7457
7463
|
onTableClick: e,
|
|
7458
7464
|
onColumnClick: t,
|
|
@@ -7461,14 +7467,14 @@ const Mo = {
|
|
|
7461
7467
|
showOnlyKeys: a = !1,
|
|
7462
7468
|
highlightTables: s = [],
|
|
7463
7469
|
showMinimap: n = !0,
|
|
7464
|
-
schemaColors: l =
|
|
7470
|
+
schemaColors: l = So,
|
|
7465
7471
|
layout: h = "auto",
|
|
7466
7472
|
maxColumnsDisplay: d = 15,
|
|
7467
7473
|
className: g,
|
|
7468
7474
|
style: v
|
|
7469
7475
|
}) => {
|
|
7470
7476
|
const [u, p] = te(null), y = se(() => {
|
|
7471
|
-
const A =
|
|
7477
|
+
const A = Io(i.tables, h), N = i.tables.map((w, W) => {
|
|
7472
7478
|
const $ = A[w.name] || { x: W % 4 * 300, y: Math.floor(W / 4) * 400 }, P = s.includes(w.name), G = u === w.name, H = l[w.schema || "dbo"] || "var(--nice-text-secondary, #6b7280)";
|
|
7473
7479
|
let B = w.columns;
|
|
7474
7480
|
a && (B = B.filter((L) => L.primaryKey || L.foreignKey)), B.length > d && (B = B.slice(0, d));
|
|
@@ -7494,7 +7500,7 @@ const Mo = {
|
|
|
7494
7500
|
schema: w.schema,
|
|
7495
7501
|
columns: B.map((L) => ({
|
|
7496
7502
|
...L,
|
|
7497
|
-
icon:
|
|
7503
|
+
icon: No(L)
|
|
7498
7504
|
})),
|
|
7499
7505
|
totalColumns: w.columns.length,
|
|
7500
7506
|
truncated: w.columns.length > d,
|
|
@@ -7513,7 +7519,7 @@ const Mo = {
|
|
|
7513
7519
|
]
|
|
7514
7520
|
};
|
|
7515
7521
|
}), _ = i.relations.map((w) => {
|
|
7516
|
-
const W =
|
|
7522
|
+
const W = Ao[w.type];
|
|
7517
7523
|
return {
|
|
7518
7524
|
id: w.id,
|
|
7519
7525
|
source: w.fromTable,
|
|
@@ -7524,8 +7530,8 @@ const Mo = {
|
|
|
7524
7530
|
style: {
|
|
7525
7531
|
stroke: "var(--nice-text-secondary, #6b7280)",
|
|
7526
7532
|
strokeWidth: 1.5,
|
|
7527
|
-
arrowHead:
|
|
7528
|
-
arrowTail:
|
|
7533
|
+
arrowHead: Do(w.type),
|
|
7534
|
+
arrowTail: $o(w.type),
|
|
7529
7535
|
lineType: "orthogonal",
|
|
7530
7536
|
strokeDasharray: w.type === "many-to-many" ? "5,5" : void 0
|
|
7531
7537
|
},
|
|
@@ -7591,7 +7597,7 @@ const Mo = {
|
|
|
7591
7597
|
}
|
|
7592
7598
|
);
|
|
7593
7599
|
};
|
|
7594
|
-
function
|
|
7600
|
+
function Io(i, e) {
|
|
7595
7601
|
const t = {};
|
|
7596
7602
|
if (e === "grid") {
|
|
7597
7603
|
const r = Math.ceil(Math.sqrt(i.length));
|
|
@@ -7626,10 +7632,10 @@ function Ao(i, e) {
|
|
|
7626
7632
|
});
|
|
7627
7633
|
return t;
|
|
7628
7634
|
}
|
|
7629
|
-
function
|
|
7635
|
+
function No(i) {
|
|
7630
7636
|
return i.primaryKey ? "lock" : i.foreignKey ? "link" : i.unique ? "zap" : "file";
|
|
7631
7637
|
}
|
|
7632
|
-
function
|
|
7638
|
+
function Do(i) {
|
|
7633
7639
|
switch (i) {
|
|
7634
7640
|
case "one-to-one":
|
|
7635
7641
|
case "many-to-one":
|
|
@@ -7639,7 +7645,7 @@ function No(i) {
|
|
|
7639
7645
|
return "crow";
|
|
7640
7646
|
}
|
|
7641
7647
|
}
|
|
7642
|
-
function
|
|
7648
|
+
function $o(i) {
|
|
7643
7649
|
switch (i) {
|
|
7644
7650
|
case "one-to-one":
|
|
7645
7651
|
case "one-to-many":
|
|
@@ -7649,7 +7655,7 @@ function Do(i) {
|
|
|
7649
7655
|
return "crow";
|
|
7650
7656
|
}
|
|
7651
7657
|
}
|
|
7652
|
-
function
|
|
7658
|
+
function La(i) {
|
|
7653
7659
|
const e = [], t = [], r = /CREATE\s+TABLE\s+(?:`?(\w+)`?\.)?`?(\w+)`?\s*\(([\s\S]*?)\);/gi;
|
|
7654
7660
|
let o;
|
|
7655
7661
|
for (; (o = r.exec(i)) !== null; ) {
|
|
@@ -7694,7 +7700,7 @@ function Wa(i) {
|
|
|
7694
7700
|
relations: t
|
|
7695
7701
|
};
|
|
7696
7702
|
}
|
|
7697
|
-
function
|
|
7703
|
+
function qa(i, e = "postgres") {
|
|
7698
7704
|
const t = [];
|
|
7699
7705
|
for (const r of i.tables) {
|
|
7700
7706
|
const o = r.schema ? `${r.schema}.${r.name}` : r.name;
|
|
@@ -7712,7 +7718,7 @@ function La(i, e = "postgres") {
|
|
|
7712
7718
|
return t.join(`
|
|
7713
7719
|
`);
|
|
7714
7720
|
}
|
|
7715
|
-
const
|
|
7721
|
+
const To = {
|
|
7716
7722
|
active: "var(--nice-success, #10b981)",
|
|
7717
7723
|
away: "var(--nice-warning, #f59e0b)",
|
|
7718
7724
|
busy: "var(--nice-danger, #ef4444)",
|
|
@@ -7728,8 +7734,8 @@ const $o = {
|
|
|
7728
7734
|
"var(--nice-color-accent-pink, #ec4899)",
|
|
7729
7735
|
"var(--nice-info, #14b8a6)",
|
|
7730
7736
|
"var(--nice-info, #6366f1)"
|
|
7731
|
-
],
|
|
7732
|
-
data: i =
|
|
7737
|
+
], Po = { employees: [] }, Va = ({
|
|
7738
|
+
data: i = Po,
|
|
7733
7739
|
rootEmployeeId: e,
|
|
7734
7740
|
onEmployeeClick: t,
|
|
7735
7741
|
onDepartmentClick: r,
|
|
@@ -7740,7 +7746,7 @@ const $o = {
|
|
|
7740
7746
|
maxLevels: l = 0,
|
|
7741
7747
|
orientation: h = "vertical",
|
|
7742
7748
|
spacing: d = { horizontal: 200, vertical: 150 },
|
|
7743
|
-
statusColors: g =
|
|
7749
|
+
statusColors: g = To,
|
|
7744
7750
|
showMinimap: v = !0,
|
|
7745
7751
|
className: u,
|
|
7746
7752
|
style: p
|
|
@@ -7751,8 +7757,8 @@ const $o = {
|
|
|
7751
7757
|
return e;
|
|
7752
7758
|
const P = i.employees.find((H) => !H.managerId);
|
|
7753
7759
|
return (P == null ? void 0 : P.id) || ((G = i.employees[0]) == null ? void 0 : G.id);
|
|
7754
|
-
}, [i.employees, e]), A = se(() =>
|
|
7755
|
-
const P =
|
|
7760
|
+
}, [i.employees, e]), A = se(() => Ro(i.employees, C), [i.employees, C]), N = se(() => {
|
|
7761
|
+
const P = Eo(A, h, d, l), G = [], H = {};
|
|
7756
7762
|
s && i.departments && i.departments.forEach((z, L) => {
|
|
7757
7763
|
const R = z.color || lt[L % lt.length];
|
|
7758
7764
|
H[z.id] = R;
|
|
@@ -7873,7 +7879,7 @@ const $o = {
|
|
|
7873
7879
|
}
|
|
7874
7880
|
);
|
|
7875
7881
|
};
|
|
7876
|
-
function
|
|
7882
|
+
function Ro(i, e) {
|
|
7877
7883
|
const r = new Map(i.map((a) => [a.id, a])).get(e);
|
|
7878
7884
|
if (!r)
|
|
7879
7885
|
return null;
|
|
@@ -7887,7 +7893,7 @@ function Po(i, e) {
|
|
|
7887
7893
|
};
|
|
7888
7894
|
return o(r, 0);
|
|
7889
7895
|
}
|
|
7890
|
-
function
|
|
7896
|
+
function Eo(i, e, t, r) {
|
|
7891
7897
|
const o = {};
|
|
7892
7898
|
if (!i)
|
|
7893
7899
|
return o;
|
|
@@ -7904,7 +7910,7 @@ function Ro(i, e, t, r) {
|
|
|
7904
7910
|
}, n = a(i, 0);
|
|
7905
7911
|
return s(i, 0, 0, n), o;
|
|
7906
7912
|
}
|
|
7907
|
-
function
|
|
7913
|
+
function Ga(i) {
|
|
7908
7914
|
const t = [...new Set(i.map((r) => r.department).filter(Boolean))].map((r, o) => ({
|
|
7909
7915
|
id: r,
|
|
7910
7916
|
name: r,
|
|
@@ -7916,7 +7922,7 @@ function Va(i) {
|
|
|
7916
7922
|
departments: t
|
|
7917
7923
|
};
|
|
7918
7924
|
}
|
|
7919
|
-
function
|
|
7925
|
+
function Ba(i) {
|
|
7920
7926
|
var n;
|
|
7921
7927
|
const e = new Set(i.employees.map((l) => l.managerId).filter(Boolean)), t = (l, h = /* @__PURE__ */ new Set()) => {
|
|
7922
7928
|
if (h.has(l))
|
|
@@ -7935,7 +7941,7 @@ function Ga(i) {
|
|
|
7935
7941
|
managers: e.size
|
|
7936
7942
|
};
|
|
7937
7943
|
}
|
|
7938
|
-
const
|
|
7944
|
+
const ja = ({
|
|
7939
7945
|
data: i,
|
|
7940
7946
|
onActivityClick: e,
|
|
7941
7947
|
onTransitionClick: t,
|
|
@@ -7952,7 +7958,7 @@ const Ba = ({
|
|
|
7952
7958
|
className: u,
|
|
7953
7959
|
style: p
|
|
7954
7960
|
}) => {
|
|
7955
|
-
const { t: y } = Ne(), [x, m] = te(null), C = se(() => "activities" in i ? i :
|
|
7961
|
+
const { t: y } = Ne(), [x, m] = te(null), C = se(() => "activities" in i ? i : Vo(i), [i]), A = se(() => {
|
|
7956
7962
|
if (!s)
|
|
7957
7963
|
return /* @__PURE__ */ new Set();
|
|
7958
7964
|
const P = C.activities.filter((H) => H.avgDuration !== void 0).map((H) => H.avgDuration);
|
|
@@ -7964,10 +7970,10 @@ const Ba = ({
|
|
|
7964
7970
|
C.activities.filter((H) => (H.avgDuration || 0) >= G).map((H) => H.name)
|
|
7965
7971
|
);
|
|
7966
7972
|
}, [C.activities, s, n]), N = se(() => {
|
|
7967
|
-
const P = Math.max(...C.activities.map((z) => z.frequency), 1), G =
|
|
7973
|
+
const P = Math.max(...C.activities.map((z) => z.frequency), 1), G = Oo(C, d), H = C.transitions.filter(
|
|
7968
7974
|
(z) => z.frequency / C.totalCases >= r
|
|
7969
7975
|
), B = C.activities.map((z) => {
|
|
7970
|
-
const L = G[z.name] || { x: 0, y: 0 }, R = C.startActivities.includes(z.name), X = C.endActivities.includes(z.name), T = A.has(z.name), Z = x === z.name, K =
|
|
7976
|
+
const L = G[z.name] || { x: 0, y: 0 }, R = C.startActivities.includes(z.name), X = C.endActivities.includes(z.name), T = A.has(z.name), Z = x === z.name, K = Wo(
|
|
7971
7977
|
z,
|
|
7972
7978
|
l,
|
|
7973
7979
|
P,
|
|
@@ -8002,7 +8008,7 @@ const Ba = ({
|
|
|
8002
8008
|
};
|
|
8003
8009
|
}), U = H.map((z) => {
|
|
8004
8010
|
const L = C.transitions.indexOf(z), R = z.probability || z.frequency / C.totalCases, X = R > 0.5, T = [];
|
|
8005
|
-
return o && T.push(`${z.frequency}x`), a && z.avgDuration && T.push(
|
|
8011
|
+
return o && T.push(`${z.frequency}x`), a && z.avgDuration && T.push(Lo(z.avgDuration)), {
|
|
8006
8012
|
id: `trans-${L}`,
|
|
8007
8013
|
source: z.from,
|
|
8008
8014
|
target: z.to,
|
|
@@ -8020,7 +8026,7 @@ const Ba = ({
|
|
|
8020
8026
|
probability: R
|
|
8021
8027
|
}
|
|
8022
8028
|
};
|
|
8023
|
-
}), V = g > 0 ?
|
|
8029
|
+
}), V = g > 0 ? qo(C, g) : [];
|
|
8024
8030
|
return Oe({
|
|
8025
8031
|
id: "process-mining",
|
|
8026
8032
|
title: y("processMiningDiagram.processMiningDiagram", "Process Mining Diagram"),
|
|
@@ -8089,7 +8095,7 @@ const Ba = ({
|
|
|
8089
8095
|
}
|
|
8090
8096
|
);
|
|
8091
8097
|
};
|
|
8092
|
-
function
|
|
8098
|
+
function Oo(i, e) {
|
|
8093
8099
|
const t = {};
|
|
8094
8100
|
if (e === "circular") {
|
|
8095
8101
|
const r = i.activities;
|
|
@@ -8101,7 +8107,7 @@ function Eo(i, e) {
|
|
|
8101
8107
|
};
|
|
8102
8108
|
});
|
|
8103
8109
|
} else {
|
|
8104
|
-
const r =
|
|
8110
|
+
const r = Fo(i), o = {};
|
|
8105
8111
|
i.activities.forEach((s) => {
|
|
8106
8112
|
const n = r[s.name] || 0;
|
|
8107
8113
|
o[n] = (o[n] || 0) + 1;
|
|
@@ -8119,7 +8125,7 @@ function Eo(i, e) {
|
|
|
8119
8125
|
}
|
|
8120
8126
|
return t;
|
|
8121
8127
|
}
|
|
8122
|
-
function
|
|
8128
|
+
function Fo(i) {
|
|
8123
8129
|
const e = {}, t = /* @__PURE__ */ new Set(), r = i.startActivities.map((o) => ({
|
|
8124
8130
|
activity: o,
|
|
8125
8131
|
level: 0
|
|
@@ -8136,7 +8142,7 @@ function Oo(i) {
|
|
|
8136
8142
|
e[o.name] === void 0 && (e[o.name] = 0);
|
|
8137
8143
|
}), e;
|
|
8138
8144
|
}
|
|
8139
|
-
function
|
|
8145
|
+
function Wo(i, e, t, r, o) {
|
|
8140
8146
|
if (o)
|
|
8141
8147
|
return "var(--nice-danger, #ef4444)";
|
|
8142
8148
|
if (r != null && r[i.name])
|
|
@@ -8168,10 +8174,10 @@ function vt(i, e, t) {
|
|
|
8168
8174
|
}, o = r(i), a = r(e), s = Math.round(o.r + (a.r - o.r) * t), n = Math.round(o.g + (a.g - o.g) * t), l = Math.round(o.b + (a.b - o.b) * t);
|
|
8169
8175
|
return `#${[s, n, l].map((h) => h.toString(16).padStart(2, "0")).join("")}`;
|
|
8170
8176
|
}
|
|
8171
|
-
function
|
|
8177
|
+
function Lo(i) {
|
|
8172
8178
|
return i < 1e3 ? `${i}ms` : i < 6e4 ? `${(i / 1e3).toFixed(1)}s` : i < 36e5 ? `${(i / 6e4).toFixed(1)}m` : i < 864e5 ? `${(i / 36e5).toFixed(1)}h` : `${(i / 864e5).toFixed(1)}d`;
|
|
8173
8179
|
}
|
|
8174
|
-
function
|
|
8180
|
+
function qo(i, e) {
|
|
8175
8181
|
var r;
|
|
8176
8182
|
const t = (r = i.variants) == null ? void 0 : r[0];
|
|
8177
8183
|
return t ? t.activities.map((o, a) => ({
|
|
@@ -8182,7 +8188,7 @@ function Lo(i, e) {
|
|
|
8182
8188
|
delay: a * e
|
|
8183
8189
|
})) : [];
|
|
8184
8190
|
}
|
|
8185
|
-
function
|
|
8191
|
+
function Vo(i) {
|
|
8186
8192
|
const e = i.events.map((u) => ({
|
|
8187
8193
|
...u,
|
|
8188
8194
|
timestamp: u.timestamp instanceof Date ? u.timestamp : new Date(u.timestamp)
|
|
@@ -8263,7 +8269,7 @@ function qo(i) {
|
|
|
8263
8269
|
avgCaseDuration: v
|
|
8264
8270
|
};
|
|
8265
8271
|
}
|
|
8266
|
-
const
|
|
8272
|
+
const Qt = {
|
|
8267
8273
|
module: "var(--nice-primary, #3b82f6)",
|
|
8268
8274
|
package: "var(--nice-success, #10b981)",
|
|
8269
8275
|
microservice: "var(--nice-accent, #8b5cf6)",
|
|
@@ -8272,7 +8278,7 @@ const Jt = {
|
|
|
8272
8278
|
database: "var(--nice-info, #14b8a6)",
|
|
8273
8279
|
external: "var(--nice-text-secondary, #6b7280)",
|
|
8274
8280
|
deprecated: "var(--nice-danger, #ef4444)"
|
|
8275
|
-
},
|
|
8281
|
+
}, er = {
|
|
8276
8282
|
healthy: "var(--nice-success, #10b981)",
|
|
8277
8283
|
warning: "var(--nice-warning, #f59e0b)",
|
|
8278
8284
|
critical: "var(--nice-danger, #ef4444)",
|
|
@@ -8287,7 +8293,7 @@ const Jt = {
|
|
|
8287
8293
|
database: { color: "var(--nice-info, #14b8a6)" },
|
|
8288
8294
|
event: { color: "var(--nice-color-accent-pink, #ec4899)", dash: "2,2" },
|
|
8289
8295
|
circular: { color: "var(--nice-danger, #ef4444)" }
|
|
8290
|
-
},
|
|
8296
|
+
}, Go = {
|
|
8291
8297
|
module: "box",
|
|
8292
8298
|
package: "folder",
|
|
8293
8299
|
microservice: "square",
|
|
@@ -8296,7 +8302,7 @@ const Jt = {
|
|
|
8296
8302
|
database: "database",
|
|
8297
8303
|
external: "globe",
|
|
8298
8304
|
deprecated: "warning"
|
|
8299
|
-
},
|
|
8305
|
+
}, Ya = ({
|
|
8300
8306
|
data: i,
|
|
8301
8307
|
onNodeClick: e,
|
|
8302
8308
|
onEdgeClick: t,
|
|
@@ -8315,7 +8321,7 @@ const Jt = {
|
|
|
8315
8321
|
className: y,
|
|
8316
8322
|
style: x
|
|
8317
8323
|
}) => {
|
|
8318
|
-
const { t: m } = Ne(), [C, A] = te(null), [N, _] = te(null), w = se(() => a ?
|
|
8324
|
+
const { t: m } = Ne(), [C, A] = te(null), [N, _] = te(null), w = se(() => a ? tr(i) : /* @__PURE__ */ new Set(), [i, a]), W = se(() => {
|
|
8319
8325
|
let V = i.nodes;
|
|
8320
8326
|
return r && r.length > 0 && (V = V.filter((z) => r.includes(z.type))), s && (V = V.filter(
|
|
8321
8327
|
(z) => {
|
|
@@ -8328,7 +8334,7 @@ const Jt = {
|
|
|
8328
8334
|
let z = i.edges.filter((L) => V.has(L.source) && V.has(L.target));
|
|
8329
8335
|
return o && o.length > 0 && (z = z.filter((L) => o.includes(L.type))), z;
|
|
8330
8336
|
}, [i.edges, W, o]), P = se(() => {
|
|
8331
|
-
const V =
|
|
8337
|
+
const V = Bo(W, $, n), z = Yo(W, h), L = [];
|
|
8332
8338
|
if (l !== "none") {
|
|
8333
8339
|
const T = /* @__PURE__ */ new Map();
|
|
8334
8340
|
W.forEach((K) => {
|
|
@@ -8338,7 +8344,7 @@ const Jt = {
|
|
|
8338
8344
|
let Z = 0;
|
|
8339
8345
|
T.forEach((K, oe) => {
|
|
8340
8346
|
var ke, E;
|
|
8341
|
-
const ie = l === "type" ?
|
|
8347
|
+
const ie = l === "type" ? Qt[oe] || "var(--nice-text-secondary, #6b7280)" : ((E = (ke = i.groups) == null ? void 0 : ke.find((re) => re.id === oe)) == null ? void 0 : E.color) || ct[Z % ct.length];
|
|
8342
8348
|
L.push({
|
|
8343
8349
|
id: `group-${oe}`,
|
|
8344
8350
|
label: oe,
|
|
@@ -8352,7 +8358,7 @@ const Jt = {
|
|
|
8352
8358
|
});
|
|
8353
8359
|
}
|
|
8354
8360
|
const R = W.map((T) => {
|
|
8355
|
-
const Z = V[T.id] || { x: 0, y: 0 }, K = C === T.id, oe = N === T.id, ie = w.has(T.id), ke =
|
|
8361
|
+
const Z = V[T.id] || { x: 0, y: 0 }, K = C === T.id, oe = N === T.id, ie = w.has(T.id), ke = Ho(T, h, z), E = Uo(T, d, g, ie);
|
|
8356
8362
|
return {
|
|
8357
8363
|
id: T.id,
|
|
8358
8364
|
label: T.name,
|
|
@@ -8360,7 +8366,7 @@ const Jt = {
|
|
|
8360
8366
|
y: Z.y,
|
|
8361
8367
|
width: ke.width,
|
|
8362
8368
|
height: ke.height,
|
|
8363
|
-
shape:
|
|
8369
|
+
shape: Xo(T.type),
|
|
8364
8370
|
style: {
|
|
8365
8371
|
fill: K || oe ? E : "var(--nice-bg, #fff)",
|
|
8366
8372
|
stroke: E,
|
|
@@ -8373,9 +8379,9 @@ const Jt = {
|
|
|
8373
8379
|
data: {
|
|
8374
8380
|
type: "dependency",
|
|
8375
8381
|
node: T,
|
|
8376
|
-
icon:
|
|
8382
|
+
icon: Go[T.type],
|
|
8377
8383
|
isCircular: ie,
|
|
8378
|
-
statusColor:
|
|
8384
|
+
statusColor: er[T.status || "unknown"]
|
|
8379
8385
|
}
|
|
8380
8386
|
};
|
|
8381
8387
|
}), X = $.map((T, Z) => {
|
|
@@ -8474,7 +8480,7 @@ const Jt = {
|
|
|
8474
8480
|
"var(--nice-info, #14b8a6)",
|
|
8475
8481
|
"var(--nice-info, #6366f1)"
|
|
8476
8482
|
];
|
|
8477
|
-
function
|
|
8483
|
+
function tr(i) {
|
|
8478
8484
|
const e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Map();
|
|
8479
8485
|
i.nodes.forEach((s) => t.set(s.id, [])), i.edges.forEach((s) => {
|
|
8480
8486
|
var n;
|
|
@@ -8497,7 +8503,7 @@ function er(i) {
|
|
|
8497
8503
|
r.has(s.id) || a(s.id, []);
|
|
8498
8504
|
}), e;
|
|
8499
8505
|
}
|
|
8500
|
-
function
|
|
8506
|
+
function Bo(i, e, t) {
|
|
8501
8507
|
const r = {};
|
|
8502
8508
|
switch (t) {
|
|
8503
8509
|
case "circular": {
|
|
@@ -8521,7 +8527,7 @@ function Go(i, e, t) {
|
|
|
8521
8527
|
break;
|
|
8522
8528
|
}
|
|
8523
8529
|
case "hierarchical": {
|
|
8524
|
-
const o =
|
|
8530
|
+
const o = jo(i, e), a = {}, s = {};
|
|
8525
8531
|
i.forEach((n) => {
|
|
8526
8532
|
const l = o[n.id] || 0;
|
|
8527
8533
|
a[l] = (a[l] || 0) + 1;
|
|
@@ -8564,7 +8570,7 @@ function Go(i, e, t) {
|
|
|
8564
8570
|
}
|
|
8565
8571
|
return r;
|
|
8566
8572
|
}
|
|
8567
|
-
function
|
|
8573
|
+
function jo(i, e) {
|
|
8568
8574
|
const t = {}, r = {};
|
|
8569
8575
|
i.forEach((a) => {
|
|
8570
8576
|
t[a.id] = 0, r[a.id] = 0;
|
|
@@ -8580,7 +8586,7 @@ function Bo(i, e) {
|
|
|
8580
8586
|
}
|
|
8581
8587
|
return t;
|
|
8582
8588
|
}
|
|
8583
|
-
function
|
|
8589
|
+
function Yo(i, e) {
|
|
8584
8590
|
const t = i.map((r) => {
|
|
8585
8591
|
var o, a, s;
|
|
8586
8592
|
switch (e) {
|
|
@@ -8601,7 +8607,7 @@ function jo(i, e) {
|
|
|
8601
8607
|
max: Math.max(...t, 1)
|
|
8602
8608
|
};
|
|
8603
8609
|
}
|
|
8604
|
-
function
|
|
8610
|
+
function Ho(i, e, t) {
|
|
8605
8611
|
var l, h, d;
|
|
8606
8612
|
if (e === "fixed")
|
|
8607
8613
|
return { width: 140, height: 70 };
|
|
@@ -8625,21 +8631,21 @@ function Yo(i, e, t) {
|
|
|
8625
8631
|
const o = t.max > t.min ? (r - t.min) / (t.max - t.min) : 0.5, a = 100, n = a + o * (180 - a);
|
|
8626
8632
|
return { width: n, height: n * 0.5 };
|
|
8627
8633
|
}
|
|
8628
|
-
function
|
|
8634
|
+
function Uo(i, e, t, r) {
|
|
8629
8635
|
if (r)
|
|
8630
8636
|
return "var(--nice-danger, #ef4444)";
|
|
8631
8637
|
if (t != null && t[i.id])
|
|
8632
8638
|
return t[i.id];
|
|
8633
8639
|
switch (e) {
|
|
8634
8640
|
case "status":
|
|
8635
|
-
return
|
|
8641
|
+
return er[i.status || "unknown"];
|
|
8636
8642
|
case "group":
|
|
8637
|
-
return ct[
|
|
8643
|
+
return ct[Ko(i.group || "") % ct.length];
|
|
8638
8644
|
default:
|
|
8639
|
-
return
|
|
8645
|
+
return Qt[i.type] || "var(--nice-text-secondary, #6b7280)";
|
|
8640
8646
|
}
|
|
8641
8647
|
}
|
|
8642
|
-
function
|
|
8648
|
+
function Xo(i) {
|
|
8643
8649
|
switch (i) {
|
|
8644
8650
|
case "database":
|
|
8645
8651
|
return "cylinder";
|
|
@@ -8653,13 +8659,13 @@ function Uo(i) {
|
|
|
8653
8659
|
return "rectangle";
|
|
8654
8660
|
}
|
|
8655
8661
|
}
|
|
8656
|
-
function
|
|
8662
|
+
function Ko(i) {
|
|
8657
8663
|
let e = 0;
|
|
8658
8664
|
for (let t = 0; t < i.length; t++)
|
|
8659
8665
|
e = (e << 5) - e + i.charCodeAt(t), e |= 0;
|
|
8660
8666
|
return Math.abs(e);
|
|
8661
8667
|
}
|
|
8662
|
-
function
|
|
8668
|
+
function Ha(i) {
|
|
8663
8669
|
const e = [
|
|
8664
8670
|
{
|
|
8665
8671
|
id: i.name,
|
|
@@ -8693,13 +8699,13 @@ function Ya(i) {
|
|
|
8693
8699
|
};
|
|
8694
8700
|
}), { nodes: e, edges: t };
|
|
8695
8701
|
}
|
|
8696
|
-
function
|
|
8702
|
+
function Ua(i) {
|
|
8697
8703
|
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
|
|
8698
8704
|
i.nodes.forEach((d) => {
|
|
8699
8705
|
e.set(d.id, 0), t.set(d.id, 0);
|
|
8700
8706
|
}), i.edges.forEach((d) => {
|
|
8701
8707
|
e.set(d.target, (e.get(d.target) || 0) + 1), t.set(d.source, (t.get(d.source) || 0) + 1);
|
|
8702
|
-
}),
|
|
8708
|
+
}), tr(i);
|
|
8703
8709
|
let r = null, o = 0;
|
|
8704
8710
|
i.nodes.forEach((d) => {
|
|
8705
8711
|
const g = e.get(d.id) || 0;
|
|
@@ -8724,14 +8730,14 @@ function Ha(i) {
|
|
|
8724
8730
|
avgDependencies: Math.round(h * 10) / 10
|
|
8725
8731
|
};
|
|
8726
8732
|
}
|
|
8727
|
-
const
|
|
8733
|
+
const Zo = {
|
|
8728
8734
|
online: "var(--nice-success, #10b981)",
|
|
8729
8735
|
offline: "var(--nice-text-secondary, #6b7280)",
|
|
8730
8736
|
warning: "var(--nice-warning, #f59e0b)",
|
|
8731
8737
|
critical: "var(--nice-danger, #ef4444)",
|
|
8732
8738
|
maintenance: "var(--nice-primary, #3b82f6)",
|
|
8733
8739
|
unknown: "var(--nice-text-muted, #9ca3af)"
|
|
8734
|
-
},
|
|
8740
|
+
}, Jo = {
|
|
8735
8741
|
router: "shuffle",
|
|
8736
8742
|
switch: "plug",
|
|
8737
8743
|
firewall: "lock",
|
|
@@ -8747,14 +8753,14 @@ const Ko = {
|
|
|
8747
8753
|
cloud: "cloud",
|
|
8748
8754
|
internet: "globe",
|
|
8749
8755
|
unknown: "help"
|
|
8750
|
-
},
|
|
8756
|
+
}, Qo = {
|
|
8751
8757
|
ethernet: "var(--nice-primary, #3b82f6)",
|
|
8752
8758
|
fiber: "var(--nice-success, #10b981)",
|
|
8753
8759
|
wireless: "var(--nice-accent, #8b5cf6)",
|
|
8754
8760
|
vpn: "var(--nice-warning, #f59e0b)",
|
|
8755
8761
|
wan: "var(--nice-color-accent-pink, #ec4899)",
|
|
8756
8762
|
trunk: "var(--nice-info, #14b8a6)"
|
|
8757
|
-
},
|
|
8763
|
+
}, Xa = ({
|
|
8758
8764
|
data: i,
|
|
8759
8765
|
onDeviceClick: e,
|
|
8760
8766
|
onConnectionClick: t,
|
|
@@ -8768,7 +8774,7 @@ const Ko = {
|
|
|
8768
8774
|
showBandwidth: d = !0,
|
|
8769
8775
|
showLatency: g = !1,
|
|
8770
8776
|
animateTraffic: v = !1,
|
|
8771
|
-
statusColors: u =
|
|
8777
|
+
statusColors: u = Zo,
|
|
8772
8778
|
showMinimap: p = !0,
|
|
8773
8779
|
className: y,
|
|
8774
8780
|
style: x
|
|
@@ -8791,7 +8797,7 @@ const Ko = {
|
|
|
8791
8797
|
const B = new Set(w.map((U) => U.id));
|
|
8792
8798
|
return i.connections.filter((U) => B.has(U.source) && B.has(U.target));
|
|
8793
8799
|
}, [i.connections, w]), $ = se(() => {
|
|
8794
|
-
const B =
|
|
8800
|
+
const B = ea(
|
|
8795
8801
|
w,
|
|
8796
8802
|
W,
|
|
8797
8803
|
n,
|
|
@@ -8830,7 +8836,7 @@ const Ko = {
|
|
|
8830
8836
|
});
|
|
8831
8837
|
}
|
|
8832
8838
|
const V = w.map((R) => {
|
|
8833
|
-
const X = B[R.id] || { x: 0, y: 0 }, T = C === R.id, Z = u[R.status], K =
|
|
8839
|
+
const X = B[R.id] || { x: 0, y: 0 }, T = C === R.id, Z = u[R.status], K = Jo[R.type];
|
|
8834
8840
|
return {
|
|
8835
8841
|
id: R.id,
|
|
8836
8842
|
label: R.name,
|
|
@@ -8838,7 +8844,7 @@ const Ko = {
|
|
|
8838
8844
|
y: X.y,
|
|
8839
8845
|
width: 120,
|
|
8840
8846
|
height: h ? 90 : 70,
|
|
8841
|
-
shape:
|
|
8847
|
+
shape: ta(R.type),
|
|
8842
8848
|
style: {
|
|
8843
8849
|
fill: T ? Z : "var(--nice-bg, #fff)",
|
|
8844
8850
|
stroke: Z,
|
|
@@ -8856,7 +8862,7 @@ const Ko = {
|
|
|
8856
8862
|
}
|
|
8857
8863
|
};
|
|
8858
8864
|
}), z = W.map((R, X) => {
|
|
8859
|
-
const T =
|
|
8865
|
+
const T = Qo[R.type] || "var(--nice-text-secondary, #6b7280)", Z = R.status === "active", K = R.status === "degraded" || R.status === "error", oe = [];
|
|
8860
8866
|
if (d && R.bandwidth) {
|
|
8861
8867
|
const ie = Math.round(
|
|
8862
8868
|
R.bandwidth.used / R.bandwidth.total * 100
|
|
@@ -8885,7 +8891,7 @@ const Ko = {
|
|
|
8885
8891
|
isDegraded: K
|
|
8886
8892
|
}
|
|
8887
8893
|
};
|
|
8888
|
-
}), L = v ?
|
|
8894
|
+
}), L = v ? ra(W) : [];
|
|
8889
8895
|
return Oe({
|
|
8890
8896
|
id: "network-topology",
|
|
8891
8897
|
title: m("networkTopology.networkTopology", "Network Topology"),
|
|
@@ -8960,7 +8966,7 @@ const Ko = {
|
|
|
8960
8966
|
"var(--nice-info, #14b8a6)",
|
|
8961
8967
|
"var(--nice-info, #6366f1)"
|
|
8962
8968
|
];
|
|
8963
|
-
function
|
|
8969
|
+
function ea(i, e, t, r) {
|
|
8964
8970
|
var a;
|
|
8965
8971
|
const o = {};
|
|
8966
8972
|
switch (t) {
|
|
@@ -9059,7 +9065,7 @@ function Qo(i, e, t, r) {
|
|
|
9059
9065
|
}
|
|
9060
9066
|
return o;
|
|
9061
9067
|
}
|
|
9062
|
-
function
|
|
9068
|
+
function ta(i) {
|
|
9063
9069
|
switch (i) {
|
|
9064
9070
|
case "router":
|
|
9065
9071
|
case "switch":
|
|
@@ -9076,7 +9082,7 @@ function ea(i) {
|
|
|
9076
9082
|
return "rectangle";
|
|
9077
9083
|
}
|
|
9078
9084
|
}
|
|
9079
|
-
function
|
|
9085
|
+
function ra(i) {
|
|
9080
9086
|
return i.filter((e) => e.status === "active" && e.bandwidth && e.bandwidth.used > 0).map((e, t) => ({
|
|
9081
9087
|
id: `traffic-${t}`,
|
|
9082
9088
|
type: "flow",
|
|
@@ -9085,7 +9091,7 @@ function ta(i) {
|
|
|
9085
9091
|
delay: t * 200
|
|
9086
9092
|
}));
|
|
9087
9093
|
}
|
|
9088
|
-
async function
|
|
9094
|
+
async function Ka(i = {}) {
|
|
9089
9095
|
return {
|
|
9090
9096
|
devices: [
|
|
9091
9097
|
{
|
|
@@ -9178,7 +9184,7 @@ async function Xa(i = {}) {
|
|
|
9178
9184
|
]
|
|
9179
9185
|
};
|
|
9180
9186
|
}
|
|
9181
|
-
function
|
|
9187
|
+
function Za(i) {
|
|
9182
9188
|
const e = i.devices.filter((g) => g.status === "online").length, t = i.devices.filter((g) => g.status === "offline").length, r = i.devices.filter((g) => g.status === "warning").length, o = i.devices.filter((g) => g.status === "critical").length, a = i.connections.filter((g) => g.status === "active").length, s = i.connections.filter(
|
|
9183
9189
|
(g) => g.status === "degraded" || g.status === "error"
|
|
9184
9190
|
).length, n = i.devices.length > 0 ? e / i.devices.length * 100 : 0, l = i.connections.length > 0 ? a / i.connections.length * 100 : 0, h = o * 10 + r * 5 + s * 5;
|
|
@@ -9195,7 +9201,7 @@ function Ka(i) {
|
|
|
9195
9201
|
degradedConnections: s
|
|
9196
9202
|
};
|
|
9197
9203
|
}
|
|
9198
|
-
const
|
|
9204
|
+
const ia = [
|
|
9199
9205
|
{
|
|
9200
9206
|
target: ".nice-decision-tree-editor",
|
|
9201
9207
|
titleKey: "tutorial.decisionTreeEditor.intro.title",
|
|
@@ -9204,13 +9210,13 @@ const ra = [
|
|
|
9204
9210
|
content: "Explore the decision tree: click nodes to inspect conditions and outcomes, toggle metrics, probabilities and samples, and highlight a path for an input.",
|
|
9205
9211
|
placement: "auto"
|
|
9206
9212
|
}
|
|
9207
|
-
],
|
|
9213
|
+
], oa = {
|
|
9208
9214
|
root: "var(--nice-accent, #8b5cf6)",
|
|
9209
9215
|
decision: "var(--nice-primary, #3b82f6)",
|
|
9210
9216
|
leaf: "var(--nice-success, #10b981)",
|
|
9211
9217
|
chance: "var(--nice-warning, #f59e0b)",
|
|
9212
9218
|
end: "var(--nice-danger, #ef4444)"
|
|
9213
|
-
},
|
|
9219
|
+
}, Ja = ({
|
|
9214
9220
|
data: i,
|
|
9215
9221
|
onChange: e,
|
|
9216
9222
|
onNodeClick: t,
|
|
@@ -9228,10 +9234,10 @@ const ra = [
|
|
|
9228
9234
|
style: p,
|
|
9229
9235
|
tutorial: y
|
|
9230
9236
|
}) => {
|
|
9231
|
-
const { t: x } = Ne(), [m, C] = te(null), [A, N] = te(/* @__PURE__ */ new Set()), _ = se(() => n ?
|
|
9237
|
+
const { t: x } = Ne(), [m, C] = te(null), [A, N] = te(/* @__PURE__ */ new Set()), _ = se(() => n ? ca(i.root, n) : /* @__PURE__ */ new Set(), [i.root, n]), { nodes: w, edges: W } = se(() => aa(i.root, i.edges), [i.root, i.edges]), $ = se(() => sa(w), [w]), P = se(() => {
|
|
9232
9238
|
var L, R;
|
|
9233
|
-
const U =
|
|
9234
|
-
const T = U[X.id] || { x: 0, y: 0 }, Z = m === X.id, K = _.has(X.id), oe = X.type === "leaf" || X.type === "end", ie =
|
|
9239
|
+
const U = na(i.root, d, g), V = w.map((X) => {
|
|
9240
|
+
const T = U[X.id] || { x: 0, y: 0 }, Z = m === X.id, K = _.has(X.id), oe = X.type === "leaf" || X.type === "end", ie = la(X, l, h, $), ke = oe ? 120 : 160, E = o ? 80 : oe ? 60 : 70;
|
|
9235
9241
|
return {
|
|
9236
9242
|
id: X.id,
|
|
9237
9243
|
label: X.label,
|
|
@@ -9282,7 +9288,7 @@ const ra = [
|
|
|
9282
9288
|
diagramType: "decisionTree",
|
|
9283
9289
|
nodes: V,
|
|
9284
9290
|
edges: z,
|
|
9285
|
-
animations: n ?
|
|
9291
|
+
animations: n ? da(Array.from(_)) : [],
|
|
9286
9292
|
metadata: {
|
|
9287
9293
|
type: "decision-tree",
|
|
9288
9294
|
algorithm: (L = i.metadata) == null ? void 0 : L.algorithm,
|
|
@@ -9324,7 +9330,7 @@ const ra = [
|
|
|
9324
9330
|
className: `nice-decision-tree-editor ${u || ""}`,
|
|
9325
9331
|
style: { position: "relative", width: "100%", height: "100%", ...p },
|
|
9326
9332
|
children: [
|
|
9327
|
-
/* @__PURE__ */ c("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ c(
|
|
9333
|
+
/* @__PURE__ */ c("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ c(Wt, { steps: Lt(y, ia) }) }),
|
|
9328
9334
|
/* @__PURE__ */ c(
|
|
9329
9335
|
Re,
|
|
9330
9336
|
{
|
|
@@ -9342,7 +9348,7 @@ const ra = [
|
|
|
9342
9348
|
}
|
|
9343
9349
|
);
|
|
9344
9350
|
};
|
|
9345
|
-
function
|
|
9351
|
+
function aa(i, e) {
|
|
9346
9352
|
const t = [], r = e ? [...e] : [], o = new Set(r.map((s) => `${s.source}-${s.target}`)), a = (s, n) => {
|
|
9347
9353
|
t.push(s), n && !o.has(`${n}-${s.id}`) && r.push({
|
|
9348
9354
|
id: `e-${n}-${s.id}`,
|
|
@@ -9363,7 +9369,7 @@ function oa(i, e) {
|
|
|
9363
9369
|
};
|
|
9364
9370
|
return a(i), { nodes: t, edges: r };
|
|
9365
9371
|
}
|
|
9366
|
-
function
|
|
9372
|
+
function na(i, e, t) {
|
|
9367
9373
|
const r = {}, o = (n) => !n.children || n.children.length === 0 ? 1 : n.children.reduce((l, h) => l + o(h), 0), a = (n, l, h, d) => {
|
|
9368
9374
|
const g = h + d * t.horizontal / 2, v = l * t.vertical + 50;
|
|
9369
9375
|
if (r[n.id] = e === "vertical" ? { x: g, y: v } : { x: v, y: g }, n.children) {
|
|
@@ -9376,7 +9382,7 @@ function aa(i, e, t) {
|
|
|
9376
9382
|
}, s = o(i);
|
|
9377
9383
|
return a(i, 0, 0, s), r;
|
|
9378
9384
|
}
|
|
9379
|
-
function
|
|
9385
|
+
function sa(i) {
|
|
9380
9386
|
const e = i.filter((r) => {
|
|
9381
9387
|
var o;
|
|
9382
9388
|
return ((o = r.metrics) == null ? void 0 : o.impurity) !== void 0;
|
|
@@ -9395,7 +9401,7 @@ function na(i) {
|
|
|
9395
9401
|
}
|
|
9396
9402
|
};
|
|
9397
9403
|
}
|
|
9398
|
-
function
|
|
9404
|
+
function la(i, e, t, r) {
|
|
9399
9405
|
var o, a, s;
|
|
9400
9406
|
if (t != null && t[i.id])
|
|
9401
9407
|
return t[i.id];
|
|
@@ -9432,7 +9438,7 @@ function sa(i, e, t, r) {
|
|
|
9432
9438
|
}[i.outcome.class.toLowerCase()] || "var(--nice-primary, #3b82f6)";
|
|
9433
9439
|
break;
|
|
9434
9440
|
}
|
|
9435
|
-
return
|
|
9441
|
+
return oa[i.type] || "var(--nice-text-secondary, #6b7280)";
|
|
9436
9442
|
}
|
|
9437
9443
|
function Et(i, e, t) {
|
|
9438
9444
|
const r = (h) => {
|
|
@@ -9446,12 +9452,12 @@ function Et(i, e, t) {
|
|
|
9446
9452
|
}, o = r(i), a = r(e), s = Math.round(o.r + (a.r - o.r) * t), n = Math.round(o.g + (a.g - o.g) * t), l = Math.round(o.b + (a.b - o.b) * t);
|
|
9447
9453
|
return `#${[s, n, l].map((h) => h.toString(16).padStart(2, "0")).join("")}`;
|
|
9448
9454
|
}
|
|
9449
|
-
function
|
|
9455
|
+
function ca(i, e) {
|
|
9450
9456
|
const t = /* @__PURE__ */ new Set(), r = (o) => {
|
|
9451
9457
|
if (t.add(o.id), o.type === "leaf" || o.type === "end" || !o.children)
|
|
9452
9458
|
return !0;
|
|
9453
9459
|
if (o.condition) {
|
|
9454
|
-
const a = e[o.condition.feature], n =
|
|
9460
|
+
const a = e[o.condition.feature], n = rr(
|
|
9455
9461
|
a,
|
|
9456
9462
|
o.condition.operator,
|
|
9457
9463
|
o.condition.value
|
|
@@ -9463,7 +9469,7 @@ function la(i, e) {
|
|
|
9463
9469
|
};
|
|
9464
9470
|
return r(i), t;
|
|
9465
9471
|
}
|
|
9466
|
-
function
|
|
9472
|
+
function rr(i, e, t) {
|
|
9467
9473
|
switch (e) {
|
|
9468
9474
|
case "=":
|
|
9469
9475
|
return i === t;
|
|
@@ -9487,7 +9493,7 @@ function tr(i, e, t) {
|
|
|
9487
9493
|
return !1;
|
|
9488
9494
|
}
|
|
9489
9495
|
}
|
|
9490
|
-
function
|
|
9496
|
+
function da(i) {
|
|
9491
9497
|
return i.map((e, t) => ({
|
|
9492
9498
|
id: `path-${t}`,
|
|
9493
9499
|
type: "highlight",
|
|
@@ -9496,7 +9502,7 @@ function ca(i) {
|
|
|
9496
9502
|
delay: t * 300
|
|
9497
9503
|
}));
|
|
9498
9504
|
}
|
|
9499
|
-
function
|
|
9505
|
+
function Qa(i) {
|
|
9500
9506
|
const { tree: e, feature_names: t, class_names: r } = i;
|
|
9501
9507
|
e.children_left.length;
|
|
9502
9508
|
const o = (s) => {
|
|
@@ -9536,14 +9542,14 @@ function Ja(i) {
|
|
|
9536
9542
|
classes: r,
|
|
9537
9543
|
metadata: {
|
|
9538
9544
|
algorithm: "sklearn.DecisionTreeClassifier",
|
|
9539
|
-
maxDepth:
|
|
9545
|
+
maxDepth: ir(a)
|
|
9540
9546
|
}
|
|
9541
9547
|
};
|
|
9542
9548
|
}
|
|
9543
|
-
function
|
|
9544
|
-
return !i.children || i.children.length === 0 ? e : Math.max(...i.children.map((t) =>
|
|
9549
|
+
function ir(i, e = 0) {
|
|
9550
|
+
return !i.children || i.children.length === 0 ? e : Math.max(...i.children.map((t) => ir(t, e + 1)));
|
|
9545
9551
|
}
|
|
9546
|
-
function
|
|
9552
|
+
function en(i) {
|
|
9547
9553
|
const e = (r, o) => typeof r == "string" ? {
|
|
9548
9554
|
id: o,
|
|
9549
9555
|
type: "leaf",
|
|
@@ -9565,7 +9571,7 @@ function Qa(i) {
|
|
|
9565
9571
|
]
|
|
9566
9572
|
} };
|
|
9567
9573
|
}
|
|
9568
|
-
function
|
|
9574
|
+
function tn(i, e) {
|
|
9569
9575
|
const t = [], r = (a) => {
|
|
9570
9576
|
var s, n;
|
|
9571
9577
|
if (t.push(a.id), a.type === "leaf" || a.type === "end" || !a.children)
|
|
@@ -9574,7 +9580,7 @@ function en(i, e) {
|
|
|
9574
9580
|
probability: (n = a.outcome) == null ? void 0 : n.probability
|
|
9575
9581
|
};
|
|
9576
9582
|
if (a.condition) {
|
|
9577
|
-
const l = e[a.condition.feature], d =
|
|
9583
|
+
const l = e[a.condition.feature], d = rr(
|
|
9578
9584
|
l,
|
|
9579
9585
|
a.condition.operator,
|
|
9580
9586
|
a.condition.value
|
|
@@ -9590,9 +9596,9 @@ function en(i, e) {
|
|
|
9590
9596
|
path: t
|
|
9591
9597
|
};
|
|
9592
9598
|
}
|
|
9593
|
-
let
|
|
9599
|
+
let ua = 0;
|
|
9594
9600
|
function Mt() {
|
|
9595
|
-
return `tmpl-${++
|
|
9601
|
+
return `tmpl-${++ua}-${Date.now().toString(36)}`;
|
|
9596
9602
|
}
|
|
9597
9603
|
function le(i, e, t = "roundedRect", r = { width: 160, height: 60 }, o) {
|
|
9598
9604
|
return {
|
|
@@ -9637,7 +9643,7 @@ function je(i, e, t, r) {
|
|
|
9637
9643
|
metadata: { createdAt: o, updatedAt: o }
|
|
9638
9644
|
};
|
|
9639
9645
|
}
|
|
9640
|
-
function
|
|
9646
|
+
function ha() {
|
|
9641
9647
|
const i = le("Commit", { x: 40, y: 200 }, "circle", { width: 80, height: 80 }), e = le("Build", { x: 200, y: 200 }, "roundedRect"), t = le("Test", { x: 420, y: 200 }, "roundedRect"), r = le("Deploy", { x: 640, y: 200 }, "roundedRect"), o = le("Production", { x: 860, y: 200 }, "hexagon", { width: 140, height: 80 });
|
|
9642
9648
|
return je(
|
|
9643
9649
|
"CI/CD Pipeline",
|
|
@@ -9651,7 +9657,7 @@ function ua() {
|
|
|
9651
9657
|
]
|
|
9652
9658
|
);
|
|
9653
9659
|
}
|
|
9654
|
-
function
|
|
9660
|
+
function fa() {
|
|
9655
9661
|
const i = le("API Gateway", { x: 350, y: 40 }, "hexagon", { width: 160, height: 80 }), e = le("Auth Service", { x: 80, y: 200 }, "roundedRect"), t = le("User Service", { x: 300, y: 200 }, "roundedRect"), r = le("Order Service", { x: 520, y: 200 }, "roundedRect"), o = le("Notification", { x: 740, y: 200 }, "roundedRect"), a = le("Users DB", { x: 180, y: 380 }, "cylinder", { width: 120, height: 70 }), s = le("Orders DB", { x: 520, y: 380 }, "cylinder", { width: 120, height: 70 }), n = le("Message Queue", { x: 620, y: 380 }, "parallelogram", {
|
|
9656
9662
|
width: 160,
|
|
9657
9663
|
height: 60
|
|
@@ -9666,7 +9672,7 @@ function ha() {
|
|
|
9666
9672
|
];
|
|
9667
9673
|
return je("Microservices Architecture", "flowchart", l, h);
|
|
9668
9674
|
}
|
|
9669
|
-
function
|
|
9675
|
+
function pa() {
|
|
9670
9676
|
const i = le("Start", { x: 350, y: 20 }, "circle", { width: 70, height: 70 }), e = le("Landing Page", { x: 310, y: 140 }, "roundedRect"), t = le("Sign Up", { x: 140, y: 280 }, "roundedRect"), r = le("Log In", { x: 480, y: 280 }, "roundedRect"), o = le("Dashboard", { x: 310, y: 420 }, "roundedRect"), a = le("End", { x: 350, y: 560 }, "circle", { width: 70, height: 70 });
|
|
9671
9677
|
return je(
|
|
9672
9678
|
"User Flow",
|
|
@@ -9682,7 +9688,7 @@ function fa() {
|
|
|
9682
9688
|
]
|
|
9683
9689
|
);
|
|
9684
9690
|
}
|
|
9685
|
-
function
|
|
9691
|
+
function ga() {
|
|
9686
9692
|
const i = le("Users", { x: 80, y: 100 }, "rectangle", { width: 180, height: 100 }), e = le("Orders", { x: 380, y: 100 }, "rectangle", { width: 180, height: 100 }), t = le("Products", { x: 380, y: 320 }, "rectangle", {
|
|
9687
9693
|
width: 180,
|
|
9688
9694
|
height: 100
|
|
@@ -9701,7 +9707,7 @@ function pa() {
|
|
|
9701
9707
|
]
|
|
9702
9708
|
);
|
|
9703
9709
|
}
|
|
9704
|
-
function
|
|
9710
|
+
function ma() {
|
|
9705
9711
|
const i = le("CEO", { x: 350, y: 40 }, "roundedRect"), e = le("CTO", { x: 150, y: 180 }, "roundedRect"), t = le("CFO", { x: 550, y: 180 }, "roundedRect"), r = le("Engineering", { x: 50, y: 320 }, "roundedRect"), o = le("DevOps", { x: 250, y: 320 }, "roundedRect"), a = le("Accounting", { x: 550, y: 320 }, "roundedRect");
|
|
9706
9712
|
return je(
|
|
9707
9713
|
"Organization Chart",
|
|
@@ -9716,7 +9722,7 @@ function ga() {
|
|
|
9716
9722
|
]
|
|
9717
9723
|
);
|
|
9718
9724
|
}
|
|
9719
|
-
function
|
|
9725
|
+
function ya() {
|
|
9720
9726
|
const i = le("Idle", { x: 80, y: 200 }, "circle", { width: 90, height: 90 }), e = le("Loading", { x: 300, y: 80 }, "roundedRect"), t = le("Success", { x: 520, y: 80 }, "roundedRect"), r = le("Error", { x: 520, y: 320 }, "roundedRect"), o = le("Retry", { x: 300, y: 320 }, "diamond", { width: 100, height: 100 });
|
|
9721
9727
|
return je(
|
|
9722
9728
|
"State Machine",
|
|
@@ -9740,7 +9746,7 @@ const St = [
|
|
|
9740
9746
|
category: "software",
|
|
9741
9747
|
diagramType: "flowchart",
|
|
9742
9748
|
tags: ["devops", "ci", "cd", "pipeline", "deployment"],
|
|
9743
|
-
create:
|
|
9749
|
+
create: ha
|
|
9744
9750
|
},
|
|
9745
9751
|
{
|
|
9746
9752
|
id: "microservices",
|
|
@@ -9749,7 +9755,7 @@ const St = [
|
|
|
9749
9755
|
category: "software",
|
|
9750
9756
|
diagramType: "flowchart",
|
|
9751
9757
|
tags: ["architecture", "microservices", "api", "backend"],
|
|
9752
|
-
create:
|
|
9758
|
+
create: fa
|
|
9753
9759
|
},
|
|
9754
9760
|
{
|
|
9755
9761
|
id: "user-flow",
|
|
@@ -9758,7 +9764,7 @@ const St = [
|
|
|
9758
9764
|
category: "general",
|
|
9759
9765
|
diagramType: "flowchart",
|
|
9760
9766
|
tags: ["ux", "user-flow", "journey", "wireframe"],
|
|
9761
|
-
create:
|
|
9767
|
+
create: pa
|
|
9762
9768
|
},
|
|
9763
9769
|
{
|
|
9764
9770
|
id: "er-diagram",
|
|
@@ -9767,7 +9773,7 @@ const St = [
|
|
|
9767
9773
|
category: "software",
|
|
9768
9774
|
diagramType: "er",
|
|
9769
9775
|
tags: ["database", "er", "schema", "sql"],
|
|
9770
|
-
create:
|
|
9776
|
+
create: ga
|
|
9771
9777
|
},
|
|
9772
9778
|
{
|
|
9773
9779
|
id: "org-chart",
|
|
@@ -9776,7 +9782,7 @@ const St = [
|
|
|
9776
9782
|
category: "business",
|
|
9777
9783
|
diagramType: "orgchart",
|
|
9778
9784
|
tags: ["org", "hierarchy", "team", "management"],
|
|
9779
|
-
create:
|
|
9785
|
+
create: ma
|
|
9780
9786
|
},
|
|
9781
9787
|
{
|
|
9782
9788
|
id: "state-machine",
|
|
@@ -9785,22 +9791,22 @@ const St = [
|
|
|
9785
9791
|
category: "software",
|
|
9786
9792
|
diagramType: "stateMachine",
|
|
9787
9793
|
tags: ["state", "fsm", "transitions", "machine"],
|
|
9788
|
-
create:
|
|
9794
|
+
create: ya
|
|
9789
9795
|
}
|
|
9790
9796
|
];
|
|
9791
|
-
function
|
|
9797
|
+
function rn(i) {
|
|
9792
9798
|
return St.find((e) => e.id === i);
|
|
9793
9799
|
}
|
|
9794
|
-
function
|
|
9800
|
+
function on(i) {
|
|
9795
9801
|
return St.filter((e) => e.category === i);
|
|
9796
9802
|
}
|
|
9797
|
-
function
|
|
9803
|
+
function an(i) {
|
|
9798
9804
|
const e = i.toLowerCase();
|
|
9799
9805
|
return St.filter(
|
|
9800
9806
|
(t) => t.name.toLowerCase().includes(e) || t.description.toLowerCase().includes(e) || t.tags.some((r) => r.includes(e))
|
|
9801
9807
|
);
|
|
9802
9808
|
}
|
|
9803
|
-
class
|
|
9809
|
+
class ba {
|
|
9804
9810
|
constructor(e = {}) {
|
|
9805
9811
|
this.versions = [], this.currentVersionIndex = -1, this.autoSaveTimer = null, this.lastDocument = null, this.listeners = /* @__PURE__ */ new Set(), this.config = {
|
|
9806
9812
|
maxVersions: e.maxVersions ?? 100,
|
|
@@ -9828,7 +9834,7 @@ class ya {
|
|
|
9828
9834
|
/** Save a new version. */
|
|
9829
9835
|
saveVersion(e, t) {
|
|
9830
9836
|
const r = this.lastDocument ? this.calculateChanges(this.lastDocument, e) : [{ type: "node-added", description: "Initial version" }], o = {
|
|
9831
|
-
id:
|
|
9837
|
+
id: va(),
|
|
9832
9838
|
number: this.versions.length + 1,
|
|
9833
9839
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
9834
9840
|
userId: this.config.userId,
|
|
@@ -10036,11 +10042,11 @@ class ya {
|
|
|
10036
10042
|
this.versions = [], this.currentVersionIndex = -1, this.lastDocument = null, this.notify();
|
|
10037
10043
|
}
|
|
10038
10044
|
}
|
|
10039
|
-
function
|
|
10045
|
+
function va() {
|
|
10040
10046
|
return `v_${Date.now()}_${Math.random().toString(36).slice(2, 9)}`;
|
|
10041
10047
|
}
|
|
10042
|
-
function
|
|
10043
|
-
const e = new
|
|
10048
|
+
function nn(i) {
|
|
10049
|
+
const e = new ba(i);
|
|
10044
10050
|
return {
|
|
10045
10051
|
manager: e,
|
|
10046
10052
|
saveVersion: e.saveVersion.bind(e),
|
|
@@ -10049,14 +10055,14 @@ function an(i) {
|
|
|
10049
10055
|
diff: e.diff.bind(e)
|
|
10050
10056
|
};
|
|
10051
10057
|
}
|
|
10052
|
-
class
|
|
10058
|
+
class sn {
|
|
10053
10059
|
constructor(e) {
|
|
10054
10060
|
this.comments = /* @__PURE__ */ new Map(), this.listeners = /* @__PURE__ */ new Set(), this.mentionListeners = /* @__PURE__ */ new Set(), this.config = e;
|
|
10055
10061
|
}
|
|
10056
10062
|
/** Add a new comment. */
|
|
10057
10063
|
addComment(e, t, r) {
|
|
10058
10064
|
const o = this.parseMentions(t), a = {
|
|
10059
|
-
id:
|
|
10065
|
+
id: wa(),
|
|
10060
10066
|
anchor: e,
|
|
10061
10067
|
status: "open",
|
|
10062
10068
|
authorId: this.config.userId,
|
|
@@ -10098,7 +10104,7 @@ class nn {
|
|
|
10098
10104
|
if (!r)
|
|
10099
10105
|
return null;
|
|
10100
10106
|
const o = this.parseMentions(t), a = {
|
|
10101
|
-
id:
|
|
10107
|
+
id: xa(),
|
|
10102
10108
|
authorId: this.config.userId,
|
|
10103
10109
|
authorName: this.config.userName,
|
|
10104
10110
|
authorAvatar: this.config.userAvatar,
|
|
@@ -10216,13 +10222,13 @@ class nn {
|
|
|
10216
10222
|
Object.assign(this.config, e);
|
|
10217
10223
|
}
|
|
10218
10224
|
}
|
|
10219
|
-
function
|
|
10225
|
+
function wa() {
|
|
10220
10226
|
return `comment_${Date.now()}_${Math.random().toString(36).slice(2, 9)}`;
|
|
10221
10227
|
}
|
|
10222
|
-
function
|
|
10228
|
+
function xa() {
|
|
10223
10229
|
return `reply_${Date.now()}_${Math.random().toString(36).slice(2, 9)}`;
|
|
10224
10230
|
}
|
|
10225
|
-
const
|
|
10231
|
+
const ln = {
|
|
10226
10232
|
low: {
|
|
10227
10233
|
backgroundColor: "var(--nice-primary-bg, #e3f2fd)",
|
|
10228
10234
|
borderColor: "var(--nice-primary, #2196f3)",
|
|
@@ -10248,11 +10254,11 @@ const sn = {
|
|
|
10248
10254
|
icon: "flame"
|
|
10249
10255
|
}
|
|
10250
10256
|
};
|
|
10251
|
-
function
|
|
10257
|
+
function cn(i) {
|
|
10252
10258
|
const e = new Date(i), r = (/* @__PURE__ */ new Date()).getTime() - e.getTime(), o = Math.floor(r / (1e3 * 60)), a = Math.floor(o / 60), s = Math.floor(a / 24);
|
|
10253
10259
|
return o < 1 ? "just now" : o < 60 ? `${o}m ago` : a < 24 ? `${a}h ago` : s < 7 ? `${s}d ago` : e.toLocaleDateString();
|
|
10254
10260
|
}
|
|
10255
|
-
function
|
|
10261
|
+
function dn(i, e) {
|
|
10256
10262
|
if (e.length === 0)
|
|
10257
10263
|
return i;
|
|
10258
10264
|
const t = [...e].sort((o, a) => a.startIndex - o.startIndex);
|
|
@@ -10263,7 +10269,7 @@ function cn(i, e) {
|
|
|
10263
10269
|
}
|
|
10264
10270
|
return r;
|
|
10265
10271
|
}
|
|
10266
|
-
class
|
|
10272
|
+
class ka {
|
|
10267
10273
|
constructor() {
|
|
10268
10274
|
this.profiles = /* @__PURE__ */ new Map(), this.activeProfileId = null, this.listeners = /* @__PURE__ */ new Set(), this.cache = /* @__PURE__ */ new Map(), this.profiles.set("default", {
|
|
10269
10275
|
id: "default",
|
|
@@ -10518,7 +10524,7 @@ class xa {
|
|
|
10518
10524
|
this.activeProfileId = t.activeProfileId, this.invalidateCache(), this.notify();
|
|
10519
10525
|
}
|
|
10520
10526
|
}
|
|
10521
|
-
const
|
|
10527
|
+
const or = [
|
|
10522
10528
|
{
|
|
10523
10529
|
id: "status-success",
|
|
10524
10530
|
name: "Status: Success",
|
|
@@ -10610,21 +10616,21 @@ const ir = [
|
|
|
10610
10616
|
actions: [{ type: "set_opacity", value: 0.5 }]
|
|
10611
10617
|
}
|
|
10612
10618
|
];
|
|
10613
|
-
function
|
|
10614
|
-
const e =
|
|
10619
|
+
function un(i) {
|
|
10620
|
+
const e = or.find((t) => t.id === i);
|
|
10615
10621
|
return e ? {
|
|
10616
10622
|
...e,
|
|
10617
10623
|
id: `${e.id}_${Date.now()}`
|
|
10618
10624
|
} : null;
|
|
10619
10625
|
}
|
|
10620
|
-
function
|
|
10621
|
-
const e = new
|
|
10626
|
+
function hn(i = !1) {
|
|
10627
|
+
const e = new ka();
|
|
10622
10628
|
if (i)
|
|
10623
|
-
for (const t of
|
|
10629
|
+
for (const t of or)
|
|
10624
10630
|
e.addRule(t);
|
|
10625
10631
|
return e;
|
|
10626
10632
|
}
|
|
10627
|
-
class
|
|
10633
|
+
class fn {
|
|
10628
10634
|
constructor() {
|
|
10629
10635
|
this.nodes = [], this.edges = [], this.groups = [], this.presets = /* @__PURE__ */ new Map(), this.state = {
|
|
10630
10636
|
query: "",
|
|
@@ -11022,7 +11028,7 @@ class hn {
|
|
|
11022
11028
|
JSON.parse(e).forEach((r) => this.presets.set(r.id, r));
|
|
11023
11029
|
}
|
|
11024
11030
|
}
|
|
11025
|
-
function
|
|
11031
|
+
function pn(i, e, t = "search-highlight") {
|
|
11026
11032
|
if (e.length === 0)
|
|
11027
11033
|
return i;
|
|
11028
11034
|
const r = [...e].sort((a, s) => s.start - a.start);
|
|
@@ -11033,7 +11039,7 @@ function fn(i, e, t = "search-highlight") {
|
|
|
11033
11039
|
}
|
|
11034
11040
|
return o;
|
|
11035
11041
|
}
|
|
11036
|
-
function
|
|
11042
|
+
function gn(i, e) {
|
|
11037
11043
|
switch (i) {
|
|
11038
11044
|
case "by-type":
|
|
11039
11045
|
return {
|
|
@@ -11067,86 +11073,86 @@ function pn(i, e) {
|
|
|
11067
11073
|
}
|
|
11068
11074
|
}
|
|
11069
11075
|
export {
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
|
|
11073
|
-
|
|
11076
|
+
qi as AnimationPlayer,
|
|
11077
|
+
Yt as AnimationTimeline,
|
|
11078
|
+
ln as COMMENT_PRIORITY_STYLES,
|
|
11079
|
+
ka as ConditionalStylingEngine,
|
|
11074
11080
|
_t as DIAGRAM_STYLE_PRESETS,
|
|
11075
11081
|
St as DIAGRAM_TEMPLATES,
|
|
11076
11082
|
Re as DiagramCanvas,
|
|
11077
|
-
|
|
11078
|
-
|
|
11079
|
-
|
|
11083
|
+
Pa as DiagramCellRenderer,
|
|
11084
|
+
sn as DiagramCommentManager,
|
|
11085
|
+
Ht as DiagramMinimap,
|
|
11080
11086
|
xt as DiagramModel,
|
|
11081
|
-
|
|
11082
|
-
|
|
11083
|
-
|
|
11084
|
-
|
|
11085
|
-
|
|
11086
|
-
|
|
11087
|
-
|
|
11088
|
-
|
|
11089
|
-
|
|
11090
|
-
|
|
11091
|
-
|
|
11092
|
-
|
|
11087
|
+
pr as DiagramParticleEngine,
|
|
11088
|
+
Ut as DiagramPropertyPanel,
|
|
11089
|
+
fn as DiagramSearchFilterEngine,
|
|
11090
|
+
Xt as DiagramToolbar,
|
|
11091
|
+
ba as DiagramVersioningManager,
|
|
11092
|
+
Ia as EDGE_STYLE_CATALOG,
|
|
11093
|
+
Aa as NODE_STYLE_CATALOG,
|
|
11094
|
+
Yt as NiceAnimationTimeline,
|
|
11095
|
+
Wa as NiceDatabaseSchemaViewer,
|
|
11096
|
+
Ja as NiceDecisionTreeEditor,
|
|
11097
|
+
Ya as NiceDependencyGraph,
|
|
11098
|
+
Qi as NiceDiagram,
|
|
11093
11099
|
Re as NiceDiagramCanvas,
|
|
11094
|
-
|
|
11095
|
-
|
|
11096
|
-
|
|
11097
|
-
|
|
11098
|
-
|
|
11099
|
-
|
|
11100
|
-
|
|
11101
|
-
|
|
11102
|
-
|
|
11103
|
-
|
|
11104
|
-
|
|
11105
|
-
|
|
11106
|
-
|
|
11107
|
-
|
|
11108
|
-
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
-
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
|
|
11116
|
-
|
|
11100
|
+
Wi as NiceDiagramEditor,
|
|
11101
|
+
Ht as NiceDiagramMinimap,
|
|
11102
|
+
Ut as NiceDiagramPropertyPanel,
|
|
11103
|
+
Xt as NiceDiagramToolbar,
|
|
11104
|
+
Qi as NiceDiagramViewer,
|
|
11105
|
+
Bt as NiceI18nProvider,
|
|
11106
|
+
Xa as NiceNetworkTopology,
|
|
11107
|
+
Va as NiceOrgChartVisualizer,
|
|
11108
|
+
ja as NiceProcessMiningDiagram,
|
|
11109
|
+
Ea as NiceWorkflowVisualizer,
|
|
11110
|
+
or as PRESET_RULES,
|
|
11111
|
+
Ci as TRANSITION_PRESETS,
|
|
11112
|
+
Ua as analyzeDependencyGraph,
|
|
11113
|
+
Za as calculateNetworkHealth,
|
|
11114
|
+
Ba as calculateOrgStats,
|
|
11115
|
+
mr as computeGlowRadius,
|
|
11116
|
+
wr as computeLayout,
|
|
11117
|
+
Zi as convertAnimation,
|
|
11118
|
+
Xi as convertEdge,
|
|
11119
|
+
Ki as convertGroup,
|
|
11120
|
+
Ui as convertNode,
|
|
11121
|
+
hn as createConditionalStylingEngine,
|
|
11122
|
+
en as createDecisionTree,
|
|
11117
11123
|
Oe as createDiagramDocument,
|
|
11118
|
-
|
|
11119
|
-
|
|
11120
|
-
|
|
11121
|
-
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
|
|
11124
|
+
gr as createGlowFilterId,
|
|
11125
|
+
Fa as createLinearWorkflow,
|
|
11126
|
+
Ga as createOrgChartFromEmployees,
|
|
11127
|
+
Ta as createPresetFromTheme,
|
|
11128
|
+
gn as createQuickFilter,
|
|
11129
|
+
un as createRuleFromPreset,
|
|
11130
|
+
nn as createVersioningHook,
|
|
11131
|
+
Ka as discoverNetworkTopology,
|
|
11132
|
+
yr as exportToMermaid,
|
|
11127
11133
|
It as exportToSvg,
|
|
11128
|
-
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11134
|
+
Ra as fetchAndGenerateDiagram,
|
|
11135
|
+
cn as formatCommentDate,
|
|
11136
|
+
ko as generateDiagramFromData,
|
|
11137
|
+
Na as getDiagramStylePreset,
|
|
11138
|
+
Da as getDiagramStylePresetsByCategory,
|
|
11139
|
+
Li as getEasing,
|
|
11140
|
+
Ma as getPointOnPath,
|
|
11141
|
+
rn as getTemplateById,
|
|
11142
|
+
on as getTemplatesByCategory,
|
|
11143
|
+
pn as highlightMatches,
|
|
11144
|
+
Vo as mineProcessFromLog,
|
|
11145
|
+
Oa as parseBPMNToWorkflow,
|
|
11146
|
+
Sa as parseNddJson,
|
|
11147
|
+
Ha as parsePackageJsonToDependencies,
|
|
11148
|
+
La as parseSQLToSchema,
|
|
11149
|
+
Qa as parseSklearnTree,
|
|
11150
|
+
tn as predictWithTree,
|
|
11151
|
+
$a as presetToThemeOverrides,
|
|
11152
|
+
dn as renderTextWithMentions,
|
|
11153
|
+
qa as schemaToSQL,
|
|
11154
|
+
an as searchTemplates,
|
|
11155
|
+
br as stringifyNddJson,
|
|
11156
|
+
zr as useDiagramEditor,
|
|
11151
11157
|
Ne as useNiceTranslation
|
|
11152
11158
|
};
|