@kong-ui-public/documentation 1.4.17-pr.2640.fb8bab909.0 → 1.4.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_basePickBy-BCsiP0lE-DJBdvZNn.js +151 -0
- package/dist/{_baseUniq-SAfYgIkf-buEvGj9H.js → _baseUniq-CsvgMmt0-CCBG5z_B.js} +165 -165
- package/dist/arc-DYb5Ak6k-js8YHzj6.js +83 -0
- package/dist/architecture-U656AL7Q-LZu-yAfZ-CQD6AyxA.js +5 -0
- package/dist/architectureDiagram-KFL7JDKH-BK_an8l5-D20M_MXF.js +4665 -0
- package/dist/blockDiagram-ZYB65J3Q-C0KtqCEe-pwEm3-ie.js +2265 -0
- package/dist/{c4Diagram-6F5ED5ID-D5yqWyf0-DzlUmurv.js → c4Diagram-AAMF2YG6-DYHWlrmc-C6NWDsTV.js} +4 -4
- package/dist/{channel-bVcNKbrJ-NqcPkfCx.js → channel-3QVQMCTA-BwyrTaJi.js} +1 -1
- package/dist/{chunk-TMUBEWPD-BRIzn5gH-alZ9Sg3f.js → chunk-ANTBXLJU-BhR1MDfy-Bec7kb00.js} +1 -1
- package/dist/{chunk-KFBOBJHC-nixdujtH-CrTZo7r-.js → chunk-FHKO5MBM-z_nuC8Da-Dge2Nbr5.js} +1 -1
- package/dist/chunk-GLLZNHP4-DgwBbAOT-BUrsAxH8.js +19 -0
- package/dist/chunk-JBRWN2VN-CHua2TSC-BYWS19Oz.js +1374 -0
- package/dist/chunk-LXBSTHXV-CoED0jHL-Cc8w4JL1.js +1382 -0
- package/dist/chunk-NRVI72HA-DxsqT4Dt-Bo_vu9qn.js +20 -0
- package/dist/{chunk-ASOPGD6M-B5bA_saK-BiT875Ve.js → chunk-OMD6QJNC-_VI6zVGr-Bb4P7zNG.js} +1 -1
- package/dist/chunk-WVR4S24B-C4HIWky3-CkJ0DHSJ.js +8 -0
- package/dist/classDiagram-3BZAVTQC-DrmNjTt_-CS9fxl_R.js +16 -0
- package/dist/classDiagram-v2-QTMF73CY-DrmNjTt_-CS9fxl_R.js +16 -0
- package/dist/{clone-_5SW34SG-DOuhA6mG.js → clone-C0dvnYv6-BozdSvey.js} +1 -1
- package/dist/cytoscape.esm-CjI2IsL8-DYIumutE.js +18721 -0
- package/dist/{dagre-4EVJKHTY-CcAruc30-B3UMlKNl.js → dagre-2BBEFEWP-Bh_bYuL8-Cej31YXN.js} +53 -53
- package/dist/defaultLocale-D7EN2tov-CK6dgF7Y.js +171 -0
- package/dist/diagram-4IRLE6MV-34TaesxP-XfF-gcP2.js +533 -0
- package/dist/diagram-GUPCWM2R-Cr4-5_uX-B8mxM1Uc.js +143 -0
- package/dist/diagram-RP2FKANI-COpvHjzI-C-_mZxuk.js +221 -0
- package/dist/documentation.es.js +1 -1
- package/dist/documentation.umd.js +860 -399
- package/dist/erDiagram-HZWUO2LU-Cu2MerRS-KziSgDQg.js +840 -0
- package/dist/flowDiagram-THRYKUMA-CfrQTB8C-BYn8LF24.js +1627 -0
- package/dist/ganttDiagram-WV7ZQ7D5-gkieebY_-C7YOriZ4.js +2504 -0
- package/dist/gitGraph-F6HP7TQM-suE5ufvy-CQDQV2yP.js +5 -0
- package/dist/{gitGraphDiagram-NRZ2UAAF-B-t90-9e-BkGPAEnk.js → gitGraphDiagram-OJR772UL-CYA7EIoU-Bqc1qZk4.js} +103 -103
- package/dist/{graph-BYZMvqpu-BXRs5843.js → graph-B_1gOUDz-Dm6REFzZ.js} +2 -2
- package/dist/{index-CMZig9xg.js → index-BDD0CD9m.js} +9834 -9540
- package/dist/info-NVLQJR56-CdsHk-Jf-tf8zb8tD.js +5 -0
- package/dist/infoDiagram-6WOFNB3A-ajp3t5Lm-D80dGo5F.js +24 -0
- package/dist/{journeyDiagram-G5WM74LC-BE7U42Ad-y6YegUqL.js → journeyDiagram-FFXJYRFH-kgCEEPLo-CakI8CyJ.js} +357 -333
- package/dist/{kanban-definition-QRCXZQQD-C-5-UNRm-BOYYKTAB.js → kanban-definition-KOZQBZVT-CmM4CHe6-rjuufCiO.js} +75 -73
- package/dist/{katex-Qk2jHgyB-_qyJ_37x.js → katex-C0Lgw_Sx-CbX2I1cQ.js} +1864 -1814
- package/dist/{layout-BHI4imdk-CESYC-il.js → layout-9vIfpCf3-FfABA43y.js} +81 -81
- package/dist/linear-C-k9vokG-Md9dfBfB.js +259 -0
- package/dist/{mermaid-parser.core-Ce96PX3Q-CV9ue_xr.js → mermaid-parser.core-DHL9WXVx-DeKF3RZx.js} +4080 -3590
- package/dist/{mindmap-definition-GWI6TPTV-C98Syvj2-DUWC1UH5.js → mindmap-definition-LNHGMQRG-BsypuFYj-DSVrvuog.js} +1112 -1100
- package/dist/packet-BFZMPI3H-BcK9kJ-B-BxxCPBGn.js +5 -0
- package/dist/pie-7BOR55EZ-Vt5px0F3-BM7egbMh.js +5 -0
- package/dist/pieDiagram-DBDJKBY4-Bam6gKTi-BOqYeC6c.js +161 -0
- package/dist/{quadrantDiagram-OS5C2QUG-M57vVPSx-BRx-dMGe.js → quadrantDiagram-YPSRARAO-CJwMw09m-CN2OO-Le.js} +2 -2
- package/dist/radar-NHE76QYJ-Br11XWE4-4RP4MPFA.js +5 -0
- package/dist/requirementDiagram-EGVEC5DT-DkRytT0X-C2zigskn.js +850 -0
- package/dist/{sankeyDiagram-Y46BX6SQ-D6EdYPdp-D2Qzxmhx.js → sankeyDiagram-HRAUVNP4-08s1UHMk-2j8idkNs.js} +198 -193
- package/dist/{sequenceDiagram-G6AWOVSC-B171TAb1-KCpoI-Ck.js → sequenceDiagram-WFGC7UMF-6_s7-CN7-D-oTpLFJ.js} +1001 -992
- package/dist/stateDiagram-UUKSUZ4H-eWajY90l-BlM614AN.js +263 -0
- package/dist/stateDiagram-v2-EYPG3UTE-Dh7Ngu1O-YVMiocHE.js +16 -0
- package/dist/style.css +1 -1
- package/dist/timeline-definition-3HZDQTIS-4TPEOhE8-fDDLVlO8.js +799 -0
- package/dist/treemap-KMMF4GRG-nu7WEuPi-C1YG24W8.js +5 -0
- package/dist/{xychartDiagram-6QU3TZC5-CqbTSF5W-CUbJ50KT.js → xychartDiagram-FDP5SA34-BbtKlU7T-D1BI5nWs.js} +459 -423
- package/package.json +4 -4
- package/dist/_basePickBy-zlkqRmFy-D6w9JBLu.js +0 -151
- package/dist/arc-CK9P6CkJ-DVgfRhzX.js +0 -83
- package/dist/architecture-I3QFYML2-DJzmbE4M-C3v7Cpg0.js +0 -5
- package/dist/architectureDiagram-UYN6MBPD-DkZdgpXi-BTThTJ0F.js +0 -4592
- package/dist/blockDiagram-ZHA2E4KO-DnCMGCMN-DBXa-baO.js +0 -2247
- package/dist/chunk-5HRBRIJM-BjQ8go1b-CJmT3AYe.js +0 -24
- package/dist/chunk-7U56Z5CX-awhAxjZ0-Cs_UWlwk.js +0 -1213
- package/dist/chunk-T2TOU4HS-DqOVhIzl-O3PUl7Qp.js +0 -1301
- package/dist/classDiagram-LNE6IOMH-fQzyXfo--DYLd8UQH.js +0 -14
- package/dist/classDiagram-v2-MQ7JQ4JX-fQzyXfo--DYLd8UQH.js +0 -14
- package/dist/cytoscape.esm-DAyNQ0qu-i5PnoWfE.js +0 -16110
- package/dist/diagram-QW4FP2JN-DZT_0aFO-SYzM51ke.js +0 -126
- package/dist/erDiagram-6RL3IURR-BfgUC5jv-BrebVho-.js +0 -937
- package/dist/flowDiagram-7ASYPVHJ-Bo9CnsE7-Ds2vln_y.js +0 -1484
- package/dist/ganttDiagram-NTVNEXSI-8E9hjd6N-fR_cmeDc.js +0 -2491
- package/dist/gitGraph-YCYPL57B-BnErPIwo-DXUTceC1.js +0 -5
- package/dist/info-46DW6VJ7-DPpbx_vA-omPXKuBd.js +0 -5
- package/dist/infoDiagram-A4XQUW5V-Bo9uoOcA-CnlgI27B.js +0 -22
- package/dist/linear-C2PheBya-BHVXLcru.js +0 -423
- package/dist/packet-W2GHVCYJ-BLiQbm7T-BD1xX8XM.js +0 -5
- package/dist/pie-BEWT4RHE-D3Mbo3mT-B4n38n6N.js +0 -5
- package/dist/pieDiagram-YF2LJOPJ-BJV27s9B-DA7hy5wG.js +0 -161
- package/dist/requirementDiagram-MIRIMTAZ-D0KDg7rf-CRMUyo68.js +0 -768
- package/dist/stateDiagram-MAYHULR4-D7FUnT9_-aCApnrI4.js +0 -268
- package/dist/stateDiagram-v2-4JROLMXI-Cyc74STT-D-7hwTRo.js +0 -14
- package/dist/timeline-definition-U7ZMHBDA-Bw-dp1yf-C01CsNUU.js +0 -804
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
import { I as G, R as N, A as I } from "./chunk-7U56Z5CX-awhAxjZ0-Cs_UWlwk.js";
|
|
2
|
-
import { _ as u, g as t, a9 as M, l as S, aa as O, ag as H, ay as P, az as U, ao as C } from "./index-CMZig9xg.js";
|
|
3
|
-
import { L as _ } from "./graph-BYZMvqpu-BXRs5843.js";
|
|
4
|
-
import { o as $ } from "./layout-BHI4imdk-CESYC-il.js";
|
|
5
|
-
var T = {}, W = /* @__PURE__ */ u((e, n) => {
|
|
6
|
-
T[e] = n;
|
|
7
|
-
}, "set"), j = /* @__PURE__ */ u((e) => T[e], "get"), D = /* @__PURE__ */ u(() => Object.keys(T), "keys"), F = /* @__PURE__ */ u(() => D().length, "size"), J = {
|
|
8
|
-
get: j,
|
|
9
|
-
set: W,
|
|
10
|
-
keys: D,
|
|
11
|
-
size: F
|
|
12
|
-
}, Y = /* @__PURE__ */ u((e) => e.append("circle").attr("class", "start-state").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit).attr("cy", t().state.padding + t().state.sizeUnit), "drawStartState"), q = /* @__PURE__ */ u((e) => e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", t().state.textHeight).attr("class", "divider").attr("x2", t().state.textHeight * 2).attr("y1", 0).attr("y2", 0), "drawDivider"), X = /* @__PURE__ */ u((e, n) => {
|
|
13
|
-
const o = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 2 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(n.id), r = o.node().getBBox();
|
|
14
|
-
return e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", r.width + 2 * t().state.padding).attr("height", r.height + 2 * t().state.padding).attr("rx", t().state.radius), o;
|
|
15
|
-
}, "drawSimpleState"), Z = /* @__PURE__ */ u((e, n) => {
|
|
16
|
-
const o = /* @__PURE__ */ u(function(g, f, B) {
|
|
17
|
-
const m = g.append("tspan").attr("x", 2 * t().state.padding).text(f);
|
|
18
|
-
B || m.attr("dy", t().state.textHeight);
|
|
19
|
-
}, "addTspan"), r = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 1.3 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(n.descriptions[0]).node().getBBox(), d = r.height, l = e.append("text").attr("x", t().state.padding).attr(
|
|
20
|
-
"y",
|
|
21
|
-
d + t().state.padding * 0.4 + t().state.dividerMargin + t().state.textHeight
|
|
22
|
-
).attr("class", "state-description");
|
|
23
|
-
let h = !0, a = !0;
|
|
24
|
-
n.descriptions.forEach(function(g) {
|
|
25
|
-
h || (o(l, g, a), a = !1), h = !1;
|
|
26
|
-
});
|
|
27
|
-
const s = e.append("line").attr("x1", t().state.padding).attr("y1", t().state.padding + d + t().state.dividerMargin / 2).attr("y2", t().state.padding + d + t().state.dividerMargin / 2).attr("class", "descr-divider"), x = l.node().getBBox(), p = Math.max(x.width, r.width);
|
|
28
|
-
return s.attr("x2", p + 3 * t().state.padding), e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", p + 2 * t().state.padding).attr("height", x.height + d + 2 * t().state.padding).attr("rx", t().state.radius), e;
|
|
29
|
-
}, "drawDescrState"), K = /* @__PURE__ */ u((e, n, o) => {
|
|
30
|
-
const r = t().state.padding, d = 2 * t().state.padding, l = e.node().getBBox(), h = l.width, a = l.x, s = e.append("text").attr("x", 0).attr("y", t().state.titleShift).attr("font-size", t().state.fontSize).attr("class", "state-title").text(n.id), x = s.node().getBBox().width + d;
|
|
31
|
-
let p = Math.max(x, h);
|
|
32
|
-
p === h && (p = p + d);
|
|
33
|
-
let g;
|
|
34
|
-
const f = e.node().getBBox();
|
|
35
|
-
n.doc, g = a - r, x > h && (g = (h - p) / 2 + r), Math.abs(a - f.x) < r && x > h && (g = a - (x - h) / 2);
|
|
36
|
-
const B = 1 - t().state.textHeight;
|
|
37
|
-
return e.insert("rect", ":first-child").attr("x", g).attr("y", B).attr("class", o ? "alt-composit" : "composit").attr("width", p).attr(
|
|
38
|
-
"height",
|
|
39
|
-
f.height + t().state.textHeight + t().state.titleShift + 1
|
|
40
|
-
).attr("rx", "0"), s.attr("x", g + r), x <= h && s.attr("x", a + (p - d) / 2 - x / 2 + r), e.insert("rect", ":first-child").attr("x", g).attr(
|
|
41
|
-
"y",
|
|
42
|
-
t().state.titleShift - t().state.textHeight - t().state.padding
|
|
43
|
-
).attr("width", p).attr("height", t().state.textHeight * 3).attr("rx", t().state.radius), e.insert("rect", ":first-child").attr("x", g).attr(
|
|
44
|
-
"y",
|
|
45
|
-
t().state.titleShift - t().state.textHeight - t().state.padding
|
|
46
|
-
).attr("width", p).attr("height", f.height + 3 + 2 * t().state.textHeight).attr("rx", t().state.radius), e;
|
|
47
|
-
}, "addTitleAndBox"), Q = /* @__PURE__ */ u((e) => (e.append("circle").attr("class", "end-state-outer").attr("r", t().state.sizeUnit + t().state.miniPadding).attr(
|
|
48
|
-
"cx",
|
|
49
|
-
t().state.padding + t().state.sizeUnit + t().state.miniPadding
|
|
50
|
-
).attr(
|
|
51
|
-
"cy",
|
|
52
|
-
t().state.padding + t().state.sizeUnit + t().state.miniPadding
|
|
53
|
-
), e.append("circle").attr("class", "end-state-inner").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit + 2).attr("cy", t().state.padding + t().state.sizeUnit + 2)), "drawEndState"), V = /* @__PURE__ */ u((e, n) => {
|
|
54
|
-
let o = t().state.forkWidth, r = t().state.forkHeight;
|
|
55
|
-
if (n.parentId) {
|
|
56
|
-
let d = o;
|
|
57
|
-
o = r, r = d;
|
|
58
|
-
}
|
|
59
|
-
return e.append("rect").style("stroke", "black").style("fill", "black").attr("width", o).attr("height", r).attr("x", t().state.padding).attr("y", t().state.padding);
|
|
60
|
-
}, "drawForkJoinState"), tt = /* @__PURE__ */ u((e, n, o, r) => {
|
|
61
|
-
let d = 0;
|
|
62
|
-
const l = r.append("text");
|
|
63
|
-
l.style("text-anchor", "start"), l.attr("class", "noteText");
|
|
64
|
-
let h = e.replace(/\r\n/g, "<br/>");
|
|
65
|
-
h = h.replace(/\n/g, "<br/>");
|
|
66
|
-
const a = h.split(H.lineBreakRegex);
|
|
67
|
-
let s = 1.25 * t().state.noteMargin;
|
|
68
|
-
for (const x of a) {
|
|
69
|
-
const p = x.trim();
|
|
70
|
-
if (p.length > 0) {
|
|
71
|
-
const g = l.append("tspan");
|
|
72
|
-
if (g.text(p), s === 0) {
|
|
73
|
-
const f = g.node().getBBox();
|
|
74
|
-
s += f.height;
|
|
75
|
-
}
|
|
76
|
-
d += s, g.attr("x", n + t().state.noteMargin), g.attr("y", o + d + 1.25 * t().state.noteMargin);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return { textWidth: l.node().getBBox().width, textHeight: d };
|
|
80
|
-
}, "_drawLongText"), et = /* @__PURE__ */ u((e, n) => {
|
|
81
|
-
n.attr("class", "state-note");
|
|
82
|
-
const o = n.append("rect").attr("x", 0).attr("y", t().state.padding), r = n.append("g"), { textWidth: d, textHeight: l } = tt(e, 0, 0, r);
|
|
83
|
-
return o.attr("height", l + 2 * t().state.noteMargin), o.attr("width", d + t().state.noteMargin * 2), o;
|
|
84
|
-
}, "drawNote"), L = /* @__PURE__ */ u(function(e, n) {
|
|
85
|
-
const o = n.id, r = {
|
|
86
|
-
id: o,
|
|
87
|
-
label: n.id,
|
|
88
|
-
width: 0,
|
|
89
|
-
height: 0
|
|
90
|
-
}, d = e.append("g").attr("id", o).attr("class", "stateGroup");
|
|
91
|
-
n.type === "start" && Y(d), n.type === "end" && Q(d), (n.type === "fork" || n.type === "join") && V(d, n), n.type === "note" && et(n.note.text, d), n.type === "divider" && q(d), n.type === "default" && n.descriptions.length === 0 && X(d, n), n.type === "default" && n.descriptions.length > 0 && Z(d, n);
|
|
92
|
-
const l = d.node().getBBox();
|
|
93
|
-
return r.width = l.width + 2 * t().state.padding, r.height = l.height + 2 * t().state.padding, J.set(o, r), r;
|
|
94
|
-
}, "drawState"), A = 0, at = /* @__PURE__ */ u(function(e, n, o) {
|
|
95
|
-
const r = /* @__PURE__ */ u(function(s) {
|
|
96
|
-
switch (s) {
|
|
97
|
-
case N.relationType.AGGREGATION:
|
|
98
|
-
return "aggregation";
|
|
99
|
-
case N.relationType.EXTENSION:
|
|
100
|
-
return "extension";
|
|
101
|
-
case N.relationType.COMPOSITION:
|
|
102
|
-
return "composition";
|
|
103
|
-
case N.relationType.DEPENDENCY:
|
|
104
|
-
return "dependency";
|
|
105
|
-
}
|
|
106
|
-
}, "getRelationType");
|
|
107
|
-
n.points = n.points.filter((s) => !Number.isNaN(s.y));
|
|
108
|
-
const d = n.points, l = P().x(function(s) {
|
|
109
|
-
return s.x;
|
|
110
|
-
}).y(function(s) {
|
|
111
|
-
return s.y;
|
|
112
|
-
}).curve(U), h = e.append("path").attr("d", l(d)).attr("id", "edge" + A).attr("class", "transition");
|
|
113
|
-
let a = "";
|
|
114
|
-
if (t().state.arrowMarkerAbsolute && (a = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, a = a.replace(/\(/g, "\\("), a = a.replace(/\)/g, "\\)")), h.attr(
|
|
115
|
-
"marker-end",
|
|
116
|
-
"url(" + a + "#" + r(N.relationType.DEPENDENCY) + "End)"
|
|
117
|
-
), o.title !== void 0) {
|
|
118
|
-
const s = e.append("g").attr("class", "stateLabel"), { x, y: p } = C.calcLabelPosition(n.points), g = H.getRows(o.title);
|
|
119
|
-
let f = 0;
|
|
120
|
-
const B = [];
|
|
121
|
-
let m = 0, v = 0;
|
|
122
|
-
for (let y = 0; y <= g.length; y++) {
|
|
123
|
-
const c = s.append("text").attr("text-anchor", "middle").text(g[y]).attr("x", x).attr("y", p + f), w = c.node().getBBox();
|
|
124
|
-
m = Math.max(m, w.width), v = Math.min(v, w.x), S.info(w.x, x, p + f), f === 0 && (f = c.node().getBBox().height, S.info("Title height", f, p)), B.push(c);
|
|
125
|
-
}
|
|
126
|
-
let E = f * g.length;
|
|
127
|
-
if (g.length > 1) {
|
|
128
|
-
const y = (g.length - 1) * f * 0.5;
|
|
129
|
-
B.forEach((c, w) => c.attr("y", p + w * f - y)), E = f * g.length;
|
|
130
|
-
}
|
|
131
|
-
const i = s.node().getBBox();
|
|
132
|
-
s.insert("rect", ":first-child").attr("class", "box").attr("x", x - m / 2 - t().state.padding / 2).attr("y", p - E / 2 - t().state.padding / 2 - 3.5).attr("width", m + t().state.padding).attr("height", E + t().state.padding), S.info(i);
|
|
133
|
-
}
|
|
134
|
-
A++;
|
|
135
|
-
}, "drawEdge"), b, z = {}, nt = /* @__PURE__ */ u(function() {
|
|
136
|
-
}, "setConf"), it = /* @__PURE__ */ u(function(e) {
|
|
137
|
-
e.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
138
|
-
}, "insertMarkers"), dt = /* @__PURE__ */ u(function(e, n, o, r) {
|
|
139
|
-
b = t().state;
|
|
140
|
-
const d = t().securityLevel;
|
|
141
|
-
let l;
|
|
142
|
-
d === "sandbox" && (l = M("#i" + n));
|
|
143
|
-
const h = d === "sandbox" ? M(l.nodes()[0].contentDocument.body) : M("body"), a = d === "sandbox" ? l.nodes()[0].contentDocument : document;
|
|
144
|
-
S.debug("Rendering diagram " + e);
|
|
145
|
-
const s = h.select(`[id='${n}']`);
|
|
146
|
-
it(s);
|
|
147
|
-
const x = r.db.getRootDoc();
|
|
148
|
-
R(x, s, void 0, !1, h, a, r);
|
|
149
|
-
const p = b.padding, g = s.node().getBBox(), f = g.width + p * 2, B = g.height + p * 2, m = f * 1.75;
|
|
150
|
-
O(s, B, m, b.useMaxWidth), s.attr(
|
|
151
|
-
"viewBox",
|
|
152
|
-
`${g.x - b.padding} ${g.y - b.padding} ` + f + " " + B
|
|
153
|
-
);
|
|
154
|
-
}, "draw"), rt = /* @__PURE__ */ u((e) => e ? e.length * b.fontSizeFactor : 1, "getLabelWidth"), R = /* @__PURE__ */ u((e, n, o, r, d, l, h) => {
|
|
155
|
-
const a = new _({
|
|
156
|
-
compound: !0,
|
|
157
|
-
multigraph: !0
|
|
158
|
-
});
|
|
159
|
-
let s, x = !0;
|
|
160
|
-
for (s = 0; s < e.length; s++)
|
|
161
|
-
if (e[s].stmt === "relation") {
|
|
162
|
-
x = !1;
|
|
163
|
-
break;
|
|
164
|
-
}
|
|
165
|
-
o ? a.setGraph({
|
|
166
|
-
rankdir: "LR",
|
|
167
|
-
multigraph: !0,
|
|
168
|
-
compound: !0,
|
|
169
|
-
// acyclicer: 'greedy',
|
|
170
|
-
ranker: "tight-tree",
|
|
171
|
-
ranksep: x ? 1 : b.edgeLengthFactor,
|
|
172
|
-
nodeSep: x ? 1 : 50,
|
|
173
|
-
isMultiGraph: !0
|
|
174
|
-
// ranksep: 5,
|
|
175
|
-
// nodesep: 1
|
|
176
|
-
}) : a.setGraph({
|
|
177
|
-
rankdir: "TB",
|
|
178
|
-
multigraph: !0,
|
|
179
|
-
compound: !0,
|
|
180
|
-
// isCompound: true,
|
|
181
|
-
// acyclicer: 'greedy',
|
|
182
|
-
// ranker: 'longest-path'
|
|
183
|
-
ranksep: x ? 1 : b.edgeLengthFactor,
|
|
184
|
-
nodeSep: x ? 1 : 50,
|
|
185
|
-
ranker: "tight-tree",
|
|
186
|
-
// ranker: 'network-simplex'
|
|
187
|
-
isMultiGraph: !0
|
|
188
|
-
}), a.setDefaultEdgeLabel(function() {
|
|
189
|
-
return {};
|
|
190
|
-
}), h.db.extract(e);
|
|
191
|
-
const p = h.db.getStates(), g = h.db.getRelations(), f = Object.keys(p);
|
|
192
|
-
for (const i of f) {
|
|
193
|
-
const y = p[i];
|
|
194
|
-
o && (y.parentId = o);
|
|
195
|
-
let c;
|
|
196
|
-
if (y.doc) {
|
|
197
|
-
let w = n.append("g").attr("id", y.id).attr("class", "stateGroup");
|
|
198
|
-
c = R(y.doc, w, y.id, !r, d, l, h);
|
|
199
|
-
{
|
|
200
|
-
w = K(w, y, r);
|
|
201
|
-
let k = w.node().getBBox();
|
|
202
|
-
c.width = k.width, c.height = k.height + b.padding / 2, z[y.id] = { y: b.compositTitleSize };
|
|
203
|
-
}
|
|
204
|
-
} else
|
|
205
|
-
c = L(n, y, a);
|
|
206
|
-
if (y.note) {
|
|
207
|
-
const w = {
|
|
208
|
-
descriptions: [],
|
|
209
|
-
id: y.id + "-note",
|
|
210
|
-
note: y.note,
|
|
211
|
-
type: "note"
|
|
212
|
-
}, k = L(n, w, a);
|
|
213
|
-
y.note.position === "left of" ? (a.setNode(c.id + "-note", k), a.setNode(c.id, c)) : (a.setNode(c.id, c), a.setNode(c.id + "-note", k)), a.setParent(c.id, c.id + "-group"), a.setParent(c.id + "-note", c.id + "-group");
|
|
214
|
-
} else
|
|
215
|
-
a.setNode(c.id, c);
|
|
216
|
-
}
|
|
217
|
-
S.debug("Count=", a.nodeCount(), a);
|
|
218
|
-
let B = 0;
|
|
219
|
-
g.forEach(function(i) {
|
|
220
|
-
B++, S.debug("Setting edge", i), a.setEdge(
|
|
221
|
-
i.id1,
|
|
222
|
-
i.id2,
|
|
223
|
-
{
|
|
224
|
-
relation: i,
|
|
225
|
-
width: rt(i.title),
|
|
226
|
-
height: b.labelHeight * H.getRows(i.title).length,
|
|
227
|
-
labelpos: "c"
|
|
228
|
-
},
|
|
229
|
-
"id" + B
|
|
230
|
-
);
|
|
231
|
-
}), $(a), S.debug("Graph after layout", a.nodes());
|
|
232
|
-
const m = n.node();
|
|
233
|
-
a.nodes().forEach(function(i) {
|
|
234
|
-
i !== void 0 && a.node(i) !== void 0 ? (S.warn("Node " + i + ": " + JSON.stringify(a.node(i))), d.select("#" + m.id + " #" + i).attr(
|
|
235
|
-
"transform",
|
|
236
|
-
"translate(" + (a.node(i).x - a.node(i).width / 2) + "," + (a.node(i).y + (z[i] ? z[i].y : 0) - a.node(i).height / 2) + " )"
|
|
237
|
-
), d.select("#" + m.id + " #" + i).attr("data-x-shift", a.node(i).x - a.node(i).width / 2), l.querySelectorAll("#" + m.id + " #" + i + " .divider").forEach((y) => {
|
|
238
|
-
const c = y.parentElement;
|
|
239
|
-
let w = 0, k = 0;
|
|
240
|
-
c && (c.parentElement && (w = c.parentElement.getBBox().width), k = parseInt(c.getAttribute("data-x-shift"), 10), Number.isNaN(k) && (k = 0)), y.setAttribute("x1", 0 - k + 8), y.setAttribute("x2", w - k - 8);
|
|
241
|
-
})) : S.debug("No Node " + i + ": " + JSON.stringify(a.node(i)));
|
|
242
|
-
});
|
|
243
|
-
let v = m.getBBox();
|
|
244
|
-
a.edges().forEach(function(i) {
|
|
245
|
-
i !== void 0 && a.edge(i) !== void 0 && (S.debug("Edge " + i.v + " -> " + i.w + ": " + JSON.stringify(a.edge(i))), at(n, a.edge(i), a.edge(i).relation));
|
|
246
|
-
}), v = m.getBBox();
|
|
247
|
-
const E = {
|
|
248
|
-
id: o || "root",
|
|
249
|
-
label: o || "root",
|
|
250
|
-
width: 0,
|
|
251
|
-
height: 0
|
|
252
|
-
};
|
|
253
|
-
return E.width = v.width + 2 * b.padding, E.height = v.height + 2 * b.padding, S.debug("Doc rendered", E, a), E;
|
|
254
|
-
}, "renderDoc"), st = {
|
|
255
|
-
setConf: nt,
|
|
256
|
-
draw: dt
|
|
257
|
-
}, lt = {
|
|
258
|
-
parser: I,
|
|
259
|
-
db: N,
|
|
260
|
-
renderer: st,
|
|
261
|
-
styles: G,
|
|
262
|
-
init: /* @__PURE__ */ u((e) => {
|
|
263
|
-
e.state || (e.state = {}), e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute, N.clear();
|
|
264
|
-
}, "init")
|
|
265
|
-
};
|
|
266
|
-
export {
|
|
267
|
-
lt as diagram
|
|
268
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { I as a, L as e, R as s, A as t } from "./chunk-7U56Z5CX-awhAxjZ0-Cs_UWlwk.js";
|
|
2
|
-
import { _ as o } from "./index-CMZig9xg.js";
|
|
3
|
-
var l = {
|
|
4
|
-
parser: t,
|
|
5
|
-
db: s,
|
|
6
|
-
renderer: e,
|
|
7
|
-
styles: a,
|
|
8
|
-
init: /* @__PURE__ */ o((r) => {
|
|
9
|
-
r.state || (r.state = {}), r.state.arrowMarkerAbsolute = r.arrowMarkerAbsolute, s.clear();
|
|
10
|
-
}, "init")
|
|
11
|
-
};
|
|
12
|
-
export {
|
|
13
|
-
l as diagram
|
|
14
|
-
};
|