mermaid 10.2.0-rc.3 → 10.2.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/dist/arc-b5db4c05.js +84 -0
- package/dist/{arc-473cd57c.js → arc-ec6eac64.js} +1 -1
- package/dist/{c4Diagram-e568b41d.js → c4Diagram-1aeee79c.js} +2 -2
- package/dist/{c4Diagram-c7a0acdd.js → c4Diagram-4a1de0c4.js} +2 -2
- package/dist/{c4Diagram-199f731b.js → c4Diagram-513b24e8.js} +2 -2
- package/dist/{classDiagram-fb03395b.js → classDiagram-62cfb02d.js} +3 -3
- package/dist/{classDiagram-f1f1b369.js → classDiagram-bbe85371.js} +5 -5
- package/dist/{classDiagram-37ecfa99.js → classDiagram-f485cf84.js} +5 -5
- package/dist/{classDiagram-v2-5de3b278.js → classDiagram-v2-1c2c680d.js} +8 -8
- package/dist/{classDiagram-v2-8fff6e5c.js → classDiagram-v2-227953d9.js} +8 -8
- package/dist/{classDiagram-v2-83de054d.js → classDiagram-v2-c1dfb0e0.js} +6 -6
- package/dist/config.type.d.ts +21 -0
- package/dist/{createText-1dff81a8.js → createText-2f679d62.js} +8 -4
- package/dist/{createText-4e0f1f0c.js → createText-8ca1146d.js} +429 -428
- package/dist/{createText-f3d4d3fe.js → createText-b06b2794.js} +8 -4
- package/dist/diagrams/quadrant-chart/parser/quadrant.jison.spec.d.ts +1 -0
- package/dist/diagrams/quadrant-chart/quadrantBuilder.d.ts +121 -0
- package/dist/diagrams/quadrant-chart/quadrantDb.d.ts +40 -0
- package/dist/diagrams/quadrant-chart/quadrantDetector.d.ts +3 -0
- package/dist/diagrams/quadrant-chart/quadrantDiagram.d.ts +2 -0
- package/dist/diagrams/quadrant-chart/quadrantRenderer.d.ts +6 -0
- package/dist/diagrams/sequence/svgDraw.d.ts +27 -0
- package/dist/{edges-f422e3d3.js → edges-97052da4.js} +3 -3
- package/dist/{edges-01e30c2b.js → edges-9aecf713.js} +31 -31
- package/dist/{edges-4f4ce301.js → edges-a0c69811.js} +4 -4
- package/dist/{erDiagram-09fd31e3.js → erDiagram-5e907343.js} +1 -1
- package/dist/{erDiagram-3de52517.js → erDiagram-6e9c0e5f.js} +3 -3
- package/dist/{erDiagram-2b5cb76c.js → erDiagram-8104ad20.js} +3 -3
- package/dist/{flowDb-03511daa.js → flowDb-0019c359.js} +14 -14
- package/dist/{flowDb-eae138d1.js → flowDb-a707052f.js} +1 -1
- package/dist/{flowDb-2b7f8557.js → flowDb-ab4144b2.js} +1 -1
- package/dist/{flowDiagram-ad04da68.js → flowDiagram-1d5ecf94.js} +10 -10
- package/dist/{flowDiagram-b1273285.js → flowDiagram-6109f557.js} +10 -10
- package/dist/{flowDiagram-3fcb24d8.js → flowDiagram-702318ad.js} +7 -7
- package/dist/{flowDiagram-v2-befde62f.js → flowDiagram-v2-8716a26e.js} +8 -8
- package/dist/{flowDiagram-v2-d088aa31.js → flowDiagram-v2-8e0e5a90.js} +10 -10
- package/dist/{flowDiagram-v2-b9434384.js → flowDiagram-v2-a232e201.js} +10 -10
- package/dist/{flowchart-elk-definition-ff1959a5.js → flowchart-elk-definition-206a7d68.js} +5 -5
- package/dist/{flowchart-elk-definition-5d40ee53.js → flowchart-elk-definition-37ec854a.js} +6 -6
- package/dist/{flowchart-elk-definition-7b721de6.js → flowchart-elk-definition-de178c98.js} +6 -6
- package/dist/{ganttDiagram-ab9f04cc.js → ganttDiagram-3bc7fa50.js} +1 -1
- package/dist/{ganttDiagram-a45b9afd.js → ganttDiagram-528c8345.js} +41 -612
- package/dist/ganttDiagram-de5cce7c.js +2519 -0
- package/dist/{gitGraphDiagram-9303fed0.js → gitGraphDiagram-127727f3.js} +1 -1
- package/dist/{gitGraphDiagram-f3f3a472.js → gitGraphDiagram-55446347.js} +23 -23
- package/dist/{gitGraphDiagram-be3f3ec8.js → gitGraphDiagram-70b91930.js} +1 -1
- package/dist/{index-ab503ccc.js → index-05087a90.js} +3 -3
- package/dist/{index-3cc6e2ca.js → index-b9fa59d5.js} +4 -4
- package/dist/{index-be16ad8a.js → index-f7dc402e.js} +4 -4
- package/dist/{infoDiagram-9b53cad5.js → infoDiagram-4374b389.js} +1 -1
- package/dist/{infoDiagram-e58fbb2c.js → infoDiagram-6c45e6e5.js} +1 -1
- package/dist/{infoDiagram-1cb5f8c7.js → infoDiagram-a4952db5.js} +10 -10
- package/dist/{journeyDiagram-689f14ff.js → journeyDiagram-5faf9fb3.js} +3 -3
- package/dist/{journeyDiagram-ee776459.js → journeyDiagram-ccf0174b.js} +2 -2
- package/dist/{journeyDiagram-03417da9.js → journeyDiagram-e9f7e166.js} +3 -3
- package/dist/{layout-49db011e.js → layout-816c0a3e.js} +1 -1
- package/dist/{layout-36bd7e0b.js → layout-e57aec3f.js} +1 -1
- package/dist/{line-957727c6.js → line-53c588d2.js} +1 -1
- package/dist/{line-d38762f6.js → line-a77fdd5a.js} +1 -1
- package/dist/linear-02094aea.js +581 -0
- package/dist/linear-e84f7512.js +437 -0
- package/dist/{mermaid-d1efb8f7.js → mermaid-4b4b971d.js} +427 -142
- package/dist/{mermaid-17672fee.js → mermaid-9357f3d0.js} +2501 -2309
- package/dist/{mermaid-4883d8e9.js → mermaid-a953d906.js} +341 -72
- package/dist/mermaid.core.mjs +2 -2
- package/dist/mermaid.esm.min.mjs +1 -1
- package/dist/mermaid.esm.mjs +2 -2
- package/dist/mermaid.js +1951 -453
- package/dist/mermaid.min.js +189 -176
- package/dist/{mindmap-definition-7daf9ab0.js → mindmap-definition-72dfd2cf.js} +2 -3
- package/dist/{mindmap-definition-48ab9125.js → mindmap-definition-74e4e806.js} +2 -2
- package/dist/{mindmap-definition-52fa8cdf.js → mindmap-definition-f15622b9.js} +8 -9
- package/dist/{pieDiagram-22b24bf5.js → pieDiagram-b37f1ea3.js} +2 -2
- package/dist/{pieDiagram-d1a63084.js → pieDiagram-c6456618.js} +34 -34
- package/dist/{pieDiagram-a3359163.js → pieDiagram-f5e05a25.js} +1 -1
- package/dist/quadrantDiagram-00f6f261.js +1231 -0
- package/dist/quadrantDiagram-652558cb.js +1238 -0
- package/dist/quadrantDiagram-f1fd3d51.js +929 -0
- package/dist/{requirementDiagram-80140b7d.js → requirementDiagram-128084d2.js} +3 -3
- package/dist/{requirementDiagram-083674ac.js → requirementDiagram-730b4d6e.js} +1 -1
- package/dist/{requirementDiagram-bff48799.js → requirementDiagram-9d006eb9.js} +3 -3
- package/dist/{selectAll-15c8cb5f.js → selectAll-9c9e0fdb.js} +3 -3
- package/dist/{selectAll-49bce7ad.js → selectAll-f3da6cb0.js} +1 -1
- package/dist/{sequenceDiagram-3f591a21.js → sequenceDiagram-0cbbfffa.js} +232 -203
- package/dist/{sequenceDiagram-752f2466.js → sequenceDiagram-edd7e28f.js} +40 -9
- package/dist/{sequenceDiagram-2ea4cbbc.js → sequenceDiagram-fd141e9d.js} +41 -10
- package/dist/{stateDiagram-0ba875a4.js → stateDiagram-27a317c3.js} +4 -4
- package/dist/{stateDiagram-c26f1369.js → stateDiagram-84937bea.js} +7 -7
- package/dist/{stateDiagram-cb0a7532.js → stateDiagram-d766d74d.js} +2 -2
- package/dist/{stateDiagram-v2-2c143c30.js → stateDiagram-v2-95cd6741.js} +8 -8
- package/dist/{stateDiagram-v2-9ac9d58b.js → stateDiagram-v2-978d1189.js} +6 -6
- package/dist/{stateDiagram-v2-928e0426.js → stateDiagram-v2-f9cea4e2.js} +8 -8
- package/dist/{styles-ead96a04.js → styles-237fcbdf.js} +1 -1
- package/dist/{styles-29f1508e.js → styles-2797ae0f.js} +1 -1
- package/dist/{styles-a7200ced.js → styles-38a11c49.js} +1 -1
- package/dist/{styles-bd3b226b.js → styles-40ddcbf3.js} +17 -3
- package/dist/{styles-19ae0830.js → styles-4ffad38c.js} +1 -1
- package/dist/{styles-f2b2c077.js → styles-6e15b198.js} +1 -1
- package/dist/{styles-090885cc.js → styles-83c6d4e6.js} +1 -1
- package/dist/{styles-96bf2739.js → styles-8f10a3c1.js} +22 -5
- package/dist/{styles-c4bf2442.js → styles-9a36b1c0.js} +61 -51
- package/dist/{svgDraw-9da5dbf5.js → svgDraw-1b15aedc.js} +8 -58
- package/dist/{svgDraw-c2698b60.js → svgDraw-6750006d.js} +7 -57
- package/dist/svgDraw-c2b80d25.js +159 -0
- package/dist/{svgDrawCommon-bc4dbaa0.js → svgDrawCommon-7d467860.js} +5 -5
- package/dist/{svgDrawCommon-bce0e3fb.js → svgDrawCommon-ca4e6afc.js} +5 -5
- package/dist/{svgDrawCommon-84d0baf9.js → svgDrawCommon-f26cad39.js} +4 -4
- package/dist/themes/theme-base.d.ts +15 -0
- package/dist/themes/theme-dark.d.ts +15 -0
- package/dist/themes/theme-default.d.ts +15 -0
- package/dist/themes/theme-forest.d.ts +15 -0
- package/dist/themes/theme-neutral.d.ts +15 -0
- package/dist/{timeline-definition-9baef421.js → timeline-definition-8c5f9700.js} +2 -3
- package/dist/{timeline-definition-2d5231c9.js → timeline-definition-a4c404a4.js} +70 -71
- package/dist/{timeline-definition-77684219.js → timeline-definition-d53f6d76.js} +1 -1
- package/package.json +1 -1
- package/dist/arc-4a924c66.js +0 -84
- package/dist/ganttDiagram-4938cfd4.js +0 -2946
- package/dist/is_dark-7df82b4b.js +0 -8
- package/dist/is_dark-80684c12.js +0 -18
- package/dist/svgDraw-b86ce8e1.js +0 -186
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { c as H, p as sn } from "./constant-2fe7eae5.js";
|
|
2
|
+
import { aD as en, aE as y, S as ln, aF as M, aG as D, aH as z, aI as b, aJ as an, aK as rn, aL as t, aM as un, aN as on, aO as tn } from "./mermaid-9357f3d0.js";
|
|
3
|
+
function fn(l) {
|
|
4
|
+
return l.innerRadius;
|
|
5
|
+
}
|
|
6
|
+
function cn(l) {
|
|
7
|
+
return l.outerRadius;
|
|
8
|
+
}
|
|
9
|
+
function yn(l) {
|
|
10
|
+
return l.startAngle;
|
|
11
|
+
}
|
|
12
|
+
function gn(l) {
|
|
13
|
+
return l.endAngle;
|
|
14
|
+
}
|
|
15
|
+
function mn(l) {
|
|
16
|
+
return l && l.padAngle;
|
|
17
|
+
}
|
|
18
|
+
function pn(l, x, O, E, h, v, J, a) {
|
|
19
|
+
var s = O - l, n = E - x, m = J - h, i = a - v, r = i * s - m * n;
|
|
20
|
+
if (!(r * r < y))
|
|
21
|
+
return r = (m * (x - v) - i * (l - h)) / r, [l + r * s, x + r * n];
|
|
22
|
+
}
|
|
23
|
+
function V(l, x, O, E, h, v, J) {
|
|
24
|
+
var a = l - O, s = x - E, n = (J ? v : -v) / z(a * a + s * s), m = n * s, i = -n * a, r = l + m, f = x + i, c = O + m, S = E + i, o = (r + c) / 2, q = (f + S) / 2, p = c - r, g = S - f, A = p * p + g * g, w = h - v, P = r * S - c * f, F = (g < 0 ? -1 : 1) * z(tn(0, w * w * A - P * P)), G = (P * g - p * F) / A, d = (-P * p - g * F) / A, R = (P * g + p * F) / A, T = (-P * p + g * F) / A, e = G - o, u = d - q, K = R - o, L = T - q;
|
|
25
|
+
return e * e + u * u > K * K + L * L && (G = R, d = T), {
|
|
26
|
+
cx: G,
|
|
27
|
+
cy: d,
|
|
28
|
+
x01: -m,
|
|
29
|
+
y01: -i,
|
|
30
|
+
x11: G * (h / w - 1),
|
|
31
|
+
y11: d * (h / w - 1)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function hn() {
|
|
35
|
+
var l = fn, x = cn, O = H(0), E = null, h = yn, v = gn, J = mn, a = null;
|
|
36
|
+
function s() {
|
|
37
|
+
var n, m, i = +l.apply(this, arguments), r = +x.apply(this, arguments), f = h.apply(this, arguments) - en, c = v.apply(this, arguments) - en, S = an(c - f), o = c > f;
|
|
38
|
+
if (a || (a = n = sn()), r < i && (m = r, r = i, i = m), !(r > y))
|
|
39
|
+
a.moveTo(0, 0);
|
|
40
|
+
else if (S > ln - y)
|
|
41
|
+
a.moveTo(r * M(f), r * D(f)), a.arc(0, 0, r, f, c, !o), i > y && (a.moveTo(i * M(c), i * D(c)), a.arc(0, 0, i, c, f, o));
|
|
42
|
+
else {
|
|
43
|
+
var q = f, p = c, g = f, A = c, w = S, P = S, F = J.apply(this, arguments) / 2, G = F > y && (E ? +E.apply(this, arguments) : z(i * i + r * r)), d = b(an(r - i) / 2, +O.apply(this, arguments)), R = d, T = d, e, u;
|
|
44
|
+
if (G > y) {
|
|
45
|
+
var K = un(G / i * D(F)), L = un(G / r * D(F));
|
|
46
|
+
(w -= K * 2) > y ? (K *= o ? 1 : -1, g += K, A -= K) : (w = 0, g = A = (f + c) / 2), (P -= L * 2) > y ? (L *= o ? 1 : -1, q += L, p -= L) : (P = 0, q = p = (f + c) / 2);
|
|
47
|
+
}
|
|
48
|
+
var N = r * M(q), j = r * D(q), B = i * M(A), C = i * D(A);
|
|
49
|
+
if (d > y) {
|
|
50
|
+
var Q = r * M(p), U = r * D(p), W = i * M(g), X = i * D(g), I;
|
|
51
|
+
if (S < rn && (I = pn(N, j, W, X, Q, U, B, C))) {
|
|
52
|
+
var Y = N - I[0], Z = j - I[1], $ = Q - I[0], k = U - I[1], _ = 1 / D(on((Y * $ + Z * k) / (z(Y * Y + Z * Z) * z($ * $ + k * k))) / 2), nn = z(I[0] * I[0] + I[1] * I[1]);
|
|
53
|
+
R = b(d, (i - nn) / (_ - 1)), T = b(d, (r - nn) / (_ + 1));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
P > y ? T > y ? (e = V(W, X, N, j, r, T, o), u = V(Q, U, B, C, r, T, o), a.moveTo(e.cx + e.x01, e.cy + e.y01), T < d ? a.arc(e.cx, e.cy, T, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (a.arc(e.cx, e.cy, T, t(e.y01, e.x01), t(e.y11, e.x11), !o), a.arc(0, 0, r, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), !o), a.arc(u.cx, u.cy, T, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : (a.moveTo(N, j), a.arc(0, 0, r, q, p, !o)) : a.moveTo(N, j), !(i > y) || !(w > y) ? a.lineTo(B, C) : R > y ? (e = V(B, C, Q, U, i, -R, o), u = V(N, j, W, X, i, -R, o), a.lineTo(e.cx + e.x01, e.cy + e.y01), R < d ? a.arc(e.cx, e.cy, R, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (a.arc(e.cx, e.cy, R, t(e.y01, e.x01), t(e.y11, e.x11), !o), a.arc(0, 0, i, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), o), a.arc(u.cx, u.cy, R, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : a.arc(0, 0, i, A, g, o);
|
|
57
|
+
}
|
|
58
|
+
if (a.closePath(), n)
|
|
59
|
+
return a = null, n + "" || null;
|
|
60
|
+
}
|
|
61
|
+
return s.centroid = function() {
|
|
62
|
+
var n = (+l.apply(this, arguments) + +x.apply(this, arguments)) / 2, m = (+h.apply(this, arguments) + +v.apply(this, arguments)) / 2 - rn / 2;
|
|
63
|
+
return [M(m) * n, D(m) * n];
|
|
64
|
+
}, s.innerRadius = function(n) {
|
|
65
|
+
return arguments.length ? (l = typeof n == "function" ? n : H(+n), s) : l;
|
|
66
|
+
}, s.outerRadius = function(n) {
|
|
67
|
+
return arguments.length ? (x = typeof n == "function" ? n : H(+n), s) : x;
|
|
68
|
+
}, s.cornerRadius = function(n) {
|
|
69
|
+
return arguments.length ? (O = typeof n == "function" ? n : H(+n), s) : O;
|
|
70
|
+
}, s.padRadius = function(n) {
|
|
71
|
+
return arguments.length ? (E = n == null ? null : typeof n == "function" ? n : H(+n), s) : E;
|
|
72
|
+
}, s.startAngle = function(n) {
|
|
73
|
+
return arguments.length ? (h = typeof n == "function" ? n : H(+n), s) : h;
|
|
74
|
+
}, s.endAngle = function(n) {
|
|
75
|
+
return arguments.length ? (v = typeof n == "function" ? n : H(+n), s) : v;
|
|
76
|
+
}, s.padAngle = function(n) {
|
|
77
|
+
return arguments.length ? (J = typeof n == "function" ? n : H(+n), s) : J;
|
|
78
|
+
}, s.context = function(n) {
|
|
79
|
+
return arguments.length ? (a = n ?? null, s) : a;
|
|
80
|
+
}, s;
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
hn as d
|
|
84
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as constant, p as path } from "./constant-b644328d.js";
|
|
2
|
-
import {
|
|
2
|
+
import { aD as halfPi, aE as epsilon, S as tau, aF as cos, aG as sin, aH as sqrt, aI as min, aJ as abs, aK as pi, aL as atan2, aM as asin, aN as acos, aO as max } from "./mermaid-4b4b971d.js";
|
|
3
3
|
function arcInnerRadius(d) {
|
|
4
4
|
return d.innerRadius;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as Ye, g as Ie, a as Ve, b as je, c as Ut, d as ve, m as Ue, e as Fe, f as le, h as Xe, i as Yt, j as Qt, l as _e, k as ze, w as We, n as xe } from "./mermaid-
|
|
2
|
-
import { d as Qe, g as He } from "./svgDrawCommon-
|
|
1
|
+
import { s as Ye, g as Ie, a as Ve, b as je, c as Ut, d as ve, m as Ue, e as Fe, f as le, h as Xe, i as Yt, j as Qt, l as _e, k as ze, w as We, n as xe } from "./mermaid-9357f3d0.js";
|
|
2
|
+
import { d as Qe, g as He } from "./svgDrawCommon-7d467860.js";
|
|
3
3
|
var qt = function() {
|
|
4
4
|
var e = function(Ot, _, x, m) {
|
|
5
5
|
for (x = x || {}, m = Ot.length; m--; x[Ot[m]] = _)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, c as getConfig, d as sanitizeText, m as mermaidAPI, e as common, f as assignWithDepth, h as calculateTextWidth, l as log, i as configureSvgSize, w as wrapLabel, j as calculateTextHeight } from "./mermaid-
|
|
1
|
+
import { s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, c as getConfig, d as sanitizeText, m as mermaidAPI, e as common, f as assignWithDepth, h as calculateTextWidth, l as log, i as configureSvgSize, w as wrapLabel, j as calculateTextHeight } from "./mermaid-a953d906.js";
|
|
2
2
|
import { select } from "d3";
|
|
3
|
-
import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-
|
|
3
|
+
import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-f26cad39.js";
|
|
4
4
|
import { sanitizeUrl } from "@braintree/sanitize-url";
|
|
5
5
|
import "ts-dedent";
|
|
6
6
|
import "dayjs/esm/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, c as getConfig, d as sanitizeText, m as mermaidAPI, e as sanitizeUrl_1, f as common, h as assignWithDepth, i as calculateTextWidth, j as select, l as log, k as configureSvgSize, w as wrapLabel, n as calculateTextHeight } from "./mermaid-
|
|
2
|
-
import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-
|
|
1
|
+
import { s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, c as getConfig, d as sanitizeText, m as mermaidAPI, e as sanitizeUrl_1, f as common, h as assignWithDepth, i as calculateTextWidth, j as select, l as log, k as configureSvgSize, w as wrapLabel, n as calculateTextHeight } from "./mermaid-4b4b971d.js";
|
|
2
|
+
import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-ca4e6afc.js";
|
|
3
3
|
var parser = function() {
|
|
4
4
|
var o = function(k, v, o2, l) {
|
|
5
5
|
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as parser, d as db, s as styles } from "./styles-
|
|
1
|
+
import { p as parser, d as db, s as styles } from "./styles-237fcbdf.js";
|
|
2
2
|
import { select } from "d3";
|
|
3
3
|
import { layout } from "dagre-d3-es/src/dagre/index.js";
|
|
4
4
|
import * as graphlib from "dagre-d3-es/src/graphlib/index.js";
|
|
5
|
-
import { c as getConfig, l as log, i as configureSvgSize } from "./mermaid-
|
|
6
|
-
import { s as svgDraw } from "./svgDraw-
|
|
5
|
+
import { c as getConfig, l as log, i as configureSvgSize } from "./mermaid-a953d906.js";
|
|
6
|
+
import { s as svgDraw } from "./svgDraw-6750006d.js";
|
|
7
7
|
import "ts-dedent";
|
|
8
8
|
import "dayjs/esm/index.js";
|
|
9
9
|
import "@braintree/sanitize-url";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { p as W, d as M, s as H } from "./styles-
|
|
2
|
-
import { c as S, l as d, j as m, k as X } from "./mermaid-
|
|
3
|
-
import { G as Y, l as Z } from "./layout-
|
|
4
|
-
import { s as l } from "./svgDraw-
|
|
5
|
-
import "./line-
|
|
1
|
+
import { p as W, d as M, s as H } from "./styles-83c6d4e6.js";
|
|
2
|
+
import { c as S, l as d, j as m, k as X } from "./mermaid-9357f3d0.js";
|
|
3
|
+
import { G as Y, l as Z } from "./layout-816c0a3e.js";
|
|
4
|
+
import { s as l } from "./svgDraw-c2b80d25.js";
|
|
5
|
+
import "./line-a77fdd5a.js";
|
|
6
6
|
import "./array-2ff2c7a6.js";
|
|
7
7
|
import "./constant-2fe7eae5.js";
|
|
8
8
|
let h = {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { p as parser, d as db, s as styles } from "./styles-
|
|
2
|
-
import { c as getConfig, l as log, j as select, k as configureSvgSize } from "./mermaid-
|
|
3
|
-
import { G as Graph, l as layout } from "./layout-
|
|
4
|
-
import { s as svgDraw } from "./svgDraw-
|
|
5
|
-
import "./line-
|
|
1
|
+
import { p as parser, d as db, s as styles } from "./styles-38a11c49.js";
|
|
2
|
+
import { c as getConfig, l as log, j as select, k as configureSvgSize } from "./mermaid-4b4b971d.js";
|
|
3
|
+
import { G as Graph, l as layout } from "./layout-e57aec3f.js";
|
|
4
|
+
import { s as svgDraw } from "./svgDraw-1b15aedc.js";
|
|
5
|
+
import "./line-53c588d2.js";
|
|
6
6
|
import "./array-b7dcf730.js";
|
|
7
7
|
import "./constant-b644328d.js";
|
|
8
8
|
let idCache = {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { p as R, d as N, s as B } from "./styles-
|
|
2
|
-
import { l as c, c as r, j as k, x as G, t as _, r as D, o as E, p as z, f as A } from "./mermaid-
|
|
3
|
-
import { G as P } from "./layout-
|
|
4
|
-
import { r as $ } from "./index-
|
|
5
|
-
import "./edges-
|
|
6
|
-
import "./createText-
|
|
7
|
-
import "./svgDraw-
|
|
8
|
-
import "./line-
|
|
1
|
+
import { p as R, d as N, s as B } from "./styles-83c6d4e6.js";
|
|
2
|
+
import { l as c, c as r, j as k, x as G, t as _, r as D, o as E, p as z, f as A } from "./mermaid-9357f3d0.js";
|
|
3
|
+
import { G as P } from "./layout-816c0a3e.js";
|
|
4
|
+
import { r as $ } from "./index-b9fa59d5.js";
|
|
5
|
+
import "./edges-9aecf713.js";
|
|
6
|
+
import "./createText-8ca1146d.js";
|
|
7
|
+
import "./svgDraw-c2b80d25.js";
|
|
8
|
+
import "./line-a77fdd5a.js";
|
|
9
9
|
import "./array-2ff2c7a6.js";
|
|
10
10
|
import "./constant-2fe7eae5.js";
|
|
11
11
|
const S = (o) => A.sanitizeText(o, r());
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { p as parser, d as db, s as styles } from "./styles-
|
|
2
|
-
import { l as log, c as getConfig, j as select, x as utils, t as setupGraphViewbox, r as interpolateToCurve, o as curveLinear, p as getStylesFromArray, f as common } from "./mermaid-
|
|
3
|
-
import { G as Graph } from "./layout-
|
|
4
|
-
import { r as render } from "./index-
|
|
5
|
-
import "./edges-
|
|
6
|
-
import "./createText-
|
|
7
|
-
import "./svgDraw-
|
|
8
|
-
import "./line-
|
|
1
|
+
import { p as parser, d as db, s as styles } from "./styles-38a11c49.js";
|
|
2
|
+
import { l as log, c as getConfig, j as select, x as utils, t as setupGraphViewbox, r as interpolateToCurve, o as curveLinear, p as getStylesFromArray, f as common } from "./mermaid-4b4b971d.js";
|
|
3
|
+
import { G as Graph } from "./layout-e57aec3f.js";
|
|
4
|
+
import { r as render } from "./index-f7dc402e.js";
|
|
5
|
+
import "./edges-a0c69811.js";
|
|
6
|
+
import "./createText-b06b2794.js";
|
|
7
|
+
import "./svgDraw-1b15aedc.js";
|
|
8
|
+
import "./line-53c588d2.js";
|
|
9
9
|
import "./array-b7dcf730.js";
|
|
10
10
|
import "./constant-b644328d.js";
|
|
11
11
|
const sanitizeText = (txt) => common.sanitizeText(txt, getConfig());
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { p as parser, d as db, s as styles } from "./styles-
|
|
1
|
+
import { p as parser, d as db, s as styles } from "./styles-237fcbdf.js";
|
|
2
2
|
import { select, curveLinear } from "d3";
|
|
3
3
|
import * as graphlib from "dagre-d3-es/src/graphlib/index.js";
|
|
4
|
-
import { l as log, c as getConfig, u as utils, p as setupGraphViewbox, o as interpolateToCurve, k as getStylesFromArray, e as common } from "./mermaid-
|
|
5
|
-
import { r as render } from "./index-
|
|
4
|
+
import { l as log, c as getConfig, u as utils, p as setupGraphViewbox, o as interpolateToCurve, k as getStylesFromArray, e as common } from "./mermaid-a953d906.js";
|
|
5
|
+
import { r as render } from "./index-05087a90.js";
|
|
6
6
|
import "ts-dedent";
|
|
7
7
|
import "dayjs/esm/index.js";
|
|
8
8
|
import "@braintree/sanitize-url";
|
|
@@ -13,10 +13,10 @@ import "stylis";
|
|
|
13
13
|
import "lodash-es/isEmpty.js";
|
|
14
14
|
import "dagre-d3-es/src/dagre/index.js";
|
|
15
15
|
import "dagre-d3-es/src/graphlib/json.js";
|
|
16
|
-
import "./edges-
|
|
17
|
-
import "./createText-
|
|
16
|
+
import "./edges-97052da4.js";
|
|
17
|
+
import "./createText-2f679d62.js";
|
|
18
18
|
import "mdast-util-from-markdown";
|
|
19
|
-
import "./svgDraw-
|
|
19
|
+
import "./svgDraw-6750006d.js";
|
|
20
20
|
const sanitizeText = (txt) => common.sanitizeText(txt, getConfig());
|
|
21
21
|
let conf = {
|
|
22
22
|
dividerMargin: 10,
|
package/dist/config.type.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export interface MermaidConfig {
|
|
|
24
24
|
state?: StateDiagramConfig;
|
|
25
25
|
er?: ErDiagramConfig;
|
|
26
26
|
pie?: PieDiagramConfig;
|
|
27
|
+
quadrantChart?: QuadrantChartConfig;
|
|
27
28
|
requirement?: RequirementDiagramConfig;
|
|
28
29
|
mindmap?: MindmapDiagramConfig;
|
|
29
30
|
gitGraph?: GitGraphDiagramConfig;
|
|
@@ -214,6 +215,26 @@ export interface MindmapDiagramConfig extends BaseDiagramConfig {
|
|
|
214
215
|
export interface PieDiagramConfig extends BaseDiagramConfig {
|
|
215
216
|
textPosition?: number;
|
|
216
217
|
}
|
|
218
|
+
export interface QuadrantChartConfig extends BaseDiagramConfig {
|
|
219
|
+
chartWidth: number;
|
|
220
|
+
chartHeight: number;
|
|
221
|
+
titleFontSize: number;
|
|
222
|
+
titlePadding: number;
|
|
223
|
+
quadrantPadding: number;
|
|
224
|
+
xAxisLabelPadding: number;
|
|
225
|
+
yAxisLabelPadding: number;
|
|
226
|
+
xAxisLabelFontSize: number;
|
|
227
|
+
yAxisLabelFontSize: number;
|
|
228
|
+
quadrantLabelFontSize: number;
|
|
229
|
+
quadrantTextTopPadding: number;
|
|
230
|
+
pointTextPadding: number;
|
|
231
|
+
pointLabelFontSize: number;
|
|
232
|
+
pointRadius: number;
|
|
233
|
+
xAxisPosition: 'top' | 'bottom';
|
|
234
|
+
yAxisPosition: 'left' | 'right';
|
|
235
|
+
quadrantInternalBorderStrokeWidth: number;
|
|
236
|
+
quadrantExternalBorderStrokeWidth: number;
|
|
237
|
+
}
|
|
217
238
|
export interface ErDiagramConfig extends BaseDiagramConfig {
|
|
218
239
|
titleTopMargin?: number;
|
|
219
240
|
diagramPadding?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as log,
|
|
1
|
+
import { l as log, H as decodeEntities } from "./mermaid-a953d906.js";
|
|
2
2
|
import { fromMarkdown } from "mdast-util-from-markdown";
|
|
3
3
|
import { dedent } from "ts-dedent";
|
|
4
4
|
function preprocessMarkdown(markdown) {
|
|
@@ -61,19 +61,23 @@ function applyStyle(dom, styleFn) {
|
|
|
61
61
|
dom.attr("style", styleFn);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
function addHtmlSpan(element, node, width, classes) {
|
|
64
|
+
function addHtmlSpan(element, node, width, classes, addBackground = false) {
|
|
65
65
|
const fo = element.append("foreignObject");
|
|
66
66
|
const div = fo.append("xhtml:div");
|
|
67
67
|
const label = node.label;
|
|
68
68
|
const labelClass = node.isNode ? "nodeLabel" : "edgeLabel";
|
|
69
69
|
div.html(
|
|
70
|
-
|
|
70
|
+
`
|
|
71
|
+
<span class="${labelClass} ${classes}" ` + (node.labelStyle ? 'style="' + node.labelStyle + '"' : "") + ">" + label + "</span>"
|
|
71
72
|
);
|
|
72
73
|
applyStyle(div, node.labelStyle);
|
|
73
74
|
div.style("display", "table-cell");
|
|
74
75
|
div.style("white-space", "nowrap");
|
|
75
76
|
div.style("max-width", width + "px");
|
|
76
77
|
div.attr("xmlns", "http://www.w3.org/1999/xhtml");
|
|
78
|
+
if (addBackground) {
|
|
79
|
+
div.attr("class", "labelBkg");
|
|
80
|
+
}
|
|
77
81
|
let bbox = div.node().getBoundingClientRect();
|
|
78
82
|
if (bbox.width === width) {
|
|
79
83
|
div.style("display", "table");
|
|
@@ -154,7 +158,7 @@ const createText = (el, text = "", {
|
|
|
154
158
|
),
|
|
155
159
|
labelStyle: style.replace("fill:", "color:")
|
|
156
160
|
};
|
|
157
|
-
let vertexNode = addHtmlSpan(el, node, width, classes);
|
|
161
|
+
let vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground);
|
|
158
162
|
return vertexNode;
|
|
159
163
|
} else {
|
|
160
164
|
const structuredText = markdownToLines(text);
|