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

Release/10.9.0 #5337

Merged
merged 183 commits into from
Mar 5, 2024
Merged
Changes from 3 commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
1e53c12
chore: added katex as a dependency
NicolasNewman Feb 26, 2022
b746747
chore: added css-loader, sass, sass-loader, style-loader
NicolasNewman Feb 28, 2022
c2e8cb7
chore: added katex rendering to flowcharts v1 & 2
NicolasNewman Feb 28, 2022
275f200
chore: added katex demo
NicolasNewman Feb 28, 2022
4736e59
fix(katex): enforce html output for consistency
NicolasNewman Mar 29, 2022
1db4230
feat(katex): fixed node sizing issues, caused by KaTeX fonts not bein…
NicolasNewman Mar 29, 2022
825f502
feat(katex): improved handling of KaTeX errors
NicolasNewman Mar 31, 2022
cc2c828
feat(katex): added cypress testing
NicolasNewman Apr 2, 2022
f67254c
Merge branch 'develop' of https://github.com/mermaid-js/mermaid into …
NicolasNewman Apr 2, 2022
f346056
chore(katex): removed unused debugging code
NicolasNewman Apr 2, 2022
b243609
chore(katex): merged with branch develop
NicolasNewman Feb 13, 2023
58bc6c7
Merge branch 'mermaid-js:develop' into feature/2776_katex_math
NicolasNewman Feb 13, 2023
483722f
fix(katex): fixed rendering of KaTeX errors
NicolasNewman Feb 13, 2023
21479b2
fix(katex): fixed rendering of KaTeX errors
NicolasNewman Feb 13, 2023
4da9c71
fix(katex): fixed rendering of KaTeX errors
NicolasNewman Feb 13, 2023
2740edf
chore(katex): added katex to cSpell.json
NicolasNewman Feb 13, 2023
fb5d80a
fix(katex): removed extra body tag from merge
NicolasNewman Feb 13, 2023
bbc6eb6
chore(katex): lint:fix
NicolasNewman Feb 13, 2023
ebef1c4
chore: merged with develop
NicolasNewman Feb 23, 2023
fdd9000
chore(katex): lint:fix
NicolasNewman Feb 23, 2023
7dd21d8
fix(katex): disabled 4th katex cypress test due to recent changes to …
NicolasNewman Feb 23, 2023
12e1af4
Merge branch 'mermaid-js:develop' into feature/2776_katex_math
NicolasNewman Mar 4, 2023
f3b939e
Merge branch 'develop' of https://github.com/NicolasNewman/mermaid in…
NicolasNewman Apr 13, 2023
f4cb6a1
chore(katex): fixed issues from merge
NicolasNewman Apr 14, 2023
e0e038d
Merge branch 'develop' of https://github.com/NicolasNewman/mermaid to…
NicolasNewman Apr 14, 2023
f8a4488
feat(katex): added common functions for aiding in KaTeX rendering
NicolasNewman May 6, 2023
4202488
feat(katex): added KaTeX support to sequence diagrams
NicolasNewman May 6, 2023
e7a1d83
Merge branch 'develop' of https://github.com/NicolasNewman/mermaid in…
NicolasNewman May 6, 2023
cf54ddc
chore(katex): lint:fix
NicolasNewman May 6, 2023
077cc65
chore(katex): included uncommited files
NicolasNewman May 31, 2023
0605b85
Merge branch 'develop' of https://github.com/NicolasNewman/mermaid in…
NicolasNewman May 31, 2023
619ae2f
Merge branch 'develop' of https://github.com/NicolasNewman/mermaid in…
NicolasNewman May 31, 2023
a3930eb
fix(katex): resolved broken lockfile
NicolasNewman May 31, 2023
b193013
fix(katex): resolved removed class from demo during merging
NicolasNewman May 31, 2023
9ee4576
Update docs
NicolasNewman May 31, 2023
5c69e5f
feat(katex): optimized importing of katex
NicolasNewman Jun 23, 2023
bee2b69
Merge branch 'feature/2776_katex_math' of https://github.com/NicolasN…
NicolasNewman Jun 23, 2023
8b42302
Merge branch 'develop' of https://github.com/NicolasNewman/mermaid in…
NicolasNewman Jun 23, 2023
fe8474f
fix(katex): updated specs
NicolasNewman Jun 23, 2023
f979ced
refactor(katex): revision changes
NicolasNewman Jun 24, 2023
40e75fe
docs(katex): added documentation
NicolasNewman Jun 24, 2023
a23f0da
docs(katex): specified minimum version
NicolasNewman Jul 7, 2023
f15e8c9
Merge branch 'develop' of https://github.com/NicolasNewman/mermaid in…
NicolasNewman Jul 8, 2023
3d5616c
docs(katex): version set to MERMAID_RELEASE_VERSION
NicolasNewman Jul 8, 2023
2cce8ee
Merge branch 'develop' of https://github.com/NicolasNewman/mermaid in…
NicolasNewman Jul 8, 2023
67cbdb4
fix(katex): resolved legacyMathML config issues from previous merge
NicolasNewman Jul 8, 2023
22a7234
chore(katex): generated types
NicolasNewman Jul 8, 2023
6518e13
Update sequence.html
NicolasNewman Jul 8, 2023
c2f6056
chore(katex): lint-fix
NicolasNewman Jul 8, 2023
6fa8a51
Merge branch 'develop' of https://github.com/NicolasNewman/mermaid in…
NicolasNewman Oct 11, 2023
2dce7f0
Merge branch 'develop' of https://github.com/NicolasNewman/mermaid in…
NicolasNewman Oct 11, 2023
e690656
refactor(katex): resolved linting errors
NicolasNewman Oct 11, 2023
8d90815
Merge branch 'develop' into pr/NicolasNewman/2885
sidharthv96 Dec 6, 2023
0d98e6c
refactor: Revert type change for renderer
sidharthv96 Dec 6, 2023
70b948f
refactor: Optimize renderKatex
sidharthv96 Dec 6, 2023
1d86cf0
refactor: Cleanup error renderer
sidharthv96 Dec 6, 2023
886eda9
chore: await drawActors
sidharthv96 Dec 6, 2023
85774b7
chore: Fix configAPI
sidharthv96 Dec 6, 2023
a9818b4
chore: Remove special case error handling
sidharthv96 Dec 6, 2023
22f83f1
fix: Sequence actor rendering
sidharthv96 Dec 7, 2023
d91934b
comment out skipped test
sidharthv96 Dec 10, 2023
413de28
Merge branch 'develop' into pr/NicolasNewman/2885
sidharthv96 Jan 19, 2024
cafe932
implement until keyword in gantt charts
fzag Jan 22, 2024
b44ec7d
fix bad expected values in gantt units tests
fzag Jan 22, 2024
099f580
address review comment on implementation; apply similar changes on ex…
fzag Jan 24, 2024
d1178c4
Merge branch 'develop' into pr/NicolasNewman/2885
sidharthv96 Jan 27, 2024
52d276b
chore: Update katex
sidharthv96 Jan 27, 2024
3b0c5c3
fix: Message width
sidharthv96 Jan 27, 2024
fd3f1ca
add parsing unit test for after/until keywords
fzag Jan 27, 2024
9fadf62
adapt e2e tests to include new 'until' keyword in gantt chart
fzag Jan 27, 2024
280525b
merge develop; resolve minor conflicts in docs/syntax/gantt.md
fzag Jan 27, 2024
cc4dfea
fix minor mistake in parsing test
fzag Jan 27, 2024
c1b5d52
modify invalid e2e test for gantt chart
fzag Jan 27, 2024
069a132
revert changes on existing e2e tests; add new e2e test for nez until …
fzag Jan 27, 2024
8d2605d
minor stylistic changes
fzag Jan 27, 2024
bc332e3
Fix boundMessage type
sidharthv96 Jan 27, 2024
ea8d7ec
Merge branch 'develop' into feature/3173_implement_until_keyword_in_g…
sidharthv96 Jan 30, 2024
0b087b7
Merge branch 'develop' into feature/2776_katex_math
sidharthv96 Jan 30, 2024
a3364e7
build(deps-dev): bump vite from 4.4.12 to 4.5.2
dependabot[bot] Jan 31, 2024
ebc59d8
Merge branch 'develop' into feature/2776_katex_math
sidharthv96 Jan 31, 2024
3b5cb02
Merge pull request #5218 from mermaid-js/dependabot/npm_and_yarn/vite…
sidharthv96 Feb 3, 2024
b043d79
Bump @zenuml/core and update render options in mermaid-zenuml (#5257)
dontry Feb 4, 2024
337f07b
Fix macOS onboarding issues
thedustin Feb 4, 2024
5f0b514
chore(deps): update all minor dependencies
renovate[bot] Feb 5, 2024
dee99d2
Merge pull request #5264 from mermaid-js/renovate/all-minor
sidharthv96 Feb 5, 2024
9261715
fix typo cutomers => customers
elgalu Feb 5, 2024
be036ad
Merge pull request #5269 from elgalu/fix-cutomers-typo
sidharthv96 Feb 6, 2024
19f1509
chore(deps): update all patch dependencies
renovate[bot] Feb 6, 2024
c7f5e01
Merge pull request #5262 from thedustin/macos-docker-onboarding-issues
nirname Feb 6, 2024
9c6ad54
Merge pull request #5263 from mermaid-js/renovate/patch-all-patch
sidharthv96 Feb 6, 2024
ddd971e
chore(deps): update all minor dependencies
renovate[bot] Feb 12, 2024
a90a8ce
Merge pull request #5281 from mermaid-js/renovate/all-minor
sidharthv96 Feb 12, 2024
9ee2d70
chore(deps): update all patch dependencies
renovate[bot] Feb 12, 2024
267e142
Merge pull request #5280 from mermaid-js/renovate/patch-all-patch
sidharthv96 Feb 12, 2024
18589dd
Ignore BundlePhobia
sidharthv96 Feb 12, 2024
447c5a4
Merge branch 'develop' of github.com:mermaid-js/mermaid into develop
sidharthv96 Feb 12, 2024
4a4e96c
Merge branch 'develop' into feature/2776_katex_math
sidharthv96 Feb 13, 2024
fe1cff3
Merge pull request #2885 from NicolasNewman/feature/2776_katex_math
knsv Feb 13, 2024
e216432
feat: add name field to the actors
ad1992 Feb 14, 2024
1a8361d
Merge branch 'develop' into aakansha/actor-name
ad1992 Feb 14, 2024
bee88ac
make name optional
ad1992 Feb 14, 2024
23dd7b2
add name only when present in rectData
ad1992 Feb 14, 2024
4a7489a
chore: Update cspell and fix issues
Jason3S Feb 14, 2024
f3282e4
chore: sort cspell dictionaries on commit
Jason3S Feb 14, 2024
c306054
Update comment to link to replacement function.
Jason3S Feb 15, 2024
36f056f
Update packages/mermaid/src/diagrams/sankey/parser/sankey.jison
Jason3S Feb 15, 2024
e54d090
Use both British and American English spellings.
Jason3S Feb 15, 2024
551ccfc
Add new extension to integrations
BoDonkey Feb 15, 2024
6be91bc
Merge pull request #5286 from Jason3S/cspell
sidharthv96 Feb 16, 2024
eaffe33
Fix CMS order
BoDonkey Feb 16, 2024
4336b91
Fix color and arrow for merge commit
macherel Dec 19, 2023
5359981
Updated chrome extension url's to new store
Abrifq Feb 17, 2024
762113d
Fix link to Contributors section in README
BaumiCoder Feb 17, 2024
70c8a3d
Merge pull request #5287 from BoDonkey/docs/add-apostrophecms-integra…
sidharthv96 Feb 19, 2024
77f76f5
Replace version number placeholder
BaumiCoder Feb 20, 2024
81491f2
Merge branch 'develop' into docs/replaceVersionPlaceholder
BaumiCoder Feb 20, 2024
6d58c75
Changes to timeline.md
FutzMonitor Feb 25, 2024
15b3647
Changes to timeline.md
FutzMonitor Feb 25, 2024
d9448e4
Link to contributing page on webhelp
BaumiCoder Feb 25, 2024
7770621
Replace links to docs with links to webhelp
BaumiCoder Feb 25, 2024
e79a08e
Replace mermaid-js.github.io links
BaumiCoder Feb 25, 2024
6f3a260
Update recommended Vitest extension
NicolasCwy Feb 26, 2024
a57ac09
Correcting path to docker-entrypoint.sh
bstordrup Feb 26, 2024
ccfec58
Merge pull request #5322 from NicolasCwy/chore/5321-change-recommende…
sidharthv96 Feb 26, 2024
628cf79
Merge pull request #5327 from bstordrup/Issue5325_UnableToStartMermai…
sidharthv96 Feb 26, 2024
e371d72
Add lcov to cspell
sidharthv96 Feb 26, 2024
4e12157
Merge pull request #5316 from BaumiCoder/LinkToWebhelp
sidharthv96 Feb 26, 2024
39d870d
Merge branch 'develop' into updateTimelineMD
sidharthv96 Feb 26, 2024
a4ba282
Merge pull request #5304 from BaumiCoder/docs/replaceVersionPlaceholder
sidharthv96 Feb 26, 2024
d4ff5f5
Merge pull request #5315 from FutzMonitor/updateTimelineMD
sidharthv96 Feb 26, 2024
ed61282
Merge pull request #5298 from BaumiCoder/fixTableOfContent
sidharthv96 Feb 26, 2024
61c92f9
Bump node version
sidharthv96 Feb 26, 2024
00bd208
Added link to Blazorade Mermaid to the community integrations page.
MikaBerglund Feb 26, 2024
4707fb2
Use Yarn
sidharthv96 Feb 26, 2024
69266bb
Merge pull request #5332 from mermaid-js/sidv/installFix
sidharthv96 Feb 27, 2024
9f8c87a
Merge branch 'master' into develop
sidharthv96 Feb 27, 2024
197d808
Merge branch 'develop' into patch-5
sidharthv96 Feb 27, 2024
a5a2ea1
Fix lint
sidharthv96 Feb 27, 2024
3093afe
Merge pull request #5284 from ad1992/aakansha/actor-name
sidharthv96 Feb 27, 2024
af3d728
Merge branch 'develop' into feature/3173_implement_until_keyword_in_g…
sidharthv96 Feb 27, 2024
cbb715a
Amend docs to document gitgraph parallel commits
NicolasCwy Feb 27, 2024
d163ca7
Merge pull request #5297 from Abrifq/patch-5
sidharthv96 Feb 27, 2024
c842401
Update all minor dependencies
renovate[bot] Feb 27, 2024
b96eaed
Fix store link
sidharthv96 Feb 27, 2024
3168680
Bump version
sidharthv96 Feb 27, 2024
370cd98
docs: Fix config
sidharthv96 Feb 27, 2024
af93b72
Merge pull request #5336 from NicolasCwy/chore/5324-add-docs-gitgraph…
sidharthv96 Feb 27, 2024
31a287b
Merge pull request #5301 from mermaid-js/renovate/all-minor
sidharthv96 Feb 27, 2024
0215e01
Merge branch 'develop' into feature/3173_implement_until_keyword_in_g…
sidharthv96 Feb 27, 2024
a9e67e4
Fix spelling
sidharthv96 Feb 27, 2024
adf0ae5
Merge branch 'develop' into pr/MikaBerglund/5333
sidharthv96 Feb 27, 2024
2c59ceb
Fix docs
sidharthv96 Feb 27, 2024
10bb920
Merge pull request #5333 from Blazorade/docs/blazorade
sidharthv96 Feb 27, 2024
9377d05
Merge branch 'pr/MikaBerglund/5333' into develop
sidharthv96 Feb 27, 2024
e59f290
Fix community integrations
sidharthv96 Feb 27, 2024
077b1a5
Merge branch 'develop' into release/10.9.0
sidharthv96 Feb 27, 2024
df026c7
Bump @mermaid-js/mermaid-zenuml version to 0.2.0
sidharthv96 Feb 28, 2024
5fe9f9e
Merge branch 'develop' into feature/3173_implement_until_keyword_in_g…
sidharthv96 Feb 29, 2024
619f097
Merge branch 'develop' into git-graph-merge-commit
sidharthv96 Feb 29, 2024
970a98a
Merge pull request #5224 from fzag/feature/3173_implement_until_keywo…
sidharthv96 Feb 29, 2024
1857eb1
Merge pull request #5152 from macherel/git-graph-merge-commit
sidharthv96 Feb 29, 2024
24528c1
Merge branch 'develop' into release/10.9.0
sidharthv96 Feb 29, 2024
f9c359e
v10.9.0-rc.2
sidharthv96 Feb 29, 2024
2caeb9d
zenUML 0.2.0-rc.2
sidharthv96 Feb 29, 2024
38fcc28
Add release version in docs
sidharthv96 Feb 29, 2024
1b0b122
Resolves E2E testing issues and issue #5343
rowanfr Feb 29, 2024
2ac4e08
Merge pull request #5344 from rowanfr/5343_E2E_Testing_Commit_ID
sidharthv96 Feb 29, 2024
f4dffc8
Fix chrome webstore url causing 404
Abrifq Mar 2, 2024
2537bf5
Ran lint:fix
Abrifq Mar 2, 2024
6c1228f
chore(deps): update all minor dependencies
renovate[bot] Mar 4, 2024
82fd371
Merge pull request #5352 from Abrifq/patch-5
sidharthv96 Mar 5, 2024
b324574
Merge pull request #5355 from mermaid-js/renovate/all-minor
sidharthv96 Mar 5, 2024
d8b8784
build(docs): vendor CSS dependencies
maxstanley Mar 2, 2024
fe905ce
Merge branch 'develop' into pull/5350
aloisklink Mar 5, 2024
972ecba
Merge pull request #5350 from maxstanley/vendor
aloisklink Mar 5, 2024
2c6d1cb
chore(deps): update all patch dependencies
renovate[bot] Mar 5, 2024
8daa28d
Lychee ignore chrome webstore
sidharthv96 Mar 5, 2024
3147bb3
Update docs
renovate[bot] Mar 5, 2024
803e068
Merge branch 'master' into develop
sidharthv96 Mar 5, 2024
5b3f320
Merge branch 'develop' into renovate/patch-all-patch
sidharthv96 Mar 5, 2024
5aa884f
Merge pull request #5354 from mermaid-js/renovate/patch-all-patch
sidharthv96 Mar 5, 2024
b077fed
Merge branch 'develop' into release/10.9.0
sidharthv96 Mar 5, 2024
cbe44a6
v10.9.0
sidharthv96 Mar 5, 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
70 changes: 70 additions & 0 deletions cypress/integration/rendering/gitGraph.spec.js
Original file line number Diff line number Diff line change
@@ -943,4 +943,74 @@ gitGraph TB:
{ gitGraph: { parallelCommits: true } }
);
});
it('46: should render GitGraph with merge back and merge forward', () => {
imgSnapshotTest(
`gitGraph LR:
commit

branch branch-A
branch branch-B
commit

checkout branch-A
merge branch-B

checkout branch-B
merge branch-A
`,
{ gitGraph: { parallelCommits: true } }
);
});
it('47: should render GitGraph with merge back and merge forward | Vertical Branch', () => {
imgSnapshotTest(
`gitGraph TB:
commit

branch branch-A
branch branch-B
commit

checkout branch-A
merge branch-B

checkout branch-B
merge branch-A
`,
{ gitGraph: { parallelCommits: true } }
);
});
it('48: should render GitGraph with merge on a new branch | Vertical Branch', () => {
imgSnapshotTest(
`gitGraph LR:
commit

branch branch-B order: 2
commit

branch branch-A
merge main

checkout branch-B
merge branch-A
`,
{ gitGraph: { parallelCommits: true } }
);
});
it('49: should render GitGraph with merge on a new branch | Vertical Branch', () => {
imgSnapshotTest(
`gitGraph TB:
commit

branch branch-B order: 2
commit

branch branch-A
merge main

checkout branch-B
merge branch-A
`,
{ gitGraph: { parallelCommits: true } }
);
});
});
89 changes: 47 additions & 42 deletions packages/mermaid/src/diagrams/git/gitGraphRenderer.js
Original file line number Diff line number Diff line change
@@ -456,6 +456,10 @@ const drawArrow = (svg, commitA, commitB, allCommits) => {
let radius = 0;
let offset = 0;
let colorClassNum = branchPos[commitB.branch].index;
if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
colorClassNum = branchPos[commitA.branch].index;
}

let lineDef;
if (arrowNeedsRerouting) {
arc = 'A 10 10, 0, 0, 0,';
@@ -470,7 +474,6 @@ const drawArrow = (svg, commitA, commitB, allCommits) => {
if (p1.x < p2.x) {
// Source commit is on branch position left of destination commit
// so render arrow rightward with colour of destination branch
colorClassNum = branchPos[commitB.branch].index;
lineDef = `M ${p1.x} ${p1.y} L ${lineX - radius} ${p1.y} ${arc2} ${lineX} ${
p1.y + offset
} L ${lineX} ${p2.y - radius} ${arc} ${lineX + offset} ${p2.y} L ${p2.x} ${p2.y}`;
@@ -486,7 +489,6 @@ const drawArrow = (svg, commitA, commitB, allCommits) => {
if (p1.y < p2.y) {
// Source commit is on branch positioned above destination commit
// so render arrow downward with colour of destination branch
colorClassNum = branchPos[commitB.branch].index;
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY - radius} ${arc} ${
p1.x + offset
} ${lineY} L ${p2.x - radius} ${lineY} ${arc2} ${p2.x} ${lineY + offset} L ${p2.x} ${p2.y}`;
@@ -500,66 +502,69 @@ const drawArrow = (svg, commitA, commitB, allCommits) => {
}
}
} else {
arc = 'A 20 20, 0, 0, 0,';
arc2 = 'A 20 20, 0, 0, 1,';
radius = 20;
offset = 20;

if (dir === 'TB') {
if (p1.x < p2.x) {
arc = 'A 20 20, 0, 0, 0,';
arc2 = 'A 20 20, 0, 0, 1,';
radius = 20;
offset = 20;

// Figure out the color of the arrow,arrows going down take the color from the destination branch
colorClassNum = branchPos[commitB.branch].index;

lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${
p1.y + offset
} L ${p2.x} ${p2.y}`;
if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${
p2.y
} L ${p2.x} ${p2.y}`;
} else {
lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${
p1.y + offset
} L ${p2.x} ${p2.y}`;
}
}
if (p1.x > p2.x) {
arc = 'A 20 20, 0, 0, 0,';
arc2 = 'A 20 20, 0, 0, 1,';
radius = 20;
offset = 20;

// Arrows going up take the color from the source branch
colorClassNum = branchPos[commitA.branch].index;
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc2} ${p1.x - offset} ${
p2.y
} L ${p2.x} ${p2.y}`;
if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc2} ${p1.x - offset} ${
p2.y
} L ${p2.x} ${p2.y}`;
} else {
lineDef = `M ${p1.x} ${p1.y} L ${p2.x + radius} ${p1.y} ${arc} ${p2.x} ${
p1.y + offset
} L ${p2.x} ${p2.y}`;
}
}

if (p1.x === p2.x) {
colorClassNum = branchPos[commitA.branch].index;
lineDef = `M ${p1.x} ${p1.y} L ${p1.x + radius} ${p1.y} ${arc} ${p1.x + offset} ${
p2.y + radius
} L ${p2.x} ${p2.y}`;
lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;
}
} else {
if (p1.y < p2.y) {
arc = 'A 20 20, 0, 0, 0,';
radius = 20;
offset = 20;
// Arrows going up take the color from the target branch
colorClassNum = branchPos[commitB.branch].index;
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${
p2.x
} ${p2.y}`;
if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${
p1.y + offset
} L ${p2.x} ${p2.y}`;
} else {
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${
p2.y
} L ${p2.x} ${p2.y}`;
}
}
if (p1.y > p2.y) {
arc = 'A 20 20, 0, 0, 0,';
radius = 20;
offset = 20;
// Arrows going up take the color from the source branch
colorClassNum = branchPos[commitA.branch].index;
lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${p1.y - offset} L ${
p2.x
} ${p2.y}`;
if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${
p1.y - offset
} L ${p2.x} ${p2.y}`;
} else {
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc2} ${p1.x + offset} ${
p2.y
} L ${p2.x} ${p2.y}`;
}
}

if (p1.y === p2.y) {
colorClassNum = branchPos[commitA.branch].index;
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${
p2.x
} ${p2.y}`;
lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;
}
}
}

Unchanged files with check annotations Beta

declare global {
interface Window {
mermaid: any; // 👈️ turn off type checking

Check warning on line 5 in packages/mermaid-example-diagram/src/types/index.d.ts

GitHub Actions / lint

Unexpected any. Specify a different type
}
}
export let sanitizeText: (str: string) => string;
// eslint-disable @typescript-eslint/no-explicit-any
export let setupGraphViewbox: (
graph: any,

Check warning on line 34 in packages/mermaid-zenuml/src/mermaidUtils.ts

GitHub Actions / lint

Unexpected any. Specify a different type
svgElem: any,

Check warning on line 35 in packages/mermaid-zenuml/src/mermaidUtils.ts

GitHub Actions / lint

Unexpected any. Specify a different type
padding: any,

Check warning on line 36 in packages/mermaid-zenuml/src/mermaidUtils.ts

GitHub Actions / lint

Unexpected any. Specify a different type
useMaxWidth: boolean
) => void;
export const injectUtils = (
_log: Record<keyof typeof LEVELS, typeof console.log>,
_setLogLevel: any,

Check warning on line 42 in packages/mermaid-zenuml/src/mermaidUtils.ts

GitHub Actions / lint

Unexpected any. Specify a different type
_getConfig: any,

Check warning on line 43 in packages/mermaid-zenuml/src/mermaidUtils.ts

GitHub Actions / lint

Unexpected any. Specify a different type
_sanitizeText: any,

Check warning on line 44 in packages/mermaid-zenuml/src/mermaidUtils.ts

GitHub Actions / lint

Unexpected any. Specify a different type
_setupGraphViewbox: any

Check warning on line 45 in packages/mermaid-zenuml/src/mermaidUtils.ts

GitHub Actions / lint

Unexpected any. Specify a different type
) => {
_log.info('Mermaid utils injected');
log.trace = _log.trace;
* @param schema - The input schema.
* @returns The schema with `allOf` replaced with `extends`.
*/
function replaceAllOfWithExtends(schema: JSONSchemaType<Record<string, any>>) {

Check warning on line 123 in packages/mermaid/scripts/create-types-from-json-schema.mts

GitHub Actions / lint

Unexpected any. Specify a different type
if (schema['allOf']) {
const { allOf, ...schemaWithoutAllOf } = schema;
return {
* @param schema - The input schema.
* @returns The schema with all required values removed.
*/
function removeRequired(schema: JSONSchemaType<Record<string, any>>) {

Check warning on line 147 in packages/mermaid/scripts/create-types-from-json-schema.mts

GitHub Actions / lint

Unexpected any. Specify a different type
return { ...schema, required: [] };
}