mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-10-31 10:54:15 +01:00 
			
		
		
		
	Compare commits
	
		
			338 Commits
		
	
	
		
			next
			...
			add-blog-p
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | ace4538a6a | ||
|   | 4f642428de | ||
| ![renovate[bot]](/assets/img/avatar_default.png)  | 954f5d7d42 | ||
|   | 4a12c46350 | ||
|   | 9eb64cd6db | ||
|   | 7b8e76c26f | ||
|   | 665be1ecfe | ||
|   | edda73c7fc | ||
|   | 6413529a6e | ||
|   | f5e1df08a0 | ||
|   | bb2bbfdf92 | ||
|   | 22bd26272d | ||
|   | da150e8767 | ||
|   | 1f64452716 | ||
|   | 10871af93b | ||
|   | 9986b023d7 | ||
|   | e68125eb6a | ||
|   | 4f1c3547bf | ||
|   | e102ac2b58 | ||
|   | 63dca5bb86 | ||
|   | bc7ecf330b | ||
| ![renovate[bot]](/assets/img/avatar_default.png)  | d4e00de1fd | ||
|   | c4ccfec316 | ||
|   | 1ac9244e68 | ||
|   | 8265e53128 | ||
|   | d316b05fa1 | ||
|   | 3000f0208f | ||
|   | e49c95c220 | ||
|   | 47c5abb8a5 | ||
| ![renovate[bot]](/assets/img/avatar_default.png)  | be9b349e51 | ||
|   | 18defaae6d | ||
|   | 7f33ae0f40 | ||
|   | 13aa3265e3 | ||
|   | 3b0687e557 | ||
|   | 273941a9fe | ||
|   | 718811be9c | ||
|   | 8d9cb09261 | ||
|   | 196d88559c | ||
|   | 3809732e48 | ||
|   | eb4a6fd2ed | ||
|   | 3357844a1f | ||
|   | 0d8fe3b626 | ||
| ![renovate[bot]](/assets/img/avatar_default.png)  | 5df988d2ac | ||
|   | e9ef277929 | ||
| ![renovate[bot]](/assets/img/avatar_default.png)  | 2dcdcba227 | ||
|   | 5b6c5dff0a | ||
|   | 7fa887b644 | ||
|   | 5c6b2cf490 | ||
| ![renovate[bot]](/assets/img/avatar_default.png)  | e0930b5cbb | ||
|   | 2a3d03254d | ||
|   | e570863801 | ||
|   | 866d9416b4 | ||
|   | e048085b5a | ||
|   | 9ed2f4b2d3 | ||
|   | c2eb2184fc | ||
|   | a2e3b4ca06 | ||
|   | 909ad02a18 | ||
|   | 4a930d2b5b | ||
|   | 4a19103891 | ||
|   | bb0c45b090 | ||
|   | d0583f9947 | ||
|   | 12bd301401 | ||
|   | a14637b416 | ||
|   | 5d1ac22fd1 | ||
|   | 3ccfea84b8 | ||
|   | 38beca11fd | ||
|   | 3555577581 | ||
|   | e852596862 | ||
| ![renovate[bot]](/assets/img/avatar_default.png)  | f15fde26f9 | ||
|   | 73c426f8be | ||
|   | 8f40c1a77f | ||
|   | 0d00e88580 | ||
|   | 8792e0a978 | ||
|   | e27e56f7bf | ||
|   | 0051620840 | ||
|   | 63f9d3e0b4 | ||
|   | 90b1111382 | ||
|   | 0aa526d707 | ||
|   | 4daef2591d | ||
|   | 2d91aa0b06 | ||
|   | 2fd6de0af5 | ||
|   | 799af4e550 | ||
|   | b8e0bcee5b | ||
|   | 3567308a22 | ||
|   | aca0bebaf4 | ||
|   | 4ee4555cbd | ||
|   | 253adcb0eb | ||
|   | 585609b907 | ||
|   | 1d8332d61e | ||
|   | 3f95c78428 | ||
|   | 8e95c4db55 | ||
| ![renovate[bot]](/assets/img/avatar_default.png)  | f476a7566c | ||
|   | 4304fba0f5 | ||
| ![renovate[bot]](/assets/img/avatar_default.png)  | 07bd9825a1 | ||
|   | 69c7cb9f6f | ||
|   | fd473af5b0 | ||
|   | d1f02f6bed | ||
|   | c5cc9dbffa | ||
|   | 43e183b658 | ||
| ![renovate[bot]](/assets/img/avatar_default.png)  | 153f319666 | ||
|   | 3b8e6ecc42 | ||
|   | 29ec8cbd0a | ||
|   | 3072604070 | ||
|   | 562d10809c | ||
|   | c00bf26c77 | ||
|   | a2f54f7da4 | ||
|   | 12bf139708 | ||
|   | dbb69ad7cd | ||
|   | b78f16ef19 | ||
|   | 223f339682 | ||
|   | 3f556fa3fc | ||
|   | 16db0c039f | ||
|   | 94874ddbbe | ||
|   | ea86697973 | ||
|   | fa1605e7e7 | ||
|   | 0edef7b3cb | ||
|   | 64757670fc | ||
|   | edac77de74 | ||
|   | 63e3b1af52 | ||
|   | f6fa88e5ff | ||
|   | 78587e11c7 | ||
|   | 784d06f0ae | ||
|   | 6846c8f2ed | ||
|   | cfa4501793 | ||
|   | 16f1dccd22 | ||
|   | 3278899787 | ||
|   | cdbee64086 | ||
|   | 90e134cb26 | ||
|   | 725b618111 | ||
|   | f135a3a5e7 | ||
|   | 8f8e4806a9 | ||
|   | 100123b43e | ||
|   | 45a5424ebf | ||
|   | be37f2c576 | ||
|   | 26ed819664 | ||
|   | f907ac30c6 | ||
|   | 60be7012aa | ||
|   | 002d493035 | ||
|   | a41d6cfef1 | ||
|   | ecfa149efc | ||
|   | be1270d070 | ||
|   | 75ee4b7709 | ||
|   | d5b1028732 | ||
|   | 6c0be03e62 | ||
|   | 7ddea1270f | ||
|   | 97578c2d3d | ||
|   | 64806ed169 | ||
|   | a14c3bcc89 | ||
|   | 1699a23ff0 | ||
|   | 268c3fdbd8 | ||
|   | 7689e03739 | ||
|   | d875540b3a | ||
|   | 16aa9a310c | ||
|   | d0a008566e | ||
|   | d6c1a59bd4 | ||
|   | 07117b4c8a | ||
|   | 46d20c9968 | ||
|   | de1b2c31a1 | ||
|   | 1f9cbe218f | ||
|   | b914f48a91 | ||
|   | de89355a49 | ||
|   | 6502036be9 | ||
|   | f86da19362 | ||
|   | b04e150dc1 | ||
|   | 1c0c374c29 | ||
|   | d370dd43b1 | ||
|   | c90d7b8395 | ||
|   | 4feb2e639b | ||
|   | 37ba7af6f6 | ||
|   | 10fb85663f | ||
|   | 33287a63ad | ||
|   | 3134a87e72 | ||
|   | d68b59a390 | ||
|   | 447263ecc2 | ||
|   | 08a7f662ea | ||
|   | 007fb5deb9 | ||
|   | 6422175ef2 | ||
|   | 32ca0b97fc | ||
|   | 244b161032 | ||
|   | 75a6fb1d91 | ||
| ![renovate[bot]](/assets/img/avatar_default.png)  | 32c2aecc62 | ||
|   | b0ef0de032 | ||
| ![renovate[bot]](/assets/img/avatar_default.png)  | 92692653a7 | ||
|   | 77ba19cd04 | ||
|   | 5b43460ea4 | ||
|   | 579f1f9dc1 | ||
|   | de4ad764ce | ||
|   | 33444466f3 | ||
|   | 73888eafe1 | ||
|   | cd3d560e8d | ||
|   | c0497d3413 | ||
|   | 648f779e2c | ||
|   | b1915132d5 | ||
|   | e6d80c60fb | ||
|   | 05f59f6ed2 | ||
|   | 8f457815e9 | ||
|   | 233944bf24 | ||
|   | 424d988f93 | ||
|   | 3926594c6a | ||
|   | 5f84344c3c | ||
|   | 01082f86b7 | ||
|   | 9fa681f5a8 | ||
|   | 36b6733c4f | ||
|   | 2c195c73a9 | ||
|   | 1dd05ffbb1 | ||
|   | 4884b01b8a | ||
|   | 46136b5632 | ||
|   | ae29dd124c | ||
|   | 703460ea95 | ||
|   | b7c889bb70 | ||
|   | 12bbbcaff0 | ||
|   | b156c1ab25 | ||
|   | 358d855c88 | ||
|   | 1059dd389f | ||
|   | f1bcf89723 | ||
|   | 099a239207 | ||
|   | 821076ba9c | ||
|   | 60dd27671b | ||
|   | 0b0d901b7f | ||
|   | 5ccdb6f213 | ||
|   | 0981b66a5f | ||
|   | 3ddcc2d4ea | ||
|   | 6005479918 | ||
|   | 19e049642b | ||
|   | b8e6672e60 | ||
|   | dbeb0a4720 | ||
|   | da33867ad7 | ||
|   | 539010c65c | ||
|   | cbe44a6cff | ||
|   | b077fedd4c | ||
|   | b67dee1eed | ||
|   | be6b3176f4 | ||
|   | aef29affa3 | ||
|   | 67e482ff97 | ||
|   | 8862d63377 | ||
|   | fc7427536c | ||
|   | 0cb365cf31 | ||
|   | 49a0d0d9bf | ||
|   | 38fcc2847b | ||
|   | 2caeb9db47 | ||
|   | f9c359e70c | ||
|   | 24528c1426 | ||
|   | 3602191f69 | ||
|   | 5935e277e6 | ||
|   | 0ce33cb160 | ||
|   | df026c795d | ||
|   | d945030803 | ||
|   | 60a484f1e4 | ||
|   | 077b1a5d8a | ||
|   | 31686802b3 | ||
|   | b96eaed6f4 | ||
|   | c8fc989237 | ||
|   | 392ebd0af4 | ||
|   | cabcf1e270 | ||
|   | af7364bdf9 | ||
|   | 14e1e6368a | ||
|   | f1aa6fff9c | ||
|   | 8ad056b8a2 | ||
|   | c1cb171071 | ||
|   | 17959f648a | ||
|   | c3d9aa791a | ||
|   | f846e7719e | ||
|   | f25c215f6a | ||
|   | 2640120be8 | ||
|   | b55014617e | ||
|   | 42589a0034 | ||
|   | 82c405289d | ||
|   | 7d0faa3fed | ||
|   | 4256177531 | ||
|   | 327530fb9d | ||
|   | 3ecb841c1a | ||
|   | 1d2450245e | ||
|   | f6c4c9260f | ||
|   | f354d68350 | ||
|   | bea76aa682 | ||
|   | 6d4b27aacb | ||
|   | e008b7dae7 | ||
|   | 96a3991c56 | ||
|   | 8d1d691bc3 | ||
|   | e07608209b | ||
|   | 50cdb74d54 | ||
|   | edc091f4d4 | ||
|   | e0448a7b7b | ||
|   | 0f02f5ff34 | ||
|   | b2111adef5 | ||
|   | 140645b760 | ||
|   | fa201ad9ad | ||
|   | 6a1a38b395 | ||
|   | 7abcb61afb | ||
|   | ff5240c0bc | ||
|   | 4e3d935acf | ||
|   | 3fad11e104 | ||
|   | 38ee1724a8 | ||
|   | 0c7e2e2364 | ||
|   | f693084065 | ||
|   | a5ecc7a06d | ||
|   | 565f1543c6 | ||
|   | 0d8016d926 | ||
|   | a599e33ec2 | ||
|   | 36c84b3fec | ||
|   | 9cca389031 | ||
|   | e965507470 | ||
|   | 65fd3a3193 | ||
|   | 3bbd8fe4c9 | ||
|   | beb308c5b3 | ||
|   | 8ab00442ea | ||
|   | cba803abaf | ||
|   | dacd2cbc30 | ||
|   | b2509c82b8 | ||
|   | cd9bf03fb7 | ||
|   | 6d2904cff1 | ||
|   | 55fac29b3e | ||
|   | 5e966d60b0 | ||
|   | c08f927d60 | ||
|   | 00e66c48b8 | ||
|   | 589f90762a | ||
|   | f256a57f27 | ||
|   | 1102bf271d | ||
|   | b561d5ad9a | ||
|   | a5cb58ca96 | ||
|   | 0af77a3c2c | ||
|   | a75d14f5d0 | ||
|   | bca39e8081 | ||
|   | 43885e6d0b | ||
|   | 577f0ca562 | ||
|   | 56d339b8f0 | ||
|   | bd1e7a7c13 | ||
|   | 5f41b65af1 | ||
|   | 0dbebe953b | ||
|   | 16c12a42c7 | ||
|   | 8b8b828cd1 | ||
|   | 65dabeaf15 | ||
|   | 0480339272 | ||
|   | b09cdc0a18 | ||
|   | c3b86b687c | ||
|   | 8d48f8d8b0 | ||
|   | b4618f9ba1 | ||
|   | 2c5d83fab3 | 
| @@ -1,3 +0,0 @@ | ||||
| { | ||||
|   "extends": ["@commitlint/config-conventional"] | ||||
| } | ||||
| @@ -1,11 +0,0 @@ | ||||
| dist/** | ||||
| .github/** | ||||
| docs/Setup.md | ||||
| cypress.config.js | ||||
| cypress/plugins/index.js | ||||
| coverage | ||||
| *.json | ||||
| node_modules | ||||
|  | ||||
| # autogenereated by langium-cli | ||||
| generated/ | ||||
							
								
								
									
										1
									
								
								.eslintignore
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								.eslintignore
									
									
									
									
									
										Symbolic link
									
								
							| @@ -0,0 +1 @@ | ||||
| .gitignore | ||||
| @@ -14,7 +14,7 @@ module.exports = { | ||||
|     }, | ||||
|     tsconfigRootDir: __dirname, | ||||
|     sourceType: 'module', | ||||
|     ecmaVersion: 2020, | ||||
|     ecmaVersion: 2022, | ||||
|     allowAutomaticSingleRunInference: true, | ||||
|     project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'], | ||||
|     parser: '@typescript-eslint/parser', | ||||
| @@ -23,7 +23,7 @@ module.exports = { | ||||
|     'eslint:recommended', | ||||
|     'plugin:@typescript-eslint/recommended', | ||||
|     'plugin:json/recommended', | ||||
|     'plugin:markdown/recommended', | ||||
|     'plugin:markdown/recommended-legacy', | ||||
|     'plugin:@cspell/recommended', | ||||
|     'prettier', | ||||
|   ], | ||||
| @@ -53,6 +53,7 @@ module.exports = { | ||||
|     '@typescript-eslint/no-floating-promises': 'error', | ||||
|     '@typescript-eslint/no-misused-promises': 'error', | ||||
|     '@typescript-eslint/no-unused-vars': 'warn', | ||||
|     '@typescript-eslint/consistent-type-definitions': 'error', | ||||
|     '@typescript-eslint/ban-ts-comment': [ | ||||
|       'error', | ||||
|       { | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/lychee.toml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/lychee.toml
									
									
									
									
										vendored
									
									
								
							| @@ -40,7 +40,7 @@ exclude = [ | ||||
| # BundlePhobia has frequent downtime | ||||
| "https://bundlephobia.com", | ||||
|  | ||||
| # Chrome webstore redirect issue | ||||
| # Chrome webstore migration issue. Temporary | ||||
| "https://chromewebstore.google.com" | ||||
| ] | ||||
|  | ||||
|   | ||||
							
								
								
									
										4
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							| @@ -37,13 +37,13 @@ jobs: | ||||
|         run: pnpm run build | ||||
|  | ||||
|       - name: Upload Mermaid Build as Artifact | ||||
|         uses: actions/upload-artifact@v3 | ||||
|         uses: actions/upload-artifact@v4 | ||||
|         with: | ||||
|           name: mermaid-build | ||||
|           path: packages/mermaid/dist | ||||
|  | ||||
|       - name: Upload Mermaid Mindmap Build as Artifact | ||||
|         uses: actions/upload-artifact@v3 | ||||
|         uses: actions/upload-artifact@v4 | ||||
|         with: | ||||
|           name: mermaid-mindmap-build | ||||
|           path: packages/mermaid-mindmap/dist | ||||
|   | ||||
							
								
								
									
										6
									
								
								.github/workflows/codeql.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/codeql.yml
									
									
									
									
										vendored
									
									
								
							| @@ -33,7 +33,7 @@ jobs: | ||||
|  | ||||
|       # Initializes the CodeQL tools for scanning. | ||||
|       - name: Initialize CodeQL | ||||
|         uses: github/codeql-action/init@v2 | ||||
|         uses: github/codeql-action/init@v3 | ||||
|         with: | ||||
|           config-file: ./.github/codeql/codeql-config.yml | ||||
|           languages: ${{ matrix.language }} | ||||
| @@ -45,7 +45,7 @@ jobs: | ||||
|       # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java). | ||||
|       # If this step fails, then you should remove it and run the build manually (see below) | ||||
|       - name: Autobuild | ||||
|         uses: github/codeql-action/autobuild@v2 | ||||
|         uses: github/codeql-action/autobuild@v3 | ||||
|  | ||||
|       # ℹ️ Command-line programs to run using the OS shell. | ||||
|       # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||||
| @@ -59,4 +59,4 @@ jobs: | ||||
|       #   make release | ||||
|  | ||||
|       - name: Perform CodeQL Analysis | ||||
|         uses: github/codeql-action/analyze@v2 | ||||
|         uses: github/codeql-action/analyze@v3 | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/workflows/dependency-review.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/dependency-review.yml
									
									
									
									
										vendored
									
									
								
							| @@ -17,4 +17,4 @@ jobs: | ||||
|       - name: 'Checkout Repository' | ||||
|         uses: actions/checkout@v4 | ||||
|       - name: 'Dependency Review' | ||||
|         uses: actions/dependency-review-action@v3 | ||||
|         uses: actions/dependency-review-action@v4 | ||||
|   | ||||
							
								
								
									
										56
									
								
								.github/workflows/e2e.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										56
									
								
								.github/workflows/e2e.yml
									
									
									
									
										vendored
									
									
								
							| @@ -17,9 +17,19 @@ permissions: | ||||
|   contents: read | ||||
|  | ||||
| env: | ||||
|   # For PRs and MergeQueues, the target commit is used, and for push events, github.event.previous is used. | ||||
|   targetHash: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || (github.event.before == '0000000000000000000000000000000000000000' && 'develop' || github.event.before)  }} | ||||
|  | ||||
|   # For PRs and MergeQueues, the target commit is used, and for push events to non-develop branches, github.event.previous is used if available. Otherwise, 'develop' is used. | ||||
|   targetHash: >- | ||||
|     ${{  | ||||
|       github.event.pull_request.base.sha ||  | ||||
|       github.event.merge_group.base_sha ||  | ||||
|       ( | ||||
|         ( | ||||
|           (github.event_name == 'push' && github.ref == 'refs/heads/develop') ||  | ||||
|           github.event.before == '0000000000000000000000000000000000000000' | ||||
|         ) && 'develop' | ||||
|       ) ||  | ||||
|       github.event.before | ||||
|     }} | ||||
| jobs: | ||||
|   cache: | ||||
|     runs-on: ubuntu-latest | ||||
| @@ -48,11 +58,26 @@ jobs: | ||||
|         with: | ||||
|           ref: ${{ env.targetHash }} | ||||
|  | ||||
|       - name: Install dependencies | ||||
|         if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }} | ||||
|         uses: cypress-io/github-action@v6 | ||||
|         with: | ||||
|           # just perform install | ||||
|           runTests: false | ||||
|  | ||||
|       - name: Calculate bundle size | ||||
|         if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true'}} | ||||
|         run: | | ||||
|           pnpm run build:viz | ||||
|           mkdir -p cypress/snapshots/stats/base | ||||
|           mv stats cypress/snapshots/stats/base | ||||
|  | ||||
|       - name: Cypress run | ||||
|         uses: cypress-io/github-action@v4 | ||||
|         uses: cypress-io/github-action@v6 | ||||
|         id: cypress-snapshot-gen | ||||
|         if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }} | ||||
|         with: | ||||
|           install: false | ||||
|           start: pnpm run dev | ||||
|           wait-on: 'http://localhost:9000' | ||||
|           browser: chrome | ||||
| @@ -81,20 +106,35 @@ jobs: | ||||
|       # These cached snapshots are downloaded, providing the reference snapshots. | ||||
|       - name: Cache snapshots | ||||
|         id: cache-snapshot | ||||
|         uses: actions/cache/restore@v3 | ||||
|         uses: actions/cache/restore@v4 | ||||
|         with: | ||||
|           path: ./cypress/snapshots | ||||
|           key: ${{ runner.os }}-snapshots-${{ env.targetHash }} | ||||
|  | ||||
|       - name: Install dependencies | ||||
|         uses: cypress-io/github-action@v6 | ||||
|         with: | ||||
|           runTests: false | ||||
|  | ||||
|       - name: Output size diff | ||||
|         if: ${{ matrix.containers == 1 }} | ||||
|         run: | | ||||
|           pnpm run build:viz | ||||
|           mv stats cypress/snapshots/stats/head | ||||
|           echo '## Bundle size difference' >> "$GITHUB_STEP_SUMMARY" | ||||
|           echo '' >> "$GITHUB_STEP_SUMMARY" | ||||
|           npx tsx scripts/size.ts >> "$GITHUB_STEP_SUMMARY" | ||||
|  | ||||
|       # Install NPM dependencies, cache them correctly | ||||
|       # and run all Cypress tests | ||||
|       - name: Cypress run | ||||
|         uses: cypress-io/github-action@v4 | ||||
|         uses: cypress-io/github-action@v6 | ||||
|         id: cypress | ||||
|         # If CYPRESS_RECORD_KEY is set, run in parallel on all containers | ||||
|         # Otherwise (e.g. if running from fork), we run on a single container only | ||||
|         if: ${{ ( env.CYPRESS_RECORD_KEY != '' ) || ( matrix.containers == 1 ) }} | ||||
|         with: | ||||
|           install: false | ||||
|           start: pnpm run dev:coverage | ||||
|           wait-on: 'http://localhost:9000' | ||||
|           browser: chrome | ||||
| @@ -108,7 +148,7 @@ jobs: | ||||
|           CYPRESS_COMMIT: ${{ github.sha }} | ||||
|  | ||||
|       - name: Upload Coverage to Codecov | ||||
|         uses: codecov/codecov-action@v3 | ||||
|         uses: codecov/codecov-action@v4 | ||||
|         # Run step only pushes to develop and pull_requests | ||||
|         if: ${{ steps.cypress.conclusion == 'success' && (github.event_name == 'pull_request' || github.ref == 'refs/heads/develop')}} | ||||
|         with: | ||||
| @@ -145,7 +185,7 @@ jobs: | ||||
|       - name: Save snapshots cache | ||||
|         id: cache-upload | ||||
|         if: ${{ github.event_name == 'push' && needs.e2e.result != 'failure' }} | ||||
|         uses: actions/cache/save@v3 | ||||
|         uses: actions/cache/save@v4 | ||||
|         with: | ||||
|           path: ./snapshots | ||||
|           key: ${{ runner.os }}-snapshots-${{ github.event.after }} | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/workflows/link-checker.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/link-checker.yml
									
									
									
									
										vendored
									
									
								
							| @@ -29,7 +29,7 @@ jobs: | ||||
|       - uses: actions/checkout@v4 | ||||
|  | ||||
|       - name: Restore lychee cache | ||||
|         uses: actions/cache@v3 | ||||
|         uses: actions/cache@v4 | ||||
|         with: | ||||
|           path: .lycheecache | ||||
|           key: cache-lychee-${{ github.sha }} | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/workflows/pr-labeler.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/pr-labeler.yml
									
									
									
									
										vendored
									
									
								
							| @@ -22,7 +22,7 @@ jobs: | ||||
|       pull-requests: write # write permission is required to label PRs | ||||
|     steps: | ||||
|       - name: Label PR | ||||
|         uses: release-drafter/release-drafter@v5 | ||||
|         uses: release-drafter/release-drafter@v6 | ||||
|         with: | ||||
|           config-name: pr-labeler.yml | ||||
|           disable-autolabeler: false | ||||
|   | ||||
							
								
								
									
										6
									
								
								.github/workflows/publish-docs.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/publish-docs.yml
									
									
									
									
										vendored
									
									
								
							| @@ -37,13 +37,13 @@ jobs: | ||||
|         run: pnpm install --frozen-lockfile | ||||
|  | ||||
|       - name: Setup Pages | ||||
|         uses: actions/configure-pages@v3 | ||||
|         uses: actions/configure-pages@v4 | ||||
|  | ||||
|       - name: Run Build | ||||
|         run: pnpm --filter mermaid run docs:build:vitepress | ||||
|  | ||||
|       - name: Upload artifact | ||||
|         uses: actions/upload-pages-artifact@v1 | ||||
|         uses: actions/upload-pages-artifact@v3 | ||||
|         with: | ||||
|           path: packages/mermaid/src/vitepress/.vitepress/dist | ||||
|  | ||||
| @@ -56,4 +56,4 @@ jobs: | ||||
|     steps: | ||||
|       - name: Deploy to GitHub Pages | ||||
|         id: deployment | ||||
|         uses: actions/deploy-pages@v2 | ||||
|         uses: actions/deploy-pages@v4 | ||||
|   | ||||
							
								
								
									
										4
									
								
								.github/workflows/release-draft.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/release-draft.yml
									
									
									
									
										vendored
									
									
								
							| @@ -12,11 +12,11 @@ jobs: | ||||
|   draft-release: | ||||
|     runs-on: ubuntu-latest | ||||
|     permissions: | ||||
|       contents: write # write permission is required to create a github release | ||||
|       contents: write # write permission is required to create a GitHub release | ||||
|       pull-requests: read # required to read PR titles/labels | ||||
|     steps: | ||||
|       - name: Draft Release | ||||
|         uses: release-drafter/release-drafter@v5 | ||||
|         uses: release-drafter/release-drafter@v6 | ||||
|         with: | ||||
|           disable-autolabeler: true | ||||
|         env: | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							| @@ -39,7 +39,7 @@ jobs: | ||||
|           pnpm exec vitest run ./packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts --coverage | ||||
|  | ||||
|       - name: Upload Coverage to Codecov | ||||
|         uses: codecov/codecov-action@v3 | ||||
|         uses: codecov/codecov-action@v4 | ||||
|         # Run step only pushes to develop and pull_requests | ||||
|         if: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/develop' }} | ||||
|         with: | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/workflows/update-browserlist.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/update-browserlist.yml
									
									
									
									
										vendored
									
									
								
							| @@ -19,7 +19,7 @@ jobs: | ||||
|           message: 'chore: update browsers list' | ||||
|           push: false | ||||
|       - name: Create Pull Request | ||||
|         uses: peter-evans/create-pull-request@v5 | ||||
|         uses: peter-evans/create-pull-request@v6 | ||||
|         with: | ||||
|           branch: update-browserslist | ||||
|           title: Update Browserslist | ||||
|   | ||||
| @@ -1,4 +0,0 @@ | ||||
| #!/bin/sh | ||||
| # . "$(dirname "$0")/_/husky.sh" | ||||
|  | ||||
| # npx --no-install commitlint --edit $1 | ||||
| @@ -1,4 +1,4 @@ | ||||
| #!/bin/sh | ||||
| . "$(dirname "$0")/_/husky.sh" | ||||
|  | ||||
| pnpm run pre-commit | ||||
| NODE_OPTIONS="--max_old_space_size=8192" pnpm run pre-commit | ||||
|   | ||||
| @@ -1 +1 @@ | ||||
| v20.11.1 | ||||
| 20.12.2 | ||||
|   | ||||
| @@ -3,5 +3,6 @@ | ||||
|   "printWidth": 100, | ||||
|   "singleQuote": true, | ||||
|   "useTabs": false, | ||||
|   "tabWidth": 2 | ||||
|   "tabWidth": 2, | ||||
|   "trailingComma": "es5" | ||||
| } | ||||
|   | ||||
| @@ -1,2 +1,2 @@ | ||||
| FROM node:20.11.1-alpine3.19 AS base | ||||
| FROM node:20.12.2-alpine3.19 AS base | ||||
| RUN wget -qO- https://get.pnpm.io/install.sh | ENV="$HOME/.shrc" SHELL="$(which sh)" sh - | ||||
|   | ||||
| @@ -118,11 +118,53 @@ describe('Configuration', () => { | ||||
|     it('should not taint the initial configuration when using multiple directives', () => { | ||||
|       const url = 'http://localhost:9000/regression/issue-1874.html'; | ||||
|       cy.visit(url); | ||||
|  | ||||
|       cy.get('svg'); | ||||
|       cy.window().should('have.property', 'rendered', true); | ||||
|       cy.get('svg').should('be.visible'); | ||||
|       cy.matchImageSnapshot( | ||||
|         'configuration.spec-should-not-taint-initial-configuration-when-using-multiple-directives' | ||||
|       ); | ||||
|     }); | ||||
|   }); | ||||
|  | ||||
|   describe('suppressErrorRendering', () => { | ||||
|     beforeEach(() => { | ||||
|       cy.on('uncaught:exception', (err, runnable) => { | ||||
|         return !err.message.includes('Parse error on line'); | ||||
|       }); | ||||
|     }); | ||||
|  | ||||
|     it('should not render error diagram if suppressErrorRendering is set', () => { | ||||
|       const url = 'http://localhost:9000/suppressError.html?suppressErrorRendering=true'; | ||||
|       cy.visit(url); | ||||
|       cy.window().should('have.property', 'rendered', true); | ||||
|       cy.get('#test') | ||||
|         .find('svg') | ||||
|         .should(($svg) => { | ||||
|           // all failing diagrams should not appear! | ||||
|           expect($svg).to.have.length(2); | ||||
|           // none of the diagrams should be error diagrams | ||||
|           expect($svg).to.not.contain('Syntax error'); | ||||
|         }); | ||||
|       cy.matchImageSnapshot( | ||||
|         'configuration.spec-should-not-render-error-diagram-if-suppressErrorRendering-is-set' | ||||
|       ); | ||||
|     }); | ||||
|  | ||||
|     it('should render error diagram if suppressErrorRendering is not set', () => { | ||||
|       const url = 'http://localhost:9000/suppressError.html'; | ||||
|       cy.visit(url); | ||||
|       cy.window().should('have.property', 'rendered', true); | ||||
|       cy.get('#test') | ||||
|         .find('svg') | ||||
|         .should(($svg) => { | ||||
|           // all five diagrams should be rendered | ||||
|           expect($svg).to.have.length(5); | ||||
|           // some of the diagrams should be error diagrams | ||||
|           expect($svg).to.contain('Syntax error'); | ||||
|         }); | ||||
|       cy.matchImageSnapshot( | ||||
|         'configuration.spec-should-render-error-diagram-if-suppressErrorRendering-is-not-set' | ||||
|       ); | ||||
|     }); | ||||
|   }); | ||||
| }); | ||||
|   | ||||
| @@ -844,3 +844,42 @@ end | ||||
|     }); | ||||
|   }); | ||||
| }); | ||||
|  | ||||
| describe('Title and arrow styling #4813', () => { | ||||
|   it('should render a flowchart with title', () => { | ||||
|     const titleString = 'Test Title'; | ||||
|     renderGraph( | ||||
|       `--- | ||||
|       title: ${titleString} | ||||
|       --- | ||||
|       flowchart LR | ||||
|       A-->B | ||||
|       A-->C`, | ||||
|       { flowchart: { defaultRenderer: 'elk' } } | ||||
|     ); | ||||
|     cy.get('svg').should((svg) => { | ||||
|       const title = svg[0].querySelector('text'); | ||||
|       expect(title.textContent).to.contain(titleString); | ||||
|     }); | ||||
|   }); | ||||
|  | ||||
|   it('Render with stylized arrows', () => { | ||||
|     renderGraph( | ||||
|       ` | ||||
|       flowchart LR | ||||
|       A-->B | ||||
|       B-.-oC | ||||
|       C==xD | ||||
|       D ~~~ A`, | ||||
|       { flowchart: { defaultRenderer: 'elk' } } | ||||
|     ); | ||||
|     cy.get('svg').should((svg) => { | ||||
|       const edges = svg[0].querySelectorAll('.edges path'); | ||||
|       console.log(edges); | ||||
|       expect(edges[0]).to.have.attr('pattern', 'solid'); | ||||
|       expect(edges[1]).to.have.attr('pattern', 'dotted'); | ||||
|       expect(edges[2]).to.have.css('stroke-width', '3.5px'); | ||||
|       expect(edges[3]).to.have.css('stroke-width', '1.5px'); | ||||
|     }); | ||||
|   }); | ||||
| }); | ||||
|   | ||||
| @@ -760,6 +760,51 @@ A ~~~ B | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('3258: Should render subgraphs with main graph nodeSpacing and rankSpacing', () => { | ||||
|     imgSnapshotTest( | ||||
|       `--- | ||||
|       title: Subgraph nodeSpacing and rankSpacing example | ||||
|       --- | ||||
|       flowchart LR | ||||
|         X --> Y | ||||
|         subgraph X | ||||
|           direction LR | ||||
|           A | ||||
|           C | ||||
|         end | ||||
|         subgraph Y | ||||
|           B | ||||
|           D | ||||
|         end | ||||
|       `, | ||||
|       { flowchart: { nodeSpacing: 1, rankSpacing: 1 } } | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('3258: Should render subgraphs with large nodeSpacing and rankSpacing', () => { | ||||
|     imgSnapshotTest( | ||||
|       `--- | ||||
|       title: Subgraph nodeSpacing and rankSpacing example | ||||
|       config: | ||||
|         flowchart:  | ||||
|           nodeSpacing: 250 | ||||
|           rankSpacing: 250 | ||||
|       --- | ||||
|       flowchart LR | ||||
|         X --> Y | ||||
|         subgraph X | ||||
|           direction LR | ||||
|           A | ||||
|           C | ||||
|         end | ||||
|         subgraph Y | ||||
|           B | ||||
|           D | ||||
|         end | ||||
|       ` | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   describe('Markdown strings flowchart (#4220)', () => { | ||||
|     describe('html labels', () => { | ||||
|       it('With styling and classes', () => { | ||||
| @@ -904,6 +949,18 @@ end | ||||
|         ); | ||||
|       }); | ||||
|     }); | ||||
|  | ||||
|     it('should not auto wrap when markdownAutoWrap is false', () => { | ||||
|       imgSnapshotTest( | ||||
|         `flowchart TD | ||||
|     angular_velocity["\`**angular_velocity** | ||||
|       *angular_displacement / duration* | ||||
|       [rad/s, 1/s] | ||||
|       {vector}\`"] | ||||
|     frequency["frequency\n(1 / period_duration)\n[Hz, 1/s]"]`, | ||||
|         { markdownAutoWrap: false } | ||||
|       ); | ||||
|     }); | ||||
|   }); | ||||
|   describe('Subgraph title margins', () => { | ||||
|     it('Should render subgraphs with title margins set (LR)', () => { | ||||
|   | ||||
| @@ -101,12 +101,12 @@ describe('Gantt diagram', () => { | ||||
|       title Adding GANTT diagram to mermaid | ||||
|       excludes weekdays 2014-01-10 | ||||
|       todayMarker off | ||||
|    | ||||
|  | ||||
|       section team's critical event | ||||
|       deadline A           :milestone, crit, deadlineA, 2024-02-01, 0 | ||||
|       deadline B           :milestone, crit, deadlineB, 2024-02-15, 0 | ||||
|       boss on leave        :bossaway, 2024-01-28, 2024-02-11 | ||||
|    | ||||
|  | ||||
|       section new intern | ||||
|       onboarding           :onboarding, 2024-01-02, 1w | ||||
|       literature review    :litreview, 2024-01-02, 10d | ||||
| @@ -573,7 +573,28 @@ describe('Gantt diagram', () => { | ||||
|       ` | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('should render a gantt diagram exculding friday and saturday', () => { | ||||
|     imgSnapshotTest( | ||||
|       `gantt | ||||
|       title A Gantt Diagram | ||||
|       dateFormat  YYYY-MM-DD | ||||
|       excludes weekends | ||||
|       weekend friday | ||||
|       section Section1 | ||||
|       A task :a1, 2024-02-28, 10d` | ||||
|     ); | ||||
|   }); | ||||
|   it('should render a gantt diagram exculding saturday and sunday', () => { | ||||
|     imgSnapshotTest( | ||||
|       `gantt | ||||
|       title A Gantt Diagram | ||||
|       dateFormat  YYYY-MM-DD | ||||
|       excludes weekends | ||||
|       weekend saturday | ||||
|       section Section1 | ||||
|       A task :a1, 2024-02-28, 10d` | ||||
|     ); | ||||
|   }); | ||||
|   it('should render when compact is true', () => { | ||||
|     imgSnapshotTest( | ||||
|       ` | ||||
|   | ||||
| @@ -1013,4 +1013,524 @@ gitGraph TB: | ||||
|       { gitGraph: { parallelCommits: true } } | ||||
|     ); | ||||
|   }); | ||||
|   describe('Git-Graph Bottom-to-Top Orientation Tests', () => { | ||||
|     it('50: should render a simple gitgraph with commit on main branch | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `gitGraph BT: | ||||
|          commit id: "1" | ||||
|          commit id: "2" | ||||
|          commit id: "3" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('51: should render a simple gitgraph with commit on main branch with Id | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `gitGraph BT: | ||||
|          commit id: "One" | ||||
|          commit id: "Two" | ||||
|          commit id: "Three" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('52: should render a simple gitgraph with different commitTypes on main branch | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `gitGraph BT: | ||||
|          commit id: "Normal Commit" | ||||
|          commit id: "Reverse Commit" type: REVERSE | ||||
|          commit id: "Highlight Commit" type: HIGHLIGHT | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('53: should render a simple gitgraph with tags commitTypes on main branch | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `gitGraph BT: | ||||
|          commit id: "Normal Commit with tag" tag: "v1.0.0" | ||||
|          commit id: "Reverse Commit with tag" type: REVERSE tag: "RC_1" | ||||
|          commit id: "Highlight Commit" type: HIGHLIGHT  tag: "8.8.4" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('54: should render a simple gitgraph with two branches | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `gitGraph BT: | ||||
|          commit id: "1" | ||||
|          commit id: "2" | ||||
|          branch develop | ||||
|          checkout develop | ||||
|          commit id: "3" | ||||
|          commit id: "4" | ||||
|          checkout main | ||||
|          commit id: "5" | ||||
|          commit id: "6" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('55: should render a simple gitgraph with two branches and merge commit | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `gitGraph BT: | ||||
|          commit id: "1" | ||||
|          commit id: "2" | ||||
|          branch develop | ||||
|          checkout develop | ||||
|          commit id: "3" | ||||
|          commit id: "4" | ||||
|          checkout main | ||||
|          merge develop | ||||
|          commit id: "5" | ||||
|          commit id: "6" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('56: should render a simple gitgraph with three branches and tagged merge commit | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `gitGraph BT: | ||||
|          commit id: "1" | ||||
|          commit id: "2" | ||||
|          branch nice_feature | ||||
|          checkout nice_feature | ||||
|          commit id: "3" | ||||
|          checkout main | ||||
|          commit id: "4" | ||||
|          checkout nice_feature | ||||
|          branch very_nice_feature | ||||
|          checkout very_nice_feature | ||||
|          commit id: "5" | ||||
|          checkout main | ||||
|          commit id: "6" | ||||
|          checkout nice_feature | ||||
|          commit id: "7" | ||||
|          checkout main | ||||
|          merge nice_feature id: "12345" tag: "my merge commit" | ||||
|          checkout very_nice_feature | ||||
|          commit id: "8" | ||||
|          checkout main | ||||
|          commit id: "9" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('57: should render a simple gitgraph with more than 8 branches &  overriding variables | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `%%{init: { 'logLevel': 'debug', 'theme': 'default' , 'themeVariables': { | ||||
|           'gitBranchLabel0': '#ffffff', | ||||
|           'gitBranchLabel1': '#ffffff', | ||||
|           'gitBranchLabel2': '#ffffff', | ||||
|           'gitBranchLabel3': '#ffffff', | ||||
|           'gitBranchLabel4': '#ffffff', | ||||
|           'gitBranchLabel5': '#ffffff', | ||||
|           'gitBranchLabel6': '#ffffff', | ||||
|           'gitBranchLabel7': '#ffffff', | ||||
|     } } }%% | ||||
|     gitGraph BT: | ||||
|       checkout main | ||||
|       branch branch1 | ||||
|       branch branch2 | ||||
|       branch branch3 | ||||
|       branch branch4 | ||||
|       branch branch5 | ||||
|       branch branch6 | ||||
|       branch branch7 | ||||
|       branch branch8 | ||||
|       branch branch9 | ||||
|       checkout branch1 | ||||
|       commit id: "1" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('58: should render a simple gitgraph with rotated labels | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `%%{init: { 'logLevel': 'debug', 'theme': 'default' , 'gitGraph': { | ||||
|           'rotateCommitLabel': true | ||||
|     } } }%% | ||||
|           gitGraph BT: | ||||
|           commit id: "75f7219e83b321cd3fdde7dcf83bc7c1000a6828" | ||||
|           commit id: "0db4784daf82736dec4569e0dc92980d328c1f2e" | ||||
|           commit id: "7067e9973f9eaa6cd4a4b723c506d1eab598e83e" | ||||
|           commit id: "66972321ad6c199013b5b31f03b3a86fa3f9817d" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('59: should render a simple gitgraph with horizontal labels | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `%%{init: { 'logLevel': 'debug', 'theme': 'default' , 'gitGraph': { | ||||
|           'rotateCommitLabel': false | ||||
|     } } }%% | ||||
|           gitGraph BT: | ||||
|           commit id: "Alpha" | ||||
|           commit id: "Beta" | ||||
|           commit id: "Gamma" | ||||
|           commit id: "Delta" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('60: should render a simple gitgraph with cherry pick commit | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         ` | ||||
|       gitGraph BT: | ||||
|          commit id: "ZERO" | ||||
|          branch develop | ||||
|          commit id:"A" | ||||
|          checkout main | ||||
|          commit id:"ONE" | ||||
|          checkout develop | ||||
|          commit id:"B" | ||||
|          checkout main | ||||
|          commit id:"TWO" | ||||
|          cherry-pick id:"A" | ||||
|          commit id:"THREE" | ||||
|          checkout develop | ||||
|          commit id:"C" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('61: should render a gitgraph with cherry pick commit with custom tag | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         ` | ||||
|       gitGraph BT: | ||||
|          commit id: "ZERO" | ||||
|          branch develop | ||||
|          commit id:"A" | ||||
|          checkout main | ||||
|          commit id:"ONE" | ||||
|          checkout develop | ||||
|          commit id:"B" | ||||
|          checkout main | ||||
|          commit id:"TWO" | ||||
|          cherry-pick id:"A" tag: "snapshot" | ||||
|          commit id:"THREE" | ||||
|          checkout develop | ||||
|          commit id:"C" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('62: should render a gitgraph with cherry pick commit with no tag | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         ` | ||||
|       gitGraph BT: | ||||
|          commit id: "ZERO" | ||||
|          branch develop | ||||
|          commit id:"A" | ||||
|          checkout main | ||||
|          commit id:"ONE" | ||||
|          checkout develop | ||||
|          commit id:"B" | ||||
|          checkout main | ||||
|          commit id:"TWO" | ||||
|          cherry-pick id:"A" tag: "" | ||||
|          commit id:"THREE" | ||||
|          checkout develop | ||||
|          commit id:"C" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('63: should render a simple gitgraph with two cherry pick commit | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         ` | ||||
|       gitGraph BT: | ||||
|          commit id: "ZERO" | ||||
|          branch develop | ||||
|          commit id:"A" | ||||
|          checkout main | ||||
|          commit id:"ONE" | ||||
|          checkout develop | ||||
|          commit id:"B" | ||||
|          branch featureA | ||||
|          commit id:"FIX" | ||||
|          commit id: "FIX-2" | ||||
|          checkout main | ||||
|          commit id:"TWO" | ||||
|          cherry-pick id:"A" | ||||
|          commit id:"THREE" | ||||
|          cherry-pick id:"FIX" | ||||
|          checkout develop | ||||
|          commit id:"C" | ||||
|          merge featureA | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('64: should render commits for more than 8 branches | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         ` | ||||
|         gitGraph BT: | ||||
|         checkout main | ||||
|         %% Make sure to manually set the ID of all commits, for consistent visual tests | ||||
|         commit id: "1-abcdefg" | ||||
|         checkout main | ||||
|         branch branch1 | ||||
|         commit id: "2-abcdefg" | ||||
|         checkout main | ||||
|         merge branch1 | ||||
|         branch branch2 | ||||
|         commit id: "3-abcdefg" | ||||
|         checkout main | ||||
|         merge branch2 | ||||
|         branch branch3 | ||||
|         commit id: "4-abcdefg" | ||||
|         checkout main | ||||
|         merge branch3 | ||||
|         branch branch4 | ||||
|         commit id: "5-abcdefg" | ||||
|         checkout main | ||||
|         merge branch4 | ||||
|         branch branch5 | ||||
|         commit id: "6-abcdefg" | ||||
|         checkout main | ||||
|         merge branch5 | ||||
|         branch branch6 | ||||
|         commit id: "7-abcdefg" | ||||
|         checkout main | ||||
|         merge branch6 | ||||
|         branch branch7 | ||||
|         commit id: "8-abcdefg" | ||||
|         checkout main | ||||
|         merge branch7 | ||||
|         branch branch8 | ||||
|         commit id: "9-abcdefg" | ||||
|         checkout main | ||||
|         merge branch8 | ||||
|         branch branch9 | ||||
|         commit id: "10-abcdefg" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('65: should render a simple gitgraph with three branches,custom merge commit id,tag,type | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `gitGraph BT: | ||||
|          commit id: "1" | ||||
|          commit id: "2" | ||||
|          branch nice_feature | ||||
|          checkout nice_feature | ||||
|          commit id: "3" | ||||
|          checkout main | ||||
|          commit id: "4" | ||||
|          checkout nice_feature | ||||
|          branch very_nice_feature | ||||
|          checkout very_nice_feature | ||||
|          commit id: "5" | ||||
|          checkout main | ||||
|          commit id: "6" | ||||
|          checkout nice_feature | ||||
|          commit id: "7" | ||||
|          checkout main | ||||
|          merge nice_feature id: "customID" tag: "customTag" type: REVERSE | ||||
|          checkout very_nice_feature | ||||
|          commit id: "8" | ||||
|          checkout main | ||||
|          commit id: "9" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('66: should render a simple gitgraph with a title | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `--- | ||||
|   title: simple gitGraph | ||||
|   --- | ||||
|   gitGraph BT: | ||||
|     commit id: "1-abcdefg" | ||||
|   `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('67: should render a simple gitgraph overlapping commits | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `gitGraph BT: | ||||
|          commit id:"s1" | ||||
|          commit id:"s2" | ||||
|          branch branch1 | ||||
|          commit id:"s3" | ||||
|          commit id:"s4" | ||||
|          checkout main | ||||
|          commit id:"s5" | ||||
|          checkout branch1 | ||||
|          commit id:"s6" | ||||
|          commit id:"s7" | ||||
|          merge main | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('68: should render a simple gitgraph with two branches from same commit | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `gitGraph BT: | ||||
|         commit id:"1-abcdefg" | ||||
|         commit id:"2-abcdefg" | ||||
|         branch feature-001 | ||||
|         commit id:"3-abcdefg" | ||||
|         commit id:"4-abcdefg" | ||||
|         checkout main | ||||
|         branch feature-002 | ||||
|         commit id:"5-abcdefg" | ||||
|         checkout feature-001 | ||||
|         merge feature-002 | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('69: should render GitGraph with branch that is not used immediately | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `gitGraph BT: | ||||
|         commit id:"1-abcdefg" | ||||
|         branch x | ||||
|         checkout main | ||||
|         commit id:"2-abcdefg" | ||||
|         checkout x | ||||
|         commit id:"3-abcdefg" | ||||
|         checkout main | ||||
|         merge x | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('70: should render GitGraph with branch and sub-branch neither of which used immediately | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `gitGraph BT: | ||||
|         commit id:"1-abcdefg" | ||||
|         branch x | ||||
|         checkout main | ||||
|         commit id:"2-abcdefg" | ||||
|         checkout x | ||||
|         commit id:"3-abcdefg" | ||||
|         checkout main | ||||
|         merge x | ||||
|         checkout x | ||||
|         branch y | ||||
|         checkout x | ||||
|         commit id:"4-abcdefg" | ||||
|         checkout y | ||||
|         commit id:"5-abcdefg" | ||||
|         checkout x | ||||
|         merge y | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('71: should render GitGraph with parallel commits | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `gitGraph BT: | ||||
|         commit id:"1-abcdefg" | ||||
|         commit id:"2-abcdefg" | ||||
|         branch develop | ||||
|         commit id:"3-abcdefg" | ||||
|         commit id:"4-abcdefg" | ||||
|         checkout main | ||||
|         branch feature | ||||
|         commit id:"5-abcdefg" | ||||
|         commit id:"6-abcdefg" | ||||
|         checkout main | ||||
|         commit id:"7-abcdefg" | ||||
|         commit id:"8-abcdefg" | ||||
|         `, | ||||
|         { gitGraph: { parallelCommits: true } } | ||||
|       ); | ||||
|     }); | ||||
|     it('72: should render GitGraph with unconnected branches and parallel commits | Vertical Branch - Bottom-to-top', () => { | ||||
|       imgSnapshotTest( | ||||
|         `gitGraph BT: | ||||
|         branch dev | ||||
|         branch v2 | ||||
|         branch feat | ||||
|         commit id:"1-abcdefg" | ||||
|         commit id:"2-abcdefg" | ||||
|         checkout main | ||||
|         commit id:"3-abcdefg" | ||||
|         checkout dev | ||||
|         commit id:"4-abcdefg" | ||||
|         checkout v2 | ||||
|         commit id:"5-abcdefg" | ||||
|         checkout main | ||||
|         commit id:"6-abcdefg" | ||||
|         `, | ||||
|         { gitGraph: { parallelCommits: true } } | ||||
|       ); | ||||
|     }); | ||||
|     it('73: should render a simple gitgraph with three branches and tagged merge commit using switch instead of checkout', () => { | ||||
|       imgSnapshotTest( | ||||
|         `gitGraph | ||||
|          commit id: "1" | ||||
|          commit id: "2" | ||||
|          branch nice_feature | ||||
|          switch nice_feature | ||||
|          commit id: "3" | ||||
|          switch main | ||||
|          commit id: "4" | ||||
|          switch nice_feature | ||||
|          branch very_nice_feature | ||||
|          switch very_nice_feature | ||||
|          commit id: "5" | ||||
|          switch main | ||||
|          commit id: "6" | ||||
|          switch nice_feature | ||||
|          commit id: "7" | ||||
|          switch main | ||||
|          merge nice_feature id: "12345" tag: "my merge commit" | ||||
|          switch very_nice_feature | ||||
|          commit id: "8" | ||||
|          switch main | ||||
|          commit id: "9" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('74: should render commits for more than 8 branches using switch instead of checkout', () => { | ||||
|       imgSnapshotTest( | ||||
|         ` | ||||
|         gitGraph | ||||
|         switch main | ||||
|         %% Make sure to manually set the ID of all commits, for consistent visual tests | ||||
|         commit id: "1-abcdefg" | ||||
|         switch main | ||||
|         branch branch1 | ||||
|         commit id: "2-abcdefg" | ||||
|         switch main | ||||
|         merge branch1 | ||||
|         branch branch2 | ||||
|         commit id: "3-abcdefg" | ||||
|         switch main | ||||
|         merge branch2 | ||||
|         branch branch3 | ||||
|         commit id: "4-abcdefg" | ||||
|         switch main | ||||
|         merge branch3 | ||||
|         branch branch4 | ||||
|         commit id: "5-abcdefg" | ||||
|         switch main | ||||
|         merge branch4 | ||||
|         branch branch5 | ||||
|         commit id: "6-abcdefg" | ||||
|         switch main | ||||
|         merge branch5 | ||||
|         branch branch6 | ||||
|         commit id: "7-abcdefg" | ||||
|         switch main | ||||
|         merge branch6 | ||||
|         branch branch7 | ||||
|         commit id: "8-abcdefg" | ||||
|         switch main | ||||
|         merge branch7 | ||||
|         branch branch8 | ||||
|         commit id: "9-abcdefg" | ||||
|         switch main | ||||
|         merge branch8 | ||||
|         branch branch9 | ||||
|         commit id: "10-abcdefg" | ||||
|         `, | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|   }); | ||||
| }); | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts'; | ||||
| import { imgSnapshotTest } from '../../helpers/util.ts'; | ||||
|  | ||||
| describe('Quadrant Chart', () => { | ||||
|   it('should render if only chart type is provided', () => { | ||||
| @@ -226,4 +226,52 @@ describe('Quadrant Chart', () => { | ||||
|     ); | ||||
|     cy.get('svg'); | ||||
|   }); | ||||
|  | ||||
|   it('it should render data points with styles', () => { | ||||
|     imgSnapshotTest( | ||||
|       ` | ||||
|   quadrantChart | ||||
|     title Reach and engagement of campaigns | ||||
|     x-axis Reach --> | ||||
|     y-axis Engagement --> | ||||
|     quadrant-1 We should expand | ||||
|     quadrant-2 Need to promote | ||||
|     quadrant-3 Re-evaluate | ||||
|     quadrant-4 May be improved | ||||
|     Campaign A: [0.3, 0.6] radius: 20 | ||||
|     Campaign B: [0.45, 0.23]     color: #ff0000   | ||||
|     Campaign C: [0.57, 0.69]  stroke-color: #ff00ff   | ||||
|     Campaign D: [0.78, 0.34]        stroke-width: 3px     | ||||
|     Campaign E: [0.40, 0.34] radius: 20,   color: #ff0000  , stroke-color  : #ff00ff,     stroke-width    :   3px    | ||||
|     Campaign F: [0.35, 0.78] stroke-width: 3px , color: #ff0000, radius: 20, stroke-color:     #ff00ff | ||||
|     Campaign G: [0.22, 0.22] stroke-width: 3px  , color: #309708  ,  radius  : 20  ,  stroke-color:    #5060ff | ||||
|     Campaign H: [0.22, 0.44] | ||||
|       `, | ||||
|       {} | ||||
|     ); | ||||
|     cy.get('svg'); | ||||
|   }); | ||||
|  | ||||
|   it('it should render data points with styles + classes', () => { | ||||
|     imgSnapshotTest( | ||||
|       ` | ||||
|   quadrantChart | ||||
|     title Reach and engagement of campaigns | ||||
|     x-axis Reach --> | ||||
|     y-axis Engagement --> | ||||
|     quadrant-1 We should expand | ||||
|     quadrant-2 Need to promote | ||||
|     quadrant-3 Re-evaluate | ||||
|     quadrant-4 May be improved | ||||
|     Campaign A:::class1: [0.3, 0.6] radius: 20 | ||||
|     Campaign B: [0.45, 0.23] color: #ff0000 | ||||
|     Campaign C: [0.57, 0.69] stroke-color: #ff00ff | ||||
|     Campaign D:::class2: [0.78, 0.34] stroke-width: 3px | ||||
|     Campaign E:::class2: [0.40, 0.34] radius: 20, color: #ff0000, stroke-color: #ff00ff, stroke-width: 3px | ||||
|     Campaign F:::class1: [0.35, 0.78] | ||||
|     classDef class1 color: #908342, radius : 10, stroke-color: #310085, stroke-width: 10px | ||||
|     classDef class2 color: #f00fff, radius : 10 | ||||
|     ` | ||||
|     ); | ||||
|   }); | ||||
| }); | ||||
|   | ||||
| @@ -375,7 +375,7 @@ context('Sequence diagram', () => { | ||||
|         {} | ||||
|       ); | ||||
|     }); | ||||
|     it('should have actor-top and actor-bottom classes on top and bottom actor box and symbol', () => { | ||||
|     it('should have actor-top and actor-bottom classes on top and bottom actor box and symbol and actor-box and actor-man classes for text tags', () => { | ||||
|       imgSnapshotTest( | ||||
|         ` | ||||
|         sequenceDiagram | ||||
| @@ -394,6 +394,9 @@ context('Sequence diagram', () => { | ||||
|       cy.get('.actor-man').should('have.class', 'actor-bottom'); | ||||
|       cy.get('.actor.actor-bottom').should('not.have.class', 'actor-top'); | ||||
|       cy.get('.actor-man.actor-bottom').should('not.have.class', 'actor-top'); | ||||
|  | ||||
|       cy.get('text.actor-box').should('include.text', 'Alice'); | ||||
|       cy.get('text.actor-man').should('include.text', 'Bob'); | ||||
|     }); | ||||
|     it('should render long notes left of actor', () => { | ||||
|       imgSnapshotTest( | ||||
| @@ -807,7 +810,10 @@ context('Sequence diagram', () => { | ||||
|         note left of Alice: config: mirrorActors=true<br/>directive: mirrorActors=false | ||||
|         Bob->>Alice: Short as well | ||||
|       `, | ||||
|         { logLevel: 0, sequence: { mirrorActors: true, noteFontSize: 18, noteFontFamily: 'Arial' } } | ||||
|         { | ||||
|           logLevel: 0, | ||||
|           sequence: { mirrorActors: true, noteFontSize: 18, noteFontFamily: 'Arial' }, | ||||
|         } | ||||
|       ); | ||||
|     }); | ||||
|   }); | ||||
| @@ -858,7 +864,10 @@ context('Sequence diagram', () => { | ||||
|         a->>j: Hello John, how are you? | ||||
|         j-->>a: Great! | ||||
|       `, | ||||
|         { logLevel: 0, sequence: { mirrorActors: true, noteFontSize: 18, noteFontFamily: 'Arial' } } | ||||
|         { | ||||
|           logLevel: 0, | ||||
|           sequence: { mirrorActors: true, noteFontSize: 18, noteFontFamily: 'Arial' }, | ||||
|         } | ||||
|       ); | ||||
|     }); | ||||
|     it('should support actor links and properties when not mirrored EXPERIMENTAL: USE WITH CAUTION', () => { | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css" | ||||
| @@ -33,7 +33,9 @@ | ||||
|         background-image: radial-gradient(#fff 1%, transparent 11%), | ||||
|           radial-gradient(#fff 1%, transparent 11%); | ||||
|         background-size: 20px 20px; | ||||
|         background-position: 0 0, 10px 10px; | ||||
|         background-position: | ||||
|           0 0, | ||||
|           10px 10px; | ||||
|         background-repeat: repeat; | ||||
|       } | ||||
|       .malware { | ||||
|   | ||||
| @@ -3,7 +3,7 @@ | ||||
|     <link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="UTF-8" /> | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -3,7 +3,7 @@ | ||||
|     <link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -3,7 +3,7 @@ | ||||
|     <link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -3,7 +3,7 @@ | ||||
|     <link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -21,7 +21,11 @@ sequenceDiagram | ||||
|     mermaid.initialize({ | ||||
|       theme: 'base', | ||||
|       themeVariables: {}, | ||||
|       startOnLoad: true, | ||||
|       startOnLoad: false, | ||||
|     }); | ||||
|     await mermaid.run(); | ||||
|     if (window.Cypress) { | ||||
|       window.rendered = true; | ||||
|     } | ||||
|   </script> | ||||
| </html> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
							
								
								
									
										59
									
								
								cypress/platform/suppressError.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								cypress/platform/suppressError.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,59 @@ | ||||
| <!doctype html> | ||||
| <html> | ||||
|   <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=" /> | ||||
|   </head> | ||||
|   <body> | ||||
|     <div id="test"> | ||||
|       <pre class="mermaid"> | ||||
|   flowchart | ||||
|       a[This should be visible] | ||||
|     </pre | ||||
|       > | ||||
|       <pre class="mermaid"> | ||||
|   flowchart | ||||
|     a --< b | ||||
|     </pre | ||||
|       > | ||||
|       <pre class="mermaid"> | ||||
|   flowchart | ||||
|       a[This should be visible] | ||||
|     </pre | ||||
|       > | ||||
|       <pre class="mermaid"> | ||||
|   --- | ||||
|   config: | ||||
|     suppressErrorRendering: true # This should not affect anything, as suppressErrorRendering is a secure config | ||||
|   --- | ||||
|   flowchart | ||||
|     a --< b | ||||
|     </pre | ||||
|       > | ||||
|       <pre class="mermaid"> | ||||
|   --- | ||||
|   config: | ||||
|     suppressErrorRendering: false # This should not affect anything, as suppressErrorRendering is a secure config | ||||
|   --- | ||||
|   flowchart | ||||
|     a --< b | ||||
|     </pre | ||||
|       > | ||||
|     </div> | ||||
|     <script type="module"> | ||||
|       import mermaid from './mermaid.esm.mjs'; | ||||
|       const shouldSuppress = | ||||
|         new URLSearchParams(window.location.search).get('suppressErrorRendering') === 'true'; | ||||
|       mermaid.initialize({ startOnLoad: false, suppressErrorRendering: shouldSuppress }); | ||||
|       try { | ||||
|         await mermaid.run(); | ||||
|       } catch { | ||||
|         if (window.Cypress) { | ||||
|           window.rendered = true; | ||||
|         } | ||||
|       } | ||||
|     </script> | ||||
|   </body> | ||||
| </html> | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,5 @@ | ||||
| import mermaid from './mermaid.esm.mjs'; | ||||
| import flowchartELK from './mermaid-flowchart-elk.esm.mjs'; | ||||
| import externalExample from './mermaid-example-diagram.esm.mjs'; | ||||
| import zenUml from './mermaid-zenuml.esm.mjs'; | ||||
|  | ||||
| @@ -45,7 +46,7 @@ const contentLoaded = async function () { | ||||
|       document.getElementsByTagName('body')[0].appendChild(div); | ||||
|     } | ||||
|  | ||||
|     await mermaid.registerExternalDiagrams([externalExample, zenUml]); | ||||
|     await mermaid.registerExternalDiagrams([externalExample, zenUml, flowchartELK]); | ||||
|     mermaid.initialize(graphObj.mermaid); | ||||
|     await mermaid.run(); | ||||
|   } | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|     <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" /> | ||||
|     <link | ||||
|       rel="stylesheet" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||||
|       href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/font-awesome.min.css" | ||||
|     /> | ||||
|     <link | ||||
|       href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en" xmlns="http://www.w3.org/1999/html"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -39,6 +39,8 @@ graph TB | ||||
|  | ||||
|     <script type="module"> | ||||
|       import mermaid from '/mermaid.esm.mjs'; | ||||
|       import flowchartELK from '/mermaid-flowchart-elk.esm.mjs'; | ||||
|       await mermaid.registerExternalDiagrams([flowchartELK]); | ||||
|       async function render(str) { | ||||
|         const { svg } = await mermaid.render('dynamic', str); | ||||
|         document.getElementById('dynamicDiagram').innerHTML = svg; | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
| @@ -1591,6 +1591,33 @@ | ||||
|     </pre> | ||||
|     <hr /> | ||||
|  | ||||
|     <pre class="mermaid"> | ||||
|       --- | ||||
|       title: Subgraph nodeSpacing and rankSpacing example | ||||
|       config: | ||||
|         flowchart: | ||||
|           nodeSpacing: 1 | ||||
|           rankSpacing: 1 | ||||
|       --- | ||||
|  | ||||
|       flowchart LR | ||||
|        | ||||
|       X --> Y | ||||
|        | ||||
|       subgraph X | ||||
|         direction LR | ||||
|         A | ||||
|         C | ||||
|       end | ||||
|        | ||||
|       subgraph Y | ||||
|         direction LR | ||||
|         B | ||||
|         D | ||||
|       end | ||||
|     </pre> | ||||
|     <hr /> | ||||
|  | ||||
|     <h1 id="link-clicked">Anchor for "link-clicked" test</h1> | ||||
|  | ||||
|     <script type="module"> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
							
								
								
									
										184
									
								
								demos/git.html
									
									
									
									
									
								
							
							
						
						
									
										184
									
								
								demos/git.html
									
									
									
									
									
								
							| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
| @@ -40,6 +40,19 @@ | ||||
|     checkout main | ||||
|     merge newbranch | ||||
|     </pre> | ||||
|     <pre class="mermaid"> | ||||
|       --- | ||||
|       title: Simple "branch and merge" (bottom-to-top) | ||||
|       --- | ||||
|       gitGraph BT: | ||||
|       commit | ||||
|       branch newbranch | ||||
|       checkout newbranch | ||||
|       commit | ||||
|       checkout main | ||||
|       merge newbranch | ||||
|       </pre | ||||
|     > | ||||
|     <h2>Continuous development graph</h2> | ||||
|     <pre class="mermaid"> | ||||
|     --- | ||||
| @@ -73,6 +86,23 @@ | ||||
|     checkout main | ||||
|     merge develop | ||||
|     </pre> | ||||
|     <pre class="mermaid"> | ||||
|       --- | ||||
|       title: Continuous development (bottom-to-top) | ||||
|       --- | ||||
|       gitGraph BT: | ||||
|       commit | ||||
|       branch develop | ||||
|       checkout develop | ||||
|       commit | ||||
|       checkout main | ||||
|       merge develop | ||||
|       checkout develop | ||||
|       commit | ||||
|       checkout main | ||||
|       merge develop | ||||
|       </pre | ||||
|     > | ||||
|     <h2>Merge feature to advanced main graph</h2> | ||||
|     <pre class="mermaid"> | ||||
|     --- | ||||
| @@ -100,6 +130,20 @@ | ||||
|     commit | ||||
|     merge newbranch | ||||
|     </pre> | ||||
|     <pre class="mermaid"> | ||||
|       --- | ||||
|       title: Merge feature to advanced main (bottom-to-top) | ||||
|       --- | ||||
|       gitGraph BT: | ||||
|       commit | ||||
|       branch newbranch | ||||
|       checkout newbranch | ||||
|       commit | ||||
|       checkout main | ||||
|       commit | ||||
|       merge newbranch | ||||
|       </pre | ||||
|     > | ||||
|     <h2>Two-way merges</h2> | ||||
|     <pre class="mermaid"> | ||||
|     --- | ||||
| @@ -137,6 +181,25 @@ | ||||
|     checkout main | ||||
|     merge develop | ||||
|     </pre> | ||||
|     <pre class="mermaid"> | ||||
|       --- | ||||
|       title: Two-way merges (bottom-to-top) | ||||
|       --- | ||||
|       gitGraph BT: | ||||
|       commit | ||||
|       branch develop | ||||
|       checkout develop | ||||
|       commit | ||||
|       checkout main | ||||
|       merge develop | ||||
|       commit | ||||
|       checkout develop | ||||
|       merge main | ||||
|       commit | ||||
|       checkout main | ||||
|       merge develop | ||||
|       </pre | ||||
|     > | ||||
|     <h2>Cherry-pick from branch graph</h2> | ||||
|     <pre class="mermaid"> | ||||
|     --- | ||||
| @@ -170,6 +233,22 @@ | ||||
|     checkout main | ||||
|     cherry-pick id: "Pick me" | ||||
|     </pre> | ||||
|     <pre class="mermaid"> | ||||
|       --- | ||||
|       title: Cherry-pick from branch (bottom-to-top) | ||||
|       --- | ||||
|       gitGraph BT: | ||||
|       commit | ||||
|       branch newbranch | ||||
|       checkout newbranch | ||||
|       commit id: "Pick me" | ||||
|       checkout main | ||||
|       commit | ||||
|       checkout newbranch | ||||
|       commit | ||||
|       checkout main | ||||
|       cherry-pick id: "Pick me" | ||||
|     </pre> | ||||
|     <h2>Cherry-pick from main graph</h2> | ||||
|     <pre class="mermaid"> | ||||
|     --- | ||||
| @@ -199,6 +278,21 @@ | ||||
|     commit | ||||
|     cherry-pick id: "A" | ||||
|     </pre> | ||||
|     <pre class="mermaid"> | ||||
|       --- | ||||
|       title: Cherry-pick from main (bottom-to-top) | ||||
|       --- | ||||
|       gitGraph BT: | ||||
|       commit | ||||
|       branch develop | ||||
|       commit | ||||
|       checkout main | ||||
|       commit id:"A" | ||||
|       checkout develop | ||||
|       commit | ||||
|       cherry-pick id: "A" | ||||
|       </pre | ||||
|     > | ||||
|     <h2>Cherry-pick then merge graph</h2> | ||||
|     <pre class="mermaid"> | ||||
|     --- | ||||
| @@ -234,6 +328,24 @@ | ||||
|     cherry-pick id: "Pick me" | ||||
|     merge newbranch | ||||
|     </pre> | ||||
|     <pre class="mermaid"> | ||||
|       --- | ||||
|       title: Cherry-pick then merge (bottom-to-top) | ||||
|       --- | ||||
|       gitGraph BT: | ||||
|       commit | ||||
|       branch newbranch | ||||
|       checkout newbranch | ||||
|       commit id: "Pick me" | ||||
|       checkout main | ||||
|       commit | ||||
|       checkout newbranch | ||||
|       commit | ||||
|       checkout main | ||||
|       cherry-pick id: "Pick me" | ||||
|       merge newbranch | ||||
|       </pre | ||||
|     > | ||||
|     <h2>Merge from main onto undeveloped branch graph</h2> | ||||
|     <pre class="mermaid"> | ||||
|     --- | ||||
| @@ -261,6 +373,20 @@ | ||||
|     checkout develop | ||||
|     merge main | ||||
|     </pre> | ||||
|     <pre class="mermaid"> | ||||
|       --- | ||||
|       title: Merge from main onto undeveloped branch (bottom-to-top) | ||||
|       --- | ||||
|       gitGraph BT: | ||||
|       commit | ||||
|       branch develop | ||||
|       commit | ||||
|       checkout main | ||||
|       commit | ||||
|       checkout develop | ||||
|       merge main | ||||
|       </pre | ||||
|     > | ||||
|     <h2>Merge from main onto developed branch graph</h2> | ||||
|     <pre class="mermaid"> | ||||
|     --- | ||||
| @@ -290,6 +416,21 @@ | ||||
|     commit | ||||
|     merge main | ||||
|     </pre> | ||||
|     <pre class="mermaid"> | ||||
|       --- | ||||
|       title: Merge from main onto developed branch (bottom-to-top) | ||||
|       --- | ||||
|       gitGraph BT: | ||||
|       commit | ||||
|       branch develop | ||||
|       commit | ||||
|       checkout main | ||||
|       commit | ||||
|       checkout develop | ||||
|       commit | ||||
|       merge main | ||||
|       </pre | ||||
|     > | ||||
|     <h2>Two branches from same commit graph</h2> | ||||
|     <pre class="mermaid"> | ||||
|     --- | ||||
| @@ -323,6 +464,23 @@ | ||||
|     checkout feature-001 | ||||
|     merge feature-002 | ||||
|     </pre> | ||||
|     <pre class="mermaid"> | ||||
|       --- | ||||
|       title: Two branches from same commit (bottom-to-top) | ||||
|       --- | ||||
|       gitGraph BT: | ||||
|       commit | ||||
|       commit | ||||
|       branch feature-001 | ||||
|       commit | ||||
|       commit | ||||
|       checkout main | ||||
|       branch feature-002 | ||||
|       commit | ||||
|       checkout feature-001 | ||||
|       merge feature-002 | ||||
|       </pre | ||||
|     > | ||||
|     <h2>Three branches and a cherry-pick from each graph</h2> | ||||
|     <pre class="mermaid"> | ||||
|     --- | ||||
| @@ -372,6 +530,30 @@ | ||||
|     commit id:"C" | ||||
|     merge featureA | ||||
|     </pre> | ||||
|     <pre class="mermaid"> | ||||
|     --- | ||||
|     title: Three branches and a cherry-pick from each (bottom-to-top) | ||||
|     --- | ||||
|     gitGraph BT: | ||||
|     commit id: "ZERO" | ||||
|     branch develop | ||||
|     commit id:"A" | ||||
|     checkout main | ||||
|     commit id:"ONE" | ||||
|     checkout develop | ||||
|     commit id:"B" | ||||
|     branch featureA | ||||
|     commit id:"FIX" | ||||
|     commit id: "FIX-2" | ||||
|     checkout main | ||||
|     commit id:"TWO" | ||||
|     cherry-pick id:"A" | ||||
|     commit id:"THREE" | ||||
|     cherry-pick id:"FIX" | ||||
|     checkout develop | ||||
|     commit id:"C" | ||||
|     merge featureA | ||||
|     </pre> | ||||
|     <script type="module"> | ||||
|       import mermaid from './mermaid.esm.mjs'; | ||||
|       const ALLOWED_TAGS = [ | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
| @@ -18,6 +18,7 @@ | ||||
|     <p> | ||||
|       Some of these pages have duplicates; some are slow to load because they have so many graphs. | ||||
|     </p> | ||||
|     <p>You can test custom code in the <a href="./dev/example.html">development page</a>.</p> | ||||
|     <p> | ||||
|       If you'd like to clean up one of the pages, please feel free to | ||||
|       <a href="https://github.com/mermaid-js/mermaid/pulls">submit a pull request (PR).</a> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en" xmlns="http://www.w3.org/1999/html"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <!DOCTYPE html> | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8" /> | ||||
|   | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user