Commit Graph

660 Commits

Author SHA1 Message Date
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 8681e78e50 Fixes for rendering tests 2022-07-20 14:39:01 +02:00
Knut Sveidqvist 27cf50044d Merge branch 'develop' of github.com:mermaid-js/mermaid into develop 2022-07-20 11:32:38 +02:00
Knut Sveidqvist dee9cfea85 Reverting to cypress 9.7 in order to get applitools back in the game 2022-07-20 11:32:21 +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 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 1675174b2a Fix for flowcharts 2022-07-04 12:37:50 +02:00
Knut Sveidqvist 023781716f Git graph, example 2022-07-04 11:43:48 +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
ashishj 1dfddfde54 Merge branch 'release/9.1.3' into 3061_refactoring_and_modularisation 2022-06-28 20:12:03 +02:00
Ashish Jain 259abb081a
Merge pull request #3176 from yutotnh/fix-typo
Fix typo
2022-06-28 19:01:35 +02:00
yutotnh 5619b54cdb
fix: typo in cypress 2022-06-27 12:29:50 +09:00
Knut Sveidqvist 8484d55a6a Fix fir tests 2022-06-26 21:30:49 +02: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
Sidharth Vinod 79a42772b9
Merge pull request #3135 from mermaid-js/dependabot/npm_and_yarn/develop/cypress-10.1.0
chore(deps-dev): bump cypress from 9.7.0 to 10.1.0
2022-06-20 11:08:55 +05:30
MOREL Matthieu 648b15b00b Upgrade Cypress 2022-06-19 14:36:54 +02:00
Knut Sveidqvist 69b7b0e029 Fix for padding issue and some cleanup 2022-06-14 20:09:55 +02:00
Knut Sveidqvist 3fd9cabd43 Test file 2022-06-14 18:42:00 +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
ashishj e3df38e078 #3080 Added more rendering test for cherry pick functionality 2022-06-07 20:52:52 +02:00
ashishj c147404d1c #3080 Added support for cherry pick commits 2022-06-07 20:32:43 +02:00
ashishj 90d187c48a #3080 Added rendering test cases 2022-06-07 18:52:38 +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 7372ca5e8e Adding "Critical Region" and "Break" blocks 2022-05-21 09:31:06 +02:00
ashishj 85062ac570 #3046 Add support for cyclic themeVariable rotation for more than 8 branches 2022-05-17 19:15:50 +02:00
Yash-Singh1 b7b02fcc2c chore: rm cypress ex. and prevent dup ci 2022-05-10 17:29:50 -07:00
Knut Sveidqvist eadbf595ba Adding applitools to inegration tests 2022-05-10 20:33:55 +02:00
Knut Sveidqvist 5ec5ebf94b #2951 Fix for styling issue on labes when using htmlLabels in legacy flowcharts 2022-05-10 17:45:16 +02:00
Knut Sveidqvist 65143a0182 #2732 Regression fixes for accessibility 2022-05-06 19:42:40 +02:00
Knut Sveidqvist d8682cfb5f #2732 rendering the title and descr fields for the gitGraph 2022-05-06 17:40:40 +02:00
Knut Sveidqvist e917347b81 Removing logging, cleanup 2022-04-30 15:54:03 +02:00
Knut Sveidqvist bada661bd0 Merge branch 'develop' of github.com:mermaid-js/mermaid into develop 2022-04-28 18:45:22 +02:00
Knut Sveidqvist d914e23626 Fix for hideUnusedParticipants 2022-04-28 18:45:18 +02:00
ashishj c58a04bc94 Fix broken configuration spec test 2022-04-28 18:26:50 +02:00
ashishj 5aac0734d5 Fix for broken Requirement diagram cypress test 2022-04-28 18:26:31 +02:00
ashishj 386f3c7ce9 Merge branch 'develop' into feature/hideUnusedParticipants_1210 2022-04-28 17:38:48 +02:00
Knut Sveidqvist c0bdf9d99b
Merge pull request #2958 from mermaid-js/decode_entities_update
Removal of vulnerability
2022-04-21 21:25:08 +02:00
Knut Sveidqvist df87ab8818 Fix for vulnerability 2022-04-21 21:11:48 +02:00
Yash-Singh1 4c93870580 feat: add hideUnusedParticipants and some cleanup 2022-04-14 19:19:18 -07:00
Knut Sveidqvist 7d2e77a1b3
Merge pull request #2915 from gwincr11/cg-req-access
feat: Add accessibility fields to requirements diagram
2022-04-12 07:19:40 +02:00
Knut Sveidqvist 266bce45f2
Merge pull request #2912 from el-mapache/feat/gantt-diagram-accessibility
Adds accDescription to Gantt, draws tags to svg
2022-04-12 07:06:41 +02:00
ashishj 8b29fbe98e Updating Gitgraph docs 2022-04-07 20:13:15 +02:00
Cory Gwin 3d7cb212c0 feat: Add accessibility fields to requirements diagram 2022-04-07 18:02:48 +00:00
Knut Sveidqvist 87b56bdd9a #1252 Adding confuration options and some cleanup, swicth of graphType from git to gitGraph 2022-04-07 18:22:06 +02:00
Adam B 65b0b83625 Adds accDescription, draws tags to svg 2022-04-07 10:05:54 -04:00
ashishj bbac11a4b8 Updated rendering test with fixed id 2022-03-31 19:49:42 +02:00
ashishj 12c63ff007 Finalizing GitGraph with directives, theming & docs 2022-03-31 19:37:36 +02:00
Knut Sveidqvist f6421734a2 Merge branch 'develop' into 1252_gitgraph_reinvented 2022-03-31 19:16:31 +02:00
Knut Sveidqvist fca58aafb1 Test updates when switching to cypress-image-snapshoits 2022-03-31 19:14:37 +02:00
Knut Sveidqvist 3c0a2f0fd0 chore: replacing percy with cypress-image-snapshots 2022-03-31 18:06:04 +02:00
Knut Sveidqvist 22aca7b3ee #1252 Adding background on commit labels 2022-03-25 08:56:22 +01:00
ashishj 3ee141ff9b Added Gitgraph docs 2022-03-24 20:28:30 +01:00
Knut Sveidqvist c0335cf5fb #1252 Adding support for tags 2022-03-24 20:25:22 +01:00
ashishj b9bde5e64c Fixed more example cases 2022-03-24 17:43:23 +01:00
ashishj 4eb7d0d299 Update the gitgraph example 2022-03-24 17:32:50 +01:00
Knut Sveidqvist 4023be1e84 Merge branch '1252_gitgraph_reinvented' of github.com:mermaid-js/mermaid into 1252_gitgraph_reinvented 2022-03-17 20:07:30 +01:00
Knut Sveidqvist b78b371025 Added theming support for gitgraph 2022-03-17 20:07:27 +01:00
Ashish Jain a7c33b7d5a Replacing master to main in test cases 2022-03-17 19:19:25 +01:00
Ashish Jain 1ef58e286c Fixed rendering test cases 2022-03-17 19:07:16 +01:00
Ashish Jain 21c97f9521 added rendering tests 2022-03-10 20:08:56 +01:00
Knut Sveidqvist 781b239d0d Lint fixes 2022-03-10 19:58:56 +01:00
Knut Sveidqvist b1fab6ffcd Theming changes for base theme 2022-03-03 19:58:43 +01:00
Knut Sveidqvist 1f175d2d84 Merge branch '1252_gitgraph_reinvented' of github.com:mermaid-js/mermaid into 1252_gitgraph_reinvented 2022-03-03 17:30:00 +01:00
Knut Sveidqvist b110567517 Bends of the lines when branching 2022-03-03 17:29:14 +01:00
Ashish Jain c0cb05b406 Added sample for tag,type and id for a commit 2022-02-24 19:54:28 +01:00
Ashish Jain 14464f9fba merge develop to current branch 2022-02-24 19:24:42 +01:00
Ashish Jain f95de5c6d9
Merge pull request #2740 from Guy-Adler/feature/2391_double_circle
Double Circle Node Shape
2022-02-24 18:45:50 +01:00
Ashish Jain 933efd0dda replace mock data with real 2022-02-24 18:40:22 +01:00
Ashish Jain 40f95a5dc1 chore: merge branch 'develop' into 1252_gitgraph_reinvented 2022-02-17 17:48:48 +01:00
Guy Adler 04454cece0
fix: changed open and close markers as recommended
chnged from `()(` and `())` to `(((` and `)))`
2022-02-17 17:22:38 +01:00
Guy Adler e1f0e69263
feat(flowchart): implement double circle node
The implementation uses two circles, inside each other.
A double circle node is opend with `()(` and closed with `)()`.
2022-02-16 23:05:46 +01:00
Ashish Jain bb2dd2f5f3 getting there 2022-02-10 20:32:21 +01:00
Knut Sveidqvist 882ba03fcb fix: handling diagram width in sandbox mode 2022-02-03 19:54:24 +01:00
Knut Sveidqvist 46cdacfdc7 fix: broken test 2022-01-28 16:14:58 +01:00
Knut Sveidqvist fa55b7c824 feat: add support for links in sanbox mode 2022-01-28 14:45:43 +01:00
Knut Sveidqvist e3e9c67f5b fix: handling rerender in sandbox mode 2022-01-22 12:36:18 +01:00
Knut Sveidqvist a73b291c4f fix: setting width of iframe to size of the diagram 2022-01-22 11:47:03 +01:00
Knut Sveidqvist cbe2ce41c1 feat: adding new security level sandbox, sequence diagram update 2022-01-21 18:15:18 +01:00
Knut Sveidqvist 06834eb383 feat: adding new security level sandbox, diagram updates 2022-01-21 17:17:31 +01:00
Knut Sveidqvist 4081d7f5f6 feat: experimental version of sanboxing 2022-01-20 19:37:52 +01:00
Knut Sveidqvist 44d7dfe993 #2646 exploration 2022-01-18 23:02:16 +01:00
Knut Sveidqvist 91ec41762a #2632 Adding proper handling of cardinalities 2022-01-16 15:14:59 +01:00
Eirik Bjornset d3577eb59b fix: bug #2346 "ER-attribute comments not work" 2021-12-29 21:27:51 +01:00
Knut Sveidqvist f4c335ad2f Fix for XSS vulnerability in url sanitization 2021-12-28 16:59:22 +01:00
Knut Sveidqvist 6f800be33b Fix for issue with links from actors 2021-12-23 11:03:07 +01:00
Knut Sveidqvist b4fbe1b0f0 Adding an test file 2021-12-22 21:20:14 +01:00
Knut Sveidqvist 036f9dc359 #2560 Adding dark mode to allowed options in directives 2021-12-15 00:19:04 +01:00
Knut Sveidqvist 9c12502a36 #2560 Tetsing that the added css have balanced brackets 2021-12-14 23:54:31 +01:00
Matthieu MOREL 67143b7bfd
fix: lint-staged and merge eslint-config-html (#2550) 2021-12-11 11:12:14 +01:00
Knut Sveidqvist 4459eb5c87 Merge 2021-12-11 08:42:21 +01:00
Knut Sveidqvist d0cf3fc96a Merge 2021-12-08 11:55:49 +01:00
Knut Sveidqvist e0a05f83d1 Lint fix 2021-12-08 08:42:12 +01:00
Knut Sveidqvist 89ce930de2 Adding integration test 2021-12-07 22:55:28 +01:00
Knut Sveidqvist a97b2cc4da #2541 Sanitizing the label string in class diagrams 2021-12-07 21:55:33 +01:00
Yash-Singh1 3ea974709f chore: apply linting to html ext too and fixes for files 2021-12-04 15:28:40 -08:00
Knut Sveidqvist 3526e35012 Fix for node with wrong type 2021-11-30 20:28:51 +01:00
Knut Sveidqvist a018789026 Merge remote-tracking branch 'origin/develop' into develop 2021-11-30 19:24:10 +01:00
Knut Sveidqvist d9e598aa7f testcommit 2021-11-30 19:12:39 +01:00
Yash-Singh1 a3b2ba736d feat(flowchart): Allow default in the node ID 2021-11-25 13:48:28 -08:00
Matthieu MOREL d84be0d792 Enable eslint-plugin-jest, eslint-plugin-cypress and wider scan 2021-11-18 23:57:16 +01:00
Knut Sveidqvist 95df8fa128 Version 8.13.4 bundles 2021-11-18 17:10:36 +01:00
Knut Sveidqvist fcbd8a5081 #2496 Fix for issue 2021-11-17 20:08:39 +01:00
Knut Sveidqvist 69ecb02375 Merge branch 'develop'
Conflicts:
	dist/mermaid.core.js
	dist/mermaid.core.js.map
	dist/mermaid.esm.min.mjs
	dist/mermaid.js
	dist/mermaid.js.map
	dist/mermaid.min.js
	dist/mermaid.min.js.map
2021-11-04 21:23:29 +01:00
Ashish Jain 250c9beff9 #2425 Added new test case 2021-10-21 19:45:15 +02:00
Ashish Jain 24d18eb42a #2425 Unicode handling for HTML labels 2021-10-21 19:37:48 +02:00
Ashish Jain a06f6f9604 Add sanitize to properties and link in Sequence Diagram 2021-10-07 21:48:44 +02:00
Ashish Jain aa666d1829 Merge branch 'release/8.13.2' into develop 2021-09-29 20:22:57 +02:00
Ashish Jain 5d5808880f Merge branch 'release/8.13.1' into develop 2021-09-29 20:22:09 +02:00
Knut Sveidqvist 8ee3155f2a Fix for broken test 2021-09-29 20:20:44 +02:00
Ashish Jain 38ef061175 Reverting PR #2312 2021-09-29 18:22:35 +02:00
Knut Sveidqvist e4e8a00acc Test fix + empty relation 2021-09-29 08:57:54 +02:00
Knut Sveidqvist db8517a7f9 Adding xss tests 2021-09-29 08:52:12 +02:00
Knut Sveidqvist 35d8f33542 Merge branch 'master'
Conflicts:
	cypress/platform/xss7.html
2021-09-29 08:51:54 +02:00
Knut Sveidqvist 75b79e1b23 State diagram sanitization 2021-09-29 08:45:07 +02:00
Knut Sveidqvist b62d0d974f
Merge pull request #2312 from cm-wada-yusuke/bug/2160-fixed-height-useMaxWith
configureSvgSize should make height 100% when useMaxWidth is true.
2021-09-23 19:32:43 +02:00
Knut Sveidqvist 83d3b31a1a Merge branch 'release/8.13.0' 2021-09-23 18:59:51 +02:00
Knut Sveidqvist b2fb9f421a Merge branch 'master' of github.com:mermaid-js/mermaid 2021-09-23 18:52:57 +02:00
Ashish Jain 165a10ac37 Fix for broken classDiagram-v2.spec.js test case 2021-09-23 18:36:45 +02:00
Knut Sveidqvist 004e7e376d
Merge branch 'develop' into feature/2249_sequence_diagram_popup_menus 2021-09-18 10:19:07 +02:00
Knut Sveidqvist 0fcabfae05 #2315 Fixing issue with padding between actors and content in sequence diagram 2021-09-18 08:26:49 +02:00
Knut Sveidqvist 9faa5acb21 #2315 Adding docs and integration tests 2021-09-18 08:03:34 +02:00
Knut Sveidqvist 9c511559ff #2315 Adding to docs and an integration test 2021-09-18 07:51:15 +02:00
Knut Sveidqvist 6ce1c80a47 #2315 Adding the possibility to add actor figures as participants 2021-09-16 20:43:10 +02:00
Yusuke Wada 0839fadbc2 fix e2e 2021-09-15 12:47:24 +09:00
Knut Sveidqvist 8bd830c991
Merge branch 'develop' into feature/field-classifier 2021-09-13 21:45:47 +02:00
eajenkins 85d33ecccd Added support for a new link syntax per recommendation:
link <actor>: <label> @ <link-url>

Removed documentation for class/icon definitions until we can finalize the design for this.

Fixed prettier errors.
2021-09-10 16:27:07 -07:00