mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-13 12:29:42 +02:00
Compare commits
740 Commits
flowchart-
...
renovate/p
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cf08ba0ef8 | ||
![]() |
baf4093e8d | ||
![]() |
027d7b6368 | ||
![]() |
b80ea26a2b | ||
![]() |
f88986a87d | ||
![]() |
e16f0848ab | ||
![]() |
e7811886c3 | ||
![]() |
32eda8565c | ||
![]() |
3840451fda | ||
![]() |
cfe9238882 | ||
![]() |
c1f2d052be | ||
![]() |
bce40e180a | ||
![]() |
f47dec3680 | ||
![]() |
88dc4beade | ||
![]() |
e9232088c0 | ||
![]() |
e96614ab86 | ||
![]() |
73115cb416 | ||
![]() |
480438bd52 | ||
![]() |
34fc8bddc4 | ||
![]() |
4dd89e439f | ||
![]() |
150177c449 | ||
![]() |
bf58ed2b53 | ||
![]() |
827ced0014 | ||
![]() |
133d46bde2 | ||
![]() |
e1017266ac | ||
![]() |
404fdaf2ff | ||
![]() |
2e1d156d66 | ||
![]() |
e863ad1547 | ||
![]() |
e231b692fd | ||
![]() |
68c365f906 | ||
![]() |
494c7294cb | ||
![]() |
fb20ee99eb | ||
![]() |
1a22154a3a | ||
![]() |
2972bf25bf | ||
![]() |
6b1a7a9e1a | ||
![]() |
33bc4a0b4e | ||
![]() |
c6f25167a2 | ||
![]() |
a150f92fb0 | ||
![]() |
5d31ded7a0 | ||
![]() |
0ed31bfa2c | ||
![]() |
51b9185a6b | ||
![]() |
b219497847 | ||
![]() |
7e96c89be5 | ||
![]() |
16a8d0e794 | ||
![]() |
7bb9981d8a | ||
![]() |
ea3d38bf64 | ||
![]() |
8f628b85e5 | ||
![]() |
defc922acd | ||
![]() |
88ae8d1f2b | ||
![]() |
8c7c9ac38a | ||
![]() |
0e146d50f7 | ||
![]() |
454e1e3927 | ||
![]() |
4f9875fd4e | ||
![]() |
82800a2c84 | ||
![]() |
27e700debd | ||
![]() |
01e47333d5 | ||
![]() |
d47ba7c2d1 | ||
![]() |
b1c4eb3f5c | ||
![]() |
869709a75f | ||
![]() |
310fcd2292 | ||
![]() |
85e9ca2a0f | ||
![]() |
65d225cb2c | ||
![]() |
04b6fc1280 | ||
![]() |
21eddc3f23 | ||
![]() |
f46a151075 | ||
![]() |
b7e9d02b7c | ||
![]() |
0ef3130510 | ||
![]() |
862d40cc3a | ||
![]() |
4b63214a72 | ||
![]() |
4937ebc058 | ||
![]() |
00f5700320 | ||
![]() |
e32dc8513f | ||
![]() |
50127f3ffe | ||
![]() |
29bb0e3dca | ||
![]() |
1221de4c2d | ||
![]() |
c41e08cb7a | ||
![]() |
4760ed8893 | ||
![]() |
31ecf31c2e | ||
![]() |
b52766653c | ||
![]() |
6d9fad01a9 | ||
![]() |
8322a63598 | ||
![]() |
075e1b5e1f | ||
![]() |
3c9bd7be29 | ||
![]() |
6995248443 | ||
![]() |
93467a6fce | ||
![]() |
95d48e3497 | ||
![]() |
202172135d | ||
![]() |
b94ab243a8 | ||
![]() |
11c8848e1f | ||
![]() |
231fcc700f | ||
![]() |
8ba7520acc | ||
![]() |
e0a5a2489d | ||
![]() |
bd400a5130 | ||
![]() |
d35f84f337 | ||
![]() |
af3bbdc591 | ||
![]() |
8813cf2c94 | ||
![]() |
d145c0e910 | ||
![]() |
8dadb853a0 | ||
![]() |
29886b8dd4 | ||
![]() |
e438e035bc | ||
![]() |
2bc5b6d2fa | ||
![]() |
e0b45c2d2b | ||
![]() |
d4c76968e9 | ||
![]() |
a700e8bf97 | ||
![]() |
7091792694 | ||
![]() |
efd94b705d | ||
![]() |
2cfebef122 | ||
![]() |
9ec989e633 | ||
![]() |
61d9143acb | ||
![]() |
c88f74a6ee | ||
![]() |
6377d6f64d | ||
![]() |
1b0bc05fc2 | ||
![]() |
45edeb9307 | ||
![]() |
211974b2b7 | ||
![]() |
1f5ad3e315 | ||
![]() |
d7848e8a3d | ||
![]() |
c0e2d4a23b | ||
![]() |
89b9f0df70 | ||
![]() |
e9011567bd | ||
![]() |
7171237b96 | ||
![]() |
0429970d58 | ||
![]() |
ecad9cee6c | ||
![]() |
066883f4cd | ||
![]() |
1e8a9f76a9 | ||
![]() |
e42fdf1c54 | ||
![]() |
c75566ddc3 | ||
![]() |
7bdcf93412 | ||
![]() |
d86e46b705 | ||
![]() |
96778f7789 | ||
![]() |
d4c058bd56 | ||
![]() |
b638a0a9c1 | ||
![]() |
fd9aa36c77 | ||
![]() |
46a9f1b31e | ||
![]() |
83c6224cc0 | ||
![]() |
d8161b1923 | ||
![]() |
8223141af9 | ||
![]() |
99f98a6876 | ||
![]() |
ef28f548df | ||
![]() |
e448c53b53 | ||
![]() |
71e09bcaef | ||
![]() |
cad144734d | ||
![]() |
5e57f22e23 | ||
![]() |
fc2c32603d | ||
![]() |
8c7da5af56 | ||
![]() |
4b89af3aca | ||
![]() |
c534d3d364 | ||
![]() |
4db72f5357 | ||
![]() |
2aa8330279 | ||
![]() |
803e2e14be | ||
![]() |
685516a85e | ||
![]() |
880f7454a3 | ||
![]() |
7e9577dffd | ||
![]() |
cba659d097 | ||
![]() |
f7a0844a31 | ||
![]() |
2817383714 | ||
![]() |
1f46c9e9bb | ||
![]() |
ec7099dc27 | ||
![]() |
180dc7bdff | ||
![]() |
cc9581842d | ||
![]() |
e6ee145edf | ||
![]() |
d782e4bb17 | ||
![]() |
5cc264feb7 | ||
![]() |
690cc73259 | ||
![]() |
ba9ad9385b | ||
![]() |
b9ef683fb6 | ||
![]() |
6a6289f2aa | ||
![]() |
accb4c6369 | ||
![]() |
52be254ad3 | ||
![]() |
9c071a9064 | ||
![]() |
91d7229f1b | ||
![]() |
60feec465b | ||
![]() |
d1ae687d1e | ||
![]() |
7af6723ac0 | ||
![]() |
da90f6760b | ||
![]() |
91edfa40f7 | ||
![]() |
c8b00bb929 | ||
![]() |
d74013c642 | ||
![]() |
ce996346f8 | ||
![]() |
29edfa7f56 | ||
![]() |
14a4ab81c9 | ||
![]() |
13d72262d9 | ||
![]() |
62dee0bad4 | ||
![]() |
9e81e1146a | ||
![]() |
57eadbf6af | ||
![]() |
2260948b7b | ||
![]() |
186429ae32 | ||
![]() |
a906adce26 | ||
![]() |
657a9ef785 | ||
![]() |
4f24489d81 | ||
![]() |
227cef05b3 | ||
![]() |
a6d26ef6c3 | ||
![]() |
2a514fa69e | ||
![]() |
80c6faf4d5 | ||
![]() |
2b3f94eb7d | ||
![]() |
9f6ee53382 | ||
![]() |
3248bf3da4 | ||
![]() |
bf3ca9d1ef | ||
![]() |
dd36046e23 | ||
![]() |
1507435e15 | ||
![]() |
e7a7ff8a2a | ||
![]() |
68fc68c239 | ||
![]() |
e53c17a012 | ||
![]() |
bb2d6973ba | ||
![]() |
769b362005 | ||
![]() |
e4d3aa4610 | ||
![]() |
716548548a | ||
![]() |
aeaf626bb5 | ||
![]() |
9322771b5c | ||
![]() |
2fe3063bf5 | ||
![]() |
4e55a45b1b | ||
![]() |
4bece53a3c | ||
![]() |
3d319824a6 | ||
![]() |
aa5d443a46 | ||
![]() |
356da0b4d7 | ||
![]() |
22530a8bdf | ||
![]() |
e6574ef40c | ||
![]() |
c4eb526162 | ||
![]() |
68c01b76bf | ||
![]() |
4d62d59632 | ||
![]() |
5af489d8dd | ||
![]() |
28717e108d | ||
![]() |
297be4a868 | ||
![]() |
fb6ace73b5 | ||
![]() |
688d9b383d | ||
![]() |
096fbe933e | ||
![]() |
e539909e87 | ||
![]() |
074701e316 | ||
![]() |
e68424d748 | ||
![]() |
cfc76ef1cb | ||
![]() |
bf362673fc | ||
![]() |
d042b21b12 | ||
![]() |
677ff82d13 | ||
![]() |
4b31361506 | ||
![]() |
204a9a338f | ||
![]() |
981829a426 | ||
![]() |
327a5aa9fd | ||
![]() |
6a6a39ff33 | ||
![]() |
b296db9a33 | ||
![]() |
01ce84d8ee | ||
![]() |
f48e663d4c | ||
![]() |
a4aa2bd355 | ||
![]() |
20a18971ea | ||
![]() |
e1e36dfcb3 | ||
![]() |
b51b9d50c2 | ||
![]() |
165ffefad5 | ||
![]() |
9258b2933b | ||
![]() |
f5445b266e | ||
![]() |
7a1530d911 | ||
![]() |
848f69a75c | ||
![]() |
99dbeba407 | ||
![]() |
d525acc05b | ||
![]() |
b61780f735 | ||
![]() |
d93d9a521d | ||
![]() |
1d3681053b | ||
![]() |
93df13898f | ||
![]() |
e32e80ea7f | ||
![]() |
c99bce6bab | ||
![]() |
3256807d25 | ||
![]() |
0133f1c0c5 | ||
![]() |
12e01bdb5c | ||
![]() |
a776b4f0ab | ||
![]() |
8d79bc9b19 | ||
![]() |
ecf7ab4355 | ||
![]() |
c61a431e2d | ||
![]() |
526b35c602 | ||
![]() |
8090580c67 | ||
![]() |
9d685178d2 | ||
![]() |
074f18dfb8 | ||
![]() |
b451c66d7c | ||
![]() |
d7308b0f43 | ||
![]() |
1dd11705d9 | ||
![]() |
2f1860386a | ||
![]() |
17142ef8d7 | ||
![]() |
f0bca7da55 | ||
![]() |
6fcdf5bfcc | ||
![]() |
e2ce0450c1 | ||
![]() |
29de40478f | ||
![]() |
c95c64139d | ||
![]() |
4ab98c2ec7 | ||
![]() |
aeb51e56e2 | ||
![]() |
a7f12f1baa | ||
![]() |
2a8653de2b | ||
![]() |
a92c3bb251 | ||
![]() |
3677abe9e5 | ||
![]() |
ddcd8a5e73 | ||
![]() |
e464d080ef | ||
![]() |
1a9b94ca2d | ||
![]() |
95847ad236 | ||
![]() |
e0152fb873 | ||
![]() |
e4b33a1d99 | ||
![]() |
2298b96d8e | ||
![]() |
5db83365b6 | ||
![]() |
e27a9da61d | ||
![]() |
03cf10003f | ||
![]() |
8e31fdb611 | ||
![]() |
5dd748148f | ||
![]() |
895f9d43ff | ||
![]() |
4915545429 | ||
![]() |
fb890a2be8 | ||
![]() |
5986189a52 | ||
![]() |
1988dfc956 | ||
![]() |
e48b0ba61d | ||
![]() |
1a4b8662cf | ||
![]() |
6083463c8e | ||
![]() |
1a14e331ea | ||
![]() |
ebb6680eba | ||
![]() |
6d1d46f88a | ||
![]() |
435790f931 | ||
![]() |
ffe9c1090e | ||
![]() |
a476e99d4c | ||
![]() |
0cc0b63e52 | ||
![]() |
694844050a | ||
![]() |
1be1620000 | ||
![]() |
c36cd05c45 | ||
![]() |
341a81a113 | ||
![]() |
8a62b4cace | ||
![]() |
b7a591b8d3 | ||
![]() |
8bb29fc879 | ||
![]() |
e073c80019 | ||
![]() |
01aaef39b4 | ||
![]() |
3d640fc620 | ||
![]() |
334fe87bc6 | ||
![]() |
283e7810d2 | ||
![]() |
237d01d510 | ||
![]() |
724197c910 | ||
![]() |
6180c5f2ff | ||
![]() |
a9f7a94ae3 | ||
![]() |
3ffe9618ae | ||
![]() |
da539c1fa1 | ||
![]() |
5e8aa2dccf | ||
![]() |
ac04172cf8 | ||
![]() |
cf5b4b89a8 | ||
![]() |
1c269e0432 | ||
![]() |
ccafc20917 | ||
![]() |
999b836508 | ||
![]() |
326e4e3693 | ||
![]() |
9c92da487f | ||
![]() |
10752f1357 | ||
![]() |
1a80854242 | ||
![]() |
fc9c600a31 | ||
![]() |
da8ce0b93e | ||
![]() |
00a79353fc | ||
![]() |
1ceeca1ef1 | ||
![]() |
94890390ef | ||
![]() |
d5cb4eaa59 | ||
![]() |
adfeb093cb | ||
![]() |
425fb7ee33 | ||
![]() |
366d217928 | ||
![]() |
b94f1336ab | ||
![]() |
020c6d66e0 | ||
![]() |
cd6f8e5a24 | ||
![]() |
cfc2551bdc | ||
![]() |
000308c8f5 | ||
![]() |
6039a8b930 | ||
![]() |
cd282f2245 | ||
![]() |
a27d90fe9c | ||
![]() |
64bf34b9ab | ||
![]() |
bcd3e33243 | ||
![]() |
9faf2f9fb2 | ||
![]() |
f683b03645 | ||
![]() |
9cef40d164 | ||
![]() |
b2754bc553 | ||
![]() |
04612e078a | ||
![]() |
af585bdcc7 | ||
![]() |
37bfa2aa75 | ||
![]() |
54640ce476 | ||
![]() |
47b4c56b2b | ||
![]() |
6b1b0bf151 | ||
![]() |
7ba332ad4a | ||
![]() |
b65a73f432 | ||
![]() |
412d2a09d3 | ||
![]() |
7886fed8b2 | ||
![]() |
af3d5b6528 | ||
![]() |
404286a90d | ||
![]() |
827a9af790 | ||
![]() |
a14cd0e2a1 | ||
![]() |
0823e08a54 | ||
![]() |
95733b6295 | ||
![]() |
5cafe241d0 | ||
![]() |
c847817a54 | ||
![]() |
8b86d617e7 | ||
![]() |
3ab0961bdc | ||
![]() |
cc2112c7aa | ||
![]() |
0892870b5d | ||
![]() |
500f90a105 | ||
![]() |
14983158a2 | ||
![]() |
767754f4fb | ||
![]() |
cff59c58b4 | ||
![]() |
3fea9e8759 | ||
![]() |
e5ea2ed0b1 | ||
![]() |
34e7f9704b | ||
![]() |
ac976245ad | ||
![]() |
1176d30668 | ||
![]() |
5b241bbb97 | ||
![]() |
7e5e47843b | ||
![]() |
6728852b7a | ||
![]() |
15e7c890ed | ||
![]() |
9e2cd1a926 | ||
![]() |
abf2227faf | ||
![]() |
7db942b0e1 | ||
![]() |
70041c806f | ||
![]() |
77e2703f72 | ||
![]() |
771801b366 | ||
![]() |
a9a0a9b2de | ||
![]() |
1e5e835c41 | ||
![]() |
1f3f8da0f7 | ||
![]() |
b11f40e8ce | ||
![]() |
1fe045e638 | ||
![]() |
1c750ffc70 | ||
![]() |
b0ec93f29c | ||
![]() |
6b071c135a | ||
![]() |
42a3c3487f | ||
![]() |
d7b8ed2c5a | ||
![]() |
96c21c7e54 | ||
![]() |
e95e4d155a | ||
![]() |
688170558c | ||
![]() |
832f012e10 | ||
![]() |
2e2e8c4152 | ||
![]() |
6ff6e08c4b | ||
![]() |
d7f1f12549 | ||
![]() |
6e56869566 | ||
![]() |
d3e2be35be | ||
![]() |
852cb35f0a | ||
![]() |
260a045da0 | ||
![]() |
a28965064d | ||
![]() |
355eeeb9cc | ||
![]() |
5449d6a447 | ||
![]() |
34e91f8b65 | ||
![]() |
627ee1f34d | ||
![]() |
28840ebd84 | ||
![]() |
4145879003 | ||
![]() |
0451e343ef | ||
![]() |
a2dbc8e4b3 | ||
![]() |
e097b480d5 | ||
![]() |
f76e27db70 | ||
![]() |
3e3ae08930 | ||
![]() |
966c112eb1 | ||
![]() |
55527e70c2 | ||
![]() |
447d1cf988 | ||
![]() |
003d1c7a70 | ||
![]() |
daf8d8d3be | ||
![]() |
d7a55b422b | ||
![]() |
12e3d31437 | ||
![]() |
ad024b01d6 | ||
![]() |
c12aea588c | ||
![]() |
9dfbf1166d | ||
![]() |
98bf9b4cb4 | ||
![]() |
e9ce8cf4da | ||
![]() |
d90634bf2b | ||
![]() |
90707e8062 | ||
![]() |
7e23f984e6 | ||
![]() |
b3a12237c0 | ||
![]() |
aea16eaf7e | ||
![]() |
bb7cd70034 | ||
![]() |
fad6676d18 | ||
![]() |
637680d4d9 | ||
![]() |
35a92efcdc | ||
![]() |
5f6f5110fd | ||
![]() |
af47269342 | ||
![]() |
d3c0893937 | ||
![]() |
75ef9bc681 | ||
![]() |
45edc91591 | ||
![]() |
f4edd19371 | ||
![]() |
b611a13e04 | ||
![]() |
7a38eb715d | ||
![]() |
2715ddb338 | ||
![]() |
ca2eca58c9 | ||
![]() |
fce7cabb71 | ||
![]() |
38e6dc497a | ||
![]() |
5f0c53c8a7 | ||
![]() |
f9da4433ff | ||
![]() |
fc07f0d8ab | ||
![]() |
b4fae2d096 | ||
![]() |
ce7a487dfc | ||
![]() |
6dd9af0dd4 | ||
![]() |
3151241559 | ||
![]() |
8c0d12027d | ||
![]() |
afeb761296 | ||
![]() |
3abcfbb8d2 | ||
![]() |
ee82694645 | ||
![]() |
dda9c9b46e | ||
![]() |
cdd1a70b67 | ||
![]() |
12c94a177b | ||
![]() |
d8bd4dea93 | ||
![]() |
6deb476182 | ||
![]() |
ed297ee235 | ||
![]() |
03c1201fcb | ||
![]() |
3ca317c5a0 | ||
![]() |
4d83263388 | ||
![]() |
254e5cbd51 | ||
![]() |
a58dd3c6ce | ||
![]() |
10b7bb568f | ||
![]() |
1aa2870224 | ||
![]() |
8fbcbb6dc9 | ||
![]() |
3e545d7925 | ||
![]() |
75d2a259ed | ||
![]() |
746280b3e2 | ||
![]() |
fa4e30bb15 | ||
![]() |
950b107dd4 | ||
![]() |
35b84761a9 | ||
![]() |
0da2922ee7 | ||
![]() |
85eba01663 | ||
![]() |
ea72740d1f | ||
![]() |
79ba50216a | ||
![]() |
71b04f93b0 | ||
![]() |
27185f62e4 | ||
![]() |
9655d07adf | ||
![]() |
2b3cb6a362 | ||
![]() |
427dc38857 | ||
![]() |
ec21042c53 | ||
![]() |
89ac2932c4 | ||
![]() |
e828609749 | ||
![]() |
91f141f772 | ||
![]() |
c77b968f1e | ||
![]() |
ba13981905 | ||
![]() |
a7a94b95e1 | ||
![]() |
31f141c61a | ||
![]() |
fb017bebfd | ||
![]() |
648698a43a | ||
![]() |
a5e4729c76 | ||
![]() |
c884def5fc | ||
![]() |
4a86b68e01 | ||
![]() |
592c5bb880 | ||
![]() |
da0c6c6c32 | ||
![]() |
012530e98e | ||
![]() |
a4a27611dd | ||
![]() |
5055ade44e | ||
![]() |
b61bec8faf | ||
![]() |
1414380181 | ||
![]() |
6686ee9253 | ||
![]() |
7f109c7b94 | ||
![]() |
b9c3375be3 | ||
![]() |
4254bdd473 | ||
![]() |
4012cbf013 | ||
![]() |
939da082b2 | ||
![]() |
d9396eedd6 | ||
![]() |
76d073b027 | ||
![]() |
5f9601b6a8 | ||
![]() |
378f8ece0c | ||
![]() |
8693be56ee | ||
![]() |
148a42a31a | ||
![]() |
8980ca4526 | ||
![]() |
814b68b4a9 | ||
![]() |
bfa0eefa32 | ||
![]() |
caa04aad8b | ||
![]() |
cc476d59d1 | ||
![]() |
3dc06ea9bd | ||
![]() |
c311c1ba5d | ||
![]() |
11a86d9c06 | ||
![]() |
037bec189c | ||
![]() |
9b164dd185 | ||
![]() |
4ee124bf91 | ||
![]() |
e70be4f155 | ||
![]() |
6621f6ddb2 | ||
![]() |
579c22cf5d | ||
![]() |
33e08daf17 | ||
![]() |
24257de8a6 | ||
![]() |
42ac1848dd | ||
![]() |
3920ad442d | ||
![]() |
e7970c66ee | ||
![]() |
c7b96be683 | ||
![]() |
0623a87d70 | ||
![]() |
c5f89eaa9a | ||
![]() |
1fbe550285 | ||
![]() |
b3724f04c4 | ||
![]() |
2f58a0e188 | ||
![]() |
6f1e0e4d17 | ||
![]() |
7dd8ddc3eb | ||
![]() |
222d7170f7 | ||
![]() |
3137cff4a5 | ||
![]() |
b45b1d7795 | ||
![]() |
e1030b186e | ||
![]() |
334c8c2962 | ||
![]() |
bdaa3f693a | ||
![]() |
be13fb0391 | ||
![]() |
c120901744 | ||
![]() |
1f07a781e4 | ||
![]() |
3132387ede | ||
![]() |
f41b4c96f9 | ||
![]() |
26bd456c01 | ||
![]() |
8ef7040a8d | ||
![]() |
badb019d38 | ||
![]() |
e7ec8ed527 | ||
![]() |
d85a393bcd | ||
![]() |
7c1e655675 | ||
![]() |
df2ccaa14b | ||
![]() |
797ba43d6e | ||
![]() |
53d27b771d | ||
![]() |
d628a971ef | ||
![]() |
2c0931da46 | ||
![]() |
8049b6aef8 | ||
![]() |
84802118be | ||
![]() |
e2ef425245 | ||
![]() |
da98732961 | ||
![]() |
efa11a7325 | ||
![]() |
8224a81ab6 | ||
![]() |
e5f6ea0b13 | ||
![]() |
98442294ed | ||
![]() |
a3d164fde8 | ||
![]() |
9dc987b28b | ||
![]() |
72c0d9df26 | ||
![]() |
cfbce54638 | ||
![]() |
6979aa1013 | ||
![]() |
9562a769db | ||
![]() |
5cfda33d04 | ||
![]() |
ea60525988 | ||
![]() |
9da6fb39ae | ||
![]() |
83b9a17277 | ||
![]() |
f0445b74d1 | ||
![]() |
ba52eef257 | ||
![]() |
c13ce2a5c0 | ||
![]() |
d2463f41b5 | ||
![]() |
e682172823 | ||
![]() |
85c5b9b4c0 | ||
![]() |
eadb343292 | ||
![]() |
e7208622f7 | ||
![]() |
fbae611406 | ||
![]() |
34027bc589 | ||
![]() |
f2eef37599 | ||
![]() |
1e68ed9cc1 | ||
![]() |
1337c60784 | ||
![]() |
a12d1f731a | ||
![]() |
b6ba9b79df | ||
![]() |
ce227b5519 | ||
![]() |
c4de3cdc57 | ||
![]() |
ef449a601b | ||
![]() |
8e84a1a8af | ||
![]() |
a3552e7936 | ||
![]() |
646cdf0d32 | ||
![]() |
99048bfa01 | ||
![]() |
ca80f719ea | ||
![]() |
0cabc6e8ed | ||
![]() |
5fe0f53179 | ||
![]() |
e2e3cd2bbd | ||
![]() |
ffb9016d65 | ||
![]() |
3c03f289b4 | ||
![]() |
c6035936b6 | ||
![]() |
f23a26e528 | ||
![]() |
48e6e60753 | ||
![]() |
dc3ed65c18 | ||
![]() |
43092e6e11 | ||
![]() |
878e77acab | ||
![]() |
2372cd7b21 | ||
![]() |
51f0cb2892 | ||
![]() |
14e3d77c75 | ||
![]() |
875fef691b | ||
![]() |
63827db60d | ||
![]() |
41108358f6 | ||
![]() |
f970fc8bea | ||
![]() |
1f44143936 | ||
![]() |
db461a4c6c | ||
![]() |
fe33d5fb53 | ||
![]() |
64c4d4197b | ||
![]() |
ed7bab76f2 | ||
![]() |
f338802642 | ||
![]() |
445595f942 | ||
![]() |
66ce617bea | ||
![]() |
3e07a5acff | ||
![]() |
df1e739194 | ||
![]() |
2def5a0768 | ||
![]() |
2746bccef3 | ||
![]() |
f0c3dfe3b3 | ||
![]() |
680d65114c | ||
![]() |
4f8f929340 | ||
![]() |
3629e8e480 | ||
![]() |
ff48c2e1da | ||
![]() |
1bd13b50f1 | ||
![]() |
e0a075ecca | ||
![]() |
40eb0cc240 | ||
![]() |
d702a7164e | ||
![]() |
8a0bc64282 | ||
![]() |
ac0283ff97 | ||
![]() |
84faddc9e5 | ||
![]() |
5e3f21f572 | ||
![]() |
05c74ed9ce | ||
![]() |
b106346119 | ||
![]() |
c09232c44d | ||
![]() |
714496af6d | ||
![]() |
5d61a30237 | ||
![]() |
02ff3c1216 | ||
![]() |
954f6cc8fc | ||
![]() |
cee43a45f6 | ||
![]() |
19884294bc | ||
![]() |
e6b63fd70a | ||
![]() |
8a84ede164 | ||
![]() |
d79b7b2d97 | ||
![]() |
844f879f63 | ||
![]() |
cf789d2c91 | ||
![]() |
4936ef5c30 | ||
![]() |
f006718e56 | ||
![]() |
d720776918 | ||
![]() |
f43398dd44 | ||
![]() |
43ad451940 | ||
![]() |
94c099caa1 | ||
![]() |
8005262d76 | ||
![]() |
a3cf9de01b | ||
![]() |
9a90aca8e6 | ||
![]() |
963b1e3ec5 | ||
![]() |
208d29e3d6 | ||
![]() |
5c865e7b71 | ||
![]() |
7ce9dbcece | ||
![]() |
ff786b4ef8 | ||
![]() |
b81b665137 | ||
![]() |
3e6f680df2 | ||
![]() |
2e5d955e77 | ||
![]() |
7733faf6c4 | ||
![]() |
b053a88993 | ||
![]() |
7c77c46ede | ||
![]() |
da6937f474 | ||
![]() |
cbb496da79 | ||
![]() |
43e66a6089 | ||
![]() |
5acbd7e762 | ||
![]() |
febae345fc | ||
![]() |
28bdbbca1a | ||
![]() |
4b896fa22e | ||
![]() |
a25ee49edd | ||
![]() |
695b5b2fb2 | ||
![]() |
9b77af540b | ||
![]() |
7829138fb2 | ||
![]() |
7e7a4fc665 | ||
![]() |
34e6112fea | ||
![]() |
0c759d0075 | ||
![]() |
5b7c1aad9e | ||
![]() |
865c453547 | ||
![]() |
c0b14021b7 | ||
![]() |
a9be1a4146 | ||
![]() |
617c7393bf | ||
![]() |
ce68da3fee | ||
![]() |
fa4d4806fa | ||
![]() |
c8f01b14a8 | ||
![]() |
91931531a6 | ||
![]() |
50e4641666 | ||
![]() |
1bed6432ac | ||
![]() |
6cc192680a | ||
![]() |
3dd6107e76 | ||
![]() |
11f7f426cb | ||
![]() |
1e3ea13323 | ||
![]() |
4c8c48cde9 | ||
![]() |
c8e50276e8 | ||
![]() |
1e6419a63f |
@@ -33,4 +33,14 @@ export const packageOptions = {
|
|||||||
packageName: 'mermaid-layout-elk',
|
packageName: 'mermaid-layout-elk',
|
||||||
file: 'layouts.ts',
|
file: 'layouts.ts',
|
||||||
},
|
},
|
||||||
|
'mermaid-layout-tidy-tree': {
|
||||||
|
name: 'mermaid-layout-tidy-tree',
|
||||||
|
packageName: 'mermaid-layout-tidy-tree',
|
||||||
|
file: 'index.ts',
|
||||||
|
},
|
||||||
|
examples: {
|
||||||
|
name: 'mermaid-examples',
|
||||||
|
packageName: 'examples',
|
||||||
|
file: 'index.ts',
|
||||||
|
},
|
||||||
} as const satisfies Record<string, PackageOptions>;
|
} as const satisfies Record<string, PackageOptions>;
|
||||||
|
@@ -10,13 +10,16 @@ const buildType = (packageName: string) => {
|
|||||||
console.log(out.toString());
|
console.log(out.toString());
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
|
||||||
if (e.stdout.length > 0) {
|
if (e.stdout.length > 0) {
|
||||||
console.error(e.stdout.toString());
|
console.error(e.stdout.toString());
|
||||||
}
|
}
|
||||||
if (e.stderr.length > 0) {
|
if (e.stderr.length > 0) {
|
||||||
console.error(e.stderr.toString());
|
console.error(e.stderr.toString());
|
||||||
}
|
}
|
||||||
|
// Exit the build process if we are in CI
|
||||||
|
if (process.env.CI) {
|
||||||
|
throw new Error(`Failed to build types for ${packageName}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
feat: Add Vertical Line To Gantt Plot At Specified Time
|
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'@mermaid-js/mermaid-zenuml': major
|
|
||||||
---
|
|
||||||
|
|
||||||
Upgraded the dependency @zenuml/core
|
|
5
.changeset/clean-wolves-turn.md
Normal file
5
.changeset/clean-wolves-turn.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Render newlines as spaces in class diagrams
|
5
.changeset/crazy-loops-matter.md
Normal file
5
.changeset/crazy-loops-matter.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Handle arrows correctly when auto number is enabled
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Fix stroke styles for ER diagram to correctly apply path and row-specific styles
|
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
chore: Convert StateDB into TypeScript
|
|
5
.changeset/four-eyes-wish.md
Normal file
5
.changeset/four-eyes-wish.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Ensure edge label color is applied when using classDef with edge IDs
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
fix: Remove incorrect `style="undefined;"` attributes in some Mermaid diagrams
|
|
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
'@mermaid-js/mermaid-zenuml': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
chore: bump minimum ZenUML version to 3.23.28
|
|
||||||
|
|
||||||
commit: 9d06d8f31e7f12af9e9e092214f907f2dc93ad75
|
|
5
.changeset/hungry-baths-glow.md
Normal file
5
.changeset/hungry-baths-glow.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
feat: Added support for new participant types (`actor`, `boundary`, `control`, `entity`, `database`, `collections`, `queue`) in `sequenceDiagram`.
|
7
.changeset/hungry-guests-drive.md
Normal file
7
.changeset/hungry-guests-drive.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
'mermaid': minor
|
||||||
|
'@mermaid-js/layout-tidy-tree': minor
|
||||||
|
'@mermaid-js/layout-elk': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
feat: Update mindmap rendering to support multiple layouts, improved edge intersections, and new shapes
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
feat: Add support for styling Journey Diagram title (color, font-family, and font-size)
|
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
FontAwesome icons can now be embedded as SVGs in flowcharts if they are registered via `mermaid.registerIconPacks`.
|
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
Added support for the click directive in stateDiagram syntax
|
|
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': minor
|
|
||||||
'@mermaid-js/parser': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
feat: Add shorter `+<count>: Label` syntax in packet diagram
|
|
9
.changeset/revert-marked-dependency.md
Normal file
9
.changeset/revert-marked-dependency.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
chore: revert marked dependency from ^15.0.7 to ^16.0.0
|
||||||
|
|
||||||
|
- Reverted marked package version to ^16.0.0 for better compatibility
|
||||||
|
- This is a dependency update that maintains API compatibility
|
||||||
|
- All tests pass with the updated version
|
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
'@mermaid-js/parser': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Refactor grammar so that title don't break Architecture Diagrams
|
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': major
|
|
||||||
---
|
|
||||||
|
|
||||||
fix: allow sequence diagram arrows with a trailing colon but no message
|
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
feat: Dynamically Render Data Labels Within Bar Charts
|
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
fix: allow colons in events
|
|
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
'@mermaid-js/mermaid-zenuml': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
fix(zenuml): limit `peerDependencies` to Mermaid v10 and v11
|
|
||||||
|
|
||||||
commit: 0ad44c12feead9d20c6a870a49327ada58d6e657
|
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
fix: Fix incomplete string escaping in URL manipulation logic when `arrowMarkerAbsolute: true` by ensuring all unsafe characters are escaped.
|
|
@@ -47,6 +47,7 @@ edgesep
|
|||||||
EMPTYSTR
|
EMPTYSTR
|
||||||
enddate
|
enddate
|
||||||
ERDIAGRAM
|
ERDIAGRAM
|
||||||
|
eslint
|
||||||
flatmap
|
flatmap
|
||||||
forwardable
|
forwardable
|
||||||
frontmatter
|
frontmatter
|
||||||
@@ -87,6 +88,7 @@ NODIR
|
|||||||
NSTR
|
NSTR
|
||||||
outdir
|
outdir
|
||||||
Qcontrolx
|
Qcontrolx
|
||||||
|
QSTR
|
||||||
reinit
|
reinit
|
||||||
rels
|
rels
|
||||||
reqs
|
reqs
|
||||||
|
@@ -2,8 +2,11 @@
|
|||||||
Ashish Jain
|
Ashish Jain
|
||||||
cpettitt
|
cpettitt
|
||||||
Dong Cai
|
Dong Cai
|
||||||
|
fourcube
|
||||||
|
knsv
|
||||||
|
Knut Sveidqvist
|
||||||
Nikolay Rozhkov
|
Nikolay Rozhkov
|
||||||
Peng Xiao
|
Peng Xiao
|
||||||
Per Brolin
|
Per Brolin
|
||||||
|
Sidharth Vinod
|
||||||
subhash-halder
|
subhash-halder
|
||||||
Vinod Sidharth
|
|
||||||
|
@@ -5,6 +5,7 @@ bmatrix
|
|||||||
braintree
|
braintree
|
||||||
catmull
|
catmull
|
||||||
compositTitleSize
|
compositTitleSize
|
||||||
|
cose
|
||||||
curv
|
curv
|
||||||
doublecircle
|
doublecircle
|
||||||
elems
|
elems
|
||||||
@@ -13,11 +14,10 @@ gitgraph
|
|||||||
gzipped
|
gzipped
|
||||||
handDrawn
|
handDrawn
|
||||||
kanban
|
kanban
|
||||||
knsv
|
|
||||||
Knut
|
|
||||||
marginx
|
marginx
|
||||||
marginy
|
marginy
|
||||||
Markdownish
|
Markdownish
|
||||||
|
mermaidchart
|
||||||
mermaidjs
|
mermaidjs
|
||||||
mindmap
|
mindmap
|
||||||
mindmaps
|
mindmaps
|
||||||
@@ -35,7 +35,6 @@ sandboxed
|
|||||||
siebling
|
siebling
|
||||||
statediagram
|
statediagram
|
||||||
substate
|
substate
|
||||||
Sveidqvist
|
|
||||||
unfixable
|
unfixable
|
||||||
Viewbox
|
Viewbox
|
||||||
viewports
|
viewports
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
BRANDES
|
BRANDES
|
||||||
|
Buzan
|
||||||
circo
|
circo
|
||||||
handDrawn
|
handDrawn
|
||||||
KOEPF
|
KOEPF
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { build } from 'esbuild';
|
import { build } from 'esbuild';
|
||||||
import { mkdir, readFile, rename, writeFile } from 'node:fs/promises';
|
import { cp, mkdir, readFile, rename, writeFile } from 'node:fs/promises';
|
||||||
import { packageOptions } from '../.build/common.js';
|
import { packageOptions } from '../.build/common.js';
|
||||||
import { generateLangium } from '../.build/generateLangium.js';
|
import { generateLangium } from '../.build/generateLangium.js';
|
||||||
import type { MermaidBuildOptions } from './util.js';
|
import type { MermaidBuildOptions } from './util.js';
|
||||||
@@ -90,6 +90,7 @@ const buildTinyMermaid = async () => {
|
|||||||
tinyPkg.version = mermaidPkg.version;
|
tinyPkg.version = mermaidPkg.version;
|
||||||
|
|
||||||
await writeFile('./packages/tiny/package.json', JSON.stringify(tinyPkg, null, 2) + '\n');
|
await writeFile('./packages/tiny/package.json', JSON.stringify(tinyPkg, null, 2) + '\n');
|
||||||
|
await cp('./packages/mermaid/CHANGELOG.md', './packages/tiny/CHANGELOG.md');
|
||||||
};
|
};
|
||||||
|
|
||||||
const main = async () => {
|
const main = async () => {
|
||||||
|
8
.github/lychee.toml
vendored
8
.github/lychee.toml
vendored
@@ -46,13 +46,21 @@ exclude = [
|
|||||||
# Drupal 403
|
# Drupal 403
|
||||||
"https://(www.)?drupal.org",
|
"https://(www.)?drupal.org",
|
||||||
|
|
||||||
|
# Phbpp 403
|
||||||
|
"https://(www.)?phpbb.com",
|
||||||
|
|
||||||
# Swimm returns 404, even though the link is valid
|
# Swimm returns 404, even though the link is valid
|
||||||
"https://docs.swimm.io",
|
"https://docs.swimm.io",
|
||||||
|
|
||||||
|
# Certificate Error
|
||||||
|
"https://noteshub.app",
|
||||||
|
|
||||||
# Timeout
|
# Timeout
|
||||||
"https://huehive.co",
|
"https://huehive.co",
|
||||||
"https://foswiki.org",
|
"https://foswiki.org",
|
||||||
"https://www.gnu.org",
|
"https://www.gnu.org",
|
||||||
|
"https://redmine.org",
|
||||||
|
"https://mermaid-preview.com"
|
||||||
]
|
]
|
||||||
|
|
||||||
# Exclude all private IPs from checking.
|
# Exclude all private IPs from checking.
|
||||||
|
2
.github/workflows/autofix.yml
vendored
2
.github/workflows/autofix.yml
vendored
@@ -42,4 +42,4 @@ jobs:
|
|||||||
working-directory: ./packages/mermaid
|
working-directory: ./packages/mermaid
|
||||||
run: pnpm run docs:build
|
run: pnpm run docs:build
|
||||||
|
|
||||||
- uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef # main
|
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 # main
|
||||||
|
6
.github/workflows/codeql.yml
vendored
6
.github/workflows/codeql.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
|
uses: github/codeql-action/init@5378192d256ef1302a6980fffe5ca04426d43091 # v3.28.21
|
||||||
with:
|
with:
|
||||||
config-file: ./.github/codeql/codeql-config.yml
|
config-file: ./.github/codeql/codeql-config.yml
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
@@ -48,7 +48,7 @@ jobs:
|
|||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
|
uses: github/codeql-action/autobuild@5378192d256ef1302a6980fffe5ca04426d43091 # v3.28.21
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||||
@@ -62,4 +62,4 @@ jobs:
|
|||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
|
uses: github/codeql-action/analyze@5378192d256ef1302a6980fffe5ca04426d43091 # v3.28.21
|
||||||
|
5
.github/workflows/e2e-applitools.yml
vendored
5
.github/workflows/e2e-applitools.yml
vendored
@@ -23,9 +23,6 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
e2e-applitools:
|
e2e-applitools:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: cypress/browsers:node-20.11.0-chrome-121.0.6167.85-1-ff-120.0-edge-121.0.2277.83-1
|
|
||||||
options: --user 1001
|
|
||||||
steps:
|
steps:
|
||||||
- if: ${{ ! env.USE_APPLI }}
|
- if: ${{ ! env.USE_APPLI }}
|
||||||
name: Warn if not using Applitools
|
name: Warn if not using Applitools
|
||||||
@@ -56,7 +53,7 @@ jobs:
|
|||||||
args: -X POST "$APPLITOOLS_SERVER_URL/api/externals/github/push?apiKey=$APPLITOOLS_API_KEY&CommitSha=$GITHUB_SHA&BranchName=${APPLITOOLS_BRANCH}$&ParentBranchName=$APPLITOOLS_PARENT_BRANCH"
|
args: -X POST "$APPLITOOLS_SERVER_URL/api/externals/github/push?apiKey=$APPLITOOLS_API_KEY&CommitSha=$GITHUB_SHA&BranchName=${APPLITOOLS_BRANCH}$&ParentBranchName=$APPLITOOLS_PARENT_BRANCH"
|
||||||
|
|
||||||
- name: Cypress run
|
- name: Cypress run
|
||||||
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16
|
||||||
id: cypress
|
id: cypress
|
||||||
with:
|
with:
|
||||||
start: pnpm run dev
|
start: pnpm run dev
|
||||||
|
6
.github/workflows/e2e-timings.yml
vendored
6
.github/workflows/e2e-timings.yml
vendored
@@ -27,12 +27,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16
|
||||||
with:
|
with:
|
||||||
runTests: false
|
runTests: false
|
||||||
|
|
||||||
- name: Cypress run
|
- name: Cypress run
|
||||||
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16
|
||||||
id: cypress
|
id: cypress
|
||||||
with:
|
with:
|
||||||
install: false
|
install: false
|
||||||
@@ -58,7 +58,7 @@ jobs:
|
|||||||
echo "EOF" >> $GITHUB_OUTPUT
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Commit and create pull request
|
- name: Commit and create pull request
|
||||||
uses: peter-evans/create-pull-request@889dce9eaba7900ce30494f5e1ac7220b27e5c81
|
uses: peter-evans/create-pull-request@18e469570b1cf0dfc11d60ec121099f8ff3e617a
|
||||||
with:
|
with:
|
||||||
add-paths: |
|
add-paths: |
|
||||||
cypress/timings.json
|
cypress/timings.json
|
||||||
|
10
.github/workflows/e2e.yml
vendored
10
.github/workflows/e2e.yml
vendored
@@ -45,7 +45,7 @@ jobs:
|
|||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
- name: Cache snapshots
|
- name: Cache snapshots
|
||||||
id: cache-snapshot
|
id: cache-snapshot
|
||||||
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
|
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||||
with:
|
with:
|
||||||
path: ./cypress/snapshots
|
path: ./cypress/snapshots
|
||||||
key: ${{ runner.os }}-snapshots-${{ env.targetHash }}
|
key: ${{ runner.os }}-snapshots-${{ env.targetHash }}
|
||||||
@@ -59,7 +59,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }}
|
if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }}
|
||||||
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16
|
||||||
with:
|
with:
|
||||||
# just perform install
|
# just perform install
|
||||||
runTests: false
|
runTests: false
|
||||||
@@ -95,13 +95,13 @@ jobs:
|
|||||||
# These cached snapshots are downloaded, providing the reference snapshots.
|
# These cached snapshots are downloaded, providing the reference snapshots.
|
||||||
- name: Cache snapshots
|
- name: Cache snapshots
|
||||||
id: cache-snapshot
|
id: cache-snapshot
|
||||||
uses: actions/cache/restore@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
|
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||||
with:
|
with:
|
||||||
path: ./cypress/snapshots
|
path: ./cypress/snapshots
|
||||||
key: ${{ runner.os }}-snapshots-${{ env.targetHash }}
|
key: ${{ runner.os }}-snapshots-${{ env.targetHash }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16
|
||||||
with:
|
with:
|
||||||
runTests: false
|
runTests: false
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ jobs:
|
|||||||
# Install NPM dependencies, cache them correctly
|
# Install NPM dependencies, cache them correctly
|
||||||
# and run all Cypress tests
|
# and run all Cypress tests
|
||||||
- name: Cypress run
|
- name: Cypress run
|
||||||
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16
|
||||||
id: cypress
|
id: cypress
|
||||||
with:
|
with:
|
||||||
install: false
|
install: false
|
||||||
|
2
.github/workflows/link-checker.yml
vendored
2
.github/workflows/link-checker.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
|||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
- name: Restore lychee cache
|
- name: Restore lychee cache
|
||||||
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
|
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||||
with:
|
with:
|
||||||
path: .lycheecache
|
path: .lycheecache
|
||||||
key: cache-lychee-${{ github.sha }}
|
key: cache-lychee-${{ github.sha }}
|
||||||
|
26
.github/workflows/pr-labeler.yml
vendored
26
.github/workflows/pr-labeler.yml
vendored
@@ -29,3 +29,29 @@ jobs:
|
|||||||
disable-releaser: true
|
disable-releaser: true
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Add "Sponsored by MermaidChart" label
|
||||||
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
script: |
|
||||||
|
const prNumber = context.payload.pull_request.number;
|
||||||
|
const { data: commits } = await github.rest.pulls.listCommits({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
pull_number: prNumber,
|
||||||
|
});
|
||||||
|
|
||||||
|
const isSponsored = commits.every(
|
||||||
|
(c) => c.commit.author.email?.endsWith('@mermaidchart.com')
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isSponsored) {
|
||||||
|
console.log('PR is sponsored. Adding label.');
|
||||||
|
await github.rest.issues.addLabels({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
issue_number: prNumber,
|
||||||
|
labels: ['Sponsored by MermaidChart'],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create Release Pull Request or Publish to npm
|
- name: Create Release Pull Request or Publish to npm
|
||||||
id: changesets
|
id: changesets
|
||||||
uses: changesets/action@c8bada60c408975afd1a20b3db81d6eee6789308 # v1.4.9
|
uses: changesets/action@06245a4e0a36c064a573d4150030f5ec548e4fcc # v1.4.10
|
||||||
with:
|
with:
|
||||||
version: pnpm changeset:version
|
version: pnpm changeset:version
|
||||||
publish: pnpm changeset:publish
|
publish: pnpm changeset:publish
|
||||||
|
6
.github/workflows/scorecard.yml
vendored
6
.github/workflows/scorecard.yml
vendored
@@ -20,18 +20,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Run analysis
|
- name: Run analysis
|
||||||
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
|
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
|
||||||
with:
|
with:
|
||||||
results_file: results.sarif
|
results_file: results.sarif
|
||||||
results_format: sarif
|
results_format: sarif
|
||||||
publish_results: true
|
publish_results: true
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: SARIF file
|
name: SARIF file
|
||||||
path: results.sarif
|
path: results.sarif
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
- name: Upload to code-scanning
|
- name: Upload to code-scanning
|
||||||
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
|
uses: github/codeql-action/upload-sarif@5378192d256ef1302a6980fffe5ca04426d43091 # v3.28.21
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
2
.github/workflows/update-browserlist.yml
vendored
2
.github/workflows/update-browserlist.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
message: 'chore: update browsers list'
|
message: 'chore: update browsers list'
|
||||||
push: false
|
push: false
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
|
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
||||||
with:
|
with:
|
||||||
branch: update-browserslist
|
branch: update-browserslist
|
||||||
title: Update Browserslist
|
title: Update Browserslist
|
||||||
|
70
.github/workflows/validate-lockfile.yml
vendored
Normal file
70
.github/workflows/validate-lockfile.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
name: Validate pnpm-lock.yaml
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'pnpm-lock.yaml'
|
||||||
|
- '**/package.json'
|
||||||
|
- '.github/workflows/validate-lockfile.yml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validate-lockfile:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||||
|
|
||||||
|
- name: Validate pnpm-lock.yaml entries
|
||||||
|
id: validate # give this step an ID so we can reference its outputs
|
||||||
|
run: |
|
||||||
|
issues=()
|
||||||
|
|
||||||
|
# 1) No tarball references
|
||||||
|
if grep -qF 'tarball:' pnpm-lock.yaml; then
|
||||||
|
issues+=("• Tarball references found (forbidden)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 2) No unwanted vitepress paths
|
||||||
|
if grep -qF 'packages/mermaid/src/vitepress' pnpm-lock.yaml; then
|
||||||
|
issues+=("• Disallowed path 'packages/mermaid/src/vitepress' present. Run \`rm -rf packages/mermaid/src/vitepress && pnpm install\` to regenerate.")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 3) Lockfile only changes when package.json changes
|
||||||
|
git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} > changed.txt
|
||||||
|
if grep -q '^pnpm-lock.yaml$' changed.txt && ! grep -q 'package.json' changed.txt; then
|
||||||
|
issues+=("• pnpm-lock.yaml changed without any package.json modification")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If any issues, output them and fail
|
||||||
|
if [ ${#issues[@]} -gt 0 ]; then
|
||||||
|
# Use the new GITHUB_OUTPUT approach to set a multiline output
|
||||||
|
{
|
||||||
|
echo "errors<<EOF"
|
||||||
|
printf '%s\n' "${issues[@]}"
|
||||||
|
echo "EOF"
|
||||||
|
} >> $GITHUB_OUTPUT
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Comment on PR if validation failed
|
||||||
|
if: failure()
|
||||||
|
uses: peter-evans/create-or-update-comment@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
|
body: |
|
||||||
|
The following issue(s) were detected:
|
||||||
|
${{ steps.validate.outputs.errors }}
|
||||||
|
|
||||||
|
Please address these and push an update.
|
||||||
|
|
||||||
|
_Posted automatically by GitHub Actions_
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@ node_modules/
|
|||||||
coverage/
|
coverage/
|
||||||
.idea/
|
.idea/
|
||||||
.pnpm-store/
|
.pnpm-store/
|
||||||
|
.instructions/
|
||||||
|
|
||||||
dist
|
dist
|
||||||
v8-compile-cache-0
|
v8-compile-cache-0
|
||||||
|
1005
CHANGELOG.md
1005
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
1
CHANGELOG.md
Symbolic link
1
CHANGELOG.md
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
./packages/mermaid/CHANGELOG.md
|
@@ -95,10 +95,6 @@ In our release process we rely heavily on visual regression tests using [applito
|
|||||||
|
|
||||||
<!-- </Main description> -->
|
<!-- </Main description> -->
|
||||||
|
|
||||||
## Mermaid AI Bot
|
|
||||||
|
|
||||||
[Mermaid](https://codeparrot.ai/oracle?owner=mermaid-js&repo=mermaid) Bot will help you understand this repository better. You can ask for code examples, installation guide, debugging help and much more.
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
**The following are some examples of the diagrams, charts and graphs that can be made using Mermaid. Click here to jump into the [text syntax](https://mermaid.js.org/intro/syntax-reference.html).**
|
**The following are some examples of the diagrams, charts and graphs that can be made using Mermaid. Click here to jump into the [text syntax](https://mermaid.js.org/intro/syntax-reference.html).**
|
||||||
|
@@ -1,13 +0,0 @@
|
|||||||
import { MockedD3 } from '../packages/mermaid/src/tests/MockedD3.js';
|
|
||||||
|
|
||||||
export const select = function () {
|
|
||||||
return new MockedD3();
|
|
||||||
};
|
|
||||||
|
|
||||||
export const selectAll = function () {
|
|
||||||
return new MockedD3();
|
|
||||||
};
|
|
||||||
|
|
||||||
export const curveBasis = 'basis';
|
|
||||||
export const curveLinear = 'linear';
|
|
||||||
export const curveCardinal = 'cardinal';
|
|
@@ -26,7 +26,10 @@ export default eyesPlugin(
|
|||||||
config.env.useArgos = process.env.RUN_VISUAL_TEST === 'true';
|
config.env.useArgos = process.env.RUN_VISUAL_TEST === 'true';
|
||||||
|
|
||||||
if (config.env.useArgos) {
|
if (config.env.useArgos) {
|
||||||
registerArgosTask(on, config);
|
registerArgosTask(on, config, {
|
||||||
|
// Enable upload to Argos only when it runs on CI.
|
||||||
|
uploadToArgos: !!process.env.CI,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
addMatchImageSnapshotPlugin(on, config);
|
addMatchImageSnapshotPlugin(on, config);
|
||||||
}
|
}
|
||||||
|
@@ -14,7 +14,7 @@ interface CodeObject {
|
|||||||
mermaid: CypressMermaidConfig;
|
mermaid: CypressMermaidConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
const utf8ToB64 = (str: string): string => {
|
export const utf8ToB64 = (str: string): string => {
|
||||||
return Buffer.from(decodeURIComponent(encodeURIComponent(str))).toString('base64');
|
return Buffer.from(decodeURIComponent(encodeURIComponent(str))).toString('base64');
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ const batchId: string =
|
|||||||
'mermaid-batch-' +
|
'mermaid-batch-' +
|
||||||
(Cypress.env('useAppli')
|
(Cypress.env('useAppli')
|
||||||
? Date.now().toString()
|
? Date.now().toString()
|
||||||
: Cypress.env('CYPRESS_COMMIT') || Date.now().toString());
|
: (Cypress.env('CYPRESS_COMMIT') ?? Date.now().toString()));
|
||||||
|
|
||||||
export const mermaidUrl = (
|
export const mermaidUrl = (
|
||||||
graphStr: string | string[],
|
graphStr: string | string[],
|
||||||
@@ -61,9 +61,7 @@ export const imgSnapshotTest = (
|
|||||||
sequence: {
|
sequence: {
|
||||||
...(_options.sequence ?? {}),
|
...(_options.sequence ?? {}),
|
||||||
actorFontFamily: 'courier',
|
actorFontFamily: 'courier',
|
||||||
noteFontFamily: _options.sequence?.noteFontFamily
|
noteFontFamily: _options.sequence?.noteFontFamily ?? 'courier',
|
||||||
? _options.sequence.noteFontFamily
|
|
||||||
: 'courier',
|
|
||||||
messageFontFamily: 'courier',
|
messageFontFamily: 'courier',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { mermaidUrl } from '../../helpers/util.ts';
|
import { imgSnapshotTest, mermaidUrl, utf8ToB64 } from '../../helpers/util.ts';
|
||||||
describe('XSS', () => {
|
describe('XSS', () => {
|
||||||
it('should handle xss in tags', () => {
|
it('should handle xss in tags', () => {
|
||||||
const str =
|
const str =
|
||||||
@@ -141,4 +141,37 @@ describe('XSS', () => {
|
|||||||
cy.wait(1000);
|
cy.wait(1000);
|
||||||
cy.get('#the-malware').should('not.exist');
|
cy.get('#the-malware').should('not.exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should sanitize icon labels in architecture diagrams', () => {
|
||||||
|
const str = JSON.stringify({
|
||||||
|
code: `architecture-beta
|
||||||
|
group api(cloud)[API]
|
||||||
|
service db "<img src=x onerror=\\"xssAttack()\\">" [Database] in api`,
|
||||||
|
});
|
||||||
|
imgSnapshotTest(utf8ToB64(str), {}, true);
|
||||||
|
cy.wait(1000);
|
||||||
|
cy.get('#the-malware').should('not.exist');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should sanitize katex blocks', () => {
|
||||||
|
const str = JSON.stringify({
|
||||||
|
code: `sequenceDiagram
|
||||||
|
participant A as Alice<img src="x" onerror="xssAttack()">$$\\text{Alice}$$
|
||||||
|
A->>John: Hello John, how are you?`,
|
||||||
|
});
|
||||||
|
imgSnapshotTest(utf8ToB64(str), {}, true);
|
||||||
|
cy.wait(1000);
|
||||||
|
cy.get('#the-malware').should('not.exist');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should sanitize labels', () => {
|
||||||
|
const str = JSON.stringify({
|
||||||
|
code: `erDiagram
|
||||||
|
"<img src=x onerror=xssAttack()>" ||--|| ENTITY2 : "<img src=x onerror=xssAttack()>"
|
||||||
|
`,
|
||||||
|
});
|
||||||
|
imgSnapshotTest(utf8ToB64(str), {}, true);
|
||||||
|
cy.wait(1000);
|
||||||
|
cy.get('#the-malware').should('not.exist');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@@ -16,7 +16,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL2: should handle columns statement in sub-blocks', () => {
|
it('BL2: should handle columns statement in sub-blocks', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
id1["Hello"]
|
id1["Hello"]
|
||||||
block
|
block
|
||||||
columns 3
|
columns 3
|
||||||
@@ -32,7 +32,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL3: should align block widths and handle columns statement in sub-blocks', () => {
|
it('BL3: should align block widths and handle columns statement in sub-blocks', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
block
|
block
|
||||||
columns 1
|
columns 1
|
||||||
id1
|
id1
|
||||||
@@ -48,7 +48,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL4: should align block widths and handle columns statements in deeper sub-blocks then 1 level', () => {
|
it('BL4: should align block widths and handle columns statements in deeper sub-blocks then 1 level', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
columns 1
|
columns 1
|
||||||
block
|
block
|
||||||
columns 1
|
columns 1
|
||||||
@@ -68,7 +68,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL5: should align block widths and handle columns statements in deeper sub-blocks then 1 level (alt)', () => {
|
it('BL5: should align block widths and handle columns statements in deeper sub-blocks then 1 level (alt)', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
columns 1
|
columns 1
|
||||||
block
|
block
|
||||||
id1
|
id1
|
||||||
@@ -87,7 +87,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL6: should handle block arrows and spece statements', () => {
|
it('BL6: should handle block arrows and spece statements', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
columns 3
|
columns 3
|
||||||
space:3
|
space:3
|
||||||
ida idb idc
|
ida idb idc
|
||||||
@@ -106,7 +106,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL7: should handle different types of edges', () => {
|
it('BL7: should handle different types of edges', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
columns 3
|
columns 3
|
||||||
A space:5
|
A space:5
|
||||||
A --o B
|
A --o B
|
||||||
@@ -119,7 +119,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL8: should handle sub-blocks without columns statements', () => {
|
it('BL8: should handle sub-blocks without columns statements', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
columns 2
|
columns 2
|
||||||
C A B
|
C A B
|
||||||
block
|
block
|
||||||
@@ -133,7 +133,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL9: should handle edges from blocks in sub blocks to other blocks', () => {
|
it('BL9: should handle edges from blocks in sub blocks to other blocks', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
columns 3
|
columns 3
|
||||||
B space
|
B space
|
||||||
block
|
block
|
||||||
@@ -147,7 +147,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL10: should handle edges from composite blocks', () => {
|
it('BL10: should handle edges from composite blocks', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
columns 3
|
columns 3
|
||||||
B space
|
B space
|
||||||
block BL
|
block BL
|
||||||
@@ -161,7 +161,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL11: should handle edges to composite blocks', () => {
|
it('BL11: should handle edges to composite blocks', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
columns 3
|
columns 3
|
||||||
B space
|
B space
|
||||||
block BL
|
block BL
|
||||||
@@ -175,7 +175,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL12: edges should handle labels', () => {
|
it('BL12: edges should handle labels', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
A
|
A
|
||||||
space
|
space
|
||||||
A -- "apa" --> E
|
A -- "apa" --> E
|
||||||
@@ -186,7 +186,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL13: should handle block arrows in different directions', () => {
|
it('BL13: should handle block arrows in different directions', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
columns 3
|
columns 3
|
||||||
space blockArrowId1<["down"]>(down) space
|
space blockArrowId1<["down"]>(down) space
|
||||||
blockArrowId2<["right"]>(right) blockArrowId3<["Sync"]>(x, y) blockArrowId4<["left"]>(left)
|
blockArrowId2<["right"]>(right) blockArrowId3<["Sync"]>(x, y) blockArrowId4<["left"]>(left)
|
||||||
@@ -199,7 +199,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL14: should style statements and class statements', () => {
|
it('BL14: should style statements and class statements', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
A
|
A
|
||||||
B
|
B
|
||||||
classDef blue fill:#66f,stroke:#333,stroke-width:2px;
|
classDef blue fill:#66f,stroke:#333,stroke-width:2px;
|
||||||
@@ -212,7 +212,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL15: width alignment - D and E should share available space', () => {
|
it('BL15: width alignment - D and E should share available space', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
block
|
block
|
||||||
D
|
D
|
||||||
E
|
E
|
||||||
@@ -225,7 +225,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL16: width alignment - C should be as wide as the composite block', () => {
|
it('BL16: width alignment - C should be as wide as the composite block', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
block
|
block
|
||||||
A("This is the text")
|
A("This is the text")
|
||||||
B
|
B
|
||||||
@@ -238,7 +238,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL17: width alignment - blocks should be equal in width', () => {
|
it('BL17: width alignment - blocks should be equal in width', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
A("This is the text")
|
A("This is the text")
|
||||||
B
|
B
|
||||||
C
|
C
|
||||||
@@ -249,7 +249,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL18: block types 1 - square, rounded and circle', () => {
|
it('BL18: block types 1 - square, rounded and circle', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
A["square"]
|
A["square"]
|
||||||
B("rounded")
|
B("rounded")
|
||||||
C(("circle"))
|
C(("circle"))
|
||||||
@@ -260,7 +260,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL19: block types 2 - odd, diamond and hexagon', () => {
|
it('BL19: block types 2 - odd, diamond and hexagon', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
A>"rect_left_inv_arrow"]
|
A>"rect_left_inv_arrow"]
|
||||||
B{"diamond"}
|
B{"diamond"}
|
||||||
C{{"hexagon"}}
|
C{{"hexagon"}}
|
||||||
@@ -271,7 +271,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL20: block types 3 - stadium', () => {
|
it('BL20: block types 3 - stadium', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
A(["stadium"])
|
A(["stadium"])
|
||||||
`,
|
`,
|
||||||
{}
|
{}
|
||||||
@@ -280,7 +280,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL21: block types 4 - lean right, lean left, trapezoid and inv trapezoid', () => {
|
it('BL21: block types 4 - lean right, lean left, trapezoid and inv trapezoid', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
A[/"lean right"/]
|
A[/"lean right"/]
|
||||||
B[\"lean left"\]
|
B[\"lean left"\]
|
||||||
C[/"trapezoid"\]
|
C[/"trapezoid"\]
|
||||||
@@ -292,7 +292,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL22: block types 1 - square, rounded and circle', () => {
|
it('BL22: block types 1 - square, rounded and circle', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
A["square"]
|
A["square"]
|
||||||
B("rounded")
|
B("rounded")
|
||||||
C(("circle"))
|
C(("circle"))
|
||||||
@@ -303,7 +303,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL23: sizing - it should be possible to make a block wider', () => {
|
it('BL23: sizing - it should be possible to make a block wider', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
A("rounded"):2
|
A("rounded"):2
|
||||||
B:2
|
B:2
|
||||||
C
|
C
|
||||||
@@ -314,7 +314,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL24: sizing - it should be possible to make a composite block wider', () => {
|
it('BL24: sizing - it should be possible to make a composite block wider', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
block:2
|
block:2
|
||||||
A
|
A
|
||||||
end
|
end
|
||||||
@@ -326,7 +326,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL25: block in the middle with space on each side', () => {
|
it('BL25: block in the middle with space on each side', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
columns 3
|
columns 3
|
||||||
space
|
space
|
||||||
middle["In the middle"]
|
middle["In the middle"]
|
||||||
@@ -337,7 +337,7 @@ describe('Block diagram', () => {
|
|||||||
});
|
});
|
||||||
it('BL26: space and an edge', () => {
|
it('BL26: space and an edge', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
columns 5
|
columns 5
|
||||||
A space B
|
A space B
|
||||||
A --x B
|
A --x B
|
||||||
@@ -347,7 +347,7 @@ describe('Block diagram', () => {
|
|||||||
});
|
});
|
||||||
it('BL27: block sizes for regular blocks', () => {
|
it('BL27: block sizes for regular blocks', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
columns 3
|
columns 3
|
||||||
a["A wide one"] b:2 c:2 d
|
a["A wide one"] b:2 c:2 d
|
||||||
`,
|
`,
|
||||||
@@ -356,7 +356,7 @@ describe('Block diagram', () => {
|
|||||||
});
|
});
|
||||||
it('BL28: composite block with a set width - f should use the available space', () => {
|
it('BL28: composite block with a set width - f should use the available space', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
columns 3
|
columns 3
|
||||||
a:3
|
a:3
|
||||||
block:e:3
|
block:e:3
|
||||||
@@ -370,7 +370,7 @@ describe('Block diagram', () => {
|
|||||||
|
|
||||||
it('BL29: composite block with a set width - f and g should split the available space', () => {
|
it('BL29: composite block with a set width - f and g should split the available space', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block
|
||||||
columns 3
|
columns 3
|
||||||
a:3
|
a:3
|
||||||
block:e:3
|
block:e:3
|
||||||
@@ -384,4 +384,28 @@ describe('Block diagram', () => {
|
|||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('BL30: block should overflow if too wide for columns', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`block-beta
|
||||||
|
columns 2
|
||||||
|
fit:2
|
||||||
|
overflow:3
|
||||||
|
short:1
|
||||||
|
also_overflow:2
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('BL31: edge without arrow syntax should render with no arrowheads', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`block-beta
|
||||||
|
a
|
||||||
|
b
|
||||||
|
a --- b
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@@ -495,4 +495,47 @@ describe('Class diagram', () => {
|
|||||||
cy.get('a').should('have.attr', 'target', '_blank').should('have.attr', 'rel', 'noopener');
|
cy.get('a').should('have.attr', 'target', '_blank').should('have.attr', 'rel', 'noopener');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('Include char sequence "graph" in text (#6795)', () => {
|
||||||
|
it('has a label with char sequence "graph"', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
classDiagram
|
||||||
|
class Person {
|
||||||
|
+String name
|
||||||
|
-Int id
|
||||||
|
#double age
|
||||||
|
+Text demographicProfile
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
{ flowchart: { defaultRenderer: 'elk' } }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should handle backticks for namespace and class names', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
classDiagram
|
||||||
|
namespace \`A::B\` {
|
||||||
|
class \`IPC::Sender\`
|
||||||
|
}
|
||||||
|
RenderProcessHost --|> \`IPC::Sender\`
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
it('should handle an empty class body with empty braces', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
` classDiagram
|
||||||
|
class FooBase~T~ {}
|
||||||
|
class Bar {
|
||||||
|
+Zip
|
||||||
|
+Zap()
|
||||||
|
}
|
||||||
|
FooBase <|-- Ba
|
||||||
|
`,
|
||||||
|
{ flowchart: { defaultRenderer: 'elk' } }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@@ -354,4 +354,19 @@ ORDER ||--|{ LINE-ITEM : contains
|
|||||||
{ logLevel: 1 }
|
{ logLevel: 1 }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('Include char sequence "graph" in text (#6795)', () => {
|
||||||
|
it('has a label with char sequence "graph"', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
erDiagram
|
||||||
|
p[Photograph] {
|
||||||
|
varchar(12) jobId
|
||||||
|
date dateCreated
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
{ flowchart: { defaultRenderer: 'elk' } }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@@ -1053,6 +1053,21 @@ flowchart LR
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('6647-elk: should keep node order when using elk layout unless it would add crossings', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
flowchart TB
|
||||||
|
a --> a1 & a2 & a3 & a4
|
||||||
|
b --> b1 & b2
|
||||||
|
b2 --> b3
|
||||||
|
b1 --> b4
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Title and arrow styling #4813', () => {
|
describe('Title and arrow styling #4813', () => {
|
||||||
|
@@ -1113,4 +1113,90 @@ end
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
describe('Flowchart Node Shape Rendering', () => {
|
||||||
|
it('should render a stadium-shaped node', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`flowchart TB
|
||||||
|
A(["Start"]) --> n1["Untitled Node"]
|
||||||
|
A --> n2["Untitled Node"]
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('should render a diamond-shaped node using shape config', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`flowchart BT
|
||||||
|
n2["Untitled Node"] --> n1["Diamond"]
|
||||||
|
n1@{ shape: diam}
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('should render a rounded rectangle and a normal rectangle', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`flowchart BT
|
||||||
|
n2["Untitled Node"] --> n1["Rounded Rectangle"]
|
||||||
|
n3["Untitled Node"] --> n1
|
||||||
|
n1@{ shape: rounded}
|
||||||
|
n3@{ shape: rect}
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('6617: Per Link Curve Styling using edge Ids', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`flowchart TD
|
||||||
|
A e1@-->B e5@--> E
|
||||||
|
E e7@--> D
|
||||||
|
B e3@-->D
|
||||||
|
A e2@-->C e4@-->D
|
||||||
|
C e6@--> F
|
||||||
|
F e8@--> D
|
||||||
|
e1@{ curve: natural }
|
||||||
|
e2@{ curve: stepAfter }
|
||||||
|
e3@{ curve: monotoneY }
|
||||||
|
e4@{ curve: bumpY }
|
||||||
|
e5@{ curve: linear }
|
||||||
|
e6@{ curve: catmullRom }
|
||||||
|
e7@{ curve: cardinal }
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('when rendering unsuported markdown', () => {
|
||||||
|
const graph = `flowchart TB
|
||||||
|
mermaid{"What is\nyourmermaid version?"} --> v10["<11"] --"\`<**1**1\`"--> fine["No bug"]
|
||||||
|
mermaid --> v11[">= v11"] -- ">= v11" --> broken["Affected by https://github.com/mermaid-js/mermaid/issues/5824"]
|
||||||
|
subgraph subgraph1["\`How to fix **fix**\`"]
|
||||||
|
broken --> B["B"]
|
||||||
|
end
|
||||||
|
githost["Github, Gitlab, BitBucket, etc."]
|
||||||
|
githost2["\`Github, Gitlab, BitBucket, etc.\`"]
|
||||||
|
a["1."]
|
||||||
|
b["- x"]
|
||||||
|
`;
|
||||||
|
|
||||||
|
it('should render raw strings', () => {
|
||||||
|
imgSnapshotTest(graph);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render raw strings with htmlLabels: false', () => {
|
||||||
|
imgSnapshotTest(graph, { htmlLabels: false });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('V2 - 17: should apply class def colour to edge label', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
` graph LR
|
||||||
|
id1(Start) link@-- "Label" -->id2(Stop)
|
||||||
|
style id1 fill:#f9f,stroke:#333,stroke-width:4px
|
||||||
|
|
||||||
|
class id2 myClass
|
||||||
|
classDef myClass fill:#bbf,stroke:#f66,stroke-width:2px,color:white,stroke-dasharray: 5 5
|
||||||
|
class link myClass
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@@ -565,6 +565,18 @@ describe('Gantt diagram', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should render only the day when using dateFormat D', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
gantt
|
||||||
|
title Test
|
||||||
|
dateFormat D
|
||||||
|
A :a, 1, 1d
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
// TODO: fix it
|
// TODO: fix it
|
||||||
//
|
//
|
||||||
// This test is skipped deliberately
|
// This test is skipped deliberately
|
||||||
@@ -647,6 +659,49 @@ describe('Gantt diagram', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should render a gantt diagram excluding a specific date in YYYY-MM-DD HH:mm:ss format', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
gantt
|
||||||
|
dateFormat YYYY-MM-DD HH:mm:ss
|
||||||
|
excludes 2025-07-07
|
||||||
|
section Section
|
||||||
|
A task :a1, 2025-07-04 20:30:30, 2025-07-08 10:30:30
|
||||||
|
Another task:after a1, 20h
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render a gantt diagram excluding saturday and sunday in YYYY-MM-DD HH:mm:ss format', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
gantt
|
||||||
|
dateFormat YYYY-MM-DD HH:mm:ss
|
||||||
|
excludes weekends
|
||||||
|
weekend saturday
|
||||||
|
section Section
|
||||||
|
A task :a1, 2025-07-04 20:30:30, 2025-07-08 10:30:30
|
||||||
|
Another task:after a1, 20h
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('should render a gantt diagram excluding friday and saturday in YYYY-MM-DD HH:mm:ss format', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
gantt
|
||||||
|
dateFormat YYYY-MM-DD HH:mm:ss
|
||||||
|
excludes weekends
|
||||||
|
weekend friday
|
||||||
|
section Section
|
||||||
|
A task :a1, 2025-07-04 20:30:30, 2025-07-08 10:30:30
|
||||||
|
Another task:after a1, 20h
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it("should render when there's a semicolon in the title", () => {
|
it("should render when there's a semicolon in the title", () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
|
79
cypress/integration/rendering/mindmap-tidy-tree.spec.js
Normal file
79
cypress/integration/rendering/mindmap-tidy-tree.spec.js
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
import { imgSnapshotTest } from '../../helpers/util.ts';
|
||||||
|
|
||||||
|
describe('Mindmap Tidy Tree', () => {
|
||||||
|
it('1-tidy-tree: should render a simple mindmap without children', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
` ---
|
||||||
|
config:
|
||||||
|
layout: tidy-tree
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
A
|
||||||
|
B
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('2-tidy-tree: should render a simple mindmap', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
` ---
|
||||||
|
config:
|
||||||
|
layout: tidy-tree
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap is a long thing))
|
||||||
|
A
|
||||||
|
B
|
||||||
|
C
|
||||||
|
D
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('3-tidy-tree: should render a mindmap with different shapes', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
` ---
|
||||||
|
config:
|
||||||
|
layout: tidy-tree
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
Origins
|
||||||
|
Long history
|
||||||
|
::icon(fa fa-book)
|
||||||
|
Popularisation
|
||||||
|
British popular psychology author Tony Buzan
|
||||||
|
Research
|
||||||
|
On effectiveness<br/>and features
|
||||||
|
On Automatic creation
|
||||||
|
Uses
|
||||||
|
Creative techniques
|
||||||
|
Strategic planning
|
||||||
|
Argument mapping
|
||||||
|
Tools
|
||||||
|
id)I am a cloud(
|
||||||
|
id))I am a bang((
|
||||||
|
Tools
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('4-tidy-tree: should render a mindmap with children', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
` ---
|
||||||
|
config:
|
||||||
|
layout: tidy-tree
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
((This is a mindmap))
|
||||||
|
child1
|
||||||
|
grandchild 1
|
||||||
|
grandchild 2
|
||||||
|
child2
|
||||||
|
grandchild 3
|
||||||
|
grandchild 4
|
||||||
|
child3
|
||||||
|
grandchild 5
|
||||||
|
grandchild 6
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
@@ -159,12 +159,10 @@ root
|
|||||||
});
|
});
|
||||||
it('square shape', () => {
|
it('square shape', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`mindmap
|
||||||
mindmap
|
|
||||||
root[
|
root[
|
||||||
The root
|
The root
|
||||||
]
|
]`,
|
||||||
`,
|
|
||||||
{},
|
{},
|
||||||
undefined,
|
undefined,
|
||||||
shouldHaveRoot
|
shouldHaveRoot
|
||||||
@@ -172,12 +170,10 @@ mindmap
|
|||||||
});
|
});
|
||||||
it('rounded rect shape', () => {
|
it('rounded rect shape', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`mindmap
|
||||||
mindmap
|
|
||||||
root((
|
root((
|
||||||
The root
|
The root
|
||||||
))
|
))`,
|
||||||
`,
|
|
||||||
{},
|
{},
|
||||||
undefined,
|
undefined,
|
||||||
shouldHaveRoot
|
shouldHaveRoot
|
||||||
@@ -185,12 +181,10 @@ mindmap
|
|||||||
});
|
});
|
||||||
it('circle shape', () => {
|
it('circle shape', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`mindmap
|
||||||
mindmap
|
|
||||||
root(
|
root(
|
||||||
The root
|
The root
|
||||||
)
|
)`,
|
||||||
`,
|
|
||||||
{},
|
{},
|
||||||
undefined,
|
undefined,
|
||||||
shouldHaveRoot
|
shouldHaveRoot
|
||||||
@@ -198,10 +192,8 @@ mindmap
|
|||||||
});
|
});
|
||||||
it('default shape', () => {
|
it('default shape', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`mindmap
|
||||||
mindmap
|
The root`,
|
||||||
The root
|
|
||||||
`,
|
|
||||||
{},
|
{},
|
||||||
undefined,
|
undefined,
|
||||||
shouldHaveRoot
|
shouldHaveRoot
|
||||||
@@ -209,12 +201,10 @@ mindmap
|
|||||||
});
|
});
|
||||||
it('adding children', () => {
|
it('adding children', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`mindmap
|
||||||
mindmap
|
|
||||||
The root
|
The root
|
||||||
child1
|
child1
|
||||||
child2
|
child2`,
|
||||||
`,
|
|
||||||
{},
|
{},
|
||||||
undefined,
|
undefined,
|
||||||
shouldHaveRoot
|
shouldHaveRoot
|
||||||
@@ -222,13 +212,11 @@ mindmap
|
|||||||
});
|
});
|
||||||
it('adding grand children', () => {
|
it('adding grand children', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`mindmap
|
||||||
mindmap
|
|
||||||
The root
|
The root
|
||||||
child1
|
child1
|
||||||
child2
|
child2
|
||||||
child3
|
child3`,
|
||||||
`,
|
|
||||||
{},
|
{},
|
||||||
undefined,
|
undefined,
|
||||||
shouldHaveRoot
|
shouldHaveRoot
|
||||||
@@ -240,9 +228,22 @@ mindmap
|
|||||||
`mindmap
|
`mindmap
|
||||||
id1[\`**Start** with
|
id1[\`**Start** with
|
||||||
a second line 😎\`]
|
a second line 😎\`]
|
||||||
id2[\`The dog in **the** hog... a *very long text* about it
|
id2[\`The dog in **the** hog... a *very long text* about it Word!\`]`
|
||||||
Word!\`]
|
);
|
||||||
`
|
});
|
||||||
|
});
|
||||||
|
describe('Include char sequence "graph" in text (#6795)', () => {
|
||||||
|
it('has a label with char sequence "graph"', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
` mindmap
|
||||||
|
root
|
||||||
|
Photograph
|
||||||
|
Waterfall
|
||||||
|
Landscape
|
||||||
|
Geography
|
||||||
|
Mountains
|
||||||
|
Rocks`,
|
||||||
|
{ flowchart: { defaultRenderer: 'elk' } }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { imgSnapshotTest } from '../../helpers/util';
|
import { imgSnapshotTest } from '../../helpers/util';
|
||||||
|
|
||||||
describe('packet structure', () => {
|
describe('packet structure', () => {
|
||||||
it('should render a simple packet diagram', () => {
|
it('should render a simple packet-beta diagram', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`packet-beta
|
`packet-beta
|
||||||
title Hello world
|
title Hello world
|
||||||
@@ -10,9 +10,18 @@ describe('packet structure', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should render a simple packet diagram', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`packet
|
||||||
|
title Hello world
|
||||||
|
0-10: "hello"
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it('should render a simple packet diagram without ranges', () => {
|
it('should render a simple packet diagram without ranges', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`packet-beta
|
`packet
|
||||||
0: "h"
|
0: "h"
|
||||||
1: "i"
|
1: "i"
|
||||||
`
|
`
|
||||||
@@ -21,7 +30,7 @@ describe('packet structure', () => {
|
|||||||
|
|
||||||
it('should render a complex packet diagram', () => {
|
it('should render a complex packet diagram', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`packet-beta
|
`packet
|
||||||
0-15: "Source Port"
|
0-15: "Source Port"
|
||||||
16-31: "Destination Port"
|
16-31: "Destination Port"
|
||||||
32-63: "Sequence Number"
|
32-63: "Sequence Number"
|
||||||
@@ -52,7 +61,7 @@ describe('packet structure', () => {
|
|||||||
packet:
|
packet:
|
||||||
showBits: false
|
showBits: false
|
||||||
---
|
---
|
||||||
packet-beta
|
packet
|
||||||
0-15: "Source Port"
|
0-15: "Source Port"
|
||||||
16-31: "Destination Port"
|
16-31: "Destination Port"
|
||||||
32-63: "Sequence Number"
|
32-63: "Sequence Number"
|
||||||
|
@@ -82,4 +82,13 @@ describe('pie chart', () => {
|
|||||||
`
|
`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
it('should render pie slices only for non-zero values but shows all legends', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
` pie title Pets adopted by volunteers
|
||||||
|
"Dogs" : 386
|
||||||
|
"Cats" : 85
|
||||||
|
"Rats" : 1
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@@ -15,7 +15,7 @@ describe('Sankey Diagram', () => {
|
|||||||
describe('when given a linkColor', function () {
|
describe('when given a linkColor', function () {
|
||||||
this.beforeAll(() => {
|
this.beforeAll(() => {
|
||||||
cy.wrap(
|
cy.wrap(
|
||||||
`sankey-beta
|
`sankey
|
||||||
a,b,10
|
a,b,10
|
||||||
`
|
`
|
||||||
).as('graph');
|
).as('graph');
|
||||||
@@ -62,7 +62,7 @@ describe('Sankey Diagram', () => {
|
|||||||
this.beforeAll(() => {
|
this.beforeAll(() => {
|
||||||
cy.wrap(
|
cy.wrap(
|
||||||
`
|
`
|
||||||
sankey-beta
|
sankey
|
||||||
|
|
||||||
a,b,8
|
a,b,8
|
||||||
b,c,8
|
b,c,8
|
||||||
|
659
cypress/integration/rendering/sequencediagram-v2.spec.js
Normal file
659
cypress/integration/rendering/sequencediagram-v2.spec.js
Normal file
@@ -0,0 +1,659 @@
|
|||||||
|
import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts';
|
||||||
|
|
||||||
|
const looks = ['classic'];
|
||||||
|
const participantTypes = [
|
||||||
|
{ type: 'participant', display: 'participant' },
|
||||||
|
{ type: 'actor', display: 'actor' },
|
||||||
|
{ type: 'boundary', display: 'boundary' },
|
||||||
|
{ type: 'control', display: 'control' },
|
||||||
|
{ type: 'entity', display: 'entity' },
|
||||||
|
{ type: 'database', display: 'database' },
|
||||||
|
{ type: 'collections', display: 'collections' },
|
||||||
|
{ type: 'queue', display: 'queue' },
|
||||||
|
];
|
||||||
|
|
||||||
|
const restrictedTypes = ['boundary', 'control', 'entity', 'database', 'collections', 'queue'];
|
||||||
|
|
||||||
|
const interactionTypes = ['->>', '-->>', '->', '-->', '-x', '--x', '->>+', '-->>+'];
|
||||||
|
|
||||||
|
const notePositions = ['left of', 'right of', 'over'];
|
||||||
|
|
||||||
|
function getParticipantLine(name, type, alias) {
|
||||||
|
if (restrictedTypes.includes(type)) {
|
||||||
|
return ` participant ${name}@{ "type" : "${type}" }\n`;
|
||||||
|
} else if (alias) {
|
||||||
|
return ` participant ${name}@{ "type" : "${type}" } \n`;
|
||||||
|
} else {
|
||||||
|
return ` participant ${name}@{ "type" : "${type}" }\n`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
looks.forEach((look) => {
|
||||||
|
describe(`Sequence Diagram Tests - ${look} look`, () => {
|
||||||
|
it('should render all participant types', () => {
|
||||||
|
let diagramCode = `sequenceDiagram\n`;
|
||||||
|
participantTypes.forEach((pt, index) => {
|
||||||
|
const name = `${pt.display}${index}`;
|
||||||
|
diagramCode += getParticipantLine(name, pt.type);
|
||||||
|
});
|
||||||
|
for (let i = 0; i < participantTypes.length - 1; i++) {
|
||||||
|
diagramCode += ` ${participantTypes[i].display}${i} ->> ${participantTypes[i + 1].display}${i + 1}: Message ${i}\n`;
|
||||||
|
}
|
||||||
|
imgSnapshotTest(diagramCode, { look, sequence: { diagramMarginX: 50, diagramMarginY: 10 } });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render all interaction types', () => {
|
||||||
|
let diagramCode = `sequenceDiagram\n`;
|
||||||
|
diagramCode += getParticipantLine('A', 'actor');
|
||||||
|
diagramCode += getParticipantLine('B', 'boundary');
|
||||||
|
interactionTypes.forEach((interaction, index) => {
|
||||||
|
diagramCode += ` A ${interaction} B: ${interaction} message ${index}\n`;
|
||||||
|
});
|
||||||
|
imgSnapshotTest(diagramCode, { look });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render participant creation and destruction', () => {
|
||||||
|
let diagramCode = `sequenceDiagram\n`;
|
||||||
|
participantTypes.forEach((pt, index) => {
|
||||||
|
const name = `${pt.display}${index}`;
|
||||||
|
diagramCode += getParticipantLine('A', pt.type);
|
||||||
|
diagramCode += getParticipantLine('B', pt.type);
|
||||||
|
diagramCode += ` create participant ${name}@{ "type" : "${pt.type}" }\n`;
|
||||||
|
diagramCode += ` A ->> ${name}: Hello ${pt.display}\n`;
|
||||||
|
if (index % 2 === 0) {
|
||||||
|
diagramCode += ` destroy ${name}\n`;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
imgSnapshotTest(diagramCode, { look });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render notes in all positions', () => {
|
||||||
|
let diagramCode = `sequenceDiagram\n`;
|
||||||
|
diagramCode += getParticipantLine('A', 'actor');
|
||||||
|
diagramCode += getParticipantLine('B', 'boundary');
|
||||||
|
notePositions.forEach((position, index) => {
|
||||||
|
diagramCode += ` Note ${position} A: Note ${position} ${index}\n`;
|
||||||
|
});
|
||||||
|
diagramCode += ` A ->> B: Message with notes\n`;
|
||||||
|
imgSnapshotTest(diagramCode, { look });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render parallel interactions', () => {
|
||||||
|
let diagramCode = `sequenceDiagram\n`;
|
||||||
|
participantTypes.slice(0, 4).forEach((pt, index) => {
|
||||||
|
diagramCode += getParticipantLine(`${pt.display}${index}`, pt.type);
|
||||||
|
});
|
||||||
|
diagramCode += ` par Parallel actions\n`;
|
||||||
|
for (let i = 0; i < 3; i += 2) {
|
||||||
|
diagramCode += ` ${participantTypes[i].display}${i} ->> ${participantTypes[i + 1].display}${i + 1}: Message ${i}\n`;
|
||||||
|
if (i < participantTypes.length - 2) {
|
||||||
|
diagramCode += ` and\n`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diagramCode += ` end\n`;
|
||||||
|
imgSnapshotTest(diagramCode, { look });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render alternative flows', () => {
|
||||||
|
let diagramCode = `sequenceDiagram\n`;
|
||||||
|
diagramCode += getParticipantLine('A', 'actor');
|
||||||
|
diagramCode += getParticipantLine('B', 'boundary');
|
||||||
|
diagramCode += ` alt Successful case\n`;
|
||||||
|
diagramCode += ` A ->> B: Request\n`;
|
||||||
|
diagramCode += ` B -->> A: Success\n`;
|
||||||
|
diagramCode += ` else Failure case\n`;
|
||||||
|
diagramCode += ` A ->> B: Request\n`;
|
||||||
|
diagramCode += ` B --x A: Failure\n`;
|
||||||
|
diagramCode += ` end\n`;
|
||||||
|
imgSnapshotTest(diagramCode, { look });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render loops', () => {
|
||||||
|
let diagramCode = `sequenceDiagram\n`;
|
||||||
|
participantTypes.slice(0, 3).forEach((pt, index) => {
|
||||||
|
diagramCode += getParticipantLine(`${pt.display}${index}`, pt.type);
|
||||||
|
});
|
||||||
|
diagramCode += ` loop For each participant\n`;
|
||||||
|
for (let i = 0; i < 3; i++) {
|
||||||
|
diagramCode += ` ${participantTypes[0].display}0 ->> ${participantTypes[1].display}1: Message ${i}\n`;
|
||||||
|
}
|
||||||
|
diagramCode += ` end\n`;
|
||||||
|
imgSnapshotTest(diagramCode, { look });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render boxes around groups', () => {
|
||||||
|
let diagramCode = `sequenceDiagram\n`;
|
||||||
|
diagramCode += ` box Group 1\n`;
|
||||||
|
participantTypes.slice(0, 3).forEach((pt, index) => {
|
||||||
|
diagramCode += ` ${getParticipantLine(`${pt.display}${index}`, pt.type)}`;
|
||||||
|
});
|
||||||
|
diagramCode += ` end\n`;
|
||||||
|
diagramCode += ` box rgb(200,220,255) Group 2\n`;
|
||||||
|
participantTypes.slice(3, 6).forEach((pt, index) => {
|
||||||
|
diagramCode += ` ${getParticipantLine(`${pt.display}${index}`, pt.type)}`;
|
||||||
|
});
|
||||||
|
diagramCode += ` end\n`;
|
||||||
|
diagramCode += ` ${participantTypes[0].display}0 ->> ${participantTypes[3].display}0: Cross-group message\n`;
|
||||||
|
imgSnapshotTest(diagramCode, { look });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render with different font settings', () => {
|
||||||
|
let diagramCode = `sequenceDiagram\n`;
|
||||||
|
participantTypes.slice(0, 3).forEach((pt, index) => {
|
||||||
|
diagramCode += getParticipantLine(`${pt.display}${index}`, pt.type);
|
||||||
|
});
|
||||||
|
diagramCode += ` ${participantTypes[0].display}0 ->> ${participantTypes[1].display}1: Regular message\n`;
|
||||||
|
diagramCode += ` Note right of ${participantTypes[1].display}1: Regular note\n`;
|
||||||
|
imgSnapshotTest(diagramCode, {
|
||||||
|
look,
|
||||||
|
sequence: {
|
||||||
|
actorFontFamily: 'courier',
|
||||||
|
actorFontSize: 14,
|
||||||
|
messageFontFamily: 'Arial',
|
||||||
|
messageFontSize: 12,
|
||||||
|
noteFontFamily: 'times',
|
||||||
|
noteFontSize: 16,
|
||||||
|
noteAlign: 'left',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Additional tests for specific combinations
|
||||||
|
describe('Sequence Diagram Special Cases', () => {
|
||||||
|
it('should render complex sequence with all features', () => {
|
||||||
|
const diagramCode = `
|
||||||
|
sequenceDiagram
|
||||||
|
box rgb(200,220,255) Authentication
|
||||||
|
actor User
|
||||||
|
participant LoginUI@{ "type": "boundary" }
|
||||||
|
participant AuthService@{ "type": "control" }
|
||||||
|
participant UserDB@{ "type": "database" }
|
||||||
|
end
|
||||||
|
|
||||||
|
box rgb(200,255,220) Order Processing
|
||||||
|
participant Order@{ "type": "entity" }
|
||||||
|
participant OrderQueue@{ "type": "queue" }
|
||||||
|
participant AuditLogs@{ "type": "collections" }
|
||||||
|
end
|
||||||
|
|
||||||
|
User ->> LoginUI: Enter credentials
|
||||||
|
LoginUI ->> AuthService: Validate
|
||||||
|
AuthService ->> UserDB: Query user
|
||||||
|
UserDB -->> AuthService: User data
|
||||||
|
alt Valid credentials
|
||||||
|
AuthService -->> LoginUI: Success
|
||||||
|
LoginUI -->> User: Welcome
|
||||||
|
|
||||||
|
par Place order
|
||||||
|
User ->> Order: New order
|
||||||
|
Order ->> OrderQueue: Process
|
||||||
|
and
|
||||||
|
Order ->> AuditLogs: Record
|
||||||
|
end
|
||||||
|
|
||||||
|
loop Until confirmed
|
||||||
|
OrderQueue ->> Order: Update status
|
||||||
|
Order -->> User: Notification
|
||||||
|
end
|
||||||
|
else Invalid credentials
|
||||||
|
AuthService --x LoginUI: Failure
|
||||||
|
LoginUI --x User: Retry
|
||||||
|
end
|
||||||
|
`;
|
||||||
|
imgSnapshotTest(diagramCode, {});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render with wrapped messages and notes', () => {
|
||||||
|
const diagramCode = `
|
||||||
|
sequenceDiagram
|
||||||
|
participant A
|
||||||
|
participant B
|
||||||
|
|
||||||
|
A ->> B: This is a very long message that should wrap properly in the diagram rendering
|
||||||
|
Note over A,B: This is a very long note that should also wrap properly when rendered in the diagram
|
||||||
|
|
||||||
|
par Wrapped parallel
|
||||||
|
A ->> B: Parallel message 1<br>with explicit line break
|
||||||
|
and
|
||||||
|
B ->> A: Parallel message 2<br>with explicit line break
|
||||||
|
end
|
||||||
|
|
||||||
|
loop Wrapped loop
|
||||||
|
Note right of B: This is a long note<br>in a loop
|
||||||
|
A ->> B: Message in loop
|
||||||
|
end
|
||||||
|
`;
|
||||||
|
imgSnapshotTest(diagramCode, { sequence: { wrap: true } });
|
||||||
|
});
|
||||||
|
describe('Sequence Diagram Rendering with Different Participant Types', () => {
|
||||||
|
it('should render a sequence diagram with various participant types', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
participant User@{ "type": "actor" }
|
||||||
|
participant AuthService@{ "type": "control" }
|
||||||
|
participant UI@{ "type": "boundary" }
|
||||||
|
participant OrderController@{ "type": "control" }
|
||||||
|
participant Product@{ "type": "entity" }
|
||||||
|
participant MongoDB@{ "type": "database" }
|
||||||
|
participant Products@{ "type": "collections" }
|
||||||
|
participant OrderQueue@{ "type": "queue" }
|
||||||
|
User ->> UI: Login request
|
||||||
|
UI ->> AuthService: Validate credentials
|
||||||
|
AuthService -->> UI: Authentication token
|
||||||
|
UI ->> OrderController: Place order
|
||||||
|
OrderController ->> Product: Check availability
|
||||||
|
Product -->> OrderController: Available
|
||||||
|
OrderController ->> MongoDB: Save order
|
||||||
|
MongoDB -->> OrderController: Order saved
|
||||||
|
OrderController ->> OrderQueue: Process payment
|
||||||
|
OrderQueue -->> User: Order confirmation
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render participant creation and destruction with different types', () => {
|
||||||
|
imgSnapshotTest(`
|
||||||
|
sequenceDiagram
|
||||||
|
participant Alice@{ "type" : "boundary" }
|
||||||
|
Alice->>Bob: Hello Bob, how are you ?
|
||||||
|
Bob->>Alice: Fine, thank you. And you?
|
||||||
|
create participant Carl@{ "type" : "control" }
|
||||||
|
Alice->>Carl: Hi Carl!
|
||||||
|
create actor D as Donald
|
||||||
|
Carl->>D: Hi!
|
||||||
|
destroy Carl
|
||||||
|
Alice-xCarl: We are too many
|
||||||
|
destroy Bob
|
||||||
|
Bob->>Alice: I agree
|
||||||
|
`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should handle complex interactions between different participant types', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
box rgb(200,220,255) Authentication
|
||||||
|
participant User@{ "type": "actor" }
|
||||||
|
participant LoginUI@{ "type": "boundary" }
|
||||||
|
participant AuthService@{ "type": "control" }
|
||||||
|
participant UserDB@{ "type": "database" }
|
||||||
|
end
|
||||||
|
|
||||||
|
box rgb(200,255,220) Order Processing
|
||||||
|
participant Order@{ "type": "entity" }
|
||||||
|
participant OrderQueue@{ "type": "queue" }
|
||||||
|
participant AuditLogs@{ "type": "collections" }
|
||||||
|
end
|
||||||
|
|
||||||
|
User ->> LoginUI: Enter credentials
|
||||||
|
LoginUI ->> AuthService: Validate
|
||||||
|
AuthService ->> UserDB: Query user
|
||||||
|
UserDB -->> AuthService: User data
|
||||||
|
|
||||||
|
alt Valid credentials
|
||||||
|
AuthService -->> LoginUI: Success
|
||||||
|
LoginUI -->> User: Welcome
|
||||||
|
|
||||||
|
par Place order
|
||||||
|
User ->> Order: New order
|
||||||
|
Order ->> OrderQueue: Process
|
||||||
|
and
|
||||||
|
Order ->> AuditLogs: Record
|
||||||
|
end
|
||||||
|
|
||||||
|
loop Until confirmed
|
||||||
|
OrderQueue ->> Order: Update status
|
||||||
|
Order -->> User: Notification
|
||||||
|
end
|
||||||
|
else Invalid credentials
|
||||||
|
AuthService --x LoginUI: Failure
|
||||||
|
LoginUI --x User: Retry
|
||||||
|
end
|
||||||
|
`,
|
||||||
|
{ sequence: { useMaxWidth: false } }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render parallel processes with different participant types', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
participant Customer@{ "type": "actor" }
|
||||||
|
participant Frontend@{ "type": "participant" }
|
||||||
|
participant PaymentService@{ "type": "boundary" }
|
||||||
|
participant InventoryManager@{ "type": "control" }
|
||||||
|
participant Order@{ "type": "entity" }
|
||||||
|
participant OrdersDB@{ "type": "database" }
|
||||||
|
participant NotificationQueue@{ "type": "queue" }
|
||||||
|
|
||||||
|
Customer ->> Frontend: Place order
|
||||||
|
Frontend ->> Order: Create order
|
||||||
|
par Parallel Processing
|
||||||
|
Order ->> PaymentService: Process payment
|
||||||
|
and
|
||||||
|
Order ->> InventoryManager: Reserve items
|
||||||
|
end
|
||||||
|
PaymentService -->> Order: Payment confirmed
|
||||||
|
InventoryManager -->> Order: Items reserved
|
||||||
|
Order ->> OrdersDB: Save finalized order
|
||||||
|
OrdersDB -->> Order: Order saved
|
||||||
|
Order ->> NotificationQueue: Send confirmation
|
||||||
|
NotificationQueue -->> Customer: Order confirmation
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
it('should render different participant types with notes and loops', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
actor Admin
|
||||||
|
participant Dashboard
|
||||||
|
participant AuthService@{ "type" : "boundary" }
|
||||||
|
participant UserManager@{ "type" : "control" }
|
||||||
|
participant UserProfile@{ "type" : "entity" }
|
||||||
|
participant UserDB@{ "type" : "database" }
|
||||||
|
participant Logs@{ "type" : "database" }
|
||||||
|
|
||||||
|
Admin ->> Dashboard: Open user management
|
||||||
|
loop Authentication check
|
||||||
|
Dashboard ->> AuthService: Verify admin rights
|
||||||
|
AuthService ->> Dashboard: Access granted
|
||||||
|
end
|
||||||
|
Dashboard ->> UserManager: List users
|
||||||
|
UserManager ->> UserDB: Query users
|
||||||
|
UserDB ->> UserManager: Return user data
|
||||||
|
Note right of UserDB: Encrypted data<br/>requires decryption
|
||||||
|
UserManager ->> UserProfile: Format profiles
|
||||||
|
UserProfile ->> UserManager: Formatted data
|
||||||
|
UserManager ->> Dashboard: Display users
|
||||||
|
Dashboard ->> Logs: Record access
|
||||||
|
Logs ->> Admin: Audit trail
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render different participant types with alternative flows', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
actor Client
|
||||||
|
participant MobileApp
|
||||||
|
participant CloudService@{ "type" : "boundary" }
|
||||||
|
participant DataProcessor@{ "type" : "control" }
|
||||||
|
participant Transaction@{ "type" : "entity" }
|
||||||
|
participant TransactionsDB@{ "type" : "database" }
|
||||||
|
participant EventBus@{ "type" : "queue" }
|
||||||
|
|
||||||
|
Client ->> MobileApp: Initiate transaction
|
||||||
|
MobileApp ->> CloudService: Authenticate
|
||||||
|
alt Authentication successful
|
||||||
|
CloudService -->> MobileApp: Auth token
|
||||||
|
MobileApp ->> DataProcessor: Process data
|
||||||
|
DataProcessor ->> Transaction: Create transaction
|
||||||
|
Transaction ->> TransactionsDB: Save record
|
||||||
|
TransactionsDB -->> Transaction: Confirmation
|
||||||
|
Transaction ->> EventBus: Publish event
|
||||||
|
EventBus -->> Client: Notification
|
||||||
|
else Authentication failed
|
||||||
|
CloudService -->> MobileApp: Error
|
||||||
|
MobileApp -->> Client: Show error
|
||||||
|
end
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render different participant types with wrapping text', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
participant B@{ "type" : "boundary" }
|
||||||
|
participant C@{ "type" : "control" }
|
||||||
|
participant E@{ "type" : "entity" }
|
||||||
|
participant DB@{ "type" : "database" }
|
||||||
|
participant COL@{ "type" : "collections" }
|
||||||
|
participant Q@{ "type" : "queue" }
|
||||||
|
|
||||||
|
FE ->> B: Another long message<br/>with explicit<br/>line breaks
|
||||||
|
B -->> FE: Response message that is also quite long and needs to wrap
|
||||||
|
FE ->> C: Process data
|
||||||
|
C ->> E: Validate
|
||||||
|
E -->> C: Validation result
|
||||||
|
C ->> DB: Save
|
||||||
|
DB -->> C: Save result
|
||||||
|
C ->> COL: Log
|
||||||
|
COL -->> Q: Forward
|
||||||
|
Q -->> LongNameUser: Final response with confirmation of all actions taken
|
||||||
|
`,
|
||||||
|
{ sequence: { wrap: true } }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Sequence Diagram - New Participant Types with Long Notes and Messages', () => {
|
||||||
|
it('should render long notes left of boundary', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
participant Alice@{ "type" : "boundary" }
|
||||||
|
actor Bob
|
||||||
|
Alice->>Bob: Hola
|
||||||
|
Note left of Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
||||||
|
Bob->>Alice: I'm short though
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render wrapped long notes left of control', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
participant Alice@{ "type" : "control" }
|
||||||
|
actor Bob
|
||||||
|
Alice->>Bob: Hola
|
||||||
|
Note left of Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
||||||
|
Bob->>Alice: I'm short though
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render long notes right of entity', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
participant Alice@{ "type" : "entity" }
|
||||||
|
actor Bob
|
||||||
|
Alice->>Bob: Hola
|
||||||
|
Note right of Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
||||||
|
Bob->>Alice: I'm short though
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render wrapped long notes right of database', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
participant Alice@{ "type" : "database" }
|
||||||
|
actor Bob
|
||||||
|
Alice->>Bob: Hola
|
||||||
|
Note right of Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
||||||
|
Bob->>Alice: I'm short though
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render long notes over collections', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
participant Alice@{ "type" : "collections" }
|
||||||
|
actor Bob
|
||||||
|
Alice->>Bob: Hola
|
||||||
|
Note over Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
||||||
|
Bob->>Alice: I'm short though
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render wrapped long notes over queue', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
participant Alice@{ "type" : "queue" }
|
||||||
|
actor Bob
|
||||||
|
Alice->>Bob: Hola
|
||||||
|
Note over Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
||||||
|
Bob->>Alice: I'm short though
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render notes over actor and boundary', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
actor Alice
|
||||||
|
participant Charlie@{ "type" : "boundary" }
|
||||||
|
note over Alice: Some note
|
||||||
|
note over Charlie: Other note
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render long messages from database to collections', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
participant Alice@{ "type" : "database" }
|
||||||
|
participant Bob@{ "type" : "collections" }
|
||||||
|
Alice->>Bob: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
||||||
|
Bob->>Alice: I'm short though
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render wrapped long messages from control to entity', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
participant Alice@{ "type" : "control" }
|
||||||
|
participant Bob@{ "type" : "entity" }
|
||||||
|
Alice->>Bob:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
||||||
|
Bob->>Alice: I'm short though
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render long messages from queue to boundary', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
participant Alice@{ "type" : "queue" }
|
||||||
|
participant Bob@{ "type" : "boundary" }
|
||||||
|
Alice->>Bob: I'm short
|
||||||
|
Bob->>Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render wrapped long messages from actor to database', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
actor Alice
|
||||||
|
participant Bob@{ "type" : "database" }
|
||||||
|
Alice->>Bob: I'm short
|
||||||
|
Bob->>Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('svg size', () => {
|
||||||
|
it('should render a sequence diagram when useMaxWidth is true (default)', () => {
|
||||||
|
renderGraph(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
actor Alice
|
||||||
|
participant Bob@{ "type" : "boundary" }
|
||||||
|
participant John@{ "type" : "control" }
|
||||||
|
Alice ->> Bob: Hello Bob, how are you?
|
||||||
|
Bob-->>John: How about you John?
|
||||||
|
Bob--x Alice: I am good thanks!
|
||||||
|
Bob-x John: I am good thanks!
|
||||||
|
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
|
||||||
|
Bob-->Alice: Checking with John...
|
||||||
|
alt either this
|
||||||
|
Alice->>John: Yes
|
||||||
|
else or this
|
||||||
|
Alice->>John: No
|
||||||
|
else or this will happen
|
||||||
|
Alice->John: Maybe
|
||||||
|
end
|
||||||
|
par this happens in parallel
|
||||||
|
Alice -->> Bob: Parallel message 1
|
||||||
|
and
|
||||||
|
Alice -->> John: Parallel message 2
|
||||||
|
end
|
||||||
|
`,
|
||||||
|
{ sequence: { useMaxWidth: true } }
|
||||||
|
);
|
||||||
|
cy.get('svg').should((svg) => {
|
||||||
|
expect(svg).to.have.attr('width', '100%');
|
||||||
|
const style = svg.attr('style');
|
||||||
|
expect(style).to.match(/^max-width: [\d.]+px;$/);
|
||||||
|
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
|
||||||
|
expect(maxWidthValue).to.be.within(820 * 0.95, 820 * 1.05);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render a sequence diagram when useMaxWidth is false', () => {
|
||||||
|
renderGraph(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
actor Alice
|
||||||
|
participant Bob@{ "type" : "boundary" }
|
||||||
|
participant John@{ "type" : "control" }
|
||||||
|
Alice ->> Bob: Hello Bob, how are you?
|
||||||
|
Bob-->>John: How about you John?
|
||||||
|
Bob--x Alice: I am good thanks!
|
||||||
|
Bob-x John: I am good thanks!
|
||||||
|
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
|
||||||
|
Bob-->Alice: Checking with John...
|
||||||
|
alt either this
|
||||||
|
Alice->>John: Yes
|
||||||
|
else or this
|
||||||
|
Alice->>John: No
|
||||||
|
else or this will happen
|
||||||
|
Alice->John: Maybe
|
||||||
|
end
|
||||||
|
par this happens in parallel
|
||||||
|
Alice -->> Bob: Parallel message 1
|
||||||
|
and
|
||||||
|
Alice -->> John: Parallel message 2
|
||||||
|
end
|
||||||
|
`,
|
||||||
|
{ sequence: { useMaxWidth: false } }
|
||||||
|
);
|
||||||
|
cy.get('svg').should((svg) => {
|
||||||
|
const width = parseFloat(svg.attr('width'));
|
||||||
|
expect(width).to.be.within(820 * 0.95, 820 * 1.05);
|
||||||
|
expect(svg).to.not.have.attr('style');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
@@ -893,6 +893,17 @@ describe('Sequence diagram', () => {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should handle bidirectional arrows with autonumber', () => {
|
||||||
|
imgSnapshotTest(`
|
||||||
|
sequenceDiagram
|
||||||
|
autonumber
|
||||||
|
participant A
|
||||||
|
participant B
|
||||||
|
A<<->>B: This is a bidirectional message
|
||||||
|
A->B: This is a normal message`);
|
||||||
|
});
|
||||||
|
|
||||||
it('should support actor links and properties when not mirrored EXPERIMENTAL: USE WITH CAUTION', () => {
|
it('should support actor links and properties when not mirrored EXPERIMENTAL: USE WITH CAUTION', () => {
|
||||||
//Be aware that the syntax for "properties" is likely to be changed.
|
//Be aware that the syntax for "properties" is likely to be changed.
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
|
@@ -602,6 +602,231 @@ State1 --> [*]
|
|||||||
--
|
--
|
||||||
55
|
55
|
||||||
}
|
}
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('should render edge labels correctly', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`---
|
||||||
|
title: On The Way To Something Something DarkSide
|
||||||
|
config:
|
||||||
|
look: default
|
||||||
|
theme: default
|
||||||
|
---
|
||||||
|
|
||||||
|
stateDiagram-v2
|
||||||
|
|
||||||
|
state State1_____________
|
||||||
|
{
|
||||||
|
c0
|
||||||
|
}
|
||||||
|
|
||||||
|
state State2_____________
|
||||||
|
{
|
||||||
|
c1
|
||||||
|
}
|
||||||
|
|
||||||
|
state State3_____________
|
||||||
|
{
|
||||||
|
c7
|
||||||
|
}
|
||||||
|
|
||||||
|
state State4_____________
|
||||||
|
{
|
||||||
|
c2
|
||||||
|
}
|
||||||
|
|
||||||
|
state State5_____________
|
||||||
|
{
|
||||||
|
c3
|
||||||
|
}
|
||||||
|
|
||||||
|
state State6_____________
|
||||||
|
{
|
||||||
|
c4
|
||||||
|
}
|
||||||
|
|
||||||
|
state State7_____________
|
||||||
|
{
|
||||||
|
c5
|
||||||
|
}
|
||||||
|
|
||||||
|
state State8_____________
|
||||||
|
{
|
||||||
|
c6
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[*] --> State1_____________
|
||||||
|
State1_____________ --> State2_____________ : Transition1_____
|
||||||
|
State2_____________ --> State4_____________ : Transition2_____
|
||||||
|
State2_____________ --> State3_____________ : Transition3_____
|
||||||
|
State3_____________ --> State2_____________
|
||||||
|
State4_____________ --> State2_____________ : Transition5_____
|
||||||
|
State4_____________ --> State5_____________ : Transition6_____
|
||||||
|
State5_____________ --> State6_____________ : Transition7_____
|
||||||
|
State6_____________ --> State4_____________ : Transition8_____
|
||||||
|
State2_____________ --> State7_____________ : Transition4_____
|
||||||
|
State4_____________ --> State7_____________ : Transition4_____
|
||||||
|
State5_____________ --> State7_____________ : Transition4_____
|
||||||
|
State6_____________ --> State7_____________ : Transition4_____
|
||||||
|
State7_____________ --> State1_____________ : Transition9_____
|
||||||
|
State5_____________ --> State8_____________ : Transition10____
|
||||||
|
State8_____________ --> State5_____________ : Transition11____
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('should render edge labels correctly with multiple transitions', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`---
|
||||||
|
title: Multiple Transitions
|
||||||
|
config:
|
||||||
|
look: default
|
||||||
|
theme: default
|
||||||
|
---
|
||||||
|
|
||||||
|
stateDiagram-v2
|
||||||
|
|
||||||
|
state State1_____________
|
||||||
|
{
|
||||||
|
c0
|
||||||
|
}
|
||||||
|
|
||||||
|
state State2_____________
|
||||||
|
{
|
||||||
|
c1
|
||||||
|
}
|
||||||
|
|
||||||
|
state State3_____________
|
||||||
|
{
|
||||||
|
c7
|
||||||
|
}
|
||||||
|
|
||||||
|
state State4_____________
|
||||||
|
{
|
||||||
|
c2
|
||||||
|
}
|
||||||
|
|
||||||
|
state State5_____________
|
||||||
|
{
|
||||||
|
c3
|
||||||
|
}
|
||||||
|
|
||||||
|
state State6_____________
|
||||||
|
{
|
||||||
|
c4
|
||||||
|
}
|
||||||
|
|
||||||
|
state State7_____________
|
||||||
|
{
|
||||||
|
c5
|
||||||
|
}
|
||||||
|
|
||||||
|
state State8_____________
|
||||||
|
{
|
||||||
|
c6
|
||||||
|
}
|
||||||
|
|
||||||
|
state State9_____________
|
||||||
|
{
|
||||||
|
c9
|
||||||
|
}
|
||||||
|
|
||||||
|
[*] --> State1_____________
|
||||||
|
State1_____________ --> State2_____________ : Transition1_____
|
||||||
|
State2_____________ --> State4_____________ : Transition2_____
|
||||||
|
State2_____________ --> State3_____________ : Transition3_____
|
||||||
|
State3_____________ --> State2_____________
|
||||||
|
State4_____________ --> State2_____________ : Transition5_____
|
||||||
|
State4_____________ --> State5_____________ : Transition6_____
|
||||||
|
State5_____________ --> State6_____________ : Transition7_____
|
||||||
|
State6_____________ --> State4_____________ : Transition8_____
|
||||||
|
State2_____________ --> State7_____________ : Transition4_____
|
||||||
|
State4_____________ --> State7_____________ : Transition4_____
|
||||||
|
State5_____________ --> State7_____________ : Transition4_____
|
||||||
|
State6_____________ --> State7_____________ : Transition4_____
|
||||||
|
State7_____________ --> State1_____________ : Transition9_____
|
||||||
|
State5_____________ --> State8_____________ : Transition10____
|
||||||
|
State8_____________ --> State5_____________ : Transition11____
|
||||||
|
State9_____________ --> State8_____________ : Transition12____
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render edge labels correctly with multiple states', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`---
|
||||||
|
title: Multiple States
|
||||||
|
config:
|
||||||
|
look: default
|
||||||
|
theme: default
|
||||||
|
---
|
||||||
|
|
||||||
|
stateDiagram-v2
|
||||||
|
|
||||||
|
state State1_____________
|
||||||
|
{
|
||||||
|
c0
|
||||||
|
}
|
||||||
|
|
||||||
|
state State2_____________
|
||||||
|
{
|
||||||
|
c1
|
||||||
|
}
|
||||||
|
|
||||||
|
state State3_____________
|
||||||
|
{
|
||||||
|
c7
|
||||||
|
}
|
||||||
|
|
||||||
|
state State4_____________
|
||||||
|
{
|
||||||
|
c2
|
||||||
|
}
|
||||||
|
|
||||||
|
state State5_____________
|
||||||
|
{
|
||||||
|
c3
|
||||||
|
}
|
||||||
|
|
||||||
|
state State6_____________
|
||||||
|
{
|
||||||
|
c4
|
||||||
|
}
|
||||||
|
|
||||||
|
state State7_____________
|
||||||
|
{
|
||||||
|
c5
|
||||||
|
}
|
||||||
|
|
||||||
|
state State8_____________
|
||||||
|
{
|
||||||
|
c6
|
||||||
|
}
|
||||||
|
|
||||||
|
state State9_____________
|
||||||
|
{
|
||||||
|
c9
|
||||||
|
}
|
||||||
|
|
||||||
|
state State10_____________
|
||||||
|
{
|
||||||
|
c10
|
||||||
|
}
|
||||||
|
|
||||||
|
[*] --> State1_____________
|
||||||
|
State1_____________ --> State2_____________ : Transition1_____
|
||||||
|
State2_____________ --> State3_____________ : Transition2_____
|
||||||
|
State3_____________ --> State4_____________ : Transition3_____
|
||||||
|
State4_____________ --> State5_____________ : Transition4_____
|
||||||
|
State5_____________ --> State6_____________ : Transition5_____
|
||||||
|
State6_____________ --> State7_____________ : Transition6_____
|
||||||
|
State7_____________ --> State8_____________ : Transition7_____
|
||||||
|
State8_____________ --> State9_____________ : Transition8_____
|
||||||
|
State9_____________ --> State10_____________ : Transition9_____
|
||||||
`,
|
`,
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
|
@@ -161,4 +161,68 @@ describe('Timeline diagram', () => {
|
|||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('11: should render timeline with many stacked events and proper timeline line length', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`timeline
|
||||||
|
title Medical Device Lifecycle
|
||||||
|
section Pre-Development
|
||||||
|
Quality Management System : Regulatory Compliance : Risk Management
|
||||||
|
section Development
|
||||||
|
Management Responsibility : Planning Activities : Human Resources
|
||||||
|
Resource Management : Management Reviews : Infrastructure
|
||||||
|
section Post-Development
|
||||||
|
Product Realization Activities : Planning Activities : Customer-related Processes
|
||||||
|
Post-Production Activities : Feedback : Complaints : Adverse Events
|
||||||
|
: Research and Development : Purchasing Activities
|
||||||
|
: Production Activities : Installation Activities
|
||||||
|
: Servicing Activities : Post-Market Surveillance
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('12: should render timeline with proper vertical line lengths for all columns', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`---
|
||||||
|
config:
|
||||||
|
theme: base
|
||||||
|
themeVariables:
|
||||||
|
fontFamily: Fira Sans
|
||||||
|
fontSize: 17px
|
||||||
|
cScale0: '#b3cde0'
|
||||||
|
cScale1: '#f49090'
|
||||||
|
cScale2: '#85d5b8'
|
||||||
|
---
|
||||||
|
|
||||||
|
timeline
|
||||||
|
title Medical Device Lifecycle
|
||||||
|
section Planning
|
||||||
|
Quality Management System (4): Regulatory Compliance (4.1.1)
|
||||||
|
: Risk Management (4.1.2)
|
||||||
|
Management Resposibility (5): Planning Activities (5.4)
|
||||||
|
: Management Reviews (5.6)
|
||||||
|
Resource Management (6): Human Resources (6.2)
|
||||||
|
: Infrastructure (6.3)
|
||||||
|
section Realization
|
||||||
|
Research and Development (7.3): RnD Planning (7.3.2)
|
||||||
|
: Inputs (7.3.3)
|
||||||
|
: Outputs (7.3.4)
|
||||||
|
: Review (7.3.5)
|
||||||
|
: Verification (7.3.6)
|
||||||
|
: Validation (7.3.7)
|
||||||
|
Purchasing (7.4): Purchasing Process (7.4.1)
|
||||||
|
: Purchasing Information (7.4.2)
|
||||||
|
Production (7.5): Production Activities (7.5.1)
|
||||||
|
: Production Feedback (8.2.1)
|
||||||
|
Installation (7.5.3): Installation Activities (7.5.3)
|
||||||
|
Servicing (7.5.4): Servicing Activities (7.5.4)
|
||||||
|
section Post-Production
|
||||||
|
Post-Market Activities (8): Feedback (8.2.1)
|
||||||
|
: Complaints (8.2.2)
|
||||||
|
: Adverse Events (8.2.3)
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
382
cypress/integration/rendering/treemap.spec.ts
Normal file
382
cypress/integration/rendering/treemap.spec.ts
Normal file
@@ -0,0 +1,382 @@
|
|||||||
|
import { imgSnapshotTest } from '../../helpers/util.ts';
|
||||||
|
|
||||||
|
describe('Treemap Diagram', () => {
|
||||||
|
it('1: should render a basic treemap', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`treemap-beta
|
||||||
|
"Category A"
|
||||||
|
"Item A1": 10
|
||||||
|
"Item A2": 20
|
||||||
|
"Category B"
|
||||||
|
"Item B1": 15
|
||||||
|
"Item B2": 25
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('2: should render a hierarchical treemap', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`treemap-beta
|
||||||
|
"Products"
|
||||||
|
"Electronics"
|
||||||
|
"Phones": 50
|
||||||
|
"Computers": 30
|
||||||
|
"Accessories": 20
|
||||||
|
"Clothing"
|
||||||
|
"Men's"
|
||||||
|
"Shirts": 10
|
||||||
|
"Pants": 15
|
||||||
|
"Women's"
|
||||||
|
"Dresses": 20
|
||||||
|
"Skirts": 10
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('3: should render a treemap with styling using classDef', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`treemap-beta
|
||||||
|
"Section 1"
|
||||||
|
"Leaf 1.1": 12
|
||||||
|
"Section 1.2":::class1
|
||||||
|
"Leaf 1.2.1": 12
|
||||||
|
"Section 2"
|
||||||
|
"Leaf 2.1": 20:::class1
|
||||||
|
"Leaf 2.2": 25
|
||||||
|
"Leaf 2.3": 12
|
||||||
|
|
||||||
|
classDef class1 fill:red,color:blue,stroke:#FFD600;
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('4: should handle long text that wraps', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`treemap-beta
|
||||||
|
"Main Category"
|
||||||
|
"This is a very long item name that should wrap to the next line when rendered in the treemap diagram": 50
|
||||||
|
"Short item": 20
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('5: should render with a forest theme', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`---
|
||||||
|
config:
|
||||||
|
theme: forest
|
||||||
|
---
|
||||||
|
treemap-beta
|
||||||
|
"Category A"
|
||||||
|
"Item A1": 10
|
||||||
|
"Item A2": 20
|
||||||
|
"Category B"
|
||||||
|
"Item B1": 15
|
||||||
|
"Item B2": 25
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('6: should handle multiple levels of nesting', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`treemap-beta
|
||||||
|
"Level 1"
|
||||||
|
"Level 2A"
|
||||||
|
"Level 3A": 10
|
||||||
|
"Level 3B": 15
|
||||||
|
"Level 2B"
|
||||||
|
"Level 3C": 20
|
||||||
|
"Level 3D"
|
||||||
|
"Level 4A": 5
|
||||||
|
"Level 4B": 5
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('7: should handle classDef with multiple styles', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`treemap-beta
|
||||||
|
"Main"
|
||||||
|
"A": 20
|
||||||
|
"B":::important
|
||||||
|
"B1": 10
|
||||||
|
"B2": 15
|
||||||
|
"C": 5:::secondary
|
||||||
|
|
||||||
|
classDef important fill:#f96,stroke:#333,stroke-width:2px;
|
||||||
|
classDef secondary fill:#6cf,stroke:#333,stroke-dasharray:5 5;
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('8: should handle dollar value formatting with thousands separator', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`---
|
||||||
|
config:
|
||||||
|
treemap:
|
||||||
|
valueFormat: "$0,0"
|
||||||
|
---
|
||||||
|
treemap
|
||||||
|
"Budget"
|
||||||
|
"Operations"
|
||||||
|
"Salaries": 700000
|
||||||
|
"Equipment": 200000
|
||||||
|
"Supplies": 100000
|
||||||
|
"Marketing"
|
||||||
|
"Advertising": 400000
|
||||||
|
"Events": 100000
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('8a: should handle percentage formatting', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`---
|
||||||
|
config:
|
||||||
|
treemap:
|
||||||
|
valueFormat: ".1%"
|
||||||
|
---
|
||||||
|
treemap-beta
|
||||||
|
"Market Share"
|
||||||
|
"Company A": 0.35
|
||||||
|
"Company B": 0.25
|
||||||
|
"Company C": 0.15
|
||||||
|
"Others": 0.25
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('8b: should handle decimal formatting', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`---
|
||||||
|
config:
|
||||||
|
treemap:
|
||||||
|
valueFormat: ".2f"
|
||||||
|
---
|
||||||
|
treemap-beta
|
||||||
|
"Metrics"
|
||||||
|
"Conversion Rate": 0.0567
|
||||||
|
"Bounce Rate": 0.6723
|
||||||
|
"Click-through Rate": 0.1289
|
||||||
|
"Engagement": 0.4521
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('8c: should handle dollar sign with decimal places', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`---
|
||||||
|
config:
|
||||||
|
treemap:
|
||||||
|
valueFormat: "$.2f"
|
||||||
|
---
|
||||||
|
treemap-beta
|
||||||
|
"Product Prices"
|
||||||
|
"Basic": 19.99
|
||||||
|
"Standard": 49.99
|
||||||
|
"Premium": 99.99
|
||||||
|
"Enterprise": 199.99
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('8d: should handle dollar sign with thousands separator and decimal places', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`---
|
||||||
|
config:
|
||||||
|
treemap:
|
||||||
|
valueFormat: "$,.2f"
|
||||||
|
---
|
||||||
|
treemap-beta
|
||||||
|
"Revenue"
|
||||||
|
"Q1": 1250345.75
|
||||||
|
"Q2": 1645789.25
|
||||||
|
"Q3": 1845123.50
|
||||||
|
"Q4": 2145678.75
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('8e: should handle simple thousands separator', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`---
|
||||||
|
config:
|
||||||
|
treemap:
|
||||||
|
valueFormat: ","
|
||||||
|
---
|
||||||
|
treemap-beta
|
||||||
|
"User Counts"
|
||||||
|
"Active Users": 1250345
|
||||||
|
"New Signups": 45789
|
||||||
|
"Churned": 12350
|
||||||
|
"Converted": 78975
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('8f: should handle valueFormat set via directive with dollar and thousands separator', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`---
|
||||||
|
config:
|
||||||
|
treemap:
|
||||||
|
valueFormat: "$,.0f"
|
||||||
|
---
|
||||||
|
treemap-beta
|
||||||
|
"Sales by Region"
|
||||||
|
"North": 1234567
|
||||||
|
"South": 7654321
|
||||||
|
"East": 4567890
|
||||||
|
"West": 9876543
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('8g: should handle scientific notation format', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`---
|
||||||
|
config:
|
||||||
|
treemap:
|
||||||
|
valueFormat: ".2e"
|
||||||
|
---
|
||||||
|
treemap-beta
|
||||||
|
"Scientific Values"
|
||||||
|
"Value 1": 1234567
|
||||||
|
"Value 2": 0.0000123
|
||||||
|
"Value 3": 1000000000
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('9: should handle a complex example with multiple features', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`---
|
||||||
|
config:
|
||||||
|
theme: dark
|
||||||
|
treemap:
|
||||||
|
valueFormat: "$0,0"
|
||||||
|
---
|
||||||
|
treemap-beta
|
||||||
|
"Company Budget"
|
||||||
|
"Engineering":::engineering
|
||||||
|
"Frontend": 300000
|
||||||
|
"Backend": 400000
|
||||||
|
"DevOps": 200000
|
||||||
|
"Marketing":::marketing
|
||||||
|
"Digital": 250000
|
||||||
|
"Print": 100000
|
||||||
|
"Events": 150000
|
||||||
|
"Sales":::sales
|
||||||
|
"Direct": 500000
|
||||||
|
"Channel": 300000
|
||||||
|
|
||||||
|
classDef engineering fill:#6b9bc3,stroke:#333;
|
||||||
|
classDef marketing fill:#c36b9b,stroke:#333;
|
||||||
|
classDef sales fill:#c3a66b,stroke:#333;
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('10: should render the example from documentation', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
treemap-beta
|
||||||
|
"Section 1"
|
||||||
|
"Leaf 1.1": 12
|
||||||
|
"Section 1.2":::class1
|
||||||
|
"Leaf 1.2.1": 12
|
||||||
|
"Section 2"
|
||||||
|
"Leaf 2.1": 20:::class1
|
||||||
|
"Leaf 2.2": 25
|
||||||
|
"Leaf 2.3": 12
|
||||||
|
|
||||||
|
classDef class1 fill:red,color:blue,stroke:#FFD600;
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('11: should handle comments', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
treemap-beta
|
||||||
|
%% This is a comment
|
||||||
|
"Category A"
|
||||||
|
"Item A1": 10
|
||||||
|
"Item A2": 20
|
||||||
|
%% Another comment
|
||||||
|
"Category B"
|
||||||
|
"Item B1": 15
|
||||||
|
"Item B2": 25
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
/*
|
||||||
|
it.skip('12: should render a treemap with title', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
treemap-beta
|
||||||
|
title Treemap with Title
|
||||||
|
"Category A"
|
||||||
|
"Item A1": 10
|
||||||
|
"Item A2": 20
|
||||||
|
"Category B"
|
||||||
|
"Item B1": 15
|
||||||
|
"Item B2": 25
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.skip('13: should render a treemap with accessibility attributes', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
treemap-beta
|
||||||
|
accTitle: Accessible Treemap Title
|
||||||
|
accDescr: This is a description of the treemap for accessibility purposes
|
||||||
|
"Category A"
|
||||||
|
"Item A1": 10
|
||||||
|
"Item A2": 20
|
||||||
|
"Category B"
|
||||||
|
"Item B1": 15
|
||||||
|
"Item B2": 25
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.skip('14: should render a treemap with title and accessibility attributes', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
treemap
|
||||||
|
title Treemap with Title and Accessibility
|
||||||
|
accTitle: Accessible Treemap Title
|
||||||
|
accDescr: This is a description of the treemap for accessibility purposes
|
||||||
|
"Category A"
|
||||||
|
"Item A1": 10
|
||||||
|
"Item A2": 20
|
||||||
|
"Category B"
|
||||||
|
"Item B1": 15
|
||||||
|
"Item B2": 25
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
});
|
@@ -1,7 +1,7 @@
|
|||||||
import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts';
|
import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts';
|
||||||
|
|
||||||
describe('XY Chart', () => {
|
describe('XY Chart', () => {
|
||||||
it('should render the simplest possible chart', () => {
|
it('should render the simplest possible xy-beta chart', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
xychart-beta
|
xychart-beta
|
||||||
@@ -10,10 +10,19 @@ describe('XY Chart', () => {
|
|||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
it('should render the simplest possible xy chart', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
xychart
|
||||||
|
line [10, 30, 20]
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
it('Should render a complete chart', () => {
|
it('Should render a complete chart', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
@@ -26,7 +35,7 @@ describe('XY Chart', () => {
|
|||||||
it('Should render a chart without title', () => {
|
it('Should render a chart without title', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
xychart-beta
|
xychart
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
|
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
|
||||||
@@ -38,7 +47,7 @@ describe('XY Chart', () => {
|
|||||||
it('y-axis title not required', () => {
|
it('y-axis title not required', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
xychart-beta
|
xychart
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis 4000 --> 11000
|
y-axis 4000 --> 11000
|
||||||
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
|
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
|
||||||
@@ -50,7 +59,7 @@ describe('XY Chart', () => {
|
|||||||
it('Should render a chart without y-axis with different range', () => {
|
it('Should render a chart without y-axis with different range', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
xychart-beta
|
xychart
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
bar [5000, 6000, 7500, 8200, 9500, 10500, 14000, 3200, 9200, 9900, 3400, 6000]
|
bar [5000, 6000, 7500, 8200, 9500, 10500, 14000, 3200, 9200, 9900, 3400, 6000]
|
||||||
line [2000, 7000, 6500, 9200, 9500, 7500, 11000, 10200, 3200, 8500, 7000, 8800]
|
line [2000, 7000, 6500, 9200, 9500, 7500, 11000, 10200, 3200, 8500, 7000, 8800]
|
||||||
@@ -61,7 +70,7 @@ describe('XY Chart', () => {
|
|||||||
it('x axis title not required', () => {
|
it('x axis title not required', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
xychart-beta
|
xychart
|
||||||
x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
bar [5000, 6000, 7500, 8200, 9500, 10500, 14000, 3200, 9200, 9900, 3400, 6000]
|
bar [5000, 6000, 7500, 8200, 9500, 10500, 14000, 3200, 9200, 9900, 3400, 6000]
|
||||||
line [2000, 7000, 6500, 9200, 9500, 7500, 11000, 10200, 3200, 8500, 7000, 8800]
|
line [2000, 7000, 6500, 9200, 9500, 7500, 11000, 10200, 3200, 8500, 7000, 8800]
|
||||||
@@ -72,7 +81,7 @@ describe('XY Chart', () => {
|
|||||||
it('Multiple plots can be rendered', () => {
|
it('Multiple plots can be rendered', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
xychart-beta
|
xychart
|
||||||
line [23, 46, 77, 34]
|
line [23, 46, 77, 34]
|
||||||
line [45, 32, 33, 12]
|
line [45, 32, 33, 12]
|
||||||
bar [87, 54, 99, 85]
|
bar [87, 54, 99, 85]
|
||||||
@@ -86,7 +95,7 @@ describe('XY Chart', () => {
|
|||||||
it('Decimals and negative numbers are supported', () => {
|
it('Decimals and negative numbers are supported', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
xychart-beta
|
xychart
|
||||||
y-axis -2.4 --> 3.5
|
y-axis -2.4 --> 3.5
|
||||||
line [+1.3, .6, 2.4, -.34]
|
line [+1.3, .6, 2.4, -.34]
|
||||||
`,
|
`,
|
||||||
@@ -104,7 +113,7 @@ describe('XY Chart', () => {
|
|||||||
height: 20
|
height: 20
|
||||||
plotReservedSpacePercent: 100
|
plotReservedSpacePercent: 100
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
line [5000, 9000, 7500, 6200, 9500, 5500, 11000, 8200, 9200, 9500, 7000, 8800]
|
line [5000, 9000, 7500, 6200, 9500, 5500, 11000, 8200, 9200, 9500, 7000, 8800]
|
||||||
`,
|
`,
|
||||||
{}
|
{}
|
||||||
@@ -130,7 +139,7 @@ describe('XY Chart', () => {
|
|||||||
showTick: false
|
showTick: false
|
||||||
showAxisLine: false
|
showAxisLine: false
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
bar [5000, 9000, 7500, 6200, 9500, 5500, 11000, 8200, 9200, 9500, 7000, 8800]
|
bar [5000, 9000, 7500, 6200, 9500, 5500, 11000, 8200, 9200, 9500, 7000, 8800]
|
||||||
`,
|
`,
|
||||||
{}
|
{}
|
||||||
@@ -140,7 +149,7 @@ describe('XY Chart', () => {
|
|||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
%%{init: {"xyChart": {"width": 1000, "height": 600, "titlePadding": 5, "titleFontSize": 10, "xAxis": {"labelFontSize": "20", "labelPadding": 10, "titleFontSize": 30, "titlePadding": 20, "tickLength": 10, "tickWidth": 5}, "yAxis": {"labelFontSize": "20", "labelPadding": 10, "titleFontSize": 30, "titlePadding": 20, "tickLength": 10, "tickWidth": 5}, "plotBorderWidth": 5, "chartOrientation": "horizontal", "plotReservedSpacePercent": 60 }}}%%
|
%%{init: {"xyChart": {"width": 1000, "height": 600, "titlePadding": 5, "titleFontSize": 10, "xAxis": {"labelFontSize": "20", "labelPadding": 10, "titleFontSize": 30, "titlePadding": 20, "tickLength": 10, "tickWidth": 5}, "yAxis": {"labelFontSize": "20", "labelPadding": 10, "titleFontSize": 30, "titlePadding": 20, "tickLength": 10, "tickWidth": 5}, "plotBorderWidth": 5, "chartOrientation": "horizontal", "plotReservedSpacePercent": 60 }}}%%
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
@@ -181,7 +190,7 @@ describe('XY Chart', () => {
|
|||||||
plotReservedSpacePercent: 60
|
plotReservedSpacePercent: 60
|
||||||
showDataLabel: true
|
showDataLabel: true
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
@@ -202,7 +211,7 @@ describe('XY Chart', () => {
|
|||||||
yAxis:
|
yAxis:
|
||||||
showTitle: false
|
showTitle: false
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
@@ -223,7 +232,7 @@ describe('XY Chart', () => {
|
|||||||
yAxis:
|
yAxis:
|
||||||
showLabel: false
|
showLabel: false
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
@@ -244,7 +253,7 @@ describe('XY Chart', () => {
|
|||||||
yAxis:
|
yAxis:
|
||||||
showTick: false
|
showTick: false
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
@@ -265,7 +274,7 @@ describe('XY Chart', () => {
|
|||||||
yAxis:
|
yAxis:
|
||||||
showAxisLine: false
|
showAxisLine: false
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
@@ -294,7 +303,7 @@ describe('XY Chart', () => {
|
|||||||
xAxisLineColor: "#87ceeb"
|
xAxisLineColor: "#87ceeb"
|
||||||
plotColorPalette: "#008000, #faba63"
|
plotColorPalette: "#008000, #faba63"
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
@@ -307,7 +316,7 @@ describe('XY Chart', () => {
|
|||||||
it('should use the correct distances between data points', () => {
|
it('should use the correct distances between data points', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
xychart-beta
|
xychart
|
||||||
x-axis 0 --> 2
|
x-axis 0 --> 2
|
||||||
line [0, 1, 0, 1]
|
line [0, 1, 0, 1]
|
||||||
bar [1, 0, 1, 0]
|
bar [1, 0, 1, 0]
|
||||||
@@ -325,7 +334,7 @@ describe('XY Chart', () => {
|
|||||||
xyChart:
|
xyChart:
|
||||||
showDataLabel: true
|
showDataLabel: true
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
@@ -344,7 +353,7 @@ describe('XY Chart', () => {
|
|||||||
showDataLabel: true
|
showDataLabel: true
|
||||||
chartOrientation: horizontal
|
chartOrientation: horizontal
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
@@ -357,7 +366,7 @@ describe('XY Chart', () => {
|
|||||||
it('should render vertical bar chart without labels by default', () => {
|
it('should render vertical bar chart without labels by default', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
@@ -375,7 +384,7 @@ describe('XY Chart', () => {
|
|||||||
xyChart:
|
xyChart:
|
||||||
chartOrientation: horizontal
|
chartOrientation: horizontal
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
@@ -393,7 +402,7 @@ describe('XY Chart', () => {
|
|||||||
xyChart:
|
xyChart:
|
||||||
showDataLabel: true
|
showDataLabel: true
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Multiple Bar Plots"
|
title "Multiple Bar Plots"
|
||||||
x-axis Categories [A, B, C]
|
x-axis Categories [A, B, C]
|
||||||
y-axis "Values" 0 --> 100
|
y-axis "Values" 0 --> 100
|
||||||
@@ -412,7 +421,7 @@ describe('XY Chart', () => {
|
|||||||
showDataLabel: true
|
showDataLabel: true
|
||||||
chartOrientation: horizontal
|
chartOrientation: horizontal
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Multiple Bar Plots"
|
title "Multiple Bar Plots"
|
||||||
x-axis Categories [A, B, C]
|
x-axis Categories [A, B, C]
|
||||||
y-axis "Values" 0 --> 100
|
y-axis "Values" 0 --> 100
|
||||||
@@ -430,7 +439,7 @@ describe('XY Chart', () => {
|
|||||||
xyChart:
|
xyChart:
|
||||||
showDataLabel: true
|
showDataLabel: true
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Single Bar Chart"
|
title "Single Bar Chart"
|
||||||
x-axis Categories [A]
|
x-axis Categories [A]
|
||||||
y-axis "Value" 0 --> 100
|
y-axis "Value" 0 --> 100
|
||||||
@@ -449,7 +458,7 @@ describe('XY Chart', () => {
|
|||||||
showDataLabel: true
|
showDataLabel: true
|
||||||
chartOrientation: horizontal
|
chartOrientation: horizontal
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Single Bar Chart"
|
title "Single Bar Chart"
|
||||||
x-axis Categories [A]
|
x-axis Categories [A]
|
||||||
y-axis "Value" 0 --> 100
|
y-axis "Value" 0 --> 100
|
||||||
@@ -467,7 +476,7 @@ describe('XY Chart', () => {
|
|||||||
xyChart:
|
xyChart:
|
||||||
showDataLabel: true
|
showDataLabel: true
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Decimal and Negative Values"
|
title "Decimal and Negative Values"
|
||||||
x-axis Categories [A, B, C]
|
x-axis Categories [A, B, C]
|
||||||
y-axis -10 --> 10
|
y-axis -10 --> 10
|
||||||
@@ -486,7 +495,7 @@ describe('XY Chart', () => {
|
|||||||
showDataLabel: true
|
showDataLabel: true
|
||||||
chartOrientation: horizontal
|
chartOrientation: horizontal
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Decimal and Negative Values"
|
title "Decimal and Negative Values"
|
||||||
x-axis Categories [A, B, C]
|
x-axis Categories [A, B, C]
|
||||||
y-axis -10 --> 10
|
y-axis -10 --> 10
|
||||||
@@ -504,7 +513,7 @@ describe('XY Chart', () => {
|
|||||||
xyChart:
|
xyChart:
|
||||||
showDataLabel: true
|
showDataLabel: true
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan,b,c]
|
x-axis Months [jan,b,c]
|
||||||
y-axis "Revenue (in $)" 4000 --> 12000
|
y-axis "Revenue (in $)" 4000 --> 12000
|
||||||
@@ -561,7 +570,7 @@ describe('XY Chart', () => {
|
|||||||
showDataLabel: true
|
showDataLabel: true
|
||||||
chartOrientation: horizontal
|
chartOrientation: horizontal
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan,b,c]
|
x-axis Months [jan,b,c]
|
||||||
y-axis "Revenue (in $)" 4000 --> 12000
|
y-axis "Revenue (in $)" 4000 --> 12000
|
||||||
@@ -615,7 +624,7 @@ describe('XY Chart', () => {
|
|||||||
xyChart:
|
xyChart:
|
||||||
showDataLabel: true
|
showDataLabel: true
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s]
|
x-axis Months [jan,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s]
|
||||||
y-axis "Revenue (in $)" 4000 --> 12000
|
y-axis "Revenue (in $)" 4000 --> 12000
|
||||||
@@ -672,7 +681,7 @@ describe('XY Chart', () => {
|
|||||||
showDataLabel: true
|
showDataLabel: true
|
||||||
chartOrientation: horizontal
|
chartOrientation: horizontal
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s]
|
x-axis Months [jan,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s]
|
||||||
y-axis "Revenue (in $)" 4000 --> 12000
|
y-axis "Revenue (in $)" 4000 --> 12000
|
||||||
@@ -726,7 +735,7 @@ describe('XY Chart', () => {
|
|||||||
xyChart:
|
xyChart:
|
||||||
showDataLabel: true
|
showDataLabel: true
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan]
|
x-axis Months [jan]
|
||||||
y-axis "Revenue (in $)" 3000 --> 12000
|
y-axis "Revenue (in $)" 3000 --> 12000
|
||||||
@@ -783,7 +792,7 @@ describe('XY Chart', () => {
|
|||||||
showDataLabel: true
|
showDataLabel: true
|
||||||
chartOrientation: horizontal
|
chartOrientation: horizontal
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan]
|
x-axis Months [jan]
|
||||||
y-axis "Revenue (in $)" 3000 --> 12000
|
y-axis "Revenue (in $)" 3000 --> 12000
|
||||||
|
35
cypress/platform/darshan.html
Normal file
35
cypress/platform/darshan.html
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<title>Mermaid Quick Test Page</title>
|
||||||
|
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=" />
|
||||||
|
<style>
|
||||||
|
div.mermaid {
|
||||||
|
font-family: 'Courier New', Courier, monospace !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>Pie chart demos</h1>
|
||||||
|
<pre class="mermaid">
|
||||||
|
pie title Default text position: Animal adoption
|
||||||
|
accTitle: simple pie char demo
|
||||||
|
accDescr: pie chart with 3 sections: dogs, cats, rats. Most are dogs.
|
||||||
|
"dogs" : -60.67
|
||||||
|
"rats" : 40.12
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<script type="module">
|
||||||
|
import mermaid from '/mermaid.esm.mjs';
|
||||||
|
mermaid.initialize({
|
||||||
|
theme: 'forest',
|
||||||
|
logLevel: 3,
|
||||||
|
securityLevel: 'loose',
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -32,8 +32,26 @@
|
|||||||
href="https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&family=Rubik+Mono+One&display=swap"
|
href="https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&family=Rubik+Mono+One&display=swap"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||||
|
<link
|
||||||
|
href="https://fonts.googleapis.com/css2?family=Recursive:wght@300..1000&display=swap"
|
||||||
|
rel="stylesheet"
|
||||||
|
/>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.recursive-mermaid {
|
||||||
|
font-family: 'Recursive', sans-serif;
|
||||||
|
font-optical-sizing: auto;
|
||||||
|
font-weight: 500;
|
||||||
|
font-style: normal;
|
||||||
|
font-variation-settings:
|
||||||
|
'slnt' 0,
|
||||||
|
'CASL' 0,
|
||||||
|
'CRSV' 0.5,
|
||||||
|
'MONO' 0;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
/* background: rgb(221, 208, 208); */
|
/* background: rgb(221, 208, 208); */
|
||||||
/* background: #333; */
|
/* background: #333; */
|
||||||
@@ -45,7 +63,9 @@
|
|||||||
h1 {
|
h1 {
|
||||||
color: grey;
|
color: grey;
|
||||||
}
|
}
|
||||||
|
.mermaid {
|
||||||
|
border: 1px solid red;
|
||||||
|
}
|
||||||
.mermaid2 {
|
.mermaid2 {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -83,6 +103,11 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.class2 {
|
||||||
|
fill: red;
|
||||||
|
fill-opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* tspan {
|
/* tspan {
|
||||||
font-size: 6px !important;
|
font-size: 6px !important;
|
||||||
} */
|
} */
|
||||||
@@ -105,22 +130,287 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: tidy-tree
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
Origins
|
||||||
|
Long history
|
||||||
|
::icon(fa fa-book)
|
||||||
|
Popularisation
|
||||||
|
British popular psychology author Tony Buzan
|
||||||
|
Research
|
||||||
|
On effectiveness<br/>and features
|
||||||
|
On Automatic creation
|
||||||
|
Uses
|
||||||
|
Creative techniques
|
||||||
|
Strategic planning
|
||||||
|
Argument mapping
|
||||||
|
Tools
|
||||||
|
Pen and paper
|
||||||
|
Mermaid
|
||||||
|
|
||||||
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid">
|
||||||
flowchart RL
|
---
|
||||||
AB["apa@apa@"] --> B(("`apa@apa`"))
|
config:
|
||||||
|
layout: tidy-tree
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap is a long thing))
|
||||||
|
A
|
||||||
|
B
|
||||||
|
C
|
||||||
|
D
|
||||||
|
</pre
|
||||||
|
>
|
||||||
|
<pre id="diagram4" class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: tidy-tree
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
A
|
||||||
|
B
|
||||||
|
</pre
|
||||||
|
>
|
||||||
|
<pre id="diagram4" class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: tidy-tree
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
A
|
||||||
|
a
|
||||||
|
apa[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
apa2[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
b
|
||||||
|
c
|
||||||
|
d
|
||||||
|
B
|
||||||
|
apa3[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
D
|
||||||
|
apa5[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
apa4[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
elk:
|
||||||
|
mergeEdges: false
|
||||||
|
forceNodeModelOrder: false
|
||||||
|
considerModelOrder: NONE
|
||||||
|
|
||||||
|
---
|
||||||
|
flowchart TB
|
||||||
|
a --> a1 & a2 & a3 & a4
|
||||||
|
b --> b1 & b2
|
||||||
|
b2 --> b3
|
||||||
|
b1 --> b4</pre
|
||||||
|
>
|
||||||
|
<pre id="diagram4" class="mermaid">
|
||||||
|
treemap
|
||||||
|
"Section 1"
|
||||||
|
"Leaf 1.1": 12
|
||||||
|
"Section 1.2":::class1
|
||||||
|
"Leaf 1.2.1": 12
|
||||||
|
"Section 2"
|
||||||
|
"Leaf 2.1": 20:::class1
|
||||||
|
"Leaf 2.2": 25
|
||||||
|
"Leaf 2.3": 12
|
||||||
|
|
||||||
|
classDef class1 fill:red,color:blue,stroke:#FFD600;
|
||||||
|
|
||||||
|
|
||||||
|
</pre
|
||||||
|
>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
treemap:
|
||||||
|
valueFormat: '$0,0'
|
||||||
|
---
|
||||||
|
treemap
|
||||||
|
"Budget"
|
||||||
|
"Operations"
|
||||||
|
"Salaries": 7000
|
||||||
|
"Equipment": 2000
|
||||||
|
"Supplies": 1000
|
||||||
|
"Marketing"
|
||||||
|
"Advertising": 4000
|
||||||
|
"Events": 1000
|
||||||
|
|
||||||
|
</pre
|
||||||
|
>
|
||||||
|
<pre id="diagram4" class="mermaid">
|
||||||
|
treemap
|
||||||
|
title Accessible Treemap Title
|
||||||
|
"Category A"
|
||||||
|
"Item A1": 10
|
||||||
|
"Item A2": 20
|
||||||
|
"Category B"
|
||||||
|
"Item B1": 15
|
||||||
|
"Item B2": 25
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: tidy-tree
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
a
|
||||||
|
apa[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
apa2[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
b
|
||||||
|
apa3[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
apa4[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: tidy-tree
|
||||||
|
---
|
||||||
|
flowchart TB
|
||||||
|
A --> n0["1"]
|
||||||
|
A --> n1["2"]
|
||||||
|
A --> n2["3"]
|
||||||
|
A --> n3["4"] --> Q & R & S & T
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
flowchart TB
|
||||||
|
A --> n0["1"]
|
||||||
|
A --> n1["2"]
|
||||||
|
A --> n2["3"]
|
||||||
|
A --> n3["4"] --> Q & R & S & T
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: dagre
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap is a long thing))
|
||||||
|
Origins
|
||||||
|
Long history
|
||||||
|
::icon(fa fa-book)
|
||||||
|
Popularisation
|
||||||
|
British popular psychology author Tony Buzan
|
||||||
|
Research
|
||||||
|
On effectiveness<br/>and features
|
||||||
|
On Automatic creation
|
||||||
|
Uses
|
||||||
|
Creative techniques
|
||||||
|
Strategic planning
|
||||||
|
Argument mapping
|
||||||
|
Tools
|
||||||
|
Pen and paper
|
||||||
|
Mermaid
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: cose-bilkent
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
Origins
|
||||||
|
Long history
|
||||||
|
::icon(fa fa-book)
|
||||||
|
Popularisation
|
||||||
|
British popular psychology author Tony Buzan
|
||||||
|
Research
|
||||||
|
On effectiveness<br/>and features
|
||||||
|
On Automatic creation
|
||||||
|
Uses
|
||||||
|
Creative techniques
|
||||||
|
Strategic planning
|
||||||
|
Argument mapping
|
||||||
|
Tools
|
||||||
|
Pen and paper
|
||||||
|
Mermaid
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
Origins
|
||||||
|
Long history
|
||||||
|
::icon(fa fa-book)
|
||||||
|
Popularisation
|
||||||
|
British popular psychology author Tony Buzan
|
||||||
|
Research
|
||||||
|
On effectiveness<br/>and features
|
||||||
|
On Automatic creation
|
||||||
|
Uses
|
||||||
|
Creative techniques
|
||||||
|
Strategic planning
|
||||||
|
Argument mapping
|
||||||
|
Tools
|
||||||
|
Pen and paper
|
||||||
|
Mermaid
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: cose-bilkent
|
||||||
|
---
|
||||||
|
flowchart LR
|
||||||
|
root{mindmap} --- Origins --- Europe
|
||||||
|
Origins --> Asia
|
||||||
|
root --- Background --- Rich
|
||||||
|
Background --- Poor
|
||||||
|
subgraph apa
|
||||||
|
Background
|
||||||
|
Poor
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
flowchart LR
|
||||||
|
root{mindmap} --- Origins --- Europe
|
||||||
|
Origins --> Asia
|
||||||
|
root --- Background --- Rich
|
||||||
|
Background --- Poor
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart
|
flowchart
|
||||||
D(("for D"))
|
D(("for D"))
|
||||||
</pre>
|
</pre>
|
||||||
<h1>below</h1>
|
<pre id="diagram4" class="mermaid2">
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
flowchart LR
|
flowchart LR
|
||||||
A e1@==> B
|
A e1@==> B
|
||||||
e1@{ animate: true}
|
e1@{ animate: true}
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
A e1@--> B
|
A e1@--> B
|
||||||
classDef animate stroke-width:2,stroke-dasharray:10\,8,stroke-dashoffset:-180,animation: edge-animation-frame 6s linear infinite, stroke-linecap: round
|
classDef animate stroke-width:2,stroke-dasharray:10\,8,stroke-dashoffset:-180,animation: edge-animation-frame 6s linear infinite, stroke-linecap: round
|
||||||
@@ -191,6 +481,44 @@ config:
|
|||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid2">
|
<pre id="diagram4" class="mermaid2">
|
||||||
---
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
flowchart LR
|
||||||
|
a
|
||||||
|
subgraph s0["APA"]
|
||||||
|
subgraph s8["APA"]
|
||||||
|
subgraph s1["APA"]
|
||||||
|
D{"X"}
|
||||||
|
E[Q]
|
||||||
|
end
|
||||||
|
subgraph s3["BAPA"]
|
||||||
|
F[Q]
|
||||||
|
I
|
||||||
|
end
|
||||||
|
D --> I
|
||||||
|
D --> I
|
||||||
|
D --> I
|
||||||
|
|
||||||
|
I{"X"}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
flowchart LR
|
||||||
|
a
|
||||||
|
D{"Use the editor"}
|
||||||
|
|
||||||
|
D -- Mermaid js --> I{"fa:fa-code Text"}
|
||||||
|
D-->I
|
||||||
|
D-->I
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
---
|
||||||
config:
|
config:
|
||||||
layout: elk
|
layout: elk
|
||||||
---
|
---
|
||||||
@@ -253,7 +581,7 @@ flowchart LR
|
|||||||
A{A} --> B & C
|
A{A} --> B & C
|
||||||
</pre
|
</pre
|
||||||
>
|
>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
---
|
---
|
||||||
config:
|
config:
|
||||||
layout: elk
|
layout: elk
|
||||||
@@ -440,7 +768,7 @@ kanban
|
|||||||
alert('It worked');
|
alert('It worked');
|
||||||
}
|
}
|
||||||
await mermaid.initialize({
|
await mermaid.initialize({
|
||||||
// theme: 'base',
|
// theme: 'forest',
|
||||||
// theme: 'default',
|
// theme: 'default',
|
||||||
// theme: 'forest',
|
// theme: 'forest',
|
||||||
// handDrawnSeed: 12,
|
// handDrawnSeed: 12,
|
||||||
@@ -451,11 +779,7 @@ kanban
|
|||||||
// layout: 'fixed',
|
// layout: 'fixed',
|
||||||
// htmlLabels: false,
|
// htmlLabels: false,
|
||||||
flowchart: { titleTopMargin: 10 },
|
flowchart: { titleTopMargin: 10 },
|
||||||
|
fontFamily: "'Recursive', sans-serif",
|
||||||
// fontFamily: 'Caveat',
|
|
||||||
// fontFamily: 'Kalam',
|
|
||||||
// fontFamily: 'courier',
|
|
||||||
fontFamily: 'arial',
|
|
||||||
sequence: {
|
sequence: {
|
||||||
actorFontFamily: 'courier',
|
actorFontFamily: 'courier',
|
||||||
noteFontFamily: 'courier',
|
noteFontFamily: 'courier',
|
||||||
|
376
cypress/platform/mindmap-layouts.html
Normal file
376
cypress/platform/mindmap-layouts.html
Normal file
@@ -0,0 +1,376 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<title>Mermaid Quick Test Page</title>
|
||||||
|
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=" />
|
||||||
|
<style>
|
||||||
|
div.mermaid {
|
||||||
|
font-family: 'Courier New', Courier, monospace !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: tidy-tree
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
A
|
||||||
|
B
|
||||||
|
</pre>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: dagre
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
A
|
||||||
|
B
|
||||||
|
</pre>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
A
|
||||||
|
B
|
||||||
|
</pre>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: cose-bilkent
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
A
|
||||||
|
B
|
||||||
|
</pre>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: tidy-tree
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap is a long thing))
|
||||||
|
A
|
||||||
|
B
|
||||||
|
C
|
||||||
|
D
|
||||||
|
</pre>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: dagre
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap is a long thing))
|
||||||
|
A
|
||||||
|
B
|
||||||
|
C
|
||||||
|
D
|
||||||
|
</pre>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap is a long thing))
|
||||||
|
A
|
||||||
|
B
|
||||||
|
C
|
||||||
|
D
|
||||||
|
</pre>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: cose-bilkent
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap is a long thing))
|
||||||
|
A
|
||||||
|
B
|
||||||
|
C
|
||||||
|
D
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: tidy-tree
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
Origins
|
||||||
|
Long history
|
||||||
|
::icon(fa fa-book)
|
||||||
|
Popularisation
|
||||||
|
British popular psychology author Tony Buzan
|
||||||
|
Research
|
||||||
|
On effectiveness<br/>and features
|
||||||
|
On Automatic creation
|
||||||
|
Uses
|
||||||
|
Creative techniques
|
||||||
|
Strategic planning
|
||||||
|
Argument mapping
|
||||||
|
Tools
|
||||||
|
id)I am a cloud(
|
||||||
|
id))I am a bang((
|
||||||
|
Tools
|
||||||
|
</pre>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: dagre
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
Origins
|
||||||
|
Long history
|
||||||
|
::icon(fa fa-book)
|
||||||
|
Popularisation
|
||||||
|
British popular psychology author Tony Buzan
|
||||||
|
Research
|
||||||
|
On effectiveness<br/>and features
|
||||||
|
On Automatic creation
|
||||||
|
Uses
|
||||||
|
Creative techniques
|
||||||
|
Strategic planning
|
||||||
|
Argument mapping
|
||||||
|
Tools
|
||||||
|
id)I am a cloud(
|
||||||
|
id))I am a bang((
|
||||||
|
Tools
|
||||||
|
</pre>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
Origins
|
||||||
|
Long history
|
||||||
|
::icon(fa fa-book)
|
||||||
|
Popularisation
|
||||||
|
British popular psychology author Tony Buzan
|
||||||
|
Research
|
||||||
|
On effectiveness<br/>and features
|
||||||
|
On Automatic creation
|
||||||
|
Uses
|
||||||
|
Creative techniques
|
||||||
|
Strategic planning
|
||||||
|
Argument mapping
|
||||||
|
Tools
|
||||||
|
id)I am a cloud(
|
||||||
|
id))I am a bang((
|
||||||
|
Tools
|
||||||
|
</pre>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: cose-bilkent
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
Origins
|
||||||
|
Long history
|
||||||
|
::icon(fa fa-book)
|
||||||
|
Popularisation
|
||||||
|
British popular psychology author Tony Buzan
|
||||||
|
Research
|
||||||
|
On effectiveness<br/>and features
|
||||||
|
On Automatic creation
|
||||||
|
Uses
|
||||||
|
Creative techniques
|
||||||
|
Strategic planning
|
||||||
|
Argument mapping
|
||||||
|
Tools
|
||||||
|
id)I am a cloud(
|
||||||
|
id))I am a bang((
|
||||||
|
Tools
|
||||||
|
</pre>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: tidy-tree
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
A
|
||||||
|
a
|
||||||
|
apa[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
apa2[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
b
|
||||||
|
c
|
||||||
|
d
|
||||||
|
B
|
||||||
|
apa3[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
D
|
||||||
|
apa5[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
apa4[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: dagre
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
A
|
||||||
|
a
|
||||||
|
apa[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
apa2[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
b
|
||||||
|
c
|
||||||
|
d
|
||||||
|
B
|
||||||
|
apa3[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
D
|
||||||
|
apa5[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
apa4[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
A
|
||||||
|
a
|
||||||
|
apa[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
apa2[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
b
|
||||||
|
c
|
||||||
|
d
|
||||||
|
B
|
||||||
|
apa3[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
D
|
||||||
|
apa5[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
apa4[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: cose-bilkent
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
A
|
||||||
|
a
|
||||||
|
apa[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
apa2[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
b
|
||||||
|
c
|
||||||
|
d
|
||||||
|
B
|
||||||
|
apa3[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
D
|
||||||
|
apa5[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
apa4[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: tidy-tree
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
((This is a mindmap))
|
||||||
|
child1
|
||||||
|
grandchild 1
|
||||||
|
grandchild 2
|
||||||
|
child2
|
||||||
|
grandchild 3
|
||||||
|
grandchild 4
|
||||||
|
child3
|
||||||
|
grandchild 5
|
||||||
|
grandchild 6
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: dagre
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
((This is a mindmap))
|
||||||
|
child1
|
||||||
|
grandchild 1
|
||||||
|
grandchild 2
|
||||||
|
child2
|
||||||
|
grandchild 3
|
||||||
|
grandchild 4
|
||||||
|
child3
|
||||||
|
grandchild 5
|
||||||
|
grandchild 6
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
((This is a mindmap))
|
||||||
|
child1
|
||||||
|
grandchild 1
|
||||||
|
grandchild 2
|
||||||
|
child2
|
||||||
|
grandchild 3
|
||||||
|
grandchild 4
|
||||||
|
child3
|
||||||
|
grandchild 5
|
||||||
|
grandchild 6
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: cose-bilkent
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
((This is a mindmap))
|
||||||
|
child1
|
||||||
|
grandchild 1
|
||||||
|
grandchild 2
|
||||||
|
child2
|
||||||
|
grandchild 3
|
||||||
|
grandchild 4
|
||||||
|
child3
|
||||||
|
grandchild 5
|
||||||
|
grandchild 6
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<script type="module">
|
||||||
|
import mermaid from '/mermaid.esm.mjs';
|
||||||
|
import tidytree from '/mermaid-layout-tidy-tree.esm.mjs';
|
||||||
|
import layouts from './mermaid-layout-elk.esm.mjs';
|
||||||
|
mermaid.registerLayoutLoaders(layouts);
|
||||||
|
mermaid.registerLayoutLoaders(tidytree);
|
||||||
|
mermaid.initialize({
|
||||||
|
theme: 'default',
|
||||||
|
logLevel: 3,
|
||||||
|
securityLevel: 'loose',
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -41,10 +41,6 @@ graph TB
|
|||||||
const { svg } = await mermaid.render('d22', value);
|
const { svg } = await mermaid.render('d22', value);
|
||||||
console.log(svg);
|
console.log(svg);
|
||||||
el.innerHTML = svg;
|
el.innerHTML = svg;
|
||||||
// mermaid.test1('first_slow', 1200).then((r) => console.info(r));
|
|
||||||
// mermaid.test1('second_fast', 200).then((r) => console.info(r));
|
|
||||||
// mermaid.test1('third_fast', 200).then((r) => console.info(r));
|
|
||||||
// mermaid.test1('forth_slow', 1200).then((r) => console.info(r));
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
import externalExample from './mermaid-example-diagram.esm.mjs';
|
import externalExample from './mermaid-example-diagram.esm.mjs';
|
||||||
import layouts from './mermaid-layout-elk.esm.mjs';
|
import layouts from './mermaid-layout-elk.esm.mjs';
|
||||||
|
import tidyTree from './mermaid-layout-tidy-tree.esm.mjs';
|
||||||
import zenUml from './mermaid-zenuml.esm.mjs';
|
import zenUml from './mermaid-zenuml.esm.mjs';
|
||||||
import mermaid from './mermaid.esm.mjs';
|
import mermaid from './mermaid.esm.mjs';
|
||||||
|
|
||||||
@@ -65,6 +66,7 @@ const contentLoaded = async function () {
|
|||||||
await mermaid.registerExternalDiagrams([externalExample, zenUml]);
|
await mermaid.registerExternalDiagrams([externalExample, zenUml]);
|
||||||
|
|
||||||
mermaid.registerLayoutLoaders(layouts);
|
mermaid.registerLayoutLoaders(layouts);
|
||||||
|
mermaid.registerLayoutLoaders(tidyTree);
|
||||||
mermaid.initialize(graphObj.mermaid);
|
mermaid.initialize(graphObj.mermaid);
|
||||||
/**
|
/**
|
||||||
* CC-BY-4.0
|
* CC-BY-4.0
|
||||||
@@ -182,7 +184,7 @@ const contentLoadedApi = async function () {
|
|||||||
for (let i = 0; i < numCodes; i++) {
|
for (let i = 0; i < numCodes; i++) {
|
||||||
const { svg, bindFunctions } = await mermaid.render('newid' + i, graphObj.code[i], divs[i]);
|
const { svg, bindFunctions } = await mermaid.render('newid' + i, graphObj.code[i], divs[i]);
|
||||||
div.innerHTML = svg;
|
div.innerHTML = svg;
|
||||||
bindFunctions(div);
|
bindFunctions?.(div);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const div = document.createElement('div');
|
const div = document.createElement('div');
|
||||||
@@ -194,7 +196,7 @@ const contentLoadedApi = async function () {
|
|||||||
const { svg, bindFunctions } = await mermaid.render('newid', graphObj.code, div);
|
const { svg, bindFunctions } = await mermaid.render('newid', graphObj.code, div);
|
||||||
div.innerHTML = svg;
|
div.innerHTML = svg;
|
||||||
console.log(div.innerHTML);
|
console.log(div.innerHTML);
|
||||||
bindFunctions(div);
|
bindFunctions?.(div);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -2,215 +2,227 @@
|
|||||||
"durations": [
|
"durations": [
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/configuration.spec.js",
|
"spec": "cypress/integration/other/configuration.spec.js",
|
||||||
"duration": 6130
|
"duration": 5841
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/external-diagrams.spec.js",
|
"spec": "cypress/integration/other/external-diagrams.spec.js",
|
||||||
"duration": 1974
|
"duration": 2138
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/ghsa.spec.js",
|
"spec": "cypress/integration/other/ghsa.spec.js",
|
||||||
"duration": 3308
|
"duration": 3370
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/iife.spec.js",
|
"spec": "cypress/integration/other/iife.spec.js",
|
||||||
"duration": 1877
|
"duration": 2052
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/interaction.spec.js",
|
"spec": "cypress/integration/other/interaction.spec.js",
|
||||||
"duration": 10902
|
"duration": 12243
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/rerender.spec.js",
|
"spec": "cypress/integration/other/rerender.spec.js",
|
||||||
"duration": 1836
|
"duration": 2065
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/xss.spec.js",
|
"spec": "cypress/integration/other/xss.spec.js",
|
||||||
"duration": 26467
|
"duration": 31288
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/appli.spec.js",
|
"spec": "cypress/integration/rendering/appli.spec.js",
|
||||||
"duration": 3129
|
"duration": 3421
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/architecture.spec.ts",
|
"spec": "cypress/integration/rendering/architecture.spec.ts",
|
||||||
"duration": 104
|
"duration": 97
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/block.spec.js",
|
"spec": "cypress/integration/rendering/block.spec.js",
|
||||||
"duration": 16230
|
"duration": 18500
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/c4.spec.js",
|
"spec": "cypress/integration/rendering/c4.spec.js",
|
||||||
"duration": 5231
|
"duration": 5793
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/classDiagram-elk-v3.spec.js",
|
"spec": "cypress/integration/rendering/classDiagram-elk-v3.spec.js",
|
||||||
"duration": 38113
|
"duration": 40966
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/classDiagram-handDrawn-v3.spec.js",
|
"spec": "cypress/integration/rendering/classDiagram-handDrawn-v3.spec.js",
|
||||||
"duration": 36423
|
"duration": 39176
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/classDiagram-v2.spec.js",
|
"spec": "cypress/integration/rendering/classDiagram-v2.spec.js",
|
||||||
"duration": 22509
|
"duration": 23468
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/classDiagram-v3.spec.js",
|
"spec": "cypress/integration/rendering/classDiagram-v3.spec.js",
|
||||||
"duration": 34933
|
"duration": 38291
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/classDiagram.spec.js",
|
"spec": "cypress/integration/rendering/classDiagram.spec.js",
|
||||||
"duration": 14681
|
"duration": 16949
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/conf-and-directives.spec.js",
|
"spec": "cypress/integration/rendering/conf-and-directives.spec.js",
|
||||||
"duration": 8877
|
"duration": 9480
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/current.spec.js",
|
"spec": "cypress/integration/rendering/current.spec.js",
|
||||||
"duration": 2517
|
"duration": 2753
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/erDiagram-unified.spec.js",
|
"spec": "cypress/integration/rendering/erDiagram-unified.spec.js",
|
||||||
"duration": 81226
|
"duration": 88028
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/erDiagram.spec.js",
|
"spec": "cypress/integration/rendering/erDiagram.spec.js",
|
||||||
"duration": 14211
|
"duration": 15615
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/errorDiagram.spec.js",
|
"spec": "cypress/integration/rendering/errorDiagram.spec.js",
|
||||||
"duration": 3355
|
"duration": 3706
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart-elk.spec.js",
|
"spec": "cypress/integration/rendering/flowchart-elk.spec.js",
|
||||||
"duration": 38857
|
"duration": 43905
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart-handDrawn.spec.js",
|
"spec": "cypress/integration/rendering/flowchart-handDrawn.spec.js",
|
||||||
"duration": 28570
|
"duration": 31217
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart-icon.spec.js",
|
"spec": "cypress/integration/rendering/flowchart-icon.spec.js",
|
||||||
"duration": 6902
|
"duration": 7531
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart-shape-alias.spec.ts",
|
"spec": "cypress/integration/rendering/flowchart-shape-alias.spec.ts",
|
||||||
"duration": 23075
|
"duration": 25423
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart-v2.spec.js",
|
"spec": "cypress/integration/rendering/flowchart-v2.spec.js",
|
||||||
"duration": 40514
|
"duration": 49664
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart.spec.js",
|
"spec": "cypress/integration/rendering/flowchart.spec.js",
|
||||||
"duration": 28611
|
"duration": 32525
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/gantt.spec.js",
|
"spec": "cypress/integration/rendering/gantt.spec.js",
|
||||||
"duration": 16605
|
"duration": 20915
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/gitGraph.spec.js",
|
"spec": "cypress/integration/rendering/gitGraph.spec.js",
|
||||||
"duration": 47636
|
"duration": 53556
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/iconShape.spec.ts",
|
"spec": "cypress/integration/rendering/iconShape.spec.ts",
|
||||||
"duration": 262219
|
"duration": 283038
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/imageShape.spec.ts",
|
"spec": "cypress/integration/rendering/imageShape.spec.ts",
|
||||||
"duration": 54111
|
"duration": 59434
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/info.spec.ts",
|
"spec": "cypress/integration/rendering/info.spec.ts",
|
||||||
"duration": 3006
|
"duration": 3101
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/journey.spec.js",
|
"spec": "cypress/integration/rendering/journey.spec.js",
|
||||||
"duration": 6858
|
"duration": 7099
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/kanban.spec.ts",
|
"spec": "cypress/integration/rendering/kanban.spec.ts",
|
||||||
"duration": 7281
|
"duration": 7567
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/katex.spec.js",
|
"spec": "cypress/integration/rendering/katex.spec.js",
|
||||||
"duration": 3579
|
"duration": 3817
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/marker_unique_id.spec.js",
|
"spec": "cypress/integration/rendering/marker_unique_id.spec.js",
|
||||||
"duration": 2448
|
"duration": 2624
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"spec": "cypress/integration/rendering/mindmap-tidy-tree.spec.js",
|
||||||
|
"duration": 4246
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/mindmap.spec.ts",
|
"spec": "cypress/integration/rendering/mindmap.spec.ts",
|
||||||
"duration": 10618
|
"duration": 11967
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/newShapes.spec.ts",
|
"spec": "cypress/integration/rendering/newShapes.spec.ts",
|
||||||
"duration": 140874
|
"duration": 151914
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/oldShapes.spec.ts",
|
"spec": "cypress/integration/rendering/oldShapes.spec.ts",
|
||||||
"duration": 108015
|
"duration": 116698
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/packet.spec.ts",
|
"spec": "cypress/integration/rendering/packet.spec.ts",
|
||||||
"duration": 4241
|
"duration": 4967
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/pie.spec.ts",
|
"spec": "cypress/integration/rendering/pie.spec.ts",
|
||||||
"duration": 5645
|
"duration": 6700
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/quadrantChart.spec.js",
|
"spec": "cypress/integration/rendering/quadrantChart.spec.js",
|
||||||
"duration": 8524
|
"duration": 8963
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/radar.spec.js",
|
"spec": "cypress/integration/rendering/radar.spec.js",
|
||||||
"duration": 5203
|
"duration": 5540
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/requirement.spec.js",
|
"spec": "cypress/integration/rendering/requirement.spec.js",
|
||||||
"duration": 2635
|
"duration": 2782
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/requirementDiagram-unified.spec.js",
|
"spec": "cypress/integration/rendering/requirementDiagram-unified.spec.js",
|
||||||
"duration": 50512
|
"duration": 54797
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/sankey.spec.ts",
|
"spec": "cypress/integration/rendering/sankey.spec.ts",
|
||||||
"duration": 6692
|
"duration": 6914
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"spec": "cypress/integration/rendering/sequencediagram-v2.spec.js",
|
||||||
|
"duration": 20481
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/sequencediagram.spec.js",
|
"spec": "cypress/integration/rendering/sequencediagram.spec.js",
|
||||||
"duration": 34559
|
"duration": 38490
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/stateDiagram-v2.spec.js",
|
"spec": "cypress/integration/rendering/stateDiagram-v2.spec.js",
|
||||||
"duration": 24421
|
"duration": 30766
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/stateDiagram.spec.js",
|
"spec": "cypress/integration/rendering/stateDiagram.spec.js",
|
||||||
"duration": 15316
|
"duration": 16705
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/theme.spec.js",
|
"spec": "cypress/integration/rendering/theme.spec.js",
|
||||||
"duration": 28240
|
"duration": 30928
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/timeline.spec.ts",
|
"spec": "cypress/integration/rendering/timeline.spec.ts",
|
||||||
"duration": 6808
|
"duration": 8424
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"spec": "cypress/integration/rendering/treemap.spec.ts",
|
||||||
|
"duration": 12533
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/xyChart.spec.js",
|
"spec": "cypress/integration/rendering/xyChart.spec.js",
|
||||||
"duration": 19359
|
"duration": 21197
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/zenuml.spec.js",
|
"spec": "cypress/integration/rendering/zenuml.spec.js",
|
||||||
"duration": 3164
|
"duration": 3455
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -1,31 +0,0 @@
|
|||||||
import { FlowDB } from './packages/mermaid/src/diagrams/flowchart/flowDb.ts';
|
|
||||||
import flow from './packages/mermaid/src/diagrams/flowchart/parser/flowParserAdapter.ts';
|
|
||||||
|
|
||||||
// Set up the test environment
|
|
||||||
flow.yy = new FlowDB();
|
|
||||||
flow.yy.clear();
|
|
||||||
|
|
||||||
console.log('=== Testing basic edge parsing ===');
|
|
||||||
console.log('Input: "graph TD;A-->B;"');
|
|
||||||
|
|
||||||
try {
|
|
||||||
const result = flow.parse('graph TD;A-->B;');
|
|
||||||
console.log('Parse result:', result);
|
|
||||||
|
|
||||||
const vertices = flow.yy.getVertices();
|
|
||||||
const edges = flow.yy.getEdges();
|
|
||||||
|
|
||||||
console.log('Vertices:', vertices);
|
|
||||||
console.log('Vertices size:', vertices.size);
|
|
||||||
console.log('Vertices keys:', Array.from(vertices.keys()));
|
|
||||||
|
|
||||||
console.log('Edges:', edges);
|
|
||||||
console.log('Edges length:', edges.length);
|
|
||||||
|
|
||||||
// Check specific vertices
|
|
||||||
console.log('Vertex A:', vertices.get('A'));
|
|
||||||
console.log('Vertex B:', vertices.get('B'));
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Parse error:', error);
|
|
||||||
console.error('Error stack:', error.stack);
|
|
||||||
}
|
|
@@ -1,27 +0,0 @@
|
|||||||
// Debug script for interpolate functionality
|
|
||||||
import { FlowDB } from './packages/mermaid/src/diagrams/flowchart/flowDb.js';
|
|
||||||
import flow from './packages/mermaid/src/diagrams/flowchart/parser/flowParserAdapter.js';
|
|
||||||
|
|
||||||
// Set up test
|
|
||||||
flow.yy = new FlowDB();
|
|
||||||
flow.yy.clear();
|
|
||||||
|
|
||||||
console.log('Testing interpolate functionality...');
|
|
||||||
|
|
||||||
try {
|
|
||||||
const input = 'graph TD\nA-->B\nlinkStyle default interpolate basis';
|
|
||||||
console.log('Input:', input);
|
|
||||||
|
|
||||||
const result = flow.parse(input);
|
|
||||||
console.log('Parse result:', result);
|
|
||||||
|
|
||||||
const edges = flow.yy.getEdges();
|
|
||||||
console.log('Edges:', edges);
|
|
||||||
console.log('edges.defaultInterpolate:', edges.defaultInterpolate);
|
|
||||||
|
|
||||||
// Check if updateLinkInterpolate method exists
|
|
||||||
console.log('updateLinkInterpolate method exists:', typeof flow.yy.updateLinkInterpolate);
|
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Error:', error);
|
|
||||||
}
|
|
@@ -10,7 +10,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<h1>Block diagram demos</h1>
|
<h1>Block diagram demos</h1>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid">
|
||||||
block-beta
|
block
|
||||||
columns 1
|
columns 1
|
||||||
db(("DB"))
|
db(("DB"))
|
||||||
blockArrowId6<[" "]>(down)
|
blockArrowId6<[" "]>(down)
|
||||||
@@ -26,7 +26,7 @@ columns 1
|
|||||||
style B fill:#f9F,stroke:#333,stroke-width:4px
|
style B fill:#f9F,stroke:#333,stroke-width:4px
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid">
|
||||||
block-beta
|
block
|
||||||
A1["square"]
|
A1["square"]
|
||||||
B1("rounded")
|
B1("rounded")
|
||||||
C1(("circle"))
|
C1(("circle"))
|
||||||
@@ -36,7 +36,7 @@ block-beta
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid">
|
||||||
block-beta
|
block
|
||||||
A1(["stadium"])
|
A1(["stadium"])
|
||||||
A2[["subroutine"]]
|
A2[["subroutine"]]
|
||||||
B1[("cylinder")]
|
B1[("cylinder")]
|
||||||
@@ -48,7 +48,7 @@ block-beta
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid">
|
||||||
block-beta
|
block
|
||||||
block:e:4
|
block:e:4
|
||||||
columns 2
|
columns 2
|
||||||
f
|
f
|
||||||
@@ -57,7 +57,7 @@ block-beta
|
|||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid">
|
||||||
block-beta
|
block
|
||||||
block:e:4
|
block:e:4
|
||||||
columns 2
|
columns 2
|
||||||
f
|
f
|
||||||
@@ -67,7 +67,7 @@ block-beta
|
|||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid">
|
||||||
block-beta
|
block
|
||||||
columns 3
|
columns 3
|
||||||
a:3
|
a:3
|
||||||
block:e:3
|
block:e:3
|
||||||
@@ -80,7 +80,7 @@ block-beta
|
|||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid">
|
||||||
block-beta
|
block
|
||||||
columns 4
|
columns 4
|
||||||
a b c d
|
a b c d
|
||||||
block:e:4
|
block:e:4
|
||||||
@@ -97,19 +97,19 @@ flowchart LR
|
|||||||
X-- "a label" -->z
|
X-- "a label" -->z
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid">
|
||||||
block-beta
|
block
|
||||||
columns 5
|
columns 5
|
||||||
A space B
|
A space B
|
||||||
A --x B
|
A --x B
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid">
|
||||||
block-beta
|
block
|
||||||
columns 3
|
columns 3
|
||||||
a["A wide one"] b:2 c:2 d
|
a["A wide one"] b:2 c:2 d
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid">
|
||||||
block-beta
|
block
|
||||||
columns 3
|
columns 3
|
||||||
a b c
|
a b c
|
||||||
e:3
|
e:3
|
||||||
@@ -117,7 +117,7 @@ columns 3
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid">
|
||||||
block-beta
|
block
|
||||||
|
|
||||||
A1:3
|
A1:3
|
||||||
A2:1
|
A2:1
|
||||||
|
@@ -4,14 +4,14 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<div class="diagrams">
|
<div class="diagrams">
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
packet-beta
|
packet
|
||||||
0-15: "Source Port"
|
0-15: "Source Port"
|
||||||
16-31: "Destination Port"
|
16-31: "Destination Port"
|
||||||
32-63: "Sequence Number"
|
32-63: "Sequence Number"
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
packet:
|
packet:
|
||||||
showBits: false
|
showBits: false
|
||||||
---
|
---
|
||||||
packet-beta
|
packet
|
||||||
0-15: "Source Port"
|
0-15: "Source Port"
|
||||||
16-31: "Destination Port"
|
16-31: "Destination Port"
|
||||||
32-63: "Sequence Number"
|
32-63: "Sequence Number"
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
config:
|
config:
|
||||||
theme: forest
|
theme: forest
|
||||||
---
|
---
|
||||||
packet-beta
|
packet
|
||||||
title Forest theme
|
title Forest theme
|
||||||
0-15: "Source Port"
|
0-15: "Source Port"
|
||||||
16-31: "Destination Port"
|
16-31: "Destination Port"
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
config:
|
config:
|
||||||
theme: dark
|
theme: dark
|
||||||
---
|
---
|
||||||
packet-beta
|
packet
|
||||||
title Dark theme
|
title Dark theme
|
||||||
0-15: "Source Port"
|
0-15: "Source Port"
|
||||||
16-31: "Destination Port"
|
16-31: "Destination Port"
|
||||||
|
@@ -20,12 +20,14 @@
|
|||||||
width: 800
|
width: 800
|
||||||
nodeAlignment: left
|
nodeAlignment: left
|
||||||
---
|
---
|
||||||
sankey-beta
|
sankey
|
||||||
Revenue,Expenses,10
|
a,b,8
|
||||||
Revenue,Profit,10
|
b,c,8
|
||||||
Expenses,Manufacturing,5
|
c,d,8
|
||||||
Expenses,Tax,3
|
d,e,8
|
||||||
Expenses,Research,2
|
|
||||||
|
x,c,4
|
||||||
|
c,y,4
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2>Energy flow</h2>
|
<h2>Energy flow</h2>
|
||||||
@@ -40,7 +42,7 @@
|
|||||||
linkColor: gradient
|
linkColor: gradient
|
||||||
nodeAlignment: justify
|
nodeAlignment: justify
|
||||||
---
|
---
|
||||||
sankey-beta
|
sankey
|
||||||
|
|
||||||
Agricultural 'waste',Bio-conversion,124.729
|
Agricultural 'waste',Bio-conversion,124.729
|
||||||
Bio-conversion,Liquid,0.597
|
Bio-conversion,Liquid,0.597
|
||||||
|
@@ -23,6 +23,23 @@
|
|||||||
1940 : fourth step : fifth step
|
1940 : fourth step : fifth step
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<h2>Medical Device Lifecycle Timeline</h2>
|
||||||
|
<pre class="mermaid">
|
||||||
|
timeline
|
||||||
|
title Medical Device Lifecycle
|
||||||
|
section Planning
|
||||||
|
Quality Management System (4) : Regulatory Compliance (4.1) : Risk Management (4.1.3) : Management Review (5.6) : Infrastructure (6.3)
|
||||||
|
Management Responsibility (5) : Planning Activities (5.2) : Human Resources (6.2) : RnD Planning (7.3.2) : Purchasing Process (7.4.1) : Production Activities (7.5.1) : Installation Activities (7.5.3) : Servicing Activities (7.5.4)
|
||||||
|
section Realization
|
||||||
|
Research and Development (7.3) : Inputs (7.3.3) : Outputs (7.3.4) : Review (7.3.5) : Verification (7.3.6) : Validation (7.3.7)
|
||||||
|
Purchasing (7.4) : Purchasing Information (7.4.2) : Production Feedback (8.2.1)
|
||||||
|
Production (7.5) : Production Feedback (8.2.1)
|
||||||
|
Installation (7.5.3) : Installation Activities (7.5.3)
|
||||||
|
Servicing (7.5.4) : Servicing Activities (7.5.4)
|
||||||
|
section Post-Production
|
||||||
|
Post-Market Activities (8) : Feedback (8.2.1) : Complaints (8.2.2) : Adverse Events (8.2.3)
|
||||||
|
</pre>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import mermaid from './mermaid.esm.mjs';
|
import mermaid from './mermaid.esm.mjs';
|
||||||
mermaid.initialize({
|
mermaid.initialize({
|
||||||
|
75
demos/treemap.html
Normal file
75
demos/treemap.html
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<title>Mermaid Treemap Diagram Demo</title>
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: 'Montserrat', sans-serif;
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 900px;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
.mermaid {
|
||||||
|
margin: 30px 0;
|
||||||
|
}
|
||||||
|
h1,
|
||||||
|
h2 {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Treemap Diagram Demo</h1>
|
||||||
|
<p>This is a demo of the new treemap diagram type in Mermaid.</p>
|
||||||
|
|
||||||
|
<h2>Basic Treemap Example</h2>
|
||||||
|
<pre class="mermaid">
|
||||||
|
treemap
|
||||||
|
"Root"
|
||||||
|
"Branch 1"
|
||||||
|
"Leaf 1.1": 10
|
||||||
|
"Leaf 1.2": 15
|
||||||
|
"Branch 2"
|
||||||
|
"Branch 2.1"
|
||||||
|
"Leaf 2.1.1": 20
|
||||||
|
"Leaf 2.1.2": 25
|
||||||
|
"Leaf 2.2": 25
|
||||||
|
"Leaf 2.3": 30
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<h2>Technology Stack Treemap Example</h2>
|
||||||
|
<pre class="mermaid">
|
||||||
|
treemap
|
||||||
|
"Technology Stack"
|
||||||
|
"Frontend"
|
||||||
|
"React": 35
|
||||||
|
"CSS": 15
|
||||||
|
"HTML": 10
|
||||||
|
"Backend"
|
||||||
|
"Node.js": 25
|
||||||
|
"Express": 10
|
||||||
|
"MongoDB": 15
|
||||||
|
"DevOps"
|
||||||
|
"Docker": 10
|
||||||
|
"Kubernetes": 15
|
||||||
|
"CI/CD": 5
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<script type="module">
|
||||||
|
import mermaid from './mermaid.esm.mjs';
|
||||||
|
mermaid.initialize({
|
||||||
|
theme: 'forest',
|
||||||
|
logLevel: 1,
|
||||||
|
securityLevel: 'loose',
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -16,7 +16,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<h1>XY Charts demos</h1>
|
<h1>XY Charts demos</h1>
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue (in $)"
|
title "Sales Revenue (in $)"
|
||||||
x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<hr />
|
<hr />
|
||||||
<h1>XY Charts horizontal</h1>
|
<h1>XY Charts horizontal</h1>
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
xychart-beta horizontal
|
xychart horizontal
|
||||||
title "Basic xychart"
|
title "Basic xychart"
|
||||||
x-axis "this is x axis" [category1, "category 2", category3, category4]
|
x-axis "this is x axis" [category1, "category 2", category3, category4]
|
||||||
y-axis yaxisText 10 --> 150
|
y-axis yaxisText 10 --> 150
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<hr />
|
<hr />
|
||||||
<h1>XY Charts only lines and bar</h1>
|
<h1>XY Charts only lines and bar</h1>
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
xychart-beta
|
xychart
|
||||||
line [23, 46, 77, 34]
|
line [23, 46, 77, 34]
|
||||||
line [45, 32, 33, 12]
|
line [45, 32, 33, 12]
|
||||||
line [87, 54, 99, 85]
|
line [87, 54, 99, 85]
|
||||||
@@ -48,13 +48,13 @@
|
|||||||
<hr />
|
<hr />
|
||||||
<h1>XY Charts with +ve and -ve numbers</h1>
|
<h1>XY Charts with +ve and -ve numbers</h1>
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
xychart-beta
|
xychart
|
||||||
line [+1.3, .6, 2.4, -.34]
|
line [+1.3, .6, 2.4, -.34]
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h1>XY Charts Bar with multiple category</h1>
|
<h1>XY Charts Bar with multiple category</h1>
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
xychart-beta
|
xychart
|
||||||
title "Basic xychart with many categories"
|
title "Basic xychart with many categories"
|
||||||
x-axis "this is x axis" [category1, "category 2", category3, category4, category5, category6, category7]
|
x-axis "this is x axis" [category1, "category 2", category3, category4, category5, category6, category7]
|
||||||
y-axis yaxisText 10 --> 150
|
y-axis yaxisText 10 --> 150
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
<h1>XY Charts line with multiple category</h1>
|
<h1>XY Charts line with multiple category</h1>
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
xychart-beta
|
xychart
|
||||||
title "Line chart with many category"
|
title "Line chart with many category"
|
||||||
x-axis "this is x axis" [category1, "category 2", category3, category4, category5, category6, category7]
|
x-axis "this is x axis" [category1, "category 2", category3, category4, category5, category6, category7]
|
||||||
y-axis yaxisText 10 --> 150
|
y-axis yaxisText 10 --> 150
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
<h1>XY Charts category with large text</h1>
|
<h1>XY Charts category with large text</h1>
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
xychart-beta
|
xychart
|
||||||
title "Basic xychart with many categories with category overlap"
|
title "Basic xychart with many categories with category overlap"
|
||||||
x-axis "this is x axis" [category1, "Lorem ipsum dolor sit amet, qui minim labore adipisicing minim sint cillum sint consectetur cupidatat.", category3, category4, category5, category6, category7]
|
x-axis "this is x axis" [category1, "Lorem ipsum dolor sit amet, qui minim labore adipisicing minim sint cillum sint consectetur cupidatat.", category3, category4, category5, category6, category7]
|
||||||
y-axis yaxisText 10 --> 150
|
y-axis yaxisText 10 --> 150
|
||||||
@@ -89,7 +89,7 @@ config:
|
|||||||
height: 20
|
height: 20
|
||||||
plotReservedSpacePercent: 100
|
plotReservedSpacePercent: 100
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
line [5000, 9000, 7500, 6200, 9500, 5500, 11000, 8200, 9200, 9500, 7000, 8800]
|
line [5000, 9000, 7500, 6200, 9500, 5500, 11000, 8200, 9200, 9500, 7000, 8800]
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ config:
|
|||||||
height: 20
|
height: 20
|
||||||
plotReservedSpacePercent: 100
|
plotReservedSpacePercent: 100
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
bar [5000, 9000, 7500, 6200, 9500, 5500, 11000, 8200, 9200, 9500, 7000, 8800]
|
bar [5000, 9000, 7500, 6200, 9500, 5500, 11000, 8200, 9200, 9500, 7000, 8800]
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ config:
|
|||||||
chartOrientation: horizontal
|
chartOrientation: horizontal
|
||||||
plotReservedSpacePercent: 60
|
plotReservedSpacePercent: 60
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
@@ -162,7 +162,7 @@ config:
|
|||||||
xAxisLineColor: "#87ceeb"
|
xAxisLineColor: "#87ceeb"
|
||||||
plotColorPalette: "#008000, #faba63"
|
plotColorPalette: "#008000, #faba63"
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
y-axis "Revenue (in $)" 4000 --> 11000
|
||||||
|
@@ -29,7 +29,8 @@ In GitHub, you first [**fork a mermaid repository**](https://github.com/mermaid-
|
|||||||
|
|
||||||
Then you **clone** a copy to your local development machine (e.g. where you code) to make a copy with all the files to work with.
|
Then you **clone** a copy to your local development machine (e.g. where you code) to make a copy with all the files to work with.
|
||||||
|
|
||||||
> **💡 Tip** > [Here is a GitHub document that gives an overview of the process](https://docs.github.com/en/get-started/quickstart/fork-a-repo).
|
> **💡 Tip**
|
||||||
|
> [Here is a GitHub document that gives an overview of the process](https://docs.github.com/en/get-started/quickstart/fork-a-repo).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone git@github.com/your-fork/mermaid
|
git clone git@github.com/your-fork/mermaid
|
||||||
@@ -301,7 +302,7 @@ If you are adding a feature, you will definitely need to add tests. Depending on
|
|||||||
|
|
||||||
Unit tests are tests that test a single function or module. They are the easiest to write and the fastest to run.
|
Unit tests are tests that test a single function or module. They are the easiest to write and the fastest to run.
|
||||||
|
|
||||||
Unit tests are mandatory for all code except the renderers. (The renderers are tested with integration tests.)
|
Unit tests are mandatory for all code except the layout tests. (The layouts are tested with integration tests.)
|
||||||
|
|
||||||
We use [Vitest](https://vitest.dev) to run unit tests.
|
We use [Vitest](https://vitest.dev) to run unit tests.
|
||||||
|
|
||||||
@@ -327,6 +328,30 @@ When using Docker prepend your command with `./run`:
|
|||||||
./run pnpm test
|
./run pnpm test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### Testing the DOM
|
||||||
|
|
||||||
|
One can use `jsdomIt` to test any part of Mermaid that interacts with the DOM, as long as it is not related to the layout.
|
||||||
|
|
||||||
|
The function `jsdomIt` ([developed in utils.ts](../../tests/util.ts)) overrides `it` from `vitest`, and creates a pseudo-browser environment that works almost like the real deal for the duration of the test. It uses JSDOM to create a DOM, and adds objects `window` and `document` to `global` to mock the browser environment.
|
||||||
|
|
||||||
|
> \[!NOTE]
|
||||||
|
> The layout cannot work in `jsdomIt` tests because JSDOM has no rendering engine, hence the pseudo-browser environment.
|
||||||
|
|
||||||
|
Example :
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { ensureNodeFromSelector, jsdomIt } from './tests/util.js';
|
||||||
|
|
||||||
|
jsdomIt('should add element "thing" in the SVG', ({ svg }) => {
|
||||||
|
// Code in this block runs in a pseudo-browser environment
|
||||||
|
addThing(svg); // The svg item is the D3 selection of the SVG node
|
||||||
|
const svgNode = ensureNodeFromSelector('svg'); // Retrieve the DOM node using the DOM API
|
||||||
|
expect(svgNode.querySelector('thing')).not.toBeNull(); // Test the structure of the SVG
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
They can be used to test any method that interacts with the DOM, including for testing renderers. For renderers, additional integration testing is necessary to test the layout though.
|
||||||
|
|
||||||
#### Integration / End-to-End (E2E) Tests
|
#### Integration / End-to-End (E2E) Tests
|
||||||
|
|
||||||
These test the rendering and visual appearance of the diagrams.
|
These test the rendering and visual appearance of the diagrams.
|
||||||
|
@@ -33,7 +33,8 @@ mindmap
|
|||||||
|
|
||||||
## Join the Development
|
## Join the Development
|
||||||
|
|
||||||
> **💡 Tip** > **Check out our** [**detailed contribution guide**](./contributing.md).
|
> **💡 Tip**
|
||||||
|
> **Check out our** [**detailed contribution guide**](./contributing.md).
|
||||||
|
|
||||||
Where to start:
|
Where to start:
|
||||||
|
|
||||||
@@ -47,7 +48,8 @@ Where to start:
|
|||||||
|
|
||||||
## A Question Or a Suggestion?
|
## A Question Or a Suggestion?
|
||||||
|
|
||||||
> **💡 Tip** > **Have a look at** [**how to open an issue**](./questions-and-suggestions.md).
|
> **💡 Tip**
|
||||||
|
> **Have a look at** [**how to open an issue**](./questions-and-suggestions.md).
|
||||||
|
|
||||||
If you have faced a vulnerability [report it to us](./security.md).
|
If you have faced a vulnerability [report it to us](./security.md).
|
||||||
|
|
||||||
|
@@ -111,3 +111,13 @@ const themes = {
|
|||||||
```
|
```
|
||||||
|
|
||||||
The actual options and values for the colors are defined in **src/theme/theme-\[xyz].js**. If you provide the options your diagram needs in the existing theme files then the theming will work smoothly without hiccups.
|
The actual options and values for the colors are defined in **src/theme/theme-\[xyz].js**. If you provide the options your diagram needs in the existing theme files then the theming will work smoothly without hiccups.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
The `@mermaid-js/examples` package contains a collection of examples that are used by tools like mermaid.live to help users get started with the new diagram.
|
||||||
|
|
||||||
|
You can duplicate an existing diagram example file, eg: `packages/examples/src/examples/flowchart.ts`, and modify it with details specific to your diagram.
|
||||||
|
|
||||||
|
Then you can import the example in the `packages/examples/src/index.ts` file and add it to the `examples` array.
|
||||||
|
|
||||||
|
Each diagram should have at least one example, and that should be marked as default. It is good to add more examples to showcase different features of the diagram.
|
||||||
|
@@ -22,7 +22,6 @@ While directives allow you to change most of the default configuration settings,
|
|||||||
Mermaid basically supports two types of configuration options to be overridden by directives.
|
Mermaid basically supports two types of configuration options to be overridden by directives.
|
||||||
|
|
||||||
1. _General/Top Level configurations_ : These are the configurations that are available and applied to all the diagram. **Some of the most important top-level** configurations are:
|
1. _General/Top Level configurations_ : These are the configurations that are available and applied to all the diagram. **Some of the most important top-level** configurations are:
|
||||||
|
|
||||||
- theme
|
- theme
|
||||||
- fontFamily
|
- fontFamily
|
||||||
- logLevel
|
- logLevel
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
# Frequently Asked Questions
|
# Frequently Asked Questions
|
||||||
|
|
||||||
1. [How to add title to flowchart?](https://github.com/mermaid-js/mermaid/issues/556#issuecomment-363182217)
|
1. [How to add title to flowchart?](https://github.com/mermaid-js/mermaid/issues/1433#issuecomment-1991554712)
|
||||||
2. [How to specify custom CSS file?](https://github.com/mermaidjs/mermaid.cli/pull/24#issuecomment-373402785)
|
2. [How to specify custom CSS file?](https://github.com/mermaidjs/mermaid.cli/pull/24#issuecomment-373402785)
|
||||||
3. [How to fix tooltip misplacement issue?](https://github.com/mermaid-js/mermaid/issues/542#issuecomment-3343564621)
|
3. [How to fix tooltip misplacement issue?](https://github.com/mermaid-js/mermaid/issues/542#issuecomment-3343564621)
|
||||||
4. [How to specify gantt diagram xAxis format?](https://github.com/mermaid-js/mermaid/issues/269#issuecomment-373229136)
|
4. [How to specify gantt diagram xAxis format?](https://github.com/mermaid-js/mermaid/issues/269#issuecomment-373229136)
|
||||||
|
40
docs/config/layouts.md
Normal file
40
docs/config/layouts.md
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
> **Warning**
|
||||||
|
>
|
||||||
|
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
||||||
|
>
|
||||||
|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/layouts.md](../../packages/mermaid/src/docs/config/layouts.md).
|
||||||
|
|
||||||
|
# Layouts
|
||||||
|
|
||||||
|
This page lists the available layout algorithms supported in Mermaid diagrams.
|
||||||
|
|
||||||
|
## Supported Layouts
|
||||||
|
|
||||||
|
- **elk**: [ELK (Eclipse Layout Kernel)](https://www.eclipse.org/elk/)
|
||||||
|
- **tidy-tree**: Tidy tree layout for hierarchical diagrams [Tidy Tree Configuration](/config/tidy-tree)
|
||||||
|
- **cose-bilkent**: Cose Bilkent layout for force-directed graphs
|
||||||
|
- **dagre**: Dagre layout for layered graphs
|
||||||
|
|
||||||
|
## How to Use
|
||||||
|
|
||||||
|
You can specify the layout in your diagram's YAML config or initialization options. For example:
|
||||||
|
|
||||||
|
```mermaid-example
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
graph TD;
|
||||||
|
A-->B;
|
||||||
|
B-->C;
|
||||||
|
```
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
graph TD;
|
||||||
|
A-->B;
|
||||||
|
B-->C;
|
||||||
|
```
|
@@ -19,6 +19,7 @@
|
|||||||
- [addDirective](functions/addDirective.md)
|
- [addDirective](functions/addDirective.md)
|
||||||
- [getConfig](functions/getConfig.md)
|
- [getConfig](functions/getConfig.md)
|
||||||
- [getSiteConfig](functions/getSiteConfig.md)
|
- [getSiteConfig](functions/getSiteConfig.md)
|
||||||
|
- [getUserDefinedConfig](functions/getUserDefinedConfig.md)
|
||||||
- [reset](functions/reset.md)
|
- [reset](functions/reset.md)
|
||||||
- [sanitize](functions/sanitize.md)
|
- [sanitize](functions/sanitize.md)
|
||||||
- [saveConfigFromInitialize](functions/saveConfigFromInitialize.md)
|
- [saveConfigFromInitialize](functions/saveConfigFromInitialize.md)
|
||||||
|
19
docs/config/setup/config/functions/getUserDefinedConfig.md
Normal file
19
docs/config/setup/config/functions/getUserDefinedConfig.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
> **Warning**
|
||||||
|
>
|
||||||
|
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
||||||
|
>
|
||||||
|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/config/functions/getUserDefinedConfig.md](../../../../../packages/mermaid/src/docs/config/setup/config/functions/getUserDefinedConfig.md).
|
||||||
|
|
||||||
|
[**mermaid**](../../README.md)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Function: getUserDefinedConfig()
|
||||||
|
|
||||||
|
> **getUserDefinedConfig**(): [`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
||||||
|
|
||||||
|
Defined in: [packages/mermaid/src/config.ts:252](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L252)
|
||||||
|
|
||||||
|
## Returns
|
||||||
|
|
||||||
|
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
@@ -12,4 +12,4 @@
|
|||||||
|
|
||||||
> `const` **configKeys**: `Set`<`string`>
|
> `const` **configKeys**: `Set`<`string`>
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/defaultConfig.ts:278](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/defaultConfig.ts#L278)
|
Defined in: [packages/mermaid/src/defaultConfig.ts:292](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/defaultConfig.ts#L292)
|
||||||
|
@@ -10,10 +10,6 @@
|
|||||||
|
|
||||||
# mermaid
|
# mermaid
|
||||||
|
|
||||||
## Classes
|
|
||||||
|
|
||||||
- [UnknownDiagramError](classes/UnknownDiagramError.md)
|
|
||||||
|
|
||||||
## Interfaces
|
## Interfaces
|
||||||
|
|
||||||
- [DetailedError](interfaces/DetailedError.md)
|
- [DetailedError](interfaces/DetailedError.md)
|
||||||
@@ -27,6 +23,7 @@
|
|||||||
- [RenderOptions](interfaces/RenderOptions.md)
|
- [RenderOptions](interfaces/RenderOptions.md)
|
||||||
- [RenderResult](interfaces/RenderResult.md)
|
- [RenderResult](interfaces/RenderResult.md)
|
||||||
- [RunOptions](interfaces/RunOptions.md)
|
- [RunOptions](interfaces/RunOptions.md)
|
||||||
|
- [UnknownDiagramError](interfaces/UnknownDiagramError.md)
|
||||||
|
|
||||||
## Type Aliases
|
## Type Aliases
|
||||||
|
|
||||||
|
@@ -1,159 +0,0 @@
|
|||||||
> **Warning**
|
|
||||||
>
|
|
||||||
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
|
||||||
>
|
|
||||||
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/mermaid/classes/UnknownDiagramError.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/classes/UnknownDiagramError.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Class: UnknownDiagramError
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/errors.ts:1](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/errors.ts#L1)
|
|
||||||
|
|
||||||
## Extends
|
|
||||||
|
|
||||||
- `Error`
|
|
||||||
|
|
||||||
## Constructors
|
|
||||||
|
|
||||||
### new UnknownDiagramError()
|
|
||||||
|
|
||||||
> **new UnknownDiagramError**(`message`): [`UnknownDiagramError`](UnknownDiagramError.md)
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/errors.ts:2](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/errors.ts#L2)
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### message
|
|
||||||
|
|
||||||
`string`
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
[`UnknownDiagramError`](UnknownDiagramError.md)
|
|
||||||
|
|
||||||
#### Overrides
|
|
||||||
|
|
||||||
`Error.constructor`
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
### cause?
|
|
||||||
|
|
||||||
> `optional` **cause**: `unknown`
|
|
||||||
|
|
||||||
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
|
|
||||||
|
|
||||||
#### Inherited from
|
|
||||||
|
|
||||||
`Error.cause`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### message
|
|
||||||
|
|
||||||
> **message**: `string`
|
|
||||||
|
|
||||||
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es5.d.ts:1077
|
|
||||||
|
|
||||||
#### Inherited from
|
|
||||||
|
|
||||||
`Error.message`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### name
|
|
||||||
|
|
||||||
> **name**: `string`
|
|
||||||
|
|
||||||
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es5.d.ts:1076
|
|
||||||
|
|
||||||
#### Inherited from
|
|
||||||
|
|
||||||
`Error.name`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### stack?
|
|
||||||
|
|
||||||
> `optional` **stack**: `string`
|
|
||||||
|
|
||||||
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es5.d.ts:1078
|
|
||||||
|
|
||||||
#### Inherited from
|
|
||||||
|
|
||||||
`Error.stack`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### prepareStackTrace()?
|
|
||||||
|
|
||||||
> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any`
|
|
||||||
|
|
||||||
Defined in: node_modules/.pnpm/@types+node\@22.13.5/node_modules/@types/node/globals.d.ts:143
|
|
||||||
|
|
||||||
Optional override for formatting stack traces
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### err
|
|
||||||
|
|
||||||
`Error`
|
|
||||||
|
|
||||||
##### stackTraces
|
|
||||||
|
|
||||||
`CallSite`\[]
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`any`
|
|
||||||
|
|
||||||
#### See
|
|
||||||
|
|
||||||
<https://v8.dev/docs/stack-trace-api#customizing-stack-traces>
|
|
||||||
|
|
||||||
#### Inherited from
|
|
||||||
|
|
||||||
`Error.prepareStackTrace`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### stackTraceLimit
|
|
||||||
|
|
||||||
> `static` **stackTraceLimit**: `number`
|
|
||||||
|
|
||||||
Defined in: node_modules/.pnpm/@types+node\@22.13.5/node_modules/@types/node/globals.d.ts:145
|
|
||||||
|
|
||||||
#### Inherited from
|
|
||||||
|
|
||||||
`Error.stackTraceLimit`
|
|
||||||
|
|
||||||
## Methods
|
|
||||||
|
|
||||||
### captureStackTrace()
|
|
||||||
|
|
||||||
> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void`
|
|
||||||
|
|
||||||
Defined in: node_modules/.pnpm/@types+node\@22.13.5/node_modules/@types/node/globals.d.ts:136
|
|
||||||
|
|
||||||
Create .stack property on a target object
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### targetObject
|
|
||||||
|
|
||||||
`object`
|
|
||||||
|
|
||||||
##### constructorOpt?
|
|
||||||
|
|
||||||
`Function`
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`void`
|
|
||||||
|
|
||||||
#### Inherited from
|
|
||||||
|
|
||||||
`Error.captureStackTrace`
|
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Interface: ExternalDiagramDefinition
|
# Interface: ExternalDiagramDefinition
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/diagram-api/types.ts:99](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L99)
|
Defined in: [packages/mermaid/src/diagram-api/types.ts:96](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L96)
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ Defined in: [packages/mermaid/src/diagram-api/types.ts:99](https://github.com/me
|
|||||||
|
|
||||||
> **detector**: `DiagramDetector`
|
> **detector**: `DiagramDetector`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/diagram-api/types.ts:101](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L101)
|
Defined in: [packages/mermaid/src/diagram-api/types.ts:98](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L98)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ Defined in: [packages/mermaid/src/diagram-api/types.ts:101](https://github.com/m
|
|||||||
|
|
||||||
> **id**: `string`
|
> **id**: `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/diagram-api/types.ts:100](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L100)
|
Defined in: [packages/mermaid/src/diagram-api/types.ts:97](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L97)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -34,4 +34,4 @@ Defined in: [packages/mermaid/src/diagram-api/types.ts:100](https://github.com/m
|
|||||||
|
|
||||||
> **loader**: `DiagramLoader`
|
> **loader**: `DiagramLoader`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/diagram-api/types.ts:102](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L102)
|
Defined in: [packages/mermaid/src/diagram-api/types.ts:99](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L99)
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Interface: LayoutData
|
# Interface: LayoutData
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/rendering-util/types.ts:145](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L145)
|
Defined in: [packages/mermaid/src/rendering-util/types.ts:168](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L168)
|
||||||
|
|
||||||
## Indexable
|
## Indexable
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ Defined in: [packages/mermaid/src/rendering-util/types.ts:145](https://github.co
|
|||||||
|
|
||||||
> **config**: [`MermaidConfig`](MermaidConfig.md)
|
> **config**: [`MermaidConfig`](MermaidConfig.md)
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/rendering-util/types.ts:148](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L148)
|
Defined in: [packages/mermaid/src/rendering-util/types.ts:171](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L171)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ Defined in: [packages/mermaid/src/rendering-util/types.ts:148](https://github.co
|
|||||||
|
|
||||||
> **edges**: `Edge`\[]
|
> **edges**: `Edge`\[]
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/rendering-util/types.ts:147](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L147)
|
Defined in: [packages/mermaid/src/rendering-util/types.ts:170](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L170)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -38,4 +38,4 @@ Defined in: [packages/mermaid/src/rendering-util/types.ts:147](https://github.co
|
|||||||
|
|
||||||
> **nodes**: `Node`\[]
|
> **nodes**: `Node`\[]
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/rendering-util/types.ts:146](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L146)
|
Defined in: [packages/mermaid/src/rendering-util/types.ts:169](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L169)
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Interface: Mermaid
|
# Interface: Mermaid
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:418](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L418)
|
Defined in: [packages/mermaid/src/mermaid.ts:429](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L429)
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ Defined in: [packages/mermaid/src/mermaid.ts:418](https://github.com/mermaid-js/
|
|||||||
|
|
||||||
> **contentLoaded**: () => `void`
|
> **contentLoaded**: () => `void`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:436](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L436)
|
Defined in: [packages/mermaid/src/mermaid.ts:447](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L447)
|
||||||
|
|
||||||
\##contentLoaded Callback function that is called when page is loaded. This functions fetches
|
\##contentLoaded Callback function that is called when page is loaded. This functions fetches
|
||||||
configuration for mermaid rendering and calls init for rendering the mermaid diagrams on the
|
configuration for mermaid rendering and calls init for rendering the mermaid diagrams on the
|
||||||
@@ -32,9 +32,9 @@ page.
|
|||||||
|
|
||||||
### detectType()
|
### detectType()
|
||||||
|
|
||||||
> **detectType**: (`text`, `config`?) => `string`
|
> **detectType**: (`text`, `config?`) => `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:438](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L438)
|
Defined in: [packages/mermaid/src/mermaid.ts:449](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L449)
|
||||||
|
|
||||||
Detects the type of the graph text.
|
Detects the type of the graph text.
|
||||||
|
|
||||||
@@ -86,11 +86,28 @@ A graph definition key
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### getRegisteredDiagramsMetadata()
|
||||||
|
|
||||||
|
> **getRegisteredDiagramsMetadata**: () => `Pick`<[`ExternalDiagramDefinition`](ExternalDiagramDefinition.md), `"id"`>\[]
|
||||||
|
|
||||||
|
Defined in: [packages/mermaid/src/mermaid.ts:451](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L451)
|
||||||
|
|
||||||
|
Gets the metadata for all registered diagrams.
|
||||||
|
Currently only the id is returned.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Pick`<[`ExternalDiagramDefinition`](ExternalDiagramDefinition.md), `"id"`>\[]
|
||||||
|
|
||||||
|
An array of objects with the id of the diagram.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### ~~init()~~
|
### ~~init()~~
|
||||||
|
|
||||||
> **init**: (`config`?, `nodes`?, `callback`?) => `Promise`<`void`>
|
> **init**: (`config?`, `nodes?`, `callback?`) => `Promise`<`void`>
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:431](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L431)
|
Defined in: [packages/mermaid/src/mermaid.ts:442](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L442)
|
||||||
|
|
||||||
## init
|
## init
|
||||||
|
|
||||||
@@ -100,7 +117,7 @@ Defined in: [packages/mermaid/src/mermaid.ts:431](https://github.com/mermaid-js/
|
|||||||
|
|
||||||
[`MermaidConfig`](MermaidConfig.md)
|
[`MermaidConfig`](MermaidConfig.md)
|
||||||
|
|
||||||
**Deprecated**, please set configuration in [initialize](Mermaid.md#initialize).
|
**Deprecated**, please set configuration in [initialize](#initialize).
|
||||||
|
|
||||||
##### nodes?
|
##### nodes?
|
||||||
|
|
||||||
@@ -124,13 +141,13 @@ Called once for each rendered diagram's id.
|
|||||||
|
|
||||||
#### Deprecated
|
#### Deprecated
|
||||||
|
|
||||||
Use [initialize](Mermaid.md#initialize) and [run](Mermaid.md#run) instead.
|
Use [initialize](#initialize) and [run](#run) instead.
|
||||||
|
|
||||||
Renders the mermaid diagrams
|
Renders the mermaid diagrams
|
||||||
|
|
||||||
#### Deprecated
|
#### Deprecated
|
||||||
|
|
||||||
Use [initialize](Mermaid.md#initialize) and [run](Mermaid.md#run) instead.
|
Use [initialize](#initialize) and [run](#run) instead.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -138,7 +155,7 @@ Use [initialize](Mermaid.md#initialize) and [run](Mermaid.md#run) instead.
|
|||||||
|
|
||||||
> **initialize**: (`config`) => `void`
|
> **initialize**: (`config`) => `void`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:435](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L435)
|
Defined in: [packages/mermaid/src/mermaid.ts:446](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L446)
|
||||||
|
|
||||||
Used to set configurations for mermaid.
|
Used to set configurations for mermaid.
|
||||||
This function should be called before the run function.
|
This function should be called before the run function.
|
||||||
@@ -159,81 +176,89 @@ Configuration object for mermaid.
|
|||||||
|
|
||||||
### ~~mermaidAPI~~
|
### ~~mermaidAPI~~
|
||||||
|
|
||||||
> **mermaidAPI**: `Readonly`<{ `defaultConfig`: [`MermaidConfig`](MermaidConfig.md); `getConfig`: () => [`MermaidConfig`](MermaidConfig.md); `getDiagramFromText`: (`text`, `metadata`) => `Promise`<`Diagram`>; `getSiteConfig`: () => [`MermaidConfig`](MermaidConfig.md); `globalReset`: () => `void`; `initialize`: (`userOptions`) => `void`; `parse`: (`text`, `parseOptions`) => `Promise`<`false` | [`ParseResult`](ParseResult.md)>(`text`, `parseOptions`?) => `Promise`<[`ParseResult`](ParseResult.md)>; `render`: (`id`, `text`, `svgContainingElement`?) => `Promise`<[`RenderResult`](RenderResult.md)>; `reset`: () => `void`; `setConfig`: (`conf`) => [`MermaidConfig`](MermaidConfig.md); `updateSiteConfig`: (`conf`) => [`MermaidConfig`](MermaidConfig.md); }>
|
> **mermaidAPI**: `Readonly`<{ `defaultConfig`: [`MermaidConfig`](MermaidConfig.md); `getConfig`: () => [`MermaidConfig`](MermaidConfig.md); `getDiagramFromText`: (`text`, `metadata`) => `Promise`<`Diagram`>; `getSiteConfig`: () => [`MermaidConfig`](MermaidConfig.md); `globalReset`: () => `void`; `initialize`: (`userOptions`) => `void`; `parse`: {(`text`, `parseOptions`): `Promise`<`false` | [`ParseResult`](ParseResult.md)>; (`text`, `parseOptions?`): `Promise`<[`ParseResult`](ParseResult.md)>; }; `render`: (`id`, `text`, `svgContainingElement?`) => `Promise`<[`RenderResult`](RenderResult.md)>; `reset`: () => `void`; `setConfig`: (`conf`) => [`MermaidConfig`](MermaidConfig.md); `updateSiteConfig`: (`conf`) => [`MermaidConfig`](MermaidConfig.md); }>
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:425](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L425)
|
Defined in: [packages/mermaid/src/mermaid.ts:436](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L436)
|
||||||
|
|
||||||
**`Internal`**
|
**`Internal`**
|
||||||
|
|
||||||
#### Deprecated
|
#### Deprecated
|
||||||
|
|
||||||
Use [parse](Mermaid.md#parse) and [render](Mermaid.md#render) instead. Please [open a discussion](https://github.com/mermaid-js/mermaid/discussions) if your use case does not fit the new API.
|
Use [parse](#parse) and [render](#render) instead. Please [open a discussion](https://github.com/mermaid-js/mermaid/discussions) if your use case does not fit the new API.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### parse()
|
### parse()
|
||||||
|
|
||||||
> **parse**: (`text`, `parseOptions`) => `Promise`<`false` | [`ParseResult`](ParseResult.md)>(`text`, `parseOptions`?) => `Promise`<[`ParseResult`](ParseResult.md)>
|
> **parse**: {(`text`, `parseOptions`): `Promise`<`false` | [`ParseResult`](ParseResult.md)>; (`text`, `parseOptions?`): `Promise`<[`ParseResult`](ParseResult.md)>; }
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:426](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L426)
|
Defined in: [packages/mermaid/src/mermaid.ts:437](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L437)
|
||||||
|
|
||||||
|
#### Call Signature
|
||||||
|
|
||||||
|
> (`text`, `parseOptions`): `Promise`<`false` | [`ParseResult`](ParseResult.md)>
|
||||||
|
|
||||||
Parse the text and validate the syntax.
|
Parse the text and validate the syntax.
|
||||||
|
|
||||||
#### Parameters
|
##### Parameters
|
||||||
|
|
||||||
##### text
|
###### text
|
||||||
|
|
||||||
`string`
|
`string`
|
||||||
|
|
||||||
The mermaid diagram definition.
|
The mermaid diagram definition.
|
||||||
|
|
||||||
##### parseOptions
|
###### parseOptions
|
||||||
|
|
||||||
[`ParseOptions`](ParseOptions.md) & `object`
|
[`ParseOptions`](ParseOptions.md) & `object`
|
||||||
|
|
||||||
Options for parsing.
|
Options for parsing.
|
||||||
|
|
||||||
#### Returns
|
##### Returns
|
||||||
|
|
||||||
`Promise`<`false` | [`ParseResult`](ParseResult.md)>
|
`Promise`<`false` | [`ParseResult`](ParseResult.md)>
|
||||||
|
|
||||||
An object with the `diagramType` set to type of the diagram if valid. Otherwise `false` if parseOptions.suppressErrors is `true`.
|
An object with the `diagramType` set to type of the diagram if valid. Otherwise `false` if parseOptions.suppressErrors is `true`.
|
||||||
|
|
||||||
#### See
|
##### See
|
||||||
|
|
||||||
[ParseOptions](ParseOptions.md)
|
[ParseOptions](ParseOptions.md)
|
||||||
|
|
||||||
#### Throws
|
##### Throws
|
||||||
|
|
||||||
Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.
|
Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.
|
||||||
|
|
||||||
|
#### Call Signature
|
||||||
|
|
||||||
|
> (`text`, `parseOptions?`): `Promise`<[`ParseResult`](ParseResult.md)>
|
||||||
|
|
||||||
Parse the text and validate the syntax.
|
Parse the text and validate the syntax.
|
||||||
|
|
||||||
#### Parameters
|
##### Parameters
|
||||||
|
|
||||||
##### text
|
###### text
|
||||||
|
|
||||||
`string`
|
`string`
|
||||||
|
|
||||||
The mermaid diagram definition.
|
The mermaid diagram definition.
|
||||||
|
|
||||||
##### parseOptions?
|
###### parseOptions?
|
||||||
|
|
||||||
[`ParseOptions`](ParseOptions.md)
|
[`ParseOptions`](ParseOptions.md)
|
||||||
|
|
||||||
Options for parsing.
|
Options for parsing.
|
||||||
|
|
||||||
#### Returns
|
##### Returns
|
||||||
|
|
||||||
`Promise`<[`ParseResult`](ParseResult.md)>
|
`Promise`<[`ParseResult`](ParseResult.md)>
|
||||||
|
|
||||||
An object with the `diagramType` set to type of the diagram if valid. Otherwise `false` if parseOptions.suppressErrors is `true`.
|
An object with the `diagramType` set to type of the diagram if valid. Otherwise `false` if parseOptions.suppressErrors is `true`.
|
||||||
|
|
||||||
#### See
|
##### See
|
||||||
|
|
||||||
[ParseOptions](ParseOptions.md)
|
[ParseOptions](ParseOptions.md)
|
||||||
|
|
||||||
#### Throws
|
##### Throws
|
||||||
|
|
||||||
Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.
|
Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.
|
||||||
|
|
||||||
@@ -243,7 +268,7 @@ Error if the diagram is invalid and parseOptions.suppressErrors is false or not
|
|||||||
|
|
||||||
> `optional` **parseError**: [`ParseErrorFunction`](../type-aliases/ParseErrorFunction.md)
|
> `optional` **parseError**: [`ParseErrorFunction`](../type-aliases/ParseErrorFunction.md)
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:420](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L420)
|
Defined in: [packages/mermaid/src/mermaid.ts:431](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L431)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -251,7 +276,7 @@ Defined in: [packages/mermaid/src/mermaid.ts:420](https://github.com/mermaid-js/
|
|||||||
|
|
||||||
> **registerExternalDiagrams**: (`diagrams`, `opts`) => `Promise`<`void`>
|
> **registerExternalDiagrams**: (`diagrams`, `opts`) => `Promise`<`void`>
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:434](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L434)
|
Defined in: [packages/mermaid/src/mermaid.ts:445](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L445)
|
||||||
|
|
||||||
Used to register external diagram types.
|
Used to register external diagram types.
|
||||||
|
|
||||||
@@ -281,7 +306,7 @@ If opts.lazyLoad is false, the diagrams will be loaded immediately.
|
|||||||
|
|
||||||
> **registerIconPacks**: (`iconLoaders`) => `void`
|
> **registerIconPacks**: (`iconLoaders`) => `void`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:439](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L439)
|
Defined in: [packages/mermaid/src/mermaid.ts:450](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L450)
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
|
|
||||||
@@ -299,7 +324,7 @@ Defined in: [packages/mermaid/src/mermaid.ts:439](https://github.com/mermaid-js/
|
|||||||
|
|
||||||
> **registerLayoutLoaders**: (`loaders`) => `void`
|
> **registerLayoutLoaders**: (`loaders`) => `void`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:433](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L433)
|
Defined in: [packages/mermaid/src/mermaid.ts:444](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L444)
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
|
|
||||||
@@ -315,9 +340,9 @@ Defined in: [packages/mermaid/src/mermaid.ts:433](https://github.com/mermaid-js/
|
|||||||
|
|
||||||
### render()
|
### render()
|
||||||
|
|
||||||
> **render**: (`id`, `text`, `svgContainingElement`?) => `Promise`<[`RenderResult`](RenderResult.md)>
|
> **render**: (`id`, `text`, `svgContainingElement?`) => `Promise`<[`RenderResult`](RenderResult.md)>
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:427](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L427)
|
Defined in: [packages/mermaid/src/mermaid.ts:438](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L438)
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
|
|
||||||
@@ -349,7 +374,7 @@ Deprecated for external use.
|
|||||||
|
|
||||||
> **run**: (`options`) => `Promise`<`void`>
|
> **run**: (`options`) => `Promise`<`void`>
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:432](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L432)
|
Defined in: [packages/mermaid/src/mermaid.ts:443](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L443)
|
||||||
|
|
||||||
## run
|
## run
|
||||||
|
|
||||||
@@ -393,7 +418,7 @@ Optional runtime configs
|
|||||||
|
|
||||||
> **setParseErrorHandler**: (`parseErrorHandler`) => `void`
|
> **setParseErrorHandler**: (`parseErrorHandler`) => `void`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:437](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L437)
|
Defined in: [packages/mermaid/src/mermaid.ts:448](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L448)
|
||||||
|
|
||||||
## setParseErrorHandler Alternative to directly setting parseError using:
|
## setParseErrorHandler Alternative to directly setting parseError using:
|
||||||
|
|
||||||
@@ -424,4 +449,4 @@ New parseError() callback.
|
|||||||
|
|
||||||
> **startOnLoad**: `boolean`
|
> **startOnLoad**: `boolean`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:419](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L419)
|
Defined in: [packages/mermaid/src/mermaid.ts:430](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L430)
|
||||||
|
@@ -18,7 +18,7 @@ Defined in: [packages/mermaid/src/config.type.ts:58](https://github.com/mermaid-
|
|||||||
|
|
||||||
> `optional` **altFontFamily**: `string`
|
> `optional` **altFontFamily**: `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:122](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L122)
|
Defined in: [packages/mermaid/src/config.type.ts:132](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L132)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ Defined in: [packages/mermaid/src/config.type.ts:122](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **architecture**: `ArchitectureDiagramConfig`
|
> `optional` **architecture**: `ArchitectureDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:194](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L194)
|
Defined in: [packages/mermaid/src/config.type.ts:204](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L204)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ Defined in: [packages/mermaid/src/config.type.ts:194](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **arrowMarkerAbsolute**: `boolean`
|
> `optional` **arrowMarkerAbsolute**: `boolean`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:141](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L141)
|
Defined in: [packages/mermaid/src/config.type.ts:151](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L151)
|
||||||
|
|
||||||
Controls whether or arrow markers in html code are absolute paths or anchors.
|
Controls whether or arrow markers in html code are absolute paths or anchors.
|
||||||
This matters if you are using base tag settings.
|
This matters if you are using base tag settings.
|
||||||
@@ -45,7 +45,7 @@ This matters if you are using base tag settings.
|
|||||||
|
|
||||||
> `optional` **block**: `BlockDiagramConfig`
|
> `optional` **block**: `BlockDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:201](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L201)
|
Defined in: [packages/mermaid/src/config.type.ts:211](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L211)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ Defined in: [packages/mermaid/src/config.type.ts:201](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **c4**: `C4DiagramConfig`
|
> `optional` **c4**: `C4DiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:198](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L198)
|
Defined in: [packages/mermaid/src/config.type.ts:208](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L208)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ Defined in: [packages/mermaid/src/config.type.ts:198](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **class**: `ClassDiagramConfig`
|
> `optional` **class**: `ClassDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:187](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L187)
|
Defined in: [packages/mermaid/src/config.type.ts:197](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L197)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ Defined in: [packages/mermaid/src/config.type.ts:187](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **darkMode**: `boolean`
|
> `optional` **darkMode**: `boolean`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:113](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L113)
|
Defined in: [packages/mermaid/src/config.type.ts:123](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L123)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ Defined in: [packages/mermaid/src/config.type.ts:113](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **deterministicIds**: `boolean`
|
> `optional` **deterministicIds**: `boolean`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:174](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L174)
|
Defined in: [packages/mermaid/src/config.type.ts:184](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L184)
|
||||||
|
|
||||||
This option controls if the generated ids of nodes in the SVG are
|
This option controls if the generated ids of nodes in the SVG are
|
||||||
generated randomly or based on a seed.
|
generated randomly or based on a seed.
|
||||||
@@ -93,7 +93,7 @@ should not change unless content is changed.
|
|||||||
|
|
||||||
> `optional` **deterministicIDSeed**: `string`
|
> `optional` **deterministicIDSeed**: `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:181](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L181)
|
Defined in: [packages/mermaid/src/config.type.ts:191](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L191)
|
||||||
|
|
||||||
This option is the optional seed for deterministic ids.
|
This option is the optional seed for deterministic ids.
|
||||||
If set to `undefined` but deterministicIds is `true`, a simple number iterator is used.
|
If set to `undefined` but deterministicIds is `true`, a simple number iterator is used.
|
||||||
@@ -105,7 +105,7 @@ You can set this attribute to base the seed on a static string.
|
|||||||
|
|
||||||
> `optional` **dompurifyConfig**: `Config`
|
> `optional` **dompurifyConfig**: `Config`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:203](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L203)
|
Defined in: [packages/mermaid/src/config.type.ts:213](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L213)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -115,12 +115,24 @@ Defined in: [packages/mermaid/src/config.type.ts:203](https://github.com/mermaid
|
|||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:91](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L91)
|
Defined in: [packages/mermaid/src/config.type.ts:91](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L91)
|
||||||
|
|
||||||
|
#### considerModelOrder?
|
||||||
|
|
||||||
|
> `optional` **considerModelOrder**: `"NONE"` | `"NODES_AND_EDGES"` | `"PREFER_EDGES"` | `"PREFER_NODES"`
|
||||||
|
|
||||||
|
Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting.
|
||||||
|
|
||||||
#### cycleBreakingStrategy?
|
#### cycleBreakingStrategy?
|
||||||
|
|
||||||
> `optional` **cycleBreakingStrategy**: `"GREEDY"` | `"DEPTH_FIRST"` | `"INTERACTIVE"` | `"MODEL_ORDER"` | `"GREEDY_MODEL_ORDER"`
|
> `optional` **cycleBreakingStrategy**: `"GREEDY"` | `"DEPTH_FIRST"` | `"INTERACTIVE"` | `"MODEL_ORDER"` | `"GREEDY_MODEL_ORDER"`
|
||||||
|
|
||||||
This strategy decides how to find cycles in the graph and deciding which edges need adjustment to break loops.
|
This strategy decides how to find cycles in the graph and deciding which edges need adjustment to break loops.
|
||||||
|
|
||||||
|
#### forceNodeModelOrder?
|
||||||
|
|
||||||
|
> `optional` **forceNodeModelOrder**: `boolean`
|
||||||
|
|
||||||
|
The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES.
|
||||||
|
|
||||||
#### mergeEdges?
|
#### mergeEdges?
|
||||||
|
|
||||||
> `optional` **mergeEdges**: `boolean`
|
> `optional` **mergeEdges**: `boolean`
|
||||||
@@ -139,7 +151,7 @@ Elk specific option affecting how nodes are placed.
|
|||||||
|
|
||||||
> `optional` **er**: `ErDiagramConfig`
|
> `optional` **er**: `ErDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:189](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L189)
|
Defined in: [packages/mermaid/src/config.type.ts:199](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L199)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -147,7 +159,7 @@ Defined in: [packages/mermaid/src/config.type.ts:189](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **flowchart**: `FlowchartDiagramConfig`
|
> `optional` **flowchart**: `FlowchartDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:182](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L182)
|
Defined in: [packages/mermaid/src/config.type.ts:192](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L192)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -155,7 +167,7 @@ Defined in: [packages/mermaid/src/config.type.ts:182](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **fontFamily**: `string`
|
> `optional` **fontFamily**: `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:121](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L121)
|
Defined in: [packages/mermaid/src/config.type.ts:131](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L131)
|
||||||
|
|
||||||
Specifies the font to be used in the rendered diagrams.
|
Specifies the font to be used in the rendered diagrams.
|
||||||
Can be any possible CSS `font-family`.
|
Can be any possible CSS `font-family`.
|
||||||
@@ -167,7 +179,7 @@ See <https://developer.mozilla.org/en-US/docs/Web/CSS/font-family>
|
|||||||
|
|
||||||
> `optional` **fontSize**: `number`
|
> `optional` **fontSize**: `number`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:205](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L205)
|
Defined in: [packages/mermaid/src/config.type.ts:215](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L215)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -175,7 +187,7 @@ Defined in: [packages/mermaid/src/config.type.ts:205](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **forceLegacyMathML**: `boolean`
|
> `optional` **forceLegacyMathML**: `boolean`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:163](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L163)
|
Defined in: [packages/mermaid/src/config.type.ts:173](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L173)
|
||||||
|
|
||||||
This option forces Mermaid to rely on KaTeX's own stylesheet for rendering MathML. Due to differences between OS
|
This option forces Mermaid to rely on KaTeX's own stylesheet for rendering MathML. Due to differences between OS
|
||||||
fonts and browser's MathML implementation, this option is recommended if consistent rendering is important.
|
fonts and browser's MathML implementation, this option is recommended if consistent rendering is important.
|
||||||
@@ -187,7 +199,7 @@ If set to true, ignores legacyMathML.
|
|||||||
|
|
||||||
> `optional` **gantt**: `GanttDiagramConfig`
|
> `optional` **gantt**: `GanttDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:184](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L184)
|
Defined in: [packages/mermaid/src/config.type.ts:194](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L194)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -195,7 +207,7 @@ Defined in: [packages/mermaid/src/config.type.ts:184](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **gitGraph**: `GitGraphDiagramConfig`
|
> `optional` **gitGraph**: `GitGraphDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:197](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L197)
|
Defined in: [packages/mermaid/src/config.type.ts:207](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L207)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -213,7 +225,7 @@ Defines the seed to be used when using handDrawn look. This is important for the
|
|||||||
|
|
||||||
> `optional` **htmlLabels**: `boolean`
|
> `optional` **htmlLabels**: `boolean`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:114](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L114)
|
Defined in: [packages/mermaid/src/config.type.ts:124](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L124)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -221,7 +233,7 @@ Defined in: [packages/mermaid/src/config.type.ts:114](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **journey**: `JourneyDiagramConfig`
|
> `optional` **journey**: `JourneyDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:185](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L185)
|
Defined in: [packages/mermaid/src/config.type.ts:195](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L195)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -229,7 +241,7 @@ Defined in: [packages/mermaid/src/config.type.ts:185](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **kanban**: `KanbanDiagramConfig`
|
> `optional` **kanban**: `KanbanDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:196](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L196)
|
Defined in: [packages/mermaid/src/config.type.ts:206](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L206)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -247,7 +259,7 @@ Defines which layout algorithm to use for rendering the diagram.
|
|||||||
|
|
||||||
> `optional` **legacyMathML**: `boolean`
|
> `optional` **legacyMathML**: `boolean`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:156](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L156)
|
Defined in: [packages/mermaid/src/config.type.ts:166](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L166)
|
||||||
|
|
||||||
This option specifies if Mermaid can expect the dependent to include KaTeX stylesheets for browsers
|
This option specifies if Mermaid can expect the dependent to include KaTeX stylesheets for browsers
|
||||||
without their own MathML implementation. If this option is disabled and MathML is not supported, the math
|
without their own MathML implementation. If this option is disabled and MathML is not supported, the math
|
||||||
@@ -260,7 +272,7 @@ fall back to legacy rendering for KaTeX.
|
|||||||
|
|
||||||
> `optional` **logLevel**: `0` | `2` | `1` | `"trace"` | `"debug"` | `"info"` | `"warn"` | `"error"` | `"fatal"` | `3` | `4` | `5`
|
> `optional` **logLevel**: `0` | `2` | `1` | `"trace"` | `"debug"` | `"info"` | `"warn"` | `"error"` | `"fatal"` | `3` | `4` | `5`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:127](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L127)
|
Defined in: [packages/mermaid/src/config.type.ts:137](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L137)
|
||||||
|
|
||||||
This option decides the amount of logging to be used by mermaid.
|
This option decides the amount of logging to be used by mermaid.
|
||||||
|
|
||||||
@@ -280,7 +292,7 @@ Defines which main look to use for the diagram.
|
|||||||
|
|
||||||
> `optional` **markdownAutoWrap**: `boolean`
|
> `optional` **markdownAutoWrap**: `boolean`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:206](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L206)
|
Defined in: [packages/mermaid/src/config.type.ts:216](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L216)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -308,7 +320,7 @@ The maximum allowed size of the users text diagram
|
|||||||
|
|
||||||
> `optional` **mindmap**: `MindmapDiagramConfig`
|
> `optional` **mindmap**: `MindmapDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:195](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L195)
|
Defined in: [packages/mermaid/src/config.type.ts:205](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L205)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -316,7 +328,7 @@ Defined in: [packages/mermaid/src/config.type.ts:195](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **packet**: `PacketDiagramConfig`
|
> `optional` **packet**: `PacketDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:200](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L200)
|
Defined in: [packages/mermaid/src/config.type.ts:210](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L210)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -324,7 +336,7 @@ Defined in: [packages/mermaid/src/config.type.ts:200](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **pie**: `PieDiagramConfig`
|
> `optional` **pie**: `PieDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:190](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L190)
|
Defined in: [packages/mermaid/src/config.type.ts:200](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L200)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -332,7 +344,7 @@ Defined in: [packages/mermaid/src/config.type.ts:190](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **quadrantChart**: `QuadrantChartConfig`
|
> `optional` **quadrantChart**: `QuadrantChartConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:191](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L191)
|
Defined in: [packages/mermaid/src/config.type.ts:201](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L201)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -340,7 +352,7 @@ Defined in: [packages/mermaid/src/config.type.ts:191](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **radar**: `RadarDiagramConfig`
|
> `optional` **radar**: `RadarDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:202](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L202)
|
Defined in: [packages/mermaid/src/config.type.ts:212](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L212)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -348,7 +360,7 @@ Defined in: [packages/mermaid/src/config.type.ts:202](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **requirement**: `RequirementDiagramConfig`
|
> `optional` **requirement**: `RequirementDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:193](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L193)
|
Defined in: [packages/mermaid/src/config.type.ts:203](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L203)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -356,7 +368,7 @@ Defined in: [packages/mermaid/src/config.type.ts:193](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **sankey**: `SankeyDiagramConfig`
|
> `optional` **sankey**: `SankeyDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:199](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L199)
|
Defined in: [packages/mermaid/src/config.type.ts:209](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L209)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -364,7 +376,7 @@ Defined in: [packages/mermaid/src/config.type.ts:199](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **secure**: `string`\[]
|
> `optional` **secure**: `string`\[]
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:148](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L148)
|
Defined in: [packages/mermaid/src/config.type.ts:158](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L158)
|
||||||
|
|
||||||
This option controls which `currentConfig` keys are considered secure and
|
This option controls which `currentConfig` keys are considered secure and
|
||||||
can only be changed via call to `mermaid.initialize`.
|
can only be changed via call to `mermaid.initialize`.
|
||||||
@@ -376,7 +388,7 @@ This prevents malicious graph directives from overriding a site's default securi
|
|||||||
|
|
||||||
> `optional` **securityLevel**: `"strict"` | `"loose"` | `"antiscript"` | `"sandbox"`
|
> `optional` **securityLevel**: `"strict"` | `"loose"` | `"antiscript"` | `"sandbox"`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:131](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L131)
|
Defined in: [packages/mermaid/src/config.type.ts:141](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L141)
|
||||||
|
|
||||||
Level of trust for parsed diagram
|
Level of trust for parsed diagram
|
||||||
|
|
||||||
@@ -386,7 +398,7 @@ Level of trust for parsed diagram
|
|||||||
|
|
||||||
> `optional` **sequence**: `SequenceDiagramConfig`
|
> `optional` **sequence**: `SequenceDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:183](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L183)
|
Defined in: [packages/mermaid/src/config.type.ts:193](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L193)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -394,7 +406,7 @@ Defined in: [packages/mermaid/src/config.type.ts:183](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **startOnLoad**: `boolean`
|
> `optional` **startOnLoad**: `boolean`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:135](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L135)
|
Defined in: [packages/mermaid/src/config.type.ts:145](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L145)
|
||||||
|
|
||||||
Dictates whether mermaid starts on Page load
|
Dictates whether mermaid starts on Page load
|
||||||
|
|
||||||
@@ -404,7 +416,7 @@ Dictates whether mermaid starts on Page load
|
|||||||
|
|
||||||
> `optional` **state**: `StateDiagramConfig`
|
> `optional` **state**: `StateDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:188](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L188)
|
Defined in: [packages/mermaid/src/config.type.ts:198](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L198)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -412,7 +424,7 @@ Defined in: [packages/mermaid/src/config.type.ts:188](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **suppressErrorRendering**: `boolean`
|
> `optional` **suppressErrorRendering**: `boolean`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:212](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L212)
|
Defined in: [packages/mermaid/src/config.type.ts:222](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L222)
|
||||||
|
|
||||||
Suppresses inserting 'Syntax error' diagram in the DOM.
|
Suppresses inserting 'Syntax error' diagram in the DOM.
|
||||||
This is useful when you want to control how to handle syntax errors in your application.
|
This is useful when you want to control how to handle syntax errors in your application.
|
||||||
@@ -450,7 +462,7 @@ Defined in: [packages/mermaid/src/config.type.ts:65](https://github.com/mermaid-
|
|||||||
|
|
||||||
> `optional` **timeline**: `TimelineDiagramConfig`
|
> `optional` **timeline**: `TimelineDiagramConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:186](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L186)
|
Defined in: [packages/mermaid/src/config.type.ts:196](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L196)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -458,7 +470,7 @@ Defined in: [packages/mermaid/src/config.type.ts:186](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **wrap**: `boolean`
|
> `optional` **wrap**: `boolean`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:204](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L204)
|
Defined in: [packages/mermaid/src/config.type.ts:214](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L214)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -466,4 +478,4 @@ Defined in: [packages/mermaid/src/config.type.ts:204](https://github.com/mermaid
|
|||||||
|
|
||||||
> `optional` **xyChart**: `XYChartConfig`
|
> `optional` **xyChart**: `XYChartConfig`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:192](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L192)
|
Defined in: [packages/mermaid/src/config.type.ts:202](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L202)
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Interface: ParseOptions
|
# Interface: ParseOptions
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:59](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L59)
|
Defined in: [packages/mermaid/src/types.ts:88](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L88)
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ Defined in: [packages/mermaid/src/types.ts:59](https://github.com/mermaid-js/mer
|
|||||||
|
|
||||||
> `optional` **suppressErrors**: `boolean`
|
> `optional` **suppressErrors**: `boolean`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:64](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L64)
|
Defined in: [packages/mermaid/src/types.ts:93](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L93)
|
||||||
|
|
||||||
If `true`, parse will return `false` instead of throwing error when the diagram is invalid.
|
If `true`, parse will return `false` instead of throwing error when the diagram is invalid.
|
||||||
The `parseError` function will not be called.
|
The `parseError` function will not be called.
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Interface: ParseResult
|
# Interface: ParseResult
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:67](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L67)
|
Defined in: [packages/mermaid/src/types.ts:96](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L96)
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ Defined in: [packages/mermaid/src/types.ts:67](https://github.com/mermaid-js/mer
|
|||||||
|
|
||||||
> **config**: [`MermaidConfig`](MermaidConfig.md)
|
> **config**: [`MermaidConfig`](MermaidConfig.md)
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:75](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L75)
|
Defined in: [packages/mermaid/src/types.ts:104](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L104)
|
||||||
|
|
||||||
The config passed as YAML frontmatter or directives
|
The config passed as YAML frontmatter or directives
|
||||||
|
|
||||||
@@ -28,6 +28,6 @@ The config passed as YAML frontmatter or directives
|
|||||||
|
|
||||||
> **diagramType**: `string`
|
> **diagramType**: `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:71](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L71)
|
Defined in: [packages/mermaid/src/types.ts:100](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L100)
|
||||||
|
|
||||||
The diagram type, e.g. 'flowchart', 'sequence', etc.
|
The diagram type, e.g. 'flowchart', 'sequence', etc.
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Interface: RenderResult
|
# Interface: RenderResult
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:85](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L85)
|
Defined in: [packages/mermaid/src/types.ts:114](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L114)
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ Defined in: [packages/mermaid/src/types.ts:85](https://github.com/mermaid-js/mer
|
|||||||
|
|
||||||
> `optional` **bindFunctions**: (`element`) => `void`
|
> `optional` **bindFunctions**: (`element`) => `void`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:103](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L103)
|
Defined in: [packages/mermaid/src/types.ts:132](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L132)
|
||||||
|
|
||||||
Bind function to be called after the svg has been inserted into the DOM.
|
Bind function to be called after the svg has been inserted into the DOM.
|
||||||
This is necessary for adding event listeners to the elements in the svg.
|
This is necessary for adding event listeners to the elements in the svg.
|
||||||
@@ -45,7 +45,7 @@ bindFunctions?.(div); // To call bindFunctions only if it's present.
|
|||||||
|
|
||||||
> **diagramType**: `string`
|
> **diagramType**: `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:93](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L93)
|
Defined in: [packages/mermaid/src/types.ts:122](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L122)
|
||||||
|
|
||||||
The diagram type, e.g. 'flowchart', 'sequence', etc.
|
The diagram type, e.g. 'flowchart', 'sequence', etc.
|
||||||
|
|
||||||
@@ -55,6 +55,6 @@ The diagram type, e.g. 'flowchart', 'sequence', etc.
|
|||||||
|
|
||||||
> **svg**: `string`
|
> **svg**: `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:89](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L89)
|
Defined in: [packages/mermaid/src/types.ts:118](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L118)
|
||||||
|
|
||||||
The svg code for the rendered graph.
|
The svg code for the rendered graph.
|
||||||
|
65
docs/config/setup/mermaid/interfaces/UnknownDiagramError.md
Normal file
65
docs/config/setup/mermaid/interfaces/UnknownDiagramError.md
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
> **Warning**
|
||||||
|
>
|
||||||
|
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
||||||
|
>
|
||||||
|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/mermaid/interfaces/UnknownDiagramError.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/interfaces/UnknownDiagramError.md).
|
||||||
|
|
||||||
|
[**mermaid**](../../README.md)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Interface: UnknownDiagramError
|
||||||
|
|
||||||
|
Defined in: [packages/mermaid/src/errors.ts:1](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/errors.ts#L1)
|
||||||
|
|
||||||
|
## Extends
|
||||||
|
|
||||||
|
- `Error`
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### cause?
|
||||||
|
|
||||||
|
> `optional` **cause**: `unknown`
|
||||||
|
|
||||||
|
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
`Error.cause`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### message
|
||||||
|
|
||||||
|
> **message**: `string`
|
||||||
|
|
||||||
|
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es5.d.ts:1077
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
`Error.message`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### name
|
||||||
|
|
||||||
|
> **name**: `string`
|
||||||
|
|
||||||
|
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es5.d.ts:1076
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
`Error.name`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### stack?
|
||||||
|
|
||||||
|
> `optional` **stack**: `string`
|
||||||
|
|
||||||
|
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es5.d.ts:1078
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
`Error.stack`
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user