mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-23 17:29:54 +02:00
Compare commits
1 Commits
fix/er-dia
...
sidv/eslin
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e5840277df |
@@ -33,11 +33,6 @@ export const packageOptions = {
|
|||||||
packageName: 'mermaid-layout-elk',
|
packageName: 'mermaid-layout-elk',
|
||||||
file: 'layouts.ts',
|
file: 'layouts.ts',
|
||||||
},
|
},
|
||||||
'mermaid-layout-tidy-tree': {
|
|
||||||
name: 'mermaid-layout-tidy-tree',
|
|
||||||
packageName: 'mermaid-layout-tidy-tree',
|
|
||||||
file: 'index.ts',
|
|
||||||
},
|
|
||||||
examples: {
|
examples: {
|
||||||
name: 'mermaid-examples',
|
name: 'mermaid-examples',
|
||||||
packageName: 'examples',
|
packageName: 'examples',
|
||||||
|
5
.changeset/beige-peas-shave.md
Normal file
5
.changeset/beige-peas-shave.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@mermaid-js/mermaid-zenuml': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixed a critical bug that the ZenUML diagram is not rendered.
|
6
.changeset/busy-clocks-melt.md
Normal file
6
.changeset/busy-clocks-melt.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
'@mermaid-js/layout-elk': patch
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
feat: Exposing elk configuration forceNodeModelOrder and considerModelOrder to the mermaid configuration
|
5
.changeset/chatty-lemons-stick.md
Normal file
5
.changeset/chatty-lemons-stick.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
chore: Remove the "-beta" suffix from the XYChart, Block, Sankey diagrams to reflect their stable status
|
5
.changeset/cold-sites-accept.md
Normal file
5
.changeset/cold-sites-accept.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Position the edge label in state diagram correctly relative to the edge
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
chore: Fix mindmap rendering in docs and apply tidytree layout
|
|
5
.changeset/empty-clouds-cry.md
Normal file
5
.changeset/empty-clouds-cry.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Apply correct dateFormat in Gantt chart to show only day when specified
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
fix: Ensure edge label color is applied when using classDef with edge IDs
|
|
5
.changeset/fuzzy-pears-cough.md
Normal file
5
.changeset/fuzzy-pears-cough.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: handle exclude dates properly in Gantt charts when using dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
5
.changeset/gold-spiders-join.md
Normal file
5
.changeset/gold-spiders-join.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: fixed connection gaps in flowchart for roundedRect, stadium and diamond shape
|
7
.changeset/good-weeks-tickle.md
Normal file
7
.changeset/good-weeks-tickle.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: sanitize icon labels and icon SVGs
|
||||||
|
|
||||||
|
Resolves CVE-2025-54880 reported by @fourcube
|
5
.changeset/large-mirrors-cheer.md
Normal file
5
.changeset/large-mirrors-cheer.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Update casing of ID in requirement diagram
|
5
.changeset/lemon-masks-unite.md
Normal file
5
.changeset/lemon-masks-unite.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
feat: Added support for per link curve styling in flowchart diagram using edge ids
|
5
.changeset/light-flowers-judge.md
Normal file
5
.changeset/light-flowers-judge.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Make flowchart elk detector regex match less greedy
|
8
.changeset/lovely-queens-own.md
Normal file
8
.changeset/lovely-queens-own.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(block): overflowing blocks no longer affect later lines
|
||||||
|
|
||||||
|
This may change the layout of block diagrams that have overflowing lines
|
||||||
|
(i.e. block diagrams that use up more columns that the `columns` specifier).
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
fix: Resolve gantt chart crash due to invalid array length
|
|
7
.changeset/ninety-roses-turn.md
Normal file
7
.changeset/ninety-roses-turn.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: log warning for blocks exceeding column width
|
||||||
|
|
||||||
|
This update adds a validation check that logs a warning message when a block's width exceeds the defined column layout.
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
feat: Add IDs in architecture diagrams
|
|
5
.changeset/rare-women-fly.md
Normal file
5
.changeset/rare-women-fly.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Add escaped class literal name on namespace
|
5
.changeset/red-zebras-happen.md
Normal file
5
.changeset/red-zebras-happen.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Allow equals sign in sequenceDiagram labels
|
@@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
chore: revert marked dependency from ^15.0.7 to ^16.0.0
|
|
||||||
|
|
||||||
- Reverted marked package version to ^16.0.0 for better compatibility
|
|
||||||
- This is a dependency update that maintains API compatibility
|
|
||||||
- All tests pass with the updated version
|
|
9
.changeset/seven-papayas-film.md
Normal file
9
.changeset/seven-papayas-film.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Add validation for negative values in pie charts:
|
||||||
|
|
||||||
|
Prevents crashes during parsing by validating values post-parsing.
|
||||||
|
|
||||||
|
Provides clearer, user-friendly error messages for invalid negative inputs.
|
5
.changeset/silver-eyes-build.md
Normal file
5
.changeset/silver-eyes-build.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
chore: migrate to class-based ArchitectureDB implementation
|
5
.changeset/six-planets-rescue.md
Normal file
5
.changeset/six-planets-rescue.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: node border style for handdrawn shapes
|
5
.changeset/smart-humans-cover.md
Normal file
5
.changeset/smart-humans-cover.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Update flowchart direction TD's behavior to be the same as TB
|
5
.changeset/spicy-ties-see.md
Normal file
5
.changeset/spicy-ties-see.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@mermaid-js/layout-elk': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Make elk not force node model order, but strongly consider it instead
|
5
.changeset/strong-dryers-pay.md
Normal file
5
.changeset/strong-dryers-pay.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: correctly render non-directional lines for '---' in block diagrams
|
9
.changeset/strong-laws-confess.md
Normal file
9
.changeset/strong-laws-confess.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: fallback to raw text instead of rendering _Unsupported markdown_ or empty blocks
|
||||||
|
|
||||||
|
Instead of printing **Unsupported markdown: XXX**, or empty blocks when using a markdown feature
|
||||||
|
that Mermaid does not yet support when `htmlLabels: true`(default) or `htmlLabels: false`,
|
||||||
|
fallback to the raw markdown text.
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
fix(er-diagram): prevent syntax error when using 'u', numbers, and decimals in node names
|
|
7
.changeset/tidy-weeks-play.md
Normal file
7
.changeset/tidy-weeks-play.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: sanitize KATEX blocks
|
||||||
|
|
||||||
|
Resolves CVE-2025-54881 reported by @fourcube
|
5
.changeset/vast-buses-see.md
Normal file
5
.changeset/vast-buses-see.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
chore: Update packet diagram to use new class-based database structure
|
@@ -2,7 +2,6 @@
|
|||||||
Ashish Jain
|
Ashish Jain
|
||||||
cpettitt
|
cpettitt
|
||||||
Dong Cai
|
Dong Cai
|
||||||
fourcube
|
|
||||||
knsv
|
knsv
|
||||||
Knut Sveidqvist
|
Knut Sveidqvist
|
||||||
Nikolay Rozhkov
|
Nikolay Rozhkov
|
||||||
|
@@ -24,6 +24,7 @@ Doctave
|
|||||||
DokuWiki
|
DokuWiki
|
||||||
dompurify
|
dompurify
|
||||||
elkjs
|
elkjs
|
||||||
|
eslintcache
|
||||||
fcose
|
fcose
|
||||||
fontawesome
|
fontawesome
|
||||||
Fonticons
|
Fonticons
|
||||||
|
@@ -5,10 +5,8 @@ bmatrix
|
|||||||
braintree
|
braintree
|
||||||
catmull
|
catmull
|
||||||
compositTitleSize
|
compositTitleSize
|
||||||
cose
|
|
||||||
curv
|
curv
|
||||||
doublecircle
|
doublecircle
|
||||||
elem
|
|
||||||
elems
|
elems
|
||||||
gantt
|
gantt
|
||||||
gitgraph
|
gitgraph
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
BRANDES
|
BRANDES
|
||||||
Buzan
|
|
||||||
circo
|
circo
|
||||||
handDrawn
|
handDrawn
|
||||||
KOEPF
|
KOEPF
|
||||||
|
1
.github/lychee.toml
vendored
1
.github/lychee.toml
vendored
@@ -59,7 +59,6 @@ exclude = [
|
|||||||
"https://huehive.co",
|
"https://huehive.co",
|
||||||
"https://foswiki.org",
|
"https://foswiki.org",
|
||||||
"https://www.gnu.org",
|
"https://www.gnu.org",
|
||||||
"https://redmine.org",
|
|
||||||
"https://mermaid-preview.com"
|
"https://mermaid-preview.com"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
6
.github/workflows/codeql.yml
vendored
6
.github/workflows/codeql.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
|
|
||||||
# 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@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
|
||||||
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@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
|
||||||
|
|
||||||
# ℹ️ 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@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
|
||||||
|
5
.github/workflows/e2e-applitools.yml
vendored
5
.github/workflows/e2e-applitools.yml
vendored
@@ -23,6 +23,9 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
e2e-applitools:
|
e2e-applitools:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
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
|
||||||
steps:
|
steps:
|
||||||
- if: ${{ ! env.USE_APPLI }}
|
- if: ${{ ! env.USE_APPLI }}
|
||||||
name: Warn if not using Applitools
|
name: Warn if not using Applitools
|
||||||
@@ -53,7 +56,7 @@ jobs:
|
|||||||
args: -X POST "$APPLITOOLS_SERVER_URL/api/externals/github/push?apiKey=$APPLITOOLS_API_KEY&CommitSha=$GITHUB_SHA&BranchName=${APPLITOOLS_BRANCH}$&ParentBranchName=$APPLITOOLS_PARENT_BRANCH"
|
args: -X POST "$APPLITOOLS_SERVER_URL/api/externals/github/push?apiKey=$APPLITOOLS_API_KEY&CommitSha=$GITHUB_SHA&BranchName=${APPLITOOLS_BRANCH}$&ParentBranchName=$APPLITOOLS_PARENT_BRANCH"
|
||||||
|
|
||||||
- name: Cypress run
|
- name: Cypress run
|
||||||
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16
|
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
||||||
id: cypress
|
id: cypress
|
||||||
with:
|
with:
|
||||||
start: pnpm run dev
|
start: pnpm run dev
|
||||||
|
6
.github/workflows/e2e-timings.yml
vendored
6
.github/workflows/e2e-timings.yml
vendored
@@ -27,12 +27,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16
|
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
||||||
with:
|
with:
|
||||||
runTests: false
|
runTests: false
|
||||||
|
|
||||||
- name: Cypress run
|
- name: Cypress run
|
||||||
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16
|
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
||||||
id: cypress
|
id: cypress
|
||||||
with:
|
with:
|
||||||
install: false
|
install: false
|
||||||
@@ -58,7 +58,7 @@ jobs:
|
|||||||
echo "EOF" >> $GITHUB_OUTPUT
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Commit and create pull request
|
- name: Commit and create pull request
|
||||||
uses: peter-evans/create-pull-request@915d841dae6a4f191bb78faf61a257411d7be4d2
|
uses: peter-evans/create-pull-request@1310d7dab503600742045e6fd4b84dda64352858
|
||||||
with:
|
with:
|
||||||
add-paths: |
|
add-paths: |
|
||||||
cypress/timings.json
|
cypress/timings.json
|
||||||
|
10
.github/workflows/e2e.yml
vendored
10
.github/workflows/e2e.yml
vendored
@@ -45,7 +45,7 @@ jobs:
|
|||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
- name: Cache snapshots
|
- name: Cache snapshots
|
||||||
id: cache-snapshot
|
id: cache-snapshot
|
||||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
|
||||||
with:
|
with:
|
||||||
path: ./cypress/snapshots
|
path: ./cypress/snapshots
|
||||||
key: ${{ runner.os }}-snapshots-${{ env.targetHash }}
|
key: ${{ runner.os }}-snapshots-${{ env.targetHash }}
|
||||||
@@ -59,7 +59,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }}
|
if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }}
|
||||||
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16
|
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
||||||
with:
|
with:
|
||||||
# just perform install
|
# just perform install
|
||||||
runTests: false
|
runTests: false
|
||||||
@@ -95,13 +95,13 @@ jobs:
|
|||||||
# These cached snapshots are downloaded, providing the reference snapshots.
|
# These cached snapshots are downloaded, providing the reference snapshots.
|
||||||
- name: Cache snapshots
|
- name: Cache snapshots
|
||||||
id: cache-snapshot
|
id: cache-snapshot
|
||||||
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
uses: actions/cache/restore@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
|
||||||
with:
|
with:
|
||||||
path: ./cypress/snapshots
|
path: ./cypress/snapshots
|
||||||
key: ${{ runner.os }}-snapshots-${{ env.targetHash }}
|
key: ${{ runner.os }}-snapshots-${{ env.targetHash }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16
|
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
||||||
with:
|
with:
|
||||||
runTests: false
|
runTests: false
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ jobs:
|
|||||||
# Install NPM dependencies, cache them correctly
|
# Install NPM dependencies, cache them correctly
|
||||||
# and run all Cypress tests
|
# and run all Cypress tests
|
||||||
- name: Cypress run
|
- name: Cypress run
|
||||||
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16
|
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
||||||
id: cypress
|
id: cypress
|
||||||
with:
|
with:
|
||||||
install: false
|
install: false
|
||||||
|
2
.github/workflows/link-checker.yml
vendored
2
.github/workflows/link-checker.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
|||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
- name: Restore lychee cache
|
- name: Restore lychee cache
|
||||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
|
||||||
with:
|
with:
|
||||||
path: .lycheecache
|
path: .lycheecache
|
||||||
key: cache-lychee-${{ github.sha }}
|
key: cache-lychee-${{ github.sha }}
|
||||||
|
8
.github/workflows/lint.yml
vendored
8
.github/workflows/lint.yml
vendored
@@ -40,6 +40,14 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CYPRESS_CACHE_FOLDER: .cache/Cypress
|
CYPRESS_CACHE_FOLDER: .cache/Cypress
|
||||||
|
|
||||||
|
- name: Setup ESLint cache
|
||||||
|
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||||
|
with:
|
||||||
|
path: .eslintcache
|
||||||
|
key: ${{ runner.os }}-eslint-${{ hashFiles('pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-eslint-
|
||||||
|
|
||||||
- name: Run Linting
|
- name: Run Linting
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create Release Pull Request or Publish to npm
|
- name: Create Release Pull Request or Publish to npm
|
||||||
id: changesets
|
id: changesets
|
||||||
uses: changesets/action@06245a4e0a36c064a573d4150030f5ec548e4fcc # v1.4.10
|
uses: changesets/action@c8bada60c408975afd1a20b3db81d6eee6789308 # v1.4.9
|
||||||
with:
|
with:
|
||||||
version: pnpm changeset:version
|
version: pnpm changeset:version
|
||||||
publish: pnpm changeset:publish
|
publish: pnpm changeset:publish
|
||||||
|
6
.github/workflows/scorecard.yml
vendored
6
.github/workflows/scorecard.yml
vendored
@@ -20,18 +20,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Run analysis
|
- name: Run analysis
|
||||||
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
|
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
|
||||||
with:
|
with:
|
||||||
results_file: results.sarif
|
results_file: results.sarif
|
||||||
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@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
|
||||||
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@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
2
.github/workflows/update-browserlist.yml
vendored
2
.github/workflows/update-browserlist.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
message: 'chore: update browsers list'
|
message: 'chore: update browsers list'
|
||||||
push: false
|
push: false
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
|
||||||
with:
|
with:
|
||||||
branch: update-browserslist
|
branch: update-browserslist
|
||||||
title: Update Browserslist
|
title: Update Browserslist
|
||||||
|
2
.github/workflows/validate-lockfile.yml
vendored
2
.github/workflows/validate-lockfile.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
|
|
||||||
# 2) No unwanted vitepress paths
|
# 2) No unwanted vitepress paths
|
||||||
if grep -qF 'packages/mermaid/src/vitepress' pnpm-lock.yaml; then
|
if grep -qF 'packages/mermaid/src/vitepress' pnpm-lock.yaml; then
|
||||||
issues+=("• Disallowed path 'packages/mermaid/src/vitepress' present. Run \`rm -rf packages/mermaid/src/vitepress && pnpm install\` to regenerate.")
|
issues+=("• Disallowed path 'packages/mermaid/src/vitepress' present. Run `rm -rf packages/mermaid/src/vitepress && pnpm install` to regenerate.")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 3) Lockfile only changes when package.json changes
|
# 3) Lockfile only changes when package.json changes
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,7 +4,6 @@ node_modules/
|
|||||||
coverage/
|
coverage/
|
||||||
.idea/
|
.idea/
|
||||||
.pnpm-store/
|
.pnpm-store/
|
||||||
.instructions/
|
|
||||||
|
|
||||||
dist
|
dist
|
||||||
v8-compile-cache-0
|
v8-compile-cache-0
|
||||||
|
@@ -7,5 +7,6 @@ export default {
|
|||||||
'prettier --write',
|
'prettier --write',
|
||||||
],
|
],
|
||||||
'.cspell/*.txt': ['tsx scripts/fixCSpell.ts'],
|
'.cspell/*.txt': ['tsx scripts/fixCSpell.ts'],
|
||||||
|
'**/*.md': ['pnpm cspell'],
|
||||||
'**/*.jison': ['pnpm -w run lint:jison'],
|
'**/*.jison': ['pnpm -w run lint:jison'],
|
||||||
};
|
};
|
||||||
|
@@ -113,7 +113,8 @@ describe('Configuration', () => {
|
|||||||
cy.get('path')
|
cy.get('path')
|
||||||
.first()
|
.first()
|
||||||
.should('have.attr', 'marker-end')
|
.should('have.attr', 'marker-end')
|
||||||
.and('include', 'url(http://localhost');
|
.should('exist')
|
||||||
|
.and('include', 'url(http\\:\\/\\/localhost');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('should not taint the initial configuration when using multiple directives', () => {
|
it('should not taint the initial configuration when using multiple directives', () => {
|
||||||
|
@@ -524,18 +524,5 @@ describe('Class diagram', () => {
|
|||||||
`,
|
`,
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
it('should handle an empty class body with empty braces', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
` classDiagram
|
|
||||||
class FooBase~T~ {}
|
|
||||||
class Bar {
|
|
||||||
+Zip
|
|
||||||
+Zap()
|
|
||||||
}
|
|
||||||
FooBase <|-- Ba
|
|
||||||
`,
|
|
||||||
{ flowchart: { defaultRenderer: 'elk' } }
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -369,92 +369,4 @@ 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 }
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
@@ -109,7 +109,7 @@ describe('Flowchart ELK', () => {
|
|||||||
const style = svg.attr('style');
|
const style = svg.attr('style');
|
||||||
expect(style).to.match(/^max-width: [\d.]+px;$/);
|
expect(style).to.match(/^max-width: [\d.]+px;$/);
|
||||||
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
|
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
|
||||||
verifyNumber(maxWidthValue, 380, 15);
|
verifyNumber(maxWidthValue, 380);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('8-elk: should render a flowchart when useMaxWidth is false', () => {
|
it('8-elk: should render a flowchart when useMaxWidth is false', () => {
|
||||||
@@ -128,7 +128,7 @@ describe('Flowchart ELK', () => {
|
|||||||
const width = parseFloat(svg.attr('width'));
|
const width = parseFloat(svg.attr('width'));
|
||||||
// use within because the absolute value can be slightly different depending on the environment ±5%
|
// use within because the absolute value can be slightly different depending on the environment ±5%
|
||||||
// expect(height).to.be.within(446 * 0.95, 446 * 1.05);
|
// expect(height).to.be.within(446 * 0.95, 446 * 1.05);
|
||||||
verifyNumber(width, 380, 15);
|
verifyNumber(width, 380);
|
||||||
expect(svg).to.not.have.attr('style');
|
expect(svg).to.not.have.attr('style');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -1186,17 +1186,4 @@ end
|
|||||||
imgSnapshotTest(graph, { htmlLabels: false });
|
imgSnapshotTest(graph, { htmlLabels: false });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('V2 - 17: should apply class def colour to edge label', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
` graph LR
|
|
||||||
id1(Start) link@-- "Label" -->id2(Stop)
|
|
||||||
style id1 fill:#f9f,stroke:#333,stroke-width:4px
|
|
||||||
|
|
||||||
class id2 myClass
|
|
||||||
classDef myClass fill:#bbf,stroke:#f66,stroke-width:2px,color:white,stroke-dasharray: 5 5
|
|
||||||
class link myClass
|
|
||||||
`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
@@ -803,34 +803,4 @@ describe('Gantt diagram', () => {
|
|||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('should handle numeric timestamps with dateFormat x', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
gantt
|
|
||||||
title Process time profile (ms)
|
|
||||||
dateFormat x
|
|
||||||
axisFormat %L
|
|
||||||
tickInterval 250millisecond
|
|
||||||
|
|
||||||
section Pipeline
|
|
||||||
Parse JSON p1: 000, 120
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
it('should handle numeric timestamps with dateFormat X', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
gantt
|
|
||||||
title Process time profile (ms)
|
|
||||||
dateFormat X
|
|
||||||
axisFormat %L
|
|
||||||
tickInterval 250millisecond
|
|
||||||
|
|
||||||
section Pipeline
|
|
||||||
Parse JSON p1: 000, 120
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
@@ -1,79 +0,0 @@
|
|||||||
import { imgSnapshotTest } from '../../helpers/util.ts';
|
|
||||||
|
|
||||||
describe('Mindmap Tidy Tree', () => {
|
|
||||||
it('1-tidy-tree: should render a simple mindmap without children', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
` ---
|
|
||||||
config:
|
|
||||||
layout: tidy-tree
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap))
|
|
||||||
A
|
|
||||||
B
|
|
||||||
`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
it('2-tidy-tree: should render a simple mindmap', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
` ---
|
|
||||||
config:
|
|
||||||
layout: tidy-tree
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap is a long thing))
|
|
||||||
A
|
|
||||||
B
|
|
||||||
C
|
|
||||||
D
|
|
||||||
`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
it('3-tidy-tree: should render a mindmap with different shapes', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
` ---
|
|
||||||
config:
|
|
||||||
layout: tidy-tree
|
|
||||||
---
|
|
||||||
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
|
|
||||||
`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
it('4-tidy-tree: should render a mindmap with children', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
` ---
|
|
||||||
config:
|
|
||||||
layout: tidy-tree
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
((This is a mindmap))
|
|
||||||
child1
|
|
||||||
grandchild 1
|
|
||||||
grandchild 2
|
|
||||||
child2
|
|
||||||
grandchild 3
|
|
||||||
grandchild 4
|
|
||||||
child3
|
|
||||||
grandchild 5
|
|
||||||
grandchild 6
|
|
||||||
`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
@@ -159,10 +159,12 @@ root
|
|||||||
});
|
});
|
||||||
it('square shape', () => {
|
it('square shape', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`mindmap
|
`
|
||||||
|
mindmap
|
||||||
root[
|
root[
|
||||||
The root
|
The root
|
||||||
]`,
|
]
|
||||||
|
`,
|
||||||
{},
|
{},
|
||||||
undefined,
|
undefined,
|
||||||
shouldHaveRoot
|
shouldHaveRoot
|
||||||
@@ -170,10 +172,12 @@ root
|
|||||||
});
|
});
|
||||||
it('rounded rect shape', () => {
|
it('rounded rect shape', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`mindmap
|
`
|
||||||
|
mindmap
|
||||||
root((
|
root((
|
||||||
The root
|
The root
|
||||||
))`,
|
))
|
||||||
|
`,
|
||||||
{},
|
{},
|
||||||
undefined,
|
undefined,
|
||||||
shouldHaveRoot
|
shouldHaveRoot
|
||||||
@@ -181,10 +185,12 @@ root
|
|||||||
});
|
});
|
||||||
it('circle shape', () => {
|
it('circle shape', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`mindmap
|
`
|
||||||
|
mindmap
|
||||||
root(
|
root(
|
||||||
The root
|
The root
|
||||||
)`,
|
)
|
||||||
|
`,
|
||||||
{},
|
{},
|
||||||
undefined,
|
undefined,
|
||||||
shouldHaveRoot
|
shouldHaveRoot
|
||||||
@@ -192,8 +198,10 @@ root
|
|||||||
});
|
});
|
||||||
it('default shape', () => {
|
it('default shape', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`mindmap
|
`
|
||||||
The root`,
|
mindmap
|
||||||
|
The root
|
||||||
|
`,
|
||||||
{},
|
{},
|
||||||
undefined,
|
undefined,
|
||||||
shouldHaveRoot
|
shouldHaveRoot
|
||||||
@@ -201,10 +209,12 @@ root
|
|||||||
});
|
});
|
||||||
it('adding children', () => {
|
it('adding children', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`mindmap
|
`
|
||||||
|
mindmap
|
||||||
The root
|
The root
|
||||||
child1
|
child1
|
||||||
child2`,
|
child2
|
||||||
|
`,
|
||||||
{},
|
{},
|
||||||
undefined,
|
undefined,
|
||||||
shouldHaveRoot
|
shouldHaveRoot
|
||||||
@@ -212,11 +222,13 @@ root
|
|||||||
});
|
});
|
||||||
it('adding grand children', () => {
|
it('adding grand children', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`mindmap
|
`
|
||||||
|
mindmap
|
||||||
The root
|
The root
|
||||||
child1
|
child1
|
||||||
child2
|
child2
|
||||||
child3`,
|
child3
|
||||||
|
`,
|
||||||
{},
|
{},
|
||||||
undefined,
|
undefined,
|
||||||
shouldHaveRoot
|
shouldHaveRoot
|
||||||
@@ -228,21 +240,25 @@ root
|
|||||||
`mindmap
|
`mindmap
|
||||||
id1[\`**Start** with
|
id1[\`**Start** with
|
||||||
a second line 😎\`]
|
a second line 😎\`]
|
||||||
id2[\`The dog in **the** hog... a *very long text* about it Word!\`]`
|
id2[\`The dog in **the** hog... a *very long text* about it
|
||||||
|
Word!\`]
|
||||||
|
`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe('Include char sequence "graph" in text (#6795)', () => {
|
describe('Include char sequence "graph" in text (#6795)', () => {
|
||||||
it('has a label with char sequence "graph"', () => {
|
it('has a label with char sequence "graph"', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
` mindmap
|
`
|
||||||
|
mindmap
|
||||||
root
|
root
|
||||||
Photograph
|
Photograph
|
||||||
Waterfall
|
Waterfall
|
||||||
Landscape
|
Landscape
|
||||||
Geography
|
Geography
|
||||||
Mountains
|
Mountains
|
||||||
Rocks`,
|
Rocks
|
||||||
|
`,
|
||||||
{ flowchart: { defaultRenderer: 'elk' } }
|
{ flowchart: { defaultRenderer: 'elk' } }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@@ -1,659 +0,0 @@
|
|||||||
import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts';
|
|
||||||
|
|
||||||
const looks = ['classic'];
|
|
||||||
const participantTypes = [
|
|
||||||
{ type: 'participant', display: 'participant' },
|
|
||||||
{ type: 'actor', display: 'actor' },
|
|
||||||
{ type: 'boundary', display: 'boundary' },
|
|
||||||
{ type: 'control', display: 'control' },
|
|
||||||
{ type: 'entity', display: 'entity' },
|
|
||||||
{ type: 'database', display: 'database' },
|
|
||||||
{ type: 'collections', display: 'collections' },
|
|
||||||
{ type: 'queue', display: 'queue' },
|
|
||||||
];
|
|
||||||
|
|
||||||
const restrictedTypes = ['boundary', 'control', 'entity', 'database', 'collections', 'queue'];
|
|
||||||
|
|
||||||
const interactionTypes = ['->>', '-->>', '->', '-->', '-x', '--x', '->>+', '-->>+'];
|
|
||||||
|
|
||||||
const notePositions = ['left of', 'right of', 'over'];
|
|
||||||
|
|
||||||
function getParticipantLine(name, type, alias) {
|
|
||||||
if (restrictedTypes.includes(type)) {
|
|
||||||
return ` participant ${name}@{ "type" : "${type}" }\n`;
|
|
||||||
} else if (alias) {
|
|
||||||
return ` participant ${name}@{ "type" : "${type}" } \n`;
|
|
||||||
} else {
|
|
||||||
return ` participant ${name}@{ "type" : "${type}" }\n`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
looks.forEach((look) => {
|
|
||||||
describe(`Sequence Diagram Tests - ${look} look`, () => {
|
|
||||||
it('should render all participant types', () => {
|
|
||||||
let diagramCode = `sequenceDiagram\n`;
|
|
||||||
participantTypes.forEach((pt, index) => {
|
|
||||||
const name = `${pt.display}${index}`;
|
|
||||||
diagramCode += getParticipantLine(name, pt.type);
|
|
||||||
});
|
|
||||||
for (let i = 0; i < participantTypes.length - 1; i++) {
|
|
||||||
diagramCode += ` ${participantTypes[i].display}${i} ->> ${participantTypes[i + 1].display}${i + 1}: Message ${i}\n`;
|
|
||||||
}
|
|
||||||
imgSnapshotTest(diagramCode, { look, sequence: { diagramMarginX: 50, diagramMarginY: 10 } });
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render all interaction types', () => {
|
|
||||||
let diagramCode = `sequenceDiagram\n`;
|
|
||||||
diagramCode += getParticipantLine('A', 'actor');
|
|
||||||
diagramCode += getParticipantLine('B', 'boundary');
|
|
||||||
interactionTypes.forEach((interaction, index) => {
|
|
||||||
diagramCode += ` A ${interaction} B: ${interaction} message ${index}\n`;
|
|
||||||
});
|
|
||||||
imgSnapshotTest(diagramCode, { look });
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render participant creation and destruction', () => {
|
|
||||||
let diagramCode = `sequenceDiagram\n`;
|
|
||||||
participantTypes.forEach((pt, index) => {
|
|
||||||
const name = `${pt.display}${index}`;
|
|
||||||
diagramCode += getParticipantLine('A', pt.type);
|
|
||||||
diagramCode += getParticipantLine('B', pt.type);
|
|
||||||
diagramCode += ` create participant ${name}@{ "type" : "${pt.type}" }\n`;
|
|
||||||
diagramCode += ` A ->> ${name}: Hello ${pt.display}\n`;
|
|
||||||
if (index % 2 === 0) {
|
|
||||||
diagramCode += ` destroy ${name}\n`;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
imgSnapshotTest(diagramCode, { look });
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render notes in all positions', () => {
|
|
||||||
let diagramCode = `sequenceDiagram\n`;
|
|
||||||
diagramCode += getParticipantLine('A', 'actor');
|
|
||||||
diagramCode += getParticipantLine('B', 'boundary');
|
|
||||||
notePositions.forEach((position, index) => {
|
|
||||||
diagramCode += ` Note ${position} A: Note ${position} ${index}\n`;
|
|
||||||
});
|
|
||||||
diagramCode += ` A ->> B: Message with notes\n`;
|
|
||||||
imgSnapshotTest(diagramCode, { look });
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render parallel interactions', () => {
|
|
||||||
let diagramCode = `sequenceDiagram\n`;
|
|
||||||
participantTypes.slice(0, 4).forEach((pt, index) => {
|
|
||||||
diagramCode += getParticipantLine(`${pt.display}${index}`, pt.type);
|
|
||||||
});
|
|
||||||
diagramCode += ` par Parallel actions\n`;
|
|
||||||
for (let i = 0; i < 3; i += 2) {
|
|
||||||
diagramCode += ` ${participantTypes[i].display}${i} ->> ${participantTypes[i + 1].display}${i + 1}: Message ${i}\n`;
|
|
||||||
if (i < participantTypes.length - 2) {
|
|
||||||
diagramCode += ` and\n`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
diagramCode += ` end\n`;
|
|
||||||
imgSnapshotTest(diagramCode, { look });
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render alternative flows', () => {
|
|
||||||
let diagramCode = `sequenceDiagram\n`;
|
|
||||||
diagramCode += getParticipantLine('A', 'actor');
|
|
||||||
diagramCode += getParticipantLine('B', 'boundary');
|
|
||||||
diagramCode += ` alt Successful case\n`;
|
|
||||||
diagramCode += ` A ->> B: Request\n`;
|
|
||||||
diagramCode += ` B -->> A: Success\n`;
|
|
||||||
diagramCode += ` else Failure case\n`;
|
|
||||||
diagramCode += ` A ->> B: Request\n`;
|
|
||||||
diagramCode += ` B --x A: Failure\n`;
|
|
||||||
diagramCode += ` end\n`;
|
|
||||||
imgSnapshotTest(diagramCode, { look });
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render loops', () => {
|
|
||||||
let diagramCode = `sequenceDiagram\n`;
|
|
||||||
participantTypes.slice(0, 3).forEach((pt, index) => {
|
|
||||||
diagramCode += getParticipantLine(`${pt.display}${index}`, pt.type);
|
|
||||||
});
|
|
||||||
diagramCode += ` loop For each participant\n`;
|
|
||||||
for (let i = 0; i < 3; i++) {
|
|
||||||
diagramCode += ` ${participantTypes[0].display}0 ->> ${participantTypes[1].display}1: Message ${i}\n`;
|
|
||||||
}
|
|
||||||
diagramCode += ` end\n`;
|
|
||||||
imgSnapshotTest(diagramCode, { look });
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render boxes around groups', () => {
|
|
||||||
let diagramCode = `sequenceDiagram\n`;
|
|
||||||
diagramCode += ` box Group 1\n`;
|
|
||||||
participantTypes.slice(0, 3).forEach((pt, index) => {
|
|
||||||
diagramCode += ` ${getParticipantLine(`${pt.display}${index}`, pt.type)}`;
|
|
||||||
});
|
|
||||||
diagramCode += ` end\n`;
|
|
||||||
diagramCode += ` box rgb(200,220,255) Group 2\n`;
|
|
||||||
participantTypes.slice(3, 6).forEach((pt, index) => {
|
|
||||||
diagramCode += ` ${getParticipantLine(`${pt.display}${index}`, pt.type)}`;
|
|
||||||
});
|
|
||||||
diagramCode += ` end\n`;
|
|
||||||
diagramCode += ` ${participantTypes[0].display}0 ->> ${participantTypes[3].display}0: Cross-group message\n`;
|
|
||||||
imgSnapshotTest(diagramCode, { look });
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render with different font settings', () => {
|
|
||||||
let diagramCode = `sequenceDiagram\n`;
|
|
||||||
participantTypes.slice(0, 3).forEach((pt, index) => {
|
|
||||||
diagramCode += getParticipantLine(`${pt.display}${index}`, pt.type);
|
|
||||||
});
|
|
||||||
diagramCode += ` ${participantTypes[0].display}0 ->> ${participantTypes[1].display}1: Regular message\n`;
|
|
||||||
diagramCode += ` Note right of ${participantTypes[1].display}1: Regular note\n`;
|
|
||||||
imgSnapshotTest(diagramCode, {
|
|
||||||
look,
|
|
||||||
sequence: {
|
|
||||||
actorFontFamily: 'courier',
|
|
||||||
actorFontSize: 14,
|
|
||||||
messageFontFamily: 'Arial',
|
|
||||||
messageFontSize: 12,
|
|
||||||
noteFontFamily: 'times',
|
|
||||||
noteFontSize: 16,
|
|
||||||
noteAlign: 'left',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Additional tests for specific combinations
|
|
||||||
describe('Sequence Diagram Special Cases', () => {
|
|
||||||
it('should render complex sequence with all features', () => {
|
|
||||||
const diagramCode = `
|
|
||||||
sequenceDiagram
|
|
||||||
box rgb(200,220,255) Authentication
|
|
||||||
actor User
|
|
||||||
participant LoginUI@{ "type": "boundary" }
|
|
||||||
participant AuthService@{ "type": "control" }
|
|
||||||
participant UserDB@{ "type": "database" }
|
|
||||||
end
|
|
||||||
|
|
||||||
box rgb(200,255,220) Order Processing
|
|
||||||
participant Order@{ "type": "entity" }
|
|
||||||
participant OrderQueue@{ "type": "queue" }
|
|
||||||
participant AuditLogs@{ "type": "collections" }
|
|
||||||
end
|
|
||||||
|
|
||||||
User ->> LoginUI: Enter credentials
|
|
||||||
LoginUI ->> AuthService: Validate
|
|
||||||
AuthService ->> UserDB: Query user
|
|
||||||
UserDB -->> AuthService: User data
|
|
||||||
alt Valid credentials
|
|
||||||
AuthService -->> LoginUI: Success
|
|
||||||
LoginUI -->> User: Welcome
|
|
||||||
|
|
||||||
par Place order
|
|
||||||
User ->> Order: New order
|
|
||||||
Order ->> OrderQueue: Process
|
|
||||||
and
|
|
||||||
Order ->> AuditLogs: Record
|
|
||||||
end
|
|
||||||
|
|
||||||
loop Until confirmed
|
|
||||||
OrderQueue ->> Order: Update status
|
|
||||||
Order -->> User: Notification
|
|
||||||
end
|
|
||||||
else Invalid credentials
|
|
||||||
AuthService --x LoginUI: Failure
|
|
||||||
LoginUI --x User: Retry
|
|
||||||
end
|
|
||||||
`;
|
|
||||||
imgSnapshotTest(diagramCode, {});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render with wrapped messages and notes', () => {
|
|
||||||
const diagramCode = `
|
|
||||||
sequenceDiagram
|
|
||||||
participant A
|
|
||||||
participant B
|
|
||||||
|
|
||||||
A ->> B: This is a very long message that should wrap properly in the diagram rendering
|
|
||||||
Note over A,B: This is a very long note that should also wrap properly when rendered in the diagram
|
|
||||||
|
|
||||||
par Wrapped parallel
|
|
||||||
A ->> B: Parallel message 1<br>with explicit line break
|
|
||||||
and
|
|
||||||
B ->> A: Parallel message 2<br>with explicit line break
|
|
||||||
end
|
|
||||||
|
|
||||||
loop Wrapped loop
|
|
||||||
Note right of B: This is a long note<br>in a loop
|
|
||||||
A ->> B: Message in loop
|
|
||||||
end
|
|
||||||
`;
|
|
||||||
imgSnapshotTest(diagramCode, { sequence: { wrap: true } });
|
|
||||||
});
|
|
||||||
describe('Sequence Diagram Rendering with Different Participant Types', () => {
|
|
||||||
it('should render a sequence diagram with various participant types', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
participant User@{ "type": "actor" }
|
|
||||||
participant AuthService@{ "type": "control" }
|
|
||||||
participant UI@{ "type": "boundary" }
|
|
||||||
participant OrderController@{ "type": "control" }
|
|
||||||
participant Product@{ "type": "entity" }
|
|
||||||
participant MongoDB@{ "type": "database" }
|
|
||||||
participant Products@{ "type": "collections" }
|
|
||||||
participant OrderQueue@{ "type": "queue" }
|
|
||||||
User ->> UI: Login request
|
|
||||||
UI ->> AuthService: Validate credentials
|
|
||||||
AuthService -->> UI: Authentication token
|
|
||||||
UI ->> OrderController: Place order
|
|
||||||
OrderController ->> Product: Check availability
|
|
||||||
Product -->> OrderController: Available
|
|
||||||
OrderController ->> MongoDB: Save order
|
|
||||||
MongoDB -->> OrderController: Order saved
|
|
||||||
OrderController ->> OrderQueue: Process payment
|
|
||||||
OrderQueue -->> User: Order confirmation
|
|
||||||
`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render participant creation and destruction with different types', () => {
|
|
||||||
imgSnapshotTest(`
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "boundary" }
|
|
||||||
Alice->>Bob: Hello Bob, how are you ?
|
|
||||||
Bob->>Alice: Fine, thank you. And you?
|
|
||||||
create participant Carl@{ "type" : "control" }
|
|
||||||
Alice->>Carl: Hi Carl!
|
|
||||||
create actor D as Donald
|
|
||||||
Carl->>D: Hi!
|
|
||||||
destroy Carl
|
|
||||||
Alice-xCarl: We are too many
|
|
||||||
destroy Bob
|
|
||||||
Bob->>Alice: I agree
|
|
||||||
`);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should handle complex interactions between different participant types', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
box rgb(200,220,255) Authentication
|
|
||||||
participant User@{ "type": "actor" }
|
|
||||||
participant LoginUI@{ "type": "boundary" }
|
|
||||||
participant AuthService@{ "type": "control" }
|
|
||||||
participant UserDB@{ "type": "database" }
|
|
||||||
end
|
|
||||||
|
|
||||||
box rgb(200,255,220) Order Processing
|
|
||||||
participant Order@{ "type": "entity" }
|
|
||||||
participant OrderQueue@{ "type": "queue" }
|
|
||||||
participant AuditLogs@{ "type": "collections" }
|
|
||||||
end
|
|
||||||
|
|
||||||
User ->> LoginUI: Enter credentials
|
|
||||||
LoginUI ->> AuthService: Validate
|
|
||||||
AuthService ->> UserDB: Query user
|
|
||||||
UserDB -->> AuthService: User data
|
|
||||||
|
|
||||||
alt Valid credentials
|
|
||||||
AuthService -->> LoginUI: Success
|
|
||||||
LoginUI -->> User: Welcome
|
|
||||||
|
|
||||||
par Place order
|
|
||||||
User ->> Order: New order
|
|
||||||
Order ->> OrderQueue: Process
|
|
||||||
and
|
|
||||||
Order ->> AuditLogs: Record
|
|
||||||
end
|
|
||||||
|
|
||||||
loop Until confirmed
|
|
||||||
OrderQueue ->> Order: Update status
|
|
||||||
Order -->> User: Notification
|
|
||||||
end
|
|
||||||
else Invalid credentials
|
|
||||||
AuthService --x LoginUI: Failure
|
|
||||||
LoginUI --x User: Retry
|
|
||||||
end
|
|
||||||
`,
|
|
||||||
{ sequence: { useMaxWidth: false } }
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render parallel processes with different participant types', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
participant Customer@{ "type": "actor" }
|
|
||||||
participant Frontend@{ "type": "participant" }
|
|
||||||
participant PaymentService@{ "type": "boundary" }
|
|
||||||
participant InventoryManager@{ "type": "control" }
|
|
||||||
participant Order@{ "type": "entity" }
|
|
||||||
participant OrdersDB@{ "type": "database" }
|
|
||||||
participant NotificationQueue@{ "type": "queue" }
|
|
||||||
|
|
||||||
Customer ->> Frontend: Place order
|
|
||||||
Frontend ->> Order: Create order
|
|
||||||
par Parallel Processing
|
|
||||||
Order ->> PaymentService: Process payment
|
|
||||||
and
|
|
||||||
Order ->> InventoryManager: Reserve items
|
|
||||||
end
|
|
||||||
PaymentService -->> Order: Payment confirmed
|
|
||||||
InventoryManager -->> Order: Items reserved
|
|
||||||
Order ->> OrdersDB: Save finalized order
|
|
||||||
OrdersDB -->> Order: Order saved
|
|
||||||
Order ->> NotificationQueue: Send confirmation
|
|
||||||
NotificationQueue -->> Customer: Order confirmation
|
|
||||||
`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
it('should render different participant types with notes and loops', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
actor Admin
|
|
||||||
participant Dashboard
|
|
||||||
participant AuthService@{ "type" : "boundary" }
|
|
||||||
participant UserManager@{ "type" : "control" }
|
|
||||||
participant UserProfile@{ "type" : "entity" }
|
|
||||||
participant UserDB@{ "type" : "database" }
|
|
||||||
participant Logs@{ "type" : "database" }
|
|
||||||
|
|
||||||
Admin ->> Dashboard: Open user management
|
|
||||||
loop Authentication check
|
|
||||||
Dashboard ->> AuthService: Verify admin rights
|
|
||||||
AuthService ->> Dashboard: Access granted
|
|
||||||
end
|
|
||||||
Dashboard ->> UserManager: List users
|
|
||||||
UserManager ->> UserDB: Query users
|
|
||||||
UserDB ->> UserManager: Return user data
|
|
||||||
Note right of UserDB: Encrypted data<br/>requires decryption
|
|
||||||
UserManager ->> UserProfile: Format profiles
|
|
||||||
UserProfile ->> UserManager: Formatted data
|
|
||||||
UserManager ->> Dashboard: Display users
|
|
||||||
Dashboard ->> Logs: Record access
|
|
||||||
Logs ->> Admin: Audit trail
|
|
||||||
`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render different participant types with alternative flows', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
actor Client
|
|
||||||
participant MobileApp
|
|
||||||
participant CloudService@{ "type" : "boundary" }
|
|
||||||
participant DataProcessor@{ "type" : "control" }
|
|
||||||
participant Transaction@{ "type" : "entity" }
|
|
||||||
participant TransactionsDB@{ "type" : "database" }
|
|
||||||
participant EventBus@{ "type" : "queue" }
|
|
||||||
|
|
||||||
Client ->> MobileApp: Initiate transaction
|
|
||||||
MobileApp ->> CloudService: Authenticate
|
|
||||||
alt Authentication successful
|
|
||||||
CloudService -->> MobileApp: Auth token
|
|
||||||
MobileApp ->> DataProcessor: Process data
|
|
||||||
DataProcessor ->> Transaction: Create transaction
|
|
||||||
Transaction ->> TransactionsDB: Save record
|
|
||||||
TransactionsDB -->> Transaction: Confirmation
|
|
||||||
Transaction ->> EventBus: Publish event
|
|
||||||
EventBus -->> Client: Notification
|
|
||||||
else Authentication failed
|
|
||||||
CloudService -->> MobileApp: Error
|
|
||||||
MobileApp -->> Client: Show error
|
|
||||||
end
|
|
||||||
`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render different participant types with wrapping text', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
participant B@{ "type" : "boundary" }
|
|
||||||
participant C@{ "type" : "control" }
|
|
||||||
participant E@{ "type" : "entity" }
|
|
||||||
participant DB@{ "type" : "database" }
|
|
||||||
participant COL@{ "type" : "collections" }
|
|
||||||
participant Q@{ "type" : "queue" }
|
|
||||||
|
|
||||||
FE ->> B: Another long message<br/>with explicit<br/>line breaks
|
|
||||||
B -->> FE: Response message that is also quite long and needs to wrap
|
|
||||||
FE ->> C: Process data
|
|
||||||
C ->> E: Validate
|
|
||||||
E -->> C: Validation result
|
|
||||||
C ->> DB: Save
|
|
||||||
DB -->> C: Save result
|
|
||||||
C ->> COL: Log
|
|
||||||
COL -->> Q: Forward
|
|
||||||
Q -->> LongNameUser: Final response with confirmation of all actions taken
|
|
||||||
`,
|
|
||||||
{ sequence: { wrap: true } }
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Sequence Diagram - New Participant Types with Long Notes and Messages', () => {
|
|
||||||
it('should render long notes left of boundary', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "boundary" }
|
|
||||||
actor Bob
|
|
||||||
Alice->>Bob: Hola
|
|
||||||
Note left of Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
|
||||||
Bob->>Alice: I'm short though
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render wrapped long notes left of control', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "control" }
|
|
||||||
actor Bob
|
|
||||||
Alice->>Bob: Hola
|
|
||||||
Note left of Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
|
||||||
Bob->>Alice: I'm short though
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render long notes right of entity', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "entity" }
|
|
||||||
actor Bob
|
|
||||||
Alice->>Bob: Hola
|
|
||||||
Note right of Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
|
||||||
Bob->>Alice: I'm short though
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render wrapped long notes right of database', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "database" }
|
|
||||||
actor Bob
|
|
||||||
Alice->>Bob: Hola
|
|
||||||
Note right of Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
|
||||||
Bob->>Alice: I'm short though
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render long notes over collections', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "collections" }
|
|
||||||
actor Bob
|
|
||||||
Alice->>Bob: Hola
|
|
||||||
Note over Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
|
||||||
Bob->>Alice: I'm short though
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render wrapped long notes over queue', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "queue" }
|
|
||||||
actor Bob
|
|
||||||
Alice->>Bob: Hola
|
|
||||||
Note over Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
|
||||||
Bob->>Alice: I'm short though
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render notes over actor and boundary', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
actor Alice
|
|
||||||
participant Charlie@{ "type" : "boundary" }
|
|
||||||
note over Alice: Some note
|
|
||||||
note over Charlie: Other note
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render long messages from database to collections', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "database" }
|
|
||||||
participant Bob@{ "type" : "collections" }
|
|
||||||
Alice->>Bob: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
|
||||||
Bob->>Alice: I'm short though
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render wrapped long messages from control to entity', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "control" }
|
|
||||||
participant Bob@{ "type" : "entity" }
|
|
||||||
Alice->>Bob:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
|
||||||
Bob->>Alice: I'm short though
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render long messages from queue to boundary', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "queue" }
|
|
||||||
participant Bob@{ "type" : "boundary" }
|
|
||||||
Alice->>Bob: I'm short
|
|
||||||
Bob->>Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render wrapped long messages from actor to database', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
actor Alice
|
|
||||||
participant Bob@{ "type" : "database" }
|
|
||||||
Alice->>Bob: I'm short
|
|
||||||
Bob->>Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('svg size', () => {
|
|
||||||
it('should render a sequence diagram when useMaxWidth is true (default)', () => {
|
|
||||||
renderGraph(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
actor Alice
|
|
||||||
participant Bob@{ "type" : "boundary" }
|
|
||||||
participant John@{ "type" : "control" }
|
|
||||||
Alice ->> Bob: Hello Bob, how are you?
|
|
||||||
Bob-->>John: How about you John?
|
|
||||||
Bob--x Alice: I am good thanks!
|
|
||||||
Bob-x John: I am good thanks!
|
|
||||||
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
|
|
||||||
Bob-->Alice: Checking with John...
|
|
||||||
alt either this
|
|
||||||
Alice->>John: Yes
|
|
||||||
else or this
|
|
||||||
Alice->>John: No
|
|
||||||
else or this will happen
|
|
||||||
Alice->John: Maybe
|
|
||||||
end
|
|
||||||
par this happens in parallel
|
|
||||||
Alice -->> Bob: Parallel message 1
|
|
||||||
and
|
|
||||||
Alice -->> John: Parallel message 2
|
|
||||||
end
|
|
||||||
`,
|
|
||||||
{ sequence: { useMaxWidth: true } }
|
|
||||||
);
|
|
||||||
cy.get('svg').should((svg) => {
|
|
||||||
expect(svg).to.have.attr('width', '100%');
|
|
||||||
const style = svg.attr('style');
|
|
||||||
expect(style).to.match(/^max-width: [\d.]+px;$/);
|
|
||||||
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
|
|
||||||
expect(maxWidthValue).to.be.within(820 * 0.95, 820 * 1.05);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render a sequence diagram when useMaxWidth is false', () => {
|
|
||||||
renderGraph(
|
|
||||||
`
|
|
||||||
sequenceDiagram
|
|
||||||
actor Alice
|
|
||||||
participant Bob@{ "type" : "boundary" }
|
|
||||||
participant John@{ "type" : "control" }
|
|
||||||
Alice ->> Bob: Hello Bob, how are you?
|
|
||||||
Bob-->>John: How about you John?
|
|
||||||
Bob--x Alice: I am good thanks!
|
|
||||||
Bob-x John: I am good thanks!
|
|
||||||
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
|
|
||||||
Bob-->Alice: Checking with John...
|
|
||||||
alt either this
|
|
||||||
Alice->>John: Yes
|
|
||||||
else or this
|
|
||||||
Alice->>John: No
|
|
||||||
else or this will happen
|
|
||||||
Alice->John: Maybe
|
|
||||||
end
|
|
||||||
par this happens in parallel
|
|
||||||
Alice -->> Bob: Parallel message 1
|
|
||||||
and
|
|
||||||
Alice -->> John: Parallel message 2
|
|
||||||
end
|
|
||||||
`,
|
|
||||||
{ sequence: { useMaxWidth: false } }
|
|
||||||
);
|
|
||||||
cy.get('svg').should((svg) => {
|
|
||||||
const width = parseFloat(svg.attr('width'));
|
|
||||||
expect(width).to.be.within(820 * 0.95, 820 * 1.05);
|
|
||||||
expect(svg).to.not.have.attr('style');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
@@ -893,17 +893,6 @@ describe('Sequence diagram', () => {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should handle bidirectional arrows with autonumber', () => {
|
|
||||||
imgSnapshotTest(`
|
|
||||||
sequenceDiagram
|
|
||||||
autonumber
|
|
||||||
participant A
|
|
||||||
participant B
|
|
||||||
A<<->>B: This is a bidirectional message
|
|
||||||
A->B: This is a normal message`);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should support actor links and properties when not mirrored EXPERIMENTAL: USE WITH CAUTION', () => {
|
it('should support actor links and properties when not mirrored EXPERIMENTAL: USE WITH CAUTION', () => {
|
||||||
//Be aware that the syntax for "properties" is likely to be changed.
|
//Be aware that the syntax for "properties" is likely to be changed.
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
|
@@ -32,8 +32,26 @@
|
|||||||
href="https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&family=Rubik+Mono+One&display=swap"
|
href="https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&family=Rubik+Mono+One&display=swap"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||||
|
<link
|
||||||
|
href="https://fonts.googleapis.com/css2?family=Recursive:wght@300..1000&display=swap"
|
||||||
|
rel="stylesheet"
|
||||||
|
/>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.recursive-mermaid {
|
||||||
|
font-family: 'Recursive', sans-serif;
|
||||||
|
font-optical-sizing: auto;
|
||||||
|
font-weight: 500;
|
||||||
|
font-style: normal;
|
||||||
|
font-variation-settings:
|
||||||
|
'slnt' 0,
|
||||||
|
'CASL' 0,
|
||||||
|
'CRSV' 0.5,
|
||||||
|
'MONO' 0;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
/* background: rgb(221, 208, 208); */
|
/* background: rgb(221, 208, 208); */
|
||||||
/* background: #333; */
|
/* background: #333; */
|
||||||
@@ -45,7 +63,9 @@
|
|||||||
h1 {
|
h1 {
|
||||||
color: grey;
|
color: grey;
|
||||||
}
|
}
|
||||||
|
.mermaid {
|
||||||
|
border: 1px solid red;
|
||||||
|
}
|
||||||
.mermaid2 {
|
.mermaid2 {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -83,6 +103,11 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.class2 {
|
||||||
|
fill: red;
|
||||||
|
fill-opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* tspan {
|
/* tspan {
|
||||||
font-size: 6px !important;
|
font-size: 6px !important;
|
||||||
} */
|
} */
|
||||||
@@ -107,194 +132,6 @@
|
|||||||
<body>
|
<body>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid">
|
||||||
---
|
---
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
---
|
|
||||||
flowchart-elk TB
|
|
||||||
c1-->a2
|
|
||||||
subgraph one
|
|
||||||
a1-->a2
|
|
||||||
end
|
|
||||||
subgraph two
|
|
||||||
b1-->b2
|
|
||||||
end
|
|
||||||
subgraph three
|
|
||||||
c1-->c2
|
|
||||||
end
|
|
||||||
one --> two
|
|
||||||
three --> two
|
|
||||||
two --> c2
|
|
||||||
|
|
||||||
</pre
|
|
||||||
>
|
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
---
|
|
||||||
flowchart TB
|
|
||||||
|
|
||||||
process_C
|
|
||||||
subgraph container_Alpha
|
|
||||||
subgraph process_B
|
|
||||||
pppB
|
|
||||||
end
|
|
||||||
subgraph process_A
|
|
||||||
pppA
|
|
||||||
end
|
|
||||||
process_B-->|via_AWSBatch|container_Beta
|
|
||||||
process_A-->|messages|container_Beta
|
|
||||||
end
|
|
||||||
|
|
||||||
</pre
|
|
||||||
>
|
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
---
|
|
||||||
flowchart TB
|
|
||||||
subgraph container_Beta
|
|
||||||
process_C
|
|
||||||
end
|
|
||||||
subgraph container_Alpha
|
|
||||||
subgraph process_B
|
|
||||||
pppB
|
|
||||||
end
|
|
||||||
subgraph process_A
|
|
||||||
pppA
|
|
||||||
end
|
|
||||||
process_B-->|via_AWSBatch|container_Beta
|
|
||||||
process_A-->|messages|container_Beta
|
|
||||||
end
|
|
||||||
|
|
||||||
</pre
|
|
||||||
>
|
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
---
|
|
||||||
flowchart TB
|
|
||||||
subgraph container_Beta
|
|
||||||
process_C
|
|
||||||
end
|
|
||||||
|
|
||||||
process_B-->|via_AWSBatch|container_Beta
|
|
||||||
|
|
||||||
|
|
||||||
</pre
|
|
||||||
>
|
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
---
|
|
||||||
classDiagram
|
|
||||||
note "I love this diagram!\nDo you love it?"
|
|
||||||
Class01 <|-- AveryLongClass : Cool
|
|
||||||
<<interface>> Class01
|
|
||||||
Class03 "1" *-- "*" Class04
|
|
||||||
Class05 "1" o-- "many" Class06
|
|
||||||
Class07 "1" .. "*" Class08
|
|
||||||
Class09 "1" --> "*" C2 : Where am i?
|
|
||||||
Class09 "*" --* "*" C3
|
|
||||||
Class09 "1" --|> "1" Class07
|
|
||||||
Class12 <|.. Class08
|
|
||||||
Class11 ..>Class12
|
|
||||||
Class07 : equals()
|
|
||||||
Class07 : Object[] elementData
|
|
||||||
Class01 : size()
|
|
||||||
Class01 : int chimp
|
|
||||||
Class01 : int gorilla
|
|
||||||
Class01 : -int privateChimp
|
|
||||||
Class01 : +int publicGorilla
|
|
||||||
Class01 : #int protectedMarmoset
|
|
||||||
Class08 <--> C2: Cool label
|
|
||||||
class Class10 {
|
|
||||||
<<service>>
|
|
||||||
int id
|
|
||||||
test()
|
|
||||||
}
|
|
||||||
note for Class10 "Cool class\nI said it's very cool class!"
|
|
||||||
</pre
|
|
||||||
>
|
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
---
|
|
||||||
requirementDiagram
|
|
||||||
requirement test_req {
|
|
||||||
id: 1
|
|
||||||
text: the test text.
|
|
||||||
risk: high
|
|
||||||
verifymethod: test
|
|
||||||
}
|
|
||||||
|
|
||||||
element test_entity {
|
|
||||||
type: simulation
|
|
||||||
}
|
|
||||||
|
|
||||||
test_entity - satisfies -> test_req
|
|
||||||
</pre
|
|
||||||
>
|
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
---
|
|
||||||
flowchart-elk TB
|
|
||||||
internet
|
|
||||||
nat
|
|
||||||
router
|
|
||||||
compute1
|
|
||||||
|
|
||||||
subgraph project
|
|
||||||
router
|
|
||||||
nat
|
|
||||||
subgraph subnet1
|
|
||||||
compute1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
%% router --> subnet1
|
|
||||||
subnet1 --> nat
|
|
||||||
%% nat --> internet
|
|
||||||
</pre
|
|
||||||
>
|
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
---
|
|
||||||
flowchart-elk TB
|
|
||||||
internet
|
|
||||||
nat
|
|
||||||
router
|
|
||||||
lb1
|
|
||||||
lb2
|
|
||||||
compute1
|
|
||||||
compute2
|
|
||||||
subgraph project
|
|
||||||
router
|
|
||||||
nat
|
|
||||||
subgraph subnet1
|
|
||||||
compute1
|
|
||||||
lb1
|
|
||||||
end
|
|
||||||
subgraph subnet2
|
|
||||||
compute2
|
|
||||||
lb2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
internet --> router
|
|
||||||
router --> subnet1 & subnet2
|
|
||||||
subnet1 & subnet2 --> nat --> internet
|
|
||||||
</pre
|
|
||||||
>
|
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
config:
|
||||||
layout: elk
|
layout: elk
|
||||||
elk:
|
elk:
|
||||||
@@ -320,149 +157,84 @@ treemap
|
|||||||
"Leaf 2.2": 25
|
"Leaf 2.2": 25
|
||||||
"Leaf 2.3": 12
|
"Leaf 2.3": 12
|
||||||
|
|
||||||
</pre>
|
classDef class1 fill:red,color:blue,stroke:#FFD600;
|
||||||
<pre id="diagram5" class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
flowchart:
|
|
||||||
curve: rounded
|
|
||||||
---
|
|
||||||
flowchart LR
|
|
||||||
I["fa:fa-code Text"] -- Mermaid js --> D["Use<br/>the<br/>editor!"]
|
|
||||||
I --> D & D
|
|
||||||
D@{ shape: question}
|
|
||||||
I@{ shape: question}
|
|
||||||
|
|
||||||
</pre>
|
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: tidy-tree
|
|
||||||
---
|
|
||||||
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
|
|
||||||
Pen and paper
|
|
||||||
Mermaid
|
|
||||||
|
|
||||||
</pre>
|
</pre
|
||||||
<pre id="diagram4" class="mermaid">
|
>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
---
|
---
|
||||||
config:
|
config:
|
||||||
layout: elk
|
treemap:
|
||||||
flowchart:
|
valueFormat: '$0,0'
|
||||||
curve: linear
|
|
||||||
---
|
---
|
||||||
flowchart LR
|
treemap
|
||||||
A[A] --> B[B]
|
"Budget"
|
||||||
A[A] --- B([C])
|
"Operations"
|
||||||
A@{ shape: diamond}
|
"Salaries": 7000
|
||||||
%%B@{ shape: diamond}
|
"Equipment": 2000
|
||||||
|
"Supplies": 1000
|
||||||
|
"Marketing"
|
||||||
|
"Advertising": 4000
|
||||||
|
"Events": 1000
|
||||||
|
|
||||||
</pre>
|
</pre
|
||||||
|
>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid">
|
||||||
---
|
treemap
|
||||||
config:
|
title Accessible Treemap Title
|
||||||
layout: elk
|
"Category A"
|
||||||
flowchart:
|
"Item A1": 10
|
||||||
curve: linear
|
"Item A2": 20
|
||||||
---
|
"Category B"
|
||||||
|
"Item B1": 15
|
||||||
|
"Item B2": 25
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
A[A] -- Mermaid js --> B[B]
|
AB["apa@apa@"] --> B(("`apa@apa`"))
|
||||||
A[A] -- Mermaid js --- B[B]
|
</pre>
|
||||||
A@{ shape: diamond}
|
<pre id="diagram4" class="mermaid2">
|
||||||
B@{ shape: diamond}
|
flowchart
|
||||||
|
D(("for D"))
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
flowchart LR
|
||||||
|
A e1@==> B
|
||||||
|
e1@{ animate: true}
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
flowchart LR
|
||||||
|
A e1@--> B
|
||||||
|
classDef animate stroke-width:2,stroke-dasharray:10\,8,stroke-dashoffset:-180,animation: edge-animation-frame 6s linear infinite, stroke-linecap: round
|
||||||
|
class e1 animate
|
||||||
|
</pre>
|
||||||
|
<h2>infinite</h2>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
flowchart LR
|
||||||
|
A e1@--> B
|
||||||
|
classDef animate stroke-dasharray: 9\,5,stroke-dashoffset: 900,animation: dash 25s linear infinite;
|
||||||
|
class e1 animate
|
||||||
|
</pre>
|
||||||
|
<h2>Mermaid - edge-animation-slow</h2>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
flowchart LR
|
||||||
|
A e1@--> B
|
||||||
|
e1@{ animation: fast}
|
||||||
|
</pre>
|
||||||
|
<h2>Mermaid - edge-animation-fast</h2>
|
||||||
|
<pre id="diagram4" class="mermaid2">
|
||||||
|
flowchart LR
|
||||||
|
A e1@--> B
|
||||||
|
classDef animate stroke-dasharray: 1000,stroke-dashoffset: 1000,animation: dash 10s linear;
|
||||||
|
class e1 edge-animation-fast
|
||||||
|
</pre>
|
||||||
|
|
||||||
</pre>
|
<pre id="diagram4" class="mermaid2">
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
flowchart:
|
|
||||||
curve: rounded
|
|
||||||
---
|
|
||||||
flowchart LR
|
|
||||||
D["Use the editor"] -- Mermaid js --> I["fa:fa-code Text"]
|
|
||||||
I --> D & D
|
|
||||||
D@{ shape: question}
|
|
||||||
I@{ shape: question}
|
|
||||||
</pre>
|
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
flowchart:
|
|
||||||
curve: rounded
|
|
||||||
elk:
|
|
||||||
nodePlacementStrategy: NETWORK_SIMPLEX
|
|
||||||
---
|
|
||||||
flowchart LR
|
|
||||||
D["Use the editor"] -- Mermaid js --> I["fa:fa-code Text"]
|
|
||||||
D --> I & I
|
|
||||||
a["a"]
|
|
||||||
D@{ shape: trap-b}
|
|
||||||
I@{ shape: lean-l}
|
|
||||||
</pre>
|
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
|
|
||||||
---
|
info </pre
|
||||||
flowchart LR
|
>
|
||||||
%% subgraph s1["Untitled subgraph"]
|
<pre id="diagram4" class="mermaid2">
|
||||||
C["Evaluate"]
|
|
||||||
%% end
|
|
||||||
|
|
||||||
B --> C
|
|
||||||
</pre>
|
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
flowchart:
|
|
||||||
//curve: linear
|
|
||||||
---
|
|
||||||
flowchart LR
|
|
||||||
%% A ==> B
|
|
||||||
%% A2 --> B2
|
|
||||||
A{A} --> B((Bo boo)) & B & B & B
|
|
||||||
|
|
||||||
</pre>
|
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
theme: default
|
|
||||||
look: classic
|
|
||||||
---
|
|
||||||
flowchart LR
|
|
||||||
subgraph s1["APA"]
|
|
||||||
D{"Use the editor"}
|
|
||||||
end
|
|
||||||
subgraph S2["S2"]
|
|
||||||
s1
|
|
||||||
I>"fa:fa-code Text"]
|
|
||||||
E["E"]
|
|
||||||
end
|
|
||||||
D -- Mermaid js --> I
|
|
||||||
D --> I & E
|
|
||||||
E --> I
|
|
||||||
</pre>
|
|
||||||
<pre id="diagram4" class="mermaid">
|
|
||||||
---
|
---
|
||||||
config:
|
config:
|
||||||
layout: elk
|
layout: elk
|
||||||
@@ -487,7 +259,7 @@ config:
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
---
|
---
|
||||||
config:
|
config:
|
||||||
layout: elk
|
layout: elk
|
||||||
@@ -500,7 +272,7 @@ config:
|
|||||||
D-->I
|
D-->I
|
||||||
D-->I
|
D-->I
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
---
|
---
|
||||||
config:
|
config:
|
||||||
layout: elk
|
layout: elk
|
||||||
@@ -539,7 +311,7 @@ flowchart LR
|
|||||||
n8@{ shape: rect}
|
n8@{ shape: rect}
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
---
|
---
|
||||||
config:
|
config:
|
||||||
layout: elk
|
layout: elk
|
||||||
@@ -555,7 +327,7 @@ flowchart LR
|
|||||||
|
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
---
|
---
|
||||||
config:
|
config:
|
||||||
layout: elk
|
layout: elk
|
||||||
@@ -564,7 +336,7 @@ flowchart LR
|
|||||||
A{A} --> B & C
|
A{A} --> B & C
|
||||||
</pre
|
</pre
|
||||||
>
|
>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
---
|
---
|
||||||
config:
|
config:
|
||||||
layout: elk
|
layout: elk
|
||||||
@@ -576,7 +348,7 @@ flowchart LR
|
|||||||
end
|
end
|
||||||
</pre
|
</pre
|
||||||
>
|
>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
---
|
---
|
||||||
config:
|
config:
|
||||||
layout: elk
|
layout: elk
|
||||||
@@ -594,7 +366,7 @@ flowchart LR
|
|||||||
|
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
---
|
---
|
||||||
config:
|
config:
|
||||||
kanban:
|
kanban:
|
||||||
@@ -613,81 +385,81 @@ kanban
|
|||||||
task3[💻 Develop login feature]@{ ticket: 103 }
|
task3[💻 Develop login feature]@{ ticket: 103 }
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
nA[Default] --> A@{ icon: 'fa:bell', form: 'rounded' }
|
nA[Default] --> A@{ icon: 'fa:bell', form: 'rounded' }
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
nA[Style] --> A@{ icon: 'fa:bell', form: 'rounded' }
|
nA[Style] --> A@{ icon: 'fa:bell', form: 'rounded' }
|
||||||
style A fill:#f9f,stroke:#333,stroke-width:4px
|
style A fill:#f9f,stroke:#333,stroke-width:4px
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
nA[Class] --> A@{ icon: 'fa:bell', form: 'rounded' }
|
nA[Class] --> A@{ icon: 'fa:bell', form: 'rounded' }
|
||||||
A:::AClass
|
A:::AClass
|
||||||
classDef AClass fill:#f9f,stroke:#333,stroke-width:4px
|
classDef AClass fill:#f9f,stroke:#333,stroke-width:4px
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
nA[Class] --> A@{ icon: 'logos:aws', form: 'rounded' }
|
nA[Class] --> A@{ icon: 'logos:aws', form: 'rounded' }
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
nA[Default] --> A@{ icon: 'fa:bell', form: 'square' }
|
nA[Default] --> A@{ icon: 'fa:bell', form: 'square' }
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
nA[Style] --> A@{ icon: 'fa:bell', form: 'square' }
|
nA[Style] --> A@{ icon: 'fa:bell', form: 'square' }
|
||||||
style A fill:#f9f,stroke:#333,stroke-width:4px
|
style A fill:#f9f,stroke:#333,stroke-width:4px
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
nA[Class] --> A@{ icon: 'fa:bell', form: 'square' }
|
nA[Class] --> A@{ icon: 'fa:bell', form: 'square' }
|
||||||
A:::AClass
|
A:::AClass
|
||||||
classDef AClass fill:#f9f,stroke:#333,stroke-width:4px
|
classDef AClass fill:#f9f,stroke:#333,stroke-width:4px
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
nA[Class] --> A@{ icon: 'logos:aws', form: 'square' }
|
nA[Class] --> A@{ icon: 'logos:aws', form: 'square' }
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
nA[Default] --> A@{ icon: 'fa:bell', form: 'circle' }
|
nA[Default] --> A@{ icon: 'fa:bell', form: 'circle' }
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
nA[Style] --> A@{ icon: 'fa:bell', form: 'circle' }
|
nA[Style] --> A@{ icon: 'fa:bell', form: 'circle' }
|
||||||
style A fill:#f9f,stroke:#333,stroke-width:4px
|
style A fill:#f9f,stroke:#333,stroke-width:4px
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
nA[Class] --> A@{ icon: 'fa:bell', form: 'circle' }
|
nA[Class] --> A@{ icon: 'fa:bell', form: 'circle' }
|
||||||
A:::AClass
|
A:::AClass
|
||||||
classDef AClass fill:#f9f,stroke:#333,stroke-width:4px
|
classDef AClass fill:#f9f,stroke:#333,stroke-width:4px
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
nA[Class] --> A@{ icon: 'logos:aws', form: 'circle' }
|
nA[Class] --> A@{ icon: 'logos:aws', form: 'circle' }
|
||||||
A:::AClass
|
A:::AClass
|
||||||
classDef AClass fill:#f9f,stroke:#333,stroke-width:4px
|
classDef AClass fill:#f9f,stroke:#333,stroke-width:4px
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
nA[Style] --> A@{ icon: 'logos:aws', form: 'circle' }
|
nA[Style] --> A@{ icon: 'logos:aws', form: 'circle' }
|
||||||
style A fill:#f9f,stroke:#333,stroke-width:4px
|
style A fill:#f9f,stroke:#333,stroke-width:4px
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
kanban
|
kanban
|
||||||
id2[In progress]
|
id2[In progress]
|
||||||
docs[Create Blog about the new diagram]@{ priority: 'Very Low', ticket: MC-2037, assigned: 'knsv' }
|
docs[Create Blog about the new diagram]@{ priority: 'Very Low', ticket: MC-2037, assigned: 'knsv' }
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram4" class="mermaid">
|
<pre id="diagram4" class="mermaid2">
|
||||||
---
|
---
|
||||||
config:
|
config:
|
||||||
kanban:
|
kanban:
|
||||||
@@ -751,22 +523,18 @@ kanban
|
|||||||
alert('It worked');
|
alert('It worked');
|
||||||
}
|
}
|
||||||
await mermaid.initialize({
|
await mermaid.initialize({
|
||||||
// theme: 'base',
|
// theme: 'forest',
|
||||||
// theme: 'default',
|
// theme: 'default',
|
||||||
// theme: 'forest',
|
// theme: 'forest',
|
||||||
// handDrawnSeed: 12,
|
// handDrawnSeed: 12,
|
||||||
// look: 'handDrawn',
|
// look: 'handDrawn',
|
||||||
// 'elk.nodePlacement.strategy': 'NETWORK_SIMPLEX',
|
// 'elk.nodePlacement.strategy': 'NETWORK_SIMPLEX',
|
||||||
// layout: 'dagre',
|
// layout: 'dagre',
|
||||||
layout: 'elk',
|
// layout: 'elk',
|
||||||
// layout: 'fixed',
|
// layout: 'fixed',
|
||||||
// htmlLabels: false,
|
// htmlLabels: false,
|
||||||
flowchart: { titleTopMargin: 10 },
|
flowchart: { titleTopMargin: 10 },
|
||||||
|
fontFamily: "'Recursive', sans-serif",
|
||||||
// fontFamily: 'Caveat',
|
|
||||||
// fontFamily: 'Kalam',
|
|
||||||
// fontFamily: 'courier',
|
|
||||||
fontFamily: 'arial',
|
|
||||||
sequence: {
|
sequence: {
|
||||||
actorFontFamily: 'courier',
|
actorFontFamily: 'courier',
|
||||||
noteFontFamily: 'courier',
|
noteFontFamily: 'courier',
|
||||||
|
@@ -1,376 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
||||||
<title>Mermaid Quick Test Page</title>
|
|
||||||
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=" />
|
|
||||||
<style>
|
|
||||||
div.mermaid {
|
|
||||||
font-family: 'Courier New', Courier, monospace !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: tidy-tree
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap))
|
|
||||||
A
|
|
||||||
B
|
|
||||||
</pre>
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: dagre
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap))
|
|
||||||
A
|
|
||||||
B
|
|
||||||
</pre>
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap))
|
|
||||||
A
|
|
||||||
B
|
|
||||||
</pre>
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: cose-bilkent
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap))
|
|
||||||
A
|
|
||||||
B
|
|
||||||
</pre>
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: tidy-tree
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap is a long thing))
|
|
||||||
A
|
|
||||||
B
|
|
||||||
C
|
|
||||||
D
|
|
||||||
</pre>
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: dagre
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap is a long thing))
|
|
||||||
A
|
|
||||||
B
|
|
||||||
C
|
|
||||||
D
|
|
||||||
</pre>
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap is a long thing))
|
|
||||||
A
|
|
||||||
B
|
|
||||||
C
|
|
||||||
D
|
|
||||||
</pre>
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: cose-bilkent
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap is a long thing))
|
|
||||||
A
|
|
||||||
B
|
|
||||||
C
|
|
||||||
D
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: tidy-tree
|
|
||||||
---
|
|
||||||
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 class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: dagre
|
|
||||||
---
|
|
||||||
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 class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
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 class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: cose-bilkent
|
|
||||||
---
|
|
||||||
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 class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: tidy-tree
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap))
|
|
||||||
A
|
|
||||||
a
|
|
||||||
apa[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
apa2[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
b
|
|
||||||
c
|
|
||||||
d
|
|
||||||
B
|
|
||||||
apa3[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
D
|
|
||||||
apa5[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
apa4[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
|
|
||||||
</pre>
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: dagre
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap))
|
|
||||||
A
|
|
||||||
a
|
|
||||||
apa[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
apa2[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
b
|
|
||||||
c
|
|
||||||
d
|
|
||||||
B
|
|
||||||
apa3[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
D
|
|
||||||
apa5[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
apa4[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
|
|
||||||
</pre>
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap))
|
|
||||||
A
|
|
||||||
a
|
|
||||||
apa[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
apa2[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
b
|
|
||||||
c
|
|
||||||
d
|
|
||||||
B
|
|
||||||
apa3[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
D
|
|
||||||
apa5[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
apa4[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
|
|
||||||
</pre>
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: cose-bilkent
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap))
|
|
||||||
A
|
|
||||||
a
|
|
||||||
apa[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
apa2[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
b
|
|
||||||
c
|
|
||||||
d
|
|
||||||
B
|
|
||||||
apa3[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
D
|
|
||||||
apa5[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
apa4[I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on. I am a long long multline string passing several levels of text. Lorum ipsum and so on]
|
|
||||||
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: tidy-tree
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
((This is a mindmap))
|
|
||||||
child1
|
|
||||||
grandchild 1
|
|
||||||
grandchild 2
|
|
||||||
child2
|
|
||||||
grandchild 3
|
|
||||||
grandchild 4
|
|
||||||
child3
|
|
||||||
grandchild 5
|
|
||||||
grandchild 6
|
|
||||||
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: dagre
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
((This is a mindmap))
|
|
||||||
child1
|
|
||||||
grandchild 1
|
|
||||||
grandchild 2
|
|
||||||
child2
|
|
||||||
grandchild 3
|
|
||||||
grandchild 4
|
|
||||||
child3
|
|
||||||
grandchild 5
|
|
||||||
grandchild 6
|
|
||||||
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
((This is a mindmap))
|
|
||||||
child1
|
|
||||||
grandchild 1
|
|
||||||
grandchild 2
|
|
||||||
child2
|
|
||||||
grandchild 3
|
|
||||||
grandchild 4
|
|
||||||
child3
|
|
||||||
grandchild 5
|
|
||||||
grandchild 6
|
|
||||||
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: cose-bilkent
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
((This is a mindmap))
|
|
||||||
child1
|
|
||||||
grandchild 1
|
|
||||||
grandchild 2
|
|
||||||
child2
|
|
||||||
grandchild 3
|
|
||||||
grandchild 4
|
|
||||||
child3
|
|
||||||
grandchild 5
|
|
||||||
grandchild 6
|
|
||||||
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
<script type="module">
|
|
||||||
import mermaid from '/mermaid.esm.mjs';
|
|
||||||
import tidytree from '/mermaid-layout-tidy-tree.esm.mjs';
|
|
||||||
import layouts from './mermaid-layout-elk.esm.mjs';
|
|
||||||
mermaid.registerLayoutLoaders(layouts);
|
|
||||||
mermaid.registerLayoutLoaders(tidytree);
|
|
||||||
mermaid.initialize({
|
|
||||||
theme: 'default',
|
|
||||||
logLevel: 3,
|
|
||||||
securityLevel: 'loose',
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@@ -1,6 +1,5 @@
|
|||||||
import externalExample from './mermaid-example-diagram.esm.mjs';
|
import externalExample from './mermaid-example-diagram.esm.mjs';
|
||||||
import layouts from './mermaid-layout-elk.esm.mjs';
|
import layouts from './mermaid-layout-elk.esm.mjs';
|
||||||
import tidyTree from './mermaid-layout-tidy-tree.esm.mjs';
|
|
||||||
import zenUml from './mermaid-zenuml.esm.mjs';
|
import zenUml from './mermaid-zenuml.esm.mjs';
|
||||||
import mermaid from './mermaid.esm.mjs';
|
import mermaid from './mermaid.esm.mjs';
|
||||||
|
|
||||||
@@ -66,7 +65,6 @@ const contentLoaded = async function () {
|
|||||||
await mermaid.registerExternalDiagrams([externalExample, zenUml]);
|
await mermaid.registerExternalDiagrams([externalExample, zenUml]);
|
||||||
|
|
||||||
mermaid.registerLayoutLoaders(layouts);
|
mermaid.registerLayoutLoaders(layouts);
|
||||||
mermaid.registerLayoutLoaders(tidyTree);
|
|
||||||
mermaid.initialize(graphObj.mermaid);
|
mermaid.initialize(graphObj.mermaid);
|
||||||
/**
|
/**
|
||||||
* CC-BY-4.0
|
* CC-BY-4.0
|
||||||
|
@@ -2,35 +2,35 @@
|
|||||||
"durations": [
|
"durations": [
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/configuration.spec.js",
|
"spec": "cypress/integration/other/configuration.spec.js",
|
||||||
"duration": 5841
|
"duration": 5815
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/external-diagrams.spec.js",
|
"spec": "cypress/integration/other/external-diagrams.spec.js",
|
||||||
"duration": 2138
|
"duration": 2035
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/ghsa.spec.js",
|
"spec": "cypress/integration/other/ghsa.spec.js",
|
||||||
"duration": 3370
|
"duration": 3386
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/iife.spec.js",
|
"spec": "cypress/integration/other/iife.spec.js",
|
||||||
"duration": 2052
|
"duration": 2089
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/interaction.spec.js",
|
"spec": "cypress/integration/other/interaction.spec.js",
|
||||||
"duration": 12243
|
"duration": 11578
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/rerender.spec.js",
|
"spec": "cypress/integration/other/rerender.spec.js",
|
||||||
"duration": 2065
|
"duration": 2119
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/xss.spec.js",
|
"spec": "cypress/integration/other/xss.spec.js",
|
||||||
"duration": 31288
|
"duration": 27282
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/appli.spec.js",
|
"spec": "cypress/integration/rendering/appli.spec.js",
|
||||||
"duration": 3421
|
"duration": 3377
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/architecture.spec.ts",
|
"spec": "cypress/integration/rendering/architecture.spec.ts",
|
||||||
@@ -38,95 +38,95 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/block.spec.js",
|
"spec": "cypress/integration/rendering/block.spec.js",
|
||||||
"duration": 18500
|
"duration": 18137
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/c4.spec.js",
|
"spec": "cypress/integration/rendering/c4.spec.js",
|
||||||
"duration": 5793
|
"duration": 5455
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/classDiagram-elk-v3.spec.js",
|
"spec": "cypress/integration/rendering/classDiagram-elk-v3.spec.js",
|
||||||
"duration": 40966
|
"duration": 40850
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/classDiagram-handDrawn-v3.spec.js",
|
"spec": "cypress/integration/rendering/classDiagram-handDrawn-v3.spec.js",
|
||||||
"duration": 39176
|
"duration": 37964
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/classDiagram-v2.spec.js",
|
"spec": "cypress/integration/rendering/classDiagram-v2.spec.js",
|
||||||
"duration": 23468
|
"duration": 23446
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/classDiagram-v3.spec.js",
|
"spec": "cypress/integration/rendering/classDiagram-v3.spec.js",
|
||||||
"duration": 38291
|
"duration": 37207
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/classDiagram.spec.js",
|
"spec": "cypress/integration/rendering/classDiagram.spec.js",
|
||||||
"duration": 16949
|
"duration": 16531
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/conf-and-directives.spec.js",
|
"spec": "cypress/integration/rendering/conf-and-directives.spec.js",
|
||||||
"duration": 9480
|
"duration": 9385
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/current.spec.js",
|
"spec": "cypress/integration/rendering/current.spec.js",
|
||||||
"duration": 2753
|
"duration": 2697
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/erDiagram-unified.spec.js",
|
"spec": "cypress/integration/rendering/erDiagram-unified.spec.js",
|
||||||
"duration": 88028
|
"duration": 88648
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/erDiagram.spec.js",
|
"spec": "cypress/integration/rendering/erDiagram.spec.js",
|
||||||
"duration": 15615
|
"duration": 15094
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/errorDiagram.spec.js",
|
"spec": "cypress/integration/rendering/errorDiagram.spec.js",
|
||||||
"duration": 3706
|
"duration": 3548
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart-elk.spec.js",
|
"spec": "cypress/integration/rendering/flowchart-elk.spec.js",
|
||||||
"duration": 43905
|
"duration": 44889
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart-handDrawn.spec.js",
|
"spec": "cypress/integration/rendering/flowchart-handDrawn.spec.js",
|
||||||
"duration": 31217
|
"duration": 30487
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart-icon.spec.js",
|
"spec": "cypress/integration/rendering/flowchart-icon.spec.js",
|
||||||
"duration": 7531
|
"duration": 7375
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart-shape-alias.spec.ts",
|
"spec": "cypress/integration/rendering/flowchart-shape-alias.spec.ts",
|
||||||
"duration": 25423
|
"duration": 24913
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart-v2.spec.js",
|
"spec": "cypress/integration/rendering/flowchart-v2.spec.js",
|
||||||
"duration": 49664
|
"duration": 51927
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart.spec.js",
|
"spec": "cypress/integration/rendering/flowchart.spec.js",
|
||||||
"duration": 32525
|
"duration": 31676
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/gantt.spec.js",
|
"spec": "cypress/integration/rendering/gantt.spec.js",
|
||||||
"duration": 20915
|
"duration": 19897
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/gitGraph.spec.js",
|
"spec": "cypress/integration/rendering/gitGraph.spec.js",
|
||||||
"duration": 53556
|
"duration": 53450
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/iconShape.spec.ts",
|
"spec": "cypress/integration/rendering/iconShape.spec.ts",
|
||||||
"duration": 283038
|
"duration": 287035
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/imageShape.spec.ts",
|
"spec": "cypress/integration/rendering/imageShape.spec.ts",
|
||||||
"duration": 59434
|
"duration": 58555
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/info.spec.ts",
|
"spec": "cypress/integration/rendering/info.spec.ts",
|
||||||
"duration": 3101
|
"duration": 3179
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/journey.spec.js",
|
"spec": "cypress/integration/rendering/journey.spec.js",
|
||||||
@@ -134,95 +134,87 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/kanban.spec.ts",
|
"spec": "cypress/integration/rendering/kanban.spec.ts",
|
||||||
"duration": 7567
|
"duration": 7628
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/katex.spec.js",
|
"spec": "cypress/integration/rendering/katex.spec.js",
|
||||||
"duration": 3817
|
"duration": 3764
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/marker_unique_id.spec.js",
|
"spec": "cypress/integration/rendering/marker_unique_id.spec.js",
|
||||||
"duration": 2624
|
"duration": 2573
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/mindmap-tidy-tree.spec.js",
|
|
||||||
"duration": 4246
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/mindmap.spec.ts",
|
"spec": "cypress/integration/rendering/mindmap.spec.ts",
|
||||||
"duration": 11967
|
"duration": 11269
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/newShapes.spec.ts",
|
"spec": "cypress/integration/rendering/newShapes.spec.ts",
|
||||||
"duration": 151914
|
"duration": 148389
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/oldShapes.spec.ts",
|
"spec": "cypress/integration/rendering/oldShapes.spec.ts",
|
||||||
"duration": 116698
|
"duration": 113395
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/packet.spec.ts",
|
"spec": "cypress/integration/rendering/packet.spec.ts",
|
||||||
"duration": 4967
|
"duration": 4714
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/pie.spec.ts",
|
"spec": "cypress/integration/rendering/pie.spec.ts",
|
||||||
"duration": 6700
|
"duration": 6446
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/quadrantChart.spec.js",
|
"spec": "cypress/integration/rendering/quadrantChart.spec.js",
|
||||||
"duration": 8963
|
"duration": 9133
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/radar.spec.js",
|
"spec": "cypress/integration/rendering/radar.spec.js",
|
||||||
"duration": 5540
|
"duration": 5544
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/requirement.spec.js",
|
"spec": "cypress/integration/rendering/requirement.spec.js",
|
||||||
"duration": 2782
|
"duration": 2709
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/requirementDiagram-unified.spec.js",
|
"spec": "cypress/integration/rendering/requirementDiagram-unified.spec.js",
|
||||||
"duration": 54797
|
"duration": 55647
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/sankey.spec.ts",
|
"spec": "cypress/integration/rendering/sankey.spec.ts",
|
||||||
"duration": 6914
|
"duration": 6751
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/sequencediagram-v2.spec.js",
|
|
||||||
"duration": 20481
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/sequencediagram.spec.js",
|
"spec": "cypress/integration/rendering/sequencediagram.spec.js",
|
||||||
"duration": 38490
|
"duration": 36618
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/stateDiagram-v2.spec.js",
|
"spec": "cypress/integration/rendering/stateDiagram-v2.spec.js",
|
||||||
"duration": 30766
|
"duration": 29642
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/stateDiagram.spec.js",
|
"spec": "cypress/integration/rendering/stateDiagram.spec.js",
|
||||||
"duration": 16705
|
"duration": 16037
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/theme.spec.js",
|
"spec": "cypress/integration/rendering/theme.spec.js",
|
||||||
"duration": 30928
|
"duration": 30006
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/timeline.spec.ts",
|
"spec": "cypress/integration/rendering/timeline.spec.ts",
|
||||||
"duration": 8424
|
"duration": 8451
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/treemap.spec.ts",
|
"spec": "cypress/integration/rendering/treemap.spec.ts",
|
||||||
"duration": 12533
|
"duration": 11996
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/xyChart.spec.js",
|
"spec": "cypress/integration/rendering/xyChart.spec.js",
|
||||||
"duration": 21197
|
"duration": 20627
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/zenuml.spec.js",
|
"spec": "cypress/integration/rendering/zenuml.spec.js",
|
||||||
"duration": 3455
|
"duration": 3472
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es2020",
|
"target": "es2020",
|
||||||
"lib": ["es2020", "dom"],
|
"lib": ["es2020", "dom"],
|
||||||
"types": ["cypress", "node", "@argos-ci/cypress/support"],
|
"types": ["cypress", "node", "@argos-ci/cypress/dist/support.d.ts"],
|
||||||
"allowImportingTsExtensions": true,
|
"allowImportingTsExtensions": true,
|
||||||
"noEmit": true
|
"noEmit": true
|
||||||
},
|
},
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
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/6.5.1/css/all.min.css"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
|
@@ -29,8 +29,7 @@ In GitHub, you first [**fork a mermaid repository**](https://github.com/mermaid-
|
|||||||
|
|
||||||
Then you **clone** a copy to your local development machine (e.g. where you code) to make a copy with all the files to work with.
|
Then you **clone** a copy to your local development machine (e.g. where you code) to make a copy with all the files to work with.
|
||||||
|
|
||||||
> **💡 Tip**
|
> **💡 Tip** > [Here is a GitHub document that gives an overview of the process](https://docs.github.com/en/get-started/quickstart/fork-a-repo).
|
||||||
> [Here is a GitHub document that gives an overview of the process](https://docs.github.com/en/get-started/quickstart/fork-a-repo).
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone git@github.com/your-fork/mermaid
|
git clone git@github.com/your-fork/mermaid
|
||||||
|
@@ -33,8 +33,7 @@ mindmap
|
|||||||
|
|
||||||
## Join the Development
|
## Join the Development
|
||||||
|
|
||||||
> **💡 Tip**
|
> **💡 Tip** > **Check out our** [**detailed contribution guide**](./contributing.md).
|
||||||
> **Check out our** [**detailed contribution guide**](./contributing.md).
|
|
||||||
|
|
||||||
Where to start:
|
Where to start:
|
||||||
|
|
||||||
@@ -48,8 +47,7 @@ Where to start:
|
|||||||
|
|
||||||
## A Question Or a Suggestion?
|
## A Question Or a Suggestion?
|
||||||
|
|
||||||
> **💡 Tip**
|
> **💡 Tip** > **Have a look at** [**how to open an issue**](./questions-and-suggestions.md).
|
||||||
> **Have a look at** [**how to open an issue**](./questions-and-suggestions.md).
|
|
||||||
|
|
||||||
If you have faced a vulnerability [report it to us](./security.md).
|
If you have faced a vulnerability [report it to us](./security.md).
|
||||||
|
|
||||||
|
@@ -22,6 +22,7 @@ While directives allow you to change most of the default configuration settings,
|
|||||||
Mermaid basically supports two types of configuration options to be overridden by directives.
|
Mermaid basically supports two types of configuration options to be overridden by directives.
|
||||||
|
|
||||||
1. _General/Top Level configurations_ : These are the configurations that are available and applied to all the diagram. **Some of the most important top-level** configurations are:
|
1. _General/Top Level configurations_ : These are the configurations that are available and applied to all the diagram. **Some of the most important top-level** configurations are:
|
||||||
|
|
||||||
- theme
|
- theme
|
||||||
- fontFamily
|
- fontFamily
|
||||||
- logLevel
|
- logLevel
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
# Frequently Asked Questions
|
# Frequently Asked Questions
|
||||||
|
|
||||||
1. [How to add title to flowchart?](https://github.com/mermaid-js/mermaid/issues/1433#issuecomment-1991554712)
|
1. [How to add title to flowchart?](https://github.com/mermaid-js/mermaid/issues/556#issuecomment-363182217)
|
||||||
2. [How to specify custom CSS file?](https://github.com/mermaidjs/mermaid.cli/pull/24#issuecomment-373402785)
|
2. [How to specify custom CSS file?](https://github.com/mermaidjs/mermaid.cli/pull/24#issuecomment-373402785)
|
||||||
3. [How to fix tooltip misplacement issue?](https://github.com/mermaid-js/mermaid/issues/542#issuecomment-3343564621)
|
3. [How to fix tooltip misplacement issue?](https://github.com/mermaid-js/mermaid/issues/542#issuecomment-3343564621)
|
||||||
4. [How to specify gantt diagram xAxis format?](https://github.com/mermaid-js/mermaid/issues/269#issuecomment-373229136)
|
4. [How to specify gantt diagram xAxis format?](https://github.com/mermaid-js/mermaid/issues/269#issuecomment-373229136)
|
||||||
|
@@ -1,40 +0,0 @@
|
|||||||
> **Warning**
|
|
||||||
>
|
|
||||||
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
|
||||||
>
|
|
||||||
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/layouts.md](../../packages/mermaid/src/docs/config/layouts.md).
|
|
||||||
|
|
||||||
# Layouts
|
|
||||||
|
|
||||||
This page lists the available layout algorithms supported in Mermaid diagrams.
|
|
||||||
|
|
||||||
## Supported Layouts
|
|
||||||
|
|
||||||
- **elk**: [ELK (Eclipse Layout Kernel)](https://www.eclipse.org/elk/)
|
|
||||||
- **tidy-tree**: Tidy tree layout for hierarchical diagrams [Tidy Tree Configuration](/config/tidy-tree)
|
|
||||||
- **cose-bilkent**: Cose Bilkent layout for force-directed graphs
|
|
||||||
- **dagre**: Dagre layout for layered graphs
|
|
||||||
|
|
||||||
## How to Use
|
|
||||||
|
|
||||||
You can specify the layout in your diagram's YAML config or initialization options. For example:
|
|
||||||
|
|
||||||
```mermaid-example
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
---
|
|
||||||
graph TD;
|
|
||||||
A-->B;
|
|
||||||
B-->C;
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: elk
|
|
||||||
---
|
|
||||||
graph TD;
|
|
||||||
A-->B;
|
|
||||||
B-->C;
|
|
||||||
```
|
|
@@ -19,7 +19,6 @@
|
|||||||
- [addDirective](functions/addDirective.md)
|
- [addDirective](functions/addDirective.md)
|
||||||
- [getConfig](functions/getConfig.md)
|
- [getConfig](functions/getConfig.md)
|
||||||
- [getSiteConfig](functions/getSiteConfig.md)
|
- [getSiteConfig](functions/getSiteConfig.md)
|
||||||
- [getUserDefinedConfig](functions/getUserDefinedConfig.md)
|
|
||||||
- [reset](functions/reset.md)
|
- [reset](functions/reset.md)
|
||||||
- [sanitize](functions/sanitize.md)
|
- [sanitize](functions/sanitize.md)
|
||||||
- [saveConfigFromInitialize](functions/saveConfigFromInitialize.md)
|
- [saveConfigFromInitialize](functions/saveConfigFromInitialize.md)
|
||||||
|
@@ -1,19 +0,0 @@
|
|||||||
> **Warning**
|
|
||||||
>
|
|
||||||
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
|
||||||
>
|
|
||||||
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/config/functions/getUserDefinedConfig.md](../../../../../packages/mermaid/src/docs/config/setup/config/functions/getUserDefinedConfig.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Function: getUserDefinedConfig()
|
|
||||||
|
|
||||||
> **getUserDefinedConfig**(): [`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.ts:252](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L252)
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
|
|
||||||
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
@@ -10,6 +10,10 @@
|
|||||||
|
|
||||||
# mermaid
|
# mermaid
|
||||||
|
|
||||||
|
## Classes
|
||||||
|
|
||||||
|
- [UnknownDiagramError](classes/UnknownDiagramError.md)
|
||||||
|
|
||||||
## Interfaces
|
## Interfaces
|
||||||
|
|
||||||
- [DetailedError](interfaces/DetailedError.md)
|
- [DetailedError](interfaces/DetailedError.md)
|
||||||
@@ -23,7 +27,6 @@
|
|||||||
- [RenderOptions](interfaces/RenderOptions.md)
|
- [RenderOptions](interfaces/RenderOptions.md)
|
||||||
- [RenderResult](interfaces/RenderResult.md)
|
- [RenderResult](interfaces/RenderResult.md)
|
||||||
- [RunOptions](interfaces/RunOptions.md)
|
- [RunOptions](interfaces/RunOptions.md)
|
||||||
- [UnknownDiagramError](interfaces/UnknownDiagramError.md)
|
|
||||||
|
|
||||||
## Type Aliases
|
## Type Aliases
|
||||||
|
|
||||||
|
159
docs/config/setup/mermaid/classes/UnknownDiagramError.md
Normal file
159
docs/config/setup/mermaid/classes/UnknownDiagramError.md
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
> **Warning**
|
||||||
|
>
|
||||||
|
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
||||||
|
>
|
||||||
|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/mermaid/classes/UnknownDiagramError.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/classes/UnknownDiagramError.md).
|
||||||
|
|
||||||
|
[**mermaid**](../../README.md)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Class: UnknownDiagramError
|
||||||
|
|
||||||
|
Defined in: [packages/mermaid/src/errors.ts:1](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/errors.ts#L1)
|
||||||
|
|
||||||
|
## Extends
|
||||||
|
|
||||||
|
- `Error`
|
||||||
|
|
||||||
|
## Constructors
|
||||||
|
|
||||||
|
### new UnknownDiagramError()
|
||||||
|
|
||||||
|
> **new UnknownDiagramError**(`message`): [`UnknownDiagramError`](UnknownDiagramError.md)
|
||||||
|
|
||||||
|
Defined in: [packages/mermaid/src/errors.ts:2](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/errors.ts#L2)
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
##### message
|
||||||
|
|
||||||
|
`string`
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
[`UnknownDiagramError`](UnknownDiagramError.md)
|
||||||
|
|
||||||
|
#### Overrides
|
||||||
|
|
||||||
|
`Error.constructor`
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### cause?
|
||||||
|
|
||||||
|
> `optional` **cause**: `unknown`
|
||||||
|
|
||||||
|
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
`Error.cause`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### message
|
||||||
|
|
||||||
|
> **message**: `string`
|
||||||
|
|
||||||
|
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es5.d.ts:1077
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
`Error.message`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### name
|
||||||
|
|
||||||
|
> **name**: `string`
|
||||||
|
|
||||||
|
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es5.d.ts:1076
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
`Error.name`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### stack?
|
||||||
|
|
||||||
|
> `optional` **stack**: `string`
|
||||||
|
|
||||||
|
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es5.d.ts:1078
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
`Error.stack`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### prepareStackTrace()?
|
||||||
|
|
||||||
|
> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any`
|
||||||
|
|
||||||
|
Defined in: node_modules/.pnpm/@types+node\@22.13.5/node_modules/@types/node/globals.d.ts:143
|
||||||
|
|
||||||
|
Optional override for formatting stack traces
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
##### err
|
||||||
|
|
||||||
|
`Error`
|
||||||
|
|
||||||
|
##### stackTraces
|
||||||
|
|
||||||
|
`CallSite`\[]
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`any`
|
||||||
|
|
||||||
|
#### See
|
||||||
|
|
||||||
|
<https://v8.dev/docs/stack-trace-api#customizing-stack-traces>
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
`Error.prepareStackTrace`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### stackTraceLimit
|
||||||
|
|
||||||
|
> `static` **stackTraceLimit**: `number`
|
||||||
|
|
||||||
|
Defined in: node_modules/.pnpm/@types+node\@22.13.5/node_modules/@types/node/globals.d.ts:145
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
`Error.stackTraceLimit`
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### captureStackTrace()
|
||||||
|
|
||||||
|
> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void`
|
||||||
|
|
||||||
|
Defined in: node_modules/.pnpm/@types+node\@22.13.5/node_modules/@types/node/globals.d.ts:136
|
||||||
|
|
||||||
|
Create .stack property on a target object
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
##### targetObject
|
||||||
|
|
||||||
|
`object`
|
||||||
|
|
||||||
|
##### constructorOpt?
|
||||||
|
|
||||||
|
`Function`
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`void`
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
`Error.captureStackTrace`
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Interface: ExternalDiagramDefinition
|
# Interface: ExternalDiagramDefinition
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/diagram-api/types.ts:96](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L96)
|
Defined in: [packages/mermaid/src/diagram-api/types.ts:94](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L94)
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ Defined in: [packages/mermaid/src/diagram-api/types.ts:96](https://github.com/me
|
|||||||
|
|
||||||
> **detector**: `DiagramDetector`
|
> **detector**: `DiagramDetector`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/diagram-api/types.ts:98](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L98)
|
Defined in: [packages/mermaid/src/diagram-api/types.ts:96](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L96)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ Defined in: [packages/mermaid/src/diagram-api/types.ts:98](https://github.com/me
|
|||||||
|
|
||||||
> **id**: `string`
|
> **id**: `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/diagram-api/types.ts:97](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L97)
|
Defined in: [packages/mermaid/src/diagram-api/types.ts:95](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L95)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -34,4 +34,4 @@ Defined in: [packages/mermaid/src/diagram-api/types.ts:97](https://github.com/me
|
|||||||
|
|
||||||
> **loader**: `DiagramLoader`
|
> **loader**: `DiagramLoader`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/diagram-api/types.ts:99](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L99)
|
Defined in: [packages/mermaid/src/diagram-api/types.ts:97](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L97)
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Interface: LayoutData
|
# Interface: LayoutData
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/rendering-util/types.ts:168](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L168)
|
Defined in: [packages/mermaid/src/rendering-util/types.ts:145](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L145)
|
||||||
|
|
||||||
## Indexable
|
## Indexable
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ Defined in: [packages/mermaid/src/rendering-util/types.ts:168](https://github.co
|
|||||||
|
|
||||||
> **config**: [`MermaidConfig`](MermaidConfig.md)
|
> **config**: [`MermaidConfig`](MermaidConfig.md)
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/rendering-util/types.ts:171](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L171)
|
Defined in: [packages/mermaid/src/rendering-util/types.ts:148](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L148)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ Defined in: [packages/mermaid/src/rendering-util/types.ts:171](https://github.co
|
|||||||
|
|
||||||
> **edges**: `Edge`\[]
|
> **edges**: `Edge`\[]
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/rendering-util/types.ts:170](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L170)
|
Defined in: [packages/mermaid/src/rendering-util/types.ts:147](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L147)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -38,4 +38,4 @@ Defined in: [packages/mermaid/src/rendering-util/types.ts:170](https://github.co
|
|||||||
|
|
||||||
> **nodes**: `Node`\[]
|
> **nodes**: `Node`\[]
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/rendering-util/types.ts:169](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L169)
|
Defined in: [packages/mermaid/src/rendering-util/types.ts:146](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/types.ts#L146)
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Interface: LayoutLoaderDefinition
|
# Interface: LayoutLoaderDefinition
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/rendering-util/render.ts:24](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/render.ts#L24)
|
Defined in: [packages/mermaid/src/rendering-util/render.ts:21](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/render.ts#L21)
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ Defined in: [packages/mermaid/src/rendering-util/render.ts:24](https://github.co
|
|||||||
|
|
||||||
> `optional` **algorithm**: `string`
|
> `optional` **algorithm**: `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/rendering-util/render.ts:27](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/render.ts#L27)
|
Defined in: [packages/mermaid/src/rendering-util/render.ts:24](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/render.ts#L24)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ Defined in: [packages/mermaid/src/rendering-util/render.ts:27](https://github.co
|
|||||||
|
|
||||||
> **loader**: `LayoutLoader`
|
> **loader**: `LayoutLoader`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/rendering-util/render.ts:26](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/render.ts#L26)
|
Defined in: [packages/mermaid/src/rendering-util/render.ts:23](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/render.ts#L23)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -34,4 +34,4 @@ Defined in: [packages/mermaid/src/rendering-util/render.ts:26](https://github.co
|
|||||||
|
|
||||||
> **name**: `string`
|
> **name**: `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/rendering-util/render.ts:25](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/render.ts#L25)
|
Defined in: [packages/mermaid/src/rendering-util/render.ts:22](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/render.ts#L22)
|
||||||
|
@@ -32,7 +32,7 @@ page.
|
|||||||
|
|
||||||
### detectType()
|
### detectType()
|
||||||
|
|
||||||
> **detectType**: (`text`, `config?`) => `string`
|
> **detectType**: (`text`, `config`?) => `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:449](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L449)
|
Defined in: [packages/mermaid/src/mermaid.ts:449](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L449)
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ An array of objects with the id of the diagram.
|
|||||||
|
|
||||||
### ~~init()~~
|
### ~~init()~~
|
||||||
|
|
||||||
> **init**: (`config?`, `nodes?`, `callback?`) => `Promise`<`void`>
|
> **init**: (`config`?, `nodes`?, `callback`?) => `Promise`<`void`>
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:442](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L442)
|
Defined in: [packages/mermaid/src/mermaid.ts:442](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L442)
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ Defined in: [packages/mermaid/src/mermaid.ts:442](https://github.com/mermaid-js/
|
|||||||
|
|
||||||
[`MermaidConfig`](MermaidConfig.md)
|
[`MermaidConfig`](MermaidConfig.md)
|
||||||
|
|
||||||
**Deprecated**, please set configuration in [initialize](#initialize).
|
**Deprecated**, please set configuration in [initialize](Mermaid.md#initialize).
|
||||||
|
|
||||||
##### nodes?
|
##### nodes?
|
||||||
|
|
||||||
@@ -141,13 +141,13 @@ Called once for each rendered diagram's id.
|
|||||||
|
|
||||||
#### Deprecated
|
#### Deprecated
|
||||||
|
|
||||||
Use [initialize](#initialize) and [run](#run) instead.
|
Use [initialize](Mermaid.md#initialize) and [run](Mermaid.md#run) instead.
|
||||||
|
|
||||||
Renders the mermaid diagrams
|
Renders the mermaid diagrams
|
||||||
|
|
||||||
#### Deprecated
|
#### Deprecated
|
||||||
|
|
||||||
Use [initialize](#initialize) and [run](#run) instead.
|
Use [initialize](Mermaid.md#initialize) and [run](Mermaid.md#run) instead.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -176,7 +176,7 @@ Configuration object for mermaid.
|
|||||||
|
|
||||||
### ~~mermaidAPI~~
|
### ~~mermaidAPI~~
|
||||||
|
|
||||||
> **mermaidAPI**: `Readonly`<{ `defaultConfig`: [`MermaidConfig`](MermaidConfig.md); `getConfig`: () => [`MermaidConfig`](MermaidConfig.md); `getDiagramFromText`: (`text`, `metadata`) => `Promise`<`Diagram`>; `getSiteConfig`: () => [`MermaidConfig`](MermaidConfig.md); `globalReset`: () => `void`; `initialize`: (`userOptions`) => `void`; `parse`: {(`text`, `parseOptions`): `Promise`<`false` | [`ParseResult`](ParseResult.md)>; (`text`, `parseOptions?`): `Promise`<[`ParseResult`](ParseResult.md)>; }; `render`: (`id`, `text`, `svgContainingElement?`) => `Promise`<[`RenderResult`](RenderResult.md)>; `reset`: () => `void`; `setConfig`: (`conf`) => [`MermaidConfig`](MermaidConfig.md); `updateSiteConfig`: (`conf`) => [`MermaidConfig`](MermaidConfig.md); }>
|
> **mermaidAPI**: `Readonly`<{ `defaultConfig`: [`MermaidConfig`](MermaidConfig.md); `getConfig`: () => [`MermaidConfig`](MermaidConfig.md); `getDiagramFromText`: (`text`, `metadata`) => `Promise`<`Diagram`>; `getSiteConfig`: () => [`MermaidConfig`](MermaidConfig.md); `globalReset`: () => `void`; `initialize`: (`userOptions`) => `void`; `parse`: (`text`, `parseOptions`) => `Promise`<`false` | [`ParseResult`](ParseResult.md)>(`text`, `parseOptions`?) => `Promise`<[`ParseResult`](ParseResult.md)>; `render`: (`id`, `text`, `svgContainingElement`?) => `Promise`<[`RenderResult`](RenderResult.md)>; `reset`: () => `void`; `setConfig`: (`conf`) => [`MermaidConfig`](MermaidConfig.md); `updateSiteConfig`: (`conf`) => [`MermaidConfig`](MermaidConfig.md); }>
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:436](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L436)
|
Defined in: [packages/mermaid/src/mermaid.ts:436](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L436)
|
||||||
|
|
||||||
@@ -184,81 +184,73 @@ Defined in: [packages/mermaid/src/mermaid.ts:436](https://github.com/mermaid-js/
|
|||||||
|
|
||||||
#### Deprecated
|
#### Deprecated
|
||||||
|
|
||||||
Use [parse](#parse) and [render](#render) instead. Please [open a discussion](https://github.com/mermaid-js/mermaid/discussions) if your use case does not fit the new API.
|
Use [parse](Mermaid.md#parse) and [render](Mermaid.md#render) instead. Please [open a discussion](https://github.com/mermaid-js/mermaid/discussions) if your use case does not fit the new API.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### parse()
|
### parse()
|
||||||
|
|
||||||
> **parse**: {(`text`, `parseOptions`): `Promise`<`false` | [`ParseResult`](ParseResult.md)>; (`text`, `parseOptions?`): `Promise`<[`ParseResult`](ParseResult.md)>; }
|
> **parse**: (`text`, `parseOptions`) => `Promise`<`false` | [`ParseResult`](ParseResult.md)>(`text`, `parseOptions`?) => `Promise`<[`ParseResult`](ParseResult.md)>
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:437](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L437)
|
Defined in: [packages/mermaid/src/mermaid.ts:437](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L437)
|
||||||
|
|
||||||
#### Call Signature
|
|
||||||
|
|
||||||
> (`text`, `parseOptions`): `Promise`<`false` | [`ParseResult`](ParseResult.md)>
|
|
||||||
|
|
||||||
Parse the text and validate the syntax.
|
Parse the text and validate the syntax.
|
||||||
|
|
||||||
##### Parameters
|
#### Parameters
|
||||||
|
|
||||||
###### text
|
##### text
|
||||||
|
|
||||||
`string`
|
`string`
|
||||||
|
|
||||||
The mermaid diagram definition.
|
The mermaid diagram definition.
|
||||||
|
|
||||||
###### parseOptions
|
##### parseOptions
|
||||||
|
|
||||||
[`ParseOptions`](ParseOptions.md) & `object`
|
[`ParseOptions`](ParseOptions.md) & `object`
|
||||||
|
|
||||||
Options for parsing.
|
Options for parsing.
|
||||||
|
|
||||||
##### Returns
|
#### Returns
|
||||||
|
|
||||||
`Promise`<`false` | [`ParseResult`](ParseResult.md)>
|
`Promise`<`false` | [`ParseResult`](ParseResult.md)>
|
||||||
|
|
||||||
An object with the `diagramType` set to type of the diagram if valid. Otherwise `false` if parseOptions.suppressErrors is `true`.
|
An object with the `diagramType` set to type of the diagram if valid. Otherwise `false` if parseOptions.suppressErrors is `true`.
|
||||||
|
|
||||||
##### See
|
#### See
|
||||||
|
|
||||||
[ParseOptions](ParseOptions.md)
|
[ParseOptions](ParseOptions.md)
|
||||||
|
|
||||||
##### Throws
|
#### Throws
|
||||||
|
|
||||||
Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.
|
Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.
|
||||||
|
|
||||||
#### Call Signature
|
|
||||||
|
|
||||||
> (`text`, `parseOptions?`): `Promise`<[`ParseResult`](ParseResult.md)>
|
|
||||||
|
|
||||||
Parse the text and validate the syntax.
|
Parse the text and validate the syntax.
|
||||||
|
|
||||||
##### Parameters
|
#### Parameters
|
||||||
|
|
||||||
###### text
|
##### text
|
||||||
|
|
||||||
`string`
|
`string`
|
||||||
|
|
||||||
The mermaid diagram definition.
|
The mermaid diagram definition.
|
||||||
|
|
||||||
###### parseOptions?
|
##### parseOptions?
|
||||||
|
|
||||||
[`ParseOptions`](ParseOptions.md)
|
[`ParseOptions`](ParseOptions.md)
|
||||||
|
|
||||||
Options for parsing.
|
Options for parsing.
|
||||||
|
|
||||||
##### Returns
|
#### Returns
|
||||||
|
|
||||||
`Promise`<[`ParseResult`](ParseResult.md)>
|
`Promise`<[`ParseResult`](ParseResult.md)>
|
||||||
|
|
||||||
An object with the `diagramType` set to type of the diagram if valid. Otherwise `false` if parseOptions.suppressErrors is `true`.
|
An object with the `diagramType` set to type of the diagram if valid. Otherwise `false` if parseOptions.suppressErrors is `true`.
|
||||||
|
|
||||||
##### See
|
#### See
|
||||||
|
|
||||||
[ParseOptions](ParseOptions.md)
|
[ParseOptions](ParseOptions.md)
|
||||||
|
|
||||||
##### Throws
|
#### Throws
|
||||||
|
|
||||||
Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.
|
Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.
|
||||||
|
|
||||||
@@ -340,7 +332,7 @@ Defined in: [packages/mermaid/src/mermaid.ts:444](https://github.com/mermaid-js/
|
|||||||
|
|
||||||
### render()
|
### render()
|
||||||
|
|
||||||
> **render**: (`id`, `text`, `svgContainingElement?`) => `Promise`<[`RenderResult`](RenderResult.md)>
|
> **render**: (`id`, `text`, `svgContainingElement`?) => `Promise`<[`RenderResult`](RenderResult.md)>
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:438](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L438)
|
Defined in: [packages/mermaid/src/mermaid.ts:438](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L438)
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Interface: ParseOptions
|
# Interface: ParseOptions
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:88](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L88)
|
Defined in: [packages/mermaid/src/types.ts:72](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L72)
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ Defined in: [packages/mermaid/src/types.ts:88](https://github.com/mermaid-js/mer
|
|||||||
|
|
||||||
> `optional` **suppressErrors**: `boolean`
|
> `optional` **suppressErrors**: `boolean`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:93](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L93)
|
Defined in: [packages/mermaid/src/types.ts:77](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L77)
|
||||||
|
|
||||||
If `true`, parse will return `false` instead of throwing error when the diagram is invalid.
|
If `true`, parse will return `false` instead of throwing error when the diagram is invalid.
|
||||||
The `parseError` function will not be called.
|
The `parseError` function will not be called.
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Interface: ParseResult
|
# Interface: ParseResult
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:96](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L96)
|
Defined in: [packages/mermaid/src/types.ts:80](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L80)
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ Defined in: [packages/mermaid/src/types.ts:96](https://github.com/mermaid-js/mer
|
|||||||
|
|
||||||
> **config**: [`MermaidConfig`](MermaidConfig.md)
|
> **config**: [`MermaidConfig`](MermaidConfig.md)
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:104](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L104)
|
Defined in: [packages/mermaid/src/types.ts:88](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L88)
|
||||||
|
|
||||||
The config passed as YAML frontmatter or directives
|
The config passed as YAML frontmatter or directives
|
||||||
|
|
||||||
@@ -28,6 +28,6 @@ The config passed as YAML frontmatter or directives
|
|||||||
|
|
||||||
> **diagramType**: `string`
|
> **diagramType**: `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:100](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L100)
|
Defined in: [packages/mermaid/src/types.ts:84](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L84)
|
||||||
|
|
||||||
The diagram type, e.g. 'flowchart', 'sequence', etc.
|
The diagram type, e.g. 'flowchart', 'sequence', etc.
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Interface: RenderOptions
|
# Interface: RenderOptions
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/rendering-util/render.ts:10](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/render.ts#L10)
|
Defined in: [packages/mermaid/src/rendering-util/render.ts:7](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/render.ts#L7)
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
@@ -18,4 +18,4 @@ Defined in: [packages/mermaid/src/rendering-util/render.ts:10](https://github.co
|
|||||||
|
|
||||||
> `optional` **algorithm**: `string`
|
> `optional` **algorithm**: `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/rendering-util/render.ts:11](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/render.ts#L11)
|
Defined in: [packages/mermaid/src/rendering-util/render.ts:8](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/render.ts#L8)
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Interface: RenderResult
|
# Interface: RenderResult
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:114](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L114)
|
Defined in: [packages/mermaid/src/types.ts:98](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L98)
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ Defined in: [packages/mermaid/src/types.ts:114](https://github.com/mermaid-js/me
|
|||||||
|
|
||||||
> `optional` **bindFunctions**: (`element`) => `void`
|
> `optional` **bindFunctions**: (`element`) => `void`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:132](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L132)
|
Defined in: [packages/mermaid/src/types.ts:116](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L116)
|
||||||
|
|
||||||
Bind function to be called after the svg has been inserted into the DOM.
|
Bind function to be called after the svg has been inserted into the DOM.
|
||||||
This is necessary for adding event listeners to the elements in the svg.
|
This is necessary for adding event listeners to the elements in the svg.
|
||||||
@@ -45,7 +45,7 @@ bindFunctions?.(div); // To call bindFunctions only if it's present.
|
|||||||
|
|
||||||
> **diagramType**: `string`
|
> **diagramType**: `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:122](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L122)
|
Defined in: [packages/mermaid/src/types.ts:106](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L106)
|
||||||
|
|
||||||
The diagram type, e.g. 'flowchart', 'sequence', etc.
|
The diagram type, e.g. 'flowchart', 'sequence', etc.
|
||||||
|
|
||||||
@@ -55,6 +55,6 @@ The diagram type, e.g. 'flowchart', 'sequence', etc.
|
|||||||
|
|
||||||
> **svg**: `string`
|
> **svg**: `string`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:118](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L118)
|
Defined in: [packages/mermaid/src/types.ts:102](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L102)
|
||||||
|
|
||||||
The svg code for the rendered graph.
|
The svg code for the rendered graph.
|
||||||
|
@@ -1,65 +0,0 @@
|
|||||||
> **Warning**
|
|
||||||
>
|
|
||||||
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
|
||||||
>
|
|
||||||
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/mermaid/interfaces/UnknownDiagramError.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/interfaces/UnknownDiagramError.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Interface: UnknownDiagramError
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/errors.ts:1](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/errors.ts#L1)
|
|
||||||
|
|
||||||
## Extends
|
|
||||||
|
|
||||||
- `Error`
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
### cause?
|
|
||||||
|
|
||||||
> `optional` **cause**: `unknown`
|
|
||||||
|
|
||||||
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
|
|
||||||
|
|
||||||
#### Inherited from
|
|
||||||
|
|
||||||
`Error.cause`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### message
|
|
||||||
|
|
||||||
> **message**: `string`
|
|
||||||
|
|
||||||
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es5.d.ts:1077
|
|
||||||
|
|
||||||
#### Inherited from
|
|
||||||
|
|
||||||
`Error.message`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### name
|
|
||||||
|
|
||||||
> **name**: `string`
|
|
||||||
|
|
||||||
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es5.d.ts:1076
|
|
||||||
|
|
||||||
#### Inherited from
|
|
||||||
|
|
||||||
`Error.name`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### stack?
|
|
||||||
|
|
||||||
> `optional` **stack**: `string`
|
|
||||||
|
|
||||||
Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib.es5.d.ts:1078
|
|
||||||
|
|
||||||
#### Inherited from
|
|
||||||
|
|
||||||
`Error.stack`
|
|
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
# Type Alias: InternalHelpers
|
# Type Alias: InternalHelpers
|
||||||
|
|
||||||
> **InternalHelpers** = _typeof_ `internalHelpers`
|
> **InternalHelpers**: _typeof_ `internalHelpers`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/internals.ts:33](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/internals.ts#L33)
|
Defined in: [packages/mermaid/src/internals.ts:33](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/internals.ts#L33)
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Type Alias: ParseErrorFunction()
|
# Type Alias: ParseErrorFunction()
|
||||||
|
|
||||||
> **ParseErrorFunction** = (`err`, `hash?`) => `void`
|
> **ParseErrorFunction**: (`err`, `hash`?) => `void`
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/Diagram.ts:10](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/Diagram.ts#L10)
|
Defined in: [packages/mermaid/src/Diagram.ts:10](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/Diagram.ts#L10)
|
||||||
|
|
||||||
|
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
# Type Alias: SVG
|
# Type Alias: SVG
|
||||||
|
|
||||||
> **SVG** = `d3.Selection`<`SVGSVGElement`, `unknown`, `Element` | `null`, `unknown`>
|
> **SVG**: `d3.Selection`<`SVGSVGElement`, `unknown`, `Element` | `null`, `unknown`>
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/diagram-api/types.ts:128](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L128)
|
Defined in: [packages/mermaid/src/diagram-api/types.ts:126](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L126)
|
||||||
|
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
# Type Alias: SVGGroup
|
# Type Alias: SVGGroup
|
||||||
|
|
||||||
> **SVGGroup** = `d3.Selection`<`SVGGElement`, `unknown`, `Element` | `null`, `unknown`>
|
> **SVGGroup**: `d3.Selection`<`SVGGElement`, `unknown`, `Element` | `null`, `unknown`>
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/diagram-api/types.ts:130](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L130)
|
Defined in: [packages/mermaid/src/diagram-api/types.ts:128](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L128)
|
||||||
|
@@ -1,89 +0,0 @@
|
|||||||
> **Warning**
|
|
||||||
>
|
|
||||||
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
|
||||||
>
|
|
||||||
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/tidy-tree.md](../../packages/mermaid/src/docs/config/tidy-tree.md).
|
|
||||||
|
|
||||||
# Tidy-tree Layout
|
|
||||||
|
|
||||||
The **tidy-tree** layout arranges nodes in a hierarchical, tree-like structure. It is especially useful for diagrams where parent-child relationships are important, such as mindmaps.
|
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
- Organizes nodes in a tidy, non-overlapping tree
|
|
||||||
- Ideal for mindmaps and hierarchical data
|
|
||||||
- Automatically adjusts spacing for readability
|
|
||||||
|
|
||||||
## Example Usage
|
|
||||||
|
|
||||||
```mermaid-example
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: tidy-tree
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap is a long thing))
|
|
||||||
A
|
|
||||||
B
|
|
||||||
C
|
|
||||||
D
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: tidy-tree
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap is a long thing))
|
|
||||||
A
|
|
||||||
B
|
|
||||||
C
|
|
||||||
D
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid-example
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: tidy-tree
|
|
||||||
---
|
|
||||||
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
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: tidy-tree
|
|
||||||
---
|
|
||||||
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
|
|
||||||
```
|
|
||||||
|
|
||||||
## Note
|
|
||||||
|
|
||||||
- Currently, tidy-tree is primarily supported for mindmap diagrams.
|
|
@@ -73,7 +73,7 @@ To add an integration to this list, see the [Integrations - create page](./integ
|
|||||||
- [Obsidian](https://help.obsidian.md/Editing+and+formatting/Advanced+formatting+syntax#Diagram) ✅
|
- [Obsidian](https://help.obsidian.md/Editing+and+formatting/Advanced+formatting+syntax#Diagram) ✅
|
||||||
- [Outline](https://docs.getoutline.com/s/guide/doc/diagrams-KQiKoT4wzK) ✅
|
- [Outline](https://docs.getoutline.com/s/guide/doc/diagrams-KQiKoT4wzK) ✅
|
||||||
- [Redmine](https://redmine.org)
|
- [Redmine](https://redmine.org)
|
||||||
- [Mermaid Macro](https://redmine.org/plugins/redmine_mermaid_macro)
|
- [Mermaid Macro](https://www.redmine.org/plugins/redmine_mermaid_macro)
|
||||||
- [Markdown for mermaid plugin](https://github.com/jamieh-mongolian/markdown-for-mermaid-plugin)
|
- [Markdown for mermaid plugin](https://github.com/jamieh-mongolian/markdown-for-mermaid-plugin)
|
||||||
- [redmine-mermaid](https://github.com/styz/redmine_mermaid)
|
- [redmine-mermaid](https://github.com/styz/redmine_mermaid)
|
||||||
- Visual Studio Code [Polyglot Interactive Notebooks](https://github.com/dotnet/interactive#net-interactive)
|
- Visual Studio Code [Polyglot Interactive Notebooks](https://github.com/dotnet/interactive#net-interactive)
|
||||||
|
@@ -29,6 +29,7 @@ Try the Ultimate AI, Mermaid, and Visual Diagramming Suite by creating an accoun
|
|||||||
- **Plugins** - A plugin system for extending the functionality of Mermaid.
|
- **Plugins** - A plugin system for extending the functionality of Mermaid.
|
||||||
|
|
||||||
Official Mermaid Chart plugins:
|
Official Mermaid Chart plugins:
|
||||||
|
|
||||||
- [Mermaid Chart GPT](https://chatgpt.com/g/g-684cc36f30208191b21383b88650a45d-mermaid-chart-diagrams-and-charts)
|
- [Mermaid Chart GPT](https://chatgpt.com/g/g-684cc36f30208191b21383b88650a45d-mermaid-chart-diagrams-and-charts)
|
||||||
- [Confluence](https://marketplace.atlassian.com/apps/1234056/mermaid-chart-for-confluence?hosting=cloud&tab=overview)
|
- [Confluence](https://marketplace.atlassian.com/apps/1234056/mermaid-chart-for-confluence?hosting=cloud&tab=overview)
|
||||||
- [Jira](https://marketplace.atlassian.com/apps/1234810/mermaid-chart-for-jira?tab=overview&hosting=cloud)
|
- [Jira](https://marketplace.atlassian.com/apps/1234810/mermaid-chart-for-jira?tab=overview&hosting=cloud)
|
||||||
|
@@ -35,11 +35,13 @@ The Mermaid Chart team is excited to introduce a new Visual Editor for Flowchart
|
|||||||
Learn more:
|
Learn more:
|
||||||
|
|
||||||
- Visual Editor For Flowcharts
|
- Visual Editor For Flowcharts
|
||||||
|
|
||||||
- [Blog post](https://www.mermaidchart.com/blog/posts/mermaid-chart-releases-new-visual-editor-for-flowcharts)
|
- [Blog post](https://www.mermaidchart.com/blog/posts/mermaid-chart-releases-new-visual-editor-for-flowcharts)
|
||||||
|
|
||||||
- [Demo video](https://www.youtube.com/watch?v=5aja0gijoO0)
|
- [Demo video](https://www.youtube.com/watch?v=5aja0gijoO0)
|
||||||
|
|
||||||
- Visual Editor For Sequence diagrams
|
- Visual Editor For Sequence diagrams
|
||||||
|
|
||||||
- [Blog post](https://www.mermaidchart.com/blog/posts/mermaid-chart-unveils-visual-editor-for-sequence-diagrams)
|
- [Blog post](https://www.mermaidchart.com/blog/posts/mermaid-chart-unveils-visual-editor-for-sequence-diagrams)
|
||||||
|
|
||||||
- [Demo video](https://youtu.be/imc2u5_N6Dc)
|
- [Demo video](https://youtu.be/imc2u5_N6Dc)
|
||||||
|
@@ -6,78 +6,6 @@
|
|||||||
|
|
||||||
# Blog
|
# Blog
|
||||||
|
|
||||||
## [The Essential Guide to Mermaid Chart Plugin for VS Code \[08/2025\]](https://docs.mermaidchart.com/blog/posts/the-essential-guide-to-mermaid-chart-plugin-for-vs-code-08-2025)
|
|
||||||
|
|
||||||
9/9/2025 • 5 mins
|
|
||||||
|
|
||||||
Creating diagrams in VS Code has never been easier—the Mermaid VS Code plugin transforms text-based syntax into clear, professional visuals right inside your editor. With live previews, smart editing, and AI-powered diagram generation, it removes the friction from visualization so you can focus on coding.
|
|
||||||
|
|
||||||
## [How to Create Perfect Flowcharts Using AI in 2025 Step-by-Step Guide](https://docs.mermaidchart.com/blog/posts/how-to-create-perfect-flowcharts-using-ai-in-2025-step-by-step-guide)
|
|
||||||
|
|
||||||
7/22/2025 • 8 mins
|
|
||||||
|
|
||||||
In 2025, AI tools make creating flowcharts faster and easier than ever. With Mermaid’s AI flowchart generator, you can turn plain text into clear, accurate diagrams in seconds. This guide walks through how it works and how to get the most out of it for technical and business workflows alike.
|
|
||||||
|
|
||||||
## [Mermaid introduces the Visual Editor for Entity Relationship diagrams](https://docs.mermaidchart.com/blog/posts/mermaid-introduces-the-visual-editor-for-entity-relationship-diagrams)
|
|
||||||
|
|
||||||
7/15/2025 • 7 mins
|
|
||||||
|
|
||||||
Mermaid just introduced a Visual Editor for Entity Relationship diagrams, letting anyone map database structures through a simple point-and-click interface instead of code. This no-code ER builder now sits alongside Mermaid’s editors for flowcharts, sequence, and class diagrams, enabling teams to craft and share polished data models for apps, AI, and business processes.
|
|
||||||
|
|
||||||
## [Mermaid supports Treemap Diagrams now!!!](https://docs.mermaidchart.com/blog/posts/mermaid-have-treemap-diagrams-now)
|
|
||||||
|
|
||||||
7/3/2025 • 4 mins
|
|
||||||
|
|
||||||
Mermaid has introduced Treemap diagrams, currently in beta, enhancing hierarchical data visualization. Treemap diagrams use nested rectangles to represent data relationships, focusing on size and proportions. They offer various applications, including budget visualization and market analysis. With simple syntax and customization options, users can effectively present complex data hierarchies.
|
|
||||||
|
|
||||||
## [AI Diagram Generators and Data Visualization: Best Practices](https://docs.mermaidchart.com/blog/posts/ai-diagram-generators-and-data-visualization-best-practices)
|
|
||||||
|
|
||||||
7/2/2025 • 6 mins
|
|
||||||
|
|
||||||
AI diagram generators transform complex data into clear, interactive visuals – enabling faster analysis, better decisions, and stronger collaboration across teams. By combining automation with manual refinement, these tools empower anyone to communicate insights effectively, regardless of technical skill level.
|
|
||||||
|
|
||||||
## [How to Choose the Best AI Diagram Generator for Your Needs (2025)](https://docs.mermaidchart.com/blog/posts/how-to-choose-the-best-ai-diagram-generator-for-your-needs-2025)
|
|
||||||
|
|
||||||
6/26/2025 • 14 mins
|
|
||||||
|
|
||||||
AI diagram generators are transforming how developers visualize and communicate complex systems, reducing hours of manual work into minutes. With tools like Mermaid AI, users benefit from both code-based and visual editing, enabling seamless collaboration and precision. Whether you’re diagramming workflows, software architecture, or data relationships, the right AI tool can significantly boost productivity and streamline communication.
|
|
||||||
|
|
||||||
## [5 Time-Saving Tips for Using Mermaid’s AI Diagram Generator Effectively](https://docs.mermaidchart.com/blog/posts/5-time-saving-tips-for-using-mermaids-ai-diagram-generator-effectively)
|
|
||||||
|
|
||||||
6/11/2025 • 10 mins
|
|
||||||
|
|
||||||
See how developers can save time and boost productivity using Mermaid Chart’s AI diagram generator. Learn five practical tips that help turn plain language into powerful, professional diagrams.
|
|
||||||
|
|
||||||
## [Enhancing Team Collaboration with AI-Powered Diagrams](https://docs.mermaidchart.com/blog/posts/enhancing-team-collaboration-with-ai-powered-diagrams)
|
|
||||||
|
|
||||||
5/27/2025 • 6 mins
|
|
||||||
|
|
||||||
Software teams move fast, but old-school diagramming tools can’t keep up. Mermaid Chart replaces static slides and whiteboards with real-time, AI-generated visuals that evolve with your code and ideas. Just describe a process in plain English, and watch it come to life.
|
|
||||||
|
|
||||||
## [What is an AI Diagram Generator? Benefits and Use Cases](https://docs.mermaidchart.com/blog/posts/what-is-an-ai-diagram-generator-benefits-and-use-cases)
|
|
||||||
|
|
||||||
5/22/2025 • 6 mins
|
|
||||||
|
|
||||||
Discover how AI diagram generators like Mermaid Chart transform developer workflows. Instantly turn text into flowcharts, ERDs, and system diagrams, no manual drag-and-drop needed. Learn how it works, key benefits, and real-world use cases.
|
|
||||||
|
|
||||||
## [How to Use Mermaid Chart as an AI Diagram Generator for Developers](https://docs.mermaidchart.com/blog/posts/how-to-use-mermaid-chart-as-an-ai-diagram-generator)
|
|
||||||
|
|
||||||
5/21/2025 • 9 mins
|
|
||||||
|
|
||||||
Would an AI diagram generator make your life easier? We think it would!
|
|
||||||
|
|
||||||
## [Mermaid Chart VS Code Plugin: Create and Edit Mermaid.js Diagrams in Visual Studio Code](https://docs.mermaidchart.com/blog/posts/mermaid-chart-vs-code-plugin-create-and-edit-mermaid-js-diagrams-in-visual-studio-code)
|
|
||||||
|
|
||||||
3/21/2025 • 5 mins
|
|
||||||
|
|
||||||
The Mermaid Chart VS Code Plugin is a powerful developer diagramming tool that brings Mermaid.js diagramming directly into your Visual Studio Code environment. Whether you’re visualizing software architecture, documenting API flows, fixing bad documentation, or managing flowcharts and sequence diagrams, this plugin integrates seamlessly into your workflow. Key Features of the Mermaid Chart VS Code \[…]
|
|
||||||
|
|
||||||
## [Mermaid Chart: The Evolution of Mermaid](https://docs.mermaidchart.com/blog/posts/mermaid-chart-the-evolution-of-mermaid)
|
|
||||||
|
|
||||||
1/30/2025 • 3 mins
|
|
||||||
|
|
||||||
Mermaid revolutionized diagramming with its simple, markdown-style syntax, empowering millions of developers worldwide. Now, Mermaid Chart takes it further with AI-powered visuals, a GUI for seamless editing, real-time collaboration, and advanced design tools. Experience the next generation of diagramming—faster, smarter, and built for modern teams. Try Mermaid Chart today!
|
|
||||||
|
|
||||||
## [GUI for editing Mermaid Class Diagrams](https://docs.mermaidchart.com/blog/posts/gui-for-editing-mermaid-class-diagrams)
|
## [GUI for editing Mermaid Class Diagrams](https://docs.mermaidchart.com/blog/posts/gui-for-editing-mermaid-class-diagrams)
|
||||||
|
|
||||||
1/17/2025 • 5 mins
|
1/17/2025 • 5 mins
|
||||||
|
@@ -194,7 +194,7 @@ architecture-beta
|
|||||||
## Icons
|
## Icons
|
||||||
|
|
||||||
By default, architecture diagram supports the following icons: `cloud`, `database`, `disk`, `internet`, `server`.
|
By default, architecture diagram supports the following icons: `cloud`, `database`, `disk`, `internet`, `server`.
|
||||||
Users can use any of the 200,000+ icons available in iconify.design, or add other custom icons, by [registering an icon pack](../config/icons.md).
|
Users can use any of the 200,000+ icons available in iconify.design, or [add custom icons](../config/icons.md).
|
||||||
|
|
||||||
After the icons are installed, they can be used in the architecture diagram by using the format "name:icon-name", where name is the value used when registering the icon pack.
|
After the icons are installed, they can be used in the architecture diagram by using the format "name:icon-name", where name is the value used when registering the icon pack.
|
||||||
|
|
||||||
|
@@ -139,6 +139,7 @@ The following unfinished features are not supported in the short term.
|
|||||||
- [ ] Legend
|
- [ ] Legend
|
||||||
|
|
||||||
- [x] System Context
|
- [x] System Context
|
||||||
|
|
||||||
- [x] Person(alias, label, ?descr, ?sprite, ?tags, $link)
|
- [x] Person(alias, label, ?descr, ?sprite, ?tags, $link)
|
||||||
- [x] Person_Ext
|
- [x] Person_Ext
|
||||||
- [x] System(alias, label, ?descr, ?sprite, ?tags, $link)
|
- [x] System(alias, label, ?descr, ?sprite, ?tags, $link)
|
||||||
@@ -152,6 +153,7 @@ The following unfinished features are not supported in the short term.
|
|||||||
- [x] System_Boundary
|
- [x] System_Boundary
|
||||||
|
|
||||||
- [x] Container diagram
|
- [x] Container diagram
|
||||||
|
|
||||||
- [x] Container(alias, label, ?techn, ?descr, ?sprite, ?tags, $link)
|
- [x] Container(alias, label, ?techn, ?descr, ?sprite, ?tags, $link)
|
||||||
- [x] ContainerDb
|
- [x] ContainerDb
|
||||||
- [x] ContainerQueue
|
- [x] ContainerQueue
|
||||||
@@ -161,6 +163,7 @@ The following unfinished features are not supported in the short term.
|
|||||||
- [x] Container_Boundary(alias, label, ?tags, $link)
|
- [x] Container_Boundary(alias, label, ?tags, $link)
|
||||||
|
|
||||||
- [x] Component diagram
|
- [x] Component diagram
|
||||||
|
|
||||||
- [x] Component(alias, label, ?techn, ?descr, ?sprite, ?tags, $link)
|
- [x] Component(alias, label, ?techn, ?descr, ?sprite, ?tags, $link)
|
||||||
- [x] ComponentDb
|
- [x] ComponentDb
|
||||||
- [x] ComponentQueue
|
- [x] ComponentQueue
|
||||||
@@ -169,15 +172,18 @@ The following unfinished features are not supported in the short term.
|
|||||||
- [x] ComponentQueue_Ext
|
- [x] ComponentQueue_Ext
|
||||||
|
|
||||||
- [x] Dynamic diagram
|
- [x] Dynamic diagram
|
||||||
|
|
||||||
- [x] RelIndex(index, from, to, label, ?tags, $link)
|
- [x] RelIndex(index, from, to, label, ?tags, $link)
|
||||||
|
|
||||||
- [x] Deployment diagram
|
- [x] Deployment diagram
|
||||||
|
|
||||||
- [x] Deployment_Node(alias, label, ?type, ?descr, ?sprite, ?tags, $link)
|
- [x] Deployment_Node(alias, label, ?type, ?descr, ?sprite, ?tags, $link)
|
||||||
- [x] Node(alias, label, ?type, ?descr, ?sprite, ?tags, $link): short name of Deployment_Node()
|
- [x] Node(alias, label, ?type, ?descr, ?sprite, ?tags, $link): short name of Deployment_Node()
|
||||||
- [x] Node_L(alias, label, ?type, ?descr, ?sprite, ?tags, $link): left aligned Node()
|
- [x] Node_L(alias, label, ?type, ?descr, ?sprite, ?tags, $link): left aligned Node()
|
||||||
- [x] Node_R(alias, label, ?type, ?descr, ?sprite, ?tags, $link): right aligned Node()
|
- [x] Node_R(alias, label, ?type, ?descr, ?sprite, ?tags, $link): right aligned Node()
|
||||||
|
|
||||||
- [x] Relationship Types
|
- [x] Relationship Types
|
||||||
|
|
||||||
- [x] Rel(from, to, label, ?techn, ?descr, ?sprite, ?tags, $link)
|
- [x] Rel(from, to, label, ?techn, ?descr, ?sprite, ?tags, $link)
|
||||||
- [x] BiRel (bidirectional relationship)
|
- [x] BiRel (bidirectional relationship)
|
||||||
- [x] Rel_U, Rel_Up
|
- [x] Rel_U, Rel_Up
|
||||||
|
@@ -326,9 +326,7 @@ Below is a comprehensive list of the newly introduced shapes and their correspon
|
|||||||
|
|
||||||
| **Semantic Name** | **Shape Name** | **Short Name** | **Description** | **Alias Supported** |
|
| **Semantic Name** | **Shape Name** | **Short Name** | **Description** | **Alias Supported** |
|
||||||
| --------------------------------- | ---------------------- | -------------- | ------------------------------ | ---------------------------------------------------------------- |
|
| --------------------------------- | ---------------------- | -------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||||
| Bang | Bang | `bang` | Bang | `bang` |
|
|
||||||
| Card | Notched Rectangle | `notch-rect` | Represents a card | `card`, `notched-rectangle` |
|
| Card | Notched Rectangle | `notch-rect` | Represents a card | `card`, `notched-rectangle` |
|
||||||
| Cloud | Cloud | `cloud` | cloud | `cloud` |
|
|
||||||
| Collate | Hourglass | `hourglass` | Represents a collate operation | `collate`, `hourglass` |
|
| Collate | Hourglass | `hourglass` | Represents a collate operation | `collate`, `hourglass` |
|
||||||
| Com Link | Lightning Bolt | `bolt` | Communication link | `com-link`, `lightning-bolt` |
|
| Com Link | Lightning Bolt | `bolt` | Communication link | `com-link`, `lightning-bolt` |
|
||||||
| Comment | Curly Brace | `brace` | Adds a comment | `brace-l`, `comment` |
|
| Comment | Curly Brace | `brace` | Adds a comment | `brace-l`, `comment` |
|
||||||
@@ -985,23 +983,11 @@ flowchart TD
|
|||||||
- `b`
|
- `b`
|
||||||
- **w**: The width of the image. If not defined, this will default to the natural width of the image.
|
- **w**: The width of the image. If not defined, this will default to the natural width of the image.
|
||||||
- **h**: The height of the image. If not defined, this will default to the natural height of the image.
|
- **h**: The height of the image. If not defined, this will default to the natural height of the image.
|
||||||
- **constraint**: Determines if the image should constrain the node size. This setting also ensures the image maintains its original aspect ratio, adjusting the width (`w`) accordingly to the height (`h`). If not defined, this will default to `off` Possible values are:
|
- **constraint**: Determines if the image should constrain the node size. This setting also ensures the image maintains its original aspect ratio, adjusting the height (`h`) accordingly to the width (`w`). If not defined, this will default to `off` Possible values are:
|
||||||
- `on`
|
- `on`
|
||||||
- `off`
|
- `off`
|
||||||
|
|
||||||
If you want to resize an image, but keep the same aspect ratio, set `h`, and set `constraint: on` to constrain the aspect ratio. E.g.
|
These new shapes provide additional flexibility and visual appeal to your flowcharts, making them more informative and engaging.
|
||||||
|
|
||||||
```mermaid-example
|
|
||||||
flowchart TD
|
|
||||||
%% My image with a constrained aspect ratio
|
|
||||||
A@{ img: "https://mermaid.js.org/favicon.svg", label: "My example image label", pos: "t", h: 60, constraint: "on" }
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
flowchart TD
|
|
||||||
%% My image with a constrained aspect ratio
|
|
||||||
A@{ img: "https://mermaid.js.org/favicon.svg", label: "My example image label", pos: "t", h: 60, constraint: "on" }
|
|
||||||
```
|
|
||||||
|
|
||||||
## Links between nodes
|
## Links between nodes
|
||||||
|
|
||||||
@@ -1830,7 +1816,7 @@ config:
|
|||||||
graph LR
|
graph LR
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Edge level curve style using Edge IDs (v11.10.0+)
|
#### Edge level curve style using Edge IDs (v\<MERMAID_RELEASE_VERSION>+)
|
||||||
|
|
||||||
You can assign IDs to [edges](#attaching-an-id-to-edges). After assigning an ID you can modify the line style by modifying the edge's `curve` property using the following syntax:
|
You can assign IDs to [edges](#attaching-an-id-to-edges). After assigning an ID you can modify the line style by modifying the edge's `curve` property using the following syntax:
|
||||||
|
|
||||||
|
@@ -360,8 +360,7 @@ gantt
|
|||||||
weekday monday
|
weekday monday
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Warning**
|
> **Warning** > `millisecond` and `second` support was added in v10.3.0
|
||||||
> `millisecond` and `second` support was added in v10.3.0
|
|
||||||
|
|
||||||
## Output in compact mode
|
## Output in compact mode
|
||||||
|
|
||||||
|
@@ -314,22 +314,3 @@ You can also refer the [implementation in the live editor](https://github.com/me
|
|||||||
cspell:locale en,en-gb
|
cspell:locale en,en-gb
|
||||||
cspell:ignore Buzan
|
cspell:ignore Buzan
|
||||||
--->
|
--->
|
||||||
|
|
||||||
## Layouts
|
|
||||||
|
|
||||||
Mermaid also supports a Tidy Tree layout for mindmaps.
|
|
||||||
|
|
||||||
```
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
layout: tidy-tree
|
|
||||||
---
|
|
||||||
mindmap
|
|
||||||
root((mindmap is a long thing))
|
|
||||||
A
|
|
||||||
B
|
|
||||||
C
|
|
||||||
D
|
|
||||||
```
|
|
||||||
|
|
||||||
Instructions to add and register tidy-tree layout are present in [Tidy Tree Configuration](/config/tidy-tree)
|
|
||||||
|
@@ -74,126 +74,6 @@ sequenceDiagram
|
|||||||
Bob->>Alice: Hi Alice
|
Bob->>Alice: Hi Alice
|
||||||
```
|
```
|
||||||
|
|
||||||
### Boundary
|
|
||||||
|
|
||||||
If you want to use the boundary symbol for a participant, use the JSON configuration syntax as shown below.
|
|
||||||
|
|
||||||
```mermaid-example
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "boundary" }
|
|
||||||
participant Bob
|
|
||||||
Alice->>Bob: Request from boundary
|
|
||||||
Bob->>Alice: Response to boundary
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "boundary" }
|
|
||||||
participant Bob
|
|
||||||
Alice->>Bob: Request from boundary
|
|
||||||
Bob->>Alice: Response to boundary
|
|
||||||
```
|
|
||||||
|
|
||||||
### Control
|
|
||||||
|
|
||||||
If you want to use the control symbol for a participant, use the JSON configuration syntax as shown below.
|
|
||||||
|
|
||||||
```mermaid-example
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "control" }
|
|
||||||
participant Bob
|
|
||||||
Alice->>Bob: Control request
|
|
||||||
Bob->>Alice: Control response
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "control" }
|
|
||||||
participant Bob
|
|
||||||
Alice->>Bob: Control request
|
|
||||||
Bob->>Alice: Control response
|
|
||||||
```
|
|
||||||
|
|
||||||
### Entity
|
|
||||||
|
|
||||||
If you want to use the entity symbol for a participant, use the JSON configuration syntax as shown below.
|
|
||||||
|
|
||||||
```mermaid-example
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "entity" }
|
|
||||||
participant Bob
|
|
||||||
Alice->>Bob: Entity request
|
|
||||||
Bob->>Alice: Entity response
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "entity" }
|
|
||||||
participant Bob
|
|
||||||
Alice->>Bob: Entity request
|
|
||||||
Bob->>Alice: Entity response
|
|
||||||
```
|
|
||||||
|
|
||||||
### Database
|
|
||||||
|
|
||||||
If you want to use the database symbol for a participant, use the JSON configuration syntax as shown below.
|
|
||||||
|
|
||||||
```mermaid-example
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "database" }
|
|
||||||
participant Bob
|
|
||||||
Alice->>Bob: DB query
|
|
||||||
Bob->>Alice: DB result
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "database" }
|
|
||||||
participant Bob
|
|
||||||
Alice->>Bob: DB query
|
|
||||||
Bob->>Alice: DB result
|
|
||||||
```
|
|
||||||
|
|
||||||
### Collections
|
|
||||||
|
|
||||||
If you want to use the collections symbol for a participant, use the JSON configuration syntax as shown below.
|
|
||||||
|
|
||||||
```mermaid-example
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "collections" }
|
|
||||||
participant Bob
|
|
||||||
Alice->>Bob: Collections request
|
|
||||||
Bob->>Alice: Collections response
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "collections" }
|
|
||||||
participant Bob
|
|
||||||
Alice->>Bob: Collections request
|
|
||||||
Bob->>Alice: Collections response
|
|
||||||
```
|
|
||||||
|
|
||||||
### Queue
|
|
||||||
|
|
||||||
If you want to use the queue symbol for a participant, use the JSON configuration syntax as shown below.
|
|
||||||
|
|
||||||
```mermaid-example
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "queue" }
|
|
||||||
participant Bob
|
|
||||||
Alice->>Bob: Queue message
|
|
||||||
Bob->>Alice: Queue response
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice@{ "type" : "queue" }
|
|
||||||
participant Bob
|
|
||||||
Alice->>Bob: Queue message
|
|
||||||
Bob->>Alice: Queue response
|
|
||||||
```
|
|
||||||
|
|
||||||
### Aliases
|
### Aliases
|
||||||
|
|
||||||
The actor can have a convenient identifier and a descriptive label.
|
The actor can have a convenient identifier and a descriptive label.
|
||||||
|
@@ -38,5 +38,3 @@ Each user journey is split into sections, these describe the part of the task
|
|||||||
the user is trying to complete.
|
the user is trying to complete.
|
||||||
|
|
||||||
Tasks syntax is `Task name: <score>: <comma separated list of actors>`
|
Tasks syntax is `Task name: <score>: <comma separated list of actors>`
|
||||||
|
|
||||||
Score is a number between 1 and 5, inclusive.
|
|
||||||
|
@@ -138,7 +138,7 @@ xychart
|
|||||||
|
|
||||||
## Chart Theme Variables
|
## Chart Theme Variables
|
||||||
|
|
||||||
Themes for xychart reside inside the `xychart` attribute, allowing customization through the following syntax:
|
Themes for xychart resides inside xychart attribute so to set the variables use this syntax:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
---
|
---
|
||||||
@@ -163,52 +163,6 @@ config:
|
|||||||
| yAxisLineColor | Color of the y-axis line |
|
| yAxisLineColor | Color of the y-axis line |
|
||||||
| plotColorPalette | String of colors separated by comma e.g. "#f3456, #43445" |
|
| plotColorPalette | String of colors separated by comma e.g. "#f3456, #43445" |
|
||||||
|
|
||||||
### Setting Colors for Lines and Bars
|
|
||||||
|
|
||||||
To set the color for lines and bars, use the `plotColorPalette` parameter. Colors in the palette will correspond sequentially to the elements in your chart (e.g., first bar/line will use the first color specified in the palette).
|
|
||||||
|
|
||||||
```mermaid-example
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
themeVariables:
|
|
||||||
xyChart:
|
|
||||||
plotColorPalette: '#000000, #0000FF, #00FF00, #FF0000'
|
|
||||||
---
|
|
||||||
xychart
|
|
||||||
title "Different Colors in xyChart"
|
|
||||||
x-axis "categoriesX" ["Category 1", "Category 2", "Category 3", "Category 4"]
|
|
||||||
y-axis "valuesY" 0 --> 50
|
|
||||||
%% Black line
|
|
||||||
line [10,20,30,40]
|
|
||||||
%% Blue bar
|
|
||||||
bar [20,30,25,35]
|
|
||||||
%% Green bar
|
|
||||||
bar [15,25,20,30]
|
|
||||||
%% Red line
|
|
||||||
line [5,15,25,35]
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
themeVariables:
|
|
||||||
xyChart:
|
|
||||||
plotColorPalette: '#000000, #0000FF, #00FF00, #FF0000'
|
|
||||||
---
|
|
||||||
xychart
|
|
||||||
title "Different Colors in xyChart"
|
|
||||||
x-axis "categoriesX" ["Category 1", "Category 2", "Category 3", "Category 4"]
|
|
||||||
y-axis "valuesY" 0 --> 50
|
|
||||||
%% Black line
|
|
||||||
line [10,20,30,40]
|
|
||||||
%% Blue bar
|
|
||||||
bar [20,30,25,35]
|
|
||||||
%% Green bar
|
|
||||||
bar [15,25,20,30]
|
|
||||||
%% Red line
|
|
||||||
line [5,15,25,35]
|
|
||||||
```
|
|
||||||
|
|
||||||
## Example on config and theme
|
## Example on config and theme
|
||||||
|
|
||||||
```mermaid-example
|
```mermaid-example
|
||||||
|
@@ -17,7 +17,6 @@ export default tseslint.config(
|
|||||||
...tseslint.configs.stylisticTypeChecked,
|
...tseslint.configs.stylisticTypeChecked,
|
||||||
{
|
{
|
||||||
ignores: [
|
ignores: [
|
||||||
'**/*.d.ts',
|
|
||||||
'**/dist/',
|
'**/dist/',
|
||||||
'**/node_modules/',
|
'**/node_modules/',
|
||||||
'.git/',
|
'.git/',
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user