mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-04 21:04:12 +01:00
Compare commits
136 Commits
@mermaid-j
...
renovate/m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9ba9b6bdd | ||
|
|
dfd59470dc | ||
|
|
4aac6fa448 | ||
|
|
5f96f80efb | ||
|
|
545801e144 | ||
|
|
0bd74759cc | ||
|
|
e4cf266c1d | ||
|
|
c0e1662e50 | ||
|
|
6546aed482 | ||
|
|
b76ccae065 | ||
|
|
287a9a3fcb | ||
|
|
7f5160fa4d | ||
|
|
7b0763f262 | ||
|
|
38c289818c | ||
|
|
57530076aa | ||
|
|
f2d7877c7a | ||
|
|
62d2c6505e | ||
|
|
974236bbb8 | ||
|
|
cf0d1248a4 | ||
|
|
ebefbd87a8 | ||
|
|
1e7b71a085 | ||
|
|
f28f3c25aa | ||
|
|
58137aa631 | ||
|
|
e7719f14c5 | ||
|
|
35d9cead8a | ||
|
|
13baf51b35 | ||
|
|
9af985ba9b | ||
|
|
c7f8a11ded | ||
|
|
700aa100f2 | ||
|
|
49103ea654 | ||
|
|
3f46c94ab2 | ||
|
|
fed8a523a4 | ||
|
|
33b4946e21 | ||
|
|
3d768f3adf | ||
|
|
76e17ffd20 | ||
|
|
60f633101c | ||
|
|
18f51eb14e | ||
|
|
2bb57bf7d2 | ||
|
|
a6276daffd | ||
|
|
7def6eecbf | ||
|
|
34f40f0794 | ||
|
|
32ac2c689d | ||
|
|
dbcadc1d0b | ||
|
|
ac411a7d7e | ||
|
|
d80a638e55 | ||
|
|
7a869c08a2 | ||
|
|
44e8cbb1de | ||
|
|
efe38b8425 | ||
|
|
6fecb985e8 | ||
|
|
69b338d8af | ||
|
|
fa15ce8502 | ||
|
|
6d0650918f | ||
|
|
c728d864c8 | ||
|
|
99f17bea3a | ||
|
|
c1c14e401a | ||
|
|
8b3057f27c | ||
|
|
717d3b3bb2 | ||
|
|
2f8d9ba958 | ||
|
|
ace0367afd | ||
|
|
b983626587 | ||
|
|
7effdc147b | ||
|
|
6e67515f41 | ||
|
|
1a9d45abf0 | ||
|
|
09b74f1c29 | ||
|
|
880da21908 | ||
|
|
38191243be | ||
|
|
b75dcb8a82 | ||
|
|
4c1e170f4a | ||
|
|
d5c4eff251 | ||
|
|
5324fd8dfd | ||
|
|
bd25b88a01 | ||
|
|
d3de3ecbbb | ||
|
|
3964ce0a0f | ||
|
|
4dbabba8e8 | ||
|
|
bbb93b263d | ||
|
|
e3ef5e4208 | ||
|
|
daeb85bac2 | ||
|
|
4240340a18 | ||
|
|
ca10a259fa | ||
|
|
0ed9c65572 | ||
|
|
56cc12690f | ||
|
|
2cdaf03ada | ||
|
|
f6fa0260e7 | ||
|
|
29aad6d23c | ||
|
|
82ef7b5fdb | ||
|
|
11cd3f1262 | ||
|
|
ac4aa94e78 | ||
|
|
c40faac80d | ||
|
|
c530baed3f | ||
|
|
045699de10 | ||
|
|
1988d24227 | ||
|
|
39f90debe7 | ||
|
|
73e9849f99 | ||
|
|
5a05540a5f | ||
|
|
2b58df9665 | ||
|
|
e6fb4a84da | ||
|
|
32723b2de1 | ||
|
|
18703782ee | ||
|
|
0b42bdba07 | ||
|
|
74c96db3e2 | ||
|
|
bd47c57eaf | ||
|
|
3e5d2db514 | ||
|
|
40990bb096 | ||
|
|
7ca0665764 | ||
|
|
81a6a361ab | ||
|
|
62faacdeeb | ||
|
|
0e40d8e8a8 | ||
|
|
e8d6daf4f6 | ||
|
|
cb4ed605b2 | ||
|
|
ba9db26bfa | ||
|
|
252b1837f7 | ||
|
|
6b9c15d7f0 | ||
|
|
fda640c90c | ||
|
|
584a789183 | ||
|
|
47297f7c26 | ||
|
|
967aa0629e | ||
|
|
04b20a79b9 | ||
|
|
d60b09cafc | ||
|
|
875827f59b | ||
|
|
c4e08261b5 | ||
|
|
70f679d2fa | ||
|
|
25c43fa439 | ||
|
|
ec1c6325d4 | ||
|
|
309ff6be38 | ||
|
|
02d368df05 | ||
|
|
4ee1fe2ca4 | ||
|
|
4ff2ae9f4e | ||
|
|
7a729e8f16 | ||
|
|
3c7fd95617 | ||
|
|
2dd29bee25 | ||
|
|
259a508d8a | ||
|
|
1963064369 | ||
|
|
a101ce803c | ||
|
|
fc0c7936d1 | ||
|
|
2d2add5b44 | ||
|
|
58fd5ddbaf |
5
.changeset/brave-memes-flash.md
Normal file
5
.changeset/brave-memes-flash.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Support edge animation in hand drawn look
|
||||||
5
.changeset/busy-mirrors-try.md
Normal file
5
.changeset/busy-mirrors-try.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Resolved parsing error where direction TD was not recognized within subgraphs
|
||||||
5
.changeset/chilly-words-march.md
Normal file
5
.changeset/chilly-words-march.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Correct viewBox casing and make SVGs responsive
|
||||||
5
.changeset/curly-apes-prove.md
Normal file
5
.changeset/curly-apes-prove.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Improve participant parsing and prevent recursive loops on invalid syntax
|
||||||
5
.changeset/loud-results-melt.md
Normal file
5
.changeset/loud-results-melt.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
feat: Add half-arrowheads (solid & stick) and central connection support
|
||||||
5
.changeset/short-seals-sort.md
Normal file
5
.changeset/short-seals-sort.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
feat: allow to put notes in namespaces on classDiagram
|
||||||
5
.changeset/slow-lemons-know.md
Normal file
5
.changeset/slow-lemons-know.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Mindmap breaking in ELK layout
|
||||||
5
.changeset/sweet-games-build.md
Normal file
5
.changeset/sweet-games-build.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(er-diagram): prevent syntax error when using 'u', numbers, and decimals in node names
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
!viewbox
|
||||||
|
# It should be viewBox
|
||||||
# This file contains coding related terms
|
# This file contains coding related terms
|
||||||
ALPHANUM
|
ALPHANUM
|
||||||
antiscript
|
antiscript
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ rscratch
|
|||||||
shiki
|
shiki
|
||||||
Slidev
|
Slidev
|
||||||
sparkline
|
sparkline
|
||||||
|
speccharts
|
||||||
sphinxcontrib
|
sphinxcontrib
|
||||||
ssim
|
ssim
|
||||||
stylis
|
stylis
|
||||||
|
|||||||
@@ -71,6 +71,9 @@ export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
|
|||||||
|
|
||||||
const external: string[] = ['require', 'fs', 'path'];
|
const external: string[] = ['require', 'fs', 'path'];
|
||||||
const outFileName = getFileName(name, options);
|
const outFileName = getFileName(name, options);
|
||||||
|
const { dependencies, version } = JSON.parse(
|
||||||
|
readFileSync(resolve(__dirname, `../packages/${packageName}/package.json`), 'utf-8')
|
||||||
|
);
|
||||||
const output: BuildOptions = buildOptions({
|
const output: BuildOptions = buildOptions({
|
||||||
...rest,
|
...rest,
|
||||||
absWorkingDir: resolve(__dirname, `../packages/${packageName}`),
|
absWorkingDir: resolve(__dirname, `../packages/${packageName}`),
|
||||||
@@ -82,15 +85,13 @@ export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
|
|||||||
chunkNames: `chunks/${outFileName}/[name]-[hash]`,
|
chunkNames: `chunks/${outFileName}/[name]-[hash]`,
|
||||||
define: {
|
define: {
|
||||||
// This needs to be stringified for esbuild
|
// This needs to be stringified for esbuild
|
||||||
includeLargeFeatures: `${includeLargeFeatures}`,
|
'injected.includeLargeFeatures': `${includeLargeFeatures}`,
|
||||||
|
'injected.version': `'${version}'`,
|
||||||
'import.meta.vitest': 'undefined',
|
'import.meta.vitest': 'undefined',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (core) {
|
if (core) {
|
||||||
const { dependencies } = JSON.parse(
|
|
||||||
readFileSync(resolve(__dirname, `../packages/${packageName}/package.json`), 'utf-8')
|
|
||||||
);
|
|
||||||
// Core build is used to generate file without bundled dependencies.
|
// Core build is used to generate file without bundled dependencies.
|
||||||
// This is used by downstream projects to bundle dependencies themselves.
|
// This is used by downstream projects to bundle dependencies themselves.
|
||||||
// Ignore dependencies and any dependencies of dependencies
|
// Ignore dependencies and any dependencies of dependencies
|
||||||
|
|||||||
4
.github/workflows/autofix.yml
vendored
4
.github/workflows/autofix.yml
vendored
@@ -13,13 +13,13 @@ jobs:
|
|||||||
autofix:
|
autofix:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||||
# uses version from "packageManager" field in package.json
|
# uses version from "packageManager" field in package.json
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||||
with:
|
with:
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
|
|||||||
4
.github/workflows/build-docs.yml
vendored
4
.github/workflows/build-docs.yml
vendored
@@ -18,12 +18,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||||
with:
|
with:
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
|
|||||||
2
.github/workflows/check-readme-in-sync.yml
vendored
2
.github/workflows/check-readme-in-sync.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- name: Check for difference in README.md and docs/README.md
|
- name: Check for difference in README.md and docs/README.md
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
12
.github/workflows/codeql.yml
vendored
12
.github/workflows/codeql.yml
vendored
@@ -26,17 +26,17 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
language: ['javascript']
|
language: ['javascript', 'actions']
|
||||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
# CodeQL supports [ 'actions', 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@5378192d256ef1302a6980fffe5ca04426d43091 # v3.28.21
|
uses: github/codeql-action/init@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
|
||||||
with:
|
with:
|
||||||
config-file: ./.github/codeql/codeql-config.yml
|
config-file: ./.github/codeql/codeql-config.yml
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
@@ -48,7 +48,7 @@ jobs:
|
|||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@5378192d256ef1302a6980fffe5ca04426d43091 # v3.28.21
|
uses: github/codeql-action/autobuild@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||||
@@ -62,4 +62,4 @@ jobs:
|
|||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@5378192d256ef1302a6980fffe5ca04426d43091 # v3.28.21
|
uses: github/codeql-action/analyze@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
|
||||||
|
|||||||
2
.github/workflows/dependency-review.yml
vendored
2
.github/workflows/dependency-review.yml
vendored
@@ -15,6 +15,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout Repository'
|
- name: 'Checkout Repository'
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
- name: 'Dependency Review'
|
- name: 'Dependency Review'
|
||||||
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
|
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
|
||||||
|
|||||||
4
.github/workflows/e2e-applitools.yml
vendored
4
.github/workflows/e2e-applitools.yml
vendored
@@ -29,13 +29,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "::error,title=Not using Applitools::APPLITOOLS_API_KEY is empty, disabling Applitools for this run."
|
echo "::error,title=Not using Applitools::APPLITOOLS_API_KEY is empty, disabling Applitools for this run."
|
||||||
|
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||||
# uses version from "packageManager" field in package.json
|
# uses version from "packageManager" field in package.json
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/e2e-timings.yml
vendored
4
.github/workflows/e2e-timings.yml
vendored
@@ -20,10 +20,10 @@ jobs:
|
|||||||
image: cypress/browsers:node-20.11.0-chrome-121.0.6167.85-1-ff-120.0-edge-121.0.2277.83-1
|
image: cypress/browsers:node-20.11.0-chrome-121.0.6167.85-1-ff-120.0-edge-121.0.2277.83-1
|
||||||
options: --user 1001
|
options: --user 1001
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|||||||
10
.github/workflows/e2e.yml
vendored
10
.github/workflows/e2e.yml
vendored
@@ -37,10 +37,10 @@ jobs:
|
|||||||
image: cypress/browsers:node-20.11.0-chrome-121.0.6167.85-1-ff-120.0-edge-121.0.2277.83-1
|
image: cypress/browsers:node-20.11.0-chrome-121.0.6167.85-1-ff-120.0-edge-121.0.2277.83-1
|
||||||
options: --user 1001
|
options: --user 1001
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
- name: Cache snapshots
|
- name: Cache snapshots
|
||||||
@@ -53,7 +53,7 @@ jobs:
|
|||||||
# If a snapshot for a given Hash is not found, we checkout that commit, run the tests and cache the snapshots.
|
# If a snapshot for a given Hash is not found, we checkout that commit, run the tests and cache the snapshots.
|
||||||
- name: Switch to base branch
|
- name: Switch to base branch
|
||||||
if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }}
|
if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }}
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
ref: ${{ env.targetHash }}
|
ref: ${{ env.targetHash }}
|
||||||
|
|
||||||
@@ -82,13 +82,13 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
containers: [1, 2, 3, 4, 5]
|
containers: [1, 2, 3, 4, 5]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||||
# uses version from "packageManager" field in package.json
|
# uses version from "packageManager" field in package.json
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/link-checker.yml
vendored
2
.github/workflows/link-checker.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
|||||||
# lychee only uses the GITHUB_TOKEN to avoid rate-limiting
|
# lychee only uses the GITHUB_TOKEN to avoid rate-limiting
|
||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- name: Restore lychee cache
|
- name: Restore lychee cache
|
||||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||||
|
|||||||
6
.github/workflows/lint.yml
vendored
6
.github/workflows/lint.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
|||||||
docker-lint:
|
docker-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
|
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
|
||||||
with:
|
with:
|
||||||
@@ -23,13 +23,13 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||||
# uses version from "packageManager" field in package.json
|
# uses version from "packageManager" field in package.json
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||||
with:
|
with:
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
|
|||||||
2
.github/workflows/pr-labeler.yml
vendored
2
.github/workflows/pr-labeler.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Add "Sponsored by MermaidChart" label
|
- name: Add "Sponsored by MermaidChart" label
|
||||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
6
.github/workflows/publish-docs.yml
vendored
6
.github/workflows/publish-docs.yml
vendored
@@ -23,12 +23,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||||
with:
|
with:
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
@@ -43,7 +43,7 @@ jobs:
|
|||||||
run: pnpm --filter mermaid run docs:build:vitepress
|
run: pnpm --filter mermaid run docs:build:vitepress
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
|
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
|
||||||
with:
|
with:
|
||||||
path: packages/mermaid/src/vitepress/.vitepress/dist
|
path: packages/mermaid/src/vitepress/.vitepress/dist
|
||||||
|
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ jobs:
|
|||||||
publish-preview:
|
publish-preview:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||||
with:
|
with:
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
|
|||||||
4
.github/workflows/release-preview.yml
vendored
4
.github/workflows/release-preview.yml
vendored
@@ -26,12 +26,12 @@ jobs:
|
|||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||||
with:
|
with:
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
|
|||||||
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -21,12 +21,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||||
with:
|
with:
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
@@ -42,5 +42,4 @@ jobs:
|
|||||||
publish: pnpm changeset:publish
|
publish: pnpm changeset:publish
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
NPM_CONFIG_PROVENANCE: true
|
NPM_CONFIG_PROVENANCE: true
|
||||||
|
|||||||
6
.github/workflows/scorecard.yml
vendored
6
.github/workflows/scorecard.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Run analysis
|
- name: Run analysis
|
||||||
@@ -26,12 +26,12 @@ jobs:
|
|||||||
results_format: sarif
|
results_format: sarif
|
||||||
publish_results: true
|
publish_results: true
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||||
with:
|
with:
|
||||||
name: SARIF file
|
name: SARIF file
|
||||||
path: results.sarif
|
path: results.sarif
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
- name: Upload to code-scanning
|
- name: Upload to code-scanning
|
||||||
uses: github/codeql-action/upload-sarif@5378192d256ef1302a6980fffe5ca04426d43091 # v3.28.21
|
uses: github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|||||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -9,13 +9,13 @@ jobs:
|
|||||||
unit-test:
|
unit-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||||
# uses version from "packageManager" field in package.json
|
# uses version from "packageManager" field in package.json
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||||
with:
|
with:
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
|
|||||||
2
.github/workflows/update-browserlist.yml
vendored
2
.github/workflows/update-browserlist.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
|||||||
update-browser-list:
|
update-browser-list:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||||
- run: npx update-browserslist-db@latest
|
- run: npx update-browserslist-db@latest
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
|
|||||||
40
.github/workflows/validate-lockfile.yml
vendored
40
.github/workflows/validate-lockfile.yml
vendored
@@ -1,7 +1,7 @@
|
|||||||
name: Validate pnpm-lock.yaml
|
name: Validate pnpm-lock.yaml
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request_target:
|
||||||
paths:
|
paths:
|
||||||
- 'pnpm-lock.yaml'
|
- 'pnpm-lock.yaml'
|
||||||
- '**/package.json'
|
- '**/package.json'
|
||||||
@@ -12,16 +12,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Set up Node.js
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
|
||||||
|
|
||||||
- name: Validate pnpm-lock.yaml entries
|
- name: Validate pnpm-lock.yaml entries
|
||||||
id: validate # give this step an ID so we can reference its outputs
|
id: validate # give this step an ID so we can reference its outputs
|
||||||
@@ -55,16 +50,41 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Find existing lockfile validation comment
|
||||||
|
if: always()
|
||||||
|
uses: peter-evans/find-comment@v4
|
||||||
|
id: find-comment
|
||||||
|
with:
|
||||||
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
|
comment-author: 'github-actions[bot]'
|
||||||
|
body-includes: 'Lockfile Validation Failed'
|
||||||
|
|
||||||
- name: Comment on PR if validation failed
|
- name: Comment on PR if validation failed
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: peter-evans/create-or-update-comment@v4
|
uses: peter-evans/create-or-update-comment@v5
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.pull_request.number }}
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
|
comment-id: ${{ steps.find-comment.outputs.comment-id }}
|
||||||
|
edit-mode: replace
|
||||||
body: |
|
body: |
|
||||||
|
❌ **Lockfile Validation Failed**
|
||||||
|
|
||||||
The following issue(s) were detected:
|
The following issue(s) were detected:
|
||||||
${{ steps.validate.outputs.errors }}
|
${{ steps.validate.outputs.errors }}
|
||||||
|
|
||||||
Please address these and push an update.
|
Please address these and push an update.
|
||||||
|
|
||||||
_Posted automatically by GitHub Actions_
|
_Posted automatically by GitHub Actions_
|
||||||
|
|
||||||
|
- name: Delete comment if validation passed
|
||||||
|
if: success() && steps.find-comment.outputs.comment-id != ''
|
||||||
|
uses: actions/github-script@v8
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
script: |
|
||||||
|
await github.rest.issues.deleteComment({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
comment_id: ${{ steps.find-comment.outputs.comment-id }},
|
||||||
|
});
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
22.14.0
|
24.11.0
|
||||||
|
|||||||
@@ -78,6 +78,8 @@ export const getBuildConfig = ({ minify, core, watch, entryName }: BuildOptions)
|
|||||||
},
|
},
|
||||||
define: {
|
define: {
|
||||||
'import.meta.vitest': 'undefined',
|
'import.meta.vitest': 'undefined',
|
||||||
|
'injected.includeLargeFeatures': 'true',
|
||||||
|
'injected.version': `'0.0.0'`,
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: [],
|
extensions: [],
|
||||||
@@ -94,10 +96,6 @@ export const getBuildConfig = ({ minify, core, watch, entryName }: BuildOptions)
|
|||||||
}),
|
}),
|
||||||
...visualizerOptions(packageName, core),
|
...visualizerOptions(packageName, core),
|
||||||
],
|
],
|
||||||
define: {
|
|
||||||
// Needs to be string
|
|
||||||
includeLargeFeatures: 'true',
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (watch && config.build) {
|
if (watch && config.build) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ USER 0:0
|
|||||||
RUN corepack enable \
|
RUN corepack enable \
|
||||||
&& corepack enable pnpm
|
&& corepack enable pnpm
|
||||||
|
|
||||||
RUN apk add --no-cache git~=2.43.4 \
|
RUN apk add --no-cache git~=2.43 \
|
||||||
&& git config --add --system safe.directory /mermaid
|
&& git config --add --system safe.directory /mermaid
|
||||||
|
|
||||||
ENV NODE_OPTIONS="--max_old_space_size=8192"
|
ENV NODE_OPTIONS="--max_old_space_size=8192"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ interface CypressConfig {
|
|||||||
listUrl?: boolean;
|
listUrl?: boolean;
|
||||||
listId?: string;
|
listId?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
screenshot?: boolean;
|
||||||
}
|
}
|
||||||
type CypressMermaidConfig = MermaidConfig & CypressConfig;
|
type CypressMermaidConfig = MermaidConfig & CypressConfig;
|
||||||
|
|
||||||
@@ -90,7 +91,7 @@ export const renderGraph = (
|
|||||||
|
|
||||||
export const openURLAndVerifyRendering = (
|
export const openURLAndVerifyRendering = (
|
||||||
url: string,
|
url: string,
|
||||||
options: CypressMermaidConfig,
|
{ screenshot = true, ...options }: CypressMermaidConfig,
|
||||||
validation?: any
|
validation?: any
|
||||||
): void => {
|
): void => {
|
||||||
const name: string = (options.name ?? cy.state('runnable').fullTitle()).replace(/\s+/g, '-');
|
const name: string = (options.name ?? cy.state('runnable').fullTitle()).replace(/\s+/g, '-');
|
||||||
@@ -98,12 +99,16 @@ export const openURLAndVerifyRendering = (
|
|||||||
cy.visit(url);
|
cy.visit(url);
|
||||||
cy.window().should('have.property', 'rendered', true);
|
cy.window().should('have.property', 'rendered', true);
|
||||||
cy.get('svg').should('be.visible');
|
cy.get('svg').should('be.visible');
|
||||||
|
// cspell:ignore viewbox
|
||||||
|
cy.get('svg').should('not.have.attr', 'viewbox');
|
||||||
|
|
||||||
if (validation) {
|
if (validation) {
|
||||||
cy.get('svg').should(validation);
|
cy.get('svg').should(validation);
|
||||||
}
|
}
|
||||||
|
|
||||||
verifyScreenshot(name);
|
if (screenshot) {
|
||||||
|
verifyScreenshot(name);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const verifyScreenshot = (name: string): void => {
|
export const verifyScreenshot = (name: string): void => {
|
||||||
|
|||||||
@@ -562,6 +562,20 @@ class C13["With Città foreign language"]
|
|||||||
`
|
`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
it('should add notes in namespaces', function () {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
classDiagram
|
||||||
|
note "This is a outer note"
|
||||||
|
note for C1 "This is a outer note for C1"
|
||||||
|
namespace Namespace1 {
|
||||||
|
note "This is a inner note"
|
||||||
|
note for C1 "This is a inner note for C1"
|
||||||
|
class C1
|
||||||
|
}
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
it('should render a simple class diagram with no members', () => {
|
it('should render a simple class diagram with no members', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
|
|||||||
@@ -709,6 +709,20 @@ class C13["With Città foreign language"]
|
|||||||
`
|
`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
it('should add notes in namespaces', function () {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
classDiagram
|
||||||
|
note "This is a outer note"
|
||||||
|
note for C1 "This is a outer note for C1"
|
||||||
|
namespace Namespace1 {
|
||||||
|
note "This is a inner note"
|
||||||
|
note for C1 "This is a inner note for C1"
|
||||||
|
class C1
|
||||||
|
}
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
it('should render a simple class diagram with no members', () => {
|
it('should render a simple class diagram with no members', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
|
|||||||
@@ -369,4 +369,92 @@ ORDER ||--|{ LINE-ITEM : contains
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('Special characters and numbers syntax', () => {
|
||||||
|
it('should render ER diagram with numeric entity names', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
erDiagram
|
||||||
|
1 ||--|| ORDER : places
|
||||||
|
ORDER ||--|{ 2 : contains
|
||||||
|
2 ||--o{ 3.5 : references
|
||||||
|
`,
|
||||||
|
{ logLevel: 1 }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render ER diagram with "u" character in entity names and cardinality', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
erDiagram
|
||||||
|
CUSTOMER ||--|| u : has
|
||||||
|
u ||--|| ORDER : places
|
||||||
|
PROJECT u--o{ TEAM_MEMBER : "parent"
|
||||||
|
`,
|
||||||
|
{ logLevel: 1 }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render ER diagram with decimal numbers in relationships', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
erDiagram
|
||||||
|
2.5 ||--|| 1.5 : has
|
||||||
|
CUSTOMER ||--o{ 3.14 : references
|
||||||
|
1.0 ||--|{ ORDER : contains
|
||||||
|
`,
|
||||||
|
{ logLevel: 1 }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render ER diagram with numeric entity names and attributes', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
erDiagram
|
||||||
|
1 {
|
||||||
|
string name
|
||||||
|
int value
|
||||||
|
}
|
||||||
|
1 ||--|| ORDER : places
|
||||||
|
ORDER {
|
||||||
|
float price
|
||||||
|
string description
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
{ logLevel: 1 }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render complex ER diagram with mixed special entity names', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
erDiagram
|
||||||
|
CUSTOMER ||--o{ 1 : places
|
||||||
|
1 ||--|{ u : contains
|
||||||
|
1.5
|
||||||
|
u ||--|| 2.5 : processes
|
||||||
|
2.5 {
|
||||||
|
string id
|
||||||
|
float value
|
||||||
|
}
|
||||||
|
u {
|
||||||
|
varchar(50) name
|
||||||
|
int count
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
{ logLevel: 1 }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('should render ER diagram with numeric entity names and attributes', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`erDiagram
|
||||||
|
PRODUCT ||--o{ ORDER-ITEM : has
|
||||||
|
1.5
|
||||||
|
u
|
||||||
|
1
|
||||||
|
`,
|
||||||
|
{ logLevel: 1 }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1029,4 +1029,19 @@ graph TD
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('FDH49: should add edge animation', () => {
|
||||||
|
renderGraph(
|
||||||
|
`
|
||||||
|
flowchart TD
|
||||||
|
A(["Start"]) L_A_B_0@--> B{"Decision"}
|
||||||
|
B --> C["Option A"] & D["Option B"]
|
||||||
|
style C stroke-width:4px,stroke-dasharray: 5
|
||||||
|
L_A_B_0@{ animation: slow }
|
||||||
|
L_B_D_0@{ animation: fast }`,
|
||||||
|
{ look: 'handDrawn', screenshot: false }
|
||||||
|
);
|
||||||
|
cy.get('path#L_A_B_0').should('have.class', 'edge-animation-slow');
|
||||||
|
cy.get('path#L_B_D_0').should('have.class', 'edge-animation-fast');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -774,6 +774,21 @@ describe('Graph', () => {
|
|||||||
expect(svg).to.not.have.attr('style');
|
expect(svg).to.not.have.attr('style');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
it('40: should add edge animation', () => {
|
||||||
|
renderGraph(
|
||||||
|
`
|
||||||
|
flowchart TD
|
||||||
|
A(["Start"]) L_A_B_0@--> B{"Decision"}
|
||||||
|
B --> C["Option A"] & D["Option B"]
|
||||||
|
style C stroke-width:4px,stroke-dasharray: 5
|
||||||
|
L_A_B_0@{ animation: slow }
|
||||||
|
L_B_D_0@{ animation: fast }`,
|
||||||
|
{ screenshot: false }
|
||||||
|
);
|
||||||
|
// Verify animation classes are applied to both edges
|
||||||
|
cy.get('path#L_A_B_0').should('have.class', 'edge-animation-slow');
|
||||||
|
cy.get('path#L_B_D_0').should('have.class', 'edge-animation-fast');
|
||||||
|
});
|
||||||
it('58: handle styling with style expressions', () => {
|
it('58: handle styling with style expressions', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
@@ -973,4 +988,19 @@ graph TD
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('70: should render a subgraph with direction TD', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
flowchart LR
|
||||||
|
subgraph A
|
||||||
|
direction TD
|
||||||
|
a --> b
|
||||||
|
end
|
||||||
|
`,
|
||||||
|
{
|
||||||
|
fontFamily: 'courier',
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -655,5 +655,126 @@ describe('Sequence Diagram Special Cases', () => {
|
|||||||
expect(svg).to.not.have.attr('style');
|
expect(svg).to.not.have.attr('style');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('Central Connection Rendering Tests', () => {
|
||||||
|
it('should render central connection circles on actor vertical lines', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`sequenceDiagram
|
||||||
|
participant Alice
|
||||||
|
participant Bob
|
||||||
|
participant Charlie
|
||||||
|
Alice ()->>() Bob: Central connection
|
||||||
|
Bob ()-->> Charlie: Reverse central connection
|
||||||
|
Charlie ()<<-->>() Alice: Dual central connection`,
|
||||||
|
{ look: 'classic', sequence: { diagramMarginX: 50, diagramMarginY: 10 } }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render central connections with different arrow types', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`sequenceDiagram
|
||||||
|
participant Alice
|
||||||
|
participant Bob
|
||||||
|
Alice ()->>() Bob: Solid open arrow
|
||||||
|
Alice ()-->>() Bob: Dotted open arrow
|
||||||
|
Alice ()-x() Bob: Solid cross
|
||||||
|
Alice ()--x() Bob: Dotted cross
|
||||||
|
Alice ()->() Bob: Solid arrow`,
|
||||||
|
{ look: 'classic', sequence: { diagramMarginX: 50, diagramMarginY: 10 } }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render central connections with bidirectional arrows', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`sequenceDiagram
|
||||||
|
participant Alice
|
||||||
|
participant Bob
|
||||||
|
Alice ()<<->>() Bob: Bidirectional solid
|
||||||
|
Alice ()<<-->>() Bob: Bidirectional dotted`,
|
||||||
|
{ look: 'classic', sequence: { diagramMarginX: 50, diagramMarginY: 10 } }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render central connections with activations', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`sequenceDiagram
|
||||||
|
participant Alice
|
||||||
|
participant Bob
|
||||||
|
participant Charlie
|
||||||
|
Alice ()->>() Bob: Activate Bob
|
||||||
|
activate Bob
|
||||||
|
Bob ()-->> Charlie: Message to Charlie
|
||||||
|
Bob ()->>() Alice: Response to Alice
|
||||||
|
deactivate Bob`,
|
||||||
|
{ look: 'classic', sequence: { diagramMarginX: 50, diagramMarginY: 10 } }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render central connections mixed with normal messages', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`sequenceDiagram
|
||||||
|
participant Alice
|
||||||
|
participant Bob
|
||||||
|
participant Charlie
|
||||||
|
Alice ->> Bob: Normal message
|
||||||
|
Bob ()->>() Charlie: Central connection
|
||||||
|
Charlie -->> Alice: Normal dotted message
|
||||||
|
Alice ()<<-->>() Bob: Dual central connection
|
||||||
|
Bob -x Charlie: Normal cross message`,
|
||||||
|
{ look: 'classic', sequence: { diagramMarginX: 50, diagramMarginY: 10 } }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render central connections with notes', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`sequenceDiagram
|
||||||
|
participant Alice
|
||||||
|
participant Bob
|
||||||
|
participant Charlie
|
||||||
|
Alice ()->>() Bob: Central connection
|
||||||
|
Note over Alice,Bob: Central connection note
|
||||||
|
Bob ()-->> Charlie: Reverse central connection
|
||||||
|
Note right of Charlie: Response note
|
||||||
|
Charlie ()<<-->>() Alice: Dual central connection`,
|
||||||
|
{ look: 'classic', sequence: { diagramMarginX: 50, diagramMarginY: 10 } }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render central connections with loops and alternatives', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`sequenceDiagram
|
||||||
|
participant Alice
|
||||||
|
participant Bob
|
||||||
|
participant Charlie
|
||||||
|
loop Every minute
|
||||||
|
Alice ()->>() Bob: Central heartbeat
|
||||||
|
Bob ()-->> Charlie: Forward heartbeat
|
||||||
|
end
|
||||||
|
alt Success
|
||||||
|
Charlie ()<<-->>() Alice: Success response
|
||||||
|
else Failure
|
||||||
|
Charlie ()-x() Alice: Failure response
|
||||||
|
end`,
|
||||||
|
{ look: 'classic', sequence: { diagramMarginX: 50, diagramMarginY: 10 } }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render central connections with different participant types', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`sequenceDiagram
|
||||||
|
participant Alice
|
||||||
|
actor Bob
|
||||||
|
participant Charlie@{"type":"boundary"}
|
||||||
|
participant David@{"type":"control"}
|
||||||
|
participant Eve@{"type":"entity"}
|
||||||
|
Alice ()->>() Bob: To actor
|
||||||
|
Bob ()-->> Charlie: To boundary
|
||||||
|
Charlie ()->>() David: To control
|
||||||
|
David ()<<-->>() Eve: To entity
|
||||||
|
Eve ()-x() Alice: Back to participant`,
|
||||||
|
{ look: 'classic', sequence: { diagramMarginX: 50, diagramMarginY: 10 } }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1053,4 +1053,167 @@ describe('Sequence diagram', () => {
|
|||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
describe('render new arrow type', () => {
|
||||||
|
it('should render Solid half arrow top', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
Alice -|\\ John: Hello John, how are you?
|
||||||
|
Alice-|\\ John: Hi Alice, I can hear you!
|
||||||
|
Alice -|\\ John: Test
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('should render Solid half arrow bottom', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
Alice-|/John: Hello John, how are you?
|
||||||
|
Alice-|/John: Hi Alice, I can hear you!
|
||||||
|
Alice-|/John: Test
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render Stick half arrow top ', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
Alice-\\\\John: Hello John, how are you?
|
||||||
|
Alice-\\\\John: Hi Alice, I can hear you!
|
||||||
|
Alice-\\\\John: Test
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('should render Stick half arrow bottom ', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
Alice-//John: Hello John, how are you?
|
||||||
|
Alice-//John: Hi Alice, I can hear you!
|
||||||
|
Alice-//John: Test
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('should render Solid half arrow top reverse ', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
Alice/|-John: Hello Alice, how are you?
|
||||||
|
Alice/|-John: Hi Alice, I can hear you!
|
||||||
|
Alice/|-John: Test
|
||||||
|
|
||||||
|
`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render Solid half arrow bottom reverse ', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`sequenceDiagram
|
||||||
|
Alice \\|- John: Hello Alice, how are you?
|
||||||
|
Alice \\|- John: Hi Alice, I can hear you!
|
||||||
|
Alice \\|- John: Test`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render Stick half arrow top reverse ', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
Alice //-John: Hello Alice, how are you?
|
||||||
|
Alice //-John: Hi Alice, I can hear you!
|
||||||
|
Alice //-John: Test`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render Stick half arrow bottom reverse ', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
Alice \\\\-John: Hello Alice, how are you?
|
||||||
|
Alice \\\\-John: Hi Alice, I can hear you!
|
||||||
|
Alice \\\\-John: Test`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render Solid half arrow top dotted', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
Alice --|\\John: Hello John, how are you?
|
||||||
|
Alice --|\\John: Hi Alice, I can hear you!
|
||||||
|
Alice --|\\John: Test`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render Solid half arrow bottom dotted', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
Alice --|/John: Hello John, how are you?
|
||||||
|
Alice --|/John: Hi Alice, I can hear you!
|
||||||
|
Alice --|/John: Test`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render Stick half arrow top dotted', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
Alice--\\\\John: Hello John, how are you?
|
||||||
|
Alice--\\\\John: Hi Alice, I can hear you!
|
||||||
|
Alice--\\\\John: Test`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render Stick half arrow bottom dotted', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
Alice--//John: Hello John, how are you?
|
||||||
|
Alice--//John: Hi Alice, I can hear you!
|
||||||
|
Alice--//John: Test`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render Solid half arrow top reverse dotted', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
Alice/|--John: Hello Alice, how are you?
|
||||||
|
Alice/|--John: Hi Alice, I can hear you!
|
||||||
|
Alice/|--John: Test`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render Solid half arrow bottom reverse dotted', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
Alice\\|--John: Hello Alice, how are you?
|
||||||
|
Alice\\|--John: Hi Alice, I can hear you!
|
||||||
|
Alice\\|--John: Test`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render Stick half arrow top reverse dotted ', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
Alice//--John: Hello Alice, how are you?
|
||||||
|
Alice//--John: Hi Alice, I can hear you!
|
||||||
|
Alice//--John: Test`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should render Stick half arrow bottom reverse dotted ', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
sequenceDiagram
|
||||||
|
Alice\\\\--John: Hello Alice, how are you?
|
||||||
|
Alice\\\\--John: Hi Alice, I can hear you!
|
||||||
|
Alice\\\\--John: Test`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
|
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
|
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
|
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
|
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
@@ -110,6 +110,48 @@
|
|||||||
config:
|
config:
|
||||||
layout: elk
|
layout: elk
|
||||||
---
|
---
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
Origins
|
||||||
|
Long history
|
||||||
|
::icon(fa fa-book)
|
||||||
|
Popularisation
|
||||||
|
British popular psychology author Tony Buzan
|
||||||
|
Research
|
||||||
|
On effectiveness<br/>and features
|
||||||
|
On Automatic creation
|
||||||
|
Uses
|
||||||
|
Creative techniques
|
||||||
|
Strategic planning
|
||||||
|
Argument mapping
|
||||||
|
Tools
|
||||||
|
id)I am a cloud(
|
||||||
|
id))I am a bang((
|
||||||
|
Tools
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
flowchart
|
||||||
|
aid0
|
||||||
|
</pre
|
||||||
|
>
|
||||||
|
<pre id="diagram4" class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
mindmap
|
||||||
|
aid0
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: ogdc
|
||||||
|
---
|
||||||
flowchart-elk TB
|
flowchart-elk TB
|
||||||
c1-->a2
|
c1-->a2
|
||||||
subgraph one
|
subgraph one
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
|
<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 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 rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/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://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css" rel="stylesheet" />
|
||||||
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" 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.googleapis.com" />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
||||||
|
|||||||
@@ -603,6 +603,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="test">
|
<div class="test">
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
theme: dark
|
||||||
|
---
|
||||||
classDiagram
|
classDiagram
|
||||||
test ()--() test2
|
test ()--() test2
|
||||||
</pre>
|
</pre>
|
||||||
|
|||||||
@@ -184,6 +184,7 @@
|
|||||||
}
|
}
|
||||||
Admin --> Report : generates
|
Admin --> Report : generates
|
||||||
</pre>
|
</pre>
|
||||||
|
<hr />
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
classDiagram
|
classDiagram
|
||||||
namespace Company.Project.Module {
|
namespace Company.Project.Module {
|
||||||
@@ -240,6 +241,20 @@
|
|||||||
Bike --> Square : "Logo Shape"
|
Bike --> Square : "Logo Shape"
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
|
<hr />
|
||||||
|
<pre class="mermaid">
|
||||||
|
classDiagram
|
||||||
|
note "This is a outer note"
|
||||||
|
note for Class1 "This is a outer note for Class1"
|
||||||
|
namespace ns {
|
||||||
|
note "This is a inner note"
|
||||||
|
note for Class1 "This is a inner note for Class1"
|
||||||
|
class Class1
|
||||||
|
class Class2
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
<hr />
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import mermaid from './mermaid.esm.mjs';
|
import mermaid from './mermaid.esm.mjs';
|
||||||
mermaid.initialize({
|
mermaid.initialize({
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/font-awesome.min.css"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ services:
|
|||||||
- 9000:9000
|
- 9000:9000
|
||||||
- 3333:3333
|
- 3333:3333
|
||||||
cypress:
|
cypress:
|
||||||
image: cypress/included:14.0.3
|
image: cypress/included:15.5.0
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
working_dir: /mermaid
|
working_dir: /mermaid
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ To add an integration to this list, see the [Integrations - create page](./integ
|
|||||||
- [GitHub Writer](https://github.com/ckeditor/github-writer)
|
- [GitHub Writer](https://github.com/ckeditor/github-writer)
|
||||||
- [SVG diagram generator](https://github.com/SimonKenyonShepard/mermaidjs-github-svg-generator)
|
- [SVG diagram generator](https://github.com/SimonKenyonShepard/mermaidjs-github-svg-generator)
|
||||||
- [GitLab](https://docs.gitlab.com/ee/user/markdown.html#diagrams-and-flowcharts) ✅
|
- [GitLab](https://docs.gitlab.com/ee/user/markdown.html#diagrams-and-flowcharts) ✅
|
||||||
|
- [GNU Octave](https://octave.org/) ✅
|
||||||
|
- [octave_mermaid_js](https://github.com/CNOCTAVE/octave_mermaid_js) ✅
|
||||||
- [Mermaid Plugin for JetBrains IDEs](https://plugins.jetbrains.com/plugin/20146-mermaid)
|
- [Mermaid Plugin for JetBrains IDEs](https://plugins.jetbrains.com/plugin/20146-mermaid)
|
||||||
- [MonsterWriter](https://www.monsterwriter.com/) ✅
|
- [MonsterWriter](https://www.monsterwriter.com/) ✅
|
||||||
- [Joplin](https://joplinapp.org) ✅
|
- [Joplin](https://joplinapp.org) ✅
|
||||||
@@ -272,6 +274,7 @@ Communication tools and platforms
|
|||||||
- [reveal.js-mermaid-plugin](https://github.com/ludwick/reveal.js-mermaid-plugin)
|
- [reveal.js-mermaid-plugin](https://github.com/ludwick/reveal.js-mermaid-plugin)
|
||||||
- [Reveal CK](https://github.com/jedcn/reveal-ck)
|
- [Reveal CK](https://github.com/jedcn/reveal-ck)
|
||||||
- [reveal-ck-mermaid-plugin](https://github.com/tmtm/reveal-ck-mermaid-plugin)
|
- [reveal-ck-mermaid-plugin](https://github.com/tmtm/reveal-ck-mermaid-plugin)
|
||||||
|
- [speccharts: Turn your test suites into specification diagrams](https://github.com/arnaudrenaud/speccharts)
|
||||||
- [Vitepress Plugin](https://github.com/sametcn99/vitepress-mermaid-renderer)
|
- [Vitepress Plugin](https://github.com/sametcn99/vitepress-mermaid-renderer)
|
||||||
|
|
||||||
<!--- cspell:ignore Blazorade HueHive --->
|
<!--- cspell:ignore Blazorade HueHive --->
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ title: Animal example
|
|||||||
classDiagram
|
classDiagram
|
||||||
note "From Duck till Zebra"
|
note "From Duck till Zebra"
|
||||||
Animal <|-- Duck
|
Animal <|-- Duck
|
||||||
note for Duck "can fly\ncan swim\ncan dive\ncan help in debugging"
|
note for Duck "can fly<br>can swim<br>can dive<br>can help in debugging"
|
||||||
Animal <|-- Fish
|
Animal <|-- Fish
|
||||||
Animal <|-- Zebra
|
Animal <|-- Zebra
|
||||||
Animal : +int age
|
Animal : +int age
|
||||||
@@ -50,7 +50,7 @@ title: Animal example
|
|||||||
classDiagram
|
classDiagram
|
||||||
note "From Duck till Zebra"
|
note "From Duck till Zebra"
|
||||||
Animal <|-- Duck
|
Animal <|-- Duck
|
||||||
note for Duck "can fly\ncan swim\ncan dive\ncan help in debugging"
|
note for Duck "can fly<br>can swim<br>can dive<br>can help in debugging"
|
||||||
Animal <|-- Fish
|
Animal <|-- Fish
|
||||||
Animal <|-- Zebra
|
Animal <|-- Zebra
|
||||||
Animal : +int age
|
Animal : +int age
|
||||||
|
|||||||
@@ -329,7 +329,11 @@ Messages can be of two displayed either solid or with a dotted line.
|
|||||||
[Actor][Arrow][Actor]:Message text
|
[Actor][Arrow][Actor]:Message text
|
||||||
```
|
```
|
||||||
|
|
||||||
There are ten types of arrows currently supported:
|
Lines can be solid or dotted, and can end with various types of arrowheads, crosses, or open arrows.
|
||||||
|
|
||||||
|
#### Supported Arrow Types
|
||||||
|
|
||||||
|
**Standard Arrow Types**
|
||||||
|
|
||||||
| Type | Description |
|
| Type | Description |
|
||||||
| -------- | ---------------------------------------------------- |
|
| -------- | ---------------------------------------------------- |
|
||||||
@@ -344,6 +348,58 @@ There are ten types of arrows currently supported:
|
|||||||
| `-)` | Solid line with an open arrow at the end (async) |
|
| `-)` | Solid line with an open arrow at the end (async) |
|
||||||
| `--)` | Dotted line with a open arrow at the end (async) |
|
| `--)` | Dotted line with a open arrow at the end (async) |
|
||||||
|
|
||||||
|
**Half-Arrows (v\<MERMAID_RELEASE_VERSION>+)**
|
||||||
|
|
||||||
|
The following half-arrow types are supported for more expressive sequence diagrams. Both solid and dotted variants are available by increasing the number of dashes (`-` → `--`).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
| Type | Description |
|
||||||
|
| ------- | ---------------------------------------------------- |
|
||||||
|
| `-\|\` | Solid line with top half arrowhead |
|
||||||
|
| `--\|\` | Dotted line with top half arrowhead |
|
||||||
|
| `-\|/` | Solid line with bottom half arrowhead |
|
||||||
|
| `--\|/` | Dotted line with bottom half arrowhead |
|
||||||
|
| `/\|-` | Solid line with reverse top half arrowhead |
|
||||||
|
| `/\|--` | Dotted line with reverse top half arrowhead |
|
||||||
|
| `\\-` | Solid line with reverse bottom half arrowhead |
|
||||||
|
| `\\--` | Dotted line with reverse bottom half arrowhead |
|
||||||
|
| `-\\` | Solid line with top stick half arrowhead |
|
||||||
|
| `--\\` | Dotted line with top stick half arrowhead |
|
||||||
|
| `-//` | Solid line with bottom stick half arrowhead |
|
||||||
|
| `--//` | Dotted line with bottom stick half arrowhead |
|
||||||
|
| `//-` | Solid line with reverse top stick half arrowhead |
|
||||||
|
| `//--` | Dotted line with reverse top stick half arrowhead |
|
||||||
|
| `\\-` | Solid line with reverse bottom stick half arrowhead |
|
||||||
|
| `\\--` | Dotted line with reverse bottom stick half arrowhead |
|
||||||
|
|
||||||
|
## Central Connections (v\<MERMAID_RELEASE_VERSION>+)
|
||||||
|
|
||||||
|
Mermaid sequence diagrams support **central lifeline connections** using a `()`.
|
||||||
|
This is useful to represent messages or signals that connect to a central point, rather than from one actor directly to another.
|
||||||
|
|
||||||
|
To indicate a central connection, append `()` to the arrow syntax.
|
||||||
|
|
||||||
|
#### Basic Syntax
|
||||||
|
|
||||||
|
```mermaid-example
|
||||||
|
sequenceDiagram
|
||||||
|
participant Alice
|
||||||
|
participant John
|
||||||
|
Alice->>()John: Hello John
|
||||||
|
Alice()->>John: How are you?
|
||||||
|
John()->>()Alice: Great!
|
||||||
|
```
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
sequenceDiagram
|
||||||
|
participant Alice
|
||||||
|
participant John
|
||||||
|
Alice->>()John: Hello John
|
||||||
|
Alice()->>John: How are you?
|
||||||
|
John()->>()Alice: Great!
|
||||||
|
```
|
||||||
|
|
||||||
## Activations
|
## Activations
|
||||||
|
|
||||||
It is possible to activate and deactivate an actor. (de)activation can be dedicated declarations:
|
It is possible to activate and deactivate an actor. (de)activation can be dedicated declarations:
|
||||||
|
|||||||
52
package.json
52
package.json
@@ -63,36 +63,36 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@applitools/eyes-cypress": "^3.44.9",
|
"@applitools/eyes-cypress": "^3.55.2",
|
||||||
"@argos-ci/cypress": "^6.1.1",
|
"@argos-ci/cypress": "^6.1.3",
|
||||||
"@changesets/changelog-github": "^0.5.1",
|
"@changesets/changelog-github": "^0.5.1",
|
||||||
"@changesets/cli": "^2.27.12",
|
"@changesets/cli": "^2.29.7",
|
||||||
"@cspell/eslint-plugin": "^8.19.4",
|
"@cspell/eslint-plugin": "^8.19.4",
|
||||||
"@cypress/code-coverage": "^3.12.49",
|
"@cypress/code-coverage": "^3.14.6",
|
||||||
"@eslint/js": "^9.26.0",
|
"@eslint/js": "^9.26.0",
|
||||||
"@rollup/plugin-typescript": "^12.1.4",
|
"@rollup/plugin-typescript": "^12.1.4",
|
||||||
"@types/cors": "^2.8.19",
|
"@types/cors": "^2.8.19",
|
||||||
"@types/express": "^5.0.3",
|
"@types/express": "^5.0.3",
|
||||||
"@types/js-yaml": "^4.0.9",
|
"@types/js-yaml": "^4.0.9",
|
||||||
"@types/jsdom": "^21.1.7",
|
"@types/jsdom": "^27.0.0",
|
||||||
"@types/lodash": "^4.17.20",
|
"@types/lodash": "^4.17.20",
|
||||||
"@types/mdast": "^4.0.4",
|
"@types/mdast": "^4.0.4",
|
||||||
"@types/node": "^22.13.17",
|
"@types/node": "^24.10.0",
|
||||||
"@types/rollup-plugin-visualizer": "^5.0.3",
|
"@types/rollup-plugin-visualizer": "^5.0.3",
|
||||||
"@vitest/coverage-v8": "^3.0.9",
|
"@vitest/coverage-v8": "^4.0.7",
|
||||||
"@vitest/spy": "^3.0.9",
|
"@vitest/spy": "^4.0.7",
|
||||||
"@vitest/ui": "^3.0.9",
|
"@vitest/ui": "^4.0.7",
|
||||||
"ajv": "^8.17.1",
|
"ajv": "^8.17.1",
|
||||||
"chokidar": "3.6.0",
|
"chokidar": "3.6.0",
|
||||||
"concurrently": "^9.1.2",
|
"concurrently": "^9.2.1",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"cpy-cli": "^5.0.0",
|
"cpy-cli": "^6.0.0",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^10.1.0",
|
||||||
"cspell": "^9.1.5",
|
"cspell": "^9.2.1",
|
||||||
"cypress": "^14.5.4",
|
"cypress": "^15.5.0",
|
||||||
"cypress-image-snapshot": "^4.0.1",
|
"cypress-image-snapshot": "^4.0.1",
|
||||||
"cypress-split": "^1.24.21",
|
"cypress-split": "^1.24.23",
|
||||||
"esbuild": "^0.25.9",
|
"esbuild": "^0.25.10",
|
||||||
"eslint": "^9.26.0",
|
"eslint": "^9.26.0",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"eslint-plugin-cypress": "^4.3.0",
|
"eslint-plugin-cypress": "^4.3.0",
|
||||||
@@ -106,30 +106,30 @@
|
|||||||
"eslint-plugin-tsdoc": "^0.4.0",
|
"eslint-plugin-tsdoc": "^0.4.0",
|
||||||
"eslint-plugin-unicorn": "^59.0.1",
|
"eslint-plugin-unicorn": "^59.0.1",
|
||||||
"express": "^5.1.0",
|
"express": "^5.1.0",
|
||||||
"globals": "^16.0.0",
|
"globals": "^16.4.0",
|
||||||
"globby": "^14.1.0",
|
"globby": "^15.0.0",
|
||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
"jest": "^30.0.5",
|
"jest": "^30.1.3",
|
||||||
"jison": "^0.4.18",
|
"jison": "^0.4.18",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"jsdom": "^26.1.0",
|
"jsdom": "^27.1.0",
|
||||||
"langium-cli": "3.3.0",
|
"langium-cli": "4.1.0",
|
||||||
"lint-staged": "^16.1.6",
|
"lint-staged": "^16.1.6",
|
||||||
"markdown-table": "^3.0.4",
|
"markdown-table": "^3.0.4",
|
||||||
"nyc": "^17.1.0",
|
"nyc": "^17.1.0",
|
||||||
"path-browserify": "^1.0.1",
|
"path-browserify": "^1.0.1",
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.6.2",
|
||||||
"prettier-plugin-jsdoc": "^1.3.3",
|
"prettier-plugin-jsdoc": "^1.3.3",
|
||||||
"rimraf": "^6.0.1",
|
"rimraf": "^6.0.1",
|
||||||
"rollup-plugin-visualizer": "^6.0.3",
|
"rollup-plugin-visualizer": "^6.0.3",
|
||||||
"start-server-and-test": "^2.0.13",
|
"start-server-and-test": "^2.1.2",
|
||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"tsx": "^4.7.3",
|
"tsx": "^4.20.5",
|
||||||
"typescript": "~5.7.3",
|
"typescript": "~5.7.3",
|
||||||
"typescript-eslint": "^8.38.0",
|
"typescript-eslint": "^8.38.0",
|
||||||
"vite": "^7.0.6",
|
"vite": "^7.0.7",
|
||||||
"vite-plugin-istanbul": "^7.0.0",
|
"vite-plugin-istanbul": "^7.0.0",
|
||||||
"vitest": "^3.0.9"
|
"vitest": "^4.0.7"
|
||||||
},
|
},
|
||||||
"nyc": {
|
"nyc": {
|
||||||
"report-dir": "coverage/cypress"
|
"report-dir": "coverage/cypress"
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
"khroma": "^2.1.0"
|
"khroma": "^2.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"concurrently": "^9.1.2",
|
"concurrently": "^9.2.1",
|
||||||
"mermaid": "workspace:*",
|
"mermaid": "workspace:*",
|
||||||
"rimraf": "^6.0.1"
|
"rimraf": "^6.0.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -18,7 +18,9 @@
|
|||||||
"elk",
|
"elk",
|
||||||
"mermaid"
|
"mermaid"
|
||||||
],
|
],
|
||||||
"scripts": {},
|
"scripts": {
|
||||||
|
"clean": "rimraf dist"
|
||||||
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/mermaid-js/mermaid"
|
"url": "https://github.com/mermaid-js/mermaid"
|
||||||
|
|||||||
@@ -67,7 +67,22 @@ export const render = async (
|
|||||||
|
|
||||||
// Add the element to the DOM
|
// Add the element to the DOM
|
||||||
if (!node.isGroup) {
|
if (!node.isGroup) {
|
||||||
const child = node as NodeWithVertex;
|
// const child = node as NodeWithVertex;
|
||||||
|
const child: NodeWithVertex = {
|
||||||
|
id: node.id,
|
||||||
|
width: node.width,
|
||||||
|
height: node.height,
|
||||||
|
// Store the original node data for later use
|
||||||
|
label: node.label,
|
||||||
|
isGroup: node.isGroup,
|
||||||
|
shape: node.shape,
|
||||||
|
padding: node.padding,
|
||||||
|
cssClasses: node.cssClasses,
|
||||||
|
cssStyles: node.cssStyles,
|
||||||
|
look: node.look,
|
||||||
|
// Include parentId for subgraph processing
|
||||||
|
parentId: node.parentId,
|
||||||
|
};
|
||||||
graph.children.push(child);
|
graph.children.push(child);
|
||||||
nodeDb[node.id] = node;
|
nodeDb[node.id] = node;
|
||||||
|
|
||||||
@@ -150,7 +165,7 @@ export const render = async (
|
|||||||
domId: { node: () => any; attr: (arg0: string, arg1: string) => void };
|
domId: { node: () => any; attr: (arg0: string, arg1: string) => void };
|
||||||
}) {
|
}) {
|
||||||
if (node) {
|
if (node) {
|
||||||
nodeDb[node.id] = node;
|
nodeDb[node.id] ??= {};
|
||||||
nodeDb[node.id].offset = {
|
nodeDb[node.id].offset = {
|
||||||
posX: node.x + relX,
|
posX: node.x + relX,
|
||||||
posY: node.y + relY,
|
posY: node.y + relY,
|
||||||
@@ -860,11 +875,13 @@ export const render = async (
|
|||||||
log.info('APA01 layout result:', JSON.stringify(g, null, 2));
|
log.info('APA01 layout result:', JSON.stringify(g, null, 2));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log.error('APA01 ELK layout error:', error);
|
log.error('APA01 ELK layout error:', error);
|
||||||
|
log.error('APA01 elkGraph that caused error:', JSON.stringify(elkGraph, null, 2));
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
// debugger;
|
// debugger;
|
||||||
await drawNodes(0, 0, g.children, svg, subGraphsEl, 0);
|
await drawNodes(0, 0, g.children, svg, subGraphsEl, 0);
|
||||||
|
|
||||||
g.edges?.map(
|
g.edges?.map(
|
||||||
(edge: {
|
(edge: {
|
||||||
sources: (string | number)[];
|
sources: (string | number)[];
|
||||||
|
|||||||
@@ -19,7 +19,9 @@
|
|||||||
"mermaid",
|
"mermaid",
|
||||||
"layout"
|
"layout"
|
||||||
],
|
],
|
||||||
"scripts": {},
|
"scripts": {
|
||||||
|
"clean": "rimraf dist"
|
||||||
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/mermaid-js/mermaid"
|
"url": "https://github.com/mermaid-js/mermaid"
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@zenuml/core": "^3.35.2"
|
"@zenuml/core": "^3.41.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"mermaid": "workspace:^"
|
"mermaid": "workspace:^"
|
||||||
|
|||||||
@@ -68,10 +68,10 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@braintree/sanitize-url": "^7.1.1",
|
"@braintree/sanitize-url": "^7.1.1",
|
||||||
"@iconify/utils": "^3.0.1",
|
"@iconify/utils": "^3.0.2",
|
||||||
"@mermaid-js/parser": "workspace:^",
|
"@mermaid-js/parser": "workspace:^",
|
||||||
"@types/d3": "^7.4.3",
|
"@types/d3": "^7.4.3",
|
||||||
"cytoscape": "^3.29.3",
|
"cytoscape": "^3.33.1",
|
||||||
"cytoscape-cose-bilkent": "^4.1.0",
|
"cytoscape-cose-bilkent": "^4.1.0",
|
||||||
"cytoscape-fcose": "^2.2.0",
|
"cytoscape-fcose": "^2.2.0",
|
||||||
"d3": "^7.9.0",
|
"d3": "^7.9.0",
|
||||||
@@ -82,11 +82,11 @@
|
|||||||
"katex": "^0.16.22",
|
"katex": "^0.16.22",
|
||||||
"khroma": "^2.1.0",
|
"khroma": "^2.1.0",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"marked": "^16.2.1",
|
"marked": "^16.3.0",
|
||||||
"roughjs": "^4.6.6",
|
"roughjs": "^4.6.6",
|
||||||
"stylis": "^4.3.6",
|
"stylis": "^4.3.6",
|
||||||
"ts-dedent": "^2.2.0",
|
"ts-dedent": "^2.2.0",
|
||||||
"uuid": "^11.1.0"
|
"uuid": "^13.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@adobe/jsonschema2md": "^8.0.5",
|
"@adobe/jsonschema2md": "^8.0.5",
|
||||||
@@ -98,32 +98,32 @@
|
|||||||
"@types/d3-scale-chromatic": "^3.1.0",
|
"@types/d3-scale-chromatic": "^3.1.0",
|
||||||
"@types/d3-selection": "^3.0.11",
|
"@types/d3-selection": "^3.0.11",
|
||||||
"@types/d3-shape": "^3.1.7",
|
"@types/d3-shape": "^3.1.7",
|
||||||
"@types/jsdom": "^21.1.7",
|
"@types/jsdom": "^27.0.0",
|
||||||
"@types/katex": "^0.16.7",
|
"@types/katex": "^0.16.7",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
"@types/micromatch": "^4.0.9",
|
"@types/micromatch": "^4.0.9",
|
||||||
"@types/stylis": "^4.2.7",
|
"@types/stylis": "^4.2.7",
|
||||||
"@types/uuid": "^10.0.0",
|
"@types/uuid": "^11.0.0",
|
||||||
"ajv": "^8.17.1",
|
"ajv": "^8.17.1",
|
||||||
"canvas": "^3.1.2",
|
"canvas": "^3.2.0",
|
||||||
"chokidar": "3.6.0",
|
"chokidar": "3.6.0",
|
||||||
"concurrently": "^9.1.2",
|
"concurrently": "^9.2.1",
|
||||||
"csstree-validator": "^4.0.1",
|
"csstree-validator": "^4.0.1",
|
||||||
"globby": "^14.1.0",
|
"globby": "^15.0.0",
|
||||||
"jison": "^0.4.18",
|
"jison": "^0.4.18",
|
||||||
"js-base64": "^3.7.8",
|
"js-base64": "^3.7.8",
|
||||||
"jsdom": "^26.1.0",
|
"jsdom": "^27.1.0",
|
||||||
"json-schema-to-typescript": "^15.0.4",
|
"json-schema-to-typescript": "^15.0.4",
|
||||||
"micromatch": "^4.0.8",
|
"micromatch": "^4.0.8",
|
||||||
"path-browserify": "^1.0.1",
|
"path-browserify": "^1.0.1",
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.6.2",
|
||||||
"remark": "^15.0.1",
|
"remark": "^15.0.1",
|
||||||
"remark-frontmatter": "^5.0.0",
|
"remark-frontmatter": "^5.0.0",
|
||||||
"remark-gfm": "^4.0.1",
|
"remark-gfm": "^4.0.1",
|
||||||
"rimraf": "^6.0.1",
|
"rimraf": "^6.0.1",
|
||||||
"start-server-and-test": "^2.0.13",
|
"start-server-and-test": "^2.1.2",
|
||||||
"type-fest": "^4.35.0",
|
"type-fest": "^5.2.0",
|
||||||
"typedoc": "^0.28.12",
|
"typedoc": "^0.28.13",
|
||||||
"typedoc-plugin-markdown": "^4.8.1",
|
"typedoc-plugin-markdown": "^4.8.1",
|
||||||
"typescript": "~5.7.3",
|
"typescript": "~5.7.3",
|
||||||
"unist-util-flatmap": "^1.0.0",
|
"unist-util-flatmap": "^1.0.0",
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export const addDiagrams = () => {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (includeLargeFeatures) {
|
if (injected.includeLargeFeatures) {
|
||||||
registerLazyLoadedDiagrams(flowchartElk, mindmap, architecture);
|
registerLazyLoadedDiagrams(flowchartElk, mindmap, architecture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import type {
|
|||||||
ClassRelation,
|
ClassRelation,
|
||||||
ClassNode,
|
ClassNode,
|
||||||
ClassNote,
|
ClassNote,
|
||||||
|
ClassNoteMap,
|
||||||
ClassMap,
|
ClassMap,
|
||||||
NamespaceMap,
|
NamespaceMap,
|
||||||
NamespaceNode,
|
NamespaceNode,
|
||||||
@@ -33,15 +34,16 @@ const sanitizeText = (txt: string) => common.sanitizeText(txt, getConfig());
|
|||||||
|
|
||||||
export class ClassDB implements DiagramDB {
|
export class ClassDB implements DiagramDB {
|
||||||
private relations: ClassRelation[] = [];
|
private relations: ClassRelation[] = [];
|
||||||
private classes = new Map<string, ClassNode>();
|
private classes: ClassMap = new Map<string, ClassNode>();
|
||||||
private readonly styleClasses = new Map<string, StyleClass>();
|
private readonly styleClasses = new Map<string, StyleClass>();
|
||||||
private notes: ClassNote[] = [];
|
private notes: ClassNoteMap = new Map<string, ClassNote>();
|
||||||
private interfaces: Interface[] = [];
|
private interfaces: Interface[] = [];
|
||||||
// private static classCounter = 0;
|
// private static classCounter = 0;
|
||||||
private namespaces = new Map<string, NamespaceNode>();
|
private namespaces = new Map<string, NamespaceNode>();
|
||||||
private namespaceCounter = 0;
|
private namespaceCounter = 0;
|
||||||
|
|
||||||
private functions: any[] = [];
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
||||||
|
private functions: Function[] = [];
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.functions.push(this.setupToolTips.bind(this));
|
this.functions.push(this.setupToolTips.bind(this));
|
||||||
@@ -124,7 +126,7 @@ export class ClassDB implements DiagramDB {
|
|||||||
annotations: [],
|
annotations: [],
|
||||||
styles: [],
|
styles: [],
|
||||||
domId: MERMAID_DOM_ID_PREFIX + name + '-' + classCounter,
|
domId: MERMAID_DOM_ID_PREFIX + name + '-' + classCounter,
|
||||||
} as ClassNode);
|
});
|
||||||
|
|
||||||
classCounter++;
|
classCounter++;
|
||||||
}
|
}
|
||||||
@@ -155,12 +157,12 @@ export class ClassDB implements DiagramDB {
|
|||||||
|
|
||||||
public clear() {
|
public clear() {
|
||||||
this.relations = [];
|
this.relations = [];
|
||||||
this.classes = new Map();
|
this.classes = new Map<string, ClassNode>();
|
||||||
this.notes = [];
|
this.notes = new Map<string, ClassNote>();
|
||||||
this.interfaces = [];
|
this.interfaces = [];
|
||||||
this.functions = [];
|
this.functions = [];
|
||||||
this.functions.push(this.setupToolTips.bind(this));
|
this.functions.push(this.setupToolTips.bind(this));
|
||||||
this.namespaces = new Map();
|
this.namespaces = new Map<string, NamespaceNode>();
|
||||||
this.namespaceCounter = 0;
|
this.namespaceCounter = 0;
|
||||||
this.direction = 'TB';
|
this.direction = 'TB';
|
||||||
commonClear();
|
commonClear();
|
||||||
@@ -178,7 +180,12 @@ export class ClassDB implements DiagramDB {
|
|||||||
return this.relations;
|
return this.relations;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getNotes() {
|
public getNote(id: string | number): ClassNote {
|
||||||
|
const key = typeof id === 'number' ? `note${id}` : id;
|
||||||
|
return this.notes.get(key)!;
|
||||||
|
}
|
||||||
|
|
||||||
|
public getNotes(): ClassNoteMap {
|
||||||
return this.notes;
|
return this.notes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,16 +286,19 @@ export class ClassDB implements DiagramDB {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public addNote(text: string, className: string) {
|
public addNote(text: string, className: string): string {
|
||||||
|
const index = this.notes.size;
|
||||||
const note = {
|
const note = {
|
||||||
id: `note${this.notes.length}`,
|
id: `note${index}`,
|
||||||
class: className,
|
class: className,
|
||||||
text: text,
|
text: text,
|
||||||
|
index: index,
|
||||||
};
|
};
|
||||||
this.notes.push(note);
|
this.notes.set(note.id, note);
|
||||||
|
return note.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public cleanupLabel(label: string) {
|
public cleanupLabel(label: string): string {
|
||||||
if (label.startsWith(':')) {
|
if (label.startsWith(':')) {
|
||||||
label = label.substring(1);
|
label = label.substring(1);
|
||||||
}
|
}
|
||||||
@@ -354,7 +364,7 @@ export class ClassDB implements DiagramDB {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public getTooltip(id: string, namespace?: string) {
|
public getTooltip(id: string, namespace?: string): string | undefined {
|
||||||
if (namespace && this.namespaces.has(namespace)) {
|
if (namespace && this.namespaces.has(namespace)) {
|
||||||
return this.namespaces.get(namespace)!.classes.get(id)!.tooltip;
|
return this.namespaces.get(namespace)!.classes.get(id)!.tooltip;
|
||||||
}
|
}
|
||||||
@@ -534,10 +544,11 @@ export class ClassDB implements DiagramDB {
|
|||||||
|
|
||||||
this.namespaces.set(id, {
|
this.namespaces.set(id, {
|
||||||
id: id,
|
id: id,
|
||||||
classes: new Map(),
|
classes: new Map<string, ClassNode>(),
|
||||||
children: {},
|
notes: new Map<string, ClassNote>(),
|
||||||
|
children: new Map<string, NamespaceNode>(),
|
||||||
domId: MERMAID_DOM_ID_PREFIX + id + '-' + this.namespaceCounter,
|
domId: MERMAID_DOM_ID_PREFIX + id + '-' + this.namespaceCounter,
|
||||||
} as NamespaceNode);
|
});
|
||||||
|
|
||||||
this.namespaceCounter++;
|
this.namespaceCounter++;
|
||||||
}
|
}
|
||||||
@@ -555,16 +566,23 @@ export class ClassDB implements DiagramDB {
|
|||||||
*
|
*
|
||||||
* @param id - ID of the namespace to add
|
* @param id - ID of the namespace to add
|
||||||
* @param classNames - IDs of the class to add
|
* @param classNames - IDs of the class to add
|
||||||
|
* @param noteNames - IDs of the notes to add
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public addClassesToNamespace(id: string, classNames: string[]) {
|
public addClassesToNamespace(id: string, classNames: string[], noteNames: string[]) {
|
||||||
if (!this.namespaces.has(id)) {
|
if (!this.namespaces.has(id)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (const name of classNames) {
|
for (const name of classNames) {
|
||||||
const { className } = this.splitClassNameAndType(name);
|
const { className } = this.splitClassNameAndType(name);
|
||||||
this.classes.get(className)!.parent = id;
|
const classNode = this.getClass(className);
|
||||||
this.namespaces.get(id)!.classes.set(className, this.classes.get(className)!);
|
classNode.parent = id;
|
||||||
|
this.namespaces.get(id)!.classes.set(className, classNode);
|
||||||
|
}
|
||||||
|
for (const noteName of noteNames) {
|
||||||
|
const noteNode = this.getNote(noteName);
|
||||||
|
noteNode.parent = id;
|
||||||
|
this.namespaces.get(id)!.notes.set(noteName, noteNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -617,36 +635,32 @@ export class ClassDB implements DiagramDB {
|
|||||||
const edges: Edge[] = [];
|
const edges: Edge[] = [];
|
||||||
const config = getConfig();
|
const config = getConfig();
|
||||||
|
|
||||||
for (const namespaceKey of this.namespaces.keys()) {
|
for (const namespace of this.namespaces.values()) {
|
||||||
const namespace = this.namespaces.get(namespaceKey);
|
const node: Node = {
|
||||||
if (namespace) {
|
id: namespace.id,
|
||||||
const node: Node = {
|
label: namespace.id,
|
||||||
id: namespace.id,
|
isGroup: true,
|
||||||
label: namespace.id,
|
padding: config.class!.padding ?? 16,
|
||||||
isGroup: true,
|
// parent node must be one of [rect, roundedWithTitle, noteGroup, divider]
|
||||||
padding: config.class!.padding ?? 16,
|
shape: 'rect',
|
||||||
// parent node must be one of [rect, roundedWithTitle, noteGroup, divider]
|
cssStyles: [],
|
||||||
shape: 'rect',
|
look: config.look,
|
||||||
cssStyles: ['fill: none', 'stroke: black'],
|
};
|
||||||
look: config.look,
|
nodes.push(node);
|
||||||
};
|
|
||||||
nodes.push(node);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const classKey of this.classes.keys()) {
|
for (const classNode of this.classes.values()) {
|
||||||
const classNode = this.classes.get(classKey);
|
const node: Node = {
|
||||||
if (classNode) {
|
...classNode,
|
||||||
const node = classNode as unknown as Node;
|
type: undefined,
|
||||||
node.parentId = classNode.parent;
|
isGroup: false,
|
||||||
node.look = config.look;
|
parentId: classNode.parent,
|
||||||
nodes.push(node);
|
look: config.look,
|
||||||
}
|
};
|
||||||
|
nodes.push(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
let cnt = 0;
|
for (const note of this.notes.values()) {
|
||||||
for (const note of this.notes) {
|
|
||||||
cnt++;
|
|
||||||
const noteNode: Node = {
|
const noteNode: Node = {
|
||||||
id: note.id,
|
id: note.id,
|
||||||
label: note.text,
|
label: note.text,
|
||||||
@@ -660,14 +674,15 @@ export class ClassDB implements DiagramDB {
|
|||||||
`stroke: ${config.themeVariables.noteBorderColor}`,
|
`stroke: ${config.themeVariables.noteBorderColor}`,
|
||||||
],
|
],
|
||||||
look: config.look,
|
look: config.look,
|
||||||
|
parentId: note.parent,
|
||||||
};
|
};
|
||||||
nodes.push(noteNode);
|
nodes.push(noteNode);
|
||||||
|
|
||||||
const noteClassId = this.classes.get(note.class)?.id ?? '';
|
const noteClassId = this.classes.get(note.class)?.id;
|
||||||
|
|
||||||
if (noteClassId) {
|
if (noteClassId) {
|
||||||
const edge: Edge = {
|
const edge: Edge = {
|
||||||
id: `edgeNote${cnt}`,
|
id: `edgeNote${note.index}`,
|
||||||
start: note.id,
|
start: note.id,
|
||||||
end: noteClassId,
|
end: noteClassId,
|
||||||
type: 'normal',
|
type: 'normal',
|
||||||
@@ -697,7 +712,7 @@ export class ClassDB implements DiagramDB {
|
|||||||
nodes.push(interfaceNode);
|
nodes.push(interfaceNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
cnt = 0;
|
let cnt = 0;
|
||||||
for (const classRelation of this.relations) {
|
for (const classRelation of this.relations) {
|
||||||
cnt++;
|
cnt++;
|
||||||
const edge: Edge = {
|
const edge: Edge = {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user