@nxgt/material 1.12.3 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/abnfDiagram-O67JEVCF-mm89LXw2.js +89 -0
- package/dist/architecture-7GRP2DOG-DDr0RGVC.js +3 -0
- package/dist/architectureDiagram-NJMV4G6O-CGoA5SIv.js +4146 -0
- package/dist/array-CApNbSU9.js +6 -0
- package/dist/blockDiagram-BEXU5L5S-Dq8gitB4.js +1946 -0
- package/dist/c4Diagram-YGBWAQC7-DO_alqIu.js +2990 -0
- package/dist/channel-1fT-W0NS.js +5 -0
- package/dist/chunk-2Q5K7J3B-kzxEEeTu.js +15 -0
- package/dist/chunk-3FUC2YCW-C3yD2fMw.js +364 -0
- package/dist/chunk-5DYCD2WN-Dn2jrYde.js +37 -0
- package/dist/chunk-5VM5RSS4-Cr17nBXp.js +5 -0
- package/dist/chunk-6AEJRKK7-JyfUnUEu.js +10 -0
- package/dist/chunk-742MDFTN-BbWkrtj2.js +275 -0
- package/dist/chunk-7INBJB4K-C3x7JNTG.js +4487 -0
- package/dist/chunk-7M6MHVWA-Cc7UTu4b.js +4256 -0
- package/dist/chunk-7PRAP22T-C8rsGRvH.js +67 -0
- package/dist/chunk-DUW6YSOI-BdOla2G8.js +10 -0
- package/dist/chunk-FOHPRMQF-Crq0JMf2.js +21388 -0
- package/dist/chunk-GNY47TPC-d-Bi8r0p.js +75 -0
- package/dist/chunk-GTNCS2PH-CTS015lZ.js +490 -0
- package/dist/chunk-GWA4HPMP-B4pgM-E1.js +61 -0
- package/dist/chunk-J5ZVWO5B-CYzz6Pq8.js +12 -0
- package/dist/chunk-JWPE2WC7-Ccb0QaC8.js +8 -0
- package/dist/chunk-LNGE3PJU-CiGrDO_F.js +1513 -0
- package/dist/chunk-MBY4JIJT-Dg6AeftH.js +1847 -0
- package/dist/chunk-NETBCI7D-TXZM0vKz.js +236 -0
- package/dist/chunk-O7XYJQB3-md6vjVm4.js +3922 -0
- package/dist/chunk-UA2S7LBM-DQTYPe9y.js +363 -0
- package/dist/chunk-WEXAMYUT-DmKWJz6y.js +26 -0
- package/dist/chunk-XXDRQBXY-C9XIYQdM.js +9 -0
- package/dist/chunk-Y2CYZVJY-i11wjrBe.js +12 -0
- package/dist/chunk-Z7XXMR3K-BoDf6lxl.js +677 -0
- package/dist/chunk-ZIGJFQKS-CP5430fN.js +663 -0
- package/dist/classDiagram-v2-NBCMYWYE-6KoTmufe.js +3397 -0
- package/dist/components.js +3 -3
- package/dist/cose-bilkent-JH36ORCC-CejnZl_t.js +2251 -0
- package/dist/cynefin-OW5HDTMX-B8HVdZhp.js +3 -0
- package/dist/cynefinDiagram-VND7K2PF-DZnc0dlm.js +349 -0
- package/dist/cytoscape.esm-_jXi1N4y.js +18151 -0
- package/dist/dagre-6A5THRUB-cuS57NO5.js +2192 -0
- package/dist/diagram-22UHCM2B-zQSFmH0t.js +5084 -0
- package/dist/diagram-3UASUU5V-D45Fgu1j.js +724 -0
- package/dist/diagram-ATOU4E4O-YMtQnlqd.js +432 -0
- package/dist/diagram-CDSNMT55-DP7UmEW1.js +301 -0
- package/dist/diagram-MLGK6HIB-WvSqrTRC.js +134 -0
- package/dist/diagram-MPIPVDR6-C2F3__mt.js +214 -0
- package/dist/dist-1DdJvBEt.js +50 -0
- package/dist/{dist-DGsPFADz.js → dist-DppLdkXt.js} +2 -2
- package/dist/dnd.js +2 -2
- package/dist/ebnfDiagram-ZINNZB2B-BZC6cSiy.js +100 -0
- package/dist/elk-276RUBZZ-7DJf1MEV.js +47598 -0
- package/dist/erDiagram-OPXOYQCR-YKlEVEF0.js +1970 -0
- package/dist/eventmodeling-NTZA5JFV-C1CEo-26.js +3 -0
- package/dist/flowDiagram-KWPJA3E3-DyLvzIlg.js +17 -0
- package/dist/ganttDiagram-FUAMR5RP-KIaOrYOF.js +2928 -0
- package/dist/gitGraph-4MIJSDKK-BTeCS_5q.js +3 -0
- package/dist/gitGraphDiagram-X574FWY7-DpFW-7JE.js +729 -0
- package/dist/graphlib-DFaO_iIU.js +372 -0
- package/dist/{hooks-BjSuqEof.js → hooks-C5xy0u03.js} +1 -1
- package/dist/hooks.js +1 -1
- package/dist/{i18n-DmVqVJXj.js → i18n-Cech9IAc.js} +328 -843
- package/dist/i18n.js +1 -1
- package/dist/info-A6RAGUB7-BvtuPd9C.js +3 -0
- package/dist/infoDiagram-VRGFBTTK-H3F-BCnu.js +20 -0
- package/dist/init-Buj1GKRa.js +27 -0
- package/dist/isArrayLikeObject-VG1KOJ3m.js +539 -0
- package/dist/ishikawaDiagram-OU5B5YK6-DgQDmcF3.js +719 -0
- package/dist/journeyDiagram-ZHPQQLJL-CanDOlfn.js +884 -0
- package/dist/kanban-definition-PNTS6WVX-DmnUgxgb.js +976 -0
- package/dist/katex-BMQ6LGsM.js +21962 -0
- package/dist/lib/components/index.d.ts +4 -0
- package/dist/lib/components/ui/action-card.d.ts +1 -1
- package/dist/lib/components/ui/chat/chat-composer-mentions.d.ts +8 -0
- package/dist/lib/components/ui/chat/chat-composer.d.ts +5 -1
- package/dist/lib/components/ui/chat/chat-markdown.d.ts +2 -2
- package/dist/lib/components/ui/emoji/emoji-list.d.ts +5 -0
- package/dist/lib/components/ui/emoji/emoji-picker.d.ts +7 -0
- package/dist/lib/components/ui/emoji/emoji.utils.d.ts +2 -0
- package/dist/lib/components/ui/emoji/emoji.utils.test.d.ts +1 -0
- package/dist/lib/components/ui/emoji/index.d.ts +4 -0
- package/dist/lib/components/ui/emoji/types.d.ts +6 -0
- package/dist/lib/components/ui/entity-header.stories.d.ts +1 -0
- package/dist/lib/components/ui/kanban/kanban.stories.d.ts +1 -0
- package/dist/lib/components/ui/markdown/index.d.ts +3 -0
- package/dist/lib/components/ui/markdown/markdown.d.ts +7 -0
- package/dist/lib/components/ui/markdown/markdown.stories.d.ts +14 -0
- package/dist/lib/components/ui/markdown/markdown.test.d.ts +1 -0
- package/dist/lib/components/ui/markdown/markdown.utils.d.ts +1 -0
- package/dist/lib/components/ui/markdown/mermaid.lazy.d.ts +12 -0
- package/dist/lib/components/ui/markdown/partials/markdown-code.d.ts +2 -0
- package/dist/lib/components/ui/markdown/partials/mermaid-diagram.d.ts +4 -0
- package/dist/lib/components/ui/mentions/index.d.ts +3 -0
- package/dist/lib/components/ui/mentions/mention-list.d.ts +8 -0
- package/dist/lib/components/ui/mentions/mentions.utils.d.ts +7 -0
- package/dist/lib/components/ui/mentions/mentions.utils.test.d.ts +1 -0
- package/dist/lib/components/ui/mentions/types.d.ts +7 -0
- package/dist/lib/components/ui/rich-text-editor/extensions/mention/mention-list.d.ts +12 -1
- package/dist/lib/components/ui/terminal/index.d.ts +2 -0
- package/dist/lib/components/ui/terminal/terminal.d.ts +11 -0
- package/dist/lib/components/ui/terminal/terminal.stories.d.ts +14 -0
- package/dist/lib/components/ui/terminal/terminal.utils.d.ts +5 -0
- package/dist/lib/components/ui/terminal/terminal.utils.test.d.ts +1 -0
- package/dist/lib/i18n/resources/en/index.d.ts +13 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +14 -1
- package/dist/lib/i18n/resources/fr/index.d.ts +13 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +14 -1
- package/dist/lib/i18n/resources/index.d.ts +26 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/{lib-B1KXma-r.js → lib-Bbw5QPoj.js} +472 -471
- package/dist/lib.js +2 -2
- package/dist/{main-Cw-Yaqo9.js → main-BjDU9FDM.js} +58614 -29566
- package/dist/main.js +6 -6
- package/dist/material.css +1 -1
- package/dist/math-C5EhTgJw.js +10 -0
- package/dist/mermaid-parser.core-Cz-MfB4Z.js +638 -0
- package/dist/mermaid.core-BI1sunfX.js +1096 -0
- package/dist/mindmap-definition-NLK3R4M7-DW0BIU_q.js +1008 -0
- package/dist/ordinal-DuP05kVQ.js +65 -0
- package/dist/packet-AYTQ26CC-CshIswP8.js +3 -0
- package/dist/path-Cjou0lUh.js +85 -0
- package/dist/pegDiagram-GJSIUBJH-CJIx0u4M.js +94 -0
- package/dist/pie-WAS4IAKB-CYs22y4X.js +3 -0
- package/dist/pieDiagram-5QR66LMP-zAhv5fKz.js +157 -0
- package/dist/quadrantDiagram-O4NWA36T-CO4n_yQo.js +2001 -0
- package/dist/radar-RG4KPBEZ-BOJKjbGv.js +3 -0
- package/dist/railroad-74A4TZTK-Dt1BmUkI.js +3 -0
- package/dist/railroad-abnf-HS5TGJTU-Cs9GMUMY.js +3 -0
- package/dist/railroad-ebnf-LZEXJU2U-D4y0fXoW.js +3 -0
- package/dist/railroad-peg-WCYAUIDC-D2f_ZNR5.js +3 -0
- package/dist/railroadDiagram-XR7U4H2S-B8iV7mfe.js +76 -0
- package/dist/requirementDiagram-PLB6GJNP-CGoX1NrW.js +2228 -0
- package/dist/rough.esm-rcMoXTJj.js +1352 -0
- package/dist/sankeyDiagram-IPEJSGJF-DdSM2wiI.js +962 -0
- package/dist/sequenceDiagram-PO4LG4MO-CCRqF5XO.js +4200 -0
- package/dist/sizeCapture-INFHLROL-CHXIsPO_.js +46 -0
- package/dist/src-B4npqWNl.js +1775 -0
- package/dist/stateDiagram-v2-GCMORJYK-CQTX5ks8.js +2143 -0
- package/dist/step-B6KjpKgN.js +706 -0
- package/dist/string-B-ZWXCs2.js +392 -0
- package/dist/swimlanes-2SLR337P-C2NNOb5n.js +4763 -0
- package/dist/swimlanesDiagram-TC7HE7FX-CPsqPrbP.js +28 -0
- package/dist/timeline-definition-EJHVYXUP-DuxGHv-N.js +1073 -0
- package/dist/treeView-Q6P3EWNA-BrJylG9N.js +3 -0
- package/dist/treemap-WGGIJYW6-DpIZuqbj.js +3 -0
- package/dist/usecaseDiagram-POWQR4AR-cuAeIBW3.js +9932 -0
- package/dist/vennDiagram-UO4OBE2U-DLwBSAnC.js +1880 -0
- package/dist/wardley-WFR3VGLG-CbwdAAbH.js +3 -0
- package/dist/wardleyDiagram-VNRHLVJA-D7IZU6vu.js +645 -0
- package/dist/xychartDiagram-PMCCYNJV-BDOFv_xK.js +2167 -0
- package/package.json +7 -1
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
import { n as e, t } from "./src-B4npqWNl.js";
|
|
2
|
+
import { n } from "./chunk-Y2CYZVJY-i11wjrBe.js";
|
|
3
|
+
import { T as r, g as i, x as a } from "./chunk-O7XYJQB3-md6vjVm4.js";
|
|
4
|
+
import { n as o } from "./chunk-MBY4JIJT-Dg6AeftH.js";
|
|
5
|
+
import { a as s, i as c, t as l } from "./chunk-7PRAP22T-C8rsGRvH.js";
|
|
6
|
+
import { s as u } from "./chunk-J5ZVWO5B-CYzz6Pq8.js";
|
|
7
|
+
import { t as d } from "./rough.esm-rcMoXTJj.js";
|
|
8
|
+
import { i as f, n as p, t as m } from "./chunk-7INBJB4K-C3x7JNTG.js";
|
|
9
|
+
import { n as h } from "./chunk-5DYCD2WN-Dn2jrYde.js";
|
|
10
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-UA2S7LBM.mjs
|
|
11
|
+
var g = /* @__PURE__ */ n(async (n, r) => {
|
|
12
|
+
let l = a(), { theme: p, themeVariables: m, handDrawnSeed: h } = l, { clusterBkg: g, clusterBorder: _, borderColorArray: v } = m, y = _, { labelStyles: b, nodeStyles: x, borderStyles: S, backgroundStyles: C } = c(r), w = n.insert("g").attr("class", "cluster swimlane " + (r.cssClasses || "")).attr("id", r.id).attr("data-id", r.id).attr("data-et", "cluster").attr("data-look", r.look);
|
|
13
|
+
u(w, r.colorIndex, p, v);
|
|
14
|
+
let T = i(l.flowchart.htmlLabels), E = r.direction === "LR", D = w.insert("g").attr("class", "cluster-label swimlane-label"), O = await o(D, r.label, {
|
|
15
|
+
style: r.labelStyle,
|
|
16
|
+
useHtmlLabels: T,
|
|
17
|
+
isNode: !0,
|
|
18
|
+
width: r.width
|
|
19
|
+
}), k = O.getBBox();
|
|
20
|
+
if (T) {
|
|
21
|
+
let e = O.children[0], n = t(O);
|
|
22
|
+
k = e.getBoundingClientRect(), n.attr("width", k.width), n.attr("height", k.height);
|
|
23
|
+
}
|
|
24
|
+
let A = r.padding ?? 0, j = r.width <= k.width + A ? k.width + A : r.width;
|
|
25
|
+
r.width <= k.width + A ? r.diff = (j - r.width) / 2 - A : r.diff = -A;
|
|
26
|
+
let M = r.height, N = r.y - M / 2, P = r.y + M / 2, F = r.x - j / 2, I = r.swimlaneContentTop === void 0 ? N + M / 3 : r.swimlaneContentTop, L = E ? 4 : 0, R = k.height + 2 * L, z, B;
|
|
27
|
+
if (E) {
|
|
28
|
+
let e = Math.max(R, k.height + 2 * L), t = F + e, n = Math.max(0, j - e);
|
|
29
|
+
if (r.look === "handDrawn") {
|
|
30
|
+
let i = d.svg(w), a = s(r, {
|
|
31
|
+
roughness: .7,
|
|
32
|
+
fill: g,
|
|
33
|
+
stroke: y,
|
|
34
|
+
seed: h
|
|
35
|
+
}), o = s(r, {
|
|
36
|
+
roughness: .7,
|
|
37
|
+
fill: "none",
|
|
38
|
+
stroke: y,
|
|
39
|
+
seed: h
|
|
40
|
+
}), c = i.rectangle(F, N, e, M, a);
|
|
41
|
+
z = w.insert(() => c, ":first-child").attr("class", "swimlane-title");
|
|
42
|
+
let l = i.rectangle(t, N, n, M, o);
|
|
43
|
+
B = w.insert(() => l, ":first-child").attr("class", "swimlane-body"), z.select("path:nth-child(2)").attr("style", S.join(";")), z.select("path").attr("style", C.join(";").replace("fill", "stroke"));
|
|
44
|
+
} else z = w.insert("rect", ":first-child"), B = w.insert("rect", ":first-child"), z.attr("class", "swimlane-title").attr("style", x).attr("x", F).attr("y", N).attr("width", e).attr("height", M).attr("fill", g).attr("stroke", y), B.attr("class", "swimlane-body").attr("style", x).attr("x", t).attr("y", N).attr("width", n).attr("height", M).attr("fill", "none").attr("stroke", y);
|
|
45
|
+
let i = F + e / 2, a = r.y;
|
|
46
|
+
D.attr("transform", `translate(${i}, ${a}) rotate(-90) translate(${-k.width / 2}, ${-k.height / 2})`);
|
|
47
|
+
} else {
|
|
48
|
+
let e = Math.max(0, I - N), t = Math.min(R, e), n = N + t, i = Math.max(0, P - n), a = r.x - j / 2;
|
|
49
|
+
if (r.look === "handDrawn") {
|
|
50
|
+
let e = d.svg(w), o = s(r, {
|
|
51
|
+
roughness: .7,
|
|
52
|
+
fill: g,
|
|
53
|
+
stroke: y,
|
|
54
|
+
fillWeight: 3,
|
|
55
|
+
seed: h
|
|
56
|
+
}), c = s(r, {
|
|
57
|
+
roughness: .7,
|
|
58
|
+
fill: "none",
|
|
59
|
+
stroke: y,
|
|
60
|
+
seed: h
|
|
61
|
+
}), l = e.rectangle(a, N, j, t, o);
|
|
62
|
+
z = w.insert(() => l, ":first-child").attr("class", "swimlane-title");
|
|
63
|
+
let u = e.rectangle(a, n, j, i, c);
|
|
64
|
+
B = w.insert(() => u, ":first-child").attr("class", "swimlane-body"), z.select("path:nth-child(2)").attr("style", S.join(";")), z.select("path").attr("style", C.join(";").replace("fill", "stroke"));
|
|
65
|
+
} else z = w.insert("rect", ":first-child"), B = w.insert("rect", ":first-child"), z.attr("class", "swimlane-title").attr("style", x).attr("x", a).attr("y", N).attr("width", j).attr("height", t).attr("fill", g).attr("stroke", y), B.attr("class", "swimlane-body").attr("style", x).attr("x", a).attr("y", n).attr("width", j).attr("height", i).attr("fill", "none").attr("stroke", y);
|
|
66
|
+
let o = r.x - k.width / 2, c = N + (t - k.height) / 2;
|
|
67
|
+
D.attr("transform", `translate(${o}, ${c})`);
|
|
68
|
+
}
|
|
69
|
+
if (e.trace("Swimlane data ", r, JSON.stringify(r)), b) {
|
|
70
|
+
let e = D.select("span");
|
|
71
|
+
e && e.attr("style", b);
|
|
72
|
+
}
|
|
73
|
+
return r.offsetX = 0, r.width = j, r.height = M, r.offsetY = k.height - A / 2, r.intersect = function(e) {
|
|
74
|
+
return f(r, e);
|
|
75
|
+
}, {
|
|
76
|
+
cluster: w,
|
|
77
|
+
labelBBox: k
|
|
78
|
+
};
|
|
79
|
+
}, "swimlane"), _ = /* @__PURE__ */ n(async (n, i) => {
|
|
80
|
+
e.info("Creating subgraph rect for ", i.id, i);
|
|
81
|
+
let l = a(), { theme: g, themeVariables: _, handDrawnSeed: v } = l, { clusterBkg: y, clusterBorder: b, borderColorArray: x } = _, { labelStyles: S, nodeStyles: C, borderStyles: w, backgroundStyles: T } = c(i), E = n.insert("g").attr("class", "cluster " + i.cssClasses).attr("id", i.domId).attr("data-look", i.look);
|
|
82
|
+
u(E, i.colorIndex, g, x);
|
|
83
|
+
let D = r(l), O = E.insert("g").attr("class", "cluster-label "), k;
|
|
84
|
+
k = i.labelType === "markdown" ? await o(O, i.label, {
|
|
85
|
+
style: i.labelStyle,
|
|
86
|
+
useHtmlLabels: D,
|
|
87
|
+
isNode: !0,
|
|
88
|
+
width: i.width
|
|
89
|
+
}) : await m(O, i.label, i.labelStyle || "", !1, !0);
|
|
90
|
+
let A = k.getBBox();
|
|
91
|
+
if (r(l)) {
|
|
92
|
+
let e = k.children[0], n = t(k);
|
|
93
|
+
A = e.getBoundingClientRect(), n.attr("width", A.width), n.attr("height", A.height);
|
|
94
|
+
}
|
|
95
|
+
let j = i.width <= A.width + i.padding ? A.width + i.padding : i.width;
|
|
96
|
+
i.width <= A.width + i.padding ? i.diff = (j - i.width) / 2 - i.padding : i.diff = -i.padding;
|
|
97
|
+
let M = i.height, N = i.x - j / 2, P = i.y - M / 2;
|
|
98
|
+
e.trace("Data ", i, JSON.stringify(i));
|
|
99
|
+
let F;
|
|
100
|
+
if (i.look === "handDrawn") {
|
|
101
|
+
let t = d.svg(E), n = s(i, {
|
|
102
|
+
roughness: .7,
|
|
103
|
+
fill: y,
|
|
104
|
+
stroke: b,
|
|
105
|
+
fillWeight: 3,
|
|
106
|
+
seed: v
|
|
107
|
+
}), r = t.path(p(N, P, j, M, 0), n);
|
|
108
|
+
F = E.insert(() => (e.debug("Rough node insert CXC", r), r), ":first-child"), F.select("path:nth-child(2)").attr("style", w.join(";")), F.select("path").attr("style", T.join(";").replace("fill", "stroke"));
|
|
109
|
+
} else F = E.insert("rect", ":first-child"), F.attr("style", C).attr("rx", i.rx).attr("ry", i.ry).attr("x", N).attr("y", P).attr("width", j).attr("height", M);
|
|
110
|
+
let { subGraphTitleTopMargin: I } = h(l);
|
|
111
|
+
if (O.attr("transform", `translate(${i.x - A.width / 2}, ${i.y - i.height / 2 + I})`), S) {
|
|
112
|
+
let e = O.select("span");
|
|
113
|
+
e && e.attr("style", S);
|
|
114
|
+
}
|
|
115
|
+
let L = F.node().getBBox();
|
|
116
|
+
return i.offsetX = 0, i.width = L.width, i.height = L.height, i.offsetY = A.height - i.padding / 2, i.intersect = function(e) {
|
|
117
|
+
return f(i, e);
|
|
118
|
+
}, {
|
|
119
|
+
cluster: E,
|
|
120
|
+
labelBBox: A
|
|
121
|
+
};
|
|
122
|
+
}, "rect"), v = /* @__PURE__ */ n((e, t) => {
|
|
123
|
+
let n = e.insert("g").attr("class", "note-cluster").attr("id", t.domId), r = n.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
|
|
124
|
+
r.attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2 - a).attr("width", t.width + i).attr("height", t.height + i).attr("fill", "none");
|
|
125
|
+
let o = r.node().getBBox();
|
|
126
|
+
return t.width = o.width, t.height = o.height, t.intersect = function(e) {
|
|
127
|
+
return f(t, e);
|
|
128
|
+
}, {
|
|
129
|
+
cluster: n,
|
|
130
|
+
labelBBox: {
|
|
131
|
+
width: 0,
|
|
132
|
+
height: 0
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
}, "noteGroup"), y = /* @__PURE__ */ n(async (e, n) => {
|
|
136
|
+
let i = a(), { theme: o, themeVariables: s, handDrawnSeed: c } = i, { altBackground: l, borderColorArray: h, compositeBackground: g, compositeTitleBackground: _, nodeBorder: v } = s, y = e.insert("g").attr("class", n.cssClasses).attr("id", n.domId).attr("data-id", n.id).attr("data-look", n.look);
|
|
137
|
+
u(y, n.colorIndex, o, h);
|
|
138
|
+
let b = y.insert("g", ":first-child"), x = y.insert("g").attr("class", "cluster-label"), S = y.append("rect"), C = await m(x, n.label, n.labelStyle, void 0, !0), w = C.getBBox();
|
|
139
|
+
if (r(i)) {
|
|
140
|
+
let e = C.children[0], n = t(C);
|
|
141
|
+
w = e.getBoundingClientRect(), n.attr("width", w.width), n.attr("height", w.height);
|
|
142
|
+
}
|
|
143
|
+
let T = 0 * n.padding, E = T / 2, D = (n.width <= w.width + n.padding ? w.width + n.padding : n.width) + T;
|
|
144
|
+
n.width <= w.width + n.padding ? n.diff = (D - n.width) / 2 - n.padding : n.diff = -n.padding;
|
|
145
|
+
let O = n.height + T, k = n.height + T - w.height - 6, A = n.x - D / 2, j = n.y - O / 2;
|
|
146
|
+
n.width = D;
|
|
147
|
+
let M = n.y - n.height / 2 - E + w.height + 2, N;
|
|
148
|
+
if (n.look === "handDrawn") {
|
|
149
|
+
let e = n.cssClasses.includes("statediagram-cluster-alt"), t = d.svg(y), r = n.rx || n.ry ? t.path(p(A, j, D, O, 10), {
|
|
150
|
+
roughness: .7,
|
|
151
|
+
fill: _,
|
|
152
|
+
fillStyle: "solid",
|
|
153
|
+
stroke: v,
|
|
154
|
+
seed: c
|
|
155
|
+
}) : t.rectangle(A, j, D, O, { seed: c });
|
|
156
|
+
N = y.insert(() => r, ":first-child");
|
|
157
|
+
let i = t.rectangle(A, M, D, k, {
|
|
158
|
+
fill: e ? l : g,
|
|
159
|
+
fillStyle: e ? "hachure" : "solid",
|
|
160
|
+
stroke: v,
|
|
161
|
+
seed: c
|
|
162
|
+
});
|
|
163
|
+
N = y.insert(() => r, ":first-child"), S = y.insert(() => i), N.attr("class", "outer"), S.attr("class", "inner");
|
|
164
|
+
} else N = b.insert("rect", ":first-child"), N.attr("class", "outer").attr("x", A).attr("y", j).attr("width", D).attr("height", O).attr("data-look", n.look), S.attr("class", "inner").attr("x", A).attr("y", M).attr("width", D).attr("height", k);
|
|
165
|
+
return x.attr("transform", `translate(${n.x - w.width / 2}, ${j + 1 - (r(i) ? 0 : 3)})`), n.height = N.node().getBBox().height, n.offsetX = 0, n.offsetY = w.height - n.padding / 2, n.labelBBox = w, n.intersect = function(e) {
|
|
166
|
+
return f(n, e);
|
|
167
|
+
}, {
|
|
168
|
+
cluster: y,
|
|
169
|
+
labelBBox: w
|
|
170
|
+
};
|
|
171
|
+
}, "roundedWithTitle"), b = /* @__PURE__ */ n(async (n, i) => {
|
|
172
|
+
e.info("Creating subgraph rect for ", i.id, i);
|
|
173
|
+
let l = a(), { themeVariables: u, handDrawnSeed: m } = l, { clusterBkg: g, clusterBorder: _ } = u, { labelStyles: v, nodeStyles: y, borderStyles: b, backgroundStyles: x } = c(i), S = n.insert("g").attr("class", "cluster " + i.cssClasses).attr("id", i.domId).attr("data-look", i.look), C = r(l), w = S.insert("g").attr("class", "cluster-label "), T = await o(w, i.label, {
|
|
174
|
+
style: i.labelStyle,
|
|
175
|
+
useHtmlLabels: C,
|
|
176
|
+
isNode: !0,
|
|
177
|
+
width: i.width
|
|
178
|
+
}), E = T.getBBox();
|
|
179
|
+
if (r(l)) {
|
|
180
|
+
let e = T.children[0], n = t(T);
|
|
181
|
+
E = e.getBoundingClientRect(), n.attr("width", E.width), n.attr("height", E.height);
|
|
182
|
+
}
|
|
183
|
+
let D = i.width <= E.width + i.padding ? E.width + i.padding : i.width;
|
|
184
|
+
i.width <= E.width + i.padding ? i.diff = (D - i.width) / 2 - i.padding : i.diff = -i.padding;
|
|
185
|
+
let O = i.height, k = i.x - D / 2, A = i.y - O / 2;
|
|
186
|
+
e.trace("Data ", i, JSON.stringify(i));
|
|
187
|
+
let j;
|
|
188
|
+
if (i.look === "handDrawn") {
|
|
189
|
+
let t = d.svg(S), n = s(i, {
|
|
190
|
+
roughness: .7,
|
|
191
|
+
fill: g,
|
|
192
|
+
stroke: _,
|
|
193
|
+
fillWeight: 4,
|
|
194
|
+
seed: m
|
|
195
|
+
}), r = t.path(p(k, A, D, O, i.rx), n);
|
|
196
|
+
j = S.insert(() => (e.debug("Rough node insert CXC", r), r), ":first-child"), j.select("path:nth-child(2)").attr("style", b.join(";")), j.select("path").attr("style", x.join(";").replace("fill", "stroke"));
|
|
197
|
+
} else j = S.insert("rect", ":first-child"), j.attr("style", y).attr("rx", i.rx).attr("ry", i.ry).attr("x", k).attr("y", A).attr("width", D).attr("height", O);
|
|
198
|
+
let { subGraphTitleTopMargin: M } = h(l);
|
|
199
|
+
if (w.attr("transform", `translate(${i.x - E.width / 2}, ${i.y - i.height / 2 + M})`), v) {
|
|
200
|
+
let e = w.select("span");
|
|
201
|
+
e && e.attr("style", v);
|
|
202
|
+
}
|
|
203
|
+
let N = j.node().getBBox();
|
|
204
|
+
return i.offsetX = 0, i.width = N.width, i.height = N.height, i.offsetY = E.height - i.padding / 2, i.intersect = function(e) {
|
|
205
|
+
return f(i, e);
|
|
206
|
+
}, {
|
|
207
|
+
cluster: S,
|
|
208
|
+
labelBBox: E
|
|
209
|
+
};
|
|
210
|
+
}, "kanbanSection"), x = /* @__PURE__ */ n((e, t) => {
|
|
211
|
+
let { theme: n, themeVariables: r, handDrawnSeed: i } = a(), { altBackground: o, nodeBorder: s, borderColorArray: c } = r, l = e.insert("g").attr("class", t.cssClasses).attr("id", t.domId).attr("data-look", t.look);
|
|
212
|
+
u(l, t.colorIndex, n, c);
|
|
213
|
+
let p = l.insert("g", ":first-child"), m = 0 * t.padding, h = t.width + m;
|
|
214
|
+
t.diff = -t.padding;
|
|
215
|
+
let g = t.height + m, _ = t.x - h / 2, v = t.y - g / 2;
|
|
216
|
+
t.width = h;
|
|
217
|
+
let y;
|
|
218
|
+
if (t.look === "handDrawn") {
|
|
219
|
+
let e = d.svg(l).rectangle(_, v, h, g, {
|
|
220
|
+
fill: o ?? "#efefef",
|
|
221
|
+
fillStyle: "solid",
|
|
222
|
+
roughness: .5,
|
|
223
|
+
strokeLineDash: [5],
|
|
224
|
+
stroke: s,
|
|
225
|
+
seed: i
|
|
226
|
+
});
|
|
227
|
+
y = l.insert(() => e, ":first-child").attr("class", "divider");
|
|
228
|
+
} else {
|
|
229
|
+
y = p.insert("rect", ":first-child");
|
|
230
|
+
let e = "outer";
|
|
231
|
+
e = (t.look, "divider"), y.attr("class", e).attr("x", _).attr("y", v).attr("width", h).attr("height", g).attr("data-look", t.look);
|
|
232
|
+
}
|
|
233
|
+
return t.height = y.node().getBBox().height, t.offsetX = 0, t.offsetY = 0, t.intersect = function(e) {
|
|
234
|
+
return f(t, e);
|
|
235
|
+
}, {
|
|
236
|
+
cluster: l,
|
|
237
|
+
labelBBox: {}
|
|
238
|
+
};
|
|
239
|
+
}, "divider"), S = /* @__PURE__ */ n(async (n, i, l) => {
|
|
240
|
+
e.info(`Creating ${l.cssClass} for `, i.id, i);
|
|
241
|
+
let g = a(), { theme: _, themeVariables: v, handDrawnSeed: y } = g, { borderColorArray: b } = v, { labelStyles: x, borderStyles: S } = c(i), C = n.insert("g").attr("class", "cluster " + l.cssClass + " " + i.cssClasses).attr("id", i.domId ?? i.id).attr("data-look", i.look);
|
|
242
|
+
u(C, i.colorIndex, _, b);
|
|
243
|
+
let w = r(g), T = C.insert("g").attr("class", "cluster-label"), E = {
|
|
244
|
+
width: 0,
|
|
245
|
+
height: 0
|
|
246
|
+
}, D = i.label?.trim();
|
|
247
|
+
if (D) {
|
|
248
|
+
let e;
|
|
249
|
+
if (e = i.labelType === "markdown" ? await o(T, i.label, {
|
|
250
|
+
style: i.labelStyle,
|
|
251
|
+
useHtmlLabels: w,
|
|
252
|
+
isNode: !0,
|
|
253
|
+
width: i.width
|
|
254
|
+
}) : await m(T, i.label, i.labelStyle || "", !1, !0), E = e.getBBox(), w) {
|
|
255
|
+
let n = e.children[0], r = t(e);
|
|
256
|
+
E = n.getBoundingClientRect(), r.attr("width", E.width), r.attr("height", E.height);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
let O = i.width <= E.width + i.padding ? E.width + i.padding : i.width;
|
|
260
|
+
i.width <= E.width + i.padding ? i.diff = (O - i.width) / 2 - i.padding : i.diff = -i.padding;
|
|
261
|
+
let k = i.height, A = i.x - O / 2, j = i.y - k / 2, M;
|
|
262
|
+
if (i.look === "handDrawn") {
|
|
263
|
+
let e = d.svg(C), t = s(i, {
|
|
264
|
+
roughness: l.roughness,
|
|
265
|
+
fill: l.fill,
|
|
266
|
+
stroke: l.stroke,
|
|
267
|
+
strokeWidth: l.strokeWidth,
|
|
268
|
+
seed: y,
|
|
269
|
+
...l.fill === "none" ? { fillWeight: 0 } : { fillStyle: "solid" },
|
|
270
|
+
...l.strokeDash ? { strokeLineDash: l.strokeDash } : {}
|
|
271
|
+
}), n = e.path(p(A, j, O, k, l.rx), t);
|
|
272
|
+
M = C.insert(() => n, ":first-child"), M.select("path:nth-child(2)").attr("style", S.join(";"));
|
|
273
|
+
} else M = C.insert("rect", ":first-child"), M.attr("rx", l.rx).attr("ry", l.rx).attr("x", A).attr("y", j).attr("width", O).attr("height", k).attr("fill", l.fill).attr("stroke", l.stroke).attr("stroke-width", l.strokeWidth + "px"), l.strokeDash && M.attr("stroke-dasharray", l.strokeDash.join(", "));
|
|
274
|
+
if (D) {
|
|
275
|
+
let { subGraphTitleTopMargin: e } = h(g);
|
|
276
|
+
if (T.attr("transform", `translate(${i.x - E.width / 2}, ${i.y - i.height / 2 + e})`), x) {
|
|
277
|
+
let e = T.select("span");
|
|
278
|
+
e && e.attr("style", x);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
let N = M.node().getBBox();
|
|
282
|
+
return i.offsetX = 0, i.width = N.width, i.height = N.height, i.offsetY = E.height - i.padding / 2, i.intersect = function(e) {
|
|
283
|
+
return f(i, e);
|
|
284
|
+
}, {
|
|
285
|
+
cluster: C,
|
|
286
|
+
labelBBox: E
|
|
287
|
+
};
|
|
288
|
+
}, "createContainerGroup"), C = /* @__PURE__ */ n(async (e, t) => {
|
|
289
|
+
let { themeVariables: n } = a();
|
|
290
|
+
return S(e, t, {
|
|
291
|
+
cssClass: "flow-cluster",
|
|
292
|
+
rx: 10,
|
|
293
|
+
fill: "none",
|
|
294
|
+
stroke: n.flowContainerStroke || n.secondaryBorderColor,
|
|
295
|
+
strokeWidth: .75,
|
|
296
|
+
roughness: .7
|
|
297
|
+
});
|
|
298
|
+
}, "flowGroup"), w = /* @__PURE__ */ n((e, t) => {
|
|
299
|
+
let n = e.boundaryType || "rect", r = n === "package" ? 20 : e.padding, i = n === "package" ? t.height + 10 : 0, a = Math.max(e.width, t.width + r), o = n === "package" ? Math.max(e.height, i + e.padding * 2) : e.height, s = e.x - a / 2, c = e.y - o / 2;
|
|
300
|
+
return {
|
|
301
|
+
boundaryType: n,
|
|
302
|
+
width: a,
|
|
303
|
+
height: o,
|
|
304
|
+
x: s,
|
|
305
|
+
y: c,
|
|
306
|
+
bodyY: c + i,
|
|
307
|
+
bodyHeight: o - i,
|
|
308
|
+
tabHeight: i,
|
|
309
|
+
tabWidth: n === "package" ? Math.min(a, Math.max(80, t.width + 20)) : 0
|
|
310
|
+
};
|
|
311
|
+
}, "getUsecaseSystemBoundaryGeometry"), T = {
|
|
312
|
+
rect: _,
|
|
313
|
+
squareRect: _,
|
|
314
|
+
roundedWithTitle: y,
|
|
315
|
+
noteGroup: v,
|
|
316
|
+
divider: x,
|
|
317
|
+
kanbanSection: b,
|
|
318
|
+
flowGroup: C,
|
|
319
|
+
usecaseSystemBoundary: /* @__PURE__ */ n(async (n, i) => {
|
|
320
|
+
e.info("Creating usecase system boundary for ", i.id, i);
|
|
321
|
+
let p = a(), { theme: m, themeVariables: g, handDrawnSeed: _ } = p, { clusterBkg: v, clusterBorder: y, borderColorArray: b } = g, { labelStyles: x, nodeStyles: S } = c(i), { stylesMap: C } = l(i), T = i.boundaryType || "rect", E = n.insert("g").attr("class", `cluster usecase-system-boundary usecase-system-boundary-${T} ${i.cssClasses}`).attr("id", typeof i.domId == "string" ? i.domId : i.id).attr("data-boundary-type", T).attr("data-look", i.look);
|
|
322
|
+
u(E, i.colorIndex, m, b);
|
|
323
|
+
let D = r(p), O = E.insert("g").attr("class", "cluster-label system-boundary-title"), k = await o(O, i.label, {
|
|
324
|
+
style: x,
|
|
325
|
+
useHtmlLabels: D,
|
|
326
|
+
isNode: !0
|
|
327
|
+
}), A = k.getBBox();
|
|
328
|
+
if (D) {
|
|
329
|
+
let e = k.children[0], n = t(k);
|
|
330
|
+
A = e.getBoundingClientRect(), n.attr("width", A.width), n.attr("height", A.height);
|
|
331
|
+
}
|
|
332
|
+
let { width: j, height: M, x: N, y: P, bodyY: F, bodyHeight: I, tabHeight: L, tabWidth: R } = w(i, A);
|
|
333
|
+
i.diff = i.width <= A.width + i.padding ? (j - i.width) / 2 - i.padding : -i.padding;
|
|
334
|
+
let z = s(i, {
|
|
335
|
+
fill: C.get("fill") || v,
|
|
336
|
+
stroke: C.get("stroke") || y,
|
|
337
|
+
strokeWidth: C.get("stroke-width")?.replace("px", "") || 1,
|
|
338
|
+
seed: _
|
|
339
|
+
});
|
|
340
|
+
if (i.look === "handDrawn") {
|
|
341
|
+
let e = d.svg(E), t = e.rectangle(N, F, j, I, z);
|
|
342
|
+
if (E.insert(() => t, ":first-child").attr("class", "boundary-body label-container"), T === "package") {
|
|
343
|
+
let t = e.rectangle(N, P, R, L, z);
|
|
344
|
+
E.insert(() => t, ":first-child").attr("class", "boundary-tab system-boundary-package-tab label-container");
|
|
345
|
+
}
|
|
346
|
+
} else E.insert("rect", ":first-child").attr("class", "boundary-body label-container").attr("style", S).attr("x", N).attr("y", F).attr("width", j).attr("height", I), T === "package" && E.insert("rect", ":first-child").attr("class", "boundary-tab system-boundary-package-tab label-container").attr("style", S).attr("x", N).attr("y", P).attr("width", R).attr("height", L);
|
|
347
|
+
let { subGraphTitleTopMargin: B } = h(p);
|
|
348
|
+
return T === "package" ? O.attr("transform", `translate(${N + (R - A.width) / 2}, ${P + (L - A.height) / 2})`) : O.attr("transform", `translate(${i.x - A.width / 2}, ${P + B})`), x && (O.attr("style", x), O.select("span").attr("style", x)), i.offsetX = 0, i.width = j, i.height = M, i.offsetY = A.height - i.padding / 2, i.labelBBox = A, i.intersect = function(e) {
|
|
349
|
+
return f(i, e);
|
|
350
|
+
}, {
|
|
351
|
+
cluster: E,
|
|
352
|
+
labelBBox: A
|
|
353
|
+
};
|
|
354
|
+
}, "usecaseSystemBoundary"),
|
|
355
|
+
swimlane: g
|
|
356
|
+
}, E = /* @__PURE__ */ new Set(["noteGroup", "divider"]), D = /* @__PURE__ */ n((e) => !E.has(e ?? "rect"), "clusterPaintsTitle"), O = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ n(async (e, t) => {
|
|
357
|
+
let n = await T[t.shape || "rect"](e, t);
|
|
358
|
+
return O.set(t.id, n), n;
|
|
359
|
+
}, "insertCluster"), A = /* @__PURE__ */ n(() => {
|
|
360
|
+
O = /* @__PURE__ */ new Map();
|
|
361
|
+
}, "clear");
|
|
362
|
+
//#endregion
|
|
363
|
+
export { D as n, k as r, A as t };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { n as e } from "./src-B4npqWNl.js";
|
|
2
|
+
import { n as t } from "./chunk-Y2CYZVJY-i11wjrBe.js";
|
|
3
|
+
import { c as n } from "./chunk-O7XYJQB3-md6vjVm4.js";
|
|
4
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-WEXAMYUT.mjs
|
|
5
|
+
var r = /* @__PURE__ */ t((t, r, o, s) => {
|
|
6
|
+
t.attr("class", o);
|
|
7
|
+
let { width: c, height: l, x: u, y: d } = i(t, r);
|
|
8
|
+
n(t, l, c, s);
|
|
9
|
+
let f = a(u, d, c, l, r);
|
|
10
|
+
t.attr("viewBox", f), e.debug(`viewBox configured: ${f} with padding: ${r}`);
|
|
11
|
+
}, "setupViewPortForSVG"), i = /* @__PURE__ */ t((e, t) => {
|
|
12
|
+
let n = e.node()?.getBBox() || {
|
|
13
|
+
width: 0,
|
|
14
|
+
height: 0,
|
|
15
|
+
x: 0,
|
|
16
|
+
y: 0
|
|
17
|
+
};
|
|
18
|
+
return {
|
|
19
|
+
width: n.width + t * 2,
|
|
20
|
+
height: n.height + t * 2,
|
|
21
|
+
x: n.x,
|
|
22
|
+
y: n.y
|
|
23
|
+
};
|
|
24
|
+
}, "calculateDimensionsWithPadding"), a = /* @__PURE__ */ t((e, t, n, r, i) => `${e - i} ${t - i} ${n} ${r}`, "createViewBox");
|
|
25
|
+
//#endregion
|
|
26
|
+
export { r as t };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { t as e } from "./src-B4npqWNl.js";
|
|
2
|
+
import { n as t } from "./chunk-Y2CYZVJY-i11wjrBe.js";
|
|
3
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-XXDRQBXY.mjs
|
|
4
|
+
var n = /* @__PURE__ */ t((t, n) => {
|
|
5
|
+
let r;
|
|
6
|
+
return n === "sandbox" && (r = e("#i" + t)), e(n === "sandbox" ? r.nodes()[0].contentDocument.body : "body").select(`[id="${t}"]`);
|
|
7
|
+
}, "getDiagramElement");
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as t };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-Y2CYZVJY.mjs
|
|
2
|
+
var e = Object.defineProperty, t = (t, n) => e(t, "name", {
|
|
3
|
+
value: n,
|
|
4
|
+
configurable: !0
|
|
5
|
+
}), n = (t, n) => {
|
|
6
|
+
for (var r in n) e(t, r, {
|
|
7
|
+
get: n[r],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { t as n, n as t };
|