Commit Graph

2195 Commits

Author SHA1 Message Date
Alois Klink 0dca4d3393
fix(git): support numeric branch names
gitGraph does not support branch names that start with a number,
because the gitGraph.jison file parses these as NUM (number) instead.

To fix this, I've changed the NUM parser to only accept strings that
end with whitespace (e.g 1234 is a NUM, but 1234abc is not a NUM).
To do this, I had to move the "skip all whitespace" step to the
end of the parser, but this doesn't seem to have caused any issues,
so it's probably fine.
2022-09-01 17:24:00 +01:00
Sidharth Vinod 7aeb60f42a
Merge branch 'develop' into sidv/esbuild
* develop: (50 commits)
  Typo fix
  Fix repo URL
  Revert flowchart change
  Revert flowchart change
  Fix TODO Qs
  chore(deps-dev): bump @commitlint/cli from 17.1.1 to 17.1.2
  chore(deps-dev): bump terser-webpack-plugin from 5.3.5 to 5.3.6
  chore(deps-dev): bump webpack-dev-server from 4.10.0 to 4.10.1
  Fix gitGraph findLane function error
  Update dependabot.yml
  Replacing replaceAll with replace
  Rework 'parseDuration' as a pure duration parsing
  Supports duration in decimal
  Create a more consistent 'parseDuration'
  Remove `@ts-ignore`s.
  Fix svgDraw return types
  ...
2022-09-01 20:38:21 +05:30
Sidharth Vinod 1ced01c7f6
Typo fix 2022-09-01 20:21:13 +05:30
Sidharth Vinod e46d9c1173
Merge branch 'develop' into sidv/typescript
* develop:
  chore(deps-dev): bump @commitlint/cli from 17.1.1 to 17.1.2
  chore(deps-dev): bump terser-webpack-plugin from 5.3.5 to 5.3.6
  chore(deps-dev): bump webpack-dev-server from 4.10.0 to 4.10.1
  Fix gitGraph findLane function error
  Replacing replaceAll with replace
  Rework 'parseDuration' as a pure duration parsing
  Supports duration in decimal
  Create a more consistent 'parseDuration'
  Fix svgDraw return types
  Add more tests
  Fix nested types
  Fix nested types
  Add nested test
  Updating to version to 9.1.6
2022-09-01 20:06:42 +05:30
Knut Sveidqvist ac76fb73a8
Merge pull request #3360 from vallsv/feature-ms-duration
Feature decimal duration in second for gantt diagram
2022-09-01 16:23:42 +02:00
Knut Sveidqvist 694692fb5d
Merge pull request #3354 from mermaid-js/sidv/tsAnnotation
Add nested test for parseGenericTypes
2022-09-01 16:21:46 +02:00
Knut Sveidqvist 3502fb46f8
Merge pull request #3383 from hughli-git/fix_git_stack_exceeded
Fix gitGraph findLane function error
2022-09-01 16:00:43 +02:00
Knut Sveidqvist bacdd49176
Merge pull request #3380 from mermaid-js/3056_Chrome_Compatibility
3056 chrome compatibility
2022-09-01 15:59:46 +02:00
Knut Sveidqvist 065a3176b8
Merge pull request #3379 from mermaid-js/3238_Gitgraph_merge_commits
3238 gitgraph merge commits
2022-09-01 15:57:43 +02:00
Sidharth Vinod 4fa0d366db
Revert flowchart change 2022-09-01 19:17:31 +05:30
Sidharth Vinod 36be8114d0
Revert flowchart change 2022-09-01 19:16:15 +05:30
Sidharth Vinod 8c85c10212
Fix TODO Qs 2022-09-01 18:40:28 +05:30
Knut Sveidqvist 2fbdfdbf6a Fix for unit tests after refactoring 2022-09-01 14:31:26 +02:00
Knut Sveidqvist 558ef8a2db #448 Size calculations 2022-09-01 14:25:47 +02:00
Knut Sveidqvist 68f8010ab9 Merge branch 'develop' into minmaps 2022-09-01 13:42:21 +02:00
Knut Sveidqvist 654dfa6b3d #448 Fixing issue with icon size for the root node 2022-09-01 13:39:00 +02:00
Sidharth Vinod 965df4fdf4
ESBuild 2022-08-31 23:59:32 +05:30
hughligit 9d5e855e8e
Fix gitGraph findLane function error
findLane may infinite loop after recursive call, then cause RangeError: Maximum call stack size exceeded.
2022-08-31 16:51:36 +08:00
Sidharth Vinod 9b319a55f6
Merge branch 'develop' into sidv/typescript
* develop:
  chore(deps-dev): bump @commitlint/cli from 17.0.3 to 17.1.1 (#3376)
  chore(deps-dev): bump eslint from 8.22.0 to 8.23.0 (#3378)
  chore(deps): bump dompurify from 2.3.10 to 2.4.0 (#3375)
  chore(deps-dev): bump @commitlint/config-conventional (#3370)
  chore(deps-dev): bump @babel/core from 7.18.10 to 7.18.13 (#3373)
  chore(deps-dev): bump eslint-plugin-jest from 26.8.7 to 27.0.1 (#3372)
  chore(deps-dev): bump jest-environment-jsdom from 28.1.3 to 29.0.1 (#3369)
  chore(deps-dev): bump babel-jest from 28.1.3 to 29.0.1 (#3368)
  Updating docs to latest mermaid version
  build: add eslint --cache file
  Adjusting size and test
  Updated viewBox settings
  Border
  feat(git): allow custom merge commit ids
  Document line curve options
  Added 'ms' duration
  Fix font weight for messages in sequence diagrams
  Added lollipop feature for updated codebase
2022-08-31 11:34:59 +05:30
Knut Sveidqvist 3400c19277 Merge branch 'minmaps' of github.com:mermaid-js/mermaid into minmaps 2022-08-30 21:38:48 +02:00
Knut Sveidqvist f14971e908 Some theming/styling fixes 2022-08-30 21:37:26 +02:00
Knut Sveidqvist 18d95e479c Fix for issue with comments 2022-08-30 21:35:21 +02:00
Knut Sveidqvist 6966ca47d1 Size updates 2022-08-30 21:33:09 +02:00
ashishj 8f107026a9 Merge branch 'develop' into 3056_Chrome_Compatibility 2022-08-30 19:57:38 +02:00
ashishj c846b48882 Replacing replaceAll with replace 2022-08-30 19:55:01 +02:00
ashishj 7068f6c08a #3238 Added test cases 2022-08-30 18:32:06 +02:00
Ashish Jain 5b63260240
Merge pull request #3311 from may4everL/1145_lollipop_interface
Added lollipop feature for updated codebase
2022-08-30 18:16:49 +02:00
ashishj d2aaf6aad9 #3238 Merge from 'develop' 2022-08-30 18:11:10 +02:00
Ashish Jain d7e0888801
Merge pull request #3361 from aloisklink/feature/3356_git_custom_merge_commit_id
feat(git): allow custom merge commit ids
2022-08-30 17:50:57 +02:00
ashishj e542339ed1 Merge branch 'develop' into 3238_Gitgraph_merge_commits 2022-08-30 17:44:02 +02:00
ashishj 2229a307a1 #3238 Enhancing the merge commit functionality 2022-08-30 17:42:42 +02:00
Knut Sveidqvist 4cdc6e4a0d Merge branch 'minmaps' of github.com:mermaid-js/mermaid into minmaps 2022-08-28 14:25:15 +02:00
Knut Sveidqvist f350ff9852 Merge branch 'minmaps' of github.com:mermaid-js/mermaid into minmaps 2022-08-28 14:25:02 +02:00
Knut Sveidqvist 6ab0eef6f3 Merge branch 'develop'
Conflicts:
	cypress/platform/knsv.html
2022-08-28 14:22:56 +02:00
Knut Sveidqvist e6e7bdcb55 #2824 Size changes and updated regressionstest afters diagram sizing changes 2022-08-28 11:25:09 +02:00
Knut Sveidqvist 3b93c39249 Adjusting size and test 2022-08-27 15:11:43 +02:00
Knut Sveidqvist 2968b400c4 Updated viewBox settings 2022-08-27 15:03:29 +02:00
Knut Sveidqvist d0d5739ab0 Merge branch 'develop' into minmaps 2022-08-27 12:35:30 +02:00
Alois Klink b2f5ba3ee8
feat(git): allow custom merge commit ids
Currently, merge commits can have a git tag, but they cannot have a
custom git commit ID.

This commit allows modifying the default merge commit id.
It also displays all merge commits IDs, which undoes
3ccf027f42
2022-08-25 23:42:39 +01:00
Valentin Valls ba4f7d2ceb Rework 'parseDuration' as a pure duration parsing 2022-08-25 23:15:28 +02:00
Valentin Valls 3315ae8382 Supports duration in decimal 2022-08-25 23:15:28 +02:00
Valentin Valls f7b8d1ac07 Create a more consistent 'parseDuration'
- Remove 'durationToDate' which was not a usable function
2022-08-25 23:15:28 +02:00
Sidharth Vinod a3dfc4c0e8
Remove `@ts-ignore`s.
Co-authored-by: Yash Singh <saiansh2525@gmail.com>
2022-08-25 21:53:36 +05:30
Sidharth Vinod 15b160c553
Fix svgDraw return types
Co-authored-by: FlorianWoelki <FlorianWoelki@gmx.de>
2022-08-25 12:41:32 +05:30
Sidharth Vinod 39980322bd
Add more tests 2022-08-25 11:59:01 +05:30
Sidharth Vinod 2f7930efb7
Fix nested types
Co-authored-by: FlorianWoelki <FlorianWoelki@gmx.de>
2022-08-25 11:58:43 +05:30
Sidharth Vinod 5996e1e69d
Fix nested types
Co-authored-by: FlorianWoelki <FlorianWoelki@gmx.de>
2022-08-25 08:49:20 +05:30
Yash Singh cde3a7cf70
Merge pull request #3355 from vallsv/feature-ms-duration 2022-08-24 16:07:45 -07:00
Valentin Valls 0583c4fa25 Added 'ms' duration 2022-08-24 22:26:39 +02:00
Fabien Savy a3ace00ed4 Fix font weight for messages in sequence diagrams 2022-08-24 17:07:56 +02:00
Sidharth Vinod c37ff47ee3
Add nested test 2022-08-24 12:33:32 +05:30
Sidharth Vinod 84148d4891
Remove failing test 2022-08-24 12:32:15 +05:30
Sidharth Vinod 60651fdfe0
Merge branch 'develop' into sidv/typescript
* develop: (22 commits)
  Fix for build by revering jsdoc
  Revert "chore(deps-dev): bump documentation from 13.2.0 to 14.0.0"
  Review comments.
  Add test for handling parameter names that are "default"
  Add test for handling parameter names that are keywords
  Add test for handling trailing whitespaces
  Add first C4 parser test
  chore(deps-dev): bump eslint-plugin-jest from 26.8.2 to 26.8.7
  chore(deps-dev): bump documentation from 13.2.0 to 14.0.0
  chore(deps-dev): bump terser-webpack-plugin from 5.3.4 to 5.3.5
  chore(deps-dev): bump prettier-plugin-jsdoc from 0.3.38 to 0.4.1
  test(e2e): add array and generic attributes erDiagram test
  test(common): add generic parser test
  test(parser): add tests for generics and arrays in erDiagram
  feat: add array and generic symbols for erDiagram
  Lint markdown
  Fix prettier formatting in vscode
  Prettier
  Fix `securityLevel` docs
  Update README.md
  ...
2022-08-24 11:38:23 +05:30
Sidharth Vinod 1efd5c7d58
Cleanup 2022-08-24 11:32:27 +05:30
Knut Sveidqvist fd70b862ed
Merge pull request #3332 from lorint/docs/grammatical_touch_ups
Grammatical touch-ups to documentation
2022-08-23 20:18:03 +02:00
Knut Sveidqvist 11809e799b
Merge pull request #3334 from mermaid-js/sidv/fixDoc
Add `sandbox` to `securityLevel` docs
2022-08-23 20:10:06 +02:00
Knut Sveidqvist c50745323a
Merge pull request #3335 from FlorianWoelki/feature/3171_erDiagram_more_symbols
Add generic and array symbols to `erDiagram`
2022-08-23 20:07:06 +02:00
Sidharth Vinod 248a7aff7a
Review comments. 2022-08-23 21:49:01 +05:30
Sidharth Vinod a8042f622f
Merge branch 'sidv/typescript' of https://github.com/mermaid-js/mermaid into sidv/typescript
* 'sidv/typescript' of https://github.com/mermaid-js/mermaid:
  Update src/config.ts
2022-08-23 21:35:43 +05:30
Sidharth Vinod 32ba2d5ffe
Remove console.logs 2022-08-23 21:35:33 +05:30
Daniel Bartholomae 8c56f68a06 Add test for handling parameter names that are "default" 2022-08-23 16:15:38 +02:00
Daniel Bartholomae 2cf9348f53 Add test for handling parameter names that are keywords 2022-08-23 16:12:16 +02:00
Daniel Bartholomae d97ce7eab8 Add test for handling trailing whitespaces 2022-08-23 16:12:16 +02:00
Daniel Bartholomae 0c8f7163db Add first C4 parser test 2022-08-23 16:12:16 +02:00
Knut Sveidqvist 0e0802a588
Update src/config.ts
Agree!

Co-authored-by: Sidharth Vinod <sidharthv96@gmail.com>
2022-08-22 17:48:09 +02:00
Sidharth Vinod 9a0d5e31b7
fix: review comments 2022-08-22 17:12:05 +05:30
Sidharth Vinod 6291e4dcdd
fix detectType 2022-08-22 13:30:10 +05:30
Sidharth Vinod 9f49259bca
fix detectType 2022-08-22 13:29:55 +05:30
Sidharth Vinod 4885e7b7f1
fix detectType 2022-08-22 13:29:25 +05:30
Sidharth Vinod 1549eb20df
tsConversion: fix DiagramAPI 2022-08-22 13:18:50 +05:30
Sidharth Vinod c245a2da07
tsConversion: rename DiagramAPI 2022-08-22 12:59:23 +05:30
Sidharth Vinod d365dacbf7
tsConversion: mermaidAPI 2022-08-22 11:10:30 +05:30
Sidharth Vinod 39aaf2f813
tsConversion: fix paths, add d.ts to output 2022-08-21 22:27:13 +05:30
Sidharth Vinod d97b3807b9
fix: startOnLoad 2022-08-21 19:32:21 +05:30
Sidharth Vinod a51d8e844b
Merge branch 'develop' into sidv/typescript
* develop:
  Fix #3009 Update main
  #3243 Adding disabled testcase for diagram with leading \n
2022-08-21 19:24:15 +05:30
Sidharth Vinod c68ec54fdd
tsConversion: mermaid main 2022-08-21 18:37:27 +05:30
Knut Sveidqvist 280c7e8da1 #3243 Adding disabled testcase for diagram with leading \n 2022-08-21 11:05:13 +02:00
Sidharth Vinod cd4b1ea245
fix: codeScanning vuln 2022-08-21 11:45:20 +05:30
Sidharth Vinod 4710f67baf
fix: sanitization bug 2022-08-21 11:26:45 +05:30
Sidharth Vinod f14f0d9857
tsConversion: config & common 2022-08-21 11:00:22 +05:30
Sidharth Vinod 238cbd14ca
tsConversion: styles 2022-08-21 08:54:27 +05:30
Sidharth Vinod d9bace053b
Add `trace` logLevel 2022-08-21 08:45:17 +05:30
Sidharth Vinod fab9688135
tsConversion: flowchartStyles 2022-08-21 01:21:47 +05:30
Sidharth Vinod 896154d89f
tsConversion: logger 2022-08-21 00:59:54 +05:30
Sidharth Vinod c9cd56914f
tsConversion: errorRenderer 2022-08-21 00:59:27 +05:30
Sidharth Vinod 95dbbb350b
tsConversion: DetectType 2022-08-21 00:38:26 +05:30
Sidharth Vinod 88e17bf1b4
Typescript init 2022-08-20 23:40:52 +05:30
FlorianWoelki e19581b540 test(common): add generic parser test 2022-08-20 14:08:53 +02:00
FlorianWoelki ecf62e3b7a test(parser): add tests for generics and arrays in erDiagram 2022-08-20 13:56:39 +02:00
FlorianWoelki ea3573c989 feat: add array and generic symbols for erDiagram 2022-08-20 13:42:51 +02:00
Lorin Thwaits e1977dd889 Remove duplicate spec 2022-08-19 21:27:22 +01:00
Lorin Thwaits 6635d4bc97 Grammatical touch-ups 2022-08-19 21:27:13 +01:00
Knut Sveidqvist 02fc68a3f6
Merge pull request #3330 from mermaid-js/3306_Fix_Gitgraph_Parsing_Issue
Fix for GitGraphs not working for Mermaid Live Editor
2022-08-18 19:43:17 +02:00
ashishj a9e798c399 Making sure to addDiagrams before detectType call 2022-08-18 19:39:32 +02:00
Knut Sveidqvist 1befbe08ff #3308 Allowing br tags in tooltips 2022-08-18 19:11:33 +02:00
ashishj b21cb43639 Moved diagram registration out of initialize func 2022-08-18 17:54:42 +02:00
Ashish Jain 52fcb92f51
Merge pull request #3277 from alguerocode/clean-code-1
code syntax improvment (initialize func)
2022-08-18 17:01:02 +02:00
Knut Sveidqvist cb4b60e8e4
Merge pull request #3310 from hrgui/fix/3305-subsequent-diagrams-issue
fix(Diagram): fix persisted data due to db not being cleared before parsing
2022-08-11 18:55:23 +02:00
Knut Sveidqvist bf4272102d #3313 Packaging the thrown error in reconised structure 2022-08-11 18:24:14 +02:00
may4everL 7257bba3f3 Added lollipop feature for updated codebase 2022-08-09 22:44:11 -07:00
Harman Goei 6e5eeb7215 fix(Diagram): C4C diagram does not have a db.clear method 2022-08-09 22:22:40 -07:00
Harman Goei a5aef9e330 fix(Diagram): fix persisted data due to db not being cleared before parsing 2022-08-09 21:41:07 -07:00
Knut Sveidqvist d32c8534cb Bugfix for empty blank lines 2022-08-09 18:39:20 +02:00
Knut Sveidqvist 9b54feab84 Merge branch 'develop' into minmaps 2022-08-06 10:53:54 +02:00
Knut Sveidqvist afe343e94f Changes after merge 2022-08-06 10:49:32 +02:00
Knut Sveidqvist 44cb1acbb2 Fix for broken test 2022-08-04 13:16:48 +02:00
Knut Sveidqvist b0074bf723
Merge pull request #3222 from leon19/bugfix/incorrect-label-padding
fix: remove right padding when a label contains HTML entities
2022-08-04 13:06:46 +02:00
Knut Sveidqvist aa9149912d Merge branch 'bug/3011_multiline_alignment' of github.com:hype09/mermaid into hype09-bug/3011_multiline_alignment 2022-08-04 13:05:17 +02:00
salah alhashmi fb6bf87161 code syntax improvment (initialize func) 2022-08-03 14:16:02 +04:00
Muhammad Faisal Bin Arba'in 846531363e PR comments 2022-08-01 19:41:53 +08:00
Muhammad Faisal Bin Arba'in 91e369a840 rename const name 2022-08-01 19:41:53 +08:00
Muhammad Faisal Bin Arba'in 81ff4416dc rotate class id when branch more than 8 2022-08-01 19:41:53 +08:00
Knut Sveidqvist ffe520db06 Curved edges 2022-07-29 15:06:21 +02:00
Knut Sveidqvist 00fe5d477d Different hanlding of icons for circles 2022-07-28 20:38:25 +02:00
Knut Sveidqvist ca3f4559ef Fix 2022-07-27 19:10:06 +02:00
Knut Sveidqvist 1a205aeccc Adding icon support 2022-07-27 18:40:44 +02:00
Knut Sveidqvist 82a480d924 Adding circle node type and class handling 2022-07-27 17:25:20 +02:00
Knut Sveidqvist 2d361964ce Better padding handling in nodes 2022-07-27 10:24:27 +02:00
Knut Sveidqvist 03d71829c6 Adding default node form 2022-07-27 09:43:25 +02:00
Lorens León c40368b0fa fix: remove right padding when a label contains HTML entities
Decode the HTML entities from the label text before adding them to the
HTML this prevents a miss-calculation of the label text length
2022-07-26 21:50:36 +02:00
Knut Sveidqvist 0b2ca29ae8 Theme support for mindmaps 2022-07-25 17:03:18 +02:00
Knut Sveidqvist f815bd08b7 Adjusting the width of the boxes based on the text in the boxes 2022-07-25 14:22:07 +02:00
Knut Sveidqvist 15f1cdf3aa Draft of edge rendering 2022-07-24 17:45:54 +02:00
Knut Sveidqvist 8e5e212c49 Layout algorithm in place 2022-07-24 11:05:54 +02:00
Knut Sveidqvist 7de68f0bf2 Adding text wrap and logic for placing nodes in the svg 2022-07-23 10:16:54 +02:00
Knut Sveidqvist 6029c5371e First take on grammar 2022-07-21 16:07:18 +02:00
Knut Sveidqvist 8681e78e50 Fixes for rendering tests 2022-07-20 14:39:01 +02:00
Knut Sveidqvist 4c30e03f1e Using diagram api to add gitGraph 2022-07-18 16:00:03 +02:00
Knut Sveidqvist 0d4b09a0a0 Handle legacy state diagram and start using Generic diagram in mermaidAPI 2022-07-04 22:55:11 +02:00
Knut Sveidqvist 408c08d2a3 Fix for v2 class diagram 2022-07-04 22:41:09 +02:00
Knut Sveidqvist 10f56129c1 Fix for legacy class diagram 2022-07-04 19:37:56 +02:00
Knut Sveidqvist bc6830cbdb Handling of requirement diagrams using the generic diagram 2022-07-04 18:50:50 +02:00
Knut Sveidqvist c5f78077ff Fix for broken tests 2022-07-04 18:22:36 +02:00
Knut Sveidqvist 682a1404ca Fixes for erDiagram, pie charts and journey diagram 2022-07-04 18:11:58 +02:00
Knut Sveidqvist 5318ec6dbf Handling gantt and flowchart-v2 2022-07-04 15:33:39 +02:00
Knut Sveidqvist 490ddd9a15 Fix for tests 2022-07-04 14:25:25 +02:00
Knut Sveidqvist 1675174b2a Fix for flowcharts 2022-07-04 12:37:50 +02:00
Knut Sveidqvist 48ad6e6042 Merge branch 'develop' into 3061_refactoring_and_modularisation 2022-07-04 11:38:52 +02:00
Knut Sveidqvist bedc9399c5 Updating c4 and sequence 2022-07-04 11:29:38 +02:00
Paik Paustian ed29fe1aa9 Fix #3011: Support left- and right-alignment for multi-line messages and notes
Previously, messages and notes that had multiple lines (via `<br>`-tags) were only displayed correctly
when using the default `center` value for the `messageAlign` and `noteAlign` configuration options.
Using `left` or `right` for the alignment options caused the text to collapse and become illegible,
as outlined in issue #3011.

This comes as a side-effect from how the internal `valign` text-rendering option was configured for
messages and notes:

```js
// Example from `sequenceRenderer.js: drawMessage()`
textObj.anchor = conf.messageAlign;
textObj.valign = conf.messageAlign;
```

Both the `anchor` option (which controls left-right alignment) and the `valign` option (which controls
vertical top-down placement) were set to the same value, the user-provided `messageAlign` config option.

While `left` and `right` are valid values for the `anchor` option, they were effectively no-ops for the
`valign` option, which only supports `top`, `start`, `middle`, `center`, `bottom`, and `end`.

To fix the issue, the `valign` property is now always set to `center` for notes and messages.
Similarly, the `dominantBaseline` option of texts is now always set to `middle`, rather than setting it to
either `text-{before,after}-edge`, which caused left-aligned multi-line text to always be "top-left" aligned
inside a note (or "bottom-right" when attempting to right-align).

Now, texts in messages and notes are always vertically centered and alignment options correctly apply for
both single and multi-line content.
2022-07-03 11:59:57 +02:00
Sidharth Vinod 5b15865d30
fix #3184: Inject xlink in mermaidAPI. (#3185)
* fix #3184: Inject xlink in mermaidAPI.

* fix static analysis
2022-07-03 10:37:27 +02:00
ashishj 1dfddfde54 Merge branch 'release/9.1.3' into 3061_refactoring_and_modularisation 2022-06-28 20:12:03 +02:00
Ashish Jain 1f4c1c3a6c
Merge pull request #3140 from mermaid-js/#3095-Gitgrph-Font-Size
#3095 Added support for commit & tag label font size
2022-06-28 19:11:16 +02:00
Ashish Jain cc45f3ca01
Merge pull request #3151 from pinghe/develop
Add C4 Diagram. Compatible with C4-PlantUML syntax (2). #3038
2022-06-28 19:10:42 +02:00
Ashish Jain 259abb081a
Merge pull request #3176 from yutotnh/fix-typo
Fix typo
2022-06-28 19:01:35 +02:00
Knut Sveidqvist 0ae1bdb61a
Merge pull request from GHSA-x3vm-38hw-55wf
CSS Injection security issue
2022-06-28 18:55:12 +02:00
Knut Sveidqvist 5110e42786 Better balance check 2022-06-28 18:50:41 +02:00
yutotnh 0d6109c7a8
Merge branch 'develop' into fix-typo 2022-06-27 12:43:55 +09:00
yutotnh 4d4b77f39f
fix: typo for source 2022-06-27 12:34:28 +09:00
Knut Sveidqvist 8484d55a6a Fix fir tests 2022-06-26 21:30:49 +02:00
Knut Sveidqvist 0a55cda0a9 Rendering statediagram v2 using the diagram passed from mermaidAPI 2022-06-26 21:05:30 +02:00
Knut Sveidqvist 2480a5eaa2 Merge remote-tracking branch 'origin/develop' into 3061_refactoring_and_modularisation 2022-06-26 14:28:11 +02:00
Sidharth Vinod 0e47c0ee6c
fix #3019 Add word boundary to FK&PK. (#3168) 2022-06-23 08:20:32 +02:00
Knut Sveidqvist 2792bb41de Updated allowed characters to accomodate fonts and rgba colors 2022-06-22 08:16:55 +02:00
yutotnh ca909edbed
fix: Typo for documents and comments 2022-06-22 12:39:10 +09:00
Knut Sveidqvist 610f154c74 Sanitizsation of incoming variables that are added to the userStyles 2022-06-21 21:46:37 +02:00
Knut Sveidqvist ec2da8e85d Only allowing a subset of characters in themeVariables 2022-06-21 21:17:53 +02:00
pinghe 546eb285c4 C4 diagram is fixed style, such as css color, so different css is not provided under different skins.
updateElementStyle and UpdateElementStyle are written in the diagram last part. updateElementStyle is inconsistent with the original definition and updates the style of the relationship, including the offset of the text label relative to the original position.

- [ ] Custom tags/stereotypes support and skinparam updates
- - [ ] AddElementTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite): Introduces a new element tag. The styles of the tagged elements are updated and the tag is displayed in the calculated legend.
- - [ ] AddRelTag(tagStereo, ?textColor, ?lineColor, ?lineStyle, ?sprite, ?techn, ?legendText, ?legendSprite): Introduces a new Relationship tag. The styles of the tagged relationships are updated and the tag is displayed in the calculated legend.
- - [X] UpdateElementStyle(elementName, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite): This call updates the default style of the elements (component, ...) and creates no additional legend entry.
- - [X] UpdateRelStyle(from, to, textColor, lineColor, ?offsetX, ?offsetY): This call updates the default relationship colors and creates no additional legend entry. Two new parameters, offsetX and offsetY, are added to set the offset of the original position of the text.
- - [ ] RoundedBoxShape(): This call returns the name of the rounded box shape and can be used as ?shape argument.
- - [ ] EightSidedShape(): This call returns the name of the eight sided shape and can be used as ?shape argument.
- - [ ] DashedLine(): This call returns the name of the dashed line and can be used as ?lineStyle argument.
- - [ ] DottedLine(): This call returns the name of the dotted line and can be used as ?lineStyle argument.
- - [ ] BoldLine(): This call returns the name of the bold line and can be used as ?lineStyle argument.
- - [X] UpdateLayoutConfig(?c4ShapeInRow, ?c4BoundaryInRow): New. This call updates the default c4ShapeInRow(4) and c4BoundaryInRow(2).
2022-06-18 22:43:07 +08:00
Knut Sveidqvist f79d4f9a40 Merge branch 'develop' into 3061_refactoring_and_modularisation 2022-06-18 14:24:51 +02:00
Yash Singh ddcc9a9d77
fix: use db for parser.yy 2022-06-16 11:37:28 -07:00
ashishj e29c3d6125 #3095 Added support for commit & tag label font size 2022-06-14 20:36:26 +02:00
Knut Sveidqvist 69b7b0e029 Fix for padding issue and some cleanup 2022-06-14 20:09:55 +02:00
ashishj 113efd1150 Added placeholder docs fro C4C diagram 2022-06-14 18:27:15 +02:00
Knut Sveidqvist 2d5e49fa15 2022-06-14 17:49:05 +02:00
Ashish Jain 611880414b
Merge pull request #3114 from siddhant-tripathy1/3093_Removing_sass_files
Removed the Sass files
2022-06-14 17:10:45 +02:00
Knut Sveidqvist 5d30d46535
Merge pull request #3118 from mermaid-js/3116_paddings
Handle diagram paddings in a consistent way
2022-06-08 20:24:18 +02:00
Knut Sveidqvist 4dd3d3bc76 2022-06-08 20:17:31 +02:00
siddhant tripathy 61c1b0aebb
Removed the Sass files 2022-06-08 00:27:23 +05:30
ashishj c147404d1c #3080 Added support for cherry pick commits 2022-06-07 20:32:43 +02:00
ashishj 1851e81794 #3080 Adding rotated commit label functionality 2022-06-07 18:45:07 +02:00
Knut Sveidqvist aeb6e860bb
Merge pull request #3094 from deining/contrib
Fixing various typos
2022-06-07 17:17:49 +02:00
Knut Sveidqvist 3300ad09f3
Merge pull request #3038 from pinghe/develop
Add C4 Diagram. Compatible with C4-PlantUML syntax.
2022-06-07 17:12:10 +02:00
Andreas Deininger 8e157423e0 Fixing various typos
Changing links from http to https
2022-06-01 12:06:53 +02:00
Knut Sveidqvist bd459fadd3 2022-05-31 20:35:44 +02:00
Knut Sveidqvist bb5baa65cb Merge branch 'develop' of github.com:mermaid-js/mermaid into develop 2022-05-31 17:11:29 +02:00
Knut Sveidqvist ee61a26faf
Merge pull request #3063 from financelurker/feature/3062_critical_region_and_break_in_sequence_diagrams
feat: adding "Critical Region"/"Option" and "Break" blocks to sequence diagram
2022-05-31 17:11:03 +02:00
Knut Sveidqvist 66f2f42294 Selecting the correct title for gantt charts 2022-05-24 20:10:04 +02:00
Knut Sveidqvist b82b2d2b78 #3074 Using regular title as a fallback for the accessibility title when no dedicated accessibility title is present 2022-05-24 18:52:37 +02:00
Knut Sveidqvist 6eef26f107 #3074 Fix for tests 2022-05-24 18:33:13 +02:00
Knut Sveidqvist 2ab1e162ea #3074 Cleanup and fixes for issues with accessibility for gantt and journey diagrams 2022-05-24 18:20:05 +02:00
Ronald Heggenberger 077e6621b9 Undo whitespace changes 2022-05-21 09:40:21 +02:00
Ronald Heggenberger 7372ca5e8e Adding "Critical Region" and "Break" blocks 2022-05-21 09:31:06 +02:00
Michael Genereux 938b47bead Removed unnecessary textLength attribute.
This attribute makes two digit numbers look bad.
2022-05-19 23:17:11 +00:00
Mindaugas Laganeckas ce3ba4f772
Make initThrowsErrors available to clients
Missing piece for https://github.com/mermaid-js/mermaid/pull/2379
2022-05-18 08:51:19 +02:00
Knut Sveidqvist a3878528c6 #3050 Renaming setTitle to setAccTitle 2022-05-17 20:23:45 +02:00
ashishj 91d5c7ed71 #3046 Fixed liniting issue 2022-05-17 19:28:23 +02:00
ashishj 85062ac570 #3046 Add support for cyclic themeVariable rotation for more than 8 branches 2022-05-17 19:15:50 +02:00
ashishj ea58bb3359 Merge branch 'master' into develop 2022-05-17 17:06:38 +02:00
pinghe 28ca1420f9 Add C4Context diagram. Compatible with C4-PlantUML syntax.
For an example, see the source code demos/index.html

 - System Context
 - Container diagram
 - Component diagram
 - Dynamic diagram
 - Deployment diagram
2022-05-17 19:57:03 +08:00
pinghe 015c112103 Add C4Context diagram. Compatible with C4-PlantUML syntax.
```
    C4Context
      title System Context diagram for Internet Banking System

      Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.")
      Person(customerB, "Banking Customer B")
      Person_Ext(customerC, "Banking Customer C")
      System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.")

      Person(customerD, "Banking Customer D", "A customer of the bank, <br/> with personal bank accounts.")

      Enterprise_Boundary(b1, "BankBoundary") {

        SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")

        System_Boundary(b2, "BankBoundary2") {
          System(SystemA, "Banking System A")
          System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts.")
        }

        System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.")
        SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.")

        Boundary(b3, "BankBoundary3", "boundary") {
          SystemQueue(SystemF, "Banking System F Queue", "A system of the bank, with personal bank accounts.")
          SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.")
        }
      }

      BiRel(customerA, SystemAA, "Uses")
      BiRel(SystemAA, SystemE, "Uses")
      Rel(SystemAA, SystemC, "Sends e-mails", "SMTP")
      Rel(SystemC, customerA, "Sends e-mails to")
```
2022-05-15 17:08:09 +08:00
ashishj ee0b31b3d5 #3025 Fix from broken init call 2022-05-11 14:04:50 +02:00
Yash-Singh1 32a2e5fc47 fix: allow dot in entity name; fixes #1895 2022-05-10 18:39:11 -07:00
Yash-Singh1 bc58c8e03c chore: reduce excessive logs in unit tests 2022-05-10 17:09:42 -07:00
ashishj 20c4a68aa8 Merging release 9.1.0 to develop 2022-05-10 18:51:21 +02:00
Knut Sveidqvist 6cea0fd835 #2951 Fix for styling issue on labes when using htmlLabels in legacy flowcharts 2022-05-10 17:45:12 +02:00
Knut Sveidqvist 734cef9017
Merge pull request #3004 from timmaffett/parse_parseError_fixes
fix mermaidAPI.parse() behavior to match documentation, add tests to ensure behavior matches docs
2022-05-10 17:00:22 +02:00
ashishj 3cb926727c Fixing failing test cases 2022-05-06 20:14:36 +02:00
Knut Sveidqvist 6528a0cfb6
Merge pull request #3010 from mermaid-js/GitGraph_mainBranchOrdering
Added support to change the position of the main branch
2022-05-06 19:48:05 +02:00
Knut Sveidqvist 65143a0182 #2732 Regression fixes for accessibility 2022-05-06 19:42:40 +02:00
ashishj 3ef7d6fbc6 Added support to change the position of the main branch 2022-05-06 19:37:32 +02:00