Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamlining and enhancing diagram rendering across various diagram types #5604

Merged
merged 274 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
274 commits
Select commit Hold shift + click to select a range
5e53d6c
#5237 fix for node duplication
ashishjain0512 May 3, 2024
024bffd
#5237 pass useRough to edges
ashishjain0512 May 3, 2024
b2c286f
#5237 Recusive structuture refactoring for subgraphs
knsv May 3, 2024
853948a
#5237 Support for composit states WIP
knsv May 4, 2024
16cd7bf
#5237 Support for composit states WIP, rough
knsv May 6, 2024
39bffcb
#5237 Support for composit states WIP, rough
knsv May 6, 2024
323737f
#5237 Setting layout algorithm and handrawn or not via configuration
knsv May 6, 2024
d497a5c
#5237 Adjustment for different sematics between dagre and elk positio…
knsv May 6, 2024
b9a73c8
#5237 Bugfix for fork/join
knsv May 7, 2024
7529db8
Merge branch 'develop' into 5237-unified-layout-common-renderer
sidharthv96 May 7, 2024
fbe13f4
#5237 fix for duplicate nodes for join fork
ashishjain0512 May 8, 2024
683695b
#5237 add support for note shape
ashishjain0512 May 8, 2024
3ff4a69
#5237 Edge labels for ELK
knsv May 8, 2024
7372d90
#5237 added state refactor test page
ashishjain0512 May 8, 2024
32a62be
#5237 Edge labels for ELK - mergwe
knsv May 8, 2024
94bb439
Merge branch '5237-unified-layout-common-renderer' of github.com:merm…
knsv May 8, 2024
f480fb7
#5237 added state refactor test page
ashishjain0512 May 8, 2024
7ecb772
#5237 Alternating background
knsv May 10, 2024
ce6f273
#5237 Theme support
knsv May 10, 2024
4c0b8f6
#5237 Rough rendering of notes
knsv May 10, 2024
2f80c3a
#5237 pass useRough to note & group nodes
ashishjain0512 May 10, 2024
ab07799
#5237 Updating configuration otions and adding handdrawnSeed
knsv May 10, 2024
f5fefc0
#5237 Style support in rects
knsv May 10, 2024
20f9e50
#5237 Fix for arrowheads when usising non linear curves with roughjs
knsv May 14, 2024
e8018ed
#5237 pass css node style like bgColor, borderColor, borderWeight for…
ashishjain0512 May 15, 2024
42a12a6
#5237 Improved Edge Handling
knsv May 15, 2024
55afd8c
#5237 Theme support for stateStart, stateEnd, choice and fork/join
knsv May 15, 2024
64f1d2f
chore: Move layout-elk to different package
sidharthv96 May 15, 2024
745ec0d
chore: Update imports in layout-elk
sidharthv96 May 15, 2024
b1b27f7
Merge branch '5237-unified-layout-common-renderer' of https://github.…
sidharthv96 May 15, 2024
287e903
#5237 Increasing fill weight for rects in rough
knsv May 15, 2024
9fc17f6
Merge branch '5237-unified-layout-common-renderer' of https://github.…
sidharthv96 May 15, 2024
2d24180
chore: Minor fixes
sidharthv96 May 15, 2024
45cd2c0
chore: Minor fixes when reading code
sidharthv96 May 15, 2024
7fb079e
#5237 node data type remarks
ashishjain0512 May 16, 2024
ff36301
#5237 Fix for direction handling using ELK
knsv May 16, 2024
47d4929
#5237 Handling tainted subgraphs
knsv May 17, 2024
991721e
#5237 Elk tweaks and additional layout algorithms
knsv May 17, 2024
4463e9d
#5237 Removal of debug logs
knsv May 20, 2024
b6ef736
#5237 Removed style, class, labelText and props from node
knsv May 20, 2024
c8f2aba
#5237 Removed use of node.type from renderer
knsv May 20, 2024
0d2c7c3
#5237 Removed node properties, doc status in types
knsv May 20, 2024
c10ab23
Merge branch 'develop' into 5237-unified-layout-common-renderer
sidharthv96 May 21, 2024
60c79df
Add d3
sidharthv96 May 21, 2024
75b0ee3
Remove unused code
sidharthv96 May 21, 2024
ca2c112
Fix cspell
sidharthv96 May 21, 2024
aa63f32
Minor cleanups
sidharthv96 May 21, 2024
5b66810
feat: Remove direct file dependency of mermaid from elk, by using pee…
sidharthv96 May 22, 2024
a4de1b4
Merge pull request #5535 from mermaid-js/sidv/5237
sidharthv96 May 22, 2024
2377a0d
chore: Cleanup state renderer v3
sidharthv96 May 22, 2024
ddaa7af
#5237 Handling paddings in subgraphs for state diagrams
knsv May 22, 2024
3e60270
Merge branch '5237-unified-layout-common-renderer' of github.com:merm…
knsv May 22, 2024
5413668
#5237 Handling paddings in subgraphs for state diagrams
knsv May 22, 2024
52e0dc6
chore: Suppress type errors
sidharthv96 May 23, 2024
47776e3
#5237 Handling label size for elk layout
knsv May 23, 2024
8d23b68
#5237 Elk spacing tweak and fix for fonthandling in directives
knsv May 23, 2024
7da85b9
Tweaking spacings for elk and confurinable network placement strategy
knsv May 23, 2024
e41bcca
chore: Fix types.d.ts
sidharthv96 May 24, 2024
269ddf4
chore: Add reason to tsignore
sidharthv96 May 24, 2024
e094104
chore: Fix typos, remove unused docs
sidharthv96 May 24, 2024
dfe223c
chore: Fix eslint errors
sidharthv96 May 24, 2024
8a07929
chore: Fix eslint errors
sidharthv96 May 24, 2024
e506908
Merge branch '5237-unified-layout-common-renderer' into sidv/5237
sidharthv96 May 24, 2024
f14b65c
chore ignore file
sidharthv96 May 24, 2024
f01a9d5
chore: Fix formatting
sidharthv96 May 24, 2024
af05df9
Update docs
sidharthv96 May 24, 2024
8e40f31
chore: Fix import
sidharthv96 May 24, 2024
eed5ba6
Merge branch 'sidv/5237' of https://github.com/mermaid-js/mermaid int…
sidharthv96 May 24, 2024
fa6bcd8
#5237 Adding new rendering for flowcharts
knsv May 24, 2024
48e313b
Merge pull request #5539 from mermaid-js/sidv/5237
knsv May 24, 2024
a56aa56
Merge branch '5237-unified-layout-common-renderer' into 5237-unified-…
knsv May 24, 2024
c32116a
#5237 Only using markdown strings
knsv May 27, 2024
37d799d
Removing debug code
knsv May 27, 2024
4f65868
wip: Broke out flowchar shapes for common rendering
ashishjain0512 May 27, 2024
b8dd4b9
#5237 Finishing the roughup of the nodes
knsv May 27, 2024
8fb9b21
#5237 Fix four double circle background
knsv May 28, 2024
51bdda0
Merge branch '5237-unified-layout-flowchart' into 5237-unified-layout…
knsv May 28, 2024
9855bdb
Fix for edge issue with small corners
knsv May 28, 2024
4266b2e
#5237 Bugfixes
knsv May 31, 2024
2c9c3b4
#5237 Elk curve fix
knsv May 31, 2024
cca1c41
#5237 Adding look to data4Layout generation and radius fix
knsv May 31, 2024
01297fa
5237 Adjust classDef and note position data
ashishjain0512 Jun 3, 2024
d9d4a67
5237 Adjust classDef and note position data
ashishjain0512 Jun 3, 2024
a85f36c
#5237 Enabling edges using the unified renderer for flowcharts
knsv Jun 4, 2024
1b29135
#5237 Enabling subgraphs using the unified renderer for flowcharts
knsv Jun 7, 2024
7fbe166
#5237 Fix for edges in when using elk and subgraphs regarding offset …
knsv Jun 9, 2024
ea69d26
#5237 Fix for incorrect handling of self loops with elk layout
knsv Jun 10, 2024
aaa4e8a
test commit
knsv Jun 10, 2024
5f110e4
5237 Better algorithm to pich replacement node when faking position f…
knsv Jun 11, 2024
8cbceb6
5237 Bugfix for intersect calculation in dagre
knsv Jun 11, 2024
7763d9c
5237 Label background for state diagrams
knsv Jun 11, 2024
9981d3f
Support for config option elk.mergeEdges
knsv Jun 12, 2024
50394e7
5237 Lint fixes
knsv Jun 12, 2024
d895a62
#5237 Make getData to use global nodes and edges
ashishjain0512 Jun 12, 2024
913dbee
5237 Subgraph handling
knsv Jun 12, 2024
36e4fcf
5237 Subgraph handling
knsv Jun 12, 2024
1b5bd99
5237 Replaced useRough by look
pbrolin47 Jun 12, 2024
f19a9d0
5237 Removed a comma
knsv Jun 12, 2024
a351528
#5237 Handling remaining references to useRough
knsv Jun 12, 2024
9643e8f
Merge branch 'develop' into 5237-unified-layout-common-renderer
knsv Jun 13, 2024
a6dc1ea
#5237 Fix eslint error
ashishjain0512 Jun 13, 2024
a5281e0
#5237 Fix eslint error
ashishjain0512 Jun 13, 2024
fc17733
#5237 Fix eslint error
ashishjain0512 Jun 13, 2024
ec0e9b8
5237 Fixes after visual tests
knsv Jun 13, 2024
926762a
5237 Fixes after visual tests
knsv Jun 13, 2024
ef83adb
Merge branch '5237-unified-layout-common-renderer' of github.com:merm…
knsv Jun 13, 2024
94512c0
Fix lint issues
ashishjain0512 Jun 13, 2024
a5d24e5
Fix lint issues
ashishjain0512 Jun 13, 2024
e2e652a
5237 Adding rectWith title shape
knsv Jun 13, 2024
1afd0a1
Merge branch '5237-unified-layout-common-renderer' of github.com:merm…
knsv Jun 13, 2024
dd7f8ac
lint fixes
ashishjain0512 Jun 13, 2024
92c05b9
#5237 Lint fixes
knsv Jun 14, 2024
5731b72
#5237 Dagre padding adjustments
knsv Jun 14, 2024
481f818
#5237 Fixes after visual testing. Handling multi-line notes and posit…
knsv Jun 14, 2024
0d1ef9d
#5237 Lint fixes
knsv Jun 14, 2024
618f797
Add support for interaction, tooltip, for refactored flowchart
ashishjain0512 Jun 17, 2024
d52f472
#5237 Updated type for classdefs and styles
knsv Jun 17, 2024
5bd3a28
Merge branch '5237-unified-layout-common-renderer' of github.com:merm…
knsv Jun 17, 2024
6ca6403
Add support for custom cssStyle and compiledStyles for custom classDefs
ashishjain0512 Jun 17, 2024
4a8c24a
Add support for custom cssStyle and compiledStyles for custom classDefs
ashishjain0512 Jun 17, 2024
a6f3316
#5237 passing cssStyles and cssCompiled style arrays
knsv Jun 17, 2024
83f2663
#5237 making styles take preceedence and adding test
knsv Jun 18, 2024
b6b2b36
Merge branch '5237-unified-layout-common-renderer' of github.com:merm…
knsv Jun 18, 2024
406c0d8
Add support for custom cssStyle and compiledStyles for custom classDe…
ashishjain0512 Jun 18, 2024
460e027
#5237 Adding missing shape
knsv Jun 19, 2024
6ae5fe7
#5237 Fixing self-loops
knsv Jun 19, 2024
a35e62d
#5237 Fix for issue with setting up data for subgraphs
knsv Jun 20, 2024
d408efd
#5237 fix for broken multiple classDef
ashishjain0512 Jun 20, 2024
5a93afa
#5237 Add data-id attr for edge
ashishjain0512 Jun 20, 2024
fef433e
#5237 Fix for issue with edges from clusters
knsv Jun 20, 2024
1096b18
Merge branch '5237-unified-layout-common-renderer' of github.com:merm…
knsv Jun 20, 2024
e07fdfe
Add katex support
ashishjain0512 Jun 20, 2024
f791ea0
Removed data-id attr from edges
ashishjain0512 Jun 20, 2024
6d91ae4
#5237 Allow more text styles for labelStyles
ashishjain0512 Jun 20, 2024
b69c982
#5237 Fix for async rendering of clusters
knsv Jun 20, 2024
1601140
#5237 Fix for broken cssCompiledStyles not iterable issue
ashishjain0512 Jun 20, 2024
4de0182
#5237 Styling for clusters
knsv Jun 20, 2024
97be6cb
Merge branches '5237-unified-layout-common-renderer' and '5237-unifie…
knsv Jun 24, 2024
f45ae22
#5237 Added hasKatex check
ashishjain0512 Jun 24, 2024
cfacd3b
#5237 Added hasKatex check
ashishjain0512 Jun 24, 2024
9b56cb3
#5237 Fix for issue with styling using new rendering flow
knsv Jun 24, 2024
469acbe
#5237 Fix of issue with styling of nodes for flowcharts
knsv Jun 25, 2024
881a682
Merge branch '5237-unified-layout-common-renderer' of github.com:merm…
knsv Jun 25, 2024
c221350
#5237 Fix of alignment issues
knsv Jun 25, 2024
fc31b22
#5237 Fix of label styling
knsv Jun 25, 2024
9979ea1
#5237 Fix of alignment with htmlLabels
knsv Jun 25, 2024
aa9f4a7
#5237 Support for default link styles
knsv Jun 25, 2024
de51bc4
#5237 Fix for the styling on different shapes
ashishjain0512 Jun 25, 2024
c3423be
#5237 Support for invisisblwe links
knsv Jun 25, 2024
2117e71
#5237 Support for config nodespace and rankspace
knsv Jun 25, 2024
6d7b2b1
Merge branch '5237-unified-layout-common-renderer' of github.com:merm…
knsv Jun 25, 2024
ee6ae6a
#5237 fix for issue with alignment of subgraph titles
knsv Jun 26, 2024
fc78ee0
#5237 Fix for label opacity
knsv Jun 26, 2024
a46f993
Fix composite state with label
ashishjain0512 Jun 26, 2024
18e2879
feat: Allow html tags in markdown
sidharthv96 Jun 27, 2024
7f29025
Merge branch 'develop' into 5237-unified-layout-common-renderer
sidharthv96 Jun 28, 2024
5e6215d
#5237 Fix for issue with text-centering in state-diagrams with htmlLa…
knsv Jun 28, 2024
b92eae5
#5237 Fix for line-height issue
knsv Jun 28, 2024
6231682
#5237 cleanup diagram definition
knsv Jun 28, 2024
3f0abab
Merge branch '5237-unified-layout-common-renderer' of github.com:merm…
knsv Jun 28, 2024
35797f8
#5237 Styling fixes
knsv Jun 28, 2024
39c6533
chore: Cleanup layout-elk
sidharthv96 Jun 28, 2024
93b41ed
chore: Remove unused comments
sidharthv96 Jun 28, 2024
ced5cef
chore: Remove unused comments
sidharthv96 Jun 28, 2024
ce8256b
chore: Swap negative if condition
sidharthv96 Jun 28, 2024
69538aa
chore: Use for-of loops, fix imports, use let
sidharthv96 Jun 28, 2024
02ef402
chore: Cleanup flowDB
sidharthv96 Jun 28, 2024
5e8ac1a
chore: Cleanup flowDetector
sidharthv96 Jun 28, 2024
3b2c751
chore: Remove flowDiagram-v3-unified.ts
sidharthv96 Jun 28, 2024
b1b5ad3
chore: Cleanup flowRenderer-v3-unified.ts
sidharthv96 Jun 28, 2024
3c6ae36
chore: Cleanup dataFetcher
sidharthv96 Jun 28, 2024
8132f0a
chore: Cleanup state diagram
sidharthv96 Jun 28, 2024
e32e7f3
chore: Cleanup logger
sidharthv96 Jun 28, 2024
de115e2
chore: Cleanup doLayout
sidharthv96 Jun 28, 2024
7167710
chore: Cleanup
sidharthv96 Jun 28, 2024
9cc59f0
chore: Cleanup edges
sidharthv96 Jun 28, 2024
67c1eb3
chore: Cleanup intersect
sidharthv96 Jun 28, 2024
49cb104
chore: Cleanup nodes
sidharthv96 Jun 28, 2024
444de0f
5237 fix for async katex rendering when using elk
knsv Jun 29, 2024
d5a03a9
Merge branch 'sidv/eslintv9' into 5237-unified-layout-common-renderer…
sidharthv96 Jun 30, 2024
4e55f4c
chore: eslint autofix
sidharthv96 Jun 30, 2024
06377b8
chore: Fix eslint errors
sidharthv96 Jun 30, 2024
771d3fc
Remove logs
sidharthv96 Jul 1, 2024
efd5cf1
Added test for divider alignment
ashishjain0512 Jul 1, 2024
b5b2bc4
chore: Remove "sideEffects: false"
sidharthv96 Jul 1, 2024
9a638ec
#5237 Fix for rough styling of regular states and dividers in state d…
knsv Jul 2, 2024
772a7fc
5237 New default width for flowchart edges
knsv Jul 2, 2024
f3474fa
Merge branch '5237-unified-layout-common-renderer' into sidv/5237_Cle…
sidharthv96 Jul 3, 2024
caf8341
Fix fro direction in layout data
ashishjain0512 Jul 3, 2024
d0b712f
#5237 Handling of subgraphs using elk
knsv Jul 3, 2024
345e3cd
#5237 Handling of subgraphs using elk
knsv Jul 3, 2024
8aa85d7
chnages from knut
ashishjain0512 Jul 3, 2024
9930d29
Merge branch '5237-unified-layout-common-renderer' of github.com:merm…
knsv Jul 3, 2024
d12cdf4
fix for note with a composite state
ashishjain0512 Jul 3, 2024
017a86b
#5237 Fix for diamond intersections with ELK
knsv Jul 3, 2024
9167038
Merge branch '5237-unified-layout-common-renderer' of github.com:merm…
knsv Jul 3, 2024
81419d1
MC-5237 Updates from review
sidharthv96 Jul 3, 2024
8db678a
#5237 Fix for diamond intersections with ELK, tweak
knsv Jul 3, 2024
6b7d78e
#5237 Fix fir subgraphs with elk
knsv Jul 3, 2024
03a6346
Merge branch '5237-unified-layout-common-renderer' into sidv/5237_Cle…
sidharthv96 Jul 4, 2024
8ea7d5b
fix for direction
ashishjain0512 Jul 4, 2024
7f185d0
fix for direction
ashishjain0512 Jul 4, 2024
e63b5a7
Merge pull request #5606 from mermaid-js/sidv/5237_Cleanup
ashishjain0512 Jul 8, 2024
fe22a5f
fix flowchart edges
ashishjain0512 Jul 8, 2024
aa279f6
fix flowchart title class
ashishjain0512 Jul 10, 2024
9cb959b
fix flowchart subgraph label
ashishjain0512 Jul 10, 2024
7a45ed8
fix: lint issue
ashishjain0512 Jul 12, 2024
8950fb1
fix: lint & build issue
ashishjain0512 Jul 15, 2024
6ead2e1
fix: typo issue
ashishjain0512 Jul 15, 2024
061aaf6
fix: typo issue
ashishjain0512 Jul 15, 2024
2fb50a2
fix: typo issue
ashishjain0512 Jul 15, 2024
dd7b071
Update docs
ashishjain0512 Jul 15, 2024
f9a20ab
fix: broken test, link style
ashishjain0512 Jul 15, 2024
d2a73bc
fix: mocked SVG element
ashishjain0512 Jul 15, 2024
b3dfb5a
merge from develop
ashishjain0512 Jul 17, 2024
15c85ef
fix for broken images, htmlLabel false issues
ashishjain0512 Jul 17, 2024
f30d370
fix for other styling fixes
ashishjain0512 Jul 18, 2024
63850fd
#5237 Fix for issue from failing test, self loops to/from clusters
knsv Jul 18, 2024
09c5c62
Merge branch '5237-unified-layout-common-renderer' of github.com:merm…
knsv Jul 18, 2024
138ee49
fix for broken katex,state,error spec
ashishjain0512 Jul 18, 2024
5b47950
merge from develop
ashishjain0512 Jul 19, 2024
d96dcd2
#5237 Updated configuration schema for elk layout
knsv Jul 19, 2024
7175f57
[autofix.ci] apply automated fixes
autofix-ci[bot] Jul 19, 2024
2718cda
#5237 Fix for issues generated by linkting/cleanup
knsv Jul 19, 2024
86e4642
fix review comments
ashishjain0512 Jul 19, 2024
2800f55
fix lint issue
ashishjain0512 Jul 19, 2024
1c0cb8b
Adding base theme to config.schema
knsv Jul 22, 2024
c4ce854
5237 Fix for edges to diamond shapes
knsv Jul 31, 2024
aa24229
#5237 Fix for issue with styling rectWithTitle
knsv Aug 1, 2024
61cc2fc
#5237 Fix for issue with edge routing for elk layout
knsv Aug 5, 2024
c2a479a
Adding elk test
knsv Aug 9, 2024
729080f
#5237 Fixes from comments
knsv Aug 9, 2024
ba0d216
#5237 Removing old flowchart renderer
knsv Aug 9, 2024
537512f
#5237 Replace generic object with Map
knsv Aug 9, 2024
d4d7ca7
review comment fixes
ashishjain0512 Aug 9, 2024
95fb824
merge commit
ashishjain0512 Aug 9, 2024
095e8ca
sequence diagram NaN values issue
ashishjain0512 Aug 9, 2024
afb69a3
#5237 Async fix for clusters
knsv Aug 9, 2024
02eb8da
Merge branch '5237-unified-layout-common-renderer' of github.com:merm…
knsv Aug 9, 2024
9b9f4ea
adding handDrawn cypress test
ashishjain0512 Aug 9, 2024
734f1ad
Updated handDrawn cypress test
ashishjain0512 Aug 9, 2024
db725c1
#5237 Fix for subroutine positioning
knsv Aug 9, 2024
39fdaef
merge commit
ashishjain0512 Aug 9, 2024
7f9d4cd
#5237 Fix for text alignment for handdrawn text using svg labels
knsv Aug 12, 2024
3b2bb5a
Merge from develop
ashishjain0512 Aug 12, 2024
2352137
Fixed lint issue
ashishjain0512 Aug 12, 2024
d242395
[autofix.ci] apply automated fixes
autofix-ci[bot] Aug 12, 2024
61cfb15
Fixed broken test
ashishjain0512 Aug 12, 2024
d2bbe83
Removed the un-necessary test
ashishjain0512 Aug 12, 2024
9b42ffd
Ignore codeql warning
ashishjain0512 Aug 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .build/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export const packageOptions = {
packageName: 'mermaid-zenuml',
file: 'detector.ts',
},
'mermaid-flowchart-elk': {
name: 'mermaid-flowchart-elk',
packageName: 'mermaid-flowchart-elk',
file: 'detector.ts',
'mermaid-layout-elk': {
name: 'mermaid-layout-elk',
packageName: 'mermaid-layout-elk',
file: 'layouts.ts',
},
} as const;
1 change: 1 addition & 0 deletions .build/jisonTransformer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import jison from 'jison';

export const transformJison = (src: string): string => {
// @ts-ignore - Jison is not typed properly
const parser = new jison.Generator(src, {
moduleType: 'js',
'token-stack': true,
Expand Down
3 changes: 3 additions & 0 deletions .cspell/code-terms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ controly
CSSCLASS
CYLINDEREND
CYLINDERSTART
DAGA
datakey
DEND
descr
Expand Down Expand Up @@ -90,6 +91,7 @@ reqs
rewritelinks
rgba
RIGHTOF
roughjs
sankey
sequencenumber
shrc
Expand All @@ -109,6 +111,7 @@ strikethrough
stringifying
struct
STYLECLASS
STYLEDEF
STYLEOPTS
subcomponent
subcomponents
Expand Down
1 change: 1 addition & 0 deletions .cspell/libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ presetAttributify
pyplot
redmine
rehype
roughjs
rscratch
shiki
sparkline
Expand Down
2 changes: 2 additions & 0 deletions .cspell/mermaid-terms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ elems
gantt
gitgraph
gzipped
handDrawn
knsv
Knut
marginx
Expand All @@ -17,6 +18,7 @@ Markdownish
mermaidjs
mindmap
mindmaps
mrtree
multigraph
nodesep
NOTEGROUP
Expand Down
4 changes: 3 additions & 1 deletion .cspell/misc-terms.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
BRANDES
handdrawn
circo
handDrawn
KOEPF
neato
newbranch
4 changes: 2 additions & 2 deletions .esbuild/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { defaultOptions, getBuildConfig } from './util.js';
const shouldVisualize = process.argv.includes('--visualize');

const buildPackage = async (entryName: keyof typeof packageOptions) => {
const commonOptions = { ...defaultOptions, entryName } as const;
const buildConfigs = [
const commonOptions: MermaidBuildOptions = { ...defaultOptions, entryName } as const;
const buildConfigs: MermaidBuildOptions[] = [
// package.mjs
{ ...commonOptions },
// package.min.mjs
Expand Down
2 changes: 1 addition & 1 deletion .esbuild/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { jisonPlugin } from './jisonPlugin.js';

const __dirname = fileURLToPath(new URL('.', import.meta.url));

export interface MermaidBuildOptions {
export interface MermaidBuildOptions extends BuildOptions {
minify: boolean;
core: boolean;
metafile: boolean;
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cypress/snapshots/
.tsbuildinfo
tsconfig.tsbuildinfo

knsv*.html
#knsv*.html
local*.html
stats/

Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ generated/
# Ignore the files creates in /demos/dev except for example.html
demos/dev/**
!/demos/dev/example.html
# TODO: Lots of errors to fix
cypress/platform/state-refactor.html
14 changes: 0 additions & 14 deletions cypress/integration/other/flowchart-elk.spec.js

This file was deleted.

21 changes: 21 additions & 0 deletions cypress/integration/rendering/appli.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,27 @@ describe('Git Graph diagram', () => {
{}
);
});
it('Should render subgraphs with title margins and edge labels', () => {
imgSnapshotTest(
`flowchart LR

subgraph TOP
direction TB
subgraph B1
direction RL
i1 --lb1-->f1
end
subgraph B2
direction BT
i2 --lb2-->f2
end
end
A --lb3--> TOP --lb4--> B
B1 --lb5--> B2
`,
{ flowchart: { subGraphTitleMargin: { top: 10, bottom: 5 } } }
);
});
// it(`ultraFastTest`, function () {
// // Navigate to the url we want to test
// // ⭐️ Note to see visual bugs, run the test using the above URL for the 1st run.
Expand Down
31 changes: 16 additions & 15 deletions cypress/integration/rendering/block.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ describe('Block diagram', () => {
);
});

it('BL16: width alignment - blocks shold be equal in width', () => {
it('BL17: width alignment - blocks shold be equal in width', () => {
imgSnapshotTest(
`block-beta
A("This is the text")
Expand All @@ -247,7 +247,7 @@ describe('Block diagram', () => {
);
});

it('BL17: block types 1 - square, rounded and circle', () => {
it('BL18: block types 1 - square, rounded and circle', () => {
imgSnapshotTest(
`block-beta
A["square"]
Expand All @@ -258,7 +258,7 @@ describe('Block diagram', () => {
);
});

it('BL18: block types 2 - odd, diamond and hexagon', () => {
it('BL19: block types 2 - odd, diamond and hexagon', () => {
imgSnapshotTest(
`block-beta
A>"rect_left_inv_arrow"]
Expand All @@ -269,7 +269,7 @@ describe('Block diagram', () => {
);
});

it('BL19: block types 3 - stadium', () => {
it('BL20: block types 3 - stadium', () => {
imgSnapshotTest(
`block-beta
A(["stadium"])
Expand All @@ -278,7 +278,7 @@ describe('Block diagram', () => {
);
});

it('BL20: block types 4 - lean right, lean left, trapezoid and inv trapezoid', () => {
it('BL21: block types 4 - lean right, lean left, trapezoid and inv trapezoid', () => {
imgSnapshotTest(
`block-beta
A[/"lean right"/]
Expand All @@ -290,7 +290,7 @@ describe('Block diagram', () => {
);
});

it('BL21: block types 1 - square, rounded and circle', () => {
it('BL22: block types 1 - square, rounded and circle', () => {
imgSnapshotTest(
`block-beta
A["square"]
Expand All @@ -301,7 +301,7 @@ describe('Block diagram', () => {
);
});

it('BL22: sizing - it should be possible to make a block wider', () => {
it('BL23: sizing - it should be possible to make a block wider', () => {
imgSnapshotTest(
`block-beta
A("rounded"):2
Expand All @@ -312,7 +312,7 @@ describe('Block diagram', () => {
);
});

it('BL23: sizing - it should be possible to make a composite block wider', () => {
it('BL24: sizing - it should be possible to make a composite block wider', () => {
imgSnapshotTest(
`block-beta
block:2
Expand All @@ -324,7 +324,7 @@ describe('Block diagram', () => {
);
});

it('BL24: block in the middle with space on each side', () => {
it('BL25: block in the middle with space on each side', () => {
imgSnapshotTest(
`block-beta
columns 3
Expand All @@ -335,7 +335,7 @@ describe('Block diagram', () => {
{}
);
});
it('BL25: space and an edge', () => {
it('BL26: space and an edge', () => {
imgSnapshotTest(
`block-beta
columns 5
Expand All @@ -345,7 +345,7 @@ describe('Block diagram', () => {
{}
);
});
it('BL26: block sizes for regular blocks', () => {
it('BL27: block sizes for regular blocks', () => {
imgSnapshotTest(
`block-beta
columns 3
Expand All @@ -354,7 +354,7 @@ describe('Block diagram', () => {
{}
);
});
it('BL27: composite block with a set width - f should use the available space', () => {
it('BL28: composite block with a set width - f should use the available space', () => {
imgSnapshotTest(
`block-beta
columns 3
Expand All @@ -363,11 +363,12 @@ describe('Block diagram', () => {
f
end
g
`,
`,
{}
);
});
it('BL23: composite block with a set width - f and g should split the available space', () => {

it('BL29: composite block with a set width - f and g should split the available space', () => {
imgSnapshotTest(
`block-beta
columns 3
Expand All @@ -379,7 +380,7 @@ describe('Block diagram', () => {
h
i
j
`,
`,
{}
);
});
Expand Down
10 changes: 5 additions & 5 deletions cypress/integration/rendering/c4.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts';

describe('C4 diagram', () => {
it('should render a simple C4Context diagram', () => {
it('C4.1 should render a simple C4Context diagram', () => {
imgSnapshotTest(
`
C4Context
Expand Down Expand Up @@ -31,7 +31,7 @@ describe('C4 diagram', () => {
{}
);
});
it('should render a simple C4Container diagram', () => {
it('C4.2 should render a simple C4Container diagram', () => {
imgSnapshotTest(
`
C4Container
Expand All @@ -50,7 +50,7 @@ describe('C4 diagram', () => {
{}
);
});
it('should render a simple C4Component diagram', () => {
it('C4.3 should render a simple C4Component diagram', () => {
imgSnapshotTest(
`
C4Component
Expand All @@ -68,7 +68,7 @@ describe('C4 diagram', () => {
{}
);
});
it('should render a simple C4Dynamic diagram', () => {
it('C4.4 should render a simple C4Dynamic diagram', () => {
imgSnapshotTest(
`
C4Dynamic
Expand All @@ -91,7 +91,7 @@ describe('C4 diagram', () => {
{}
);
});
it('should render a simple C4Deployment diagram', () => {
it('C4.5 should render a simple C4Deployment diagram', () => {
imgSnapshotTest(
`
C4Deployment
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/rendering/classDiagram-v2.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('Class diagram V2', () => {
);
});

it('should render a simple class diagram with different visibilities', () => {
it('2.1 should render a simple class diagram with different visibilities', () => {
imgSnapshotTest(
`
classDiagram-v2
Expand All @@ -93,7 +93,7 @@ describe('Class diagram V2', () => {
);
});

it('should render multiple class diagrams', () => {
it('3: should render multiple class diagrams', () => {
imgSnapshotTest(
[
`
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/rendering/errorDiagram.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { imgSnapshotTest } from '../../helpers/util';
describe('Error Diagrams', () => {
beforeEach(() => {
cy.on('uncaught:exception', (err) => {
expect(err.message).to.include('Parse error');
expect(err.message).to.include('error');
// return false to prevent the error from
// failing this test
return false;
Expand Down
Loading
Loading