Compare commits

...

321 Commits

Author SHA1 Message Date
Sidharth Vinod
1f07a781e4 Merge pull request #6660 from mermaid-js/changeset-release/master
Version Packages
2025-06-20 10:32:20 +05:30
github-actions[bot]
3132387ede Version Packages 2025-06-19 12:43:20 +00:00
Sidharth Vinod
f41b4c96f9 Update bitter-colts-remain.md 2025-06-19 18:11:16 +05:30
Sidharth Vinod
26bd456c01 chore: Revert manual version upgrade 2025-06-19 13:59:46 +05:30
Sidharth Vinod
8ef7040a8d chore: Update changeset 2025-06-19 13:55:00 +05:30
Sidharth Vinod
e7ec8ed527 fix: Copy changelog to tiny 2025-06-17 16:35:46 +05:30
Sidharth Vinod
7c1e655675 chore: Update changeset to minor bump 2025-06-17 16:34:31 +05:30
Sidharth Vinod
df2ccaa14b Merge pull request #6658 from mermaid-js/develop
Pre-Release
2025-06-17 16:13:14 +05:30
Sidharth Vinod
797ba43d6e chore: lychee ignore mermaid-preview 2025-06-17 16:05:45 +05:30
Sidharth Vinod
d628a971ef Merge branch 'master' into develop
* master: (46 commits)
  Add canonicals to pages migrated to docs.mermaidchart.com
  chore: minor update
  chore: dynamically change text size depending on route
  chore: update text size to lg
  chore: remove tooltip
  chore: update as per PR comment
  chore: Update banner ad
  chore: Use mermaid.live as fallback links in button
  chore: Tweak shadows
  chore : fix UI
  chore: Update URL
  chore: UI refactor
  chore: Update UI design
  chore: removed index and used flag
  chore: code refactor
  chore: Update as per PR suggestion.
  chore: add event listener for button.
  Feat: Add editor popup modal
  Skip foswiki link check
  feat: Pause animation when hovering
  ...
2025-06-17 15:53:29 +05:30
shubham-mermaid
8049b6aef8 Merge pull request #6616 from mermaid-js/fix/timeline-vertical-lines-6610
fix(timeline): ensure consistent vertical line lengths with visible arrowheads
2025-06-17 10:05:42 +00:00
shubham-mermaid
84802118be Merge branch 'develop' into fix/timeline-vertical-lines-6610 2025-06-17 15:18:44 +05:30
shubham-mermaid
e2ef425245 Merge branch 'develop' into fix/timeline-vertical-lines-6610 2025-06-17 14:48:24 +05:30
shubham-mermaid
da98732961 Sync with develop for pnpm-lock 2025-06-17 14:43:13 +05:30
shubham-mermaid
efa11a7325 Merge pull request #6648 from mermaid-js/6647-handle-node-order-elk
#6647 Make elk respect the order of nodes based from the code
2025-06-17 09:08:31 +00:00
Ashish Jain
e5f6ea0b13 Add canonicals to pages migrated to docs.mermaidchart.com 2025-06-17 10:16:46 +02:00
Sidharth Vinod
9562a769db Merge pull request #6624 from mermaid-js/rajat-ht/chore-update-banner-ad
chore: update banner ad
2025-06-16 11:09:18 +05:30
rajat-ht
5cfda33d04 chore: minor update 2025-06-13 22:57:21 +05:30
Knut Sveidqvist
e682172823 Reverting the elk.layered.wrapping.validify.strategy setting 2025-06-11 17:06:17 +02:00
Knut Sveidqvist
85c5b9b4c0 #6647 Make elk respect the order of nodes based from the code 2025-06-11 17:00:29 +02:00
rajat-ht
1e68ed9cc1 chore: dynamically change text size depending on route 2025-05-30 22:50:55 +05:30
rajat-ht
1337c60784 chore: update text size to lg 2025-05-29 22:34:40 +05:30
rajat-ht
a12d1f731a chore: remove tooltip 2025-05-29 17:16:19 +05:30
rajat-ht
b6ba9b79df chore: update as per PR comment 2025-05-29 17:06:25 +05:30
rajat-ht
ce227b5519 chore: Update banner ad 2025-05-29 16:22:20 +05:30
Sidharth Vinod
8a703bd09f Merge pull request #6600 from kimulaco/docs/6599_fix-preview-error
docs: fix preview errors in the flowchart documentation
2025-05-28 22:22:22 +05:30
Sidharth Vinod
c4de3cdc57 Merge pull request #6609 from mermaid-js/rajat-ht/feat-add-editor-popup-modal
Feat: Add editor popup modal
2025-05-28 21:54:21 +05:30
Sidharth Vinod
ef449a601b chore: Use mermaid.live as fallback links in button 2025-05-28 21:53:24 +05:30
Sidharth Vinod
8e84a1a8af chore: Tweak shadows 2025-05-28 21:47:21 +05:30
rajat-ht
a3552e7936 chore : fix UI 2025-05-28 21:27:55 +05:30
rajat-ht
646cdf0d32 chore: Update URL 2025-05-28 02:32:32 +05:30
rajat-ht
99048bfa01 chore: UI refactor 2025-05-27 18:34:32 +05:30
Ashish Jain
ca80f719ea fix(timeline): ensure consistent vertical line lengths with visible arrowheads
- Fixed inconsistent vertical line lengths in timeline diagrams
- All vertical lines now extend to same depth regardless of event count
- Added sufficient padding for clear visibility of dashed lines and arrowheads
- Added comprehensive test case and demo example

Fixes #6610
2025-05-26 12:16:58 +02:00
rajat-ht
0cabc6e8ed chore: Update UI design 2025-05-23 22:14:18 +05:30
rajat-ht
5fe0f53179 chore: removed index and used flag 2025-05-23 16:53:06 +05:30
rajat-ht
e2e3cd2bbd chore: code refactor 2025-05-23 16:30:59 +05:30
rajat-ht
ffb9016d65 Merge branch 'master' of https://github.com/mermaid-js/mermaid into rajat-ht/feat-add-editor-popup-modal 2025-05-23 15:55:04 +05:30
rajat-ht
3c03f289b4 chore: Update as per PR suggestion. 2025-05-23 15:49:12 +05:30
Sidharth Vinod
c6035936b6 Merge pull request #6594 from mermaid-js/rajat-ht/chore-update-tooltip
Chore: Update tooltip
2025-05-22 12:35:56 +05:30
Sidharth Vinod
818699f347 Merge pull request #6595 from yoshinorin/patch-1
docs: fix Markdown links on the `Questions or Suggestions` page
2025-05-22 12:34:14 +05:30
rajat-ht
f23a26e528 chore: add event listener for button. 2025-05-21 17:11:29 +05:30
rajat-ht
48e6e60753 Feat: Add editor popup modal 2025-05-20 20:00:30 +05:30
Sidharth Vinod
2372cd7b21 Skip foswiki link check 2025-05-20 15:31:12 +05:30
Sidharth Vinod
51f0cb2892 feat: Pause animation when hovering 2025-05-20 15:17:56 +05:30
Sidharth Vinod
14e3d77c75 fix: Specifically hide tooltip, instead of using a very specific selector to show 2025-05-20 15:13:38 +05:30
Sidharth Vinod
875fef691b fix: Use CSS instead of JS to hide/show tooltip 2025-05-20 15:01:39 +05:30
Alois Klink
7075f833d0 Merge pull request #6566 from arpitjain099/develop
fix: escape backslashes before parentheses in URL replacement logic
2025-05-20 06:41:51 +00:00
Sidharth Vinod
d629c5eae5 Merge pull request #6581 from ZenUml/feat/update-zenuml-core-to-3_31_1-rebased
Upgrade @zenuml/core to v3.31.1.
2025-05-19 20:16:38 +05:30
Ashish Jain
80904da253 Merge pull request #6423 from BambioGaming/feature/6314_state-click
Feature: Added support for clickable states using the click directive
2025-05-19 05:56:17 +00:00
kimulaco
e6be1e9202 docs(flowchart): disable image shape preview 2025-05-18 08:45:56 +09:00
kimulaco
6f5d889f19 docs(flowchart): fix the example code of Markdown Strings 2025-05-18 08:36:43 +09:00
Peng Xiao
ec0786a6fa Merge branch 'develop' into feat/update-zenuml-core-to-3_31_1-rebased 2025-05-14 22:00:31 +10:00
autofix-ci[bot]
2ea6695b4b [autofix.ci] apply automated fixes 2025-05-13 16:16:39 +00:00
yoshinorin
6485d1fbca docs: fix Markdown links on the Questions or Suggestions page 2025-05-14 01:04:29 +09:00
Arpit Jain
d0f1dafd49 Merge branch 'develop' into develop 2025-05-13 22:43:34 +09:00
Ashish Jain
015afc53d5 Merge pull request #6588 from mermaid-js/omkar/fix-er-diagram-styling
Fix: Apply proper styling for Mermaid ER diagrams
2025-05-13 11:48:18 +00:00
rajat-ht
1f44143936 Chore update tooltip 2025-05-13 15:28:24 +05:30
Arpit Jain
942ae8dcbc Update text associated with change 2025-05-12 11:14:36 +00:00
Arpit Jain
cadcddd40c update change version to patch 2025-05-12 11:13:04 +00:00
Arpit Jain
bca6ed67c3 Add pnpm message for change 2025-05-12 10:39:42 +00:00
Alois Klink
f20c677982 test(e2e): fix arrowMarkerAbsolute: true test
The `/` and `:` characters in `url()` are now escaped using
`CSS.escape`.

See: e79147dcfc
2025-05-12 12:00:09 +02:00
Alois Klink
e46fd145b2 test(e2e): skip arrowMarkerAbsolute: 'false'
This feature looks like it's been broken for a long time, but something
about the Cypress environment was rewriting the URL to be relative,
causing this test to incorrectly pass.
2025-05-12 11:56:26 +02:00
omkarht
b1cf291273 added changeset 2025-05-12 15:23:35 +05:30
omkarht
cac1779c22 Fix: apply proper styling for Mermaid ER diagrams 2025-05-12 15:14:20 +05:30
autofix-ci[bot]
96bd7de40d [autofix.ci] apply automated fixes 2025-05-10 05:33:28 +00:00
Arpit Jain
82874c6584 Add missing export command 2025-05-10 05:28:44 +00:00
Arpit Jain
e79147dcfc update occurrences with getUrl and use CSS.escape function instead 2025-05-10 05:12:48 +00:00
Arpit Jain
28131bab98 Merge branch 'mermaid-js:develop' into develop 2025-05-10 13:53:52 +09:00
BambioGaming
9d6b9369e6 Merge branch 'develop' into feature/6314_state-click 2025-05-09 13:51:51 +01:00
khalil
80351d9f59 Merge branch 'feature/6314_state-click' of https://github.com/BambioGaming/mermaid into feature/6314_state-click 2025-05-09 13:49:44 +01:00
khalil
7b307f812f fixed merge conflicts 2025-05-09 13:47:45 +01:00
khalil
071df09395 Merge branch 'develop' of https://github.com/mermaid-js/mermaid into feature/6314_state-click 2025-05-09 13:26:26 +01:00
Sidharth Vinod
0d047ccbcc Update mermaid-tiny README.md 2025-05-09 05:04:43 -07:00
MrCoder
d463f00160 Update pnpm-lock.yaml to match patchedDependencies configuration 2025-05-09 21:22:58 +10:00
MrCoder
941bc69835 chore: Upgrade @zenuml/core to version 0.3.0 2025-05-09 19:28:13 +10:00
MrCoder
107b6cae87 Upgrade @zenuml/core to v3.31.1.
It fixes the issue https://github.com/mermaid-js/mermaid-cli/issues/584 among other improvements.
2025-05-09 19:20:20 +10:00
Sidharth Vinod
1b044a24fa Merge pull request #4734 from mermaid-js/sidv/tinyMermaid
Add `mermaid.tiny.min.js`. 69.7% size reduction.
2025-05-09 05:27:29 +00:00
Sidharth Vinod
17a156901a Merge pull request #5980 from BryanCrotazGivEnergy/packet-diagram-bit-counts
Feature: Packet diagram can use bit counts - implements #5978
2025-05-09 04:59:53 +00:00
Sidharth Vinod
fa22ed137c Merge branch 'develop' into packet-diagram-bit-counts 2025-05-09 10:21:00 +05:30
Sidharth Vinod
6b886abf39 Merge pull request #6578 from mermaid-js/renovate/npm-vite-vulnerability
chore(deps): update dependency vite to v6.1.6 [security]
2025-05-09 01:54:06 +05:30
renovate[bot]
4fd64c5bc0 chore(deps): update dependency vite to v6.1.6 [security] 2025-05-08 19:16:11 +00:00
Sidharth Vinod
7e245f970f Merge pull request #6555 from mermaid-js/renovate/npm-vite-vulnerability
chore(deps): update dependency vite to v6.1.6 [security]
2025-05-08 19:02:02 +00:00
renovate[bot]
bbe3489b4f chore(deps): update dependency vite to v6.1.6 [security] 2025-05-08 07:32:47 +00:00
Sidharth Vinod
31ba692f65 Merge pull request #6563 from mermaid-js/renovate/peter-evans-create-pull-request-digest
chore(deps): update peter-evans/create-pull-request digest to 889dce9
2025-05-08 07:18:11 +00:00
Sidharth Vinod
b073175fe9 Merge pull request #6564 from mermaid-js/renovate/eslint
chore(deps): update eslint (minor)
2025-05-08 07:13:06 +00:00
renovate[bot]
e2e22de1d9 chore(deps): update eslint 2025-05-07 20:28:30 +00:00
renovate[bot]
c370ebe520 chore(deps): update peter-evans/create-pull-request digest to 889dce9 2025-05-07 20:27:29 +00:00
BambioGaming
d732fa5f86 Update .changeset/public-things-stare.md
Co-authored-by: Ashish Jain <ashishjain0512@gmail.com>
2025-05-07 21:21:56 +01:00
Ashish Jain
ce1bfb2af5 Merge pull request #6470 from nour0205/fix/flowchart-inherit-dir
feat(flowchart): add inheritDir option for subgraph direction
2025-05-07 20:06:49 +00:00
Ashish Jain
c6d8590d8f Merge pull request #6541 from nour0205/docs/fix-annotation-style-clarification
docs(classDiagram): Clarify annotation syntax and recommend inline st…
2025-05-07 20:01:46 +00:00
Ashish Jain
10505a0392 Merge pull request #6575 from mermaid-js/omkar/fix-er-diagram-row-height-adjustment
Fix: Adjust ER diagram row height calculation and layout rendering
2025-05-07 19:59:05 +00:00
omkarht
2a10143406 Fix: Adjust ER diagram row height calculation and layout rendering 2025-05-07 20:47:15 +05:30
Sidharth Vinod
d702a7164e Merge pull request #6574 from mermaid-js/sidv/updateImages
fix: Update images
2025-05-07 15:13:12 +05:30
Sidharth Vinod
8a0bc64282 Merge pull request #6573 from mermaid-js/sidv/fixAvatarFetch
chore: Batch avatar download to avoid GitHub rate limiting.
2025-05-07 15:12:08 +05:30
Sidharth Vinod
ac0283ff97 fix: Update images 2025-05-07 15:10:22 +05:30
Sidharth Vinod
84faddc9e5 chore: Batch avatar download to avoid GitHub rate limiting. 2025-05-07 12:24:29 +05:30
Sidharth Vinod
5e3f21f572 Merge pull request #6570 from mermaid-js/sidv/ogTags
feat: Add og tags
2025-05-06 20:51:26 +05:30
Sidharth Vinod
05c74ed9ce feat: Add og tags 2025-05-06 20:44:15 +05:30
Sidharth Vinod
b106346119 Merge pull request #6568 from mermaid-js/announcement-bar-update
chore: Update announcement bar
2025-05-06 10:43:04 +05:30
rajat-ht
c09232c44d chore: update utm_campaign 2025-05-06 03:52:21 +05:30
rajat-ht
714496af6d chore: minor change 2025-05-06 03:46:01 +05:30
rajat-ht
5d61a30237 chore: update as per suggestion 2025-05-06 03:30:49 +05:30
rajat-ht
02ff3c1216 chore: Update announcement bar 2025-05-05 21:17:09 +05:30
autofix-ci[bot]
1f897a851b [autofix.ci] apply automated fixes 2025-05-05 12:30:50 +00:00
Arpit Jain
8af636c58d Fix Incomplete string escaping or encoding
errors
2025-05-05 12:15:41 +00:00
Sidharth Vinod
a566353030 Merge pull request #6549 from mermaid-js/renovate/npm-vite-vulnerability
chore(deps): update dependency vite to v6.1.6 [security]
2025-05-02 02:24:52 +05:30
renovate[bot]
d396c6b760 chore(deps): update dependency vite to v6.1.6 [security] 2025-05-01 20:52:36 +00:00
Sidharth Vinod
8d9f027f40 Merge pull request #6544 from nourhenta/fix-fontFamily-docs-v2
docs(theme): document fontFamily customization in themeVariables
2025-05-02 02:21:03 +05:30
Sidharth Vinod
560700eaf8 Merge pull request #6540 from mermaid-js/renovate/major-eslint
chore(deps): update dependency eslint-plugin-unicorn to v59
2025-05-01 20:18:23 +00:00
nourhenta
819843cf2a corrected font size text 2025-05-01 20:53:37 +01:00
Sidharth Vinod
5e2870f6f2 Merge pull request #6545 from mermaid-js/renovate/npm-vite-vulnerability
chore(deps): update dependency vite to v6.1.5 [security]
2025-04-29 13:22:53 +00:00
nourhenta
c364ff463a docs(theme): fix table formatting by removing extra line between fontFamily and fontSize 2025-04-29 13:31:42 +01:00
renovate[bot]
8738288bc0 chore(deps): update dependency eslint-plugin-unicorn to v59 2025-04-29 06:51:00 +00:00
Sidharth Vinod
74ef4ce9c6 Merge pull request #6479 from Shahir-47/feature/3250/add_vertline_to_gantt_plot
feat: Add vertical line to gantt plot at specified time
2025-04-29 06:25:57 +00:00
renovate[bot]
2b41bf083c chore(deps): update dependency vite to v6.1.5 [security] 2025-04-29 06:24:35 +00:00
Sidharth Vinod
249f22763b Merge pull request #6522 from mermaid-js/renovate/npm-vite-vulnerability
chore(deps): update dependency vite to v6.1.5 [security]
2025-04-29 11:53:03 +05:30
Sidharth Vinod
444d35b9b4 Merge pull request #6513 from mermaid-js/renovate/peter-evans-create-pull-request-digest
chore(deps): update peter-evans/create-pull-request digest to 3b1f4bf
2025-04-29 11:52:38 +05:30
Sidharth Vinod
83543bc790 Merge pull request #6539 from mermaid-js/renovate/eslint
chore(deps): update eslint (minor)
2025-04-29 11:52:22 +05:30
nourhenta
379559c992 docs(theme): document fontFamily customization in themeVariables 2025-04-28 23:06:02 +01:00
Megan Triplett
c61b879711 Merge branch 'develop' into feature/3250/add_vertline_to_gantt_plot 2025-04-28 16:22:07 -04:00
renovate[bot]
67806022b9 chore(deps): update eslint 2025-04-28 19:56:38 +00:00
nour kouider
f8c54317c5 docs(classDiagram): Clarify annotation syntax and recommend inline style (#6538) 2025-04-28 10:27:06 +01:00
renovate[bot]
65f778d183 chore(deps): update peter-evans/create-pull-request digest to 3b1f4bf 2025-04-28 06:44:55 +00:00
renovate[bot]
ed67c36440 chore(deps): update dependency vite to v6.1.5 [security] 2025-04-28 06:44:24 +00:00
Knut Sveidqvist
908043183e Merge pull request #6523 from NourBenz/bug/6518_allow-empty-colon-messaage
fix(sequenceDiagram): allow empty message after colon (Fixes #6518)
2025-04-28 06:30:32 +00:00
nghtlinh
97b79c3578 Added the changeset 2025-04-27 14:09:39 -04:00
nghtlinh
8d4c5d5278 Deleted unused code 2025-04-27 13:51:38 -04:00
nghtlinh
9988a61ec5 Merge remote-tracking branch 'origin/feature/3250/add_vertline_to_gantt_plot' into feature/3250/add_vertline_to_gantt_plot 2025-04-25 15:58:38 -04:00
nghtlinh
d4e737e451 Deleted unused method 2025-04-25 15:43:00 -04:00
NourBenz
b821454927 Merge branch 'develop' into bug/6518_allow-empty-colon-messaage 2025-04-25 19:01:21 +01:00
Sidharth Vinod
cee43a45f6 Merge pull request #6355 from mermaid-js/update-homepage
DOCS: Update homepage
2025-04-24 21:12:40 +05:30
Monica Nguyen
475532a839 Merge branch 'develop' into feature/3250/add_vertline_to_gantt_plot 2025-04-24 11:39:10 -04:00
Sidharth Vinod
c8daf9aa43 docs: Update tiny doc 2025-04-24 12:53:04 +05:30
Sidharth Vinod
cf8fc2a541 Merge pull request #6514 from mermaid-js/renovate/wei-curl-digest
chore(deps): update wei/curl digest to 012398a
2025-04-24 12:38:30 +05:30
Sidharth Vinod
08b6524a35 Merge pull request #6511 from SimonMarquis/patch-1
`layout-elk` package documentation misleading version
2025-04-24 11:21:55 +05:30
Sidharth Vinod
221aa3ed19 Merge pull request #6515 from mermaid-js/update-timings
Update E2E Timings
2025-04-24 11:20:27 +05:30
github-actions[bot]
640a65f9a7 chore: update E2E timings 2025-04-24 04:07:51 +00:00
NourBz
c17277e743 added changeset and unit test 2025-04-22 21:45:24 +01:00
NourBz
7b3fd044e8 fix(sequenceDiagram): allow empty message after colon (Fixes #6518) 2025-04-22 21:18:03 +01:00
Megan Triplett
566b3db15f Merge branch 'mermaid-js:develop' into feature/3250/add_vertline_to_gantt_plot 2025-04-22 15:16:18 -04:00
renovate[bot]
2483e6e434 chore(deps): update wei/curl digest to 012398a 2025-04-21 02:47:37 +00:00
Simon Marquis
e7b39f3fa3 layout-elk package documentation misleading version
It shows `layout-elk@11` in CDN code snippet while this package is currently on v0.1.7.
2025-04-20 12:44:44 +01:00
Sidharth Vinod
1c1d7d0300 Merge pull request #6282 from mermaid-js/saurabh/refactor-fontawesome-icon-usage
Refactor fontawesome icon usage.
2025-04-20 01:04:40 -07:00
Sidharth Vinod
e8ee4bdb48 Merge pull request #6506 from mermaid-js/renovate/npm-vite-vulnerability
chore(deps): update dependency vite to v6.1.5 [security]
2025-04-20 05:57:33 +00:00
Sidharth Vinod
2afa96c2a8 Merge pull request #6495 from generrosity/patch-1
DOC: more complete gantt example
2025-04-20 05:56:50 +00:00
autofix-ci[bot]
7c42d08ef2 [autofix.ci] apply automated fixes 2025-04-20 05:42:45 +00:00
generrosity
d0520e6a50 code review - wording and removals
- wording choice to match writing
- removing incorrect assumptions about String quotation and insensitivity.

Co-authored-by: Sidharth Vinod <github@sidharth.dev>
2025-04-20 17:38:10 +12:00
autofix-ci[bot]
a703a195d4 [autofix.ci] apply automated fixes 2025-04-20 05:25:49 +00:00
generrosity
05b5607265 removing directives note
misundeerstood

Co-authored-by: Sidharth Vinod <github@sidharth.dev>
2025-04-20 17:21:19 +12:00
renovate[bot]
2b28966f8d chore(deps): update dependency vite to v6.1.5 [security] 2025-04-19 13:50:59 +00:00
Sidharth Vinod
4077088f18 test: Tweak flowchart tests 2025-04-19 18:19:36 +05:30
Sidharth Vinod
867484a2cc Revert "temp: Remove tests to check if cypress passes"
This reverts commit b0b76ef7a2.
2025-04-19 18:12:03 +05:30
Sidharth Vinod
5ea7088e04 test: fix flowchart width in test 2025-04-19 18:11:44 +05:30
autofix-ci[bot]
646230d603 [autofix.ci] apply automated fixes 2025-04-19 10:01:32 +00:00
generrosity
5a7e734da4 sp check 2025-04-19 21:57:08 +12:00
generrosity
2924b94fbc Merge branch 'develop' into patch-1 2025-04-19 20:53:34 +12:00
generrosity
f8c6ae5d17 stripping comments from gantt example
as requested, I've pulled comments onto the main syntax pages, so stripping many of the comments from here
2025-04-19 20:07:12 +12:00
generrosity
8d7330aeb3 Adding to mermaid syntax
Following on from recommendation from code senior👌;

adding details to mermaid syntax in a more useful location;
- comments (tho not totally truethful)
- indenting
- case insensitive
- string handling
- expectations with invalid keywords or parameters
2025-04-19 20:04:30 +12:00
generrosity
6a6c9f6254 Add Frontmatteer to syntax more explicitly 2025-04-19 19:38:14 +12:00
Sidharth Vinod
b0b76ef7a2 temp: Remove tests to check if cypress passes 2025-04-19 11:39:43 +05:30
Sidharth Vinod
53e89d97a0 Merge branch 'develop' into saurabh/refactor-fontawesome-icon-usage 2025-04-18 12:39:47 -07:00
Sidharth Vinod
59b400652b Merge pull request #6302 from guzzit/patch-1
Added class styling example to block.md
2025-04-18 19:08:58 +00:00
Sidharth Vinod
e8124d8828 Merge pull request #6340 from Baraka24/docs/6339_add-tiki-to-integrations-community-list
docs(integrations): add tiki to community list cms/ecm
2025-04-18 19:07:42 +00:00
Sidharth Vinod
26e3bea2fe Merge pull request #6349 from IceFreez3r/docs/parameters-header-level
Docs/Fix parameter heading level
2025-04-18 19:06:50 +00:00
Sidharth Vinod
1fda77db13 Merge pull request #6383 from suelambot/docs/6382_error-class-diag-action-full-example
6382 - fix error on classDiagram.md
2025-04-18 19:04:57 +00:00
Sidharth Vinod
5b2227b3be Merge pull request #6418 from mermaid-js/renovate/npm-vite-vulnerability
chore(deps): update dependency vite to v6.1.5 [security]
2025-04-18 19:00:16 +00:00
Sidharth Vinod
68670535bf docs: Update tiny docs 2025-04-18 17:16:51 +05:30
renovate[bot]
7a6f13707f chore(deps): update dependency vite to v6.1.5 [security] 2025-04-18 11:20:41 +00:00
Sidharth Vinod
9d838d4e7a fix: e2e-applitools.yml 2025-04-18 16:48:58 +05:30
Sidharth Vinod
a92ae7a16c chore: Update katex message 2025-04-18 15:53:37 +05:30
Sidharth Vinod
8800de9309 Merge branch 'sidv/tinyMermaid' of https://github.com/mermaid-js/mermaid into sidv/tinyMermaid
* 'sidv/tinyMermaid' of https://github.com/mermaid-js/mermaid:
  [autofix.ci] apply automated fixes
2025-04-18 15:51:58 +05:30
Sidharth Vinod
d2c53552ff chore: Disable sourcemap for tiny 2025-04-18 15:51:42 +05:30
autofix-ci[bot]
91a7564db6 [autofix.ci] apply automated fixes 2025-04-18 10:12:40 +00:00
Sidharth Vinod
a037cdcf13 chore: patch bump tiny 2025-04-18 15:34:29 +05:30
Sidharth Vinod
3753967c8f fix: Update tiny file name 2025-04-18 15:33:31 +05:30
Sidharth Vinod
549dc86b21 chore: Revert unrelated changes 2025-04-18 15:26:23 +05:30
Sidharth Vinod
e97f25f13e chore: Match tiny version 2025-04-18 15:18:05 +05:30
Sidharth Vinod
c3c609a965 chore: Remove changelog for tiny 2025-04-18 15:17:50 +05:30
Sidharth Vinod
c81a7d13e0 chore: Revert unrelated changes 2025-04-18 15:13:14 +05:30
Sidharth Vinod
e561acac23 chore: Remove unnecessary workflows 2025-04-18 15:09:53 +05:30
Sidharth Vinod
86a0a7fe3a chore: Add sourcemaps back 2025-04-18 15:09:04 +05:30
Sidharth Vinod
5a8f32b8cb Merge branch 'sidv/tinyMermaid' of https://github.com/mermaid-js/mermaid into sidv/tinyMermaid
* 'sidv/tinyMermaid' of https://github.com/mermaid-js/mermaid:
  [autofix.ci] apply automated fixes
2025-04-18 15:06:49 +05:30
autofix-ci[bot]
c6e640ab75 [autofix.ci] apply automated fixes 2025-04-18 09:36:34 +00:00
Sidharth Vinod
f6862c5af5 chore: Tiny version 2025-04-18 15:05:17 +05:30
Sidharth Vinod
bd8b93327e chore: Tiny version 2025-04-18 15:05:02 +05:30
Sidharth Vinod
4a63901af9 chore: Copy changelog to tiny 2025-04-18 15:02:16 +05:30
Sidharth Vinod
8c52edf3ef chore: Move architecture into largeFeature 2025-04-18 14:56:13 +05:30
Sidharth Vinod
da610bff1d chore: Add @mermaid-js/tiny package 2025-04-18 14:55:53 +05:30
Sidharth Vinod
db389e589d Merge branch 'develop' into sidv/tinyMermaid
* develop: (1682 commits)
  docs: Fix casing of Frontmatter config
  spelling: youtube
  spelling: without
  spelling: withdrawal
  spelling: very
  spelling: typescript
  spelling: tooltip
  spelling: to
  spelling: threshold
  spelling: themeable
  spelling: the
  spelling: than
  spelling: text
  spelling: task
  spelling: syntax
  spelling: svg
  spelling: subgraphs
  spelling: style
  spelling: string
  spelling: strict
  ...
2025-04-18 14:10:49 +05:30
autofix-ci[bot]
79b47be35f [autofix.ci] apply automated fixes 2025-04-18 03:52:33 +00:00
generrosity
054f5444d6 spellchecked
inconsistently misspelling inconsistently misspelling
2025-04-18 15:48:08 +12:00
generrosity
beb80db25a shift directives to frontmatter
* shifting directives to frontmatter as recomended - it is literally about to me removed, 
* tweaking context comment about directives
* tweaking code in general formatting, spelling, wording
2025-04-18 15:37:50 +12:00
generrosity
fbdbd9d0dd Merge branch 'develop' into patch-1 2025-04-18 15:35:17 +12:00
Udval E.
e49911e748 Merge branch 'develop' into feature/3250/add_vertline_to_gantt_plot 2025-04-17 12:21:17 -04:00
generrosity
dbbe014c5b Merge branch 'develop' into patch-1 2025-04-17 23:02:53 +12:00
autofix-ci[bot]
ceef0558be [autofix.ci] apply automated fixes 2025-04-17 10:44:26 +00:00
generrosity
63b90e8b9b tweaks
adding some of the correct terms and references, depreciation
2025-04-17 22:23:21 +12:00
udvale
62b4228df4 changed some color aspects for vertline based on theme 2025-04-16 15:44:21 -04:00
udvale
c552dc7551 Add documentation for vert feature in Gantt chart
Co-authored-by: Monica Nguyen <nghtlinh25@gmail.com>
Co-authored-by: Megan Triplett <megantriplett10@gmail.com>
2025-04-16 14:52:24 -04:00
generrosity
e425a45755 extra sample gantt chart with extras 2025-04-16 21:15:14 +12:00
megantriplett
d177211286 added a snapshot test 2025-04-15 15:55:57 -04:00
Monica Nguyen
a07d365c1c Merge branch 'develop' into feature/3250/add_vertline_to_gantt_plot 2025-04-15 15:46:45 -04:00
Sidharth Vinod
88ae4ef704 chore: Remove incorrect language tag 2025-04-15 12:21:46 +05:30
Sidharth Vinod
df9df9dc32 docs: Add changeset 2025-04-15 12:16:49 +05:30
Sidharth Vinod
ea321168bd chore: Update bits syntax to use +<count> 2025-04-15 12:14:06 +05:30
Sidharth Vinod
d7730aba46 Merge branch 'develop' into pr/BryanCrotazGivEnergy/5980
* develop: (492 commits)
  chore: Ignore timeout domains
  [autofix.ci] apply automated fixes
  [autofix.ci] apply automated fixes
  Create neat-moose-compare.md
  chore: Add changeset
  updated tests
  modified description of showDataLabel in config schema and added it to docs
  fix(deps): update all major dependencies
  chore(deps): update peter-evans/create-pull-request digest to a7b20e1
  fix(deps): update dependency dompurify to ^3.2.5
  [autofix.ci] apply automated fixes
  Update integrations-community.md
  [autofix.ci] apply automated fixes
  Add Mermaid plus for Confluence into integrations-community.md
  refactor xy-chart tests
  added new tests
  added new tests
  chore(deps): update eslint
  chore: Update change detection logic
  chore: Use git to read old timings
  ...
2025-04-15 11:45:33 +05:30
Sidharth Vinod
24f23efdad Merge branch 'develop' into saurabh/refactor-fontawesome-icon-usage 2025-04-14 20:15:48 -07:00
nghtlinh
f5c99a2a4f Deleted "special" tag residue 2025-04-11 16:04:14 -04:00
nghtlinh
244703a904 Merge branch 'monica_branch' of https://github.com/Shahir-47/mermaid into monica_branch 2025-04-11 15:18:09 -04:00
Monica Nguyen
59a9e1b300 Merge branch 'mermaid-js:develop' into monica_branch 2025-04-11 15:15:40 -04:00
nghtlinh
167a625413 Merge branch 'monica_branch' of https://github.com/Shahir-47/mermaid into monica_branch 2025-04-11 15:13:00 -04:00
nghtlinh
296cb64fa5 deleted repeated code 2025-04-11 15:11:14 -04:00
udvale
2009177375 the title is centered at vert line 2025-04-10 16:35:41 -04:00
nghtlinh
81fa2a675f Rendered vert task at last + Trying to reposition vert label 2025-04-09 18:15:26 -04:00
nghtlinh
2203792164 Added permananet color for the vertical line 2025-04-09 16:13:34 -04:00
nghtlinh
5bbc9b4f5b Merge branch 'Issue3250/addDateToGantt' into monica_branch 2025-04-09 15:44:04 -04:00
Sidharth Vinod
8005262d76 Merge branch 'master' into update-homepage
* master: (242 commits)
  update logic
  Version Packages
  Add missing changeset for requirement diagram fix
  Update mermaid version palceholder
  test(e2e): fix Cypress config for Node.JS v20.19.0
  fix: restore curve type configuration functionality for flowcharts (#6193)
  update promo bar content
  rework contains geometry to avoid clipping
  try arrowhead
  #6380: move requirements containment arrow to start
  ⚗️ Add radar renderer tests
  🩹 Fix: text-color ➙ color
  [autofix.ci] apply automated fixes
  🆙 Run pnpm changeset
  🖼️ Add Radar Demo with custom opacity
  📚 Add documentation
  🖼️ Add Radar Demo
  ⚗️ Add Cypress test
  🎨 Add themes for radar
  📊 Add radar chart
  ...
2025-04-09 19:13:35 +05:30
nour kouider
463eb07979 fix(config.schema): add inheritDir to Flowchart config and regenerate types/docs 2025-04-09 11:34:06 +01:00
Sidharth Vinod
a3cf9de01b fix: Move Tooltip as vue component 2025-04-09 15:50:27 +05:30
Sidharth Vinod
9a90aca8e6 chore: Add mermaid logo 2025-04-09 15:35:58 +05:30
nour0205
8c9b38ed90 Merge branch 'develop' into fix/flowchart-inherit-dir 2025-04-09 11:04:49 +01:00
Sidharth Vinod
963b1e3ec5 chore: Fix intro link 2025-04-09 15:32:31 +05:30
Sidharth Vinod
208d29e3d6 chore: Update live editor link 2025-04-09 15:31:25 +05:30
Sidharth Vinod
5c865e7b71 chore: Remove duplicate cspell 2025-04-09 15:29:08 +05:30
Sidharth Vinod
7ce9dbcece docs: Add target to external link 2025-04-09 15:27:53 +05:30
nour kouider
36fe04bd46 feat(flowchart): add inheritDir option for subgraph direction 2025-04-09 10:56:30 +01:00
Sidharth Vinod
ff786b4ef8 docs: Update homepage links 2025-04-09 15:25:02 +05:30
Sidharth Vinod
b81b665137 feat: Add tooltip for MermaidChart links 2025-04-09 15:24:23 +05:30
khalil
3f493acc6a fixed unit test 2025-04-06 21:02:22 +01:00
khalil
d2239549e6 fixed unit test 2025-04-06 20:49:43 +01:00
khalil
f8d8f74f34 fixed unit test 2025-04-06 20:41:29 +01:00
khalil
74a9336d42 fixed unit test 2025-04-06 00:07:48 +01:00
khalil
ca2b16119d fixed unit test 2025-04-05 21:49:02 +01:00
khalil
2d9034c983 fixed unit test 2025-04-05 21:30:03 +01:00
khalil
aa6cb86899 added changeset and unit test 2025-04-05 20:46:16 +01:00
khalil
99797632ab reset branch and readded commits 2025-04-05 20:37:11 +01:00
nghtlinh
a43965ac2c Put label right down the vert line 2025-04-04 15:57:55 -04:00
nghtlinh
8eb2000b98 Adjusted label calculation for x and y values 2025-04-04 15:44:09 -04:00
megantriplett
7e1cec95ef fixed bug where background is removed @monicanguyen25 @udvale 2025-04-04 15:17:02 -04:00
megantriplett
ec2c76a703 deleted some old commented out code 2025-04-04 15:02:54 -04:00
nghtlinh
d0ee6079b3 Positioned the label in the center of the vert line + Brough back the background 2025-04-03 20:43:32 -04:00
Monica Nguyen
c28c05780c Merge branch 'mermaid-js:develop' into monica_branch 2025-04-02 17:39:11 -04:00
megantriplett
c8e87b113b Merge branch 'Megan3250' of https://github.com/Shahir-47/mermaid into Megan3250 2025-04-02 17:17:32 -04:00
Megan Triplett
8627fb0f62 Merge branch 'mermaid-js:develop' into Megan3250 2025-04-02 17:16:50 -04:00
Sidharth Vinod
a9be1a4146 Merge pull request #6398 from mermaid-js/update-content
DOCS: update promo bar content
2025-04-02 02:22:53 -07:00
Steph
617c7393bf update logic 2025-04-01 23:41:43 -07:00
megantriplett
c1db4f2ed0 Moved text to bottom of graph, even when rows are added/deleted 2025-03-28 16:08:44 -04:00
Monica Nguyen
4fff67e4af Merge branch 'mermaid-js:develop' into monica_branch 2025-03-27 22:08:09 -04:00
nghtlinh
350543a5e2 Created a new tag Special working similar as Milestone but draw a line 2025-03-27 21:51:57 -04:00
megantriplett
e8986eb546 Removed previous x movement for vert and moved text down (not exactly at bottom yet) 2025-03-26 18:37:09 -04:00
megantriplett
a401a4ab49 Made vert render a vertical line 2025-03-21 15:39:38 -04:00
megantriplett
2bc3a0f97c vert is now a copy of milestone tag 2025-03-21 15:28:34 -04:00
Steph
ce68da3fee update promo bar content 2025-03-20 20:11:59 -07:00
megantriplett
1125f5a283 added new tag "vert" in ganttDB 2025-03-18 16:10:16 -04:00
Steph
fa4d4806fa update button text 2025-03-18 13:08:12 -07:00
autofix-ci[bot]
91bcd2da8c [autofix.ci] apply automated fixes 2025-03-17 11:16:26 +00:00
sue
ec2330875e 6382 - fix error on classDiagram.md
Fixing the error on the beginner's full action example in the class
diagram's documentation

Error: Error: Parse error on line 23:
...      callback Duck callback "Tooltip"
-----------------------^
Expecting 'NEWLINE', 'EOF', 'SQS', 'STR', 'DOT', 'GENERICTYPE', 'LABEL', 'STRUCT_START', 'STRUCT_STOP', 'STYLE_SEPARATOR', 'ANNOTATION_END', 'ALPHA', 'AGGREGATION', 'EXTENSION', 'COMPOSITION', 'DEPENDENCY', 'LOLLIPOP', 'LINE', 'DOTTED_LINE', 'CALLBACK_NAME', 'HREF', 'NUM', 'MINUS', 'UNICODE_TEXT', 'BQUOTE_STR', got 'CALLBACK'
2025-03-17 12:11:16 +01:00
Steph
c8f01b14a8 update links 2025-03-11 13:21:07 -07:00
autofix-ci[bot]
cdaea58096 [autofix.ci] apply automated fixes 2025-03-11 13:31:24 +00:00
Baraka Kinywa
b3d8fa917f docs(integrations): add tiki to community list cms/ecm 2025-03-11 16:26:34 +03:00
Steph
91931531a6 update link 2025-03-06 11:48:17 -08:00
Steph
50e4641666 minor updates 2025-03-05 22:26:12 -08:00
Steph
1bed6432ac update styling and add assets 2025-03-05 21:24:38 -08:00
autofix-ci[bot]
ee5dc5ae80 [autofix.ci] apply automated fixes 2025-03-03 10:25:08 +00:00
IceFreez3r
b7940b64cd Fix parameter heading level
The "Parameters" sections belong to "Icon Shape" and "Image Shape" respectively and should therefore have one more level than them.
2025-03-03 11:16:33 +01:00
Steph
11f7f426cb verbiage updates 2025-02-28 08:05:42 -08:00
saurabhg772244
a31adc63a9 Updated docs and e2e test case 2025-02-28 19:09:21 +05:30
autofix-ci[bot]
f60ecfc2c4 [autofix.ci] apply automated fixes 2025-02-26 13:26:09 +00:00
Saurabh Gore
06877dcc47 Update cypress/platform/viewer.js
Co-authored-by: Alois Klink <alois@aloisklink.com>
2025-02-26 18:48:27 +05:30
Saurabh Gore
050fbd9da2 Update packages/mermaid/src/docs/syntax/flowchart.md
Co-authored-by: Alois Klink <alois@aloisklink.com>
2025-02-26 18:47:29 +05:30
Saurabh Gore
1be1e34e72 Update packages/mermaid/src/docs/syntax/flowchart.md
Co-authored-by: Alois Klink <alois@aloisklink.com>
2025-02-26 18:45:13 +05:30
saurabhg772244
b0c1460940 Convert Font Awesome loading from HTML to JS 2025-02-26 12:55:01 +05:30
saurabhg772244
e045e0b42d Code refactor and updated docs 2025-02-25 18:25:59 +05:30
saurabhg772244
2fb7bc2806 fix pnpm lock and use promise.all to speed up icon replacement 2025-02-21 23:45:33 +05:30
saurabhg772244
83a6e696c6 fix lock file 2025-02-21 23:07:25 +05:30
saurabhg772244
a89e001d01 Merge branch 'saurabh/refactor-fontawesome-icon-usage' of github.com-mermaid:mermaid-js/mermaid into saurabh/refactor-fontawesome-icon-usage 2025-02-21 23:00:47 +05:30
saurabhg772244
6a81a907d1 Merge branch 'develop' of github.com-mermaid:mermaid-js/mermaid into saurabh/refactor-fontawesome-icon-usage 2025-02-21 23:00:33 +05:30
saurabhg772244
16573d97f5 Updated docs, added visual regression test 2025-02-21 19:45:14 +05:30
autofix-ci[bot]
36894fe14a [autofix.ci] apply automated fixes 2025-02-19 10:47:08 +00:00
Gozie Joshua
efe834e772 Added class styling example to block.md 2025-02-19 11:19:24 +01:00
saurabhg772244
8857e77495 Merge branch 'develop' of https://github.com/mermaid-js/mermaid into saurabh/refactor-fontawesome-icon-usage 2025-02-19 11:35:03 +05:30
saurabhg772244
a81c3187ba removed font awesome packages and used registered icons instead 2025-02-18 19:53:18 +05:30
Saurabh Gore
d63d3bf1e7 added changeset 2025-02-14 16:37:41 +05:30
Saurabh Gore
33e5694a75 update styles so that proper fill is applied to icons 2025-02-14 16:32:59 +05:30
Saurabh Gore
302ba725ae embed free font awesome svg instead of i tag. pro icons will still work with i tag 2025-02-14 16:32:11 +05:30
Bryan
c828867852 add documentation 2024-10-19 17:50:00 +01:00
Bryan
5fca47c5ec Revert "run prettier"
This reverts commit 6d33d93b15.
2024-10-18 21:30:10 +01:00
Bryan
4cd3f0a8bb try implementing assert as if->throw 2024-10-18 21:21:15 +01:00
Bryan
73653c348d remove import for assert 2024-10-18 21:12:55 +01:00
Bryan
0bc07f356d add import for assert 2024-10-18 20:54:10 +01:00
Bryan
6d33d93b15 run prettier 2024-10-18 20:28:37 +01:00
autofix-ci[bot]
d54eed9d62 [autofix.ci] apply automated fixes 2024-10-18 19:22:20 +00:00
Bryan
0fdfd91069 lint the documentation 2024-10-18 20:17:30 +01:00
Bryan
93577619b2 add documentation 2024-10-18 20:09:29 +01:00
Bryan
b602f67abe Add bit count syntax to packet diagram 2024-10-18 20:05:42 +01:00
Sidharth Vinod
70038e90ce Merge branch 'develop' into sidv/tinyMermaid
* develop: (52 commits)
  docs: Add quadrant point styling
  feat: Change precedence of styling
  chore(deps): update all minor dependencies
  chore(deps): update all patch dependencies
  fix: eslint ignore, type definition
  chore(deps): update all patch dependencies
  fix: Remove `ImperativeState` type restriction.
  📝🐛 fix schema link
  update latest news section
  Changes to rendering/gitGraph.spec.js - Added additional rendering test functionality for recognizing 'switch' as an alias to 'checkout'.
  1. Changes to gitGraph.jison - Updated the regex to allow either 'checkout' or 'switch' 2. Changes to gitGraphParser.spec.js - Additional test coverage added for the changes made to the parser. 3. Changes to gitGraphParserV2.spec.js - Additional test coverafe added for the changes made to the parser. 4. Changes to gitgraph.md - Updated documentation to let users know that checkout/switch can be used interchangeably.
  revert from and to type to object
  add eslint rule consistent-type-definations
  Update createText.ts
  chore(deps): update all patch dependencies
  revert lock file
  simplify message type from and to
  move types to separate file
  use interfaces instead of types
  feat: create utils func + test cases
  ...
2024-04-16 12:34:42 +05:30
Sidharth Vinod
49f2de9547 Merge branch 'develop' into sidv/tinyMermaid
* develop: (101 commits)
  Add extra test
  Add visual test
  Wait for image to be rendered
  Update docs
  Linting
  chore:  temp fix for eslint OOM
  chore: Update error snapshots
  Fix ESLint
  chore: Prettier
  chore: YOLO `pnpm --recursive update`
  chore: Remove commitlint
  Fix flowchart-elk render test
  chore: Add example page link in index
  Fix flowchart-elk render test
  chore: Add example page link in index
  fix: Remove space which caused extra newline on diagrams
  fix: Remove repeated config calls
  fix: ELK diagram remove re-parsing
  chore: Minor fixes #4856
  chore: Increase ESLint memory limit
  ...
2024-03-23 18:47:27 +05:30
sidharthv96
80eaafa001 Update docs 2024-03-08 14:24:44 +00:00
Sidharth Vinod
cedc1d4e28 Merge branch 'develop' into sidv/tinyMermaid
* develop: (31 commits)
  make LLM integrations a new headline
  build docs
  ci(e2e): avoid commenting on PRs in CI
  chore: Remove unused imports in block
  Fix spelling
  Update docs
  Lychee ignore chrome webstore
  Update link
  chore(deps): update all patch dependencies
  build(docs): vendor CSS dependencies
  chore(deps): update all minor dependencies
  fix linting issues
  Ran lint:fix
  Fix chrome webstore url causing 404
  Add LLM integration section in productivity tools and add HueHive
  build(deps): update `langium` to `v3` and apply the required changes
  Remove dummy change from e2e.yml
  Remove dummy change
  Remove log
  Format message
  ...
2024-03-08 19:43:56 +05:30
Sidharth Vinod
882e4971eb Remove katex from mermaid.tiny 2024-03-01 12:54:42 +05:30
Sidharth Vinod
3a12a63c32 Merge branch 'next' into sidv/tinyMermaid
* next: (269 commits)
  Resolves E2E testing issues and issue #5343
  Fix spelling
  Fix community integrations
  Fix docs
  docs: Fix config
  Update all minor dependencies
  Amend docs to document gitgraph parallel commits
  Fix lint
  Use Yarn Add COREPACK_ENABLE_STRICT
  Added link to Blazorade Mermaid to the community integrations page.
  Bump node version
  Add lcov to cspell
  Correcting path to docker-entrypoint.sh
  Update recommended Vitest extension
  Replace mermaid-js.github.io links
  Replace links to docs with links to webhelp
  Link to contributing page on webhelp
  Changes to timeline.md 1. Added colons to all 'NOTES' for consistency.
  Changes to timeline.md 1. Updates the Wikipedia citation to include a link. 2. Removed periods from documentation sections to be consistent (some had periods, some didn't) 3. Added a space to a coding example for spacing consistency.
  Replace version number placeholder
  ...
2024-03-01 12:48:22 +05:30
Sidharth Vinod
c1d31476cd Ignore node_modules 2024-01-24 09:44:25 +05:30
Sidharth Vinod
b23b97f612 Fix artifact upload 2024-01-24 09:41:00 +05:30
Sidharth Vinod
bd1789c54b Merge branch 'next' into sidv/tinyMermaid
* next: (562 commits)
  Lint
  Remove echo
  RefTest
  Echo event
  Update cypress
  Fix applitools
  Fix applitools
  docs: fix lint
  docs: move community to Discord
  Swap condition blocks to avoid using negation
  Reposition const declaration to ideal place
  Change repetitive values into consts
  docs: fix swimm link
  Fix Update Browserslist
  Use pnpm/action-setup@v2
  Fix lint
  Cleanup e2e.yml
  Ignore push events on merge queue
  Remove ::
  Remove ::
  ...
2024-01-24 09:25:52 +05:30
Sidharth Vinod
5feececff6 Merge branch 'next' into sidv/tinyMermaid
* next: (27 commits)
  chore: Fix type
  refactor!: remove MermaidConfig type enum fallback
  test: rewrite some `config` vals to tighten types
  chore: Add comment for `yy`.
  chore: Increase heap size when building
  chore: increase `test-util.ts` converage by returning `undefined`
  chore: add `vitest` imports to `test-util.ts`
  chore: run `pnpm lint:fix`
  create `noErrorsOrAlternatives` parser helper function
  chore: export `InfoModule` from `infoModule.ts`
  docs(parser): create `packages/parser` README.md file
  build: build `.langium` file using `generate` from `langium-cli`
  build: update `langium` and `langium-cli` to `v2.0.1`
  fix: fix if statment logic checks if `parser` is not `undefined`
  chore: add a comment illustrate why we build packages sequentially
  chore: refactore `&&` into `if` in `populateCommonDb`
  chore: remove `./*` part from `exports` in `parser/package.json`
  fix: use `execFileSync` instead of `execSync` in `generateLangium`
  fix(mermaid): mark `mermaid-parser` dependecy with `^`
  reorder `packages/parser` after `packages/mermaid/src/vitepress`
  ...
2023-09-08 16:43:32 +05:30
Sidharth Vinod
87b0025691 Merge branch 'develop' into sidv/tinyMermaid
* develop: (189 commits)
  Remove unnecessary tests
  Remove optional chaining
  chore: Update docs
  refactor: Use `||` instead of `??`
  Update flowchart.md (#4798)
  Update flowchart.md (#4792)
  core: Adapt changes from 3f7bafb2d7
  Update cypress/helpers/util.js
  chore: Update docs
  chore: Add deprecation notices, improve types
  chore: Cleanup gitGraph tests
  chore: Fix unit tests
  chore(deps): update all patch dependencies
  chore: Update docs
  Update docs
  New Mermaid Live Editor for Confluence Cloud (#4814)
  Update link to Discourse theme component (#4811)
  Update flowchart.md (#4810)
  chore: remove unneeded `CommomDB`
  chore: Update docs
  ...
2023-09-08 16:32:53 +05:30
Sidharth Vinod
e32747dc6f Merge branch 'next' into sidv/tinyMermaid
* next:
  Fixed wrong collapsible option at the left menu, updated vue
2023-08-20 00:35:17 +05:30
Sidharth Vinod
6936f6cd02 Merge branch 'next' into sidv/tinyMermaid
* next:
  chore: Move liveReload code into script.
  Fix minify undefined
2023-08-17 16:24:33 +05:30
Sidharth Vinod
841619a7d2 Merge branch 'next' into sidv/tinyMermaid
* next:
  chore: Move SVG import to comment.
  build docs
  Remove whitespace on empty line
  chore: Fix minify
  Documentation for #2509
  Update all minor dependencies
  Update all patch dependencies
  make more `RectData` required and remove optional assignment
  use lineBreakRegex in `svgDrawCommon`
  fix svgDrawCommon import by adding `.js`
  add types to `svgDrawCommon.ts`
  convert `svgDrawCommon` to TS
2023-08-17 12:41:11 +05:30
Sidharth Vinod
905cc365e7 chore: Fix ordering issue 2023-08-16 11:08:09 +05:30
Sidharth Vinod
55266c4085 chore: Simplify diagram exclusion
Co-authored-by: Alois Klink <alois@aloisklink.com>
2023-08-16 11:01:19 +05:30
Sidharth Vinod
5f95a26218 fix: Center version text in SVG 2023-08-14 14:31:37 +05:30
Sidharth Vinod
91b7d4234e chore: Highlight if tiny version is used in error and info. 2023-08-14 14:31:07 +05:30
Sidharth Vinod
0280316b03 Remove sourcemaps 2023-08-14 09:55:00 +05:30
Sidharth Vinod
7afe87bb52 Merge branch 'sidv/splitChunks' into sidv/tinyMermaid
* sidv/splitChunks:
  Fix import
2023-08-14 09:25:07 +05:30
Sidharth Vinod
9632049bf2 v11.0.0-alpha.3 2023-08-14 09:09:32 +05:30
Sidharth Vinod
13a6f04945 chore: Add vite support for define 2023-08-14 09:05:56 +05:30
Sidharth Vinod
58a744782a Merge branch 'sidv/splitChunks' into sidv/tinyMermaid
* sidv/splitChunks:
  chore: Fix outfile names
2023-08-14 08:58:29 +05:30
Sidharth Vinod
63d5808848 Merge branch 'sidv/splitChunks' into sidv/tinyMermaid
* sidv/splitChunks:
  chore: Add analyzer comment
  chore: Split chunks into folders
  chore: Split chunks into folders
  chore: Add defaultOptions to server
  chore: Split chunks into folders
2023-08-14 08:39:43 +05:30
Sidharth Vinod
a1541aa6f5 chore: Split chunks into folders 2023-08-14 08:14:43 +05:30
Sidharth Vinod
5f3c4fccaf chore: Add tiny bundle
Excludes elk and mindmap at build time
2023-08-14 07:34:16 +05:30
165 changed files with 5277 additions and 1458 deletions

View File

@@ -1,5 +0,0 @@
---
'mermaid': patch
---
chore: Convert StateDB into TypeScript

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,5 +0,0 @@
---
'mermaid': patch
---
fix: allow colons in events

View File

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

View File

@@ -47,6 +47,7 @@ edgesep
EMPTYSTR
enddate
ERDIAGRAM
eslint
flatmap
forwardable
frontmatter

View File

@@ -2,8 +2,10 @@
Ashish Jain
cpettitt
Dong Cai
knsv
Knut Sveidqvist
Nikolay Rozhkov
Peng Xiao
Per Brolin
Sidharth Vinod
subhash-halder
Vinod Sidharth

View File

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

View File

@@ -13,11 +13,10 @@ gitgraph
gzipped
handDrawn
kanban
knsv
Knut
marginx
marginy
Markdownish
mermaidchart
mermaidjs
mindmap
mindmaps
@@ -35,7 +34,6 @@ sandboxed
siebling
statediagram
substate
Sveidqvist
unfixable
Viewbox
viewports

View File

@@ -1,5 +1,5 @@
import { build } from 'esbuild';
import { mkdir, writeFile } from 'node:fs/promises';
import { cp, mkdir, readFile, rename, writeFile } from 'node:fs/promises';
import { packageOptions } from '../.build/common.js';
import { generateLangium } from '../.build/generateLangium.js';
import type { MermaidBuildOptions } from './util.js';
@@ -31,7 +31,15 @@ const buildPackage = async (entryName: keyof typeof packageOptions) => {
// mermaid.js
{ ...iifeOptions },
// mermaid.min.js
{ ...iifeOptions, minify: true, metafile: shouldVisualize }
{ ...iifeOptions, minify: true, metafile: shouldVisualize },
// mermaid.tiny.min.js
{
...iifeOptions,
minify: true,
includeLargeFeatures: false,
metafile: shouldVisualize,
sourcemap: false,
}
);
}
if (entryName === 'mermaid-zenuml') {
@@ -70,6 +78,21 @@ const handler = (e) => {
process.exit(1);
};
const buildTinyMermaid = async () => {
await mkdir('./packages/tiny/dist', { recursive: true });
await rename(
'./packages/mermaid/dist/mermaid.tiny.min.js',
'./packages/tiny/dist/mermaid.tiny.js'
);
// Copy version from mermaid's package.json to tiny's package.json
const mermaidPkg = JSON.parse(await readFile('./packages/mermaid/package.json', 'utf8'));
const tinyPkg = JSON.parse(await readFile('./packages/tiny/package.json', 'utf8'));
tinyPkg.version = mermaidPkg.version;
await writeFile('./packages/tiny/package.json', JSON.stringify(tinyPkg, null, 2) + '\n');
await cp('./packages/mermaid/CHANGELOG.md', './packages/tiny/CHANGELOG.md');
};
const main = async () => {
await generateLangium();
await mkdir('stats', { recursive: true });
@@ -78,6 +101,7 @@ const main = async () => {
for (const pkg of packageNames) {
await buildPackage(pkg).catch(handler);
}
await buildTinyMermaid();
};
void main();

View File

@@ -14,6 +14,7 @@ export interface MermaidBuildOptions extends BuildOptions {
metafile: boolean;
format: 'esm' | 'iife';
options: PackageOptions;
includeLargeFeatures: boolean;
}
export const defaultOptions: Omit<MermaidBuildOptions, 'entryName' | 'options'> = {
@@ -21,6 +22,7 @@ export const defaultOptions: Omit<MermaidBuildOptions, 'entryName' | 'options'>
metafile: false,
core: false,
format: 'esm',
includeLargeFeatures: true,
} as const;
const buildOptions = (override: BuildOptions): BuildOptions => {
@@ -39,12 +41,18 @@ const buildOptions = (override: BuildOptions): BuildOptions => {
};
};
const getFileName = (fileName: string, { core, format, minify }: MermaidBuildOptions) => {
const getFileName = (
fileName: string,
{ core, format, minify, includeLargeFeatures }: MermaidBuildOptions
) => {
if (core) {
fileName += '.core';
} else if (format === 'esm') {
fileName += '.esm';
}
if (!includeLargeFeatures) {
fileName += '.tiny';
}
if (minify) {
fileName += '.min';
}
@@ -54,25 +62,27 @@ const getFileName = (fileName: string, { core, format, minify }: MermaidBuildOpt
export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
const {
core,
metafile,
format,
minify,
options: { name, file, packageName },
globalName = 'mermaid',
includeLargeFeatures,
...rest
} = options;
const external: string[] = ['require', 'fs', 'path'];
const outFileName = getFileName(name, options);
const output: BuildOptions = buildOptions({
...rest,
absWorkingDir: resolve(__dirname, `../packages/${packageName}`),
entryPoints: {
[outFileName]: `src/${file}`,
},
metafile,
minify,
globalName,
logLevel: 'info',
chunkNames: `chunks/${outFileName}/[name]-[hash]`,
define: {
// This needs to be stringified for esbuild
includeLargeFeatures: `${includeLargeFeatures}`,
'import.meta.vitest': 'undefined',
},
});

1
.github/lychee.toml vendored
View File

@@ -53,6 +53,7 @@ exclude = [
"https://huehive.co",
"https://foswiki.org",
"https://www.gnu.org",
"https://mermaid-preview.com"
]
# Exclude all private IPs from checking.

View File

@@ -45,13 +45,15 @@ jobs:
- if: ${{ env.USE_APPLI }}
name: Notify applitools of new batch
# Copied from docs https://applitools.com/docs/topics/integrations/github-integration-ci-setup.html
run: curl -L -d '' -X POST "$APPLITOOLS_SERVER_URL/api/externals/github/push?apiKey=$APPLITOOLS_API_KEY&CommitSha=$GITHUB_SHA&BranchName=${APPLITOOLS_BRANCH}$&ParentBranchName=$APPLITOOLS_PARENT_BRANCH"
env:
# e.g. mermaid-js/mermaid/my-branch
APPLITOOLS_BRANCH: ${{ github.repository }}/${{ github.ref_name }}
APPLITOOLS_PARENT_BRANCH: ${{ github.event.inputs.parent_branch }}
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
APPLITOOLS_SERVER_URL: 'https://eyesapi.applitools.com'
uses: wei/curl@012398a392d02480afa2720780031f8621d5f94c
with:
args: -X POST "$APPLITOOLS_SERVER_URL/api/externals/github/push?apiKey=$APPLITOOLS_API_KEY&CommitSha=$GITHUB_SHA&BranchName=${APPLITOOLS_BRANCH}$&ParentBranchName=$APPLITOOLS_PARENT_BRANCH"
- name: Cypress run
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12

View File

@@ -58,7 +58,7 @@ jobs:
echo "EOF" >> $GITHUB_OUTPUT
- name: Commit and create pull request
uses: peter-evans/create-pull-request@a7b20e1da215b3ef3ccddb48ff65120256ed6226
uses: peter-evans/create-pull-request@889dce9eaba7900ce30494f5e1ac7220b27e5c81
with:
add-paths: |
cypress/timings.json

View File

@@ -94,6 +94,10 @@ export const getBuildConfig = ({ minify, core, watch, entryName }: BuildOptions)
}),
...visualizerOptions(packageName, core),
],
define: {
// Needs to be string
includeLargeFeatures: 'true',
},
};
if (watch && config.build) {

View File

@@ -69,7 +69,9 @@ describe('Configuration', () => {
.and('include', 'url(#');
});
});
it('should handle arrowMarkerAbsolute explicitly set to "false" as false', () => {
// This has been broken for a long time, but something about the Cypress environment was
// rewriting the URL to be relative, causing the test to incorrectly pass.
it.skip('should handle arrowMarkerAbsolute explicitly set to "false" as false', () => {
renderGraph(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
@@ -112,7 +114,7 @@ describe('Configuration', () => {
.first()
.should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(http://localhost');
.and('include', 'url(http\\:\\/\\/localhost');
});
});
it('should not taint the initial configuration when using multiple directives', () => {

View File

@@ -0,0 +1,28 @@
import { imgSnapshotTest } from '../../helpers/util.ts';
const themes = ['default', 'forest', 'dark', 'base', 'neutral'];
describe('when rendering flowchart with icons', () => {
for (const theme of themes) {
it(`should render icons from fontawesome library on theme ${theme}`, () => {
imgSnapshotTest(
`flowchart TD
A("fab:fa-twitter Twitter") --> B("fab:fa-facebook Facebook")
B --> C("fa:fa-coffee Coffee")
C --> D("fa:fa-car Car")
D --> E("fab:fa-github GitHub")
`,
{ theme }
);
});
it(`should render registered icons on theme ${theme}`, () => {
imgSnapshotTest(
`flowchart TD
A("fa:fa-bell Bell")
`,
{ theme }
);
});
}
});

View File

@@ -99,7 +99,7 @@ describe('Flowchart v2', () => {
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(417 * 0.95, 417 * 1.05);
expect(maxWidthValue).to.be.within(440 * 0.95, 440 * 1.05);
});
});
it('8: should render a flowchart when useMaxWidth is false', () => {
@@ -118,7 +118,7 @@ describe('Flowchart v2', () => {
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(417 * 0.95, 417 * 1.05);
expect(width).to.be.within(440 * 0.95, 440 * 1.05);
expect(svg).to.not.have.attr('style');
});
});

View File

@@ -934,4 +934,43 @@ graph TD
}
);
});
it('68: should honor subgraph direction when inheritDir is false', () => {
imgSnapshotTest(
`
%%{init: {"flowchart": { "inheritDir": false }}}%%
flowchart TB
direction LR
subgraph A
direction TB
a --> b
end
subgraph B
c --> d
end
`,
{
fontFamily: 'courier',
}
);
});
it('69: should inherit global direction when inheritDir is true', () => {
imgSnapshotTest(
`
%%{init: {"flowchart": { "inheritDir": true }}}%%
flowchart TB
direction LR
subgraph A
direction TB
a --> b
end
subgraph B
c --> d
end
`,
{
fontFamily: 'courier',
}
);
});
});

View File

@@ -358,6 +358,23 @@ describe('Gantt diagram', () => {
);
});
it('should render a gantt diagram with a vert tag', () => {
imgSnapshotTest(
`
gantt
title A Gantt Diagram
dateFormat ss
axisFormat %Ss
section Section
A task : a1, 00, 6s
Milestone : vert, 01,
section Another
Task in sec : 06, 3s
another task : 3s
`
);
});
it('should render a gantt diagram with tick is 2 milliseconds', () => {
imgSnapshotTest(
`

View File

@@ -161,4 +161,68 @@ describe('Timeline diagram', () => {
{}
);
});
it('11: should render timeline with many stacked events and proper timeline line length', () => {
imgSnapshotTest(
`timeline
title Medical Device Lifecycle
section Pre-Development
Quality Management System : Regulatory Compliance : Risk Management
section Development
Management Responsibility : Planning Activities : Human Resources
Resource Management : Management Reviews : Infrastructure
section Post-Development
Product Realization Activities : Planning Activities : Customer-related Processes
Post-Production Activities : Feedback : Complaints : Adverse Events
: Research and Development : Purchasing Activities
: Production Activities : Installation Activities
: Servicing Activities : Post-Market Surveillance
`,
{}
);
});
it('12: should render timeline with proper vertical line lengths for all columns', () => {
imgSnapshotTest(
`---
config:
theme: base
themeVariables:
fontFamily: Fira Sans
fontSize: 17px
cScale0: '#b3cde0'
cScale1: '#f49090'
cScale2: '#85d5b8'
---
timeline
title Medical Device Lifecycle
section Planning
Quality Management System (4): Regulatory Compliance (4.1.1)
: Risk Management (4.1.2)
Management Resposibility (5): Planning Activities (5.4)
: Management Reviews (5.6)
Resource Management (6): Human Resources (6.2)
: Infrastructure (6.3)
section Realization
Research and Development (7.3): RnD Planning (7.3.2)
: Inputs (7.3.3)
: Outputs (7.3.4)
: Review (7.3.5)
: Verification (7.3.6)
: Validation (7.3.7)
Purchasing (7.4): Purchasing Process (7.4.1)
: Purchasing Information (7.4.2)
Production (7.5): Production Activities (7.5.1)
: Production Feedback (8.2.1)
Installation (7.5.3): Installation Activities (7.5.3)
Servicing (7.5.4): Servicing Activities (7.5.4)
section Post-Production
Post-Market Activities (8): Feedback (8.2.1)
: Complaints (8.2.2)
: Adverse Events (8.2.3)
`,
{}
);
});
});

View File

@@ -7,7 +7,7 @@
rel="stylesheet"
/>
<style>
svg {
svg:not(svg svg) {
border: 2px solid darkred;
}
.exClass2 > rect,

View File

@@ -14,12 +14,28 @@ function markRendered() {
}
}
function loadFontAwesomeCSS() {
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css';
document.head.appendChild(link);
return new Promise((resolve, reject) => {
link.onload = resolve;
link.onerror = () => reject(new Error('Failed to load FontAwesome'));
});
}
/**
* ##contentLoaded Callback function that is called when page is loaded. This functions fetches
* configuration for mermaid rendering and calls init for rendering the mermaid diagrams on the
* page.
*/
const contentLoaded = async function () {
await loadFontAwesomeCSS();
await Promise.all(Array.from(document.fonts, (font) => font.load()));
let pos = document.location.href.indexOf('?graph=');
if (pos > 0) {
pos = pos + 7;
@@ -50,8 +66,13 @@ const contentLoaded = async function () {
mermaid.registerLayoutLoaders(layouts);
mermaid.initialize(graphObj.mermaid);
/**
* CC-BY-4.0
* Copyright (c) Fonticons, Inc. - https://fontawesome.com/license/free
* https://fontawesome.com/icons/bell?f=classic&s=regular
*/
const staticBellIconPack = {
prefix: 'fa6-regular',
prefix: 'fa',
icons: {
bell: {
body: '<path fill="currentColor" d="M224 0c-17.7 0-32 14.3-32 32v19.2C119 66 64 130.6 64 208v25.4c0 45.4-15.5 89.5-43.8 124.9L5.3 377c-5.8 7.2-6.9 17.1-2.9 25.4S14.8 416 24 416h400c9.2 0 17.6-5.3 21.6-13.6s2.9-18.2-2.9-25.4l-14.9-18.6c-28.3-35.5-43.8-79.6-43.8-125V208c0-77.4-55-142-128-156.8V32c0-17.7-14.3-32-32-32m0 96c61.9 0 112 50.1 112 112v25.4c0 47.9 13.9 94.6 39.7 134.6H72.3c25.8-40 39.7-86.7 39.7-134.6V208c0-61.9 50.1-112 112-112m64 352H160c0 17 6.7 33.3 18.7 45.3S207 512 224 512s33.3-6.7 45.3-18.7S288 465 288 448"/>',

View File

@@ -2,211 +2,215 @@
"durations": [
{
"spec": "cypress/integration/other/configuration.spec.js",
"duration": 5450
"duration": 6130
},
{
"spec": "cypress/integration/other/external-diagrams.spec.js",
"duration": 2004
"duration": 1974
},
{
"spec": "cypress/integration/other/ghsa.spec.js",
"duration": 3183
"duration": 3308
},
{
"spec": "cypress/integration/other/iife.spec.js",
"duration": 1913
"duration": 1877
},
{
"spec": "cypress/integration/other/interaction.spec.js",
"duration": 10944
"duration": 10902
},
{
"spec": "cypress/integration/other/rerender.spec.js",
"duration": 1938
"duration": 1836
},
{
"spec": "cypress/integration/other/xss.spec.js",
"duration": 26753
"duration": 26467
},
{
"spec": "cypress/integration/rendering/appli.spec.js",
"duration": 2571
"duration": 3129
},
{
"spec": "cypress/integration/rendering/architecture.spec.ts",
"duration": 110
"duration": 104
},
{
"spec": "cypress/integration/rendering/block.spec.js",
"duration": 14697
"duration": 16230
},
{
"spec": "cypress/integration/rendering/c4.spec.js",
"duration": 4705
"duration": 5231
},
{
"spec": "cypress/integration/rendering/classDiagram-elk-v3.spec.js",
"duration": 35841
"duration": 38113
},
{
"spec": "cypress/integration/rendering/classDiagram-handDrawn-v3.spec.js",
"duration": 34279
"duration": 36423
},
{
"spec": "cypress/integration/rendering/classDiagram-v2.spec.js",
"duration": 20641
"duration": 22509
},
{
"spec": "cypress/integration/rendering/classDiagram-v3.spec.js",
"duration": 33020
"duration": 34933
},
{
"spec": "cypress/integration/rendering/classDiagram.spec.js",
"duration": 13546
"duration": 14681
},
{
"spec": "cypress/integration/rendering/conf-and-directives.spec.js",
"duration": 8072
"duration": 8877
},
{
"spec": "cypress/integration/rendering/current.spec.js",
"duration": 2083
"duration": 2517
},
{
"spec": "cypress/integration/rendering/erDiagram-unified.spec.js",
"duration": 78269
"duration": 81226
},
{
"spec": "cypress/integration/rendering/erDiagram.spec.js",
"duration": 12578
"duration": 14211
},
{
"spec": "cypress/integration/rendering/errorDiagram.spec.js",
"duration": 2784
"duration": 3355
},
{
"spec": "cypress/integration/rendering/flowchart-elk.spec.js",
"duration": 36205
"duration": 38857
},
{
"spec": "cypress/integration/rendering/flowchart-handDrawn.spec.js",
"duration": 26627
"duration": 28570
},
{
"spec": "cypress/integration/rendering/flowchart-icon.spec.js",
"duration": 6902
},
{
"spec": "cypress/integration/rendering/flowchart-shape-alias.spec.ts",
"duration": 21332
"duration": 23075
},
{
"spec": "cypress/integration/rendering/flowchart-v2.spec.js",
"duration": 37328
"duration": 40514
},
{
"spec": "cypress/integration/rendering/flowchart.spec.js",
"duration": 25914
"duration": 28611
},
{
"spec": "cypress/integration/rendering/gantt.spec.js",
"duration": 15383
"duration": 16605
},
{
"spec": "cypress/integration/rendering/gitGraph.spec.js",
"duration": 45226
"duration": 47636
},
{
"spec": "cypress/integration/rendering/iconShape.spec.ts",
"duration": 251094
"duration": 262219
},
{
"spec": "cypress/integration/rendering/imageShape.spec.ts",
"duration": 50916
"duration": 54111
},
{
"spec": "cypress/integration/rendering/info.spec.ts",
"duration": 2489
"duration": 3006
},
{
"spec": "cypress/integration/rendering/journey.spec.js",
"duration": 5988
"duration": 6858
},
{
"spec": "cypress/integration/rendering/kanban.spec.ts",
"duration": 6225
"duration": 7281
},
{
"spec": "cypress/integration/rendering/katex.spec.js",
"duration": 3009
"duration": 3579
},
{
"spec": "cypress/integration/rendering/marker_unique_id.spec.js",
"duration": 2426
"duration": 2448
},
{
"spec": "cypress/integration/rendering/mindmap.spec.ts",
"duration": 9306
"duration": 10618
},
{
"spec": "cypress/integration/rendering/newShapes.spec.ts",
"duration": 134419
"duration": 140874
},
{
"spec": "cypress/integration/rendering/oldShapes.spec.ts",
"duration": 102434
"duration": 108015
},
{
"spec": "cypress/integration/rendering/packet.spec.ts",
"duration": 3373
"duration": 4241
},
{
"spec": "cypress/integration/rendering/pie.spec.ts",
"duration": 4898
"duration": 5645
},
{
"spec": "cypress/integration/rendering/quadrantChart.spec.js",
"duration": 7578
"duration": 8524
},
{
"spec": "cypress/integration/rendering/radar.spec.js",
"duration": 4526
"duration": 5203
},
{
"spec": "cypress/integration/rendering/requirement.spec.js",
"duration": 2172
"duration": 2635
},
{
"spec": "cypress/integration/rendering/requirementDiagram-unified.spec.js",
"duration": 47175
"duration": 50512
},
{
"spec": "cypress/integration/rendering/sankey.spec.ts",
"duration": 5717
"duration": 6692
},
{
"spec": "cypress/integration/rendering/sequencediagram.spec.js",
"duration": 32556
"duration": 34559
},
{
"spec": "cypress/integration/rendering/stateDiagram-v2.spec.js",
"duration": 22572
"duration": 24421
},
{
"spec": "cypress/integration/rendering/stateDiagram.spec.js",
"duration": 14064
"duration": 15316
},
{
"spec": "cypress/integration/rendering/theme.spec.js",
"duration": 26565
"duration": 28240
},
{
"spec": "cypress/integration/rendering/timeline.spec.ts",
"duration": 6233
"duration": 6808
},
{
"spec": "cypress/integration/rendering/xyChart.spec.js",
"duration": 17750
"duration": 19359
},
{
"spec": "cypress/integration/rendering/zenuml.spec.js",
"duration": 2696
"duration": 3164
}
]
}

222
demos/er-multiline.html Normal file
View File

@@ -0,0 +1,222 @@
<html>
<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
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"
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" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&family=Kalam:wght@300;400;700&family=Rubik+Mono+One&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&family=Rubik+Mono+One&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Recursive:wght@300..1000&display=swap"
rel="stylesheet"
/>
<style>
.recursive-500 {
font-family: 'Recursive', serif;
font-optical-sizing: auto;
font-weight: 500;
font-style: normal;
font-variation-settings:
'slnt' 0,
'CASL' 0,
'CRSV' 0.5,
'MONO' 0;
}
body {
/* background: rgb(221, 208, 208); */
/* background: #333; */
/* font-family: 'Arial'; */
font-family: 'Recursive', serif;
font-optical-sizing: auto;
font-weight: 500;
font-style: normal;
font-variation-settings:
'slnt' 0,
'CASL' 0,
'CRSV' 0.5,
'MONO' 0;
/* color: white; */
/* font-size: 18px !important; */
}
.gridify.tiny {
background-image:
linear-gradient(transparent 11px, rgba(220, 220, 200, 0.8) 12px, transparent 12px),
linear-gradient(90deg, transparent 11px, rgba(220, 220, 200, 0.8) 12px, transparent 12px);
background-size:
100% 12px,
12px 100%;
}
.gridify.dots {
background-image: radial-gradient(
circle at center,
rgba(220, 220, 200, 0.8) 1px,
transparent 1px
);
background-size: 24px 24px;
}
h1 {
color: grey;
}
.mermaid2 {
display: none;
}
.mermaid svg {
font-size: 16px !important;
font-family: 'Recursive', serif;
font-optical-sizing: auto;
font-weight: 500;
font-style: normal;
font-variation-settings:
'slnt' 0,
'CASL' 0,
'CRSV' 0.5,
'MONO' 0;
}
pre {
width: 100%;
/*box-shadow: 4px 4px 0px 0px #0000000F;*/
}
</style>
</head>
<body class="gridify dots">
<div class="w-full h-64">
<pre id="diagram4" class="mermaid" style="background: rgb(255, 255, 255)">
erDiagram
CAR ||--o{ NAMED-DRIVER : allows
CAR ::: Pine {
string registrationNumber PK "Primary Key<br><strong>Unique registration number</strong>"
string make "Car make<br><strong>e.g., Toyota</strong>"
string model "Model of the car<br><strong>e.g., Corolla</strong>"
string[] parts "List of parts<br><strong>Stored as array</strong>"
}
PERSON ||--o{ NAMED-DRIVER : is
PERSON ::: someclass {
string driversLicense PK "The license #<br><strong>Primary Key</strong>"
string(99) firstName "Only 99 characters <br>are allowed <br> <strong>e.g., Smith</strong>"
string lastName "Last name of person<br><strong>e.g., Smith</strong>"
string phone UK "Unique phone number<br><strong>Used for contact</strong>"
int age "Age of the person<br><strong>Must be numeric</strong>"
}
NAMED-DRIVER {
string carRegistrationNumber PK, FK, UK, PK "Foreign key to CAR<br><strong>Also part of PK</strong>"
string driverLicence PK, FK "Foreign key to PERSON<br><strong>Also part of PK</strong>"
}
MANUFACTURER only one to zero or more CAR : makesx
</pre>
<hr />
<pre class="mermaid">
erDiagram
_**testẽζØ😀㌕ぼ**_ {
*__List~List~int~~sdfds__* **driversLicense** PK "***The l😀icense #***"
string last*Name*
string __phone__ UK
*string(99)~T~~~~~~* firstName "Only __99__ <br>characters are a<br>llowed dsfsdfsdfsdfs"
int _age_
}
</pre>
</div>
<script type="module">
import mermaid from './mermaid.esm.mjs';
import layouts from './mermaid-layout-elk.esm.mjs';
const staticBellIconPack = {
prefix: 'fa6-regular',
icons: {
bell: {
body: '<path fill="currentColor" d="M224 0c-17.7 0-32 14.3-32 32v19.2C119 66 64 130.6 64 208v25.4c0 45.4-15.5 89.5-43.8 124.9L5.3 377c-5.8 7.2-6.9 17.1-2.9 25.4S14.8 416 24 416h400c9.2 0 17.6-5.3 21.6-13.6s2.9-18.2-2.9-25.4l-14.9-18.6c-28.3-35.5-43.8-79.6-43.8-125V208c0-77.4-55-142-128-156.8V32c0-17.7-14.3-32-32-32m0 96c61.9 0 112 50.1 112 112v25.4c0 47.9 13.9 94.6 39.7 134.6H72.3c25.8-40 39.7-86.7 39.7-134.6V208c0-61.9 50.1-112 112-112m64 352H160c0 17 6.7 33.3 18.7 45.3S207 512 224 512s33.3-6.7 45.3-18.7S288 465 288 448"/>',
width: 448,
},
},
width: 512,
height: 512,
};
mermaid.registerIconPacks([
{
name: 'logos',
loader: () =>
fetch('https://unpkg.com/@iconify-json/logos@1/icons.json').then((res) => res.json()),
},
{
name: 'fa',
loader: () => staticBellIconPack,
},
]);
mermaid.registerLayoutLoaders(layouts);
mermaid.parseError = function (err, hash) {
console.error('Mermaid error: ', err);
};
window.callback = function () {
alert('A callback was triggered');
};
function callback() {
alert('It worked');
}
await mermaid.initialize({
startOnLoad: false,
theme: 'forest',
look: 'classic',
layout: 'dagre',
// theme: 'default',
// look: 'classic',
flowchart: { titleTopMargin: 10 },
fontFamily: 'Recursive',
sequence: {
actorFontFamily: 'courier',
noteFontFamily: 'courier',
messageFontFamily: 'courier',
},
kanban: {
htmlLabels: false,
},
fontSize: 16,
logLevel: 0,
securityLevel: 'loose',
callback,
});
// setTimeout(() => {
mermaid.init(undefined, document.querySelectorAll('.mermaid'));
// }, 1000);
mermaid.parseError = function (err, hash) {
console.error('In parse error:');
console.error(err);
};
</script>
</body>
</html>

View File

@@ -23,6 +23,23 @@
1940 : fourth step : fifth step
</pre>
<h2>Medical Device Lifecycle Timeline</h2>
<pre class="mermaid">
timeline
title Medical Device Lifecycle
section Planning
Quality Management System (4) : Regulatory Compliance (4.1) : Risk Management (4.1.3) : Management Review (5.6) : Infrastructure (6.3)
Management Responsibility (5) : Planning Activities (5.2) : Human Resources (6.2) : RnD Planning (7.3.2) : Purchasing Process (7.4.1) : Production Activities (7.5.1) : Installation Activities (7.5.3) : Servicing Activities (7.5.4)
section Realization
Research and Development (7.3) : Inputs (7.3.3) : Outputs (7.3.4) : Review (7.3.5) : Verification (7.3.6) : Validation (7.3.7)
Purchasing (7.4) : Purchasing Information (7.4.2) : Production Feedback (8.2.1)
Production (7.5) : Production Feedback (8.2.1)
Installation (7.5.3) : Installation Activities (7.5.3)
Servicing (7.5.4) : Servicing Activities (7.5.4)
section Post-Production
Post-Market Activities (8) : Feedback (8.2.1) : Complaints (8.2.2) : Adverse Events (8.2.3)
</pre>
<script type="module">
import mermaid from './mermaid.esm.mjs';
mermaid.initialize({

View File

@@ -10,16 +10,20 @@
<h1>Zenuml demos</h1>
<pre class="mermaid">
zenuml
title Sync Messages (Design Pattern: Adapter)
@Starter(Client)
Adapter.interfaceMethod() {
translateParameter(parameter)
result = Implementation.implementationMethod()
translateResult()
return translatedResult
}
BookLibService.Borrow(id) {
User = Session.GetUser()
if(User.isActive) {
try {
BookRepository.Update(id, onLoan, User)
receipt = new Receipt(id, dueDate)
} catch (BookNotFoundException) {
ErrorService.onException(BookNotFoundException)
} finally {
Connection.close()
}
}
return receipt
}
</pre>
<pre class="mermaid">
zenuml

View File

@@ -22,4 +22,4 @@ This helps the team know the relative interest in something and helps them set p
You have not found anything that already addresses your request, or maybe you have come up with the new idea? Feel free to open a new issue or discussion.
Log in to [GitHub.com](https://www.github.com), and use [GitHub issue tracker of the mermaid-js repository](https://github.com/mermaid-js/mermaid/issues). Press \[<https://github.com/mermaid-js/mermaid/issues/new/choose>] issue, select the appropriate template and describe your problem.
Log in to [GitHub.com](https://www.github.com), and use [GitHub issue tracker of the mermaid-js repository](https://github.com/mermaid-js/mermaid/issues). Press [issue, select the appropriate template](https://github.com/mermaid-js/mermaid/issues/new/choose) and describe your problem.

View File

@@ -12,4 +12,4 @@
> `const` **configKeys**: `Set`<`string`>
Defined in: [packages/mermaid/src/defaultConfig.ts:274](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/defaultConfig.ts#L274)
Defined in: [packages/mermaid/src/defaultConfig.ts:278](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/defaultConfig.ts#L278)

View File

@@ -141,7 +141,7 @@ The theming engine will only recognize hex colors and not color names. So, the v
| -------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| darkMode | false | Affects how derived colors are calculated. Set value to `true` for dark mode. |
| background | #f4f4f4 | Used to calculate color for items that should either be background colored or contrasting to the background |
| fontFamily | trebuchet ms, verdana, arial | |
| fontFamily | trebuchet ms, verdana, arial | Font family for diagram text |
| fontSize | 16px | Font size in pixels |
| primaryColor | #fff4dd | Color to be used as background in nodes, other colors will be derived from this |
| primaryTextColor | calculated from darkMode #ddd/#333 | Color to be used as text color in nodes using `primaryColor` |

View File

@@ -98,6 +98,12 @@ Mermaid can load multiple diagrams, in the same page.
> Try it out, save this code as HTML and load it using any browser.
> (Except Internet Explorer, please don't use Internet Explorer.)
## Tiny Mermaid
We offer a smaller version of Mermaid that's approximately half the size of the full library. This tiny version doesn't support Mindmap Diagrams, Architecture Diagrams, KaTeX rendering, or lazy loading.
If you need a more lightweight version without these features, you can use [Mermaid Tiny](https://github.com/mermaid-js/mermaid/tree/develop/packages/tiny).
## Enabling Click Event and Tags in Nodes
A `securityLevel` configuration has to first be cleared. `securityLevel` sets the level of trust for the parsed diagrams and limits click functionality. This was introduced in version 8.2 as a security improvement, aimed at preventing malicious use.

View File

@@ -115,6 +115,8 @@ Content Management Systems/Enterprise Content Management
- [Grav CMS](https://getgrav.org/)
- [Mermaid Diagrams Plugin](https://github.com/DanielFlaum/grav-plugin-mermaid-diagrams)
- [GitLab Markdown Adapter](https://github.com/Goutte/grav-plugin-gitlab-markdown-adapter)
- [Tiki](https://tiki.org)
- [Tracker Entity Relationship Diagram](https://doc.tiki.org/Tracker-Entity-Relationship-Diagram)
- [VitePress](https://vitepress.vuejs.org/)
- [Plugin for Mermaid.js](https://emersonbottero.github.io/vitepress-plugin-mermaid/)
- [VuePress](https://vuepress.vuejs.org/)

View File

@@ -354,6 +354,7 @@ To Deploy Mermaid:
- [Mermaid Live Editor](https://github.com/mermaid-js/mermaid-live-editor)
- [Mermaid CLI](https://github.com/mermaid-js/mermaid-cli)
- [Mermaid Tiny](https://github.com/mermaid-js/mermaid/tree/develop/packages/tiny)
- [Mermaid Webpack Demo](https://github.com/mermaidjs/mermaid-webpack-demo)
- [Mermaid Parcel Demo](https://github.com/mermaidjs/mermaid-parcel-demo)

View File

@@ -14,7 +14,11 @@ Diagram Examples can be found in the [Mermaid Live Editor](https://mermaid.live)
## Syntax Structure
One would notice that all **Diagrams definitions begin** with a declaration of the **diagram type**, followed by the definitions of the diagram and its contents. This declaration notifies the parser which kind of diagram the code is supposed to generate.
One would notice that all **Diagrams definitions begin** with a declaration of the **diagram type**, followed by the definitions of the diagram and its contents. This declaration notifies the parser which kind of diagram the code is supposed to generate. The only exception to this a [Frontmatter](#frontmatter-for-diagram-code) configuration.
Line comments can ignore anything on the line after '%% '.
Unknown words and misspellings will break a diagram, while parameters silently fail.
**Example** : The code below is for an Entity Relationship Diagram, specified by the `erDiagram` declaration. What follows is the definition of the different `Entities` represented in it.
@@ -72,10 +76,50 @@ The following are the most commonly used methods, and they are all tied to Merma
Here you can edit certain values to change the behavior and appearance of the diagram.
Each of these techniques are functionally equivalent, but better for different deployments.
### [The initialize() call](./getting-started.md#_3-calling-the-javascript-api)
Used when Mermaid is called via an API, or through a `<script>` tag.
### Frontmatter for diagram code
Frontmatter is the term for adding YAML metadata at the start of code. This allows for reconfiguration of a diagram before it is rendered. You can pass metadata Frontmatter with your definition by adding `---` to the lines before and after the definition. This 'triple dash' MUST be the only character on the first line.
Frontmatter uses YAML syntax. It requires any indentation to be consistent and settings are case sensitive. Mermaid will silently ignore misspelling, but badly formed parameters will break the diagram.
```mermaid-example
---
title: Frontmatter Example
displayMode: compact
config:
theme: forest
gantt:
useWidth: 400
compact: true
---
gantt
section Waffle
Iron : 1982, 3y
House : 1986, 3y
```
```mermaid
---
title: Frontmatter Example
displayMode: compact
config:
theme: forest
gantt:
useWidth: 400
compact: true
---
gantt
section Waffle
Iron : 1982, 3y
House : 1986, 3y
```
### [Directives](../config/directives.md)
Allows for the limited reconfiguration of a diagram just before it is rendered. It can alter the font style, color and other aesthetic aspects of the diagram. You can pass a directive alongside your definition inside `%%{ }%%`. It can be done either above or below your diagram definition.

View File

@@ -0,0 +1,9 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="48" height="48" rx="12" fill="#E0095F"/>
<mask id="mask0_1_24" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="9" y="9" width="30" height="30">
<rect x="9" y="9" width="30" height="30" fill="#D9D9D9"/>
</mask>
<g mask="url(#mask0_1_24)">
<path d="M24 30.875C25.2083 30.875 26.3229 30.5833 27.3438 30C28.3646 29.4167 29.1875 28.625 29.8125 27.625C29.9375 27.375 29.9271 27.125 29.7812 26.875C29.6354 26.625 29.4167 26.5 29.125 26.5H18.875C18.5833 26.5 18.3646 26.625 18.2188 26.875C18.0729 27.125 18.0625 27.375 18.1875 27.625C18.8125 28.625 19.6406 29.4167 20.6719 30C21.7031 30.5833 22.8125 30.875 24 30.875ZM20.125 21.4375L20.7813 22.0938C20.9688 22.2813 21.1875 22.375 21.4375 22.375C21.6875 22.375 21.9063 22.2813 22.0938 22.0938C22.2813 21.9063 22.3698 21.6875 22.3594 21.4375C22.349 21.1875 22.2604 20.9688 22.0938 20.7813L21 19.6563C20.75 19.4063 20.4531 19.2812 20.1094 19.2812C19.7656 19.2812 19.4688 19.4063 19.2188 19.6563L18.0938 20.7813C17.9063 20.9688 17.8125 21.1875 17.8125 21.4375C17.8125 21.6875 17.9063 21.9063 18.0938 22.0938C18.2604 22.2604 18.474 22.349 18.7344 22.3594C18.9948 22.3698 19.2188 22.2917 19.4063 22.125L20.125 21.4375ZM27.875 21.4375L28.5938 22.125C28.7813 22.2917 29 22.375 29.25 22.375C29.5 22.375 29.7188 22.2813 29.9063 22.0938C30.0938 21.9063 30.1875 21.6875 30.1875 21.4375C30.1875 21.1875 30.0938 20.9688 29.9063 20.7813L28.7812 19.6563C28.5312 19.4063 28.2344 19.2812 27.8906 19.2812C27.5469 19.2812 27.25 19.4063 27 19.6563L25.875 20.7813C25.7083 20.9688 25.625 21.1875 25.625 21.4375C25.625 21.6875 25.7188 21.9063 25.9063 22.0938C26.0938 22.2813 26.3125 22.375 26.5625 22.375C26.8125 22.375 27.0312 22.2813 27.2187 22.0938L27.875 21.4375ZM24 36.5C22.2708 36.5 20.6458 36.1719 19.125 35.5156C17.6042 34.8594 16.2812 33.9688 15.1562 32.8438C14.0312 31.7188 13.1406 30.3958 12.4844 28.875C11.8281 27.3542 11.5 25.7292 11.5 24C11.5 22.2708 11.8281 20.6458 12.4844 19.125C13.1406 17.6042 14.0312 16.2812 15.1562 15.1562C16.2812 14.0312 17.6042 13.1406 19.125 12.4844C20.6458 11.8281 22.2708 11.5 24 11.5C25.7292 11.5 27.3542 11.8281 28.875 12.4844C30.3958 13.1406 31.7188 14.0312 32.8438 15.1562C33.9688 16.2812 34.8594 17.6042 35.5156 19.125C36.1719 20.6458 36.5 22.2708 36.5 24C36.5 25.7292 36.1719 27.3542 35.5156 28.875C34.8594 30.3958 33.9688 31.7188 32.8438 32.8438C31.7188 33.9688 30.3958 34.8594 28.875 35.5156C27.3542 36.1719 25.7292 36.5 24 36.5ZM24 34C26.7917 34 29.1563 33.0313 31.0938 31.0938C33.0313 29.1563 34 26.7917 34 24C34 21.2083 33.0313 18.8438 31.0938 16.9063C29.1563 14.9688 26.7917 14 24 14C21.2083 14 18.8438 14.9688 16.9063 16.9063C14.9688 18.8438 14 21.2083 14 24C14 26.7917 14.9688 29.1563 16.9063 31.0938C18.8438 33.0313 21.2083 34 24 34Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,9 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="48" height="48" rx="12" fill="#E0095F"/>
<mask id="mask0_2_44" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="9" y="9" width="30" height="30">
<rect x="9" y="9" width="30" height="30" fill="#D9D9D9"/>
</mask>
<g mask="url(#mask0_2_44)">
<path d="M32.75 27.75C32.3958 27.75 32.099 27.6302 31.8594 27.3906C31.6198 27.151 31.5 26.8542 31.5 26.5C31.5 26.1458 31.6198 25.849 31.8594 25.6094C32.099 25.3698 32.3958 25.25 32.75 25.25H34C34.3542 25.25 34.651 25.3698 34.8906 25.6094C35.1302 25.849 35.25 26.1458 35.25 26.5C35.25 26.8542 35.1302 27.151 34.8906 27.3906C34.651 27.6302 34.3542 27.75 34 27.75H32.75ZM32.75 32.75C32.3958 32.75 32.099 32.6302 31.8594 32.3906C31.6198 32.151 31.5 31.8542 31.5 31.5C31.5 31.1458 31.6198 30.849 31.8594 30.6094C32.099 30.3698 32.3958 30.25 32.75 30.25H34C34.3542 30.25 34.651 30.3698 34.8906 30.6094C35.1302 30.849 35.25 31.1458 35.25 31.5C35.25 31.8542 35.1302 32.151 34.8906 32.3906C34.651 32.6302 34.3542 32.75 34 32.75H32.75ZM26.5 34C25.8125 34 25.224 33.7552 24.7344 33.2656C24.2448 32.776 24 32.1875 24 31.5H22.75C22.3958 31.5 22.099 31.3802 21.8594 31.1406C21.6198 30.901 21.5 30.6042 21.5 30.25V27.75C21.5 27.3958 21.6198 27.099 21.8594 26.8594C22.099 26.6198 22.3958 26.5 22.75 26.5H24C24 25.8125 24.2448 25.224 24.7344 24.7344C25.224 24.2448 25.8125 24 26.5 24H29C29.3542 24 29.651 24.1198 29.8906 24.3594C30.1302 24.599 30.25 24.8958 30.25 25.25V32.75C30.25 33.1042 30.1302 33.401 29.8906 33.6406C29.651 33.8802 29.3542 34 29 34H26.5ZM17.75 30.25C16.375 30.25 15.1979 29.7604 14.2188 28.7812C13.2396 27.8021 12.75 26.625 12.75 25.25C12.75 23.875 13.2396 22.6979 14.2188 21.7188C15.1979 20.7396 16.375 20.25 17.75 20.25H19.625C20.1458 20.25 20.5885 20.0677 20.9531 19.7031C21.3177 19.3385 21.5 18.8958 21.5 18.375C21.5 17.8542 21.3177 17.4115 20.9531 17.0469C20.5885 16.6823 20.1458 16.5 19.625 16.5H15.25C14.8958 16.5 14.599 16.3802 14.3594 16.1406C14.1198 15.901 14 15.6042 14 15.25C14 14.8958 14.1198 14.599 14.3594 14.3594C14.599 14.1198 14.8958 14 15.25 14H19.625C20.8333 14 21.8646 14.4271 22.7187 15.2812C23.5729 16.1354 24 17.1667 24 18.375C24 19.5833 23.5729 20.6146 22.7187 21.4687C21.8646 22.3229 20.8333 22.75 19.625 22.75H17.75C17.0625 22.75 16.474 22.9948 15.9844 23.4844C15.4948 23.974 15.25 24.5625 15.25 25.25C15.25 25.9375 15.4948 26.526 15.9844 27.0156C16.474 27.5052 17.0625 27.75 17.75 27.75H19C19.3542 27.75 19.651 27.8698 19.8906 28.1094C20.1302 28.349 20.25 28.6458 20.25 29C20.25 29.3542 20.1302 29.651 19.8906 29.8906C19.651 30.1302 19.3542 30.25 19 30.25H17.75Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -0,0 +1,9 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="48" height="48" rx="12" fill="#E0095F"/>
<mask id="mask0_2_49" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="9" y="9" width="30" height="30">
<rect x="9" y="9" width="30" height="30" fill="#D9D9D9"/>
</mask>
<g mask="url(#mask0_2_49)">
<path d="M22.75 32.75V28.875C21.7292 28.6458 20.8177 28.2135 20.0156 27.5781C19.2135 26.9427 18.625 26.1458 18.25 25.1875C16.6875 25 15.3802 24.3177 14.3281 23.1406C13.276 21.9635 12.75 20.5833 12.75 19V17.75C12.75 17.0625 12.9948 16.474 13.4844 15.9844C13.974 15.4948 14.5625 15.25 15.25 15.25H17.75C17.75 14.5625 17.9948 13.974 18.4844 13.4844C18.974 12.9948 19.5625 12.75 20.25 12.75H27.75C28.4375 12.75 29.026 12.9948 29.5156 13.4844C30.0052 13.974 30.25 14.5625 30.25 15.25H32.75C33.4375 15.25 34.026 15.4948 34.5156 15.9844C35.0052 16.474 35.25 17.0625 35.25 17.75V19C35.25 20.5833 34.724 21.9635 33.6719 23.1406C32.6198 24.3177 31.3125 25 29.75 25.1875C29.375 26.1458 28.7865 26.9427 27.9844 27.5781C27.1823 28.2135 26.2708 28.6458 25.25 28.875V32.75H29C29.3542 32.75 29.651 32.8698 29.8906 33.1094C30.1302 33.349 30.25 33.6458 30.25 34C30.25 34.3542 30.1302 34.651 29.8906 34.8906C29.651 35.1302 29.3542 35.25 29 35.25H19C18.6458 35.25 18.349 35.1302 18.1094 34.8906C17.8698 34.651 17.75 34.3542 17.75 34C17.75 33.6458 17.8698 33.349 18.1094 33.1094C18.349 32.8698 18.6458 32.75 19 32.75H22.75ZM17.75 22.5V17.75H15.25V19C15.25 19.7917 15.4792 20.5052 15.9375 21.1406C16.3958 21.776 17 22.2292 17.75 22.5ZM24 26.5C25.0417 26.5 25.9271 26.1354 26.6562 25.4062C27.3854 24.6771 27.75 23.7917 27.75 22.75V15.25H20.25V22.75C20.25 23.7917 20.6146 24.6771 21.3438 25.4062C22.0729 26.1354 22.9583 26.5 24 26.5ZM30.25 22.5C31 22.2292 31.6042 21.776 32.0625 21.1406C32.5208 20.5052 32.75 19.7917 32.75 19V17.75H30.25V22.5Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 200 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 200 KiB

View File

@@ -0,0 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
<mask
id="mask0_89_26528"
style="mask-type: alpha"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="20"
height="20"
>
<rect width="20" height="20" fill="currentColor" />
</mask>
<g mask="url(#mask0_89_26528)">
<path
d="M10.25 12.9792C11.2083 12.9792 12.0312 12.6667 12.7188 12.0417C13.4062 11.4167 13.75 10.6671 13.75 9.79292C13.75 9.01431 13.4965 8.35069 12.9896 7.80208C12.4826 7.25347 11.8747 6.97917 11.1656 6.97917C10.5248 6.97917 9.98285 7.1875 9.53979 7.60417C9.0966 8.02083 8.875 8.52083 8.875 9.10417C8.875 9.38194 8.92528 9.63847 9.02583 9.87375C9.12639 10.109 9.27056 10.3247 9.45833 10.5208L10.5208 9.45833C10.4722 9.41667 10.4358 9.36458 10.4115 9.30208C10.3872 9.23958 10.375 9.17687 10.375 9.11396C10.375 8.94076 10.4514 8.79167 10.6042 8.66667C10.7569 8.54167 10.9444 8.47917 11.1667 8.47917C11.4583 8.47917 11.7118 8.60806 11.9271 8.86583C12.1424 9.12361 12.25 9.43222 12.25 9.79167C12.25 10.25 12.0521 10.6458 11.6562 10.9792C11.2604 11.3125 10.7933 11.4792 10.255 11.4792C9.57111 11.4792 8.98264 11.191 8.48958 10.6146C7.99653 10.0382 7.75 9.35417 7.75 8.5625C7.75 8.13514 7.82986 7.72625 7.98958 7.33583C8.14931 6.94528 8.38194 6.59722 8.6875 6.29167L7.625 5.25C7.18056 5.69444 6.84028 6.20139 6.60417 6.77083C6.36806 7.34028 6.25 7.9375 6.25 8.5625C6.25 9.78472 6.63889 10.8264 7.41667 11.6875C8.19444 12.5486 9.13889 12.9792 10.25 12.9792ZM5.5 18V14.3542C4.70833 13.6875 4.09375 12.8849 3.65625 11.9465C3.21875 11.008 3 10.0189 3 8.97917C3 7.04056 3.68257 5.39271 5.04771 4.03563C6.41285 2.67854 8.07056 2 10.0208 2C11.5347 2 12.8958 2.40625 14.1042 3.21875C15.3125 4.03125 16.1111 5.09028 16.5 6.39583L17.875 11.0417C17.9444 11.2844 17.9062 11.5049 17.7604 11.7029C17.6146 11.901 17.4167 12 17.1667 12H16V14.5C16 14.9125 15.8531 15.2656 15.5594 15.5594C15.2656 15.8531 14.9125 16 14.5 16H12.5V18H11V14.5H14.5V10.5H16.1667L15.0833 6.89583C14.7778 5.89583 14.1562 5.07986 13.2188 4.44792C12.2812 3.81597 11.2153 3.5 10.0208 3.5C8.47917 3.5 7.17361 4.03215 6.10417 5.09646C5.03472 6.16076 4.5 7.455 4.5 8.97917C4.5 9.79764 4.67361 10.5751 5.02083 11.3117C5.36806 12.0483 5.85417 12.6806 6.47917 13.2083L7 13.6667V18H5.5Z"
fill="currentColor"
/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
<mask
id="mask0_89_26616"
style="mask-type: alpha"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="20"
height="20"
>
<rect width="20" height="20" fill="currentColor" />
</mask>
<g mask="url(#mask0_89_26616)">
<path
d="M4 16.9999V14.4999H5.875L4.4375 8.77077C3.99306 8.56244 3.64236 8.25341 3.38542 7.84369C3.12847 7.43396 3 6.98605 3 6.49993C3 5.7916 3.24306 5.19785 3.72917 4.71868C4.21528 4.23952 4.8125 3.99993 5.52083 3.99993C6.0625 3.99993 6.55208 4.15966 6.98958 4.4791C7.42708 4.79855 7.72222 5.22216 7.875 5.74993H9.5V4.74993C9.5 4.5416 9.57292 4.36452 9.71875 4.21868C9.86458 4.07285 10.0417 3.99993 10.25 3.99993C10.4583 3.99993 10.6354 4.07285 10.7812 4.21868C10.9271 4.36452 11 4.5416 11 4.74993V4.89577L13 3.18743C13.1111 3.09021 13.2361 3.03466 13.375 3.02077C13.5139 3.00688 13.6528 3.02771 13.7917 3.08327L16.5625 4.33327C16.7569 4.4166 16.8924 4.55202 16.9688 4.73952C17.0451 4.92702 17.0347 5.11799 16.9375 5.31243C16.8542 5.49299 16.7153 5.61799 16.5208 5.68743C16.3264 5.75688 16.1319 5.75688 15.9375 5.68743L13.6042 4.64577L11.4167 6.49993L13.6042 8.37494L15.9375 7.33327C16.1319 7.24993 16.3229 7.24299 16.5104 7.31244C16.6979 7.38188 16.8403 7.51382 16.9375 7.70827C17.0208 7.88882 17.0243 8.06938 16.9479 8.24994C16.8715 8.43049 16.7431 8.57632 16.5625 8.68744L13.7917 9.93744C13.6667 10.0069 13.5312 10.0312 13.3854 10.0104C13.2396 9.98952 13.1111 9.93049 13 9.83327L11 8.12494V8.24994C11 8.45827 10.9271 8.63535 10.7812 8.78119C10.6354 8.92702 10.4583 8.99994 10.25 8.99994C10.0417 8.99994 9.86458 8.92702 9.71875 8.78119C9.57292 8.63535 9.5 8.45827 9.5 8.24994V7.24994H7.875C7.81944 7.44438 7.73958 7.62146 7.63542 7.78119C7.53125 7.94091 7.40972 8.09716 7.27083 8.24994L10.8542 14.4999H14V16.9999H4ZM5.5 7.62494C5.81944 7.62494 6.08681 7.5173 6.30208 7.30202C6.51736 7.08674 6.625 6.81938 6.625 6.49993C6.625 6.19438 6.51736 5.93396 6.30208 5.71868C6.08681 5.50341 5.81944 5.39577 5.5 5.39577C5.18056 5.39577 4.91319 5.50341 4.69792 5.71868C4.48264 5.93396 4.375 6.19438 4.375 6.49993C4.375 6.81938 4.48264 7.08674 4.69792 7.30202C4.91319 7.5173 5.18056 7.62494 5.5 7.62494ZM7.41667 14.4999H9.125L6.08333 9.18744L7.41667 14.4999Z"
fill="currentColor"
/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
<mask
id="mask0_89_26596"
style="mask-type: alpha"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="20"
height="20"
>
<rect width="20" height="20" fill="currentColor" />
</mask>
<g mask="url(#mask0_89_26596)">
<path
d="M5 12H15V10.5H5V12ZM5 9.25H15V7.75H5V9.25ZM5 6.5H15V5H5V6.5ZM18 18L15 15H3.5C3.0875 15 2.73438 14.8531 2.44063 14.5594C2.14688 14.2656 2 13.9125 2 13.5V3.5C2 3.0875 2.14688 2.73438 2.44063 2.44063C2.73438 2.14688 3.0875 2 3.5 2H16.5C16.9125 2 17.2656 2.14688 17.5594 2.44063C17.8531 2.73438 18 3.0875 18 3.5V18ZM3.5 13.5H15.625L16.5 14.375V3.5H3.5V13.5Z"
fill="currentColor"
/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 764 B

View File

@@ -0,0 +1,11 @@
<svg
xmlns="http://www.w3.org/2000/svg"
height="24px"
viewBox="0 -960 960 960"
width="24px"
fill="currentColor"
>
<path
d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h240l80 80h320q33 0 56.5 23.5T880-640v400q0 33-23.5 56.5T800-160H160Zm0-80h640v-400H447l-80-80H160v480Zm0 0v-480 480Z"
/>
</svg>

After

Width:  |  Height:  |  Size: 329 B

View File

@@ -0,0 +1,11 @@
<svg
xmlns="http://www.w3.org/2000/svg"
height="24px"
viewBox="0 -960 960 960"
width="24px"
fill="currentColor"
>
<path
d="M40-160v-112q0-34 17.5-62.5T104-378q62-31 126-46.5T360-440q66 0 130 15.5T616-378q29 15 46.5 43.5T680-272v112H40Zm720 0v-120q0-44-24.5-84.5T666-434q51 6 96 20.5t84 35.5q36 20 55 44.5t19 53.5v120H760ZM360-480q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47Zm400-160q0 66-47 113t-113 47q-11 0-28-2.5t-28-5.5q27-32 41.5-71t14.5-81q0-42-14.5-81T544-792q14-5 28-6.5t28-1.5q66 0 113 47t47 113ZM120-240h480v-32q0-11-5.5-20T580-306q-54-27-109-40.5T360-360q-56 0-111 13.5T140-306q-9 5-14.5 14t-5.5 20v32Zm240-320q33 0 56.5-23.5T440-640q0-33-23.5-56.5T360-720q-33 0-56.5 23.5T280-640q0 33 23.5 56.5T360-560Zm0 320Zm0-400Z"
/>
</svg>

After

Width:  |  Height:  |  Size: 794 B

View File

@@ -0,0 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
<mask
id="mask0_89_26621"
style="mask-type: alpha"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="20"
height="20"
>
<rect width="20" height="20" fill="currentColor" />
</mask>
<g mask="url(#mask0_89_26621)">
<path
d="M3.5 11.5L5.5 9.5L3.5 7.5L1.5 9.5L3.5 11.5ZM14.5 11.5L16.5 8L18.5 11.5H14.5ZM9.98958 10.5C9.30208 10.5 8.71528 10.2569 8.22917 9.77083C7.74306 9.28472 7.5 8.69444 7.5 8C7.5 7.30556 7.74306 6.71528 8.22917 6.22917C8.71528 5.74306 9.30556 5.5 10 5.5C10.6944 5.5 11.2847 5.74306 11.7708 6.22917C12.2569 6.71528 12.5 7.30903 12.5 8.01042C12.5 8.69792 12.2569 9.28472 11.7708 9.77083C11.2847 10.2569 10.691 10.5 9.98958 10.5ZM10 7C9.71667 7 9.47917 7.09583 9.2875 7.2875C9.09583 7.47917 9 7.71667 9 8C9 8.28333 9.09583 8.52083 9.2875 8.7125C9.47917 8.90417 9.71667 9 10 9C10.2833 9 10.5208 8.90417 10.7125 8.7125C10.9042 8.52083 11 8.28333 11 8C11 7.71667 10.9042 7.47917 10.7125 7.2875C10.5208 7.09583 10.2833 7 10 7ZM0 15.5V14.25C0 13.5139 0.34375 12.9722 1.03125 12.625C1.71875 12.2778 2.54167 12.1042 3.5 12.1042C3.70833 12.1042 3.91667 12.1146 4.125 12.1354C4.33333 12.1563 4.54167 12.1875 4.75 12.2292C4.5 12.4792 4.3125 12.7951 4.1875 13.1771C4.0625 13.559 4 13.9167 4 14.25V15.5H0ZM5 15.5V14.2604C5 13.434 5.42361 12.7674 6.27083 12.2604C7.11806 11.7535 8.36111 11.5 10 11.5C11.6389 11.5 12.8819 11.7528 13.7292 12.2585C14.5764 12.7644 15 13.4282 15 14.25V15.5H5ZM16.5 12.1042C17.4583 12.1042 18.2812 12.2778 18.9688 12.625C19.6562 12.9722 20 13.5139 20 14.25V15.5H16V14.25C16 13.9167 15.941 13.559 15.8229 13.1771C15.7049 12.7951 15.5139 12.4792 15.25 12.2292C15.4583 12.1875 15.6652 12.1563 15.8706 12.1354C16.0759 12.1146 16.2857 12.1042 16.5 12.1042ZM10 13C9.11111 13 8.40972 13.0799 7.89583 13.2396C7.38194 13.3993 6.93056 13.6528 6.54167 14H13.4583C13.0556 13.6528 12.6007 13.3993 12.0938 13.2396C11.5868 13.0799 10.8889 13 10 13Z"
fill="currentColor"
/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
<!-- Icon from Tabler Icons by Paweł Kuna - https://github.com/tabler/tabler-icons/blob/master/LICENSE -->
<path
fill="none"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 3a9 9 0 0 1 3.618 17.243l-2.193-5.602a3 3 0 1 0-2.849 0l-2.193 5.603A9 9 0 0 1 12 3"
/>
</svg>

After

Width:  |  Height:  |  Size: 428 B

View File

@@ -0,0 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
<mask
id="mask0_89_26548"
style="mask-type: alpha"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="20"
height="20"
>
<rect width="20" height="20" fill="currentColor" />
</mask>
<g mask="url(#mask0_89_26548)">
<path
d="M8 17H4.5C4.0875 17 3.73437 16.8531 3.44062 16.5594C3.14687 16.2656 3 15.9125 3 15.5V12C3.55556 11.9722 4.02778 11.7674 4.41667 11.3854C4.80556 11.0035 5 10.5417 5 10C5 9.45833 4.80556 8.99653 4.41667 8.61458C4.02778 8.23264 3.55556 8.02778 3 8V4.5C3 4.0875 3.14687 3.73438 3.44062 3.44063C3.73437 3.14688 4.0875 3 4.5 3H8C8 2.44444 8.19285 1.97222 8.57854 1.58333C8.96438 1.19444 9.4366 1 9.99521 1C10.554 1 11.0278 1.19333 11.4167 1.58C11.8056 1.96667 12 2.44 12 3H15.5C15.9125 3 16.2656 3.14688 16.5594 3.44063C16.8531 3.73438 17 4.0875 17 4.5V8C17.5556 8 18.0278 8.19285 18.4167 8.57854C18.8056 8.96438 19 9.4366 19 9.99521C19 10.554 18.8067 11.0278 18.42 11.4167C18.0333 11.8056 17.56 12 17 12V15.5C17 15.9125 16.8531 16.2656 16.5594 16.5594C16.2656 16.8531 15.9125 17 15.5 17H12C11.9722 16.4444 11.7682 15.9722 11.3879 15.5833C11.0076 15.1944 10.5458 15 10.0025 15C9.45917 15 8.99653 15.1944 8.61458 15.5833C8.23264 15.9722 8.02778 16.4444 8 17ZM4.5 15.5H6.83333C7.11111 14.875 7.53819 14.3854 8.11458 14.0312C8.69097 13.6771 9.31944 13.5 10 13.5C10.6806 13.5 11.309 13.6771 11.8854 14.0312C12.4618 14.3854 12.8889 14.875 13.1667 15.5H15.5V10.5H17C17.1333 10.5 17.25 10.45 17.35 10.35C17.45 10.25 17.5 10.1333 17.5 10C17.5 9.86667 17.45 9.75 17.35 9.65C17.25 9.55 17.1333 9.5 17 9.5H15.5V4.5H10.5V3C10.5 2.86667 10.45 2.75 10.35 2.65C10.25 2.55 10.1333 2.5 10 2.5C9.86667 2.5 9.75 2.55 9.65 2.65C9.55 2.75 9.5 2.86667 9.5 3V4.5H4.5V6.83333C5.125 7.11111 5.61458 7.53819 5.96875 8.11458C6.32292 8.69097 6.5 9.31944 6.5 10C6.5 10.6974 6.32292 11.3335 5.96875 11.9083C5.61458 12.4833 5.125 12.9028 4.5 13.1667V15.5Z"
fill="currentColor"
/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
<mask
id="mask0_89_26538"
style="mask-type: alpha"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="20"
height="20"
>
<rect width="20" height="20" fill="currentColor" />
</mask>
<g mask="url(#mask0_89_26538)">
<path
d="M8 13.5L13.5 10L8 6.5V13.5ZM4.5 17C4.0875 17 3.73437 16.8531 3.44062 16.5594C3.14687 16.2656 3 15.9125 3 15.5V4.5C3 4.0875 3.14687 3.73438 3.44062 3.44063C3.73437 3.14688 4.0875 3 4.5 3H15.5C15.9125 3 16.2656 3.14688 16.5594 3.44063C16.8531 3.73438 17 4.0875 17 4.5V15.5C17 15.9125 16.8531 16.2656 16.5594 16.5594C16.2656 16.8531 15.9125 17 15.5 17H4.5ZM4.5 15.5H15.5V4.5H4.5V15.5Z"
fill="currentColor"
/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 792 B

View File

@@ -0,0 +1,11 @@
<svg
xmlns="http://www.w3.org/2000/svg"
height="24px"
viewBox="0 -960 960 960"
width="24px"
fill="currentColor"
>
<path
d="M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm-40-82v-78q-33 0-56.5-23.5T360-320v-40L168-552q-3 18-5.5 36t-2.5 36q0 121 79.5 212T440-162Zm276-102q41-45 62.5-100.5T800-480q0-98-54.5-179T600-776v16q0 33-23.5 56.5T520-680h-80v80q0 17-11.5 28.5T400-560h-80v80h240q17 0 28.5 11.5T600-440v120h40q26 0 47 15.5t29 40.5Z"
/>
</svg>

After

Width:  |  Height:  |  Size: 608 B

View File

@@ -0,0 +1,11 @@
<svg
xmlns="http://www.w3.org/2000/svg"
height="24px"
viewBox="0 -960 960 960"
width="24px"
fill="currentColor"
>
<path
d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm0-80h640v-400H160v400Zm140-40-56-56 103-104-104-104 57-56 160 160-160 160Zm180 0v-80h240v80H480Z"
/>
</svg>

After

Width:  |  Height:  |  Size: 368 B

View File

@@ -0,0 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
<mask
id="mask0_89_26543"
style="mask-type: alpha"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="20"
height="20"
>
<rect width="20" height="20" fill="currentColor" />
</mask>
<g mask="url(#mask0_89_26543)">
<path
d="M10 17C8.05556 17 6.40278 16.3194 5.04167 14.9583C3.68056 13.5972 3 11.9444 3 10H4.5C4.5 11.5139 5.03819 12.809 6.11458 13.8854C7.19097 14.9618 8.48611 15.5 10 15.5C11.5139 15.5 12.809 14.9618 13.8854 13.8854C14.9618 12.809 15.5 11.5139 15.5 10C15.5 8.48611 14.9618 7.19097 13.8854 6.11458C12.809 5.03819 11.5139 4.5 10 4.5C9.13889 4.5 8.3434 4.67778 7.61354 5.03333C6.88382 5.38889 6.26958 5.87778 5.77083 6.5H8V8H3V3H4.5V5.70833C5.13889 4.875 5.93403 4.21528 6.88542 3.72917C7.83681 3.24306 8.875 3 10 3C10.9722 3 11.8828 3.18472 12.7319 3.55417C13.581 3.92361 14.3199 4.42271 14.9485 5.05146C15.5773 5.68007 16.0764 6.41896 16.4458 7.26813C16.8153 8.11715 17 9.02778 17 10C17 10.9722 16.8153 11.8828 16.4458 12.7319C16.0764 13.581 15.5773 14.3199 14.9485 14.9485C14.3199 15.5773 13.581 16.0764 12.7319 16.4458C11.8828 16.8153 10.9722 17 10 17ZM12.0833 12.8333L9.25 10V6H10.75V9.375L13.1458 11.7708L12.0833 12.8333Z"
fill="currentColor"
/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
<mask
id="mask0_89_26533"
style="mask-type: alpha"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="20"
height="20"
>
<rect width="20" height="20" fill="currentColor" />
</mask>
<g mask="url(#mask0_89_26533)">
<path
d="M6.54165 17L5.83332 16.2917L4.56249 17.5625C4.27082 17.8542 3.91665 18 3.49999 18C3.08332 18 2.72915 17.8542 2.43749 17.5625C2.15971 17.2569 2.01735 16.8993 2.0104 16.4896C2.00346 16.0799 2.14582 15.7292 2.43749 15.4375L3.70832 14.1667L2.99999 13.4583L13.0208 3.4375C13.3125 3.14583 13.6632 3 14.0729 3C14.4826 3 14.8403 3.14583 15.1458 3.4375L16.5625 4.85417C16.8542 5.13194 17 5.47917 17 5.89583C17 6.3125 16.8542 6.66667 16.5625 6.95833L6.54165 17ZM9.27082 9.33333L5.12499 13.4583L6.54165 14.875L10.6875 10.7292L9.27082 9.33333Z"
fill="#2B2542"
/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 937 B

View File

@@ -0,0 +1,11 @@
<svg width="1200" height="630" viewBox="0 0 1200 630" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1_2)">
<rect width="1200" height="630" fill="#FF3670"/>
<path d="M807.836 142.655C715.59 138.706 630.888 195.464 599.461 282.281C568.034 195.464 483.332 138.706 391.086 142.655C388.013 215.854 423.032 285.658 483.546 326.958C514.556 348.257 533.087 383.583 532.984 421.202V486.46H665.951V421.202C665.843 383.585 684.37 348.258 715.376 326.958C775.907 285.674 810.931 215.859 807.836 142.655Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_1_2">
<rect width="1200" height="630" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 647 B

View File

@@ -567,6 +567,30 @@ block-beta
style id2 fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5
```
### Class Styling
Mermaid enables applying styling to classes, which could make styling easier if you want to apply a certain set of styles to multiple elements, as you could just link those elements to a class.
#### Example - Styling a Single Class
```mermaid-example
block-beta
A space B
A-->B
classDef blue fill:#6e6ce6,stroke:#333,stroke-width:4px;
class A blue
style B fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5
```
```mermaid
block-beta
A space B
A-->B
classDef blue fill:#6e6ce6,stroke:#333,stroke-width:4px;
class A blue
style B fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5
```
In this example, a class named 'blue' is defined and applied to block 'A', while block 'B' receives individual styling. This demonstrates the flexibility of Mermaid in applying both shared and unique styles within the same diagram.
The ability to style blocks individually or through classes provides a powerful tool for enhancing the visual impact and clarity of block diagrams. Whether emphasizing certain elements or maintaining a cohesive design across the diagram, these styling capabilities are central to effective diagramming. The next sections will present practical examples and use cases, followed by tips for troubleshooting common issues.

View File

@@ -545,6 +545,38 @@ It is possible to annotate classes with markers to provide additional metadata a
Annotations are defined within the opening `<<` and closing `>>`. There are two ways to add an annotation to a class, and either way the output will be same:
> **Tip:**\
> In Mermaid class diagrams, annotations like `<<interface>>` can be attached in two ways:
>
> - **Inline with the class definition** (Recommended for consistency):
>
> ```mermaid-example
> classDiagram
> class Shape <<interface>>
> ```
>
> ```mermaid
> classDiagram
> class Shape <<interface>>
> ```
>
> - **Separate line after the class definition**:
>
> ```mermaid-example
> classDiagram
> class Shape
> <<interface>> Shape
> ```
>
> ```mermaid
> classDiagram
> class Shape
> <<interface>> Shape
> ```
>
> Both methods are fully supported and produce identical diagrams.\
> However, it is recommended to use the **inline style** for better readability and consistent formatting across diagrams.
- In a **_separate line_** after a class is defined:
```mermaid-example
@@ -802,7 +834,7 @@ Beginner's tip—a full example using interactive links in an HTML page:
+run()
}
callback Duck callback "Tooltip"
callback Duck "callback" "Tooltip"
link Zebra "https://www.github.com" "This is a link"
</pre>

View File

@@ -952,7 +952,7 @@ flowchart TD
A@{ icon: "fa:user", form: "square", label: "User Icon", pos: "t", h: 60 }
```
### Parameters
#### Parameters
- **icon**: The name of the icon from the registered icon pack.
- **form**: Specifies the background shape of the icon. If not defined there will be no background to icon. Options include:
@@ -969,17 +969,12 @@ flowchart TD
You can use the `image` shape to include an image in your flowchart. The syntax for defining an image shape is as follows:
```mermaid-example
```
flowchart TD
A@{ img: "https://example.com/image.png", label: "Image Label", pos: "t", w: 60, h: 60, constraint: "off" }
```
```mermaid
flowchart TD
A@{ img: "https://example.com/image.png", label: "Image Label", pos: "t", w: 60, h: 60, constraint: "off" }
```
### Parameters
#### Parameters
- **img**: The URL of the image to be displayed.
- **label**: The text label associated with the image. This can be any string. If not defined, no label will be displayed.
@@ -1600,6 +1595,7 @@ flowchart LR
The "Markdown Strings" feature enhances flowcharts and mind maps by offering a more versatile string type, which supports text formatting options such as bold and italics, and automatically wraps text within labels.
```mermaid-example
---
config:
flowchart:
htmlLabels: false
@@ -1616,6 +1612,7 @@ end
```
```mermaid
---
config:
flowchart:
htmlLabels: false
@@ -1950,6 +1947,19 @@ flowchart TD
B-->E(A fa:fa-camera-retro perhaps?)
```
There are two ways to display these FontAwesome icons:
### Register FontAwesome icon packs (v11.7.0+)
You can register your own FontAwesome icon pack following the ["Registering icon packs" instructions](../config/icons.md).
Supported prefixes: `fa`, `fab`, `fas`, `far`, `fal`, `fad`.
> **Note**
> Note that it will fall back to FontAwesome CSS if FontAwesome packs are not registered.
### Register FontAwesome CSS
Mermaid supports Font Awesome if the CSS is included on the website.
Mermaid does not have any restriction on the version of Font Awesome that can be used.

View File

@@ -229,6 +229,30 @@ gantt
Final milestone : milestone, m2, 18:08, 4m
```
### Vertical Markers
The `vert` keyword lets you add vertical lines to your Gantt chart, making it easy to highlight important dates like deadlines, events, or checkpoints. These markers extend across the entire chart and are positioned based on the date you provide. Unlike milestones, vertical markers dont take up a row. Theyre purely visual reference points that help break up the timeline and make important moments easier to spot.
```mermaid-example
gantt
dateFormat HH:mm
axisFormat %H:%M
Initial vert : vert, v1, 17:30, 2m
Task A : 3m
Task B : 8m
Final vert : vert, v2, 17:58, 4m
```
```mermaid
gantt
dateFormat HH:mm
axisFormat %H:%M
Initial vert : vert, v1, 17:30, 2m
Task A : 3m
Task B : 8m
Final vert : vert, v2, 17:58, 4m
```
## Setting dates
`dateFormat` defines the format of the date **input** of your gantt elements. How these dates are represented in the rendered chart **output** are defined by `axisFormat`.
@@ -598,4 +622,86 @@ gantt
5 : 0, 5
```
### Timeline (with comments, CSS, config in frontmatter)
```mermaid-example
---
# Frontmatter config, YAML comments
title: Ignored if specified in chart
displayMode: compact #gantt specific setting but works at this level too
config:
# theme: forest
# themeCSS: " #item36 { fill: CadetBlue } "
themeCSS: " // YAML supports multiline strings using a newline markers: \n
#item36 { fill: CadetBlue } \n
// Custom marker workaround CSS from forum (below) \n
rect[id^=workaround] { height: calc(100% - 50px) ; transform: translate(9px, 25px); y: 0; width: 1.5px; stroke: none; fill: red; } \n
text[id^=workaround] { fill: red; y: 100%; font-size: 15px;}
"
gantt:
useWidth: 400
rightPadding: 0
topAxis: true #false
numberSectionStyles: 2
---
gantt
title Timeline - Gantt Sampler
dateFormat YYYY
axisFormat %y
%% this next line doesn't recognise 'decade' or 'year', but will silently ignore
tickInterval 1decade
section Issue19062
71 : item71, 1900, 1930
section Issue19401
36 : item36, 1913, 1935
section Issue1300
94 : item94, 1910, 1915
5 : item5, 1920, 1925
0 : milestone, item0, 1918, 1s
9 : vert, 1906, 1s %% not yet official
64 : workaround, 1923, 1s %% custom CSS object https://github.com/mermaid-js/mermaid/issues/3250
```
```mermaid
---
# Frontmatter config, YAML comments
title: Ignored if specified in chart
displayMode: compact #gantt specific setting but works at this level too
config:
# theme: forest
# themeCSS: " #item36 { fill: CadetBlue } "
themeCSS: " // YAML supports multiline strings using a newline markers: \n
#item36 { fill: CadetBlue } \n
// Custom marker workaround CSS from forum (below) \n
rect[id^=workaround] { height: calc(100% - 50px) ; transform: translate(9px, 25px); y: 0; width: 1.5px; stroke: none; fill: red; } \n
text[id^=workaround] { fill: red; y: 100%; font-size: 15px;}
"
gantt:
useWidth: 400
rightPadding: 0
topAxis: true #false
numberSectionStyles: 2
---
gantt
title Timeline - Gantt Sampler
dateFormat YYYY
axisFormat %y
%% this next line doesn't recognise 'decade' or 'year', but will silently ignore
tickInterval 1decade
section Issue19062
71 : item71, 1900, 1930
section Issue19401
36 : item36, 1913, 1935
section Issue1300
94 : item94, 1910, 1915
5 : item5, 1920, 1925
0 : milestone, item0, 1918, 1s
9 : vert, 1906, 1s %% not yet official
64 : workaround, 1923, 1s %% custom CSS object https://github.com/mermaid-js/mermaid/issues/3250
```
<!--- cspell:ignore isadded --->

View File

@@ -16,13 +16,25 @@ This diagram type is particularly useful for developers, network engineers, educ
## Syntax
```md
```
packet-beta
start: "Block name" %% Single-bit block
start-end: "Block name" %% Multi-bit blocks
... More Fields ...
```
### Bits Syntax (v11.7.0+)
Using start and end bit counts can be difficult, especially when modifying a design. For this we add a bit count field, which starts from the end of the previous field automagically. Use `+<count>` to set the number of bits, thus:
```
packet-beta
+1: "Block name" %% Single-bit block
+8: "Block name" %% 8-bit block
9-15: "Manually set start and end, it's fine to mix and match"
... More Fields ...
```
## Examples
```mermaid-example
@@ -76,8 +88,8 @@ packet-beta
```mermaid-example
packet-beta
title UDP Packet
0-15: "Source Port"
16-31: "Destination Port"
+16: "Source Port"
+16: "Destination Port"
32-47: "Length"
48-63: "Checksum"
64-95: "Data (variable length)"
@@ -86,8 +98,8 @@ title UDP Packet
```mermaid
packet-beta
title UDP Packet
0-15: "Source Port"
16-31: "Destination Port"
+16: "Source Port"
+16: "Destination Port"
32-47: "Length"
48-63: "Checksum"
64-95: "Data (variable length)"

View File

@@ -67,9 +67,9 @@
"@argos-ci/cypress": "^4.0.3",
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.27.12",
"@cspell/eslint-plugin": "^8.18.1",
"@cspell/eslint-plugin": "^8.19.3",
"@cypress/code-coverage": "^3.12.49",
"@eslint/js": "^9.24.0",
"@eslint/js": "^9.26.0",
"@rollup/plugin-typescript": "^12.1.2",
"@types/cors": "^2.8.17",
"@types/express": "^5.0.0",
@@ -93,9 +93,9 @@
"cypress-image-snapshot": "^4.0.1",
"cypress-split": "^1.24.14",
"esbuild": "^0.25.0",
"eslint": "^9.24.0",
"eslint": "^9.26.0",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-cypress": "^4.2.1",
"eslint-plugin-cypress": "^4.3.0",
"eslint-plugin-html": "^8.1.2",
"eslint-plugin-jest": "^28.11.0",
"eslint-plugin-jsdoc": "^50.6.9",
@@ -104,7 +104,7 @@
"eslint-plugin-markdown": "^5.1.0",
"eslint-plugin-no-only-tests": "^3.3.0",
"eslint-plugin-tsdoc": "^0.4.0",
"eslint-plugin-unicorn": "^58.0.0",
"eslint-plugin-unicorn": "^59.0.0",
"express": "^5.1.0",
"globals": "^16.0.0",
"globby": "^14.0.2",
@@ -126,7 +126,7 @@
"tslib": "^2.8.1",
"tsx": "^4.7.3",
"typescript": "~5.7.3",
"typescript-eslint": "^8.29.1",
"typescript-eslint": "^8.32.0",
"vite": "^6.1.1",
"vite-plugin-istanbul": "^7.0.0",
"vitest": "^3.0.6"

View File

@@ -1,5 +1,14 @@
# @mermaid-js/layout-elk
## 0.1.8
### Patch Changes
- [#6648](https://github.com/mermaid-js/mermaid/pull/6648) [`85c5b9b`](https://github.com/mermaid-js/mermaid/commit/85c5b9b4c064e2edabf21757c8215a1018d4d288) Thanks [@knsv](https://github.com/knsv)! - Make elk respect the order of nodes based from the code
- Updated dependencies [[`97b79c3`](https://github.com/mermaid-js/mermaid/commit/97b79c3578a2004c63fa32f6d5e17bd8a536e13a), [`b1cf291`](https://github.com/mermaid-js/mermaid/commit/b1cf29127348602137552405e3300dee1697f0de), [`a4754ad`](https://github.com/mermaid-js/mermaid/commit/a4754ad195e70d52fbd46ef44f40797d2d215e41), [`2b05d7e`](https://github.com/mermaid-js/mermaid/commit/2b05d7e1edef635e6c80cb383b10ea0a89279f41), [`41e84b7`](https://github.com/mermaid-js/mermaid/commit/41e84b726a1f2df002b77c4b0071e2c15e47838e), [`d63d3bf`](https://github.com/mermaid-js/mermaid/commit/d63d3bf1e7596ac7eeb24ba06cbc7a70f9c8b070), [`aa6cb86`](https://github.com/mermaid-js/mermaid/commit/aa6cb86899968c65561eebfc1d54dd086b1518a2), [`df9df9d`](https://github.com/mermaid-js/mermaid/commit/df9df9dc32b80a8c320cc0efd5483b9485f15bde), [`cdbd3e5`](https://github.com/mermaid-js/mermaid/commit/cdbd3e58a3a35d63a79258115dedca4a535c1038), [`c17277e`](https://github.com/mermaid-js/mermaid/commit/c17277e743b1c12e4134fba44c62a7d5885f2574), [`a1ba65c`](https://github.com/mermaid-js/mermaid/commit/a1ba65c0c08432ec36e772570c3a5899cb57c102), [`1ddaf10`](https://github.com/mermaid-js/mermaid/commit/1ddaf10b89d8c7311c5e10d466b42fa36b61210b), [`ca80f71`](https://github.com/mermaid-js/mermaid/commit/ca80f719eac86cf4c31392105d5d896f39b84bbc), [`bca6ed6`](https://github.com/mermaid-js/mermaid/commit/bca6ed67c3e0db910bf498fdd0fc0346c02d392b)]:
- mermaid@11.7.0
## 0.1.7
### Patch Changes

View File

@@ -54,7 +54,7 @@ mermaid.registerLayoutLoaders(elkLayouts);
```html
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
import elkLayouts from 'https://cdn.jsdelivr.net/npm/@mermaid-js/layout-elk@11/dist/mermaid-layout-elk.esm.min.mjs';
import elkLayouts from 'https://cdn.jsdelivr.net/npm/@mermaid-js/layout-elk@0/dist/mermaid-layout-elk.esm.min.mjs';
mermaid.registerLayoutLoaders(elkLayouts);
</script>

View File

@@ -1,6 +1,6 @@
{
"name": "@mermaid-js/layout-elk",
"version": "0.1.7",
"version": "0.1.8",
"description": "ELK layout engine for mermaid",
"module": "dist/mermaid-layout-elk.core.mjs",
"types": "dist/layouts.d.ts",

View File

@@ -766,6 +766,7 @@ export const render = async (
id: 'root',
layoutOptions: {
'elk.hierarchyHandling': 'INCLUDE_CHILDREN',
'elk.layered.crossingMinimization.forceNodeModelOrder': true,
'elk.algorithm': algorithm,
'nodePlacement.strategy': data4Layout.config.elk?.nodePlacementStrategy,
'elk.layered.mergeEdges': data4Layout.config.elk?.mergeEdges,
@@ -780,7 +781,6 @@ export const render = async (
// 'spacing.edgeEdge': 10,
// 'spacing.edgeEdgeBetweenLayers': 20,
// 'spacing.nodeSelfLoop': 20,
// Tweaking options
// 'elk.layered.nodePlacement.favorStraightEdges': true,
// 'nodePlacement.feedbackEdges': true,

View File

@@ -0,0 +1,14 @@
# @mermaid-js/mermaid-zenuml
## 0.2.1
### Patch Changes
- [#6581](https://github.com/mermaid-js/mermaid/pull/6581) [`941bc69`](https://github.com/mermaid-js/mermaid/commit/941bc698350bd103b2a431ed8fed0c7b0d92fff0) Thanks [@MrCoder](https://github.com/MrCoder)! - Upgraded the dependency @zenuml/core
- [#6319](https://github.com/mermaid-js/mermaid/pull/6319) [`9d06d8f`](https://github.com/mermaid-js/mermaid/commit/9d06d8f31e7f12af9e9e092214f907f2dc93ad75) Thanks [@renovate](https://github.com/apps/renovate)! - chore: bump minimum ZenUML version to 3.23.28
- [#5737](https://github.com/mermaid-js/mermaid/pull/5737) [`0ad44c1`](https://github.com/mermaid-js/mermaid/commit/0ad44c12feead9d20c6a870a49327ada58d6e657) Thanks [@sidharthv96](https://github.com/sidharthv96)! - fix(zenuml): limit `peerDependencies` to Mermaid v10 and v11
- Updated dependencies [[`97b79c3`](https://github.com/mermaid-js/mermaid/commit/97b79c3578a2004c63fa32f6d5e17bd8a536e13a), [`b1cf291`](https://github.com/mermaid-js/mermaid/commit/b1cf29127348602137552405e3300dee1697f0de), [`a4754ad`](https://github.com/mermaid-js/mermaid/commit/a4754ad195e70d52fbd46ef44f40797d2d215e41), [`2b05d7e`](https://github.com/mermaid-js/mermaid/commit/2b05d7e1edef635e6c80cb383b10ea0a89279f41), [`41e84b7`](https://github.com/mermaid-js/mermaid/commit/41e84b726a1f2df002b77c4b0071e2c15e47838e), [`d63d3bf`](https://github.com/mermaid-js/mermaid/commit/d63d3bf1e7596ac7eeb24ba06cbc7a70f9c8b070), [`aa6cb86`](https://github.com/mermaid-js/mermaid/commit/aa6cb86899968c65561eebfc1d54dd086b1518a2), [`df9df9d`](https://github.com/mermaid-js/mermaid/commit/df9df9dc32b80a8c320cc0efd5483b9485f15bde), [`cdbd3e5`](https://github.com/mermaid-js/mermaid/commit/cdbd3e58a3a35d63a79258115dedca4a535c1038), [`c17277e`](https://github.com/mermaid-js/mermaid/commit/c17277e743b1c12e4134fba44c62a7d5885f2574), [`a1ba65c`](https://github.com/mermaid-js/mermaid/commit/a1ba65c0c08432ec36e772570c3a5899cb57c102), [`1ddaf10`](https://github.com/mermaid-js/mermaid/commit/1ddaf10b89d8c7311c5e10d466b42fa36b61210b), [`ca80f71`](https://github.com/mermaid-js/mermaid/commit/ca80f719eac86cf4c31392105d5d896f39b84bbc), [`bca6ed6`](https://github.com/mermaid-js/mermaid/commit/bca6ed67c3e0db910bf498fdd0fc0346c02d392b)]:
- mermaid@11.7.0

View File

@@ -1,6 +1,6 @@
{
"name": "@mermaid-js/mermaid-zenuml",
"version": "0.2.0",
"version": "0.2.1",
"description": "MermaidJS plugin for ZenUML integration",
"module": "dist/mermaid-zenuml.core.mjs",
"types": "dist/detector.d.ts",
@@ -33,7 +33,7 @@
],
"license": "MIT",
"dependencies": {
"@zenuml/core": "^3.23.28"
"@zenuml/core": "^3.31.1"
},
"devDependencies": {
"mermaid": "workspace:^"

View File

@@ -1,5 +1,44 @@
# mermaid
## 11.7.0
### Minor Changes
- [#6479](https://github.com/mermaid-js/mermaid/pull/6479) [`97b79c3`](https://github.com/mermaid-js/mermaid/commit/97b79c3578a2004c63fa32f6d5e17bd8a536e13a) Thanks [@monicanguyen25](https://github.com/monicanguyen25)! - feat: Add Vertical Line To Gantt Plot At Specified Time
- [#6225](https://github.com/mermaid-js/mermaid/pull/6225) [`41e84b7`](https://github.com/mermaid-js/mermaid/commit/41e84b726a1f2df002b77c4b0071e2c15e47838e) Thanks [@Shahir-47](https://github.com/Shahir-47)! - feat: Add support for styling Journey Diagram title (color, font-family, and font-size)
- [#6423](https://github.com/mermaid-js/mermaid/pull/6423) [`aa6cb86`](https://github.com/mermaid-js/mermaid/commit/aa6cb86899968c65561eebfc1d54dd086b1518a2) Thanks [@BambioGaming](https://github.com/BambioGaming)! - Added support for the click directive in stateDiagram syntax
- [#5980](https://github.com/mermaid-js/mermaid/pull/5980) [`df9df9d`](https://github.com/mermaid-js/mermaid/commit/df9df9dc32b80a8c320cc0efd5483b9485f15bde) Thanks [@BryanCrotazGivEnergy](https://github.com/BryanCrotazGivEnergy)! - feat: Add shorter `+<count>: Label` syntax in packet diagram
- [#6523](https://github.com/mermaid-js/mermaid/pull/6523) [`c17277e`](https://github.com/mermaid-js/mermaid/commit/c17277e743b1c12e4134fba44c62a7d5885f2574) Thanks [@NourBenz](https://github.com/NourBenz)! - fix: allow sequence diagram arrows with a trailing colon but no message
- [#6475](https://github.com/mermaid-js/mermaid/pull/6475) [`a1ba65c`](https://github.com/mermaid-js/mermaid/commit/a1ba65c0c08432ec36e772570c3a5899cb57c102) Thanks [@Shahir-47](https://github.com/Shahir-47)! - feat: Dynamically Render Data Labels Within Bar Charts
### Patch Changes
- [#6588](https://github.com/mermaid-js/mermaid/pull/6588) [`b1cf291`](https://github.com/mermaid-js/mermaid/commit/b1cf29127348602137552405e3300dee1697f0de) Thanks [@omkarht](https://github.com/omkarht)! - Fix stroke styles for ER diagram to correctly apply path and row-specific styles
- [#6296](https://github.com/mermaid-js/mermaid/pull/6296) [`a4754ad`](https://github.com/mermaid-js/mermaid/commit/a4754ad195e70d52fbd46ef44f40797d2d215e41) Thanks [@sidharthv96](https://github.com/sidharthv96)! - chore: Convert StateDB into TypeScript
- [#6463](https://github.com/mermaid-js/mermaid/pull/6463) [`2b05d7e`](https://github.com/mermaid-js/mermaid/commit/2b05d7e1edef635e6c80cb383b10ea0a89279f41) Thanks [@AaronMoat](https://github.com/AaronMoat)! - fix: Remove incorrect `style="undefined;"` attributes in some Mermaid diagrams
- [#6282](https://github.com/mermaid-js/mermaid/pull/6282) [`d63d3bf`](https://github.com/mermaid-js/mermaid/commit/d63d3bf1e7596ac7eeb24ba06cbc7a70f9c8b070) Thanks [@saurabhg772244](https://github.com/saurabhg772244)! - FontAwesome icons can now be embedded as SVGs in flowcharts if they are registered via `mermaid.registerIconPacks`.
- [#6407](https://github.com/mermaid-js/mermaid/pull/6407) [`cdbd3e5`](https://github.com/mermaid-js/mermaid/commit/cdbd3e58a3a35d63a79258115dedca4a535c1038) Thanks [@thomascizeron](https://github.com/thomascizeron)! - Refactor grammar so that title don't break Architecture Diagrams
- [#6343](https://github.com/mermaid-js/mermaid/pull/6343) [`1ddaf10`](https://github.com/mermaid-js/mermaid/commit/1ddaf10b89d8c7311c5e10d466b42fa36b61210b) Thanks [@jeswr](https://github.com/jeswr)! - fix: allow colons in events
- [#6616](https://github.com/mermaid-js/mermaid/pull/6616) [`ca80f71`](https://github.com/mermaid-js/mermaid/commit/ca80f719eac86cf4c31392105d5d896f39b84bbc) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix(timeline): ensure consistent vertical line lengths with visible arrowheads
Fixed timeline diagrams where vertical dashed lines from tasks had inconsistent lengths. All vertical lines now extend to the same depth regardless of the number of events in each column, with sufficient padding to clearly display both the dashed line pattern and complete arrowheads.
- [#6566](https://github.com/mermaid-js/mermaid/pull/6566) [`bca6ed6`](https://github.com/mermaid-js/mermaid/commit/bca6ed67c3e0db910bf498fdd0fc0346c02d392b) Thanks [@arpitjain099](https://github.com/arpitjain099)! - fix: Fix incomplete string escaping in URL manipulation logic when `arrowMarkerAbsolute: true` by ensuring all unsafe characters are escaped.
- Updated dependencies [[`df9df9d`](https://github.com/mermaid-js/mermaid/commit/df9df9dc32b80a8c320cc0efd5483b9485f15bde), [`cdbd3e5`](https://github.com/mermaid-js/mermaid/commit/cdbd3e58a3a35d63a79258115dedca4a535c1038)]:
- @mermaid-js/parser@0.5.0
## 11.6.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "mermaid",
"version": "11.6.0",
"version": "11.7.0",
"description": "Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",
"type": "module",
"module": "./dist/mermaid.core.mjs",

View File

@@ -295,6 +295,12 @@ export interface FlowchartDiagramConfig extends BaseDiagramConfig {
*
*/
wrappingWidth?: number;
/**
* If true, subgraphs without explicit direction will inherit the global graph direction
* (e.g., LR, TB, RL, BT). Defaults to false to preserve legacy layout behavior.
*
*/
inheritDir?: boolean;
}
/**
* This interface was referenced by `MermaidConfig`'s JSON-Schema

View File

@@ -7,7 +7,7 @@ import { getConfig } from '../diagram-api/diagramAPI.js';
import { evaluate } from '../diagrams/common/common.js';
import { getSubGraphTitleMargins } from '../utils/subGraphTitleMargins.js';
const rect = (parent, node) => {
const rect = async (parent, node) => {
log.info('Creating subgraph rect for ', node.id, node);
const siteConfig = getConfig();
@@ -31,7 +31,9 @@ const rect = (parent, node) => {
const text =
node.labelType === 'markdown'
? createText(label, node.labelText, { style: node.labelStyle, useHtmlLabels }, siteConfig)
: label.node().appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));
: label
.node()
.appendChild(await createLabel(node.labelText, node.labelStyle, undefined, true));
// Get the size of the label
let bbox = text.getBBox();
@@ -129,7 +131,7 @@ const noteGroup = (parent, node) => {
return shapeSvg;
};
const roundedWithTitle = (parent, node) => {
const roundedWithTitle = async (parent, node) => {
const siteConfig = getConfig();
// Add outer g element
@@ -144,7 +146,7 @@ const roundedWithTitle = (parent, node) => {
const text = label
.node()
.appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));
.appendChild(await createLabel(node.labelText, node.labelStyle, undefined, true));
// Get the size of the label
let bbox = text.getBBox();
@@ -236,13 +238,13 @@ const shapes = { rect, roundedWithTitle, noteGroup, divider };
let clusterElems = {};
export const insertCluster = (elem, node) => {
export const insertCluster = async (elem, node) => {
log.trace('Inserting cluster');
const shape = node.shape || 'rect';
clusterElems[node.id] = shapes[shape](elem, node);
clusterElems[node.id] = await shapes[shape](elem, node);
};
export const getClusterTitleWidth = (elem, node) => {
const label = createLabel(node.labelText, node.labelStyle, undefined, true);
export const getClusterTitleWidth = async (elem, node) => {
const label = await createLabel(node.labelText, node.labelStyle, undefined, true);
elem.node().appendChild(label);
const width = label.getBBox().width;
elem.node().removeChild(label);

View File

@@ -44,7 +44,7 @@ function addHtmlLabel(node) {
* @param isNode
* @deprecated svg-util/createText instead
*/
const createLabel = (_vertexText, style, isTitle, isNode) => {
const createLabel = async (_vertexText, style, isTitle, isNode) => {
let vertexText = _vertexText || '';
if (typeof vertexText === 'object') {
vertexText = vertexText[0];
@@ -53,9 +53,10 @@ const createLabel = (_vertexText, style, isTitle, isNode) => {
// TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?
vertexText = vertexText.replace(/\\n|\n/g, '<br />');
log.debug('vertexText' + vertexText);
const label = await replaceIconSubstring(decodeEntities(vertexText));
const node = {
isNode,
label: replaceIconSubstring(decodeEntities(vertexText)),
label,
labelStyle: style.replace('fill:', 'color:'),
};
let vertexNode = addHtmlLabel(node);

View File

@@ -4,7 +4,7 @@ import { createText } from '../rendering-util/createText.js';
import { line, curveBasis, select } from 'd3';
import { getConfig } from '../diagram-api/diagramAPI.js';
import utils from '../utils.js';
import { evaluate } from '../diagrams/common/common.js';
import { evaluate, getUrl } from '../diagrams/common/common.js';
import { getLineFunctionsWithOffset } from '../utils/lineWithOffset.js';
import { getSubGraphTitleMargins } from '../utils/subGraphTitleMargins.js';
import { addEdgeMarkers } from './edgeMarker.js';
@@ -17,7 +17,7 @@ export const clear = () => {
terminalLabels = {};
};
export const insertEdgeLabel = (elem, edge) => {
export const insertEdgeLabel = async (elem, edge) => {
const config = getConfig();
const useHtmlLabels = evaluate(config.flowchart.htmlLabels);
// Create the actual text element
@@ -33,7 +33,7 @@ export const insertEdgeLabel = (elem, edge) => {
},
config
)
: createLabel(edge.label, edge.labelStyle);
: await createLabel(edge.label, edge.labelStyle);
// Create outer g, edgeLabel, this will be positioned after graph layout
const edgeLabel = elem.insert('g').attr('class', 'edgeLabel');
@@ -63,7 +63,7 @@ export const insertEdgeLabel = (elem, edge) => {
let fo;
if (edge.startLabelLeft) {
// Create the actual text element
const startLabelElement = createLabel(edge.startLabelLeft, edge.labelStyle);
const startLabelElement = await createLabel(edge.startLabelLeft, edge.labelStyle);
const startEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');
const inner = startEdgeLabelLeft.insert('g').attr('class', 'inner');
fo = inner.node().appendChild(startLabelElement);
@@ -77,7 +77,7 @@ export const insertEdgeLabel = (elem, edge) => {
}
if (edge.startLabelRight) {
// Create the actual text element
const startLabelElement = createLabel(edge.startLabelRight, edge.labelStyle);
const startLabelElement = await createLabel(edge.startLabelRight, edge.labelStyle);
const startEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');
const inner = startEdgeLabelRight.insert('g').attr('class', 'inner');
fo = startEdgeLabelRight.node().appendChild(startLabelElement);
@@ -93,7 +93,7 @@ export const insertEdgeLabel = (elem, edge) => {
}
if (edge.endLabelLeft) {
// Create the actual text element
const endLabelElement = createLabel(edge.endLabelLeft, edge.labelStyle);
const endLabelElement = await createLabel(edge.endLabelLeft, edge.labelStyle);
const endEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');
const inner = endEdgeLabelLeft.insert('g').attr('class', 'inner');
fo = inner.node().appendChild(endLabelElement);
@@ -110,7 +110,7 @@ export const insertEdgeLabel = (elem, edge) => {
}
if (edge.endLabelRight) {
// Create the actual text element
const endLabelElement = createLabel(edge.endLabelRight, edge.labelStyle);
const endLabelElement = await createLabel(edge.endLabelRight, edge.labelStyle);
const endEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');
const inner = endEdgeLabelRight.insert('g').attr('class', 'inner');
@@ -440,14 +440,7 @@ export const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph
let url = '';
// // TODO: Can we load this config only from the rendered graph type?
if (getConfig().flowchart.arrowMarkerAbsolute || getConfig().state.arrowMarkerAbsolute) {
url =
window.location.protocol +
'//' +
window.location.host +
window.location.pathname +
window.location.search;
url = url.replace(/\(/g, '\\(');
url = url.replace(/\)/g, '\\)');
url = getUrl(true);
}
addEdgeMarkers(svgPath, edge, url, id, diagramType);

View File

@@ -120,7 +120,7 @@ const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, sit
// Move the nodes to the correct place
let diff = 0;
const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);
sortNodesByHierarchy(graph).forEach(function (v) {
for (const v of sortNodesByHierarchy(graph)) {
const node = graph.node(v);
log.info('Position ' + v + ': ' + JSON.stringify(graph.node(v)));
log.info(
@@ -141,14 +141,14 @@ const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, sit
// A cluster in the non-recursive way
// positionCluster(node);
node.height += subGraphTitleTotalMargin;
insertCluster(clusters, node);
await insertCluster(clusters, node);
clusterDb[node.id].node = node;
} else {
node.y += subGraphTitleTotalMargin / 2;
positionNode(node);
}
}
});
}
// Move the edge labels to the correct place after layout
graph.edges().forEach(function (e) {

View File

@@ -553,7 +553,7 @@ function applyNodePropertyBorders(rect, borders, totalWidth, totalHeight) {
rect.attr('stroke-dasharray', strokeDashArray.join(' '));
}
const rectWithTitle = (parent, node) => {
const rectWithTitle = async (parent, node) => {
// const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, 'node ' + node.classes);
let classes;
@@ -586,7 +586,7 @@ const rectWithTitle = (parent, node) => {
}
log.info('Label text abc79', title, text2, typeof text2 === 'object');
const text = label.node().appendChild(createLabel(title, node.labelStyle, true, true));
const text = label.node().appendChild(await createLabel(title, node.labelStyle, true, true));
let bbox = { width: 0, height: 0 };
if (evaluate(getConfig().flowchart.htmlLabels)) {
const div = text.children[0];
@@ -601,7 +601,12 @@ const rectWithTitle = (parent, node) => {
const descr = label
.node()
.appendChild(
createLabel(textRows.join ? textRows.join('<br/>') : textRows, node.labelStyle, true, true)
await createLabel(
textRows.join ? textRows.join('<br/>') : textRows,
node.labelStyle,
true,
true
)
);
if (evaluate(getConfig().flowchart.htmlLabels)) {
@@ -876,7 +881,7 @@ const end = (parent, node) => {
return shapeSvg;
};
const class_box = (parent, node) => {
const class_box = async (parent, node) => {
const halfPadding = node.padding / 2;
const rowPadding = 4;
const lineHeight = 8;
@@ -910,7 +915,7 @@ const class_box = (parent, node) => {
: '';
const interfaceLabel = labelContainer
.node()
.appendChild(createLabel(interfaceLabelText, node.labelStyle, true, true));
.appendChild(await createLabel(interfaceLabelText, node.labelStyle, true, true));
let interfaceBBox = interfaceLabel.getBBox();
if (evaluate(getConfig().flowchart.htmlLabels)) {
const div = interfaceLabel.children[0];
@@ -935,7 +940,7 @@ const class_box = (parent, node) => {
}
const classTitleLabel = labelContainer
.node()
.appendChild(createLabel(classTitleString, node.labelStyle, true, true));
.appendChild(await createLabel(classTitleString, node.labelStyle, true, true));
select(classTitleLabel).attr('class', 'classTitle');
let classTitleBBox = classTitleLabel.getBBox();
if (evaluate(getConfig().flowchart.htmlLabels)) {
@@ -950,7 +955,7 @@ const class_box = (parent, node) => {
maxWidth = classTitleBBox.width;
}
const classAttributes = [];
node.classData.members.forEach((member) => {
node.classData.members.forEach(async (member) => {
const parsedInfo = member.getDisplayDetails();
let parsedText = parsedInfo.displayText;
if (getConfig().flowchart.htmlLabels) {
@@ -959,7 +964,7 @@ const class_box = (parent, node) => {
const lbl = labelContainer
.node()
.appendChild(
createLabel(
await createLabel(
parsedText,
parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,
true,
@@ -984,7 +989,7 @@ const class_box = (parent, node) => {
maxHeight += lineHeight;
const classMethods = [];
node.classData.methods.forEach((member) => {
node.classData.methods.forEach(async (member) => {
const parsedInfo = member.getDisplayDetails();
let displayText = parsedInfo.displayText;
if (getConfig().flowchart.htmlLabels) {
@@ -993,7 +998,7 @@ const class_box = (parent, node) => {
const lbl = labelContainer
.node()
.appendChild(
createLabel(
await createLabel(
displayText,
parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,
true,

View File

@@ -48,7 +48,12 @@ export const labelHelper = async (parent, node, _classes, isNode) => {
);
} else {
text = textNode.appendChild(
createLabel(sanitizeText(decodeEntities(labelText), config), node.labelStyle, false, isNode)
await createLabel(
sanitizeText(decodeEntities(labelText), config),
node.labelStyle,
false,
isNode
)
);
}
// Get the size of the label

View File

@@ -71,6 +71,10 @@ const config: RequiredDeep<MermaidConfig> = {
fontWeight: this.personFontWeight,
};
},
flowchart: {
...defaultConfigJson.flowchart,
inheritDir: false, // default to legacy behavior
},
external_personFont: function () {
return {

View File

@@ -27,6 +27,7 @@ import block from '../diagrams/block/blockDetector.js';
import architecture from '../diagrams/architecture/architectureDetector.js';
import { registerLazyLoadedDiagrams } from './detectType.js';
import { registerDiagram } from './diagramAPI.js';
import '../type.d.ts';
let hasLoadedDiagrams = false;
export const addDiagrams = () => {
@@ -69,6 +70,11 @@ export const addDiagrams = () => {
return text.toLowerCase().trimStart().startsWith('---');
}
);
if (includeLargeFeatures) {
registerLazyLoadedDiagrams(flowchartElk, mindmap, architecture);
}
// Ordering of detectors is important. The first one to return true will be used.
registerLazyLoadedDiagrams(
c4,
@@ -81,10 +87,8 @@ export const addDiagrams = () => {
pie,
requirement,
sequence,
flowchartElk,
flowchartV2,
flowchart,
mindmap,
timeline,
git,
stateV2,
@@ -95,7 +99,6 @@ export const addDiagrams = () => {
packet,
xychart,
block,
architecture,
radar
);
};

View File

@@ -1,4 +1,5 @@
import * as khroma from 'khroma';
import { getIconStyles } from '../globalStyles.js';
/** Returns the styles given options */
export interface BlockChartStyleOptions {
@@ -142,6 +143,7 @@ const getStyles = (options: BlockChartStyleOptions) =>
font-size: 18px;
fill: ${options.textColor};
}
${getIconStyles()}
`;
export default getStyles;

View File

@@ -1,3 +1,5 @@
import { getIconStyles } from '../globalStyles.js';
const getStyles = (options) =>
`g.classGroup text {
fill: ${options.nodeBorder || options.classText};
@@ -157,6 +159,7 @@ g.classGroup line {
font-size: 18px;
fill: ${options.textColor};
}
${getIconStyles()}
`;
export default getStyles;

View File

@@ -1,7 +1,7 @@
import { line, curveBasis } from 'd3';
import utils from '../../utils.js';
import { log } from '../../logger.js';
import { parseGenericTypes } from '../common/common.js';
import { parseGenericTypes, getUrl } from '../common/common.js';
let edgeCount = 0;
export const drawEdge = function (elem, path, relation, conf, diagObj) {
@@ -42,14 +42,7 @@ export const drawEdge = function (elem, path, relation, conf, diagObj) {
.attr('class', 'relation');
let url = '';
if (conf.arrowMarkerAbsolute) {
url =
window.location.protocol +
'//' +
window.location.host +
window.location.pathname +
window.location.search;
url = url.replace(/\(/g, '\\(');
url = url.replace(/\)/g, '\\)');
url = getUrl(true);
}
if (relation.relation.lineType == 1) {

View File

@@ -149,7 +149,7 @@ const breakToPlaceholder = (s: string): string => {
* @param useAbsolute - Whether to return the absolute URL or not
* @returns The current URL
*/
const getUrl = (useAbsolute: boolean): string => {
export const getUrl = (useAbsolute: boolean): string => {
let url = '';
if (useAbsolute) {
url =
@@ -158,8 +158,8 @@ const getUrl = (useAbsolute: boolean): string => {
window.location.host +
window.location.pathname +
window.location.search;
url = url.replaceAll(/\(/g, '\\(');
url = url.replaceAll(/\)/g, '\\)');
url = CSS.escape(url);
}
return url;
@@ -341,29 +341,36 @@ export const renderKatex = async (text: string, config: MermaidConfig): Promise<
return text.replace(katexRegex, 'MathML is unsupported in this environment.');
}
const { default: katex } = await import('katex');
const outputMode =
config.forceLegacyMathML || (!isMathMLSupported() && config.legacyMathML)
? 'htmlAndMathml'
: 'mathml';
return text
.split(lineBreakRegex)
.map((line) =>
hasKatex(line)
? `<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${line}</div>`
: `<div>${line}</div>`
)
.join('')
.replace(katexRegex, (_, c) =>
katex
.renderToString(c, {
throwOnError: true,
displayMode: true,
output: outputMode,
})
.replace(/\n/g, ' ')
.replace(/<annotation.*<\/annotation>/g, '')
);
if (includeLargeFeatures) {
const { default: katex } = await import('katex');
const outputMode =
config.forceLegacyMathML || (!isMathMLSupported() && config.legacyMathML)
? 'htmlAndMathml'
: 'mathml';
return text
.split(lineBreakRegex)
.map((line) =>
hasKatex(line)
? `<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${line}</div>`
: `<div>${line}</div>`
)
.join('')
.replace(katexRegex, (_, c) =>
katex
.renderToString(c, {
throwOnError: true,
displayMode: true,
output: outputMode,
})
.replace(/\n/g, ' ')
.replace(/<annotation.*<\/annotation>/g, '')
);
}
return text.replace(
katexRegex,
'Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.'
);
};
export default {

View File

@@ -6,7 +6,7 @@ import { log } from '../../logger.js';
import utils from '../../utils.js';
import erMarkers from './erMarkers.js';
import { configureSvgSize } from '../../setupGraphViewbox.js';
import { parseGenericTypes } from '../common/common.js';
import { parseGenericTypes, getUrl } from '../common/common.js';
import { v5 as uuid5 } from 'uuid';
/** Regex used to remove chars from the entity name so the result can be used in an id */
@@ -451,14 +451,7 @@ const drawRelationshipFromLayout = function (svg, rel, g, insert, diagObj) {
// TODO: Understand this better
let url = '';
if (conf.arrowMarkerAbsolute) {
url =
window.location.protocol +
'//' +
window.location.host +
window.location.pathname +
window.location.search;
url = url.replace(/\(/g, '\\(');
url = url.replace(/\)/g, '\\)');
url = getUrl(true);
}
// Decide which start and end markers it needs. It may be possible to be more concise here

View File

@@ -651,7 +651,8 @@ You have to call mermaid.initialize.`
const prims: any = { boolean: {}, number: {}, string: {} };
const objs: any[] = [];
let dir; // = undefined; direction.trim();
let dir: string | undefined;
const nodeList = a.filter(function (item) {
const type = typeof item;
if (item.stmt && item.stmt === 'dir') {
@@ -670,7 +671,16 @@ You have to call mermaid.initialize.`
return { nodeList, dir };
};
const { nodeList, dir } = uniq(list.flat());
const result = uniq(list.flat());
const nodeList = result.nodeList;
let dir = result.dir;
const flowchartConfig = getConfig().flowchart ?? {};
dir =
dir ??
(flowchartConfig.inheritDir
? (this.getDirection() ?? (getConfig() as any).direction ?? undefined)
: undefined);
if (this.version === 'gen-1') {
for (let i = 0; i < nodeList.length; i++) {
nodeList[i] = this.lookUpDomId(nodeList[i]);
@@ -681,6 +691,7 @@ You have to call mermaid.initialize.`
title = title || '';
title = this.sanitizeText(title);
this.subCount = this.subCount + 1;
const subGraph = {
id: id,
nodes: nodeList,

View File

@@ -1,5 +1,6 @@
// import khroma from 'khroma';
import * as khroma from 'khroma';
import { getIconStyles } from '../globalStyles.js';
/** Returns the styles given options */
export interface FlowChartStyleOptions {
@@ -177,6 +178,7 @@ const getStyles = (options: FlowChartStyleOptions) =>
}
text-align: center;
}
${getIconStyles()}
`;
export default getStyles;

View File

@@ -33,7 +33,7 @@ let sections = [];
let tasks = [];
let currentSection = '';
let displayMode = '';
const tags = ['active', 'done', 'crit', 'milestone'];
const tags = ['active', 'done', 'crit', 'milestone', 'vert'];
let funs = [];
let inclusiveEndDates = false;
let topAxis = false;
@@ -422,7 +422,7 @@ const compileData = function (prevTask, dataStr) {
const task = {};
// Get tags like active, done, crit and milestone
// Get tags like active, done, crit, milestone, and vert
getTaskTags(data, task, tags);
for (let i = 0; i < data.length; i++) {
@@ -470,7 +470,7 @@ const parseData = function (prevTaskId, dataStr) {
const task = {};
// Get tags like active, done, crit and milestone
// Get tags like active, done, crit, milestone, and vert
getTaskTags(data, task, tags);
for (let i = 0; i < data.length; i++) {
@@ -538,6 +538,7 @@ export const addTask = function (descr, data) {
rawTask.done = taskInfo.done;
rawTask.crit = taskInfo.crit;
rawTask.milestone = taskInfo.milestone;
rawTask.vert = taskInfo.vert;
rawTask.order = lastOrder;
lastOrder++;
@@ -570,6 +571,7 @@ export const addTaskOrg = function (descr, data) {
newTask.done = taskInfo.done;
newTask.crit = taskInfo.crit;
newTask.milestone = taskInfo.milestone;
newTask.vert = taskInfo.vert;
lastTask = newTask;
tasks.push(newTask);
};

View File

@@ -231,10 +231,11 @@ export const draw = function (text, id, version, diagObj) {
* @param w
*/
function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w) {
// Sort theArray so that tasks with `vert` come last
theArray.sort((a, b) => (a.vert === b.vert ? 0 : a.vert ? 1 : -1));
// Get unique task orders. Required to draw the background rects when display mode is compact.
const uniqueTaskOrderIds = [...new Set(theArray.map((item) => item.order))];
const uniqueTasks = uniqueTaskOrderIds.map((id) => theArray.find((item) => item.order === id));
// Draw background rects covering the entire width of the graph, these form the section rows.
svg
.append('g')
@@ -259,7 +260,8 @@ export const draw = function (text, id, version, diagObj) {
}
}
return 'section section0';
});
})
.enter();
// Draw the rects representing the tasks
const rectangles = svg.append('g').selectAll('rect').data(theArray).enter();
@@ -289,15 +291,26 @@ export const draw = function (text, id, version, diagObj) {
.attr('y', function (d, i) {
// Ignore the incoming i value and use our order instead
i = d.order;
if (d.vert) {
return conf.gridLineStartPadding;
}
return i * theGap + theTopPad;
})
.attr('width', function (d) {
if (d.milestone) {
return theBarHeight;
}
if (d.vert) {
return 0.08 * theBarHeight;
}
return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);
})
.attr('height', theBarHeight)
.attr('height', function (d) {
if (d.vert) {
return taskArray.length * (conf.barHeight + conf.barGap) + conf.barHeight * 2;
}
return theBarHeight;
})
.attr('transform-origin', function (d, i) {
// Ignore the incoming i value and use our order instead
i = d.order;
@@ -354,6 +367,9 @@ export const draw = function (text, id, version, diagObj) {
if (d.milestone) {
taskClass = ' milestone ' + taskClass;
}
if (d.vert) {
taskClass = ' vert ' + taskClass;
}
taskClass += secNum;
@@ -377,10 +393,13 @@ export const draw = function (text, id, version, diagObj) {
let endX = timeScale(d.renderEndTime || d.endTime);
if (d.milestone) {
startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
}
if (d.milestone) {
endX = startX + theBarHeight;
}
if (d.vert) {
return timeScale(d.startTime) + theSidePad;
}
const textWidth = this.getBBox().width;
// Check id text width > width of rectangle
@@ -396,6 +415,9 @@ export const draw = function (text, id, version, diagObj) {
})
.attr('y', function (d, i) {
// Ignore the incoming i value and use our order instead
if (d.vert) {
return conf.gridLineStartPadding + taskArray.length * (conf.barHeight + conf.barGap) + 60;
}
i = d.order;
return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;
})
@@ -406,6 +428,7 @@ export const draw = function (text, id, version, diagObj) {
if (d.milestone) {
endX = startX + theBarHeight;
}
const textWidth = this.getBBox().width;
let classStr = '';
@@ -445,6 +468,10 @@ export const draw = function (text, id, version, diagObj) {
taskType += ' milestoneText';
}
if (d.vert) {
taskType += ' vertText';
}
// Check id text width > width of rectangle
if (textWidth > endX - startX) {
if (endX + textWidth + 1.5 * conf.leftPadding > w) {

View File

@@ -237,6 +237,16 @@ const getStyles = (options) =>
fill: ${options.taskTextDarkColor} !important;
}
.vert {
stroke: ${options.vertLineColor};
}
.vertText {
font-size: 15px;
text-anchor: middle;
fill: ${options.vertLineColor} !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,

View File

@@ -0,0 +1,15 @@
export const getIconStyles = () => `
/* Font Awesome icon styling - consolidated */
.label-icon {
display: inline-block;
height: 1em;
overflow: visible;
vertical-align: -0.125em;
}
.node .label-icon path {
fill: currentColor;
stroke: revert;
stroke-width: revert;
}
`;

View File

@@ -1,7 +1,9 @@
import type { InfoFields, InfoDB } from './infoTypes.js';
import packageJson from '../../../package.json' assert { type: 'json' };
export const DEFAULT_INFO_DB: InfoFields = { version: packageJson.version } as const;
export const DEFAULT_INFO_DB: InfoFields = {
version: packageJson.version + (includeLargeFeatures ? '' : '-tiny'),
} as const;
export const getVersion = (): string => DEFAULT_INFO_DB.version;

View File

@@ -1,6 +1,7 @@
// @ts-expect-error Incorrect khroma types
import { darken, lighten, isDark } from 'khroma';
import type { DiagramStylesProvider } from '../../diagram-api/types.js';
import { getIconStyles } from '../globalStyles.js';
const genSections: DiagramStylesProvider = (options) => {
let sections = '';
@@ -105,5 +106,6 @@ const getStyles: DiagramStylesProvider = (options) =>
dominant-baseline: middle;
text-align: center;
}
${getIconStyles()}
`;
export default getStyles;

View File

@@ -30,6 +30,7 @@ describe('packet diagrams', () => {
[
[
{
"bits": 11,
"end": 10,
"label": "test",
"start": 0,
@@ -49,11 +50,13 @@ describe('packet diagrams', () => {
[
[
{
"bits": 11,
"end": 10,
"label": "test",
"start": 0,
},
{
"bits": 1,
"end": 11,
"label": "single",
"start": 11,
@@ -63,6 +66,58 @@ describe('packet diagrams', () => {
`);
});
it('should handle bit counts', async () => {
const str = `packet-beta
+8: "byte"
+16: "word"
`;
await expect(parser.parse(str)).resolves.not.toThrow();
expect(getPacket()).toMatchInlineSnapshot(`
[
[
{
"bits": 8,
"end": 7,
"label": "byte",
"start": 0,
},
{
"bits": 16,
"end": 23,
"label": "word",
"start": 8,
},
],
]
`);
});
it('should handle bit counts with bit or bits', async () => {
const str = `packet-beta
+8: "byte"
+16: "word"
`;
await expect(parser.parse(str)).resolves.not.toThrow();
expect(getPacket()).toMatchInlineSnapshot(`
[
[
{
"bits": 8,
"end": 7,
"label": "byte",
"start": 0,
},
{
"bits": 16,
"end": 23,
"label": "word",
"start": 8,
},
],
]
`);
});
it('should split into multiple rows', async () => {
const str = `packet-beta
0-10: "test"
@@ -73,11 +128,13 @@ describe('packet diagrams', () => {
[
[
{
"bits": 11,
"end": 10,
"label": "test",
"start": 0,
},
{
"bits": 20,
"end": 31,
"label": "multiple",
"start": 11,
@@ -85,6 +142,7 @@ describe('packet diagrams', () => {
],
[
{
"bits": 31,
"end": 63,
"label": "multiple",
"start": 32,
@@ -92,6 +150,7 @@ describe('packet diagrams', () => {
],
[
{
"bits": 26,
"end": 90,
"label": "multiple",
"start": 64,
@@ -111,11 +170,13 @@ describe('packet diagrams', () => {
[
[
{
"bits": 17,
"end": 16,
"label": "test",
"start": 0,
},
{
"bits": 14,
"end": 31,
"label": "multiple",
"start": 17,
@@ -123,6 +184,7 @@ describe('packet diagrams', () => {
],
[
{
"bits": 31,
"end": 63,
"label": "multiple",
"start": 32,
@@ -142,6 +204,16 @@ describe('packet diagrams', () => {
);
});
it('should throw error if numbers are not continuous with bit counts', async () => {
const str = `packet-beta
+16: "test"
18-20: "error"
`;
await expect(parser.parse(str)).rejects.toThrowErrorMatchingInlineSnapshot(
`[Error: Packet block 18 - 20 is not contiguous. It should start from 16.]`
);
});
it('should throw error if numbers are not continuous for single packets', async () => {
const str = `packet-beta
0-16: "test"
@@ -152,6 +224,16 @@ describe('packet diagrams', () => {
);
});
it('should throw error if numbers are not continuous for single packets with bit counts', async () => {
const str = `packet-beta
+16: "test"
18: "error"
`;
await expect(parser.parse(str)).rejects.toThrowErrorMatchingInlineSnapshot(
`[Error: Packet block 18 - 18 is not contiguous. It should start from 16.]`
);
});
it('should throw error if numbers are not continuous for single packets - 2', async () => {
const str = `packet-beta
0-16: "test"
@@ -172,4 +254,13 @@ describe('packet diagrams', () => {
`[Error: Packet block 25 - 20 is invalid. End must be greater than start.]`
);
});
it('should throw error if bit count is 0', async () => {
const str = `packet-beta
+0: "test"
`;
await expect(parser.parse(str)).rejects.toThrowErrorMatchingInlineSnapshot(
`[Error: Packet block 0 is invalid. Cannot have a zero bit field.]`
);
});
});

View File

@@ -10,26 +10,33 @@ const maxPacketSize = 10_000;
const populate = (ast: Packet) => {
populateCommonDb(ast, db);
let lastByte = -1;
let lastBit = -1;
let word: PacketWord = [];
let row = 1;
const { bitsPerRow } = db.getConfig();
for (let { start, end, label } of ast.blocks) {
if (end && end < start) {
for (let { start, end, bits, label } of ast.blocks) {
if (start !== undefined && end !== undefined && end < start) {
throw new Error(`Packet block ${start} - ${end} is invalid. End must be greater than start.`);
}
if (start !== lastByte + 1) {
start ??= lastBit + 1;
if (start !== lastBit + 1) {
throw new Error(
`Packet block ${start} - ${end ?? start} is not contiguous. It should start from ${
lastByte + 1
lastBit + 1
}.`
);
}
lastByte = end ?? start;
log.debug(`Packet block ${start} - ${lastByte} with label ${label}`);
if (bits === 0) {
throw new Error(`Packet block ${start} is invalid. Cannot have a zero bit field.`);
}
end ??= start + (bits ?? 1) - 1;
bits ??= end - start + 1;
lastBit = end;
log.debug(`Packet block ${start} - ${lastBit} with label ${label}`);
while (word.length <= bitsPerRow + 1 && db.getPacket().length < maxPacketSize) {
const [block, nextBlock] = getNextFittingBlock({ start, end, label }, row, bitsPerRow);
const [block, nextBlock] = getNextFittingBlock({ start, end, bits, label }, row, bitsPerRow);
word.push(block);
if (block.end + 1 === row * bitsPerRow) {
db.pushWord(word);
@@ -39,7 +46,7 @@ const populate = (ast: Packet) => {
if (!nextBlock) {
break;
}
({ start, end, label } = nextBlock);
({ start, end, bits, label } = nextBlock);
}
}
db.pushWord(word);
@@ -50,8 +57,11 @@ const getNextFittingBlock = (
row: number,
bitsPerRow: number
): [Required<PacketBlock>, PacketBlock | undefined] => {
if (block.start === undefined) {
throw new Error('start should have been set during first phase');
}
if (block.end === undefined) {
block.end = block.start;
throw new Error('end should have been set during first phase');
}
if (block.start > block.end) {
@@ -62,16 +72,20 @@ const getNextFittingBlock = (
return [block as Required<PacketBlock>, undefined];
}
const rowEnd = row * bitsPerRow - 1;
const rowStart = row * bitsPerRow;
return [
{
start: block.start,
end: row * bitsPerRow - 1,
end: rowEnd,
label: block.label,
bits: rowEnd - block.start,
},
{
start: row * bitsPerRow,
start: rowStart,
end: block.end,
label: block.label,
bits: block.end - rowStart,
},
];
};

View File

@@ -84,7 +84,8 @@ accDescr\s*"{"\s* { this.begin("acc_descr_multili
\-\-[x] return 'DOTTED_CROSS';
\-[\)] return 'SOLID_POINT';
\-\-[\)] return 'DOTTED_POINT';
":"(?:(?:no)?wrap:)?[^#\n;]+ return 'TXT';
":"(?:(?:no)?wrap:)?[^#\n;]* return 'TXT';
":" return 'TXT';
"+" return '+';
"-" return '-';
<<EOF>> return 'NEWLINE';

View File

@@ -2022,4 +2022,20 @@ describe('sequence db class', () => {
expect(Object.hasOwn(sequenceDb, fun)).toBe(true);
}
});
// This test verifies that messages with a colon but no content (e.g., "Alice->>Bob:")
// are correctly parsed as valid messages with an empty string as the message content.
it('should parse a message with a trailing colon but no content', async () => {
const diagram = await Diagram.fromText(`
sequenceDiagram
Alice->>Bob:
Bob->>Alice:Got it!
`);
const messages = diagram.db.getMessages();
expect(messages.length).toBe(2);
expect(messages[0].message).toBe('');
expect(messages[0].from).toBe('Alice');
expect(messages[0].to).toBe('Bob');
});
});

View File

@@ -3,6 +3,7 @@ import { select } from 'd3';
import svgDraw, { drawKatex, ACTOR_TYPE_WIDTH, drawText, fixLifeLineHeights } from './svgDraw.js';
import { log } from '../../logger.js';
import common, { calculateMathMLDimensions, hasKatex } from '../common/common.js';
import { getUrl } from '../common/common.js';
import * as svgDrawCommon from '../common/svgDrawCommon.js';
import { getConfig } from '../../diagram-api/diagramAPI.js';
import assignWithDepth from '../../assignWithDepth.js';
@@ -449,14 +450,7 @@ const drawMessage = async function (diagram, msgModel, lineStartY: number, diagO
let url = '';
if (conf.arrowMarkerAbsolute) {
url =
window.location.protocol +
'//' +
window.location.host +
window.location.pathname +
window.location.search;
url = url.replace(/\(/g, '\\(');
url = url.replace(/\)/g, '\\)');
url = getUrl(true);
}
line.attr('stroke-width', 2);

View File

@@ -46,6 +46,10 @@
%%
"click" return 'CLICK';
"href" return 'HREF';
\"[^"]*\" return 'STRING';
"default" return 'DEFAULT';
.*direction\s+TB[^\n]* return 'direction_tb';
@@ -246,8 +250,26 @@ statement
| direction
| acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } ;
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }
| CLICK idStatement STRING STRING NL
{
$$ = {
stmt: "click",
id: $2,
url: $3,
tooltip: $4
};
}
| CLICK idStatement HREF STRING NL
{
$$ = {
stmt: "click",
id: $2,
url: $4,
tooltip: ""
};
}
;
classDefStatement
: classDef CLASSDEF_ID CLASSDEF_STYLEOPTS {

View File

@@ -1,7 +1,7 @@
import { line, curveBasis } from 'd3';
import { StateDB } from './stateDb.js';
import utils from '../../utils.js';
import common from '../common/common.js';
import common, { getUrl } from '../common/common.js';
import { getConfig } from '../../diagram-api/diagramAPI.js';
import { log } from '../../logger.js';
@@ -444,14 +444,7 @@ export const drawEdge = function (elem, path, relation) {
.attr('class', 'transition');
let url = '';
if (getConfig().state.arrowMarkerAbsolute) {
url =
window.location.protocol +
'//' +
window.location.host +
window.location.pathname +
window.location.search;
url = url.replace(/\(/g, '\\(');
url = url.replace(/\)/g, '\\)');
url = getUrl(true);
}
svgPath.attr(

View File

@@ -39,7 +39,16 @@ const CONSTANTS = {
} as const;
interface BaseStmt {
stmt: 'applyClass' | 'classDef' | 'dir' | 'relation' | 'state' | 'style' | 'root' | 'default';
stmt:
| 'applyClass'
| 'classDef'
| 'dir'
| 'relation'
| 'state'
| 'style'
| 'root'
| 'default'
| 'click';
}
interface ApplyClassStmt extends BaseStmt {
@@ -92,6 +101,13 @@ export interface RootStmt {
doc?: Stmt[];
}
export interface ClickStmt extends BaseStmt {
stmt: 'click';
id: string;
url: string;
tooltip: string;
}
interface Note {
position?: 'left of' | 'right of';
text: string;
@@ -104,7 +120,8 @@ export type Stmt =
| RelationStmt
| StateStmt
| StyleStmt
| RootStmt;
| RootStmt
| ClickStmt;
interface DiagramEdge {
id1: string;
@@ -185,6 +202,7 @@ export class StateDB {
private currentDocument = this.documents.root;
private startEndCount = 0;
private dividerCnt = 0;
private links = new Map<string, { url: string; tooltip: string }>();
static readonly relationType = {
AGGREGATION: 0,
@@ -230,6 +248,9 @@ export class StateDB {
case STMT_APPLYCLASS:
this.setCssClass(item.id.trim(), item.styleClass);
break;
case 'click':
this.addLink(item.id, item.url, item.tooltip);
break;
}
}
const diagramStates = this.getStates();
@@ -438,6 +459,7 @@ export class StateDB {
this.startEndCount = 0;
this.classes = newClassesList();
if (!saveCommon) {
this.links = new Map(); // <-- add here
commonClear();
}
}
@@ -458,6 +480,21 @@ export class StateDB {
return this.currentDocument.relations;
}
/**
* Adds a clickable link to a state.
*/
addLink(stateId: string, url: string, tooltip: string): void {
this.links.set(stateId, { url, tooltip });
log.warn('Adding link', stateId, url, tooltip);
}
/**
* Get all registered links.
*/
getLinks(): Map<string, { url: string; tooltip: string }> {
return this.links;
}
/**
* If the id is a start node ( [*] ), then return a new id constructed from
* the start node name and the current start node count.

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