Commit Graph

1334 Commits

Author SHA1 Message Date
chris moran 06f6e75d5a
Class diagram parsing
Fixed a class diagram parsing issue
2020-07-28 07:00:04 -04:00
chris moran c9854b35e2
Fixed flowchart parsing (broken tests - grammar changes were not 100% correct) 2020-07-28 05:48:26 -04:00
Marc Faber d04d8c3a1d #1460 Add link target option to flowchart click 2020-07-28 10:49:54 +02:00
chris moran 283faf7a2f
Fixes
GraphObjects.md: [ and ] should be escaped in text (they're links otherwise)
flow.jison: fixed a parsing issue when the direction is omitted (defaults to 'TB')
stateRenderer-v2: was silently failing due to a try/catch in the parse function. (intentional?) removed to show errorHandler
mermaidAPI: removed unnecessary call to updateRendererConfigs since reinitialize does this
2020-07-28 04:45:22 -04:00
chris moran 0299ff0a79
Added directive support to state diagrams
Fixed an issue with markerUnits: (default is 'strokeWidth' not 0
2020-07-27 19:44:45 -04:00
chris moran 4ee65822aa
Merge remote-tracking branch 'carlosblanco/feature/1228-support-dashes-in-actor-names-in-sequence-diagrams' into develop 2020-07-27 15:05:57 -04:00
chris moran e7ca6c16ff
Tweaked PIE (got rid of some parsing conflicts) 2020-07-27 14:15:38 -04:00
chris moran 771bf78576
Fixed parsers to use the correct type name in close_directive
Added directive support to pie
(Refactored pie parsing to be a bit more clear)
Added more unit tests to pie
2020-07-27 13:24:23 -04:00
chris moran b9fa2f4125
Added directive parsing to gannt
Ensured tests pass
2020-07-27 10:16:41 -04:00
chris moran e5b22684cd
Fixed a parser warning in classDiagram
Fixed a regression bug I introduced in theme.spec.js
2020-07-27 09:57:04 -04:00
chris moran 43d37ab1cf
Fixed a new config issue
Diagrams now properly reset to siteConfig when there are multiple diagrams on a single page
2020-07-27 08:54:45 -04:00
chris moran 1fc142a59f
Fixed a regression with classDiagram supporting comments 2020-07-27 07:38:12 -04: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
Knut Sveidqvist f0ed170b04 #1542 Setting up base theme for custom theming 2020-07-27 11:51:20 +02:00
chris moran 38d4b5be1a
Fixed an issue with flowchart rendering. Remember to render html, securityLevel='loose' must be set by the siteConfig. The default securityLevel as of now is 'strict'. This causes html to be url encoded. 2020-07-27 05:33:41 -04:00
Knut Sveidqvist 5a7d770a58 #1542 Setting up base theme for custom theming 2020-07-27 10:01:34 +02:00
chris moran c8f652aaa8
Merge branch 'mermaid-js-develop' into develop 2020-07-27 03:23:04 -04:00
Knut Sveidqvist 01d7a33230 Merge branch 'master' into develop 2020-07-26 22:37:10 +02:00
chris moran 108a50f3bb
Merge branch 'mermaid-js-develop' into develop 2020-07-26 08:59:22 -04:00
Knut Sveidqvist 95b7e4f9ad Theme tweaks 2020-07-26 14:09:48 +02:00
Knut Sveidqvist 3fb3453166 dark theme fixes 2020-07-26 12:13:06 +02:00
Knut Sveidqvist 62acc18e7d Merge of cherry pick 2020-07-26 08:03:56 +02:00
Knut Sveidqvist 06d80032fe #1578 Fetching updated configuration before use 2020-07-26 08:00:43 +02:00
Knut Sveidqvist c5b55fa476 Some small interim changes, adding theming.doc 2020-07-24 08:25:57 +02:00
Carlos Blanco b120c34177
Support dashes in actor names in sequence diagrams 2020-07-23 20:15:52 -06:00
chris moran 1b89189efa
re-add classDiagram as a theme type (in addition to class and classDiagram-v2 for class diagrams) 2020-07-23 06:03:04 -04:00
chris moran e53c5097f9
Merge branch 'mermaid-js-develop' into develop 2020-07-23 05:59:40 -04:00
chris moran cb675300b1
Directive support added to journey
Fixed an issue in journey svgDraw.drawText expected an attribute (textMargin) but did not receive one and raised an error: <tspan> attribute x: Expected length, "NaN".
Added parseDirective to journeyDb
2020-07-23 05:58:15 -04:00
Knut Sveidqvist dbda90b15b Fix if theme inclusion for classDiagrams 2020-07-23 07:50:22 +02:00
chris moran a54f3c8c7f
Refactor
Moved theme variables to the config module
2020-07-22 16:46:41 -04:00
Ashish Jain 71af9741cc Correct positioning for class title 2020-07-22 21:25:01 +02:00
Ashish Jain c9d4cac3ff Merge branch 'develop' into feature/Issue-1465_Class_migration 2020-07-22 19:33:20 +02:00
Ashish Jain a2932a0393 Merge branch 'master' into develop 2020-07-22 19:30:55 +02:00
Ashish Jain 6917303e1b Enabled styles.js for classDiagram-v2 2020-07-22 19:25:26 +02:00
Ashish Jain 03c19ccae9 Migrated style css from scss file to styles.js 2020-07-22 19:10:28 +02:00
Ashish Jain ff439369da Updated variable name to cnf 2020-07-22 18:27:25 +02:00
Ashish Jain 24e470a099 Merge branch 'develop' into feature/Issue-1465_Class_migration 2020-07-22 18:23:47 +02:00
Ashish Jain 07a7ea1f23 #1552 Fix for broken cardinality support for class diagrams 2020-07-22 17:35:01 +02:00
Ashish Jain 516649a508 Adjusting initial classDiagram shape rendering 2020-07-21 15:27:02 +02:00
Ashish Jain abe23250c4 Adjusting initial classDiagram shape rendering 2020-07-21 15:25:16 +02:00
Knut Sveidqvist 0f575907c7
Merge pull request #1560 from NeilCuzon/release/8.6.0
Edited Release/8.6.0
2020-07-21 12:56:38 +02:00
Knut Sveidqvist cb79302867 #1562 Updated handling of pointsarray when the point is already in the array 2020-07-21 12:01:08 +02:00
Knut Sveidqvist 211d6f4005 2020-07-21 11:15:42 +02:00
Neil Cuzon ddee6d2b6a
Update config.js 2020-07-20 20:07:57 -07:00
Neil Cuzon 575c34467f
Merge branch 'develop' into release/8.6.0 2020-07-20 20:01:32 -07:00
Knut Sveidqvist a6ec038189
Merge pull request #1558 from mermaid-js/less_theme_variables
More theming tweaks
2020-07-20 17:37:18 +02:00
Knut Sveidqvist ffaf6c14e4 #154 trweaking some more, state diagram composit backgrounds 2020-07-20 17:10:59 +02:00
Knut Sveidqvist 3a6915c0b6 #154 lint fixes 2020-07-20 15:24:12 +02:00
Knut Sveidqvist 93a8c83a68 #1542 Alignment between themes 2020-07-20 15:15:03 +02:00
Knut Sveidqvist 1302addcdd #1542 Base theme for simple custom themeing 2020-07-20 14:13:05 +02:00
Knut Sveidqvist 490cbd3f0d
Merge pull request #1557 from cmmoran/develop
Render tweak - each diagram should reset the config to siteConfig upon rendering
2020-07-20 11:01:29 +02:00
chris moran f5f26f334f
Move detectInit higher in the render function. This prevents getConfig from potentially being called with the config changes from previous diagrams on the same page (or context)
This also allows mermaid the chance to reset the config to the siteConfig in between renderings
2020-07-20 04:45:10 -04:00
Knut Sveidqvist dba579b546 #1542 Gantt tweaks 2020-07-20 10:24:15 +02:00
Knut Sveidqvist fa68b8bb35 #1542 Some tweaks for sequence diagram 2020-07-20 10:05:46 +02:00
Knut Sveidqvist ceb84ce020 #1542 Dark theme fixes for gantt 2020-07-20 10:00:08 +02:00
Knut Sveidqvist 68aa7fa3a4 #1542 Dark theme fixes for pie and user-journey 2020-07-20 09:44:09 +02:00
Knut Sveidqvist 70cd0655ed #1542 Set default theme variables 2020-07-20 08:20:09 +02:00
Knut Sveidqvist 3c23de9735 #1542 Lint fixes 2020-07-19 21:15:58 +02:00
Knut Sveidqvist 91da46dd63 #1542 Theme adjustments 2020-07-19 21:10:52 +02:00
Knut Sveidqvist 4d280ff010 #1542 Making sure user overrides from directives ocerrides properly 2020-07-19 15:02:53 +02:00
Knut Sveidqvist 04493035cd #1542 Adding khroma for color in dark-theme 2020-07-18 15:51:17 +02:00
Knut Sveidqvist 08064c4243 #1542 Adding khroma for color manipulations 2020-07-18 15:15:50 +02:00
Knut Sveidqvist e8af778962 #1542 Updated test 2020-07-18 13:52:51 +02:00
Neil Cuzon 26dba53d99
Update config.js 2020-07-18 04:39:33 -07:00
Knut Sveidqvist f7a6241ac0 #1542 Fix for markers in class diagrams 2020-07-18 09:57:55 +02:00
Knut Sveidqvist b6453383cf #1542 Handling of default values when no theme is set 2020-07-18 09:37:51 +02:00
Knut Sveidqvist 8d076efd71 #1542 Styling for all diagram types 2020-07-17 15:57:02 +02:00
Knut Sveidqvist f9667cd80f #1542 Test page using directoives to switch theme 2020-07-17 12:34:33 +02:00
Knut Sveidqvist 030b945828 #1542 Theme variables setup 2020-07-17 09:16:39 +02:00
Knut Sveidqvist fd4240b774 #1542 Setting theme options as the regular options 2020-07-16 23:39:38 +02:00
Knut Sveidqvist 8c0e022b44 Template for dynamic styles in place 2020-07-16 20:27:42 +02:00
Knut Sveidqvist da8e75f98a Merge from master with doc updates 2020-07-16 12:27:03 +02:00
Knut Sveidqvist 594ae20a6e #1547 Remove usage of crypto libraries 2020-07-16 10:48:37 +02:00
Knut Sveidqvist 6959e140af #1485 Fixing font in pie legends after fix 2020-07-15 12:32:43 +02:00
Knut Sveidqvist 3a9306a9c2 #1485 Setting proper font settings in the root css 2020-07-15 12:12:57 +02:00
Neil Cuzon 9a2321a669
Update config.js 2020-07-14 18:15:42 -07:00
Neil Cuzon 1878e39dfc
Update config.js 2020-07-14 18:11:36 -07:00
Knut Sveidqvist 686ee1e349 Relase 8.6.0 2020-07-13 16:39:52 +02:00
Knut Sveidqvist 2bdc229a9a
Merge pull request #1496 from polarsquad/fix-git-commit-id
Make gitGraph commit IDs out of hexadecimal chars
2020-07-12 11:22:19 +02:00
Knut Sveidqvist e93a0556e7
Merge pull request #1471 from vantoan8x/securityLevel_antiscript_option
add security level antiscript option, use rich html format but dont permit script element.
2020-07-12 10:58:08 +02:00
Knut Sveidqvist 12668b78b9
Merge pull request #1535 from 72636c/feature/er_classes
Add classes to ERD elements
2020-07-12 10:52:30 +02:00
Knut Sveidqvist 8255088508
Merge pull request #1534 from 72636c/feature/er_use_max_width
Add `er.useMaxWidth` config option
2020-07-12 10:51:00 +02:00
Ryan Ling 3e38da2120
Document er defaults 2020-07-11 20:50:36 +10:00
Ryan Ling 20e56d7dfa
Add classes to ERD elements
It's a little hard to style the current ERDs. This aims to make things
easier by associating a distinct class with each type of element within
the diagram.

I've added a common `er` class across the elements so that those that
bring their own `themeCSS` can target styles at this diagram type. This
hasn't really been done elsewhere so I'm open to suggestions; an
alternative may be to add classes to a top-level element so that we can
do e.g. `svg.mermaid.er .entityBox`.
2020-07-11 20:34:57 +10:00
Ryan Ling 99cb752c71
Add `er.useMaxWidth` config option
This restores the option of rendering an ERD with an absolute width,
which is consistent with the approach taken with the other diagram
types.

This logic was lost in #1324, which was probably just a small oversight:

9199546dca (diff-7c38d27acbe0676d923bf19283671616L397-L409)

The option defaults to true for backwards compatibility.
2020-07-11 18:54:26 +10:00
Ryan Ling 5da4ced8c1
Add `flowchart.diagramPadding` config option
This option lets you customise the padding around the whole flowchart.
It is equivalent to `er.diagramPadding` and defaults to 8px for
backwards compatibility with the current hardcoded value.
2020-07-11 16:54:00 +10:00
chris moran dee47ec978
Missed test case for allowing site owner to append to `secure` field set
Missed logic for default-appending src array values where not existing within dst array in assignWithDepth function
2020-07-08 08:41:35 -04:00
Toan fce2a16e42 add security level antiscript option, to let use rich html format but remove all script element. 2020-07-05 23:04:22 +07:00
Knut Sveidqvist 5242672efb Adding configuration docs to setup.md and bumping version to 8.6.0 2020-07-04 14:25:14 +02:00
Knut Sveidqvist 19ed03c44c #1524 Updated tests 2020-07-04 12:35:34 +02:00
Knut Sveidqvist 32b2ee8cab 2020-07-04 11:13:54 +02:00
Knut Sveidqvist 7e9ab546eb Fix for broken build, issue with config use in flowcahart and gantt diagram 2020-07-02 22:34:13 +02:00
Knut Sveidqvist 2af1f9a9d3 Fix for broken build, issue with config use in flowcahart and gantt diagram 2020-07-02 22:27:03 +02:00
Knut Sveidqvist c655cfaca8 Merge branch 'develop' into feature/1483_long_messages 2020-07-02 18:38:37 +02:00
Knut Sveidqvist b3a465dbca Merge branch 'develop' into feature/1483_long_messages 2020-07-02 18:25:49 +02:00
Knut Sveidqvist 33d3bc53b4
Merge pull request #1519 from cmmoran/develop
Utils - memoize, calculateTextDimensions (and friends), assignWithDepth, etc
2020-07-02 17:01:24 +02:00
Knut Sveidqvist faac22f6ed Lint fix 2020-07-02 16:56:30 +02:00
chris moran 01a2d90e38
sequence numbers for dark mode should probably be black since the circle is the contrast color 2020-07-01 07:53:03 -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 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