mermaid 10.3.0 → 10.4.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.
Files changed (172) hide show
  1. package/README.md +1 -1
  2. package/README.zh-CN.md +1 -1
  3. package/dist/Diagram.d.ts +7 -5
  4. package/dist/arc-1026bbaf.js +84 -0
  5. package/dist/{arc-9d741495.js → arc-eae95b9d.js} +1 -1
  6. package/dist/assignWithDepth.d.ts +19 -20
  7. package/dist/{c4Diagram-1bdb45a8.js → c4Diagram-01b08bdc.js} +2 -2
  8. package/dist/{c4Diagram-0115bee6.js → c4Diagram-ae26940c.js} +2 -2
  9. package/dist/{c4Diagram-36d27044.js → c4Diagram-c0b17d02.js} +3 -2
  10. package/dist/{classDiagram-185c1a10.js → classDiagram-09b02f81.js} +5 -5
  11. package/dist/{classDiagram-5e843ae7.js → classDiagram-a8cc8886.js} +4 -3
  12. package/dist/{classDiagram-819d3ad4.js → classDiagram-aa2e62c5.js} +5 -5
  13. package/dist/{classDiagram-v2-c4607319.js → classDiagram-v2-115132f8.js} +8 -8
  14. package/dist/{classDiagram-v2-6dc3b9c3.js → classDiagram-v2-441552b7.js} +12 -12
  15. package/dist/{classDiagram-v2-8c3b3e6a.js → classDiagram-v2-802a48d3.js} +7 -6
  16. package/dist/config.d.ts +2 -2
  17. package/dist/config.type.d.ts +35 -20
  18. package/dist/{createText-285e50b4.js → createText-3b1f58a4.js} +1 -1
  19. package/dist/{createText-2c3b104b.js → createText-6836bc4a.js} +1 -1
  20. package/dist/{createText-94e3ebbf.js → createText-98e4790d.js} +1 -1
  21. package/dist/defaultConfig.d.ts +4 -3
  22. package/dist/diagram-api/detectType.d.ts +3 -3
  23. package/dist/diagram-api/diagramAPI.d.ts +2 -2
  24. package/dist/diagram-api/frontmatter.d.ts +4 -3
  25. package/dist/diagram-api/loadDiagram.d.ts +1 -0
  26. package/dist/diagram-api/regexes.d.ts +3 -0
  27. package/dist/diagram-api/types.d.ts +17 -6
  28. package/dist/diagrams/c4/c4Diagram.d.ts +1 -1
  29. package/dist/diagrams/c4/svgDraw.d.ts +1 -1
  30. package/dist/diagrams/class/classDb.d.ts +1 -1
  31. package/dist/diagrams/class/classDiagram-v2.d.ts +1 -1
  32. package/dist/diagrams/class/classDiagram.d.ts +1 -1
  33. package/dist/diagrams/class/classRenderer-v2.d.ts +1 -1
  34. package/dist/diagrams/common/common.d.ts +1 -1
  35. package/dist/diagrams/common/common.spec.d.ts +1 -0
  36. package/dist/diagrams/common/commonTypes.d.ts +50 -0
  37. package/dist/diagrams/common/svgDrawCommon.d.ts +15 -0
  38. package/dist/diagrams/error/errorDiagram.d.ts +2 -2
  39. package/dist/diagrams/error/errorRenderer.d.ts +5 -12
  40. package/dist/diagrams/flowchart/flowDiagram-v2.d.ts +1 -1
  41. package/dist/diagrams/flowchart/flowDiagram.d.ts +1 -1
  42. package/dist/diagrams/gantt/ganttDiagram.d.ts +1 -1
  43. package/dist/diagrams/git/gitGraphDiagram.d.ts +1 -1
  44. package/dist/diagrams/mindmap/mindmapDb.d.ts +1 -1
  45. package/dist/diagrams/pie/pie.spec.d.ts +1 -0
  46. package/dist/diagrams/pie/pieDb.d.ts +6 -30
  47. package/dist/diagrams/pie/pieDetector.d.ts +1 -2
  48. package/dist/diagrams/pie/pieDiagram.d.ts +1 -1
  49. package/dist/diagrams/pie/pieRenderer.d.ts +13 -5
  50. package/dist/diagrams/pie/pieStyles.d.ts +3 -0
  51. package/dist/diagrams/pie/pieTypes.d.ts +54 -0
  52. package/dist/diagrams/quadrant-chart/quadrantDiagram.d.ts +1 -1
  53. package/dist/diagrams/quadrant-chart/quadrantRenderer.d.ts +1 -1
  54. package/dist/diagrams/requirement/requirementDiagram.d.ts +1 -1
  55. package/dist/diagrams/sankey/sankeyDiagram.d.ts +1 -1
  56. package/dist/diagrams/sankey/sankeyRenderer.d.ts +1 -1
  57. package/dist/diagrams/sequence/sequenceDiagram.d.ts +1 -1
  58. package/dist/diagrams/sequence/sequenceRenderer.d.ts +1 -1
  59. package/dist/diagrams/sequence/svgDraw.d.ts +1 -1
  60. package/dist/diagrams/state/stateDiagram-v2.d.ts +1 -1
  61. package/dist/diagrams/state/stateDiagram.d.ts +1 -1
  62. package/dist/diagrams/timeline/timelineRenderer.d.ts +3 -3
  63. package/dist/diagrams/user-journey/journeyDiagram.d.ts +1 -1
  64. package/dist/diagrams/user-journey/svgDraw.d.ts +2 -2
  65. package/dist/{edges-b00f0ec2.js → edges-0005682e.js} +89 -18
  66. package/dist/{edges-558884ee.js → edges-6be02a86.js} +321 -259
  67. package/dist/{edges-df708b89.js → edges-ecd2ecb8.js} +90 -19
  68. package/dist/{erDiagram-de1b0455.js → erDiagram-98d114f5.js} +3 -3
  69. package/dist/{erDiagram-97139f44.js → erDiagram-9aadf2be.js} +17 -17
  70. package/dist/{erDiagram-0ccc0425.js → erDiagram-dedf2781.js} +2 -1
  71. package/dist/flowDb-1d600296.js +1139 -0
  72. package/dist/{flowDb-7a27455c.js → flowDb-3647b264.js} +224 -169
  73. package/dist/{flowDb-8f9fc471.js → flowDb-ff651a22.js} +224 -169
  74. package/dist/{flowDiagram-ccbbb58d.js → flowDiagram-5d2b0cd4.js} +21 -26
  75. package/dist/{flowDiagram-786cd8ff.js → flowDiagram-791cd6ce.js} +10 -18
  76. package/dist/{flowDiagram-698c8d5d.js → flowDiagram-d6f8fe3a.js} +9 -16
  77. package/dist/{flowDiagram-v2-d6437390.js → flowDiagram-v2-58f49b84.js} +8 -7
  78. package/dist/{flowDiagram-v2-65161881.js → flowDiagram-v2-ba221793.js} +9 -9
  79. package/dist/{flowDiagram-v2-79ccd6da.js → flowDiagram-v2-c8096018.js} +9 -9
  80. package/dist/{flowchart-elk-definition-7863a61f.js → flowchart-elk-definition-32a627c1.js} +1052 -1057
  81. package/dist/{flowchart-elk-definition-6f4e6aa0.js → flowchart-elk-definition-56584a6c.js} +7 -15
  82. package/dist/{flowchart-elk-definition-3f2388fe.js → flowchart-elk-definition-b51952f5.js} +7 -16
  83. package/dist/{ganttDiagram-60845bff.js → ganttDiagram-088dbd90.js} +2 -1
  84. package/dist/{ganttDiagram-f2041c70.js → ganttDiagram-2f2b3e35.js} +2 -2
  85. package/dist/{ganttDiagram-3eff0dd8.js → ganttDiagram-3d9d1ab4.js} +70 -70
  86. package/dist/{gitGraphDiagram-5269e1d6.js → gitGraphDiagram-2a92ed83.js} +1 -1
  87. package/dist/{gitGraphDiagram-c3fe571f.js → gitGraphDiagram-4c126424.js} +49 -49
  88. package/dist/{gitGraphDiagram-a13ae597.js → gitGraphDiagram-e0ffc2d1.js} +2 -1
  89. package/dist/{index-4ba10627.js → index-1bb7dfb9.js} +4 -4
  90. package/dist/{index-d0b453e2.js → index-c449e2c7.js} +4 -4
  91. package/dist/{index-4c4adb72.js → index-f58d48f9.js} +3 -3
  92. package/dist/{infoDiagram-c976a9ed.js → infoDiagram-64895a6e.js} +8 -20
  93. package/dist/{infoDiagram-9c10eab1.js → infoDiagram-6cbe7c6f.js} +64 -71
  94. package/dist/{infoDiagram-3fa6ea12.js → infoDiagram-71364981.js} +6 -19
  95. package/dist/{journeyDiagram-9f355b40.js → journeyDiagram-a9730694.js} +3 -3
  96. package/dist/{journeyDiagram-5120ee2f.js → journeyDiagram-adaa34f8.js} +3 -2
  97. package/dist/{journeyDiagram-b6904cec.js → journeyDiagram-f3c7ca51.js} +18 -18
  98. package/dist/{layout-cc6d5710.js → layout-7899ed33.js} +10 -418
  99. package/dist/layout-df07420e.js +2396 -0
  100. package/dist/{line-ce5d1152.js → line-b0ce4b23.js} +1 -1
  101. package/dist/{line-cdadca5f.js → line-eb9172ee.js} +1 -1
  102. package/dist/{linear-db016d0c.js → linear-50d4520f.js} +20 -20
  103. package/dist/{linear-32da3f07.js → linear-7aa3c424.js} +1 -1
  104. package/dist/{mermaid-a98f434b.js → mermaid-768dc893.js} +3274 -3293
  105. package/dist/{mermaid-42f7bf2b.js → mermaid-d733041c.js} +3991 -3669
  106. package/dist/{mermaid-766fee4c.js → mermaid-f185fde2.js} +4326 -3920
  107. package/dist/mermaid.core.mjs +3 -2
  108. package/dist/mermaid.d.ts +5 -4
  109. package/dist/mermaid.esm.min.mjs +1 -1
  110. package/dist/mermaid.esm.mjs +2 -2
  111. package/dist/mermaid.js +5239 -5196
  112. package/dist/mermaid.min.js +189 -188
  113. package/dist/mermaidAPI.d.ts +1 -1
  114. package/dist/{mindmap-definition-0ab67801.js → mindmap-definition-57868176.js} +3 -2
  115. package/dist/{mindmap-definition-35a1e92c.js → mindmap-definition-6b172555.js} +2 -2
  116. package/dist/{mindmap-definition-a9d0f378.js → mindmap-definition-6e51e9e7.js} +2 -2
  117. package/dist/pieDiagram-16330908.js +528 -0
  118. package/dist/{pieDiagram-5efcb91d.js → pieDiagram-3fca7ce7.js} +120 -136
  119. package/dist/{pieDiagram-6d9582b9.js → pieDiagram-62059850.js} +119 -136
  120. package/dist/{quadrantDiagram-559115c7.js → quadrantDiagram-0ca4be02.js} +2 -1
  121. package/dist/{quadrantDiagram-1763608a.js → quadrantDiagram-6f203608.js} +8 -8
  122. package/dist/{quadrantDiagram-a1c81500.js → quadrantDiagram-eefba29b.js} +2 -2
  123. package/dist/rendering-util/handle-markdown-text.d.ts +1 -1
  124. package/dist/rendering-util/selectSvgElement.d.ts +8 -0
  125. package/dist/{requirementDiagram-3256a2fe.js → requirementDiagram-6a2e589f.js} +3 -3
  126. package/dist/{requirementDiagram-b2d6a344.js → requirementDiagram-e13af0f0.js} +2 -1
  127. package/dist/{requirementDiagram-779d93b3.js → requirementDiagram-e64784ea.js} +3 -3
  128. package/dist/{sankeyDiagram-ebb0d63f.js → sankeyDiagram-081bcda6.js} +17 -7
  129. package/dist/{sankeyDiagram-86a66bae.js → sankeyDiagram-80078f5f.js} +194 -191
  130. package/dist/{sankeyDiagram-e679478d.js → sankeyDiagram-a7f8e230.js} +18 -7
  131. package/dist/{sequenceDiagram-25152a15.js → sequenceDiagram-415e57eb.js} +2 -4
  132. package/dist/{sequenceDiagram-583eee82.js → sequenceDiagram-84aa38e3.js} +3 -4
  133. package/dist/{sequenceDiagram-169f11ec.js → sequenceDiagram-b5c34a98.js} +3 -3
  134. package/dist/setupGraphViewbox.d.ts +1 -1
  135. package/dist/{stateDiagram-693ac5fb.js → stateDiagram-956145d5.js} +4 -4
  136. package/dist/{stateDiagram-b1c07dc6.js → stateDiagram-9a586ac6.js} +3 -2
  137. package/dist/{stateDiagram-6f4bb19d.js → stateDiagram-c6f77c62.js} +4 -4
  138. package/dist/stateDiagram-v2-7af7da00.js +189 -0
  139. package/dist/{stateDiagram-v2-7c93469e.js → stateDiagram-v2-96f2b9df.js} +9 -15
  140. package/dist/{stateDiagram-v2-8f2bb0da.js → stateDiagram-v2-e78ef88c.js} +10 -17
  141. package/dist/{styles-659d7242.js → styles-04cc473c.js} +29 -29
  142. package/dist/{styles-ff678862.js → styles-1b0c237a.js} +3 -14
  143. package/dist/{styles-3814544c.js → styles-472dd00e.js} +82 -88
  144. package/dist/{styles-88ad4441.js → styles-622362e4.js} +1 -1
  145. package/dist/{styles-8ef4cf23.js → styles-6e9ebeb4.js} +4 -15
  146. package/dist/{styles-f19653ad.js → styles-91b2881f.js} +1 -1
  147. package/dist/{styles-3fb7b9cf.js → styles-91bd061f.js} +1 -1
  148. package/dist/{styles-f626f8de.js → styles-a1a6e33f.js} +1 -1
  149. package/dist/{styles-68f7452d.js → styles-f1c03133.js} +1 -1
  150. package/dist/{svgDraw-f57324fe.js → svgDraw-092a0897.js} +2 -2
  151. package/dist/{svgDraw-5d8a058e.js → svgDraw-70101091.js} +1 -1
  152. package/dist/{svgDraw-af99a425.js → svgDraw-8c7d5329.js} +2 -2
  153. package/dist/svgDrawCommon-05124e63.js +64 -0
  154. package/dist/svgDrawCommon-42e92da3.js +98 -0
  155. package/dist/svgDrawCommon-5f2bf747.js +97 -0
  156. package/dist/{timeline-definition-491ea63c.js → timeline-definition-1a90b03d.js} +2 -1
  157. package/dist/{timeline-definition-0c903a0d.js → timeline-definition-8fc01fef.js} +2 -2
  158. package/dist/{timeline-definition-65183566.js → timeline-definition-e6c31e7d.js} +33 -33
  159. package/dist/utils.d.ts +16 -14
  160. package/dist/utils.spec.d.ts +1 -0
  161. package/package.json +27 -21
  162. package/LICENSE +0 -21
  163. package/dist/arc-da8fd8d8.js +0 -84
  164. package/dist/diagrams/error/styles.d.ts +0 -2
  165. package/dist/diagrams/pie/styles.d.ts +0 -2
  166. package/dist/flowDb-a4faf166.js +0 -1119
  167. package/dist/layout-c5a37d74.js +0 -2679
  168. package/dist/pieDiagram-fd367f1f.js +0 -544
  169. package/dist/stateDiagram-v2-d72c79bd.js +0 -194
  170. package/dist/svgDrawCommon-ce5062a7.js +0 -101
  171. package/dist/svgDrawCommon-ebe6c236.js +0 -70
  172. package/dist/svgDrawCommon-f26cad39.js +0 -101
package/README.md CHANGED
@@ -60,7 +60,7 @@ Use Mermaid with your favorite applications, check out the list of [Integrations
60
60
 
61
61
  You can also use Mermaid within [GitHub](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/) as well many of your other favorite applications—check out the list of [Integrations and Usages of Mermaid](./docs/ecosystem/integrations.md).
62
62
 
63
- For a more detailed introduction to Mermaid and some of its more basic uses, look to the [Beginner's Guide](./docs/community/n00b-overview.md), [Usage](./docs/config/usage.md) and [Tutorials](./docs/config/Tutorials.md).
63
+ For a more detailed introduction to Mermaid and some of its more basic uses, look to the [Beginner's Guide](./docs/intro/n00b-gettingStarted.md), [Usage](./docs/config/usage.md) and [Tutorials](./docs/config/Tutorials.md).
64
64
 
65
65
  In our release process we rely heavily on visual regression tests using [applitools](https://applitools.com/). Applitools is a great service which has been easy to use and integrate with our tests.
66
66
 
package/README.zh-CN.md CHANGED
@@ -55,7 +55,7 @@ Mermaid 通过允许用户创建便于修改的图表来解决这一难题,它
55
55
  Mermaid 甚至能让非程序员也能通过 [Mermaid Live Editor](https://mermaid.live/) 轻松创建详细的图表。<br/>
56
56
  你可以访问 [教程](./docs/config/Tutorials.md) 来查看 Live Editor 的视频教程,也可以查看 [Mermaid 的集成和使用](./docs/ecosystem/integrations.md) 这个清单来检查你的文档工具是否已经集成了 Mermaid 支持。
57
57
 
58
- 如果想要查看关于 Mermaid 更详细的介绍及基础使用方式,可以查看 [入门指引](./docs/community/n00b-overview.md), [用法](./docs/config/usage.md) 和 [教程](./docs/config/Tutorials.md).
58
+ 如果想要查看关于 Mermaid 更详细的介绍及基础使用方式,可以查看 [入门指引](./docs/intro/n00b-gettingStarted.md), [用法](./docs/config/usage.md) 和 [教程](./docs/config/Tutorials.md).
59
59
 
60
60
  <!-- </Main description> -->
61
61
 
package/dist/Diagram.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { DetailedError } from './utils.js';
1
+ import type { DetailedError } from './utils.js';
2
+ import type { DiagramDefinition } from './diagram-api/types.js';
2
3
  export type ParseErrorFunction = (err: string | DetailedError | unknown, hash?: any) => void;
3
4
  /**
4
5
  * An object representing a parsed mermaid diagram definition.
@@ -7,14 +8,15 @@ export type ParseErrorFunction = (err: string | DetailedError | unknown, hash?:
7
8
  export declare class Diagram {
8
9
  text: string;
9
10
  type: string;
10
- parser: any;
11
- renderer: any;
12
- db: import("./diagram-api/types.js").DiagramDB;
11
+ parser: DiagramDefinition['parser'];
12
+ renderer: DiagramDefinition['renderer'];
13
+ db: DiagramDefinition['db'];
14
+ private init?;
13
15
  private detectError?;
14
16
  constructor(text: string);
15
17
  parse(): void;
16
18
  render(id: string, version: string): Promise<void>;
17
- getParser(): any;
19
+ getParser(): import("./diagram-api/types.js").ParserDefinition;
18
20
  getType(): string;
19
21
  }
20
22
  /**
@@ -0,0 +1,84 @@
1
+ import { c as Y, p as sn } from "./constant-2fe7eae5.js";
2
+ import { aY as en, aZ as z, a_ as P, a$ as rn, b0 as y, X as ln, b1 as F, b2 as k, b3 as an, b4 as t, b5 as un, b6 as on, b7 as tn } from "./mermaid-d733041c.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, D, q, h, v, Z, r) {
19
+ var s = D - l, n = q - x, m = Z - h, i = r - v, a = i * s - m * n;
20
+ if (!(a * a < y))
21
+ return a = (m * (x - v) - i * (l - h)) / a, [l + a * s, x + a * n];
22
+ }
23
+ function L(l, x, D, q, h, v, Z) {
24
+ var r = l - D, s = x - q, n = (Z ? v : -v) / F(r * r + s * s), m = n * s, i = -n * r, a = l + m, f = x + i, c = D + m, E = q + i, o = (a + c) / 2, I = (f + E) / 2, p = c - a, g = E - f, A = p * p + g * g, O = h - v, b = a * E - c * f, S = (g < 0 ? -1 : 1) * F(tn(0, O * O * A - b * b)), X = (b * g - p * S) / A, d = (-b * p - g * S) / A, R = (b * g + p * S) / A, T = (-b * p + g * S) / A, e = X - o, u = d - I, $ = R - o, j = T - I;
25
+ return e * e + u * u > $ * $ + j * j && (X = R, d = T), {
26
+ cx: X,
27
+ cy: d,
28
+ x01: -m,
29
+ y01: -i,
30
+ x11: X * (h / O - 1),
31
+ y11: d * (h / O - 1)
32
+ };
33
+ }
34
+ function hn() {
35
+ var l = fn, x = cn, D = Y(0), q = null, h = yn, v = gn, Z = mn, r = null;
36
+ function s() {
37
+ var n, m, i = +l.apply(this, arguments), a = +x.apply(this, arguments), f = h.apply(this, arguments) - rn, c = v.apply(this, arguments) - rn, E = an(c - f), o = c > f;
38
+ if (r || (r = n = sn()), a < i && (m = a, a = i, i = m), !(a > y))
39
+ r.moveTo(0, 0);
40
+ else if (E > ln - y)
41
+ r.moveTo(a * z(f), a * P(f)), r.arc(0, 0, a, f, c, !o), i > y && (r.moveTo(i * z(c), i * P(c)), r.arc(0, 0, i, c, f, o));
42
+ else {
43
+ var I = f, p = c, g = f, A = c, O = E, b = E, S = Z.apply(this, arguments) / 2, X = S > y && (q ? +q.apply(this, arguments) : F(i * i + a * a)), d = k(an(a - i) / 2, +D.apply(this, arguments)), R = d, T = d, e, u;
44
+ if (X > y) {
45
+ var $ = un(X / i * P(S)), j = un(X / a * P(S));
46
+ (O -= $ * 2) > y ? ($ *= o ? 1 : -1, g += $, A -= $) : (O = 0, g = A = (f + c) / 2), (b -= j * 2) > y ? (j *= o ? 1 : -1, I += j, p -= j) : (b = 0, I = p = (f + c) / 2);
47
+ }
48
+ var B = a * z(I), C = a * P(I), G = i * z(A), H = i * P(A);
49
+ if (d > y) {
50
+ var J = a * z(p), K = a * P(p), M = i * z(g), N = i * P(g), w;
51
+ if (E < en && (w = pn(B, C, M, N, J, K, G, H))) {
52
+ var Q = B - w[0], U = C - w[1], V = J - w[0], W = K - w[1], _ = 1 / P(on((Q * V + U * W) / (F(Q * Q + U * U) * F(V * V + W * W))) / 2), nn = F(w[0] * w[0] + w[1] * w[1]);
53
+ R = k(d, (i - nn) / (_ - 1)), T = k(d, (a - nn) / (_ + 1));
54
+ }
55
+ }
56
+ b > y ? T > y ? (e = L(M, N, B, C, a, T, o), u = L(J, K, G, H, a, T, o), r.moveTo(e.cx + e.x01, e.cy + e.y01), T < d ? r.arc(e.cx, e.cy, T, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (r.arc(e.cx, e.cy, T, t(e.y01, e.x01), t(e.y11, e.x11), !o), r.arc(0, 0, a, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), !o), r.arc(u.cx, u.cy, T, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : (r.moveTo(B, C), r.arc(0, 0, a, I, p, !o)) : r.moveTo(B, C), !(i > y) || !(O > y) ? r.lineTo(G, H) : R > y ? (e = L(G, H, J, K, i, -R, o), u = L(B, C, M, N, i, -R, o), r.lineTo(e.cx + e.x01, e.cy + e.y01), R < d ? r.arc(e.cx, e.cy, R, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (r.arc(e.cx, e.cy, R, t(e.y01, e.x01), t(e.y11, e.x11), !o), r.arc(0, 0, i, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), o), r.arc(u.cx, u.cy, R, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : r.arc(0, 0, i, A, g, o);
57
+ }
58
+ if (r.closePath(), n)
59
+ return r = 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 - en / 2;
63
+ return [z(m) * n, P(m) * n];
64
+ }, s.innerRadius = function(n) {
65
+ return arguments.length ? (l = typeof n == "function" ? n : Y(+n), s) : l;
66
+ }, s.outerRadius = function(n) {
67
+ return arguments.length ? (x = typeof n == "function" ? n : Y(+n), s) : x;
68
+ }, s.cornerRadius = function(n) {
69
+ return arguments.length ? (D = typeof n == "function" ? n : Y(+n), s) : D;
70
+ }, s.padRadius = function(n) {
71
+ return arguments.length ? (q = n == null ? null : typeof n == "function" ? n : Y(+n), s) : q;
72
+ }, s.startAngle = function(n) {
73
+ return arguments.length ? (h = typeof n == "function" ? n : Y(+n), s) : h;
74
+ }, s.endAngle = function(n) {
75
+ return arguments.length ? (v = typeof n == "function" ? n : Y(+n), s) : v;
76
+ }, s.padAngle = function(n) {
77
+ return arguments.length ? (Z = typeof n == "function" ? n : Y(+n), s) : Z;
78
+ }, s.context = function(n) {
79
+ return arguments.length ? (r = n ?? null, s) : r;
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 { aC as halfPi, aD as epsilon, V as tau, aE as cos, aF as sin, aG as sqrt, aH as min, aI as abs, aJ as pi, aK as atan2, aL as asin, aM as acos, aN as max } from "./mermaid-766fee4c.js";
2
+ import { aY as pi, aZ as cos, a_ as sin, a$ as halfPi, b0 as epsilon, X as tau, b1 as sqrt, b2 as min, b3 as abs, b4 as atan2, b5 as asin, b6 as acos, b7 as max } from "./mermaid-f185fde2.js";
3
3
  function arcInnerRadius(d) {
4
4
  return d.innerRadius;
5
5
  }
@@ -1,31 +1,30 @@
1
- export default assignWithDepth;
2
1
  /**
3
- * @function assignWithDepth Extends the functionality of {@link ObjectConstructor.assign} with the
2
+ * assignWithDepth Extends the functionality of {@link Object.assign} with the
4
3
  * ability to merge arbitrary-depth objects For each key in src with path `k` (recursively)
5
4
  * performs an Object.assign(dst[`k`], src[`k`]) with a slight change from the typical handling of
6
- * undefined for dst[`k`]: instead of raising an error, dst[`k`] is auto-initialized to {} and
5
+ * undefined for dst[`k`]: instead of raising an error, dst[`k`] is auto-initialized to `{}` and
7
6
  * effectively merged with src[`k`]<p> Additionally, dissimilar types will not clobber unless the
8
7
  * config.clobber parameter === true. Example:
9
8
  *
10
- * ```js
11
- * let config_0 = { foo: { bar: 'bar' }, bar: 'foo' };
12
- * let config_1 = { foo: 'foo', bar: 'bar' };
13
- * let result = assignWithDepth(config_0, config_1);
14
- * console.log(result);
15
- * //-> result: { foo: { bar: 'bar' }, bar: 'bar' }
16
- * ```
9
+ * ```
10
+ * const config_0 = { foo: { bar: 'bar' }, bar: 'foo' };
11
+ * const config_1 = { foo: 'foo', bar: 'bar' };
12
+ * const result = assignWithDepth(config_0, config_1);
13
+ * console.log(result);
14
+ * //-> result: { foo: { bar: 'bar' }, bar: 'bar' }
15
+ * ```
17
16
  *
18
17
  * Traditional Object.assign would have clobbered foo in config_0 with foo in config_1. If src is a
19
18
  * destructured array of objects and dst is not an array, assignWithDepth will apply each element
20
19
  * of src to dst in order.
21
- * @param {any} dst - The destination of the merge
22
- * @param {any} src - The source object(s) to merge into destination
23
- * @param {{ depth: number; clobber: boolean }} [config] - Depth: depth
24
- * to traverse within src and dst for merging - clobber: should dissimilar types clobber (default:
25
- * { depth: 2, clobber: false }). Default is `{ depth: 2, clobber: false }`
26
- * @returns {any}
20
+ * @param dst - The destination of the merge
21
+ * @param src - The source object(s) to merge into destination
22
+ * @param config -
23
+ * * depth: depth to traverse within src and dst for merging
24
+ * * clobber: should dissimilar types clobber
27
25
  */
28
- declare function assignWithDepth(dst: any, src: any, config?: {
29
- depth: number;
30
- clobber: boolean;
31
- } | undefined): any;
26
+ declare const assignWithDepth: (dst: any, src: any, { depth, clobber }?: {
27
+ depth?: number | undefined;
28
+ clobber?: boolean | undefined;
29
+ }) => any;
30
+ export default assignWithDepth;
@@ -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-42f7bf2b.js";
2
- import { d as Qe, g as He } from "./svgDrawCommon-ebe6c236.js";
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-d733041c.js";
2
+ import { d as Qe, g as He } from "./svgDrawCommon-05124e63.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,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 d3select, l as log, k as configureSvgSize, w as wrapLabel, n as calculateTextHeight } from "./mermaid-766fee4c.js";
2
- import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-ce5062a7.js";
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 d3select, l as log, k as configureSvgSize, w as wrapLabel, n as calculateTextHeight } from "./mermaid-f185fde2.js";
2
+ import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-5f2bf747.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,12 +1,13 @@
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-a98f434b.js";
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-768dc893.js";
2
2
  import { select } from "d3";
3
- import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-f26cad39.js";
3
+ import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-42e92da3.js";
4
4
  import { sanitizeUrl } from "@braintree/sanitize-url";
5
5
  import "ts-dedent";
6
6
  import "dayjs";
7
7
  import "dompurify";
8
8
  import "khroma";
9
9
  import "lodash-es/memoize.js";
10
+ import "lodash-es/merge.js";
10
11
  import "stylis";
11
12
  import "lodash-es/isEmpty.js";
12
13
  var parser = function() {
@@ -1,8 +1,8 @@
1
- import { p as W, d as M, s as H } from "./styles-659d7242.js";
2
- import { c as S, l as d, j as m, k as X } from "./mermaid-42f7bf2b.js";
3
- import { G as Y, l as Z } from "./layout-c5a37d74.js";
4
- import { s as l } from "./svgDraw-af99a425.js";
5
- import "./line-ce5d1152.js";
1
+ import { p as W, d as M, s as H } from "./styles-04cc473c.js";
2
+ import { c as S, l as d, j as m, k as X } from "./mermaid-d733041c.js";
3
+ import { G as Y, l as Z } from "./layout-df07420e.js";
4
+ import { s as l } from "./svgDraw-8c7d5329.js";
5
+ import "./line-b0ce4b23.js";
6
6
  import "./array-2ff2c7a6.js";
7
7
  import "./constant-2fe7eae5.js";
8
8
  let h = {};
@@ -1,15 +1,16 @@
1
- import { p as parser, d as db, s as styles } from "./styles-88ad4441.js";
1
+ import { p as parser, d as db, s as styles } from "./styles-622362e4.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-a98f434b.js";
6
- import { s as svgDraw } from "./svgDraw-5d8a058e.js";
5
+ import { c as getConfig, l as log, i as configureSvgSize } from "./mermaid-768dc893.js";
6
+ import { s as svgDraw } from "./svgDraw-70101091.js";
7
7
  import "ts-dedent";
8
8
  import "dayjs";
9
9
  import "@braintree/sanitize-url";
10
10
  import "dompurify";
11
11
  import "khroma";
12
12
  import "lodash-es/memoize.js";
13
+ import "lodash-es/merge.js";
13
14
  import "stylis";
14
15
  import "lodash-es/isEmpty.js";
15
16
  let idCache = {};
@@ -1,8 +1,8 @@
1
- import { p as parser, d as db, s as styles } from "./styles-68f7452d.js";
2
- import { c as getConfig, l as log, j as d3select, k as configureSvgSize } from "./mermaid-766fee4c.js";
3
- import { G as Graph, l as layout } from "./layout-cc6d5710.js";
4
- import { s as svgDraw } from "./svgDraw-f57324fe.js";
5
- import "./line-cdadca5f.js";
1
+ import { p as parser, d as db, s as styles } from "./styles-f1c03133.js";
2
+ import { c as getConfig, l as log, j as d3select, k as configureSvgSize } from "./mermaid-f185fde2.js";
3
+ import { G as Graph, l as layout } from "./layout-7899ed33.js";
4
+ import { s as svgDraw } from "./svgDraw-092a0897.js";
5
+ import "./line-eb9172ee.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 parser, d as db, s as styles } from "./styles-68f7452d.js";
2
- import { l as log, c as getConfig, j as d3select, z as utils, t as setupGraphViewbox, r as interpolateToCurve, o as curveLinear, p as getStylesFromArray, f as common } from "./mermaid-766fee4c.js";
3
- import { G as Graph } from "./layout-cc6d5710.js";
4
- import { r as render } from "./index-4ba10627.js";
5
- import "./edges-df708b89.js";
6
- import "./createText-2c3b104b.js";
7
- import "./svgDraw-f57324fe.js";
8
- import "./line-cdadca5f.js";
1
+ import { p as parser, d as db, s as styles } from "./styles-f1c03133.js";
2
+ import { l as log, c as getConfig, j as d3select, A as utils, t as setupGraphViewbox, r as interpolateToCurve, o as curveLinear, p as getStylesFromArray, f as common } from "./mermaid-f185fde2.js";
3
+ import { G as Graph } from "./layout-7899ed33.js";
4
+ import { r as render } from "./index-1bb7dfb9.js";
5
+ import "./edges-ecd2ecb8.js";
6
+ import "./createText-6836bc4a.js";
7
+ import "./svgDraw-092a0897.js";
8
+ import "./line-eb9172ee.js";
9
9
  import "./array-b7dcf730.js";
10
10
  import "./constant-b644328d.js";
11
11
  const sanitizeText = (txt) => common.sanitizeText(txt, getConfig());
@@ -1,14 +1,14 @@
1
- import { p as R, d as N, s as B } from "./styles-659d7242.js";
2
- import { l as c, c as r, j as k, z as G, t as _, r as E, o as C, p as z, f as A } from "./mermaid-42f7bf2b.js";
3
- import { G as P } from "./layout-c5a37d74.js";
4
- import { r as $ } from "./index-d0b453e2.js";
5
- import "./edges-558884ee.js";
6
- import "./createText-94e3ebbf.js";
7
- import "./svgDraw-af99a425.js";
8
- import "./line-ce5d1152.js";
1
+ import { p as R, d as N, s as B } from "./styles-04cc473c.js";
2
+ import { l as c, c as r, j as k, A as G, t as _, r as E, o as A, p as z, f as C } from "./mermaid-d733041c.js";
3
+ import { G as P } from "./layout-df07420e.js";
4
+ import { r as $ } from "./index-c449e2c7.js";
5
+ import "./edges-6be02a86.js";
6
+ import "./createText-98e4790d.js";
7
+ import "./svgDraw-8c7d5329.js";
8
+ import "./line-b0ce4b23.js";
9
9
  import "./array-2ff2c7a6.js";
10
10
  import "./constant-2fe7eae5.js";
11
- const S = (o) => A.sanitizeText(o, r());
11
+ const S = (o) => C.sanitizeText(o, r());
12
12
  let v = {
13
13
  dividerMargin: 10,
14
14
  padding: 5,
@@ -92,7 +92,7 @@ const q = function(o, t, p, n) {
92
92
  arrowTypeEnd: "none",
93
93
  style: "fill:none",
94
94
  labelStyle: "",
95
- curve: E(v.curve, C)
95
+ curve: E(v.curve, A)
96
96
  };
97
97
  t.setEdge(l.id, l.class, u, b);
98
98
  });
@@ -117,13 +117,13 @@ const q = function(o, t, p, n) {
117
117
  arrowTypeEnd: D(e.relation.type2),
118
118
  style: "fill:none",
119
119
  labelStyle: "",
120
- curve: E(p == null ? void 0 : p.curve, C)
120
+ curve: E(p == null ? void 0 : p.curve, A)
121
121
  };
122
122
  if (c.info(s, e), e.style !== void 0) {
123
123
  const a = z(e.style);
124
124
  s.style = a.style, s.labelStyle = a.labelStyle;
125
125
  }
126
- e.text = e.title, e.text === void 0 ? e.style !== void 0 && (s.arrowheadStyle = "fill: #333") : (s.arrowheadStyle = "fill: #333", s.labelpos = "c", ((l = r().flowchart) == null ? void 0 : l.htmlLabels) ?? r().htmlLabels ? (s.labelType = "html", s.label = '<span class="edgeLabel">' + e.text + "</span>") : (s.labelType = "text", s.label = e.text.replace(A.lineBreakRegex, `
126
+ e.text = e.title, e.text === void 0 ? e.style !== void 0 && (s.arrowheadStyle = "fill: #333") : (s.arrowheadStyle = "fill: #333", s.labelpos = "c", ((l = r().flowchart) == null ? void 0 : l.htmlLabels) ?? r().htmlLabels ? (s.labelType = "html", s.label = '<span class="edgeLabel">' + e.text + "</span>") : (s.labelType = "text", s.label = e.text.replace(C.lineBreakRegex, `
127
127
  `), e.style === void 0 && (s.style = s.style || "stroke: #333; stroke-width: 1.5px;fill:none"), s.labelStyle = s.labelStyle.replace("color:", "fill:"))), t.setEdge(e.id1, e.id2, s, n);
128
128
  });
129
129
  }, V = function(o) {
@@ -1,22 +1,23 @@
1
- import { p as parser, d as db, s as styles } from "./styles-88ad4441.js";
1
+ import { p as parser, d as db, s as styles } from "./styles-622362e4.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-a98f434b.js";
5
- import { r as render } from "./index-4c4adb72.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-768dc893.js";
5
+ import { r as render } from "./index-f58d48f9.js";
6
6
  import "ts-dedent";
7
7
  import "dayjs";
8
8
  import "@braintree/sanitize-url";
9
9
  import "dompurify";
10
10
  import "khroma";
11
11
  import "lodash-es/memoize.js";
12
+ import "lodash-es/merge.js";
12
13
  import "stylis";
13
14
  import "lodash-es/isEmpty.js";
14
15
  import "dagre-d3-es/src/dagre/index.js";
15
16
  import "dagre-d3-es/src/graphlib/json.js";
16
- import "./edges-b00f0ec2.js";
17
- import "./createText-285e50b4.js";
17
+ import "./edges-0005682e.js";
18
+ import "./createText-3b1f58a4.js";
18
19
  import "mdast-util-from-markdown";
19
- import "./svgDraw-5d8a058e.js";
20
+ import "./svgDraw-70101091.js";
20
21
  const sanitizeText = (txt) => common.sanitizeText(txt, getConfig());
21
22
  let conf = {
22
23
  dividerMargin: 10,
package/dist/config.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { MermaidConfig } from './config.type.js';
2
2
  export declare const defaultConfig: MermaidConfig;
3
- export declare const updateCurrentConfig: (siteCfg: MermaidConfig, _directives: any[]) => MermaidConfig;
3
+ export declare const updateCurrentConfig: (siteCfg: MermaidConfig, _directives: MermaidConfig[]) => MermaidConfig;
4
4
  /**
5
5
  * ## setSiteConfig
6
6
  *
@@ -76,7 +76,7 @@ export declare const sanitize: (options: any) => void;
76
76
  *
77
77
  * @param directive - The directive to push in
78
78
  */
79
- export declare const addDirective: (directive: any) => void;
79
+ export declare const addDirective: (directive: MermaidConfig) => void;
80
80
  /**
81
81
  * ## reset
82
82
  *
@@ -6,7 +6,7 @@
6
6
  /**
7
7
  * Configuration options to pass to the `dompurify` library.
8
8
  */
9
- export type DOMPurifyConfiguration = import("dompurify").Config;
9
+ export type DOMPurifyConfiguration = import('dompurify').Config;
10
10
  /**
11
11
  * JavaScript function that returns a `FontConfig`.
12
12
  *
@@ -37,7 +37,7 @@ export type FontCalculator = () => Partial<FontConfig>;
37
37
  * This interface was referenced by `MermaidConfig`'s JSON-Schema
38
38
  * via the `definition` "SankeyLinkColor".
39
39
  */
40
- export type SankeyLinkColor = "source" | "target" | "gradient";
40
+ export type SankeyLinkColor = 'source' | 'target' | 'gradient';
41
41
  /**
42
42
  * Controls the alignment of the Sankey diagrams.
43
43
  *
@@ -47,7 +47,7 @@ export type SankeyLinkColor = "source" | "target" | "gradient";
47
47
  * This interface was referenced by `MermaidConfig`'s JSON-Schema
48
48
  * via the `definition` "SankeyNodeAlignment".
49
49
  */
50
- export type SankeyNodeAlignment = "left" | "right" | "center" | "justify";
50
+ export type SankeyNodeAlignment = 'left' | 'right' | 'center' | 'justify';
51
51
  /**
52
52
  * The font size to use
53
53
  */
@@ -58,7 +58,7 @@ export interface MermaidConfig {
58
58
  * You may also use `themeCSS` to override this value.
59
59
  *
60
60
  */
61
- theme?: string | "default" | "forest" | "dark" | "neutral" | "null";
61
+ theme?: string | 'default' | 'forest' | 'dark' | 'neutral' | 'null';
62
62
  themeVariables?: any;
63
63
  themeCSS?: string;
64
64
  /**
@@ -79,11 +79,11 @@ export interface MermaidConfig {
79
79
  * This option decides the amount of logging to be used by mermaid.
80
80
  *
81
81
  */
82
- logLevel?: number | string | 0 | 2 | 1 | "trace" | "debug" | "info" | "warn" | "error" | "fatal" | 3 | 4 | 5 | undefined;
82
+ logLevel?: number | string | 0 | 2 | 1 | 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal' | 3 | 4 | 5 | undefined;
83
83
  /**
84
84
  * Level of trust for parsed diagram
85
85
  */
86
- securityLevel?: string | "strict" | "loose" | "antiscript" | "sandbox" | undefined;
86
+ securityLevel?: string | 'strict' | 'loose' | 'antiscript' | 'sandbox' | undefined;
87
87
  /**
88
88
  * Dictates whether mermaid starts on Page load
89
89
  */
@@ -671,11 +671,11 @@ export interface QuadrantChartConfig extends BaseDiagramConfig {
671
671
  /**
672
672
  * position of x-axis labels
673
673
  */
674
- xAxisPosition?: "top" | "bottom";
674
+ xAxisPosition?: 'top' | 'bottom';
675
675
  /**
676
676
  * position of y-axis labels
677
677
  */
678
- yAxisPosition?: "left" | "right";
678
+ yAxisPosition?: 'left' | 'right';
679
679
  /**
680
680
  * stroke width of edges of the box that are inside the quadrant
681
681
  */
@@ -705,7 +705,7 @@ export interface ErDiagramConfig extends BaseDiagramConfig {
705
705
  /**
706
706
  * Directional bias for layout of entities
707
707
  */
708
- layoutDirection?: string | "TB" | "BT" | "LR" | "RL";
708
+ layoutDirection?: string | 'TB' | 'BT' | 'LR' | 'RL';
709
709
  /**
710
710
  * The minimum width of an entity box. Expressed in pixels.
711
711
  */
@@ -770,7 +770,7 @@ export interface StateDiagramConfig extends BaseDiagramConfig {
770
770
  * Decides which rendering engine that is to be used for the rendering.
771
771
  *
772
772
  */
773
- defaultRenderer?: string | "dagre-d3" | "dagre-wrapper" | "elk";
773
+ defaultRenderer?: string | 'dagre-d3' | 'dagre-wrapper' | 'elk';
774
774
  }
775
775
  /**
776
776
  * This interface was referenced by `MermaidConfig`'s JSON-Schema
@@ -794,7 +794,7 @@ export interface ClassDiagramConfig extends BaseDiagramConfig {
794
794
  * Decides which rendering engine that is to be used for the rendering.
795
795
  *
796
796
  */
797
- defaultRenderer?: string | "dagre-d3" | "dagre-wrapper" | "elk";
797
+ defaultRenderer?: string | 'dagre-d3' | 'dagre-wrapper' | 'elk';
798
798
  nodeSpacing?: number;
799
799
  rankSpacing?: number;
800
800
  /**
@@ -854,7 +854,7 @@ export interface JourneyDiagramConfig extends BaseDiagramConfig {
854
854
  /**
855
855
  * Multiline message alignment
856
856
  */
857
- messageAlign?: string | "left" | "center" | "right";
857
+ messageAlign?: string | 'left' | 'center' | 'right';
858
858
  /**
859
859
  * Prolongs the edge of the diagram downwards.
860
860
  *
@@ -933,7 +933,7 @@ export interface TimelineDiagramConfig extends BaseDiagramConfig {
933
933
  /**
934
934
  * Multiline message alignment
935
935
  */
936
- messageAlign?: string | "left" | "center" | "right";
936
+ messageAlign?: string | 'left' | 'center' | 'right';
937
937
  /**
938
938
  * Prolongs the edge of the diagram downwards.
939
939
  *
@@ -1044,12 +1044,12 @@ export interface GanttDiagramConfig extends BaseDiagramConfig {
1044
1044
  * Controls the display mode.
1045
1045
  *
1046
1046
  */
1047
- displayMode?: string | "compact";
1047
+ displayMode?: string | 'compact';
1048
1048
  /**
1049
1049
  * On which day a week-based interval should start
1050
1050
  *
1051
1051
  */
1052
- weekday?: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
1052
+ weekday?: 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
1053
1053
  }
1054
1054
  /**
1055
1055
  * The object containing configurations specific for sequence diagrams
@@ -1103,7 +1103,7 @@ export interface SequenceDiagramConfig extends BaseDiagramConfig {
1103
1103
  /**
1104
1104
  * Multiline message alignment
1105
1105
  */
1106
- messageAlign?: string | "left" | "center" | "right";
1106
+ messageAlign?: string | 'left' | 'center' | 'right';
1107
1107
  /**
1108
1108
  * Mirror actors under diagram
1109
1109
  *
@@ -1160,7 +1160,7 @@ export interface SequenceDiagramConfig extends BaseDiagramConfig {
1160
1160
  /**
1161
1161
  * This sets the text alignment of actor-attached notes
1162
1162
  */
1163
- noteAlign?: string | "left" | "center" | "right";
1163
+ noteAlign?: string | 'left' | 'center' | 'right';
1164
1164
  /**
1165
1165
  * This sets the font size of actor messages
1166
1166
  */
@@ -1236,7 +1236,7 @@ export interface FlowchartDiagramConfig extends BaseDiagramConfig {
1236
1236
  * Defines how mermaid renders curves for flowcharts.
1237
1237
  *
1238
1238
  */
1239
- curve?: string | "basis" | "linear" | "cardinal";
1239
+ curve?: string | 'basis' | 'linear' | 'cardinal';
1240
1240
  /**
1241
1241
  * Represents the padding between the labels and the shape
1242
1242
  *
@@ -1248,7 +1248,7 @@ export interface FlowchartDiagramConfig extends BaseDiagramConfig {
1248
1248
  * Decides which rendering engine that is to be used for the rendering.
1249
1249
  *
1250
1250
  */
1251
- defaultRenderer?: string | "dagre-d3" | "dagre-wrapper" | "elk";
1251
+ defaultRenderer?: string | 'dagre-d3' | 'dagre-wrapper' | 'elk';
1252
1252
  /**
1253
1253
  * Width of nodes where text is wrapped.
1254
1254
  *
@@ -1278,8 +1278,23 @@ export interface SankeyDiagramConfig extends BaseDiagramConfig {
1278
1278
  * See <https://github.com/d3/d3-sankey#alignments>.
1279
1279
  *
1280
1280
  */
1281
- nodeAlignment?: "left" | "right" | "center" | "justify";
1281
+ nodeAlignment?: 'left' | 'right' | 'center' | 'justify';
1282
1282
  useMaxWidth?: boolean;
1283
+ /**
1284
+ * Toggle to display or hide values along with title.
1285
+ *
1286
+ */
1287
+ showValues?: boolean;
1288
+ /**
1289
+ * The prefix to use for values
1290
+ *
1291
+ */
1292
+ prefix?: string;
1293
+ /**
1294
+ * The suffix to use for values
1295
+ *
1296
+ */
1297
+ suffix?: string;
1283
1298
  }
1284
1299
  /**
1285
1300
  * This interface was referenced by `MermaidConfig`'s JSON-Schema
@@ -1,4 +1,4 @@
1
- import { l as log, H as decodeEntities } from "./mermaid-a98f434b.js";
1
+ import { l as log, L as decodeEntities } from "./mermaid-768dc893.js";
2
2
  import { fromMarkdown } from "mdast-util-from-markdown";
3
3
  import { dedent } from "ts-dedent";
4
4
  function preprocessMarkdown(markdown) {
@@ -1,4 +1,4 @@
1
- import { aO as dedent, l as log, aw as decodeEntities } from "./mermaid-766fee4c.js";
1
+ import { b8 as dedent, l as log, aT as decodeEntities } from "./mermaid-f185fde2.js";
2
2
  function toString(node, options) {
3
3
  var { includeImageAlt = true } = options || {};
4
4
  return one(node, includeImageAlt);
@@ -1,4 +1,4 @@
1
- import { aO as At, l as zt, aw as It } from "./mermaid-42f7bf2b.js";
1
+ import { b8 as At, l as zt, aT as It } from "./mermaid-d733041c.js";
2
2
  function Tt(n, r) {
3
3
  var { includeImageAlt: t = !0 } = r || {};
4
4
  return nt(n, t);
@@ -1,4 +1,5 @@
1
- import { type MermaidConfig } from './config.type.js';
1
+ import type { RequiredDeep } from 'type-fest';
2
+ import type { MermaidConfig } from './config.type.js';
2
3
  /**
3
4
  * Default mermaid configuration options.
4
5
  *
@@ -6,6 +7,6 @@ import { type MermaidConfig } from './config.type.js';
6
7
  * Non-JSON JS default values are listed in this file, e.g. functions, or
7
8
  * `undefined` (explicitly set so that `configKeys` finds them).
8
9
  */
9
- declare const config: Partial<MermaidConfig>;
10
- export declare const configKeys: string[];
10
+ declare const config: RequiredDeep<MermaidConfig>;
11
+ export declare const configKeys: Set<string>;
11
12
  export default config;