Showing with 6,410 additions and 168,868 deletions.
  1. +1 −0 .eslintignore
  2. +24 −10 .eslintrc.json
  3. +1 −0 .gitattributes
  4. +7 −5 .github/workflows/build.yml
  5. +7 −1 .github/workflows/checks.yml
  6. +4 −0 .github/workflows/codeql.yml
  7. +39 −0 .github/workflows/lint.yml
  8. +7 −1 .github/workflows/pr-labeler-config-validator.yml
  9. +34 −0 .github/workflows/test.yml
  10. 0 .husky/commit-msg
  11. 0 .husky/pre-commit
  12. +1 −1 .lintstagedrc.json
  13. +2 −5 .tern-project
  14. +1 −1 CHANGELOG.md
  15. +1 −1 CONTRIBUTING.md
  16. +0 −904 classDiagram.js
  17. +0 −264 cypress/examples/actions.spec.js
  18. +0 −36 cypress/examples/aliasing.spec.js
  19. +0 −169 cypress/examples/assertions.spec.js
  20. +0 −55 cypress/examples/connectors.spec.js
  21. +0 −79 cypress/examples/cookies.spec.js
  22. +0 −225 cypress/examples/cypress_api.spec.js
  23. +0 −114 cypress/examples/files.spec.js
  24. +0 −58 cypress/examples/local_storage.spec.js
  25. +0 −32 cypress/examples/location.spec.js
  26. +0 −77 cypress/examples/misc.spec.js
  27. +0 −56 cypress/examples/navigation.spec.js
  28. +0 −192 cypress/examples/network_requests.spec.js
  29. +0 −75 cypress/examples/querying.spec.js
  30. +0 −94 cypress/examples/spies_stubs_clocks.spec.js
  31. +0 −97 cypress/examples/traversal.spec.js
  32. +0 −129 cypress/examples/utilities.spec.js
  33. +0 −59 cypress/examples/viewport.spec.js
  34. +0 −33 cypress/examples/waiting.spec.js
  35. +0 −22 cypress/examples/window.spec.js
  36. +0 −5 cypress/fixtures/example.json
  37. +105 −0 cypress/integration/rendering/gitGraph.spec.js
  38. +36 −0 cypress/integration/rendering/sequencediagram.spec.js
  39. +15 −0 cypress/integration/rendering/stateDiagram-v2.spec.js
  40. +1 −1 cypress/platform/class.html
  41. +86 −58 cypress/platform/knsv.html
  42. +192 −153 cypress/platform/knsv3.html
  43. +159 −0 demos/index.html
  44. +0 −31,940 dist/mermaid.core.js
  45. +0 −1 dist/mermaid.core.js.map
  46. +0 −129,094 dist/mermaid.js
  47. +0 −1 dist/mermaid.js.map
  48. +1 −1 docs/8.6.0_docs.md
  49. +5 −5 docs/README.md
  50. +82 −7 docs/Setup.md
  51. +1 −0 docs/_sidebar.md
  52. +46 −0 docs/c4c.md
  53. +40 −42 docs/classDiagram.md
  54. +2 −2 docs/developer-docs/configuration.md
  55. +135 −135 docs/development.md
  56. +29 −31 docs/diagrams-and-syntax-and-examples/flowchart.md
  57. +10 −10 docs/directives.md
  58. +17 −22 docs/flowchart.md
  59. +4 −4 docs/gantt.md
  60. +117 −29 docs/gitgraph.md
  61. +2 −1 docs/index.html
  62. +6 −6 docs/integrations.md
  63. +6 −6 docs/integrations.md~HEAD
  64. +2 −2 docs/n00b-gettingStarted.md
  65. +159 −4 docs/newDiagram.md
  66. +0 −2 docs/requirementDiagram.md
  67. +64 −0 docs/sequenceDiagram.md
  68. +12 −12 docs/theming.md
  69. +9 −9 docs/usage.md
  70. +0 −1,051 flow.js
  71. +0 −11 launch.json
  72. +11 −9 package.json
  73. +0 −675 pie.js
  74. +9 −0 src/Diagram.js
  75. +2 −2 src/accessibility.js
  76. +17 −5 src/commonDb.js
  77. +3 −3 src/config.js
  78. +1 −1 src/dagre-wrapper/clusters.js
  79. +0 −51 src/dagre-wrapper/edges.js
  80. +1 −1 src/dagre-wrapper/intersect/intersect-ellipse.js
  81. +1 −1 src/dagre-wrapper/intersect/intersect-rect.js
  82. +27 −1 src/dagre-wrapper/mermaid-graphlib.js
  83. +34 −0 src/dagre-wrapper/nodes.js
  84. +404 −4 src/defaultConfig.js
  85. +480 −0 src/diagrams/c4/c4Db.js
  86. +670 −0 src/diagrams/c4/c4Renderer.js
  87. +312 −0 src/diagrams/c4/parser/c4Diagram.jison
  88. +8 −0 src/diagrams/c4/styles.js
  89. +884 −0 src/diagrams/c4/svgDraw.js
  90. +4 −5 src/diagrams/class/classDb.js
  91. +8 −10 src/diagrams/class/classDiagram.spec.js
  92. +2 −33 src/diagrams/class/classRenderer-v2.js
  93. +1 −1 src/diagrams/class/parser/classDiagram.jison
  94. +0 −1 src/diagrams/common/common.spec.js
  95. +4 −4 src/diagrams/er/erDb.js
  96. +3 −2 src/diagrams/er/parser/erDiagram.jison
  97. +8 −2 src/diagrams/er/parser/erDiagram.spec.js
  98. +4 −4 src/diagrams/flowchart/flowDb.js
  99. +2 −16 src/diagrams/flowchart/flowRenderer-v2.js
  100. +4 −17 src/diagrams/flowchart/flowRenderer.js
  101. +1 −1 src/diagrams/flowchart/parser/flow.jison
  102. +2 −3 src/diagrams/flowchart/parser/flow.spec.js
  103. +8 −4 src/diagrams/gantt/ganttDb.js
  104. +2 −2 src/diagrams/gantt/ganttDb.spec.js
  105. +4 −5 src/diagrams/gantt/ganttRenderer.js
  106. +2 −2 src/diagrams/gantt/parser/gantt.jison
  107. +2 −2 src/diagrams/gantt/parser/gantt.spec.js
  108. +86 −4 src/diagrams/git/gitGraphAst.js
  109. +2 −6 src/diagrams/git/gitGraphParserV2.spec.js
  110. +75 −11 src/diagrams/git/gitGraphRenderer.js
  111. +7 −1 src/diagrams/git/parser/gitGraph.jison
  112. +2 −2 src/diagrams/pie/parser/pie.jison
  113. +4 −4 src/diagrams/pie/parser/pie.spec.js
  114. +8 −15 src/diagrams/pie/pieDb.js
  115. +1 −1 src/diagrams/pie/pieRenderer.js
  116. +1 −1 src/diagrams/requirement/parser/requirementDiagram.jison
  117. +2 −2 src/diagrams/requirement/parser/requirementDiagram.spec.js
  118. +4 −4 src/diagrams/requirement/requirementDb.js
  119. +24 −2 src/diagrams/sequence/parser/sequenceDiagram.jison
  120. +29 −16 src/diagrams/sequence/sequenceDb.js
  121. +76 −5 src/diagrams/sequence/sequenceDiagram.spec.js
  122. +44 −1 src/diagrams/sequence/sequenceRenderer.js
  123. +0 −2 src/diagrams/sequence/svgDraw.spec.js
  124. +2 −2 src/diagrams/state/parser/stateDiagram.jison
  125. +9 −8 src/diagrams/state/stateDb.js
  126. +1 −1 src/diagrams/state/stateDiagram-v2.spec.js
  127. +1 −1 src/diagrams/state/stateDiagram.spec.js
  128. +8 −4 src/diagrams/user-journey/journeyDb.js
  129. +4 −4 src/diagrams/user-journey/journeyDb.spec.js
  130. +1 −1 src/diagrams/user-journey/journeyRenderer.js
  131. +2 −2 src/diagrams/user-journey/parser/journey.jison
  132. +4 −2 src/diagrams/user-journey/parser/journey.spec.js
  133. +23 −2 src/mermaid.js
  134. +1 −1 src/mermaid.spec.js
  135. +120 −87 src/mermaidAPI.js
  136. +20 −3 src/mermaidAPI.spec.js
  137. +2 −1 src/styles.js
  138. +0 −96 src/themes/class.scss
  139. +0 −67 src/themes/dark/index.scss
  140. +0 −65 src/themes/default/index.scss
  141. +0 −78 src/themes/flowchart.scss
  142. +0 −65 src/themes/forest/index.scss
  143. +0 −258 src/themes/gantt.scss
  144. +0 −8 src/themes/git.scss
  145. +0 −60 src/themes/mermaid.scss
  146. +0 −70 src/themes/neutral/index.scss
  147. +0 −16 src/themes/pie.scss
  148. +0 −96 src/themes/sequence.scss
  149. +0 −140 src/themes/state.scss
  150. +5 −18 src/themes/theme-base.js
  151. +5 −0 src/themes/theme-dark.js
  152. +5 −0 src/themes/theme-default.js
  153. +5 −0 src/themes/theme-forest.js
  154. +5 −0 src/themes/theme-neutral.js
  155. +50 −0 src/utils.js
  156. +1,375 −1,328 yarn.lock
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dist/**
.github/**
docs/Setup.md
34 changes: 24 additions & 10 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@
},
"sourceType": "module"
},
"extends": ["eslint:recommended", "plugin:jsdoc/recommended", "plugin:markdown/recommended", "plugin:prettier/recommended"],
"plugins": ["html", "jest", "jsdoc", "prettier"],
"extends": [
"eslint:recommended",
//"plugin:jsdoc/recommended",
"plugin:json/recommended",
// "plugin:markdown/recommended",
"plugin:prettier/recommended"
],
"plugins": ["html", "jest", "jsdoc", "json", "prettier"],
"rules": {
"no-prototype-builtins": 0,
"no-unused-vars": 0,
"jsdoc/check-indentation": 0,
"jsdoc/check-alignment": 0,
"jsdoc/check-line-alignment": 0,
"jsdoc/multiline-blocks": 0,
"jsdoc/newline-after-description": 0,
"jsdoc/tag-lines": 0,
"no-prototype-builtins": "off",
"no-unused-vars": "off",
"jsdoc/check-indentation": "off",
"jsdoc/check-alignment": "off",
"jsdoc/check-line-alignment": "off",
"jsdoc/multiline-blocks": "off",
"jsdoc/newline-after-description": "off",
"jsdoc/tag-lines": "off",
"cypress/no-async-tests": "off",
"json/*": ["error", "allowComments"],
"no-empty": ["error", { "allowEmptyCatch": true }]
},
"overrides": [
Expand All @@ -33,6 +41,12 @@
"no-undef": "off",
"jsdoc/require-jsdoc": "off"
}
},
{
"files": "./**/*.md/*.html",
"rules": {
"prettier/prettier": "off"
}
}
]
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Build

on: [push, pull_request]
on:
push: {}
pull_request:
types:
- opened
- synchronize
- ready_for_review

permissions:
contents: read
Expand Down Expand Up @@ -37,7 +43,3 @@ jobs:
with:
name: dist
path: dist

- name: Run Unit Tests
run: |
yarn test --coverage
8 changes: 7 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
on: [push]
on:
push: {}
pull_request:
types:
- opened
- synchronize
- ready_for_review

name: Static analysis

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]
types:
- opened
- synchronize
- ready_for_review

jobs:
analyze:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Lint

on:
push: {}
pull_request:
types:
- opened
- synchronize
- ready_for_review

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
cache: yarn
node-version: ${{ matrix.node-version }}

- name: Install Yarn
run: npm i yarn --global

- name: Install Packages
run: |
yarn install --frozen-lockfile
env:
CYPRESS_CACHE_FOLDER: .cache/Cypress

- name: Run Linting
run: yarn lint
8 changes: 7 additions & 1 deletion .github/workflows/pr-labeler-config-validator.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Validate PR Labeler Configuration
on: [push, pull_request]
on:
push: {}
pull_request:
types:
- opened
- synchronize
- ready_for_review

jobs:
pr-labeler:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Unit Tests

on: [push, pull_request]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
cache: yarn
node-version: ${{ matrix.node-version }}

- name: Install Yarn
run: npm i yarn --global

- name: Install Packages
run: |
yarn install --frozen-lockfile
env:
CYPRESS_CACHE_FOLDER: .cache/Cypress

- name: Run Unit Tests
run: |
yarn ci --coverage
Empty file modified .husky/commit-msg
100644 → 100755
Empty file.
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"*.{js,html,md}": [
"*.{js,json,html,md}": [
"yarn lint:fix"
]
}
7 changes: 2 additions & 5 deletions .tern-project
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
"libs": [
"browser"
],
"loadEagerly": [
"path/to/your/js/**/*.js"
],
"loadEagerly": [],
"dontLoad": [
"node_modules/**",
"path/to/your/js/**/*.js"
"node_modules/**"
],
"plugins": {
"modules": {},
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- Missing fontawesome icon support [\#830](https://github.com/knsv/mermaid/issues/830)
- Docs for integration with wiki.js? [\#829](https://github.com/knsv/mermaid/issues/829)
- Is this project still maintained? [\#826](https://github.com/knsv/mermaid/issues/826)
- typroa [\#823](https://github.com/knsv/mermaid/issues/823)
- typora [\#823](https://github.com/knsv/mermaid/issues/823)
- Maintain the order of the nodes in Flowchart [\#815](https://github.com/knsv/mermaid/issues/815)
- Overlap, Overflow and cut titles in flowchart [\#814](https://github.com/knsv/mermaid/issues/814)
- How load mermaidApi notejs electron [\#813](https://github.com/knsv/mermaid/issues/813)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Finally, if it is not in the documentation, no one will know about it and then *

The docs are located in the docs folder and are ofc written in markdown. Just pick the right section and start typing. If you want to add to the structure as in adding a new section and new file you do that via the _navbar.md.

The changes in master is reflected in http://mermaid-js.github.io/mermaid/ once released the updates are committed to https://mermaid-js.github.io/#/
The changes in master is reflected in https://mermaid-js.github.io/mermaid/ once released the updates are committed to https://mermaid-js.github.io/#/

## Last words

Expand Down
Loading