Compare commits

..

502 Commits

Author SHA1 Message Date
Sidharth Vinod
9a3498fba8 fix: Handle langium data loss warning
It's not an issue to actually lose the data, as we're just taking the last value anyways. But having the warnings clog up the console means we might miss actual warnings.
2025-04-15 09:48:50 +05:30
Sidharth Vinod
3ae87ca06a chore: Ignore timeout domains 2025-04-15 09:42:52 +05:30
Sidharth Vinod
3e8204aa21 Merge pull request #6365 from mermaid-js/renovate/major-all-major
fix(deps): update all major dependencies (major)
2025-04-15 03:13:33 +00:00
Sidharth Vinod
0b57984d27 Merge pull request #6475 from Shahir-47/feature/5806_xy-chart-data-labels
feat: Dynamically Render Data Labels Within Bar Charts
2025-04-15 03:13:03 +00:00
Sidharth Vinod
bcaa40f1d5 Merge pull request #6225 from Shahir-47/feature/3508_color-user-journey-title
feat: Add support for styling Journey Diagram title (color, font-family, and font-size)
2025-04-15 03:12:24 +00:00
autofix-ci[bot]
0107494b59 [autofix.ci] apply automated fixes 2025-04-15 02:32:13 +00:00
autofix-ci[bot]
11c3ac58fd [autofix.ci] apply automated fixes 2025-04-15 02:25:23 +00:00
Sidharth Vinod
af2eb13932 Merge branch 'develop' into feature/3508_color-user-journey-title 2025-04-14 19:23:47 -07:00
Sidharth Vinod
41e84b726a Create neat-moose-compare.md 2025-04-14 19:23:19 -07:00
Sidharth Vinod
a1ba65c0c0 chore: Add changeset 2025-04-14 19:20:47 -07:00
Shahir Ahmed
5fe6e5dccc Merge branch 'develop' into feature/5806_xy-chart-data-labels
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-14 14:44:53 -04:00
pranavm2109
946452c7b4 updated tests
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-04-14 14:38:23 -04:00
pranavm2109
4bb6351489 modified description of showDataLabel in config schema and added it to docs
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-04-14 13:53:18 -04:00
renovate[bot]
8c63a2e411 fix(deps): update all major dependencies 2025-04-14 07:25:55 +00:00
Sidharth Vinod
4467fd4363 Merge pull request #6482 from mermaid-js/renovate/peter-evans-create-pull-request-digest
chore(deps): update peter-evans/create-pull-request digest to a7b20e1
2025-04-14 07:09:53 +00:00
renovate[bot]
7e567a8759 chore(deps): update peter-evans/create-pull-request digest to a7b20e1 2025-04-14 06:17:30 +00:00
Ashish Jain
edf062720d Merge pull request #6459 from mermaid-js/renovate/patch-dompurify
fix(deps): update dependency dompurify to ^3.2.5
2025-04-14 06:03:40 +00:00
renovate[bot]
3348eea6af fix(deps): update dependency dompurify to ^3.2.5 2025-04-14 04:46:04 +00:00
Sidharth Vinod
ae7ffab9ac Merge pull request #6483 from universeroc/develop
Add Mermaid plus for Confluence into integrations-community.md
2025-04-14 04:32:13 +00:00
autofix-ci[bot]
ecdbc676d2 [autofix.ci] apply automated fixes 2025-04-14 04:01:42 +00:00
universeroc
6a01b04e3c Update integrations-community.md 2025-04-14 11:55:45 +08:00
autofix-ci[bot]
aafe8de3d3 [autofix.ci] apply automated fixes 2025-04-14 03:52:31 +00:00
universeroc
24287637b5 Add Mermaid plus for Confluence into integrations-community.md 2025-04-14 11:43:32 +08:00
Shahir Ahmed
f69cc17795 refactor xy-chart tests
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-11 16:24:10 -04:00
Shahir Ahmed
934f4da507 Merge remote-tracking branch 'origin/develop' into feature/3508_color-user-journey-title
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-11 00:16:46 -04:00
Shahir Ahmed
6957f35782 Merge branch 'develop' into feature/5806_xy-chart-data-labels
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-10 21:42:37 -04:00
Shahir Ahmed
b00be59ea8 added new tests
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-10 21:22:36 -04:00
Shahir Ahmed
dff00f2c4f added new tests
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-10 21:04:55 -04:00
Sidharth Vinod
eb9987435a Merge pull request #6364 from mermaid-js/renovate/eslint
chore(deps): update eslint (minor)
2025-04-10 07:18:54 +00:00
Sidharth Vinod
a300d0db94 Merge pull request #6391 from regisbsb/patch-1
Remove duplicates in integrations-community.md
2025-04-10 07:16:37 +00:00
Sidharth Vinod
7e7f3c56c2 Merge pull request #6456 from nour0205/fix/edge-id-en-dash-docs-6455
fix(docs): fix edge ID example
2025-04-10 07:10:08 +00:00
renovate[bot]
ea987861f3 chore(deps): update eslint 2025-04-09 13:45:21 +00:00
Sidharth Vinod
178c7130c6 Merge pull request #6465 from aloisklink/build/fix-mermaid-zenuml
build: fix `mermaid-zenuml` IIFE build and add changesets
2025-04-09 01:42:37 -07:00
Sidharth Vinod
f87d0dd88a chore: Update change detection logic 2025-04-09 13:20:19 +05:30
Sidharth Vinod
2396f90269 Merge pull request #6467 from mermaid-js/sidv/checkTimings
Reduce timing update PRs
2025-04-08 23:54:15 -07:00
Sidharth Vinod
97e35fd30a chore: Use git to read old timings 2025-04-09 12:19:13 +05:30
Sidharth Vinod
7a5f999f42 chore: Add compare-timings script
Avoid creating unnecessary PRs when there is no significant timings change.
2025-04-09 12:08:57 +05:30
Sidharth Vinod
cd8d74bb96 Merge pull request #6274 from Shahir-47/bug/5955_adjust-diagram-position-with-legend-width
fix: Prevent Legend Labels from Overlapping Diagram Elements in Journey Diagrams
2025-04-08 17:17:06 +00:00
Sidharth Vinod
56c6853e05 Merge pull request #6463 from AaronMoat/undefined
Fix incorrect `style="undefined;"` output in some Mermaid diagrams
2025-04-08 12:46:11 +00:00
Sidharth Vinod
01e2af0cfd Merge pull request #6407 from thomascizeron/fix/6162_greedyRegexInCommonLangium
Fix: greedy regex in common langium
2025-04-08 11:33:43 +00:00
Sidharth Vinod
f55ff99f74 Merge branch 'develop' into fix/6162_greedyRegexInCommonLangium 2025-04-08 04:25:20 -07:00
Aaron Moat
d25770ee73 Format changeset message 2025-04-08 19:55:05 +10:00
Aaron Moat
2b05d7e1ed Fix incorrect style="undefined;" output in some Mermaid diagrams 2025-04-08 19:49:47 +10:00
Sidharth Vinod
30735266a4 Merge pull request #6461 from mermaid-js/update-timings
Update E2E Timings
2025-04-08 00:14:25 -07:00
github-actions[bot]
926862c196 chore: update E2E timings 2025-04-08 06:53:44 +00:00
Sidharth Vinod
44e668e704 chore: Update permission for timings action 2025-04-08 11:58:46 +05:30
Sidharth Vinod
404216273a chore: Fix PR action in e2e-timings 2025-04-08 11:01:28 +05:30
Sidharth Vinod
5a6831ae7e chore: Fix branch in e2e-timings 2025-04-08 10:13:59 +05:30
Alois Klink
03119fea2c chore(zenuml): add pending ZenUML changesets
Add ZenUML changesets for:

- Bumping the minimum version of ZenUML to 3.23.28
- Limiting the `peerDepdencies` to v10 and v11

See: 9d06d8f31e
See: 0ad44c12fe
2025-04-07 17:58:40 +08:00
Alois Klink
5351211256 build(zenuml): add back IIFE ZenUML builds
These are present in [v0.2.0][1] so removing these would be a breaking
change. I suspect we accidentally removed them when we moved from
Vite to ESBuild.

[1]: https://www.npmjs.com/package/@mermaid-js/mermaid-zenuml/v/0.2.0
2025-04-07 17:58:40 +08:00
Alois Klink
92c0aa4331 build(esbuild): support multiple IIFE packages
Support multiple IIFE packages by namespacing all of them into a
`globalThis.__esbuild_esm_mermaid_nm` object.
2025-04-07 17:58:40 +08:00
Alois Klink
7bd5c03d87 Merge pull request #6426 from internetisaiah/patch-1
Fix formatting of ELK example in ERD + clarify usage
2025-04-07 08:35:03 +00:00
Alois Klink
de72e18a7f docs: improve elk section of ER docs 2025-04-07 16:07:43 +08:00
nour kouider
4fdb1d5906 docs: correct edge syntax from -> to --> 2025-04-05 13:39:30 +01:00
Shahir Ahmed
a2bf5103ce test for vertical xy-axis
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-04 21:44:00 -04:00
Shahir Ahmed
8b7a4db2ef test for horzontal xy-axis
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-04 21:34:46 -04:00
Shahir Ahmed
73f8dee643 add config to test files
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-04 15:22:40 -04:00
pranavm2109
8bdd7ec719 updated tests to account for showDataLabel set to false as default
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-04-04 15:20:51 -04:00
nour kouider
7facc8f50d docs: fix edge ID example and regenerate flowchart output 2025-04-04 19:04:02 +01:00
autofix-ci[bot]
52cd9e8e55 [autofix.ci] apply automated fixes 2025-04-04 17:37:42 +00:00
nour kouider
9208e7faaf fix(docs): fix edge ID example 2025-04-04 18:22:56 +01:00
Shahir Ahmed
2798e27b1e dynamically resizes horizontal xychart bar
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-04-02 23:00:12 -04:00
Shahir Ahmed
f4c08a0c6f dynamically resizes vertical xychart bar
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-04-02 22:25:34 -04:00
Shahir Ahmed
6a538da07d Merge branch 'develop' into feature/5806_xy-chart-data-labels 2025-04-02 17:22:13 -04:00
Shahir Ahmed
b2dfa74865 Merge branch 'develop' into feature/3508_color-user-journey-title 2025-04-02 17:19:44 -04:00
Shahir Ahmed
930e917215 Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-04-02 17:18:45 -04:00
Thomas Di Cizerone
cdbd3e58a3 🆙 Run pnpm changeset 2025-04-02 18:50:20 +02:00
Thomas Di Cizerone
630c4d6954 🤏 Update Note comment 2025-04-02 18:50:20 +02:00
Thomas Di Cizerone
fd4493733f Add TODO for architecture support of title embedded in render 2025-04-02 18:50:20 +02:00
Thomas Di Cizerone
e588743bf4 ⚗️ Add unit tests and e2e for architecture diagram with titleAndAccessibilities 2025-04-02 18:50:20 +02:00
Thomas Di Cizerone
04d68e7f9a ⚗️ Add parser tests for architecture and other edge cases encountered 2025-04-02 18:50:20 +02:00
Thomas Di Cizerone
9795b6e089 🖋️ Refactor common grammar to avoid unwanted greedy terminals 2025-04-02 18:50:20 +02:00
Ashish Jain
ceb8d4c7ef Merge pull request #6445 from mermaid-js/omkarht/chore/downgrade-chokidar-to-3.6.0
chore: Downgrade chokidar to 3.6.0 for hot reloading fix
2025-04-01 12:43:53 +00:00
omkarht
32c70a0f6a chore: Downgrade chokidar to 3.6.0 for hot reloading fix 2025-03-31 20:38:12 +05:30
Knut Sveidqvist
af2632f14a Merge pull request #6442 from mermaid-js/renovate/major-eslint
chore(deps): update dependency eslint-plugin-unicorn to v58
2025-03-31 07:33:19 +00:00
renovate[bot]
8f89ba1930 chore(deps): update dependency eslint-plugin-unicorn to v58 2025-03-31 01:56:12 +00:00
Shahir Ahmed
ad6f855f5e adds dynamic text adjustment
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-28 16:04:51 -04:00
Shahir Ahmed
f2f2a1d275 adds test and horizontal support
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-27 23:09:27 -04:00
Shahir Ahmed
17fcf43cdb fix typo
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-27 22:14:07 -04:00
Shahir Ahmed
99a2dc7c1f adds label data to bar chart
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-27 21:51:21 -04:00
Shahir Ahmed
34e756fde6 add label config
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-27 20:32:35 -04:00
Shahir Ahmed
f74fad057a Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-03-27 20:16:45 -04:00
Shahir Ahmed
32ea973b12 Merge branch 'develop' into feature/3508_color-user-journey-title 2025-03-27 20:14:13 -04:00
isaiah robinson
0104d19f66 Fix formatting of ELK example in ERD + clarify usage 2025-03-27 15:47:43 -07:00
Ashish Jain
936d1074b2 Merge pull request #6413 from mermaid-js/master
Merge back v11.6.0 to develop
2025-03-25 12:51:55 +00:00
Ashish Jain
7b2083926d Merge pull request #6412 from mermaid-js/changeset-release/master
Version Packages
2025-03-25 12:42:47 +01:00
github-actions[bot]
bb9210c55e Version Packages 2025-03-25 11:37:21 +00:00
Ashish Jain
16d9b63457 Add missing changeset for requirement diagram fix 2025-03-25 12:35:21 +01:00
Ashish Jain
bf3370fa5b Merge pull request #6409 from mermaid-js/release/11.6.0
Release/11.6.0
2025-03-25 11:51:37 +01:00
Ashish Jain
9f9091e5e4 Update mermaid version palceholder 2025-03-25 11:20:09 +01:00
Ashish Jain
d1b1a67d99 Merge pull request #6410 from aloisklink/test/fix-cypress-on-nodejs-v20.19.0
test(e2e): fix Cypress config for Node.JS v20.19.0
2025-03-25 09:55:42 +00:00
Alois Klink
ac625bdc7f test(e2e): fix Cypress config for Node.JS v20.19.0
Node.JS v20.19.0 breaks `import '@cypress/code-coverage/task'` in the
`cypress.config.ts` for some reason (this is probably due to the new
`experimental-require-module` feature that is enabled by default in
Node.JS v20.19.0).

As a work-around, we can change this to
`@cypress/code-coverage/task.js`.

See: https://github.com/cypress-io/code-coverage/pull/940
See: https://nodejs.org/en/blog/release/v20.19.0
2025-03-25 18:28:13 +09:00
Ashish Jain
40b85c3bbf Merge pull request #6408 from mermaid-js/fix/6193-curve-interpolation
fix: restore curve type configuration functionality for flowcharts
2025-03-24 22:34:09 +01:00
Ashish Jain
f8e329f890 Merge branch 'develop' into fix/6193-curve-interpolation 2025-03-24 21:21:11 +01:00
Ashish Jain
9b9cec9809 Merge pull request #6386 from bollwyvl/patch-5
Move requirements containment arrow to edge start
2025-03-24 02:13:53 +01:00
Ashish Jain
ad653138e1 fix: restore curve type configuration functionality for flowcharts (#6193) 2025-03-24 00:25:03 +01:00
Ashish Jain
f5f3b08f12 Merge pull request #6381 from thomascizeron/feat/2280_radarDiagram
feat: Add radar diagram
2025-03-21 12:37:37 +01:00
Shahir Ahmed
f7e31a978b update docs
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-19 23:44:21 -04:00
Shahir Ahmed
2d583b186d fix some pixel issues
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-19 22:51:02 -04:00
Shahir Ahmed
b322392f97 refactor tests
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-19 21:18:45 -04:00
Shahir Ahmed
573b6d9ba7 remove redundant test
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-19 20:58:17 -04:00
Shahir Ahmed
ea39254556 ensure maxLabelWidth is a number
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-19 20:41:43 -04:00
Shahir Ahmed
044a3d9686 Set legend width baseline (conf.leftMargin) and expand dynamically
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-19 20:34:44 -04:00
autofix-ci[bot]
f28f7b713d [autofix.ci] apply automated fixes 2025-03-18 23:58:40 +00:00
Regis Bittencourt
cfbd05515e Remove duplicates in integrations-community.md 2025-03-18 20:53:19 -03:00
Shahir Ahmed
20927a1c8e remove max and min attributes for maxLabelWidth
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-18 15:39:58 -04:00
pranavm2109
b2ab34ca2b fixed linting issue
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-03-18 15:36:50 -04:00
Shahir Ahmed
55e1dd0ead implemented knuth-plass line-breaking algorithm
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-18 15:32:04 -04:00
Shahir Ahmed
a403f78168 Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-03-18 15:17:45 -04:00
Shahir Ahmed
6c45aa3602 Merge branch 'develop' into feature/3508_color-user-journey-title 2025-03-18 15:15:45 -04:00
Nicholas Bollweg
85ce310884 rework contains geometry to avoid clipping 2025-03-17 16:36:46 -05:00
Nicholas Bollweg
fac570cb8c try arrowhead 2025-03-17 15:43:57 -05:00
Nicholas Bollweg
a7bcd7dee5 #6380: move requirements containment arrow to start 2025-03-17 15:32:52 -05:00
Thomas Di Cizerone
bb5a7a585e ⚗️ Add radar renderer tests 2025-03-16 22:04:30 +01:00
Thomas Di Cizerone
5d1b27132a 🩹 Fix: text-color ➙ color 2025-03-16 19:00:25 +01:00
autofix-ci[bot]
288abd01e0 [autofix.ci] apply automated fixes 2025-03-16 17:46:44 +00:00
Thomas Di Cizerone
95d73bc3f0 🆙 Run pnpm changeset 2025-03-16 18:41:43 +01:00
Thomas Di Cizerone
0f5125b5e3 🖼️ Add Radar Demo with custom opacity 2025-03-16 18:34:00 +01:00
Thomas Di Cizerone
12c120368d 📚 Add documentation 2025-03-16 18:20:03 +01:00
Thomas Di Cizerone
a7f2c0bc34 🖼️ Add Radar Demo 2025-03-16 18:20:03 +01:00
Thomas Di Cizerone
5e97b2f764 ⚗️ Add Cypress test 2025-03-16 18:19:54 +01:00
Thomas Di Cizerone
d53c66dde5 🎨 Add themes for radar 2025-03-16 18:15:30 +01:00
Thomas Di Cizerone
1fb91d14c9 📊 Add radar chart 2025-03-16 18:13:50 +01:00
Thomas Di Cizerone
d80cc38bb2 🖋️ Add grammar for Radar chart 2025-03-16 18:00:50 +01:00
Ashish Jain
d6022408a9 Merge pull request #6375 from mermaid-js/master
Merge back v11.5.0 back to develop
2025-03-13 11:37:53 +01:00
Ashish Jain
41a737f682 Merge pull request #6374 from mermaid-js/changeset-release/master
Version Packages
2025-03-13 11:32:55 +01:00
github-actions[bot]
0c2e1bc3fe Version Packages 2025-03-13 10:24:33 +00:00
Ashish Jain
f399561565 Merge pull request #6373 from mermaid-js/release/11.5.0
Release/11.5.0
2025-03-13 11:22:21 +01:00
Ashish Jain
05bdf0e20e Added changeset 2025-03-13 11:16:54 +01:00
Ashish Jain
292cd83439 Fix for multi-line row issue and failsafe for edge style for stroke not present 2025-03-13 00:28:03 +01:00
Ashish Jain
3848649bdd Merge develop into release/11.5.0 2025-03-12 13:40:16 +01:00
Ashish Jain
1341e3d156 Added support for row odd/even in different themes 2025-03-12 13:13:13 +01:00
Ashish Jain
1d6a55a311 Merge pull request #6371 from mermaid-js/6369-mirror-edge-color-on-arrowhead
6369 mirror edge color on arrowhead
2025-03-12 11:36:55 +01:00
Knut Sveidqvist
4d25caba8e Added changeset 2025-03-12 10:52:17 +01:00
Knut Sveidqvist
f6335571cc test: Add test for edge marker color rendering 2025-03-12 10:45:26 +01:00
Knut Sveidqvist
bb895d8cf4 #6369 feat: Edge marker rendering applying stroke color to arrow head 2025-03-12 10:42:22 +01:00
Yari DeWalt
00ca7ac94f Merge branch 'develop' into update-er-diagram 2025-02-28 11:09:53 -08:00
yari-dewalt
34cd280ae4 Merge branch 'update-er-diagram' of github.com:yari-dewalt/mermaid into update-er-diagram 2025-02-28 11:06:40 -08:00
yari-dewalt
d0986ace8c Fix styling of erBox rows 2025-02-28 11:05:16 -08:00
Sidharth Vinod
bc2bd3d769 Merge pull request #6333 from tommoor/patch-2
Added Outline (getoutline.com) to community integrations
2025-02-28 11:23:34 +00:00
autofix-ci[bot]
f047b81bb9 [autofix.ci] apply automated fixes 2025-02-27 22:36:17 +00:00
Tom Moor
7db1d672a9 Update Outline link in integrations-community.md 2025-02-27 14:31:29 -08:00
Shahir Ahmed
91e2c04e56 Merge branch 'develop' into feature/3508_color-user-journey-title 2025-02-27 15:33:52 -05:00
Shahir Ahmed
a2f0d8e4d6 Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-02-27 15:32:51 -05:00
Sidharth Vinod
00a8dc47f5 Merge pull request #6320 from mermaid-js/renovate/patch-dompurify
fix(deps): update dependency dompurify to ^3.2.4
2025-02-27 17:28:56 +00:00
autofix-ci[bot]
5caaf36a3b [autofix.ci] apply automated fixes 2025-02-26 17:24:28 +00:00
yari-dewalt
4128197468 Remove to update to .ts 2025-02-26 09:19:30 -08:00
yari-dewalt
40494b16f5 Update labelBkg styles and dasharray for edges 2025-02-26 09:10:53 -08:00
yari-dewalt
840a197044 Fix syntax error 2025-02-26 08:45:12 -08:00
Yari DeWalt
ae0fcbfb8b Merge branch 'develop' into update-er-diagram 2025-02-26 08:23:04 -08:00
autofix-ci[bot]
a38a0ab869 [autofix.ci] apply automated fixes 2025-02-26 13:22:02 +00:00
Tom Moor
1b5672e73d Added Outline (getoutline.com) to community integrations
Outline has full support for Mermaid diagrams including collaborative realtime editing and inline previews.

Docs:
https://docs.getoutline.com/s/guide/doc/diagrams-KQiKoT4wzK
2025-02-26 05:15:56 -08:00
Sidharth Vinod
b22103b769 Merge pull request #6331 from mermaid-js/fix-promo
DOCS: fix promo bar
2025-02-26 13:39:27 +01:00
renovate[bot]
33f9d8bdc9 fix(deps): update dependency dompurify to ^3.2.4 2025-02-26 11:59:12 +00:00
Ashish Jain
446f6a7701 Merge pull request #6329 from yari-dewalt/fix/could_not_find_a_suitable_point_for_the_given_distance
Fix: Could not find a suitable point for the given distance
2025-02-26 12:57:48 +01:00
Ashish Jain
2ace92858f Merge pull request #6219 from yari-dewalt/update-requirement-diagram
Update Requirement diagram to unified renderer
2025-02-26 12:52:24 +01:00
Steph
510fd0fe71 update styling 2025-02-25 21:57:38 -08:00
Steph
9268cc2e07 fix promo bar 2025-02-25 21:37:38 -08:00
Shahir Ahmed
7c7fd4bc5e adds test for line wrapping
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-25 18:40:27 -05:00
pranavm2109
baa261fdd1 Merge branch 'bug/5955_adjust-diagram-position-with-legend-width' of https://github.com/SeniorSeniorMath-SciLib2k24/mermaid into bug/5955_adjust-diagram-position-with-legend-width 2025-02-25 16:13:28 -05:00
pranavm2109
aaf15fccc1 added first draft of test to see if label text is being wrapped in different lines
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-25 16:13:14 -05:00
autofix-ci[bot]
3724d11255 [autofix.ci] apply automated fixes 2025-02-25 20:55:26 +00:00
pranavm2109
5510f18d33 removed function to get rem in px since config schema now has maxLabelWidth
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-25 15:50:10 -05:00
Shahir Ahmed
edbf125c83 wraps long text into new line
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-25 15:43:00 -05:00
pranavm2109
ad6248147c revised current cypress test
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-25 15:29:29 -05:00
Shahir Ahmed
d47e4724cb wraps long text into new line
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-25 15:21:08 -05:00
Shahir Ahmed
4f592115e0 Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-02-25 15:09:56 -05:00
Shahir Ahmed
d2d78a5576 Merge branch 'develop' into feature/3508_color-user-journey-title 2025-02-25 15:07:54 -05:00
autofix-ci[bot]
5447a9f4f9 [autofix.ci] apply automated fixes 2025-02-25 18:23:48 +00:00
yari-dewalt
dc698c0309 Merge branch 'develop' of github.com:yari-dewalt/mermaid into fix/could_not_find_a_suitable_point_for_the_given_distance 2025-02-25 10:12:43 -08:00
yari-dewalt
31665fbad8 Fix division by zero error giving invalid point 2025-02-25 10:12:00 -08:00
Sidharth Vinod
a5561b9be0 Merge branch 'develop' into update-er-diagram 2025-02-25 15:32:46 +01:00
Sidharth Vinod
60db05b75c Merge branch 'master' into develop
* master:
  Reduced number of free trial from 14 to 7 day
  additional updates
  update urls
  [autofix.ci] apply automated fixes
  Update diagram limit
  remove unused import
  additional updates
  additional changes
  update styling
  wip
  update to five second interval
  Revert lock file changes
  Delete pnpm-lock.yaml
  [autofix.ci] apply automated fixes
  add new blog posts
  update Discord links
2025-02-25 08:26:14 +05:30
Sidharth Vinod
3be59a7b4d Merge pull request #6318 from mermaid-js/renovate/patch-eslint
chore(deps): update eslint (patch)
2025-02-24 03:40:50 +00:00
Sidharth Vinod
ff00141a0a Merge pull request #6319 from mermaid-js/renovate/patch-all-patch
fix(deps): update all patch dependencies (patch)
2025-02-24 03:40:14 +00:00
autofix-ci[bot]
374ebbb087 [autofix.ci] apply automated fixes 2025-02-24 01:57:21 +00:00
renovate[bot]
9d06d8f31e fix(deps): update all patch dependencies 2025-02-24 01:52:02 +00:00
renovate[bot]
97b12e9718 chore(deps): update eslint 2025-02-24 01:51:31 +00:00
Shahir Ahmed
50816a7f98 remove magic value
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-21 17:35:32 -05:00
Shahir Ahmed
a318ea3692 removes cy.then and magic value
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-21 16:15:24 -05:00
Shahir Ahmed
1424127127 Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-02-21 15:33:13 -05:00
Shahir Ahmed
9c27125f2d changes default values
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-21 15:27:01 -05:00
Shahir Ahmed
6140be24da Merge branch 'develop' into feature/3508_color-user-journey-title 2025-02-21 15:04:12 -05:00
Sidharth Vinod
de40d80ef9 fix: Create PR for E2E timings, as push to develop fails 2025-02-21 23:56:46 +05:30
Sidharth Vinod
c9b8f034d5 Merge pull request #5841 from mermaid-js/renovate/major-all-major
fix(deps): update all major dependencies (major)
2025-02-21 23:53:35 +05:30
Sidharth Vinod
162e9e50ad Merge branch 'renovate/major-all-major' of https://github.com/mermaid-js/mermaid into renovate/major-all-major
* 'renovate/major-all-major' of https://github.com/mermaid-js/mermaid:
  [autofix.ci] apply automated fixes
2025-02-21 23:44:22 +05:30
Sidharth Vinod
225e5dde60 fix: Add clearMocks in vitest 2025-02-21 23:44:09 +05:30
autofix-ci[bot]
726b42ba00 [autofix.ci] apply automated fixes 2025-02-21 18:05:57 +00:00
Sidharth Vinod
c22b5701db chore: Fix types 2025-02-21 23:30:34 +05:30
renovate[bot]
c6b715f737 fix(deps): update all major dependencies 2025-02-21 17:50:49 +00:00
Sidharth Vinod
bc69180958 Merge pull request #5839 from mermaid-js/renovate/all-minor
fix(deps): update all minor dependencies (minor)
2025-02-21 23:16:16 +05:30
Sidharth Vinod
a64b14dbfd chore: bump ts-eslint version 2025-02-21 23:02:39 +05:30
Sidharth Vinod
1c8b996cbb chore: Bump eslint version 2025-02-21 22:57:43 +05:30
Sidharth Vinod
eb8e4da5f6 chore: Bump package.json versions with renovate 2025-02-21 22:50:01 +05:30
Sidharth Vinod
2fdd24ab15 Merge branch 'develop' into renovate/all-minor
* develop:
  [autofix.ci] apply automated fixes
  chore(deps): update eslint
2025-02-21 16:33:51 +05:30
autofix-ci[bot]
c01aee842a [autofix.ci] apply automated fixes 2025-02-21 10:37:37 +00:00
Sidharth Vinod
2c22e80dba chore: Update typedoc-plugin-markdown 2025-02-21 16:02:03 +05:30
Sidharth Vinod
0518e9cfd7 Merge pull request #5984 from mermaid-js/renovate/eslint
chore(deps): update eslint (minor)
2025-02-21 10:26:12 +00:00
Sidharth Vinod
fe2e73ed94 Merge pull request #6311 from yogitas-ht/Reduced-the-number-of-free-trial-from-14-to-7-days
Reduced number of free trial from 14 to 7 day
2025-02-21 14:43:27 +05:30
Sidharth Vinod
4f5c4b8349 Merge pull request #6309 from mermaid-js/promos
DOCS: TopBar updates
2025-02-21 13:43:52 +05:30
yogitas-ht
ce99d968f4 Reduced number of free trial from 14 to 7 day 2025-02-21 13:12:18 +05:30
Steph
877a7e288a additional updates 2025-02-20 11:30:07 -08:00
Steph
4eeea1076c update urls 2025-02-20 10:36:06 -08:00
autofix-ci[bot]
f43e35039f [autofix.ci] apply automated fixes 2025-02-20 18:31:20 +00:00
renovate[bot]
dbf885b077 chore(deps): update eslint 2025-02-20 18:25:55 +00:00
renovate[bot]
78c1d97f0f fix(deps): update all minor dependencies 2025-02-20 16:41:05 +00:00
Sidharth Vinod
ad2f17205a Merge pull request #6272 from mermaid-js/saurabh/refactor/convert-sequenceDb-to-class
Refactor: Change SequenceDB to class based architecture.
2025-02-20 07:20:14 +00:00
Sidharth Vinod
98fe7a6e03 Merge pull request #5997 from mermaid-js/renovate/major-eslint
chore(deps): update eslint (major)
2025-02-19 12:48:14 +05:30
saurabhg772244
5857953d51 Merge branch 'develop' of https://github.com/mermaid-js/mermaid into saurabh/refactor/convert-sequenceDb-to-class 2025-02-19 11:26:22 +05:30
Shahir Ahmed
5dab86a067 Merge branch 'bug/5955_adjust-diagram-position-with-legend-width' of https://github.com/Shahir-47/mermaid into bug/5955_adjust-diagram-position-with-legend-width 2025-02-18 16:12:37 -05:00
Shahir Ahmed
9ef35549f4 Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-02-18 16:05:16 -05:00
pranavm2109
4beed963b8 updated descriptions of parameters in schema
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-18 16:03:12 -05:00
pranavm2109
3122c3b75c updated descriptions of parameters in schema
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-18 16:01:40 -05:00
pranavm2109
dffa689e2b updated documentation
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-18 15:58:03 -05:00
pranavm2109
5ed2278887 Merge branch 'feature/3508_color-user-journey-title' of https://github.com/SeniorSeniorMath-SciLib2k24/mermaid into feature/3508_color-user-journey-title 2025-02-18 15:36:56 -05:00
pranavm2109
d6376ca1ff Reverted to using configObject in place of conf
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-18 15:36:51 -05:00
autofix-ci[bot]
99bd0c48fa [autofix.ci] apply automated fixes 2025-02-18 20:31:21 +00:00
pranavm2109
eb7289a65a Merge branch 'feature/3508_color-user-journey-title' of https://github.com/SeniorSeniorMath-SciLib2k24/mermaid into feature/3508_color-user-journey-title 2025-02-18 15:26:10 -05:00
pranavm2109
80c6b945fa Removed title style documentation from theming.md
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-18 15:25:12 -05:00
Sidharth Vinod
34a12103d0 Merge branch 'renovate/major-eslint' of https://github.com/mermaid-js/mermaid into renovate/major-eslint
* 'renovate/major-eslint' of https://github.com/mermaid-js/mermaid:
  chore(deps): update eslint
2025-02-19 00:34:03 +05:30
Sidharth Vinod
46b8a75199 chore: Remove deprecated rule 2025-02-19 00:33:56 +05:30
renovate[bot]
1dca45a76d chore(deps): update eslint 2025-02-18 19:01:39 +00:00
Sidharth Vinod
d1d5bd14f6 Merge branch 'develop' into renovate/major-eslint
* develop:
  chore: Add tslib
  [autofix.ci] apply automated fixes
  fix(deps): update all patch dependencies
2025-02-19 00:28:32 +05:30
Sidharth Vinod
974867a089 Merge pull request #5961 from mermaid-js/renovate/patch-all-patch
fix(deps): update all patch dependencies (patch)
2025-02-19 00:24:41 +05:30
Sidharth Vinod
52532a7801 Merge pull request #6295 from mermaid-js/omkar/fix-state-diagram-default-direction
Fix: state diagram default direction update
2025-02-18 18:53:57 +00:00
Sidharth Vinod
6eb56b9363 Merge branch 'develop' into renovate/patch-all-patch
* develop: (97 commits)
  chore: Update actions/cache
  chore: Update actions/cache
  fix: CodeQL double escape warning
  chore(deps): update eslint
  Added changeset.
  refactor: handle StateDB `.extract()` properly
  chore(deps): update dependency esbuild to ^0.25.0 [security]
  Update .changeset/grumpy-cheetahs-deliver.md
  chore: Use RUN_VISUAL_TEST in cypress config
  chore: Use argos tokenless auth
  chore: Add tokenless auth to argos
  fix(deps): update dependency dompurify to v3.2.4 [security]
  chore: Update argos token
  Ignore huehive
  chore: Run argos on all PRs, except renovate bot's
  chore: Fix exclude
  [autofix.ci] apply automated fixes
  chore(deps): update dependency vitest to v1.6.1 [security]
  docs: Cleanup minor issues
  Add files via upload
  ...
2025-02-19 00:08:50 +05:30
Sidharth Vinod
f7c91a72cb chore: Add tslib 2025-02-19 00:06:45 +05:30
renovate[bot]
c53e044559 chore(deps): update eslint 2025-02-18 18:26:30 +00:00
Sidharth Vinod
d846a8c65a chore: Minor refactor 2025-02-18 23:48:19 +05:30
Sidharth Vinod
c3ba23a4e9 Merge branch 'develop' into omkar/fix-state-diagram-default-direction 2025-02-18 23:44:19 +05:30
Sidharth Vinod
c688c387a0 Merge pull request #6298 from mermaid-js/saurabh/fix/sanitizeText-codeql-warning
fix: CodeQL double escape warning
2025-02-18 23:41:31 +05:30
Sidharth Vinod
300fb85a73 chore: Update actions/cache 2025-02-18 23:41:01 +05:30
Sidharth Vinod
9c6e554153 chore: Update actions/cache 2025-02-18 23:40:53 +05:30
Sidharth Vinod
b5c78b7225 Merge pull request #5908 from mermaid-js/renovate/patch-eslint
chore(deps): update eslint (patch)
2025-02-18 21:42:23 +05:30
Sidharth Vinod
26bd8cb53c Merge pull request #6288 from mermaid-js/sidharthv96-patch-1
Update mermaidchart diagram limit
2025-02-18 21:08:44 +05:30
omkarht
da6361f652 added changeset 2025-02-18 18:36:52 +05:30
omkarht
167fef5cff added test cases to check state diagram direction 2025-02-18 17:23:48 +05:30
saurabhg772244
3233c63fc0 Updated variable name 2025-02-18 16:59:35 +05:30
saurabhg772244
1182aaaf4d fix: CodeQL double escape warning 2025-02-18 15:42:25 +05:30
omkarht
b78c061a8f refatored code 2025-02-18 15:40:45 +05:30
renovate[bot]
ebfcf3ea07 chore(deps): update eslint 2025-02-17 15:45:31 +00:00
Sidharth Vinod
62edea6b33 Merge pull request #6293 from mermaid-js/saurabh/refactor/handle-StateDB-.extract-properly
Handle StateDB `.extract()` properly
2025-02-17 21:13:26 +05:30
omkarht
72eda9ce52 Fix: state diagram default direction update 2025-02-17 20:53:31 +05:30
saurabhg772244
cfd84e54d5 Added changeset. 2025-02-17 16:14:55 +05:30
Alois Klink
cfe710f42b refactor: handle StateDB .extract() properly
Fix the StateDB properly for stateDiagram-v1 vs stateDiagram-v2.
2025-02-17 15:54:19 +05:30
autofix-ci[bot]
87e76bbcf5 [autofix.ci] apply automated fixes 2025-02-15 18:26:55 +00:00
Sidharth Vinod
0b4754ed60 Update diagram limit 2025-02-15 23:51:48 +05:30
saurabhg772244
fe6f05eec9 Merge branch 'develop' of github.com-mermaid:mermaid-js/mermaid into saurabh/refactor/convert-sequenceDb-to-class 2025-02-15 22:56:53 +05:30
Sidharth Vinod
9badfe7489 Merge branch 'develop' into feature/3508_color-user-journey-title 2025-02-15 22:33:13 +05:30
Sidharth Vinod
548256507d Merge pull request #6269 from mermaid-js/renovate/npm-esbuild-vulnerability
chore(deps): update dependency esbuild to ^0.25.0 [security]
2025-02-15 16:51:26 +00:00
Sidharth Vinod
d8ebf7a136 Merge pull request #6250 from mermaid-js/saurabh/refactor/convert-stateDb-to-class-v2
Refactor: V2. Change StateDB to class based architecture.
2025-02-15 16:50:55 +00:00
Sidharth Vinod
27912bee8c Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-02-15 22:14:44 +05:30
renovate[bot]
a758b24b75 chore(deps): update dependency esbuild to ^0.25.0 [security] 2025-02-15 16:16:28 +00:00
Sidharth Vinod
3004d4d93a Merge branch 'develop' into update-requirement-diagram 2025-02-15 21:45:38 +05:30
Saurabh Gore
88abf46fc3 Update .changeset/grumpy-cheetahs-deliver.md
Co-authored-by: Sidharth Vinod <github@sidharth.dev>
2025-02-15 21:33:58 +05:30
Sidharth Vinod
2eeba0e999 Merge branch 'develop' into saurabh/refactor/convert-stateDb-to-class-v2 2025-02-15 21:31:14 +05:30
Sidharth Vinod
397684fe49 Merge pull request #6284 from mermaid-js/renovate/npm-dompurify-vulnerability
fix(deps): update dependency dompurify to v3.2.4 [security]
2025-02-15 16:00:56 +00:00
Sidharth Vinod
bc1f769f13 Merge pull request #6287 from sidharthv96/sidv/tokenlessArgos
chore: Add tokenless auth to argos
2025-02-15 21:30:39 +05:30
Sidharth Vinod
f6592235a2 chore: Use RUN_VISUAL_TEST in cypress config 2025-02-15 21:05:47 +05:30
Sidharth Vinod
57805dafa4 chore: Use argos tokenless auth 2025-02-15 20:51:56 +05:30
Sidharth Vinod
3b92f979e3 chore: Add tokenless auth to argos 2025-02-15 20:28:55 +05:30
renovate[bot]
7a7e4b4e6f fix(deps): update dependency dompurify to v3.2.4 [security] 2025-02-15 14:39:21 +00:00
Sidharth Vinod
c5843bee23 chore: Update argos token
We have added a check in e2e, to ensure events in forks will not trigger the visual tests.

This will not protect against malicious users, but there is no other way to support PRs from forks.

A proposal has been sent to Argos team to add a secure approach for public repos, fingers crossed.
2025-02-15 20:07:41 +05:30
Shahir Ahmed
7aef182fbf Merge branch 'develop' into feature/3508_color-user-journey-title 2025-02-14 16:45:20 -05:00
autofix-ci[bot]
2fb6ea7b77 [autofix.ci] apply automated fixes 2025-02-14 21:23:01 +00:00
pranavm2109
add48da4c8 modifed journey diagram config scheme to contain title specific styles, and undid previous theme-wide changes
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-14 16:17:09 -05:00
Sidharth Vinod
ada42b892c Ignore huehive 2025-02-14 21:41:53 +05:30
Sidharth Vinod
62f9261c4e Merge branch 'develop' into saurabh/refactor/convert-stateDb-to-class-v2 2025-02-14 21:21:00 +05:30
Sidharth Vinod
a19b42f3c2 Merge pull request #6283 from mermaid-js/sidv/argos-skip-renovate
Run visual test on all PRs, except renovate bot's
2025-02-14 21:20:38 +05:30
Sidharth Vinod
9f90f4f23a chore: Run argos on all PRs, except renovate bot's 2025-02-14 21:17:29 +05:30
saurabhg772244
451c886f50 Code refactor. 2025-02-14 19:17:09 +05:30
saurabhg772244
0a1a112605 Move setWrap below clear in constructor. 2025-02-14 17:51:17 +05:30
Sidharth Vinod
63cf7cbd94 Merge pull request #6279 from mermaid-js/update-promos
DOCS: update promos
2025-02-14 13:24:07 +05:30
Steph
8ab60c3a7a remove unused import 2025-02-13 15:07:50 -08:00
Steph
0342579b9c additional updates 2025-02-13 15:05:24 -08:00
Sidharth Vinod
348401c4f4 Merge pull request #6253 from mermaid-js/renovate/npm-vitest-vulnerability
chore(deps): update dependency vitest to v1.6.1 [security]
2025-02-13 19:48:12 +00:00
Sidharth Vinod
8145199203 Merge pull request #6265 from Mandzhi/Mandzhi-patch-2
Update tutorials.md
2025-02-13 19:47:54 +00:00
Sidharth Vinod
f408e938d4 chore: Fix exclude 2025-02-14 01:01:48 +05:30
Steph
6471ae4d49 additional changes 2025-02-13 02:18:12 -08:00
autofix-ci[bot]
af6e2b4cb6 [autofix.ci] apply automated fixes 2025-02-13 08:23:14 +00:00
renovate[bot]
7a4a52b50a chore(deps): update dependency vitest to v1.6.1 [security] 2025-02-13 08:21:24 +00:00
Sidharth Vinod
ee05d8588f Merge pull request #6245 from homersimpsons/patch-1
Add git graph preview in README.md
2025-02-13 13:49:08 +05:30
Sidharth Vinod
58175f647e docs: Cleanup minor issues 2025-02-13 13:47:49 +05:30
Shahir Ahmed
5f7c68def7 refactor: standardize variable naming and improve legend width calculations
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-02-13 01:46:27 -05:00
Sidharth Vinod
82d019234a chore: Cleanup 2025-02-13 09:50:04 +05:30
Shahir Ahmed
d618b8398e adds test for journey
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-12 19:54:56 -05:00
Steph
ec0e3e4cd6 update styling 2025-02-12 16:00:28 -08:00
Shahir Ahmed
db4ea020ba testing
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-12 18:39:03 -05:00
Steph
72cf84cb40 wip 2025-02-12 14:02:01 -08:00
pranavm2109
5366e8b692 added first draft of cypress visual tests
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-12 15:19:37 -05:00
saurabhg772244
6ca8f46d37 Updated unit tests. 2025-02-12 16:15:06 +05:30
saurabhg772244
b2dfbb6ffd Merge branch 'develop' of https://github.com/mermaid-js/mermaid into saurabh/refactor/convert-sequenceDb-to-class 2025-02-12 16:04:54 +05:30
saurabhg772244
ffa7804af0 added changeset 2025-02-12 16:04:22 +05:30
saurabhg772244
f454865b97 Updated unit tests to reflect new DB instance per parse. 2025-02-12 16:00:14 +05:30
saurabhg772244
d83b1a5dbc Refactored arrow function to regular function and assigned unique ID to messages during parsing. 2025-02-12 15:54:51 +05:30
Radmila M.
d07f85e6ac Add files via upload 2025-02-10 14:05:55 +03:00
Radmila M.
a79c0f4c00 Update tutorials.md 2025-02-10 14:01:09 +03:00
Radmila M.
4a19740aea Update tutorials.md 2025-02-10 13:24:38 +03:00
Shahir Ahmed
fbac4c61bb diagram adjusts with legend width changes
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-05 19:27:32 -05:00
saurabhg772244
4dbaa2b5d6 code refactor 2025-02-04 19:18:46 +05:30
saurabhg772244
9cad3c7aea added changeset 2025-02-04 17:09:09 +05:30
saurabhg772244
56d66cdabc Fix issue where data was not being set in the db after parsing. 2025-02-04 16:45:45 +05:30
saurabhg772244
a0e5408850 convert stateDb to class, added test case. 2025-02-04 16:41:54 +05:30
homersimpsons
d155e414a0 Add git graph preview in README.md 2025-02-01 11:20:06 +01:00
Shahir Ahmed
d81ddf246c fixes titleColor default value
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-31 17:57:25 -05:00
Shahir Ahmed
ffe1bb359f update pnpm-lock.yaml
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-31 17:30:34 -05:00
Shahir Ahmed
88a39f8e16 update dependencies for CI/CD pipeline
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-31 17:28:55 -05:00
Shahir Ahmed
9fb46ae88f improves description for user journey diagram title test
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-29 16:20:43 -05:00
Shahir Ahmed
798fb98b2a Merge branch 'develop' into feature/3508_color-user-journey-title
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-29 16:15:00 -05:00
Shahir Ahmed
7c0af381d1 adds styling, font-weight and font-family tests for user jounrey title
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-29 16:11:57 -05:00
pranavm2109
384f59eee2 called getConfig() once in draw function and used returned value elsewhere within
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-01-29 14:45:42 -05:00
Yari DeWalt
127390978a Merge branch 'develop' into update-er-diagram 2025-01-28 08:21:32 -08:00
Yari DeWalt
baf3adf1c0 Merge branch 'develop' into update-requirement-diagram 2025-01-28 08:21:27 -08:00
yari-dewalt
d0768cbc37 Update shape 2025-01-28 08:10:07 -08:00
yari-dewalt
f00507449b Remove unnecessary default export 2025-01-28 07:51:06 -08:00
yari-dewalt
509793d5c2 Remove unnecessary default export 2025-01-28 07:48:51 -08:00
Ashish Jain
8dd0e7a794 Merge pull request #6229 from mermaid-js/patch/font-family-legend-user-diagram
Set custom font family for legend in user diagrams.
2025-01-28 10:30:20 +01:00
yari-dewalt
8a8d169e27 Fix typo 2025-01-27 10:36:28 -08:00
yari-dewalt
b53cf0a1fb Fix getConfig to return correct config 2025-01-27 10:33:45 -08:00
yari-dewalt
58fa99787c Merge branch 'update-er-diagram' of github.com:yari-dewalt/mermaid into update-er-diagram 2025-01-27 10:32:17 -08:00
yari-dewalt
1a9a9f43e6 Update erDb to use class to wrap data 2025-01-27 10:31:47 -08:00
yari-dewalt
aeec4b7f77 Fix non-htmlLabels not being centered 2025-01-27 10:28:59 -08:00
autofix-ci[bot]
40686f198c [autofix.ci] apply automated fixes 2025-01-27 18:01:00 +00:00
Yari DeWalt
295af02744 Merge branch 'develop' into update-er-diagram 2025-01-27 09:55:30 -08:00
yari-dewalt
a3f35f6367 Fix parser test file 2025-01-27 09:40:09 -08:00
yari-dewalt
523286bbcb Update test file to work with new Db 2025-01-27 09:29:51 -08:00
yari-dewalt
c296f48ebe Merge branch 'update-requirement-diagram' of github.com:yari-dewalt/mermaid into update-requirement-diagram 2025-01-27 09:22:24 -08:00
yari-dewalt
9609aced14 Update requirementDb to class to encapsulate data 2025-01-27 09:21:34 -08:00
yari-dewalt
97788df7e3 Change variable casing 2025-01-27 08:21:52 -08:00
yari-dewalt
47d4d56fa6 Remove -unified from renderer file name 2025-01-27 07:14:10 -08:00
saurabhg772244
5e9c887385 Fixed unit tests. 2025-01-27 16:30:35 +05:30
saurabhg772244
fdb8ae5b53 Set custom font family for legend in user diagrams. 2025-01-27 16:16:43 +05:30
Sidharth Vinod
65ff22d94b Merge pull request #6227 from mermaid-js/update-promo-bar
Promo bar update
2025-01-27 12:25:42 +05:30
Steph
5cf093ca9e update to five second interval 2025-01-26 18:26:54 -08:00
Shahir Ahmed
03ff28e927 removes console.warn()
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-25 22:12:16 -05:00
Shahir Ahmed
16a1a90705 adds font family and font size to the title of the user journey diagram
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-25 22:01:30 -05:00
Shahir Ahmed
3221cbfa0a add titleColor theme variable to theming.md
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-25 21:23:35 -05:00
Shahir Ahmed
f0a8ccb177 Merge branch 'develop' into feature/3508_color-user-journey-title
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-25 21:12:11 -05:00
Shahir Ahmed
a30705cdcc Enhance user journey diagram title color configuration 2025-01-25 20:33:39 -05:00
Sidharth Vinod
e2de55202f Merge pull request #6224 from theHacker/patch-1
Fix: Wrong link to d3-shape documentation in Flowchart docs
2025-01-26 00:40:08 +05:30
autofix-ci[bot]
b4043840ca [autofix.ci] apply automated fixes 2025-01-25 12:03:03 +00:00
Alexander Münch
8f3e17e386 Fix: Wrong link to d3-shape documentation in Flowchart docs 2025-01-25 12:47:59 +01:00
Sidharth Vinod
4e950e7256 Merge pull request #6177 from Ryuno-Ki/forgejo-integration
docs: add Forgejo as integration
2025-01-25 16:24:52 +05:30
autofix-ci[bot]
de3e381ccf [autofix.ci] apply automated fixes 2025-01-25 10:41:45 +00:00
Sidharth Vinod
b2fde76753 Add Forgejo to cspell 2025-01-25 16:06:46 +05:30
Sidharth Vinod
b5587d8b87 test: Fix duplicate test name 2025-01-25 15:45:42 +05:30
André Jaenisch
9b75aeb224 Update integrations-community.md
Added Forgejo as integration
2025-01-25 10:22:35 +01:00
André Jaenisch
993858cdc8 Merge branch 'mermaid-js:develop' into forgejo-integration 2025-01-25 10:20:39 +01:00
Sidharth Vinod
f4e1f07412 chore: Update mermaid repo link to mermaid-js/mermaid
https://github.com/mermaid-js/mermaid/actions/runs/12963524805/job/36161210394
2025-01-25 14:31:24 +05:30
Sidharth Vinod
09e0de6053 chore: Update upload-artifact to v4
Verified that the other hash was infact valid and in the repo, but the scorecard action was not picking it up.
2025-01-25 14:27:18 +05:30
Sidharth Vinod
9a50bf5237 chore: Fix cypress record flag 2025-01-25 14:21:11 +05:30
Sidharth Vinod
5747009c8f chore: Fix failing tests 2025-01-25 14:09:09 +05:30
Sidharth Vinod
dc513ec211 Merge pull request #6098 from royaljain/feature/mermaid-ai-bot
Add Mermaid AI Bot in Readme
2025-01-25 12:18:07 +05:30
Sidharth Vinod
5f58d4f7b0 Merge pull request #6106 from zackkatz/patch-1
Youtube --> YouTube
2025-01-25 12:14:53 +05:30
Sidharth Vinod
3536ceb5d3 Merge branch 'develop' into patch-1 2025-01-25 12:14:31 +05:30
Sidharth Vinod
7ed33a91c0 Merge pull request #6183 from mermaid-js/renovate/autofix-ci-action-digest
chore(deps): update autofix-ci/action digest to 551dded
2025-01-25 12:13:59 +05:30
Sidharth Vinod
f8bf03d365 Merge pull request #6180 from mermaid-js/renovate/actions-upload-artifact-digest
chore(deps): update actions/upload-artifact digest to ff15f03
2025-01-25 12:13:41 +05:30
Sidharth Vinod
4202ee521a Merge pull request #6209 from mermaid-js/renovate/npm-vite-vulnerability
chore(deps): update dependency vite to v5.4.12 [security]
2025-01-25 12:12:52 +05:30
renovate[bot]
0e25fd42f9 chore(deps): update autofix-ci/action digest to 551dded 2025-01-25 06:42:31 +00:00
renovate[bot]
feee5d1c8c chore(deps): update actions/upload-artifact digest to ff15f03 2025-01-25 06:42:28 +00:00
renovate[bot]
ab6d92c544 chore(deps): update dependency vite to v5.4.12 [security] 2025-01-25 06:41:59 +00:00
Sidharth Vinod
d27d4abab7 Merge pull request #6181 from politbuero-kampagnen/patch-2
Update integrations-community.md
2025-01-25 12:10:34 +05:30
Sidharth Vinod
3162cff7a9 Merge branch 'develop' into forgejo-integration 2025-01-25 12:03:20 +05:30
Sidharth Vinod
74edf7a027 Merge branch 'develop' into update-requirement-diagram 2025-01-25 11:48:48 +05:30
Sidharth Vinod
9681a27b31 chore: Skip running E2E on comments without visual test command 2025-01-25 11:48:26 +05:30
Sidharth Vinod
22091f6182 Merge branch 'develop' into update-requirement-diagram 2025-01-25 11:35:48 +05:30
Sidharth Vinod
ba534985ec Merge pull request #6222 from mermaid-js/sidv/visualTestComment
chore: Add a command to execute visual test
2025-01-25 11:34:09 +05:30
Sidharth Vinod
edc1ae1e0c chore: Update default values 2025-01-25 11:23:30 +05:30
Sidharth Vinod
c00f3fb090 chore: Add a command to execute visual test 2025-01-25 11:01:23 +05:30
yari-dewalt
23bc25ef94 Merge branch 'update-requirement-diagram' of github.com:yari-dewalt/mermaid into update-requirement-diagram 2025-01-24 10:52:37 -08:00
yari-dewalt
42dfa20fd4 Remove old requirement diagram files 2025-01-24 10:52:15 -08:00
Yari DeWalt
cc2373ea89 Merge branch 'develop' into update-requirement-diagram 2025-01-24 10:43:23 -08:00
yari-dewalt
22bc234ff3 Update documentation to include new changes 2025-01-24 10:24:41 -08:00
yari-dewalt
fa48f9580f Add e2e tests 2025-01-24 09:42:37 -08:00
yari-dewalt
38ca14da43 Fix non-htmlLabel text replacement so markdown styling remains 2025-01-24 09:40:00 -08:00
Ashish Jain
74a56fc58a Merge pull request #6218 from mermaid-js/revert-state-diagram-class-architecture
Revert state diagram class based architecture
2025-01-24 15:09:54 +01:00
Saurabh Gore
08ffbb61e9 remove unused import 2025-01-24 19:32:17 +05:30
Saurabh Gore
232e60c8cb Added changeset 2025-01-24 19:25:44 +05:30
Saurabh Gore
cd9ca76e39 Revert state diagram class based architecture 2025-01-24 19:20:40 +05:30
Ashish Jain
c13d988392 Merge pull request #6212 from mermaid-js/saurabh/refactor/convert-classDb-to-class
Refactor: Change ClassDB to class based architecture.
2025-01-24 12:28:20 +01:00
saurabhg772244
15ffe2021a Merge branch 'develop' of https://github.com/mermaid-js/mermaid into saurabh/refactor/convert-classDb-to-class 2025-01-24 16:48:22 +05:30
Ashish Jain
4fbc19e0d7 Merge pull request #6185 from mermaid-js/saurabh/refactor/convert-stateDb-to-class
Refactor: Change StateDB to class based architecture.
2025-01-24 10:46:42 +01:00
yari-dewalt
02f661a103 Update and add tests 2025-01-23 12:04:04 -08:00
yari-dewalt
130638f6e1 Change requirement_id to requirementId 2025-01-23 10:57:11 -08:00
yari-dewalt
9ab2761c1d Make undefined text not display 2025-01-23 10:55:14 -08:00
yari-dewalt
41d7a549b0 Add support for classes 2025-01-23 09:36:49 -08:00
saurabhg772244
2b8998fdd1 Merge branch 'develop' of https://github.com/mermaid-js/mermaid into saurabh/refactor/convert-classDb-to-class 2025-01-23 14:59:41 +05:30
saurabhg772244
202ef31071 Fixed binding issue 2025-01-23 14:58:16 +05:30
saurabhg772244
b09f2e836a Updated as per PR comments 2025-01-23 12:25:38 +05:30
saurabhg772244
6a814a0d91 Merge branch 'develop' of https://github.com/mermaid-js/mermaid into saurabh/refactor/convert-stateDb-to-class 2025-01-23 11:53:01 +05:30
saurabhg772244
b07bb9b3ff Minor change 2025-01-23 11:44:06 +05:30
Ashish Jain
5120ed09ab Merge pull request #6161 from mermaid-js/saurabh/refactor/convert-flowDb-to-class
Refactor: Change flowDB to class based architecture.
2025-01-22 22:41:52 +01:00
yari-dewalt
081681f05b Add styling support for requirement diagram and box shape 2025-01-22 11:07:15 -08:00
yari-dewalt
f7648e85d9 Add support for direction statement 2025-01-22 09:00:48 -08:00
yari-dewalt
fe833e6d16 Fix elements not showing up if they were involved in a relation 2025-01-22 08:49:01 -08:00
yari-dewalt
809f4eb609 Send all edge data and add markers 2025-01-22 08:16:18 -08:00
saurabhg772244
61f3fc5ede Use static reference for relationType in StateDB 2025-01-22 19:17:38 +05:30
saurabhg772244
90bbf90a83 Added changeset 2025-01-22 19:10:48 +05:30
saurabhg772244
92efc24283 Refactored arrow functions to standard function 2025-01-22 19:07:53 +05:30
saurabhg772244
1c45df4567 Updated as per PR comments 2025-01-22 17:53:51 +05:30
saurabhg772244
1575a93136 Merge branch 'develop' of https://github.com/mermaid-js/mermaid into saurabh/refactor/convert-flowDb-to-class 2025-01-22 16:22:20 +05:30
saurabhg772244
bde653b1c2 Updated as per Alois suggestion 2025-01-22 15:49:51 +05:30
Ashish Jain
e9e663ffa3 Merge pull request #6198 from mermaid-js/edge-flicker-fix
edge flickering fix
2025-01-22 11:12:23 +01:00
Ashish Jain
963efa64c7 Added changeset 2025-01-22 11:01:37 +01:00
Ashish Jain
e2e5101005 Handle more override edge animate 2025-01-22 10:57:57 +01:00
saurabhg772244
6ea13cded3 Fixed binding issue 2025-01-22 12:27:32 +05:30
Ashish Jain
c063b92cc9 Handle more edge cases, and lint fixes 2025-01-22 02:03:29 +01:00
autofix-ci[bot]
304f133227 [autofix.ci] apply automated fixes 2025-01-22 00:14:56 +00:00
Ashish Jain
54a0dd0af6 Make flowchart edge Ids consistent across getEdges and getData 2025-01-22 01:09:49 +01:00
yari-dewalt
54ee6bd46d Update styles 2025-01-21 11:27:29 -08:00
yari-dewalt
f0e47f29fd Create and register requirementBox shape 2025-01-21 11:27:09 -08:00
Ashish Jain
ab5b7694c6 Merge branch 'develop' into edge-flicker-fix 2025-01-21 17:31:06 +01:00
Ashish Jain
eb76dfb1ca Merge pull request #6205 from mermaid-js/Refactor/fix-styles
fix: styles for Sankey, Gantt, and User Journey diagrams
2025-01-21 17:30:51 +01:00
Saurabh Gore
28d7ec092c Merge branch 'develop' into Refactor/fix-styles 2025-01-21 20:10:43 +05:30
Ashish Jain
84b03f3a08 Merge pull request #6196 from mermaid-js/6195-at-signs-in-labels
#6195 at signs in labels
2025-01-21 15:19:39 +01:00
saurabhg772244
f9ac9867c1 Updated as per Alois suggestion. 2025-01-21 19:21:56 +05:30
saurabhg772244
ee6fb83265 Used 'options' instead of 'var(--mermaid-font-family)' 2025-01-21 18:27:05 +05:30
saurabhg772244
46c16c963b Minor change. 2025-01-21 15:32:53 +05:30
saurabhg772244
32a68d489e Added changeset 2025-01-21 11:35:23 +05:30
saurabhg772244
7bbebff583 Updated styles implementation 2025-01-20 20:30:28 +05:30
saurabhg772244
c432aec2f6 fix: styles for Sankey, Gantt, and User Journey diagrams 2025-01-20 20:05:51 +05:30
Feroz Mujawar
64237fbaa7 updated addSingleLink for multiple outgoing edges to same end node 2025-01-20 19:59:46 +05:30
yari-dewalt
d90609b26c Setup renderer and data collection 2025-01-17 11:02:47 -08:00
yari-dewalt
adec6cd254 Change Db to typescript and add types 2025-01-17 09:27:54 -08:00
Sidharth Vinod
5ce60cacbf Merge pull request #6199 from mermaid-js/update-blog
DOCS: update Blog page
2025-01-17 22:56:05 +05:30
Sidharth Vinod
9ddedb0b49 Revert lock file changes 2025-01-17 22:55:14 +05:30
Steph
e977deaf11 Delete pnpm-lock.yaml 2025-01-17 08:24:24 -08:00
autofix-ci[bot]
85a7771b70 [autofix.ci] apply automated fixes 2025-01-17 16:09:34 +00:00
Sidharth Vinod
3778fef1a1 Merge pull request #6144 from mermaid-js/update-discord-links
Update Discord links
2025-01-17 21:37:43 +05:30
Steph
0bff720e20 add new blog posts 2025-01-17 07:59:28 -08:00
Feroz Mujawar
7ba415dad1 edge flickering fix 2025-01-17 21:23:30 +05:30
Knut Sveidqvist
7f47678862 Spellfix in changeset 2025-01-17 11:50:22 +01:00
Knut Sveidqvist
127bac1147 Adding changeset 2025-01-17 11:48:28 +01:00
Knut Sveidqvist
9a90d795ca #6195 Updated lexer to not allow quotes in link ids 2025-01-17 11:46:44 +01:00
saurabhg772244
f7fe8f2f59 Merge branch 'develop' of https://github.com/mermaid-js/mermaid into saurabh/refactor/convert-flowDb-to-class 2025-01-16 15:17:24 +05:30
Ashish Jain
1d9c2aab8d #6186 Fix for flowchart new syntax with link 2025-01-15 13:45:04 +01:00
saurabhg772244
8fba9c1236 convert flowDb to class and added test cases. 2025-01-15 18:02:04 +05:30
Knut Sveidqvist
04800ff677 Merge pull request #6187 from mermaid-js/flowchart-new-syntax-bugs
#6186 Fixes the flowchart node metadata syntax bugs
2025-01-15 11:45:11 +01:00
saurabhg772244
5d3d1047a4 convert sequenceDb to class. 2025-01-15 15:37:33 +05:30
saurabhg772244
0f08c3bc9c Updated FlowDB instance. 2025-01-14 19:02:50 +05:30
Ashish Jain
7809b5a93f #6186 Fixes the flowchaart node metadata syntax bugs 2025-01-14 14:07:25 +01:00
saurabhg772244
ef9bb53e67 Code refactor 2025-01-14 15:32:47 +05:30
saurabhg772244
3e32332814 Added changeset. 2025-01-14 15:22:14 +05:30
saurabhg772244
e1aab25144 Updated changeset message. 2025-01-14 12:45:56 +05:30
saurabhg772244
c8697301ee Code refactor. 2025-01-14 12:21:07 +05:30
saurabhg772244
fcb1de915b convert stateDb to class, added test case. 2025-01-13 20:30:38 +05:30
autofix-ci[bot]
e345294658 [autofix.ci] apply automated fixes 2025-01-12 14:01:18 +00:00
Balthasar Glättli
9936099e25 Update integrations-community.md
Replaced outdated and lo longer maintained WordPress plugins with actually maintained MerPress Plugin
2025-01-12 14:53:19 +01:00
autofix-ci[bot]
59352ad4d8 [autofix.ci] apply automated fixes 2025-01-11 16:39:40 +00:00
renovate[bot]
ba70f15de5 fix(deps): update all patch dependencies 2025-01-11 16:32:14 +00:00
autofix-ci[bot]
e70b069576 [autofix.ci] apply automated fixes 2025-01-10 14:23:09 +00:00
André Jaenisch
28bab4a323 Update integrations-community.md
Added Forgejo as integration
2025-01-10 15:11:22 +01:00
Saurabh Gore
6cc31b7453 Added changeset 2025-01-10 13:33:04 +05:30
Saurabh Gore
29ca1504dd Added unit test cases for flow DB to have functions used in flow JISON 2025-01-10 13:19:13 +05:30
saurabhg772244
16d2251e43 Merge branch 'develop' of https://github.com/mermaid-js/mermaid into saurabh/refactor/convert-flowDb-to-class 2025-01-10 11:15:39 +05:30
Ashish Jain
bc2cc61240 Merge pull request #6136 from mermaid-js/5813-edge-bugfix
Adding animations to flowchart edges also fixing bug with invisible edges
2025-01-07 09:59:52 +01:00
Saurabh Gore
6836e9c7a8 Updated test cases 2025-01-07 12:03:54 +05:30
Saurabh Gore
8dc016e7f9 Update packages/mermaid/src/mermaidAPI.spec.ts
Co-authored-by: Alois Klink <alois@aloisklink.com>
2025-01-06 16:43:49 +05:30
Saurabh Gore
3cad7984a3 Update packages/mermaid/src/mermaidAPI.spec.ts
Co-authored-by: Alois Klink <alois@aloisklink.com>
2025-01-06 16:37:51 +05:30
Saurabh Gore
f5bae98098 Set generation to gen-2 in clear 2025-01-03 14:55:20 +05:30
Saurabh Gore
0695893e30 Added test cases 2025-01-03 11:30:21 +05:30
Saurabh Gore
9ef6090c8c convert flowDb to class. 2024-12-31 17:40:52 +05:30
Steph
fa6f3e5fff update Discord links 2024-12-19 13:53:06 -08:00
Knut Sveidqvist
ec0d9c389a Adding changeset 2024-12-18 11:59:39 +01:00
Knut Sveidqvist
323b07a2e4 Typescript fix and updating documentation 2024-12-18 11:56:48 +01:00
Knut Sveidqvist
c153d0455f #5574 Fixed issue linkStyles 2024-12-17 16:28:38 +01:00
Knut Sveidqvist
9b00f1f2fb #5574 Adding support for edge ids and animations 2024-12-17 14:56:18 +01:00
autofix-ci[bot]
a055ff7db3 [autofix.ci] apply automated fixes 2024-12-02 18:14:21 +00:00
Zack Katz
d032723a47 Youtube --> YouTube 2024-12-02 11:56:17 -05:00
Royal Jain
daf83f596d Add Mermaid AI Bot in Readme 2024-11-29 16:46:15 +05:30
yari-dewalt
5a2a8f9bd4 Fix typos 2024-10-29 10:33:50 -07:00
Yari DeWalt
9854748fc3 Merge branch 'develop' into update-er-diagram 2024-10-29 10:23:14 -07:00
yari-dewalt
5ae5a0cea3 Merge branch 'develop' into update-er-diagram and fix conflicts 2024-10-28 10:53:45 -07:00
yari-dewalt
01e5346004 Update handling of classes and add support for default class 2024-10-24 10:18:17 -07:00
yari-dewalt
1b34077f55 Adjust tests 2024-10-23 12:26:19 -07:00
Yari DeWalt
87fa698c79 Merge branch 'develop' into update-er-diagram 2024-10-23 12:07:27 -07:00
yari-dewalt
b49afeefc2 Cleanup 2024-10-23 12:06:59 -07:00
yari-dewalt
8ace44b428 Add fix for edge markers showing under node if handDrawn 2024-10-23 12:02:49 -07:00
yari-dewalt
39a6c308fb Fix conflict with style statements 2024-10-23 12:01:08 -07:00
yari-dewalt
2771b14f65 Update tests 2024-10-23 12:00:21 -07:00
yari-dewalt
b67cdb171d Fix for edge markers displaying above nodes when using elk 2024-10-17 17:59:41 -07:00
yari-dewalt
c789172b89 Update tests 2024-10-17 17:58:46 -07:00
yari-dewalt
1d68c4f075 Update to test elk layout 2024-10-17 17:58:19 -07:00
yari-dewalt
df22fb5e00 Merge branch 'update-er-diagram' of github.com:yari-dewalt/mermaid into update-er-diagram 2024-10-16 09:48:49 -07:00
yari-dewalt
5d2b0f74af Add fix for er markers when using elk layout 2024-10-16 09:48:15 -07:00
autofix-ci[bot]
723b8f1d32 [autofix.ci] apply automated fixes 2024-10-16 15:20:09 +00:00
yari-dewalt
5be5aa3dfa Register erBox shape 2024-10-16 08:14:13 -07:00
Yari DeWalt
69e12fd67d Merge branch 'develop' into update-er-diagram 2024-10-16 08:09:51 -07:00
yari-dewalt
49e23c74bc Update parser to include changes 2024-10-15 12:19:35 -07:00
yari-dewalt
8b169f3796 Fix issue with text content using < and > 2024-10-15 11:46:31 -07:00
yari-dewalt
b5da91b29a Update 2024-10-15 11:45:59 -07:00
yari-dewalt
1d4ea56740 Support direction data 2024-10-15 11:44:58 -07:00
yari-dewalt
0d664b1fd2 Add tests 2024-10-15 11:44:02 -07:00
yari-dewalt
29c3293265 Update documentation 2024-10-15 11:42:47 -07:00
yari-dewalt
df110e5e11 Add default class to nodes and fix styles 2024-10-08 11:47:08 -07:00
yari-dewalt
6247bd5f89 Add test html file 2024-10-08 08:26:43 -07:00
yari-dewalt
cba4752433 Fix diagram title not being centered 2024-10-08 08:26:12 -07:00
yari-dewalt
d0dd4e6e5e Fix cyclical / recursive edges to not show duplicated arrow start markers 2024-10-08 08:25:34 -07:00
yari-dewalt
d2892ea249 Add erDiagram specific arrow markers 2024-10-08 08:24:41 -07:00
yari-dewalt
983c28686f Register erBox shape in nodes 2024-10-08 08:23:51 -07:00
yari-dewalt
f2f1ad4605 Add erBox shape 2024-10-08 08:22:34 -07:00
yari-dewalt
10562e72f4 Initial update to new renderer 2024-10-08 08:12:42 -07:00
335 changed files with 21848 additions and 11518 deletions

View File

@@ -27,6 +27,7 @@ const MERMAID_CONFIG_DIAGRAM_KEYS = [
'block',
'packet',
'architecture',
'radar',
] as const;
/**

View File

@@ -1,5 +0,0 @@
---
'mermaid': patch
---
fix: architecture diagrams no longer grow to extreme heights due to conflicting alignments

View File

@@ -1,5 +0,0 @@
---
'mermaid': patch
---
fix: Proper separation between strings and markdown strings

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
fix: Remove incorrect `style="undefined;"` attributes in some Mermaid diagrams

View File

@@ -0,0 +1,7 @@
---
'@mermaid-js/mermaid-zenuml': patch
---
chore: bump minimum ZenUML version to 3.23.28
commit: 9d06d8f31e7f12af9e9e092214f907f2dc93ad75

View File

@@ -0,0 +1,5 @@
---
'mermaid': minor
---
feat: Add support for styling Journey Diagram title (color, font-family, and font-size)

View File

@@ -0,0 +1,6 @@
---
'mermaid': patch
'@mermaid-js/parser': patch
---
Refactor grammar so that title don't break Architecture Diagrams

View File

@@ -0,0 +1,5 @@
---
'mermaid': minor
---
feat: Dynamically Render Data Labels Within Bar Charts

View File

@@ -0,0 +1,7 @@
---
'@mermaid-js/mermaid-zenuml': patch
---
fix(zenuml): limit `peerDependencies` to Mermaid v10 and v11
commit: 0ad44c12feead9d20c6a870a49327ada58d6e657

View File

@@ -26,6 +26,7 @@ dompurify
elkjs
fcose
fontawesome
Forgejo
Foswiki
Gitea
graphlib

View File

@@ -34,6 +34,19 @@ const buildPackage = async (entryName: keyof typeof packageOptions) => {
{ ...iifeOptions, minify: true, metafile: shouldVisualize }
);
}
if (entryName === 'mermaid-zenuml') {
const iifeOptions: MermaidBuildOptions = {
...commonOptions,
format: 'iife',
globalName: 'mermaid-zenuml',
};
buildConfigs.push(
// mermaid-zenuml.js
{ ...iifeOptions },
// mermaid-zenuml.min.js
{ ...iifeOptions, minify: true, metafile: shouldVisualize }
);
}
const results = await Promise.all(buildConfigs.map((option) => build(getBuildConfig(option))));

View File

@@ -58,6 +58,7 @@ export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
format,
minify,
options: { name, file, packageName },
globalName = 'mermaid',
} = options;
const external: string[] = ['require', 'fs', 'path'];
const outFileName = getFileName(name, options);
@@ -68,6 +69,7 @@ export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
},
metafile,
minify,
globalName,
logLevel: 'info',
chunkNames: `chunks/${outFileName}/[name]-[hash]`,
define: {
@@ -89,11 +91,12 @@ export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
if (format === 'iife') {
output.format = 'iife';
output.splitting = false;
output.globalName = '__esbuild_esm_mermaid';
const originalGlobalName = output.globalName ?? 'mermaid';
output.globalName = `__esbuild_esm_mermaid_nm[${JSON.stringify(originalGlobalName)}]`;
// Workaround for removing the .default access in esbuild IIFE.
// https://github.com/mermaid-js/mermaid/pull/4109#discussion_r1292317396
output.footer = {
js: 'globalThis.mermaid = globalThis.__esbuild_esm_mermaid.default;',
js: `globalThis[${JSON.stringify(originalGlobalName)}] = globalThis.${output.globalName}.default;`,
};
output.outExtension = { '.js': '.js' };
} else {

View File

@@ -4,7 +4,7 @@ contact_links:
url: https://github.com/mermaid-js/mermaid/discussions
about: Ask the Community questions or share your own graphs in our discussions.
- name: Discord
url: https://discord.gg/AgrbSrBer3
url: https://discord.gg/sKeNQX4Wtj
about: Join our Community on Discord for Help and a casual chat.
- name: Documentation
url: https://mermaid.js.org

7
.github/lychee.toml vendored
View File

@@ -47,7 +47,12 @@ exclude = [
"https://(www.)?drupal.org",
# Swimm returns 404, eventhough the link is valid
"https://docs.swimm.io"
"https://docs.swimm.io",
# Timeout
"https://huehive.co",
"https://foswiki.org",
"https://www.gnu.org",
]
# Exclude all private IPs from checking.

View File

@@ -13,13 +13,13 @@ jobs:
autofix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
# uses version from "packageManager" field in package.json
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
cache: pnpm
node-version-file: '.node-version'
@@ -42,4 +42,4 @@ jobs:
working-directory: ./packages/mermaid
run: pnpm run docs:build
- uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c # main
- uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef # main

View File

@@ -18,12 +18,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
cache: pnpm
node-version-file: '.node-version'

View File

@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Check for difference in README.md and docs/README.md
run: |

View File

@@ -32,11 +32,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
uses: github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
with:
config-file: ./.github/codeql/codeql-config.yml
languages: ${{ matrix.language }}
@@ -48,7 +48,7 @@ jobs:
# 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)
- name: Autobuild
uses: github/codeql-action/autobuild@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
uses: github/codeql-action/autobuild@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
# 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
@@ -62,4 +62,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
uses: github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10

View File

@@ -15,6 +15,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Dependency Review'
uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0

View File

@@ -32,13 +32,13 @@ jobs:
run: |
echo "::error,title=Not using Applitools::APPLITOOLS_API_KEY is empty, disabling Applitools for this run."
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
# uses version from "packageManager" field in package.json
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version-file: '.node-version'
@@ -54,7 +54,7 @@ jobs:
APPLITOOLS_SERVER_URL: 'https://eyesapi.applitools.com'
- name: Cypress run
uses: cypress-io/github-action@d79d2d530a66e641eb4a5f227e13bc985c60b964 # v4.2.2
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
id: cypress
with:
start: pnpm run dev

View File

@@ -11,6 +11,7 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: write
pull-requests: write
jobs:
timings:
@@ -19,18 +20,19 @@ jobs:
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:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version-file: '.node-version'
- name: Install dependencies
uses: cypress-io/github-action@0da3c06ed8217b912deea9d8ee69630baed1737e # v6.7.6
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
with:
runTests: false
- name: Cypress run
uses: cypress-io/github-action@0da3c06ed8217b912deea9d8ee69630baed1737e # v6.7.6
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
id: cypress
with:
install: false
@@ -44,10 +46,17 @@ jobs:
SPLIT: 1
SPLIT_INDEX: 0
SPLIT_FILE: 'cypress/timings.json'
- name: Commit changes
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
- name: Compare timings
run: pnpm tsx scripts/compare-timings.ts
- name: Commit and create pull request
uses: peter-evans/create-pull-request@a7b20e1da215b3ef3ccddb48ff65120256ed6226
with:
add: 'cypress/timings.json'
author_name: 'github-actions[bot]'
author_email: '41898282+github-actions[bot]@users.noreply.github.com'
message: 'chore: update E2E timings'
add-paths: |
cypress/timings.json
commit-message: 'chore: update E2E timings'
branch: update-timings
title: Update E2E Timings
delete-branch: true
sign-commits: true

View File

@@ -28,6 +28,8 @@ env:
) ||
github.event.before
}}
RUN_VISUAL_TEST: >-
${{ github.repository == 'mermaid-js/mermaid' && (github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/')) }}
jobs:
cache:
runs-on: ubuntu-latest
@@ -35,30 +37,29 @@ jobs:
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:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version-file: '.node-version'
- name: Cache snapshots
id: cache-snapshot
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
with:
save-always: true
path: ./cypress/snapshots
key: ${{ runner.os }}-snapshots-${{ env.targetHash }}
# If a snapshot for a given Hash is not found, we checkout that commit, run the tests and cache the snapshots.
- name: Switch to base branch
if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }}
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ env.targetHash }}
- name: Install dependencies
if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }}
uses: cypress-io/github-action@0da3c06ed8217b912deea9d8ee69630baed1737e # v6.7.6
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
with:
# just perform install
runTests: false
@@ -81,26 +82,26 @@ jobs:
matrix:
containers: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
# uses version from "packageManager" field in package.json
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version-file: '.node-version'
# These cached snapshots are downloaded, providing the reference snapshots.
- name: Cache snapshots
id: cache-snapshot
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache/restore@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
with:
path: ./cypress/snapshots
key: ${{ runner.os }}-snapshots-${{ env.targetHash }}
- name: Install dependencies
uses: cypress-io/github-action@0da3c06ed8217b912deea9d8ee69630baed1737e # v6.7.6
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
with:
runTests: false
@@ -116,7 +117,7 @@ jobs:
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@0da3c06ed8217b912deea9d8ee69630baed1737e # v6.7.6
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
id: cypress
with:
install: false
@@ -125,21 +126,20 @@ jobs:
browser: chrome
# Disable recording if we don't have an API key
# e.g. if this action was run from a fork
record: ${{ secrets.CYPRESS_RECORD_KEY != '' }}
record: ${{ env.RUN_VISUAL_TEST == 'true' && secrets.CYPRESS_RECORD_KEY != '' }}
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
VITEST_COVERAGE: true
ARGOS_PARALLEL: ${{ env.RUN_VISUAL_TEST == 'true' }}
ARGOS_PARALLEL_TOTAL: ${{ env.RUN_VISUAL_TEST == 'true' && strategy.job-total || 1 }}
ARGOS_PARALLEL_INDEX: ${{ env.RUN_VISUAL_TEST == 'true' && matrix.containers || 1 }}
CYPRESS_COMMIT: ${{ github.sha }}
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
ARGOS_PARALLEL: true
ARGOS_PARALLEL_TOTAL: ${{ strategy.job-total }}
ARGOS_PARALLEL_INDEX: ${{ matrix.containers }}
CYPRESS_RECORD_KEY: ${{ env.RUN_VISUAL_TEST == 'true' && secrets.CYPRESS_RECORD_KEY || ''}}
SPLIT: ${{ strategy.job-total }}
SPLIT_INDEX: ${{ strategy.job-index }}
SPLIT_FILE: 'cypress/timings.json'
VITEST_COVERAGE: true
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
# Run step only pushes to develop and pull_requests
if: ${{ steps.cypress.conclusion == 'success' && (github.event_name == 'pull_request' || github.ref == 'refs/heads/develop')}}
with:

View File

@@ -29,17 +29,17 @@ jobs:
# lychee only uses the GITHUB_TOKEN to avoid rate-limiting
contents: read
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Restore lychee cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- name: Link Checker
uses: lycheeverse/lychee-action@c053181aa0c3d17606addfe97a9075a32723548a # v1.9.3
uses: lycheeverse/lychee-action@f613c4a64e50d792e0b31ec34bbcbba12263c6a6 # v2.3.0
with:
args: >-
--config .github/lychee.toml

View File

@@ -15,7 +15,7 @@ jobs:
docker-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
with:
@@ -23,13 +23,13 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
# uses version from "packageManager" field in package.json
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
cache: pnpm
node-version-file: '.node-version'

View File

@@ -22,7 +22,7 @@ jobs:
pull-requests: write # write permission is required to label PRs
steps:
- name: Label PR
uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348 # v6.0.0
uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0
with:
config-name: pr-labeler.yml
disable-autolabeler: false

View File

@@ -23,12 +23,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
cache: pnpm
node-version-file: '.node-version'
@@ -37,7 +37,7 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Setup Pages
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
- name: Run Build
run: pnpm --filter mermaid run docs:build:vitepress

View File

@@ -9,14 +9,14 @@ jobs:
publish-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
cache: pnpm
node-version-file: '.node-version'

View File

@@ -26,12 +26,12 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout Repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
cache: pnpm
node-version-file: '.node-version'

View File

@@ -21,12 +21,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
cache: pnpm
node-version-file: '.node-version'
@@ -36,7 +36,7 @@ jobs:
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@3de3850952bec538fde60aac71731376e57b9b57 # v1.4.8
uses: changesets/action@c8bada60c408975afd1a20b3db81d6eee6789308 # v1.4.9
with:
version: pnpm changeset:version
publish: pnpm changeset:publish

View File

@@ -16,22 +16,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Run analysis
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
with:
results_file: results.sarif
results_format: sarif
publish_results: true
- name: Upload artifact
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: SARIF file
path: results.sarif
retention-days: 5
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
with:
sarif_file: results.sarif

View File

@@ -9,13 +9,13 @@ jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
# uses version from "packageManager" field in package.json
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
cache: pnpm
node-version-file: '.node-version'
@@ -43,7 +43,7 @@ jobs:
pnpm test:check:tsc
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
# Run step only pushes to develop and pull_requests
if: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/develop' }}
with:

View File

@@ -8,8 +8,8 @@ jobs:
update-browser-list:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- run: npx update-browserslist-db@latest
- name: Commit changes
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
@@ -19,7 +19,7 @@ jobs:
message: 'chore: update browsers list'
push: false
- name: Create Pull Request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
with:
branch: update-browserslist
title: Update Browserslist

View File

@@ -1 +1 @@
20.12.2
22.14.0

View File

@@ -1,4 +1,4 @@
FROM node:20.12.2-alpine3.19@sha256:7a91aa397f2e2dfbfcdad2e2d72599f374e0b0172be1d86eeb73f1d33f36a4b2
FROM node:22.12.0-alpine3.19@sha256:40dc4b415c17b85bea9be05314b4a753f45a4e1716bb31c01182e6c53d51a654
USER 0:0

View File

@@ -15,7 +15,7 @@ Generate diagrams from markdown-like text.
<a href="https://mermaid.live/"><b>Live Editor!</b></a>
</p>
<p align="center">
<a href="https://mermaid.js.org">📖 Documentation</a> | <a href="https://mermaid.js.org/intro/">🚀 Getting Started</a> | <a href="https://www.jsdelivr.com/package/npm/mermaid">🌐 CDN</a> | <a href="https://discord.gg/AgrbSrBer3" title="Discord invite">🙌 Join Us</a>
<a href="https://mermaid.js.org">📖 Documentation</a> | <a href="https://mermaid.js.org/intro/">🚀 Getting Started</a> | <a href="https://www.jsdelivr.com/package/npm/mermaid">🌐 CDN</a> | <a href="https://discord.gg/sKeNQX4Wtj" title="Discord invite">🙌 Join Us</a>
</p>
<p align="center">
<a href="./README.zh-CN.md">简体中文</a>
@@ -33,7 +33,7 @@ Try Live Editor previews of future releases: <a href="https://develop.git.mermai
[![Coverage Status](https://codecov.io/github/mermaid-js/mermaid/branch/develop/graph/badge.svg)](https://app.codecov.io/github/mermaid-js/mermaid/tree/develop)
[![CDN Status](https://img.shields.io/jsdelivr/npm/hm/mermaid)](https://www.jsdelivr.com/package/npm/mermaid)
[![NPM Downloads](https://img.shields.io/npm/dm/mermaid)](https://www.npmjs.com/package/mermaid)
[![Join our Discord!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=discord&label=discord)](https://discord.gg/AgrbSrBer3)
[![Join our Discord!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=discord&label=discord)](https://discord.gg/sKeNQX4Wtj)
[![Twitter Follow](https://img.shields.io/badge/Social-mermaidjs__-blue?style=social&logo=X)](https://twitter.com/mermaidjs_)
[![Covered by Argos Visual Testing](https://argos-ci.com/badge.svg)](https://argos-ci.com?utm_source=mermaid&utm_campaign=oss)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/mermaid-js/mermaid/badge)](https://securityscorecards.dev/viewer/?uri=github.com/mermaid-js/mermaid)
@@ -95,6 +95,10 @@ In our release process we rely heavily on visual regression tests using [applito
<!-- </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
**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).**
@@ -253,6 +257,34 @@ pie
### Git graph [experimental - <a href="https://mermaid.live/edit#pako:eNqNkMFugzAMhl8F-VyVAR1tOW_aA-zKxSSGRCMJCk6lCvHuNZPKZdM0n-zf3_8r8QIqaIIGMqnB8kfEybQ--y4VnLP8-9RF9Mpkmm40hmlnDKmvkPiH_kfS7nFo_VN0FAf6XwocQGgxa_nGsm1bYEOOWmik1dRjGrmF1q-Cpkkj07u2HCI0PY4zHQATh8-7V9BwTPSE3iwOEd1OjQE1iWkBvk_bzQY7s0Sq4Hs7bHqKo8iGeZqbPN_WR7mpSd1RHpvPVhuMbG7XOq_L-oJlRfW5wteq0qorrpe-PBW9Pr8UJcK6rg-BLYPQ">live editor</a>]
```
gitGraph
commit
commit
branch develop
checkout develop
commit
commit
checkout main
merge develop
commit
commit
```
```mermaid
gitGraph
commit
commit
branch develop
checkout develop
commit
commit
checkout main
merge develop
commit
commit
```
### Bar chart (using gantt chart) [<a href="https://mermaid.js.org/syntax/gantt.html">docs</a> - <a href="https://mermaid.live/edit#pako:eNptkU1vhCAQhv8KIenNugiI4rkf6bmXpvEyFVxJFDYyNt1u9r8X63Z7WQ9m5pknLzieaBeMpQ3dg0dsPUkPOhwteXZIXmJcbCT3xMAxkuh8Z8kIEclyMIB209fqKcwTICFvG4IvFy_oLrZ-g9F26ILfQgvNFN94VaRXQ1iWqpumZBcu1J8p1E1TXDx59eQNr5LyEqjJn6hv5QnGNlxevZJmdLLpy5xJSzut45biYCfb0iaVxvawjNjS1p-TCguG16PvaIPzYjO67e3BwX6GiTY9jPFKH43DMF_hGMDY1J4oHg-_f8hFTJFd8L3br3yZx4QHxENsdrt1nO8dDstH3oVpF50ZYMbhU6ud4qoGLqyqBJRCmO6j0HXPZdGbihUc6Pmc0QP49xD-b5X69ZQv2gjO81IwzWqhC1lKrjJ6pA3nVS7SMiVjrKirWlYp5fs3osgrWeo00lorLWvOzz8JVbXm">live editor</a>]
```
@@ -435,7 +467,7 @@ A quick note from Knut Sveidqvist:
>
> _Thank you to [Tyler Long](https://github.com/tylerlong) who has been a collaborator since April 2017._
>
> _Thank you to the ever-growing list of [contributors](https://github.com/knsv/mermaid/graphs/contributors) that brought the project this far!_
> _Thank you to the ever-growing list of [contributors](https://github.com/mermaid-js/mermaid/graphs/contributors) that brought the project this far!_
---

View File

@@ -15,7 +15,7 @@ Mermaid
<a href="https://mermaid.live/"><b>实时编辑器!</b></a>
</p>
<p align="center">
<a href="https://mermaid.js.org">📖 文档</a> | <a href="https://mermaid.js.org/intro/">🚀 入门</a> | <a href="https://www.jsdelivr.com/package/npm/mermaid">🌐 CDN</a> | <a href="https://discord.gg/AgrbSrBer3" title="Discord invite">🙌 加入我们</a>
<a href="https://mermaid.js.org">📖 文档</a> | <a href="https://mermaid.js.org/intro/">🚀 入门</a> | <a href="https://www.jsdelivr.com/package/npm/mermaid">🌐 CDN</a> | <a href="https://discord.gg/sKeNQX4Wtj" title="Discord invite">🙌 加入我们</a>
</p>
<p align="center">
<a href="./README.md">English</a>
@@ -34,7 +34,7 @@ Mermaid
[![Coverage Status](https://codecov.io/github/mermaid-js/mermaid/branch/develop/graph/badge.svg)](https://app.codecov.io/github/mermaid-js/mermaid/tree/develop)
[![CDN Status](https://img.shields.io/jsdelivr/npm/hm/mermaid)](https://www.jsdelivr.com/package/npm/mermaid)
[![NPM Downloads](https://img.shields.io/npm/dm/mermaid)](https://www.npmjs.com/package/mermaid)
[![Join our Discord!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=discord&label=discord)](https://discord.gg/AgrbSrBer3)
[![Join our Discord!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=discord&label=discord)](https://discord.gg/sKeNQX4Wtj)
[![Twitter Follow](https://img.shields.io/badge/Social-mermaidjs__-blue?style=social&logo=X)](https://twitter.com/mermaidjs_)
<img src="./img/header.png" alt="" />
@@ -358,7 +358,7 @@ _很不幸的是鱼与熊掌不可兼得在这个场景下它意味着在
> _特别感谢 [d3](https://d3js.org/) 和 [dagre-d3](https://github.com/cpettitt/dagre-d3) 这两个优秀的项目它们提供了图形布局和绘图工具库_ > _同样感谢 [js-sequence-diagram](https://bramp.github.io/js-sequence-diagrams) 提供了时序图语法的使用。 感谢 Jessica Peter 提供了甘特图渲染的灵感。_ > _感谢 [Tyler Long](https://github.com/tylerlong) 从 2017 年四月开始成为了项目的合作者。_
>
> _感谢越来越多的 [贡献者们](https://github.com/knsv/mermaid/graphs/contributors)没有你们就没有这个项目的今天_
> _感谢越来越多的 [贡献者们](https://github.com/mermaid-js/mermaid/graphs/contributors)没有你们就没有这个项目的今天_
---

View File

@@ -1,8 +1,8 @@
import eyesPlugin from '@applitools/eyes-cypress';
import { registerArgosTask } from '@argos-ci/cypress/task';
import coverage from '@cypress/code-coverage/task';
import coverage from '@cypress/code-coverage/task.js';
import { defineConfig } from 'cypress';
import { addMatchImageSnapshotPlugin } from 'cypress-image-snapshot/plugin';
import { addMatchImageSnapshotPlugin } from 'cypress-image-snapshot/plugin.js';
import cypressSplit from 'cypress-split';
export default eyesPlugin(
@@ -23,12 +23,10 @@ export default eyesPlugin(
});
// copy any needed variables from process.env to config.env
config.env.useAppli = process.env.USE_APPLI ? true : false;
config.env.useArgos = !!process.env.CI;
config.env.useArgos = process.env.RUN_VISUAL_TEST === 'true';
if (config.env.useArgos) {
registerArgosTask(on, config, {
token: 'fc3a35cf5200db928d65b2047861582d9444032b',
});
registerArgosTask(on, config);
} else {
addMatchImageSnapshotPlugin(on, config);
}

View File

@@ -132,3 +132,10 @@ export const verifyScreenshot = (name: string): void => {
cy.matchImageSnapshot(name);
}
};
export const verifyNumber = (value: number, expected: number, deltaPercent = 10): void => {
expect(value).to.be.within(
expected * (1 - deltaPercent / 100),
expected * (1 + deltaPercent / 100)
);
};

View File

@@ -19,6 +19,25 @@ describe.skip('architecture diagram', () => {
`
);
});
it('should render a simple architecture diagram with titleAndAccessabilities', () => {
imgSnapshotTest(
`architecture-beta
title Simple Architecture Diagram
accTitle: Accessibility Title
accDescr: Accessibility Description
group api(cloud)[API]
service db(database)[Database] in api
service disk1(disk)[Storage] in api
service disk2(disk)[Storage] in api
service server(server)[Server] in api
db:L -- R:server
disk1:T -- B:server
disk2:T -- B:db
`
);
});
it('should render an architecture diagram with groups within groups', () => {
imgSnapshotTest(
`architecture-beta
@@ -172,7 +191,7 @@ describe.skip('architecture diagram', () => {
);
});
it('should render an architecture diagram with a resonable height', () => {
it('should render an architecture diagram with a reasonable height', () => {
imgSnapshotTest(
`architecture-beta
group federated(cloud)[Federated Environment]

View File

@@ -0,0 +1,652 @@
import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts';
const testOptions = [
{ description: '', options: { logLevel: 1 } },
{ description: 'ELK: ', options: { logLevel: 1, layout: 'elk' } },
{ description: 'HD: ', options: { logLevel: 1, look: 'handDrawn' } },
];
describe('Entity Relationship Diagram Unified', () => {
testOptions.forEach(({ description, options }) => {
it(`${description}should render a simple ER diagram`, () => {
imgSnapshotTest(
`
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`,
options
);
});
it(`${description}should render a simple ER diagram without htmlLabels`, () => {
imgSnapshotTest(
`
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render an ER diagram with a recursive relationship`, () => {
imgSnapshotTest(
`
erDiagram
CUSTOMER ||..o{ CUSTOMER : refers
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`,
options
);
});
it(`${description}should render an ER diagram with multiple relationships between the same two entities`, () => {
imgSnapshotTest(
`
erDiagram
CUSTOMER ||--|{ ADDRESS : "invoiced at"
CUSTOMER ||--|{ ADDRESS : "receives goods at"
`,
options
);
});
it(`${description}should render a cyclical ER diagram`, () => {
imgSnapshotTest(
`
erDiagram
A ||--|{ B : likes
B ||--|{ C : likes
C ||--|{ A : likes
`,
options
);
});
it(`${description}should render a not-so-simple ER diagram`, () => {
imgSnapshotTest(
`
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
`,
options
);
});
it(`${description}should render a not-so-simple ER diagram without htmlLabels`, () => {
imgSnapshotTest(
`
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render multiple ER diagrams`, () => {
imgSnapshotTest(
[
`
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`,
`
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`,
],
options
);
});
it(`${description}should render an ER diagram with blank or empty labels`, () => {
imgSnapshotTest(
`
erDiagram
BOOK }|..|{ AUTHOR : ""
BOOK }|..|{ GENRE : " "
AUTHOR }|..|{ GENRE : " "
`,
options
);
});
it(`${description}should render entities that have no relationships`, () => {
renderGraph(
`
erDiagram
DEAD_PARROT
HERMIT
RECLUSE
SOCIALITE }o--o{ SOCIALITE : "interacts with"
RECLUSE }o--o{ SOCIALITE : avoids
`,
options
);
});
it(`${description}should render entities with and without attributes`, () => {
renderGraph(
`
erDiagram
BOOK { string title }
AUTHOR }|..|{ BOOK : writes
BOOK { float price }
`,
options
);
});
it(`${description}should render entities with generic and array attributes`, () => {
renderGraph(
`
erDiagram
BOOK {
string title
string[] authors
type~T~ type
}
`,
options
);
});
it(`${description}should render entities with generic and array attributes without htmlLabels`, () => {
renderGraph(
`
erDiagram
BOOK {
string title
string[] authors
type~T~ type
}
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render entities with length in attributes type`, () => {
renderGraph(
`
erDiagram
CLUSTER {
varchar(99) name
string(255) description
}
`,
options
);
});
it(`${description}should render entities with length in attributes type without htmlLabels`, () => {
renderGraph(
`
erDiagram
CLUSTER {
varchar(99) name
string(255) description
}
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render entities and attributes with big and small entity names`, () => {
renderGraph(
`
erDiagram
PRIVATE_FINANCIAL_INSTITUTION {
string name
int turnover
}
PRIVATE_FINANCIAL_INSTITUTION ||..|{ EMPLOYEE : employs
EMPLOYEE { bool officer_of_firm }
`,
options
);
});
it(`${description}should render entities and attributes with big and small entity names without htmlLabels`, () => {
renderGraph(
`
erDiagram
PRIVATE_FINANCIAL_INSTITUTION {
string name
int turnover
}
PRIVATE_FINANCIAL_INSTITUTION ||..|{ EMPLOYEE : employs
EMPLOYEE { bool officer_of_firm }
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render entities with attributes that begin with asterisk`, () => {
imgSnapshotTest(
`
erDiagram
BOOK {
int *id
string name
varchar(99) summary
}
BOOK }o..o{ STORE : soldBy
STORE {
int *id
string name
varchar(50) address
}
`,
options
);
});
it(`${description}should render entities with attributes that begin with asterisk without htmlLabels`, () => {
imgSnapshotTest(
`
erDiagram
BOOK {
int *id
string name
varchar(99) summary
}
BOOK }o..o{ STORE : soldBy
STORE {
int *id
string name
varchar(50) address
}
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render entities with keys`, () => {
renderGraph(
`
erDiagram
AUTHOR_WITH_LONG_ENTITY_NAME {
string name PK
}
AUTHOR_WITH_LONG_ENTITY_NAME }|..|{ BOOK : writes
BOOK {
float price
string author FK
string title PK
}
`,
options
);
});
it(`${description}should render entities with keys without htmlLabels`, () => {
renderGraph(
`
erDiagram
AUTHOR_WITH_LONG_ENTITY_NAME {
string name PK
}
AUTHOR_WITH_LONG_ENTITY_NAME }|..|{ BOOK : writes
BOOK {
float price
string author FK
string title PK
}
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render entities with comments`, () => {
renderGraph(
`
erDiagram
AUTHOR_WITH_LONG_ENTITY_NAME {
string name "comment"
}
AUTHOR_WITH_LONG_ENTITY_NAME }|..|{ BOOK : writes
BOOK {
string author
string title "author comment"
float price "price comment"
}
`,
options
);
});
it(`${description}should render entities with comments without htmlLabels`, () => {
renderGraph(
`
erDiagram
AUTHOR_WITH_LONG_ENTITY_NAME {
string name "comment"
}
AUTHOR_WITH_LONG_ENTITY_NAME }|..|{ BOOK : writes
BOOK {
string author
string title "author comment"
float price "price comment"
}
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render entities with keys and comments`, () => {
renderGraph(
`
erDiagram
AUTHOR_WITH_LONG_ENTITY_NAME {
string name PK "comment"
}
AUTHOR_WITH_LONG_ENTITY_NAME }|..|{ BOOK : writes
BOOK {
string description
float price "price comment"
string title PK "title comment"
string author FK
}
`,
options
);
});
it(`${description}should render entities with keys and comments without htmlLabels`, () => {
renderGraph(
`
erDiagram
AUTHOR_WITH_LONG_ENTITY_NAME {
string name PK "comment"
}
AUTHOR_WITH_LONG_ENTITY_NAME }|..|{ BOOK : writes
BOOK {
string description
float price "price comment"
string title PK "title comment"
string author FK
}
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render entities with aliases`, () => {
renderGraph(
`
erDiagram
T1 one or zero to one or more T2 : test
T2 one or many optionally to zero or one T3 : test
T3 zero or more to zero or many T4 : test
T4 many(0) to many(1) T5 : test
T5 many optionally to one T6 : test
T6 only one optionally to only one T1 : test
T4 0+ to 1+ T6 : test
T1 1 to 1 T3 : test
`,
options
);
});
it(`${description}should render a simple ER diagram with a title`, () => {
imgSnapshotTest(
`---
title: simple ER diagram
---
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`,
options
);
});
it(`${description}should render entities with entity name aliases`, () => {
imgSnapshotTest(
`
erDiagram
p[Person] {
varchar(64) firstName
varchar(64) lastName
}
c["Customer Account"] {
varchar(128) email
}
p ||--o| c : has
`,
options
);
});
it(`${description}should render relationship labels with line breaks`, () => {
imgSnapshotTest(
`
erDiagram
p[Person] {
string firstName
string lastName
}
a["Customer Account"] {
string email
}
b["Customer Account Secondary"] {
string email
}
c["Customer Account Tertiary"] {
string email
}
d["Customer Account Nth"] {
string email
}
p ||--o| a : "has<br />one"
p ||--o| b : "has<br />one<br />two"
p ||--o| c : "has<br />one<br/>two<br />three"
p ||--o| d : "has<br />one<br />two<br/>three<br />...<br/>Nth"
`,
options
);
});
it(`${description}should render an ER diagram with unicode text`, () => {
imgSnapshotTest(
`
erDiagram
_**testẽζØ😀㌕ぼ**_ {
*__List~List~int~~sdfds__* **driversLicense** PK "***The l😀icense #***"
*string(99)~T~~~~~~* firstName "Only __99__ <br>characters are a<br>llowed dsfsdfsdfsdfs"
string last*Name*
string __phone__ UK
int _age_
}
`,
options
);
});
it(`${description}should render an ER diagram with unicode text without htmlLabels`, () => {
imgSnapshotTest(
`
erDiagram
_**testẽζØ😀㌕ぼ**_ {
*__List~List~int~~sdfds__* **driversLicense** PK "***The l😀icense #***"
*string(99)~T~~~~~~* firstName "Only __99__ <br>characters are a<br>llowed dsfsdfsdfsdfs"
string last*Name*
string __phone__ UK
int _age_
}
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render an ER diagram with relationships with unicode text`, () => {
imgSnapshotTest(
`
erDiagram
person[😀] {
string *first*Name
string _**last**Name_
}
a["*Customer Account*"] {
**string** ema*i*l
}
person ||--o| a : __hẽ😀__
`,
options
);
});
it(`${description}should render an ER diagram with relationships with unicode text without htmlLabels`, () => {
imgSnapshotTest(
`
erDiagram
person[😀] {
string *first*Name
string _**last**Name_
}
a["*Customer Account*"] {
**string** ema*i*l
}
person ||--o| a : __hẽ😀__
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render an ER diagram with TB direction`, () => {
imgSnapshotTest(
`
erDiagram
direction TB
CAR ||--|{ NAMED-DRIVER : allows
PERSON ||..o{ NAMED-DRIVER : is
`,
options
);
});
it(`${description}should render an ER diagram with BT direction`, () => {
imgSnapshotTest(
`
erDiagram
direction BT
CAR ||--|{ NAMED-DRIVER : allows
PERSON ||..o{ NAMED-DRIVER : is
`,
options
);
});
it(`${description}should render an ER diagram with LR direction`, () => {
imgSnapshotTest(
`
erDiagram
direction LR
CAR ||--|{ NAMED-DRIVER : allows
PERSON ||..o{ NAMED-DRIVER : is
`,
options
);
});
it(`${description}should render an ER diagram with RL direction`, () => {
imgSnapshotTest(
`
erDiagram
direction RL
CAR ||--|{ NAMED-DRIVER : allows
PERSON ||..o{ NAMED-DRIVER : is
`,
options
);
});
it(`${description}should render entities with styles applied from style statement`, () => {
imgSnapshotTest(
`
erDiagram
c[CUSTOMER]
p[PERSON]
style c,p fill:#f9f,stroke:blue, color:grey, font-size:24px,font-weight:bold
`,
options
);
});
it(`${description}should render entities with styles applied from style statement without htmlLabels`, () => {
imgSnapshotTest(
`
erDiagram
c[CUSTOMER]
p[PERSON]
style c,p fill:#f9f,stroke:blue, color:grey, font-size:24px,font-weight:bold
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render entities with styles applied from class statement`, () => {
imgSnapshotTest(
`
erDiagram
c[CUSTOMER]
p[PERSON]:::blue
classDef bold font-size:24px, font-weight: bold
classDef blue stroke:lightblue, color: #0000FF
class c,p bold
`,
options
);
});
it(`${description}should render entities with styles applied from class statement without htmlLabels`, () => {
imgSnapshotTest(
`
erDiagram
c[CUSTOMER]
p[PERSON]:::blue
classDef bold font-size:24px, font-weight: bold
classDef blue stroke:lightblue, color: #0000FF
class c,p bold
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render entities with styles applied from the default class and other styles`, () => {
imgSnapshotTest(
`
erDiagram
c[CUSTOMER]
p[PERSON]:::blue
classDef blue stroke:lightblue, color: #0000FF
classDef default fill:pink
style c color:green
`,
{ ...options }
);
});
});
});

View File

@@ -109,8 +109,8 @@ describe('Entity Relationship Diagram', () => {
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(maxWidthValue).to.be.within(140 * 0.95, 140 * 1.05);
// use within because the absolute value can be slightly different depending on the environment ±6%
expect(maxWidthValue).to.be.within(140 * 0.96, 140 * 1.06);
});
});
@@ -125,8 +125,8 @@ describe('Entity Relationship Diagram', () => {
);
cy.get('svg').should((svg) => {
const width = parseFloat(svg.attr('width'));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(width).to.be.within(140 * 0.95, 140 * 1.05);
// use within because the absolute value can be slightly different depending on the environment ±6%
expect(width).to.be.within(140 * 0.96, 140 * 1.06);
// expect(svg).to.have.attr('height', '465');
expect(svg).to.not.have.attr('style');
});

View File

@@ -1,4 +1,4 @@
import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts';
import { imgSnapshotTest, renderGraph, verifyNumber } from '../../helpers/util.ts';
describe('Flowchart ELK', () => {
it('1-elk: should render a simple flowchart', () => {
@@ -109,7 +109,7 @@ describe('Flowchart ELK', () => {
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(230 * 0.95, 230 * 1.05);
verifyNumber(maxWidthValue, 380);
});
});
it('8-elk: should render a flowchart when useMaxWidth is false', () => {
@@ -128,7 +128,7 @@ describe('Flowchart ELK', () => {
const width = parseFloat(svg.attr('width'));
// use within because the absolute value can be slightly different depending on the environment ±5%
// expect(height).to.be.within(446 * 0.95, 446 * 1.05);
expect(width).to.be.within(230 * 0.95, 230 * 1.05);
verifyNumber(width, 380);
expect(svg).to.not.have.attr('style');
});
});
@@ -692,7 +692,7 @@ A --> B
{}
);
cy.get('svg').should((svg) => {
const edges = svg.querySelectorAll('.edges > path');
const edges = svg[0].querySelectorAll('.edges > path');
edges.forEach((edge) => {
expect(edge).to.have.class('flowchart-link');
});
@@ -739,7 +739,7 @@ NL\`") --"\`1o **bold**\`"--> c
{ flowchart: { titleTopMargin: 0 } }
);
});
it('Wrapping long text with a new line', () => {
it.skip('Wrapping long text with a new line', () => {
imgSnapshotTest(
`%%{init: {"flowchart": {"htmlLabels": true}} }%%
flowchart-elk LR
@@ -841,7 +841,7 @@ end
{ flowchart: { titleTopMargin: 0 } }
);
});
it('Sub graphs and markdown strings', () => {
it('Sub graphs', () => {
imgSnapshotTest(
`---
config:

View File

@@ -1076,4 +1076,41 @@ end
);
});
});
describe('New @ sytax for node metadata edge cases', () => {
it('should be possible to use @ syntax to add labels on multi nodes', () => {
imgSnapshotTest(
`flowchart TB
n2["label for n2"] & n4@{ label: "labe for n4"} & n5@{ label: "labe for n5"}
`,
{}
);
});
it('should be possible to use @ syntax to add labels with trail spaces and &', () => {
imgSnapshotTest(
`flowchart TB
n2["label for n2"] & n4@{ label: "labe for n4"} & n5@{ label: "labe for n5"}
`,
{}
);
});
it('should be possible to use @ syntax to add labels with trail spaces', () => {
imgSnapshotTest(
`flowchart TB
n2["label for n2"]
n4@{ label: "labe for n4"}
n5@{ label: "labe for n5"}
`,
{}
);
});
it('should be possible to use @ syntax to add labels with trail spaces and edge/link', () => {
imgSnapshotTest(
`flowchart TD
A["A"] --> B["for B"] & C@{ label: "for c"} & E@{label : "for E"}
D@{label: "for D"}
`,
{}
);
});
});
});

View File

@@ -917,19 +917,16 @@ graph TD
}
);
});
it('68: should be able to render string and markdown labels (#5824)', () => {
it('#6369: edge color should affect arrow head', () => {
imgSnapshotTest(
`
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"]
flowchart LR
A --> B
A --> C
C --> D
linkStyle 0 stroke:#D50000
linkStyle 2 stroke:#D50000
`,
{
flowchart: { htmlLabels: true },

View File

@@ -63,4 +63,199 @@ section Checkout from website
{ journey: { useMaxWidth: false } }
);
});
it('should initialize with a left margin of 150px for user journeys', () => {
renderGraph(
`
---
config:
journey:
maxLabelWidth: 320
---
journey
title User Journey Example
section Onboarding
Sign Up: 5:
Browse Features: 3:
Use Core Functionality: 4:
section Engagement
Browse Features: 3
Use Core Functionality: 4
`,
{ journey: { useMaxWidth: true } }
);
let diagramStartX;
cy.contains('foreignobject', 'Sign Up').then(($diagram) => {
diagramStartX = parseFloat($diagram.attr('x'));
expect(diagramStartX).to.be.closeTo(150, 2);
});
});
it('should maintain sufficient space between legend and diagram when legend labels are longer', () => {
renderGraph(
`journey
title Web hook life cycle
section Darkoob
Make preBuilt:5: Darkoob user
register slug : 5: Darkoob userf deliberately increasing the size of this label to check if distance between legend and diagram is maintained
Map slug to a Prebuilt Job:5: Darkoob user
section External Service
set Darkoob slug as hook for an Event : 5 : admin Exjjjnjjjj qwerty
listen to the events : 5 : External Service
call darkoob endpoint : 5 : External Service
section Darkoob
check for inputs : 5 : DarkoobAPI
run the prebuilt job : 5 : DarkoobAPI
`,
{ journey: { useMaxWidth: true } }
);
let LabelEndX, diagramStartX;
// Get right edge of the legend
cy.contains('tspan', 'Darkoob userf').then((textBox) => {
const bbox = textBox[0].getBBox();
LabelEndX = bbox.x + bbox.width;
});
// Get left edge of the diagram
cy.contains('foreignobject', 'Make preBuilt').then((rect) => {
diagramStartX = parseFloat(rect.attr('x'));
});
// Assert right edge of the diagram is greater than or equal to the right edge of the label
cy.then(() => {
expect(diagramStartX).to.be.gte(LabelEndX);
});
});
it('should wrap a single long word with hyphenation', () => {
renderGraph(
`
---
config:
journey:
maxLabelWidth: 100
---
journey
title Long Word Test
section Test
VeryLongWord: 5: Supercalifragilisticexpialidocious
`,
{ journey: { useMaxWidth: true } }
);
// Verify that the line ends with a hyphen, indicating proper hyphenation for words exceeding maxLabelWidth.
cy.get('tspan').then((tspans) => {
const hasHyphen = [...tspans].some((t) => t.textContent.trim().endsWith('-'));
return expect(hasHyphen).to.be.true;
});
});
it('should wrap text on whitespace without adding hyphens', () => {
renderGraph(
`
---
config:
journey:
maxLabelWidth: 200
---
journey
title Whitespace Test
section Test
TextWithSpaces: 5: Gustavo Fring is played by Giancarlo Esposito and is a character in Breaking Bad.
`,
{ journey: { useMaxWidth: true } }
);
// Verify that none of the text spans end with a hyphen.
cy.get('tspan').each(($el) => {
const text = $el.text();
expect(text.trim()).not.to.match(/-$/);
});
});
it('should wrap long labels into multiple lines, keep them under max width, and maintain margins', () => {
renderGraph(
`
---
config:
journey:
maxLabelWidth: 320
---
journey
title User Journey Example
section Onboarding
Sign Up: 5: This is a long label that will be split into multiple lines to test the wrapping functionality
Browse Features: 3: This is another long label that will be split into multiple lines to test the wrapping functionality
Use Core Functionality: 4: This is yet another long label that will be split into multiple lines to test the wrapping functionality
section Engagement
Browse Features: 3
Use Core Functionality: 4
`,
{ journey: { useMaxWidth: true } }
);
let diagramStartX, maxLineWidth;
// Get the diagram's left edge x-coordinate
cy.contains('foreignobject', 'Sign Up')
.then(($diagram) => {
diagramStartX = parseFloat($diagram.attr('x'));
})
.then(() => {
cy.get('text.legend').then(($lines) => {
// Check that there are multiple lines
expect($lines.length).to.be.equal(9);
// Check that all lines are under the maxLabelWidth
$lines.each((index, el) => {
const bbox = el.getBBox();
expect(bbox.width).to.be.lte(320);
maxLineWidth = Math.max(maxLineWidth || 0, bbox.width);
});
/** The expected margin between the diagram and the legend is 150px, as defined by
* conf.leftMargin in user-journey-config.js
*/
expect(diagramStartX - maxLineWidth).to.be.closeTo(150, 2);
});
});
});
it('should correctly render the user journey diagram title with the specified styling', () => {
renderGraph(
`---
config:
journey:
titleColor: "#2900A5"
titleFontFamily: "Times New Roman"
titleFontSize: "5rem"
---
journey
title User Journey Example
section Onboarding
Sign Up: 5: John, Shahir
Complete Profile: 4: John
section Engagement
Browse Features: 3: John
Use Core Functionality: 4: John
section Retention
Revisit Application: 5: John
Invite Friends: 3: John
size: 2rem
`
);
cy.get('text').contains('User Journey Example').as('title');
cy.get('@title').then(($title) => {
expect($title).to.have.attr('fill', '#2900A5');
expect($title).to.have.attr('font-family', 'Times New Roman');
expect($title).to.have.attr('font-size', '5rem');
});
});
});

View File

@@ -0,0 +1,79 @@
import { imgSnapshotTest } from '../../helpers/util';
describe('radar structure', () => {
it('should render a simple radar diagram', () => {
imgSnapshotTest(
`radar-beta
title Best Radar Ever
axis A, B, C
curve c1{1, 2, 3}
`
);
});
it('should render a radar diagram with multiple curves', () => {
imgSnapshotTest(
`radar-beta
title Best Radar Ever
axis A, B, C
curve c1{1, 2, 3}
curve c2{2, 3, 1}
`
);
});
it('should render a complex radar diagram', () => {
imgSnapshotTest(
`radar-beta
title My favorite ninjas
axis Agility, Speed, Strength
axis Stam["Stamina"] , Intel["Intelligence"]
curve Ninja1["Naruto Uzumaki"]{
Agility 2, Speed 2,
Strength 3, Stam 5,
Intel 0
}
curve Ninja2["Sasuke"]{2, 3, 4, 1, 5}
curve Ninja3 {3, 2, 1, 5, 4}
showLegend true
ticks 3
max 8
min 0
graticule polygon
`
);
cy.get('svg').should((svg) => {
expect(svg).to.have.length(1);
});
});
it('should render radar diagram with config override', () => {
imgSnapshotTest(
`radar-beta
title Best Radar Ever
axis A,B,C
curve mycurve{1,2,3}`,
{ radar: { marginTop: 100, axisScaleFactor: 0.5 } }
);
});
it('should parse radar diagram with theme override', () => {
imgSnapshotTest(
`radar-beta
axis A,B,C
curve mycurve{1,2,3}`,
{ theme: 'base', themeVariables: { fontSize: 80, cScale0: '#FF0000' } }
);
});
it('should handle radar diagram with radar style override', () => {
imgSnapshotTest(
`radar-beta
axis A,B,C
curve mycurve{1,2,3}`,
{ theme: 'base', themeVariables: { radar: { axisColor: '#FF0000' } } }
);
});
});

View File

@@ -0,0 +1,703 @@
import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts';
const testOptions = [
{ description: '', options: { logLevel: 1 } },
{ description: 'ELK: ', options: { logLevel: 1, layout: 'elk' } },
{ description: 'HD: ', options: { logLevel: 1, look: 'handDrawn' } },
];
describe('Requirement Diagram Unified', () => {
testOptions.forEach(({ description, options }) => {
it(`${description}should render a simple Requirement diagram`, () => {
imgSnapshotTest(
`
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
`,
options
);
});
it(`${description}should render a simple Requirement diagram without htmlLabels`, () => {
imgSnapshotTest(
`
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render a not-so-simple Requirement diagram`, () => {
imgSnapshotTest(
`
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
functionalRequirement test_req2 {
id: 1.1
text: the second test text.
risk: low
verifymethod: inspection
}
performanceRequirement test_req3 {
id: 1.2
text: the third test text.
risk: medium
verifymethod: demonstration
}
interfaceRequirement test_req4 {
id: 1.2.1
text: the fourth test text.
risk: medium
verifymethod: analysis
}
physicalRequirement test_req5 {
id: 1.2.2
text: the fifth test text.
risk: medium
verifymethod: analysis
}
designConstraint test_req6 {
id: 1.2.3
text: the sixth test text.
risk: medium
verifymethod: analysis
}
element test_entity {
type: simulation
}
element test_entity2 {
type: word doc
docRef: reqs/test_entity
}
element test_entity3 {
type: "test suite"
docRef: github.com/all_the_tests
}
test_entity - satisfies -> test_req2
test_req - traces -> test_req2
test_req - contains -> test_req3
test_req3 - contains -> test_req4
test_req4 - derives -> test_req5
test_req5 - refines -> test_req6
test_entity3 - verifies -> test_req5
test_req <- copies - test_entity2
`,
options
);
});
it(`${description}should render a not-so-simple Requirement diagram without htmlLabels`, () => {
imgSnapshotTest(
`
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
functionalRequirement test_req2 {
id: 1.1
text: the second test text.
risk: low
verifymethod: inspection
}
performanceRequirement test_req3 {
id: 1.2
text: the third test text.
risk: medium
verifymethod: demonstration
}
interfaceRequirement test_req4 {
id: 1.2.1
text: the fourth test text.
risk: medium
verifymethod: analysis
}
physicalRequirement test_req5 {
id: 1.2.2
text: the fifth test text.
risk: medium
verifymethod: analysis
}
designConstraint test_req6 {
id: 1.2.3
text: the sixth test text.
risk: medium
verifymethod: analysis
}
element test_entity {
type: simulation
}
element test_entity2 {
type: word doc
docRef: reqs/test_entity
}
element test_entity3 {
type: "test suite"
docRef: github.com/all_the_tests
}
test_entity - satisfies -> test_req2
test_req - traces -> test_req2
test_req - contains -> test_req3
test_req3 - contains -> test_req4
test_req4 - derives -> test_req5
test_req5 - refines -> test_req6
test_entity3 - verifies -> test_req5
test_req <- copies - test_entity2
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render multiple Requirement diagrams`, () => {
imgSnapshotTest(
[
`
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
`,
`
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
`,
],
options
);
});
it(`${description}should render a Requirement diagram with empty information`, () => {
imgSnapshotTest(
`
requirementDiagram
requirement test_req {
}
element test_entity {
}
`,
options
);
});
it(`${description}should render requirements and elements with and without information`, () => {
renderGraph(
`
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
}
`,
options
);
});
it(`${description}should render requirements and elements with long and short text`, () => {
renderGraph(
`
requirementDiagram
requirement test_req {
id: 1
text: the test text that is long and takes up a lot of space.
risk: high
verifymethod: test
}
element test_entity_name_that_is_extra_long {
}
`,
options
);
});
it(`${description}should render requirements and elements with long and short text without htmlLabels`, () => {
renderGraph(
`
requirementDiagram
requirement test_req {
id: 1
text: the test text that is long and takes up a lot of space.
risk: high
verifymethod: test
}
element test_entity_name_that_is_extra_long {
}
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render requirements and elements with quoted text for spaces`, () => {
renderGraph(
`
requirementDiagram
requirement "test req name with spaces" {
id: 1
text: the test text that is long and takes up a lot of space.
risk: high
verifymethod: test
}
element "test entity name that is extra long with spaces" {
}
`,
options
);
});
it(`${description}should render requirements and elements with markdown text`, () => {
renderGraph(
`
requirementDiagram
requirement "__my bolded name__" {
id: 1
text: "**Bolded text** _italicized text_"
risk: high
verifymethod: test
}
element "*my italicized name*" {
type: "**Bolded type** _italicized type_"
docref: "*Italicized* __Bolded__"
}
`,
options
);
});
it(`${description}should render requirements and elements with markdown text without htmlLabels`, () => {
renderGraph(
`
requirementDiagram
requirement "__my bolded name__" {
id: 1
text: "**Bolded text** _italicized text_"
risk: high
verifymethod: test
}
element "*my italicized name*" {
type: "**Bolded type** _italicized type_"
docref: "*Italicized* __Bolded__"
}
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render a simple Requirement diagram with a title`, () => {
imgSnapshotTest(
`---
title: simple Requirement diagram
---
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
`,
options
);
});
it(`${description}should render a Requirement diagram with TB direction`, () => {
imgSnapshotTest(
`
requirementDiagram
direction TB
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
`,
options
);
});
it(`${description}should render a Requirement diagram with BT direction`, () => {
imgSnapshotTest(
`
requirementDiagram
direction BT
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
`,
options
);
});
it(`${description}should render a Requirement diagram with LR direction`, () => {
imgSnapshotTest(
`
requirementDiagram
direction LR
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
`,
options
);
});
it(`${description}should render a Requirement diagram with RL direction`, () => {
imgSnapshotTest(
`
requirementDiagram
direction RL
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
`,
options
);
});
it(`${description}should render requirements and elements with styles applied from style statement`, () => {
imgSnapshotTest(
`
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
style test_req,test_entity fill:#f9f,stroke:blue, color:grey, font-weight:bold
`,
options
);
});
it(`${description}should render requirements and elements with styles applied from style statement without htmlLabels`, () => {
imgSnapshotTest(
`
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
style test_req,test_entity fill:#f9f,stroke:blue, color:grey, font-weight:bold
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render requirements and elements with styles applied from class statement`, () => {
imgSnapshotTest(
`
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
classDef bold font-weight: bold
classDef blue stroke:lightblue, color: #0000FF
class test_entity bold
class test_req blue, bold
`,
options
);
});
it(`${description}should render requirements and elements with styles applied from class statement without htmlLabels`, () => {
imgSnapshotTest(
`
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
classDef bold font-weight: bold
classDef blue stroke:lightblue, color: #0000FF
class test_entity bold
class test_req blue, bold
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render requirements and elements with styles applied from classes with shorthand syntax`, () => {
imgSnapshotTest(
`
requirementDiagram
requirement test_req:::blue {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
classDef bold font-weight: bold
classDef blue stroke:lightblue, color: #0000FF
test_entity:::bold
`,
options
);
});
it(`${description}should render requirements and elements with styles applied from classes with shorthand syntax without htmlLabels`, () => {
imgSnapshotTest(
`
requirementDiagram
requirement test_req:::blue {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
classDef bold font-weight: bold
classDef blue stroke:lightblue, color: #0000FF
test_entity:::bold
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render requirements and elements with styles applied from the default class and other styles`, () => {
imgSnapshotTest(
`
requirementDiagram
requirement test_req:::blue {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
classDef blue stroke:lightblue, color:blue
classDef default fill:pink
style test_entity color:green
`,
options
);
});
it(`${description}should render requirements and elements with styles applied from the default class and other styles without htmlLabels`, () => {
imgSnapshotTest(
`
requirementDiagram
requirement test_req:::blue {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
classDef blue stroke:lightblue, color:blue
classDef default fill:pink
style test_entity color:green
`,
{ ...options, htmlLabels: false }
);
});
it(`${description}should render a Requirement diagram with a theme`, () => {
imgSnapshotTest(
`
---
theme: forest
---
requirementDiagram
requirement test_req:::blue {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
`,
options
);
});
});
});

View File

@@ -179,6 +179,7 @@ describe('XY Chart', () => {
axisLineWidth: 5
chartOrientation: horizontal
plotReservedSpacePercent: 60
showDataLabel: true
---
xychart-beta
title "Sales Revenue"
@@ -315,4 +316,516 @@ describe('XY Chart', () => {
);
cy.get('svg');
});
it('should render vertical bar chart with labels', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
---
xychart-beta
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
`,
{}
);
});
it('should render horizontal bar chart with labels', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
chartOrientation: horizontal
---
xychart-beta
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
`,
{}
);
});
it('should render vertical bar chart without labels by default', () => {
imgSnapshotTest(
`
xychart-beta
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
`,
{}
);
});
it('should render horizontal bar chart without labels by default', () => {
imgSnapshotTest(
`
---
config:
xyChart:
chartOrientation: horizontal
---
xychart-beta
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
`,
{}
);
});
it('should render multiple bar plots vertically with labels correctly', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
---
xychart-beta
title "Multiple Bar Plots"
x-axis Categories [A, B, C]
y-axis "Values" 0 --> 100
bar [10, 50, 90]
`,
{}
);
});
it('should render multiple bar plots horizontally with labels correctly', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
chartOrientation: horizontal
---
xychart-beta
title "Multiple Bar Plots"
x-axis Categories [A, B, C]
y-axis "Values" 0 --> 100
bar [10, 50, 90]
`,
{}
);
});
it('should render a single bar with label for a vertical xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
---
xychart-beta
title "Single Bar Chart"
x-axis Categories [A]
y-axis "Value" 0 --> 100
bar [75]
`,
{}
);
});
it('should render a single bar with label for a horizontal xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
chartOrientation: horizontal
---
xychart-beta
title "Single Bar Chart"
x-axis Categories [A]
y-axis "Value" 0 --> 100
bar [75]
`,
{}
);
});
it('should render negative and decimal values with correct labels for vertical xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
---
xychart-beta
title "Decimal and Negative Values"
x-axis Categories [A, B, C]
y-axis -10 --> 10
bar [ -2.5, 0.75, 5.1 ]
`,
{}
);
});
it('should render negative and decimal values with correct labels for horizontal xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
chartOrientation: horizontal
---
xychart-beta
title "Decimal and Negative Values"
x-axis Categories [A, B, C]
y-axis -10 --> 10
bar [ -2.5, 0.75, 5.1 ]
`,
{}
);
});
it('should render data labels within each bar in the vertical xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
---
xychart-beta
title "Sales Revenue"
x-axis Months [jan,b,c]
y-axis "Revenue (in $)" 4000 --> 12000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000, 3000, 2000, 500, 2000, 3000, 11000, 5000, 6000]
`,
{}
);
cy.get('g.bar-plot-0').within(() => {
cy.get('rect').each(($rect, index) => {
// Extract bar properties
const barProps = {
x: parseFloat($rect.attr('x')),
y: parseFloat($rect.attr('y')),
width: parseFloat($rect.attr('width')),
height: parseFloat($rect.attr('height')),
};
// Get the text element corresponding to this bar by index.
cy.get('text')
.eq(index)
.then(($text) => {
const bbox = $text[0].getBBox();
const textProps = {
x: bbox.x,
y: bbox.y,
width: bbox.width,
height: bbox.height,
};
// Verify that the text label is positioned within the boundaries of the bar.
expect(textProps.x).to.be.greaterThan(barProps.x);
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
// Check horizontal alignment (within tolerance)
expect(textProps.x + textProps.width / 2).to.be.closeTo(
barProps.x + barProps.width / 2,
5
);
expect(textProps.y).to.be.greaterThan(barProps.y);
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
});
});
});
});
it('should render data labels within each bar in the horizontal xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
chartOrientation: horizontal
---
xychart-beta
title "Sales Revenue"
x-axis Months [jan,b,c]
y-axis "Revenue (in $)" 4000 --> 12000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000, 3000, 2000, 500, 2000, 3000, 11000, 5000, 6000]
`,
{}
);
cy.get('g.bar-plot-0').within(() => {
cy.get('rect').each(($rect, index) => {
// Extract bar properties
const barProps = {
x: parseFloat($rect.attr('x')),
y: parseFloat($rect.attr('y')),
width: parseFloat($rect.attr('width')),
height: parseFloat($rect.attr('height')),
};
// Get the text element corresponding to this bar by index.
cy.get('text')
.eq(index)
.then(($text) => {
const bbox = $text[0].getBBox();
const textProps = {
x: bbox.x,
y: bbox.y,
width: bbox.width,
height: bbox.height,
};
// Verify that the text label is positioned within the boundaries of the bar.
expect(textProps.x).to.be.greaterThan(barProps.x);
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
expect(textProps.y).to.be.greaterThan(barProps.y);
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
expect(textProps.y + textProps.height / 2).to.be.closeTo(
barProps.y + barProps.height / 2,
5
);
});
});
});
});
it('should render data labels within each bar in the vertical xy-chart with a lot of bars of different sizes', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
---
xychart-beta
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]
y-axis "Revenue (in $)" 4000 --> 12000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000, 8000, 10000, 5000, 7600, 4999,11000 ,5000,6000]
`,
{}
);
cy.get('g.bar-plot-0').within(() => {
cy.get('rect').each(($rect, index) => {
// Extract bar properties
const barProps = {
x: parseFloat($rect.attr('x')),
y: parseFloat($rect.attr('y')),
width: parseFloat($rect.attr('width')),
height: parseFloat($rect.attr('height')),
};
// Get the text element corresponding to this bar by index.
cy.get('text')
.eq(index)
.then(($text) => {
const bbox = $text[0].getBBox();
const textProps = {
x: bbox.x,
y: bbox.y,
width: bbox.width,
height: bbox.height,
};
// Verify that the text label is positioned within the boundaries of the bar.
expect(textProps.x).to.be.greaterThan(barProps.x);
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
// Check horizontal alignment (within tolerance)
expect(textProps.x + textProps.width / 2).to.be.closeTo(
barProps.x + barProps.width / 2,
5
);
expect(textProps.y).to.be.greaterThan(barProps.y);
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
});
});
});
});
it('should render data labels within each bar in the horizontal xy-chart with a lot of bars of different sizes', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
chartOrientation: horizontal
---
xychart-beta
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]
y-axis "Revenue (in $)" 4000 --> 12000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000, 8000, 10000, 5000, 7600, 4999,11000 ,5000,6000]
`,
{}
);
cy.get('g.bar-plot-0').within(() => {
cy.get('rect').each(($rect, index) => {
// Extract bar properties
const barProps = {
x: parseFloat($rect.attr('x')),
y: parseFloat($rect.attr('y')),
width: parseFloat($rect.attr('width')),
height: parseFloat($rect.attr('height')),
};
// Get the text element corresponding to this bar by index.
cy.get('text')
.eq(index)
.then(($text) => {
const bbox = $text[0].getBBox();
const textProps = {
x: bbox.x,
y: bbox.y,
width: bbox.width,
height: bbox.height,
};
// Verify that the text label is positioned within the boundaries of the bar.
expect(textProps.x).to.be.greaterThan(barProps.x);
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
expect(textProps.y).to.be.greaterThan(barProps.y);
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
expect(textProps.y + textProps.height / 2).to.be.closeTo(
barProps.y + barProps.height / 2,
5
);
});
});
});
});
it('should render data labels correctly for a bar in the vertical xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
---
xychart-beta
title "Sales Revenue"
x-axis Months [jan]
y-axis "Revenue (in $)" 3000 --> 12000
bar [4000]
`,
{}
);
cy.get('g.bar-plot-0').within(() => {
cy.get('rect').each(($rect, index) => {
// Extract bar properties
const barProps = {
x: parseFloat($rect.attr('x')),
y: parseFloat($rect.attr('y')),
width: parseFloat($rect.attr('width')),
height: parseFloat($rect.attr('height')),
};
// Get the text element corresponding to this bar by index.
cy.get('text')
.eq(index)
.then(($text) => {
const bbox = $text[0].getBBox();
const textProps = {
x: bbox.x,
y: bbox.y,
width: bbox.width,
height: bbox.height,
};
// Verify that the text label is positioned within the boundaries of the bar.
expect(textProps.x).to.be.greaterThan(barProps.x);
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
// Check horizontal alignment (within tolerance)
expect(textProps.x + textProps.width / 2).to.be.closeTo(
barProps.x + barProps.width / 2,
5
);
expect(textProps.y).to.be.greaterThan(barProps.y);
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
});
});
});
});
it('should render data labels correctly for a bar in the horizontal xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
chartOrientation: horizontal
---
xychart-beta
title "Sales Revenue"
x-axis Months [jan]
y-axis "Revenue (in $)" 3000 --> 12000
bar [4000]
`,
{}
);
cy.get('g.bar-plot-0').within(() => {
cy.get('rect').each(($rect, index) => {
// Extract bar properties
const barProps = {
x: parseFloat($rect.attr('x')),
y: parseFloat($rect.attr('y')),
width: parseFloat($rect.attr('width')),
height: parseFloat($rect.attr('height')),
};
// Get the text element corresponding to this bar by index.
cy.get('text')
.eq(index)
.then(($text) => {
const bbox = $text[0].getBBox();
const textProps = {
x: bbox.x,
y: bbox.y,
width: bbox.width,
height: bbox.height,
};
// Verify that the text label is positioned within the boundaries of the bar.
expect(textProps.x).to.be.greaterThan(barProps.x);
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
expect(textProps.y).to.be.greaterThan(barProps.y);
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
expect(textProps.y + textProps.height / 2).to.be.closeTo(
barProps.y + barProps.height / 2,
5
);
});
});
});
});
});

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
@@ -30,8 +30,8 @@
.mermaid svg {
/* font-size: 18px !important; */
background-color: #eee;
background-image: radial-gradient(#fff 1%, transparent 11%),
radial-gradient(#fff 1%, transparent 11%);
background-image:
radial-gradient(#fff 1%, transparent 11%), radial-gradient(#fff 1%, transparent 11%);
background-size: 20px 20px;
background-position:
0 0,

View File

@@ -3,7 +3,7 @@
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
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
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
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
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -3,7 +3,7 @@
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -3,7 +3,7 @@
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -3,7 +3,7 @@
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
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
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
@@ -30,8 +30,8 @@
.mermaid svg {
/* font-size: 18px !important; */
background-color: #efefef;
background-image: radial-gradient(#fff 51%, transparent 91%),
radial-gradient(#fff 51%, transparent 91%);
background-image:
radial-gradient(#fff 51%, transparent 91%), radial-gradient(#fff 51%, transparent 91%);
background-size: 20px 20px;
background-position:
0 0,

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"

View File

@@ -4,14 +4,14 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
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
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
rel="stylesheet"
/>
<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.7.2/css/all.min.css"
rel="stylesheet"
/>
<link
@@ -78,35 +78,78 @@
font-family: monospace;
font-size: 72px;
}
pre {
width: 100%;
}
/* tspan {
font-size: 6px !important;
} */
/* .flowchart-link {
stroke-dasharray: 4, 4 !important;
animation: flow 1s linear infinite;
animation: dashdraw 4.93282s linear infinite;
stroke-width: 2px !important;
} */
@keyframes dashdraw {
from {
stroke-dashoffset: 0;
}
}
/*stroke-width:2;stroke-dasharray:10.000000,9.865639;stroke-dashoffset:-198.656393;animation: 4.932820s linear infinite;*/
/* stroke-width:2;stroke-dasharray:10.000000,9.865639;stroke-dashoffset:-198.656393;animation: dashdraw 4.932820s linear infinite;*/
</style>
</head>
<body>
<pre id="diagram4" class="mermaid">
---
config:
layout: elk
---
flowchart LR
subgraph S2
subgraph s1["APA"]
D{"Use the editor"}
end
D -- Mermaid js --> I{"fa:fa-code Text"}
D --> I
D --> I
end
AB["apa@apa@"] --> B(("`apa@apa`"))
</pre>
<pre id="diagram4" class="mermaid">
flowchart
D(("for D"))
</pre>
<pre id="diagram4" class="mermaid">
flowchart LR
A e1@==> B
e1@{ animate: true}
</pre>
<pre id="diagram4" class="mermaid">
flowchart LR
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
class e1 animate
</pre>
<h2>infinite</h2>
<pre id="diagram4" class="mermaid2">
flowchart LR
A e1@--> B
classDef animate stroke-dasharray: 9\,5,stroke-dashoffset: 900,animation: dash 25s linear infinite;
class e1 animate
</pre>
<h2>Mermaid - edge-animation-slow</h2>
<pre id="diagram4" class="mermaid2">
flowchart LR
A e1@--> B
e1@{ animation: fast}
</pre>
<h2>Mermaid - edge-animation-fast</h2>
<pre id="diagram4" class="mermaid2">
flowchart LR
A e1@--> B
classDef animate stroke-dasharray: 1000,stroke-dashoffset: 1000,animation: dash 10s linear;
class e1 edge-animation-fast
</pre>
<pre id="diagram4" class="mermaid2">
info </pre
>
<pre id="diagram4" class="mermaid2">
---
config:
layout: elk
@@ -131,7 +174,7 @@ config:
end
end
</pre>
<pre id="diagram4" class="mermaid">
<pre id="diagram4" class="mermaid2">
---
config:
layout: elk
@@ -183,23 +226,23 @@ flowchart LR
n8@{ shape: rect}
</pre>
<pre id="diagram4" class="mermaid">
<pre id="diagram4" class="mermaid2">
---
title: https://github.com/mermaid-js/mermaid/issues/5824
config:
layout: elk
---
%% 6048, 5824
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"]
flowchart LR
subgraph s1["Untitled subgraph"]
n1["Evaluate"]
n2["Option 1"]
end
n1 -- One --> n2
</pre>
<pre id="diagram4" class="mermaid">
<pre id="diagram4" class="mermaid2">
---
config:
layout: elk
@@ -208,7 +251,7 @@ flowchart LR
A{A} --> B & C
</pre
>
<pre id="diagram4" class="mermaid">
<pre id="diagram4" class="mermaid2">
---
config:
layout: elk
@@ -220,7 +263,7 @@ flowchart LR
end
</pre
>
<pre id="diagram4" class="mermaid">
<pre id="diagram4" class="mermaid2">
---
config:
layout: elk
@@ -391,7 +434,10 @@ kanban
window.callback = function () {
alert('A callback was triggered');
};
mermaid.initialize({
function callback() {
alert('It worked');
}
await mermaid.initialize({
// theme: 'base',
// theme: 'default',
// theme: 'forest',
@@ -403,9 +449,11 @@ kanban
// layout: 'fixed',
// htmlLabels: false,
flowchart: { titleTopMargin: 10 },
// fontFamily: 'Caveat',
// fontFamily: 'Kalam',
// fontFamily: 'courier',
fontFamily: 'arial',
sequence: {
actorFontFamily: 'courier',
noteFontFamily: 'courier',
@@ -417,10 +465,9 @@ kanban
fontSize: 12,
logLevel: 0,
securityLevel: 'loose',
callback,
});
function callback() {
alert('It worked');
}
mermaid.parseError = function (err, hash) {
console.error('In parse error:');
console.error(err);

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
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
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
@@ -62,56 +62,23 @@
<body style="display: flex; gap: 2rem; flex-direction: row">
<pre id="diagram4" class="mermaid">
flowchart LR
A@{ icon: "fa:window-minimize", form: circle }
E@{ icon: "fa:window-minimize", form: circle }
B@{ icon: "fa:bell", form: circle }
B2@{ icon: "fa:bell", form: circle }
C@{ icon: "fa:address-book", form: square }
D@{ icon: "fa:star-half", form: square }
A --> E
B --> B2
flowchart
A --> A
subgraph B
B1 --> B1
end
subgraph C
subgraph C1
C2 --> C2
subgraph D
D1 --> D1
end
D --> D
end
C1 --> C1
end
</pre>
<pre id="diagram4" class="mermaid2">
flowchart TB
A --test2--> B2@{ icon: "fa:bell", form: "rounded", label: "B2 aiduaid uyawduad uaduabd uyduadb", pos: "b" }
B2 --test--> C
D --> B2 --> E
style B2 fill:#f9f,stroke:#333,stroke-width:4px
</pre
>
<pre id="diagram43" class="mermaid2">
flowchart BT
A --test2--> B2@{ icon: "fa:bell", form: "square", label: "B2", pos: "t", h: 40, w: 30 }
B2 --test--> C
D --> B2 --> E
</pre
>
<pre id="diagram4" class="mermaid2">
flowchart BT
A --test2--> B2@{ icon: "fa:bell", label: "B2 awiugdawu uydgayuiwd wuydguy", pos: "b", h: 40, w: 30 }
B2 --test--> C
</pre
>
<pre id="diagram43" class="mermaid2">
flowchart BT
A --test2--> B2@{ icon: "fa:bell", label: "B2 dawuygd ayuwgd uy", pos: "t", h: 40, w: 30 }
B2 --test--> C
</pre
>
<pre id="diagram6" class="mermaid2">
flowchart TB
A --> B2@{ icon: "fa:bell", form: "circle", label: "test augfuyfavf ydvaubfuac", pos: "t", w: 200, h: 100 } --> C
</pre
>
<pre id="diagram6" class="mermaid2">
flowchart TB
A --> B2@{ icon: "fa:bell", form: "circle", label: "test augfuyfavf ydvaubfuac", pos: "b", w: 200, h: 100 } --> C
D --> B2 --> E
</pre
>
<script type="module">
import mermaid from './mermaid.esm.mjs';
import layouts from './mermaid-layout-elk.esm.mjs';

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -3,7 +3,7 @@
<head>
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css" />
<link href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet" />
<link rel="preconnect" href="https://fonts.googleapis.com" />

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
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
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

View File

@@ -4,7 +4,7 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"

337
cypress/platform/yari2.html Normal file
View File

@@ -0,0 +1,337 @@
<html>
<body>
<h1 class="header">Nodes</h1>
<div class="node-showcase">
<div class="test">
<h2>Basic ErNode</h2>
<pre class="mermaid">
---
config:
htmlLabels: false
look: handDrawn
theme: forest
---
erDiagram
_**hiØ**_[*test*] {
*__List~List~int~~sdfds__* __driversLicense__ PK "***The l😀icense #***"
*string(99)~T~~~~~~* firstName "Only 99 <br>characters are a<br>llowed dsfsdfsdfsdfs"
~str ing~ lastName
string phone UK
int age
}
style PERSON color:red, stroke:blue,fill:#f9f
classDef test,test2 stroke:red
class PERSON test,test2
</pre>
</div>
<div class="test">
<h2>Basic ErNode</h2>
<pre class="mermaid">
erDiagram
CAR {
string registrationNumber
string make
string model
}
PERSON {
string firstName
string lastName
int age
}
CAR:::someclass
PERSON:::anotherclass,someclass
classDef someclass fill:#f96
classDef anotherclass color:blue
</pre>
</div>
</div>
<h1 class="header">Diagram Testing</h1>
<div class="diagram-showcase">
<div class="test">
<h2>Basic Relationship</h2>
<pre class="mermaid">
---
config:
htmlLabels: false
layout: elk
look: handDrawn
theme: forest
---
erDiagram
"hi" }o..o{ ORDER : places
style hi fill:lightblue
</pre>
</div>
<div class="test">
<h2>Basic Relationship</h2>
<pre class="mermaid">
---
config:
htmlLabels: false
look: handDrawn
layout: elk
---
erDiagram
CAR ||--|{ NAMED-DRIVER : allows
PERSON ||..o{ NAMED-DRIVER : is
</pre>
</div>
<div class="test">
<h2>Basic Relationship</h2>
<pre class="mermaid">
---
config:
htmlLabels: true
look: handDrawn
theme: forest
---
erDiagram
CAR ||--o{ NAMED-DRIVER : allows
CAR {
test test PK "comment"
string make
string model
string[] parts
}
PERSON ||--o{ NAMED-DRIVER : is
PERSON ||--o{ CAR : is
PERSON {
string driversLicense PK "The license #"
string(99) firstName "Only 99 characters are allowed"
string lastName
string phone UK
int age
}
NAMED-DRIVER {
string carRegistrationNumber PK, FK
string driverLicence PK, FK
}
MANUFACTURER only one to zero or more CAR : makes
</pre>
</div>
<div class="test">
<h2>Basic Relationship</h2>
<pre class="mermaid">
---
title: simple ER diagram
config:
theme: forest
---
erDiagram
direction TB
p[Pers😀on] {
string firstName
string lastName
}
a["Customer Account"] {
string email
}
p ||--o| a : has
</pre>
</div>
<div class="test">
<h2>Basic Relationship</h2>
<pre class="mermaid">
---
config:
layout: elk
---
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
</pre>
</div>
<div class="test">
<h2>Basic Relationship</h2>
<pre class="mermaid">
---
config:
layout: elk
---
erDiagram
rental{
~timestamp with time zone~ rental_date "NN"
~integer~ inventory_id "NN"
~integer~ customer_id "NN"
~timestamp with time zone~ return_date
~integer~ staff_id "NN"
~integer~ rental_id "NN"
~timestamp with time zone~ last_update "NN"
}
film_actor{
~integer~ actor_id "NN"
~integer~ film_id "NN"
~timestamp with time zone~ last_update "NN"
}
film{
~text~ title "NN"
~text~ description
~public.year~ release_year
~integer~ language_id "NN"
~integer~ original_language_id
~smallint~ length
~text[]~ special_features
~tsvector~ fulltext "NN"
~integer~ film_id "NN"
~smallint~ rental_duration "NN"
~numeric(4,2)~ rental_rate "NN"
~numeric(5,2)~ replacement_cost "NN"
~public.mpaa_rating~ rating
~timestamp with time zone~ last_update "NN"
}
customer{
~integer~ store_id "NN"
~text~ first_name "NN"
~text~ last_name "NN"
~text~ email
~integer~ address_id "NN"
~integer~ active
~integer~ customer_id "NN"
~boolean~ activebool "NN"
~date~ create_date "NN"
~timestamp with time zone~ last_update
}
film_category{
~integer~ film_id "NN"
~integer~ category_id "NN"
~timestamp with time zone~ last_update "NN"
}
actor{
~text~ first_name "NN"
~text~ last_name "NN"
~integer~ actor_id "NN"
~timestamp with time zone~ last_update "NN"
}
store{
~integer~ manager_staff_id "NN"
~integer~ address_id "NN"
~integer~ store_id "NN"
~timestamp with time zone~ last_update "NN"
}
city{
~text~ city "NN"
~integer~ country_id "NN"
~integer~ city_id "NN"
~timestamp with time zone~ last_update "NN"
}
language{
~character(20)~ name "NN"
~integer~ language_id "NN"
~timestamp with time zone~ last_update "NN"
}
payment{
~integer~ customer_id "NN"
~integer~ staff_id "NN"
~integer~ rental_id "NN"
~numeric(5,2)~ amount "NN"
~timestamp with time zone~ payment_date "NN"
~integer~ payment_id "NN"
}
category{
~text~ name "NN"
~integer~ category_id "NN"
~timestamp with time zone~ last_update "NN"
}
inventory{
~integer~ film_id "NN"
~integer~ store_id "NN"
~integer~ inventory_id "NN"
~timestamp with time zone~ last_update "NN"
}
address{
~text~ address "NN"
~text~ address2
~text~ district "NN"
~integer~ city_id "NN"
~text~ postal_code
~text~ phone "NN"
~integer~ address_id "NN"
~timestamp with time zone~ last_update "NN"
}
staff{
~text~ first_name "NN"
~text~ last_name "NN"
~integer~ address_id "NN"
~text~ email
~integer~ store_id "NN"
~text~ username "NN"
~text~ password
~bytea~ picture
~integer~ staff_id "NN"
~boolean~ active "NN"
~timestamp with time zone~ last_update "NN"
}
country{
~text~ country "NN"
~integer~ country_id "NN"
~timestamp with time zone~ last_update "NN"
}
film_actor }|..|| film : film_actor_film_id_fkey
film_actor }|..|| actor : film_actor_actor_id_fkey
address }|..|| city : address_city_id_fkey
city }|..|| country : city_country_id_fkey
customer }|..|| store : customer_store_id_fkey
customer }|..|| address : customer_address_id_fkey
film }|..|| language : film_original_language_id_fkey
film }|..|| language : film_language_id_fkey
film_category }|..|| film : film_category_film_id_fkey
film_category }|..|| category : film_category_category_id_fkey
inventory }|..|| store : inventory_store_id_fkey
</pre>
</div>
</div>
<script type="module">
import mermaid from './mermaid.esm.mjs';
import layouts from './mermaid-layout-elk.esm.mjs';
mermaid.registerLayoutLoaders(layouts);
mermaid.parseError = function (err, hash) {
console.error('Mermaid error: ', err);
};
mermaid.initialize();
mermaid.parseError = function (err, hash) {
console.error('In parse error:');
console.error(err);
};
</script>
</body>
<style>
.header {
text-decoration: underline;
text-align: center;
}
.node-showcase {
display: grid;
grid-template-columns: 1fr 1fr;
}
.test {
flex-grow: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.4rem;
}
.test > h2 {
margin: 0;
text-align: center;
}
.test > p {
margin-top: -6px;
color: gray;
}
.diagram-showcase {
display: grid;
grid-template-columns: 1fr;
}
</style>
</html>

View File

@@ -2,151 +2,211 @@
"durations": [
{
"spec": "cypress/integration/other/configuration.spec.js",
"duration": 4989
"duration": 5475
},
{
"spec": "cypress/integration/other/external-diagrams.spec.js",
"duration": 1382
"duration": 2037
},
{
"spec": "cypress/integration/other/ghsa.spec.js",
"duration": 3178
"duration": 3207
},
{
"spec": "cypress/integration/other/iife.spec.js",
"duration": 1372
"duration": 1915
},
{
"spec": "cypress/integration/other/interaction.spec.js",
"duration": 8998
"duration": 10952
},
{
"spec": "cypress/integration/other/rerender.spec.js",
"duration": 1249
"duration": 1872
},
{
"spec": "cypress/integration/other/xss.spec.js",
"duration": 25664
"duration": 26686
},
{
"spec": "cypress/integration/rendering/appli.spec.js",
"duration": 1928
"duration": 2629
},
{
"spec": "cypress/integration/rendering/architecture.spec.ts",
"duration": 2330
"duration": 104
},
{
"spec": "cypress/integration/rendering/block.spec.js",
"duration": 11156
"duration": 14765
},
{
"spec": "cypress/integration/rendering/c4.spec.js",
"duration": 3418
"duration": 4913
},
{
"spec": "cypress/integration/rendering/classDiagram-elk-v3.spec.js",
"duration": 36667
},
{
"spec": "cypress/integration/rendering/classDiagram-handDrawn-v3.spec.js",
"duration": 33813
},
{
"spec": "cypress/integration/rendering/classDiagram-v2.spec.js",
"duration": 14866
"duration": 20441
},
{
"spec": "cypress/integration/rendering/classDiagram-v3.spec.js",
"duration": 32504
},
{
"spec": "cypress/integration/rendering/classDiagram.spec.js",
"duration": 9894
"duration": 13772
},
{
"spec": "cypress/integration/rendering/conf-and-directives.spec.js",
"duration": 5778
"duration": 7978
},
{
"spec": "cypress/integration/rendering/current.spec.js",
"duration": 1690
"duration": 2101
},
{
"spec": "cypress/integration/rendering/erDiagram-unified.spec.js",
"duration": 76556
},
{
"spec": "cypress/integration/rendering/erDiagram.spec.js",
"duration": 9144
"duration": 12756
},
{
"spec": "cypress/integration/rendering/errorDiagram.spec.js",
"duration": 1951
"duration": 2766
},
{
"spec": "cypress/integration/rendering/flowchart-elk.spec.js",
"duration": 2196
"duration": 35641
},
{
"spec": "cypress/integration/rendering/flowchart-handDrawn.spec.js",
"duration": 21029
"duration": 26915
},
{
"spec": "cypress/integration/rendering/flowchart-shape-alias.spec.ts",
"duration": 16087
"duration": 21171
},
{
"spec": "cypress/integration/rendering/flowchart-v2.spec.js",
"duration": 27465
"duration": 37844
},
{
"spec": "cypress/integration/rendering/flowchart.spec.js",
"duration": 20035
"duration": 26254
},
{
"spec": "cypress/integration/rendering/gantt.spec.js",
"duration": 11366
"duration": 15149
},
{
"spec": "cypress/integration/rendering/gitGraph.spec.js",
"duration": 34025
"duration": 45049
},
{
"spec": "cypress/integration/rendering/iconShape.spec.ts",
"duration": 185902
"duration": 250225
},
{
"spec": "cypress/integration/rendering/imageShape.spec.ts",
"duration": 41631
"duration": 51531
},
{
"spec": "cypress/integration/rendering/info.spec.ts",
"duration": 1736
"duration": 2455
},
{
"spec": "cypress/integration/rendering/journey.spec.js",
"duration": 2247
"duration": 3181
},
{
"spec": "cypress/integration/rendering/kanban.spec.ts",
"duration": 6298
},
{
"spec": "cypress/integration/rendering/katex.spec.js",
"duration": 2144
"duration": 3065
},
{
"spec": "cypress/integration/rendering/marker_unique_id.spec.js",
"duration": 1646
"duration": 2521
},
{
"spec": "cypress/integration/rendering/mindmap.spec.ts",
"duration": 6406
"duration": 9341
},
{
"spec": "cypress/integration/rendering/newShapes.spec.ts",
"duration": 107219
"duration": 132809
},
{
"spec": "cypress/integration/rendering/oldShapes.spec.ts",
"duration": 101299
},
{
"spec": "cypress/integration/rendering/packet.spec.ts",
"duration": 3481
},
{
"spec": "cypress/integration/rendering/pie.spec.ts",
"duration": 4878
},
{
"spec": "cypress/integration/rendering/quadrantChart.spec.js",
"duration": 7416
},
{
"spec": "cypress/integration/rendering/radar.spec.js",
"duration": 4554
},
{
"spec": "cypress/integration/rendering/requirement.spec.js",
"duration": 2068
},
{
"spec": "cypress/integration/rendering/requirementDiagram-unified.spec.js",
"duration": 47583
},
{
"spec": "cypress/integration/rendering/sankey.spec.ts",
"duration": 5792
},
{
"spec": "cypress/integration/rendering/sequencediagram.spec.js",
"duration": 33035
},
{
"spec": "cypress/integration/rendering/stateDiagram-v2.spec.js",
"duration": 22716
},
{
"spec": "cypress/integration/rendering/stateDiagram.spec.js",
"duration": 15834
"duration": 13868
},
{
"spec": "cypress/integration/rendering/theme.spec.js",
"duration": 33240
"duration": 26376
},
{
"spec": "cypress/integration/rendering/timeline.spec.ts",
"duration": 7122
"duration": 5872
},
{
"spec": "cypress/integration/rendering/xyChart.spec.js",
"duration": 11127
"duration": 9469
},
{
"spec": "cypress/integration/rendering/zenuml.spec.js",
"duration": 2391
"duration": 2742
}
]
}

View File

@@ -91,6 +91,9 @@
<li>
<h2><a href="./architecture.html">Architecture</a></h2>
</li>
<li>
<h2><a href="./radar.html">Radar</a></h2>
</li>
</ul>
</body>
</html>

157
demos/radar.html Normal file
View File

@@ -0,0 +1,157 @@
<!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>Radar diagram demo</h1>
<div class="diagrams">
<pre class="mermaid">
radar-beta
title My favorite ninjas
axis Agility, Speed, Strength
axis Stam["Stamina"] , Intel["Intelligence"]
curve Ninja1["Naruto"]{
Agility 2, Speed 2,
Strength 3, Stam 5,
Intel 0
}
curve Ninja2["Sasuke"]{2, 3, 4, 1, 5}
curve Ninja3["Ninja"] {3, 2, 1, 5, 4}
showLegend true
ticks 3
max 8
min 0
graticule circle
</pre
>
<pre class="mermaid">
---
config:
radar:
axisScaleFactor: 0.25
axisLabelFactor: 0.95
---
radar-beta
title DevOps Radar
axis f["Feature Velocity"], s["Stability"]
axis r["Resilience"], e["Efficiency"]
axis c["Cost"], d["DevSecOps"]
curve app1["App1"]{
f 5, s 4.5, r 3.8, d 4.2, e 4.5, c 3.5
}
curve app2["App2"]{4, 3, 4, 3, 3, 4}, app3["App3"]{3, 2, 4, 3, 2, 3}
curve app4["App4"]{2, 1, 3.2, 2.5, 1, 2}
showLegend true
ticks 3
max 5
graticule polygon
</pre
>
<pre class="mermaid">
%%{init: {'theme': 'forest'} }%%
radar-beta
title Forest theme
axis Agility, Speed, Strength
axis Stam["Stamina"] , Intel["Intelligence"]
curve Ninja1["Naruto"]{
Agility 2, Speed 2,
Strength 3, Stam 5,
Intel 0
}
curve Ninja2["Sasuke"]{2, 3, 4, 1, 5}
curve Ninja3["Ninja"] {3, 2, 1, 5, 4}
</pre
>
<pre class="mermaid" style="background-color: black">
%%{init: {'theme': 'dark'} }%%
radar-beta
title Dark theme
axis Agility, Speed, Strength
axis Stam["Stamina"] , Intel["Intelligence"]
curve Ninja1["Naruto"]{
Agility 2, Speed 2,
Strength 3, Stam 5,
Intel 0
}
curve Ninja2["Sasuke"]{2, 3, 4, 1, 5}
curve Ninja3["Ninja"] {3, 2, 1, 5, 4}
</pre
>
<pre class="mermaid">
%%{init: {'theme': 'base', 'themeVariables': {'cScale0': '#ff0000', 'cScale1': '#00ff00', 'cScale2': '#0000ff'}} }%%
radar-beta
title Custom colors
axis Agility, Speed, Strength
axis Stam["Stamina"] , Intel["Intelligence"]
curve Ninja1["Naruto"]{
Agility 2, Speed 2,
Strength 3, Stam 5,
Intel 0
}
curve Ninja2["Sasuke"]{2, 3, 4, 1, 5}
curve Ninja3["Ninja"] {3, 2, 1, 5, 4}
</pre
>
<pre class="mermaid">
---
config:
radar:
axisScaleFactor: 0.25
curveTension: 0.1
theme: base
themeVariables:
cScale0: "#FF0000"
cScale1: "#00FF00"
cScale2: "#0000FF"
radar:
curveOpacity: 0
---
radar-beta
title Custom colors, axisScaleFactor, curveTension, opacity
axis A, B, C, D, E
curve c1{1,2,3,4,5}
curve c2{5,4,3,2,1}
curve c3{3,3,3,3,3}
</pre>
</div>
<script type="module">
import mermaid from '/mermaid.esm.mjs';
mermaid.initialize({
logLevel: 3,
securityLevel: 'loose',
});
</script>
<style>
.diagrams {
display: flex;
flex-wrap: wrap;
}
pre {
width: 45vw;
padding: 2em;
}
</style>
</body>
</html>

View File

@@ -17,7 +17,7 @@ services:
- 9000:9000
- 3333:3333
cypress:
image: cypress/included:13.7.3
image: cypress/included:14.0.3
stdin_open: true
tty: true
working_dir: /mermaid

View File

@@ -239,6 +239,22 @@ Code is the heart of every software project. We strive to make it better. Who if
The core of Mermaid is located under `packages/mermaid/src`.
### Building Mermaid Locally
**Host**
```bash
pnpm run build
```
**Docker**
```bash
./run build
```
This will build the Mermaid library and the documentation site.
### Running Mermaid Locally
**Host**

View File

@@ -43,7 +43,7 @@ Where to start:
- You could work on a new feature! [These](https://github.com/mermaid-js/mermaid/issues?q=is%3Aissue+is%3Aopen+label%3A%22Area%3A+Development%22+label%3A%22Type%3A+Enhancement%22+label%3A%22Status%3A+Approved%22+) are some ideas!
- You could confirm the bugs in [these issues](https://github.com/mermaid-js/mermaid/issues?q=is%3Aissue+is%3Aopen+label%3A%22Status%3A+Triage%22++label%3A%22Type%3A+Bug+%2F+Error%22).
[You can join our Discord server if you want closer contact!](https://discord.gg/AgrbSrBer3)
[You can join our Discord server if you want closer contact!](https://discord.gg/sKeNQX4Wtj)
## A Question Or a Suggestion?
@@ -55,6 +55,6 @@ If you have faced a vulnerability [report it to us](./security.md).
Don't get daunted if it is hard in the beginning. We have a great community with only encouraging words. So, if you get stuck, ask for help and hints in the Slack forum. If you want to show off something good, show it off there.
[You can join our Discord server if you want closer contact!](https://discord.gg/AgrbSrBer3)
[You can join our Discord server if you want closer contact!](https://discord.gg/sKeNQX4Wtj)
![Image of superhero wishing you good luck](https://media.giphy.com/media/l49JHz7kJvl6MCj3G/giphy.gif)

View File

@@ -6,12 +6,12 @@
# Frequently Asked Questions
1. [How to add title to flowchart?](https://github.com/knsv/mermaid/issues/556#issuecomment-363182217)
1. [How to add title to flowchart?](https://github.com/mermaid-js/mermaid/issues/556#issuecomment-363182217)
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/knsv/mermaid/issues/542#issuecomment-3343564621)
4. [How to specify gantt diagram xAxis format?](https://github.com/knsv/mermaid/issues/269#issuecomment-373229136)
5. [How to bind an event?](https://github.com/knsv/mermaid/issues/372)
6. [How to add newline in the text?](https://github.com/knsv/mermaid/issues/384#issuecomment-281339381)
7. [How to have special characters in link text?](https://github.com/knsv/mermaid/issues/407#issuecomment-329944735)
8. [How to change Flowchart curve style?](https://github.com/knsv/mermaid/issues/580#issuecomment-373929046)
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)
5. [How to bind an event?](https://github.com/mermaid-js/mermaid/issues/372)
6. [How to add newline in the text?](https://github.com/mermaid-js/mermaid/issues/384#issuecomment-281339381)
7. [How to have special characters in link text?](https://github.com/mermaid-js/mermaid/issues/407#issuecomment-329944735)
8. [How to change Flowchart curve style?](https://github.com/mermaid-js/mermaid/issues/580#issuecomment-373929046)
9. [How to create a Flowchart end-Node that says "End"](https://github.com/mermaid-js/mermaid/issues/1444#issuecomment-639528897)

View File

@@ -4,10 +4,14 @@
>
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/README.md](../../../packages/mermaid/src/docs/config/setup/README.md).
**mermaid**
---
# mermaid
## Modules
- [config](modules/config.md)
- [defaultConfig](modules/defaultConfig.md)
- [mermaid](modules/mermaid.md)
- [config](config/README.md)
- [defaultConfig](defaultConfig/README.md)
- [mermaid](mermaid/README.md)

Some files were not shown because too many files have changed in this diff Show More