mermaid 10.5.1 → 10.6.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 (141) hide show
  1. package/README.md +4 -1
  2. package/README.zh-CN.md +6 -2
  3. package/dist/{arc-8b90ddc8.js → arc-288f99c7.js} +11 -7
  4. package/dist/arc-5891aaa8.js +86 -0
  5. package/dist/{c4Diagram-331b94a9.js → c4Diagram-269982e4.js} +2 -2
  6. package/dist/{c4Diagram-4bfe15a7.js → c4Diagram-60acd026.js} +2 -2
  7. package/dist/{c4Diagram-7e558229.js → c4Diagram-d0fbc5ce.js} +2 -2
  8. package/dist/{classDiagram-1f3fb0f7.js → classDiagram-0a511ccd.js} +5 -5
  9. package/dist/{classDiagram-8fd6d062.js → classDiagram-0e94aa92.js} +5 -5
  10. package/dist/{classDiagram-bfe30095.js → classDiagram-936ed81e.js} +2 -2
  11. package/dist/{classDiagram-v2-8c49bbbd.js → classDiagram-v2-11d71d68.js} +8 -8
  12. package/dist/{classDiagram-v2-e3ddc2d7.js → classDiagram-v2-5699522c.js} +8 -8
  13. package/dist/{classDiagram-v2-3a55c922.js → classDiagram-v2-c3cb15f1.js} +5 -5
  14. package/dist/config.type.d.ts +189 -0
  15. package/dist/{createText-53d25889.js → createText-13a582be.js} +730 -598
  16. package/dist/{createText-b3507a77.js → createText-62fc7601.js} +14 -2
  17. package/dist/createText-f99b4cea.js +2967 -0
  18. package/dist/diagram-api/diagramAPI.d.ts +3 -0
  19. package/dist/diagrams/xychart/chartBuilder/components/axis/bandAxis.d.ts +12 -0
  20. package/dist/diagrams/xychart/chartBuilder/components/axis/baseAxis.d.ts +38 -0
  21. package/dist/diagrams/xychart/chartBuilder/components/axis/index.d.ts +12 -0
  22. package/dist/diagrams/xychart/chartBuilder/components/axis/linearAxis.d.ts +11 -0
  23. package/dist/diagrams/xychart/chartBuilder/components/chartTitle.d.ts +16 -0
  24. package/dist/diagrams/xychart/chartBuilder/components/plot/barPlot.d.ts +12 -0
  25. package/dist/diagrams/xychart/chartBuilder/components/plot/index.d.ts +20 -0
  26. package/dist/diagrams/xychart/chartBuilder/components/plot/linePlot.d.ts +11 -0
  27. package/dist/diagrams/xychart/chartBuilder/index.d.ts +5 -0
  28. package/dist/diagrams/xychart/chartBuilder/interfaces.d.ts +132 -0
  29. package/dist/diagrams/xychart/chartBuilder/orchestrator.d.ts +12 -0
  30. package/dist/diagrams/xychart/chartBuilder/textDimensionCalculator.d.ts +10 -0
  31. package/dist/diagrams/xychart/parser/xychart.jison.spec.d.ts +1 -0
  32. package/dist/diagrams/xychart/xychartDb.d.ts +40 -0
  33. package/dist/diagrams/xychart/xychartDetector.d.ts +3 -0
  34. package/dist/diagrams/xychart/xychartDiagram.d.ts +2 -0
  35. package/dist/diagrams/xychart/xychartRenderer.d.ts +6 -0
  36. package/dist/docs/vite.config.d.ts +1 -1
  37. package/dist/{edges-32b26c0e.js → edges-2823b089.js} +3 -3
  38. package/dist/{edges-345e4ceb.js → edges-6f4cf161.js} +3 -3
  39. package/dist/{edges-bc33a094.js → edges-f2ad444c.js} +2 -2
  40. package/dist/{erDiagram-fe64cf2c.js → erDiagram-1ee9f5ab.js} +4 -4
  41. package/dist/{erDiagram-5d923d74.js → erDiagram-9c70e2d1.js} +4 -4
  42. package/dist/{erDiagram-5b6cebf0.js → erDiagram-9d236eb7.js} +1 -1
  43. package/dist/{flowDb-bd9f2a91.js → flowDb-1972c806.js} +10 -2
  44. package/dist/{flowDb-203d9d78.js → flowDb-81211f6b.js} +109 -106
  45. package/dist/{flowDb-2e398966.js → flowDb-98fc3877.js} +10 -2
  46. package/dist/{flowDiagram-90a5ee23.js → flowDiagram-7ea5b25a.js} +6 -6
  47. package/dist/{flowDiagram-fc477a2f.js → flowDiagram-92806404.js} +9 -9
  48. package/dist/{flowDiagram-a7ef5206.js → flowDiagram-bc4d5112.js} +9 -9
  49. package/dist/{flowDiagram-v2-5d1a7836.js → flowDiagram-v2-2322f4b4.js} +9 -9
  50. package/dist/{flowDiagram-v2-54a189bd.js → flowDiagram-v2-6d4618e9.js} +9 -9
  51. package/dist/{flowDiagram-v2-eab222bb.js → flowDiagram-v2-855bc5b3.js} +6 -6
  52. package/dist/{flowchart-elk-definition-387761c1.js → flowchart-elk-definition-3970a277.js} +6 -6
  53. package/dist/{flowchart-elk-definition-4ac3371a.js → flowchart-elk-definition-abe16c3d.js} +4 -4
  54. package/dist/{flowchart-elk-definition-1cf4c568.js → flowchart-elk-definition-e90fed31.js} +6 -6
  55. package/dist/{ganttDiagram-9d6d9e54.js → ganttDiagram-9b5ea136.js} +1 -1
  56. package/dist/{ganttDiagram-67dd342e.js → ganttDiagram-adf6d212.js} +215 -186
  57. package/dist/{ganttDiagram-33f16fa4.js → ganttDiagram-dad8d3ea.js} +981 -1024
  58. package/dist/{gitGraphDiagram-94f74fa6.js → gitGraphDiagram-40ad929d.js} +4 -4
  59. package/dist/{gitGraphDiagram-7b32de06.js → gitGraphDiagram-99d0ae7c.js} +4 -4
  60. package/dist/{gitGraphDiagram-a6165b81.js → gitGraphDiagram-d1708452.js} +129 -129
  61. package/dist/{index-b0b3af87.js → index-2c4b9a3b.js} +3 -3
  62. package/dist/{index-a53b5366.js → index-b9fee07a.js} +4 -4
  63. package/dist/{index-08d47d0a.js → index-dc7010be.js} +4 -4
  64. package/dist/{infoDiagram-645befec.js → infoDiagram-736b4530.js} +1 -1
  65. package/dist/{infoDiagram-78c839bd.js → infoDiagram-74f3a05a.js} +5 -5
  66. package/dist/{infoDiagram-6a975df6.js → infoDiagram-cf09b946.js} +1 -1
  67. package/dist/{journeyDiagram-67cc1186.js → journeyDiagram-dda15a26.js} +4 -4
  68. package/dist/{journeyDiagram-14f1468f.js → journeyDiagram-df861f2b.js} +2 -2
  69. package/dist/{journeyDiagram-85312b66.js → journeyDiagram-fc8991e5.js} +4 -4
  70. package/dist/{layout-1caf14c9.js → layout-1c860ba8.js} +1 -1
  71. package/dist/{layout-8affc211.js → layout-fa5fa804.js} +1 -1
  72. package/dist/line-3446947e.js +34 -0
  73. package/dist/{line-3d4ae7d1.js → line-4dac5d36.js} +3 -3
  74. package/dist/{linear-1d0b5464.js → linear-89925bf4.js} +51 -37
  75. package/dist/linear-d1684810.js +447 -0
  76. package/dist/{mermaid-485fd1a4.js → mermaid-8af3addd.js} +324 -195
  77. package/dist/{mermaid-5f2d2ec5.js → mermaid-c2fb2af7.js} +2412 -2296
  78. package/dist/{mermaid-f344f6a7.js → mermaid-e42d37a0.js} +336 -207
  79. package/dist/mermaid.core.mjs +1 -1
  80. package/dist/mermaid.esm.min.mjs +1 -1
  81. package/dist/mermaid.esm.mjs +1 -1
  82. package/dist/mermaid.js +3459 -1323
  83. package/dist/mermaid.min.js +206 -201
  84. package/dist/{mindmap-definition-e624fba5.js → mindmap-definition-35625031.js} +4 -4
  85. package/dist/{mindmap-definition-9a80f489.js → mindmap-definition-beec6740.js} +2 -2
  86. package/dist/{mindmap-definition-c18effbb.js → mindmap-definition-d3cb8e67.js} +5 -4
  87. package/dist/path-39bad7e2.js +118 -0
  88. package/dist/path-428ebac9.js +91 -0
  89. package/dist/{pieDiagram-b8ef8d1d.js → pieDiagram-3ad18685.js} +20 -20
  90. package/dist/{pieDiagram-cdffdf74.js → pieDiagram-cce2db57.js} +3 -3
  91. package/dist/{pieDiagram-47467502.js → pieDiagram-dbbf0591.js} +1 -1
  92. package/dist/{quadrantDiagram-3646f1b7.js → quadrantDiagram-4d7f4fd6.js} +11 -10
  93. package/dist/{quadrantDiagram-e493ce51.js → quadrantDiagram-d650316a.js} +108 -108
  94. package/dist/{quadrantDiagram-f86baae9.js → quadrantDiagram-eaf6be26.js} +12 -11
  95. package/dist/rendering-util/createText.d.ts +2 -0
  96. package/dist/{requirementDiagram-3252776f.js → requirementDiagram-36f18e2f.js} +4 -4
  97. package/dist/{requirementDiagram-cc8b2f2f.js → requirementDiagram-6fc4c22a.js} +1 -1
  98. package/dist/{requirementDiagram-d7b522a1.js → requirementDiagram-bdf860d6.js} +4 -4
  99. package/dist/{sankeyDiagram-6008c03c.js → sankeyDiagram-743c3fe8.js} +155 -155
  100. package/dist/{sankeyDiagram-31fcfff2.js → sankeyDiagram-8f13d901.js} +4 -4
  101. package/dist/{sankeyDiagram-3886b48b.js → sankeyDiagram-9588997f.js} +4 -4
  102. package/dist/{sequenceDiagram-e03e412c.js → sequenceDiagram-90be091c.js} +2 -2
  103. package/dist/{sequenceDiagram-ccb4d521.js → sequenceDiagram-b655622a.js} +2 -2
  104. package/dist/{sequenceDiagram-906ce93a.js → sequenceDiagram-c6a353ff.js} +2 -2
  105. package/dist/{stateDiagram-dac17514.js → stateDiagram-59f0c015.js} +2 -2
  106. package/dist/{stateDiagram-a7efb93f.js → stateDiagram-72c8f884.js} +5 -5
  107. package/dist/{stateDiagram-096e8085.js → stateDiagram-ab304aae.js} +5 -5
  108. package/dist/{stateDiagram-v2-0255b0b2.js → stateDiagram-v2-2b26beab.js} +5 -5
  109. package/dist/{stateDiagram-v2-cedd2d35.js → stateDiagram-v2-67668220.js} +8 -8
  110. package/dist/{stateDiagram-v2-9dc5bbab.js → stateDiagram-v2-b8780ab9.js} +8 -8
  111. package/dist/{styles-3bbdb1fe.js → styles-080da4f6.js} +2 -2
  112. package/dist/{styles-9a324dfc.js → styles-372b86e6.js} +1 -1
  113. package/dist/{styles-c47180b5.js → styles-3dcbcfbf.js} +4 -11
  114. package/dist/{styles-409bbf16.js → styles-9c745c82.js} +1 -1
  115. package/dist/{styles-081ce523.js → styles-b9dbf4ed.js} +3 -3
  116. package/dist/{styles-554c1edb.js → styles-c6a4642b.js} +1 -1
  117. package/dist/{styles-47086cb2.js → styles-e1c809d9.js} +3 -10
  118. package/dist/{styles-8234ce8b.js → styles-e9091698.js} +3 -3
  119. package/dist/{styles-dc48a676.js → styles-ece34a88.js} +4 -11
  120. package/dist/{svgDrawCommon-dee24e02.js → svgDrawCommon-1a6a0ee4.js} +1 -1
  121. package/dist/{svgDrawCommon-cae1106a.js → svgDrawCommon-2d4c2448.js} +1 -1
  122. package/dist/{svgDrawCommon-43c67fcf.js → svgDrawCommon-4835440b.js} +1 -1
  123. package/dist/themes/theme-base.d.ts +1 -0
  124. package/dist/themes/theme-dark.d.ts +1 -0
  125. package/dist/themes/theme-default.d.ts +1 -0
  126. package/dist/themes/theme-forest.d.ts +1 -0
  127. package/dist/themes/theme-neutral.d.ts +1 -0
  128. package/dist/{timeline-definition-64934a04.js → timeline-definition-33548db8.js} +3 -3
  129. package/dist/{timeline-definition-2815a264.js → timeline-definition-5b62e21b.js} +1 -1
  130. package/dist/{timeline-definition-fd64d3c8.js → timeline-definition-82529010.js} +3 -3
  131. package/dist/vitepress/vite.config.d.ts +1 -1
  132. package/dist/xychartDiagram-2b33534f.js +1745 -0
  133. package/dist/xychartDiagram-37ad2a4b.js +1284 -0
  134. package/dist/xychartDiagram-85b81823.js +1800 -0
  135. package/package.json +1 -1
  136. package/dist/arc-907dcd53.js +0 -84
  137. package/dist/constant-2fe7eae5.js +0 -63
  138. package/dist/constant-b644328d.js +0 -84
  139. package/dist/createText-56dbee71.js +0 -2845
  140. package/dist/line-9d49a987.js +0 -34
  141. package/dist/linear-c9300245.js +0 -437
package/README.md CHANGED
@@ -20,6 +20,9 @@ Generate diagrams from markdown-like text.
20
20
  <p align="center">
21
21
  <a href="./README.zh-CN.md">简体中文</a>
22
22
  </p>
23
+ <p align="center">
24
+ Try Live Editor previews of future releases: <a href="https://develop.git.mermaid.live/" title="Try the mermaid version from the develop branch.">Develop</a> | <a href="https://next.git.mermaid.live/" title="Try the mermaid version from the next branch.">Next</a>
25
+ </p>
23
26
 
24
27
  <br>
25
28
  <br>
@@ -31,7 +34,7 @@ Generate diagrams from markdown-like text.
31
34
  [![CDN Status](https://img.shields.io/jsdelivr/npm/hm/mermaid)](https://www.jsdelivr.com/package/npm/mermaid)
32
35
  [![NPM Downloads](https://img.shields.io/npm/dm/mermaid)](https://www.npmjs.com/package/mermaid)
33
36
  [![Join our Slack!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=slack&label=slack)](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE)
34
- [![Twitter Follow](https://img.shields.io/badge/Social-mermaidjs__-blue?style=social&logo=twitter)](https://twitter.com/mermaidjs_)
37
+ [![Twitter Follow](https://img.shields.io/badge/Social-mermaidjs__-blue?style=social&logo=X)](https://twitter.com/mermaidjs_)
35
38
 
36
39
  <img src="./img/header.png" alt="" />
37
40
 
package/README.zh-CN.md CHANGED
@@ -12,7 +12,7 @@ Mermaid
12
12
  <p>
13
13
 
14
14
  <p align="center">
15
- <a href="https://mermaid.live/"><b>Live Editor!</b></a>
15
+ <a href="https://mermaid.live/"><b>实时编辑器!</b></a>
16
16
  </p>
17
17
  <p align="center">
18
18
  <a href="https://mermaid.js.org">📖 文档</a> | <a href="https://mermaid.js.org/intro/">🚀 入门</a> | <a href="https://www.jsdelivr.com/package/npm/mermaid">🌐 CDN</a> | <a href="https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE" title="Slack invite">🙌 加入我们</a>
@@ -21,6 +21,10 @@ Mermaid
21
21
  <a href="./README.md">English</a>
22
22
  </p>
23
23
 
24
+ <p align="center">
25
+ 尝试未来版本的实时编辑器预览: <a href="https://develop.git.mermaid.live/" title="尝试来自develop分支的mermaid版本。">Develop</a> | <a href="https://next.git.mermaid.live/" title="尝试来自next分支的mermaid版本。">Next</a>
26
+ </p>
27
+
24
28
  <br>
25
29
  <br>
26
30
 
@@ -31,7 +35,7 @@ Mermaid
31
35
  [![CDN Status](https://img.shields.io/jsdelivr/npm/hm/mermaid)](https://www.jsdelivr.com/package/npm/mermaid)
32
36
  [![NPM Downloads](https://img.shields.io/npm/dm/mermaid)](https://www.npmjs.com/package/mermaid)
33
37
  [![Join our Slack!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=slack&label=slack)](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE)
34
- [![Twitter Follow](https://img.shields.io/badge/Social-mermaidjs__-blue?style=social&logo=twitter)](https://twitter.com/mermaidjs_)
38
+ [![Twitter Follow](https://img.shields.io/badge/Social-mermaidjs__-blue?style=social&logo=X)](https://twitter.com/mermaidjs_)
35
39
 
36
40
  <img src="./img/header.png" alt="" />
37
41
 
@@ -1,5 +1,5 @@
1
- import { c as constant, p as path } from "./constant-b644328d.js";
2
- import { aW as pi, aX as cos, aY as sin, aZ as halfPi, a_ as epsilon, W as tau, a$ as sqrt, b0 as min, b1 as abs, b2 as atan2, b3 as asin, b4 as acos, b5 as max } from "./mermaid-f344f6a7.js";
1
+ import { w as withPath, c as constant } from "./path-39bad7e2.js";
2
+ import { aW as pi, aX as cos, aY as sin, aZ as halfPi, a_ as epsilon, V as tau, a$ as sqrt, b0 as min, b1 as abs, b2 as atan2, b3 as asin, b4 as acos, b5 as max } from "./mermaid-e42d37a0.js";
3
3
  function arcInnerRadius(d) {
4
4
  return d.innerRadius;
5
5
  }
@@ -36,7 +36,7 @@ function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
36
36
  };
37
37
  }
38
38
  function d3arc() {
39
- var innerRadius = arcInnerRadius, outerRadius = arcOuterRadius, cornerRadius = constant(0), padRadius = null, startAngle = arcStartAngle, endAngle = arcEndAngle, padAngle = arcPadAngle, context = null;
39
+ var innerRadius = arcInnerRadius, outerRadius = arcOuterRadius, cornerRadius = constant(0), padRadius = null, startAngle = arcStartAngle, endAngle = arcEndAngle, padAngle = arcPadAngle, context = null, path = withPath(arc);
40
40
  function arc() {
41
41
  var buffer, r, r0 = +innerRadius.apply(this, arguments), r1 = +outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) - halfPi, a1 = endAngle.apply(this, arguments) - halfPi, da = abs(a1 - a0), cw = a1 > a0;
42
42
  if (!context)
@@ -68,10 +68,14 @@ function d3arc() {
68
68
  var x01 = r1 * cos(a01), y01 = r1 * sin(a01), x10 = r0 * cos(a10), y10 = r0 * sin(a10);
69
69
  if (rc > epsilon) {
70
70
  var x11 = r1 * cos(a11), y11 = r1 * sin(a11), x00 = r0 * cos(a00), y00 = r0 * sin(a00), oc;
71
- if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {
72
- var ax = x01 - oc[0], ay = y01 - oc[1], bx = x11 - oc[0], by = y11 - oc[1], kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2), lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);
73
- rc0 = min(rc, (r0 - lc) / (kc - 1));
74
- rc1 = min(rc, (r1 - lc) / (kc + 1));
71
+ if (da < pi) {
72
+ if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {
73
+ var ax = x01 - oc[0], ay = y01 - oc[1], bx = x11 - oc[0], by = y11 - oc[1], kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2), lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);
74
+ rc0 = min(rc, (r0 - lc) / (kc - 1));
75
+ rc1 = min(rc, (r1 - lc) / (kc + 1));
76
+ } else {
77
+ rc0 = rc1 = 0;
78
+ }
75
79
  }
76
80
  }
77
81
  if (!(da1 > epsilon))
@@ -0,0 +1,86 @@
1
+ import { w as ln, c as W } from "./path-428ebac9.js";
2
+ import { aW as an, aX as $, aY as w, aZ as rn, a_ as y, V as on, a$ as B, b0 as _, b1 as un, b2 as t, b3 as sn, b4 as tn, b5 as fn } from "./mermaid-c2fb2af7.js";
3
+ function cn(l) {
4
+ return l.innerRadius;
5
+ }
6
+ function yn(l) {
7
+ return l.outerRadius;
8
+ }
9
+ function gn(l) {
10
+ return l.startAngle;
11
+ }
12
+ function mn(l) {
13
+ return l.endAngle;
14
+ }
15
+ function pn(l) {
16
+ return l && l.padAngle;
17
+ }
18
+ function dn(l, h, E, q, v, A, X, a) {
19
+ var I = E - l, i = q - h, n = X - v, m = a - A, r = m * I - n * i;
20
+ if (!(r * r < y))
21
+ return r = (n * (h - A) - m * (l - v)) / r, [l + r * I, h + r * i];
22
+ }
23
+ function K(l, h, E, q, v, A, X) {
24
+ var a = l - E, I = h - q, i = (X ? A : -A) / B(a * a + I * I), n = i * I, m = -i * a, r = l + n, s = h + m, f = E + n, c = q + m, Y = (r + f) / 2, o = (s + c) / 2, p = f - r, g = c - s, R = p * p + g * g, T = v - A, b = r * c - f * s, O = (g < 0 ? -1 : 1) * B(fn(0, T * T * R - b * b)), S = (b * g - p * O) / R, V = (-b * p - g * O) / R, P = (b * g + p * O) / R, d = (-b * p + g * O) / R, x = S - Y, e = V - o, u = P - Y, Z = d - o;
25
+ return x * x + e * e > u * u + Z * Z && (S = P, V = d), {
26
+ cx: S,
27
+ cy: V,
28
+ x01: -n,
29
+ y01: -m,
30
+ x11: S * (v / T - 1),
31
+ y11: V * (v / T - 1)
32
+ };
33
+ }
34
+ function vn() {
35
+ var l = cn, h = yn, E = W(0), q = null, v = gn, A = mn, X = pn, a = null, I = ln(i);
36
+ function i() {
37
+ var n, m, r = +l.apply(this, arguments), s = +h.apply(this, arguments), f = v.apply(this, arguments) - rn, c = A.apply(this, arguments) - rn, Y = un(c - f), o = c > f;
38
+ if (a || (a = n = I()), s < r && (m = s, s = r, r = m), !(s > y))
39
+ a.moveTo(0, 0);
40
+ else if (Y > on - y)
41
+ a.moveTo(s * $(f), s * w(f)), a.arc(0, 0, s, f, c, !o), r > y && (a.moveTo(r * $(c), r * w(c)), a.arc(0, 0, r, c, f, o));
42
+ else {
43
+ var p = f, g = c, R = f, T = c, b = Y, O = Y, S = X.apply(this, arguments) / 2, V = S > y && (q ? +q.apply(this, arguments) : B(r * r + s * s)), P = _(un(s - r) / 2, +E.apply(this, arguments)), d = P, x = P, e, u;
44
+ if (V > y) {
45
+ var Z = sn(V / r * w(S)), C = sn(V / s * w(S));
46
+ (b -= Z * 2) > y ? (Z *= o ? 1 : -1, R += Z, T -= Z) : (b = 0, R = T = (f + c) / 2), (O -= C * 2) > y ? (C *= o ? 1 : -1, p += C, g -= C) : (O = 0, p = g = (f + c) / 2);
47
+ }
48
+ var j = s * $(p), z = s * w(p), F = r * $(T), G = r * w(T);
49
+ if (P > y) {
50
+ var H = s * $(g), J = s * w(g), L = r * $(R), M = r * w(R), D;
51
+ if (Y < an)
52
+ if (D = dn(j, z, L, M, H, J, F, G)) {
53
+ var N = j - D[0], Q = z - D[1], U = H - D[0], k = J - D[1], nn = 1 / w(tn((N * U + Q * k) / (B(N * N + Q * Q) * B(U * U + k * k))) / 2), en = B(D[0] * D[0] + D[1] * D[1]);
54
+ d = _(P, (r - en) / (nn - 1)), x = _(P, (s - en) / (nn + 1));
55
+ } else
56
+ d = x = 0;
57
+ }
58
+ O > y ? x > y ? (e = K(L, M, j, z, s, x, o), u = K(H, J, F, G, s, x, o), a.moveTo(e.cx + e.x01, e.cy + e.y01), x < P ? a.arc(e.cx, e.cy, x, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (a.arc(e.cx, e.cy, x, t(e.y01, e.x01), t(e.y11, e.x11), !o), a.arc(0, 0, s, 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, x, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : (a.moveTo(j, z), a.arc(0, 0, s, p, g, !o)) : a.moveTo(j, z), !(r > y) || !(b > y) ? a.lineTo(F, G) : d > y ? (e = K(F, G, H, J, r, -d, o), u = K(j, z, L, M, r, -d, o), a.lineTo(e.cx + e.x01, e.cy + e.y01), d < P ? a.arc(e.cx, e.cy, d, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (a.arc(e.cx, e.cy, d, 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, d, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : a.arc(0, 0, r, T, R, o);
59
+ }
60
+ if (a.closePath(), n)
61
+ return a = null, n + "" || null;
62
+ }
63
+ return i.centroid = function() {
64
+ var n = (+l.apply(this, arguments) + +h.apply(this, arguments)) / 2, m = (+v.apply(this, arguments) + +A.apply(this, arguments)) / 2 - an / 2;
65
+ return [$(m) * n, w(m) * n];
66
+ }, i.innerRadius = function(n) {
67
+ return arguments.length ? (l = typeof n == "function" ? n : W(+n), i) : l;
68
+ }, i.outerRadius = function(n) {
69
+ return arguments.length ? (h = typeof n == "function" ? n : W(+n), i) : h;
70
+ }, i.cornerRadius = function(n) {
71
+ return arguments.length ? (E = typeof n == "function" ? n : W(+n), i) : E;
72
+ }, i.padRadius = function(n) {
73
+ return arguments.length ? (q = n == null ? null : typeof n == "function" ? n : W(+n), i) : q;
74
+ }, i.startAngle = function(n) {
75
+ return arguments.length ? (v = typeof n == "function" ? n : W(+n), i) : v;
76
+ }, i.endAngle = function(n) {
77
+ return arguments.length ? (A = typeof n == "function" ? n : W(+n), i) : A;
78
+ }, i.padAngle = function(n) {
79
+ return arguments.length ? (X = typeof n == "function" ? n : W(+n), i) : X;
80
+ }, i.context = function(n) {
81
+ return arguments.length ? (a = n ?? null, i) : a;
82
+ }, i;
83
+ }
84
+ export {
85
+ vn as d
86
+ };
@@ -1,5 +1,5 @@
1
- import { s as ve, g as we, a as Oe, b as Te, c as Dt, d as ue, e as Re, f as Kt, h as De, i as wt, j as Nt, l as le, k as Se, w as Pe, m as oe } from "./mermaid-5f2d2ec5.js";
2
- import { d as Me, g as Le } from "./svgDrawCommon-dee24e02.js";
1
+ import { s as ve, g as we, a as Oe, b as Te, c as Dt, d as ue, e as Re, f as Kt, h as De, i as wt, j as Nt, l as le, k as Se, w as Pe, m as oe } from "./mermaid-c2fb2af7.js";
2
+ import { d as Me, g as Le } from "./svgDrawCommon-1a6a0ee4.js";
3
3
  var Yt = function() {
4
4
  var e = function(bt, _, x, m) {
5
5
  for (x = x || {}, m = bt.length; m--; x[bt[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, 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, m as calculateTextHeight } from "./mermaid-f344f6a7.js";
2
- import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-cae1106a.js";
1
+ import { s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, c as getConfig, d as sanitizeText, 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, m as calculateTextHeight } from "./mermaid-e42d37a0.js";
2
+ import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-2d4c2448.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,6 +1,6 @@
1
- import { s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, c as getConfig, d as sanitizeText, e as common, f as assignWithDepth, h as calculateTextWidth, l as log, i as configureSvgSize, w as wrapLabel, j as calculateTextHeight } from "./mermaid-485fd1a4.js";
1
+ import { s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, c as getConfig, d as sanitizeText, e as common, f as assignWithDepth, h as calculateTextWidth, l as log, i as configureSvgSize, w as wrapLabel, j as calculateTextHeight } from "./mermaid-8af3addd.js";
2
2
  import { select } from "d3";
3
- import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-43c67fcf.js";
3
+ import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-4835440b.js";
4
4
  import { sanitizeUrl } from "@braintree/sanitize-url";
5
5
  import "ts-dedent";
6
6
  import "dayjs";
@@ -1,9 +1,9 @@
1
- import { p as G, d as S, s as A } from "./styles-47086cb2.js";
2
- import { F as W, z as B, l as u, G as I, c as H, j as M, k as O } from "./mermaid-5f2d2ec5.js";
3
- import { G as P, l as X } from "./layout-1caf14c9.js";
4
- import { l as Y } from "./line-9d49a987.js";
1
+ import { p as G, d as S, s as A } from "./styles-e1c809d9.js";
2
+ import { F as W, z as B, l as u, G as I, c as H, j as M, k as O } from "./mermaid-c2fb2af7.js";
3
+ import { G as P, l as X } from "./layout-1c860ba8.js";
4
+ import { l as Y } from "./line-3446947e.js";
5
5
  import "./array-2ff2c7a6.js";
6
- import "./constant-2fe7eae5.js";
6
+ import "./path-428ebac9.js";
7
7
  let _ = 0;
8
8
  const $ = function(i, a, t, o, p) {
9
9
  const g = function(e) {
@@ -1,9 +1,9 @@
1
- import { p as parser, d as db, s as styles } from "./styles-dc48a676.js";
2
- import { F as curveBasis, z as utils, l as log, G as parseGenericTypes, c as getConfig, j as d3select, k as configureSvgSize } from "./mermaid-f344f6a7.js";
3
- import { G as Graph, l as layout } from "./layout-8affc211.js";
4
- import { l as line } from "./line-3d4ae7d1.js";
1
+ import { p as parser, d as db, s as styles } from "./styles-ece34a88.js";
2
+ import { F as curveBasis, z as utils, l as log, G as parseGenericTypes, c as getConfig, j as d3select, k as configureSvgSize } from "./mermaid-e42d37a0.js";
3
+ import { G as Graph, l as layout } from "./layout-fa5fa804.js";
4
+ import { l as line } from "./line-4dac5d36.js";
5
5
  import "./array-b7dcf730.js";
6
- import "./constant-b644328d.js";
6
+ import "./path-39bad7e2.js";
7
7
  let edgeCount = 0;
8
8
  const drawEdge = function(elem, path, relation, conf, diagObj) {
9
9
  const getRelationType = function(type) {
@@ -1,8 +1,8 @@
1
- import { p as parser, d as db, s as styles } from "./styles-c47180b5.js";
1
+ import { p as parser, d as db, s as styles } from "./styles-3dcbcfbf.js";
2
2
  import { line, curveBasis, 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 { u as utils, l as log, v as parseGenericTypes, c as getConfig, i as configureSvgSize } from "./mermaid-485fd1a4.js";
5
+ import { u as utils, l as log, v as parseGenericTypes, c as getConfig, i as configureSvgSize } from "./mermaid-8af3addd.js";
6
6
  import "ts-dedent";
7
7
  import "dayjs";
8
8
  import "@braintree/sanitize-url";
@@ -1,12 +1,12 @@
1
- import { p as R, d as N, s as B } from "./styles-47086cb2.js";
2
- import { l as c, c as r, j as k, z as G, r as _, q as E, n as C, o as z, f as A } from "./mermaid-5f2d2ec5.js";
3
- import { G as q } from "./layout-1caf14c9.js";
4
- import { r as P } from "./index-08d47d0a.js";
5
- import "./edges-345e4ceb.js";
6
- import "./createText-56dbee71.js";
7
- import "./line-9d49a987.js";
1
+ import { p as R, d as N, s as B } from "./styles-e1c809d9.js";
2
+ import { l as c, c as r, j as k, z as G, r as _, q as E, n as C, o as z, f as A } from "./mermaid-c2fb2af7.js";
3
+ import { G as q } from "./layout-1c860ba8.js";
4
+ import { r as P } from "./index-dc7010be.js";
5
+ import "./edges-6f4cf161.js";
6
+ import "./createText-f99b4cea.js";
7
+ import "./line-3446947e.js";
8
8
  import "./array-2ff2c7a6.js";
9
- import "./constant-2fe7eae5.js";
9
+ import "./path-428ebac9.js";
10
10
  const S = (o) => A.sanitizeText(o, r());
11
11
  let v = {
12
12
  dividerMargin: 10,
@@ -1,12 +1,12 @@
1
- import { p as parser, d as db, s as styles } from "./styles-dc48a676.js";
2
- import { l as log, c as getConfig, j as d3select, z as utils, r as setupGraphViewbox, q as interpolateToCurve, n as curveLinear, o as getStylesFromArray, f as common } from "./mermaid-f344f6a7.js";
3
- import { G as Graph } from "./layout-8affc211.js";
4
- import { r as render } from "./index-a53b5366.js";
5
- import "./edges-32b26c0e.js";
6
- import "./createText-53d25889.js";
7
- import "./line-3d4ae7d1.js";
1
+ import { p as parser, d as db, s as styles } from "./styles-ece34a88.js";
2
+ import { l as log, c as getConfig, j as d3select, z as utils, r as setupGraphViewbox, q as interpolateToCurve, n as curveLinear, o as getStylesFromArray, f as common } from "./mermaid-e42d37a0.js";
3
+ import { G as Graph } from "./layout-fa5fa804.js";
4
+ import { r as render } from "./index-b9fee07a.js";
5
+ import "./edges-2823b089.js";
6
+ import "./createText-13a582be.js";
7
+ import "./line-4dac5d36.js";
8
8
  import "./array-b7dcf730.js";
9
- import "./constant-b644328d.js";
9
+ import "./path-39bad7e2.js";
10
10
  const sanitizeText = (txt) => common.sanitizeText(txt, getConfig());
11
11
  let conf = {
12
12
  dividerMargin: 10,
@@ -1,8 +1,8 @@
1
- import { p as parser, d as db, s as styles } from "./styles-c47180b5.js";
1
+ import { p as parser, d as db, s as styles } from "./styles-3dcbcfbf.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, o as setupGraphViewbox, n as interpolateToCurve, k as getStylesFromArray, e as common } from "./mermaid-485fd1a4.js";
5
- import { r as render } from "./index-b0b3af87.js";
4
+ import { l as log, c as getConfig, u as utils, o as setupGraphViewbox, n as interpolateToCurve, k as getStylesFromArray, e as common } from "./mermaid-8af3addd.js";
5
+ import { r as render } from "./index-2c4b9a3b.js";
6
6
  import "ts-dedent";
7
7
  import "dayjs";
8
8
  import "@braintree/sanitize-url";
@@ -14,8 +14,8 @@ import "stylis";
14
14
  import "lodash-es/isEmpty.js";
15
15
  import "dagre-d3-es/src/dagre/index.js";
16
16
  import "dagre-d3-es/src/graphlib/json.js";
17
- import "./edges-bc33a094.js";
18
- import "./createText-b3507a77.js";
17
+ import "./edges-f2ad444c.js";
18
+ import "./createText-62fc7601.js";
19
19
  import "mdast-util-from-markdown";
20
20
  const sanitizeText = (txt) => common.sanitizeText(txt, getConfig());
21
21
  let conf = {
@@ -132,6 +132,7 @@ export interface MermaidConfig {
132
132
  er?: ErDiagramConfig;
133
133
  pie?: PieDiagramConfig;
134
134
  quadrantChart?: QuadrantChartConfig;
135
+ xyChart?: XYChartConfig;
135
136
  requirement?: RequirementDiagramConfig;
136
137
  mindmap?: MindmapDiagramConfig;
137
138
  gitGraph?: GitGraphDiagramConfig;
@@ -685,6 +686,194 @@ export interface QuadrantChartConfig extends BaseDiagramConfig {
685
686
  */
686
687
  quadrantExternalBorderStrokeWidth?: number;
687
688
  }
689
+ /**
690
+ * This object contains configuration for XYChart axis config
691
+ *
692
+ * This interface was referenced by `MermaidConfig`'s JSON-Schema
693
+ * via the `definition` "XYChartAxisConfig".
694
+ */
695
+ export interface XYChartAxisConfig {
696
+ /**
697
+ * Should show the axis labels (tick text)
698
+ */
699
+ showLabel?: boolean;
700
+ /**
701
+ * font size of the axis labels (tick text)
702
+ */
703
+ labelFontSize?: number;
704
+ /**
705
+ * top and bottom space from axis label (tick text)
706
+ */
707
+ labelPadding?: number;
708
+ /**
709
+ * Should show the axis title
710
+ */
711
+ showTitle?: boolean;
712
+ /**
713
+ * font size of the axis title
714
+ */
715
+ titleFontSize?: number;
716
+ /**
717
+ * top and bottom space from axis title
718
+ */
719
+ titlePadding?: number;
720
+ /**
721
+ * Should show the axis tick lines
722
+ */
723
+ showTick?: boolean;
724
+ /**
725
+ * length of the axis tick lines
726
+ */
727
+ tickLength?: number;
728
+ /**
729
+ * width of the axis tick lines
730
+ */
731
+ tickWidth?: number;
732
+ /**
733
+ * Show line across the axis
734
+ */
735
+ showAxisLine?: boolean;
736
+ /**
737
+ * Width of the axis line
738
+ */
739
+ axisLineWidth?: number;
740
+ }
741
+ /**
742
+ * This object contains configuration specific to XYCharts
743
+ *
744
+ * This interface was referenced by `MermaidConfig`'s JSON-Schema
745
+ * via the `definition` "XYChartConfig".
746
+ */
747
+ export interface XYChartConfig extends BaseDiagramConfig {
748
+ /**
749
+ * width of the chart
750
+ */
751
+ width?: number;
752
+ /**
753
+ * height of the chart
754
+ */
755
+ height?: number;
756
+ /**
757
+ * Font size of the chart title
758
+ */
759
+ titleFontSize?: number;
760
+ /**
761
+ * Top and bottom space from the chart title
762
+ */
763
+ titlePadding?: number;
764
+ /**
765
+ * Should show the chart title
766
+ */
767
+ showTitle?: boolean;
768
+ xAxis?: XYChartAxisConfig1;
769
+ yAxis?: XYChartAxisConfig2;
770
+ /**
771
+ * How to plot will be drawn horizontal or vertical
772
+ */
773
+ chartOrientation?: 'vertical' | 'horizontal';
774
+ /**
775
+ * Minimum percent of space plots of the chart will take
776
+ */
777
+ plotReservedSpacePercent?: number;
778
+ }
779
+ /**
780
+ * This object contains configuration for XYChart axis config
781
+ */
782
+ export interface XYChartAxisConfig1 {
783
+ /**
784
+ * Should show the axis labels (tick text)
785
+ */
786
+ showLabel?: boolean;
787
+ /**
788
+ * font size of the axis labels (tick text)
789
+ */
790
+ labelFontSize?: number;
791
+ /**
792
+ * top and bottom space from axis label (tick text)
793
+ */
794
+ labelPadding?: number;
795
+ /**
796
+ * Should show the axis title
797
+ */
798
+ showTitle?: boolean;
799
+ /**
800
+ * font size of the axis title
801
+ */
802
+ titleFontSize?: number;
803
+ /**
804
+ * top and bottom space from axis title
805
+ */
806
+ titlePadding?: number;
807
+ /**
808
+ * Should show the axis tick lines
809
+ */
810
+ showTick?: boolean;
811
+ /**
812
+ * length of the axis tick lines
813
+ */
814
+ tickLength?: number;
815
+ /**
816
+ * width of the axis tick lines
817
+ */
818
+ tickWidth?: number;
819
+ /**
820
+ * Show line across the axis
821
+ */
822
+ showAxisLine?: boolean;
823
+ /**
824
+ * Width of the axis line
825
+ */
826
+ axisLineWidth?: number;
827
+ }
828
+ /**
829
+ * This object contains configuration for XYChart axis config
830
+ */
831
+ export interface XYChartAxisConfig2 {
832
+ /**
833
+ * Should show the axis labels (tick text)
834
+ */
835
+ showLabel?: boolean;
836
+ /**
837
+ * font size of the axis labels (tick text)
838
+ */
839
+ labelFontSize?: number;
840
+ /**
841
+ * top and bottom space from axis label (tick text)
842
+ */
843
+ labelPadding?: number;
844
+ /**
845
+ * Should show the axis title
846
+ */
847
+ showTitle?: boolean;
848
+ /**
849
+ * font size of the axis title
850
+ */
851
+ titleFontSize?: number;
852
+ /**
853
+ * top and bottom space from axis title
854
+ */
855
+ titlePadding?: number;
856
+ /**
857
+ * Should show the axis tick lines
858
+ */
859
+ showTick?: boolean;
860
+ /**
861
+ * length of the axis tick lines
862
+ */
863
+ tickLength?: number;
864
+ /**
865
+ * width of the axis tick lines
866
+ */
867
+ tickWidth?: number;
868
+ /**
869
+ * Show line across the axis
870
+ */
871
+ showAxisLine?: boolean;
872
+ /**
873
+ * Width of the axis line
874
+ */
875
+ axisLineWidth?: number;
876
+ }
688
877
  /**
689
878
  * The object containing configurations specific for entity relationship diagrams
690
879
  *