Compare commits

...

1004 Commits

Author SHA1 Message Date
omkarht
9f6ee53382 fix: refactored parsing logic for new syntax
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-08-12 14:20:47 +05:30
omkarht
3248bf3da4 Merge branch 'develop' of https://github.com/mermaid-js/mermaid into 6637-add-new-participant-types-to-sequence-diagrams 2025-08-12 13:01:18 +05:30
Sidharth Vinod
bf3ca9d1ef Merge pull request #6332 from ajuckel/ajuckel/issue-6171-equals-in-sequence-labels
fix: Allow equals sign in sequenceDiagram labels
2025-08-11 14:36:42 +00:00
omkarht
e7a7ff8a2a fix: refactored code
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-08-11 13:20:49 +05:30
omkarht
68fc68c239 Merge branch 'develop' into 6637-add-new-participant-types-to-sequence-diagrams 2025-08-11 13:15:44 +05:30
Shubham P
e53c17a012 Merge pull request #6841 from mermaid-js/renovate/peter-evans-create-pull-request-digest
chore(deps): update peter-evans/create-pull-request digest to 1310d7d
2025-08-11 07:24:30 +00:00
renovate[bot]
bb2d6973ba chore(deps): update peter-evans/create-pull-request digest to 1310d7d 2025-08-11 02:12:30 +00:00
autofix-ci[bot]
769b362005 [autofix.ci] apply automated fixes 2025-08-08 14:53:47 +00:00
omkarht
e4d3aa4610 fix: refactored documentation, test cases and sequenceDiagram.jison file
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-08-08 20:18:21 +05:30
omkarht
716548548a fix: rendering test cases
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-08-08 19:31:56 +05:30
Sidharth Vinod
9322771b5c Merge pull request #6839 from aloisklink/refactor/remove-unnecessary-check-in-DOMPurify-hooks
refactor: remove unnecessary `Element` check since DOMPurify 3.2.2
2025-08-08 13:09:49 +00:00
Sidharth Vinod
2fe3063bf5 Merge pull request #6838 from saurabhg772244/saurabh/fix-node-border-style-for-hand-drawn-shapes
Saurabh/fix-node-border-style-for-hand-drawn-shapes
2025-08-08 13:02:38 +00:00
Shubham P
4e55a45b1b Merge branch 'develop' into saurabh/fix-node-border-style-for-hand-drawn-shapes 2025-08-08 16:57:55 +05:30
omkarht
4bece53a3c Merge branch 'develop' into 6637-add-new-participant-types-to-sequence-diagrams 2025-08-08 16:08:54 +05:30
Knut Sveidqvist
3d319824a6 Merge pull request #6683 from mermaid-js/6576-state-diagram-label-position
6576: State diagram edge label position
2025-08-08 10:26:18 +00:00
Knut Sveidqvist
aa5d443a46 Merge pull request #6693 from mermaid-js/6649-gantt-chart-dateformat
6649: gantt chart date format issue
2025-08-08 10:09:59 +00:00
Knut Sveidqvist
356da0b4d7 Merge branch 'develop' into 6576-state-diagram-label-position 2025-08-08 12:01:34 +02:00
Knut Sveidqvist
22530a8bdf Merge pull request #6653 from mermaid-js/4459-remove-beta-suffix
#4459: Remove beta suffix
2025-08-08 09:55:06 +00:00
Knut Sveidqvist
e6574ef40c Merge pull request #6651 from mermaid-js/6584-piechart-zero-negative-values
6584: prevent pie chart crash on zero or negative values
2025-08-08 09:52:16 +00:00
Knut Sveidqvist
c4eb526162 Merge pull request #6734 from mermaid-js/6730-gantt-excludes-datetime-format
6730: Fix excluded dates ignored in YYYY-MM-DD HH:mm:ss date format in gantt diagram
2025-08-08 09:33:56 +00:00
saurabhg772244
4d62d59632 added changeset 2025-08-08 14:19:03 +05:30
saurabhg772244
5af489d8dd Fix border style for hand drawn shapes 2025-08-08 14:17:09 +05:30
omkarht
297be4a868 Merge branch 'develop' into 6637-add-new-participant-types-to-sequence-diagrams 2025-08-08 13:40:38 +05:30
omkarht
fb6ace73b5 docs: updated documentation for new syntax
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-08-08 13:30:00 +05:30
Knut Sveidqvist
074701e316 Merge pull request #6833 from mermaid-js/6611-block-diagram-arrow-direction
6611: Block diagram shows incorrect arrow direction
2025-08-08 07:24:02 +00:00
autofix-ci[bot]
bf362673fc [autofix.ci] apply automated fixes 2025-08-07 15:26:12 +00:00
omkarht
d042b21b12 Merge branch 'develop' into 6637-add-new-participant-types-to-sequence-diagrams 2025-08-07 20:47:08 +05:30
omkarht
677ff82d13 chore: implemented new syntx
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-08-07 20:45:23 +05:30
Sidharth Vinod
4b31361506 Merge pull request #6733 from mermaid-js/fix-connection-gaps-in-flowchart-shapes
Fix: Connection gaps in flowchart shapes
2025-08-07 14:36:34 +00:00
Knut Sveidqvist
981829a426 Updated order of lexer statements in the grammar 2025-08-07 15:21:13 +02:00
omkarht
327a5aa9fd chore: added logs in sequenceDiagram.jison
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-08-07 18:07:13 +05:30
darshanr0107
165ffefad5 chore: remove unnecessary test case
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-08-07 12:09:49 +05:30
darshanr0107
9258b2933b add changeset
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-08-06 20:05:35 +05:30
darshanr0107
f5445b266e fix: incorrect arrow direction in block direction
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-08-06 20:01:28 +05:30
Alois Klink
7a1530d911 refactor: remove unnecessary Element check
[DOMPurify v3.2.2][1] narrowed down the types of these hooks so that
these are known to have the `Element` type, which means checking the
type of these at runtime is unnecessary.

[1]: https://github.com/cure53/DOMPurify/releases/tag/3.2.2

See: fe3cffbb67
See: 4cdfd1ffef
2025-08-06 22:30:09 +08:00
omkarht
848f69a75c Merge branch 'develop' into 6637-add-new-participant-types-to-sequence-diagrams 2025-08-06 17:14:45 +05:30
omkarht
99dbeba407 fix: refactored code
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-08-06 17:10:55 +05:30
omkarht
d525acc05b chore: Add documentation for the syntax of the newly added participant type
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-08-06 17:08:57 +05:30
Shubham P
d93d9a521d Merge pull request #6820 from kriss-u/fix/6815_escape_namespace_class_diagram
fix: add classLiteral to the language for class diagram namespace
2025-08-06 08:12:54 +00:00
Krishna Upadhyay
c99bce6bab fix: add classLiteral to the language for class diagram namespace 2025-08-05 12:15:44 -05:00
omkarht
b451c66d7c chore: added test case for updated shapes
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-08-05 19:43:34 +05:30
omkarht
1dd11705d9 fix: updated changeset
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-08-05 17:40:18 +05:30
omkarht
29de40478f Merge branch 'develop' into fix-connection-gaps-in-flowchart-shapes 2025-08-04 17:06:03 +05:30
Shubham P
4ab98c2ec7 Merge pull request #6813 from mermaid-js/renovate/peter-evans-create-pull-request-digest
chore(deps): update peter-evans/create-pull-request digest to 07cbaeb
2025-08-04 07:36:23 +00:00
renovate[bot]
aeb51e56e2 chore(deps): update peter-evans/create-pull-request digest to 07cbaeb 2025-08-04 03:11:32 +00:00
Shubham P
ddcd8a5e73 Merge pull request #6803 from mermaid-js/6774-update-db-class-architecture-diagram
6774: update architecture diagram to reflect new class-based DB structure
2025-07-30 13:37:32 +00:00
Shubham P
e464d080ef Merge pull request #6804 from mermaid-js/6691-update-packet-diagram-class-based-db
6691: update packet diagram to use new class-based DB approach
2025-07-30 13:36:43 +00:00
Sidharth Vinod
1a9b94ca2d Merge pull request #6688 from zarhasan/patch-1
Update integrations-community.md
2025-07-30 13:32:11 +00:00
Shubham P
e4b33a1d99 Merge pull request #6796 from HashanCP/bug/6795_fix-flowchart-elk-detector
make flowchart elk detector regex match less greedy
2025-07-30 09:41:37 +00:00
omkarht
e27a9da61d Update .changeset/vast-buses-see.md
Co-authored-by: Sidharth Vinod <github@sidharth.dev>
2025-07-30 13:18:44 +05:30
omkarht
03cf10003f fix: modified changeset to patch
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-30 13:16:49 +05:30
omkarht
8e31fdb611 Merge branch 'develop' into 6774-update-db-class-architecture-diagram 2025-07-29 17:01:12 +05:30
omkarht
5dd748148f fix: refactored code
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-29 16:59:02 +05:30
omkarht
895f9d43ff 6691: update packet diagram to use new class-based DB approach
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-29 16:55:04 +05:30
omkarht
4915545429 Merge branch 'develop' into 6637-add-new-participant-types-to-sequence-diagrams 2025-07-29 16:26:31 +05:30
shubham-mermaid
fb890a2be8 Merge branch 'develop' into bug/6795_fix-flowchart-elk-detector 2025-07-29 16:09:29 +05:30
shubham-mermaid
5986189a52 Merge pull request #6801 from mermaid-js/sidv/fixID
fix: Casing of ID in requirement diagram
2025-07-29 10:16:51 +00:00
omkarht
1988dfc956 Merge branch 'develop' into 6774-update-db-class-architecture-diagram 2025-07-29 15:41:46 +05:30
omkarht
e48b0ba61d chore: added changeset
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-29 15:41:21 +05:30
omkarht
1a4b8662cf 6774: update architecture diagram to reflect new class-based DB structure
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-29 15:21:34 +05:30
shubham-mermaid
6083463c8e Merge pull request #6799 from mermaid-js/renovate/patch-eslint
chore(deps): update eslint (patch)
2025-07-29 09:49:28 +00:00
shubham-mermaid
1a14e331ea Merge pull request #6739 from kriss-u/bug/6681_td_tb_behavior
fix: trim the direction string in flowchart
2025-07-29 09:43:32 +00:00
shubham-mermaid
ebb6680eba Merge pull request #6792 from mermaid-js/prashants/mermaid-diagrams-flowchart-mindmap-mermaidAPI
chore: Mermaid diagrams flowchart mindmap mermaid api
2025-07-29 09:42:41 +00:00
shubham-mermaid
6d1d46f88a Merge branch 'develop' into bug/6795_fix-flowchart-elk-detector 2025-07-29 15:11:56 +05:30
shubham-mermaid
435790f931 Merge pull request #6798 from ZenUml/fix/zenuml-rendering
Fix: zenuml rendering
2025-07-29 09:41:00 +00:00
shubham-mermaid
ffe9c1090e Merge branch 'develop' into sidv/fixID 2025-07-29 15:09:56 +05:30
renovate[bot]
a476e99d4c chore(deps): update eslint 2025-07-29 08:41:36 +00:00
Alois Klink
0cc0b63e52 Merge pull request #6702 from qraqras/bug/6633_remove-unexpected-spaces-in-block-diagram
Fix: Remove unexpected spaces in Block Diagram
2025-07-29 08:29:22 +00:00
Prashant-7718
694844050a removed changeset 2025-07-29 13:34:18 +05:30
autofix-ci[bot]
1be1620000 [autofix.ci] apply automated fixes 2025-07-29 07:45:04 +00:00
shubham-mermaid
c36cd05c45 Create light-flowers-judge.md 2025-07-29 13:10:10 +05:30
Alois Klink
b7a591b8d3 docs(block): add clarifying comment for overflow
This line is a bit confusing to me, so I thought I should clarify it!

See: 939da082b2
2025-07-29 15:45:53 +09:00
Alois Klink
8bb29fc879 docs(block): add changeset for overflow bug
Add a changeset that explains that overflowing blocks no longer
create an empty line in block diagrams or cause bugs in later lines.

Technically, this is a breaking change since it can change the layout of
block diagrams, but this diagram is still in `-beta` and they all will
still render correctly.
2025-07-29 15:40:36 +09:00
Alois Klink
e073c80019 test(e2e): test block column overflowing
Add a test-case for 939da082b (Fix 6633, 2025-06-28), that checks
whether overflowing blocks render correctly.
2025-07-29 15:27:10 +09:00
Sidharth Vinod
01aaef39b4 docs: Add changeset 2025-07-29 11:31:28 +05:30
Sidharth Vinod
3d640fc620 fix: Casing of ID to match https://www.britannica.com/dictionary/ID 2025-07-29 11:30:11 +05:30
omkarht
334fe87bc6 fix: fixed failing test cases
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-28 18:33:58 +05:30
omkarht
283e7810d2 Merge branch 'develop' into 6637-add-new-participant-types-to-sequence-diagrams 2025-07-28 17:26:44 +05:30
omkarht
237d01d510 fix: shifted matchAsActorOrParticipant function to sequenceDB file from sequenceDiagram.jison file
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-28 16:47:54 +05:30
MrCoder
724197c910 chore: add missing newline at end of README.md 2025-07-27 21:25:46 +10:00
MrCoder
6180c5f2ff chore: add TypeScript declaration for ZenUml module 2025-07-27 21:12:08 +10:00
MrCoder
a9f7a94ae3 fix: remove TypeScript error suppression for ZenUml instantiation 2025-07-27 21:08:00 +10:00
MrCoder
3ffe9618ae chore: added changeset. 2025-07-27 21:05:49 +10:00
MrCoder
da539c1fa1 chore: Upgrade @zenuml/core to version 3.35.2 2025-07-27 20:55:58 +10:00
Hashan Chandika
5e8aa2dccf add unit tests for coverage #6795 2025-07-27 15:21:46 +05:30
Hashan Chandika
ac04172cf8 add tests for #6795 2025-07-27 14:53:28 +05:30
Hashan Chandika
cf5b4b89a8 make regex match less greedy 2025-07-27 13:51:26 +05:30
MrCoder
1c269e0432 Convert mermaid-zenuml README from symlink to regular file
Changed packages/mermaid-zenuml/README.md from a symbolic link pointing to ../mermaid/src/docs/syntax/zenuml.md to a standalone README file with comprehensive documentation for the @mermaid-js/mermaid-zenuml package.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-25 07:52:32 +10:00
Prashant-7718
999b836508 updated changeset 2025-07-24 14:46:34 +05:30
Prashant-7718
326e4e3693 added mermaid files for documentation 2025-07-24 14:16:18 +05:30
autofix-ci[bot]
9c92da487f [autofix.ci] apply automated fixes 2025-07-24 08:39:03 +00:00
Prashant-7718
10752f1357 added mermaid files 2025-07-24 14:03:50 +05:30
autofix-ci[bot]
1a80854242 [autofix.ci] apply automated fixes 2025-07-24 07:30:35 +00:00
Prashant-7718
fc9c600a31 Merge branch 'develop' of https://github.com/mermaid-js/mermaid into prashants/mermaid-diagrams-flowchart-mindmap-mermaidAPI 2025-07-24 12:52:47 +05:30
Prashant-7718
da8ce0b93e chore: removed unwanted files 2025-07-24 12:49:08 +05:30
Prashant-7718
00a79353fc changeset added 2025-07-24 12:40:39 +05:30
shubham-mermaid
1ceeca1ef1 Merge pull request #6782 from mermaid-js/renovate/peter-evans-create-pull-request-digest
chore(deps): update peter-evans/create-pull-request digest to 2e50522
2025-07-24 06:21:23 +00:00
shubham-mermaid
94890390ef Merge pull request #6783 from mermaid-js/renovate/patch-eslint
chore(deps): update eslint (patch)
2025-07-24 06:20:37 +00:00
Prashant-7718
adfeb093cb chore: mermaid diagrams for flowchart, mindmap and mermaidAPI files 2025-07-23 18:55:25 +05:30
renovate[bot]
366d217928 chore(deps): update eslint 2025-07-23 09:15:14 +00:00
renovate[bot]
b94f1336ab chore(deps): update peter-evans/create-pull-request digest to 2e50522 2025-07-23 09:14:38 +00:00
shubham-mermaid
020c6d66e0 Merge pull request #6744 from SpecularAura/feature/6617_per-link-style
6617: Support Per-Link Curve Styling in Flowcharts
2025-07-23 09:00:42 +00:00
Sidharth Vinod
cfc2551bdc Merge pull request #6778 from lcnittl/docs/NA_update-mime-type-iana-status
Update MIME type IANA status
2025-07-21 00:46:51 +05:30
autofix-ci[bot]
000308c8f5 [autofix.ci] apply automated fixes 2025-07-18 21:44:56 +00:00
SpecularAura
6039a8b930 Merge remote-tracking branch 'origin/feature/6617_per-link-style' into feature/6617_per-link-style 2025-07-18 21:38:04 +00:00
SpecularAura
cd282f2245 Added Documentation for the per link styling in syntax/flowchat 2025-07-18 21:19:06 +00:00
autofix-ci[bot]
a27d90fe9c [autofix.ci] apply automated fixes 2025-07-18 13:05:27 +00:00
Christian Knittl-Frank
64bf34b9ab Update MIME type IANA status
The mermaid media type has been recognized by IANA on 2023-09-18
2025-07-18 13:54:16 +01:00
Alois Klink
9faf2f9fb2 Merge pull request #6717 from mermaid-js/6633-Stacking-blocks-renders-unexpected-space
6633: Log warning for blocks exceeding column width
2025-07-18 07:31:17 +00:00
darshanr0107
f683b03645 Merge branch '6633-Stacking-blocks-renders-unexpected-space' of https://github.com/mermaid-js/mermaid into 6633-Stacking-blocks-renders-unexpected-space 2025-07-18 12:50:36 +05:30
darshanr0107
9cef40d164 update changeset
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-18 12:50:26 +05:30
SpecularAura
04612e078a Removed directive syntax from the documentation 2025-07-17 21:12:51 +00:00
SpecularAura
af585bdcc7 Added a functioning visual test for per link curve styling 2025-07-17 21:09:22 +00:00
autofix-ci[bot]
37bfa2aa75 [autofix.ci] apply automated fixes 2025-07-17 14:46:30 +00:00
darshanr0107
54640ce476 resolved PR comments
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-17 20:11:21 +05:30
shubham-mermaid
47b4c56b2b Merge pull request #6772 from hustcc/patch-2
chore: update to add mcp-mermaid
2025-07-17 07:28:14 +00:00
Sidharth Vinod
6b1b0bf151 chore: Add symlink 2025-07-17 12:45:46 +05:30
Sidharth Vinod
7ba332ad4a docs: Move changelog content 2025-07-17 12:45:03 +05:30
autofix-ci[bot]
412d2a09d3 [autofix.ci] apply automated fixes 2025-07-17 01:41:47 +00:00
hustcc
7886fed8b2 chore: update to add mcp-mermaid 2025-07-17 09:36:16 +08:00
Sidharth Vinod
af3d5b6528 docs: Add README for examples 2025-07-16 20:11:38 +05:30
Sidharth Vinod
404286a90d Merge branch 'master' into develop
* master:
  Version Packages
2025-07-16 19:53:10 +05:30
Sidharth Vinod
827a9af790 chore: Add repo to examples package 2025-07-16 19:52:52 +05:30
darshanr0107
a14cd0e2a1 fix: update test case
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-16 18:47:45 +05:30
darshanr0107
0823e08a54 Merge branch 'develop' into 6584-piechart-zero-negative-values 2025-07-16 18:05:06 +05:30
Ashish Jain
95733b6295 Merge pull request #6762 from mermaid-js/changeset-release/master
Version Packages
2025-07-16 14:05:42 +02:00
darshanr0107
5cafe241d0 Merge branch 'develop' into 6649-gantt-chart-dateformat 2025-07-16 17:29:52 +05:30
darshanr0107
c847817a54 Merge branch 'develop' into 6730-gantt-excludes-datetime-format 2025-07-16 17:29:37 +05:30
darshanr0107
8b86d617e7 Merge branch 'develop' into 6633-Stacking-blocks-renders-unexpected-space 2025-07-16 17:29:09 +05:30
darshanr0107
3ab0961bdc fix: PR comment and updated test case
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-16 17:27:08 +05:30
darshanr0107
cc2112c7aa fix: updated test case
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-16 15:25:16 +05:30
omkarht
0892870b5d Merge branch 'develop' into fix-connection-gaps-in-flowchart-shapes 2025-07-16 14:55:22 +05:30
omkarht
500f90a105 Merge branch 'fix-connection-gaps-in-flowchart-shapes' of https://github.com/mermaid-js/mermaid into fix-connection-gaps-in-flowchart-shapes 2025-07-16 14:54:09 +05:30
omkarht
14983158a2 fix: updated hexagon shape
on-behalf-of: @Mermaid-Chart hello@mermaidchart.com
2025-07-16 14:52:53 +05:30
github-actions[bot]
767754f4fb Version Packages 2025-07-16 08:25:22 +00:00
Ashish Jain
cff59c58b4 Merge pull request #6757 from mermaid-js/develop
Pre Release
2025-07-16 10:23:12 +02:00
darshanr0107
3fea9e8759 fix: update changeset
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-16 13:40:40 +05:30
darshanr0107
e5ea2ed0b1 Merge branch 'develop' of https://github.com/mermaid-js/mermaid into 4459-remove-beta-suffix 2025-07-16 13:38:28 +05:30
darshanr0107
34e7f9704b fix: update changeset
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-16 13:20:47 +05:30
darshanr0107
ac976245ad fix: fix review comments
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-16 13:11:44 +05:30
darshanr0107
1176d30668 fix: update changeset
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-16 12:38:35 +05:30
Sidharth Vinod
5b241bbb97 Merge pull request #6758 from mermaid-js/fix/certificate-error-for-noteshub
add noteshub.app to exclusions for certificate errors
2025-07-15 21:43:32 +05:30
shubham-mermaid
7e5e47843b add noteshub.app to exclusions for certificate errors
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-15 21:36:22 +05:30
Sidharth Vinod
6728852b7a Merge branch 'develop' into fix-connection-gaps-in-flowchart-shapes 2025-07-15 20:37:20 +05:30
Sidharth Vinod
15e7c890ed Merge branch 'develop' into 6576-state-diagram-label-position 2025-07-15 20:21:40 +05:30
Sidharth Vinod
9e2cd1a926 Merge pull request #6738 from mermaid-js/treemap-diagram-to-use-the-new-class-based-approach
Updated code to use class based approach for treemap
2025-07-15 14:43:24 +00:00
Sidharth Vinod
abf2227faf Merge pull request #6751 from mermaid-js/6750-convert-mindmap-to-class-based-approach
6750: Change MindmapDB to class based architecture
2025-07-15 14:40:29 +00:00
Sidharth Vinod
7db942b0e1 Merge pull request #6756 from mzner/chore/update-katex-to-latest-version
chore: update katex to latest version due to CVE vulnerability
2025-07-15 14:36:33 +00:00
Matteo
70041c806f chore: update katex to latest version due to CVE vulnerability 2025-07-15 14:59:14 +02:00
shubham-mermaid
77e2703f72 Merge branch 'develop' into treemap-diagram-to-use-the-new-class-based-approach 2025-07-15 17:41:20 +05:30
shubham-mermaid
771801b366 Updated changeset
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-15 17:40:59 +05:30
darshanr0107
a9a0a9b2de Merge branch '6750-convert-mindmap-to-class-based-approach' of https://github.com/mermaid-js/mermaid into 6750-convert-mindmap-to-class-based-approach 2025-07-15 16:51:10 +05:30
darshanr0107
1e5e835c41 updated changeset on-behalf-of: @Mermaid-Chart hello@mermaidchart.com 2025-07-15 16:50:15 +05:30
Sidharth Vinod
1f3f8da0f7 Merge pull request #6749 from mermaid-js/chore/downgrade-chokidar-to-3.6.0
chore: downgrade chokidar to 3.6.0
2025-07-15 16:40:56 +05:30
Sidharth Vinod
b11f40e8ce Merge branch 'develop' into chore/downgrade-chokidar-to-3.6.0
* develop:
  chore: Update jsdom
  Update @argos-ci/cypress to v5.0.2
  Update @argos-ci/cypress to v5.0.1
  chore: Upgrade cypress
  chore: Update @argos-ci/cypress to v5
  chore(test): Finish refactoring of jsdomit tests
  docs(tests): Documentation for `jsdomIt` tests
  test(refactor): Provide SVG selection in `jsdomIt` function
  test(refactor): Use real-ish rendering instead of heavy mocking in unit tests
2025-07-15 16:40:18 +05:30
Sidharth Vinod
1fe045e638 chore: pin chokidar version 2025-07-15 16:36:13 +05:30
Sidharth Vinod
1c750ffc70 Merge pull request #6675 from quilicicf/chore/6627_improve-rendering-tests
Improve unit tests to allow pseudo-render tests
2025-07-15 09:57:48 +00:00
Sidharth Vinod
b0ec93f29c chore: Update jsdom 2025-07-15 13:54:45 +05:30
shubham-mermaid
6b071c135a Merge branch 'develop' into 6750-convert-mindmap-to-class-based-approach 2025-07-15 13:49:35 +05:30
shubham-mermaid
42a3c3487f Remove constructor and clear method call from TreeMapDB class
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-07-15 13:44:26 +05:30
Sidharth Vinod
d7b8ed2c5a Merge remote-tracking branch 'origin/develop' into pr/quilicicf/6675
* origin/develop:
  Update @argos-ci/cypress to v5.0.2
  Update @argos-ci/cypress to v5.0.1
  chore: Upgrade cypress
  chore: Update @argos-ci/cypress to v5
2025-07-15 13:34:11 +05:30
darshanr0107
96c21c7e54 resolve PR comments and update changeset 2025-07-15 12:19:02 +05:30
shubham-mermaid
e95e4d155a Updated changeset on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com> 2025-07-15 12:09:17 +05:30
shubham-mermaid
688170558c Updated changeset on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com> 2025-07-15 12:07:52 +05:30
shubham-mermaid
832f012e10 Merge branch 'treemap-diagram-to-use-the-new-class-based-approach' of https://github.com/mermaid-js/mermaid into treemap-diagram-to-use-the-new-class-based-approach 2025-07-15 12:07:01 +05:30
shubham-mermaid
2e2e8c4152 Added clear function in constructor on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com> 2025-07-15 12:06:22 +05:30
Sidharth Vinod
6ff6e08c4b Merge branch 'develop' into treemap-diagram-to-use-the-new-class-based-approach 2025-07-15 00:00:49 +05:30
Sidharth Vinod
d7f1f12549 Merge pull request #6748 from mermaid-js/sidv/updateArgosCy
chore: Update @argos-ci/cypress to v5
2025-07-14 23:35:38 +05:30
Sidharth Vinod
6e56869566 Update @argos-ci/cypress to v5.0.2 2025-07-14 23:22:40 +05:30
darshanr0107
d3e2be35be added changeset 2025-07-14 20:12:31 +05:30
Sidharth Vinod
852cb35f0a Update @argos-ci/cypress to v5.0.1 2025-07-14 20:05:57 +05:30
darshanr0107
260a045da0 migrate mindmap to class based approach 2025-07-14 20:00:13 +05:30
omkarht
a28965064d chore: downgrade chokidar to 3.6.0 2025-07-14 19:34:02 +05:30
Sidharth Vinod
355eeeb9cc chore: Upgrade cypress 2025-07-14 18:33:09 +05:30
Sidharth Vinod
5449d6a447 chore: Update @argos-ci/cypress to v5
This fixes the random test renaming issue
2025-07-14 18:15:18 +05:30
quilicicf
34e91f8b65 chore(test): Finish refactoring of jsdomit tests 2025-07-14 14:04:53 +02:00
quilicicf
627ee1f34d docs(tests): Documentation for jsdomIt tests 2025-07-14 14:04:53 +02:00
quilicicf
28840ebd84 test(refactor): Provide SVG selection in jsdomIt function 2025-07-14 14:04:53 +02:00
quilicicf
4145879003 test(refactor): Use real-ish rendering instead of heavy mocking in unit tests
* Creates a utility method `jsdomIt` that overrides `it` from `vitest` and fakes a browser environment by :
  * Creating a DOM with `jsdom` (and `canvas`)
  * Adding (for the duration of the test) that DOM's `window` and `document` on `global`
  * Monkey-patching DOM methods that require a rendering engine (`Element.getBBox` & `Element.getComputedLength`)
* Removes all d3 mocking since it can now work normally in `jsdomIt` tests
* Re-writes existing rendering tests to :
  * Use `jsdomIt`
  * Get rid of most of the involved mocking
  * Run `expect` calls on the generated SVG instead

Inspired by d3's own test code mocking : https://github.com/d3/d3-selection/blob/v3.0.0/test/jsdom.js
2025-07-14 14:04:52 +02:00
omkarht
0451e343ef Merge branch 'develop' into fix-connection-gaps-in-flowchart-shapes 2025-07-14 16:53:02 +05:30
omkarht
a2dbc8e4b3 updated hexagon shape 2025-07-14 16:51:34 +05:30
shubham-mermaid
e097b480d5 Merge branch 'develop' into treemap-diagram-to-use-the-new-class-based-approach 2025-07-14 16:12:37 +05:30
shubham-mermaid
f76e27db70 Merge pull request #6747 from mermaid-js/6619-sequence-title-box-safari
6619: Prevent title from overlapping with box top border in Safari
2025-07-14 09:13:53 +00:00
darshanr0107
3e3ae08930 add changeset 2025-07-14 14:17:00 +05:30
darshanr0107
966c112eb1 prevent title from overlapping with box top border in Safari 2025-07-14 14:11:06 +05:30
shubham-mermaid
55527e70c2 Merge pull request #6745 from mermaid-js/renovate/autofix-ci-action-digest
chore(deps): update autofix-ci/action digest to 635ffb0
2025-07-14 06:47:45 +00:00
renovate[bot]
447d1cf988 chore(deps): update autofix-ci/action digest to 635ffb0 2025-07-14 00:55:26 +00:00
autofix-ci[bot]
003d1c7a70 [autofix.ci] apply automated fixes 2025-07-12 20:03:58 +00:00
SpecularAura
daf8d8d3be Added Changeset for Per Link Styling of edges 2025-07-12 19:41:01 +00:00
SpecularAura
d7a55b422b Added tests for Per Link Curve Styling 2025-07-12 19:08:42 +00:00
shubham-mermaid
12e3d31437 Addresses type incompatibility by setting the parser database to undefined, on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com> 2025-07-11 16:54:56 +05:30
shubham-mermaid
ad024b01d6 Updated the function to use class method on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com> 2025-07-11 15:18:41 +05:30
shubham-mermaid
c12aea588c Updated code as per suggestions on-behalf-of: @MermaidChart <hello@mermaidchart.com> 2025-07-11 15:16:49 +05:30
shubham-mermaid
9dfbf1166d Refactors treemap DB to class-based state management on-behalf-of: @MermaidChart shubham-mermaid@mermaidchart.com 2025-07-11 14:04:30 +05:30
Krishna Upadhyay
98bf9b4cb4 test: add tests for directions in flowchart 2025-07-10 22:17:30 -05:00
Krishna Upadhyay
e9ce8cf4da fix: trim the direction string in flowchart 2025-07-10 22:01:50 -05:00
shubham-mermaid
d90634bf2b added changeset 2025-07-10 20:39:52 +05:30
shubham-mermaid
90707e8062 fix(parser): initialize parser.yy as TreemapDB 2025-07-10 20:25:46 +05:30
shubham-mermaid
7e23f984e6 Updated code to use class based approach 2025-07-10 20:21:27 +05:30
SpecularAura
b3a12237c0 Added per link styling
Edited flowDB.ts which already had interpolate for styling links
individually. Added the ability to modify this parameter using the
newer @ syntax using the curve property.
2025-07-10 12:55:09 +00:00
darshanr0107
aea16eaf7e Merge branch 'develop' into 6584-piechart-zero-negative-values 2025-07-10 16:36:41 +05:30
darshanr0107
bb7cd70034 Merge branch 'develop' into 6730-gantt-excludes-datetime-format 2025-07-10 16:35:54 +05:30
Alois Klink
fad6676d18 Merge pull request #6715 from Syn3ugar/feature/timelineRenderer-conf
fix: update leftMargin value
2025-07-10 10:37:48 +00:00
Syn3ugar
637680d4d9 fix(timeline): load leftMargin from config
The `timeline.leftMargin` value in the docs/schema was not being
correctly loaded for timeline diagrams.
2025-07-10 18:28:15 +08:00
darshanr0107
35a92efcdc resolve PR comments 2025-07-10 15:49:53 +05:30
shubham-mermaid
5f6f5110fd Merge pull request #6718 from MoonBall/feat/modify-blockDiagram-log
Modify block diagram's logger to global log
2025-07-10 08:00:39 +00:00
Sidharth Vinod
af47269342 Merge pull request #6615 from mermaid-js/renovate/major-all-major
fix(deps): update all major dependencies (major)
2025-07-09 20:05:52 +00:00
renovate[bot]
d3c0893937 fix(deps): update all major dependencies 2025-07-09 19:53:14 +00:00
Sidharth Vinod
75ef9bc681 fix: Make PR labeler stricter 2025-07-10 01:21:42 +05:30
Sidharth Vinod
45edc91591 Merge pull request #6510 from mermaid-js/sidv/packet-release
Move `packet` diagram out of beta
2025-07-09 19:35:19 +00:00
Sidharth Vinod
f4edd19371 chore: Add auto labeler for Sponsored work 2025-07-10 01:00:10 +05:30
Sidharth Vinod
b611a13e04 chore: Add test for packet-beta 2025-07-10 00:44:07 +05:30
Sidharth Vinod
7a38eb715d chore: Changeset 2025-07-10 00:43:02 +05:30
Sidharth Vinod
2715ddb338 chore: Update packet-beta to packet 2025-07-10 00:41:02 +05:30
Sidharth Vinod
ca2eca58c9 Merge branch 'develop' into sidv/packet-release
* develop: (266 commits)
  chore: update E2E timings
  docs: Update changeset
  fix: Add useful error message to test
  chore: Add treemap example
  chore: Add treemap example
  chore: Add peerDependency to @mermaid-js/examples
  Version Packages
  docs: Update changeset
  update in changeset
  updated validaor and tests to use treemap
  Updated parser to use treemap
  chore: Fail build in CI on type errors
  fix text going outside node
  Version Packages
  Updated phpbb url  to support 403 in lychee
  Updated lychee for working url phpbb.com
  resolve PR comment
  resolve PR comments
  chore: update E2E timings
  add changeset
  ...
2025-07-10 00:38:41 +05:30
darshanr0107
fce7cabb71 add changeset 2025-07-09 20:24:36 +05:30
darshanr0107
38e6dc497a Merge branch 'develop' into 6730-gantt-excludes-datetime-format 2025-07-09 20:06:07 +05:30
darshanr0107
5f0c53c8a7 fix excluded dates ignored in YYYY-MM-DD HH:mm:ss date format 2025-07-09 20:02:18 +05:30
omkarht
f9da4433ff Merge branch 'develop' into fix-connection-gaps-in-flowchart-shapes 2025-07-09 19:07:25 +05:30
omkarht
fc07f0d8ab added changeset 2025-07-09 19:06:57 +05:30
shubham-mermaid
b4fae2d096 Merge pull request #6716 from mermaid-js/6664-text-going-outside-node
6664: Text rendering issue in flowchart note elements
2025-07-09 13:18:26 +00:00
omkarht
ce7a487dfc Fix: Fixed Connection gaps in flowchart shapes 2025-07-09 18:37:52 +05:30
shubham-mermaid
6dd9af0dd4 Merge branch 'develop' into 6664-text-going-outside-node 2025-07-09 18:34:15 +05:30
shubham-mermaid
3151241559 Merge branch 'develop' into feat/modify-blockDiagram-log 2025-07-09 13:47:24 +05:30
darshanr0107
8c0d12027d Merge branch 'develop' into 6584-piechart-zero-negative-values 2025-07-09 12:22:59 +05:30
omkarht
afeb761296 Merge branch 'develop' into 6637-add-new-participant-types-to-sequence-diagrams 2025-07-08 13:53:51 +05:30
omkarht
3abcfbb8d2 added unit tests 2025-07-08 13:48:27 +05:30
omkarht
ee82694645 refactor(lexer): added contextual handling for new participant types as actors 2025-07-08 13:47:41 +05:30
Sidharth Vinod
dda9c9b46e Merge pull request #6731 from mermaid-js/update-timings
Update E2E Timings
2025-07-08 13:23:06 +05:30
github-actions[bot]
cdd1a70b67 chore: update E2E timings 2025-07-08 04:14:48 +00:00
Sidharth Vinod
12c94a177b Merge pull request #6728 from mermaid-js/develop
Pre Release
2025-07-08 01:12:32 +05:30
Sidharth Vinod
d8bd4dea93 Merge pull request #6453 from mermaid-js/sidv/examples
Add metadata for diagrams
2025-07-08 01:11:26 +05:30
Sidharth Vinod
6deb476182 docs: Update changeset 2025-07-08 01:01:47 +05:30
Sidharth Vinod
ed297ee235 fix: Add useful error message to test 2025-07-08 00:55:44 +05:30
Sidharth Vinod
03c1201fcb chore: Add treemap example 2025-07-08 00:55:24 +05:30
Sidharth Vinod
3ca317c5a0 chore: Add treemap example 2025-07-08 00:45:47 +05:30
Sidharth Vinod
4d83263388 chore: Add peerDependency to @mermaid-js/examples
Co-authored-by: Alois Klink <alois@aloisklink.com>
2025-07-08 00:44:07 +05:30
Sidharth Vinod
254e5cbd51 Merge branch 'sidv/examples' of https://github.com/mermaid-js/mermaid into sidv/examples
* 'sidv/examples' of https://github.com/mermaid-js/mermaid:
2025-07-08 00:39:56 +05:30
Sidharth Vinod
a58dd3c6ce Merge branch 'develop' into sidv/examples 2025-07-08 00:38:03 +05:30
Sidharth Vinod
10b7bb568f Merge branch 'develop' into sidv/examples
* develop: (198 commits)
  Version Packages
  docs: Update changeset
  update in changeset
  updated validaor and tests to use treemap
  Updated parser to use treemap
  chore: Fail build in CI on type errors
  Version Packages
  Updated phpbb url  to support 403 in lychee
  Updated lychee for working url phpbb.com
  resolve PR comment
  resolve PR comments
  chore: update E2E timings
  add changeset
  log warning when duplicate commit IDs are encountered
  Added updated chatgpt  plugin url and removed failing url
  Added classes and outernodes in imperativestate
  Updated code as per suggestions
  fixed unwanted vitepress from lockfile
  Updated as per suggestions
  Added step to install pnpm and echo statements for debugging.
  ...
2025-07-08 00:36:08 +05:30
Sidharth Vinod
1aa2870224 Merge pull request #6727 from mermaid-js/changeset-release/master
Version Packages
2025-07-07 20:52:47 +05:30
github-actions[bot]
8fbcbb6dc9 Version Packages 2025-07-07 15:21:07 +00:00
Sidharth Vinod
3e545d7925 docs: Update changeset 2025-07-07 20:49:04 +05:30
Sidharth Vinod
75d2a259ed Merge pull request #6726 from mermaid-js/develop
Pre Release
2025-07-07 20:29:25 +05:30
shubham-mermaid
746280b3e2 Merge pull request #6724 from mermaid-js/sidv/failOnTypeError
chore: Fail build in CI on type errors
2025-07-07 14:08:28 +00:00
Sidharth Vinod
fa4e30bb15 Merge pull request #6725 from mermaid-js/use-treemap-in-languim
Use treemap in languim
2025-07-07 19:23:03 +05:30
shubham-mermaid
950b107dd4 update in changeset 2025-07-07 19:15:50 +05:30
shubham-mermaid
35b84761a9 updated validaor and tests to use treemap 2025-07-07 18:54:38 +05:30
shubham-mermaid
0da2922ee7 Updated parser to use treemap 2025-07-07 18:50:53 +05:30
Sidharth Vinod
85eba01663 chore: Fail build in CI on type errors 2025-07-07 18:02:23 +05:30
Gang Chen
79ba50216a Modify block diagram's logger to global log 2025-07-06 01:09:36 +08:00
darshanr0107
71b04f93b0 added changeset 2025-07-04 18:37:32 +05:30
darshanr0107
27185f62e4 throw error when block width is greater than column width 2025-07-04 18:26:39 +05:30
darshanr0107
9655d07adf fix text going outside node 2025-07-04 16:11:30 +05:30
Ashish Jain
2b3cb6a362 Merge pull request #6713 from mermaid-js/changeset-release/master
Version Packages
2025-07-03 15:51:36 +02:00
github-actions[bot]
89ac2932c4 Version Packages 2025-07-03 13:28:11 +00:00
Ashish Jain
e828609749 Merge pull request #6695 from mermaid-js/develop
Pre-Release
2025-07-03 15:24:36 +02:00
Ashish Jain
91f141f772 Merge pull request #6711 from mermaid-js/update-lychee-for-phpbb
Updated phpbb url  to support 403 in lychee
2025-07-03 12:53:41 +00:00
shubham-mermaid
c77b968f1e Updated phpbb url to support 403 in lychee 2025-07-03 18:12:12 +05:30
Ashish Jain
ba13981905 Updated lychee for working url phpbb.com 2025-07-03 12:56:09 +02:00
Alois Klink
a7a94b95e1 Merge pull request #6707 from mermaid-js/4838-gitgraph-chronology-duplicate-id
4838: Log warning for duplicate commit IDs in gitGraph
2025-07-03 10:34:25 +00:00
darshanr0107
31f141c61a Merge branch 'develop' into 4838-gitgraph-chronology-duplicate-id 2025-07-03 15:39:40 +05:30
darshanr0107
fb017bebfd resolve PR comment
Co-authored-by: Alois Klink <alois@aloisklink.com>
2025-07-03 15:39:26 +05:30
darshanr0107
648698a43a resolve PR comments 2025-07-03 13:57:36 +05:30
Sidharth Vinod
a5e4729c76 Merge pull request #6700 from mermaid-js/update-timings
Update E2E Timings
2025-07-03 12:52:12 +05:30
github-actions[bot]
c884def5fc chore: update E2E timings 2025-07-03 04:14:58 +00:00
darshanr0107
592c5bb880 add changeset 2025-07-02 12:16:17 +05:30
darshanr0107
da0c6c6c32 log warning when duplicate commit IDs are encountered 2025-07-02 11:59:20 +05:30
omkarht
012530e98e added changeset 2025-07-01 19:02:57 +05:30
omkarht
a4a27611dd fix: minor refinement 2025-07-01 18:11:41 +05:30
omkarht
5055ade44e Merge branch 'develop' into 6637-add-new-participant-types-to-sequence-diagrams 2025-07-01 13:29:18 +05:30
omkarht
b61bec8faf added test cases for new participant types of sequence diagram 2025-07-01 12:58:04 +05:30
darshanr0107
1414380181 Merge branch 'develop' into 6584-piechart-zero-negative-values 2025-07-01 12:34:50 +05:30
darshanr0107
6686ee9253 Merge branch 'develop' into 4459-remove-beta-suffix 2025-07-01 12:34:33 +05:30
darshanr0107
7f109c7b94 Merge branch 'develop' into 6576-state-diagram-label-position 2025-07-01 11:15:46 +05:30
darshanr0107
b9c3375be3 Merge branch '6576-state-diagram-label-position' of https://github.com/mermaid-js/mermaid into 6576-state-diagram-label-position 2025-06-30 20:20:48 +05:30
darshanr0107
4254bdd473 added test cases for edge label positions 2025-06-30 20:15:32 +05:30
darshanr0107
4012cbf013 Update changeset
Co-authored-by: Sidharth Vinod <github@sidharth.dev>
2025-06-30 18:32:31 +05:30
qraqras
939da082b2 Fix 6633 2025-06-28 08:18:19 +00:00
Knut Sveidqvist
d9396eedd6 Merge pull request #6698 from mermaid-js/update-urls-in-docs
Added updated chatgpt  plugin url and removed failing url
2025-06-27 12:46:28 +00:00
omkarht
76d073b027 chore: adjusted database and queue shape 2025-06-27 17:56:03 +05:30
shubham-mermaid
5f9601b6a8 Merge branch 'develop' into update-urls-in-docs 2025-06-27 17:53:04 +05:30
shubham-mermaid
378f8ece0c Added updated chatgpt plugin url and removed failing url 2025-06-27 17:50:45 +05:30
shubham-mermaid
148a42a31a Merge pull request #6590 from mermaid-js/knsv-treemap
Adding support for the new diagram type nested treemap
2025-06-27 10:31:32 +00:00
shubham-mermaid
8980ca4526 Added classes and outernodes in imperativestate 2025-06-27 15:18:53 +05:30
darshanr0107
814b68b4a9 added changeset 2025-06-27 15:16:20 +05:30
darshanr0107
bfa0eefa32 fix gantt chart date format issue 2025-06-27 15:01:45 +05:30
shubham-mermaid
caa04aad8b Updated code as per suggestions 2025-06-27 13:48:44 +05:30
omkarht
cc476d59d1 6637-Add new participant types to Sequence Diagrams 2025-06-27 13:42:19 +05:30
shubham-mermaid
3dc06ea9bd fixed unwanted vitepress from lockfile 2025-06-26 19:27:40 +05:30
shubham-mermaid
c311c1ba5d Merge branch 'develop' into knsv-treemap 2025-06-26 18:40:43 +05:30
Sidharth Vinod
11a86d9c06 Merge pull request #6689 from mermaid-js/#6669-pnpm-lock-workflow-validation-
Added step to install pnpm
2025-06-26 12:59:17 +00:00
shubham-mermaid
037bec189c Updated as per suggestions 2025-06-26 17:43:06 +05:30
shubham-mermaid
9b164dd185 Added step to install pnpm and echo statements for debugging. 2025-06-26 14:41:03 +05:30
shubham-mermaid
4ee124bf91 Merge branch 'develop' into knsv-treemap 2025-06-26 13:04:47 +05:30
autofix-ci[bot]
e70be4f155 [autofix.ci] apply automated fixes 2025-06-25 11:00:55 +00:00
Khizar Hasan
6621f6ddb2 Update integrations-community.md
Added 'WP Documentation' in integrations.
2025-06-25 16:25:47 +05:30
darshanr0107
579c22cf5d refactor code 2025-06-24 17:08:42 +05:30
darshanr0107
33e08daf17 added changeset 2025-06-24 15:10:36 +05:30
darshanr0107
24257de8a6 fix state diagram edge label position 2025-06-24 14:50:20 +05:30
darshanr0107
42ac1848dd Merge branch 'develop' into 6584-piechart-zero-negative-values 2025-06-23 19:52:23 +05:30
darshanr0107
3920ad442d resolved PR comments 2025-06-23 15:08:11 +05:30
Sidharth Vinod
e7970c66ee Merge pull request #6670 from mermaid-js/#6669-pnpm-lock-validations
Added workflow file for validating pnpm-lock file
2025-06-23 09:11:05 +00:00
shubham-mermaid
c7b96be683 Merge branch 'develop' into #6669-pnpm-lock-validations 2025-06-23 12:43:35 +05:30
shubham-mermaid
0623a87d70 Removed js file check in paths 2025-06-23 12:43:13 +05:30
shubham-mermaid
c5f89eaa9a Update .github/workflows/validate-lockfile.yml
Co-authored-by: Sidharth Vinod <github@sidharth.dev>
2025-06-23 12:41:21 +05:30
Sidharth Vinod
1fbe550285 Merge pull request #6659 from sametcn99/patch-1
Add vitepress plugin link
2025-06-21 05:46:08 +00:00
Sidharth Vinod
b3724f04c4 Merge pull request #6673 from mermaid-js/kill-the-bird
Kill the bird
2025-06-21 05:41:04 +00:00
Nacho Orlandoni
2f58a0e188 Kill the bird
This seems like an abandoned product, where the author went on a rampage trying to get it included into as many repositories as he can as a publicity stunt and no longer even works...
2025-06-20 22:07:14 -04:00
shubham-mermaid
6f1e0e4d17 Updated message 2025-06-20 18:57:22 +05:30
shubham-mermaid
7dd8ddc3eb Added generic message. 2025-06-20 18:55:45 +05:30
shubham-mermaid
222d7170f7 Added changeset 2025-06-20 14:11:26 +05:30
shubham-mermaid
3137cff4a5 Added auto-comment 2025-06-20 14:07:37 +05:30
shubham-mermaid
b45b1d7795 Trigger Build 2025-06-20 13:54:18 +05:30
shubham-mermaid
e1030b186e Added validation for packages/mermaid/src/vitepress path 2025-06-20 13:18:50 +05:30
shubham-mermaid
334c8c2962 use depth 0 2025-06-20 13:12:56 +05:30
shubham-mermaid
bdaa3f693a Added PR based sha 2025-06-20 13:11:33 +05:30
shubham-mermaid
be13fb0391 Updated origin to event.pull_request.base.ref 2025-06-20 12:53:47 +05:30
shubham-mermaid
c120901744 Added workflow file for validating pnpm-lock file 2025-06-20 12:47:17 +05:30
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
autofix-ci[bot]
badb019d38 [autofix.ci] apply automated fixes 2025-06-17 11:17:51 +00:00
Sidharth Vinod
e7ec8ed527 fix: Copy changelog to tiny 2025-06-17 16:35:46 +05:30
samet
d85a393bcd Add vitepress plugin link 2025-06-17 14:04:55 +03:00
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
darshanr0107
53d27b771d Merge branch 'develop' into 4459-remove-beta-suffix 2025-06-17 15:57:40 +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
darshanr0107
2c0931da46 added changeset 2025-06-17 15:53:25 +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
darshanr0107
8224a81ab6 fix xychart test cases 2025-06-17 13:52:04 +05:30
Ashish Jain
e5f6ea0b13 Add canonicals to pages migrated to docs.mermaidchart.com 2025-06-17 10:16:46 +02:00
darshanr0107
98442294ed resolved PR comments 2025-06-17 13:44:12 +05:30
darshanr0107
a3d164fde8 remove beta suffix for block diagram 2025-06-17 12:43:26 +05:30
darshanr0107
9dc987b28b remove beta support for sankey diagram 2025-06-17 12:12:40 +05:30
darshanr0107
72c0d9df26 added test case for preventing zero% values from rendering 2025-06-16 19:38:58 +05:30
darshanr0107
cfbce54638 prevent zero% slices from rendering in pie chart 2025-06-16 19:11:29 +05:30
darshanr0107
6979aa1013 Fix failing test cases and update error messages for negative and zero inputs 2025-06-16 14:53:09 +05:30
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
darshanr0107
ea60525988 remove beta suffix from xyChart 2025-06-13 19:33:43 +05:30
darshanr0107
9da6fb39ae added changeset 2025-06-12 19:18:36 +05:30
darshanr0107
83b9a17277 fix: prevent pie chart crash on zero or negative values 2025-06-12 18:13:11 +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
Knut Sveidqvist
dc3ed65c18 Commented out skipped tests 2025-05-20 15:26:27 +02:00
Knut Sveidqvist
43092e6e11 Fixed rendering issues found while testing, setting to treemap-beta 2025-05-20 15:22:49 +02:00
Knut Sveidqvist
878e77acab Updates after review comments 2025-05-20 12:56:31 +02:00
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
Knut Sveidqvist
63827db60d Added padding as configuration 2025-05-15 10:59:47 +02:00
Knut Sveidqvist
41108358f6 Adding support for title and accessibilities 2025-05-15 10:44:46 +02: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
f970fc8bea Merge branch 'develop' into knsv-treemap 2025-05-13 14:39:53 +02: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
Knut Sveidqvist
db461a4c6c Updated lockfile 2025-05-12 19:21:25 +02:00
Knut Sveidqvist
fe33d5fb53 Merge remote-tracking branch 'origin/develop' into knsv-treemap 2025-05-12 19:18:04 +02:00
Knut Sveidqvist
64c4d4197b Prettier fix for json file 2025-05-12 18:30:06 +02:00
Knut Sveidqvist
ed7bab76f2 Fixed linting issues in markdown file 2025-05-12 18:27:40 +02:00
Knut Sveidqvist
f338802642 Adding changeset 2025-05-12 18:05:43 +02:00
Knut Sveidqvist
445595f942 Handling longer summaries for sections and lint fixes for the renderer 2025-05-12 17:57:23 +02:00
Knut Sveidqvist
66ce617bea Added support for valueFormat directive - linting 2025-05-12 17:47:00 +02:00
Knut Sveidqvist
3e07a5acff Added support for valueFormat directive 2025-05-12 17:46:19 +02:00
Knut Sveidqvist
df1e739194 Added support for valueFormat directive 2025-05-12 17:40:23 +02:00
Knut Sveidqvist
2def5a0768 Added visual tests 2025-05-12 17:16:29 +02:00
Knut Sveidqvist
2746bccef3 Added rendering and documentation for treemap - linting 2025-05-12 15:54:06 +02:00
Knut Sveidqvist
f0c3dfe3b3 Added rendering and documentation for treemap 2025-05-12 15:47:58 +02:00
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
Knut Sveidqvist
680d65114c Added class suppoort to the grammar 2025-05-09 13:47:45 +02: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
Knut Sveidqvist
4f8f929340 adjusted layout and theme support 2025-05-08 16:32:40 +02:00
Knut Sveidqvist
3629e8e480 Update treemap renderer for improved padding and layout adjustments 2025-05-08 14:20:05 +02:00
Knut Sveidqvist
ff48c2e1da adjusted layout WIP 2025-05-08 13:42:50 +02:00
Knut Sveidqvist
1bd13b50f1 added proper hierarchy from parsed data 2025-05-08 11:19:19 +02: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
Knut Sveidqvist
e0a075ecca Adding treemap 2025-05-07 18:16:00 +02:00
omkarht
2a10143406 Fix: Adjust ER diagram row height calculation and layout rendering 2025-05-07 20:47:15 +05:30
Knut Sveidqvist
40eb0cc240 Passing tests 2025-05-07 16:15:14 +02:00
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
954f6cc8fc Merge branch 'develop' into sidv/examples
* develop: (189 commits)
  chore(deps): update dependency vite to v6.1.6 [security]
  corrected font size text
  docs(theme): fix table formatting by removing extra line between fontFamily and fontSize
  chore(deps): update dependency eslint-plugin-unicorn to v59
  chore(deps): update dependency vite to v6.1.5 [security]
  docs(theme): document fontFamily customization in themeVariables
  chore(deps): update eslint
  chore(deps): update peter-evans/create-pull-request digest to 3b1f4bf
  chore(deps): update dependency vite to v6.1.5 [security]
  Added the changeset
  Deleted unused code
  Deleted unused method
  chore: update E2E timings
  added changeset and unit test
  fix(sequenceDiagram): allow empty message after colon (Fixes #6518)
  chore(deps): update wei/curl digest to 012398a
  `layout-elk` package documentation misleading version
  [autofix.ci] apply automated fixes
  code review - wording and removals
  [autofix.ci] apply automated fixes
  ...
2025-05-02 02:32:50 +05:30
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
19884294bc chore: Move packet diagram out of beta 2025-04-20 14:09:27 +05:30
Sidharth Vinod
e6b63fd70a chore: Bump beta version to publish 2025-04-20 13:48:11 +05:30
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
Sidharth Vinod
24aec8c280 Merge pull request #6343 from jeswr/fix/timeline-event-colons
fix: allow colons in events
2025-04-18 08:30:02 +00:00
Sidharth Vinod
8c4fc3c6ff Merge pull request #5993 from jakebeamish/patch-1
Fix code block typo in syntax-reference.md
2025-04-18 01:24:15 -07:00
Sidharth Vinod
d72ee5fc95 Merge pull request #6502 from jsoref/spelling
chore: Fix spelling
2025-04-18 01:21:21 -07:00
Sidharth Vinod
b3ff80f211 Merge pull request #6499 from jsoref/docs/6498_remove-deprecated-init-config
chore: Remove deprecated init config
2025-04-18 08:06:08 +00:00
Sidharth Vinod
8a34154efa docs: Fix casing of Frontmatter config 2025-04-18 13:28:41 +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
Josh Soref
8ce1f70066 spelling: youtube
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
334294c6af spelling: without
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
e0f3f2bd5a spelling: withdrawal
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
6dad2ab327 spelling: very
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
4d2e424c30 spelling: typescript
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
ff217957fc spelling: tooltip
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
866b29c050 spelling: to
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
a463d11e57 spelling: threshold
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
5267f7c6ea spelling: themeable
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
2bdecc2842 spelling: the
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
d8efe9a55d spelling: than
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
ae564f30af spelling: text
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
2a6da19956 spelling: task
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
de41669320 spelling: syntax
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
02b997f4e4 spelling: svg
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
90c0908ed5 spelling: subgraphs
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
a7d76b2695 spelling: style
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
e46c7ae996 spelling: string
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
af7a5fe77d spelling: strict
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
f9fbadbbe2 spelling: state
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
dec82de586 spelling: some
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
598c72853f spelling: sibling
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
b1e1a0c0d7 spelling: should
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
a9f3b432ff spelling: set
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
cd2ab38927 spelling: semicolon
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
04448e3b6a spelling: section
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
2a12a64c06 spelling: router
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
586b528a16 spelling: righty
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
36e6e6e1be spelling: rendering
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
1de7d31d90 spelling: quotation
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
34d91d0e88 spelling: previously
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:55 -04:00
Josh Soref
101dc6d52c spelling: precedence
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
1fbe17e04c spelling: possible
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
8fed1c86b0 spelling: on
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
b808801347 spelling: nonexistent
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
58ec4ca39f spelling: node
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
7e3d547094 spelling: neither-nor
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
79f010143a spelling: mobile
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
aa9df775cd spelling: misspelling
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
2601ec89c8 spelling: markdown
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
566415c189 spelling: make
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
cbabc7b709 spelling: lefty
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
873962c739 spelling: label
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
2aeb435f19 spelling: kick-start
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
e0818c9e47 spelling: key
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
a3753d8f4d spelling: javascript
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
308e2cc107 spelling: is
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
a578cb8def spelling: is not
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
a823bf043b spelling: introduced
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
3980c99c22 spelling: into
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
c81f63b462 spelling: id
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
16167a64e5 spelling: html
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
cba4d733f0 spelling: hierarchy
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
6a0fb67ab7 spelling: hierarchical
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
4bfd0f753d spelling: have
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
bf83262d7c spelling: handle huge
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
ccdd0f0146 spelling: handdrawn
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
82646432a1 spelling: grammar
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
c82579097c spelling: github
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
92132ad4f1 spelling: gitgraph
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
8564ebbdbd spelling: fundamentals
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
1ca6ff93ff spelling: from
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
20098b287b spelling: for
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
0474a8422b spelling: for example
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
075f0f580f spelling: excluding
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
78ded6452f spelling: even though
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
08085b8821 spelling: distinguish
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
5f35d70ce2 spelling: detected
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
08951dbbf0 spelling: delegate
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
7caf377963 spelling: definition
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
0103da0179 spelling: cspell:ignore
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
a6c9ab04dc spelling: corresponding
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
b9c472e091 spelling: compound
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
4ed4756220 spelling: columns
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
4b12ebee51 spelling: code paths
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
d6e1541bc8 spelling: cluster
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
0507fe114e spelling: cannot
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
2bb77406fb spelling: bypass
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:54 -04:00
Josh Soref
2215bf6aaa spelling: bullet
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
206cc51578 spelling: bronze
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
c4c55277cb spelling: boundaries
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
0c2d222aa6 spelling: beginning
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
fc3d4859db spelling: been
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
c7714fd666 spelling: backticked
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
e2bf95c922 spelling: backslash
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
a79a50b77f spelling: axis
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
9133fcb9a8 spelling: axis name
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
00e9ed2024 spelling: assignments
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
5919d39812 spelling: and
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
f5fa0ae876 spelling: an
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
de9eb67040 spelling: accessibilities
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
cb7518a960 spelling: a
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
34bf5c8be1 Shorten alt text 2025-04-17 17:38:53 -04:00
Josh Soref
7d1319f97c Clarify that a is a tag 2025-04-17 17:38:53 -04:00
Josh Soref
9c46e960e7 link: theming your diagram
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
cd956e1b60 link: mermaid needs more Collaborators
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
78cf1706a9 link: list of currently used variable names
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
607e9ab989 link: implementation in the live editor
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
Josh Soref
0cf0b684cf link: add custom icons
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-04-17 17:38:53 -04:00
autofix-ci[bot]
cb0cb5dfc7 [autofix.ci] apply automated fixes 2025-04-17 17:50:20 +00:00
Josh Soref
330c48fa3f chore: Use yaml instead of note for standalone config: example 2025-04-17 13:45:27 -04:00
Josh Soref
2ff6de11dc chore: Change %%{init...}%% to config: 2025-04-17 13:42:28 -04:00
Josh Soref
385fab8c67 chore: Remove trailing whitespace 2025-04-17 13:42:28 -04:00
Udval E.
e49911e748 Merge branch 'develop' into feature/3250/add_vertline_to_gantt_plot 2025-04-17 12:21:17 -04:00
autofix-ci[bot]
8a84ede164 [autofix.ci] apply automated fixes 2025-04-17 16:17:01 +00:00
Sidharth Vinod
d79b7b2d97 Merge branch 'sidv/examples' of https://github.com/mermaid-js/mermaid into sidv/examples
* 'sidv/examples' of https://github.com/mermaid-js/mermaid: (110 commits)
  [autofix.ci] apply automated fixes
  chore: Change `mermaid` blocks to `mermaid-example` in docs
  chore: Remove duplicate `mermaid` blocks
  chore: update E2E timings
  [autofix.ci] apply automated fixes
  chore: Switch from `%%{init` to `config:`
  chore: Add details to e2e-timings
  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
  ...
2025-04-17 21:42:14 +05:30
Sidharth Vinod
844f879f63 fix: Examples unit test 2025-04-17 21:42:05 +05:30
Sidharth Vinod
cf789d2c91 Merge branch 'develop' into sidv/examples 2025-04-17 09:06:50 -07:00
Sidharth Vinod
4936ef5c30 chore: Split changeset
Co-authored-by: Alois Klink <alois@aloisklink.com>
2025-04-17 21:32:10 +05:30
Sidharth Vinod
f006718e56 chore: Change getDiagramData to getRegisteredDiagramsMetadata
Co-authored-by: Alois Klink <alois@aloisklink.com>
2025-04-17 21:30:48 +05:30
Sidharth Vinod
d720776918 Merge branch 'sidv/examples' of https://github.com/mermaid-js/mermaid into sidv/examples
* 'sidv/examples' of https://github.com/mermaid-js/mermaid:
  Update packages/examples/tsconfig.json
2025-04-17 21:28:07 +05:30
Sidharth Vinod
f43398dd44 Update packages/examples/tsconfig.json
Co-authored-by: Alois Klink <alois@aloisklink.com>
2025-04-17 08:57:53 -07:00
Sidharth Vinod
43ad451940 fix: Remove unnecessary export from package.json
Co-authored-by: Alois Klink <alois@aloisklink.com>
2025-04-17 21:26:46 +05:30
Sidharth Vinod
94c099caa1 docs: Update kanban example
Co-authored-by: Alois Klink <alois@aloisklink.com>
2025-04-17 21:26:10 +05:30
Sidharth Vinod
a3fed10d55 Merge pull request #6497 from jsoref/docs/6496_fix-duplicate-and-missing-examples
chore: Fix duplicate and missing examples
2025-04-17 14:11:12 +00:00
autofix-ci[bot]
2a859f2739 [autofix.ci] apply automated fixes 2025-04-17 11:08:43 +00:00
generrosity
dbbe014c5b Merge branch 'develop' into patch-1 2025-04-17 23:02:53 +12:00
Josh Soref
c7fa906115 chore: Change mermaid blocks to mermaid-example in docs 2025-04-17 06:50:20 -04:00
Josh Soref
3c69bd34c7 chore: Remove duplicate mermaid blocks 2025-04-17 06:46:24 -04: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
Sidharth Vinod
f5d27bf7ef Merge pull request #6491 from jsoref/docs/6490_convert-from-init-to-config
chore: Switch from `%%{init` to `config:`
2025-04-17 04:33:19 +00:00
Sidharth Vinod
5a03f07853 Merge pull request #6486 from mermaid-js/update-timings
Update E2E Timings
2025-04-16 21:35:14 -07:00
github-actions[bot]
8474cf43fe chore: update E2E timings 2025-04-17 04:05:18 +00:00
autofix-ci[bot]
f56895832f [autofix.ci] apply automated fixes 2025-04-16 20:46:18 +00:00
Josh Soref
8975a1907a chore: Switch from %%{init to config:
Use format which works reliably...
2025-04-16 16:40:13 -04: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
Jesse Wright
1f512e9671 Merge branch 'develop' into fix/timeline-event-colons 2025-04-15 12:03:58 +01:00
Sidharth Vinod
12b6371abf chore: Add details to e2e-timings 2025-04-15 12:37:34 +05:30
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
5310d60e63 Merge pull request #6296 from mermaid-js/sidv/stateDB-ts
chore: Convert StateDB to TS
2025-04-15 04:10:13 +00:00
Sidharth Vinod
3ae87ca06a chore: Ignore timeout domains 2025-04-15 09:42:52 +05:30
Sidharth Vinod
24f23efdad Merge branch 'develop' into saurabh/refactor-fontawesome-icon-usage 2025-04-14 20:15:48 -07:00
Sidharth Vinod
e2520dde20 Merge branch 'develop' into sidv/stateDB-ts 2025-04-14 20:14:58 -07:00
Sidharth Vinod
3e8204aa21 Merge pull request #6365 from mermaid-js/renovate/major-all-major
fix(deps): update all major dependencies (major)
2025-04-15 03:13:33 +00:00
Sidharth Vinod
0b57984d27 Merge pull request #6475 from Shahir-47/feature/5806_xy-chart-data-labels
feat: Dynamically Render Data Labels Within Bar Charts
2025-04-15 03:13:03 +00:00
Sidharth Vinod
bcaa40f1d5 Merge pull request #6225 from Shahir-47/feature/3508_color-user-journey-title
feat: Add support for styling Journey Diagram title (color, font-family, and font-size)
2025-04-15 03:12:24 +00:00
autofix-ci[bot]
0107494b59 [autofix.ci] apply automated fixes 2025-04-15 02:32:13 +00:00
autofix-ci[bot]
11c3ac58fd [autofix.ci] apply automated fixes 2025-04-15 02:25:23 +00:00
Sidharth Vinod
af2eb13932 Merge branch 'develop' into feature/3508_color-user-journey-title 2025-04-14 19:23:47 -07:00
Sidharth Vinod
41e84b726a Create neat-moose-compare.md 2025-04-14 19:23:19 -07:00
Sidharth Vinod
a1ba65c0c0 chore: Add changeset 2025-04-14 19:20:47 -07:00
Shahir Ahmed
5fe6e5dccc Merge branch 'develop' into feature/5806_xy-chart-data-labels
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-14 14:44:53 -04:00
pranavm2109
946452c7b4 updated tests
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-04-14 14:38:23 -04:00
pranavm2109
4bb6351489 modified description of showDataLabel in config schema and added it to docs
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-04-14 13:53:18 -04:00
renovate[bot]
8c63a2e411 fix(deps): update all major dependencies 2025-04-14 07:25:55 +00:00
Sidharth Vinod
4467fd4363 Merge pull request #6482 from mermaid-js/renovate/peter-evans-create-pull-request-digest
chore(deps): update peter-evans/create-pull-request digest to a7b20e1
2025-04-14 07:09:53 +00:00
renovate[bot]
7e567a8759 chore(deps): update peter-evans/create-pull-request digest to a7b20e1 2025-04-14 06:17:30 +00:00
Ashish Jain
edf062720d Merge pull request #6459 from mermaid-js/renovate/patch-dompurify
fix(deps): update dependency dompurify to ^3.2.5
2025-04-14 06:03:40 +00:00
renovate[bot]
3348eea6af fix(deps): update dependency dompurify to ^3.2.5 2025-04-14 04:46:04 +00:00
Sidharth Vinod
ae7ffab9ac Merge pull request #6483 from universeroc/develop
Add Mermaid plus for Confluence into integrations-community.md
2025-04-14 04:32:13 +00:00
autofix-ci[bot]
ecdbc676d2 [autofix.ci] apply automated fixes 2025-04-14 04:01:42 +00:00
universeroc
6a01b04e3c Update integrations-community.md 2025-04-14 11:55:45 +08:00
autofix-ci[bot]
aafe8de3d3 [autofix.ci] apply automated fixes 2025-04-14 03:52:31 +00:00
universeroc
24287637b5 Add Mermaid plus for Confluence into integrations-community.md 2025-04-14 11:43:32 +08:00
Shahir Ahmed
f69cc17795 refactor xy-chart tests
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-11 16:24:10 -04:00
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
Shahir Ahmed
934f4da507 Merge remote-tracking branch 'origin/develop' into feature/3508_color-user-journey-title
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-11 00:16:46 -04:00
Shahir Ahmed
6957f35782 Merge branch 'develop' into feature/5806_xy-chart-data-labels
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-10 21:42:37 -04:00
Shahir Ahmed
b00be59ea8 added new tests
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-10 21:22:36 -04:00
Shahir Ahmed
dff00f2c4f added new tests
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-10 21:04:55 -04:00
udvale
2009177375 the title is centered at vert line 2025-04-10 16:35:41 -04:00
Sidharth Vinod
eb9987435a Merge pull request #6364 from mermaid-js/renovate/eslint
chore(deps): update eslint (minor)
2025-04-10 07:18:54 +00:00
Sidharth Vinod
a300d0db94 Merge pull request #6391 from regisbsb/patch-1
Remove duplicates in integrations-community.md
2025-04-10 07:16:37 +00:00
Sidharth Vinod
7e7f3c56c2 Merge pull request #6456 from nour0205/fix/edge-id-en-dash-docs-6455
fix(docs): fix edge ID example
2025-04-10 07:10:08 +00:00
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
renovate[bot]
ea987861f3 chore(deps): update eslint 2025-04-09 13:45:21 +00: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
Sidharth Vinod
178c7130c6 Merge pull request #6465 from aloisklink/build/fix-mermaid-zenuml
build: fix `mermaid-zenuml` IIFE build and add changesets
2025-04-09 01:42:37 -07:00
Sidharth Vinod
f87d0dd88a chore: Update change detection logic 2025-04-09 13:20:19 +05:30
Sidharth Vinod
2396f90269 Merge pull request #6467 from mermaid-js/sidv/checkTimings
Reduce timing update PRs
2025-04-08 23:54:15 -07:00
Sidharth Vinod
97e35fd30a chore: Use git to read old timings 2025-04-09 12:19:13 +05:30
Sidharth Vinod
7a5f999f42 chore: Add compare-timings script
Avoid creating unnecessary PRs when there is no significant timings change.
2025-04-09 12:08:57 +05:30
Sidharth Vinod
cd8d74bb96 Merge pull request #6274 from Shahir-47/bug/5955_adjust-diagram-position-with-legend-width
fix: Prevent Legend Labels from Overlapping Diagram Elements in Journey Diagrams
2025-04-08 17:17:06 +00:00
Sidharth Vinod
3e6f680df2 chore: Reorder fields in examples 2025-04-08 20:14:36 +05:30
Sidharth Vinod
56c6853e05 Merge pull request #6463 from AaronMoat/undefined
Fix incorrect `style="undefined;"` output in some Mermaid diagrams
2025-04-08 12:46:11 +00:00
Sidharth Vinod
2e5d955e77 Update packages/examples/src/examples/kanban.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-08 04:39:41 -07:00
Sidharth Vinod
7733faf6c4 Merge branch 'sidv/examples' of https://github.com/mermaid-js/mermaid into sidv/examples
* 'sidv/examples' of https://github.com/mermaid-js/mermaid:
  chore: update E2E timings
  chore: Update permission for timings action
  chore: Fix PR action in e2e-timings
  chore: Fix branch in e2e-timings
2025-04-08 17:08:13 +05:30
Sidharth Vinod
b053a88993 docs: Add steps to add examples for new diagrams 2025-04-08 17:07:56 +05:30
Sidharth Vinod
01e2af0cfd Merge pull request #6407 from thomascizeron/fix/6162_greedyRegexInCommonLangium
Fix: greedy regex in common langium
2025-04-08 11:33:43 +00:00
Sidharth Vinod
f55ff99f74 Merge branch 'develop' into fix/6162_greedyRegexInCommonLangium 2025-04-08 04:25:20 -07:00
Aaron Moat
d25770ee73 Format changeset message 2025-04-08 19:55:05 +10:00
Aaron Moat
2b05d7e1ed Fix incorrect style="undefined;" output in some Mermaid diagrams 2025-04-08 19:49:47 +10:00
Sidharth Vinod
7c77c46ede Merge branch 'develop' into sidv/examples 2025-04-08 00:14:49 -07:00
Sidharth Vinod
30735266a4 Merge pull request #6461 from mermaid-js/update-timings
Update E2E Timings
2025-04-08 00:14:25 -07:00
github-actions[bot]
926862c196 chore: update E2E timings 2025-04-08 06:53:44 +00:00
Sidharth Vinod
44e668e704 chore: Update permission for timings action 2025-04-08 11:58:46 +05:30
Sidharth Vinod
404216273a chore: Fix PR action in e2e-timings 2025-04-08 11:01:28 +05:30
Sidharth Vinod
5a6831ae7e chore: Fix branch in e2e-timings 2025-04-08 10:13:59 +05:30
Sidharth Vinod
da6937f474 temp: Revert all changes is cypress folder 2025-04-08 10:08:06 +05:30
Sidharth Vinod
cbb496da79 Merge branch 'develop' into sidv/examples
* develop:
  docs: improve elk section of ER docs
  Fix formatting of ELK example in ERD + clarify usage
2025-04-08 10:05:04 +05:30
Alois Klink
03119fea2c chore(zenuml): add pending ZenUML changesets
Add ZenUML changesets for:

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

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

[1]: https://www.npmjs.com/package/@mermaid-js/mermaid-zenuml/v/0.2.0
2025-04-07 17:58:40 +08:00
Alois Klink
92c0aa4331 build(esbuild): support multiple IIFE packages
Support multiple IIFE packages by namespacing all of them into a
`globalThis.__esbuild_esm_mermaid_nm` object.
2025-04-07 17:58:40 +08:00
Alois Klink
7bd5c03d87 Merge pull request #6426 from internetisaiah/patch-1
Fix formatting of ELK example in ERD + clarify usage
2025-04-07 08:35:03 +00:00
Alois Klink
de72e18a7f docs: improve elk section of ER docs 2025-04-07 16:07:43 +08:00
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
nour kouider
4fdb1d5906 docs: correct edge syntax from -> to --> 2025-04-05 13:39:30 +01:00
Sidharth Vinod
43e66a6089 chore: Unskip example test 2025-04-05 14:02:58 +05:30
Sidharth Vinod
5acbd7e762 docs: Add changeset 2025-04-05 13:30:08 +05:30
Sidharth Vinod
febae345fc chore: Fix file extension 2025-04-05 09:25:31 +05:30
Sidharth Vinod
28bdbbca1a chore: Fix examples exports 2025-04-05 09:17:52 +05:30
Sidharth Vinod
4b896fa22e Merge branch 'sidv/examples' of https://github.com/mermaid-js/mermaid into sidv/examples
* 'sidv/examples' of https://github.com/mermaid-js/mermaid:
  [autofix.ci] apply automated fixes
2025-04-05 09:11:26 +05:30
Sidharth Vinod
a25ee49edd test: Add visual testing for examples 2025-04-05 09:11:18 +05:30
Sidharth Vinod
695b5b2fb2 fix: Build script 2025-04-05 09:10:58 +05:30
autofix-ci[bot]
9b77af540b [autofix.ci] apply automated fixes 2025-04-05 03:33:20 +00:00
Sidharth Vinod
7829138fb2 chore: Update lockfile 2025-04-05 08:58:31 +05:30
Sidharth Vinod
7e7a4fc665 chore: Move examples to different package 2025-04-05 08:53:37 +05:30
Shahir Ahmed
a2bf5103ce test for vertical xy-axis
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-04 21:44:00 -04:00
Shahir Ahmed
8b7a4db2ef test for horzontal xy-axis
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-04 21:34:46 -04:00
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
Shahir Ahmed
73f8dee643 add config to test files
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-04-04 15:22:40 -04:00
pranavm2109
8bdd7ec719 updated tests to account for showDataLabel set to false as default
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-04-04 15:20:51 -04:00
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
nour kouider
7facc8f50d docs: fix edge ID example and regenerate flowchart output 2025-04-04 19:04:02 +01:00
autofix-ci[bot]
52cd9e8e55 [autofix.ci] apply automated fixes 2025-04-04 17:37:42 +00:00
nour kouider
9208e7faaf fix(docs): fix edge ID example 2025-04-04 18:22:56 +01:00
nghtlinh
d0ee6079b3 Positioned the label in the center of the vert line + Brough back the background 2025-04-03 20:43:32 -04:00
Sidharth Vinod
34e6112fea Merge branch 'sidv/examples' of https://github.com/mermaid-js/mermaid into sidv/examples
* 'sidv/examples' of https://github.com/mermaid-js/mermaid:
  [autofix.ci] apply automated fixes
2025-04-03 17:10:45 +05:30
Sidharth Vinod
0c759d0075 chore: Add isDefault to examples 2025-04-03 17:10:33 +05:30
autofix-ci[bot]
5b7c1aad9e [autofix.ci] apply automated fixes 2025-04-03 10:53:10 +00:00
Sidharth Vinod
865c453547 feat: Add title and examples for diagrams 2025-04-03 16:16:44 +05:30
Sidharth Vinod
c0b14021b7 feat: Add support for examples in diagram definition 2025-04-03 11:15:45 +05:30
Shahir Ahmed
2798e27b1e dynamically resizes horizontal xychart bar
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-04-02 23:00:12 -04:00
Shahir Ahmed
f4c08a0c6f dynamically resizes vertical xychart bar
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-04-02 22:25:34 -04:00
Monica Nguyen
c28c05780c Merge branch 'mermaid-js:develop' into monica_branch 2025-04-02 17:39:11 -04:00
Shahir Ahmed
6a538da07d Merge branch 'develop' into feature/5806_xy-chart-data-labels 2025-04-02 17:22:13 -04:00
Shahir Ahmed
b2dfa74865 Merge branch 'develop' into feature/3508_color-user-journey-title 2025-04-02 17:19:44 -04:00
Shahir Ahmed
930e917215 Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-04-02 17:18:45 -04:00
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
Thomas Di Cizerone
cdbd3e58a3 🆙 Run pnpm changeset 2025-04-02 18:50:20 +02:00
Thomas Di Cizerone
630c4d6954 🤏 Update Note comment 2025-04-02 18:50:20 +02:00
Thomas Di Cizerone
fd4493733f Add TODO for architecture support of title embedded in render 2025-04-02 18:50:20 +02:00
Thomas Di Cizerone
e588743bf4 ⚗️ Add unit tests and e2e for architecture diagram with titleAndAccessibilities 2025-04-02 18:50:20 +02:00
Thomas Di Cizerone
04d68e7f9a ⚗️ Add parser tests for architecture and other edge cases encountered 2025-04-02 18:50:20 +02:00
Thomas Di Cizerone
9795b6e089 🖋️ Refactor common grammar to avoid unwanted greedy terminals 2025-04-02 18:50:20 +02:00
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
Ashish Jain
ceb8d4c7ef Merge pull request #6445 from mermaid-js/omkarht/chore/downgrade-chokidar-to-3.6.0
chore: Downgrade chokidar to 3.6.0 for hot reloading fix
2025-04-01 12:43:53 +00:00
omkarht
32c70a0f6a chore: Downgrade chokidar to 3.6.0 for hot reloading fix 2025-03-31 20:38:12 +05:30
Knut Sveidqvist
af2632f14a Merge pull request #6442 from mermaid-js/renovate/major-eslint
chore(deps): update dependency eslint-plugin-unicorn to v58
2025-03-31 07:33:19 +00:00
renovate[bot]
8f89ba1930 chore(deps): update dependency eslint-plugin-unicorn to v58 2025-03-31 01:56:12 +00:00
megantriplett
c1db4f2ed0 Moved text to bottom of graph, even when rows are added/deleted 2025-03-28 16:08:44 -04:00
Shahir Ahmed
ad6f855f5e adds dynamic text adjustment
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-28 16:04:51 -04:00
Shahir Ahmed
f2f2a1d275 adds test and horizontal support
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-27 23:09:27 -04:00
Shahir Ahmed
17fcf43cdb fix typo
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-27 22:14:07 -04:00
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
Shahir Ahmed
99a2dc7c1f adds label data to bar chart
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-27 21:51:21 -04:00
Shahir Ahmed
34e756fde6 add label config
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-27 20:32:35 -04:00
Shahir Ahmed
f74fad057a Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-03-27 20:16:45 -04:00
Shahir Ahmed
32ea973b12 Merge branch 'develop' into feature/3508_color-user-journey-title 2025-03-27 20:14:13 -04:00
isaiah robinson
0104d19f66 Fix formatting of ELK example in ERD + clarify usage 2025-03-27 15:47:43 -07:00
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
Ashish Jain
936d1074b2 Merge pull request #6413 from mermaid-js/master
Merge back v11.6.0 to develop
2025-03-25 12:51:55 +00:00
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
Shahir Ahmed
f7e31a978b update docs
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-19 23:44:21 -04:00
Shahir Ahmed
2d583b186d fix some pixel issues
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-19 22:51:02 -04:00
Shahir Ahmed
b322392f97 refactor tests
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-19 21:18:45 -04:00
Shahir Ahmed
573b6d9ba7 remove redundant test
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-19 20:58:17 -04:00
Shahir Ahmed
ea39254556 ensure maxLabelWidth is a number
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-19 20:41:43 -04:00
Shahir Ahmed
044a3d9686 Set legend width baseline (conf.leftMargin) and expand dynamically
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-19 20:34:44 -04:00
autofix-ci[bot]
f28f7b713d [autofix.ci] apply automated fixes 2025-03-18 23:58:40 +00:00
Regis Bittencourt
cfbd05515e Remove duplicates in integrations-community.md 2025-03-18 20:53:19 -03:00
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
Shahir Ahmed
20927a1c8e remove max and min attributes for maxLabelWidth
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-18 15:39:58 -04:00
pranavm2109
b2ab34ca2b fixed linting issue
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-03-18 15:36:50 -04:00
Shahir Ahmed
55e1dd0ead implemented knuth-plass line-breaking algorithm
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-03-18 15:32:04 -04:00
Shahir Ahmed
a403f78168 Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-03-18 15:17:45 -04:00
Shahir Ahmed
6c45aa3602 Merge branch 'develop' into feature/3508_color-user-journey-title 2025-03-18 15:15:45 -04:00
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
Anthony Juckel
6cc192680a Added changeset 2025-03-03 15:10:37 -06:00
Anthony Juckel
3dd6107e76 fix: Allow equals sign in sequenceDiagram labels 2025-03-03 15:08:34 -06: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
Jesse Wright
1ddaf10b89 chore: create changeset 2025-03-02 22:34:55 +00:00
Jesse Wright
02b833f251 chore: remove hash and semicolon ignore 2025-03-02 22:17:21 +00:00
Jesse Wright
0ce0c3cd75 fix: allow colons in events 2025-03-02 22:04:12 +00: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
Shahir Ahmed
91e2c04e56 Merge branch 'develop' into feature/3508_color-user-journey-title 2025-02-27 15:33:52 -05:00
Shahir Ahmed
a2f0d8e4d6 Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-02-27 15:32:51 -05:00
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
Sidharth Vinod
9e29fd0c4a Merge branch 'develop' into sidv/stateDB-ts 2025-02-26 13:37:43 +01:00
Sidharth Vinod
a2650adec2 chore: Remove ! in datafetcher
Co-authored-by: Saurabh Gore <167211619+saurabhg772244@users.noreply.github.com>
2025-02-26 18:07:10 +05:30
saurabhg772244
b0c1460940 Convert Font Awesome loading from HTML to JS 2025-02-26 12:55:01 +05:30
Shahir Ahmed
7c7fd4bc5e adds test for line wrapping
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-25 18:40:27 -05:00
pranavm2109
baa261fdd1 Merge branch 'bug/5955_adjust-diagram-position-with-legend-width' of https://github.com/SeniorSeniorMath-SciLib2k24/mermaid into bug/5955_adjust-diagram-position-with-legend-width 2025-02-25 16:13:28 -05:00
pranavm2109
aaf15fccc1 added first draft of test to see if label text is being wrapped in different lines
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-25 16:13:14 -05:00
autofix-ci[bot]
3724d11255 [autofix.ci] apply automated fixes 2025-02-25 20:55:26 +00:00
pranavm2109
5510f18d33 removed function to get rem in px since config schema now has maxLabelWidth
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-25 15:50:10 -05:00
Shahir Ahmed
edbf125c83 wraps long text into new line
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-25 15:43:00 -05:00
pranavm2109
ad6248147c revised current cypress test
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-25 15:29:29 -05:00
Shahir Ahmed
d47e4724cb wraps long text into new line
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-25 15:21:08 -05:00
Shahir Ahmed
4f592115e0 Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-02-25 15:09:56 -05:00
Shahir Ahmed
d2d78a5576 Merge branch 'develop' into feature/3508_color-user-journey-title 2025-02-25 15:07:54 -05:00
saurabhg772244
e045e0b42d Code refactor and updated docs 2025-02-25 18:25:59 +05:30
Shahir Ahmed
50816a7f98 remove magic value
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-21 17:35:32 -05:00
Shahir Ahmed
a318ea3692 removes cy.then and magic value
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-21 16:15:24 -05:00
Shahir Ahmed
1424127127 Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-02-21 15:33:13 -05:00
Shahir Ahmed
9c27125f2d changes default values
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-21 15:27:01 -05:00
Shahir Ahmed
6140be24da Merge branch 'develop' into feature/3508_color-user-journey-title 2025-02-21 15:04:12 -05:00
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
Sidharth Vinod
5abda14809 Merge branch 'develop' into sidv/stateDB-ts 2025-02-20 16:31:59 +05:30
Sidharth Vinod
bb4b92a663 fix: Type issue in getDirectionStatement 2025-02-19 18:59:30 +05:30
Sidharth Vinod
9bd599666b Merge branch 'develop' into sidv/stateDB-ts
* develop:
  chore: Remove deprecated rule
  chore(deps): update eslint
  chore: Add tslib
  chore(deps): update eslint
  chore: Minor refactor
  chore: Update actions/cache
  chore: Update actions/cache
  added changeset
  added test cases to check state diagram direction
  fix: CodeQL double escape warning
  refatored code
  chore(deps): update eslint
  Fix: state diagram default direction update
  [autofix.ci] apply automated fixes
  fix(deps): update all patch dependencies
2025-02-19 18:38:30 +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
Shahir Ahmed
5dab86a067 Merge branch 'bug/5955_adjust-diagram-position-with-legend-width' of https://github.com/Shahir-47/mermaid into bug/5955_adjust-diagram-position-with-legend-width 2025-02-18 16:12:37 -05:00
Shahir Ahmed
9ef35549f4 Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-02-18 16:05:16 -05:00
pranavm2109
4beed963b8 updated descriptions of parameters in schema
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-18 16:03:12 -05:00
pranavm2109
3122c3b75c updated descriptions of parameters in schema
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-18 16:01:40 -05:00
pranavm2109
dffa689e2b updated documentation
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-18 15:58:03 -05:00
pranavm2109
5ed2278887 Merge branch 'feature/3508_color-user-journey-title' of https://github.com/SeniorSeniorMath-SciLib2k24/mermaid into feature/3508_color-user-journey-title 2025-02-18 15:36:56 -05:00
pranavm2109
d6376ca1ff Reverted to using configObject in place of conf
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-18 15:36:51 -05:00
autofix-ci[bot]
99bd0c48fa [autofix.ci] apply automated fixes 2025-02-18 20:31:21 +00:00
pranavm2109
eb7289a65a Merge branch 'feature/3508_color-user-journey-title' of https://github.com/SeniorSeniorMath-SciLib2k24/mermaid into feature/3508_color-user-journey-title 2025-02-18 15:26:10 -05:00
pranavm2109
80c6b945fa Removed title style documentation from theming.md
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-18 15:25:12 -05:00
saurabhg772244
a81c3187ba removed font awesome packages and used registered icons instead 2025-02-18 19:53:18 +05:30
Sidharth Vinod
39a5abc714 chore: Minor refactors to stateDB 2025-02-18 13:50:49 +05:30
Sidharth Vinod
6650efc1a6 fix: Note position 2025-02-18 00:51:38 +05:30
Sidharth Vinod
a4754ad195 chore: Add changeset 2025-02-18 00:33:47 +05:30
Sidharth Vinod
91cbe5bc01 fix: StateStmt import 2025-02-18 00:29:57 +05:30
Sidharth Vinod
d2996dd553 fix: Statement handling 2025-02-18 00:23:58 +05:30
Sidharth Vinod
7a7836ad90 Merge branch 'develop' into sidv/stateDB-ts
* develop:
  Added changeset.
  refactor: handle StateDB `.extract()` properly
2025-02-17 23:50:10 +05:30
Sidharth Vinod
7ca9242b24 chore: Add types to stateDB and dataFetcher 2025-02-17 23:47:56 +05:30
Sidharth Vinod
438f388b5c chore: Rename dataFetcher 2025-02-17 00:27:43 +05:30
Sidharth Vinod
e89c77a5ca chore: Remove id-cache 2025-02-17 00:27:02 +05:30
Sidharth Vinod
31984acfe0 chore: Rename stateDB 2025-02-15 22:52:35 +05:30
Sidharth Vinod
9badfe7489 Merge branch 'develop' into feature/3508_color-user-journey-title 2025-02-15 22:33:13 +05:30
Sidharth Vinod
27912bee8c Merge branch 'develop' into bug/5955_adjust-diagram-position-with-legend-width 2025-02-15 22:14:44 +05:30
Shahir Ahmed
7aef182fbf Merge branch 'develop' into feature/3508_color-user-journey-title 2025-02-14 16:45:20 -05:00
autofix-ci[bot]
2fb6ea7b77 [autofix.ci] apply automated fixes 2025-02-14 21:23:01 +00:00
pranavm2109
add48da4c8 modifed journey diagram config scheme to contain title specific styles, and undid previous theme-wide changes
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-14 16:17:09 -05:00
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
Shahir Ahmed
5f7c68def7 refactor: standardize variable naming and improve legend width calculations
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
2025-02-13 01:46:27 -05:00
Sidharth Vinod
82d019234a chore: Cleanup 2025-02-13 09:50:04 +05:30
Shahir Ahmed
d618b8398e adds test for journey
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-12 19:54:56 -05:00
Shahir Ahmed
db4ea020ba testing
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-12 18:39:03 -05:00
pranavm2109
5366e8b692 added first draft of cypress visual tests
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-02-12 15:19:37 -05:00
Shahir Ahmed
fbac4c61bb diagram adjusts with legend width changes
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-02-05 19:27:32 -05:00
Shahir Ahmed
d81ddf246c fixes titleColor default value
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-31 17:57:25 -05:00
Shahir Ahmed
ffe1bb359f update pnpm-lock.yaml
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-31 17:30:34 -05:00
Shahir Ahmed
88a39f8e16 update dependencies for CI/CD pipeline
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-31 17:28:55 -05:00
Shahir Ahmed
9fb46ae88f improves description for user journey diagram title test
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-29 16:20:43 -05:00
Shahir Ahmed
798fb98b2a Merge branch 'develop' into feature/3508_color-user-journey-title
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-29 16:15:00 -05:00
Shahir Ahmed
7c0af381d1 adds styling, font-weight and font-family tests for user jounrey title
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-29 16:11:57 -05:00
pranavm2109
384f59eee2 called getConfig() once in draw function and used returned value elsewhere within
Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
2025-01-29 14:45:42 -05:00
Shahir Ahmed
03ff28e927 removes console.warn()
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-25 22:12:16 -05:00
Shahir Ahmed
16a1a90705 adds font family and font size to the title of the user journey diagram
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-25 22:01:30 -05:00
Shahir Ahmed
3221cbfa0a add titleColor theme variable to theming.md
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-25 21:23:35 -05:00
Shahir Ahmed
f0a8ccb177 Merge branch 'develop' into feature/3508_color-user-journey-title
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
2025-01-25 21:12:11 -05:00
Shahir Ahmed
a30705cdcc Enhance user journey diagram title color configuration 2025-01-25 20:33:39 -05:00
autofix-ci[bot]
9ff09f28e7 [autofix.ci] apply automated fixes 2024-10-23 14:25:38 +00:00
Jake Beamish
eddd8313c9 Fix code block typo
Previously, the h4 line "#### Using Dagre Layout with Classic Look:" was included at the bottom of the previous Example configuration code block. Now it renders as a h4
2024-10-23 15:03:36 +01:00
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
456 changed files with 23194 additions and 7767 deletions

View File

@@ -33,4 +33,9 @@ export const packageOptions = {
packageName: 'mermaid-layout-elk',
file: 'layouts.ts',
},
examples: {
name: 'mermaid-examples',
packageName: 'examples',
file: 'index.ts',
},
} as const satisfies Record<string, PackageOptions>;

View File

@@ -10,13 +10,16 @@ const buildType = (packageName: string) => {
console.log(out.toString());
}
} catch (e) {
console.error(e);
if (e.stdout.length > 0) {
console.error(e.stdout.toString());
}
if (e.stderr.length > 0) {
console.error(e.stderr.toString());
}
// Exit the build process if we are in CI
if (process.env.CI) {
throw new Error(`Failed to build types for ${packageName}`);
}
}
};

View File

@@ -0,0 +1,5 @@
---
'@mermaid-js/mermaid-zenuml': patch
---
Fixed a critical bug that the ZenUML diagram is not rendered.

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
chore: Remove the "-beta" suffix from the XYChart, Block, Sankey diagrams to reflect their stable status

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
fix: Position the edge label in state diagram correctly relative to the edge

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
fix: Apply correct dateFormat in Gantt chart to show only day when specified

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
fix: handle exclude dates properly in Gantt charts when using dateFormat: 'YYYY-MM-DD HH:mm:ss'

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
fix: fixed connection gaps in flowchart for roundedRect, stadium and diamond shape

View File

@@ -0,0 +1,5 @@
---
'mermaid': minor
---
feat: Added support for new participant types (`actor`, `boundary`, `control`, `entity`, `database`, `collections`, `queue`) in `sequenceDiagram`.

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
fix: Update casing of ID in requirement diagram

View File

@@ -0,0 +1,5 @@
---
'mermaid': minor
---
feat: Added support for per link curve styling in flowchart diagram using edge ids

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
fix: Make flowchart elk detector regex match less greedy

View File

@@ -0,0 +1,8 @@
---
'mermaid': patch
---
fix(block): overflowing blocks no longer affect later lines
This may change the layout of block diagrams that have overflowing lines
(i.e. block diagrams that use up more columns that the `columns` specifier).

View File

@@ -0,0 +1,7 @@
---
'mermaid': patch
---
fix: log warning for blocks exceeding column width
This update adds a validation check that logs a warning message when a block's width exceeds the defined column layout.

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
fix: Add escaped class literal name on namespace

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
fix: Allow equals sign in sequenceDiagram labels

View File

@@ -0,0 +1,9 @@
---
'mermaid': patch
---
Add validation for negative values in pie charts:
Prevents crashes during parsing by validating values post-parsing.
Provides clearer, user-friendly error messages for invalid negative inputs.

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
chore: migrate to class-based ArchitectureDB implementation

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
fix: node border style for handdrawn shapes

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
fix: Update flowchart direction TD's behavior to be the same as TB

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
fix: correctly render non-directional lines for '---' in block diagrams

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
chore: Update packet diagram to use new class-based database structure

View File

@@ -47,13 +47,13 @@ edgesep
EMPTYSTR
enddate
ERDIAGRAM
eslint
flatmap
forwardable
frontmatter
funs
gantt
GENERICTYPE
getBoundarys
grammr
graphtype
halign
@@ -88,6 +88,7 @@ NODIR
NSTR
outdir
Qcontrolx
QSTR
reinit
rels
reqs

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,6 +31,27 @@ const buildPackage = async (entryName: keyof typeof packageOptions) => {
// mermaid.js
{ ...iifeOptions },
// mermaid.min.js
{ ...iifeOptions, minify: true, metafile: shouldVisualize },
// mermaid.tiny.min.js
{
...iifeOptions,
minify: true,
includeLargeFeatures: false,
metafile: shouldVisualize,
sourcemap: false,
}
);
}
if (entryName === 'mermaid-zenuml') {
const iifeOptions: MermaidBuildOptions = {
...commonOptions,
format: 'iife',
globalName: 'mermaid-zenuml',
};
buildConfigs.push(
// mermaid-zenuml.js
{ ...iifeOptions },
// mermaid-zenuml.min.js
{ ...iifeOptions, minify: true, metafile: shouldVisualize }
);
}
@@ -57,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 });
@@ -65,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,23 +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',
},
});
@@ -89,11 +101,12 @@ export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
if (format === 'iife') {
output.format = 'iife';
output.splitting = false;
output.globalName = '__esbuild_esm_mermaid';
const originalGlobalName = output.globalName ?? 'mermaid';
output.globalName = `__esbuild_esm_mermaid_nm[${JSON.stringify(originalGlobalName)}]`;
// Workaround for removing the .default access in esbuild IIFE.
// https://github.com/mermaid-js/mermaid/pull/4109#discussion_r1292317396
output.footer = {
js: 'globalThis.mermaid = globalThis.__esbuild_esm_mermaid.default;',
js: `globalThis[${JSON.stringify(originalGlobalName)}] = globalThis.${output.globalName}.default;`,
};
output.outExtension = { '.js': '.js' };
} else {

View File

@@ -29,7 +29,7 @@ body:
label: Colors
description: |-
A detailed list of the different colour values to use.
A list of currently used variable names can be found [here](https://mermaid-js.github.io/mermaid/#/theming?id=theme-variables-reference-table)
See the [list of currently used variable names](https://mermaid-js.github.io/mermaid/#/theming?id=theme-variables-reference-table)
placeholder: |-
- background: #f4f4f4
- primaryColor: #fff4dd

13
.github/lychee.toml vendored
View File

@@ -46,11 +46,20 @@ exclude = [
# Drupal 403
"https://(www.)?drupal.org",
# Swimm returns 404, eventhough the link is valid
# Phbpp 403
"https://(www.)?phpbb.com",
# Swimm returns 404, even though the link is valid
"https://docs.swimm.io",
# Certificate Error
"https://noteshub.app",
# Timeout
"https://huehive.co"
"https://huehive.co",
"https://foswiki.org",
"https://www.gnu.org",
"https://mermaid-preview.com"
]
# Exclude all private IPs from checking.

2
.github/stale.yml vendored
View File

@@ -15,5 +15,5 @@ markComment: >
If you are still interested in this issue and it is still relevant you can comment to revive it.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
This issue has been been automatically closed due to a lack of activity.
This issue has been automatically closed due to a lack of activity.
This is done to maintain a clean list of issues that the community is interested in developing.

View File

@@ -42,4 +42,4 @@ jobs:
working-directory: ./packages/mermaid
run: pnpm run docs:build
- uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef # main
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 # main

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

@@ -11,6 +11,7 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: write
pull-requests: write
jobs:
timings:
@@ -29,6 +30,7 @@ jobs:
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
with:
runTests: false
- name: Cypress run
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
id: cypress
@@ -44,15 +46,25 @@ jobs:
SPLIT: 1
SPLIT_INDEX: 0
SPLIT_FILE: 'cypress/timings.json'
- name: Commit changes
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
- name: Compare timings
id: compare
run: |
OUTPUT=$(pnpm tsx scripts/compare-timings.ts)
echo "$OUTPUT" >> $GITHUB_STEP_SUMMARY
echo "output<<EOF" >> $GITHUB_OUTPUT
echo "$OUTPUT" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Commit and create pull request
uses: peter-evans/create-pull-request@1310d7dab503600742045e6fd4b84dda64352858
with:
add: 'cypress/timings.json'
author_name: 'github-actions[bot]'
author_email: '41898282+github-actions[bot]@users.noreply.github.com'
message: 'chore: update E2E timings'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
branch: release-promotion
add-paths: |
cypress/timings.json
commit-message: 'chore: update E2E timings'
branch: update-timings
title: Update E2E Timings
body: ${{ steps.compare.outputs.output }}
delete-branch: true
sign-commits: true

View File

@@ -29,3 +29,29 @@ jobs:
disable-releaser: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Add "Sponsored by MermaidChart" label
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const prNumber = context.payload.pull_request.number;
const { data: commits } = await github.rest.pulls.listCommits({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber,
});
const isSponsored = commits.every(
(c) => c.commit.author.email?.endsWith('@mermaidchart.com')
);
if (isSponsored) {
console.log('PR is sponsored. Adding label.');
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
labels: ['Sponsored by MermaidChart'],
});
}

70
.github/workflows/validate-lockfile.yml vendored Normal file
View File

@@ -0,0 +1,70 @@
name: Validate pnpm-lock.yaml
on:
pull_request:
paths:
- 'pnpm-lock.yaml'
- '**/package.json'
- '.github/workflows/validate-lockfile.yml'
jobs:
validate-lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: Validate pnpm-lock.yaml entries
id: validate # give this step an ID so we can reference its outputs
run: |
issues=()
# 1) No tarball references
if grep -qF 'tarball:' pnpm-lock.yaml; then
issues+=("• Tarball references found (forbidden)")
fi
# 2) No unwanted vitepress paths
if grep -qF 'packages/mermaid/src/vitepress' pnpm-lock.yaml; then
issues+=("• Disallowed path 'packages/mermaid/src/vitepress' present. Run `rm -rf packages/mermaid/src/vitepress && pnpm install` to regenerate.")
fi
# 3) Lockfile only changes when package.json changes
git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} > changed.txt
if grep -q '^pnpm-lock.yaml$' changed.txt && ! grep -q 'package.json' changed.txt; then
issues+=("• pnpm-lock.yaml changed without any package.json modification")
fi
# If any issues, output them and fail
if [ ${#issues[@]} -gt 0 ]; then
# Use the new GITHUB_OUTPUT approach to set a multiline output
{
echo "errors<<EOF"
printf '%s\n' "${issues[@]}"
echo "EOF"
} >> $GITHUB_OUTPUT
exit 1
fi
- name: Comment on PR if validation failed
if: failure()
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
The following issue(s) were detected:
${{ steps.validate.outputs.errors }}
Please address these and push an update.
_Posted automatically by GitHub Actions_

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) {

File diff suppressed because it is too large Load Diff

1
CHANGELOG.md Symbolic link
View File

@@ -0,0 +1 @@
./packages/mermaid/CHANGELOG.md

View File

@@ -44,7 +44,7 @@ Try Live Editor previews of future releases: <a href="https://develop.git.mermai
**Thanks to all involved, people committing pull requests, people answering questions! 🙏**
<a href="https://mermaid.js.org/landing/"><img src="https://github.com/mermaid-js/mermaid/blob/master/docs/intro/img/book-banner-post-release.jpg" alt="Explore Mermaid.js in depth, with real-world examples, tips & tricks from the creator... The first official book on Mermaid is available for purchase. Check it out!"></a>
<a href="https://mermaid.js.org/landing/"><img src="https://github.com/mermaid-js/mermaid/blob/master/docs/intro/img/book-banner-post-release.jpg" alt='Banner for "The Official Guide to Mermaid.js" book'></a>
## Table of content
@@ -95,10 +95,6 @@ In our release process we rely heavily on visual regression tests using [applito
<!-- </Main description> -->
## Mermaid AI Bot
[Mermaid](https://codeparrot.ai/oracle?owner=mermaid-js&repo=mermaid) Bot will help you understand this repository better. You can ask for code examples, installation guide, debugging help and much more.
## Examples
**The following are some examples of the diagrams, charts and graphs that can be made using Mermaid. Click here to jump into the [text syntax](https://mermaid.js.org/intro/syntax-reference.html).**
@@ -451,7 +447,7 @@ For public sites, it can be precarious to retrieve text from users on the intern
As an extra level of security for sites with external users we are happy to introduce a new security level in which the diagram is rendered in a sandboxed iframe preventing javascript in the code from being executed. This is a great step forward for better security.
_Unfortunately you can not have a cake and eat it at the same time which in this case means that some of the interactive functionality gets blocked along with the possible malicious code._
_Unfortunately you cannot have a cake and eat it at the same time which in this case means that some of the interactive functionality gets blocked along with the possible malicious code._
## Reporting vulnerabilities

View File

@@ -43,13 +43,13 @@ Mermaid
**感谢所有参与进来提交 PR解答疑问的人们! 🙏**
<a href="https://mermaid.js.org/landing/"><img src="https://github.com/mermaid-js/mermaid/blob/master/docs/intro/img/book-banner-post-release.jpg" alt="Explore Mermaid.js in depth, with real-world examples, tips & tricks from the creator... The first official book on Mermaid is available for purchase. Check it out!"></a>
<a href="https://mermaid.js.org/landing/"><img src="https://github.com/mermaid-js/mermaid/blob/master/docs/intro/img/book-banner-post-release.jpg" alt='Banner for "The Official Guide to Mermaid.js" book'></a>
## 关于 Mermaid
<!-- <Main description> -->
Mermaid 是一个基于 Javascript 的图表绘制工具,通过解析类 Markdown 的文本语法来实现图表的创建和动态修改。Mermaid 诞生的主要目的是让文档的更新能够及时跟上开发进度。
Mermaid 是一个基于 JavaScript 的图表绘制工具,通过解析类 Markdown 的文本语法来实现图表的创建和动态修改。Mermaid 诞生的主要目的是让文档的更新能够及时跟上开发进度。
> Doc-Rot 是 Mermaid 致力于解决的一个难题。

View File

@@ -1,13 +0,0 @@
import { MockedD3 } from '../packages/mermaid/src/tests/MockedD3.js';
export const select = function () {
return new MockedD3();
};
export const selectAll = function () {
return new MockedD3();
};
export const curveBasis = 'basis';
export const curveLinear = 'linear';
export const curveCardinal = 'cardinal';

View File

@@ -26,7 +26,10 @@ export default eyesPlugin(
config.env.useArgos = process.env.RUN_VISUAL_TEST === 'true';
if (config.env.useArgos) {
registerArgosTask(on, config);
registerArgosTask(on, config, {
// Enable upload to Argos only when it runs on CI.
uploadToArgos: !!process.env.CI,
});
} else {
addMatchImageSnapshotPlugin(on, config);
}

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

@@ -20,7 +20,7 @@ describe('Interaction', () => {
});
it('Graph: should handle a click on a node with a bound url', () => {
// When there is a URL, cy.contains selects the a tag instead of the span. The .node is a child of a, so we have to use find instead of parent.
// When there is a URL, `cy.contains()` selects the `a` tag instead of the `span` tag. The .node is a child of `a`, so we have to use `find()` instead of `parent`.
cy.contains('URLTest1').find('.node').click();
cy.location().should(({ href }) => {
expect(href).to.eq('http://localhost:9000/empty.html');
@@ -146,7 +146,7 @@ describe('Interaction', () => {
});
});
describe('Interaction - security level other, missspelling', () => {
describe('Interaction - security level other, misspelling', () => {
beforeEach(() => {
cy.visit('http://localhost:9000/click_security_other.html');
});

View File

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

View File

@@ -14,9 +14,9 @@ describe('Block diagram', () => {
);
});
it('BL2: should handle colums statement in sub-blocks', () => {
it('BL2: should handle columns statement in sub-blocks', () => {
imgSnapshotTest(
`block-beta
`block
id1["Hello"]
block
columns 3
@@ -30,9 +30,9 @@ describe('Block diagram', () => {
);
});
it('BL3: should align block widths and handle colums statement in sub-blocks', () => {
it('BL3: should align block widths and handle columns statement in sub-blocks', () => {
imgSnapshotTest(
`block-beta
`block
block
columns 1
id1
@@ -46,9 +46,9 @@ describe('Block diagram', () => {
);
});
it('BL4: should align block widths and handle colums statements in deeper sub-blocks then 1 level', () => {
it('BL4: should align block widths and handle columns statements in deeper sub-blocks then 1 level', () => {
imgSnapshotTest(
`block-beta
`block
columns 1
block
columns 1
@@ -66,9 +66,9 @@ describe('Block diagram', () => {
);
});
it('BL5: should align block widths and handle colums statements in deeper sub-blocks then 1 level (alt)', () => {
it('BL5: should align block widths and handle columns statements in deeper sub-blocks then 1 level (alt)', () => {
imgSnapshotTest(
`block-beta
`block
columns 1
block
id1
@@ -87,7 +87,7 @@ describe('Block diagram', () => {
it('BL6: should handle block arrows and spece statements', () => {
imgSnapshotTest(
`block-beta
`block
columns 3
space:3
ida idb idc
@@ -106,7 +106,7 @@ describe('Block diagram', () => {
it('BL7: should handle different types of edges', () => {
imgSnapshotTest(
`block-beta
`block
columns 3
A space:5
A --o B
@@ -119,7 +119,7 @@ describe('Block diagram', () => {
it('BL8: should handle sub-blocks without columns statements', () => {
imgSnapshotTest(
`block-beta
`block
columns 2
C A B
block
@@ -133,7 +133,7 @@ describe('Block diagram', () => {
it('BL9: should handle edges from blocks in sub blocks to other blocks', () => {
imgSnapshotTest(
`block-beta
`block
columns 3
B space
block
@@ -147,7 +147,7 @@ describe('Block diagram', () => {
it('BL10: should handle edges from composite blocks', () => {
imgSnapshotTest(
`block-beta
`block
columns 3
B space
block BL
@@ -161,7 +161,7 @@ describe('Block diagram', () => {
it('BL11: should handle edges to composite blocks', () => {
imgSnapshotTest(
`block-beta
`block
columns 3
B space
block BL
@@ -175,7 +175,7 @@ describe('Block diagram', () => {
it('BL12: edges should handle labels', () => {
imgSnapshotTest(
`block-beta
`block
A
space
A -- "apa" --> E
@@ -186,7 +186,7 @@ describe('Block diagram', () => {
it('BL13: should handle block arrows in different directions', () => {
imgSnapshotTest(
`block-beta
`block
columns 3
space blockArrowId1<["down"]>(down) space
blockArrowId2<["right"]>(right) blockArrowId3<["Sync"]>(x, y) blockArrowId4<["left"]>(left)
@@ -199,7 +199,7 @@ describe('Block diagram', () => {
it('BL14: should style statements and class statements', () => {
imgSnapshotTest(
`block-beta
`block
A
B
classDef blue fill:#66f,stroke:#333,stroke-width:2px;
@@ -212,7 +212,7 @@ describe('Block diagram', () => {
it('BL15: width alignment - D and E should share available space', () => {
imgSnapshotTest(
`block-beta
`block
block
D
E
@@ -225,7 +225,7 @@ describe('Block diagram', () => {
it('BL16: width alignment - C should be as wide as the composite block', () => {
imgSnapshotTest(
`block-beta
`block
block
A("This is the text")
B
@@ -236,9 +236,9 @@ describe('Block diagram', () => {
);
});
it('BL17: width alignment - blocks shold be equal in width', () => {
it('BL17: width alignment - blocks should be equal in width', () => {
imgSnapshotTest(
`block-beta
`block
A("This is the text")
B
C
@@ -249,7 +249,7 @@ describe('Block diagram', () => {
it('BL18: block types 1 - square, rounded and circle', () => {
imgSnapshotTest(
`block-beta
`block
A["square"]
B("rounded")
C(("circle"))
@@ -260,7 +260,7 @@ describe('Block diagram', () => {
it('BL19: block types 2 - odd, diamond and hexagon', () => {
imgSnapshotTest(
`block-beta
`block
A>"rect_left_inv_arrow"]
B{"diamond"}
C{{"hexagon"}}
@@ -271,7 +271,7 @@ describe('Block diagram', () => {
it('BL20: block types 3 - stadium', () => {
imgSnapshotTest(
`block-beta
`block
A(["stadium"])
`,
{}
@@ -280,7 +280,7 @@ describe('Block diagram', () => {
it('BL21: block types 4 - lean right, lean left, trapezoid and inv trapezoid', () => {
imgSnapshotTest(
`block-beta
`block
A[/"lean right"/]
B[\"lean left"\]
C[/"trapezoid"\]
@@ -292,7 +292,7 @@ describe('Block diagram', () => {
it('BL22: block types 1 - square, rounded and circle', () => {
imgSnapshotTest(
`block-beta
`block
A["square"]
B("rounded")
C(("circle"))
@@ -303,7 +303,7 @@ describe('Block diagram', () => {
it('BL23: sizing - it should be possible to make a block wider', () => {
imgSnapshotTest(
`block-beta
`block
A("rounded"):2
B:2
C
@@ -314,7 +314,7 @@ describe('Block diagram', () => {
it('BL24: sizing - it should be possible to make a composite block wider', () => {
imgSnapshotTest(
`block-beta
`block
block:2
A
end
@@ -326,7 +326,7 @@ describe('Block diagram', () => {
it('BL25: block in the middle with space on each side', () => {
imgSnapshotTest(
`block-beta
`block
columns 3
space
middle["In the middle"]
@@ -337,7 +337,7 @@ describe('Block diagram', () => {
});
it('BL26: space and an edge', () => {
imgSnapshotTest(
`block-beta
`block
columns 5
A space B
A --x B
@@ -347,7 +347,7 @@ describe('Block diagram', () => {
});
it('BL27: block sizes for regular blocks', () => {
imgSnapshotTest(
`block-beta
`block
columns 3
a["A wide one"] b:2 c:2 d
`,
@@ -356,7 +356,7 @@ describe('Block diagram', () => {
});
it('BL28: composite block with a set width - f should use the available space', () => {
imgSnapshotTest(
`block-beta
`block
columns 3
a:3
block:e:3
@@ -370,7 +370,7 @@ describe('Block diagram', () => {
it('BL29: composite block with a set width - f and g should split the available space', () => {
imgSnapshotTest(
`block-beta
`block
columns 3
a:3
block:e:3
@@ -384,4 +384,28 @@ describe('Block diagram', () => {
{}
);
});
it('BL30: block should overflow if too wide for columns', () => {
imgSnapshotTest(
`block-beta
columns 2
fit:2
overflow:3
short:1
also_overflow:2
`,
{}
);
});
it('BL31: edge without arrow syntax should render with no arrowheads', () => {
imgSnapshotTest(
`block-beta
a
b
a --- b
`,
{}
);
});
});

View File

@@ -429,7 +429,7 @@ describe('Class diagram', () => {
classDiagram
class \`This\nTitle\nHas\nMany\nNewlines\` {
+String Also
-Stirng Many
-String Many
#int Members
+And()
-Many()
@@ -443,7 +443,7 @@ describe('Class diagram', () => {
classDiagram
class \`This\nTitle\nHas\nMany\nNewlines\` {
+String Also
-Stirng Many
-String Many
#int Members
+And()
-Many()
@@ -459,7 +459,7 @@ describe('Class diagram', () => {
namespace testingNamespace {
class \`This\nTitle\nHas\nMany\nNewlines\` {
+String Also
-Stirng Many
-String Many
#int Members
+And()
-Many()
@@ -495,4 +495,34 @@ describe('Class diagram', () => {
cy.get('a').should('have.attr', 'target', '_blank').should('have.attr', 'rel', 'noopener');
});
});
describe('Include char sequence "graph" in text (#6795)', () => {
it('has a label with char sequence "graph"', () => {
imgSnapshotTest(
`
classDiagram
class Person {
+String name
-Int id
#double age
+Text demographicProfile
}
`,
{ flowchart: { defaultRenderer: 'elk' } }
);
});
});
it('should handle backticks for namespace and class names', () => {
imgSnapshotTest(
`
classDiagram
namespace \`A::B\` {
class \`IPC::Sender\`
}
RenderProcessHost --|> \`IPC::Sender\`
`,
{}
);
});
});

View File

@@ -354,4 +354,19 @@ ORDER ||--|{ LINE-ITEM : contains
{ logLevel: 1 }
);
});
describe('Include char sequence "graph" in text (#6795)', () => {
it('has a label with char sequence "graph"', () => {
imgSnapshotTest(
`
erDiagram
p[Photograph] {
varchar(12) jobId
date dateCreated
}
`,
{ flowchart: { defaultRenderer: 'elk' } }
);
});
});
});

View File

@@ -208,13 +208,13 @@ describe('Flowchart ELK', () => {
`flowchart-elk TB
internet
nat
routeur
router
lb1
lb2
compute1
compute2
subgraph project
routeur
router
nat
subgraph subnet1
compute1
@@ -225,8 +225,8 @@ describe('Flowchart ELK', () => {
lb2
end
end
internet --> routeur
routeur --> subnet1 & subnet2
internet --> router
router --> subnet1 & subnet2
subnet1 & subnet2 --> nat --> internet
`,
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
@@ -443,7 +443,7 @@ flowchart-elk TD
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
);
});
it('63-elk: title on subgraphs should be themable', () => {
it('63-elk: title on subgraphs should be themeable', () => {
imgSnapshotTest(
`
%%{init:{"theme":"base", "themeVariables": {"primaryColor":"#411d4e", "titleColor":"white", "darkMode":true}}}%%

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');
});
});
@@ -198,13 +198,13 @@ describe('Flowchart v2', () => {
`flowchart TB
internet
nat
routeur
router
lb1
lb2
compute1
compute2
subgraph project
routeur
router
nat
subgraph subnet1
compute1
@@ -215,8 +215,8 @@ describe('Flowchart v2', () => {
lb2
end
end
internet --> routeur
routeur --> subnet1 & subnet2
internet --> router
router --> subnet1 & subnet2
subnet1 & subnet2 --> nat --> internet
`,
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
@@ -433,7 +433,7 @@ flowchart TD
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
);
});
it('63: title on subgraphs should be themable', () => {
it('63: title on subgraphs should be themeable', () => {
imgSnapshotTest(
`
%%{init:{"theme":"base", "themeVariables": {"primaryColor":"#411d4e", "titleColor":"white", "darkMode":true}}}%%
@@ -699,7 +699,7 @@ A --> B
{ flowchart: { titleTopMargin: 10 } }
);
});
it('3192: It should be possieble to render flowcharts with invisible edges', () => {
it('3192: It should be possible to render flowcharts with invisible edges', () => {
imgSnapshotTest(
`---
title: Simple flowchart with invisible edges
@@ -1076,11 +1076,11 @@ end
);
});
});
describe('New @ sytax for node metadata edge cases', () => {
describe('New @ syntax for node metadata edge cases', () => {
it('should be possible to use @ syntax to add labels on multi nodes', () => {
imgSnapshotTest(
`flowchart TB
n2["label for n2"] & n4@{ label: "labe for n4"} & n5@{ label: "labe for n5"}
n2["label for n2"] & n4@{ label: "label for n4"} & n5@{ label: "label for n5"}
`,
{}
);
@@ -1088,7 +1088,7 @@ end
it('should be possible to use @ syntax to add labels with trail spaces and &', () => {
imgSnapshotTest(
`flowchart TB
n2["label for n2"] & n4@{ label: "labe for n4"} & n5@{ label: "labe for n5"}
n2["label for n2"] & n4@{ label: "label for n4"} & n5@{ label: "label for n5"}
`,
{}
);
@@ -1097,8 +1097,8 @@ end
imgSnapshotTest(
`flowchart TB
n2["label for n2"]
n4@{ label: "labe for n4"}
n5@{ label: "labe for n5"}
n4@{ label: "label for n4"}
n5@{ label: "label for n5"}
`,
{}
);
@@ -1113,4 +1113,55 @@ end
);
});
});
describe('Flowchart Node Shape Rendering', () => {
it('should render a stadium-shaped node', () => {
imgSnapshotTest(
`flowchart TB
A(["Start"]) --> n1["Untitled Node"]
A --> n2["Untitled Node"]
`,
{}
);
});
it('should render a diamond-shaped node using shape config', () => {
imgSnapshotTest(
`flowchart BT
n2["Untitled Node"] --> n1["Diamond"]
n1@{ shape: diam}
`,
{}
);
});
it('should render a rounded rectangle and a normal rectangle', () => {
imgSnapshotTest(
`flowchart BT
n2["Untitled Node"] --> n1["Rounded Rectangle"]
n3["Untitled Node"] --> n1
n1@{ shape: rounded}
n3@{ shape: rect}
`,
{}
);
});
});
it('6617: Per Link Curve Styling using edge Ids', () => {
imgSnapshotTest(
`flowchart TD
A e1@-->B e5@--> E
E e7@--> D
B e3@-->D
A e2@-->C e4@-->D
C e6@--> F
F e8@--> D
e1@{ curve: natural }
e2@{ curve: stepAfter }
e3@{ curve: monotoneY }
e4@{ curve: bumpY }
e5@{ curve: linear }
e6@{ curve: catmullRom }
e7@{ curve: cardinal }
`
);
});
});

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

@@ -117,7 +117,7 @@ describe('Gantt diagram', () => {
{}
);
});
it('should FAIL redering a gantt chart for issue #1060 with invalid date', () => {
it('should FAIL rendering a gantt chart for issue #1060 with invalid date', () => {
imgSnapshotTest(
`
gantt
@@ -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(
`
@@ -548,6 +565,18 @@ describe('Gantt diagram', () => {
);
});
it('should render only the day when using dateFormat D', () => {
imgSnapshotTest(
`
gantt
title Test
dateFormat D
A :a, 1, 1d
`,
{}
);
});
// TODO: fix it
//
// This test is skipped deliberately
@@ -573,7 +602,7 @@ describe('Gantt diagram', () => {
`
);
});
it('should render a gantt diagram exculding friday and saturday', () => {
it('should render a gantt diagram excluding friday and saturday', () => {
imgSnapshotTest(
`gantt
title A Gantt Diagram
@@ -584,7 +613,7 @@ describe('Gantt diagram', () => {
A task :a1, 2024-02-28, 10d`
);
});
it('should render a gantt diagram exculding saturday and sunday', () => {
it('should render a gantt diagram excluding saturday and sunday', () => {
imgSnapshotTest(
`gantt
title A Gantt Diagram
@@ -630,6 +659,49 @@ describe('Gantt diagram', () => {
);
});
it('should render a gantt diagram excluding a specific date in YYYY-MM-DD HH:mm:ss format', () => {
imgSnapshotTest(
`
gantt
dateFormat YYYY-MM-DD HH:mm:ss
excludes 2025-07-07
section Section
A task :a1, 2025-07-04 20:30:30, 2025-07-08 10:30:30
Another task:after a1, 20h
`,
{}
);
});
it('should render a gantt diagram excluding saturday and sunday in YYYY-MM-DD HH:mm:ss format', () => {
imgSnapshotTest(
`
gantt
dateFormat YYYY-MM-DD HH:mm:ss
excludes weekends
weekend saturday
section Section
A task :a1, 2025-07-04 20:30:30, 2025-07-08 10:30:30
Another task:after a1, 20h
`,
{}
);
});
it('should render a gantt diagram excluding friday and saturday in YYYY-MM-DD HH:mm:ss format', () => {
imgSnapshotTest(
`
gantt
dateFormat YYYY-MM-DD HH:mm:ss
excludes weekends
weekend friday
section Section
A task :a1, 2025-07-04 20:30:30, 2025-07-08 10:30:30
Another task:after a1, 20h
`,
{}
);
});
it("should render when there's a semicolon in the title", () => {
imgSnapshotTest(
`
@@ -671,7 +743,7 @@ describe('Gantt diagram', () => {
title Gantt Digram
dateFormat YYYY-MM-DD
section Section
;A task with a semiclon :a1, 2014-01-01, 30d
;A task with a semicolon :a1, 2014-01-01, 30d
Another task :after a1 , 20d
section Another
Task in sec :2014-01-12 , 12d

View File

@@ -11,7 +11,7 @@ describe('Git Graph diagram', () => {
{}
);
});
it('2: should render a simple gitgraph with commit on main branch with Id', () => {
it('2: should render a simple gitgraph with commit on main branch with id', () => {
imgSnapshotTest(
`gitGraph
commit id: "One"
@@ -253,7 +253,7 @@ describe('Git Graph diagram', () => {
`
gitGraph
checkout main
%% Make sure to manually set the ID of all commits, for consistent visual tests
%% Make sure to manually set the id of all commits, for consistent visual tests
commit id: "1-abcdefg"
checkout main
branch branch1
@@ -343,7 +343,7 @@ gitGraph
{}
);
});
it('16: should render a simple gitgraph with commit on main branch with Id | Vertical Branch', () => {
it('16: should render a simple gitgraph with commit on main branch with id | Vertical Branch', () => {
imgSnapshotTest(
`gitGraph TB:
commit id: "One"
@@ -585,7 +585,7 @@ gitGraph
`
gitGraph TB:
checkout main
%% Make sure to manually set the ID of all commits, for consistent visual tests
%% Make sure to manually set the id of all commits, for consistent visual tests
commit id: "1-abcdefg"
checkout main
branch branch1
@@ -1024,7 +1024,7 @@ gitGraph TB:
{}
);
});
it('51: should render a simple gitgraph with commit on main branch with Id | Vertical Branch - Bottom-to-top', () => {
it('51: should render a simple gitgraph with commit on main branch with id | Vertical Branch - Bottom-to-top', () => {
imgSnapshotTest(
`gitGraph BT:
commit id: "One"
@@ -1266,7 +1266,7 @@ gitGraph TB:
`
gitGraph BT:
checkout main
%% Make sure to manually set the ID of all commits, for consistent visual tests
%% Make sure to manually set the id of all commits, for consistent visual tests
commit id: "1-abcdefg"
checkout main
branch branch1
@@ -1491,7 +1491,7 @@ gitGraph TB:
`
gitGraph
switch main
%% Make sure to manually set the ID of all commits, for consistent visual tests
%% Make sure to manually set the id of all commits, for consistent visual tests
commit id: "1-abcdefg"
switch main
branch branch1

View File

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

View File

@@ -62,7 +62,7 @@ describe('Kanban diagram', () => {
{}
);
});
it('6: should handle assigments', () => {
it('6: should handle assignments', () => {
imgSnapshotTest(
`kanban
id1[Todo]
@@ -118,7 +118,7 @@ kanban
docs[Create Documentation]
docs[Create Blog about the new diagram]
id7[In progress]
id6[Create renderer so that it works in all cases. We also add som extra text here for testing purposes. And some more just for the extra flare.]
id6[Create renderer so that it works in all cases. We also add some extra text here for testing purposes. And some more just for the extra flare.]
id8[Design grammar]@{ assigned: 'knsv' }
id9[Ready for deploy]
id10[Ready for test]

View File

@@ -146,7 +146,7 @@ root
shouldHaveRoot
);
});
it('text shouhld wrap with icon', () => {
it('text should wrap with icon', () => {
imgSnapshotTest(
`mindmap
root
@@ -246,5 +246,22 @@ Word!\`]
);
});
});
describe('Include char sequence "graph" in text (#6795)', () => {
it('has a label with char sequence "graph"', () => {
imgSnapshotTest(
`
mindmap
root
Photograph
Waterfall
Landscape
Geography
Mountains
Rocks
`,
{ flowchart: { defaultRenderer: 'elk' } }
);
});
});
/* The end */
});

View File

@@ -1,7 +1,7 @@
import { imgSnapshotTest } from '../../helpers/util';
describe('packet structure', () => {
it('should render a simple packet diagram', () => {
it('should render a simple packet-beta diagram', () => {
imgSnapshotTest(
`packet-beta
title Hello world
@@ -10,9 +10,18 @@ describe('packet structure', () => {
);
});
it('should render a simple packet diagram', () => {
imgSnapshotTest(
`packet
title Hello world
0-10: "hello"
`
);
});
it('should render a simple packet diagram without ranges', () => {
imgSnapshotTest(
`packet-beta
`packet
0: "h"
1: "i"
`
@@ -21,7 +30,7 @@ describe('packet structure', () => {
it('should render a complex packet diagram', () => {
imgSnapshotTest(
`packet-beta
`packet
0-15: "Source Port"
16-31: "Destination Port"
32-63: "Sequence Number"
@@ -52,7 +61,7 @@ describe('packet structure', () => {
packet:
showBits: false
---
packet-beta
packet
0-15: "Source Port"
16-31: "Destination Port"
32-63: "Sequence Number"

View File

@@ -64,7 +64,7 @@ describe('pie chart', () => {
});
});
it('should render a pie diagram when textPosition is setted', () => {
it('should render a pie diagram when textPosition is set', () => {
imgSnapshotTest(
`pie
"Dogs": 50
@@ -82,4 +82,13 @@ describe('pie chart', () => {
`
);
});
it('should render pie slices only for non-zero values but shows all legends', () => {
imgSnapshotTest(
` pie title Pets adopted by volunteers
"Dogs" : 386
"Cats" : 85
"Rats" : 1
`
);
});
});

View File

@@ -45,7 +45,7 @@ describe('Quadrant Chart', () => {
{}
);
});
it('should able to render y-axix on right side', () => {
it('should able to render y-axis on right side', () => {
imgSnapshotTest(
`
%%{init: {"quadrantChart": {"yAxisPosition": "right"}}}%%
@@ -61,7 +61,7 @@ describe('Quadrant Chart', () => {
{}
);
});
it('should able to render x-axix on bottom', () => {
it('should able to render x-axis on bottom', () => {
imgSnapshotTest(
`
%%{init: {"quadrantChart": {"xAxisPosition": "bottom"}}}%%
@@ -77,7 +77,7 @@ describe('Quadrant Chart', () => {
{}
);
});
it('should able to render x-axix on bottom and y-axis on right', () => {
it('should able to render x-axis on bottom and y-axis on right', () => {
imgSnapshotTest(
`
%%{init: {"quadrantChart": {"xAxisPosition": "bottom", "yAxisPosition": "right"}}}%%

View File

@@ -15,7 +15,7 @@ describe('Sankey Diagram', () => {
describe('when given a linkColor', function () {
this.beforeAll(() => {
cy.wrap(
`sankey-beta
`sankey
a,b,10
`
).as('graph');
@@ -62,7 +62,7 @@ describe('Sankey Diagram', () => {
this.beforeAll(() => {
cy.wrap(
`
sankey-beta
sankey
a,b,8
b,c,8

View File

@@ -0,0 +1,659 @@
import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts';
const looks = ['classic'];
const participantTypes = [
{ type: 'participant', display: 'participant' },
{ type: 'actor', display: 'actor' },
{ type: 'boundary', display: 'boundary' },
{ type: 'control', display: 'control' },
{ type: 'entity', display: 'entity' },
{ type: 'database', display: 'database' },
{ type: 'collections', display: 'collections' },
{ type: 'queue', display: 'queue' },
];
const restrictedTypes = ['boundary', 'control', 'entity', 'database', 'collections', 'queue'];
const interactionTypes = ['->>', '-->>', '->', '-->', '-x', '--x', '->>+', '-->>+'];
const notePositions = ['left of', 'right of', 'over'];
function getParticipantLine(name, type, alias) {
if (restrictedTypes.includes(type)) {
return ` participant ${name}@{ "type" : "${type}" }\n`;
} else if (alias) {
return ` participant ${name}@{ "type" : "${type}" } \n`;
} else {
return ` participant ${name}@{ "type" : "${type}" }\n`;
}
}
looks.forEach((look) => {
describe(`Sequence Diagram Tests - ${look} look`, () => {
it('should render all participant types', () => {
let diagramCode = `sequenceDiagram\n`;
participantTypes.forEach((pt, index) => {
const name = `${pt.display}${index}`;
diagramCode += getParticipantLine(name, pt.type);
});
for (let i = 0; i < participantTypes.length - 1; i++) {
diagramCode += ` ${participantTypes[i].display}${i} ->> ${participantTypes[i + 1].display}${i + 1}: Message ${i}\n`;
}
imgSnapshotTest(diagramCode, { look, sequence: { diagramMarginX: 50, diagramMarginY: 10 } });
});
it('should render all interaction types', () => {
let diagramCode = `sequenceDiagram\n`;
diagramCode += getParticipantLine('A', 'actor');
diagramCode += getParticipantLine('B', 'boundary');
interactionTypes.forEach((interaction, index) => {
diagramCode += ` A ${interaction} B: ${interaction} message ${index}\n`;
});
imgSnapshotTest(diagramCode, { look });
});
it('should render participant creation and destruction', () => {
let diagramCode = `sequenceDiagram\n`;
participantTypes.forEach((pt, index) => {
const name = `${pt.display}${index}`;
diagramCode += getParticipantLine('A', pt.type);
diagramCode += getParticipantLine('B', pt.type);
diagramCode += ` create participant ${name}@{ "type" : "${pt.type}" }\n`;
diagramCode += ` A ->> ${name}: Hello ${pt.display}\n`;
if (index % 2 === 0) {
diagramCode += ` destroy ${name}\n`;
}
});
imgSnapshotTest(diagramCode, { look });
});
it('should render notes in all positions', () => {
let diagramCode = `sequenceDiagram\n`;
diagramCode += getParticipantLine('A', 'actor');
diagramCode += getParticipantLine('B', 'boundary');
notePositions.forEach((position, index) => {
diagramCode += ` Note ${position} A: Note ${position} ${index}\n`;
});
diagramCode += ` A ->> B: Message with notes\n`;
imgSnapshotTest(diagramCode, { look });
});
it('should render parallel interactions', () => {
let diagramCode = `sequenceDiagram\n`;
participantTypes.slice(0, 4).forEach((pt, index) => {
diagramCode += getParticipantLine(`${pt.display}${index}`, pt.type);
});
diagramCode += ` par Parallel actions\n`;
for (let i = 0; i < 3; i += 2) {
diagramCode += ` ${participantTypes[i].display}${i} ->> ${participantTypes[i + 1].display}${i + 1}: Message ${i}\n`;
if (i < participantTypes.length - 2) {
diagramCode += ` and\n`;
}
}
diagramCode += ` end\n`;
imgSnapshotTest(diagramCode, { look });
});
it('should render alternative flows', () => {
let diagramCode = `sequenceDiagram\n`;
diagramCode += getParticipantLine('A', 'actor');
diagramCode += getParticipantLine('B', 'boundary');
diagramCode += ` alt Successful case\n`;
diagramCode += ` A ->> B: Request\n`;
diagramCode += ` B -->> A: Success\n`;
diagramCode += ` else Failure case\n`;
diagramCode += ` A ->> B: Request\n`;
diagramCode += ` B --x A: Failure\n`;
diagramCode += ` end\n`;
imgSnapshotTest(diagramCode, { look });
});
it('should render loops', () => {
let diagramCode = `sequenceDiagram\n`;
participantTypes.slice(0, 3).forEach((pt, index) => {
diagramCode += getParticipantLine(`${pt.display}${index}`, pt.type);
});
diagramCode += ` loop For each participant\n`;
for (let i = 0; i < 3; i++) {
diagramCode += ` ${participantTypes[0].display}0 ->> ${participantTypes[1].display}1: Message ${i}\n`;
}
diagramCode += ` end\n`;
imgSnapshotTest(diagramCode, { look });
});
it('should render boxes around groups', () => {
let diagramCode = `sequenceDiagram\n`;
diagramCode += ` box Group 1\n`;
participantTypes.slice(0, 3).forEach((pt, index) => {
diagramCode += ` ${getParticipantLine(`${pt.display}${index}`, pt.type)}`;
});
diagramCode += ` end\n`;
diagramCode += ` box rgb(200,220,255) Group 2\n`;
participantTypes.slice(3, 6).forEach((pt, index) => {
diagramCode += ` ${getParticipantLine(`${pt.display}${index}`, pt.type)}`;
});
diagramCode += ` end\n`;
diagramCode += ` ${participantTypes[0].display}0 ->> ${participantTypes[3].display}0: Cross-group message\n`;
imgSnapshotTest(diagramCode, { look });
});
it('should render with different font settings', () => {
let diagramCode = `sequenceDiagram\n`;
participantTypes.slice(0, 3).forEach((pt, index) => {
diagramCode += getParticipantLine(`${pt.display}${index}`, pt.type);
});
diagramCode += ` ${participantTypes[0].display}0 ->> ${participantTypes[1].display}1: Regular message\n`;
diagramCode += ` Note right of ${participantTypes[1].display}1: Regular note\n`;
imgSnapshotTest(diagramCode, {
look,
sequence: {
actorFontFamily: 'courier',
actorFontSize: 14,
messageFontFamily: 'Arial',
messageFontSize: 12,
noteFontFamily: 'times',
noteFontSize: 16,
noteAlign: 'left',
},
});
});
});
});
// Additional tests for specific combinations
describe('Sequence Diagram Special Cases', () => {
it('should render complex sequence with all features', () => {
const diagramCode = `
sequenceDiagram
box rgb(200,220,255) Authentication
actor User
participant LoginUI@{ "type": "boundary" }
participant AuthService@{ "type": "control" }
participant UserDB@{ "type": "database" }
end
box rgb(200,255,220) Order Processing
participant Order@{ "type": "entity" }
participant OrderQueue@{ "type": "queue" }
participant AuditLogs@{ "type": "collections" }
end
User ->> LoginUI: Enter credentials
LoginUI ->> AuthService: Validate
AuthService ->> UserDB: Query user
UserDB -->> AuthService: User data
alt Valid credentials
AuthService -->> LoginUI: Success
LoginUI -->> User: Welcome
par Place order
User ->> Order: New order
Order ->> OrderQueue: Process
and
Order ->> AuditLogs: Record
end
loop Until confirmed
OrderQueue ->> Order: Update status
Order -->> User: Notification
end
else Invalid credentials
AuthService --x LoginUI: Failure
LoginUI --x User: Retry
end
`;
imgSnapshotTest(diagramCode, {});
});
it('should render with wrapped messages and notes', () => {
const diagramCode = `
sequenceDiagram
participant A
participant B
A ->> B: This is a very long message that should wrap properly in the diagram rendering
Note over A,B: This is a very long note that should also wrap properly when rendered in the diagram
par Wrapped parallel
A ->> B: Parallel message 1<br>with explicit line break
and
B ->> A: Parallel message 2<br>with explicit line break
end
loop Wrapped loop
Note right of B: This is a long note<br>in a loop
A ->> B: Message in loop
end
`;
imgSnapshotTest(diagramCode, { sequence: { wrap: true } });
});
describe('Sequence Diagram Rendering with Different Participant Types', () => {
it('should render a sequence diagram with various participant types', () => {
imgSnapshotTest(
`
sequenceDiagram
participant User@{ "type": "actor" }
participant AuthService@{ "type": "control" }
participant UI@{ "type": "boundary" }
participant OrderController@{ "type": "control" }
participant Product@{ "type": "entity" }
participant MongoDB@{ "type": "database" }
participant Products@{ "type": "collections" }
participant OrderQueue@{ "type": "queue" }
User ->> UI: Login request
UI ->> AuthService: Validate credentials
AuthService -->> UI: Authentication token
UI ->> OrderController: Place order
OrderController ->> Product: Check availability
Product -->> OrderController: Available
OrderController ->> MongoDB: Save order
MongoDB -->> OrderController: Order saved
OrderController ->> OrderQueue: Process payment
OrderQueue -->> User: Order confirmation
`
);
});
it('should render participant creation and destruction with different types', () => {
imgSnapshotTest(`
sequenceDiagram
participant Alice@{ "type" : "boundary" }
Alice->>Bob: Hello Bob, how are you ?
Bob->>Alice: Fine, thank you. And you?
create participant Carl@{ "type" : "control" }
Alice->>Carl: Hi Carl!
create actor D as Donald
Carl->>D: Hi!
destroy Carl
Alice-xCarl: We are too many
destroy Bob
Bob->>Alice: I agree
`);
});
it('should handle complex interactions between different participant types', () => {
imgSnapshotTest(
`
sequenceDiagram
box rgb(200,220,255) Authentication
participant User@{ "type": "actor" }
participant LoginUI@{ "type": "boundary" }
participant AuthService@{ "type": "control" }
participant UserDB@{ "type": "database" }
end
box rgb(200,255,220) Order Processing
participant Order@{ "type": "entity" }
participant OrderQueue@{ "type": "queue" }
participant AuditLogs@{ "type": "collections" }
end
User ->> LoginUI: Enter credentials
LoginUI ->> AuthService: Validate
AuthService ->> UserDB: Query user
UserDB -->> AuthService: User data
alt Valid credentials
AuthService -->> LoginUI: Success
LoginUI -->> User: Welcome
par Place order
User ->> Order: New order
Order ->> OrderQueue: Process
and
Order ->> AuditLogs: Record
end
loop Until confirmed
OrderQueue ->> Order: Update status
Order -->> User: Notification
end
else Invalid credentials
AuthService --x LoginUI: Failure
LoginUI --x User: Retry
end
`,
{ sequence: { useMaxWidth: false } }
);
});
it('should render parallel processes with different participant types', () => {
imgSnapshotTest(
`
sequenceDiagram
participant Customer@{ "type": "actor" }
participant Frontend@{ "type": "participant" }
participant PaymentService@{ "type": "boundary" }
participant InventoryManager@{ "type": "control" }
participant Order@{ "type": "entity" }
participant OrdersDB@{ "type": "database" }
participant NotificationQueue@{ "type": "queue" }
Customer ->> Frontend: Place order
Frontend ->> Order: Create order
par Parallel Processing
Order ->> PaymentService: Process payment
and
Order ->> InventoryManager: Reserve items
end
PaymentService -->> Order: Payment confirmed
InventoryManager -->> Order: Items reserved
Order ->> OrdersDB: Save finalized order
OrdersDB -->> Order: Order saved
Order ->> NotificationQueue: Send confirmation
NotificationQueue -->> Customer: Order confirmation
`
);
});
});
it('should render different participant types with notes and loops', () => {
imgSnapshotTest(
`
sequenceDiagram
actor Admin
participant Dashboard
participant AuthService@{ "type" : "boundary" }
participant UserManager@{ "type" : "control" }
participant UserProfile@{ "type" : "entity" }
participant UserDB@{ "type" : "database" }
participant Logs@{ "type" : "database" }
Admin ->> Dashboard: Open user management
loop Authentication check
Dashboard ->> AuthService: Verify admin rights
AuthService ->> Dashboard: Access granted
end
Dashboard ->> UserManager: List users
UserManager ->> UserDB: Query users
UserDB ->> UserManager: Return user data
Note right of UserDB: Encrypted data<br/>requires decryption
UserManager ->> UserProfile: Format profiles
UserProfile ->> UserManager: Formatted data
UserManager ->> Dashboard: Display users
Dashboard ->> Logs: Record access
Logs ->> Admin: Audit trail
`
);
});
it('should render different participant types with alternative flows', () => {
imgSnapshotTest(
`
sequenceDiagram
actor Client
participant MobileApp
participant CloudService@{ "type" : "boundary" }
participant DataProcessor@{ "type" : "control" }
participant Transaction@{ "type" : "entity" }
participant TransactionsDB@{ "type" : "database" }
participant EventBus@{ "type" : "queue" }
Client ->> MobileApp: Initiate transaction
MobileApp ->> CloudService: Authenticate
alt Authentication successful
CloudService -->> MobileApp: Auth token
MobileApp ->> DataProcessor: Process data
DataProcessor ->> Transaction: Create transaction
Transaction ->> TransactionsDB: Save record
TransactionsDB -->> Transaction: Confirmation
Transaction ->> EventBus: Publish event
EventBus -->> Client: Notification
else Authentication failed
CloudService -->> MobileApp: Error
MobileApp -->> Client: Show error
end
`
);
});
it('should render different participant types with wrapping text', () => {
imgSnapshotTest(
`
sequenceDiagram
participant B@{ "type" : "boundary" }
participant C@{ "type" : "control" }
participant E@{ "type" : "entity" }
participant DB@{ "type" : "database" }
participant COL@{ "type" : "collections" }
participant Q@{ "type" : "queue" }
FE ->> B: Another long message<br/>with explicit<br/>line breaks
B -->> FE: Response message that is also quite long and needs to wrap
FE ->> C: Process data
C ->> E: Validate
E -->> C: Validation result
C ->> DB: Save
DB -->> C: Save result
C ->> COL: Log
COL -->> Q: Forward
Q -->> LongNameUser: Final response with confirmation of all actions taken
`,
{ sequence: { wrap: true } }
);
});
describe('Sequence Diagram - New Participant Types with Long Notes and Messages', () => {
it('should render long notes left of boundary', () => {
imgSnapshotTest(
`
sequenceDiagram
participant Alice@{ "type" : "boundary" }
actor Bob
Alice->>Bob: Hola
Note left of Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render wrapped long notes left of control', () => {
imgSnapshotTest(
`
sequenceDiagram
participant Alice@{ "type" : "control" }
actor Bob
Alice->>Bob: Hola
Note left of Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render long notes right of entity', () => {
imgSnapshotTest(
`
sequenceDiagram
participant Alice@{ "type" : "entity" }
actor Bob
Alice->>Bob: Hola
Note right of Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render wrapped long notes right of database', () => {
imgSnapshotTest(
`
sequenceDiagram
participant Alice@{ "type" : "database" }
actor Bob
Alice->>Bob: Hola
Note right of Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render long notes over collections', () => {
imgSnapshotTest(
`
sequenceDiagram
participant Alice@{ "type" : "collections" }
actor Bob
Alice->>Bob: Hola
Note over Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render wrapped long notes over queue', () => {
imgSnapshotTest(
`
sequenceDiagram
participant Alice@{ "type" : "queue" }
actor Bob
Alice->>Bob: Hola
Note over Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render notes over actor and boundary', () => {
imgSnapshotTest(
`
sequenceDiagram
actor Alice
participant Charlie@{ "type" : "boundary" }
note over Alice: Some note
note over Charlie: Other note
`,
{}
);
});
it('should render long messages from database to collections', () => {
imgSnapshotTest(
`
sequenceDiagram
participant Alice@{ "type" : "database" }
participant Bob@{ "type" : "collections" }
Alice->>Bob: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render wrapped long messages from control to entity', () => {
imgSnapshotTest(
`
sequenceDiagram
participant Alice@{ "type" : "control" }
participant Bob@{ "type" : "entity" }
Alice->>Bob:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render long messages from queue to boundary', () => {
imgSnapshotTest(
`
sequenceDiagram
participant Alice@{ "type" : "queue" }
participant Bob@{ "type" : "boundary" }
Alice->>Bob: I'm short
Bob->>Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
`,
{}
);
});
it('should render wrapped long messages from actor to database', () => {
imgSnapshotTest(
`
sequenceDiagram
actor Alice
participant Bob@{ "type" : "database" }
Alice->>Bob: I'm short
Bob->>Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
`,
{}
);
});
});
describe('svg size', () => {
it('should render a sequence diagram when useMaxWidth is true (default)', () => {
renderGraph(
`
sequenceDiagram
actor Alice
participant Bob@{ "type" : "boundary" }
participant John@{ "type" : "control" }
Alice ->> Bob: Hello Bob, how are you?
Bob-->>John: How about you John?
Bob--x Alice: I am good thanks!
Bob-x John: I am good thanks!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
Bob-->Alice: Checking with John...
alt either this
Alice->>John: Yes
else or this
Alice->>John: No
else or this will happen
Alice->John: Maybe
end
par this happens in parallel
Alice -->> Bob: Parallel message 1
and
Alice -->> John: Parallel message 2
end
`,
{ sequence: { useMaxWidth: true } }
);
cy.get('svg').should((svg) => {
expect(svg).to.have.attr('width', '100%');
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
expect(maxWidthValue).to.be.within(820 * 0.95, 820 * 1.05);
});
});
it('should render a sequence diagram when useMaxWidth is false', () => {
renderGraph(
`
sequenceDiagram
actor Alice
participant Bob@{ "type" : "boundary" }
participant John@{ "type" : "control" }
Alice ->> Bob: Hello Bob, how are you?
Bob-->>John: How about you John?
Bob--x Alice: I am good thanks!
Bob-x John: I am good thanks!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
Bob-->Alice: Checking with John...
alt either this
Alice->>John: Yes
else or this
Alice->>John: No
else or this will happen
Alice->John: Maybe
end
par this happens in parallel
Alice -->> Bob: Parallel message 1
and
Alice -->> John: Parallel message 2
end
`,
{ sequence: { useMaxWidth: false } }
);
cy.get('svg').should((svg) => {
const width = parseFloat(svg.attr('width'));
expect(width).to.be.within(820 * 0.95, 820 * 1.05);
expect(svg).to.not.have.attr('style');
});
});
});
});

View File

@@ -138,8 +138,8 @@ describe('State diagram', () => {
imgSnapshotTest(
`
stateDiagram-v2
State1: This a a single line description
State2: This a a multi line description
State1: This a single line description
State2: This a multi line description
State2: here comes the multi part
[*] --> State1
State1 --> State2
@@ -345,7 +345,7 @@ stateDiagram
}
);
});
it('v2 width of compond state should grow with title if title is wider', () => {
it('v2 width of compound state should grow with title if title is wider', () => {
imgSnapshotTest(
`
stateDiagram-v2
@@ -402,8 +402,8 @@ stateDiagram-v2
`
stateDiagram-v2
MyState
note left of MyState : I am a leftie
note right of MyState : I am a rightie
note left of MyState : I am a lefty
note right of MyState : I am a righty
`,
{
logLevel: 0,
@@ -552,7 +552,7 @@ style AState fill:#636,border:1px solid red,color:white;
{ logLevel: 0, fontFamily: 'courier' }
);
});
it(' should let styles take preceedence over classes', () => {
it(' should let styles take precedence over classes', () => {
imgSnapshotTest(
`
stateDiagram-v2
@@ -565,7 +565,7 @@ style AState fill:#636,border:1px solid red,color:white;
{ logLevel: 0, fontFamily: 'courier' }
);
});
it(' should allow styles to take effect in stubgraphs', () => {
it(' should allow styles to take effect in subgraphs', () => {
imgSnapshotTest(
`
stateDiagram
@@ -602,6 +602,231 @@ State1 --> [*]
--
55
}
`,
{}
);
});
it('should render edge labels correctly', () => {
imgSnapshotTest(
`---
title: On The Way To Something Something DarkSide
config:
look: default
theme: default
---
stateDiagram-v2
state State1_____________
{
c0
}
state State2_____________
{
c1
}
state State3_____________
{
c7
}
state State4_____________
{
c2
}
state State5_____________
{
c3
}
state State6_____________
{
c4
}
state State7_____________
{
c5
}
state State8_____________
{
c6
}
[*] --> State1_____________
State1_____________ --> State2_____________ : Transition1_____
State2_____________ --> State4_____________ : Transition2_____
State2_____________ --> State3_____________ : Transition3_____
State3_____________ --> State2_____________
State4_____________ --> State2_____________ : Transition5_____
State4_____________ --> State5_____________ : Transition6_____
State5_____________ --> State6_____________ : Transition7_____
State6_____________ --> State4_____________ : Transition8_____
State2_____________ --> State7_____________ : Transition4_____
State4_____________ --> State7_____________ : Transition4_____
State5_____________ --> State7_____________ : Transition4_____
State6_____________ --> State7_____________ : Transition4_____
State7_____________ --> State1_____________ : Transition9_____
State5_____________ --> State8_____________ : Transition10____
State8_____________ --> State5_____________ : Transition11____
`,
{}
);
});
it('should render edge labels correctly with multiple transitions', () => {
imgSnapshotTest(
`---
title: Multiple Transitions
config:
look: default
theme: default
---
stateDiagram-v2
state State1_____________
{
c0
}
state State2_____________
{
c1
}
state State3_____________
{
c7
}
state State4_____________
{
c2
}
state State5_____________
{
c3
}
state State6_____________
{
c4
}
state State7_____________
{
c5
}
state State8_____________
{
c6
}
state State9_____________
{
c9
}
[*] --> State1_____________
State1_____________ --> State2_____________ : Transition1_____
State2_____________ --> State4_____________ : Transition2_____
State2_____________ --> State3_____________ : Transition3_____
State3_____________ --> State2_____________
State4_____________ --> State2_____________ : Transition5_____
State4_____________ --> State5_____________ : Transition6_____
State5_____________ --> State6_____________ : Transition7_____
State6_____________ --> State4_____________ : Transition8_____
State2_____________ --> State7_____________ : Transition4_____
State4_____________ --> State7_____________ : Transition4_____
State5_____________ --> State7_____________ : Transition4_____
State6_____________ --> State7_____________ : Transition4_____
State7_____________ --> State1_____________ : Transition9_____
State5_____________ --> State8_____________ : Transition10____
State8_____________ --> State5_____________ : Transition11____
State9_____________ --> State8_____________ : Transition12____
`,
{}
);
});
it('should render edge labels correctly with multiple states', () => {
imgSnapshotTest(
`---
title: Multiple States
config:
look: default
theme: default
---
stateDiagram-v2
state State1_____________
{
c0
}
state State2_____________
{
c1
}
state State3_____________
{
c7
}
state State4_____________
{
c2
}
state State5_____________
{
c3
}
state State6_____________
{
c4
}
state State7_____________
{
c5
}
state State8_____________
{
c6
}
state State9_____________
{
c9
}
state State10_____________
{
c10
}
[*] --> State1_____________
State1_____________ --> State2_____________ : Transition1_____
State2_____________ --> State3_____________ : Transition2_____
State3_____________ --> State4_____________ : Transition3_____
State4_____________ --> State5_____________ : Transition4_____
State5_____________ --> State6_____________ : Transition5_____
State6_____________ --> State7_____________ : Transition6_____
State7_____________ --> State8_____________ : Transition7_____
State8_____________ --> State9_____________ : Transition8_____
State9_____________ --> State10_____________ : Transition9_____
`,
{}
);

View File

@@ -129,8 +129,8 @@ describe('State diagram', () => {
imgSnapshotTest(
`
stateDiagram
State1: This a a single line description
State2: This a a multi line description
State1: This a single line description
State2: This a multi line description
State2: here comes the multi part
[*] --> State1
State1 --> State2

View File

@@ -7,7 +7,7 @@ describe('Timeline diagram', () => {
title History of Social Media Platform
2002 : LinkedIn
2004 : Facebook : Google
2005 : Youtube
2005 : YouTube
2006 : Twitter
`,
{}
@@ -35,7 +35,7 @@ describe('Timeline diagram', () => {
section Stone Age
7600 BC : Britain's oldest known house was built in Orkney, Scotland
6000 BC : Sea levels rise and Britain becomes an island.<br> The people who live here are hunter-gatherers.
section Broze Age
section Bronze Age
2300 BC : People arrive from Europe and settle in Britain. <br>They bring farming and metalworking.
: New styles of pottery and ways of burying the dead appear.
2200 BC : The last major building works are completed at Stonehenge.<br> People now bury their dead in stone circles.
@@ -51,7 +51,7 @@ describe('Timeline diagram', () => {
title History of Social Media Platform
2002 : LinkedIn
2004 : Facebook : Google
2005 : Youtube
2005 : YouTube
2006 : Twitter
`,
{}
@@ -68,7 +68,7 @@ describe('Timeline diagram', () => {
title History of Social Media Platform
2002 : LinkedIn
2004 : Facebook : Google
2005 : Youtube
2005 : YouTube
2006 : Twitter
2007 : Tumblr
2008 : Instagram
@@ -84,7 +84,7 @@ describe('Timeline diagram', () => {
title History of Social Media Platform
2002 : LinkedIn
2004 : Facebook : Google
2005 : Youtube
2005 : YouTube
2006 : Twitter
2007 : Tumblr
2008 : Instagram
@@ -101,7 +101,7 @@ describe('Timeline diagram', () => {
title History of Social Media Platform
2002 : LinkedIn
2004 : Facebook : Google
2005 : Youtube
2005 : YouTube
2006 : Twitter
2007 : Tumblr
2008 : Instagram
@@ -118,7 +118,7 @@ describe('Timeline diagram', () => {
title History of Social Media Platform
2002 : LinkedIn
2004 : Facebook : Google
2005 : Youtube
2005 : YouTube
2006 : Twitter
2007 : Tumblr
2008 : Instagram
@@ -135,7 +135,7 @@ describe('Timeline diagram', () => {
title History of Social Media Platform
2002 : LinkedIn
2004 : Facebook : Google
2005 : Youtube
2005 : YouTube
2006 : Twitter
2007 : Tumblr
2008 : Instagram
@@ -152,7 +152,7 @@ describe('Timeline diagram', () => {
title History of Social Media Platform
2002 : LinkedIn
2004 : Facebook : Google
2005 : Youtube
2005 : YouTube
2006 : Twitter
2007 : Tumblr
2008 : Instagram
@@ -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

@@ -0,0 +1,382 @@
import { imgSnapshotTest } from '../../helpers/util.ts';
describe('Treemap Diagram', () => {
it('1: should render a basic treemap', () => {
imgSnapshotTest(
`treemap-beta
"Category A"
"Item A1": 10
"Item A2": 20
"Category B"
"Item B1": 15
"Item B2": 25
`,
{}
);
});
it('2: should render a hierarchical treemap', () => {
imgSnapshotTest(
`treemap-beta
"Products"
"Electronics"
"Phones": 50
"Computers": 30
"Accessories": 20
"Clothing"
"Men's"
"Shirts": 10
"Pants": 15
"Women's"
"Dresses": 20
"Skirts": 10
`,
{}
);
});
it('3: should render a treemap with styling using classDef', () => {
imgSnapshotTest(
`treemap-beta
"Section 1"
"Leaf 1.1": 12
"Section 1.2":::class1
"Leaf 1.2.1": 12
"Section 2"
"Leaf 2.1": 20:::class1
"Leaf 2.2": 25
"Leaf 2.3": 12
classDef class1 fill:red,color:blue,stroke:#FFD600;
`,
{}
);
});
it('4: should handle long text that wraps', () => {
imgSnapshotTest(
`treemap-beta
"Main Category"
"This is a very long item name that should wrap to the next line when rendered in the treemap diagram": 50
"Short item": 20
`,
{}
);
});
it('5: should render with a forest theme', () => {
imgSnapshotTest(
`---
config:
theme: forest
---
treemap-beta
"Category A"
"Item A1": 10
"Item A2": 20
"Category B"
"Item B1": 15
"Item B2": 25
`,
{}
);
});
it('6: should handle multiple levels of nesting', () => {
imgSnapshotTest(
`treemap-beta
"Level 1"
"Level 2A"
"Level 3A": 10
"Level 3B": 15
"Level 2B"
"Level 3C": 20
"Level 3D"
"Level 4A": 5
"Level 4B": 5
`,
{}
);
});
it('7: should handle classDef with multiple styles', () => {
imgSnapshotTest(
`treemap-beta
"Main"
"A": 20
"B":::important
"B1": 10
"B2": 15
"C": 5:::secondary
classDef important fill:#f96,stroke:#333,stroke-width:2px;
classDef secondary fill:#6cf,stroke:#333,stroke-dasharray:5 5;
`,
{}
);
});
it('8: should handle dollar value formatting with thousands separator', () => {
imgSnapshotTest(
`---
config:
treemap:
valueFormat: "$0,0"
---
treemap
"Budget"
"Operations"
"Salaries": 700000
"Equipment": 200000
"Supplies": 100000
"Marketing"
"Advertising": 400000
"Events": 100000
`,
{}
);
});
it('8a: should handle percentage formatting', () => {
imgSnapshotTest(
`---
config:
treemap:
valueFormat: ".1%"
---
treemap-beta
"Market Share"
"Company A": 0.35
"Company B": 0.25
"Company C": 0.15
"Others": 0.25
`,
{}
);
});
it('8b: should handle decimal formatting', () => {
imgSnapshotTest(
`---
config:
treemap:
valueFormat: ".2f"
---
treemap-beta
"Metrics"
"Conversion Rate": 0.0567
"Bounce Rate": 0.6723
"Click-through Rate": 0.1289
"Engagement": 0.4521
`,
{}
);
});
it('8c: should handle dollar sign with decimal places', () => {
imgSnapshotTest(
`---
config:
treemap:
valueFormat: "$.2f"
---
treemap-beta
"Product Prices"
"Basic": 19.99
"Standard": 49.99
"Premium": 99.99
"Enterprise": 199.99
`,
{}
);
});
it('8d: should handle dollar sign with thousands separator and decimal places', () => {
imgSnapshotTest(
`---
config:
treemap:
valueFormat: "$,.2f"
---
treemap-beta
"Revenue"
"Q1": 1250345.75
"Q2": 1645789.25
"Q3": 1845123.50
"Q4": 2145678.75
`,
{}
);
});
it('8e: should handle simple thousands separator', () => {
imgSnapshotTest(
`---
config:
treemap:
valueFormat: ","
---
treemap-beta
"User Counts"
"Active Users": 1250345
"New Signups": 45789
"Churned": 12350
"Converted": 78975
`,
{}
);
});
it('8f: should handle valueFormat set via directive with dollar and thousands separator', () => {
imgSnapshotTest(
`---
config:
treemap:
valueFormat: "$,.0f"
---
treemap-beta
"Sales by Region"
"North": 1234567
"South": 7654321
"East": 4567890
"West": 9876543
`,
{}
);
});
it('8g: should handle scientific notation format', () => {
imgSnapshotTest(
`---
config:
treemap:
valueFormat: ".2e"
---
treemap-beta
"Scientific Values"
"Value 1": 1234567
"Value 2": 0.0000123
"Value 3": 1000000000
`,
{}
);
});
it('9: should handle a complex example with multiple features', () => {
imgSnapshotTest(
`---
config:
theme: dark
treemap:
valueFormat: "$0,0"
---
treemap-beta
"Company Budget"
"Engineering":::engineering
"Frontend": 300000
"Backend": 400000
"DevOps": 200000
"Marketing":::marketing
"Digital": 250000
"Print": 100000
"Events": 150000
"Sales":::sales
"Direct": 500000
"Channel": 300000
classDef engineering fill:#6b9bc3,stroke:#333;
classDef marketing fill:#c36b9b,stroke:#333;
classDef sales fill:#c3a66b,stroke:#333;
`,
{}
);
});
it('10: should render the example from documentation', () => {
imgSnapshotTest(
`
treemap-beta
"Section 1"
"Leaf 1.1": 12
"Section 1.2":::class1
"Leaf 1.2.1": 12
"Section 2"
"Leaf 2.1": 20:::class1
"Leaf 2.2": 25
"Leaf 2.3": 12
classDef class1 fill:red,color:blue,stroke:#FFD600;
`,
{}
);
});
it('11: should handle comments', () => {
imgSnapshotTest(
`
treemap-beta
%% This is a comment
"Category A"
"Item A1": 10
"Item A2": 20
%% Another comment
"Category B"
"Item B1": 15
"Item B2": 25
`,
{}
);
});
/*
it.skip('12: should render a treemap with title', () => {
imgSnapshotTest(
`
treemap-beta
title Treemap with Title
"Category A"
"Item A1": 10
"Item A2": 20
"Category B"
"Item B1": 15
"Item B2": 25
`,
{}
);
});
it.skip('13: should render a treemap with accessibility attributes', () => {
imgSnapshotTest(
`
treemap-beta
accTitle: Accessible Treemap Title
accDescr: This is a description of the treemap for accessibility purposes
"Category A"
"Item A1": 10
"Item A2": 20
"Category B"
"Item B1": 15
"Item B2": 25
`,
{}
);
});
it.skip('14: should render a treemap with title and accessibility attributes', () => {
imgSnapshotTest(
`
treemap
title Treemap with Title and Accessibility
accTitle: Accessible Treemap Title
accDescr: This is a description of the treemap for accessibility purposes
"Category A"
"Item A1": 10
"Item A2": 20
"Category B"
"Item B1": 15
"Item B2": 25
`,
{}
);
});
*/
});

View File

@@ -1,7 +1,7 @@
import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts';
describe('XY Chart', () => {
it('should render the simplest possible chart', () => {
it('should render the simplest possible xy-beta chart', () => {
imgSnapshotTest(
`
xychart-beta
@@ -10,10 +10,19 @@ describe('XY Chart', () => {
{}
);
});
it('should render the simplest possible xy chart', () => {
imgSnapshotTest(
`
xychart
line [10, 30, 20]
`,
{}
);
});
it('Should render a complete chart', () => {
imgSnapshotTest(
`
xychart-beta
xychart
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
@@ -26,7 +35,7 @@ describe('XY Chart', () => {
it('Should render a chart without title', () => {
imgSnapshotTest(
`
xychart-beta
xychart
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
@@ -38,7 +47,7 @@ describe('XY Chart', () => {
it('y-axis title not required', () => {
imgSnapshotTest(
`
xychart-beta
xychart
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis 4000 --> 11000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
@@ -50,7 +59,7 @@ describe('XY Chart', () => {
it('Should render a chart without y-axis with different range', () => {
imgSnapshotTest(
`
xychart-beta
xychart
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
bar [5000, 6000, 7500, 8200, 9500, 10500, 14000, 3200, 9200, 9900, 3400, 6000]
line [2000, 7000, 6500, 9200, 9500, 7500, 11000, 10200, 3200, 8500, 7000, 8800]
@@ -61,7 +70,7 @@ describe('XY Chart', () => {
it('x axis title not required', () => {
imgSnapshotTest(
`
xychart-beta
xychart
x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
bar [5000, 6000, 7500, 8200, 9500, 10500, 14000, 3200, 9200, 9900, 3400, 6000]
line [2000, 7000, 6500, 9200, 9500, 7500, 11000, 10200, 3200, 8500, 7000, 8800]
@@ -72,7 +81,7 @@ describe('XY Chart', () => {
it('Multiple plots can be rendered', () => {
imgSnapshotTest(
`
xychart-beta
xychart
line [23, 46, 77, 34]
line [45, 32, 33, 12]
bar [87, 54, 99, 85]
@@ -86,7 +95,7 @@ describe('XY Chart', () => {
it('Decimals and negative numbers are supported', () => {
imgSnapshotTest(
`
xychart-beta
xychart
y-axis -2.4 --> 3.5
line [+1.3, .6, 2.4, -.34]
`,
@@ -104,7 +113,7 @@ describe('XY Chart', () => {
height: 20
plotReservedSpacePercent: 100
---
xychart-beta
xychart
line [5000, 9000, 7500, 6200, 9500, 5500, 11000, 8200, 9200, 9500, 7000, 8800]
`,
{}
@@ -130,7 +139,7 @@ describe('XY Chart', () => {
showTick: false
showAxisLine: false
---
xychart-beta
xychart
bar [5000, 9000, 7500, 6200, 9500, 5500, 11000, 8200, 9200, 9500, 7000, 8800]
`,
{}
@@ -140,7 +149,7 @@ describe('XY Chart', () => {
imgSnapshotTest(
`
%%{init: {"xyChart": {"width": 1000, "height": 600, "titlePadding": 5, "titleFontSize": 10, "xAxis": {"labelFontSize": "20", "labelPadding": 10, "titleFontSize": 30, "titlePadding": 20, "tickLength": 10, "tickWidth": 5}, "yAxis": {"labelFontSize": "20", "labelPadding": 10, "titleFontSize": 30, "titlePadding": 20, "tickLength": 10, "tickWidth": 5}, "plotBorderWidth": 5, "chartOrientation": "horizontal", "plotReservedSpacePercent": 60 }}}%%
xychart-beta
xychart
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
@@ -179,8 +188,9 @@ describe('XY Chart', () => {
axisLineWidth: 5
chartOrientation: horizontal
plotReservedSpacePercent: 60
showDataLabel: true
---
xychart-beta
xychart
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
@@ -201,7 +211,7 @@ describe('XY Chart', () => {
yAxis:
showTitle: false
---
xychart-beta
xychart
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
@@ -222,7 +232,7 @@ describe('XY Chart', () => {
yAxis:
showLabel: false
---
xychart-beta
xychart
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
@@ -243,7 +253,7 @@ describe('XY Chart', () => {
yAxis:
showTick: false
---
xychart-beta
xychart
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
@@ -264,7 +274,7 @@ describe('XY Chart', () => {
yAxis:
showAxisLine: false
---
xychart-beta
xychart
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
@@ -293,7 +303,7 @@ describe('XY Chart', () => {
xAxisLineColor: "#87ceeb"
plotColorPalette: "#008000, #faba63"
---
xychart-beta
xychart
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
@@ -306,7 +316,7 @@ describe('XY Chart', () => {
it('should use the correct distances between data points', () => {
imgSnapshotTest(
`
xychart-beta
xychart
x-axis 0 --> 2
line [0, 1, 0, 1]
bar [1, 0, 1, 0]
@@ -315,4 +325,516 @@ describe('XY Chart', () => {
);
cy.get('svg');
});
it('should render vertical bar chart with labels', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
---
xychart
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
`,
{}
);
});
it('should render horizontal bar chart with labels', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
chartOrientation: horizontal
---
xychart
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
`,
{}
);
});
it('should render vertical bar chart without labels by default', () => {
imgSnapshotTest(
`
xychart
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
`,
{}
);
});
it('should render horizontal bar chart without labels by default', () => {
imgSnapshotTest(
`
---
config:
xyChart:
chartOrientation: horizontal
---
xychart
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
`,
{}
);
});
it('should render multiple bar plots vertically with labels correctly', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
---
xychart
title "Multiple Bar Plots"
x-axis Categories [A, B, C]
y-axis "Values" 0 --> 100
bar [10, 50, 90]
`,
{}
);
});
it('should render multiple bar plots horizontally with labels correctly', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
chartOrientation: horizontal
---
xychart
title "Multiple Bar Plots"
x-axis Categories [A, B, C]
y-axis "Values" 0 --> 100
bar [10, 50, 90]
`,
{}
);
});
it('should render a single bar with label for a vertical xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
---
xychart
title "Single Bar Chart"
x-axis Categories [A]
y-axis "Value" 0 --> 100
bar [75]
`,
{}
);
});
it('should render a single bar with label for a horizontal xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
chartOrientation: horizontal
---
xychart
title "Single Bar Chart"
x-axis Categories [A]
y-axis "Value" 0 --> 100
bar [75]
`,
{}
);
});
it('should render negative and decimal values with correct labels for vertical xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
---
xychart
title "Decimal and Negative Values"
x-axis Categories [A, B, C]
y-axis -10 --> 10
bar [ -2.5, 0.75, 5.1 ]
`,
{}
);
});
it('should render negative and decimal values with correct labels for horizontal xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
chartOrientation: horizontal
---
xychart
title "Decimal and Negative Values"
x-axis Categories [A, B, C]
y-axis -10 --> 10
bar [ -2.5, 0.75, 5.1 ]
`,
{}
);
});
it('should render data labels within each bar in the vertical xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
---
xychart
title "Sales Revenue"
x-axis Months [jan,b,c]
y-axis "Revenue (in $)" 4000 --> 12000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000, 3000, 2000, 500, 2000, 3000, 11000, 5000, 6000]
`,
{}
);
cy.get('g.bar-plot-0').within(() => {
cy.get('rect').each(($rect, index) => {
// Extract bar properties
const barProps = {
x: parseFloat($rect.attr('x')),
y: parseFloat($rect.attr('y')),
width: parseFloat($rect.attr('width')),
height: parseFloat($rect.attr('height')),
};
// Get the text element corresponding to this bar by index.
cy.get('text')
.eq(index)
.then(($text) => {
const bbox = $text[0].getBBox();
const textProps = {
x: bbox.x,
y: bbox.y,
width: bbox.width,
height: bbox.height,
};
// Verify that the text label is positioned within the boundaries of the bar.
expect(textProps.x).to.be.greaterThan(barProps.x);
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
// Check horizontal alignment (within tolerance)
expect(textProps.x + textProps.width / 2).to.be.closeTo(
barProps.x + barProps.width / 2,
5
);
expect(textProps.y).to.be.greaterThan(barProps.y);
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
});
});
});
});
it('should render data labels within each bar in the horizontal xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
chartOrientation: horizontal
---
xychart
title "Sales Revenue"
x-axis Months [jan,b,c]
y-axis "Revenue (in $)" 4000 --> 12000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000, 3000, 2000, 500, 2000, 3000, 11000, 5000, 6000]
`,
{}
);
cy.get('g.bar-plot-0').within(() => {
cy.get('rect').each(($rect, index) => {
// Extract bar properties
const barProps = {
x: parseFloat($rect.attr('x')),
y: parseFloat($rect.attr('y')),
width: parseFloat($rect.attr('width')),
height: parseFloat($rect.attr('height')),
};
// Get the text element corresponding to this bar by index.
cy.get('text')
.eq(index)
.then(($text) => {
const bbox = $text[0].getBBox();
const textProps = {
x: bbox.x,
y: bbox.y,
width: bbox.width,
height: bbox.height,
};
// Verify that the text label is positioned within the boundaries of the bar.
expect(textProps.x).to.be.greaterThan(barProps.x);
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
expect(textProps.y).to.be.greaterThan(barProps.y);
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
expect(textProps.y + textProps.height / 2).to.be.closeTo(
barProps.y + barProps.height / 2,
5
);
});
});
});
});
it('should render data labels within each bar in the vertical xy-chart with a lot of bars of different sizes', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
---
xychart
title "Sales Revenue"
x-axis Months [jan,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s]
y-axis "Revenue (in $)" 4000 --> 12000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000, 8000, 10000, 5000, 7600, 4999,11000 ,5000,6000]
`,
{}
);
cy.get('g.bar-plot-0').within(() => {
cy.get('rect').each(($rect, index) => {
// Extract bar properties
const barProps = {
x: parseFloat($rect.attr('x')),
y: parseFloat($rect.attr('y')),
width: parseFloat($rect.attr('width')),
height: parseFloat($rect.attr('height')),
};
// Get the text element corresponding to this bar by index.
cy.get('text')
.eq(index)
.then(($text) => {
const bbox = $text[0].getBBox();
const textProps = {
x: bbox.x,
y: bbox.y,
width: bbox.width,
height: bbox.height,
};
// Verify that the text label is positioned within the boundaries of the bar.
expect(textProps.x).to.be.greaterThan(barProps.x);
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
// Check horizontal alignment (within tolerance)
expect(textProps.x + textProps.width / 2).to.be.closeTo(
barProps.x + barProps.width / 2,
5
);
expect(textProps.y).to.be.greaterThan(barProps.y);
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
});
});
});
});
it('should render data labels within each bar in the horizontal xy-chart with a lot of bars of different sizes', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
chartOrientation: horizontal
---
xychart
title "Sales Revenue"
x-axis Months [jan,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s]
y-axis "Revenue (in $)" 4000 --> 12000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000, 8000, 10000, 5000, 7600, 4999,11000 ,5000,6000]
`,
{}
);
cy.get('g.bar-plot-0').within(() => {
cy.get('rect').each(($rect, index) => {
// Extract bar properties
const barProps = {
x: parseFloat($rect.attr('x')),
y: parseFloat($rect.attr('y')),
width: parseFloat($rect.attr('width')),
height: parseFloat($rect.attr('height')),
};
// Get the text element corresponding to this bar by index.
cy.get('text')
.eq(index)
.then(($text) => {
const bbox = $text[0].getBBox();
const textProps = {
x: bbox.x,
y: bbox.y,
width: bbox.width,
height: bbox.height,
};
// Verify that the text label is positioned within the boundaries of the bar.
expect(textProps.x).to.be.greaterThan(barProps.x);
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
expect(textProps.y).to.be.greaterThan(barProps.y);
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
expect(textProps.y + textProps.height / 2).to.be.closeTo(
barProps.y + barProps.height / 2,
5
);
});
});
});
});
it('should render data labels correctly for a bar in the vertical xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
---
xychart
title "Sales Revenue"
x-axis Months [jan]
y-axis "Revenue (in $)" 3000 --> 12000
bar [4000]
`,
{}
);
cy.get('g.bar-plot-0').within(() => {
cy.get('rect').each(($rect, index) => {
// Extract bar properties
const barProps = {
x: parseFloat($rect.attr('x')),
y: parseFloat($rect.attr('y')),
width: parseFloat($rect.attr('width')),
height: parseFloat($rect.attr('height')),
};
// Get the text element corresponding to this bar by index.
cy.get('text')
.eq(index)
.then(($text) => {
const bbox = $text[0].getBBox();
const textProps = {
x: bbox.x,
y: bbox.y,
width: bbox.width,
height: bbox.height,
};
// Verify that the text label is positioned within the boundaries of the bar.
expect(textProps.x).to.be.greaterThan(barProps.x);
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
// Check horizontal alignment (within tolerance)
expect(textProps.x + textProps.width / 2).to.be.closeTo(
barProps.x + barProps.width / 2,
5
);
expect(textProps.y).to.be.greaterThan(barProps.y);
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
});
});
});
});
it('should render data labels correctly for a bar in the horizontal xy-chart', () => {
imgSnapshotTest(
`
---
config:
xyChart:
showDataLabel: true
chartOrientation: horizontal
---
xychart
title "Sales Revenue"
x-axis Months [jan]
y-axis "Revenue (in $)" 3000 --> 12000
bar [4000]
`,
{}
);
cy.get('g.bar-plot-0').within(() => {
cy.get('rect').each(($rect, index) => {
// Extract bar properties
const barProps = {
x: parseFloat($rect.attr('x')),
y: parseFloat($rect.attr('y')),
width: parseFloat($rect.attr('width')),
height: parseFloat($rect.attr('height')),
};
// Get the text element corresponding to this bar by index.
cy.get('text')
.eq(index)
.then(($text) => {
const bbox = $text[0].getBBox();
const textProps = {
x: bbox.x,
y: bbox.y,
width: bbox.width,
height: bbox.height,
};
// Verify that the text label is positioned within the boundaries of the bar.
expect(textProps.x).to.be.greaterThan(barProps.x);
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
expect(textProps.y).to.be.greaterThan(barProps.y);
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
expect(textProps.y + textProps.height / 2).to.be.closeTo(
barProps.y + barProps.height / 2,
5
);
});
});
});
});
});

View File

@@ -60,7 +60,7 @@
<pre id="diagram" class="mermaid2">
timeline
title My day
section section with no tasks
section Section with no tasks
section Go to work at the dog office
1930 : first step : second step is a long step
: third step
@@ -70,18 +70,18 @@
1960 : India fights poverty, looses war to China and gets nuclear weapons from USA and USSR
1970 : Green Revolution comes to india
section Another section with no tasks
I am a big big big tasks
I am not so big tasks
I am a very, very big task
I am not so big task
</pre>
<pre id="diagram" class="mermaid">
timeline
title MermaidChart 2023 Timeline
section 2023 Q1 <br> Release Personal Tier
Buttet 1 : sub-point 1a : sub-point 1b
Bullet 1 : sub-point 1a : sub-point 1b
: sub-point 1c
Bullet 2 : sub-point 2a : sub-point 2b
section 2023 Q2 <br> Release XYZ Tier
Buttet 3 : sub-point <br> 3a : sub-point 3b
Bullet 3 : sub-point <br> 3a : sub-point 3b
: sub-point 3c
Bullet 4 : sub-point 4a : sub-point 4b
@@ -93,7 +93,7 @@
section Stone Age
7600 BC : Britain's oldest known house was built in Orkney, Scotland
6000 BC : Sea levels rise and Britain becomes an island. The people who live here are hunter-gatherers.
section Broze Age
section Bronze Age
2300 BC : People arrive from Europe and settle in Britain. They bring farming and metalworking.
: New styles of pottery and ways of burying the dead appear.
2200 BC : The last major building works are completed at Stonehenge. People now bury their dead in stone circles.
@@ -106,7 +106,7 @@
title History of Social Media Platform
2002 : LinkedIn
2004 : Facebook : Google : Pixar
2005 : Youtube
2005 : YouTube
2006 : Twitter
2007 : Tumblr
2008s : Instagram
@@ -122,7 +122,7 @@
title History of Social Media Platform
2002 : LinkedIn
2004 : Facebook : Google : Pixar
2005 : Youtube
2005 : YouTube
2006 : Twitter
2007 : Tumblr
2008s : Instagram
@@ -139,7 +139,7 @@
title History of Social Media Platform
2002 : LinkedIn
2004 : Facebook : Google
2005 : Youtube
2005 : YouTube
2006 : Twitter
2007 : Tumblr
2008 : Instagram
@@ -152,7 +152,7 @@
title History of Social Media Platform
2002 : LinkedIn
2004 : Facebook : Google
2005 : Youtube
2005 : YouTube
2006 : Twitter
2007 : Tumblr
2008s : Instagram

View File

@@ -37,7 +37,7 @@
+String owner
+BigDecimal balance
+deposit(amount) bool
+withdrawl(amount) int
+withdrawal(amount) int
}
cssClass "BankAccount" customCss
@@ -56,7 +56,7 @@ classE o-- classF : aggregation
+String owner
+BigDecimal balance
+deposit(amount) bool
+withdrawl(amount) int
+withdrawal(amount) int
}
Class01~T~ <|-- AveryLongClass : Cool
Class03~T~ *-- Class04~T~

View File

@@ -77,7 +77,7 @@
document.getElementsByTagName('body')[0].appendChild(div);
}
mermaid.initialize({ startOnLoad: true, securityLevel: 'strct', logLevel: 1 });
mermaid.initialize({ startOnLoad: true, securityLevel: 'strict_', logLevel: 1 });
</script>
</body>
</html>

View File

@@ -31,7 +31,7 @@
flowchart BT subgraph S1 sub1 -->sub2 end subgraph S2 sub4 end S1 --> S2 sub1 --> sub4
</div>
<div class="mermaid2" style="width: 50%; height: 200px">
sequenceDiagram Alice->>Bob:Extremely utterly long line of longness which had preivously
sequenceDiagram Alice->>Bob:Extremely utterly long line of longness which had previously
overflown the actor box as it is much longer than what it should be Bob->>Alice: I'm short
though
</div>
@@ -61,9 +61,9 @@
#quot;elit#quot;."}}
</div>
<div class="mermaid2" style="width: 50%; height: 50%">
flowchart TB internet nat routeur lb1 lb2 compute1 compute2 subgraph project routeur nat
subgraph subnet1 compute1 lb1 end subgraph subnet2 compute2 lb2 end end internet --> routeur
routeur --> subnet1 & subnet2 subnet1 & subnet2 --> nat --> internet
flowchart TB internet nat router lb1 lb2 compute1 compute2 subgraph project router nat
subgraph subnet1 compute1 lb1 end subgraph subnet2 compute2 lb2 end end internet --> router
router --> subnet1 & subnet2 subnet1 & subnet2 --> nat --> internet
</div>
<div class="mermaid2" style="width: 50%; height: 50%">
flowchart TD subgraph one[One] subgraph sub_one[Sub One] _sub_one end end subgraph two[Two]

View File

@@ -0,0 +1,35 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Mermaid Quick Test Page</title>
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=" />
<style>
div.mermaid {
font-family: 'Courier New', Courier, monospace !important;
}
</style>
</head>
<body>
<h1>Pie chart demos</h1>
<pre class="mermaid">
pie title Default text position: Animal adoption
accTitle: simple pie char demo
accDescr: pie chart with 3 sections: dogs, cats, rats. Most are dogs.
"dogs" : -60.67
"rats" : 40.12
</pre>
<hr />
<script type="module">
import mermaid from '/mermaid.esm.mjs';
mermaid.initialize({
theme: 'forest',
logLevel: 3,
securityLevel: 'loose',
});
</script>
</body>
</html>

View File

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

View File

@@ -38,7 +38,7 @@
+String owner
+BigDecimal balance
+deposit(amount) bool
+withdrawl(amount) int
+withdrawal(amount) int
}
cssClass "BankAccount" customCss
</pre>

View File

@@ -32,8 +32,26 @@
href="https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&family=Rubik+Mono+One&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=Recursive:wght@300..1000&display=swap"
rel="stylesheet"
/>
<style>
.recursive-mermaid {
font-family: 'Recursive', sans-serif;
font-optical-sizing: auto;
font-weight: 500;
font-style: normal;
font-variation-settings:
'slnt' 0,
'CASL' 0,
'CRSV' 0.5,
'MONO' 0;
}
body {
/* background: rgb(221, 208, 208); */
/* background: #333; */
@@ -45,7 +63,9 @@
h1 {
color: grey;
}
.mermaid {
border: 1px solid red;
}
.mermaid2 {
display: none;
}
@@ -83,6 +103,11 @@
width: 100%;
}
.class2 {
fill: red;
fill-opacity: 1;
}
/* tspan {
font-size: 6px !important;
} */
@@ -106,19 +131,63 @@
<body>
<pre id="diagram4" class="mermaid">
treemap
"Section 1"
"Leaf 1.1": 12
"Section 1.2":::class1
"Leaf 1.2.1": 12
"Section 2"
"Leaf 2.1": 20:::class1
"Leaf 2.2": 25
"Leaf 2.3": 12
classDef class1 fill:red,color:blue,stroke:#FFD600;
</pre
>
<pre id="diagram4" class="mermaid2">
---
config:
treemap:
valueFormat: '$0,0'
---
treemap
"Budget"
"Operations"
"Salaries": 7000
"Equipment": 2000
"Supplies": 1000
"Marketing"
"Advertising": 4000
"Events": 1000
</pre
>
<pre id="diagram4" class="mermaid">
treemap
title Accessible Treemap Title
"Category A"
"Item A1": 10
"Item A2": 20
"Category B"
"Item B1": 15
"Item B2": 25
</pre>
<pre id="diagram4" class="mermaid2">
flowchart LR
AB["apa@apa@"] --> B(("`apa@apa`"))
</pre>
<pre id="diagram4" class="mermaid">
<pre id="diagram4" class="mermaid2">
flowchart
D(("for D"))
</pre>
<pre id="diagram4" class="mermaid">
<pre id="diagram4" class="mermaid2">
flowchart LR
A e1@==> B
e1@{ animate: true}
</pre>
<pre id="diagram4" class="mermaid">
<pre id="diagram4" class="mermaid2">
flowchart LR
A e1@--> B
classDef animate stroke-width:2,stroke-dasharray:10\,8,stroke-dashoffset:-180,animation: edge-animation-frame 6s linear infinite, stroke-linecap: round
@@ -386,7 +455,7 @@ kanban
[Create Documentation]
docs[Create Blog about the new diagram]
id7[In progress]
id6[Create renderer so that it works in all cases. We also add som extra text here for testing purposes. And some more just for the extra flare.]
id6[Create renderer so that it works in all cases. We also add some extra text here for testing purposes. And some more just for the extra flare.]
id9[Ready for deploy]
id8[Design grammar]@{ assigned: 'knsv' }
id10[Ready for test]
@@ -438,7 +507,7 @@ kanban
alert('It worked');
}
await mermaid.initialize({
// theme: 'base',
// theme: 'forest',
// theme: 'default',
// theme: 'forest',
// handDrawnSeed: 12,
@@ -449,11 +518,7 @@ kanban
// layout: 'fixed',
// htmlLabels: false,
flowchart: { titleTopMargin: 10 },
// fontFamily: 'Caveat',
// fontFamily: 'Kalam',
// fontFamily: 'courier',
fontFamily: 'arial',
fontFamily: "'Recursive', sans-serif",
sequence: {
actorFontFamily: 'courier',
noteFontFamily: 'courier',

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

@@ -105,7 +105,7 @@
let diagram = 'graph LR\n';
diagram += " B(<a href='<";
diagram += 'script></';
diagram += "script>Javascript:xssAttack`1`'>Click)";
diagram += "script>JavaScript:xssAttack`1`'>Click)";
// diagram += "script\u003aalert\u0028document.domain\u0029\` src=x>\"\);\n";
console.log(diagram);
// document.querySelector('#diagram').innerHTML = diagram;

View File

@@ -50,7 +50,7 @@
setPoints(List~int~ points)
getPoints() List~int~
}
Square : -List~string~ messages
Square : +setMessages(List~string~ messages)
Square : +getMessages() List~string~
@@ -88,7 +88,7 @@
---
classDiagram
class Duck {
}
</pre>
</div>
@@ -127,8 +127,8 @@
-attribute:type
- attribute : type
test
+ GetAttribute() type
+ GetAttribute() type
+ GetAttribute() type
}
</pre>
@@ -449,7 +449,7 @@
---
config:
theme: forest
look: handDrawns
look: handDrawn
layout: elk
---
classDiagram

View File

@@ -41,7 +41,7 @@
CAR:::someclass
PERSON:::anotherclass,someclass
classDef someclass fill:#f96
classDef anotherclass color:blue
</pre>
@@ -90,7 +90,7 @@
erDiagram
CAR ||--o{ NAMED-DRIVER : allows
CAR {
test test PK "comment"
text text PK "comment"
string make
string model
string[] parts
@@ -108,7 +108,7 @@
string carRegistrationNumber PK, FK
string driverLicence PK, FK
}
MANUFACTURER only one to zero or more CAR : makes
MANUFACTURER only one to zero or more CAR : makes
</pre>
</div>
<div class="test">
@@ -129,7 +129,7 @@
string email
}
p ||--o| a : has
</pre>
</div>
<div class="test">

View File

@@ -2,151 +2,219 @@
"durations": [
{
"spec": "cypress/integration/other/configuration.spec.js",
"duration": 4989
"duration": 5672
},
{
"spec": "cypress/integration/other/external-diagrams.spec.js",
"duration": 1382
"duration": 1990
},
{
"spec": "cypress/integration/other/ghsa.spec.js",
"duration": 3178
"duration": 3186
},
{
"spec": "cypress/integration/other/iife.spec.js",
"duration": 1372
"duration": 1948
},
{
"spec": "cypress/integration/other/interaction.spec.js",
"duration": 8998
"duration": 11938
},
{
"spec": "cypress/integration/other/rerender.spec.js",
"duration": 1249
"duration": 1932
},
{
"spec": "cypress/integration/other/xss.spec.js",
"duration": 25664
"duration": 27237
},
{
"spec": "cypress/integration/rendering/appli.spec.js",
"duration": 1928
"duration": 3170
},
{
"spec": "cypress/integration/rendering/architecture.spec.ts",
"duration": 2330
"duration": 104
},
{
"spec": "cypress/integration/rendering/block.spec.js",
"duration": 11156
"duration": 17390
},
{
"spec": "cypress/integration/rendering/c4.spec.js",
"duration": 3418
"duration": 5296
},
{
"spec": "cypress/integration/rendering/classDiagram-elk-v3.spec.js",
"duration": 39004
},
{
"spec": "cypress/integration/rendering/classDiagram-handDrawn-v3.spec.js",
"duration": 37653
},
{
"spec": "cypress/integration/rendering/classDiagram-v2.spec.js",
"duration": 14866
"duration": 23278
},
{
"spec": "cypress/integration/rendering/classDiagram-v3.spec.js",
"duration": 36645
},
{
"spec": "cypress/integration/rendering/classDiagram.spec.js",
"duration": 9894
"duration": 15418
},
{
"spec": "cypress/integration/rendering/conf-and-directives.spec.js",
"duration": 5778
"duration": 9684
},
{
"spec": "cypress/integration/rendering/current.spec.js",
"duration": 1690
"duration": 2570
},
{
"spec": "cypress/integration/rendering/erDiagram-unified.spec.js",
"duration": 84687
},
{
"spec": "cypress/integration/rendering/erDiagram.spec.js",
"duration": 9144
"duration": 14819
},
{
"spec": "cypress/integration/rendering/errorDiagram.spec.js",
"duration": 1951
"duration": 3371
},
{
"spec": "cypress/integration/rendering/flowchart-elk.spec.js",
"duration": 2196
"duration": 39925
},
{
"spec": "cypress/integration/rendering/flowchart-handDrawn.spec.js",
"duration": 21029
"duration": 34694
},
{
"spec": "cypress/integration/rendering/flowchart-icon.spec.js",
"duration": 7137
},
{
"spec": "cypress/integration/rendering/flowchart-shape-alias.spec.ts",
"duration": 16087
"duration": 24740
},
{
"spec": "cypress/integration/rendering/flowchart-v2.spec.js",
"duration": 27465
"duration": 42077
},
{
"spec": "cypress/integration/rendering/flowchart.spec.js",
"duration": 20035
"duration": 30642
},
{
"spec": "cypress/integration/rendering/gantt.spec.js",
"duration": 11366
"duration": 18085
},
{
"spec": "cypress/integration/rendering/gitGraph.spec.js",
"duration": 34025
"duration": 50107
},
{
"spec": "cypress/integration/rendering/iconShape.spec.ts",
"duration": 185902
"duration": 276279
},
{
"spec": "cypress/integration/rendering/imageShape.spec.ts",
"duration": 41631
"duration": 56505
},
{
"spec": "cypress/integration/rendering/info.spec.ts",
"duration": 1736
"duration": 3036
},
{
"spec": "cypress/integration/rendering/journey.spec.js",
"duration": 2247
"duration": 6889
},
{
"spec": "cypress/integration/rendering/kanban.spec.ts",
"duration": 7353
},
{
"spec": "cypress/integration/rendering/katex.spec.js",
"duration": 2144
"duration": 3580
},
{
"spec": "cypress/integration/rendering/marker_unique_id.spec.js",
"duration": 1646
"duration": 2508
},
{
"spec": "cypress/integration/rendering/mindmap.spec.ts",
"duration": 6406
"duration": 10939
},
{
"spec": "cypress/integration/rendering/newShapes.spec.ts",
"duration": 107219
"duration": 149102
},
{
"spec": "cypress/integration/rendering/oldShapes.spec.ts",
"duration": 113987
},
{
"spec": "cypress/integration/rendering/packet.spec.ts",
"duration": 4060
},
{
"spec": "cypress/integration/rendering/pie.spec.ts",
"duration": 5715
},
{
"spec": "cypress/integration/rendering/quadrantChart.spec.js",
"duration": 8945
},
{
"spec": "cypress/integration/rendering/radar.spec.js",
"duration": 5337
},
{
"spec": "cypress/integration/rendering/requirement.spec.js",
"duration": 2643
},
{
"spec": "cypress/integration/rendering/requirementDiagram-unified.spec.js",
"duration": 52072
},
{
"spec": "cypress/integration/rendering/sankey.spec.ts",
"duration": 6692
},
{
"spec": "cypress/integration/rendering/sequencediagram.spec.js",
"duration": 35721
},
{
"spec": "cypress/integration/rendering/stateDiagram-v2.spec.js",
"duration": 26030
},
{
"spec": "cypress/integration/rendering/stateDiagram.spec.js",
"duration": 15834
"duration": 16333
},
{
"spec": "cypress/integration/rendering/theme.spec.js",
"duration": 33240
"duration": 29287
},
{
"spec": "cypress/integration/rendering/timeline.spec.ts",
"duration": 7122
"duration": 8491
},
{
"spec": "cypress/integration/rendering/treemap.spec.ts",
"duration": 12291
},
{
"spec": "cypress/integration/rendering/xyChart.spec.js",
"duration": 11127
"duration": 20651
},
{
"spec": "cypress/integration/rendering/zenuml.spec.js",
"duration": 2391
"duration": 3218
}
]
}

View File

@@ -10,7 +10,7 @@
<body>
<h1>Block diagram demos</h1>
<pre id="diagram" class="mermaid">
block-beta
block
columns 1
db(("DB"))
blockArrowId6<["&nbsp;&nbsp;&nbsp;"]>(down)
@@ -26,7 +26,7 @@ columns 1
style B fill:#f9F,stroke:#333,stroke-width:4px
</pre>
<pre id="diagram" class="mermaid">
block-beta
block
A1["square"]
B1("rounded")
C1(("circle"))
@@ -36,7 +36,7 @@ block-beta
</pre>
<pre id="diagram" class="mermaid">
block-beta
block
A1(["stadium"])
A2[["subroutine"]]
B1[("cylinder")]
@@ -48,7 +48,7 @@ block-beta
</pre>
<pre id="diagram" class="mermaid">
block-beta
block
block:e:4
columns 2
f
@@ -57,7 +57,7 @@ block-beta
</pre>
<pre id="diagram" class="mermaid">
block-beta
block
block:e:4
columns 2
f
@@ -67,7 +67,7 @@ block-beta
</pre>
<pre id="diagram" class="mermaid">
block-beta
block
columns 3
a:3
block:e:3
@@ -80,7 +80,7 @@ block-beta
</pre>
<pre id="diagram" class="mermaid">
block-beta
block
columns 4
a b c d
block:e:4
@@ -97,19 +97,19 @@ flowchart LR
X-- "a label" -->z
</pre>
<pre id="diagram" class="mermaid">
block-beta
block
columns 5
A space B
A --x B
</pre>
<pre id="diagram" class="mermaid">
block-beta
block
columns 3
a["A wide one"] b:2 c:2 d
</pre>
<pre id="diagram" class="mermaid">
block-beta
block
columns 3
a b c
e:3
@@ -117,7 +117,7 @@ columns 3
</pre>
<pre id="diagram" class="mermaid">
block-beta
block
A1:3
A2:1

View File

@@ -110,7 +110,7 @@
title Component diagram for Internet Banking System - API Application
Container(spa, "Single Page Application", "javascript and angular", "Provides all the internet banking functionality to customers via their web browser.")
Container(ma, "Mobile App", "Xamarin", "Provides a limited subset ot the internet banking functionality to customers via their mobile mobile device.")
Container(ma, "Mobile App", "Xamarin", "Provides a limited subset ot the internet banking functionality to customers via their mobile device.")
ContainerDb(db, "Database", "Relational Database Schema", "Stores user registration information, hashed authentication credentials, access logs, etc.")
System_Ext(mbs, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")

View File

@@ -148,7 +148,7 @@
<pre class="mermaid">
classDiagram
class Person {
+Id : Guid
+ID : Guid
+FirstName : string
+LastName : string
-privateProperty : string
@@ -218,10 +218,10 @@
+double side
}
}
Shape <|-- Circle
Shape <|-- Square
namespace Vehicles {
class Vehicle {
+String brand
@@ -233,12 +233,12 @@
+boolean hasGears
}
}
Vehicle <|-- Car
Vehicle <|-- Bike
Car --> Circle : "Logo Shape"
Bike --> Square : "Logo Shape"
</pre>
<script type="module">
import mermaid from './mermaid.esm.mjs';

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/6.7.2/css/font-awesome.min.css"
/>
<link
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
rel="stylesheet"
/>
<link
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
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

@@ -17,7 +17,7 @@
<div class="diagrams">
<pre class="mermaid">
packet-beta
packet
0-15: "Source Port"
16-31: "Destination Port"
32-63: "Sequence Number"
@@ -44,7 +44,7 @@
packet:
showBits: false
---
packet-beta
packet
0-15: "Source Port"
16-31: "Destination Port"
32-63: "Sequence Number"
@@ -70,7 +70,7 @@
config:
theme: forest
---
packet-beta
packet
title Forest theme
0-15: "Source Port"
16-31: "Destination Port"
@@ -97,7 +97,7 @@
config:
theme: dark
---
packet-beta
packet
title Dark theme
0-15: "Source Port"
16-31: "Destination Port"

View File

@@ -22,7 +22,7 @@
y-axis Not Important --> important
quadrant-1 Plan
quadrant-2 Do
quadrant-3 Deligate
quadrant-3 Delegate
quadrant-4 Delete
</pre>

View File

@@ -20,12 +20,14 @@
width: 800
nodeAlignment: left
---
sankey-beta
Revenue,Expenses,10
Revenue,Profit,10
Expenses,Manufacturing,5
Expenses,Tax,3
Expenses,Research,2
sankey
a,b,8
b,c,8
c,d,8
d,e,8
x,c,4
c,y,4
</pre>
<h2>Energy flow</h2>
@@ -40,7 +42,7 @@
linkColor: gradient
nodeAlignment: justify
---
sankey-beta
sankey
Agricultural 'waste',Bio-conversion,124.729
Bio-conversion,Liquid,0.597

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({

75
demos/treemap.html Normal file
View File

@@ -0,0 +1,75 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Mermaid Treemap Diagram Demo</title>
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
<style>
body {
font-family: 'Montserrat', sans-serif;
margin: 0 auto;
max-width: 900px;
padding: 20px;
}
.mermaid {
margin: 30px 0;
}
h1,
h2 {
color: #333;
}
pre {
background-color: #f5f5f5;
padding: 15px;
border-radius: 5px;
}
</style>
</head>
<body>
<h1>Treemap Diagram Demo</h1>
<p>This is a demo of the new treemap diagram type in Mermaid.</p>
<h2>Basic Treemap Example</h2>
<pre class="mermaid">
treemap
"Root"
"Branch 1"
"Leaf 1.1": 10
"Leaf 1.2": 15
"Branch 2"
"Branch 2.1"
"Leaf 2.1.1": 20
"Leaf 2.1.2": 25
"Leaf 2.2": 25
"Leaf 2.3": 30
</pre>
<h2>Technology Stack Treemap Example</h2>
<pre class="mermaid">
treemap
"Technology Stack"
"Frontend"
"React": 35
"CSS": 15
"HTML": 10
"Backend"
"Node.js": 25
"Express": 10
"MongoDB": 15
"DevOps"
"Docker": 10
"Kubernetes": 15
"CI/CD": 5
</pre>
<script type="module">
import mermaid from './mermaid.esm.mjs';
mermaid.initialize({
theme: 'forest',
logLevel: 1,
securityLevel: 'loose',
});
</script>
</body>
</html>

View File

@@ -16,7 +16,7 @@
<body>
<h1>XY Charts demos</h1>
<pre class="mermaid">
xychart-beta
xychart
title "Sales Revenue (in $)"
x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
@@ -26,7 +26,7 @@
<hr />
<h1>XY Charts horizontal</h1>
<pre class="mermaid">
xychart-beta horizontal
xychart horizontal
title "Basic xychart"
x-axis "this is x axis" [category1, "category 2", category3, category4]
y-axis yaxisText 10 --> 150
@@ -36,7 +36,7 @@
<hr />
<h1>XY Charts only lines and bar</h1>
<pre class="mermaid">
xychart-beta
xychart
line [23, 46, 77, 34]
line [45, 32, 33, 12]
line [87, 54, 99, 85]
@@ -48,13 +48,13 @@
<hr />
<h1>XY Charts with +ve and -ve numbers</h1>
<pre class="mermaid">
xychart-beta
xychart
line [+1.3, .6, 2.4, -.34]
</pre>
<h1>XY Charts Bar with multiple category</h1>
<pre class="mermaid">
xychart-beta
xychart
title "Basic xychart with many categories"
x-axis "this is x axis" [category1, "category 2", category3, category4, category5, category6, category7]
y-axis yaxisText 10 --> 150
@@ -63,7 +63,7 @@
<h1>XY Charts line with multiple category</h1>
<pre class="mermaid">
xychart-beta
xychart
title "Line chart with many category"
x-axis "this is x axis" [category1, "category 2", category3, category4, category5, category6, category7]
y-axis yaxisText 10 --> 150
@@ -72,7 +72,7 @@
<h1>XY Charts category with large text</h1>
<pre class="mermaid">
xychart-beta
xychart
title "Basic xychart with many categories with category overlap"
x-axis "this is x axis" [category1, "Lorem ipsum dolor sit amet, qui minim labore adipisicing minim sint cillum sint consectetur cupidatat.", category3, category4, category5, category6, category7]
y-axis yaxisText 10 --> 150
@@ -89,7 +89,7 @@ config:
height: 20
plotReservedSpacePercent: 100
---
xychart-beta
xychart
line [5000, 9000, 7500, 6200, 9500, 5500, 11000, 8200, 9200, 9500, 7000, 8800]
</pre>
@@ -103,7 +103,7 @@ config:
height: 20
plotReservedSpacePercent: 100
---
xychart-beta
xychart
bar [5000, 9000, 7500, 6200, 9500, 5500, 11000, 8200, 9200, 9500, 7000, 8800]
</pre>
@@ -136,7 +136,7 @@ config:
chartOrientation: horizontal
plotReservedSpacePercent: 60
---
xychart-beta
xychart
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
@@ -162,7 +162,7 @@ config:
xAxisLineColor: "#87ceeb"
plotColorPalette: "#008000, #faba63"
---
xychart-beta
xychart
title "Sales Revenue"
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000

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

@@ -301,7 +301,7 @@ If you are adding a feature, you will definitely need to add tests. Depending on
Unit tests are tests that test a single function or module. They are the easiest to write and the fastest to run.
Unit tests are mandatory for all code except the renderers. (The renderers are tested with integration tests.)
Unit tests are mandatory for all code except the layout tests. (The layouts are tested with integration tests.)
We use [Vitest](https://vitest.dev) to run unit tests.
@@ -327,6 +327,30 @@ When using Docker prepend your command with `./run`:
./run pnpm test
```
##### Testing the DOM
One can use `jsdomIt` to test any part of Mermaid that interacts with the DOM, as long as it is not related to the layout.
The function `jsdomIt` ([developed in utils.ts](../../tests/util.ts)) overrides `it` from `vitest`, and creates a pseudo-browser environment that works almost like the real deal for the duration of the test. It uses JSDOM to create a DOM, and adds objects `window` and `document` to `global` to mock the browser environment.
> \[!NOTE]
> The layout cannot work in `jsdomIt` tests because JSDOM has no rendering engine, hence the pseudo-browser environment.
Example :
```typescript
import { ensureNodeFromSelector, jsdomIt } from './tests/util.js';
jsdomIt('should add element "thing" in the SVG', ({ svg }) => {
// Code in this block runs in a pseudo-browser environment
addThing(svg); // The svg item is the D3 selection of the SVG node
const svgNode = ensureNodeFromSelector('svg'); // Retrieve the DOM node using the DOM API
expect(svgNode.querySelector('thing')).not.toBeNull(); // Test the structure of the SVG
});
```
They can be used to test any method that interacts with the DOM, including for testing renderers. For renderers, additional integration testing is necessary to test the layout though.
#### Integration / End-to-End (E2E) Tests
These test the rendering and visual appearance of the diagrams.
@@ -497,14 +521,14 @@ This is a danger alert
### Navigation
If you want to propose changes to how the documentation is _organized_, such as adding a new section or re-arranging or renaming a section, you must update the **sidebar navigation**, which is defined in [the vitepress config](../.vitepress/config.ts). The same goes to **topbar**.
If you want to propose changes to how the documentation is _organized_, such as adding a new section or re-arranging or renaming a section, you must update the **sidebar navigation**, which is defined in [the vitepress config](../.vitepress/config.ts). The same goes for **topbar**.
### Build Docs
The content of `/docs` folder is built with Github Actions.
The content of `/docs` folder is built with GitHub Actions.
> **Warning**
> So as to allow automatic compilation of documentation pages you have to enable Github Actions on your fork first
> So as to allow automatic compilation of documentation pages you have to enable GitHub Actions on your fork first
## Submit your pull request

View File

@@ -111,3 +111,13 @@ const themes = {
```
The actual options and values for the colors are defined in **src/theme/theme-\[xyz].js**. If you provide the options your diagram needs in the existing theme files then the theming will work smoothly without hiccups.
## Examples
The `@mermaid-js/examples` package contains a collection of examples that are used by tools like mermaid.live to help users get started with the new diagram.
You can duplicate an existing diagram example file, eg: `packages/examples/src/examples/flowchart.ts`, and modify it with details specific to your diagram.
Then you can import the example in the `packages/examples/src/index.ts` file and add it to the `examples` array.
Each diagram should have at least one example, and that should be marked as default. It is good to add more examples to showcase different features of the diagram.

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

@@ -251,12 +251,12 @@ Here is the HTML generated for the SVG element: _(Note that some of the SVG attr
```
##### Gitgraph
##### GitGraph
```mermaid-example
gitGraph
accTitle: My Gitgraph Accessibility Title
accDescr: My Gitgraph Accessibility Description
accTitle: My GitGraph Accessibility Title
accDescr: My GitGraph Accessibility Description
commit
commit
@@ -273,8 +273,8 @@ Here is the HTML generated for the SVG element: _(Note that some of the SVG attr
```mermaid
gitGraph
accTitle: My Gitgraph Accessibility Title
accDescr: My Gitgraph Accessibility Description
accTitle: My GitGraph Accessibility Title
accDescr: My GitGraph Accessibility Description
commit
commit

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:290](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/defaultConfig.ts#L290)

View File

@@ -10,7 +10,7 @@
# Interface: ExternalDiagramDefinition
Defined in: [packages/mermaid/src/diagram-api/types.ts:99](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L99)
Defined in: [packages/mermaid/src/diagram-api/types.ts:94](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L94)
## Properties
@@ -18,7 +18,7 @@ Defined in: [packages/mermaid/src/diagram-api/types.ts:99](https://github.com/me
> **detector**: `DiagramDetector`
Defined in: [packages/mermaid/src/diagram-api/types.ts:101](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L101)
Defined in: [packages/mermaid/src/diagram-api/types.ts:96](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L96)
---
@@ -26,7 +26,7 @@ Defined in: [packages/mermaid/src/diagram-api/types.ts:101](https://github.com/m
> **id**: `string`
Defined in: [packages/mermaid/src/diagram-api/types.ts:100](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L100)
Defined in: [packages/mermaid/src/diagram-api/types.ts:95](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L95)
---
@@ -34,4 +34,4 @@ Defined in: [packages/mermaid/src/diagram-api/types.ts:100](https://github.com/m
> **loader**: `DiagramLoader`
Defined in: [packages/mermaid/src/diagram-api/types.ts:102](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L102)
Defined in: [packages/mermaid/src/diagram-api/types.ts:97](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L97)

View File

@@ -10,7 +10,7 @@
# Interface: Mermaid
Defined in: [packages/mermaid/src/mermaid.ts:418](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L418)
Defined in: [packages/mermaid/src/mermaid.ts:429](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L429)
## Properties
@@ -18,7 +18,7 @@ Defined in: [packages/mermaid/src/mermaid.ts:418](https://github.com/mermaid-js/
> **contentLoaded**: () => `void`
Defined in: [packages/mermaid/src/mermaid.ts:436](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L436)
Defined in: [packages/mermaid/src/mermaid.ts:447](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L447)
\##contentLoaded Callback function that is called when page is loaded. This functions fetches
configuration for mermaid rendering and calls init for rendering the mermaid diagrams on the
@@ -34,7 +34,7 @@ page.
> **detectType**: (`text`, `config`?) => `string`
Defined in: [packages/mermaid/src/mermaid.ts:438](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L438)
Defined in: [packages/mermaid/src/mermaid.ts:449](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L449)
Detects the type of the graph text.
@@ -86,11 +86,28 @@ A graph definition key
---
### getRegisteredDiagramsMetadata()
> **getRegisteredDiagramsMetadata**: () => `Pick`<[`ExternalDiagramDefinition`](ExternalDiagramDefinition.md), `"id"`>\[]
Defined in: [packages/mermaid/src/mermaid.ts:451](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L451)
Gets the metadata for all registered diagrams.
Currently only the id is returned.
#### Returns
`Pick`<[`ExternalDiagramDefinition`](ExternalDiagramDefinition.md), `"id"`>\[]
An array of objects with the id of the diagram.
---
### ~~init()~~
> **init**: (`config`?, `nodes`?, `callback`?) => `Promise`<`void`>
Defined in: [packages/mermaid/src/mermaid.ts:431](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L431)
Defined in: [packages/mermaid/src/mermaid.ts:442](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L442)
## init
@@ -138,7 +155,7 @@ Use [initialize](Mermaid.md#initialize) and [run](Mermaid.md#run) instead.
> **initialize**: (`config`) => `void`
Defined in: [packages/mermaid/src/mermaid.ts:435](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L435)
Defined in: [packages/mermaid/src/mermaid.ts:446](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L446)
Used to set configurations for mermaid.
This function should be called before the run function.
@@ -161,7 +178,7 @@ Configuration object for mermaid.
> **mermaidAPI**: `Readonly`<{ `defaultConfig`: [`MermaidConfig`](MermaidConfig.md); `getConfig`: () => [`MermaidConfig`](MermaidConfig.md); `getDiagramFromText`: (`text`, `metadata`) => `Promise`<`Diagram`>; `getSiteConfig`: () => [`MermaidConfig`](MermaidConfig.md); `globalReset`: () => `void`; `initialize`: (`userOptions`) => `void`; `parse`: (`text`, `parseOptions`) => `Promise`<`false` | [`ParseResult`](ParseResult.md)>(`text`, `parseOptions`?) => `Promise`<[`ParseResult`](ParseResult.md)>; `render`: (`id`, `text`, `svgContainingElement`?) => `Promise`<[`RenderResult`](RenderResult.md)>; `reset`: () => `void`; `setConfig`: (`conf`) => [`MermaidConfig`](MermaidConfig.md); `updateSiteConfig`: (`conf`) => [`MermaidConfig`](MermaidConfig.md); }>
Defined in: [packages/mermaid/src/mermaid.ts:425](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L425)
Defined in: [packages/mermaid/src/mermaid.ts:436](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L436)
**`Internal`**
@@ -175,7 +192,7 @@ Use [parse](Mermaid.md#parse) and [render](Mermaid.md#render) instead. Please [o
> **parse**: (`text`, `parseOptions`) => `Promise`<`false` | [`ParseResult`](ParseResult.md)>(`text`, `parseOptions`?) => `Promise`<[`ParseResult`](ParseResult.md)>
Defined in: [packages/mermaid/src/mermaid.ts:426](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L426)
Defined in: [packages/mermaid/src/mermaid.ts:437](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L437)
Parse the text and validate the syntax.
@@ -243,7 +260,7 @@ Error if the diagram is invalid and parseOptions.suppressErrors is false or not
> `optional` **parseError**: [`ParseErrorFunction`](../type-aliases/ParseErrorFunction.md)
Defined in: [packages/mermaid/src/mermaid.ts:420](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L420)
Defined in: [packages/mermaid/src/mermaid.ts:431](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L431)
---
@@ -251,7 +268,7 @@ Defined in: [packages/mermaid/src/mermaid.ts:420](https://github.com/mermaid-js/
> **registerExternalDiagrams**: (`diagrams`, `opts`) => `Promise`<`void`>
Defined in: [packages/mermaid/src/mermaid.ts:434](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L434)
Defined in: [packages/mermaid/src/mermaid.ts:445](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L445)
Used to register external diagram types.
@@ -281,7 +298,7 @@ If opts.lazyLoad is false, the diagrams will be loaded immediately.
> **registerIconPacks**: (`iconLoaders`) => `void`
Defined in: [packages/mermaid/src/mermaid.ts:439](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L439)
Defined in: [packages/mermaid/src/mermaid.ts:450](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L450)
#### Parameters
@@ -299,7 +316,7 @@ Defined in: [packages/mermaid/src/mermaid.ts:439](https://github.com/mermaid-js/
> **registerLayoutLoaders**: (`loaders`) => `void`
Defined in: [packages/mermaid/src/mermaid.ts:433](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L433)
Defined in: [packages/mermaid/src/mermaid.ts:444](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L444)
#### Parameters
@@ -317,7 +334,7 @@ Defined in: [packages/mermaid/src/mermaid.ts:433](https://github.com/mermaid-js/
> **render**: (`id`, `text`, `svgContainingElement`?) => `Promise`<[`RenderResult`](RenderResult.md)>
Defined in: [packages/mermaid/src/mermaid.ts:427](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L427)
Defined in: [packages/mermaid/src/mermaid.ts:438](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L438)
#### Parameters
@@ -349,7 +366,7 @@ Deprecated for external use.
> **run**: (`options`) => `Promise`<`void`>
Defined in: [packages/mermaid/src/mermaid.ts:432](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L432)
Defined in: [packages/mermaid/src/mermaid.ts:443](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L443)
## run
@@ -393,7 +410,7 @@ Optional runtime configs
> **setParseErrorHandler**: (`parseErrorHandler`) => `void`
Defined in: [packages/mermaid/src/mermaid.ts:437](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L437)
Defined in: [packages/mermaid/src/mermaid.ts:448](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L448)
## setParseErrorHandler Alternative to directly setting parseError using:
@@ -424,4 +441,4 @@ New parseError() callback.
> **startOnLoad**: `boolean`
Defined in: [packages/mermaid/src/mermaid.ts:419](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L419)
Defined in: [packages/mermaid/src/mermaid.ts:430](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L430)

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