Commit Graph

48 Commits

Author SHA1 Message Date
Ashish Jain 38ef061175 Reverting PR #2312 2021-09-29 18:22:35 +02:00
Yusuke Wada a448af2897 add spec 2021-09-14 18:41:51 +09:00
Ahmad Nassri 84f664de14
fix(id-generator): re-write generator to allow it to function properly after compiling in cli 2021-04-12 15:56:17 -04:00
Julian Amelung c472024921
Add test cases for utils.initIdGeneratior 2020-11-23 23:54:00 +01:00
Guillaume Grossetie 99844b4ca3 Add e2e tests on all diagrams 2020-08-25 17:17:52 +02:00
Guillaume Grossetie 184fcab0b7 resolves #1490 consistent SVG height and width between diagrams 2020-08-25 15:46:10 +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 1c3c2b6a74
utils refactor
- memoize to poor-man-cache properly-ish
- wrapLabel, calculateTextDimensions (and friends) moved to utils for all to enjoy
- drawSimpleText getTextObj moved to utils to support the functions listed above
- assignWithDepth - Object.assign but depth-ier
- random - for crypto random numbers
2020-07-01 06:20:53 -04:00
Knut Sveidqvist 44d5009538 Revert of PR #1482 2020-06-19 10:52:20 +02:00
Chris Moran 67c2fe8005
Refactored rendering sequence diagrams
Fixed default config clobbering issues
2020-06-17 18:13:37 -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 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
Marc Faber c7b46f4fba #1218 Fix anchor and script support in link click events 2020-01-26 16:56:42 +01:00
knsv 0e8164d805 #931 Compliacne with code standard 2019-09-12 12:58:57 -07:00
Tyler Long acf11bdc6c Refactor by renaming 2018-03-12 21:16:22 +08:00
Tyler Long d222196fd1 Refactor by renaming 2018-03-12 21:06:49 +08:00
Tyler Long c52f4d6307 Repalce 'var ' with 'const ' 2017-09-14 19:32:35 +08:00
Tyler Long d430019b44 Remove clone css style code 2017-09-12 22:13:58 +08:00
Tyler Long b1dffc9eec Fix styleSheets index issue 2017-09-12 16:23:21 +08:00
Tyler Long c9442653e9 Replace require with import 2017-09-10 19:41:34 +08:00
Tyler Long 73eb98c4c3 Remove babel-plugin-transform-remove-strict-mode 2017-09-03 08:26:57 +08:00
Tyler Long 332ceb0da6 Replace karma + PhantomJS with karma + Chrome headless 2017-04-18 22:14:02 +08:00
Tyler Long 87c7f73245 Refactor code 2017-04-16 23:24:47 +08:00
Tyler Long 413162dfad Fix some code style issues 2017-04-11 22:57:57 +08:00
Tyler Long 620f3e8734 Auto fix standard style voilations 2017-04-11 22:14:25 +08:00
Knut Sveidqvist 0be8d62f7d Fix for merge error 2017-01-09 21:35:53 +01:00
Knut Sveidqvist 8596eb6091 Merge branch 'master' into issue416_link_style_fill_none 2017-01-09 08:02:08 +01:00
Joshua Colvin ff0ab048df Add unit tests for isSubstringInArray utility function 2017-01-07 12:57:32 -05:00
Rebecca Dreezer a124be71b1 Allow .node>circle to receive css styles 2017-01-05 22:02:38 -05:00
Raghu Rajagopalan e17b35a96a WIP-hook up a renderer 2016-04-25 11:35:44 +05:30
Knut Sveidqvist bda1aaa5db Draft fix for issue #304 2016-03-23 20:34:44 +01:00
knsv cc8c5aecaf Fix for issue #271 2015-12-27 14:18:21 +01:00
knsv 51858c02eb Fix for issues #249. Adding configuration option for when to use absolute references for arrow heads. Default is off.
Jasmine tests running in browser via karma.
2015-11-21 11:51:15 +01:00
knsv 4eb38e4cfd Fix for issues #239 and #257. 2015-11-15 15:06:24 +01:00
Tomasz Szczęśniak-Szlagowski ef290796e0 Fix a bug in CSS cloning error handler
Firefox throws SecurityError when `cssRules` is accessed, which exposes
this bug.

Fixes #245
2015-11-05 19:38:36 +00:00
knsv 632a564158 Modernization, better linting, adjustment after stricter static rules 2015-10-17 10:39:20 +02:00
knsv 8365fcc2f9 Modernization, better linting, adjustment after stricter static rules 2015-10-17 10:38:05 +02:00
knsv 658ed3d790 Modernization of build environment. Less gulp, more npm. Eslint. 2015-10-12 07:37:02 +02:00
knsv 122274bf52 Fix of broken tests 2015-10-04 19:30:53 +02:00
knsv 30a755221b Fix for broken build 2015-09-27 20:51:22 +02:00
knsv 6f96b5dd14 Added logger for dealing with issue #179
Added markdown files for the documentation.
parseError exposed from the mermaidAPI
2015-06-30 14:23:32 +02:00
Björn Weström 84124c9427 Improved CSS cloning
Better separation of styles between multiple mermaid SVGs on the same
page
Added support for text label styling
2015-01-14 00:04:38 +01:00
Björn Weström 9f970ed953 Merge branch 'master' into text-labels
Conflicts:
	dist/mermaid.full.js
	dist/mermaid.full.min.js
	dist/mermaid.slim.js
	dist/mermaid.slim.min.js
	src/diagrams/flowchart/flowRenderer.js
	src/utils.js
	test/web_style.html
2015-01-13 21:50:05 +01:00
Björn Weström 5ad30c86c5 Improved style handling 2015-01-11 16:16:07 +01:00
knsv 5a720b6d63 Introducing subgraphs 2015-01-07 21:02:58 +01:00
Björn Weström f656269a50 Improved class styling for nodes
Added unit testing
classDefs are now exported to the common style of the SVG
Styling is no longer copied from other mermaid SVGs on the same webpage
2014-12-14 22:15:47 +01:00
knsv 2317ea5117 Better text handling for flowcharts 2014-11-25 18:58:47 +01:00