@versini/sassysaint 8.107.4 → 8.108.1
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/chunks/{AboutChangelog.DeRcKN5H.js → AboutChangelog.BQtbpOat.js} +2 -2
- package/dist/chunks/{AboutEntry.6mTHwkfb.js → AboutEntry.Bb0L9eCQ.js} +7 -7
- package/dist/chunks/{App.DTjbiLAP.js → App.CSBqbQnm.js} +1147 -1146
- package/dist/chunks/{Bubble.ltolxxta.js → Bubble.Jl_vP6Bg.js} +1 -1
- package/dist/chunks/{DeleteButtonIcon.P0LgJDjE.js → ButtonIconDelete.C3bf-YVf.js} +3 -3
- package/dist/chunks/{Chart.BzOmOhOW.js → Chart.KnjXKeEm.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.lGE_8ao1.js → ChatBubbleAssistant.8hHak3Xb.js} +4 -4
- package/dist/chunks/{ChatBubbleUser.DC661ePq.js → ChatBubbleUser.C3QnvRpy.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.BkRFWpsA.js → ChatHistoryTable.CIIrZME7.js} +4 -4
- package/dist/chunks/{HistoryEntry.uUjsDuT0.js → HistoryEntry.B0U0RQ7-.js} +6 -6
- package/dist/chunks/{LoginEntry.BGZdTDwf.js → LoginEntry.Cf03Pbyq.js} +4 -4
- package/dist/chunks/{LogoEntry.Bpddd0yA.js → LogoEntry.C_oLwnbv.js} +3 -3
- package/dist/chunks/{MemoriesEntry.BYQm9cuU.js → MemoriesEntry.CeMfI8F3.js} +5 -5
- package/dist/chunks/{ProfileEntry.BqcZXSeT.js → ProfileEntry.BasVTLyr.js} +4 -4
- package/dist/chunks/{SettingsEntry.BdC5Vyof.js → SettingsEntry.DqKtJfKG.js} +5 -5
- package/dist/chunks/{UsageEntry._O8Q6TwS.js → UsageEntry.phb8YqH1.js} +5 -5
- package/dist/chunks/_basePickBy.DiyBcH_b.js +151 -0
- package/dist/chunks/_baseUniq.B9L9wOT1.js +614 -0
- package/dist/chunks/arc.C1rfS5dQ.js +83 -0
- package/dist/chunks/architecture-U656AL7Q.Bw4J2QgD.js +36 -0
- package/dist/chunks/architectureDiagram-VXUJARFQ.DuwD3xDO.js +4653 -0
- package/dist/chunks/blockDiagram-VD42YOAC.BeIrwe07.js +2254 -0
- package/dist/chunks/browser.BQGdandl.js +260 -0
- package/dist/chunks/c4Diagram-YG6GDRKO.YzJEqJgk.js +1579 -0
- package/dist/chunks/channel.BPPTH6mh.js +5 -0
- package/dist/chunks/chunk-4BX2VUAB.BCIoHYCy.js +8 -0
- package/dist/chunks/chunk-55IACEB6.CFEkh5zE.js +8 -0
- package/dist/chunks/chunk-B4BG7PRW.CwfV87jH.js +1375 -0
- package/dist/chunks/chunk-DI55MBZ5.CcFvwYqB.js +1370 -0
- package/dist/chunks/chunk-FMBD7UC4.C9__m3G-.js +19 -0
- package/dist/chunks/chunk-QN33PNHL.EonhZUcV.js +19 -0
- package/dist/chunks/chunk-QZHKN3VN.CKR_DhAb.js +15 -0
- package/dist/chunks/chunk-TZMSLE5B.eMD178H9.js +64 -0
- package/dist/chunks/classDiagram-2ON5EDUG.DCsDc7LM.js +16 -0
- package/dist/chunks/classDiagram-v2-WZHVMYZB.DCsDc7LM.js +16 -0
- package/dist/chunks/clone.DG_v08Gm.js +8 -0
- package/dist/chunks/cose-bilkent-S5V4N54A.Bw5tPVeS.js +2600 -0
- package/dist/chunks/cytoscape.esm.DmRZGnqW.js +18700 -0
- package/dist/chunks/dagre-6UL2VRFP.CTW14kZK.js +444 -0
- package/dist/chunks/defaultLocale.CPJLP5jg.js +171 -0
- package/dist/chunks/diagram-PSM6KHXK.DDyW__Et.js +531 -0
- package/dist/chunks/diagram-QEK2KX5R.C8Y6Nyjq.js +217 -0
- package/dist/chunks/diagram-S2PKOQOG.DnnZ1m7x.js +142 -0
- package/dist/chunks/erDiagram-Q2GNP2WA.BavKd766.js +841 -0
- package/dist/chunks/flowDiagram-NV44I4VS.roMN4lsc.js +1620 -0
- package/dist/chunks/ganttDiagram-JELNMOA3.B_SkSqyi.js +2647 -0
- package/dist/chunks/gitGraph-F6HP7TQM.C7PwqG55.js +27 -0
- package/dist/chunks/gitGraphDiagram-NY62KEGX.BHfSeSWk.js +699 -0
- package/dist/chunks/graph.CsxOkYbN.js +247 -0
- package/dist/chunks/{index.D2nN0rC6.js → index.BHKlxxP5.js} +1 -1
- package/dist/chunks/{index.CYcieK1H.js → index.BUYdarBy.js} +1 -1
- package/dist/chunks/{index.BxbWxVtd.js → index.BetC5DSu.js} +1 -1
- package/dist/chunks/{index.DuxTgnco.js → index.BmLHPbgB.js} +1 -1
- package/dist/chunks/{index.C70LcKzU.js → index.Bq1fyGUB.js} +1 -1
- package/dist/chunks/{index.CaofbEIP.js → index.DQPv0lQj.js} +2 -3
- package/dist/chunks/{index.BlviGqw0.js → index.DbyaywZN.js} +3 -3
- package/dist/chunks/{index.DG-VhqKw.js → index.DjuVXA0R.js} +1 -1
- package/dist/chunks/index.DzRoQenq.js +67 -0
- package/dist/chunks/info-NVLQJR56.DZPZ5T1V.js +27 -0
- package/dist/chunks/infoDiagram-WHAUD3N6.Bi7I8DQ6.js +24 -0
- package/dist/chunks/init.DAGnb5BH.js +16 -0
- package/dist/chunks/journeyDiagram-XKPGCS4Q.D8VPEfAI.js +834 -0
- package/dist/chunks/kanban-definition-3W4ZIXB7.BWUqPfZ4.js +719 -0
- package/dist/chunks/{index.s8Izh8-Q.js → katex.D0sQThIv.js} +1638 -1943
- package/dist/chunks/layout.BVs5Fo34.js +1332 -0
- package/dist/chunks/linear.CIDfImUo.js +625 -0
- package/dist/chunks/mermaid-parser.core.ORd6OSMH.js +12724 -0
- package/dist/chunks/mindmap-definition-VGOIOE7T.B8li-u54.js +784 -0
- package/dist/chunks/ordinal.EWT-qnu7.js +61 -0
- package/dist/chunks/packet-BFZMPI3H.ucR6ljZQ.js +27 -0
- package/dist/chunks/pie-7BOR55EZ.CUpVQfSo.js +32 -0
- package/dist/chunks/pieDiagram-ADFJNKIX.GfyALym8.js +161 -0
- package/dist/chunks/quadrantDiagram-AYHSOK5B.CsUp44jt.js +1022 -0
- package/dist/chunks/radar-NHE76QYJ.Es4sfwW2.js +27 -0
- package/dist/chunks/rehype-mermaid.QzUnaHa9.js +14283 -0
- package/dist/chunks/requirementDiagram-UZGBJVZJ.DQTWxv7j.js +850 -0
- package/dist/chunks/sankeyDiagram-TZEHDZUN.DJdcOMBP.js +810 -0
- package/dist/chunks/sequenceDiagram-WL72ISMW.CIFR_pCj.js +2511 -0
- package/dist/chunks/stateDiagram-FKZM4ZOC.DgM5pVKO.js +263 -0
- package/dist/chunks/stateDiagram-v2-4FDKWEC3.BUygW1pY.js +16 -0
- package/dist/chunks/timeline-definition-IT6M3QCI.Ca0YkAdx.js +795 -0
- package/dist/chunks/treemap-KMMF4GRG.Xsds0Pr-.js +81 -0
- package/dist/chunks/{useMarkdown.DjEZz9lH.js → useMarkdown.DgNUxPe8.js} +1951 -1936
- package/dist/chunks/xychartDiagram-PRI3JC2R.DyQEBwDk.js +1340 -0
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +5 -5
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { styles_default as W, stateDiagram_default as G, StateDB as N } from "./chunk-DI55MBZ5.CcFvwYqB.js";
|
|
2
|
+
import { __name as f, getConfig2 as t, select as H, log as S, configureSvgSize as P, common_default as z, line as U, curveBasis as _, getUrl as C, utils_default as F } from "./rehype-mermaid.QzUnaHa9.js";
|
|
3
|
+
import { layout as O } from "./layout.BVs5Fo34.js";
|
|
4
|
+
import { Graph as D } from "./graph.CsxOkYbN.js";
|
|
5
|
+
var J = /* @__PURE__ */ f((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"), X = /* @__PURE__ */ f((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"), Y = /* @__PURE__ */ f((e, i) => {
|
|
6
|
+
const s = 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(i.id), c = s.node().getBBox();
|
|
7
|
+
return e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", c.width + 2 * t().state.padding).attr("height", c.height + 2 * t().state.padding).attr("rx", t().state.radius), s;
|
|
8
|
+
}, "drawSimpleState"), I = /* @__PURE__ */ f((e, i) => {
|
|
9
|
+
const s = /* @__PURE__ */ f(function(g, B, w) {
|
|
10
|
+
const v = g.append("tspan").attr("x", 2 * t().state.padding).text(B);
|
|
11
|
+
w || v.attr("dy", t().state.textHeight);
|
|
12
|
+
}, "addTspan"), n = 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(i.descriptions[0]).node().getBBox(), l = n.height, x = e.append("text").attr("x", t().state.padding).attr(
|
|
13
|
+
"y",
|
|
14
|
+
l + t().state.padding * 0.4 + t().state.dividerMargin + t().state.textHeight
|
|
15
|
+
).attr("class", "state-description");
|
|
16
|
+
let a = !0, d = !0;
|
|
17
|
+
i.descriptions.forEach(function(g) {
|
|
18
|
+
a || (s(x, g, d), d = !1), a = !1;
|
|
19
|
+
});
|
|
20
|
+
const y = e.append("line").attr("x1", t().state.padding).attr("y1", t().state.padding + l + t().state.dividerMargin / 2).attr("y2", t().state.padding + l + t().state.dividerMargin / 2).attr("class", "descr-divider"), p = x.node().getBBox(), o = Math.max(p.width, n.width);
|
|
21
|
+
return y.attr("x2", o + 3 * t().state.padding), e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", o + 2 * t().state.padding).attr("height", p.height + l + 2 * t().state.padding).attr("rx", t().state.radius), e;
|
|
22
|
+
}, "drawDescrState"), $ = /* @__PURE__ */ f((e, i, s) => {
|
|
23
|
+
const c = t().state.padding, n = 2 * t().state.padding, l = e.node().getBBox(), x = l.width, a = l.x, d = e.append("text").attr("x", 0).attr("y", t().state.titleShift).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.id), p = d.node().getBBox().width + n;
|
|
24
|
+
let o = Math.max(p, x);
|
|
25
|
+
o === x && (o = o + n);
|
|
26
|
+
let g;
|
|
27
|
+
const B = e.node().getBBox();
|
|
28
|
+
g = a - c, p > x && (g = (x - o) / 2 + c), Math.abs(a - B.x) < c && p > x && (g = a - (p - x) / 2);
|
|
29
|
+
const w = 1 - t().state.textHeight;
|
|
30
|
+
return e.insert("rect", ":first-child").attr("x", g).attr("y", w).attr("class", s ? "alt-composit" : "composit").attr("width", o).attr(
|
|
31
|
+
"height",
|
|
32
|
+
B.height + t().state.textHeight + t().state.titleShift + 1
|
|
33
|
+
).attr("rx", "0"), d.attr("x", g + c), p <= x && d.attr("x", a + (o - n) / 2 - p / 2 + c), e.insert("rect", ":first-child").attr("x", g).attr(
|
|
34
|
+
"y",
|
|
35
|
+
t().state.titleShift - t().state.textHeight - t().state.padding
|
|
36
|
+
).attr("width", o).attr("height", t().state.textHeight * 3).attr("rx", t().state.radius), e.insert("rect", ":first-child").attr("x", g).attr(
|
|
37
|
+
"y",
|
|
38
|
+
t().state.titleShift - t().state.textHeight - t().state.padding
|
|
39
|
+
).attr("width", o).attr("height", B.height + 3 + 2 * t().state.textHeight).attr("rx", t().state.radius), e;
|
|
40
|
+
}, "addTitleAndBox"), q = /* @__PURE__ */ f((e) => (e.append("circle").attr("class", "end-state-outer").attr("r", t().state.sizeUnit + t().state.miniPadding).attr(
|
|
41
|
+
"cx",
|
|
42
|
+
t().state.padding + t().state.sizeUnit + t().state.miniPadding
|
|
43
|
+
).attr(
|
|
44
|
+
"cy",
|
|
45
|
+
t().state.padding + t().state.sizeUnit + t().state.miniPadding
|
|
46
|
+
), 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"), Z = /* @__PURE__ */ f((e, i) => {
|
|
47
|
+
let s = t().state.forkWidth, c = t().state.forkHeight;
|
|
48
|
+
if (i.parentId) {
|
|
49
|
+
let n = s;
|
|
50
|
+
s = c, c = n;
|
|
51
|
+
}
|
|
52
|
+
return e.append("rect").style("stroke", "black").style("fill", "black").attr("width", s).attr("height", c).attr("x", t().state.padding).attr("y", t().state.padding);
|
|
53
|
+
}, "drawForkJoinState"), j = /* @__PURE__ */ f((e, i, s, c) => {
|
|
54
|
+
let n = 0;
|
|
55
|
+
const l = c.append("text");
|
|
56
|
+
l.style("text-anchor", "start"), l.attr("class", "noteText");
|
|
57
|
+
let x = e.replace(/\r\n/g, "<br/>");
|
|
58
|
+
x = x.replace(/\n/g, "<br/>");
|
|
59
|
+
const a = x.split(z.lineBreakRegex);
|
|
60
|
+
let d = 1.25 * t().state.noteMargin;
|
|
61
|
+
for (const y of a) {
|
|
62
|
+
const p = y.trim();
|
|
63
|
+
if (p.length > 0) {
|
|
64
|
+
const o = l.append("tspan");
|
|
65
|
+
if (o.text(p), d === 0) {
|
|
66
|
+
const g = o.node().getBBox();
|
|
67
|
+
d += g.height;
|
|
68
|
+
}
|
|
69
|
+
n += d, o.attr("x", i + t().state.noteMargin), o.attr("y", s + n + 1.25 * t().state.noteMargin);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return { textWidth: l.node().getBBox().width, textHeight: n };
|
|
73
|
+
}, "_drawLongText"), K = /* @__PURE__ */ f((e, i) => {
|
|
74
|
+
i.attr("class", "state-note");
|
|
75
|
+
const s = i.append("rect").attr("x", 0).attr("y", t().state.padding), c = i.append("g"), { textWidth: n, textHeight: l } = j(e, 0, 0, c);
|
|
76
|
+
return s.attr("height", l + 2 * t().state.noteMargin), s.attr("width", n + t().state.noteMargin * 2), s;
|
|
77
|
+
}, "drawNote"), L = /* @__PURE__ */ f(function(e, i) {
|
|
78
|
+
const s = i.id, c = {
|
|
79
|
+
id: s,
|
|
80
|
+
label: i.id,
|
|
81
|
+
width: 0,
|
|
82
|
+
height: 0
|
|
83
|
+
}, n = e.append("g").attr("id", s).attr("class", "stateGroup");
|
|
84
|
+
i.type === "start" && J(n), i.type === "end" && q(n), (i.type === "fork" || i.type === "join") && Z(n, i), i.type === "note" && K(i.note.text, n), i.type === "divider" && X(n), i.type === "default" && i.descriptions.length === 0 && Y(n, i), i.type === "default" && i.descriptions.length > 0 && I(n, i);
|
|
85
|
+
const l = n.node().getBBox();
|
|
86
|
+
return c.width = l.width + 2 * t().state.padding, c.height = l.height + 2 * t().state.padding, c;
|
|
87
|
+
}, "drawState"), A = 0, Q = /* @__PURE__ */ f(function(e, i, s) {
|
|
88
|
+
const c = /* @__PURE__ */ f(function(d) {
|
|
89
|
+
switch (d) {
|
|
90
|
+
case N.relationType.AGGREGATION:
|
|
91
|
+
return "aggregation";
|
|
92
|
+
case N.relationType.EXTENSION:
|
|
93
|
+
return "extension";
|
|
94
|
+
case N.relationType.COMPOSITION:
|
|
95
|
+
return "composition";
|
|
96
|
+
case N.relationType.DEPENDENCY:
|
|
97
|
+
return "dependency";
|
|
98
|
+
}
|
|
99
|
+
}, "getRelationType");
|
|
100
|
+
i.points = i.points.filter((d) => !Number.isNaN(d.y));
|
|
101
|
+
const n = i.points, l = U().x(function(d) {
|
|
102
|
+
return d.x;
|
|
103
|
+
}).y(function(d) {
|
|
104
|
+
return d.y;
|
|
105
|
+
}).curve(_), x = e.append("path").attr("d", l(n)).attr("id", "edge" + A).attr("class", "transition");
|
|
106
|
+
let a = "";
|
|
107
|
+
if (t().state.arrowMarkerAbsolute && (a = C(!0)), x.attr(
|
|
108
|
+
"marker-end",
|
|
109
|
+
"url(" + a + "#" + c(N.relationType.DEPENDENCY) + "End)"
|
|
110
|
+
), s.title !== void 0) {
|
|
111
|
+
const d = e.append("g").attr("class", "stateLabel"), { x: y, y: p } = F.calcLabelPosition(i.points), o = z.getRows(s.title);
|
|
112
|
+
let g = 0;
|
|
113
|
+
const B = [];
|
|
114
|
+
let w = 0;
|
|
115
|
+
for (let r = 0; r <= o.length; r++) {
|
|
116
|
+
const u = d.append("text").attr("text-anchor", "middle").text(o[r]).attr("x", y).attr("y", p + g), h = u.node().getBBox();
|
|
117
|
+
w = Math.max(w, h.width), S.info(h.x, y, p + g), g === 0 && (g = u.node().getBBox().height, S.info("Title height", g, p)), B.push(u);
|
|
118
|
+
}
|
|
119
|
+
let v = g * o.length;
|
|
120
|
+
if (o.length > 1) {
|
|
121
|
+
const r = (o.length - 1) * g * 0.5;
|
|
122
|
+
B.forEach((u, h) => u.attr("y", p + h * g - r)), v = g * o.length;
|
|
123
|
+
}
|
|
124
|
+
const k = d.node().getBBox();
|
|
125
|
+
d.insert("rect", ":first-child").attr("class", "box").attr("x", y - w / 2 - t().state.padding / 2).attr("y", p - v / 2 - t().state.padding / 2 - 3.5).attr("width", w + t().state.padding).attr("height", v + t().state.padding), S.info(k);
|
|
126
|
+
}
|
|
127
|
+
A++;
|
|
128
|
+
}, "drawEdge"), m, T = {}, V = /* @__PURE__ */ f(function() {
|
|
129
|
+
}, "setConf"), tt = /* @__PURE__ */ f(function(e) {
|
|
130
|
+
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");
|
|
131
|
+
}, "insertMarkers"), et = /* @__PURE__ */ f(function(e, i, s, c) {
|
|
132
|
+
m = t().state;
|
|
133
|
+
const n = t().securityLevel;
|
|
134
|
+
let l;
|
|
135
|
+
n === "sandbox" && (l = H("#i" + i));
|
|
136
|
+
const x = n === "sandbox" ? H(l.nodes()[0].contentDocument.body) : H("body"), a = n === "sandbox" ? l.nodes()[0].contentDocument : document;
|
|
137
|
+
S.debug("Rendering diagram " + e);
|
|
138
|
+
const d = x.select(`[id='${i}']`);
|
|
139
|
+
tt(d);
|
|
140
|
+
const y = c.db.getRootDoc();
|
|
141
|
+
R(y, d, void 0, !1, x, a, c);
|
|
142
|
+
const p = m.padding, o = d.node().getBBox(), g = o.width + p * 2, B = o.height + p * 2, w = g * 1.75;
|
|
143
|
+
P(d, B, w, m.useMaxWidth), d.attr(
|
|
144
|
+
"viewBox",
|
|
145
|
+
`${o.x - m.padding} ${o.y - m.padding} ` + g + " " + B
|
|
146
|
+
);
|
|
147
|
+
}, "draw"), at = /* @__PURE__ */ f((e) => e ? e.length * m.fontSizeFactor : 1, "getLabelWidth"), R = /* @__PURE__ */ f((e, i, s, c, n, l, x) => {
|
|
148
|
+
const a = new D({
|
|
149
|
+
compound: !0,
|
|
150
|
+
multigraph: !0
|
|
151
|
+
});
|
|
152
|
+
let d, y = !0;
|
|
153
|
+
for (d = 0; d < e.length; d++)
|
|
154
|
+
if (e[d].stmt === "relation") {
|
|
155
|
+
y = !1;
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
s ? a.setGraph({
|
|
159
|
+
rankdir: "LR",
|
|
160
|
+
multigraph: !0,
|
|
161
|
+
compound: !0,
|
|
162
|
+
// acyclicer: 'greedy',
|
|
163
|
+
ranker: "tight-tree",
|
|
164
|
+
ranksep: y ? 1 : m.edgeLengthFactor,
|
|
165
|
+
nodeSep: y ? 1 : 50,
|
|
166
|
+
isMultiGraph: !0
|
|
167
|
+
// ranksep: 5,
|
|
168
|
+
// nodesep: 1
|
|
169
|
+
}) : a.setGraph({
|
|
170
|
+
rankdir: "TB",
|
|
171
|
+
multigraph: !0,
|
|
172
|
+
compound: !0,
|
|
173
|
+
// isCompound: true,
|
|
174
|
+
// acyclicer: 'greedy',
|
|
175
|
+
// ranker: 'longest-path'
|
|
176
|
+
ranksep: y ? 1 : m.edgeLengthFactor,
|
|
177
|
+
nodeSep: y ? 1 : 50,
|
|
178
|
+
ranker: "tight-tree",
|
|
179
|
+
// ranker: 'network-simplex'
|
|
180
|
+
isMultiGraph: !0
|
|
181
|
+
}), a.setDefaultEdgeLabel(function() {
|
|
182
|
+
return {};
|
|
183
|
+
});
|
|
184
|
+
const p = x.db.getStates(), o = x.db.getRelations(), g = Object.keys(p);
|
|
185
|
+
for (const r of g) {
|
|
186
|
+
const u = p[r];
|
|
187
|
+
s && (u.parentId = s);
|
|
188
|
+
let h;
|
|
189
|
+
if (u.doc) {
|
|
190
|
+
let b = i.append("g").attr("id", u.id).attr("class", "stateGroup");
|
|
191
|
+
h = R(u.doc, b, u.id, !c, n, l, x);
|
|
192
|
+
{
|
|
193
|
+
b = $(b, u, c);
|
|
194
|
+
let E = b.node().getBBox();
|
|
195
|
+
h.width = E.width, h.height = E.height + m.padding / 2, T[u.id] = { y: m.compositTitleSize };
|
|
196
|
+
}
|
|
197
|
+
} else
|
|
198
|
+
h = L(i, u, a);
|
|
199
|
+
if (u.note) {
|
|
200
|
+
const b = {
|
|
201
|
+
descriptions: [],
|
|
202
|
+
id: u.id + "-note",
|
|
203
|
+
note: u.note,
|
|
204
|
+
type: "note"
|
|
205
|
+
}, E = L(i, b, a);
|
|
206
|
+
u.note.position === "left of" ? (a.setNode(h.id + "-note", E), a.setNode(h.id, h)) : (a.setNode(h.id, h), a.setNode(h.id + "-note", E)), a.setParent(h.id, h.id + "-group"), a.setParent(h.id + "-note", h.id + "-group");
|
|
207
|
+
} else
|
|
208
|
+
a.setNode(h.id, h);
|
|
209
|
+
}
|
|
210
|
+
S.debug("Count=", a.nodeCount(), a);
|
|
211
|
+
let B = 0;
|
|
212
|
+
o.forEach(function(r) {
|
|
213
|
+
B++, S.debug("Setting edge", r), a.setEdge(
|
|
214
|
+
r.id1,
|
|
215
|
+
r.id2,
|
|
216
|
+
{
|
|
217
|
+
relation: r,
|
|
218
|
+
width: at(r.title),
|
|
219
|
+
height: m.labelHeight * z.getRows(r.title).length,
|
|
220
|
+
labelpos: "c"
|
|
221
|
+
},
|
|
222
|
+
"id" + B
|
|
223
|
+
);
|
|
224
|
+
}), O(a), S.debug("Graph after layout", a.nodes());
|
|
225
|
+
const w = i.node();
|
|
226
|
+
a.nodes().forEach(function(r) {
|
|
227
|
+
r !== void 0 && a.node(r) !== void 0 ? (S.warn("Node " + r + ": " + JSON.stringify(a.node(r))), n.select("#" + w.id + " #" + r).attr(
|
|
228
|
+
"transform",
|
|
229
|
+
"translate(" + (a.node(r).x - a.node(r).width / 2) + "," + (a.node(r).y + (T[r] ? T[r].y : 0) - a.node(r).height / 2) + " )"
|
|
230
|
+
), n.select("#" + w.id + " #" + r).attr("data-x-shift", a.node(r).x - a.node(r).width / 2), l.querySelectorAll("#" + w.id + " #" + r + " .divider").forEach((h) => {
|
|
231
|
+
const b = h.parentElement;
|
|
232
|
+
let E = 0, M = 0;
|
|
233
|
+
b && (b.parentElement && (E = b.parentElement.getBBox().width), M = parseInt(b.getAttribute("data-x-shift"), 10), Number.isNaN(M) && (M = 0)), h.setAttribute("x1", 0 - M + 8), h.setAttribute("x2", E - M - 8);
|
|
234
|
+
})) : S.debug("No Node " + r + ": " + JSON.stringify(a.node(r)));
|
|
235
|
+
});
|
|
236
|
+
let v = w.getBBox();
|
|
237
|
+
a.edges().forEach(function(r) {
|
|
238
|
+
r !== void 0 && a.edge(r) !== void 0 && (S.debug("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(a.edge(r))), Q(i, a.edge(r), a.edge(r).relation));
|
|
239
|
+
}), v = w.getBBox();
|
|
240
|
+
const k = {
|
|
241
|
+
id: s || "root",
|
|
242
|
+
label: s || "root",
|
|
243
|
+
width: 0,
|
|
244
|
+
height: 0
|
|
245
|
+
};
|
|
246
|
+
return k.width = v.width + 2 * m.padding, k.height = v.height + 2 * m.padding, S.debug("Doc rendered", k, a), k;
|
|
247
|
+
}, "renderDoc"), it = {
|
|
248
|
+
setConf: V,
|
|
249
|
+
draw: et
|
|
250
|
+
}, ot = {
|
|
251
|
+
parser: G,
|
|
252
|
+
get db() {
|
|
253
|
+
return new N(1);
|
|
254
|
+
},
|
|
255
|
+
renderer: it,
|
|
256
|
+
styles: W,
|
|
257
|
+
init: /* @__PURE__ */ f((e) => {
|
|
258
|
+
e.state || (e.state = {}), e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute;
|
|
259
|
+
}, "init")
|
|
260
|
+
};
|
|
261
|
+
export {
|
|
262
|
+
ot as diagram
|
|
263
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { styles_default as t, stateRenderer_v3_unified_default as r, stateDiagram_default as a, StateDB as s } from "./chunk-DI55MBZ5.CcFvwYqB.js";
|
|
2
|
+
import { __name as i } from "./rehype-mermaid.QzUnaHa9.js";
|
|
3
|
+
var l = {
|
|
4
|
+
parser: a,
|
|
5
|
+
get db() {
|
|
6
|
+
return new s(2);
|
|
7
|
+
},
|
|
8
|
+
renderer: r,
|
|
9
|
+
styles: t,
|
|
10
|
+
init: /* @__PURE__ */ i((e) => {
|
|
11
|
+
e.state || (e.state = {}), e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute;
|
|
12
|
+
}, "init")
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
l as diagram
|
|
16
|
+
};
|