Skip to content

Commit 3cf9fa7

Browse files
author
nour kouider
committed
Merge branch 'fix/timeline-title-wrap' of https://github.com/nour0205/mermaid into fix/timeline-title-wrap
2 parents 74b0191 + 2b7e8ae commit 3cf9fa7

File tree

225 files changed

+6242
-2812
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+6242
-2812
lines changed

.changeset/add-vert-tag-bar-chart.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'mermaid': minor
3+
---
4+
5+
feat: Add Vertical Line To Gantt Plot At Specified Time

.changeset/eleven-wolves-deny.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'mermaid': patch
3+
---
4+
5+
chore: Convert StateDB into TypeScript

.changeset/gold-shoes-camp.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'mermaid': patch
3+
---
4+
5+
fix: Remove incorrect `style="undefined;"` attributes in some Mermaid diagrams

.changeset/honest-trees-dress.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@mermaid-js/mermaid-zenuml': patch
3+
---
4+
5+
chore: bump minimum ZenUML version to 3.23.28
6+
7+
commit: 9d06d8f31e7f12af9e9e092214f907f2dc93ad75

.changeset/neat-moose-compare.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'mermaid': minor
3+
---
4+
5+
feat: Add support for styling Journey Diagram title (color, font-family, and font-size)

.changeset/proud-seahorses-wash.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'mermaid': patch
3+
---
4+
5+
FontAwesome icons can now be embedded as SVGs in flowcharts if they are registered via `mermaid.registerIconPacks`.

.changeset/sad-mails-accept.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'mermaid': patch
3+
'@mermaid-js/parser': patch
4+
---
5+
6+
Refactor grammar so that title don't break Architecture Diagrams

.changeset/sixty-deer-tell.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'mermaid': major
3+
---
4+
5+
fix: allow sequence diagram arrows with a trailing colon but no message

.changeset/soft-readers-tan.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'mermaid': minor
3+
---
4+
5+
feat: Dynamically Render Data Labels Within Bar Charts

.changeset/ten-lamps-trade.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'mermaid': patch
3+
---
4+
5+
fix: allow colons in events

.changeset/yellow-mirrors-change.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@mermaid-js/mermaid-zenuml': patch
3+
---
4+
5+
fix(zenuml): limit `peerDependencies` to Mermaid v10 and v11
6+
7+
commit: 0ad44c12feead9d20c6a870a49327ada58d6e657

.cspell/code-terms.txt

-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ frontmatter
5353
funs
5454
gantt
5555
GENERICTYPE
56-
getBoundarys
5756
grammr
5857
graphtype
5958
halign

.cspell/libraries.txt

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ dompurify
2626
elkjs
2727
fcose
2828
fontawesome
29+
Fonticons
2930
Forgejo
3031
Foswiki
3132
Gitea

.esbuild/build.ts

+13
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,19 @@ const buildPackage = async (entryName: keyof typeof packageOptions) => {
3434
{ ...iifeOptions, minify: true, metafile: shouldVisualize }
3535
);
3636
}
37+
if (entryName === 'mermaid-zenuml') {
38+
const iifeOptions: MermaidBuildOptions = {
39+
...commonOptions,
40+
format: 'iife',
41+
globalName: 'mermaid-zenuml',
42+
};
43+
buildConfigs.push(
44+
// mermaid-zenuml.js
45+
{ ...iifeOptions },
46+
// mermaid-zenuml.min.js
47+
{ ...iifeOptions, minify: true, metafile: shouldVisualize }
48+
);
49+
}
3750

3851
const results = await Promise.all(buildConfigs.map((option) => build(getBuildConfig(option))));
3952

.esbuild/util.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
5858
format,
5959
minify,
6060
options: { name, file, packageName },
61+
globalName = 'mermaid',
6162
} = options;
6263
const external: string[] = ['require', 'fs', 'path'];
6364
const outFileName = getFileName(name, options);
@@ -68,6 +69,7 @@ export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
6869
},
6970
metafile,
7071
minify,
72+
globalName,
7173
logLevel: 'info',
7274
chunkNames: `chunks/${outFileName}/[name]-[hash]`,
7375
define: {
@@ -89,11 +91,12 @@ export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
8991
if (format === 'iife') {
9092
output.format = 'iife';
9193
output.splitting = false;
92-
output.globalName = '__esbuild_esm_mermaid';
94+
const originalGlobalName = output.globalName ?? 'mermaid';
95+
output.globalName = `__esbuild_esm_mermaid_nm[${JSON.stringify(originalGlobalName)}]`;
9396
// Workaround for removing the .default access in esbuild IIFE.
9497
// https://github.com/mermaid-js/mermaid/pull/4109#discussion_r1292317396
9598
output.footer = {
96-
js: 'globalThis.mermaid = globalThis.__esbuild_esm_mermaid.default;',
99+
js: `globalThis[${JSON.stringify(originalGlobalName)}] = globalThis.${output.globalName}.default;`,
97100
};
98101
output.outExtension = { '.js': '.js' };
99102
} else {

.github/ISSUE_TEMPLATE/theme_proposal.yml

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

.github/lychee.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@ exclude = [
4646
# Drupal 403
4747
"https://(www.)?drupal.org",
4848

49-
# Swimm returns 404, eventhough the link is valid
49+
# Swimm returns 404, even though the link is valid
5050
"https://docs.swimm.io",
5151

5252
# Timeout
53-
"https://huehive.co"
53+
"https://huehive.co",
54+
"https://foswiki.org",
55+
"https://www.gnu.org",
5456
]
5557

5658
# Exclude all private IPs from checking.

.github/stale.yml

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

.github/workflows/e2e-applitools.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,15 @@ jobs:
4545
- if: ${{ env.USE_APPLI }}
4646
name: Notify applitools of new batch
4747
# Copied from docs https://applitools.com/docs/topics/integrations/github-integration-ci-setup.html
48-
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"
4948
env:
5049
# e.g. mermaid-js/mermaid/my-branch
5150
APPLITOOLS_BRANCH: ${{ github.repository }}/${{ github.ref_name }}
5251
APPLITOOLS_PARENT_BRANCH: ${{ github.event.inputs.parent_branch }}
5352
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
5453
APPLITOOLS_SERVER_URL: 'https://eyesapi.applitools.com'
54+
uses: wei/curl@012398a392d02480afa2720780031f8621d5f94c
55+
with:
56+
args: -X POST "$APPLITOOLS_SERVER_URL/api/externals/github/push?apiKey=$APPLITOOLS_API_KEY&CommitSha=$GITHUB_SHA&BranchName=${APPLITOOLS_BRANCH}$&ParentBranchName=$APPLITOOLS_PARENT_BRANCH"
5557

5658
- name: Cypress run
5759
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12

.github/workflows/e2e-timings.yml

+22-10
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
1111

1212
permissions:
1313
contents: write
14+
pull-requests: write
1415

1516
jobs:
1617
timings:
@@ -29,6 +30,7 @@ jobs:
2930
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
3031
with:
3132
runTests: false
33+
3234
- name: Cypress run
3335
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
3436
id: cypress
@@ -44,15 +46,25 @@ jobs:
4446
SPLIT: 1
4547
SPLIT_INDEX: 0
4648
SPLIT_FILE: 'cypress/timings.json'
47-
- name: Commit changes
48-
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
49-
with:
50-
add: 'cypress/timings.json'
51-
author_name: 'github-actions[bot]'
52-
author_email: '41898282+github-actions[bot]@users.noreply.github.com'
53-
message: 'chore: update E2E timings'
54-
- name: Create Pull Request
55-
uses: peter-evans/create-pull-request@v5
49+
50+
- name: Compare timings
51+
id: compare
52+
run: |
53+
OUTPUT=$(pnpm tsx scripts/compare-timings.ts)
54+
echo "$OUTPUT" >> $GITHUB_STEP_SUMMARY
55+
56+
echo "output<<EOF" >> $GITHUB_OUTPUT
57+
echo "$OUTPUT" >> $GITHUB_OUTPUT
58+
echo "EOF" >> $GITHUB_OUTPUT
59+
60+
- name: Commit and create pull request
61+
uses: peter-evans/create-pull-request@3b1f4bffdc97d7b055dd96732d7348e585ad2c4e
5662
with:
57-
branch: release-promotion
63+
add-paths: |
64+
cypress/timings.json
65+
commit-message: 'chore: update E2E timings'
66+
branch: update-timings
5867
title: Update E2E Timings
68+
body: ${{ steps.compare.outputs.output }}
69+
delete-branch: true
70+
sign-commits: true

CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ mermaid.run({
256256
- Problem showing graph with php on localhost [\#502](https://github.com/knsv/mermaid/issues/502)
257257
- logLevel's option doesnt work at 7.0.0 [\#501](https://github.com/knsv/mermaid/issues/501)
258258
- How do I get the log for a render or parse attempt? [\#500](https://github.com/knsv/mermaid/issues/500)
259-
- Mermaid neutral style style to built in latest release [\#499](https://github.com/knsv/mermaid/issues/499)
259+
- Mermaid neutral style to built in latest release [\#499](https://github.com/knsv/mermaid/issues/499)
260260
- Any plans for adding a typescript definition file? [\#495](https://github.com/knsv/mermaid/issues/495)
261261
- Gantt diagrams too narrow [\#493](https://github.com/knsv/mermaid/issues/493)
262262
- Flowchart edge labels placement [\#490](https://github.com/knsv/mermaid/issues/490)
@@ -833,7 +833,7 @@ mermaid.run({
833833
- Merge pull request \#1 from knsv/master [\#96](https://github.com/knsv/mermaid/pull/96) ([gkchic](https://github.com/gkchic))
834834
- Removed duplicated section in flowchart docs [\#94](https://github.com/knsv/mermaid/pull/94) ([kaime](https://github.com/kaime))
835835
- Grammar changes to sequence page [\#93](https://github.com/knsv/mermaid/pull/93) ([gkchic](https://github.com/gkchic))
836-
- Github buttons [\#89](https://github.com/knsv/mermaid/pull/89) ([gkchic](https://github.com/gkchic))
836+
- GitHub buttons [\#89](https://github.com/knsv/mermaid/pull/89) ([gkchic](https://github.com/gkchic))
837837
- Template change [\#88](https://github.com/knsv/mermaid/pull/88) ([gkchic](https://github.com/gkchic))
838838
839839
## [0.3.1](https://github.com/knsv/mermaid/tree/0.3.1) (2015-01-05)
@@ -1002,4 +1002,4 @@ mermaid.run({
10021002
10031003
## [0.1.0](https://github.com/knsv/mermaid/tree/0.1.0) (2014-11-16)
10041004
1005-
\* _This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)_
1005+
\* _This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/GitHub-Changelog-Generator)_

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Try Live Editor previews of future releases: <a href="https://develop.git.mermai
4444

4545
**Thanks to all involved, people committing pull requests, people answering questions! 🙏**
4646

47-
<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>
47+
<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>
4848

4949
## Table of content
5050

@@ -451,7 +451,7 @@ For public sites, it can be precarious to retrieve text from users on the intern
451451

452452
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.
453453

454-
_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._
454+
_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._
455455

456456
## Reporting vulnerabilities
457457

README.zh-CN.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ Mermaid
4343

4444
**感谢所有参与进来提交 PR,解答疑问的人们! 🙏**
4545

46-
<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>
46+
<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>
4747

4848
## 关于 Mermaid
4949

5050
<!-- <Main description> -->
5151

52-
Mermaid 是一个基于 Javascript 的图表绘制工具,通过解析类 Markdown 的文本语法来实现图表的创建和动态修改。Mermaid 诞生的主要目的是让文档的更新能够及时跟上开发进度。
52+
Mermaid 是一个基于 JavaScript 的图表绘制工具,通过解析类 Markdown 的文本语法来实现图表的创建和动态修改。Mermaid 诞生的主要目的是让文档的更新能够及时跟上开发进度。
5353

5454
> Doc-Rot 是 Mermaid 致力于解决的一个难题。
5555

cypress/integration/other/interaction.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('Interaction', () => {
2020
});
2121

2222
it('Graph: should handle a click on a node with a bound url', () => {
23-
// 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.
23+
// 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`.
2424
cy.contains('URLTest1').find('.node').click();
2525
cy.location().should(({ href }) => {
2626
expect(href).to.eq('http://localhost:9000/empty.html');
@@ -146,7 +146,7 @@ describe('Interaction', () => {
146146
});
147147
});
148148

149-
describe('Interaction - security level other, missspelling', () => {
149+
describe('Interaction - security level other, misspelling', () => {
150150
beforeEach(() => {
151151
cy.visit('http://localhost:9000/click_security_other.html');
152152
});

cypress/integration/rendering/architecture.spec.ts

+20-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@ describe.skip('architecture diagram', () => {
1919
`
2020
);
2121
});
22+
it('should render a simple architecture diagram with titleAndAccessibilities', () => {
23+
imgSnapshotTest(
24+
`architecture-beta
25+
title Simple Architecture Diagram
26+
accTitle: Accessibility Title
27+
accDescr: Accessibility Description
28+
group api(cloud)[API]
29+
30+
service db(database)[Database] in api
31+
service disk1(disk)[Storage] in api
32+
service disk2(disk)[Storage] in api
33+
service server(server)[Server] in api
34+
35+
db:L -- R:server
36+
disk1:T -- B:server
37+
disk2:T -- B:db
38+
`
39+
);
40+
});
2241
it('should render an architecture diagram with groups within groups', () => {
2342
imgSnapshotTest(
2443
`architecture-beta
@@ -172,7 +191,7 @@ describe.skip('architecture diagram', () => {
172191
);
173192
});
174193

175-
it('should render an architecture diagram with a resonable height', () => {
194+
it('should render an architecture diagram with a reasonable height', () => {
176195
imgSnapshotTest(
177196
`architecture-beta
178197
group federated(cloud)[Federated Environment]

cypress/integration/rendering/block.spec.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('Block diagram', () => {
1414
);
1515
});
1616

17-
it('BL2: should handle colums statement in sub-blocks', () => {
17+
it('BL2: should handle columns statement in sub-blocks', () => {
1818
imgSnapshotTest(
1919
`block-beta
2020
id1["Hello"]
@@ -30,7 +30,7 @@ describe('Block diagram', () => {
3030
);
3131
});
3232

33-
it('BL3: should align block widths and handle colums statement in sub-blocks', () => {
33+
it('BL3: should align block widths and handle columns statement in sub-blocks', () => {
3434
imgSnapshotTest(
3535
`block-beta
3636
block
@@ -46,7 +46,7 @@ describe('Block diagram', () => {
4646
);
4747
});
4848

49-
it('BL4: should align block widths and handle colums statements in deeper sub-blocks then 1 level', () => {
49+
it('BL4: should align block widths and handle columns statements in deeper sub-blocks then 1 level', () => {
5050
imgSnapshotTest(
5151
`block-beta
5252
columns 1
@@ -66,7 +66,7 @@ describe('Block diagram', () => {
6666
);
6767
});
6868

69-
it('BL5: should align block widths and handle colums statements in deeper sub-blocks then 1 level (alt)', () => {
69+
it('BL5: should align block widths and handle columns statements in deeper sub-blocks then 1 level (alt)', () => {
7070
imgSnapshotTest(
7171
`block-beta
7272
columns 1
@@ -236,7 +236,7 @@ describe('Block diagram', () => {
236236
);
237237
});
238238

239-
it('BL17: width alignment - blocks shold be equal in width', () => {
239+
it('BL17: width alignment - blocks should be equal in width', () => {
240240
imgSnapshotTest(
241241
`block-beta
242242
A("This is the text")

0 commit comments

Comments
 (0)