mermaid 10.2.2 → 10.2.3

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 (103) hide show
  1. package/dist/{arc-2c65c00d.js → arc-7150e654.js} +29 -29
  2. package/dist/{arc-56235257.js → arc-7eb198ee.js} +1 -1
  3. package/dist/{c4Diagram-30400ad0.js → c4Diagram-380bf510.js} +2 -2
  4. package/dist/{c4Diagram-4015ed94.js → c4Diagram-9cddb37f.js} +1 -1
  5. package/dist/{c4Diagram-c5f6cac5.js → c4Diagram-cfee614a.js} +2 -2
  6. package/dist/{classDiagram-a3547413.js → classDiagram-5d1b8e6f.js} +5 -5
  7. package/dist/{classDiagram-4adda95e.js → classDiagram-a96cd833.js} +5 -5
  8. package/dist/{classDiagram-f9088573.js → classDiagram-bc733c3b.js} +3 -3
  9. package/dist/{classDiagram-v2-0a70a412.js → classDiagram-v2-67cfdf13.js} +8 -8
  10. package/dist/{classDiagram-v2-56d00918.js → classDiagram-v2-8931bdaf.js} +6 -6
  11. package/dist/{classDiagram-v2-60cd73ae.js → classDiagram-v2-c07ab2ac.js} +8 -8
  12. package/dist/{createText-31812fd1.js → createText-3df630b5.js} +39 -18
  13. package/dist/{createText-2f2a343a.js → createText-d34e51c6.js} +39 -18
  14. package/dist/{createText-34ecf23e.js → createText-f4a1d776.js} +759 -741
  15. package/dist/{edges-06fe0e9b.js → edges-49ac43a2.js} +3 -3
  16. package/dist/{edges-8c2fb38e.js → edges-b5d62f50.js} +4 -4
  17. package/dist/{edges-84ec6f60.js → edges-e08b4480.js} +4 -4
  18. package/dist/{erDiagram-2034ab6f.js → erDiagram-67d49ee6.js} +3 -3
  19. package/dist/{erDiagram-79324bed.js → erDiagram-bd715e3e.js} +3 -3
  20. package/dist/{erDiagram-3f713c6a.js → erDiagram-f6946109.js} +1 -1
  21. package/dist/{flowDb-197cd6d1.js → flowDb-6a57c1b4.js} +1 -1
  22. package/dist/{flowDb-4e7c4aec.js → flowDb-b96f714d.js} +1 -1
  23. package/dist/{flowDb-7f7635cc.js → flowDb-e0e3fd7a.js} +1 -1
  24. package/dist/{flowDiagram-d3a638d5.js → flowDiagram-8fe09f21.js} +10 -10
  25. package/dist/{flowDiagram-a2b06433.js → flowDiagram-93327f21.js} +7 -7
  26. package/dist/{flowDiagram-7f2bb914.js → flowDiagram-98e6d0e8.js} +10 -10
  27. package/dist/{flowDiagram-v2-c75a17c2.js → flowDiagram-v2-3b8e6891.js} +10 -10
  28. package/dist/{flowDiagram-v2-9f8fab07.js → flowDiagram-v2-476db779.js} +7 -7
  29. package/dist/{flowDiagram-v2-d84f41d0.js → flowDiagram-v2-c3745723.js} +10 -10
  30. package/dist/{flowchart-elk-definition-73ae1d0b.js → flowchart-elk-definition-37f84cb6.js} +7 -7
  31. package/dist/{flowchart-elk-definition-5cf0e905.js → flowchart-elk-definition-5082a990.js} +6 -6
  32. package/dist/{flowchart-elk-definition-b299cff1.js → flowchart-elk-definition-9b5375b9.js} +223 -223
  33. package/dist/{ganttDiagram-1781195b.js → ganttDiagram-06967d3a.js} +2 -2
  34. package/dist/{ganttDiagram-4e00717f.js → ganttDiagram-7ce12d6b.js} +1 -1
  35. package/dist/{ganttDiagram-eddf2b5d.js → ganttDiagram-8a43e655.js} +2 -2
  36. package/dist/{gitGraphDiagram-ac8b1a85.js → gitGraphDiagram-1e960c50.js} +1 -1
  37. package/dist/{gitGraphDiagram-71d608d2.js → gitGraphDiagram-2e5972b2.js} +1 -1
  38. package/dist/{gitGraphDiagram-bd04333d.js → gitGraphDiagram-49074372.js} +1 -1
  39. package/dist/{index-ce156fd5.js → index-714fe675.js} +4 -4
  40. package/dist/{index-7484f147.js → index-a92ac404.js} +3 -3
  41. package/dist/{index-bf86b901.js → index-e1d945fd.js} +4 -4
  42. package/dist/{infoDiagram-bc0d5d92.js → infoDiagram-264bed3e.js} +1 -1
  43. package/dist/{infoDiagram-d8edadcf.js → infoDiagram-a3502c4f.js} +1 -1
  44. package/dist/{infoDiagram-e2ad1b58.js → infoDiagram-bb968efd.js} +1 -1
  45. package/dist/{journeyDiagram-eeb24d29.js → journeyDiagram-255a0ba0.js} +3 -3
  46. package/dist/{journeyDiagram-b5476ffb.js → journeyDiagram-31be0096.js} +1 -1
  47. package/dist/{journeyDiagram-1eb6fba0.js → journeyDiagram-b4ecc044.js} +3 -3
  48. package/dist/{layout-1171b506.js → layout-3ecfba7d.js} +1 -1
  49. package/dist/{layout-23ab7ebc.js → layout-db328a38.js} +1 -1
  50. package/dist/{line-47adbd5d.js → line-130fa1e5.js} +1 -1
  51. package/dist/{line-850ff9a1.js → line-9ed8ba8b.js} +1 -1
  52. package/dist/{linear-8f527e14.js → linear-6a545413.js} +1 -1
  53. package/dist/{linear-cedd28c4.js → linear-cfd7abf9.js} +1 -1
  54. package/dist/{mermaid-c66525a4.js → mermaid-34beccd0.js} +74 -72
  55. package/dist/{mermaid-08b2ff5f.js → mermaid-8ea29a40.js} +371 -370
  56. package/dist/{mermaid-ddfd1cde.js → mermaid-b0ad2de1.js} +23 -21
  57. package/dist/mermaid.core.mjs +1 -1
  58. package/dist/mermaid.esm.min.mjs +1 -1
  59. package/dist/mermaid.esm.mjs +2 -2
  60. package/dist/mermaid.js +47 -24
  61. package/dist/mermaid.min.js +122 -122
  62. package/dist/{mindmap-definition-7c7f5519.js → mindmap-definition-4fc2557c.js} +2 -2
  63. package/dist/{mindmap-definition-b35271d9.js → mindmap-definition-c274dca3.js} +2 -2
  64. package/dist/{mindmap-definition-825812a2.js → mindmap-definition-d99fa72b.js} +2 -2
  65. package/dist/{pieDiagram-c9e1e65d.js → pieDiagram-157505fe.js} +1 -1
  66. package/dist/{pieDiagram-9f52f3c8.js → pieDiagram-b14d6516.js} +2 -2
  67. package/dist/{pieDiagram-427d710c.js → pieDiagram-ca09f680.js} +2 -2
  68. package/dist/{quadrantDiagram-dbf8fc84.js → quadrantDiagram-4a0aa1c7.js} +4 -4
  69. package/dist/{quadrantDiagram-0bfe3602.js → quadrantDiagram-5b13e66e.js} +61 -61
  70. package/dist/{quadrantDiagram-1ee9b076.js → quadrantDiagram-fd70f2d0.js} +3 -3
  71. package/dist/{requirementDiagram-a1feb0ba.js → requirementDiagram-19c99588.js} +1 -1
  72. package/dist/{requirementDiagram-480c4b33.js → requirementDiagram-20d822e5.js} +3 -3
  73. package/dist/{requirementDiagram-f7bd47cb.js → requirementDiagram-3071de27.js} +3 -3
  74. package/dist/{selectAll-776a0c51.js → selectAll-92b901d1.js} +1 -1
  75. package/dist/{selectAll-378e90f0.js → selectAll-c295459b.js} +1 -1
  76. package/dist/{sequenceDiagram-5e6de89c.js → sequenceDiagram-1d99af4c.js} +216 -214
  77. package/dist/{sequenceDiagram-d370aecf.js → sequenceDiagram-317224a5.js} +6 -5
  78. package/dist/{sequenceDiagram-4a53e255.js → sequenceDiagram-5dfd0049.js} +4 -3
  79. package/dist/{stateDiagram-a0ac330a.js → stateDiagram-133e3642.js} +2 -2
  80. package/dist/{stateDiagram-eed21683.js → stateDiagram-4e50f1a0.js} +4 -4
  81. package/dist/{stateDiagram-f56100fa.js → stateDiagram-a9a9b756.js} +4 -4
  82. package/dist/{stateDiagram-v2-cfe94687.js → stateDiagram-v2-6371a76b.js} +6 -6
  83. package/dist/{stateDiagram-v2-2a8ef368.js → stateDiagram-v2-b34fad08.js} +8 -8
  84. package/dist/{stateDiagram-v2-7684bed5.js → stateDiagram-v2-ef99b8a4.js} +8 -8
  85. package/dist/{styles-2f9839dc.js → styles-29b137c7.js} +1 -1
  86. package/dist/{styles-1557db13.js → styles-313a4a41.js} +5 -5
  87. package/dist/{styles-aea5c17b.js → styles-5f89df53.js} +3 -3
  88. package/dist/{styles-b9045be1.js → styles-74f60bde.js} +1 -1
  89. package/dist/{styles-ad91cc54.js → styles-82a206d5.js} +5 -5
  90. package/dist/{styles-a40c3df8.js → styles-aae272b4.js} +1 -1
  91. package/dist/{styles-0a525a9a.js → styles-aefe6593.js} +1 -1
  92. package/dist/{styles-ed94903c.js → styles-bed8d31d.js} +1 -1
  93. package/dist/{styles-d9667b1f.js → styles-fa41df25.js} +1 -1
  94. package/dist/{svgDraw-14f13a51.js → svgDraw-0fcc813d.js} +1 -1
  95. package/dist/{svgDraw-d5bb5edb.js → svgDraw-591e3474.js} +2 -2
  96. package/dist/{svgDraw-39291d2f.js → svgDraw-b2141e90.js} +2 -2
  97. package/dist/{svgDrawCommon-b06ba884.js → svgDrawCommon-0bff53a1.js} +1 -1
  98. package/dist/{svgDrawCommon-87f2bfe2.js → svgDrawCommon-daf0bec5.js} +1 -1
  99. package/dist/{timeline-definition-4cdb07ca.js → timeline-definition-5ed366f4.js} +1 -1
  100. package/dist/{timeline-definition-927a93b1.js → timeline-definition-ee1cab63.js} +2 -2
  101. package/dist/{timeline-definition-afaf264f.js → timeline-definition-fff849c3.js} +2 -2
  102. package/dist/utils.d.ts +1 -0
  103. package/package.json +1 -1
@@ -6111,6 +6111,7 @@ const addDetector = (key, detector2, loader2) => {
6111
6111
  const getDiagramLoader = (key) => {
6112
6112
  return detectors[key].loader;
6113
6113
  };
6114
+ const ZERO_WIDTH_SPACE = "​";
6114
6115
  const d3CurveTypes = {
6115
6116
  curveBasis,
6116
6117
  curveBasisClosed,
@@ -6533,7 +6534,7 @@ const calculateTextDimensions = memoize(
6533
6534
  const dim = { width: 0, height: 0, lineHeight: 0 };
6534
6535
  for (const line of lines) {
6535
6536
  const textObj = getTextObj();
6536
- textObj.text = line;
6537
+ textObj.text = line || ZERO_WIDTH_SPACE;
6537
6538
  const textElem = drawSimpleText(g, textObj).style("font-size", _fontSizePx).style("font-weight", fontWeight).style("font-family", fontFamily2);
6538
6539
  const bBox = (textElem._groups || textElem)[0][0].getBBox();
6539
6540
  if (bBox.width === 0 && bBox.height === 0) {
@@ -6699,13 +6700,13 @@ const utils = {
6699
6700
  insertTitle,
6700
6701
  parseFontSize
6701
6702
  };
6702
- const version = "10.2.2";
6703
+ const version = "10.2.3";
6703
6704
  const id$i = "c4";
6704
6705
  const detector$i = (txt) => {
6705
6706
  return txt.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/) !== null;
6706
6707
  };
6707
6708
  const loader$i = async () => {
6708
- const { diagram: diagram2 } = await import("./c4Diagram-4015ed94.js");
6709
+ const { diagram: diagram2 } = await import("./c4Diagram-9cddb37f.js");
6709
6710
  return { id: id$i, diagram: diagram2 };
6710
6711
  };
6711
6712
  const plugin$i = {
@@ -6723,7 +6724,7 @@ const detector$h = (txt, config2) => {
6723
6724
  return txt.match(/^\s*graph/) !== null;
6724
6725
  };
6725
6726
  const loader$h = async () => {
6726
- const { diagram: diagram2 } = await import("./flowDiagram-a2b06433.js");
6727
+ const { diagram: diagram2 } = await import("./flowDiagram-93327f21.js");
6727
6728
  return { id: id$h, diagram: diagram2 };
6728
6729
  };
6729
6730
  const plugin$h = {
@@ -6744,7 +6745,7 @@ const detector$g = (txt, config2) => {
6744
6745
  return txt.match(/^\s*flowchart/) !== null;
6745
6746
  };
6746
6747
  const loader$g = async () => {
6747
- const { diagram: diagram2 } = await import("./flowDiagram-v2-9f8fab07.js");
6748
+ const { diagram: diagram2 } = await import("./flowDiagram-v2-476db779.js");
6748
6749
  return { id: id$g, diagram: diagram2 };
6749
6750
  };
6750
6751
  const plugin$g = {
@@ -6758,7 +6759,7 @@ const detector$f = (txt) => {
6758
6759
  return txt.match(/^\s*erDiagram/) !== null;
6759
6760
  };
6760
6761
  const loader$f = async () => {
6761
- const { diagram: diagram2 } = await import("./erDiagram-3f713c6a.js");
6762
+ const { diagram: diagram2 } = await import("./erDiagram-f6946109.js");
6762
6763
  return { id: id$f, diagram: diagram2 };
6763
6764
  };
6764
6765
  const plugin$f = {
@@ -6772,7 +6773,7 @@ const detector$e = (txt) => {
6772
6773
  return txt.match(/^\s*gitGraph/) !== null;
6773
6774
  };
6774
6775
  const loader$e = async () => {
6775
- const { diagram: diagram2 } = await import("./gitGraphDiagram-ac8b1a85.js");
6776
+ const { diagram: diagram2 } = await import("./gitGraphDiagram-1e960c50.js");
6776
6777
  return { id: id$e, diagram: diagram2 };
6777
6778
  };
6778
6779
  const plugin$e = {
@@ -6786,7 +6787,7 @@ const detector$d = (txt) => {
6786
6787
  return txt.match(/^\s*gantt/) !== null;
6787
6788
  };
6788
6789
  const loader$d = async () => {
6789
- const { diagram: diagram2 } = await import("./ganttDiagram-4e00717f.js");
6790
+ const { diagram: diagram2 } = await import("./ganttDiagram-7ce12d6b.js");
6790
6791
  return { id: id$d, diagram: diagram2 };
6791
6792
  };
6792
6793
  const plugin$d = {
@@ -6800,7 +6801,7 @@ const detector$c = (txt) => {
6800
6801
  return txt.match(/^\s*info/) !== null;
6801
6802
  };
6802
6803
  const loader$c = async () => {
6803
- const { diagram: diagram2 } = await import("./infoDiagram-bc0d5d92.js");
6804
+ const { diagram: diagram2 } = await import("./infoDiagram-264bed3e.js");
6804
6805
  return { id: id$c, diagram: diagram2 };
6805
6806
  };
6806
6807
  const plugin$c = {
@@ -6814,7 +6815,7 @@ const detector$b = (txt) => {
6814
6815
  return txt.match(/^\s*pie/) !== null;
6815
6816
  };
6816
6817
  const loader$b = async () => {
6817
- const { diagram: diagram2 } = await import("./pieDiagram-c9e1e65d.js");
6818
+ const { diagram: diagram2 } = await import("./pieDiagram-157505fe.js");
6818
6819
  return { id: id$b, diagram: diagram2 };
6819
6820
  };
6820
6821
  const plugin$b = {
@@ -6828,7 +6829,7 @@ const detector$a = (txt) => {
6828
6829
  return txt.match(/^\s*quadrantChart/) !== null;
6829
6830
  };
6830
6831
  const loader$a = async () => {
6831
- const { diagram: diagram2 } = await import("./quadrantDiagram-1ee9b076.js");
6832
+ const { diagram: diagram2 } = await import("./quadrantDiagram-fd70f2d0.js");
6832
6833
  return { id: id$a, diagram: diagram2 };
6833
6834
  };
6834
6835
  const plugin$a = {
@@ -6842,7 +6843,7 @@ const detector$9 = (txt) => {
6842
6843
  return txt.match(/^\s*requirement(Diagram)?/) !== null;
6843
6844
  };
6844
6845
  const loader$9 = async () => {
6845
- const { diagram: diagram2 } = await import("./requirementDiagram-a1feb0ba.js");
6846
+ const { diagram: diagram2 } = await import("./requirementDiagram-19c99588.js");
6846
6847
  return { id: id$9, diagram: diagram2 };
6847
6848
  };
6848
6849
  const plugin$9 = {
@@ -6856,7 +6857,7 @@ const detector$8 = (txt) => {
6856
6857
  return txt.match(/^\s*sequenceDiagram/) !== null;
6857
6858
  };
6858
6859
  const loader$8 = async () => {
6859
- const { diagram: diagram2 } = await import("./sequenceDiagram-4a53e255.js");
6860
+ const { diagram: diagram2 } = await import("./sequenceDiagram-5dfd0049.js");
6860
6861
  return { id: id$8, diagram: diagram2 };
6861
6862
  };
6862
6863
  const plugin$8 = {
@@ -6874,7 +6875,7 @@ const detector$7 = (txt, config2) => {
6874
6875
  return txt.match(/^\s*classDiagram/) !== null;
6875
6876
  };
6876
6877
  const loader$7 = async () => {
6877
- const { diagram: diagram2 } = await import("./classDiagram-f9088573.js");
6878
+ const { diagram: diagram2 } = await import("./classDiagram-bc733c3b.js");
6878
6879
  return { id: id$7, diagram: diagram2 };
6879
6880
  };
6880
6881
  const plugin$7 = {
@@ -6892,7 +6893,7 @@ const detector$6 = (txt, config2) => {
6892
6893
  return txt.match(/^\s*classDiagram-v2/) !== null;
6893
6894
  };
6894
6895
  const loader$6 = async () => {
6895
- const { diagram: diagram2 } = await import("./classDiagram-v2-56d00918.js");
6896
+ const { diagram: diagram2 } = await import("./classDiagram-v2-8931bdaf.js");
6896
6897
  return { id: id$6, diagram: diagram2 };
6897
6898
  };
6898
6899
  const plugin$6 = {
@@ -6910,7 +6911,7 @@ const detector$5 = (txt, config2) => {
6910
6911
  return txt.match(/^\s*stateDiagram/) !== null;
6911
6912
  };
6912
6913
  const loader$5 = async () => {
6913
- const { diagram: diagram2 } = await import("./stateDiagram-a0ac330a.js");
6914
+ const { diagram: diagram2 } = await import("./stateDiagram-133e3642.js");
6914
6915
  return { id: id$5, diagram: diagram2 };
6915
6916
  };
6916
6917
  const plugin$5 = {
@@ -6934,7 +6935,7 @@ const detector$4 = (text, config2) => {
6934
6935
  return false;
6935
6936
  };
6936
6937
  const loader$4 = async () => {
6937
- const { diagram: diagram2 } = await import("./stateDiagram-v2-cfe94687.js");
6938
+ const { diagram: diagram2 } = await import("./stateDiagram-v2-6371a76b.js");
6938
6939
  return { id: id$4, diagram: diagram2 };
6939
6940
  };
6940
6941
  const plugin$4 = {
@@ -6948,7 +6949,7 @@ const detector$3 = (txt) => {
6948
6949
  return txt.match(/^\s*journey/) !== null;
6949
6950
  };
6950
6951
  const loader$3 = async () => {
6951
- const { diagram: diagram2 } = await import("./journeyDiagram-b5476ffb.js");
6952
+ const { diagram: diagram2 } = await import("./journeyDiagram-31be0096.js");
6952
6953
  return { id: id$3, diagram: diagram2 };
6953
6954
  };
6954
6955
  const plugin$3 = {
@@ -7033,7 +7034,7 @@ const detector$2 = (txt, config2) => {
7033
7034
  return false;
7034
7035
  };
7035
7036
  const loader$2 = async () => {
7036
- const { diagram: diagram2 } = await import("./flowchart-elk-definition-5cf0e905.js");
7037
+ const { diagram: diagram2 } = await import("./flowchart-elk-definition-5082a990.js");
7037
7038
  return { id: id$2, diagram: diagram2 };
7038
7039
  };
7039
7040
  const plugin$2 = {
@@ -7047,7 +7048,7 @@ const detector$1 = (txt) => {
7047
7048
  return txt.match(/^\s*timeline/) !== null;
7048
7049
  };
7049
7050
  const loader$1 = async () => {
7050
- const { diagram: diagram2 } = await import("./timeline-definition-4cdb07ca.js");
7051
+ const { diagram: diagram2 } = await import("./timeline-definition-5ed366f4.js");
7051
7052
  return { id: id$1, diagram: diagram2 };
7052
7053
  };
7053
7054
  const plugin$1 = {
@@ -7061,7 +7062,7 @@ const detector = (txt) => {
7061
7062
  return txt.match(/^\s*mindmap/) !== null;
7062
7063
  };
7063
7064
  const loader = async () => {
7064
- const { diagram: diagram2 } = await import("./mindmap-definition-7c7f5519.js");
7065
+ const { diagram: diagram2 } = await import("./mindmap-definition-4fc2557c.js");
7065
7066
  return { id, diagram: diagram2 };
7066
7067
  };
7067
7068
  const plugin = {
@@ -7748,6 +7749,7 @@ export {
7748
7749
  commonDb$1 as I,
7749
7750
  parseDirective$1 as J,
7750
7751
  mermaid as K,
7752
+ ZERO_WIDTH_SPACE as Z,
7751
7753
  getAccDescription as a,
7752
7754
  setAccDescription as b,
7753
7755
  getConfig$1 as c,
@@ -1,5 +1,5 @@
1
1
  import "ts-dedent";
2
- import { K } from "./mermaid-ddfd1cde.js";
2
+ import { K } from "./mermaid-b0ad2de1.js";
3
3
  import "dayjs";
4
4
  import "@braintree/sanitize-url";
5
5
  import "d3";
@@ -1,4 +1,4 @@
1
- import { aO as f } from "./mermaid-08b2ff5f.js";
1
+ import { aP as f } from "./mermaid-8ea29a40.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { aO } from "./mermaid-c66525a4.js";
1
+ import { aP } from "./mermaid-34beccd0.js";
2
2
  export {
3
- aO as default
3
+ aP as default
4
4
  };
package/dist/mermaid.js CHANGED
@@ -13552,6 +13552,7 @@
13552
13552
  return memoized;
13553
13553
  }
13554
13554
  memoize.Cache = MapCache;
13555
+ const ZERO_WIDTH_SPACE = "​";
13555
13556
  const d3CurveTypes = {
13556
13557
  curveBasis,
13557
13558
  curveBasisClosed,
@@ -13974,7 +13975,7 @@
13974
13975
  const dim = { width: 0, height: 0, lineHeight: 0 };
13975
13976
  for (const line2 of lines) {
13976
13977
  const textObj = getTextObj$3();
13977
- textObj.text = line2;
13978
+ textObj.text = line2 || ZERO_WIDTH_SPACE;
13978
13979
  const textElem = drawSimpleText(g, textObj).style("font-size", _fontSizePx).style("font-weight", fontWeight).style("font-family", fontFamily2);
13979
13980
  const bBox = (textElem._groups || textElem)[0][0].getBBox();
13980
13981
  if (bBox.width === 0 && bBox.height === 0) {
@@ -14441,7 +14442,7 @@
14441
14442
  }
14442
14443
  return strlen(children2 = serialize(element2.children, callback)) ? element2.return = element2.value + "{" + children2 + "}" : "";
14443
14444
  }
14444
- const version$1 = "10.2.2";
14445
+ const version$1 = "10.2.3";
14445
14446
  const id$i = "c4";
14446
14447
  const detector$i = (txt) => {
14447
14448
  return txt.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/) !== null;
@@ -29949,31 +29950,52 @@ ${config2.themeCSS}`;
29949
29950
  function createTspan(textElement, lineIndex, lineHeight) {
29950
29951
  return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em");
29951
29952
  }
29953
+ function computeWidthOfText(parentNode, lineHeight, text2) {
29954
+ const testElement = parentNode.append("text");
29955
+ const testSpan = createTspan(testElement, 1, lineHeight);
29956
+ updateTextContentAndStyles(testSpan, [{ content: text2, type: "normal" }]);
29957
+ const textLength = testSpan.node().getComputedTextLength();
29958
+ testElement.remove();
29959
+ return textLength;
29960
+ }
29952
29961
  function createFormattedText(width2, g, structuredText, addBackground = false) {
29953
29962
  const lineHeight = 1.1;
29954
29963
  const labelGroup = g.append("g");
29955
29964
  let bkg = labelGroup.insert("rect").attr("class", "background");
29956
29965
  const textElement = labelGroup.append("text").attr("y", "-10.1");
29957
- let lineIndex = -1;
29966
+ let lineIndex = 0;
29958
29967
  structuredText.forEach((line2) => {
29959
- lineIndex++;
29960
- let tspan = createTspan(textElement, lineIndex, lineHeight);
29961
- let words = [...line2].reverse();
29962
- let currentWord;
29963
- let wrappedLine = [];
29964
- while (words.length) {
29965
- currentWord = words.pop();
29966
- wrappedLine.push(currentWord);
29967
- updateTextContentAndStyles(tspan, wrappedLine);
29968
- if (tspan.node().getComputedTextLength() > width2) {
29969
- wrappedLine.pop();
29970
- words.push(currentWord);
29971
- updateTextContentAndStyles(tspan, wrappedLine);
29972
- wrappedLine = [];
29973
- lineIndex++;
29974
- tspan = createTspan(textElement, lineIndex, lineHeight);
29968
+ let fullStr = line2.map((data) => data.content).join(" ");
29969
+ let tempStr = "";
29970
+ let linesUnderWidth = [];
29971
+ let prevIndex = 0;
29972
+ if (computeWidthOfText(labelGroup, lineHeight, fullStr) <= width2) {
29973
+ linesUnderWidth.push(fullStr);
29974
+ } else {
29975
+ for (let i2 = 0; i2 <= fullStr.length; i2++) {
29976
+ tempStr = fullStr.slice(prevIndex, i2);
29977
+ log$1.info(tempStr, prevIndex, i2);
29978
+ if (computeWidthOfText(labelGroup, lineHeight, tempStr) > width2) {
29979
+ const subStr = fullStr.slice(prevIndex, i2);
29980
+ const lastSpaceIndex = subStr.lastIndexOf(" ");
29981
+ if (lastSpaceIndex > -1) {
29982
+ i2 = prevIndex + lastSpaceIndex + 1;
29983
+ }
29984
+ linesUnderWidth.push(fullStr.slice(prevIndex, i2).trim());
29985
+ prevIndex = i2;
29986
+ tempStr = null;
29987
+ }
29988
+ }
29989
+ if (tempStr != null) {
29990
+ linesUnderWidth.push(tempStr);
29975
29991
  }
29976
29992
  }
29993
+ const preparedLines = linesUnderWidth.map((w2) => ({ content: w2, type: line2.type }));
29994
+ for (const preparedLine of preparedLines) {
29995
+ let tspan = createTspan(textElement, lineIndex, lineHeight);
29996
+ updateTextContentAndStyles(tspan, [preparedLine]);
29997
+ lineIndex++;
29998
+ }
29977
29999
  });
29978
30000
  if (addBackground) {
29979
30001
  const bbox = textElement.node().getBBox();
@@ -39335,7 +39357,7 @@ ${config2.themeCSS}`;
39335
39357
  yy.setXAxisRightText($$[$0]);
39336
39358
  break;
39337
39359
  case 21:
39338
- $$[$0 - 1].text += $$[$0];
39360
+ $$[$0 - 1].text += " ⟶ ";
39339
39361
  yy.setXAxisLeftText($$[$0 - 1]);
39340
39362
  break;
39341
39363
  case 22:
@@ -39346,7 +39368,7 @@ ${config2.themeCSS}`;
39346
39368
  yy.setYAxisTopText($$[$0]);
39347
39369
  break;
39348
39370
  case 24:
39349
- $$[$0 - 1].text += $$[$0];
39371
+ $$[$0 - 1].text += " ⟶ ";
39350
39372
  yy.setYAxisBottomText($$[$0 - 1]);
39351
39373
  break;
39352
39374
  case 25:
@@ -43261,15 +43283,16 @@ ${config2.themeCSS}`;
43261
43283
  } else if (dy !== 0) {
43262
43284
  textElem.attr("dy", dy);
43263
43285
  }
43286
+ const text2 = line2 || ZERO_WIDTH_SPACE;
43264
43287
  if (textData.tspan) {
43265
43288
  const span = textElem.append("tspan");
43266
43289
  span.attr("x", textData.x);
43267
43290
  if (textData.fill !== void 0) {
43268
43291
  span.attr("fill", textData.fill);
43269
43292
  }
43270
- span.text(line2);
43293
+ span.text(text2);
43271
43294
  } else {
43272
- textElem.text(line2);
43295
+ textElem.text(text2);
43273
43296
  }
43274
43297
  if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) {
43275
43298
  textHeight += (textElem._groups || textElem)[0][0].getBBox().height;
@@ -139335,7 +139358,7 @@ g.stateGroup line {
139335
139358
  [dest.x + offset.x, dest.y + offset.y]
139336
139359
  ];
139337
139360
  const curve = line$1().curve(curveLinear);
139338
- const edgePath = edgesEl.insert("path").attr("d", curve(points)).attr("class", "path").attr("fill", "none");
139361
+ const edgePath = edgesEl.insert("path").attr("d", curve(points)).attr("class", "path " + edgeData.classes).attr("fill", "none");
139339
139362
  const edgeG = edgesEl.insert("g").attr("class", "edgeLabel");
139340
139363
  const edgeWithLabel = select(edgeG.node().appendChild(edge.labelEl));
139341
139364
  const box = edgeWithLabel.node().firstChild.getBoundingClientRect();