mermaid 10.5.0 → 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 +6 -3
  2. package/README.zh-CN.md +7 -3
  3. package/dist/{arc-947d8396.js → arc-288f99c7.js} +11 -7
  4. package/dist/arc-5891aaa8.js +86 -0
  5. package/dist/{c4Diagram-be6d31b5.js → c4Diagram-269982e4.js} +2 -2
  6. package/dist/{c4Diagram-ef5e9216.js → c4Diagram-60acd026.js} +2 -2
  7. package/dist/{c4Diagram-7ff6304f.js → c4Diagram-d0fbc5ce.js} +2 -2
  8. package/dist/{classDiagram-ad76bf5a.js → classDiagram-0a511ccd.js} +5 -5
  9. package/dist/{classDiagram-4226ab0c.js → classDiagram-0e94aa92.js} +5 -5
  10. package/dist/{classDiagram-04f04946.js → classDiagram-936ed81e.js} +2 -2
  11. package/dist/{classDiagram-v2-6e58f5b0.js → classDiagram-v2-11d71d68.js} +8 -8
  12. package/dist/{classDiagram-v2-481a852c.js → classDiagram-v2-5699522c.js} +8 -8
  13. package/dist/{classDiagram-v2-d4efdcc3.js → classDiagram-v2-c3cb15f1.js} +5 -5
  14. package/dist/config.type.d.ts +189 -0
  15. package/dist/{createText-2660bae1.js → createText-13a582be.js} +730 -598
  16. package/dist/{createText-80c3befb.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-9bf94b2d.js → edges-2823b089.js} +3 -3
  38. package/dist/{edges-020bfa8c.js → edges-6f4cf161.js} +3 -3
  39. package/dist/{edges-f15a7e05.js → edges-f2ad444c.js} +2 -2
  40. package/dist/{erDiagram-5298a456.js → erDiagram-1ee9f5ab.js} +4 -4
  41. package/dist/{erDiagram-4c5cab4a.js → erDiagram-9c70e2d1.js} +4 -4
  42. package/dist/{erDiagram-a995d1fe.js → erDiagram-9d236eb7.js} +1 -1
  43. package/dist/{flowDb-fa1288b0.js → flowDb-1972c806.js} +10 -2
  44. package/dist/{flowDb-b820d5dc.js → flowDb-81211f6b.js} +109 -106
  45. package/dist/{flowDb-af7c12e0.js → flowDb-98fc3877.js} +10 -2
  46. package/dist/{flowDiagram-f303bdd6.js → flowDiagram-7ea5b25a.js} +6 -6
  47. package/dist/{flowDiagram-70296b2d.js → flowDiagram-92806404.js} +9 -9
  48. package/dist/{flowDiagram-2527b41f.js → flowDiagram-bc4d5112.js} +9 -9
  49. package/dist/{flowDiagram-v2-596664fa.js → flowDiagram-v2-2322f4b4.js} +9 -9
  50. package/dist/{flowDiagram-v2-7f59114e.js → flowDiagram-v2-6d4618e9.js} +9 -9
  51. package/dist/{flowDiagram-v2-34644886.js → flowDiagram-v2-855bc5b3.js} +6 -6
  52. package/dist/{flowchart-elk-definition-ee4ab33c.js → flowchart-elk-definition-3970a277.js} +9 -6
  53. package/dist/{flowchart-elk-definition-b487ab79.js → flowchart-elk-definition-abe16c3d.js} +7 -4
  54. package/dist/{flowchart-elk-definition-8cd0f1e2.js → flowchart-elk-definition-e90fed31.js} +70 -70
  55. package/dist/{ganttDiagram-6a1a118f.js → ganttDiagram-9b5ea136.js} +1 -1
  56. package/dist/{ganttDiagram-dc1fbbc4.js → ganttDiagram-adf6d212.js} +215 -186
  57. package/dist/{ganttDiagram-9d08f276.js → ganttDiagram-dad8d3ea.js} +981 -1024
  58. package/dist/{gitGraphDiagram-baba4d84.js → gitGraphDiagram-40ad929d.js} +4 -4
  59. package/dist/{gitGraphDiagram-2139c8c6.js → gitGraphDiagram-99d0ae7c.js} +4 -4
  60. package/dist/{gitGraphDiagram-0775767f.js → gitGraphDiagram-d1708452.js} +129 -129
  61. package/dist/{index-f9462f3f.js → index-2c4b9a3b.js} +3 -3
  62. package/dist/{index-cc269c15.js → index-b9fee07a.js} +4 -4
  63. package/dist/{index-5f5016a9.js → index-dc7010be.js} +4 -4
  64. package/dist/{infoDiagram-2064d999.js → infoDiagram-736b4530.js} +1 -1
  65. package/dist/{infoDiagram-121d662e.js → infoDiagram-74f3a05a.js} +5 -5
  66. package/dist/{infoDiagram-9585b70e.js → infoDiagram-cf09b946.js} +1 -1
  67. package/dist/{journeyDiagram-7dbbd928.js → journeyDiagram-dda15a26.js} +4 -4
  68. package/dist/{journeyDiagram-6df70039.js → journeyDiagram-df861f2b.js} +2 -2
  69. package/dist/{journeyDiagram-943d6037.js → journeyDiagram-fc8991e5.js} +4 -4
  70. package/dist/{layout-545b2d5b.js → layout-1c860ba8.js} +1 -1
  71. package/dist/{layout-a7b9ff07.js → layout-fa5fa804.js} +1 -1
  72. package/dist/line-3446947e.js +34 -0
  73. package/dist/{line-8fd2bd69.js → line-4dac5d36.js} +3 -3
  74. package/dist/{linear-1a8511e4.js → linear-89925bf4.js} +51 -37
  75. package/dist/linear-d1684810.js +447 -0
  76. package/dist/{mermaid-0d192ec3.js → mermaid-8af3addd.js} +324 -195
  77. package/dist/{mermaid-e4a58915.js → mermaid-c2fb2af7.js} +2412 -2296
  78. package/dist/{mermaid-491db2d9.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 +3462 -1323
  83. package/dist/mermaid.min.js +206 -201
  84. package/dist/{mindmap-definition-ad8e8e4e.js → mindmap-definition-35625031.js} +4 -4
  85. package/dist/{mindmap-definition-7f612c4b.js → mindmap-definition-beec6740.js} +2 -2
  86. package/dist/{mindmap-definition-5c6cc2b2.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-eb4af4ec.js → pieDiagram-3ad18685.js} +20 -20
  90. package/dist/{pieDiagram-697bd9be.js → pieDiagram-cce2db57.js} +3 -3
  91. package/dist/{pieDiagram-ed51bc52.js → pieDiagram-dbbf0591.js} +1 -1
  92. package/dist/{quadrantDiagram-3a393d1c.js → quadrantDiagram-4d7f4fd6.js} +11 -10
  93. package/dist/{quadrantDiagram-d3fede19.js → quadrantDiagram-d650316a.js} +108 -108
  94. package/dist/{quadrantDiagram-354b0825.js → quadrantDiagram-eaf6be26.js} +12 -11
  95. package/dist/rendering-util/createText.d.ts +2 -0
  96. package/dist/{requirementDiagram-3865c41f.js → requirementDiagram-36f18e2f.js} +4 -4
  97. package/dist/{requirementDiagram-e12f1d97.js → requirementDiagram-6fc4c22a.js} +1 -1
  98. package/dist/{requirementDiagram-65cd3fda.js → requirementDiagram-bdf860d6.js} +4 -4
  99. package/dist/{sankeyDiagram-f71fea45.js → sankeyDiagram-743c3fe8.js} +155 -155
  100. package/dist/{sankeyDiagram-6de1f9fe.js → sankeyDiagram-8f13d901.js} +4 -4
  101. package/dist/{sankeyDiagram-73d1d724.js → sankeyDiagram-9588997f.js} +4 -4
  102. package/dist/{sequenceDiagram-db5e53fe.js → sequenceDiagram-90be091c.js} +2 -2
  103. package/dist/{sequenceDiagram-d89d0f25.js → sequenceDiagram-b655622a.js} +2 -2
  104. package/dist/{sequenceDiagram-a000a341.js → sequenceDiagram-c6a353ff.js} +2 -2
  105. package/dist/{stateDiagram-0d589c85.js → stateDiagram-59f0c015.js} +2 -2
  106. package/dist/{stateDiagram-c0051853.js → stateDiagram-72c8f884.js} +5 -5
  107. package/dist/{stateDiagram-5a3782be.js → stateDiagram-ab304aae.js} +5 -5
  108. package/dist/{stateDiagram-v2-8bb05ecb.js → stateDiagram-v2-2b26beab.js} +5 -5
  109. package/dist/{stateDiagram-v2-056072cc.js → stateDiagram-v2-67668220.js} +8 -8
  110. package/dist/{stateDiagram-v2-4231742e.js → stateDiagram-v2-b8780ab9.js} +8 -8
  111. package/dist/{styles-0671a096.js → styles-080da4f6.js} +2 -2
  112. package/dist/{styles-af0a765a.js → styles-372b86e6.js} +1 -1
  113. package/dist/{styles-8b67d7cb.js → styles-3dcbcfbf.js} +4 -11
  114. package/dist/{styles-24dfea38.js → styles-9c745c82.js} +1 -1
  115. package/dist/{styles-1a7a9ff9.js → styles-b9dbf4ed.js} +3 -3
  116. package/dist/{styles-99e04339.js → styles-c6a4642b.js} +1 -1
  117. package/dist/{styles-483f8ae9.js → styles-e1c809d9.js} +3 -10
  118. package/dist/{styles-f40f6c66.js → styles-e9091698.js} +3 -3
  119. package/dist/{styles-6e7f2b1b.js → styles-ece34a88.js} +4 -11
  120. package/dist/{svgDrawCommon-1021982e.js → svgDrawCommon-1a6a0ee4.js} +1 -1
  121. package/dist/{svgDrawCommon-6f1271c3.js → svgDrawCommon-2d4c2448.js} +1 -1
  122. package/dist/{svgDrawCommon-057d45d0.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-5dc05eb7.js → timeline-definition-33548db8.js} +3 -3
  129. package/dist/{timeline-definition-8b56e66a.js → timeline-definition-5b62e21b.js} +1 -1
  130. package/dist/{timeline-definition-a4255305.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-dcf06dea.js +0 -84
  137. package/dist/constant-2fe7eae5.js +0 -63
  138. package/dist/constant-b644328d.js +0 -84
  139. package/dist/createText-4be7776a.js +0 -2845
  140. package/dist/line-4ba3c4fa.js +0 -34
  141. package/dist/linear-9f666eb0.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
 
@@ -56,9 +59,9 @@ Mermaid addresses this problem by enabling users to create easily modifiable dia
56
59
 
57
60
  Mermaid allows even non-programmers to easily create detailed diagrams through the [Mermaid Live Editor](https://mermaid.live/).<br/>
58
61
  [Tutorials](./docs/config/Tutorials.md) has video tutorials.
59
- Use Mermaid with your favorite applications, check out the list of [Integrations and Usages of Mermaid](./docs/ecosystem/integrations.md).
62
+ Use Mermaid with your favorite applications, check out the list of [Integrations and Usages of Mermaid](./docs/ecosystem/integrations-community.md).
60
63
 
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).
64
+ 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-community.md).
62
65
 
63
66
  For a more detailed introduction to Mermaid and some of its more basic uses, look to the [Beginner's Guide](./docs/intro/getting-started.md), [Usage](./docs/config/usage.md) and [Tutorials](./docs/config/Tutorials.md).
64
67
 
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
 
@@ -53,7 +57,7 @@ Mermaid 是一个基于 Javascript 的图表绘制工具,通过解析类 Markd
53
57
  Mermaid 通过允许用户创建便于修改的图表来解决这一难题,它也可以作为生产脚本(或其他代码)的一部分。<br/>
54
58
  <br/>
55
59
  Mermaid 甚至能让非程序员也能通过 [Mermaid Live Editor](https://mermaid.live/) 轻松创建详细的图表。<br/>
56
- 你可以访问 [教程](./docs/config/Tutorials.md) 来查看 Live Editor 的视频教程,也可以查看 [Mermaid 的集成和使用](./docs/ecosystem/integrations.md) 这个清单来检查你的文档工具是否已经集成了 Mermaid 支持。
60
+ 你可以访问 [教程](./docs/config/Tutorials.md) 来查看 Live Editor 的视频教程,也可以查看 [Mermaid 的集成和使用](./docs/ecosystem/integrations-community.md) 这个清单来检查你的文档工具是否已经集成了 Mermaid 支持。
57
61
 
58
62
  如果想要查看关于 Mermaid 更详细的介绍及基础使用方式,可以查看 [入门指引](./docs/intro/getting-started.md), [用法](./docs/config/usage.md) 和 [教程](./docs/config/Tutorials.md).
59
63
 
@@ -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-491db2d9.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-e4a58915.js";
2
- import { d as Me, g as Le } from "./svgDrawCommon-1021982e.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-491db2d9.js";
2
- import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-6f1271c3.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-0d192ec3.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-057d45d0.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-483f8ae9.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-e4a58915.js";
3
- import { G as P, l as X } from "./layout-545b2d5b.js";
4
- import { l as Y } from "./line-4ba3c4fa.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-6e7f2b1b.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-491db2d9.js";
3
- import { G as Graph, l as layout } from "./layout-a7b9ff07.js";
4
- import { l as line } from "./line-8fd2bd69.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-8b67d7cb.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-0d192ec3.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-483f8ae9.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-e4a58915.js";
3
- import { G as q } from "./layout-545b2d5b.js";
4
- import { r as P } from "./index-5f5016a9.js";
5
- import "./edges-020bfa8c.js";
6
- import "./createText-4be7776a.js";
7
- import "./line-4ba3c4fa.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-6e7f2b1b.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-491db2d9.js";
3
- import { G as Graph } from "./layout-a7b9ff07.js";
4
- import { r as render } from "./index-cc269c15.js";
5
- import "./edges-9bf94b2d.js";
6
- import "./createText-2660bae1.js";
7
- import "./line-8fd2bd69.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-8b67d7cb.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-0d192ec3.js";
5
- import { r as render } from "./index-f9462f3f.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-f15a7e05.js";
18
- import "./createText-80c3befb.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
  *