38 Commits

Author SHA1 Message Date
Knut Sveidqvist
44877545e5
Merge pull request #2832 from gwincr11/cg-accessibility
ER and Sequence Chart Accessibility
2022-03-31 21:01:31 +02:00
Cory Gwin
50f522ae5c feat: adding more accessibility tooling 2022-03-31 13:21:56 +00:00
Cory Gwin
0181cbf743 feat(accessibility): add accessibility attributes to sequence diagrams 2022-03-17 16:18:10 +00:00
kerwin612
4f5cab7f4c fix: autonumber bug 2022-03-11 16:32:04 +08:00
Matthieu MOREL
4d103c14f7 enable eslint fix and eslint-plugin-jsdoc 2021-11-09 11:01:49 +01:00
Knut Sveidqvist
ebe8b8d89f Allowing & and = in links 2021-10-14 21:08:42 +02:00
Ashish Jain
a06f6f9604 Add sanitize to properties and link in Sequence Diagram 2021-10-07 21:48:44 +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
432267c811 #2315 Fix for broken tests 2021-09-18 10:05:53 +02:00
Knut Sveidqvist
6ce1c80a47 #2315 Adding the possibility to add actor figures as participants 2021-09-16 20:43:10 +02:00
eajenkins
96977e70b3 Cleaned up remaining prettier errors. 2021-09-14 14:26:43 -07: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
E Jenkins
ce6d8576ae
Merge branch 'develop' into feature/2249_sequence_diagram_popup_menus 2021-08-27 15:02:11 -07:00
eajenkins
291bec7e90 Initial implementation for Issue#2249.
Includes changes to sequence diagram code to enable popup menus and individualized styling of actors
Includes unit and e2e tests.
Includes updates to the md file for sequencediagrams.
2021-08-27 10:56:56 -07:00
Knut Sveidqvist
5399214ad8 Update of prettier, eslint and rules 2021-07-15 11:35:12 +02:00
harshilparmar
7019a1149d Change logger to log 2021-02-06 15:56:05 +05:30
Knut Sveidqvist
5d24a2b7d9 #1528 Adding async arrow type in sequence diagrams 2021-01-11 23:09:37 +01:00
Johnny Walker
c3ce525c6c fix: exclude text with line breaks when parsing wrap setting 2020-12-11 20:43:12 -05:00
Knut Sveidqvist
c691ef1899 Removing console.logs 2020-09-30 18:47:50 +02:00
Knut Sveidqvist
a4bf85b1b6 #1542 Making sure config and directives works for overriding theme variables using initialize call or directives + tests 2020-07-29 18:38:59 +02:00
chris moran
c4ad95760a
Fixed a regression in sequence diagram parsing.
Added the parser as the first argument to parseDirective to support custom directive handling (for now delegated within mermaidAPI but should probably discriminate based on type for delegation)
2020-07-27 06:50:54 -04:00
chris moran
ca86ab71f2
added hasBreaks and splitBreaks to common.js
updated parseMessage to set wrap: true when breaks are detected
2020-07-01 07:41:44 -04:00
chris moran
217bd1f4bf
Fixed test cases for sequence diagrams
Updated config to match a conversation knut and i had about the relationship between global, site, and integrator configuration
(Will update docs)
Renamed wrapEnabled to wrap
Poor man's caching for calculateTextDimensions, wrapLabel, and breakString (actually makes a huge difference)
2020-06-26 09:26:56 -04:00
chris moran
7d9bf83f66
addition: added bounds models for bounds checking in unit tests.
addition: bounds.init will clear models
addition: added loop model widths id instead of using title as the id
removed parseMessage debug message
addition: added configuration labelBoxWidth and labelBoxHeight for loop label box width/height
change: adjusted svgDraw drawText to support anchor and valign and whether to output a tspan
change: drawText returns an array regardless of array size
change: hardcoded label width/height uses conf.labelBoxWidth and conf.labelBoxHeight
change: Math.round() on many of the calculations to clean up bounds values
change: getTextObj anchor, width, height start as undefined
2020-06-22 16:59:07 -04:00
Chris Moran
e64a65c41e
Refactored rendering sequence diagrams
Fixed default config clobbering issues
Updated/corrected sequenceDiagram.spec to set the config using mermaidAPI
Enabled freeze on mermaidAPI to protect defaultConfig
2020-06-18 08:10:50 -04:00
Chris Moran
67c2fe8005
Refactored rendering sequence diagrams
Fixed default config clobbering issues
2020-06-17 18:13:37 -04:00
Chris Moran
3c72d28511
Refactored rendering sequence diagrams 2020-06-17 05:54:24 -04:00
Chris Moran
0ae001ed6d
Fixed issue with idea-multimarkdown.
- JavaFX does not support lookbehind
 - (?) It also appears that named regex groups are also unsupported for both mermaid and javafx

Update:
 - Fixed an issue where setLogLevel did not properly handle 'named' log levels
 - Backwards compatibility should be preserved, any/all %%{...}%% directives will be correctly processed by the grammar and properly ignored for any/all graph types that do not support them.

 - Multiline directives will render an error (as they should) if they are not accounted for in the .jison grammar
2020-06-14 11:34:39 -04:00
Chris Moran
620c894929
Fixed issue causing idea-multimarkdown headaches: util changes. Reworking them. 2020-06-14 06:53:22 -04:00
Chris Moran
04b4da0c75
## Work in progress.
Implemented directives per PR review comment:

%%{directive: json-encoded-arg-string}%%

example:

%%{init: { 'logLevel': 0, 'theme': 'dark' }}%%

Also changed wrap and config to directives:

%%{wrap}%%
%%{config: { 'fontSize': 18 }}%%
2020-06-11 15:35:00 -04:00
Chris Moran
bd11663e0a
Added auto wrap option (and grammar) for sequenceDiagrams
Added inline config and init(ialization) grammar
Added reinitialize functionality to mermaidAPI (not to be confused with initialize)
Added actorFontWeight, noteFontWeight, messageFontWeight, wrapEnabled, wrapPadding
Added wrapLabel and breakWord functions to intelligently wrap text based on a pixel-based width instead of column-based
  - The implementation is largely from Carys Mills: https://medium.com/@CarysMills/wrapping-svg-text-without-svg-2-ecbfb58f7ba4
  - Made slight modifications for mermaid-js
Fixed dark theme color inconsistencies for sequence diagrams
Removed !important from sequence scss as this prevents any client overrides
Fixed various invalid css values in sequence scss which prevented proper rendering of various elements
Added detectInit to utils for initialization json detection
Updated detectType to support the existence or absence of the intialization configuration
Updated calculateTextWidth to include fontWeight
2020-06-08 14:48:03 -04:00
Danny Shemesh
862f20ef20 Added cypress e2e tests for suggested improvements
This commits adds e2e tests for the suggested improvements.
I've went over the generated screenshots and they look good to me.
2020-04-23 18:31:22 +03:00
Danny Shemesh
5c902001b9 Merge branch 'develop' of github.com:mermaid-js/mermaid into develop 2020-04-23 17:08:25 +03:00
Knut Sveidqvist
f8137ea7c1 #1257 Adding the autonumber keyword + tests and docs 2020-02-16 15:26:08 +01:00
Knut Sveidqvist
d9318c5af3 #1205 Adding parsing exception for then an inactive participant is inactivated 2020-01-15 20:27:31 +01:00
knsv
ad5669b523 #931 Aligning code standard 2019-09-12 12:55:10 -07:00
Alexander Sage
c8091c61c0 feat: sequence diagram background rect 2019-07-22 22:47:49 -07:00
Tyler Long
3e9215b27d Rename folders 2018-03-13 15:28:48 +08:00