mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-08 16:49:38 +02:00
Compare commits
1 Commits
sidv/clean
...
topbar-con
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f85bb1496a |
@@ -27,7 +27,6 @@ const MERMAID_CONFIG_DIAGRAM_KEYS = [
|
|||||||
'block',
|
'block',
|
||||||
'packet',
|
'packet',
|
||||||
'architecture',
|
'architecture',
|
||||||
'radar',
|
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
chore: Convert StateDB into TypeScript
|
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
fix: Remove incorrect `style="undefined;"` attributes in some Mermaid diagrams
|
|
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
'@mermaid-js/mermaid-zenuml': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
chore: bump minimum ZenUML version to 3.23.28
|
|
||||||
|
|
||||||
commit: 9d06d8f31e7f12af9e9e092214f907f2dc93ad75
|
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
feat: Add support for styling Journey Diagram title (color, font-family, and font-size)
|
|
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
'@mermaid-js/parser': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Refactor grammar so that title don't break Architecture Diagrams
|
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
feat: Dynamically Render Data Labels Within Bar Charts
|
|
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'mermaid': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
fix: allow colons in events
|
|
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
'@mermaid-js/mermaid-zenuml': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
fix(zenuml): limit `peerDependencies` to Mermaid v10 and v11
|
|
||||||
|
|
||||||
commit: 0ad44c12feead9d20c6a870a49327ada58d6e657
|
|
@@ -53,6 +53,7 @@ frontmatter
|
|||||||
funs
|
funs
|
||||||
gantt
|
gantt
|
||||||
GENERICTYPE
|
GENERICTYPE
|
||||||
|
getBoundarys
|
||||||
grammr
|
grammr
|
||||||
graphtype
|
graphtype
|
||||||
halign
|
halign
|
||||||
|
@@ -34,19 +34,6 @@ const buildPackage = async (entryName: keyof typeof packageOptions) => {
|
|||||||
{ ...iifeOptions, minify: true, metafile: shouldVisualize }
|
{ ...iifeOptions, minify: true, metafile: shouldVisualize }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (entryName === 'mermaid-zenuml') {
|
|
||||||
const iifeOptions: MermaidBuildOptions = {
|
|
||||||
...commonOptions,
|
|
||||||
format: 'iife',
|
|
||||||
globalName: 'mermaid-zenuml',
|
|
||||||
};
|
|
||||||
buildConfigs.push(
|
|
||||||
// mermaid-zenuml.js
|
|
||||||
{ ...iifeOptions },
|
|
||||||
// mermaid-zenuml.min.js
|
|
||||||
{ ...iifeOptions, minify: true, metafile: shouldVisualize }
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const results = await Promise.all(buildConfigs.map((option) => build(getBuildConfig(option))));
|
const results = await Promise.all(buildConfigs.map((option) => build(getBuildConfig(option))));
|
||||||
|
|
||||||
|
@@ -58,7 +58,6 @@ export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
|
|||||||
format,
|
format,
|
||||||
minify,
|
minify,
|
||||||
options: { name, file, packageName },
|
options: { name, file, packageName },
|
||||||
globalName = 'mermaid',
|
|
||||||
} = options;
|
} = options;
|
||||||
const external: string[] = ['require', 'fs', 'path'];
|
const external: string[] = ['require', 'fs', 'path'];
|
||||||
const outFileName = getFileName(name, options);
|
const outFileName = getFileName(name, options);
|
||||||
@@ -69,7 +68,6 @@ export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
|
|||||||
},
|
},
|
||||||
metafile,
|
metafile,
|
||||||
minify,
|
minify,
|
||||||
globalName,
|
|
||||||
logLevel: 'info',
|
logLevel: 'info',
|
||||||
chunkNames: `chunks/${outFileName}/[name]-[hash]`,
|
chunkNames: `chunks/${outFileName}/[name]-[hash]`,
|
||||||
define: {
|
define: {
|
||||||
@@ -91,12 +89,11 @@ export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
|
|||||||
if (format === 'iife') {
|
if (format === 'iife') {
|
||||||
output.format = 'iife';
|
output.format = 'iife';
|
||||||
output.splitting = false;
|
output.splitting = false;
|
||||||
const originalGlobalName = output.globalName ?? 'mermaid';
|
output.globalName = '__esbuild_esm_mermaid';
|
||||||
output.globalName = `__esbuild_esm_mermaid_nm[${JSON.stringify(originalGlobalName)}]`;
|
|
||||||
// Workaround for removing the .default access in esbuild IIFE.
|
// Workaround for removing the .default access in esbuild IIFE.
|
||||||
// https://github.com/mermaid-js/mermaid/pull/4109#discussion_r1292317396
|
// https://github.com/mermaid-js/mermaid/pull/4109#discussion_r1292317396
|
||||||
output.footer = {
|
output.footer = {
|
||||||
js: `globalThis[${JSON.stringify(originalGlobalName)}] = globalThis.${output.globalName}.default;`,
|
js: 'globalThis.mermaid = globalThis.__esbuild_esm_mermaid.default;',
|
||||||
};
|
};
|
||||||
output.outExtension = { '.js': '.js' };
|
output.outExtension = { '.js': '.js' };
|
||||||
} else {
|
} else {
|
||||||
|
2
.github/ISSUE_TEMPLATE/theme_proposal.yml
vendored
2
.github/ISSUE_TEMPLATE/theme_proposal.yml
vendored
@@ -29,7 +29,7 @@ body:
|
|||||||
label: Colors
|
label: Colors
|
||||||
description: |-
|
description: |-
|
||||||
A detailed list of the different colour values to use.
|
A detailed list of the different colour values to use.
|
||||||
See the [list of currently used variable names](https://mermaid-js.github.io/mermaid/#/theming?id=theme-variables-reference-table)
|
A list of currently used variable names can be found [here](https://mermaid-js.github.io/mermaid/#/theming?id=theme-variables-reference-table)
|
||||||
placeholder: |-
|
placeholder: |-
|
||||||
- background: #f4f4f4
|
- background: #f4f4f4
|
||||||
- primaryColor: #fff4dd
|
- primaryColor: #fff4dd
|
||||||
|
6
.github/lychee.toml
vendored
6
.github/lychee.toml
vendored
@@ -46,13 +46,11 @@ exclude = [
|
|||||||
# Drupal 403
|
# Drupal 403
|
||||||
"https://(www.)?drupal.org",
|
"https://(www.)?drupal.org",
|
||||||
|
|
||||||
# Swimm returns 404, even though the link is valid
|
# Swimm returns 404, eventhough the link is valid
|
||||||
"https://docs.swimm.io",
|
"https://docs.swimm.io",
|
||||||
|
|
||||||
# Timeout
|
# Timeout
|
||||||
"https://huehive.co",
|
"https://huehive.co"
|
||||||
"https://foswiki.org",
|
|
||||||
"https://www.gnu.org",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# Exclude all private IPs from checking.
|
# Exclude all private IPs from checking.
|
||||||
|
2
.github/stale.yml
vendored
2
.github/stale.yml
vendored
@@ -15,5 +15,5 @@ markComment: >
|
|||||||
If you are still interested in this issue and it is still relevant you can comment to revive it.
|
If you are still interested in this issue and it is still relevant you can comment to revive it.
|
||||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||||
closeComment: >
|
closeComment: >
|
||||||
This issue has been automatically closed due to a lack of activity.
|
This issue has been been automatically closed due to a lack of activity.
|
||||||
This is done to maintain a clean list of issues that the community is interested in developing.
|
This is done to maintain a clean list of issues that the community is interested in developing.
|
||||||
|
4
.github/workflows/e2e-applitools.yml
vendored
4
.github/workflows/e2e-applitools.yml
vendored
@@ -45,15 +45,13 @@ jobs:
|
|||||||
- if: ${{ env.USE_APPLI }}
|
- if: ${{ env.USE_APPLI }}
|
||||||
name: Notify applitools of new batch
|
name: Notify applitools of new batch
|
||||||
# Copied from docs https://applitools.com/docs/topics/integrations/github-integration-ci-setup.html
|
# Copied from docs https://applitools.com/docs/topics/integrations/github-integration-ci-setup.html
|
||||||
|
run: curl -L -d '' -X POST "$APPLITOOLS_SERVER_URL/api/externals/github/push?apiKey=$APPLITOOLS_API_KEY&CommitSha=$GITHUB_SHA&BranchName=${APPLITOOLS_BRANCH}$&ParentBranchName=$APPLITOOLS_PARENT_BRANCH"
|
||||||
env:
|
env:
|
||||||
# e.g. mermaid-js/mermaid/my-branch
|
# e.g. mermaid-js/mermaid/my-branch
|
||||||
APPLITOOLS_BRANCH: ${{ github.repository }}/${{ github.ref_name }}
|
APPLITOOLS_BRANCH: ${{ github.repository }}/${{ github.ref_name }}
|
||||||
APPLITOOLS_PARENT_BRANCH: ${{ github.event.inputs.parent_branch }}
|
APPLITOOLS_PARENT_BRANCH: ${{ github.event.inputs.parent_branch }}
|
||||||
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
|
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
|
||||||
APPLITOOLS_SERVER_URL: 'https://eyesapi.applitools.com'
|
APPLITOOLS_SERVER_URL: 'https://eyesapi.applitools.com'
|
||||||
uses: wei/curl@61d92b5169ea0425820dd13cf6fbad66b483e9f1
|
|
||||||
with:
|
|
||||||
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@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
||||||
|
32
.github/workflows/e2e-timings.yml
vendored
32
.github/workflows/e2e-timings.yml
vendored
@@ -11,7 +11,6 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
timings:
|
timings:
|
||||||
@@ -30,7 +29,6 @@ jobs:
|
|||||||
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
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@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
uses: cypress-io/github-action@18a6541367f4580a515371905f499a27a44e8dbe # v6.7.12
|
||||||
id: cypress
|
id: cypress
|
||||||
@@ -46,25 +44,15 @@ jobs:
|
|||||||
SPLIT: 1
|
SPLIT: 1
|
||||||
SPLIT_INDEX: 0
|
SPLIT_INDEX: 0
|
||||||
SPLIT_FILE: 'cypress/timings.json'
|
SPLIT_FILE: 'cypress/timings.json'
|
||||||
|
- name: Commit changes
|
||||||
- name: Compare timings
|
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
|
||||||
id: compare
|
|
||||||
run: |
|
|
||||||
OUTPUT=$(pnpm tsx scripts/compare-timings.ts)
|
|
||||||
echo "$OUTPUT" >> $GITHUB_STEP_SUMMARY
|
|
||||||
|
|
||||||
echo "output<<EOF" >> $GITHUB_OUTPUT
|
|
||||||
echo "$OUTPUT" >> $GITHUB_OUTPUT
|
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Commit and create pull request
|
|
||||||
uses: peter-evans/create-pull-request@a7b20e1da215b3ef3ccddb48ff65120256ed6226
|
|
||||||
with:
|
with:
|
||||||
add-paths: |
|
add: 'cypress/timings.json'
|
||||||
cypress/timings.json
|
author_name: 'github-actions[bot]'
|
||||||
commit-message: 'chore: update E2E timings'
|
author_email: '41898282+github-actions[bot]@users.noreply.github.com'
|
||||||
branch: update-timings
|
message: 'chore: update E2E timings'
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v5
|
||||||
|
with:
|
||||||
|
branch: release-promotion
|
||||||
title: Update E2E Timings
|
title: Update E2E Timings
|
||||||
body: ${{ steps.compare.outputs.output }}
|
|
||||||
delete-branch: true
|
|
||||||
sign-commits: true
|
|
||||||
|
@@ -256,7 +256,7 @@ mermaid.run({
|
|||||||
- Problem showing graph with php on localhost [\#502](https://github.com/knsv/mermaid/issues/502)
|
- Problem showing graph with php on localhost [\#502](https://github.com/knsv/mermaid/issues/502)
|
||||||
- logLevel's option doesnt work at 7.0.0 [\#501](https://github.com/knsv/mermaid/issues/501)
|
- logLevel's option doesnt work at 7.0.0 [\#501](https://github.com/knsv/mermaid/issues/501)
|
||||||
- How do I get the log for a render or parse attempt? [\#500](https://github.com/knsv/mermaid/issues/500)
|
- How do I get the log for a render or parse attempt? [\#500](https://github.com/knsv/mermaid/issues/500)
|
||||||
- Mermaid neutral style to built in latest release [\#499](https://github.com/knsv/mermaid/issues/499)
|
- Mermaid neutral style style to built in latest release [\#499](https://github.com/knsv/mermaid/issues/499)
|
||||||
- Any plans for adding a typescript definition file? [\#495](https://github.com/knsv/mermaid/issues/495)
|
- Any plans for adding a typescript definition file? [\#495](https://github.com/knsv/mermaid/issues/495)
|
||||||
- Gantt diagrams too narrow [\#493](https://github.com/knsv/mermaid/issues/493)
|
- Gantt diagrams too narrow [\#493](https://github.com/knsv/mermaid/issues/493)
|
||||||
- Flowchart edge labels placement [\#490](https://github.com/knsv/mermaid/issues/490)
|
- Flowchart edge labels placement [\#490](https://github.com/knsv/mermaid/issues/490)
|
||||||
@@ -833,7 +833,7 @@ mermaid.run({
|
|||||||
- Merge pull request \#1 from knsv/master [\#96](https://github.com/knsv/mermaid/pull/96) ([gkchic](https://github.com/gkchic))
|
- Merge pull request \#1 from knsv/master [\#96](https://github.com/knsv/mermaid/pull/96) ([gkchic](https://github.com/gkchic))
|
||||||
- Removed duplicated section in flowchart docs [\#94](https://github.com/knsv/mermaid/pull/94) ([kaime](https://github.com/kaime))
|
- Removed duplicated section in flowchart docs [\#94](https://github.com/knsv/mermaid/pull/94) ([kaime](https://github.com/kaime))
|
||||||
- Grammar changes to sequence page [\#93](https://github.com/knsv/mermaid/pull/93) ([gkchic](https://github.com/gkchic))
|
- Grammar changes to sequence page [\#93](https://github.com/knsv/mermaid/pull/93) ([gkchic](https://github.com/gkchic))
|
||||||
- GitHub buttons [\#89](https://github.com/knsv/mermaid/pull/89) ([gkchic](https://github.com/gkchic))
|
- Github buttons [\#89](https://github.com/knsv/mermaid/pull/89) ([gkchic](https://github.com/gkchic))
|
||||||
- Template change [\#88](https://github.com/knsv/mermaid/pull/88) ([gkchic](https://github.com/gkchic))
|
- Template change [\#88](https://github.com/knsv/mermaid/pull/88) ([gkchic](https://github.com/gkchic))
|
||||||
|
|
||||||
## [0.3.1](https://github.com/knsv/mermaid/tree/0.3.1) (2015-01-05)
|
## [0.3.1](https://github.com/knsv/mermaid/tree/0.3.1) (2015-01-05)
|
||||||
@@ -1002,4 +1002,4 @@ mermaid.run({
|
|||||||
|
|
||||||
## [0.1.0](https://github.com/knsv/mermaid/tree/0.1.0) (2014-11-16)
|
## [0.1.0](https://github.com/knsv/mermaid/tree/0.1.0) (2014-11-16)
|
||||||
|
|
||||||
\* _This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/GitHub-Changelog-Generator)_
|
\* _This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)_
|
||||||
|
@@ -44,7 +44,7 @@ Try Live Editor previews of future releases: <a href="https://develop.git.mermai
|
|||||||
|
|
||||||
**Thanks to all involved, people committing pull requests, people answering questions! 🙏**
|
**Thanks to all involved, people committing pull requests, people answering questions! 🙏**
|
||||||
|
|
||||||
<a href="https://mermaid.js.org/landing/"><img src="https://github.com/mermaid-js/mermaid/blob/master/docs/intro/img/book-banner-post-release.jpg" alt='Banner for "The Official Guide to Mermaid.js" book'></a>
|
<a href="https://mermaid.js.org/landing/"><img src="https://github.com/mermaid-js/mermaid/blob/master/docs/intro/img/book-banner-post-release.jpg" alt="Explore Mermaid.js in depth, with real-world examples, tips & tricks from the creator... The first official book on Mermaid is available for purchase. Check it out!"></a>
|
||||||
|
|
||||||
## Table of content
|
## Table of content
|
||||||
|
|
||||||
@@ -451,7 +451,7 @@ For public sites, it can be precarious to retrieve text from users on the intern
|
|||||||
|
|
||||||
As an extra level of security for sites with external users we are happy to introduce a new security level in which the diagram is rendered in a sandboxed iframe preventing javascript in the code from being executed. This is a great step forward for better security.
|
As an extra level of security for sites with external users we are happy to introduce a new security level in which the diagram is rendered in a sandboxed iframe preventing javascript in the code from being executed. This is a great step forward for better security.
|
||||||
|
|
||||||
_Unfortunately you cannot have a cake and eat it at the same time which in this case means that some of the interactive functionality gets blocked along with the possible malicious code._
|
_Unfortunately you can not have a cake and eat it at the same time which in this case means that some of the interactive functionality gets blocked along with the possible malicious code._
|
||||||
|
|
||||||
## Reporting vulnerabilities
|
## Reporting vulnerabilities
|
||||||
|
|
||||||
|
@@ -43,13 +43,13 @@ Mermaid
|
|||||||
|
|
||||||
**感谢所有参与进来提交 PR,解答疑问的人们! 🙏**
|
**感谢所有参与进来提交 PR,解答疑问的人们! 🙏**
|
||||||
|
|
||||||
<a href="https://mermaid.js.org/landing/"><img src="https://github.com/mermaid-js/mermaid/blob/master/docs/intro/img/book-banner-post-release.jpg" alt='Banner for "The Official Guide to Mermaid.js" book'></a>
|
<a href="https://mermaid.js.org/landing/"><img src="https://github.com/mermaid-js/mermaid/blob/master/docs/intro/img/book-banner-post-release.jpg" alt="Explore Mermaid.js in depth, with real-world examples, tips & tricks from the creator... The first official book on Mermaid is available for purchase. Check it out!"></a>
|
||||||
|
|
||||||
## 关于 Mermaid
|
## 关于 Mermaid
|
||||||
|
|
||||||
<!-- <Main description> -->
|
<!-- <Main description> -->
|
||||||
|
|
||||||
Mermaid 是一个基于 JavaScript 的图表绘制工具,通过解析类 Markdown 的文本语法来实现图表的创建和动态修改。Mermaid 诞生的主要目的是让文档的更新能够及时跟上开发进度。
|
Mermaid 是一个基于 Javascript 的图表绘制工具,通过解析类 Markdown 的文本语法来实现图表的创建和动态修改。Mermaid 诞生的主要目的是让文档的更新能够及时跟上开发进度。
|
||||||
|
|
||||||
> Doc-Rot 是 Mermaid 致力于解决的一个难题。
|
> Doc-Rot 是 Mermaid 致力于解决的一个难题。
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import eyesPlugin from '@applitools/eyes-cypress';
|
import eyesPlugin from '@applitools/eyes-cypress';
|
||||||
import { registerArgosTask } from '@argos-ci/cypress/task';
|
import { registerArgosTask } from '@argos-ci/cypress/task';
|
||||||
import coverage from '@cypress/code-coverage/task.js';
|
import coverage from '@cypress/code-coverage/task';
|
||||||
import { defineConfig } from 'cypress';
|
import { defineConfig } from 'cypress';
|
||||||
import { addMatchImageSnapshotPlugin } from 'cypress-image-snapshot/plugin.js';
|
import { addMatchImageSnapshotPlugin } from 'cypress-image-snapshot/plugin';
|
||||||
import cypressSplit from 'cypress-split';
|
import cypressSplit from 'cypress-split';
|
||||||
|
|
||||||
export default eyesPlugin(
|
export default eyesPlugin(
|
||||||
|
@@ -22,7 +22,7 @@ const batchId: string =
|
|||||||
'mermaid-batch-' +
|
'mermaid-batch-' +
|
||||||
(Cypress.env('useAppli')
|
(Cypress.env('useAppli')
|
||||||
? Date.now().toString()
|
? Date.now().toString()
|
||||||
: (Cypress.env('CYPRESS_COMMIT') ?? Date.now().toString()));
|
: Cypress.env('CYPRESS_COMMIT') || Date.now().toString());
|
||||||
|
|
||||||
export const mermaidUrl = (
|
export const mermaidUrl = (
|
||||||
graphStr: string | string[],
|
graphStr: string | string[],
|
||||||
@@ -61,7 +61,9 @@ export const imgSnapshotTest = (
|
|||||||
sequence: {
|
sequence: {
|
||||||
...(_options.sequence ?? {}),
|
...(_options.sequence ?? {}),
|
||||||
actorFontFamily: 'courier',
|
actorFontFamily: 'courier',
|
||||||
noteFontFamily: _options.sequence?.noteFontFamily ?? 'courier',
|
noteFontFamily: _options.sequence?.noteFontFamily
|
||||||
|
? _options.sequence.noteFontFamily
|
||||||
|
: 'courier',
|
||||||
messageFontFamily: 'courier',
|
messageFontFamily: 'courier',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@@ -20,7 +20,7 @@ describe('Interaction', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('Graph: should handle a click on a node with a bound url', () => {
|
it('Graph: should handle a click on a node with a bound url', () => {
|
||||||
// When there is a URL, `cy.contains()` selects the `a` tag instead of the `span` tag. The .node is a child of `a`, so we have to use `find()` instead of `parent`.
|
// When there is a URL, cy.contains selects the a tag instead of the span. The .node is a child of a, so we have to use find instead of parent.
|
||||||
cy.contains('URLTest1').find('.node').click();
|
cy.contains('URLTest1').find('.node').click();
|
||||||
cy.location().should(({ href }) => {
|
cy.location().should(({ href }) => {
|
||||||
expect(href).to.eq('http://localhost:9000/empty.html');
|
expect(href).to.eq('http://localhost:9000/empty.html');
|
||||||
@@ -146,7 +146,7 @@ describe('Interaction', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Interaction - security level other, misspelling', () => {
|
describe('Interaction - security level other, missspelling', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('http://localhost:9000/click_security_other.html');
|
cy.visit('http://localhost:9000/click_security_other.html');
|
||||||
});
|
});
|
||||||
|
@@ -19,25 +19,6 @@ describe.skip('architecture diagram', () => {
|
|||||||
`
|
`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('should render a simple architecture diagram with titleAndAccessibilities', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`architecture-beta
|
|
||||||
title Simple Architecture Diagram
|
|
||||||
accTitle: Accessibility Title
|
|
||||||
accDescr: Accessibility Description
|
|
||||||
group api(cloud)[API]
|
|
||||||
|
|
||||||
service db(database)[Database] in api
|
|
||||||
service disk1(disk)[Storage] in api
|
|
||||||
service disk2(disk)[Storage] in api
|
|
||||||
service server(server)[Server] in api
|
|
||||||
|
|
||||||
db:L -- R:server
|
|
||||||
disk1:T -- B:server
|
|
||||||
disk2:T -- B:db
|
|
||||||
`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
it('should render an architecture diagram with groups within groups', () => {
|
it('should render an architecture diagram with groups within groups', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`architecture-beta
|
`architecture-beta
|
||||||
@@ -191,7 +172,7 @@ describe.skip('architecture diagram', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render an architecture diagram with a reasonable height', () => {
|
it('should render an architecture diagram with a resonable height', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`architecture-beta
|
`architecture-beta
|
||||||
group federated(cloud)[Federated Environment]
|
group federated(cloud)[Federated Environment]
|
||||||
|
@@ -14,7 +14,7 @@ describe('Block diagram', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('BL2: should handle columns statement in sub-blocks', () => {
|
it('BL2: should handle colums statement in sub-blocks', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block-beta
|
||||||
id1["Hello"]
|
id1["Hello"]
|
||||||
@@ -30,7 +30,7 @@ describe('Block diagram', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('BL3: should align block widths and handle columns statement in sub-blocks', () => {
|
it('BL3: should align block widths and handle colums statement in sub-blocks', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block-beta
|
||||||
block
|
block
|
||||||
@@ -46,7 +46,7 @@ describe('Block diagram', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('BL4: should align block widths and handle columns statements in deeper sub-blocks then 1 level', () => {
|
it('BL4: should align block widths and handle colums statements in deeper sub-blocks then 1 level', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block-beta
|
||||||
columns 1
|
columns 1
|
||||||
@@ -66,7 +66,7 @@ describe('Block diagram', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('BL5: should align block widths and handle columns statements in deeper sub-blocks then 1 level (alt)', () => {
|
it('BL5: should align block widths and handle colums statements in deeper sub-blocks then 1 level (alt)', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block-beta
|
||||||
columns 1
|
columns 1
|
||||||
@@ -236,7 +236,7 @@ describe('Block diagram', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('BL17: width alignment - blocks should be equal in width', () => {
|
it('BL17: width alignment - blocks shold be equal in width', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`block-beta
|
`block-beta
|
||||||
A("This is the text")
|
A("This is the text")
|
||||||
|
@@ -429,7 +429,7 @@ describe('Class diagram', () => {
|
|||||||
classDiagram
|
classDiagram
|
||||||
class \`This\nTitle\nHas\nMany\nNewlines\` {
|
class \`This\nTitle\nHas\nMany\nNewlines\` {
|
||||||
+String Also
|
+String Also
|
||||||
-String Many
|
-Stirng Many
|
||||||
#int Members
|
#int Members
|
||||||
+And()
|
+And()
|
||||||
-Many()
|
-Many()
|
||||||
@@ -443,7 +443,7 @@ describe('Class diagram', () => {
|
|||||||
classDiagram
|
classDiagram
|
||||||
class \`This\nTitle\nHas\nMany\nNewlines\` {
|
class \`This\nTitle\nHas\nMany\nNewlines\` {
|
||||||
+String Also
|
+String Also
|
||||||
-String Many
|
-Stirng Many
|
||||||
#int Members
|
#int Members
|
||||||
+And()
|
+And()
|
||||||
-Many()
|
-Many()
|
||||||
@@ -459,7 +459,7 @@ describe('Class diagram', () => {
|
|||||||
namespace testingNamespace {
|
namespace testingNamespace {
|
||||||
class \`This\nTitle\nHas\nMany\nNewlines\` {
|
class \`This\nTitle\nHas\nMany\nNewlines\` {
|
||||||
+String Also
|
+String Also
|
||||||
-String Many
|
-Stirng Many
|
||||||
#int Members
|
#int Members
|
||||||
+And()
|
+And()
|
||||||
-Many()
|
-Many()
|
||||||
|
@@ -208,13 +208,13 @@ describe('Flowchart ELK', () => {
|
|||||||
`flowchart-elk TB
|
`flowchart-elk TB
|
||||||
internet
|
internet
|
||||||
nat
|
nat
|
||||||
router
|
routeur
|
||||||
lb1
|
lb1
|
||||||
lb2
|
lb2
|
||||||
compute1
|
compute1
|
||||||
compute2
|
compute2
|
||||||
subgraph project
|
subgraph project
|
||||||
router
|
routeur
|
||||||
nat
|
nat
|
||||||
subgraph subnet1
|
subgraph subnet1
|
||||||
compute1
|
compute1
|
||||||
@@ -225,8 +225,8 @@ describe('Flowchart ELK', () => {
|
|||||||
lb2
|
lb2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
internet --> router
|
internet --> routeur
|
||||||
router --> subnet1 & subnet2
|
routeur --> subnet1 & subnet2
|
||||||
subnet1 & subnet2 --> nat --> internet
|
subnet1 & subnet2 --> nat --> internet
|
||||||
`,
|
`,
|
||||||
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
|
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
|
||||||
@@ -443,7 +443,7 @@ flowchart-elk TD
|
|||||||
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
|
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('63-elk: title on subgraphs should be themeable', () => {
|
it('63-elk: title on subgraphs should be themable', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
%%{init:{"theme":"base", "themeVariables": {"primaryColor":"#411d4e", "titleColor":"white", "darkMode":true}}}%%
|
%%{init:{"theme":"base", "themeVariables": {"primaryColor":"#411d4e", "titleColor":"white", "darkMode":true}}}%%
|
||||||
|
@@ -198,13 +198,13 @@ describe('Flowchart v2', () => {
|
|||||||
`flowchart TB
|
`flowchart TB
|
||||||
internet
|
internet
|
||||||
nat
|
nat
|
||||||
router
|
routeur
|
||||||
lb1
|
lb1
|
||||||
lb2
|
lb2
|
||||||
compute1
|
compute1
|
||||||
compute2
|
compute2
|
||||||
subgraph project
|
subgraph project
|
||||||
router
|
routeur
|
||||||
nat
|
nat
|
||||||
subgraph subnet1
|
subgraph subnet1
|
||||||
compute1
|
compute1
|
||||||
@@ -215,8 +215,8 @@ describe('Flowchart v2', () => {
|
|||||||
lb2
|
lb2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
internet --> router
|
internet --> routeur
|
||||||
router --> subnet1 & subnet2
|
routeur --> subnet1 & subnet2
|
||||||
subnet1 & subnet2 --> nat --> internet
|
subnet1 & subnet2 --> nat --> internet
|
||||||
`,
|
`,
|
||||||
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
|
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
|
||||||
@@ -433,7 +433,7 @@ flowchart TD
|
|||||||
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
|
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('63: title on subgraphs should be themeable', () => {
|
it('63: title on subgraphs should be themable', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
%%{init:{"theme":"base", "themeVariables": {"primaryColor":"#411d4e", "titleColor":"white", "darkMode":true}}}%%
|
%%{init:{"theme":"base", "themeVariables": {"primaryColor":"#411d4e", "titleColor":"white", "darkMode":true}}}%%
|
||||||
@@ -699,7 +699,7 @@ A --> B
|
|||||||
{ flowchart: { titleTopMargin: 10 } }
|
{ flowchart: { titleTopMargin: 10 } }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('3192: It should be possible to render flowcharts with invisible edges', () => {
|
it('3192: It should be possieble to render flowcharts with invisible edges', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`---
|
`---
|
||||||
title: Simple flowchart with invisible edges
|
title: Simple flowchart with invisible edges
|
||||||
@@ -1076,11 +1076,11 @@ end
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe('New @ syntax for node metadata edge cases', () => {
|
describe('New @ sytax for node metadata edge cases', () => {
|
||||||
it('should be possible to use @ syntax to add labels on multi nodes', () => {
|
it('should be possible to use @ syntax to add labels on multi nodes', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`flowchart TB
|
`flowchart TB
|
||||||
n2["label for n2"] & n4@{ label: "label for n4"} & n5@{ label: "label for n5"}
|
n2["label for n2"] & n4@{ label: "labe for n4"} & n5@{ label: "labe for n5"}
|
||||||
`,
|
`,
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
@@ -1088,7 +1088,7 @@ end
|
|||||||
it('should be possible to use @ syntax to add labels with trail spaces and &', () => {
|
it('should be possible to use @ syntax to add labels with trail spaces and &', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`flowchart TB
|
`flowchart TB
|
||||||
n2["label for n2"] & n4@{ label: "label for n4"} & n5@{ label: "label for n5"}
|
n2["label for n2"] & n4@{ label: "labe for n4"} & n5@{ label: "labe for n5"}
|
||||||
`,
|
`,
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
@@ -1097,8 +1097,8 @@ end
|
|||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`flowchart TB
|
`flowchart TB
|
||||||
n2["label for n2"]
|
n2["label for n2"]
|
||||||
n4@{ label: "label for n4"}
|
n4@{ label: "labe for n4"}
|
||||||
n5@{ label: "label for n5"}
|
n5@{ label: "labe for n5"}
|
||||||
`,
|
`,
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
|
@@ -117,7 +117,7 @@ describe('Gantt diagram', () => {
|
|||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('should FAIL rendering a gantt chart for issue #1060 with invalid date', () => {
|
it('should FAIL redering a gantt chart for issue #1060 with invalid date', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
gantt
|
gantt
|
||||||
@@ -573,7 +573,7 @@ describe('Gantt diagram', () => {
|
|||||||
`
|
`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('should render a gantt diagram excluding friday and saturday', () => {
|
it('should render a gantt diagram exculding friday and saturday', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`gantt
|
`gantt
|
||||||
title A Gantt Diagram
|
title A Gantt Diagram
|
||||||
@@ -584,7 +584,7 @@ describe('Gantt diagram', () => {
|
|||||||
A task :a1, 2024-02-28, 10d`
|
A task :a1, 2024-02-28, 10d`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('should render a gantt diagram excluding saturday and sunday', () => {
|
it('should render a gantt diagram exculding saturday and sunday', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`gantt
|
`gantt
|
||||||
title A Gantt Diagram
|
title A Gantt Diagram
|
||||||
@@ -671,7 +671,7 @@ describe('Gantt diagram', () => {
|
|||||||
title Gantt Digram
|
title Gantt Digram
|
||||||
dateFormat YYYY-MM-DD
|
dateFormat YYYY-MM-DD
|
||||||
section Section
|
section Section
|
||||||
;A task with a semicolon :a1, 2014-01-01, 30d
|
;A task with a semiclon :a1, 2014-01-01, 30d
|
||||||
Another task :after a1 , 20d
|
Another task :after a1 , 20d
|
||||||
section Another
|
section Another
|
||||||
Task in sec :2014-01-12 , 12d
|
Task in sec :2014-01-12 , 12d
|
||||||
|
@@ -11,7 +11,7 @@ describe('Git Graph diagram', () => {
|
|||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('2: should render a simple gitgraph with commit on main branch with id', () => {
|
it('2: should render a simple gitgraph with commit on main branch with Id', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`gitGraph
|
`gitGraph
|
||||||
commit id: "One"
|
commit id: "One"
|
||||||
@@ -253,7 +253,7 @@ describe('Git Graph diagram', () => {
|
|||||||
`
|
`
|
||||||
gitGraph
|
gitGraph
|
||||||
checkout main
|
checkout main
|
||||||
%% Make sure to manually set the id of all commits, for consistent visual tests
|
%% Make sure to manually set the ID of all commits, for consistent visual tests
|
||||||
commit id: "1-abcdefg"
|
commit id: "1-abcdefg"
|
||||||
checkout main
|
checkout main
|
||||||
branch branch1
|
branch branch1
|
||||||
@@ -343,7 +343,7 @@ gitGraph
|
|||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('16: should render a simple gitgraph with commit on main branch with id | Vertical Branch', () => {
|
it('16: should render a simple gitgraph with commit on main branch with Id | Vertical Branch', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`gitGraph TB:
|
`gitGraph TB:
|
||||||
commit id: "One"
|
commit id: "One"
|
||||||
@@ -585,7 +585,7 @@ gitGraph
|
|||||||
`
|
`
|
||||||
gitGraph TB:
|
gitGraph TB:
|
||||||
checkout main
|
checkout main
|
||||||
%% Make sure to manually set the id of all commits, for consistent visual tests
|
%% Make sure to manually set the ID of all commits, for consistent visual tests
|
||||||
commit id: "1-abcdefg"
|
commit id: "1-abcdefg"
|
||||||
checkout main
|
checkout main
|
||||||
branch branch1
|
branch branch1
|
||||||
@@ -1024,7 +1024,7 @@ gitGraph TB:
|
|||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('51: should render a simple gitgraph with commit on main branch with id | Vertical Branch - Bottom-to-top', () => {
|
it('51: should render a simple gitgraph with commit on main branch with Id | Vertical Branch - Bottom-to-top', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`gitGraph BT:
|
`gitGraph BT:
|
||||||
commit id: "One"
|
commit id: "One"
|
||||||
@@ -1266,7 +1266,7 @@ gitGraph TB:
|
|||||||
`
|
`
|
||||||
gitGraph BT:
|
gitGraph BT:
|
||||||
checkout main
|
checkout main
|
||||||
%% Make sure to manually set the id of all commits, for consistent visual tests
|
%% Make sure to manually set the ID of all commits, for consistent visual tests
|
||||||
commit id: "1-abcdefg"
|
commit id: "1-abcdefg"
|
||||||
checkout main
|
checkout main
|
||||||
branch branch1
|
branch branch1
|
||||||
@@ -1491,7 +1491,7 @@ gitGraph TB:
|
|||||||
`
|
`
|
||||||
gitGraph
|
gitGraph
|
||||||
switch main
|
switch main
|
||||||
%% Make sure to manually set the id of all commits, for consistent visual tests
|
%% Make sure to manually set the ID of all commits, for consistent visual tests
|
||||||
commit id: "1-abcdefg"
|
commit id: "1-abcdefg"
|
||||||
switch main
|
switch main
|
||||||
branch branch1
|
branch branch1
|
||||||
|
@@ -14,7 +14,7 @@ looks.forEach((look) => {
|
|||||||
directions.forEach((direction) => {
|
directions.forEach((direction) => {
|
||||||
forms.forEach((form) => {
|
forms.forEach((form) => {
|
||||||
labelPos.forEach((pos) => {
|
labelPos.forEach((pos) => {
|
||||||
describe(`Test iconShape in ${form ? `${form} form,` : ''} ${look} look and dir ${direction} with label position ${pos ?? 'not defined'}`, () => {
|
describe(`Test iconShape in ${form ? `${form} form,` : ''} ${look} look and dir ${direction} with label position ${pos ? pos : 'not defined'}`, () => {
|
||||||
it(`without label`, () => {
|
it(`without label`, () => {
|
||||||
let flowchartCode = `flowchart ${direction}\n`;
|
let flowchartCode = `flowchart ${direction}\n`;
|
||||||
flowchartCode += ` nA --> nAA@{ icon: 'fa:bell'`;
|
flowchartCode += ` nA --> nAA@{ icon: 'fa:bell'`;
|
||||||
|
@@ -12,7 +12,7 @@ const labelPos = [undefined, 't', 'b'] as const;
|
|||||||
looks.forEach((look) => {
|
looks.forEach((look) => {
|
||||||
directions.forEach((direction) => {
|
directions.forEach((direction) => {
|
||||||
labelPos.forEach((pos) => {
|
labelPos.forEach((pos) => {
|
||||||
describe(`Test imageShape in ${look} look and dir ${direction} with label position ${pos ?? 'not defined'}`, () => {
|
describe(`Test imageShape in ${look} look and dir ${direction} with label position ${pos ? pos : 'not defined'}`, () => {
|
||||||
it(`without label`, () => {
|
it(`without label`, () => {
|
||||||
let flowchartCode = `flowchart ${direction}\n`;
|
let flowchartCode = `flowchart ${direction}\n`;
|
||||||
flowchartCode += ` nA --> A@{ img: 'https://cdn.pixabay.com/photo/2020/02/22/18/49/paper-4871356_1280.jpg', w: '100', h: '100' }\n`;
|
flowchartCode += ` nA --> A@{ img: 'https://cdn.pixabay.com/photo/2020/02/22/18/49/paper-4871356_1280.jpg', w: '100', h: '100' }\n`;
|
||||||
|
@@ -63,199 +63,4 @@ section Checkout from website
|
|||||||
{ journey: { useMaxWidth: false } }
|
{ journey: { useMaxWidth: false } }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should initialize with a left margin of 150px for user journeys', () => {
|
|
||||||
renderGraph(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
journey:
|
|
||||||
maxLabelWidth: 320
|
|
||||||
---
|
|
||||||
journey
|
|
||||||
title User Journey Example
|
|
||||||
section Onboarding
|
|
||||||
Sign Up: 5:
|
|
||||||
Browse Features: 3:
|
|
||||||
Use Core Functionality: 4:
|
|
||||||
section Engagement
|
|
||||||
Browse Features: 3
|
|
||||||
Use Core Functionality: 4
|
|
||||||
`,
|
|
||||||
{ journey: { useMaxWidth: true } }
|
|
||||||
);
|
|
||||||
|
|
||||||
let diagramStartX;
|
|
||||||
|
|
||||||
cy.contains('foreignobject', 'Sign Up').then(($diagram) => {
|
|
||||||
diagramStartX = parseFloat($diagram.attr('x'));
|
|
||||||
expect(diagramStartX).to.be.closeTo(150, 2);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should maintain sufficient space between legend and diagram when legend labels are longer', () => {
|
|
||||||
renderGraph(
|
|
||||||
`journey
|
|
||||||
title Web hook life cycle
|
|
||||||
section Darkoob
|
|
||||||
Make preBuilt:5: Darkoob user
|
|
||||||
register slug : 5: Darkoob userf deliberately increasing the size of this label to check if distance between legend and diagram is maintained
|
|
||||||
Map slug to a Prebuilt Job:5: Darkoob user
|
|
||||||
section External Service
|
|
||||||
set Darkoob slug as hook for an Event : 5 : admin Exjjjnjjjj qwerty
|
|
||||||
listen to the events : 5 : External Service
|
|
||||||
call darkoob endpoint : 5 : External Service
|
|
||||||
section Darkoob
|
|
||||||
check for inputs : 5 : DarkoobAPI
|
|
||||||
run the prebuilt job : 5 : DarkoobAPI
|
|
||||||
`,
|
|
||||||
{ journey: { useMaxWidth: true } }
|
|
||||||
);
|
|
||||||
|
|
||||||
let LabelEndX, diagramStartX;
|
|
||||||
|
|
||||||
// Get right edge of the legend
|
|
||||||
cy.contains('tspan', 'Darkoob userf').then((textBox) => {
|
|
||||||
const bbox = textBox[0].getBBox();
|
|
||||||
LabelEndX = bbox.x + bbox.width;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Get left edge of the diagram
|
|
||||||
cy.contains('foreignobject', 'Make preBuilt').then((rect) => {
|
|
||||||
diagramStartX = parseFloat(rect.attr('x'));
|
|
||||||
});
|
|
||||||
|
|
||||||
// Assert right edge of the diagram is greater than or equal to the right edge of the label
|
|
||||||
cy.then(() => {
|
|
||||||
expect(diagramStartX).to.be.gte(LabelEndX);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should wrap a single long word with hyphenation', () => {
|
|
||||||
renderGraph(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
journey:
|
|
||||||
maxLabelWidth: 100
|
|
||||||
---
|
|
||||||
journey
|
|
||||||
title Long Word Test
|
|
||||||
section Test
|
|
||||||
VeryLongWord: 5: Supercalifragilisticexpialidocious
|
|
||||||
`,
|
|
||||||
{ journey: { useMaxWidth: true } }
|
|
||||||
);
|
|
||||||
|
|
||||||
// Verify that the line ends with a hyphen, indicating proper hyphenation for words exceeding maxLabelWidth.
|
|
||||||
cy.get('tspan').then((tspans) => {
|
|
||||||
const hasHyphen = [...tspans].some((t) => t.textContent.trim().endsWith('-'));
|
|
||||||
return expect(hasHyphen).to.be.true;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should wrap text on whitespace without adding hyphens', () => {
|
|
||||||
renderGraph(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
journey:
|
|
||||||
maxLabelWidth: 200
|
|
||||||
---
|
|
||||||
journey
|
|
||||||
title Whitespace Test
|
|
||||||
section Test
|
|
||||||
TextWithSpaces: 5: Gustavo Fring is played by Giancarlo Esposito and is a character in Breaking Bad.
|
|
||||||
`,
|
|
||||||
{ journey: { useMaxWidth: true } }
|
|
||||||
);
|
|
||||||
|
|
||||||
// Verify that none of the text spans end with a hyphen.
|
|
||||||
cy.get('tspan').each(($el) => {
|
|
||||||
const text = $el.text();
|
|
||||||
expect(text.trim()).not.to.match(/-$/);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should wrap long labels into multiple lines, keep them under max width, and maintain margins', () => {
|
|
||||||
renderGraph(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
journey:
|
|
||||||
maxLabelWidth: 320
|
|
||||||
---
|
|
||||||
journey
|
|
||||||
title User Journey Example
|
|
||||||
section Onboarding
|
|
||||||
Sign Up: 5: This is a long label that will be split into multiple lines to test the wrapping functionality
|
|
||||||
Browse Features: 3: This is another long label that will be split into multiple lines to test the wrapping functionality
|
|
||||||
Use Core Functionality: 4: This is yet another long label that will be split into multiple lines to test the wrapping functionality
|
|
||||||
section Engagement
|
|
||||||
Browse Features: 3
|
|
||||||
Use Core Functionality: 4
|
|
||||||
`,
|
|
||||||
{ journey: { useMaxWidth: true } }
|
|
||||||
);
|
|
||||||
|
|
||||||
let diagramStartX, maxLineWidth;
|
|
||||||
|
|
||||||
// Get the diagram's left edge x-coordinate
|
|
||||||
cy.contains('foreignobject', 'Sign Up')
|
|
||||||
.then(($diagram) => {
|
|
||||||
diagramStartX = parseFloat($diagram.attr('x'));
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
cy.get('text.legend').then(($lines) => {
|
|
||||||
// Check that there are multiple lines
|
|
||||||
expect($lines.length).to.be.equal(9);
|
|
||||||
|
|
||||||
// Check that all lines are under the maxLabelWidth
|
|
||||||
$lines.each((index, el) => {
|
|
||||||
const bbox = el.getBBox();
|
|
||||||
expect(bbox.width).to.be.lte(320);
|
|
||||||
maxLineWidth = Math.max(maxLineWidth ?? 0, bbox.width);
|
|
||||||
});
|
|
||||||
|
|
||||||
/** The expected margin between the diagram and the legend is 150px, as defined by
|
|
||||||
* conf.leftMargin in user-journey-config.js
|
|
||||||
*/
|
|
||||||
expect(diagramStartX - maxLineWidth).to.be.closeTo(150, 2);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should correctly render the user journey diagram title with the specified styling', () => {
|
|
||||||
renderGraph(
|
|
||||||
`---
|
|
||||||
config:
|
|
||||||
journey:
|
|
||||||
titleColor: "#2900A5"
|
|
||||||
titleFontFamily: "Times New Roman"
|
|
||||||
titleFontSize: "5rem"
|
|
||||||
---
|
|
||||||
|
|
||||||
journey
|
|
||||||
title User Journey Example
|
|
||||||
section Onboarding
|
|
||||||
Sign Up: 5: John, Shahir
|
|
||||||
Complete Profile: 4: John
|
|
||||||
section Engagement
|
|
||||||
Browse Features: 3: John
|
|
||||||
Use Core Functionality: 4: John
|
|
||||||
section Retention
|
|
||||||
Revisit Application: 5: John
|
|
||||||
Invite Friends: 3: John
|
|
||||||
|
|
||||||
size: 2rem
|
|
||||||
`
|
|
||||||
);
|
|
||||||
|
|
||||||
cy.get('text').contains('User Journey Example').as('title');
|
|
||||||
cy.get('@title').then(($title) => {
|
|
||||||
expect($title).to.have.attr('fill', '#2900A5');
|
|
||||||
expect($title).to.have.attr('font-family', 'Times New Roman');
|
|
||||||
expect($title).to.have.attr('font-size', '5rem');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
@@ -62,7 +62,7 @@ describe('Kanban diagram', () => {
|
|||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('6: should handle assignments', () => {
|
it('6: should handle assigments', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`kanban
|
`kanban
|
||||||
id1[Todo]
|
id1[Todo]
|
||||||
@@ -118,7 +118,7 @@ kanban
|
|||||||
docs[Create Documentation]
|
docs[Create Documentation]
|
||||||
docs[Create Blog about the new diagram]
|
docs[Create Blog about the new diagram]
|
||||||
id7[In progress]
|
id7[In progress]
|
||||||
id6[Create renderer so that it works in all cases. We also add some extra text here for testing purposes. And some more just for the extra flare.]
|
id6[Create renderer so that it works in all cases. We also add som extra text here for testing purposes. And some more just for the extra flare.]
|
||||||
id8[Design grammar]@{ assigned: 'knsv' }
|
id8[Design grammar]@{ assigned: 'knsv' }
|
||||||
id9[Ready for deploy]
|
id9[Ready for deploy]
|
||||||
id10[Ready for test]
|
id10[Ready for test]
|
||||||
|
@@ -146,7 +146,7 @@ root
|
|||||||
shouldHaveRoot
|
shouldHaveRoot
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('text should wrap with icon', () => {
|
it('text shouhld wrap with icon', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`mindmap
|
`mindmap
|
||||||
root
|
root
|
||||||
|
@@ -64,7 +64,7 @@ describe('pie chart', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render a pie diagram when textPosition is set', () => {
|
it('should render a pie diagram when textPosition is setted', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`pie
|
`pie
|
||||||
"Dogs": 50
|
"Dogs": 50
|
||||||
|
@@ -45,7 +45,7 @@ describe('Quadrant Chart', () => {
|
|||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('should able to render y-axis on right side', () => {
|
it('should able to render y-axix on right side', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
%%{init: {"quadrantChart": {"yAxisPosition": "right"}}}%%
|
%%{init: {"quadrantChart": {"yAxisPosition": "right"}}}%%
|
||||||
@@ -61,7 +61,7 @@ describe('Quadrant Chart', () => {
|
|||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('should able to render x-axis on bottom', () => {
|
it('should able to render x-axix on bottom', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
%%{init: {"quadrantChart": {"xAxisPosition": "bottom"}}}%%
|
%%{init: {"quadrantChart": {"xAxisPosition": "bottom"}}}%%
|
||||||
@@ -77,7 +77,7 @@ describe('Quadrant Chart', () => {
|
|||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('should able to render x-axis on bottom and y-axis on right', () => {
|
it('should able to render x-axix on bottom and y-axis on right', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
%%{init: {"quadrantChart": {"xAxisPosition": "bottom", "yAxisPosition": "right"}}}%%
|
%%{init: {"quadrantChart": {"xAxisPosition": "bottom", "yAxisPosition": "right"}}}%%
|
||||||
|
@@ -1,79 +0,0 @@
|
|||||||
import { imgSnapshotTest } from '../../helpers/util';
|
|
||||||
|
|
||||||
describe('radar structure', () => {
|
|
||||||
it('should render a simple radar diagram', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`radar-beta
|
|
||||||
title Best Radar Ever
|
|
||||||
axis A, B, C
|
|
||||||
curve c1{1, 2, 3}
|
|
||||||
`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render a radar diagram with multiple curves', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`radar-beta
|
|
||||||
title Best Radar Ever
|
|
||||||
axis A, B, C
|
|
||||||
curve c1{1, 2, 3}
|
|
||||||
curve c2{2, 3, 1}
|
|
||||||
`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render a complex radar diagram', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`radar-beta
|
|
||||||
title My favorite ninjas
|
|
||||||
axis Agility, Speed, Strength
|
|
||||||
axis Stam["Stamina"] , Intel["Intelligence"]
|
|
||||||
|
|
||||||
curve Ninja1["Naruto Uzumaki"]{
|
|
||||||
Agility 2, Speed 2,
|
|
||||||
Strength 3, Stam 5,
|
|
||||||
Intel 0
|
|
||||||
}
|
|
||||||
curve Ninja2["Sasuke"]{2, 3, 4, 1, 5}
|
|
||||||
curve Ninja3 {3, 2, 1, 5, 4}
|
|
||||||
|
|
||||||
showLegend true
|
|
||||||
ticks 3
|
|
||||||
max 8
|
|
||||||
min 0
|
|
||||||
graticule polygon
|
|
||||||
`
|
|
||||||
);
|
|
||||||
cy.get('svg').should((svg) => {
|
|
||||||
expect(svg).to.have.length(1);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render radar diagram with config override', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`radar-beta
|
|
||||||
title Best Radar Ever
|
|
||||||
axis A,B,C
|
|
||||||
curve mycurve{1,2,3}`,
|
|
||||||
{ radar: { marginTop: 100, axisScaleFactor: 0.5 } }
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should parse radar diagram with theme override', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`radar-beta
|
|
||||||
axis A,B,C
|
|
||||||
curve mycurve{1,2,3}`,
|
|
||||||
{ theme: 'base', themeVariables: { fontSize: 80, cScale0: '#FF0000' } }
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should handle radar diagram with radar style override', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`radar-beta
|
|
||||||
axis A,B,C
|
|
||||||
curve mycurve{1,2,3}`,
|
|
||||||
{ theme: 'base', themeVariables: { radar: { axisColor: '#FF0000' } } }
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
@@ -138,8 +138,8 @@ describe('State diagram', () => {
|
|||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
stateDiagram-v2
|
stateDiagram-v2
|
||||||
State1: This a single line description
|
State1: This a a single line description
|
||||||
State2: This a multi line description
|
State2: This a a multi line description
|
||||||
State2: here comes the multi part
|
State2: here comes the multi part
|
||||||
[*] --> State1
|
[*] --> State1
|
||||||
State1 --> State2
|
State1 --> State2
|
||||||
@@ -345,7 +345,7 @@ stateDiagram
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('v2 width of compound state should grow with title if title is wider', () => {
|
it('v2 width of compond state should grow with title if title is wider', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
stateDiagram-v2
|
stateDiagram-v2
|
||||||
@@ -402,8 +402,8 @@ stateDiagram-v2
|
|||||||
`
|
`
|
||||||
stateDiagram-v2
|
stateDiagram-v2
|
||||||
MyState
|
MyState
|
||||||
note left of MyState : I am a lefty
|
note left of MyState : I am a leftie
|
||||||
note right of MyState : I am a righty
|
note right of MyState : I am a rightie
|
||||||
`,
|
`,
|
||||||
{
|
{
|
||||||
logLevel: 0,
|
logLevel: 0,
|
||||||
@@ -552,7 +552,7 @@ style AState fill:#636,border:1px solid red,color:white;
|
|||||||
{ logLevel: 0, fontFamily: 'courier' }
|
{ logLevel: 0, fontFamily: 'courier' }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it(' should let styles take precedence over classes', () => {
|
it(' should let styles take preceedence over classes', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
stateDiagram-v2
|
stateDiagram-v2
|
||||||
@@ -565,7 +565,7 @@ style AState fill:#636,border:1px solid red,color:white;
|
|||||||
{ logLevel: 0, fontFamily: 'courier' }
|
{ logLevel: 0, fontFamily: 'courier' }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it(' should allow styles to take effect in subgraphs', () => {
|
it(' should allow styles to take effect in stubgraphs', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
stateDiagram
|
stateDiagram
|
||||||
|
@@ -129,8 +129,8 @@ describe('State diagram', () => {
|
|||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
stateDiagram
|
stateDiagram
|
||||||
State1: This a single line description
|
State1: This a a single line description
|
||||||
State2: This a multi line description
|
State2: This a a multi line description
|
||||||
State2: here comes the multi part
|
State2: here comes the multi part
|
||||||
[*] --> State1
|
[*] --> State1
|
||||||
State1 --> State2
|
State1 --> State2
|
||||||
|
@@ -7,7 +7,7 @@ describe('Timeline diagram', () => {
|
|||||||
title History of Social Media Platform
|
title History of Social Media Platform
|
||||||
2002 : LinkedIn
|
2002 : LinkedIn
|
||||||
2004 : Facebook : Google
|
2004 : Facebook : Google
|
||||||
2005 : YouTube
|
2005 : Youtube
|
||||||
2006 : Twitter
|
2006 : Twitter
|
||||||
`,
|
`,
|
||||||
{}
|
{}
|
||||||
@@ -35,7 +35,7 @@ describe('Timeline diagram', () => {
|
|||||||
section Stone Age
|
section Stone Age
|
||||||
7600 BC : Britain's oldest known house was built in Orkney, Scotland
|
7600 BC : Britain's oldest known house was built in Orkney, Scotland
|
||||||
6000 BC : Sea levels rise and Britain becomes an island.<br> The people who live here are hunter-gatherers.
|
6000 BC : Sea levels rise and Britain becomes an island.<br> The people who live here are hunter-gatherers.
|
||||||
section Bronze Age
|
section Broze Age
|
||||||
2300 BC : People arrive from Europe and settle in Britain. <br>They bring farming and metalworking.
|
2300 BC : People arrive from Europe and settle in Britain. <br>They bring farming and metalworking.
|
||||||
: New styles of pottery and ways of burying the dead appear.
|
: New styles of pottery and ways of burying the dead appear.
|
||||||
2200 BC : The last major building works are completed at Stonehenge.<br> People now bury their dead in stone circles.
|
2200 BC : The last major building works are completed at Stonehenge.<br> People now bury their dead in stone circles.
|
||||||
@@ -51,7 +51,7 @@ describe('Timeline diagram', () => {
|
|||||||
title History of Social Media Platform
|
title History of Social Media Platform
|
||||||
2002 : LinkedIn
|
2002 : LinkedIn
|
||||||
2004 : Facebook : Google
|
2004 : Facebook : Google
|
||||||
2005 : YouTube
|
2005 : Youtube
|
||||||
2006 : Twitter
|
2006 : Twitter
|
||||||
`,
|
`,
|
||||||
{}
|
{}
|
||||||
@@ -68,7 +68,7 @@ describe('Timeline diagram', () => {
|
|||||||
title History of Social Media Platform
|
title History of Social Media Platform
|
||||||
2002 : LinkedIn
|
2002 : LinkedIn
|
||||||
2004 : Facebook : Google
|
2004 : Facebook : Google
|
||||||
2005 : YouTube
|
2005 : Youtube
|
||||||
2006 : Twitter
|
2006 : Twitter
|
||||||
2007 : Tumblr
|
2007 : Tumblr
|
||||||
2008 : Instagram
|
2008 : Instagram
|
||||||
@@ -84,7 +84,7 @@ describe('Timeline diagram', () => {
|
|||||||
title History of Social Media Platform
|
title History of Social Media Platform
|
||||||
2002 : LinkedIn
|
2002 : LinkedIn
|
||||||
2004 : Facebook : Google
|
2004 : Facebook : Google
|
||||||
2005 : YouTube
|
2005 : Youtube
|
||||||
2006 : Twitter
|
2006 : Twitter
|
||||||
2007 : Tumblr
|
2007 : Tumblr
|
||||||
2008 : Instagram
|
2008 : Instagram
|
||||||
@@ -101,7 +101,7 @@ describe('Timeline diagram', () => {
|
|||||||
title History of Social Media Platform
|
title History of Social Media Platform
|
||||||
2002 : LinkedIn
|
2002 : LinkedIn
|
||||||
2004 : Facebook : Google
|
2004 : Facebook : Google
|
||||||
2005 : YouTube
|
2005 : Youtube
|
||||||
2006 : Twitter
|
2006 : Twitter
|
||||||
2007 : Tumblr
|
2007 : Tumblr
|
||||||
2008 : Instagram
|
2008 : Instagram
|
||||||
@@ -118,7 +118,7 @@ describe('Timeline diagram', () => {
|
|||||||
title History of Social Media Platform
|
title History of Social Media Platform
|
||||||
2002 : LinkedIn
|
2002 : LinkedIn
|
||||||
2004 : Facebook : Google
|
2004 : Facebook : Google
|
||||||
2005 : YouTube
|
2005 : Youtube
|
||||||
2006 : Twitter
|
2006 : Twitter
|
||||||
2007 : Tumblr
|
2007 : Tumblr
|
||||||
2008 : Instagram
|
2008 : Instagram
|
||||||
@@ -135,7 +135,7 @@ describe('Timeline diagram', () => {
|
|||||||
title History of Social Media Platform
|
title History of Social Media Platform
|
||||||
2002 : LinkedIn
|
2002 : LinkedIn
|
||||||
2004 : Facebook : Google
|
2004 : Facebook : Google
|
||||||
2005 : YouTube
|
2005 : Youtube
|
||||||
2006 : Twitter
|
2006 : Twitter
|
||||||
2007 : Tumblr
|
2007 : Tumblr
|
||||||
2008 : Instagram
|
2008 : Instagram
|
||||||
@@ -152,7 +152,7 @@ describe('Timeline diagram', () => {
|
|||||||
title History of Social Media Platform
|
title History of Social Media Platform
|
||||||
2002 : LinkedIn
|
2002 : LinkedIn
|
||||||
2004 : Facebook : Google
|
2004 : Facebook : Google
|
||||||
2005 : YouTube
|
2005 : Youtube
|
||||||
2006 : Twitter
|
2006 : Twitter
|
||||||
2007 : Tumblr
|
2007 : Tumblr
|
||||||
2008 : Instagram
|
2008 : Instagram
|
||||||
|
@@ -179,7 +179,6 @@ describe('XY Chart', () => {
|
|||||||
axisLineWidth: 5
|
axisLineWidth: 5
|
||||||
chartOrientation: horizontal
|
chartOrientation: horizontal
|
||||||
plotReservedSpacePercent: 60
|
plotReservedSpacePercent: 60
|
||||||
showDataLabel: true
|
|
||||||
---
|
---
|
||||||
xychart-beta
|
xychart-beta
|
||||||
title "Sales Revenue"
|
title "Sales Revenue"
|
||||||
@@ -316,516 +315,4 @@ describe('XY Chart', () => {
|
|||||||
);
|
);
|
||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render vertical bar chart with labels', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
showDataLabel: true
|
|
||||||
---
|
|
||||||
xychart-beta
|
|
||||||
title "Sales Revenue"
|
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
|
||||||
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render horizontal bar chart with labels', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
showDataLabel: true
|
|
||||||
chartOrientation: horizontal
|
|
||||||
---
|
|
||||||
xychart-beta
|
|
||||||
title "Sales Revenue"
|
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
|
||||||
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render vertical bar chart without labels by default', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
xychart-beta
|
|
||||||
title "Sales Revenue"
|
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
|
||||||
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render horizontal bar chart without labels by default', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
chartOrientation: horizontal
|
|
||||||
---
|
|
||||||
xychart-beta
|
|
||||||
title "Sales Revenue"
|
|
||||||
x-axis Months [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
|
||||||
y-axis "Revenue (in $)" 4000 --> 11000
|
|
||||||
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render multiple bar plots vertically with labels correctly', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
showDataLabel: true
|
|
||||||
---
|
|
||||||
xychart-beta
|
|
||||||
title "Multiple Bar Plots"
|
|
||||||
x-axis Categories [A, B, C]
|
|
||||||
y-axis "Values" 0 --> 100
|
|
||||||
bar [10, 50, 90]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render multiple bar plots horizontally with labels correctly', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
showDataLabel: true
|
|
||||||
chartOrientation: horizontal
|
|
||||||
---
|
|
||||||
xychart-beta
|
|
||||||
title "Multiple Bar Plots"
|
|
||||||
x-axis Categories [A, B, C]
|
|
||||||
y-axis "Values" 0 --> 100
|
|
||||||
bar [10, 50, 90]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render a single bar with label for a vertical xy-chart', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
showDataLabel: true
|
|
||||||
---
|
|
||||||
xychart-beta
|
|
||||||
title "Single Bar Chart"
|
|
||||||
x-axis Categories [A]
|
|
||||||
y-axis "Value" 0 --> 100
|
|
||||||
bar [75]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render a single bar with label for a horizontal xy-chart', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
showDataLabel: true
|
|
||||||
chartOrientation: horizontal
|
|
||||||
---
|
|
||||||
xychart-beta
|
|
||||||
title "Single Bar Chart"
|
|
||||||
x-axis Categories [A]
|
|
||||||
y-axis "Value" 0 --> 100
|
|
||||||
bar [75]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render negative and decimal values with correct labels for vertical xy-chart', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
showDataLabel: true
|
|
||||||
---
|
|
||||||
xychart-beta
|
|
||||||
title "Decimal and Negative Values"
|
|
||||||
x-axis Categories [A, B, C]
|
|
||||||
y-axis -10 --> 10
|
|
||||||
bar [ -2.5, 0.75, 5.1 ]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render negative and decimal values with correct labels for horizontal xy-chart', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
showDataLabel: true
|
|
||||||
chartOrientation: horizontal
|
|
||||||
---
|
|
||||||
xychart-beta
|
|
||||||
title "Decimal and Negative Values"
|
|
||||||
x-axis Categories [A, B, C]
|
|
||||||
y-axis -10 --> 10
|
|
||||||
bar [ -2.5, 0.75, 5.1 ]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render data labels within each bar in the vertical xy-chart', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
showDataLabel: true
|
|
||||||
---
|
|
||||||
xychart-beta
|
|
||||||
title "Sales Revenue"
|
|
||||||
x-axis Months [jan,b,c]
|
|
||||||
y-axis "Revenue (in $)" 4000 --> 12000
|
|
||||||
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000, 3000, 2000, 500, 2000, 3000, 11000, 5000, 6000]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
|
|
||||||
cy.get('g.bar-plot-0').within(() => {
|
|
||||||
cy.get('rect').each(($rect, index) => {
|
|
||||||
// Extract bar properties
|
|
||||||
const barProps = {
|
|
||||||
x: parseFloat($rect.attr('x')),
|
|
||||||
y: parseFloat($rect.attr('y')),
|
|
||||||
width: parseFloat($rect.attr('width')),
|
|
||||||
height: parseFloat($rect.attr('height')),
|
|
||||||
};
|
|
||||||
|
|
||||||
// Get the text element corresponding to this bar by index.
|
|
||||||
cy.get('text')
|
|
||||||
.eq(index)
|
|
||||||
.then(($text) => {
|
|
||||||
const bbox = $text[0].getBBox();
|
|
||||||
const textProps = {
|
|
||||||
x: bbox.x,
|
|
||||||
y: bbox.y,
|
|
||||||
width: bbox.width,
|
|
||||||
height: bbox.height,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Verify that the text label is positioned within the boundaries of the bar.
|
|
||||||
expect(textProps.x).to.be.greaterThan(barProps.x);
|
|
||||||
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
|
|
||||||
|
|
||||||
// Check horizontal alignment (within tolerance)
|
|
||||||
expect(textProps.x + textProps.width / 2).to.be.closeTo(
|
|
||||||
barProps.x + barProps.width / 2,
|
|
||||||
5
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(textProps.y).to.be.greaterThan(barProps.y);
|
|
||||||
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render data labels within each bar in the horizontal xy-chart', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
showDataLabel: true
|
|
||||||
chartOrientation: horizontal
|
|
||||||
---
|
|
||||||
xychart-beta
|
|
||||||
title "Sales Revenue"
|
|
||||||
x-axis Months [jan,b,c]
|
|
||||||
y-axis "Revenue (in $)" 4000 --> 12000
|
|
||||||
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000, 3000, 2000, 500, 2000, 3000, 11000, 5000, 6000]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
|
|
||||||
cy.get('g.bar-plot-0').within(() => {
|
|
||||||
cy.get('rect').each(($rect, index) => {
|
|
||||||
// Extract bar properties
|
|
||||||
const barProps = {
|
|
||||||
x: parseFloat($rect.attr('x')),
|
|
||||||
y: parseFloat($rect.attr('y')),
|
|
||||||
width: parseFloat($rect.attr('width')),
|
|
||||||
height: parseFloat($rect.attr('height')),
|
|
||||||
};
|
|
||||||
|
|
||||||
// Get the text element corresponding to this bar by index.
|
|
||||||
cy.get('text')
|
|
||||||
.eq(index)
|
|
||||||
.then(($text) => {
|
|
||||||
const bbox = $text[0].getBBox();
|
|
||||||
const textProps = {
|
|
||||||
x: bbox.x,
|
|
||||||
y: bbox.y,
|
|
||||||
width: bbox.width,
|
|
||||||
height: bbox.height,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Verify that the text label is positioned within the boundaries of the bar.
|
|
||||||
expect(textProps.x).to.be.greaterThan(barProps.x);
|
|
||||||
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
|
|
||||||
|
|
||||||
expect(textProps.y).to.be.greaterThan(barProps.y);
|
|
||||||
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
|
|
||||||
expect(textProps.y + textProps.height / 2).to.be.closeTo(
|
|
||||||
barProps.y + barProps.height / 2,
|
|
||||||
5
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render data labels within each bar in the vertical xy-chart with a lot of bars of different sizes', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
showDataLabel: true
|
|
||||||
---
|
|
||||||
xychart-beta
|
|
||||||
title "Sales Revenue"
|
|
||||||
x-axis Months [jan,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s]
|
|
||||||
y-axis "Revenue (in $)" 4000 --> 12000
|
|
||||||
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000, 8000, 10000, 5000, 7600, 4999,11000 ,5000,6000]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
|
|
||||||
cy.get('g.bar-plot-0').within(() => {
|
|
||||||
cy.get('rect').each(($rect, index) => {
|
|
||||||
// Extract bar properties
|
|
||||||
const barProps = {
|
|
||||||
x: parseFloat($rect.attr('x')),
|
|
||||||
y: parseFloat($rect.attr('y')),
|
|
||||||
width: parseFloat($rect.attr('width')),
|
|
||||||
height: parseFloat($rect.attr('height')),
|
|
||||||
};
|
|
||||||
|
|
||||||
// Get the text element corresponding to this bar by index.
|
|
||||||
cy.get('text')
|
|
||||||
.eq(index)
|
|
||||||
.then(($text) => {
|
|
||||||
const bbox = $text[0].getBBox();
|
|
||||||
const textProps = {
|
|
||||||
x: bbox.x,
|
|
||||||
y: bbox.y,
|
|
||||||
width: bbox.width,
|
|
||||||
height: bbox.height,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Verify that the text label is positioned within the boundaries of the bar.
|
|
||||||
expect(textProps.x).to.be.greaterThan(barProps.x);
|
|
||||||
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
|
|
||||||
|
|
||||||
// Check horizontal alignment (within tolerance)
|
|
||||||
expect(textProps.x + textProps.width / 2).to.be.closeTo(
|
|
||||||
barProps.x + barProps.width / 2,
|
|
||||||
5
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(textProps.y).to.be.greaterThan(barProps.y);
|
|
||||||
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render data labels within each bar in the horizontal xy-chart with a lot of bars of different sizes', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
showDataLabel: true
|
|
||||||
chartOrientation: horizontal
|
|
||||||
---
|
|
||||||
xychart-beta
|
|
||||||
title "Sales Revenue"
|
|
||||||
x-axis Months [jan,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s]
|
|
||||||
y-axis "Revenue (in $)" 4000 --> 12000
|
|
||||||
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000, 8000, 10000, 5000, 7600, 4999,11000 ,5000,6000]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
|
|
||||||
cy.get('g.bar-plot-0').within(() => {
|
|
||||||
cy.get('rect').each(($rect, index) => {
|
|
||||||
// Extract bar properties
|
|
||||||
const barProps = {
|
|
||||||
x: parseFloat($rect.attr('x')),
|
|
||||||
y: parseFloat($rect.attr('y')),
|
|
||||||
width: parseFloat($rect.attr('width')),
|
|
||||||
height: parseFloat($rect.attr('height')),
|
|
||||||
};
|
|
||||||
|
|
||||||
// Get the text element corresponding to this bar by index.
|
|
||||||
cy.get('text')
|
|
||||||
.eq(index)
|
|
||||||
.then(($text) => {
|
|
||||||
const bbox = $text[0].getBBox();
|
|
||||||
const textProps = {
|
|
||||||
x: bbox.x,
|
|
||||||
y: bbox.y,
|
|
||||||
width: bbox.width,
|
|
||||||
height: bbox.height,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Verify that the text label is positioned within the boundaries of the bar.
|
|
||||||
expect(textProps.x).to.be.greaterThan(barProps.x);
|
|
||||||
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
|
|
||||||
|
|
||||||
expect(textProps.y).to.be.greaterThan(barProps.y);
|
|
||||||
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
|
|
||||||
expect(textProps.y + textProps.height / 2).to.be.closeTo(
|
|
||||||
barProps.y + barProps.height / 2,
|
|
||||||
5
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render data labels correctly for a bar in the vertical xy-chart', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
showDataLabel: true
|
|
||||||
---
|
|
||||||
xychart-beta
|
|
||||||
title "Sales Revenue"
|
|
||||||
x-axis Months [jan]
|
|
||||||
y-axis "Revenue (in $)" 3000 --> 12000
|
|
||||||
bar [4000]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
|
|
||||||
cy.get('g.bar-plot-0').within(() => {
|
|
||||||
cy.get('rect').each(($rect, index) => {
|
|
||||||
// Extract bar properties
|
|
||||||
const barProps = {
|
|
||||||
x: parseFloat($rect.attr('x')),
|
|
||||||
y: parseFloat($rect.attr('y')),
|
|
||||||
width: parseFloat($rect.attr('width')),
|
|
||||||
height: parseFloat($rect.attr('height')),
|
|
||||||
};
|
|
||||||
|
|
||||||
// Get the text element corresponding to this bar by index.
|
|
||||||
cy.get('text')
|
|
||||||
.eq(index)
|
|
||||||
.then(($text) => {
|
|
||||||
const bbox = $text[0].getBBox();
|
|
||||||
const textProps = {
|
|
||||||
x: bbox.x,
|
|
||||||
y: bbox.y,
|
|
||||||
width: bbox.width,
|
|
||||||
height: bbox.height,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Verify that the text label is positioned within the boundaries of the bar.
|
|
||||||
expect(textProps.x).to.be.greaterThan(barProps.x);
|
|
||||||
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
|
|
||||||
|
|
||||||
// Check horizontal alignment (within tolerance)
|
|
||||||
expect(textProps.x + textProps.width / 2).to.be.closeTo(
|
|
||||||
barProps.x + barProps.width / 2,
|
|
||||||
5
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(textProps.y).to.be.greaterThan(barProps.y);
|
|
||||||
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render data labels correctly for a bar in the horizontal xy-chart', () => {
|
|
||||||
imgSnapshotTest(
|
|
||||||
`
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
xyChart:
|
|
||||||
showDataLabel: true
|
|
||||||
chartOrientation: horizontal
|
|
||||||
---
|
|
||||||
xychart-beta
|
|
||||||
title "Sales Revenue"
|
|
||||||
x-axis Months [jan]
|
|
||||||
y-axis "Revenue (in $)" 3000 --> 12000
|
|
||||||
bar [4000]
|
|
||||||
`,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
|
|
||||||
cy.get('g.bar-plot-0').within(() => {
|
|
||||||
cy.get('rect').each(($rect, index) => {
|
|
||||||
// Extract bar properties
|
|
||||||
const barProps = {
|
|
||||||
x: parseFloat($rect.attr('x')),
|
|
||||||
y: parseFloat($rect.attr('y')),
|
|
||||||
width: parseFloat($rect.attr('width')),
|
|
||||||
height: parseFloat($rect.attr('height')),
|
|
||||||
};
|
|
||||||
|
|
||||||
// Get the text element corresponding to this bar by index.
|
|
||||||
cy.get('text')
|
|
||||||
.eq(index)
|
|
||||||
.then(($text) => {
|
|
||||||
const bbox = $text[0].getBBox();
|
|
||||||
const textProps = {
|
|
||||||
x: bbox.x,
|
|
||||||
y: bbox.y,
|
|
||||||
width: bbox.width,
|
|
||||||
height: bbox.height,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Verify that the text label is positioned within the boundaries of the bar.
|
|
||||||
expect(textProps.x).to.be.greaterThan(barProps.x);
|
|
||||||
expect(textProps.x + textProps.width).to.be.lessThan(barProps.x + barProps.width);
|
|
||||||
|
|
||||||
expect(textProps.y).to.be.greaterThan(barProps.y);
|
|
||||||
expect(textProps.y + textProps.height).to.be.lessThan(barProps.y + barProps.height);
|
|
||||||
expect(textProps.y + textProps.height / 2).to.be.closeTo(
|
|
||||||
barProps.y + barProps.height / 2,
|
|
||||||
5
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
@@ -60,7 +60,7 @@
|
|||||||
<pre id="diagram" class="mermaid2">
|
<pre id="diagram" class="mermaid2">
|
||||||
timeline
|
timeline
|
||||||
title My day
|
title My day
|
||||||
section Section with no tasks
|
section section with no tasks
|
||||||
section Go to work at the dog office
|
section Go to work at the dog office
|
||||||
1930 : first step : second step is a long step
|
1930 : first step : second step is a long step
|
||||||
: third step
|
: third step
|
||||||
@@ -70,18 +70,18 @@
|
|||||||
1960 : India fights poverty, looses war to China and gets nuclear weapons from USA and USSR
|
1960 : India fights poverty, looses war to China and gets nuclear weapons from USA and USSR
|
||||||
1970 : Green Revolution comes to india
|
1970 : Green Revolution comes to india
|
||||||
section Another section with no tasks
|
section Another section with no tasks
|
||||||
I am a very, very big task
|
I am a big big big tasks
|
||||||
I am not so big task
|
I am not so big tasks
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid">
|
||||||
timeline
|
timeline
|
||||||
title MermaidChart 2023 Timeline
|
title MermaidChart 2023 Timeline
|
||||||
section 2023 Q1 <br> Release Personal Tier
|
section 2023 Q1 <br> Release Personal Tier
|
||||||
Bullet 1 : sub-point 1a : sub-point 1b
|
Buttet 1 : sub-point 1a : sub-point 1b
|
||||||
: sub-point 1c
|
: sub-point 1c
|
||||||
Bullet 2 : sub-point 2a : sub-point 2b
|
Bullet 2 : sub-point 2a : sub-point 2b
|
||||||
section 2023 Q2 <br> Release XYZ Tier
|
section 2023 Q2 <br> Release XYZ Tier
|
||||||
Bullet 3 : sub-point <br> 3a : sub-point 3b
|
Buttet 3 : sub-point <br> 3a : sub-point 3b
|
||||||
: sub-point 3c
|
: sub-point 3c
|
||||||
Bullet 4 : sub-point 4a : sub-point 4b
|
Bullet 4 : sub-point 4a : sub-point 4b
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
section Stone Age
|
section Stone Age
|
||||||
7600 BC : Britain's oldest known house was built in Orkney, Scotland
|
7600 BC : Britain's oldest known house was built in Orkney, Scotland
|
||||||
6000 BC : Sea levels rise and Britain becomes an island. The people who live here are hunter-gatherers.
|
6000 BC : Sea levels rise and Britain becomes an island. The people who live here are hunter-gatherers.
|
||||||
section Bronze Age
|
section Broze Age
|
||||||
2300 BC : People arrive from Europe and settle in Britain. They bring farming and metalworking.
|
2300 BC : People arrive from Europe and settle in Britain. They bring farming and metalworking.
|
||||||
: New styles of pottery and ways of burying the dead appear.
|
: New styles of pottery and ways of burying the dead appear.
|
||||||
2200 BC : The last major building works are completed at Stonehenge. People now bury their dead in stone circles.
|
2200 BC : The last major building works are completed at Stonehenge. People now bury their dead in stone circles.
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
title History of Social Media Platform
|
title History of Social Media Platform
|
||||||
2002 : LinkedIn
|
2002 : LinkedIn
|
||||||
2004 : Facebook : Google : Pixar
|
2004 : Facebook : Google : Pixar
|
||||||
2005 : YouTube
|
2005 : Youtube
|
||||||
2006 : Twitter
|
2006 : Twitter
|
||||||
2007 : Tumblr
|
2007 : Tumblr
|
||||||
2008s : Instagram
|
2008s : Instagram
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
title History of Social Media Platform
|
title History of Social Media Platform
|
||||||
2002 : LinkedIn
|
2002 : LinkedIn
|
||||||
2004 : Facebook : Google : Pixar
|
2004 : Facebook : Google : Pixar
|
||||||
2005 : YouTube
|
2005 : Youtube
|
||||||
2006 : Twitter
|
2006 : Twitter
|
||||||
2007 : Tumblr
|
2007 : Tumblr
|
||||||
2008s : Instagram
|
2008s : Instagram
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
title History of Social Media Platform
|
title History of Social Media Platform
|
||||||
2002 : LinkedIn
|
2002 : LinkedIn
|
||||||
2004 : Facebook : Google
|
2004 : Facebook : Google
|
||||||
2005 : YouTube
|
2005 : Youtube
|
||||||
2006 : Twitter
|
2006 : Twitter
|
||||||
2007 : Tumblr
|
2007 : Tumblr
|
||||||
2008 : Instagram
|
2008 : Instagram
|
||||||
@@ -152,7 +152,7 @@
|
|||||||
title History of Social Media Platform
|
title History of Social Media Platform
|
||||||
2002 : LinkedIn
|
2002 : LinkedIn
|
||||||
2004 : Facebook : Google
|
2004 : Facebook : Google
|
||||||
2005 : YouTube
|
2005 : Youtube
|
||||||
2006 : Twitter
|
2006 : Twitter
|
||||||
2007 : Tumblr
|
2007 : Tumblr
|
||||||
2008s : Instagram
|
2008s : Instagram
|
||||||
|
@@ -37,7 +37,7 @@
|
|||||||
+String owner
|
+String owner
|
||||||
+BigDecimal balance
|
+BigDecimal balance
|
||||||
+deposit(amount) bool
|
+deposit(amount) bool
|
||||||
+withdrawal(amount) int
|
+withdrawl(amount) int
|
||||||
}
|
}
|
||||||
cssClass "BankAccount" customCss
|
cssClass "BankAccount" customCss
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ classE o-- classF : aggregation
|
|||||||
+String owner
|
+String owner
|
||||||
+BigDecimal balance
|
+BigDecimal balance
|
||||||
+deposit(amount) bool
|
+deposit(amount) bool
|
||||||
+withdrawal(amount) int
|
+withdrawl(amount) int
|
||||||
}
|
}
|
||||||
Class01~T~ <|-- AveryLongClass : Cool
|
Class01~T~ <|-- AveryLongClass : Cool
|
||||||
Class03~T~ *-- Class04~T~
|
Class03~T~ *-- Class04~T~
|
||||||
|
@@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
document.getElementsByTagName('body')[0].appendChild(div);
|
document.getElementsByTagName('body')[0].appendChild(div);
|
||||||
}
|
}
|
||||||
mermaid.initialize({ startOnLoad: true, securityLevel: 'strict_', logLevel: 1 });
|
mermaid.initialize({ startOnLoad: true, securityLevel: 'strct', logLevel: 1 });
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
flowchart BT subgraph S1 sub1 -->sub2 end subgraph S2 sub4 end S1 --> S2 sub1 --> sub4
|
flowchart BT subgraph S1 sub1 -->sub2 end subgraph S2 sub4 end S1 --> S2 sub1 --> sub4
|
||||||
</div>
|
</div>
|
||||||
<div class="mermaid2" style="width: 50%; height: 200px">
|
<div class="mermaid2" style="width: 50%; height: 200px">
|
||||||
sequenceDiagram Alice->>Bob:Extremely utterly long line of longness which had previously
|
sequenceDiagram Alice->>Bob:Extremely utterly long line of longness which had preivously
|
||||||
overflown the actor box as it is much longer than what it should be Bob->>Alice: I'm short
|
overflown the actor box as it is much longer than what it should be Bob->>Alice: I'm short
|
||||||
though
|
though
|
||||||
</div>
|
</div>
|
||||||
@@ -61,9 +61,9 @@
|
|||||||
#quot;elit#quot;."}}
|
#quot;elit#quot;."}}
|
||||||
</div>
|
</div>
|
||||||
<div class="mermaid2" style="width: 50%; height: 50%">
|
<div class="mermaid2" style="width: 50%; height: 50%">
|
||||||
flowchart TB internet nat router lb1 lb2 compute1 compute2 subgraph project router nat
|
flowchart TB internet nat routeur lb1 lb2 compute1 compute2 subgraph project routeur nat
|
||||||
subgraph subnet1 compute1 lb1 end subgraph subnet2 compute2 lb2 end end internet --> router
|
subgraph subnet1 compute1 lb1 end subgraph subnet2 compute2 lb2 end end internet --> routeur
|
||||||
router --> subnet1 & subnet2 subnet1 & subnet2 --> nat --> internet
|
routeur --> subnet1 & subnet2 subnet1 & subnet2 --> nat --> internet
|
||||||
</div>
|
</div>
|
||||||
<div class="mermaid2" style="width: 50%; height: 50%">
|
<div class="mermaid2" style="width: 50%; height: 50%">
|
||||||
flowchart TD subgraph one[One] subgraph sub_one[Sub One] _sub_one end end subgraph two[Two]
|
flowchart TD subgraph one[One] subgraph sub_one[Sub One] _sub_one end end subgraph two[Two]
|
||||||
|
@@ -38,7 +38,7 @@
|
|||||||
+String owner
|
+String owner
|
||||||
+BigDecimal balance
|
+BigDecimal balance
|
||||||
+deposit(amount) bool
|
+deposit(amount) bool
|
||||||
+withdrawal(amount) int
|
+withdrawl(amount) int
|
||||||
}
|
}
|
||||||
cssClass "BankAccount" customCss
|
cssClass "BankAccount" customCss
|
||||||
</pre>
|
</pre>
|
||||||
|
@@ -386,7 +386,7 @@ kanban
|
|||||||
[Create Documentation]
|
[Create Documentation]
|
||||||
docs[Create Blog about the new diagram]
|
docs[Create Blog about the new diagram]
|
||||||
id7[In progress]
|
id7[In progress]
|
||||||
id6[Create renderer so that it works in all cases. We also add some extra text here for testing purposes. And some more just for the extra flare.]
|
id6[Create renderer so that it works in all cases. We also add som extra text here for testing purposes. And some more just for the extra flare.]
|
||||||
id9[Ready for deploy]
|
id9[Ready for deploy]
|
||||||
id8[Design grammar]@{ assigned: 'knsv' }
|
id8[Design grammar]@{ assigned: 'knsv' }
|
||||||
id10[Ready for test]
|
id10[Ready for test]
|
||||||
|
@@ -105,7 +105,7 @@
|
|||||||
let diagram = 'graph LR\n';
|
let diagram = 'graph LR\n';
|
||||||
diagram += " B(<a href='<";
|
diagram += " B(<a href='<";
|
||||||
diagram += 'script></';
|
diagram += 'script></';
|
||||||
diagram += "script>JavaScript:xssAttack`1`'>Click)";
|
diagram += "script>Javascript:xssAttack`1`'>Click)";
|
||||||
// diagram += "script\u003aalert\u0028document.domain\u0029\` src=x>\"\);\n";
|
// diagram += "script\u003aalert\u0028document.domain\u0029\` src=x>\"\);\n";
|
||||||
console.log(diagram);
|
console.log(diagram);
|
||||||
// document.querySelector('#diagram').innerHTML = diagram;
|
// document.querySelector('#diagram').innerHTML = diagram;
|
||||||
|
@@ -449,7 +449,7 @@
|
|||||||
---
|
---
|
||||||
config:
|
config:
|
||||||
theme: forest
|
theme: forest
|
||||||
look: handDrawn
|
look: handDrawns
|
||||||
layout: elk
|
layout: elk
|
||||||
---
|
---
|
||||||
classDiagram
|
classDiagram
|
||||||
|
@@ -90,7 +90,7 @@
|
|||||||
erDiagram
|
erDiagram
|
||||||
CAR ||--o{ NAMED-DRIVER : allows
|
CAR ||--o{ NAMED-DRIVER : allows
|
||||||
CAR {
|
CAR {
|
||||||
text text PK "comment"
|
test test PK "comment"
|
||||||
string make
|
string make
|
||||||
string model
|
string model
|
||||||
string[] parts
|
string[] parts
|
||||||
|
@@ -2,211 +2,151 @@
|
|||||||
"durations": [
|
"durations": [
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/configuration.spec.js",
|
"spec": "cypress/integration/other/configuration.spec.js",
|
||||||
"duration": 5450
|
"duration": 4989
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/external-diagrams.spec.js",
|
"spec": "cypress/integration/other/external-diagrams.spec.js",
|
||||||
"duration": 2004
|
"duration": 1382
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/ghsa.spec.js",
|
"spec": "cypress/integration/other/ghsa.spec.js",
|
||||||
"duration": 3183
|
"duration": 3178
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/iife.spec.js",
|
"spec": "cypress/integration/other/iife.spec.js",
|
||||||
"duration": 1913
|
"duration": 1372
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/interaction.spec.js",
|
"spec": "cypress/integration/other/interaction.spec.js",
|
||||||
"duration": 10944
|
"duration": 8998
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/rerender.spec.js",
|
"spec": "cypress/integration/other/rerender.spec.js",
|
||||||
"duration": 1938
|
"duration": 1249
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/other/xss.spec.js",
|
"spec": "cypress/integration/other/xss.spec.js",
|
||||||
"duration": 26753
|
"duration": 25664
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/appli.spec.js",
|
"spec": "cypress/integration/rendering/appli.spec.js",
|
||||||
"duration": 2571
|
"duration": 1928
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/architecture.spec.ts",
|
"spec": "cypress/integration/rendering/architecture.spec.ts",
|
||||||
"duration": 110
|
"duration": 2330
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/block.spec.js",
|
"spec": "cypress/integration/rendering/block.spec.js",
|
||||||
"duration": 14697
|
"duration": 11156
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/c4.spec.js",
|
"spec": "cypress/integration/rendering/c4.spec.js",
|
||||||
"duration": 4705
|
"duration": 3418
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/classDiagram-elk-v3.spec.js",
|
|
||||||
"duration": 35841
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/classDiagram-handDrawn-v3.spec.js",
|
|
||||||
"duration": 34279
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/classDiagram-v2.spec.js",
|
"spec": "cypress/integration/rendering/classDiagram-v2.spec.js",
|
||||||
"duration": 20641
|
"duration": 14866
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/classDiagram-v3.spec.js",
|
|
||||||
"duration": 33020
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/classDiagram.spec.js",
|
"spec": "cypress/integration/rendering/classDiagram.spec.js",
|
||||||
"duration": 13546
|
"duration": 9894
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/conf-and-directives.spec.js",
|
"spec": "cypress/integration/rendering/conf-and-directives.spec.js",
|
||||||
"duration": 8072
|
"duration": 5778
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/current.spec.js",
|
"spec": "cypress/integration/rendering/current.spec.js",
|
||||||
"duration": 2083
|
"duration": 1690
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/erDiagram-unified.spec.js",
|
|
||||||
"duration": 78269
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/erDiagram.spec.js",
|
"spec": "cypress/integration/rendering/erDiagram.spec.js",
|
||||||
"duration": 12578
|
"duration": 9144
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/errorDiagram.spec.js",
|
"spec": "cypress/integration/rendering/errorDiagram.spec.js",
|
||||||
"duration": 2784
|
"duration": 1951
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart-elk.spec.js",
|
"spec": "cypress/integration/rendering/flowchart-elk.spec.js",
|
||||||
"duration": 36205
|
"duration": 2196
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart-handDrawn.spec.js",
|
"spec": "cypress/integration/rendering/flowchart-handDrawn.spec.js",
|
||||||
"duration": 26627
|
"duration": 21029
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart-shape-alias.spec.ts",
|
"spec": "cypress/integration/rendering/flowchart-shape-alias.spec.ts",
|
||||||
"duration": 21332
|
"duration": 16087
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart-v2.spec.js",
|
"spec": "cypress/integration/rendering/flowchart-v2.spec.js",
|
||||||
"duration": 37328
|
"duration": 27465
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/flowchart.spec.js",
|
"spec": "cypress/integration/rendering/flowchart.spec.js",
|
||||||
"duration": 25914
|
"duration": 20035
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/gantt.spec.js",
|
"spec": "cypress/integration/rendering/gantt.spec.js",
|
||||||
"duration": 15383
|
"duration": 11366
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/gitGraph.spec.js",
|
"spec": "cypress/integration/rendering/gitGraph.spec.js",
|
||||||
"duration": 45226
|
"duration": 34025
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/iconShape.spec.ts",
|
"spec": "cypress/integration/rendering/iconShape.spec.ts",
|
||||||
"duration": 251094
|
"duration": 185902
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/imageShape.spec.ts",
|
"spec": "cypress/integration/rendering/imageShape.spec.ts",
|
||||||
"duration": 50916
|
"duration": 41631
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/info.spec.ts",
|
"spec": "cypress/integration/rendering/info.spec.ts",
|
||||||
"duration": 2489
|
"duration": 1736
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/journey.spec.js",
|
"spec": "cypress/integration/rendering/journey.spec.js",
|
||||||
"duration": 5988
|
"duration": 2247
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/kanban.spec.ts",
|
|
||||||
"duration": 6225
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/katex.spec.js",
|
"spec": "cypress/integration/rendering/katex.spec.js",
|
||||||
"duration": 3009
|
"duration": 2144
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/marker_unique_id.spec.js",
|
"spec": "cypress/integration/rendering/marker_unique_id.spec.js",
|
||||||
"duration": 2426
|
"duration": 1646
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/mindmap.spec.ts",
|
"spec": "cypress/integration/rendering/mindmap.spec.ts",
|
||||||
"duration": 9306
|
"duration": 6406
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/newShapes.spec.ts",
|
"spec": "cypress/integration/rendering/newShapes.spec.ts",
|
||||||
"duration": 134419
|
"duration": 107219
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/oldShapes.spec.ts",
|
|
||||||
"duration": 102434
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/packet.spec.ts",
|
|
||||||
"duration": 3373
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/pie.spec.ts",
|
|
||||||
"duration": 4898
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/quadrantChart.spec.js",
|
|
||||||
"duration": 7578
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/radar.spec.js",
|
|
||||||
"duration": 4526
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/requirement.spec.js",
|
|
||||||
"duration": 2172
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/requirementDiagram-unified.spec.js",
|
|
||||||
"duration": 47175
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/sankey.spec.ts",
|
|
||||||
"duration": 5717
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/sequencediagram.spec.js",
|
|
||||||
"duration": 32556
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"spec": "cypress/integration/rendering/stateDiagram-v2.spec.js",
|
|
||||||
"duration": 22572
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/stateDiagram.spec.js",
|
"spec": "cypress/integration/rendering/stateDiagram.spec.js",
|
||||||
"duration": 14064
|
"duration": 15834
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/theme.spec.js",
|
"spec": "cypress/integration/rendering/theme.spec.js",
|
||||||
"duration": 26565
|
"duration": 33240
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/timeline.spec.ts",
|
"spec": "cypress/integration/rendering/timeline.spec.ts",
|
||||||
"duration": 6233
|
"duration": 7122
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/xyChart.spec.js",
|
"spec": "cypress/integration/rendering/xyChart.spec.js",
|
||||||
"duration": 17750
|
"duration": 11127
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spec": "cypress/integration/rendering/zenuml.spec.js",
|
"spec": "cypress/integration/rendering/zenuml.spec.js",
|
||||||
"duration": 2696
|
"duration": 2391
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -110,7 +110,7 @@
|
|||||||
title Component diagram for Internet Banking System - API Application
|
title Component diagram for Internet Banking System - API Application
|
||||||
|
|
||||||
Container(spa, "Single Page Application", "javascript and angular", "Provides all the internet banking functionality to customers via their web browser.")
|
Container(spa, "Single Page Application", "javascript and angular", "Provides all the internet banking functionality to customers via their web browser.")
|
||||||
Container(ma, "Mobile App", "Xamarin", "Provides a limited subset ot the internet banking functionality to customers via their mobile device.")
|
Container(ma, "Mobile App", "Xamarin", "Provides a limited subset ot the internet banking functionality to customers via their mobile mobile device.")
|
||||||
ContainerDb(db, "Database", "Relational Database Schema", "Stores user registration information, hashed authentication credentials, access logs, etc.")
|
ContainerDb(db, "Database", "Relational Database Schema", "Stores user registration information, hashed authentication credentials, access logs, etc.")
|
||||||
System_Ext(mbs, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")
|
System_Ext(mbs, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")
|
||||||
|
|
||||||
|
@@ -148,7 +148,7 @@
|
|||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
classDiagram
|
classDiagram
|
||||||
class Person {
|
class Person {
|
||||||
+ID : Guid
|
+Id : Guid
|
||||||
+FirstName : string
|
+FirstName : string
|
||||||
+LastName : string
|
+LastName : string
|
||||||
-privateProperty : string
|
-privateProperty : string
|
||||||
|
@@ -91,9 +91,6 @@
|
|||||||
<li>
|
<li>
|
||||||
<h2><a href="./architecture.html">Architecture</a></h2>
|
<h2><a href="./architecture.html">Architecture</a></h2>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<h2><a href="./radar.html">Radar</a></h2>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
y-axis Not Important --> important
|
y-axis Not Important --> important
|
||||||
quadrant-1 Plan
|
quadrant-1 Plan
|
||||||
quadrant-2 Do
|
quadrant-2 Do
|
||||||
quadrant-3 Delegate
|
quadrant-3 Deligate
|
||||||
quadrant-4 Delete
|
quadrant-4 Delete
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
157
demos/radar.html
157
demos/radar.html
@@ -1,157 +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>
|
|
||||||
<h1>Radar diagram demo</h1>
|
|
||||||
|
|
||||||
<div class="diagrams">
|
|
||||||
<pre class="mermaid">
|
|
||||||
radar-beta
|
|
||||||
title My favorite ninjas
|
|
||||||
axis Agility, Speed, Strength
|
|
||||||
axis Stam["Stamina"] , Intel["Intelligence"]
|
|
||||||
|
|
||||||
curve Ninja1["Naruto"]{
|
|
||||||
Agility 2, Speed 2,
|
|
||||||
Strength 3, Stam 5,
|
|
||||||
Intel 0
|
|
||||||
}
|
|
||||||
curve Ninja2["Sasuke"]{2, 3, 4, 1, 5}
|
|
||||||
curve Ninja3["Ninja"] {3, 2, 1, 5, 4}
|
|
||||||
|
|
||||||
showLegend true
|
|
||||||
ticks 3
|
|
||||||
max 8
|
|
||||||
min 0
|
|
||||||
graticule circle
|
|
||||||
</pre
|
|
||||||
>
|
|
||||||
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
radar:
|
|
||||||
axisScaleFactor: 0.25
|
|
||||||
axisLabelFactor: 0.95
|
|
||||||
---
|
|
||||||
radar-beta
|
|
||||||
title DevOps Radar
|
|
||||||
axis f["Feature Velocity"], s["Stability"]
|
|
||||||
axis r["Resilience"], e["Efficiency"]
|
|
||||||
axis c["Cost"], d["DevSecOps"]
|
|
||||||
|
|
||||||
curve app1["App1"]{
|
|
||||||
f 5, s 4.5, r 3.8, d 4.2, e 4.5, c 3.5
|
|
||||||
}
|
|
||||||
curve app2["App2"]{4, 3, 4, 3, 3, 4}, app3["App3"]{3, 2, 4, 3, 2, 3}
|
|
||||||
curve app4["App4"]{2, 1, 3.2, 2.5, 1, 2}
|
|
||||||
|
|
||||||
showLegend true
|
|
||||||
ticks 3
|
|
||||||
max 5
|
|
||||||
graticule polygon
|
|
||||||
</pre
|
|
||||||
>
|
|
||||||
|
|
||||||
<pre class="mermaid">
|
|
||||||
%%{init: {'theme': 'forest'} }%%
|
|
||||||
radar-beta
|
|
||||||
title Forest theme
|
|
||||||
axis Agility, Speed, Strength
|
|
||||||
axis Stam["Stamina"] , Intel["Intelligence"]
|
|
||||||
|
|
||||||
curve Ninja1["Naruto"]{
|
|
||||||
Agility 2, Speed 2,
|
|
||||||
Strength 3, Stam 5,
|
|
||||||
Intel 0
|
|
||||||
}
|
|
||||||
curve Ninja2["Sasuke"]{2, 3, 4, 1, 5}
|
|
||||||
curve Ninja3["Ninja"] {3, 2, 1, 5, 4}
|
|
||||||
</pre
|
|
||||||
>
|
|
||||||
|
|
||||||
<pre class="mermaid" style="background-color: black">
|
|
||||||
%%{init: {'theme': 'dark'} }%%
|
|
||||||
radar-beta
|
|
||||||
title Dark theme
|
|
||||||
axis Agility, Speed, Strength
|
|
||||||
axis Stam["Stamina"] , Intel["Intelligence"]
|
|
||||||
|
|
||||||
curve Ninja1["Naruto"]{
|
|
||||||
Agility 2, Speed 2,
|
|
||||||
Strength 3, Stam 5,
|
|
||||||
Intel 0
|
|
||||||
}
|
|
||||||
curve Ninja2["Sasuke"]{2, 3, 4, 1, 5}
|
|
||||||
curve Ninja3["Ninja"] {3, 2, 1, 5, 4}
|
|
||||||
</pre
|
|
||||||
>
|
|
||||||
<pre class="mermaid">
|
|
||||||
%%{init: {'theme': 'base', 'themeVariables': {'cScale0': '#ff0000', 'cScale1': '#00ff00', 'cScale2': '#0000ff'}} }%%
|
|
||||||
radar-beta
|
|
||||||
title Custom colors
|
|
||||||
axis Agility, Speed, Strength
|
|
||||||
axis Stam["Stamina"] , Intel["Intelligence"]
|
|
||||||
|
|
||||||
curve Ninja1["Naruto"]{
|
|
||||||
Agility 2, Speed 2,
|
|
||||||
Strength 3, Stam 5,
|
|
||||||
Intel 0
|
|
||||||
}
|
|
||||||
curve Ninja2["Sasuke"]{2, 3, 4, 1, 5}
|
|
||||||
curve Ninja3["Ninja"] {3, 2, 1, 5, 4}
|
|
||||||
</pre
|
|
||||||
>
|
|
||||||
<pre class="mermaid">
|
|
||||||
---
|
|
||||||
config:
|
|
||||||
radar:
|
|
||||||
axisScaleFactor: 0.25
|
|
||||||
curveTension: 0.1
|
|
||||||
theme: base
|
|
||||||
themeVariables:
|
|
||||||
cScale0: "#FF0000"
|
|
||||||
cScale1: "#00FF00"
|
|
||||||
cScale2: "#0000FF"
|
|
||||||
radar:
|
|
||||||
curveOpacity: 0
|
|
||||||
---
|
|
||||||
radar-beta
|
|
||||||
title Custom colors, axisScaleFactor, curveTension, opacity
|
|
||||||
axis A, B, C, D, E
|
|
||||||
curve c1{1,2,3,4,5}
|
|
||||||
curve c2{5,4,3,2,1}
|
|
||||||
curve c3{3,3,3,3,3}
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
<script type="module">
|
|
||||||
import mermaid from '/mermaid.esm.mjs';
|
|
||||||
mermaid.initialize({
|
|
||||||
logLevel: 3,
|
|
||||||
securityLevel: 'loose',
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.diagrams {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
width: 45vw;
|
|
||||||
padding: 2em;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@@ -239,22 +239,6 @@ Code is the heart of every software project. We strive to make it better. Who if
|
|||||||
|
|
||||||
The core of Mermaid is located under `packages/mermaid/src`.
|
The core of Mermaid is located under `packages/mermaid/src`.
|
||||||
|
|
||||||
### Building Mermaid Locally
|
|
||||||
|
|
||||||
**Host**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pnpm run build
|
|
||||||
```
|
|
||||||
|
|
||||||
**Docker**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
./run build
|
|
||||||
```
|
|
||||||
|
|
||||||
This will build the Mermaid library and the documentation site.
|
|
||||||
|
|
||||||
### Running Mermaid Locally
|
### Running Mermaid Locally
|
||||||
|
|
||||||
**Host**
|
**Host**
|
||||||
@@ -497,14 +481,14 @@ This is a danger alert
|
|||||||
|
|
||||||
### Navigation
|
### Navigation
|
||||||
|
|
||||||
If you want to propose changes to how the documentation is _organized_, such as adding a new section or re-arranging or renaming a section, you must update the **sidebar navigation**, which is defined in [the vitepress config](../.vitepress/config.ts). The same goes for **topbar**.
|
If you want to propose changes to how the documentation is _organized_, such as adding a new section or re-arranging or renaming a section, you must update the **sidebar navigation**, which is defined in [the vitepress config](../.vitepress/config.ts). The same goes to **topbar**.
|
||||||
|
|
||||||
### Build Docs
|
### Build Docs
|
||||||
|
|
||||||
The content of `/docs` folder is built with GitHub Actions.
|
The content of `/docs` folder is built with Github Actions.
|
||||||
|
|
||||||
> **Warning**
|
> **Warning**
|
||||||
> So as to allow automatic compilation of documentation pages you have to enable GitHub Actions on your fork first
|
> So as to allow automatic compilation of documentation pages you have to enable Github Actions on your fork first
|
||||||
|
|
||||||
## Submit your pull request
|
## Submit your pull request
|
||||||
|
|
||||||
|
@@ -251,12 +251,12 @@ Here is the HTML generated for the SVG element: _(Note that some of the SVG attr
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
##### GitGraph
|
##### Gitgraph
|
||||||
|
|
||||||
```mermaid-example
|
```mermaid-example
|
||||||
gitGraph
|
gitGraph
|
||||||
accTitle: My GitGraph Accessibility Title
|
accTitle: My Gitgraph Accessibility Title
|
||||||
accDescr: My GitGraph Accessibility Description
|
accDescr: My Gitgraph Accessibility Description
|
||||||
|
|
||||||
commit
|
commit
|
||||||
commit
|
commit
|
||||||
@@ -273,8 +273,8 @@ Here is the HTML generated for the SVG element: _(Note that some of the SVG attr
|
|||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
gitGraph
|
gitGraph
|
||||||
accTitle: My GitGraph Accessibility Title
|
accTitle: My Gitgraph Accessibility Title
|
||||||
accDescr: My GitGraph Accessibility Description
|
accDescr: My Gitgraph Accessibility Description
|
||||||
|
|
||||||
commit
|
commit
|
||||||
commit
|
commit
|
||||||
|
@@ -4,14 +4,12 @@
|
|||||||
>
|
>
|
||||||
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/README.md](../../../packages/mermaid/src/docs/config/setup/README.md).
|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/README.md](../../../packages/mermaid/src/docs/config/setup/README.md).
|
||||||
|
|
||||||
**mermaid**
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# mermaid
|
# mermaid
|
||||||
|
|
||||||
## Modules
|
## Table of contents
|
||||||
|
|
||||||
- [config](config/README.md)
|
### Modules
|
||||||
- [defaultConfig](defaultConfig/README.md)
|
|
||||||
- [mermaid](mermaid/README.md)
|
- [config](modules/config.md)
|
||||||
|
- [defaultConfig](modules/defaultConfig.md)
|
||||||
|
- [mermaid](modules/mermaid.md)
|
||||||
|
190
docs/config/setup/classes/mermaid.UnknownDiagramError.md
Normal file
190
docs/config/setup/classes/mermaid.UnknownDiagramError.md
Normal file
@@ -0,0 +1,190 @@
|
|||||||
|
> **Warning**
|
||||||
|
>
|
||||||
|
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
||||||
|
>
|
||||||
|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/classes/mermaid.UnknownDiagramError.md](../../../../packages/mermaid/src/docs/config/setup/classes/mermaid.UnknownDiagramError.md).
|
||||||
|
|
||||||
|
# Class: UnknownDiagramError
|
||||||
|
|
||||||
|
[mermaid](../modules/mermaid.md).UnknownDiagramError
|
||||||
|
|
||||||
|
## Hierarchy
|
||||||
|
|
||||||
|
- `Error`
|
||||||
|
|
||||||
|
↳ **`UnknownDiagramError`**
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
### Constructors
|
||||||
|
|
||||||
|
- [constructor](mermaid.UnknownDiagramError.md#constructor)
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
- [cause](mermaid.UnknownDiagramError.md#cause)
|
||||||
|
- [message](mermaid.UnknownDiagramError.md#message)
|
||||||
|
- [name](mermaid.UnknownDiagramError.md#name)
|
||||||
|
- [stack](mermaid.UnknownDiagramError.md#stack)
|
||||||
|
- [prepareStackTrace](mermaid.UnknownDiagramError.md#preparestacktrace)
|
||||||
|
- [stackTraceLimit](mermaid.UnknownDiagramError.md#stacktracelimit)
|
||||||
|
|
||||||
|
### Methods
|
||||||
|
|
||||||
|
- [captureStackTrace](mermaid.UnknownDiagramError.md#capturestacktrace)
|
||||||
|
|
||||||
|
## Constructors
|
||||||
|
|
||||||
|
### constructor
|
||||||
|
|
||||||
|
• **new UnknownDiagramError**(`message`): [`UnknownDiagramError`](mermaid.UnknownDiagramError.md)
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type |
|
||||||
|
| :-------- | :------- |
|
||||||
|
| `message` | `string` |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
[`UnknownDiagramError`](mermaid.UnknownDiagramError.md)
|
||||||
|
|
||||||
|
#### Overrides
|
||||||
|
|
||||||
|
Error.constructor
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/errors.ts:2](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/errors.ts#L2)
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### cause
|
||||||
|
|
||||||
|
• `Optional` **cause**: `unknown`
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
Error.cause
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
node_modules/.pnpm/typescript\@5.4.5/node_modules/typescript/lib/lib.es2022.error.d.ts:24
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### message
|
||||||
|
|
||||||
|
• **message**: `string`
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
Error.message
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
node_modules/.pnpm/typescript\@5.4.5/node_modules/typescript/lib/lib.es5.d.ts:1077
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### name
|
||||||
|
|
||||||
|
• **name**: `string`
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
Error.name
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
node_modules/.pnpm/typescript\@5.4.5/node_modules/typescript/lib/lib.es5.d.ts:1076
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### stack
|
||||||
|
|
||||||
|
• `Optional` **stack**: `string`
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
Error.stack
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
node_modules/.pnpm/typescript\@5.4.5/node_modules/typescript/lib/lib.es5.d.ts:1078
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### prepareStackTrace
|
||||||
|
|
||||||
|
▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`\[]) => `any`
|
||||||
|
|
||||||
|
Optional override for formatting stack traces
|
||||||
|
|
||||||
|
**`See`**
|
||||||
|
|
||||||
|
<https://v8.dev/docs/stack-trace-api#customizing-stack-traces>
|
||||||
|
|
||||||
|
#### Type declaration
|
||||||
|
|
||||||
|
▸ (`err`, `stackTraces`): `any`
|
||||||
|
|
||||||
|
##### Parameters
|
||||||
|
|
||||||
|
| Name | Type |
|
||||||
|
| :------------ | :------------ |
|
||||||
|
| `err` | `Error` |
|
||||||
|
| `stackTraces` | `CallSite`\[] |
|
||||||
|
|
||||||
|
##### Returns
|
||||||
|
|
||||||
|
`any`
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
Error.prepareStackTrace
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
node_modules/.pnpm/@types+node\@22.13.5/node_modules/@types/node/globals.d.ts:143
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### stackTraceLimit
|
||||||
|
|
||||||
|
▪ `Static` **stackTraceLimit**: `number`
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
Error.stackTraceLimit
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
node_modules/.pnpm/@types+node\@22.13.5/node_modules/@types/node/globals.d.ts:145
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### captureStackTrace
|
||||||
|
|
||||||
|
▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
||||||
|
|
||||||
|
Create .stack property on a target object
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type |
|
||||||
|
| :---------------- | :--------- |
|
||||||
|
| `targetObject` | `object` |
|
||||||
|
| `constructorOpt?` | `Function` |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`void`
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
Error.captureStackTrace
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
node_modules/.pnpm/@types+node\@22.13.5/node_modules/@types/node/globals.d.ts:136
|
@@ -1,28 +0,0 @@
|
|||||||
> **Warning**
|
|
||||||
>
|
|
||||||
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
|
||||||
>
|
|
||||||
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/config/README.md](../../../../packages/mermaid/src/docs/config/setup/config/README.md).
|
|
||||||
|
|
||||||
[**mermaid**](../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# config
|
|
||||||
|
|
||||||
## Variables
|
|
||||||
|
|
||||||
- [defaultConfig](variables/defaultConfig.md)
|
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
- [addDirective](functions/addDirective.md)
|
|
||||||
- [getConfig](functions/getConfig.md)
|
|
||||||
- [getSiteConfig](functions/getSiteConfig.md)
|
|
||||||
- [reset](functions/reset.md)
|
|
||||||
- [sanitize](functions/sanitize.md)
|
|
||||||
- [saveConfigFromInitialize](functions/saveConfigFromInitialize.md)
|
|
||||||
- [setConfig](functions/setConfig.md)
|
|
||||||
- [setSiteConfig](functions/setSiteConfig.md)
|
|
||||||
- [updateCurrentConfig](functions/updateCurrentConfig.md)
|
|
||||||
- [updateSiteConfig](functions/updateSiteConfig.md)
|
|
@@ -1,29 +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/addDirective.md](../../../../../packages/mermaid/src/docs/config/setup/config/functions/addDirective.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Function: addDirective()
|
|
||||||
|
|
||||||
> **addDirective**(`directive`): `void`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.ts:188](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L188)
|
|
||||||
|
|
||||||
Pushes in a directive to the configuration
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
### directive
|
|
||||||
|
|
||||||
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
The directive to push in
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
|
|
||||||
`void`
|
|
@@ -1,29 +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/getConfig.md](../../../../../packages/mermaid/src/docs/config/setup/config/functions/getConfig.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Function: getConfig()
|
|
||||||
|
|
||||||
> **getConfig**(): [`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.ts:131](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L131)
|
|
||||||
|
|
||||||
## getConfig
|
|
||||||
|
|
||||||
| Function | Description | Type | Return Values |
|
|
||||||
| --------- | ------------------------- | ----------- | ------------------------------ |
|
|
||||||
| getConfig | Obtains the currentConfig | Get Request | Any Values from current Config |
|
|
||||||
|
|
||||||
**Notes**: Avoid calling this function repeatedly. Instead, store the result in a variable and use it, and pass it down to function calls.
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
|
|
||||||
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
The currentConfig
|
|
@@ -1,29 +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/getSiteConfig.md](../../../../../packages/mermaid/src/docs/config/setup/config/functions/getSiteConfig.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Function: getSiteConfig()
|
|
||||||
|
|
||||||
> **getSiteConfig**(): [`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.ts:96](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L96)
|
|
||||||
|
|
||||||
## getSiteConfig
|
|
||||||
|
|
||||||
| Function | Description | Type | Values |
|
|
||||||
| ------------- | ------------------------------------------------- | ----------- | -------------------------------- |
|
|
||||||
| setSiteConfig | Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig |
|
|
||||||
|
|
||||||
**Notes**: Returns **any** values in siteConfig.
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
|
|
||||||
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
The siteConfig
|
|
@@ -1,42 +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/reset.md](../../../../../packages/mermaid/src/docs/config/setup/config/functions/reset.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Function: reset()
|
|
||||||
|
|
||||||
> **reset**(`config`): `void`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.ts:221](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L221)
|
|
||||||
|
|
||||||
## reset
|
|
||||||
|
|
||||||
| Function | Description | Type | Required | Values |
|
|
||||||
| -------- | ---------------------------- | ----------- | -------- | ------ |
|
|
||||||
| reset | Resets currentConfig to conf | Put Request | Required | None |
|
|
||||||
|
|
||||||
## conf
|
|
||||||
|
|
||||||
| Parameter | Description | Type | Required | Values |
|
|
||||||
| --------- | -------------------------------------------------------------- | ---------- | -------- | -------------------------------------------- |
|
|
||||||
| conf | base set of values, which currentConfig could be **reset** to. | Dictionary | Required | Any Values, with respect to the secure Array |
|
|
||||||
|
|
||||||
**Notes**: (default: current siteConfig ) (optional, default `getSiteConfig()`)
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
### config
|
|
||||||
|
|
||||||
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md) = `siteConfig`
|
|
||||||
|
|
||||||
base set of values, which currentConfig could be **reset** to.
|
|
||||||
Defaults to the current siteConfig (e.g returned by [getSiteConfig](getSiteConfig.md)).
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
|
|
||||||
`void`
|
|
@@ -1,36 +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/sanitize.md](../../../../../packages/mermaid/src/docs/config/setup/config/functions/sanitize.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Function: sanitize()
|
|
||||||
|
|
||||||
> **sanitize**(`options`): `void`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.ts:146](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L146)
|
|
||||||
|
|
||||||
## sanitize
|
|
||||||
|
|
||||||
| Function | Description | Type | Values |
|
|
||||||
| -------- | -------------------------------------- | ----------- | ------ |
|
|
||||||
| sanitize | Sets the siteConfig to desired values. | Put Request | None |
|
|
||||||
|
|
||||||
Ensures options parameter does not attempt to override siteConfig secure keys **Notes**: modifies
|
|
||||||
options in-place
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
### options
|
|
||||||
|
|
||||||
`any`
|
|
||||||
|
|
||||||
The potential setConfig parameter
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
|
|
||||||
`void`
|
|
@@ -1,25 +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/saveConfigFromInitialize.md](../../../../../packages/mermaid/src/docs/config/setup/config/functions/saveConfigFromInitialize.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Function: saveConfigFromInitialize()
|
|
||||||
|
|
||||||
> **saveConfigFromInitialize**(`conf`): `void`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.ts:75](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L75)
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
### conf
|
|
||||||
|
|
||||||
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
|
|
||||||
`void`
|
|
@@ -1,39 +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/setConfig.md](../../../../../packages/mermaid/src/docs/config/setup/config/functions/setConfig.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Function: setConfig()
|
|
||||||
|
|
||||||
> **setConfig**(`conf`): [`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.ts:113](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L113)
|
|
||||||
|
|
||||||
## setConfig
|
|
||||||
|
|
||||||
| Function | Description | Type | Values |
|
|
||||||
| ------------- | ------------------------------------- | ----------- | --------------------------------------- |
|
|
||||||
| setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |
|
|
||||||
|
|
||||||
**Notes**: Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure
|
|
||||||
keys. Any values found in conf with key found in siteConfig.secure will be replaced with the
|
|
||||||
corresponding siteConfig value.
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
### conf
|
|
||||||
|
|
||||||
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
The potential currentConfig
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
|
|
||||||
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
The currentConfig merged with the sanitized conf
|
|
@@ -1,40 +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/setSiteConfig.md](../../../../../packages/mermaid/src/docs/config/setup/config/functions/setSiteConfig.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Function: setSiteConfig()
|
|
||||||
|
|
||||||
> **setSiteConfig**(`conf`): [`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.ts:61](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L61)
|
|
||||||
|
|
||||||
## setSiteConfig
|
|
||||||
|
|
||||||
| Function | Description | Type | Values |
|
|
||||||
| ------------- | ------------------------------------- | ----------- | --------------------------------------- |
|
|
||||||
| setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |
|
|
||||||
|
|
||||||
**Notes:** Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls
|
|
||||||
to reset() will reset the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig)
|
|
||||||
will reset siteConfig and currentConfig to the defaultConfig Note: currentConfig is set in this
|
|
||||||
function _Default value: At default, will mirror Global Config_
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
### conf
|
|
||||||
|
|
||||||
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
The base currentConfig to use as siteConfig
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
|
|
||||||
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
The new siteConfig
|
|
@@ -1,29 +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/updateCurrentConfig.md](../../../../../packages/mermaid/src/docs/config/setup/config/functions/updateCurrentConfig.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Function: updateCurrentConfig()
|
|
||||||
|
|
||||||
> **updateCurrentConfig**(`siteCfg`, `_directives`): [`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.ts:15](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L15)
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
### siteCfg
|
|
||||||
|
|
||||||
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
### \_directives
|
|
||||||
|
|
||||||
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)\[]
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
|
|
||||||
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
@@ -1,25 +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/updateSiteConfig.md](../../../../../packages/mermaid/src/docs/config/setup/config/functions/updateSiteConfig.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Function: updateSiteConfig()
|
|
||||||
|
|
||||||
> **updateSiteConfig**(`conf`): [`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.ts:79](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L79)
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
### conf
|
|
||||||
|
|
||||||
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
|
|
||||||
[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
@@ -1,15 +0,0 @@
|
|||||||
> **Warning**
|
|
||||||
>
|
|
||||||
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
|
||||||
>
|
|
||||||
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/config/variables/defaultConfig.md](../../../../../packages/mermaid/src/docs/config/setup/config/variables/defaultConfig.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Variable: defaultConfig
|
|
||||||
|
|
||||||
> `const` **defaultConfig**: [`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.ts:8](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L8)
|
|
@@ -1,16 +0,0 @@
|
|||||||
> **Warning**
|
|
||||||
>
|
|
||||||
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
|
||||||
>
|
|
||||||
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/defaultConfig/README.md](../../../../packages/mermaid/src/docs/config/setup/defaultConfig/README.md).
|
|
||||||
|
|
||||||
[**mermaid**](../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# defaultConfig
|
|
||||||
|
|
||||||
## Variables
|
|
||||||
|
|
||||||
- [configKeys](variables/configKeys.md)
|
|
||||||
- [default](variables/default.md)
|
|
@@ -1,15 +0,0 @@
|
|||||||
> **Warning**
|
|
||||||
>
|
|
||||||
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
|
||||||
>
|
|
||||||
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/defaultConfig/variables/configKeys.md](../../../../../packages/mermaid/src/docs/config/setup/defaultConfig/variables/configKeys.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Variable: configKeys
|
|
||||||
|
|
||||||
> `const` **configKeys**: `Set`<`string`>
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/defaultConfig.ts:274](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/defaultConfig.ts#L274)
|
|
@@ -1,21 +0,0 @@
|
|||||||
> **Warning**
|
|
||||||
>
|
|
||||||
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
|
||||||
>
|
|
||||||
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/defaultConfig/variables/default.md](../../../../../packages/mermaid/src/docs/config/setup/defaultConfig/variables/default.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Variable: default
|
|
||||||
|
|
||||||
> `const` **default**: `RequiredDeep`<[`MermaidConfig`](../../mermaid/interfaces/MermaidConfig.md)>
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/defaultConfig.ts:18](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/defaultConfig.ts#L18)
|
|
||||||
|
|
||||||
Default mermaid configuration options.
|
|
||||||
|
|
||||||
Please see the Mermaid config JSON Schema for the default JSON values.
|
|
||||||
Non-JSON JS default values are listed in this file, e.g. functions, or
|
|
||||||
`undefined` (explicitly set so that `configKeys` finds them).
|
|
58
docs/config/setup/interfaces/mermaid.DetailedError.md
Normal file
58
docs/config/setup/interfaces/mermaid.DetailedError.md
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
> **Warning**
|
||||||
|
>
|
||||||
|
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
||||||
|
>
|
||||||
|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/interfaces/mermaid.DetailedError.md](../../../../packages/mermaid/src/docs/config/setup/interfaces/mermaid.DetailedError.md).
|
||||||
|
|
||||||
|
# Interface: DetailedError
|
||||||
|
|
||||||
|
[mermaid](../modules/mermaid.md).DetailedError
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
- [error](mermaid.DetailedError.md#error)
|
||||||
|
- [hash](mermaid.DetailedError.md#hash)
|
||||||
|
- [message](mermaid.DetailedError.md#message)
|
||||||
|
- [str](mermaid.DetailedError.md#str)
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### error
|
||||||
|
|
||||||
|
• `Optional` **error**: `any`
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/utils.ts:788](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/utils.ts#L788)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### hash
|
||||||
|
|
||||||
|
• **hash**: `any`
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/utils.ts:786](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/utils.ts#L786)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### message
|
||||||
|
|
||||||
|
• `Optional` **message**: `string`
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/utils.ts:789](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/utils.ts#L789)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### str
|
||||||
|
|
||||||
|
• **str**: `string`
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/utils.ts:784](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/utils.ts#L784)
|
@@ -0,0 +1,47 @@
|
|||||||
|
> **Warning**
|
||||||
|
>
|
||||||
|
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
||||||
|
>
|
||||||
|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/interfaces/mermaid.ExternalDiagramDefinition.md](../../../../packages/mermaid/src/docs/config/setup/interfaces/mermaid.ExternalDiagramDefinition.md).
|
||||||
|
|
||||||
|
# Interface: ExternalDiagramDefinition
|
||||||
|
|
||||||
|
[mermaid](../modules/mermaid.md).ExternalDiagramDefinition
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
- [detector](mermaid.ExternalDiagramDefinition.md#detector)
|
||||||
|
- [id](mermaid.ExternalDiagramDefinition.md#id)
|
||||||
|
- [loader](mermaid.ExternalDiagramDefinition.md#loader)
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### detector
|
||||||
|
|
||||||
|
• **detector**: `DiagramDetector`
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/diagram-api/types.ts:101](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L101)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### id
|
||||||
|
|
||||||
|
• **id**: `string`
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/diagram-api/types.ts:100](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L100)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### loader
|
||||||
|
|
||||||
|
• **loader**: `DiagramLoader`
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/diagram-api/types.ts:102](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L102)
|
51
docs/config/setup/interfaces/mermaid.LayoutData.md
Normal file
51
docs/config/setup/interfaces/mermaid.LayoutData.md
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
> **Warning**
|
||||||
|
>
|
||||||
|
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
||||||
|
>
|
||||||
|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/interfaces/mermaid.LayoutData.md](../../../../packages/mermaid/src/docs/config/setup/interfaces/mermaid.LayoutData.md).
|
||||||
|
|
||||||
|
# Interface: LayoutData
|
||||||
|
|
||||||
|
[mermaid](../modules/mermaid.md).LayoutData
|
||||||
|
|
||||||
|
## Indexable
|
||||||
|
|
||||||
|
▪ \[key: `string`]: `any`
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
- [config](mermaid.LayoutData.md#config)
|
||||||
|
- [edges](mermaid.LayoutData.md#edges)
|
||||||
|
- [nodes](mermaid.LayoutData.md#nodes)
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### config
|
||||||
|
|
||||||
|
• **config**: [`MermaidConfig`](mermaid.MermaidConfig.md)
|
||||||
|
|
||||||
|
#### 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)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### edges
|
||||||
|
|
||||||
|
• **edges**: `Edge`\[]
|
||||||
|
|
||||||
|
#### 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)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### nodes
|
||||||
|
|
||||||
|
• **nodes**: `Node`\[]
|
||||||
|
|
||||||
|
#### 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)
|
@@ -0,0 +1,47 @@
|
|||||||
|
> **Warning**
|
||||||
|
>
|
||||||
|
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
||||||
|
>
|
||||||
|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/interfaces/mermaid.LayoutLoaderDefinition.md](../../../../packages/mermaid/src/docs/config/setup/interfaces/mermaid.LayoutLoaderDefinition.md).
|
||||||
|
|
||||||
|
# Interface: LayoutLoaderDefinition
|
||||||
|
|
||||||
|
[mermaid](../modules/mermaid.md).LayoutLoaderDefinition
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
- [algorithm](mermaid.LayoutLoaderDefinition.md#algorithm)
|
||||||
|
- [loader](mermaid.LayoutLoaderDefinition.md#loader)
|
||||||
|
- [name](mermaid.LayoutLoaderDefinition.md#name)
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### algorithm
|
||||||
|
|
||||||
|
• `Optional` **algorithm**: `string`
|
||||||
|
|
||||||
|
#### 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)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### loader
|
||||||
|
|
||||||
|
• **loader**: `LayoutLoader`
|
||||||
|
|
||||||
|
#### 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)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### name
|
||||||
|
|
||||||
|
• **name**: `string`
|
||||||
|
|
||||||
|
#### 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)
|
28
docs/config/setup/interfaces/mermaid.ParseOptions.md
Normal file
28
docs/config/setup/interfaces/mermaid.ParseOptions.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
> **Warning**
|
||||||
|
>
|
||||||
|
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
||||||
|
>
|
||||||
|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/interfaces/mermaid.ParseOptions.md](../../../../packages/mermaid/src/docs/config/setup/interfaces/mermaid.ParseOptions.md).
|
||||||
|
|
||||||
|
# Interface: ParseOptions
|
||||||
|
|
||||||
|
[mermaid](../modules/mermaid.md).ParseOptions
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
- [suppressErrors](mermaid.ParseOptions.md#suppresserrors)
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### suppressErrors
|
||||||
|
|
||||||
|
• `Optional` **suppressErrors**: `boolean`
|
||||||
|
|
||||||
|
If `true`, parse will return `false` instead of throwing error when the diagram is invalid.
|
||||||
|
The `parseError` function will not be called.
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/types.ts:64](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L64)
|
40
docs/config/setup/interfaces/mermaid.ParseResult.md
Normal file
40
docs/config/setup/interfaces/mermaid.ParseResult.md
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
> **Warning**
|
||||||
|
>
|
||||||
|
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
||||||
|
>
|
||||||
|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/interfaces/mermaid.ParseResult.md](../../../../packages/mermaid/src/docs/config/setup/interfaces/mermaid.ParseResult.md).
|
||||||
|
|
||||||
|
# Interface: ParseResult
|
||||||
|
|
||||||
|
[mermaid](../modules/mermaid.md).ParseResult
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
- [config](mermaid.ParseResult.md#config)
|
||||||
|
- [diagramType](mermaid.ParseResult.md#diagramtype)
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### config
|
||||||
|
|
||||||
|
• **config**: [`MermaidConfig`](mermaid.MermaidConfig.md)
|
||||||
|
|
||||||
|
The config passed as YAML frontmatter or directives
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/types.ts:75](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L75)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### diagramType
|
||||||
|
|
||||||
|
• **diagramType**: `string`
|
||||||
|
|
||||||
|
The diagram type, e.g. 'flowchart', 'sequence', etc.
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/types.ts:71](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L71)
|
25
docs/config/setup/interfaces/mermaid.RenderOptions.md
Normal file
25
docs/config/setup/interfaces/mermaid.RenderOptions.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
> **Warning**
|
||||||
|
>
|
||||||
|
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
||||||
|
>
|
||||||
|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/interfaces/mermaid.RenderOptions.md](../../../../packages/mermaid/src/docs/config/setup/interfaces/mermaid.RenderOptions.md).
|
||||||
|
|
||||||
|
# Interface: RenderOptions
|
||||||
|
|
||||||
|
[mermaid](../modules/mermaid.md).RenderOptions
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
- [algorithm](mermaid.RenderOptions.md#algorithm)
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### algorithm
|
||||||
|
|
||||||
|
• `Optional` **algorithm**: `string`
|
||||||
|
|
||||||
|
#### 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)
|
74
docs/config/setup/interfaces/mermaid.RenderResult.md
Normal file
74
docs/config/setup/interfaces/mermaid.RenderResult.md
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
> **Warning**
|
||||||
|
>
|
||||||
|
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
||||||
|
>
|
||||||
|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/interfaces/mermaid.RenderResult.md](../../../../packages/mermaid/src/docs/config/setup/interfaces/mermaid.RenderResult.md).
|
||||||
|
|
||||||
|
# Interface: RenderResult
|
||||||
|
|
||||||
|
[mermaid](../modules/mermaid.md).RenderResult
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
- [bindFunctions](mermaid.RenderResult.md#bindfunctions)
|
||||||
|
- [diagramType](mermaid.RenderResult.md#diagramtype)
|
||||||
|
- [svg](mermaid.RenderResult.md#svg)
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### bindFunctions
|
||||||
|
|
||||||
|
• `Optional` **bindFunctions**: (`element`: `Element`) => `void`
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
```js
|
||||||
|
const { svg, bindFunctions } = await mermaid.render('id1', 'graph TD;A-->B');
|
||||||
|
div.innerHTML = svg;
|
||||||
|
bindFunctions?.(div); // To call bindFunctions only if it's present.
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Type declaration
|
||||||
|
|
||||||
|
▸ (`element`): `void`
|
||||||
|
|
||||||
|
##### Parameters
|
||||||
|
|
||||||
|
| Name | Type |
|
||||||
|
| :-------- | :-------- |
|
||||||
|
| `element` | `Element` |
|
||||||
|
|
||||||
|
##### Returns
|
||||||
|
|
||||||
|
`void`
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/types.ts:103](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L103)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### diagramType
|
||||||
|
|
||||||
|
• **diagramType**: `string`
|
||||||
|
|
||||||
|
The diagram type, e.g. 'flowchart', 'sequence', etc.
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/types.ts:93](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L93)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### svg
|
||||||
|
|
||||||
|
• **svg**: `string`
|
||||||
|
|
||||||
|
The svg code for the rendered graph.
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/types.ts:89](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L89)
|
80
docs/config/setup/interfaces/mermaid.RunOptions.md
Normal file
80
docs/config/setup/interfaces/mermaid.RunOptions.md
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
> **Warning**
|
||||||
|
>
|
||||||
|
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
||||||
|
>
|
||||||
|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/interfaces/mermaid.RunOptions.md](../../../../packages/mermaid/src/docs/config/setup/interfaces/mermaid.RunOptions.md).
|
||||||
|
|
||||||
|
# Interface: RunOptions
|
||||||
|
|
||||||
|
[mermaid](../modules/mermaid.md).RunOptions
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
- [nodes](mermaid.RunOptions.md#nodes)
|
||||||
|
- [postRenderCallback](mermaid.RunOptions.md#postrendercallback)
|
||||||
|
- [querySelector](mermaid.RunOptions.md#queryselector)
|
||||||
|
- [suppressErrors](mermaid.RunOptions.md#suppresserrors)
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### nodes
|
||||||
|
|
||||||
|
• `Optional` **nodes**: `ArrayLike`<`HTMLElement`>
|
||||||
|
|
||||||
|
The nodes to render. If this is set, `querySelector` will be ignored.
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/mermaid.ts:49](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L49)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### postRenderCallback
|
||||||
|
|
||||||
|
• `Optional` **postRenderCallback**: (`id`: `string`) => `unknown`
|
||||||
|
|
||||||
|
A callback to call after each diagram is rendered.
|
||||||
|
|
||||||
|
#### Type declaration
|
||||||
|
|
||||||
|
▸ (`id`): `unknown`
|
||||||
|
|
||||||
|
##### Parameters
|
||||||
|
|
||||||
|
| Name | Type |
|
||||||
|
| :--- | :------- |
|
||||||
|
| `id` | `string` |
|
||||||
|
|
||||||
|
##### Returns
|
||||||
|
|
||||||
|
`unknown`
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/mermaid.ts:53](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L53)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### querySelector
|
||||||
|
|
||||||
|
• `Optional` **querySelector**: `string`
|
||||||
|
|
||||||
|
The query selector to use when finding elements to render. Default: `".mermaid"`.
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/mermaid.ts:45](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L45)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### suppressErrors
|
||||||
|
|
||||||
|
• `Optional` **suppressErrors**: `boolean`
|
||||||
|
|
||||||
|
If `true`, errors will be logged to the console, but not thrown. Default: `false`
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[packages/mermaid/src/mermaid.ts:57](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L57)
|
@@ -1,40 +0,0 @@
|
|||||||
> **Warning**
|
|
||||||
>
|
|
||||||
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
|
||||||
>
|
|
||||||
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/mermaid/README.md](../../../../packages/mermaid/src/docs/config/setup/mermaid/README.md).
|
|
||||||
|
|
||||||
[**mermaid**](../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# mermaid
|
|
||||||
|
|
||||||
## Classes
|
|
||||||
|
|
||||||
- [UnknownDiagramError](classes/UnknownDiagramError.md)
|
|
||||||
|
|
||||||
## Interfaces
|
|
||||||
|
|
||||||
- [DetailedError](interfaces/DetailedError.md)
|
|
||||||
- [ExternalDiagramDefinition](interfaces/ExternalDiagramDefinition.md)
|
|
||||||
- [LayoutData](interfaces/LayoutData.md)
|
|
||||||
- [LayoutLoaderDefinition](interfaces/LayoutLoaderDefinition.md)
|
|
||||||
- [Mermaid](interfaces/Mermaid.md)
|
|
||||||
- [MermaidConfig](interfaces/MermaidConfig.md)
|
|
||||||
- [ParseOptions](interfaces/ParseOptions.md)
|
|
||||||
- [ParseResult](interfaces/ParseResult.md)
|
|
||||||
- [RenderOptions](interfaces/RenderOptions.md)
|
|
||||||
- [RenderResult](interfaces/RenderResult.md)
|
|
||||||
- [RunOptions](interfaces/RunOptions.md)
|
|
||||||
|
|
||||||
## Type Aliases
|
|
||||||
|
|
||||||
- [InternalHelpers](type-aliases/InternalHelpers.md)
|
|
||||||
- [ParseErrorFunction](type-aliases/ParseErrorFunction.md)
|
|
||||||
- [SVG](type-aliases/SVG.md)
|
|
||||||
- [SVGGroup](type-aliases/SVGGroup.md)
|
|
||||||
|
|
||||||
## Variables
|
|
||||||
|
|
||||||
- [default](variables/default.md)
|
|
@@ -1,159 +0,0 @@
|
|||||||
> **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`
|
|
@@ -1,45 +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/DetailedError.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/interfaces/DetailedError.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Interface: DetailedError
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/utils.ts:783](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/utils.ts#L783)
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
### error?
|
|
||||||
|
|
||||||
> `optional` **error**: `any`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/utils.ts:788](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/utils.ts#L788)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### hash
|
|
||||||
|
|
||||||
> **hash**: `any`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/utils.ts:786](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/utils.ts#L786)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### message?
|
|
||||||
|
|
||||||
> `optional` **message**: `string`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/utils.ts:789](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/utils.ts#L789)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### str
|
|
||||||
|
|
||||||
> **str**: `string`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/utils.ts:784](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/utils.ts#L784)
|
|
@@ -1,37 +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/ExternalDiagramDefinition.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/interfaces/ExternalDiagramDefinition.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Interface: ExternalDiagramDefinition
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
### detector
|
|
||||||
|
|
||||||
> **detector**: `DiagramDetector`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/diagram-api/types.ts:101](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L101)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### id
|
|
||||||
|
|
||||||
> **id**: `string`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/diagram-api/types.ts:100](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L100)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### loader
|
|
||||||
|
|
||||||
> **loader**: `DiagramLoader`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/diagram-api/types.ts:102](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L102)
|
|
@@ -1,41 +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/LayoutData.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/interfaces/LayoutData.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Interface: LayoutData
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
\[`key`: `string`]: `any`
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
### config
|
|
||||||
|
|
||||||
> **config**: [`MermaidConfig`](MermaidConfig.md)
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### edges
|
|
||||||
|
|
||||||
> **edges**: `Edge`\[]
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### nodes
|
|
||||||
|
|
||||||
> **nodes**: `Node`\[]
|
|
||||||
|
|
||||||
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)
|
|
@@ -1,37 +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/LayoutLoaderDefinition.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/interfaces/LayoutLoaderDefinition.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Interface: LayoutLoaderDefinition
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
### algorithm?
|
|
||||||
|
|
||||||
> `optional` **algorithm**: `string`
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### loader
|
|
||||||
|
|
||||||
> **loader**: `LayoutLoader`
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### name
|
|
||||||
|
|
||||||
> **name**: `string`
|
|
||||||
|
|
||||||
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)
|
|
@@ -1,427 +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/Mermaid.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/interfaces/Mermaid.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Interface: Mermaid
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:418](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L418)
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
### contentLoaded()
|
|
||||||
|
|
||||||
> **contentLoaded**: () => `void`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:436](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L436)
|
|
||||||
|
|
||||||
\##contentLoaded Callback function that is called when page is loaded. This functions fetches
|
|
||||||
configuration for mermaid rendering and calls init for rendering the mermaid diagrams on the
|
|
||||||
page.
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`void`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### detectType()
|
|
||||||
|
|
||||||
> **detectType**: (`text`, `config`?) => `string`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:438](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L438)
|
|
||||||
|
|
||||||
Detects the type of the graph text.
|
|
||||||
|
|
||||||
Takes into consideration the possible existence of an `%%init` directive
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### text
|
|
||||||
|
|
||||||
`string`
|
|
||||||
|
|
||||||
The text defining the graph. For example:
|
|
||||||
|
|
||||||
```mermaid-example
|
|
||||||
%%{initialize: {"startOnLoad": true, logLevel: "fatal" }}%%
|
|
||||||
graph LR
|
|
||||||
a-->b
|
|
||||||
b-->c
|
|
||||||
c-->d
|
|
||||||
d-->e
|
|
||||||
e-->f
|
|
||||||
f-->g
|
|
||||||
g-->h
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
%%{initialize: {"startOnLoad": true, logLevel: "fatal" }}%%
|
|
||||||
graph LR
|
|
||||||
a-->b
|
|
||||||
b-->c
|
|
||||||
c-->d
|
|
||||||
d-->e
|
|
||||||
e-->f
|
|
||||||
f-->g
|
|
||||||
g-->h
|
|
||||||
```
|
|
||||||
|
|
||||||
##### config?
|
|
||||||
|
|
||||||
[`MermaidConfig`](MermaidConfig.md)
|
|
||||||
|
|
||||||
The mermaid config.
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`string`
|
|
||||||
|
|
||||||
A graph definition key
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### ~~init()~~
|
|
||||||
|
|
||||||
> **init**: (`config`?, `nodes`?, `callback`?) => `Promise`<`void`>
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:431](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L431)
|
|
||||||
|
|
||||||
## init
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### config?
|
|
||||||
|
|
||||||
[`MermaidConfig`](MermaidConfig.md)
|
|
||||||
|
|
||||||
**Deprecated**, please set configuration in [initialize](Mermaid.md#initialize).
|
|
||||||
|
|
||||||
##### nodes?
|
|
||||||
|
|
||||||
**Default**: `.mermaid`. One of the following:
|
|
||||||
|
|
||||||
- A DOM Node
|
|
||||||
- An array of DOM nodes (as would come from a jQuery selector)
|
|
||||||
- A W3C selector, a la `.mermaid`
|
|
||||||
|
|
||||||
`string` | `HTMLElement` | `NodeListOf`<`HTMLElement`>
|
|
||||||
|
|
||||||
##### callback?
|
|
||||||
|
|
||||||
(`id`) => `unknown`
|
|
||||||
|
|
||||||
Called once for each rendered diagram's id.
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`Promise`<`void`>
|
|
||||||
|
|
||||||
#### Deprecated
|
|
||||||
|
|
||||||
Use [initialize](Mermaid.md#initialize) and [run](Mermaid.md#run) instead.
|
|
||||||
|
|
||||||
Renders the mermaid diagrams
|
|
||||||
|
|
||||||
#### Deprecated
|
|
||||||
|
|
||||||
Use [initialize](Mermaid.md#initialize) and [run](Mermaid.md#run) instead.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### initialize()
|
|
||||||
|
|
||||||
> **initialize**: (`config`) => `void`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:435](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L435)
|
|
||||||
|
|
||||||
Used to set configurations for mermaid.
|
|
||||||
This function should be called before the run function.
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### config
|
|
||||||
|
|
||||||
[`MermaidConfig`](MermaidConfig.md)
|
|
||||||
|
|
||||||
Configuration object for mermaid.
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`void`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### ~~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); }>
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:425](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L425)
|
|
||||||
|
|
||||||
**`Internal`**
|
|
||||||
|
|
||||||
#### Deprecated
|
|
||||||
|
|
||||||
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**: (`text`, `parseOptions`) => `Promise`<`false` | [`ParseResult`](ParseResult.md)>(`text`, `parseOptions`?) => `Promise`<[`ParseResult`](ParseResult.md)>
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:426](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L426)
|
|
||||||
|
|
||||||
Parse the text and validate the syntax.
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### text
|
|
||||||
|
|
||||||
`string`
|
|
||||||
|
|
||||||
The mermaid diagram definition.
|
|
||||||
|
|
||||||
##### parseOptions
|
|
||||||
|
|
||||||
[`ParseOptions`](ParseOptions.md) & `object`
|
|
||||||
|
|
||||||
Options for parsing.
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`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`.
|
|
||||||
|
|
||||||
#### See
|
|
||||||
|
|
||||||
[ParseOptions](ParseOptions.md)
|
|
||||||
|
|
||||||
#### Throws
|
|
||||||
|
|
||||||
Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.
|
|
||||||
|
|
||||||
Parse the text and validate the syntax.
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### text
|
|
||||||
|
|
||||||
`string`
|
|
||||||
|
|
||||||
The mermaid diagram definition.
|
|
||||||
|
|
||||||
##### parseOptions?
|
|
||||||
|
|
||||||
[`ParseOptions`](ParseOptions.md)
|
|
||||||
|
|
||||||
Options for parsing.
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`Promise`<[`ParseResult`](ParseResult.md)>
|
|
||||||
|
|
||||||
An object with the `diagramType` set to type of the diagram if valid. Otherwise `false` if parseOptions.suppressErrors is `true`.
|
|
||||||
|
|
||||||
#### See
|
|
||||||
|
|
||||||
[ParseOptions](ParseOptions.md)
|
|
||||||
|
|
||||||
#### Throws
|
|
||||||
|
|
||||||
Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### parseError?
|
|
||||||
|
|
||||||
> `optional` **parseError**: [`ParseErrorFunction`](../type-aliases/ParseErrorFunction.md)
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:420](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L420)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### registerExternalDiagrams()
|
|
||||||
|
|
||||||
> **registerExternalDiagrams**: (`diagrams`, `opts`) => `Promise`<`void`>
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:434](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L434)
|
|
||||||
|
|
||||||
Used to register external diagram types.
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### diagrams
|
|
||||||
|
|
||||||
[`ExternalDiagramDefinition`](ExternalDiagramDefinition.md)\[]
|
|
||||||
|
|
||||||
Array of [ExternalDiagramDefinition](ExternalDiagramDefinition.md).
|
|
||||||
|
|
||||||
##### opts
|
|
||||||
|
|
||||||
If opts.lazyLoad is false, the diagrams will be loaded immediately.
|
|
||||||
|
|
||||||
###### lazyLoad?
|
|
||||||
|
|
||||||
`boolean` = `true`
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`Promise`<`void`>
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### registerIconPacks()
|
|
||||||
|
|
||||||
> **registerIconPacks**: (`iconLoaders`) => `void`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:439](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L439)
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### iconLoaders
|
|
||||||
|
|
||||||
`IconLoader`\[]
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`void`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### registerLayoutLoaders()
|
|
||||||
|
|
||||||
> **registerLayoutLoaders**: (`loaders`) => `void`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:433](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L433)
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### loaders
|
|
||||||
|
|
||||||
[`LayoutLoaderDefinition`](LayoutLoaderDefinition.md)\[]
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`void`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### render()
|
|
||||||
|
|
||||||
> **render**: (`id`, `text`, `svgContainingElement`?) => `Promise`<[`RenderResult`](RenderResult.md)>
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:427](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L427)
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### id
|
|
||||||
|
|
||||||
`string`
|
|
||||||
|
|
||||||
##### text
|
|
||||||
|
|
||||||
`string`
|
|
||||||
|
|
||||||
##### svgContainingElement?
|
|
||||||
|
|
||||||
`Element`
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`Promise`<[`RenderResult`](RenderResult.md)>
|
|
||||||
|
|
||||||
#### Deprecated
|
|
||||||
|
|
||||||
- use the `mermaid.render` function instead of `mermaid.mermaidAPI.render`
|
|
||||||
|
|
||||||
Deprecated for external use.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### run()
|
|
||||||
|
|
||||||
> **run**: (`options`) => `Promise`<`void`>
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:432](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L432)
|
|
||||||
|
|
||||||
## run
|
|
||||||
|
|
||||||
Function that goes through the document to find the chart definitions in there and render them.
|
|
||||||
|
|
||||||
The function tags the processed attributes with the attribute data-processed and ignores found
|
|
||||||
elements with the attribute already set. This way the init function can be triggered several
|
|
||||||
times.
|
|
||||||
|
|
||||||
```mermaid-example
|
|
||||||
graph LR;
|
|
||||||
a(Find elements)-->b{Processed}
|
|
||||||
b-->|Yes|c(Leave element)
|
|
||||||
b-->|No |d(Transform)
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
graph LR;
|
|
||||||
a(Find elements)-->b{Processed}
|
|
||||||
b-->|Yes|c(Leave element)
|
|
||||||
b-->|No |d(Transform)
|
|
||||||
```
|
|
||||||
|
|
||||||
Renders the mermaid diagrams
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### options
|
|
||||||
|
|
||||||
[`RunOptions`](RunOptions.md) = `...`
|
|
||||||
|
|
||||||
Optional runtime configs
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`Promise`<`void`>
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### setParseErrorHandler()
|
|
||||||
|
|
||||||
> **setParseErrorHandler**: (`parseErrorHandler`) => `void`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:437](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L437)
|
|
||||||
|
|
||||||
## setParseErrorHandler Alternative to directly setting parseError using:
|
|
||||||
|
|
||||||
```js
|
|
||||||
mermaid.parseError = function (err, hash) {
|
|
||||||
forExampleDisplayErrorInGui(err); // do something with the error
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
This is provided for environments where the mermaid object can't directly have a new member added
|
|
||||||
to it (eg. dart interop wrapper). (Initially there is no parseError member of mermaid).
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### parseErrorHandler
|
|
||||||
|
|
||||||
(`err`, `hash`) => `void`
|
|
||||||
|
|
||||||
New parseError() callback.
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`void`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### startOnLoad
|
|
||||||
|
|
||||||
> **startOnLoad**: `boolean`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:419](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L419)
|
|
@@ -1,469 +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/MermaidConfig.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/interfaces/MermaidConfig.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Interface: MermaidConfig
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:58](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L58)
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
### altFontFamily?
|
|
||||||
|
|
||||||
> `optional` **altFontFamily**: `string`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:122](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L122)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### architecture?
|
|
||||||
|
|
||||||
> `optional` **architecture**: `ArchitectureDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:194](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L194)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### arrowMarkerAbsolute?
|
|
||||||
|
|
||||||
> `optional` **arrowMarkerAbsolute**: `boolean`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:141](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L141)
|
|
||||||
|
|
||||||
Controls whether or arrow markers in html code are absolute paths or anchors.
|
|
||||||
This matters if you are using base tag settings.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### block?
|
|
||||||
|
|
||||||
> `optional` **block**: `BlockDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:201](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L201)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### c4?
|
|
||||||
|
|
||||||
> `optional` **c4**: `C4DiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:198](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L198)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### class?
|
|
||||||
|
|
||||||
> `optional` **class**: `ClassDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:187](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L187)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### darkMode?
|
|
||||||
|
|
||||||
> `optional` **darkMode**: `boolean`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:113](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L113)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### deterministicIds?
|
|
||||||
|
|
||||||
> `optional` **deterministicIds**: `boolean`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:174](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L174)
|
|
||||||
|
|
||||||
This option controls if the generated ids of nodes in the SVG are
|
|
||||||
generated randomly or based on a seed.
|
|
||||||
If set to `false`, the IDs are generated based on the current date and
|
|
||||||
thus are not deterministic. This is the default behavior.
|
|
||||||
|
|
||||||
This matters if your files are checked into source control e.g. git and
|
|
||||||
should not change unless content is changed.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### deterministicIDSeed?
|
|
||||||
|
|
||||||
> `optional` **deterministicIDSeed**: `string`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:181](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L181)
|
|
||||||
|
|
||||||
This option is the optional seed for deterministic ids.
|
|
||||||
If set to `undefined` but deterministicIds is `true`, a simple number iterator is used.
|
|
||||||
You can set this attribute to base the seed on a static string.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### dompurifyConfig?
|
|
||||||
|
|
||||||
> `optional` **dompurifyConfig**: `Config`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:203](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L203)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### elk?
|
|
||||||
|
|
||||||
> `optional` **elk**: `object`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:91](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L91)
|
|
||||||
|
|
||||||
#### cycleBreakingStrategy?
|
|
||||||
|
|
||||||
> `optional` **cycleBreakingStrategy**: `"GREEDY"` | `"DEPTH_FIRST"` | `"INTERACTIVE"` | `"MODEL_ORDER"` | `"GREEDY_MODEL_ORDER"`
|
|
||||||
|
|
||||||
This strategy decides how to find cycles in the graph and deciding which edges need adjustment to break loops.
|
|
||||||
|
|
||||||
#### mergeEdges?
|
|
||||||
|
|
||||||
> `optional` **mergeEdges**: `boolean`
|
|
||||||
|
|
||||||
Elk specific option that allows edges to share path where it convenient. It can make for pretty diagrams but can also make it harder to read the diagram.
|
|
||||||
|
|
||||||
#### nodePlacementStrategy?
|
|
||||||
|
|
||||||
> `optional` **nodePlacementStrategy**: `"SIMPLE"` | `"NETWORK_SIMPLEX"` | `"LINEAR_SEGMENTS"` | `"BRANDES_KOEPF"`
|
|
||||||
|
|
||||||
Elk specific option affecting how nodes are placed.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### er?
|
|
||||||
|
|
||||||
> `optional` **er**: `ErDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:189](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L189)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### flowchart?
|
|
||||||
|
|
||||||
> `optional` **flowchart**: `FlowchartDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:182](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L182)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### fontFamily?
|
|
||||||
|
|
||||||
> `optional` **fontFamily**: `string`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:121](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L121)
|
|
||||||
|
|
||||||
Specifies the font to be used in the rendered diagrams.
|
|
||||||
Can be any possible CSS `font-family`.
|
|
||||||
See <https://developer.mozilla.org/en-US/docs/Web/CSS/font-family>
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### fontSize?
|
|
||||||
|
|
||||||
> `optional` **fontSize**: `number`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:205](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L205)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### forceLegacyMathML?
|
|
||||||
|
|
||||||
> `optional` **forceLegacyMathML**: `boolean`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:163](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L163)
|
|
||||||
|
|
||||||
This option forces Mermaid to rely on KaTeX's own stylesheet for rendering MathML. Due to differences between OS
|
|
||||||
fonts and browser's MathML implementation, this option is recommended if consistent rendering is important.
|
|
||||||
If set to true, ignores legacyMathML.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### gantt?
|
|
||||||
|
|
||||||
> `optional` **gantt**: `GanttDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:184](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L184)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### gitGraph?
|
|
||||||
|
|
||||||
> `optional` **gitGraph**: `GitGraphDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:197](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L197)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### handDrawnSeed?
|
|
||||||
|
|
||||||
> `optional` **handDrawnSeed**: `number`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:76](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L76)
|
|
||||||
|
|
||||||
Defines the seed to be used when using handDrawn look. This is important for the automated tests as they will always find differences without the seed. The default value is 0 which gives a random seed.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### htmlLabels?
|
|
||||||
|
|
||||||
> `optional` **htmlLabels**: `boolean`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:114](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L114)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### journey?
|
|
||||||
|
|
||||||
> `optional` **journey**: `JourneyDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:185](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L185)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### kanban?
|
|
||||||
|
|
||||||
> `optional` **kanban**: `KanbanDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:196](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L196)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### layout?
|
|
||||||
|
|
||||||
> `optional` **layout**: `string`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:81](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L81)
|
|
||||||
|
|
||||||
Defines which layout algorithm to use for rendering the diagram.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### legacyMathML?
|
|
||||||
|
|
||||||
> `optional` **legacyMathML**: `boolean`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:156](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L156)
|
|
||||||
|
|
||||||
This option specifies if Mermaid can expect the dependent to include KaTeX stylesheets for browsers
|
|
||||||
without their own MathML implementation. If this option is disabled and MathML is not supported, the math
|
|
||||||
equations are replaced with a warning. If this option is enabled and MathML is not supported, Mermaid will
|
|
||||||
fall back to legacy rendering for KaTeX.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### logLevel?
|
|
||||||
|
|
||||||
> `optional` **logLevel**: `0` | `2` | `1` | `"trace"` | `"debug"` | `"info"` | `"warn"` | `"error"` | `"fatal"` | `3` | `4` | `5`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:127](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L127)
|
|
||||||
|
|
||||||
This option decides the amount of logging to be used by mermaid.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### look?
|
|
||||||
|
|
||||||
> `optional` **look**: `"classic"` | `"handDrawn"`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:71](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L71)
|
|
||||||
|
|
||||||
Defines which main look to use for the diagram.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### markdownAutoWrap?
|
|
||||||
|
|
||||||
> `optional` **markdownAutoWrap**: `boolean`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:206](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L206)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### maxEdges?
|
|
||||||
|
|
||||||
> `optional` **maxEdges**: `number`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:90](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L90)
|
|
||||||
|
|
||||||
Defines the maximum number of edges that can be drawn in a graph.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### maxTextSize?
|
|
||||||
|
|
||||||
> `optional` **maxTextSize**: `number`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:85](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L85)
|
|
||||||
|
|
||||||
The maximum allowed size of the users text diagram
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### mindmap?
|
|
||||||
|
|
||||||
> `optional` **mindmap**: `MindmapDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:195](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L195)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### packet?
|
|
||||||
|
|
||||||
> `optional` **packet**: `PacketDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:200](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L200)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### pie?
|
|
||||||
|
|
||||||
> `optional` **pie**: `PieDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:190](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L190)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### quadrantChart?
|
|
||||||
|
|
||||||
> `optional` **quadrantChart**: `QuadrantChartConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:191](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L191)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### radar?
|
|
||||||
|
|
||||||
> `optional` **radar**: `RadarDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:202](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L202)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### requirement?
|
|
||||||
|
|
||||||
> `optional` **requirement**: `RequirementDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:193](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L193)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### sankey?
|
|
||||||
|
|
||||||
> `optional` **sankey**: `SankeyDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:199](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L199)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### secure?
|
|
||||||
|
|
||||||
> `optional` **secure**: `string`\[]
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:148](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L148)
|
|
||||||
|
|
||||||
This option controls which `currentConfig` keys are considered secure and
|
|
||||||
can only be changed via call to `mermaid.initialize`.
|
|
||||||
This prevents malicious graph directives from overriding a site's default security.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### securityLevel?
|
|
||||||
|
|
||||||
> `optional` **securityLevel**: `"strict"` | `"loose"` | `"antiscript"` | `"sandbox"`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:131](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L131)
|
|
||||||
|
|
||||||
Level of trust for parsed diagram
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### sequence?
|
|
||||||
|
|
||||||
> `optional` **sequence**: `SequenceDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:183](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L183)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### startOnLoad?
|
|
||||||
|
|
||||||
> `optional` **startOnLoad**: `boolean`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:135](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L135)
|
|
||||||
|
|
||||||
Dictates whether mermaid starts on Page load
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### state?
|
|
||||||
|
|
||||||
> `optional` **state**: `StateDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:188](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L188)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### suppressErrorRendering?
|
|
||||||
|
|
||||||
> `optional` **suppressErrorRendering**: `boolean`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:212](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L212)
|
|
||||||
|
|
||||||
Suppresses inserting 'Syntax error' diagram in the DOM.
|
|
||||||
This is useful when you want to control how to handle syntax errors in your application.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### theme?
|
|
||||||
|
|
||||||
> `optional` **theme**: `"default"` | `"base"` | `"dark"` | `"forest"` | `"neutral"` | `"null"`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:64](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L64)
|
|
||||||
|
|
||||||
Theme, the CSS style sheet.
|
|
||||||
You may also use `themeCSS` to override this value.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### themeCSS?
|
|
||||||
|
|
||||||
> `optional` **themeCSS**: `string`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:66](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L66)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### themeVariables?
|
|
||||||
|
|
||||||
> `optional` **themeVariables**: `any`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:65](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L65)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### timeline?
|
|
||||||
|
|
||||||
> `optional` **timeline**: `TimelineDiagramConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:186](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L186)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### wrap?
|
|
||||||
|
|
||||||
> `optional` **wrap**: `boolean`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:204](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L204)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### xyChart?
|
|
||||||
|
|
||||||
> `optional` **xyChart**: `XYChartConfig`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/config.type.ts:192](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L192)
|
|
@@ -1,24 +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/ParseOptions.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/interfaces/ParseOptions.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Interface: ParseOptions
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:59](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L59)
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
### suppressErrors?
|
|
||||||
|
|
||||||
> `optional` **suppressErrors**: `boolean`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:64](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L64)
|
|
||||||
|
|
||||||
If `true`, parse will return `false` instead of throwing error when the diagram is invalid.
|
|
||||||
The `parseError` function will not be called.
|
|
@@ -1,33 +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/ParseResult.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/interfaces/ParseResult.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Interface: ParseResult
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:67](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L67)
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
### config
|
|
||||||
|
|
||||||
> **config**: [`MermaidConfig`](MermaidConfig.md)
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:75](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L75)
|
|
||||||
|
|
||||||
The config passed as YAML frontmatter or directives
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### diagramType
|
|
||||||
|
|
||||||
> **diagramType**: `string`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:71](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L71)
|
|
||||||
|
|
||||||
The diagram type, e.g. 'flowchart', 'sequence', etc.
|
|
@@ -1,21 +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/RenderOptions.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/interfaces/RenderOptions.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Interface: RenderOptions
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
### algorithm?
|
|
||||||
|
|
||||||
> `optional` **algorithm**: `string`
|
|
||||||
|
|
||||||
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)
|
|
@@ -1,60 +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/RenderResult.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/interfaces/RenderResult.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Interface: RenderResult
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:85](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L85)
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
### bindFunctions()?
|
|
||||||
|
|
||||||
> `optional` **bindFunctions**: (`element`) => `void`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:103](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L103)
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
```js
|
|
||||||
const { svg, bindFunctions } = await mermaid.render('id1', 'graph TD;A-->B');
|
|
||||||
div.innerHTML = svg;
|
|
||||||
bindFunctions?.(div); // To call bindFunctions only if it's present.
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### element
|
|
||||||
|
|
||||||
`Element`
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`void`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### diagramType
|
|
||||||
|
|
||||||
> **diagramType**: `string`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:93](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L93)
|
|
||||||
|
|
||||||
The diagram type, e.g. 'flowchart', 'sequence', etc.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### svg
|
|
||||||
|
|
||||||
> **svg**: `string`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/types.ts:89](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L89)
|
|
||||||
|
|
||||||
The svg code for the rendered graph.
|
|
@@ -1,63 +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/RunOptions.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/interfaces/RunOptions.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Interface: RunOptions
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:41](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L41)
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
### nodes?
|
|
||||||
|
|
||||||
> `optional` **nodes**: `ArrayLike`<`HTMLElement`>
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:49](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L49)
|
|
||||||
|
|
||||||
The nodes to render. If this is set, `querySelector` will be ignored.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### postRenderCallback()?
|
|
||||||
|
|
||||||
> `optional` **postRenderCallback**: (`id`) => `unknown`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:53](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L53)
|
|
||||||
|
|
||||||
A callback to call after each diagram is rendered.
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
##### id
|
|
||||||
|
|
||||||
`string`
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`unknown`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### querySelector?
|
|
||||||
|
|
||||||
> `optional` **querySelector**: `string`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:45](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L45)
|
|
||||||
|
|
||||||
The query selector to use when finding elements to render. Default: `".mermaid"`.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### suppressErrors?
|
|
||||||
|
|
||||||
> `optional` **suppressErrors**: `boolean`
|
|
||||||
|
|
||||||
Defined in: [packages/mermaid/src/mermaid.ts:57](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L57)
|
|
||||||
|
|
||||||
If `true`, errors will be logged to the console, but not thrown. Default: `false`
|
|
@@ -1,15 +0,0 @@
|
|||||||
> **Warning**
|
|
||||||
>
|
|
||||||
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
|
|
||||||
>
|
|
||||||
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/mermaid/type-aliases/InternalHelpers.md](../../../../../packages/mermaid/src/docs/config/setup/mermaid/type-aliases/InternalHelpers.md).
|
|
||||||
|
|
||||||
[**mermaid**](../../README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Type Alias: 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)
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user