Compare commits

...

3101 Commits

Author SHA1 Message Date
Knut Sveidqvist
d6b2bcf0d2 v8.8.4 2020-12-05 14:43:29 +01:00
Knut Sveidqvist
3b55a19119 Merge pull request #1805 from BastianZim/patch-1
Update copyright years
2020-12-03 18:24:12 +01:00
Bastian Zimmermann
8ed7d22010 Updated copyright years
Changed 2018 - 2020
2020-12-02 16:49:09 +01:00
Knut Sveidqvist
96ac13cdac Merge branch 'master' into develop 2020-11-26 19:25:57 +01:00
Knut Sveidqvist
d409006a44 Merge remote-tracking branch 'origin/develop' into develop 2020-11-26 19:22:26 +01:00
Knut Sveidqvist
2e7452f067 Lint fix 2020-11-26 19:15:45 +01:00
Ashish Jain
ddc31870bf Merge pull request #1786 from JiChao99/patch-1
remove classDiagram duplicate options
2020-11-26 19:10:22 +01:00
Knut Sveidqvist
77d6048005 #1771 Fixed broken link 2020-11-26 19:09:39 +01:00
Knut Sveidqvist
8748e661e8 Merge pull request #1796 from kciter/bug/fix_markdown_bug
Fixed markdown error in Relationship Syntax
2020-11-26 18:59:31 +01:00
Knut Sveidqvist
a50086ddec Merge pull request #1789 from mermaid-js/dependabot/npm_and_yarn/highlight.js-9.18.5
Bump highlight.js from 9.18.1 to 9.18.5
2020-11-26 18:57:53 +01:00
Knut Sveidqvist
465fa571d2 Merge pull request #1787 from julianbei/feature/727_deterministic_svg_ids
Add different id generators
2020-11-26 18:56:58 +01:00
Lee Sun-Hyoup
d72ba16664 Fixed markdown error in Relationship Syntax 2020-11-26 14:25:22 +09:00
dependabot[bot]
efd14f4c24 Bump highlight.js from 9.18.1 to 9.18.5
Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 9.18.1 to 9.18.5.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/9.18.5/CHANGES.md)
- [Commits](https://github.com/highlightjs/highlight.js/compare/9.18.1...9.18.5)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-25 00:41:08 +00:00
Julian Amelung
c472024921 Add test cases for utils.initIdGeneratior 2020-11-23 23:54:00 +01:00
Julian Amelung
35cd3918df Add different id generators 2020-11-23 23:05:41 +01:00
alec ji
a2a0851978 remove classDiagram duplicate options
remove classDiagram `#Multiplicity on relations` duplicate options
2020-11-21 02:42:27 +00:00
Knut Sveidqvist
b329679d2d Merge pull request #1773 from tomatoman25/bug/1759_state_notes
Changed regex for multi-line state notes
2020-11-19 17:48:53 +01:00
Knut Sveidqvist
39657e6537 Merge pull request #1784 from gwatts/patch-1
Add Doscy to list of integrations
2020-11-19 17:48:02 +01:00
Knut Sveidqvist
ee99d15df4 Merge pull request #1772 from glensc/babel-dev-dep
Move babel-eslint to devDependencies
2020-11-19 17:47:29 +01:00
Gareth Watts
813b993819 Add Doscy to list of integrations
Docsy includes support for Mermaid in the theme.
2020-11-18 21:57:12 -06:00
GDFaber
f62189b381 Merge pull request #1781 from mermaid-js/bug/1751_flowchart_subgraph_styles
Apply style settings to subgraphs in "flowchart" diagrams
2020-11-18 00:42:30 +01:00
GDFaber
dfa306c8c2 Merge pull request #1782 from mermaid-js/bug/1742_replace_console_log_with_logger_info
Narrow down console logging when flowchart subgraphs are added
2020-11-18 00:40:29 +01:00
GDFaber
df7e90f4b5 Merge pull request #1780 from manicki/bug/typo_lagom_explanation
Fixed typo in the docs
2020-11-18 00:39:54 +01:00
Marc Faber
55532c00b4 Revert updates on integration tests due to failing PR tests 2020-11-18 00:34:02 +01:00
Marc Faber
7ea18f5462 #1742 narrow down console logging when flowchart subgraphs are added 2020-11-18 00:02:10 +01:00
Marc Faber
a16bbb8046 #1751 apply style settings to subgraphs in "flowchart" diagrams 2020-11-17 23:18:11 +01:00
Leszek Manicki
1d30241871 Fixed typo in the docs 2020-11-17 20:40:16 +01:00
Marc Faber
a0e5ec1d13 Merge branch 'bug/1423_ignore_build_files_in_dist' into develop 2020-11-17 15:50:25 +01:00
Marc Faber
830620740a Unix line endings 2020-11-17 15:44:00 +01:00
GDFaber
d34e8c4336 Merge pull request #1777 from mermaid-js/bug/1423_ignore_build_files_in_dist
ignore build files in dist folder
2020-11-17 14:54:45 +01:00
Marc Faber
2370531e75 #1423 ignore build files in dist folder 2020-11-17 14:48:48 +01:00
Marc Faber
06f74a8c15 updated integration tests 2020-11-17 14:34:48 +01:00
GDFaber
e0ad5eaf5e Merge pull request #1776 from mermaid-js/bug/1767_add_sansserif_to_default_fonts
Add sans-serif to default font settings
2020-11-17 13:11:35 +01:00
Marc Faber
067f356010 #1767 Add sans-serif to default font settings 2020-11-17 11:36:34 +01:00
Neil Cuzon
555a38b819 Update mermaidAPI.js 2020-11-15 13:52:21 -08:00
Neil Cuzon
88f2ede8fe Update usage.md 2020-11-15 13:51:45 -08:00
Neil Cuzon
9b2f61d778 Update flowchart.md 2020-11-15 13:44:47 -08:00
Marc Faber
0801047fe6 added a file for graph<->flowchart comparisons to dist folder 2020-11-15 19:22:55 +01:00
Neil Cuzon
f8b8d03e15 Add files via upload 2020-11-15 07:57:22 -08:00
Neil Cuzon
f4270a0d75 Delete GitHub-Mark-32px.png 2020-11-15 07:57:08 -08:00
Neil Cuzon
0ab629e32d Add files via upload 2020-11-15 07:56:15 -08:00
Neil Cuzon
4259611726 Add files via upload 2020-11-15 07:34:36 -08:00
Neil Cuzon
24e2429fc0 Add files via upload 2020-11-15 07:34:05 -08:00
Neil Cuzon
ebf046ebc0 Delete GitHub-Mark-32px.png.png 2020-11-15 07:33:31 -08:00
Neil Cuzon
0155171c0d Add files via upload 2020-11-15 07:24:37 -08:00
Neil Cuzon
5a92b77560 Update flowchart.md 2020-11-15 07:19:13 -08:00
Marc Faber
0604b1a822 Merge branch 'forkgroup-docs/update_edit_this_page' into develop 2020-11-15 16:15:14 +01:00
Marc Faber
d54f3afe25 Merge branch 'docs/update_edit_this_page' of https://github.com/forkgroup/mermaid into forkgroup-docs/update_edit_this_page 2020-11-15 16:13:42 +01:00
Neil Cuzon
acc2392c3d Update mermaidAPI.js 2020-11-15 05:00:54 -08:00
Neil Cuzon
3044c63773 Update usage.md 2020-11-15 04:51:33 -08:00
Neil Cuzon
f963238a75 Update mermaidAPI.js 2020-11-15 03:45:20 -08:00
Neil Cuzon
46d41ba67a Update n00b-gettingStarted.md 2020-11-15 03:25:02 -08:00
Neil Cuzon
00921ce713 Add files via upload 2020-11-15 03:22:44 -08:00
Neil Cuzon
55073bd891 Add files via upload 2020-11-15 03:19:33 -08:00
Neil Cuzon
2b4ceda937 Update n00b-gettingStarted.md 2020-11-15 03:19:28 -08:00
Neil Cuzon
93ddc0b4f5 Delete liveEditorOptions.png 2020-11-15 03:14:49 -08:00
Neil Cuzon
a74fc5aac7 Delete n00b-Confluence1.png 2020-11-15 03:14:38 -08:00
Neil Cuzon
e1032498e2 Delete n00b-Confluence2.png 2020-11-15 03:14:32 -08:00
Neil Cuzon
f43e07bc68 Delete n00b-Confluence3.png 2020-11-15 03:14:25 -08:00
Neil Cuzon
e61207ab41 Delete n00b-Confluence4.png 2020-11-15 03:14:18 -08:00
Neil Cuzon
0f87b1b5da Delete n00b-liveEditor.png 2020-11-15 03:14:11 -08:00
Neil Cuzon
6032e33290 Update _sidebar.md 2020-11-15 03:07:01 -08:00
Neil Cuzon
037cba9a13 Update n00b-gettingStarted.md 2020-11-15 02:48:45 -08:00
sy-records
cb41569a5a feat: Auto generation of Edit this Page 2020-11-15 10:28:47 +08:00
sy-records
6167f5d7b4 chore: update resources links and fix typo 2020-11-15 10:27:08 +08:00
GDFaber
b50a453fe0 Merge pull request #1764 from AloisMahdal/doc_df_table
Re-align gantt chart dateFormat table with spaces
2020-11-13 23:25:34 +01:00
Anthony
52d7f02dcb Changed regex for multi-line state notes 2020-11-13 14:10:42 -05:00
Elan Ruusamäe
cce90a2bed Move babel-eslint to devDependencies
It was added to runtime dependencies with bulk commit a4bf85b1b6

refs:
- https://github.com/mermaid-js/mermaid/pull/1586
2020-11-13 13:53:10 +02:00
Alois Mahdal
973b6fc355 Re-align gantt chart dateFormat table with spaces
With tabs, the table does not render in a readable way.  This commit is
replacing tabs with spaces.
2020-11-10 11:31:14 +01:00
Neil Cuzon
331c7d1a1a Update 8.6.0_docs.md 2020-11-08 19:32:11 -08:00
Neil Cuzon
e35ee592ad Update directives.md 2020-11-08 18:59:32 -08:00
Neil Cuzon
2e646d722c Update directives.md 2020-11-08 18:58:46 -08:00
Neil Cuzon
fff29fcd69 Update Setup.md 2020-11-08 01:29:00 -08:00
Neil Cuzon
4fd8bcd7c7 Update usage.md 2020-11-07 23:42:35 -08:00
Neil Cuzon
9fd97d89c0 Update usage.md 2020-11-07 23:41:58 -08:00
Neil Cuzon
0544f96980 Update README.md 2020-11-07 21:28:33 -08:00
Neil Cuzon
4671a49fd8 Update _sidebar.md 2020-11-07 21:24:38 -08:00
Knut Sveidqvist
e3cf8b7843 Updated version oif mermaid in the docs 2020-11-05 20:09:08 +01:00
Knut Sveidqvist
997257ff79 Merge branch 'release/8.8.3'
Conflicts:
	docs/diagrams-and-syntax-and-examples/flowchart.md
	docs/flowchart.md
2020-11-05 20:08:18 +01:00
Ashish Jain
153da33311 Updating minor changes on Docs 2020-11-05 19:29:29 +01:00
Knut Sveidqvist
93f613d6af Merge branch 'release/8.8.3' of github.com:mermaid-js/mermaid into release/8.8.3 2020-11-05 19:23:41 +01:00
Knut Sveidqvist
608c0df0f7 Updated docs 2020-11-05 19:23:38 +01:00
Ashish Jain
4f568d5d19 Updating minor changes on Docs 2020-11-05 19:16:12 +01:00
Knut Sveidqvist
331c952212 Merge pull request #1757 from spopida/bug/1756_ERD_padding
Fix padding for entities with no attributes
2020-11-05 18:53:46 +01:00
Adrian Hall
879da091d3 Fix padding for entities with no attributes 2020-11-05 11:56:57 +00:00
Knut Sveidqvist
68410b9c58 Merge branch 'release/8.8.3' into develop 2020-11-04 20:33:25 +01:00
Knut Sveidqvist
7a3ecb339b Updated the docs, updated the sections and fixed some bad links 2020-11-04 20:28:10 +01:00
Knut Sveidqvist
144cba7f10 Merge pull request #1755 from loris-intergalactique/develop
Fixed spelling errors
2020-11-04 19:24:50 +01:00
Knut Sveidqvist
ee4571071d Merge pull request #1750 from spopida/feature/1531_ERD_attributes
Feature/1531 erd attributes
2020-11-04 19:24:22 +01:00
LORIS INTERGALACTIQUE
47a3ca44ba Add scss path in docs 2020-11-04 16:59:28 +01:00
LORIS INTERGALACTIQUE
0e7ad3feeb Removed an incomplete line 2020-11-04 16:56:12 +01:00
LORIS INTERGALACTIQUE
bb6ba758db Fixed spelling errors 2020-11-04 16:52:28 +01:00
Adrian Hall
1ce4805bdc Merge branch 'develop' into feature/1531_ERD_attributes 2020-11-02 09:44:56 +00:00
Adrian Hall
ecdb66f65a Merge branch 'develop' of https://github.com/mermaid-js/mermaid into develop 2020-11-02 09:42:23 +00:00
Adrian Hall
ae1880311e Support attribute definitions for entities in ERDs 2020-11-02 09:41:46 +00:00
Knut Sveidqvist
6652319283 Merge branch 'release/8.8.3' into develop 2020-11-01 11:09:40 +01:00
Knut Sveidqvist
855dec7fcd Fix for build 2020-11-01 11:08:47 +01:00
Knut Sveidqvist
e57120fa61 Version update in package.json to 8.8.3 2020-10-31 11:14:39 +01:00
Knut Sveidqvist
f955eef31e Merge branch 'spopida-bug/1710_underscore_in_entity_names' into develop 2020-10-31 11:10:53 +01:00
Knut Sveidqvist
6aaec3dc96 Merge branch 'bug/1710_underscore_in_entity_names' of https://github.com/spopida/mermaid into spopida-bug/1710_underscore_in_entity_names 2020-10-31 11:10:24 +01:00
Knut Sveidqvist
f59e5128d7 Merge pull request #1749 from levlas/bug/1748-broken-links
fix broken links in README
2020-10-31 11:06:54 +01:00
Knut Sveidqvist
29fa2dfcfb Merge pull request #1743 from lishid/patch-1
Fixed bad tertiary operator
2020-10-31 11:05:50 +01:00
Neil Cuzon
6363cb0d80 Update README.md 2020-10-30 18:14:10 -07:00
Neil Cuzon
17d9f4fb46 Update README.md 2020-10-30 18:11:35 -07:00
Neil Cuzon
2c6329310a Update README.md 2020-10-30 18:09:31 -07:00
Neil Cuzon
48089e869e Update README.md 2020-10-30 18:06:57 -07:00
Neil Cuzon
5cb735eb8f Update README.md 2020-10-30 18:02:26 -07:00
Neil Cuzon
d034e32703 Update README.md 2020-10-30 17:59:54 -07:00
Neil Cuzon
a3b8c84e39 Update README.md 2020-10-30 17:58:42 -07:00
Neil Cuzon
bf2376d504 Update README.md 2020-10-30 17:58:34 -07:00
Neil Cuzon
aba8c0356a Update README.md 2020-10-30 17:57:36 -07:00
Adrian Hall
8870ba3b65 merge from updated develop 2020-10-30 14:40:45 +00:00
Adrian Hall
26e0283fc7 Merge remote-tracking branch 'origin/bug/1710_underscore_in_entity_names' into develop 2020-10-30 13:56:22 +00:00
Adrian Hall
0c38e014d7 Support entity attributes 2020-10-30 13:45:35 +00:00
Levente Laszlo
b89f79d901 fix broken links in README 2020-10-29 20:21:21 +01:00
Neil Cuzon
56fbbef133 Update stateDiagram.md 2020-10-28 01:10:39 -07:00
Neil Cuzon
6ece2537ee Update usage.md 2020-10-28 01:10:34 -07:00
Neil Cuzon
f7b722f10f Update user-journey.md 2020-10-28 01:10:29 -07:00
Neil Cuzon
64544a6e7c Update pie.md 2020-10-28 01:09:49 -07:00
Neil Cuzon
1ef7a097a6 Update integrations.md 2020-10-28 00:44:37 -07:00
Neil Cuzon
b70297dc7a Update n00b-gettingStarted.md 2020-10-28 00:44:34 -07:00
Neil Cuzon
732b3289f0 Update n00b-overview.md 2020-10-28 00:44:31 -07:00
Neil Cuzon
bc0caa5dd6 Update n00b-syntaxReference.md 2020-10-28 00:44:29 -07:00
Neil Cuzon
f835b34f57 Update newDiagram.md 2020-10-28 00:44:27 -07:00
Neil Cuzon
3aa33bd720 Update examples.md 2020-10-28 00:40:31 -07:00
Neil Cuzon
87601fba1b Update faq.md 2020-10-28 00:40:29 -07:00
Neil Cuzon
adc900a03a Update flowchart.md 2020-10-28 00:40:25 -07:00
Neil Cuzon
de52808e9f Update gantt.md 2020-10-28 00:40:23 -07:00
Neil Cuzon
31aebca134 Update classDiagram.md 2020-10-28 00:38:21 -07:00
Neil Cuzon
9d09bdc1f3 Update development.md 2020-10-28 00:38:02 -07:00
Neil Cuzon
a9c3019433 Update entityRelationshipDiagram.md 2020-10-28 00:37:35 -07:00
Neil Cuzon
3f56830170 Update directives.md 2020-10-28 00:37:33 -07:00
Neil Cuzon
73b1953c09 Update Tutorials.md 2020-10-28 00:20:35 -07:00
Neil Cuzon
4e0fc58f60 Update Tutorials.md 2020-10-28 00:20:20 -07:00
Neil Cuzon
108f102360 Update CHANGELOG.md 2020-10-28 00:19:36 -07:00
Neil Cuzon
be73811c53 Update README.md 2020-10-28 00:18:12 -07:00
Neil Cuzon
f3fbc004f3 Update 8.6.0_docs.md 2020-10-28 00:17:17 -07:00
Neil Cuzon
be71cf5689 Update 8.6.0_docs.md 2020-10-28 00:16:40 -07:00
Neil Cuzon
bd53fce4a7 Update 8.6.0_docs.md 2020-10-28 00:15:17 -07:00
Neil Cuzon
80c72c8f83 Merge pull request #1746 from NeilCuzon/develop
Switching to Docsify and adding search
2020-10-27 00:11:03 -07:00
NeilCuzon
445daaeba2 Switching to Docsify and adding search 2020-10-25 00:30:20 -07:00
Adrian Hall
851cff4bb8 Merge branch 'develop' into bug/1710_underscore_in_entity_names 2020-10-23 10:02:50 +01:00
Adrian Hall
245e25f4b7 Allow underscores in entity names, and entities with no relationships 2020-10-23 10:00:17 +01:00
Lishid
69113a988f Update theme-base.js 2020-10-22 22:17:43 -04:00
Lishid
521bfc66f0 Update theme-base.js 2020-10-22 22:14:10 -04:00
Lishid
d473f3904a Fixed bad tertiary operator
This fixes the tertiary operator used to compute the `edgeLabelBackground` theme variable.
2020-10-22 21:55:13 -04:00
Ashish Jain
74d09b5468 Merge pull request #1741 from mermaid-js/1740_nested_subgraps_directions
1740 nested subgraps directions
2020-10-22 20:59:01 +02:00
Knut Sveidqvist
b495772118 #1740 Adding fixing another tests 2020-10-22 18:52:23 +02:00
Knut Sveidqvist
7c939860d6 #1740 Adding test 2020-10-22 18:47:32 +02:00
Knut Sveidqvist
310420fda1 2020-10-22 18:45:46 +02:00
Knut Sveidqvist
a679d2a0ed Merge pull request #1733 from AndreasVolkmann/patch-1
Update flowchart.md
2020-10-22 17:29:38 +02:00
Knut Sveidqvist
3f60107885 Merge pull request #1739 from BastianZim/develop
Updated docs
2020-10-22 17:28:22 +02:00
Knut Sveidqvist
3c2e8cb71c Merge pull request #1735 from fregante/patch-1
Replace `fregante/setup-git-token` with `setup-git-user`
2020-10-22 17:27:25 +02:00
Bastian Zimmermann
cff55e91b0 Fixed bold 2020-10-22 15:41:36 +02:00
Bastian Zimmermann
005390f54b Updated http to https 2020-10-22 15:36:52 +02:00
Bastian Zimmermann
82ce848d24 Pointed Live editor and CLI to new repo 2020-10-22 15:32:59 +02:00
Bastian Zimmermann
dfdae7f046 Added space 2020-10-22 15:00:06 +02:00
Bastian Zimmermann
7a7bad2aa3 Added link to example 2020-10-22 14:59:31 +02:00
Bastian Zimmermann
8f438744cf Added link to example 2020-10-22 14:58:58 +02:00
Bastian Zimmermann
460ccd9b34 Added link to example 2020-10-22 14:56:56 +02:00
Federico
0638d0b2d7 Replace fregante/setup-git-token with setup-git-user 2020-10-19 22:31:33 -05:00
Andreas Volkmann
4c239b7eef Update flowchart.md 2020-10-16 12:34:08 +02:00
Andreas Volkmann
ac8ddd58f0 Update flowchart.md
Fix typos
2020-10-16 12:31:05 +02:00
Neil Cuzon
b49308f0f1 Merge pull request #1703 from wontonst/patch-1
Fix broken links in gantt.md
2020-10-16 02:49:32 -07:00
Neil Cuzon
b435171aa2 Merge branch 'develop' into patch-1 2020-10-16 02:49:06 -07:00
Knut Sveidqvist
8e342e1db7 Merge pull request #1731 from mermaid-js/1724_fontawesome_edge_labels
#1724 Adding fontawesome to edge labels
2020-10-15 19:49:49 +02:00
Knut Sveidqvist
1ade6cdfa5 Merge pull request #1728 from alexislefebvre/patch-1
README: use stateDiagram-v2
2020-10-15 19:46:37 +02:00
Knut Sveidqvist
561ee5c72e Merge pull request #1729 from Eraledm/fixing-broken-diagrams
Fixed empty code examples
2020-10-15 19:44:54 +02:00
Knut Sveidqvist
143566fbf6 Merge pull request #1727 from deining/fix_links
Fixing broken links and misspellings
2020-10-15 19:43:59 +02:00
Knut Sveidqvist
5e0f2e8572 Merge branch 'develop' into fix_links 2020-10-15 19:43:49 +02:00
Knut Sveidqvist
350732d8dd Merge pull request #1705 from hwine/typo-pie.md
Fix typo in pie.md
2020-10-15 19:37:58 +02:00
Knut Sveidqvist
d8da24804f #1724 Adding fontawesome to edge labels 2020-10-15 19:29:37 +02:00
Knut Sveidqvist
15f8856f92 Merge pull request #1730 from mermaid-js/1726_graphDef_linkStyle
1726 graph def link style
2020-10-15 19:27:14 +02:00
Knut Sveidqvist
4ae61ad35a €1726 updated test 2020-10-15 19:06:38 +02:00
Knut Sveidqvist
c2c5cc45fa Merge remote-tracking branch 'refs/remotes/origin/1726_graphDef_linkStyle'
Conflicts:
	cypress/platform/knsv.html
2020-10-15 19:04:48 +02:00
Knut Sveidqvist
7404e436d2 #1726 Handling think lines 2020-10-15 19:00:35 +02:00
Knut Sveidqvist
cc1560d3e3 #1726 fix for link styling and classes for subgraph 2020-10-15 18:42:58 +02:00
Knut Sveidqvist
4812437519 2020-10-15 18:42:58 +02:00
Knut Sveidqvist
53933d934d 2020-10-15 17:45:19 +02:00
Knut Sveidqvist
f108099623 2020-10-15 17:37:16 +02:00
Manuel DeLaRe
7dd82a4a87 Fixed empty code examples 2020-10-14 13:50:44 -05:00
Alexis Lefebvre
1a91b1bd42 README: use stateDiagram-v2 2020-10-14 17:23:10 +02:00
Andreas Deininger
439399b9f1 Fixing various typos/misspellings in documentation 2020-10-14 14:41:15 +02:00
Andreas Deininger
5e95d75f44 Fixing broken links 2020-10-14 13:47:20 +02:00
Neil Cuzon
35deb4a512 Update n00b-overview.md 2020-10-09 18:49:45 -07:00
Neil Cuzon
19ac8e6e61 Update Tutorials.md 2020-10-09 02:14:01 -07:00
Neil Cuzon
68a0506a40 Update Tutorials.md 2020-10-08 18:46:02 -07:00
Knut Sveidqvist
0f9da18cbe Merge branch 'master' into develop 2020-10-08 19:48:33 +02:00
Knut Sveidqvist
acc4f31c3a Merge branch 'release/8.8.2' 2020-10-08 19:45:50 +02:00
Knut Sveidqvist
2e4d1a7b44 Release 8.8.2 2020-10-08 19:43:29 +02:00
Knut Sveidqvist
ec7628924e Version update 2020-10-08 18:52:48 +02:00
Knut Sveidqvist
4c849554da Merge pull request #1709 from mermaid-js/1704_subgraphs
1704 subgraphs
2020-10-08 18:25:43 +02:00
Knut Sveidqvist
582a045457 #1704 Test and lint 2020-10-07 20:43:52 +02:00
Knut Sveidqvist
4b2d98129e #1704 handling of subgraph data 2020-10-07 20:43:31 +02:00
Knut Sveidqvist
8ec99cb244 Merge remote-tracking branch 'origin/develop' into develop 2020-10-07 18:08:42 +02:00
Knut Sveidqvist
088dd8698e Merge branch 'release/8.8.1' into develop 2020-10-07 17:57:52 +02:00
Neil Cuzon
e9f4d2040b Update _sidebar.md 2020-10-05 19:56:32 -07:00
Neil Cuzon
6d58836301 Update _sidebar.md 2020-10-05 19:37:36 -07:00
Neil Cuzon
c81eaccfef Update newDiagram.md 2020-10-05 19:03:45 -07:00
Hal Wine
b21100cc5d Fix typo in pie.md
':' is called a "[colon](https://en.wikipedia.org/wiki/Colon_(punctuation))" (not [semi-colon](https://en.wikipedia.org/wiki/Semicolon))
2020-10-03 09:07:32 -07:00
Neil Cuzon
f6954c898d Update README.md 2020-10-01 18:53:48 -07:00
Neil Cuzon
f1cea37814 Update README.md 2020-10-01 18:53:30 -07:00
Roy Zheng
911d97c0a3 Fix broken links in gantt.md 2020-10-01 16:01:53 -07:00
Knut Sveidqvist
4dc805d25a Release 8.8.1 2020-09-30 19:23:42 +02:00
Knut Sveidqvist
c691ef1899 Removing console.logs 2020-09-30 18:47:50 +02:00
Knut Sveidqvist
04338335d0 Merge branch 'develop' into release/8.8.1 2020-09-30 18:31:08 +02:00
Knut Sveidqvist
4d9d315f10 Merge pull request #1699 from ct-martin/docs/readme-osawards
Update link to Open Source Awards
2020-09-30 18:26:47 +02:00
Christian Martin
eb3ddbcca7 Update link to Open Source Awards 2020-09-24 14:38:37 -07:00
Knut Sveidqvist
13d11633ab 8.8.1-rc1 2020-09-23 20:54:07 +02:00
Knut Sveidqvist
c4572036b3 Bumping version to 8.8.1 2020-09-23 20:50:25 +02:00
Knut Sveidqvist
f0a8eaa5be Merge pull request #1697 from mermaid-js/1676_click_support_v2
Adds support for custom cssClasses for classDiagram-v2. Also, improved test cases for classDiagram.
2020-09-23 20:41:52 +02:00
Ashish Jain
93bf8d7414 #1696 Fix for custom cssClass test cases for classDiagram 2020-09-23 20:16:06 +02:00
Knut Sveidqvist
2cbb2d7b6a Merge pull request #1695 from mermaid-js/1694_style_flowchart
#1694 Applying styles from the graph definition for flowcharts
2020-09-23 20:11:39 +02:00
Knut Sveidqvist
ce23316008 #1694 Applying styles from the graph definition for flowcharts 2020-09-23 19:51:16 +02:00
Ashish Jain
c04dac65ac #1693 Added support for custom cssClass and styling to classDiagram-v2 2020-09-23 19:27:09 +02:00
Neil Cuzon
abba5a5d75 Update newDiagram.md 2020-09-20 07:06:57 -07:00
Neil Cuzon
98b556cb1a Update development.md 2020-09-20 06:25:57 -07:00
Neil Cuzon
488afd64d7 Create newDiagram.md 2020-09-20 06:09:37 -07:00
Neil Cuzon
e2a7e60dad Update _sidebar.md 2020-09-20 06:08:19 -07:00
Knut Sveidqvist
c17778ba47 Merge pull request #1686 from irqbank/develop
Remove console messages
2020-09-20 14:31:31 +02:00
Knut Sveidqvist
753ba194fd Merge pull request #1685 from mermaid-js/1676_click_support_v2
1676 click support v2
2020-09-20 14:28:31 +02:00
Knut Sveidqvist
f856782528 #1657Fix for broken test 2020-09-20 12:31:39 +02:00
Knut Sveidqvist
c9ff70b3cc #1657 Handling class definitions for flowchart beta 2020-09-20 12:14:04 +02:00
Neil Cuzon
6311abec2d Merge pull request #1684 from DavidWittman/docs-noob-syntax-typo
Fix typo in n00b-syntaxReference.md
2020-09-19 07:15:26 -07:00
root
1461d535d4 Remove console messages 2020-09-19 00:52:45 -04:00
David Wittman
77d57b865d Fix typo in n00b-syntaxReference.md 2020-09-17 15:38:44 -05:00
Ashish Jain
57a208d271 Fix for broken Flowchart test cases 2020-09-16 22:02:11 +02:00
Ashish Jain
a26c9fca1e #1676 Fix for additonal usecases for flowchart 2020-09-16 21:53:17 +02:00
Knut Sveidqvist
c679d18888 #1676 Fix for broken tests 2020-09-16 20:33:04 +02:00
Knut Sveidqvist
2a6372cabe #1676 Handling vertices starting with a number 2020-09-16 20:09:02 +02:00
Ashish Jain
22c710ed99 #1676 Fix for broken test cases 2020-09-16 18:59:53 +02:00
Knut Sveidqvist
a14ff7820e #1676 Fix for tests 2020-09-12 13:40:25 +02:00
Knut Sveidqvist
a446b3c600 #1676 Lint fix 2020-09-12 13:35:11 +02:00
Knut Sveidqvist
c8c4554299 #1676 Adding click support and tooltip support for flowchart 2020-09-12 10:56:23 +02:00
Knut Sveidqvist
6360ed52b2 #1676 lint fix 2020-09-10 21:00:25 +02:00
Knut Sveidqvist
9d8c867de8 #1676 Adding click support to the new rendering engine and classDiagram-v2 2020-09-10 20:58:16 +02:00
Knut Sveidqvist
571b8bbd88 Merge pull request #1672 from mermaid-js/1542_take_two
1542 take two
2020-09-09 19:11:42 +02:00
Knut Sveidqvist
b795950892 #1636 Manual update due to conflicts 2020-09-09 18:56:40 +02:00
Ashish Jain
28c01f6476 Merge branch 'develop' of https://github.com/knsv/mermaid into 1542_take_two 2020-09-09 18:43:53 +02:00
Knut Sveidqvist
117988d26d Merge pull request #1664 from saowang/develop
Fixed broken links and syntax in the document
2020-09-09 18:39:18 +02:00
Knut Sveidqvist
137770dc61 Merge pull request #1668 from mermaid-js/dependabot/npm_and_yarn/http-proxy-1.18.1
Bump http-proxy from 1.18.0 to 1.18.1
2020-09-09 18:37:48 +02:00
Ashish Jain
5d57237c3b Merge pull request #1662 from mermaid-js/1660_subgraph_issues
Improved handling of nested subgraphs
2020-09-09 18:37:28 +02:00
dependabot[bot]
9635ef5f16 Bump http-proxy from 1.18.0 to 1.18.1
Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases)
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/http-party/node-http-proxy/compare/1.18.0...1.18.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-09 04:19:44 +00:00
Neil Cuzon
bbec2c54ed Adding a reference to mermaid.min.js
Forces Docs to adopt new syntax modifications, allowing graphs made in the newer syntax to be parsed and rendered in GitHub Pages.
2020-09-07 19:51:23 +02:00
Ashish Jain
c95b9ffc43 Fix for legacy class Diagram title for class bold styling 2020-09-07 13:33:08 +02:00
saowang
5336e98e18 Update mermaidAPI.js 2020-09-07 14:50:33 +08:00
saowang
1f4be42b3f Fixed broken links and syntax in the document 2020-09-07 14:02:09 +08:00
Neil Cuzon
6a1c88204a Adding a reference to mermaid.min.js
Forces Docs to adopt new syntax modifications, allowing graphs made in the newer syntax to be parsed and rendered in GitHub Pages.
2020-09-06 18:16:03 -07:00
Knut Sveidqvist
4f8e242dac 2020-09-06 22:34:13 +02:00
Knut Sveidqvist
89f616df88 Test commit 2020-09-06 09:18:09 +02:00
Knut Sveidqvist
0918b97e81 Merge branch 'release/8.8.0' 2020-09-05 09:46:24 +02:00
Knut Sveidqvist
a8b7144d62 Back to linux sed 2020-09-05 09:46:01 +02:00
Knut Sveidqvist
9bf97d9dcd Release 8.8.0 2020-09-05 09:38:56 +02:00
Knut Sveidqvist
343703c54f Setting version to 8.8.0 2020-09-05 09:16:36 +02:00
Knut Sveidqvist
2ca8bcad5c Merge pull request #1659 from mermaid-js/1602_order_neste_subgraphs
#1602 Update of handling of nested subgraphs
2020-09-02 21:10:03 +02:00
Knut Sveidqvist
9106c6ad52 #1602 Update of handling of nested subgraphs 2020-09-02 20:34:24 +02:00
Knut Sveidqvist
2a4344ace3 Merge pull request #1642 from Mogztter/issue/1490-svg-height-width
resolves #1490 consistent SVG height and width between diagrams
2020-09-02 18:11:51 +02:00
Knut Sveidqvist
a82c53dd2e Not moving the label away from assigned position 2020-08-29 16:11:42 +02:00
GDFaber
1ac3611e6e Merge pull request #1653 from khink/speling
Fix spelling: it's -> its
2020-08-28 09:56:05 +02:00
Kees Hink
c62f3c2898 Fix spelling: it's -> its
If you mean "the ... that it has", use its. If you mean "it is", use it's.
2020-08-28 09:31:09 +02:00
Ashish Jain
b244118fd9 Fix for class title label css 2020-08-27 20:43:37 +02:00
Ashish Jain
7164eaa8b1 Allow Generics support for Class Title definition 2020-08-27 20:14:26 +02:00
Ashish Jain
a20aa472d6 Fix for Edge label positioning 2020-08-27 19:59:30 +02:00
Knut Sveidqvist
1811153467 Merge pull request #1650 from saowang/develop
Update auto generated Setup.md with front matter
2020-08-27 18:52:21 +02:00
saowang
d003f9c6fd Update auto generated Setup.md with front matter 2020-08-26 01:38:51 +08: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
Neil Cuzon
459e07834c Update README.md 2020-08-25 04:07:55 -07:00
Neil Cuzon
c7e7f3b4c1 Update README.md 2020-08-25 04:05:41 -07:00
Neil Cuzon
78a8ae3ba2 Merge pull request #1633 from Mogztter/doc/changelog
Merge changelog and Mermaid Versions
2020-08-25 03:27:58 -07:00
GDFaber
31527e8e87 Merge pull request #1643 from Yash-Singh1/patch-1
Made Capitalization Changes
2020-08-23 23:10:54 +02:00
Yash Singh
c0008bf850 Made Capitalization Changes 2020-08-23 13:47:45 -07:00
GDFaber
3b026ff0cc Merge pull request #1641 from andrewschleifer/patch-1
fix: typo
2020-08-23 20:41:21 +02:00
GDFaber
73b5ffa3ef Merge pull request #1639 from Mogztter/patch-2
Fix image path
2020-08-23 20:40:36 +02:00
Knut Sveidqvist
55f0d0ab9f Merge branch 'develop' of github.com:mermaid-js/mermaid into develop 2020-08-23 20:02:55 +02:00
Knut Sveidqvist
0cbd002667 #1607 Using correct config when to decide about sanitizing text 2020-08-23 20:02:51 +02:00
Andrew Schleifer
5246f81dce fix: typo 2020-08-24 00:56:12 +08:00
Guillaume Grossetie
56a9b8fa94 Fix image path 2020-08-23 15:13:28 +02:00
Guillaume Grossetie
ab130900a1 Merge changelog and Mermaid versions 2020-08-23 15:08:25 +02:00
Neil Cuzon
d4b72ececc Delete _sidebar.md 2020-08-23 03:35:36 -07:00
Neil Cuzon
41b8ac32b3 Delete CHANGELOG.md 2020-08-23 03:35:22 -07:00
Neil Cuzon
7e0e4455b0 Create _sidebar.md 2020-08-23 02:47:29 -07:00
Neil Cuzon
2127c00671 Create CHANGELOG.md 2020-08-23 02:46:55 -07:00
Neil Cuzon
874fc741b5 Update README.md 2020-08-23 02:44:16 -07:00
Neil Cuzon
605241f6e1 Update _sidebar.md 2020-08-22 16:26:02 -07:00
Neil Cuzon
dac7b1c5b1 Delete Tutorials.md 2020-08-21 18:42:39 -07:00
Neil Cuzon
76cb1dc237 Delete Tutorials.md 2020-08-21 18:42:24 -07:00
Neil Cuzon
9440b09c66 Create Tutorials.md 2020-08-21 18:41:57 -07:00
Neil Cuzon
6da0ceec9d Update _sidebar.md 2020-08-21 17:13:34 -07:00
Neil Cuzon
bcb388ea9e Merge pull request #1634 from saowang/develop
Change docs theme from docsify to jekyll-rtd-theme
2020-08-21 17:11:59 -07:00
Neil Cuzon
288f1320a1 Delete _sidebar.md 2020-08-21 17:11:24 -07:00
Neil Cuzon
4aa461e317 Update _sidebar.md 2020-08-21 02:02:35 -07:00
Neil Cuzon
54674158ca Update Tutorials.md 2020-08-21 01:36:08 -07:00
Neil Cuzon
b02a884c16 Update Tutorials.md 2020-08-21 01:17:50 -07:00
Neil Cuzon
91f0f21f45 Create Tutorials.md 2020-08-21 01:16:33 -07:00
Neil Cuzon
44a0115b07 Update Tutorials.md 2020-08-21 01:15:22 -07:00
saowang
95bcd14c1d Update README.md 2020-08-21 14:30:42 +08:00
saowang
9e8c6aed4d Update documents to compatible jekyll-rtd-theme 2020-08-21 01:01:06 +08:00
saowang
f63b58edd9 Docs use remote_theme 2020-08-20 23:03:22 +08:00
saowang
ea47873db3 Add jekyll ignore files 2020-08-20 22:59:18 +08:00
saowang
a608f98ca5 Add jekyll-rtd-theme 2020-08-20 22:55:17 +08:00
Neil Cuzon
e84d0b9334 Update n00b-overview.md 2020-08-20 02:48:59 -07:00
Neil Cuzon
43b0a83b82 Update _sidebar.md 2020-08-20 02:44:09 -07:00
Neil Cuzon
4f7e0941dc Update n00b-overview.md 2020-08-20 02:44:01 -07:00
Neil Cuzon
70a2e934f9 Update n00b-overview.md 2020-08-20 02:41:11 -07:00
Neil Cuzon
14801805ac Update integrations.md 2020-08-20 02:40:24 -07:00
Neil Cuzon
54f2bb1daf Update n00b-overview.md 2020-08-20 02:39:09 -07:00
Marc Faber
75e380fe14 #1609 Fix markdown and example code in docs for state and er diagrams 2020-08-20 11:22:01 +02:00
Neil Cuzon
ec97d40242 Update Tutorials.md 2020-08-20 02:19:16 -07:00
GDFaber
7bb4f5591c Merge pull request #1631 from mermaid-js/bug/improve_docs_gantt_example
Improve gantt example in documentation
2020-08-20 00:56:27 +02:00
Marc Faber
4447366118 Improve gantt example in documentation 2020-08-20 00:38:24 +02:00
GDFaber
7140aa1015 Merge pull request #1625 from it-sec-std/patch-1
Fix comments in gantt docs
2020-08-20 00:18:36 +02:00
GDFaber
16f9b2631e Merge pull request #1629 from Mogztter/patch-2
Explain how to preview the documentation site
2020-08-20 00:14:31 +02:00
Guillaume Grossetie
a6dee9ee0c Explain how to preview the documentation site
The documentation is now powered by Docsify.
Explain how to install `docsify-cli` and how to preview the documentation site locally.
2020-08-19 23:55:53 +02:00
Ashish Jain
89b4f84b0a Update classDiagram-v2 spec test case name 2020-08-19 20:55:46 +02:00
Ashish Jain
09f4c21421 Enable html labels for classDiagram-v2 2020-08-19 20:46:24 +02:00
GDFaber
9fe10d087f Merge pull request #1628 from Lucurus/patch-1
Update usage.md
2020-08-19 20:02:01 +02:00
Lucurus
12a95dfbc6 Update usage.md
Deleted a 0
2020-08-19 19:47:55 +02:00
GDFaber
d9f82806ec Merge pull request #1627 from Lucurus/patch-1
Update usage.md
2020-08-19 18:46:17 +02:00
Ashish Jain
455cd9c696 Merge branch 'develop' of https://github.com/knsv/mermaid into 1542_take_two 2020-08-19 18:45:24 +02:00
Lucurus
f695fa736d Update usage.md
Corrected spelling of responsibility.
2020-08-19 18:34:54 +02:00
GDFaber
51f0a3f42a Merge pull request #1626 from Lucurus/patch-1
Update n00b-gettingStarted.md
2020-08-19 18:25:22 +02:00
Lucurus
b7e953bc1a Update n00b-gettingStarted.md
Changed form of verb contain in 3 b.
2020-08-19 18:14:35 +02:00
it-sec-std
8b508bda9a Update gantt.md
A comment was not marked with propriate syntax, so this example's code didn't work
2020-08-19 16:37:09 +03:00
Neil Cuzon
b69e7fbe2c Update README.md 2020-08-18 19:50:39 -07:00
GDFaber
d5062ec5ae Merge pull request #1621 from mermaid-js/bug/1609_fix_state_and_er_docs
Fix markdown and example code in docs for state and er diagrams
2020-08-18 15:58:12 +02:00
GDFaber
7143a8c806 Merge pull request #1622 from DawMatt/develop
Minor sidebar/version updates page fixes for website
2020-08-18 15:47:12 +02:00
DawMatt
b3d1c548e7 Update versionUpdates.md
Styling in the website sidebar was impacted by inconsistent heading levels and unterminated bold statements. These have been normalised to improve sidebar  display.
2020-08-18 23:22:23 +10:00
DawMatt
b28af56523 Update _sidebar.md
Removed second, broken version updates link
2020-08-18 23:03:51 +10:00
Neil Cuzon
4a08d1d954 Create Tutorials.md 2020-08-17 23:39:23 -07:00
Neil Cuzon
71d977908d Update README.md 2020-08-17 23:17:56 -07:00
Neil Cuzon
cc0da7d8c6 Update README.md 2020-08-17 23:15:35 -07:00
Marc Faber
b55d5c0e39 #1609 Fix markdown and example code in docs for state and er diagrams 2020-08-17 20:26:06 +02:00
Knut Sveidqvist
aafb65f888 Lint fixes 2020-08-17 08:45:20 +02:00
Knut Sveidqvist
12272dfb80 Merge remote-tracking branch 'origin/develop' into develop 2020-08-17 08:43:27 +02:00
Neil Cuzon
7e3848cc76 Update README.md 2020-08-16 23:07:06 -07:00
Neil Cuzon
2ca50de41b Update README.md 2020-08-16 23:04:05 -07:00
Knut Sveidqvist
9561fcea76 Merge branch 'e2e_debug' into develop 2020-08-17 07:54:25 +02:00
Neil Cuzon
b9f45577a7 Update README.md 2020-08-16 22:39:58 -07:00
Neil Cuzon
25dd806a18 Update README.md
Implementing some changes to mirror those, that were made by @Mogztter.
2020-08-16 20:36:25 -07:00
Knut Sveidqvist
6b23c71bb5 Use courier in all rendering tests 2020-08-16 21:49:36 +02:00
Knut Sveidqvist
236332d8c7 Use arial in stateDiagram rendering tests 2020-08-16 13:50:27 +02:00
Knut Sveidqvist
de72d7ba13 Use arial in stateDiagram rendering tests 2020-08-16 13:19:01 +02:00
Knut Sveidqvist
ba6d73fc17 Debug of fonts in percy renderings 2020-08-16 13:01:45 +02:00
Knut Sveidqvist
450d4b5a0a Fix for broken build 2020-08-16 09:06:25 +02:00
Knut Sveidqvist
888b1fb021 #1613 #1495 Adding support for edge length to flowchart (beta) 2020-08-16 08:45:44 +02:00
Knut Sveidqvist
958b032cea Merge branch 'develop' of github.com:mermaid-js/mermaid into develop 2020-08-16 08:34:47 +02:00
Neil Cuzon
e9060a3ad9 Merge pull request #1617 from Mogztter/patch-1
Improve README readability
2020-08-15 19:40:45 -07:00
Guillaume Grossetie
78f43b6e13 Condense about section 2020-08-15 15:10:09 +02:00
Guillaume Grossetie
bbaf7583e4 Improve readme readability
- Fix link to changelog
- Remove changelog from readme
- Use titles sparsely
- Add emojis! 🎉
2020-08-15 14:59:34 +02:00
Knut Sveidqvist
34cc115cdb Merge pull request #1615 from H3RSKO/H3RSKO-readme-typo
Updated Readme
2020-08-15 07:59:56 +02:00
Knut Sveidqvist
93c6272fe2 Merge pull request #1613 from matteodelabre/feature/1495_set_edge_length
Add support for changing the length of edges
2020-08-15 07:58:56 +02:00
H3RSKO
25402c708e Updatd Readme
Fixed Readme typo:

Changed "resposibility" to "responsibility"
2020-08-14 18:18:28 -04:00
Knut Sveidqvist
33cc635fcf Removed illegal logging 2020-08-14 07:37:29 +02:00
Knut Sveidqvist
129b3f9004 Cherry pick of config changes 2020-08-14 07:34:42 +02:00
Mattéo Delabre
01344a991d Add support for changing the length of edges
Resolves #637, resolves #1495.

The syntax for edges is extended to allow for extra
dashes/equals signs/dots (depending on the edge type). Each added
character increases the length of the edge by one rank level, as
follows:

Length            |    1   |    2    |     3    |
------------------|:------:|:-------:|:--------:|
Normal            |  `---` |  `----` |  `-----` |
Normal with arrow |  `-->` |  `--->` |  `---->` |
Thick             |  `===` |  `====` |  `=====` |
Thick with arrow  |  `==>` |  `===>` |  `====>` |
Dotted            |  `-.-` |  `-..-` |  `-...-` |
Dotted with arrow | `-.->` | `-..->` | `-...->` |

This features leverages the `minlen` property exposed by Dagre which was
not previously available when using Mermaid.
2020-08-14 00:15:26 +02:00
Ashish Jain
060ac3bb4a Adjust the class members with proper parsing 2020-08-13 21:06:33 +02:00
Ashish Jain
95677e601a Merge branch '1614_fontFamily' of https://github.com/knsv/mermaid into 1542_take_two 2020-08-13 20:39:39 +02:00
Knut Sveidqvist
a97cc62d0a Merge branch 'jgreywolf-1592-IncorrectSVGytntax' into develop 2020-08-13 20:27:56 +02:00
Knut Sveidqvist
62260aa30b Merge branch '1592-IncorrectSVGytntax' of git://github.com/jgreywolf/mermaid into jgreywolf-1592-IncorrectSVGytntax 2020-08-13 20:26:47 +02:00
Knut Sveidqvist
32457e83f0 Fix for broken build 2020-08-13 20:23:57 +02:00
Ashish Jain
2519486a02 Merge branch '1614_fontFamily' of https://github.com/knsv/mermaid into 1542_take_two 2020-08-13 20:09:13 +02:00
Ashish Jain
bec3cc437d Fix for interface rendering and positioning 2020-08-13 20:08:09 +02:00
Knut Sveidqvist
525a32f9f0 2020-08-13 20:03:42 +02:00
Ashish Jain
36f8f1902c Removing hard coding with dynamic values for cardinalities 2020-08-13 19:41:33 +02:00
Knut Sveidqvist
bde7b1a828 Html labels set to false in tests 2020-08-13 19:19:19 +02:00
Ashish Jain
9891b383e7 Adding classDiagram-v2 test cases 2020-08-13 18:52:04 +02:00
Ashish Jain
28bc87b873 Merge branch 'develop' into 1542_take_two 2020-08-13 18:27:37 +02:00
Knut Sveidqvist
9223173ef2 Merge branch 'master' into develop 2020-08-13 18:25:04 +02:00
Justin Greywolf
5e72416478 1592-SVG syntax error with links
Added xlink namespace to svg definition
2020-08-12 13:47:21 -07:00
Justin Greywolf
595e03c584 Merge pull request #27 from mermaid-js/develop
sync
2020-08-12 13:46:12 -07:00
Knut Sveidqvist
50a0c93cce Updated theming docs 2020-08-09 14:22:54 +02:00
Knut Sveidqvist
e06cf70615 Using mermaid 8.7.0 in docs 2020-08-09 14:05:10 +02:00
Knut Sveidqvist
4c38b1a776 Merge branch 'release/8.7.0' 2020-08-09 14:03:20 +02:00
Knut Sveidqvist
677c6d9f89 Release 8.7.0 2020-08-09 14:02:57 +02:00
Knut Sveidqvist
2743681392 Merge branch 'develop' into release/8.7.0 2020-08-09 13:36:09 +02:00
Knut Sveidqvist
aacf84f78a Some documentation updates 2020-08-09 07:45:37 +02:00
Justin Greywolf
b95a9bb9b4 Merge pull request #26 from mermaid-js/develop
sync
2020-08-08 12:22:25 -07:00
Knut Sveidqvist
77541102af Merge branch 'develop' of github.com:mermaid-js/mermaid into develop 2020-08-08 10:59:59 +02:00
Knut Sveidqvist
b337cf9f95 Merge pull request #1605 from jgreywolf/1594-CommentsInClassDiagramNotWorking
1594 comments in class diagram not working
2020-08-08 07:44:01 +02:00
Justin Greywolf
f914cb0248 1594-Comment in class diagrams not working
Slight modification to comment regex to ensure that all lines were being looked at, not just the first one
2020-08-07 12:08:34 -07:00
Justin Greywolf
c93828569b Merge pull request #25 from mermaid-js/develop
Merge from mermaid
2020-08-07 08:27:21 -07:00
Ashish Jain
61993a032a Initial implementation for cardinality position. 2020-08-07 14:52:42 +02:00
Knut Sveidqvist
b99c14b910 Merge pull request #1599 from jgreywolf/1181-AssignCssClass
1181 assign css class
2020-08-05 20:40:07 +02:00
Knut Sveidqvist
8aa0185cb8 Remiving dist from .gitignore
This due to downstreams libraries that depend on them. We should address this as I agree that dist should be ignored. For now I removed it.
2020-08-05 18:27:30 +02:00
Knut Sveidqvist
2a1161bff4 Merge pull request #1600 from ryenus/patch-1
update mermaid-cli repo url
2020-08-05 18:00:04 +02:00
ryenus
067b495212 update mermaid-cli repo url
new url: https://github.com/mermaid-js/mermaid-cli
2020-08-05 05:46:48 +08:00
Justin Greywolf
894369cc73 stop tracking files in dist 2020-08-04 12:08:21 -07:00
Justin Greywolf
9a86accc62 1181-Minor update to regex 2020-08-04 12:05:56 -07:00
Knut Sveidqvist
77be268a70 Merge pull request #1596 from NeilCuzon/develop
Changes to ReadMe.md, Addition of versionUpdates.md for version tracking.
2020-08-04 20:08:44 +02:00
Justin Greywolf
1f051d7a9f 1181-Css for class diagrams
Initial change for supporting custom CSS for use with classDiagrams.
updated `LABEL` regex for specificity
2020-08-03 12:47:50 -07:00
Justin Greywolf
652b6ae7d2 Update gitignore for dist folder 2020-08-03 12:47:32 -07:00
Justin Greywolf
57a5b09328 Merge pull request #24 from mermaid-js/develop
merge from mermaid-js:develop
2020-08-03 12:43:26 -07:00
Neil Cuzon
9b806f2690 Update config.js 2020-08-01 17:19:26 -07:00
Neil Cuzon
1b56a8b696 Update theming.md 2020-07-31 23:45:56 -07:00
Neil Cuzon
5a5d2c770c Update _sidebar.md 2020-07-31 22:54:47 -07:00
Neil Cuzon
a5d06bde03 Update theming.md 2020-07-31 21:22:18 -07:00
Neil Cuzon
15103ac7fb Update theming.md 2020-07-31 21:20:55 -07:00
Neil Cuzon
439e735d4b Update README.md 2020-07-31 21:20:28 -07:00
Neil Cuzon
7f5df308ad Update README.md 2020-07-31 21:20:26 -07:00
Neil Cuzon
2f97baadc6 Update README.md 2020-07-31 21:16:33 -07:00
Neil Cuzon
c2863156cd Update versionUpdates.md 2020-07-31 21:12:31 -07:00
Neil Cuzon
75762d64c6 Update theming.md 2020-07-31 21:10:43 -07:00
Neil Cuzon
8209cffcd0 Update versionUpdates.md 2020-07-31 21:10:04 -07:00
Neil Cuzon
70976460ff Update _sidebar.md 2020-07-31 20:59:27 -07:00
Neil Cuzon
954155b090 Update theming.md 2020-07-31 20:52:06 -07:00
Neil Cuzon
5265bc20f1 Update theming.md 2020-07-31 20:49:35 -07:00
Neil Cuzon
af60a4d407 Update README.md 2020-07-31 19:54:46 -07:00
Neil Cuzon
c9a6dc4fab Update README.md 2020-07-31 19:14:07 -07:00
Neil Cuzon
9c647dc57a Update README.md 2020-07-31 17:00:57 -07:00
Knut Sveidqvist
52e688df9b Version bump 2020-07-31 17:07:50 +02:00
Knut Sveidqvist
87f12c7d5a Updated with a small example of a custom theme 2020-07-31 16:04:12 +02:00
Knut Sveidqvist
e9e9b13df0 Added themeVariable references and som adjustments in base theme calculations. 2020-07-31 15:05:51 +02:00
Neil Cuzon
7ee9c4fb30 Update n00b-overview.md 2020-07-31 00:56:32 -07:00
Neil Cuzon
e43fd0c48a Update README.md 2020-07-31 00:55:21 -07:00
Neil Cuzon
27bed22fee Update README.md 2020-07-31 00:55:01 -07:00
Neil Cuzon
aae69fa599 Update README.md 2020-07-31 00:38:03 -07:00
Neil Cuzon
8abe138150 Update versionUpdates.md 2020-07-30 23:46:13 -07:00
Neil Cuzon
dccb23bb80 Update theming.md 2020-07-30 13:50:39 -07:00
Neil Cuzon
5e4bf0f019 Update config.js 2020-07-30 13:32:15 -07:00
Knut Sveidqvist
f87c56af5c Merge pull request #1593 from mermaid-js/1590_theme_finalizations
1590 theme finalizations
2020-07-30 19:57:33 +02:00
Knut Sveidqvist
5565aab488 #1590 Theme base tweaked for custom theming 2020-07-30 19:18:18 +02:00
Knut Sveidqvist
dbe6b9dacb #1590 Themes tweaked 2020-07-30 15:28:46 +02:00
Knut Sveidqvist
dd866718b9 Removed console statements 2020-07-30 10:16:29 +02:00
Knut Sveidqvist
116c616561 Merge pull request #1591 from mermaid-js/dependabot/npm_and_yarn/elliptic-6.5.3
Bump elliptic from 6.5.2 to 6.5.3
2020-07-30 10:01:33 +02:00
dependabot[bot]
084e3df8f7 Bump elliptic from 6.5.2 to 6.5.3
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-30 07:50:31 +00:00
Knut Sveidqvist
36e421eb5f Merge pull request #1586 from mermaid-js/1542_take_two
1542 take two
2020-07-30 08:58:56 +02:00
Knut Sveidqvist
a5b01c3f6f #1542 Adding gantt to showcases 2020-07-30 08:34:41 +02:00
Knut Sveidqvist
f1836c281c #1542 Fix for secirity config 2020-07-30 08:20:27 +02:00
Neil Cuzon
292289d16d Update README.md 2020-07-29 23:06:16 -07:00
GDFaber
4e3bdf0925 Merge pull request #1587 from GDFaber/documentation/fix_flowchart_style_example
Flowchart documentation: Fix code example for styling nodes
2020-07-30 01:31:28 +02:00
Marc Faber
b17475f013 #1366 Flowchart documentation: Fix code example for styling nodes 2020-07-30 01:18:58 +02:00
Knut Sveidqvist
ecea0f90d4 #1542 Handling of config 2020-07-29 22:19:23 +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
Knut Sveidqvist
d215d31349 Merge pull request #1585 from GDFaber/feature/1460_add_link_target_to_flowchart_click
Add link target option to flowchart click
2020-07-29 15:13:35 +02:00
Neil Cuzon
e4e24399d9 Update theming.md 2020-07-28 19:10:14 -07:00
Neil Cuzon
8f9d132ed6 Update theming.md 2020-07-28 19:06:34 -07:00
Neil Cuzon
e651511c35 Update theming.md 2020-07-28 19:01:01 -07:00
Neil Cuzon
2ecda17618 Update theming.md 2020-07-28 18:56:17 -07:00
Neil Cuzon
db03b5b102 Update theming.md 2020-07-28 18:28:52 -07:00
Neil Cuzon
9fd9a7bc10 Update 8.6.0_docs.md 2020-07-28 16:42:08 -07:00
Justin Greywolf
eda9faf956 Merge pull request #23 from mermaid-js/develop
bring up to date
2020-07-28 09:44:50 -07:00
Knut Sveidqvist
cf70678188 Merge branch 'develop' into feature/1460_add_link_target_to_flowchart_click 2020-07-28 13:21:31 +02:00
Knut Sveidqvist
b23988c947 Merge pull request #1582 from cmmoran/develop
Directive support for many diagrams, config bugfix
2020-07-28 13:17:35 +02:00
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
71e4ada39a Trigger tests once more 2020-07-28 11:09:54 +02: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
Neil Cuzon
336793b2a1 Update versionUpdates.md 2020-07-26 23:28:51 -07:00
Neil Cuzon
c29ea2e679 Update README.md 2020-07-26 23:28:24 -07:00
Neil Cuzon
3b6f05800d Update README.md 2020-07-26 23:04:11 -07:00
Neil Cuzon
dda824856a Update usage.md 2020-07-26 22:20:52 -07:00
Neil Cuzon
474ab586f8 Merge pull request #1 from NeilCuzon/release/8.6.0
Release/8.6.0
2020-07-26 21:18:16 -07:00
Neil Cuzon
6bef35d8ef Merge branch 'develop' into release/8.6.0 2020-07-26 21:17:52 -07:00
Neil Cuzon
ad12660019 Update versionUpdates.md 2020-07-26 21:15:13 -07:00
Neil Cuzon
016da1d37d Create versionUpdates.md 2020-07-26 21:13:54 -07:00
Knut Sveidqvist
4e12f959fc Updated after 8.6.4 merge 2020-07-26 22:38:55 +02:00
Knut Sveidqvist
1c06e9d683 Merge remote-tracking branch 'origin/develop' into develop 2020-07-26 22:37:15 +02:00
Knut Sveidqvist
01d7a33230 Merge branch 'master' into develop 2020-07-26 22:37:10 +02:00
Knut Sveidqvist
d92f5621aa Updated mermaid versio in docs 2020-07-26 22:34:15 +02:00
Knut Sveidqvist
8fdc61e227 Merge branch 'release/8.6.4' 2020-07-26 22:30:30 +02:00
Knut Sveidqvist
9825b161ff latest build (8.6.4) 2020-07-26 22:30:09 +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
a526386fbb Merge pull request #1579 from NeilCuzon/release/8.6.0
Release/8.6.0
2020-07-26 13:37:39 +02:00
Knut Sveidqvist
3fb3453166 dark theme fixes 2020-07-26 12:13:06 +02:00
Knut Sveidqvist
8dd0fe3c40 Adding showcases 2020-07-26 11:50:36 +02:00
Knut Sveidqvist
b1f0797a1f Updated test 2020-07-26 08:20:45 +02:00
Knut Sveidqvist
416e355495 Build 2020-07-26 08:05:32 +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
4e795c81f4 Merge branch 'release/8.6.3' into develop 2020-07-26 07:23:05 +02:00
Neil Cuzon
718ba719ca Update Setup.md 2020-07-25 21:36:15 -07:00
Neil Cuzon
a5ed3ca446 Update 8.6.0_docs.md 2020-07-25 21:36:12 -07:00
Neil Cuzon
3a93c50e38 Update usage.md 2020-07-25 19:14:06 -07:00
Neil Cuzon
654f673def Update usage.md 2020-07-25 19:08:11 -07:00
Neil Cuzon
1111382b53 Update usage.md 2020-07-25 19:04:11 -07:00
Neil Cuzon
1e605cdf0f Update n00b-gettingStarted.md 2020-07-25 18:15:37 -07:00
Neil Cuzon
2c27f422d9 Update n00b-gettingStarted.md 2020-07-25 09:52:11 -07:00
Neil Cuzon
f53a2f1b94 Update Setup.md 2020-07-25 09:52:03 -07:00
Neil Cuzon
4fb40a6af7 Update usage.md 2020-07-24 22:51:27 -07:00
Neil Cuzon
6f6f5738fa Update usage.md 2020-07-24 22:51:13 -07:00
Neil Cuzon
40aacbf279 Update n00b-gettingStarted.md 2020-07-24 12:30:06 -07:00
Knut Sveidqvist
9ea3bfb7c7 Merge branch 'develop' of github.com:mermaid-js/mermaid into develop 2020-07-24 19:14:46 +02:00
Knut Sveidqvist
dc2d52fc09 testing the label width in percy 2020-07-24 19:14:42 +02:00
Knut Sveidqvist
7dcebd51ab Merge pull request #1571 from abhijeet-pathak/bug/1569_document_link_broken
Fixed the path to 8.6.0_docs.md
2020-07-24 13:01:51 +02:00
Neil Cuzon
9ef5769f93 Update usage.md 2020-07-23 23:29:36 -07:00
Knut Sveidqvist
d12b197ec9 Version bump 2020-07-24 08:28:14 +02:00
Knut Sveidqvist
c5b55fa476 Some small interim changes, adding theming.doc 2020-07-24 08:25:57 +02:00
Neil Cuzon
355fcced55 Update usage.md 2020-07-23 23:04:39 -07:00
Neil Cuzon
701fb1378e Update usage.md 2020-07-23 22:36:16 -07:00
Carlos Blanco
b120c34177 Support dashes in actor names in sequence diagrams 2020-07-23 20:15:52 -06:00
Neil Cuzon
c23caf899f Update examples.md 2020-07-23 18:39:43 -07:00
Neil Cuzon
52c30e588c Update 8.6.0_docs.md 2020-07-23 18:33:11 -07:00
Abhijeet Pathak
9da8f4d35b Fixed the path to 8.6.0_docs.md 2020-07-23 19:49:01 +05:30
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
Neil Cuzon
c6a1f42c44 Update usage.md 2020-07-23 00:15:44 -07:00
Knut Sveidqvist
dbda90b15b Fix if theme inclusion for classDiagrams 2020-07-23 07:50:22 +02:00
Neil Cuzon
29a04d9d83 Update n00b-gettingStarted.md 2020-07-22 21:31:49 -07:00
Neil Cuzon
0a6dc68d13 Update n00b-gettingStarted.md 2020-07-22 21:28:48 -07:00
Neil Cuzon
a1a85d08af Update n00b-gettingStarted.md 2020-07-22 21:28:02 -07:00
Chris Moran
601eec7da5 Merge pull request #1568 from cmmoran/develop
Refactor Theme to Config Module
2020-07-22 21:02:41 -04:00
chris moran
a54f3c8c7f Refactor
Moved theme variables to the config module
2020-07-22 16:46:41 -04:00
chris moran
17478491e9 Merge branch 'mermaid-js-develop' into develop 2020-07-22 16:33:46 -04:00
Knut Sveidqvist
245cf6d2e0 Merge pull request #1567 from mermaid-js/feature/Issue-1465_Class_migration
Feature/issue 1465 class migration
2020-07-22 21:35:01 +02:00
Ashish Jain
71af9741cc Correct positioning for class title 2020-07-22 21:25:01 +02:00
chris moran
0503b64205 Merge branch 'mermaid-js-develop' into develop 2020-07-22 14:55:02 -04: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
Knut Sveidqvist
f685363574 Relase 8.6.2 2020-07-22 19:22:02 +02:00
Ashish Jain
03c19ccae9 Migrated style css from scss file to styles.js 2020-07-22 19:10:28 +02:00
Knut Sveidqvist
7313b4b649 Merge pull request #1566 from mermaid-js/1552_fix_broken_cardinality_class_diagram
#1552 Fix for broken cardinality support for class diagrams
2020-07-22 19:07:25 +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
8e72ddde32 #1552 Update current.html for cardinality test 2020-07-22 18:20:31 +02:00
Ashish Jain
07a7ea1f23 #1552 Fix for broken cardinality support for class diagrams 2020-07-22 17:35:01 +02:00
Neil Cuzon
3c854d4af9 Update _sidebar.md 2020-07-21 16:29:45 -07:00
Neil Cuzon
7f3f011104 Update n00b-gettingStarted.md 2020-07-21 16:29:41 -07:00
Neil Cuzon
a5cfae4b33 Update integrations.md 2020-07-21 16:20:17 -07: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
835a3f6149 Merge pull request #1563 from mermaid-js/bug/1562_arrowheads_in_edges_to_cluster
Bug/1562 arrowheads in edges to cluster
2020-07-21 12:55:40 +02:00
Knut Sveidqvist
b93ef22687 #1562 Fix for test 2020-07-21 12:31:05 +02:00
Knut Sveidqvist
bfd927d395 Merge pull request #1561 from mermaid-js/bug/1532_edge_issue
#Beta flowchart: issues with edges to some types of nodes
2020-07-21 12:12:06 +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
Neil Cuzon
dc8c27b1f9 Update faq.md 2020-07-20 12:09:49 -07:00
Neil Cuzon
4639ec87d2 Update faq.md 2020-07-20 12:09:38 -07:00
Neil Cuzon
50079670f9 Update user-journey.md 2020-07-20 12:09:02 -07:00
Neil Cuzon
ae12e65712 Update usage.md 2020-07-20 12:00:45 -07:00
Neil Cuzon
2f9be335cb Update n00b-syntaxReference.md 2020-07-20 11:58:36 -07:00
Neil Cuzon
9e59d927f2 Update n00b-overview.md 2020-07-20 11:51:23 -07:00
Neil Cuzon
ced3e5fec8 Update n00b-overview.md 2020-07-20 11:48:15 -07:00
Neil Cuzon
50eb523d8e Update n00b-syntaxReference.md 2020-07-20 11:45:13 -07:00
Neil Cuzon
d6baf1b32a Update n00b-syntaxReference.md 2020-07-20 11:39:59 -07:00
Neil Cuzon
60b8dfaa2d Update n00b-syntaxReference.md 2020-07-20 11:39:39 -07:00
Neil Cuzon
815f398ada Update n00b-syntaxReference.md 2020-07-20 11:39:23 -07:00
Neil Cuzon
56ed31ed6f Update n00b-syntaxReference.md 2020-07-20 11:34:05 -07:00
Neil Cuzon
3213fbff8b Update breakingChanges.md 2020-07-20 09:35:46 -07:00
Neil Cuzon
4bca9c63da Update classDiagram.md 2020-07-20 09:35:12 -07:00
Neil Cuzon
01fe70a29a Update development.md 2020-07-20 09:34:37 -07:00
Neil Cuzon
e43804d950 Update README.md 2020-07-20 09:31:51 -07:00
Neil Cuzon
17206fc538 Update CHANGELOG.md 2020-07-20 09:31:01 -07:00
Neil Cuzon
8cda6ede84 Update 8.6.0_docs.md 2020-07-20 09:30:05 -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
Knut Sveidqvist
631355d788 Merge pull request #1556 from mermaid-js/less_theme_variables
Tweaks of the new styling engine and tweaks of theams using is
2020-07-20 11:00:45 +02:00
chris moran
ec1ab05ae6 Deprecated prepush script in package.json ->
This fixes:
```Warning: Setting pre-push script in package.json > scripts will be deprecated
Please move it to husky.hooks in package.json, a .huskyrc file, or a husky.config.js file
Or run ./node_modules/.bin/husky-upgrade for automatic update```
2020-07-20 04:49:43 -04: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
Neil Cuzon
956ee06ea6 Update n00b-overview.md 2020-07-19 21:18:36 -07:00
Neil Cuzon
e15e34db93 Update n00b-overview.md 2020-07-19 21:13:39 -07: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
chris moran
0297dd2664 Merge branch 'mermaid-js-develop' into develop 2020-07-19 04:30:37 -04:00
Neil Cuzon
56e328f31f Update usage.md 2020-07-18 20:20:48 -07:00
Neil Cuzon
ac2c1e019f Update n00b-gettingStarted.md 2020-07-18 20:12:08 -07:00
Neil Cuzon
56073fd522 Update usage.md 2020-07-18 20:11:48 -07:00
Neil Cuzon
07f6572816 Update usage.md 2020-07-18 18:04:03 -07:00
Knut Sveidqvist
8a018aa0f2 Merge branch 'feature/1542_simplify_theming' into develop 2020-07-18 20:12:31 +02:00
Knut Sveidqvist
936d5821f9 Merge 2020-07-18 20:12:10 +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
Neil Cuzon
ed1c2cb596 Update README.md 2020-07-18 05:18:18 -07:00
Neil Cuzon
212e0e624f Update n00b-overview.md 2020-07-18 04:59:52 -07: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
Neil Cuzon
1c6a64caf2 Update n00b-overview.md 2020-07-18 04:27:17 -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
Neil Cuzon
615c6cb388 Update directives.md 2020-07-17 20:00:24 -07:00
Neil Cuzon
31f890d55c Update n00b-overview.md 2020-07-17 16:54:55 -07:00
Neil Cuzon
567c09850c Update n00b-overview.md
- Added copy to make it more friendly to beginners.
2020-07-17 16:54:23 -07:00
Knut Sveidqvist
8d076efd71 #1542 Styling for all diagram types 2020-07-17 15:57:02 +02:00
Knut Sveidqvist
062126c43d Test page for directives 2020-07-17 12:44:42 +02:00
Knut Sveidqvist
f9667cd80f #1542 Test page using directoives to switch theme 2020-07-17 12:34:33 +02:00
Knut Sveidqvist
65c2f58a66 #1542 Test page using directoives to switch theme 2020-07-17 09:31:42 +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
a1d2208bf3 Merge branch 'release/8.6.0' 2020-07-16 12:23:55 +02:00
Knut Sveidqvist
b6b76eb137 Docs updated from code 2020-07-16 12:17:21 +02:00
Knut Sveidqvist
19b16fe796 Merge pull request #1545 from NeilCuzon/release/8.6.0
Release/8.6.0
2020-07-16 12:13:00 +02:00
Knut Sveidqvist
fec1553041 Merge pull request #1548 from mermaid-js/bug/1547_crypto_libraries_in_bundle
Bug/1547 crypto libraries in bundle
2020-07-16 12:10:53 +02:00
Knut Sveidqvist
bc2f693c55 Merge pull request #1549 from mermaid-js/feature/1454_theme_base_redering_tests
#1454 Adding showcase diagrams rendered with the different themes
2020-07-16 11:45:57 +02:00
Knut Sveidqvist
594ae20a6e #1547 Remove usage of crypto libraries 2020-07-16 10:48:37 +02:00
Neil Cuzon
14388f4bb1 Update n00b-gettingStarted.md 2020-07-15 21:30:23 -07:00
Neil Cuzon
369e6d1e61 Update README.md 2020-07-15 14:15:28 -07:00
Neil Cuzon
789200d454 Update README.md 2020-07-15 14:11:35 -07:00
Neil Cuzon
dcfab0f4dd Update README.md 2020-07-15 13:27:54 -07:00
Neil Cuzon
9677ed9e2d Update README.md 2020-07-15 10:35:50 -07:00
Neil Cuzon
a4ece6c1c5 Update directives.md 2020-07-15 10:35:19 -07:00
Neil Cuzon
e34396015f Update directives.md 2020-07-15 10:34:57 -07:00
Neil Cuzon
64e3310376 Update directives.md 2020-07-15 10:34:34 -07:00
Neil Cuzon
a955d8f890 Update directives.md 2020-07-15 10:30:57 -07:00
Knut Sveidqvist
bbc9532444 #1454 Adding showcase diagrams rendered with the different themes 2020-07-15 14:02:19 +02:00
Knut Sveidqvist
389afde138 Merge pull request #1543 from mermaid-js/bug/1485_application_of_font_settings
#1485 Setting proper font settings in the root css
2020-07-15 14:00:00 +02:00
Knut Sveidqvist
fe5d9e486b #1485 Fixing for test 2020-07-15 13:29:35 +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
cd23899e02 Update README.md 2020-07-14 21:01:01 -07:00
Neil Cuzon
5a9fa66b04 Update _sidebar.md 2020-07-14 21:00:45 -07:00
Neil Cuzon
1866244a2a Update 8.6.0_docs.md 2020-07-14 19:37:05 -07:00
Neil Cuzon
5d4583c77f Update 8.6.0_docs.md 2020-07-14 19:33:06 -07:00
Neil Cuzon
66ee81c55f Update 8.6.0_docs.md 2020-07-14 19:27:00 -07: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
Neil Cuzon
2b9960e05f Update stateDiagram.md 2020-07-14 14:25:49 -07:00
Neil Cuzon
c2e34cd0f5 Update pie.md 2020-07-14 14:25:46 -07:00
Neil Cuzon
78bb5e09e5 Update sequenceDiagram.md 2020-07-14 14:25:43 -07:00
Neil Cuzon
e8c7ffa872 Update flowchart.md 2020-07-14 14:25:40 -07:00
Neil Cuzon
557a3f0896 Update gantt.md 2020-07-14 14:25:37 -07:00
Neil Cuzon
b2af5390fb Update README.md 2020-07-13 18:14:59 -07:00
Neil Cuzon
eb6c901527 Update README.md 2020-07-13 18:04:41 -07:00
Neil Cuzon
d5a9cbe5a3 Update README.md 2020-07-13 18:03:36 -07:00
Neil Cuzon
0658581bcd Update README.md 2020-07-13 18:02:38 -07:00
Neil Cuzon
26c3f5a2cc Update README.md 2020-07-13 18:01:43 -07:00
Neil Cuzon
34a60d7661 Add files via upload 2020-07-13 18:00:50 -07:00
Neil Cuzon
ea0cd80ea7 Add files via upload 2020-07-13 17:58:25 -07:00
Neil Cuzon
11d35c8410 Update README.md 2020-07-13 17:13:07 -07:00
Neil Cuzon
38359e176f Update README.md 2020-07-13 17:12:29 -07:00
Neil Cuzon
e54d9cf629 Update 8.6.0_docs.md 2020-07-13 14:56:28 -07:00
Neil Cuzon
deccf8891d Update README.md 2020-07-13 14:56:24 -07:00
Neil Cuzon
e5ac551795 Update README.md 2020-07-13 14:47:52 -07:00
Neil Cuzon
7684f79e64 Update README.md 2020-07-13 14:47:36 -07:00
Neil Cuzon
9fdab327c8 Update 8.6.0_docs.md 2020-07-13 14:46:47 -07:00
Neil Cuzon
1908af6f54 Update 8.6.0_docs.md 2020-07-13 14:45:55 -07:00
Neil Cuzon
a677608f1d Update 8.6.0_docs.md 2020-07-13 14:42:57 -07:00
Neil Cuzon
93d462e028 Update README.md 2020-07-13 13:59:55 -07:00
Knut Sveidqvist
661553da68 Fixed broken link to config info 2020-07-13 17:21:18 +02:00
Knut Sveidqvist
b4203992bf Merge branch 'release/8.6.0' 2020-07-13 16:42:10 +02:00
Knut Sveidqvist
686ee1e349 Relase 8.6.0 2020-07-13 16:39:52 +02:00
Knut Sveidqvist
9e8c9e897f Merge pull request #1538 from NeilCuzon/develop
documentation for config and other changes, with minor cosmetic changes to ReadMe
2020-07-12 19:56:37 +02:00
Neil Cuzon
06ceb5e68d Update README.md 2020-07-12 10:44:35 -07:00
Knut Sveidqvist
dc2f9c304d Font fix for rendering tests - back to noto font 2020-07-12 15:25:01 +02:00
Knut Sveidqvist
462d5c3b12 Font fix for rendering tests 2020-07-12 14:56:27 +02:00
Knut Sveidqvist
39e90a20da Font fix for rendering tests 2020-07-12 12:21:17 +02:00
Knut Sveidqvist
b40014d709 Merge pull request #1536 from mermaid-js/bug/1448_mock_clock_in_render_tests
Mocking of clock in gantt tests
2020-07-12 11:24:14 +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
61684830bf 2020-07-12 11:15:32 +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
Knut Sveidqvist
e66f7f012e Merge pull request #1533 from 72636c/feature/config_flowchart_diagram_padding
Add `flowchart.diagramPadding` config option
2020-07-12 10:49:31 +02:00
Ryan Ling
3e38da2120 Document er defaults 2020-07-11 20:50:36 +10:00
Ryan Ling
f2e7c82231 Fix table alignment 2020-07-11 20:44:46 +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
13225faa9e Update docs 2020-07-11 18:59:43 +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
Neil Cuzon
e363a21619 Update README.md 2020-07-10 08:43:59 -07:00
Neil Cuzon
09efbaf621 Update Setup.md 2020-07-09 11:15:50 -07:00
Neil Cuzon
31027047e3 Update 8.6.0_docs.md 2020-07-09 06:10:07 -07:00
Neil Cuzon
629eb4ca90 Update 8.6.0_docs.md 2020-07-09 05:28:47 -07:00
Neil Cuzon
c4e6e5eca4 Update 8.6.0_docs.md 2020-07-09 05:25:15 -07:00
Neil Cuzon
ea72d41e6d Update 8.6.0_docs.md 2020-07-09 05:23:30 -07:00
Neil Cuzon
c0f5b04472 Update 8.6.0_docs.md 2020-07-09 05:16:50 -07:00
Neil Cuzon
532b32dab5 Update 8.6.0_docs.md 2020-07-09 05:15:47 -07:00
Neil Cuzon
fb5c96731a Update 8.6.0_docs.md 2020-07-09 05:14:20 -07:00
Neil Cuzon
3f8eb8cb6b Update 8.6.0_docs.md 2020-07-09 04:46:55 -07:00
Neil Cuzon
89dc64ab66 Add files via upload 2020-07-09 04:12:07 -07:00
Neil Cuzon
6968cff2b6 Add files via upload 2020-07-09 04:02:05 -07:00
Chris Moran
c390e9e877 Merge pull request #1529 from cmmoran/develop
Missed test case for allowing site owner to append to `secure` field set
2020-07-09 06:32:16 -04: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
5c043dd908 Merge pull request #1525 from mermaid-js/bug/1524_message_text_vertical_pos
Bug/1524 message text vertical pos
2020-07-04 12:46:24 +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
b6d6d3c980 Merge pull request #1523 from mermaid-js/feature/1483_long_messages
Directives, sequenceDiagram refactor, config normalization, many tweaks
2020-07-02 18:39:25 +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
be9da3928b Updated mermaidAPI.md from PR 2020-07-02 16:59:09 +02:00
Knut Sveidqvist
a9fd557c4e Merge branch 'NeilCuzon-patch-8' into develop 2020-07-02 16:57:00 +02:00
Knut Sveidqvist
faac22f6ed Lint fix 2020-07-02 16:56:30 +02:00
Chris Moran
35a47093ab Merge pull request #1522 from cmmoran/feature/1483_long_messages
Fixed dark theme (sequenceDiagram) sequenceNumbers color
2020-07-01 07:59:17 -04: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
1cc2e74a03 Merge pull request #1521 from cmmoran/feature/1483_long_messages
added hasBreaks and splitBreaks to common.js
2020-07-01 07:44:37 -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
ee425d278c Merge pull request #1520 from mermaid-js/develop
Merging changes from develop into feature/1483_long_messages
2020-07-01 06:34:48 -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
Chris Moran
9952f7734a Merge pull request #1518 from cmmoran/feature/1483_long_messages
Feature/1483 long messages
2020-07-01 05:36:11 -04:00
chris moran
2ffb2988bf One small refactor to fix activation starty
Ensure a minimum amount of space between wrapped / non-wrapped title text and the next element
2020-07-01 05:34:53 -04:00
chris moran
fda1d7c4c5 Merge remote-tracking branch 'upstream/feature/1483_long_messages' into feature/1483_long_messages 2020-07-01 04:49:15 -04:00
Chris Moran
19519ac74e Merge pull request #1 from mermaid-js/develop
Merge upstream
2020-07-01 04:47:47 -04:00
Chris Moran
eb3f62fd90 Merge pull request #1517 from cmmoran/feature/1483_long_messages
Feature/1483 long messages
2020-07-01 04:46:27 -04:00
Neil Cuzon
891b362e7d Update mermaidAPI.js
-Added tables into the comments from mermaidAPI.md, to reflect documentation that I had added through a previous PR, #1509
-as per @knsv 's directions, added comments here.

-also found a list of parameters, who's documentation do not come out in the markdown file. I left them alone, but will be raising a separate issue, for others to review.
2020-07-01 01:35:25 -07:00
chris moran
cbb69bd3cb () => is not the same as function() {} smh
Fixed a few of the text rendering issues
2020-07-01 04:34:29 -04:00
Knut Sveidqvist
200a3e5e8c Merge pull request #1498 from mermaid-js/feature/1424_dark_mode_in_docs
Feature/1424 dark mode in docs
2020-06-30 16:54:06 +02:00
Knut Sveidqvist
0fab2dc24f Merge pull request #1499 from maiconschmitz/patch-1
Update README.md
2020-06-30 16:34:34 +02:00
Knut Sveidqvist
a48654f195 Merge pull request #1503 from NeilCuzon/patch-4
Update sequenceDiagram.md
2020-06-30 16:31:20 +02:00
chris moran
174b098724 loop/opt/alt/etc titles should always wrap 2020-06-30 07:54:51 -04:00
Chris Moran
ecb4671e0d Merge pull request #1513 from cmmoran/feature/1483_long_messages
conf.messageFont() would have a different cacheKey based on the cache…
2020-06-30 07:21:39 -04:00
chris moran
6c6f6838ee conf.messageFont() would have a different cacheKey based on the cacheKey calculations done in this particular branch. This will be normalized with the memoize PR about to be created. 2020-06-30 07:18:28 -04:00
Chris Moran
b4414758a7 Merge pull request #1512 from cmmoran/feature/1483_long_messages
math is hard sometimes?
2020-06-30 06:47:50 -04:00
chris moran
5b37536ce5 math is hard sometimes? 2020-06-30 06:42:29 -04:00
Chris Moran
3365fa174d Merge pull request #1511 from cmmoran/feature/1483_long_messages
Fixed config *font helpers
2020-06-30 06:24:36 -04:00
chris moran
d42b95bab9 messageFont, noteFont, and actorFont getConfig() calls were not specifying the sequence object
take into account width of message over single actor for actors' max message width
2020-06-30 06:20:45 -04:00
Chris Moran
6a3aaf360e Merge pull request #1510 from cmmoran/feature/1483_long_messages
Feature/1483 long messages
2020-06-30 03:51:25 -04:00
chris moran
083d0c90e2 Merge branch 'develop' into feature/1483_long_messages 2020-06-30 03:50:04 -04:00
chris moran
fed142dad2 Merge branch 'mermaid-js-develop' into develop 2020-06-30 03:34:55 -04:00
chris moran
fcd2126330 Getting closer 2020-06-28 08:37:26 -04:00
Neil Cuzon
e5cd0ced53 Update sequenceDiagram.md 2020-06-26 22:46:09 -07:00
Chris Moran
06dad7865c Merge pull request #1502 from cmmoran/develop
Missed `activationWidth` new configuration option for sequence diagrams
2020-06-26 10:19:02 -04:00
chris moran
6915634729 Missed activationWidth new configuration option for sequence diagrams 2020-06-26 10:17:13 -04:00
Chris Moran
d3647e2e8a Merge pull request #1501 from cmmoran/develop
Fixes
2020-06-26 09:33:57 -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
Maicon Schmitz
75fe500305 Update README.md
Correction off CLI link, in Related projects section
2020-06-25 11:24:45 -03:00
Ashish Jain
1e400624e0 Adjusting classDiagram marker styling 2020-06-24 21:46:59 +02:00
Ashish Jain
b190a0eaba Added support for classDiagram relation arrow markers 2020-06-24 21:45:19 +02:00
Knut Sveidqvist
afc779440a #1424 Setting proper loglevel for docs 2020-06-24 21:28:12 +02:00
Knut Sveidqvist
7f71717a9f #1424 Setting dark mode in docs based un user preferences 2020-06-24 21:26:55 +02:00
Knut Sveidqvist
b9931da241 1465 Marking edges witrh new schema for arrow heads 2020-06-24 19:47:12 +02:00
Knut Sveidqvist
eaf0d5e0a0 Merge branch 'feature/Issue-1465_Class_migration' of github.com:mermaid-js/mermaid into feature/Issue-1465_Class_migration 2020-06-24 19:43:00 +02:00
Knut Sveidqvist
832206ef80 Adjust flowchart-v2 to use new arrot type handling 2020-06-24 19:42:56 +02:00
Ashish Jain
85d4f2843e Initial commit for classDiagram v2 2020-06-24 19:34:12 +02:00
Knut Sveidqvist
0849aa3f03 Merge pull request #1488 from abhijeet-pathak/1005_gantt_sequnce_creation_order_change
Fix for the issue 1005
2020-06-24 18:33:01 +02:00
Knut Sveidqvist
4cdeb214a7 Merge pull request #1486 from zwpaper/develop
gitGraph dot and minus should be valid branch name
2020-06-24 18:25:56 +02:00
abhijeet-pathak
3c727bc46f Corrected the test case description 2020-06-24 14:51:08 +05:30
Miika Kankare
955ccfae88 Make gitGraph commit IDs out of hexadecimal chars 2020-06-24 09:28:58 +03:00
GDFaber
e13662dd2c Merge pull request #1492 from NeilCuzon/patch-5
Update flowchart.md
2020-06-23 19:27:15 +02:00
Abhijeet Pathak
2840c98bb0 Added test case for preserving creation order
of tasks
2020-06-23 22:32:49 +05:30
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
GDFaber
d2c47bb153 Merge pull request #1491 from NeilCuzon/patch-4
Update faq.md
2020-06-22 08:04:03 +02:00
Neil Cuzon
9da3402997 Update flowchart.md
-added a few workarounds, I found for writing "end" as a node name alongside the workaround found in the FAQ.

-also made a few minor edits to the contents.
2020-06-21 15:19:45 -07:00
Neil Cuzon
e7784e3c34 Update faq.md 2020-06-21 11:41:46 -07:00
Neil Cuzon
224d6dc93f Update faq.md 2020-06-21 10:03:21 -07:00
Chris Moran
f95b5d05d7 Merge pull request #1489 from cmmoran/develop
noteModel generated during calculation of loop bounds
2020-06-20 20:56:29 -04:00
chris moran
ee109c2279 noteModel generated during calculation of loop bounds
msgModel generated during calculation of loop bounds
simplifies draw messages loop
2020-06-20 18:15:24 -04:00
Abhijeet Pathak
e515c7beb1 Fxed liniting issues. 2020-06-20 18:39:19 +05:30
Abhijeet Pathak
5f56db6f6e Fix for the issue 1005
(https://github.com/mermaid-js/mermaid/issues/1005)
A new attribute 'order' has been introduced in the task which records
the serial number of task in the script.
In ganttRenderer.js, the tasks are sorted by stratTime attribute.
The function which calculates 'y' for task rectangles, lables etc.
has been modified to correctly position it.
2020-06-20 18:03:48 +05:30
zwPapEr
c00b204259 gitGraph: 🔨 dot and minus should be valid branch name 2020-06-20 11:58:38 +08:00
Knut Sveidqvist
280c89a78d Merge pull request #1484 from chrismoran-bkt/develop
PR 1482 redux
2020-06-19 20:04:15 +02:00
Chris Moran
809ba2b392 Fixed: width of notes left of and right of 2020-06-19 13:50:53 -04:00
Chris Moran
18254392ab Merge branch 'mermaid-js-develop' into develop 2020-06-19 13:32:23 -04:00
Chris Moran
5646518352 Tweaked the PR for long messages 2020-06-19 12:45:04 -04:00
Chris Moran
710b88efae Merge branch 'feature/1483_long_messages' of https://github.com/mermaid-js/mermaid into develop 2020-06-19 09:17:04 -04:00
Chris Moran
1118c3399c Fixed incorrect positioning and bounds for actors and notes with wrapping enabled and disabled 2020-06-19 09:13:37 -04:00
Knut Sveidqvist
98a7800fae Merge pull request #1481 from mermaid-js/1474_missplaced_transitions
1474 missplaced transitions
2020-06-19 11:38:43 +02:00
Knut Sveidqvist
b3f9bbe50f Merge branch 'develop' into 1474_missplaced_transitions 2020-06-19 11:38:30 +02:00
Knut Sveidqvist
e37c7e58cf Merge pull request #1479 from chewnoill/chewy/cleanup-after-failed-render
cleanup helper dom elements before rendering
2020-06-19 11:29:46 +02:00
Knut Sveidqvist
feb9ffadec Diagram showing sequence diagram with cut long message text 2020-06-19 11:03:37 +02:00
Knut Sveidqvist
a4d96b032e Diagram showing sequence diagram with long message text 2020-06-19 11:01:54 +02:00
Knut Sveidqvist
038d70a40b Diagram showing sequence diagram with long message text 2020-06-19 10:57:16 +02:00
Knut Sveidqvist
44d5009538 Revert of PR #1482 2020-06-19 10:52:20 +02:00
Knut Sveidqvist
8e1e7fb314 Merge branch 'chrismoran-bkt-develop' into develop 2020-06-19 08:41:52 +02:00
Knut Sveidqvist
dbbfbb2855 Updates after review 2020-06-19 08:40:54 +02:00
Chris Moran
24ed979faf Fixed an incorrect reference to an outer variable (actor) when processing actor widths 2020-06-18 08:51:16 -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
will cohen
d3d15b79fb cleanup helper dom elements before rendering 2020-06-17 17:54:01 -04:00
Knut Sveidqvist
60586d8ce0 #1474 Lint changes 2020-06-17 18:31:53 +02:00
Knut Sveidqvist
c95257f32c #1474 Adding some tests 2020-06-17 18:28:49 +02:00
Knut Sveidqvist
f0162557c5 #1474 Handling transitions 2020-06-17 18:16:24 +02:00
Chris Moran
5f257119d6 Merge branch 'develop' into refactor-sequences
# Conflicts:
#	dist/mermaid.core.js
#	dist/mermaid.core.js.map
#	dist/mermaid.js
#	dist/mermaid.js.map
#	dist/mermaid.min.js
#	dist/mermaid.min.js.map
#	src/config.js
#	src/mermaidAPI.js
2020-06-17 06:12:02 -04:00
Chris Moran
e6df4f24f4 Merge remote-tracking branch 'origin/develop' into develop 2020-06-17 06:05:00 -04:00
Chris
d4b733ff16 Merge pull request #5 from mermaid-js/develop
Merging upstream develop
2020-06-17 06:04:04 -04:00
Chris Moran
3c72d28511 Refactored rendering sequence diagrams 2020-06-17 05:54:24 -04:00
Knut Sveidqvist
e4b63a68fd Merge pull request #1477 from mermaid-js/1473_default_config
1473 default config
2020-06-16 08:07:18 +02:00
Knut Sveidqvist
a251029546 #§473 Font update for e2e tests 2020-06-15 22:42:33 +02:00
Knut Sveidqvist
b5d457daa9 Testcommit 2020-06-15 22:26:11 +02:00
Knut Sveidqvist
603f2a2154 1473 Using setConfig instead of initialize from mermaid in some cases 2020-06-15 21:55:20 +02:00
GDFaber
4f40c96d19 Merge pull request #1475 from NKjoep/develop
fix: Update cli link in the Readme
2020-06-15 16:13:10 +02:00
Andrea D
d7fc658bae fix: Update cli link in the Readme 2020-06-15 14:11:54 +02:00
Knut Sveidqvist
08dd2bd93d 1473 Class diagrams 2020-06-15 08:03:13 +02:00
Knut Sveidqvist
10b8a33b55 1473 Updated config handling, removed a logger 2020-06-15 01:12:25 +02:00
Knut Sveidqvist
bd0210cdce 1473 Updated config handling 2020-06-15 01:11:56 +02:00
Knut Sveidqvist
5677523800 1473 Setting default config 2020-06-14 23:37:08 +02:00
Knut Sveidqvist
2150933368 Setting default config 2020-06-14 22:50:45 +02:00
Chris Moran
fd7dbaf0a7 Merge branch 'mermaid-js-develop' into develop 2020-06-14 14:14:28 -04:00
Knut Sveidqvist
d145310447 Merge pull request #1472 from chrismoran-bkt/develop
Fixed theme rendering for note text on non-dark themes.
2020-06-14 19:52:56 +02:00
Chris Moran
9d413680d9 Fixed a rendering issue introduced while trying to fix dark mode. This should fix the rendering of note text for all current themes. 2020-06-14 13:42:25 -04:00
Chris Moran
0e85c814e1 Merge branch 'mermaid-js-develop' into develop 2020-06-14 13:03:13 -04:00
Knut Sveidqvist
3589bb9597 Merge branch 'develop' of github.com:mermaid-js/mermaid into develop 2020-06-14 18:41:31 +02:00
Knut Sveidqvist
10b06eda91 #1458 Adding directives section in the docs 2020-06-14 18:41:27 +02:00
Knut Sveidqvist
145d337db9 Merge pull request #1458 from chrismoran-bkt/develop
Auto-wrap, inline config, initialization, dark theme tweaks, etc
2020-06-14 18:26:32 +02:00
Chris Moran
1d59ae24c6 Merge branch 'mermaid-js-develop' into develop 2020-06-14 11:40:35 -04:00
Chris Moran
6309dd1350 Merge branch 'develop' of https://github.com/mermaid-js/mermaid into mermaid-js-develop 2020-06-14 11:40:15 -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
Knut Sveidqvist
bb8efadb98 Merge pull request #1470 from vantoan8x/click_event_support_keypath_function
Chart Node click event support key-path value for function callback
2020-06-14 14:25:46 +02:00
Chris Moran
620c894929 Fixed issue causing idea-multimarkdown headaches: util changes. Reworking them. 2020-06-14 06:53:22 -04:00
GDFaber
18d2a7fe4d Merge pull request #1467 from CollierCZ/patch-1
docs: update gantt docs
2020-06-14 00:30:52 +02:00
Knut Sveidqvist
78e74cda28 Merge pull request #1469 from mermaid-js/1466_linetypes_in_beta_renderer
1466 linetypes in beta renderer
2020-06-13 23:10:46 +02:00
Knut Sveidqvist
cc9c69c931 #1466 Fixing notes for state diagrams (beta) 2020-06-13 13:44:45 +02:00
Knut Sveidqvist
6559cfd0e1 #1466 Handling line styles using the new rendering engine 2020-06-13 13:12:33 +02:00
Toan
28dcc781b4 Chart Node click event support key-path value for function callback 2020-06-13 17:41:52 +07:00
Aaron Collier
09f10d2d7e docs: update gantt docs
Added descriptions of title and section statements and how to style todayMarker.
2020-06-12 11:44:01 +02:00
Knut Sveidqvist
8492503d4f Merge pull request #1464 from vantoan8x/bug/fix_tooltip_position_when_scroll
when window scroll, the tooltip show incorrect position coz its missing window.scrollXY
2020-06-11 21:56:27 +02:00
Knut Sveidqvist
c48b9b34e9 Merge pull request #1463 from vantoan8x/develop
Naming the link/connector edgeLabel and edgePath to let easy query and custom.
2020-06-11 21:55:57 +02: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
Toan
276b171d93 when window scroll, the tooltip show incorrect position coz its missing offset of window.scrollXY 2020-06-11 16:04:39 +07:00
Toan
44675739a1 when window scroll, the tooltip show incorrect position coz its missing offset of window.scrollXY 2020-06-11 16:01:36 +07:00
Toan
6e13718cbd naming the link/connector edgeLabel and edgePath to let easy query and custom. 2020-06-11 11:42:14 +07:00
Knut Sveidqvist
2bb6922e7f Merge pull request #1446 from jgreywolf/1378-AdditionalQualifiersBugWithMultipleArguments
1378 additional qualifiers bug with multiple arguments
2020-06-10 18:57:40 +02:00
Justin Greywolf
67e167427c 1378-Added additional test 2020-06-09 14:54:08 -07:00
Justin Greywolf
969a4e7ba5 1378-refine legacy member parsing to cover additional cases 2020-06-09 14:25:03 -07:00
GDFaber
a5aa38ce3c Merge pull request #1459 from ameech/patch-1
Fixed Typo
2020-06-09 04:34:01 +02:00
Justin Greywolf
0495103635 Fix regex and Fix incorrect test 2020-06-08 19:21:33 -07:00
Justin Greywolf
ae6b75b62a Removed additional unintended change 2020-06-08 18:47:36 -07:00
Justin Greywolf
9091d686ed 1378-Update regex to match multiple parameters
removing node version changes
2020-06-08 18:42:29 -07:00
Justin Greywolf
47b5d7a2df 1378-accept multiple parameters with methods
sec
2020-06-08 18:42:29 -07:00
Justin Greywolf
6298a7a357 Merge pull request #22 from mermaid-js/develop
merge from base fork
2020-06-08 18:42:10 -07:00
Adam Meech
45c63e2b82 Fixed Typo 2020-06-08 17:14:46 -05:00
Chris Moran
dba617a7fe Merge branch 'mermaid-js-develop' into develop 2020-06-08 15:00:52 -04:00
Chris Moran
4a253a7760 Merged with mainline develop 2020-06-08 14:58:42 -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
Knut Sveidqvist
7c4bff567b Merge branch 'master' into develop 2020-06-07 11:08:26 +02:00
Knut Sveidqvist
df2a5e97f8 Update index.html 2020-06-07 11:06:07 +02:00
Knut Sveidqvist
e9e5c75dec 8.5.2 Release build 2020-06-07 10:39:21 +02:00
Knut Sveidqvist
21e4387a39 Merge branch 'release/8.5.2' 2020-06-07 10:35:57 +02:00
Knut Sveidqvist
67ef829e04 Bump of version 2020-06-07 10:24:49 +02:00
Knut Sveidqvist
8b2b9713ce Merge pull request #1451 from mermaid-js/dependabot/npm_and_yarn/websocket-extensions-0.1.4
Bump websocket-extensions from 0.1.3 to 0.1.4
2020-06-07 10:22:25 +02:00
Ashish Jain
b7f998094f Merge pull request #1450 from mermaid-js/feature/1447_return_svg_at_syntax_error
Feature/1447 return svg at syntax error
2020-06-06 19:41:32 +02:00
dependabot[bot]
c324200f70 Bump websocket-extensions from 0.1.3 to 0.1.4
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-06 17:20:32 +00:00
Knut Sveidqvist
db3377e170 Lint fixes 2020-06-06 12:53:19 +02:00
Knut Sveidqvist
85a8feec9d Also fix for error handling when setting mermaid.parseError 2020-06-06 12:42:35 +02:00
Knut Sveidqvist
22b0ddfb42 Merge pull request #1439 from GDFaber/feature/build_and_publish_dev_and_prod_code
Build development and production code in one go and include it into the repository
2020-06-02 18:59:28 +02:00
Marc Faber
1cc94f8353 Add js and map files in dist folder to repository 2020-06-01 15:23:46 +02:00
Marc Faber
7d2a7d24a6 Remove entries in git ignore file 2020-06-01 15:16:41 +02:00
Marc Faber
73056f5620 Build development and production code in one go and include it into the repository 2020-06-01 14:44:53 +02:00
Knut Sveidqvist
2c271acfe9 Merge pull request #1438 from mermaid-js/1436_intersection_with_circles
1436 intersection with circles
2020-05-30 18:54:30 +02:00
Knut Sveidqvist
b76e833ea5 #1436 Correcting intersection calculations for circles 2020-05-30 18:04:46 +02:00
Knut Sveidqvist
3bdb9f289f Merge branch 'master' into develop 2020-05-30 17:11:23 +02:00
Justin Greywolf
97b8684e1a Merge pull request #21 from mermaid-js/develop
merge from base
2020-05-27 14:57:39 -07:00
Knut Sveidqvist
8958b2aa1b Merge pull request #1432 from mermaid-js/1418_html_labels_rendering_engine
1418 html labels rendering engine
2020-05-27 22:34:26 +02:00
Knut Sveidqvist
cf0fb69153 #1418 Lint fixes 2020-05-27 22:23:53 +02:00
Knut Sveidqvist
8603cf89b0 #1418 Fix for descriptions in states 2020-05-27 22:18:59 +02:00
Knut Sveidqvist
39ef0107ad #1418 Fix for titles in stateDiagram clusters 2020-05-27 21:47:07 +02:00
Knut Sveidqvist
63d7b63f42 #1418 Fix fr background in notes when using htmlLabels 2020-05-27 21:20:18 +02:00
Knut Sveidqvist
4ea6c98f43 #1418 Adding support for htmlLabels in stateDiagram (v2) 2020-05-27 20:41:59 +02:00
Knut Sveidqvist
39bdf261c6 2020-05-27 19:38:30 +02:00
Knut Sveidqvist
cb3e13e9e5 Merge pull request #1430 from yonasb/develop
Add Azure Devops native support to integrations list
2020-05-27 19:30:46 +02:00
Knut Sveidqvist
7a7e8fe741 Merge pull request #1425 from spopida/bug/1415_erd_empty_label_not_working
Ensure empty quoted relationship labels are accepted in ER diagrams
2020-05-27 19:30:21 +02:00
Yonas
4a9e691747 Merge pull request #1 from yonasb/docs/add-azure-integration
Add Azure Devops native support to integrations list
2020-05-27 10:09:37 -07:00
Yonas
4026c57834 Add Azure Devops to integrations list 2020-05-27 10:05:43 -07:00
Adrian Hall
f1c05bc909 Ensure empty quoted relationship labels are accepted in ER diagrams 2020-05-23 13:33:44 +01:00
Knut Sveidqvist
18d3b3545d Merge pull request #1422 from kevinkhill/patch-1
Update flowchart.md
2020-05-22 09:37:48 +02:00
Knut Sveidqvist
a03d9fba10 Merge pull request #1419 from korycins/patch-1
Fix config param name. Drop duplicated field in css example.
2020-05-22 09:36:24 +02:00
Knut Sveidqvist
ef24020b14 Merge pull request #1411 from ivan-danilov/sequence-over-notes-position-fix
Fixed SequenceDiagram over note horizontal position
2020-05-22 09:33:54 +02:00
Kevin Hill
d16d969799 Update flowchart.md 2020-05-21 04:33:58 -07:00
Maciej Korycinski
232f1fda6d Fix config param name. Drop duplicated field in css example. 2020-05-19 11:09:08 +02:00
Knut Sveidqvist
c1fd7fdad0 Updated version of mermaid in the docs
8.5.1
2020-05-17 10:29:55 +02:00
Knut Sveidqvist
9470a4f1ed Release 8.5.1, bumped version in package.json 2020-05-17 10:04:09 +02:00
Knut Sveidqvist
9da027cf74 Fix for intersect issues for start/end state 2020-05-17 09:34:56 +02:00
Knut Sveidqvist
45e9988700 Lint fix 2020-05-16 21:59:13 +02:00
Knut Sveidqvist
1f9b4703e8 Updated url in docs to use latest version of mermaid 2020-05-16 20:00:44 +02:00
Knut Sveidqvist
c21b61bbd2 Bug fixes in new functionality, intersections not taken into account in nodes used by new graph engine. Graph flowchart not usable when integrating using mermaid.core. Incorrect flwochart docs 2020-05-16 19:58:22 +02:00
Ivan Danilov
61249b0887 Fixed SequenceDiagram over note horizontal position
Previous expression with noteWidth does not make sense as noteWidth is
not used in case of note over two participants - forceWidth is used
instead. It tried to be symmetrical over cases A,B and B,A but failed.

Can be seen with messages over conf.width size (cannot reproduce in the
live editor as it seems to use not the last version where the code
does not use noteWidth).

The changed code explicitly calculates which of the actors is the
"left" one and starts rendering half margin to the left of its cetral
line.
2020-05-13 21:50:25 -07:00
Knut Sveidqvist
0ac48a431a Merge pull request #1409 from mermaid-js/1408_mermaid_on_diet
1408 mermaid on diet
2020-05-13 19:32:56 +02:00
Knut Sveidqvist
7b15fefcaa #1408 Mocking new module in tests 2020-05-13 19:21:53 +02:00
Knut Sveidqvist
6d076284e8 #1408 Removing crypto-random-string and he 2020-05-13 19:14:18 +02:00
Knut Sveidqvist
d7d248fd04 Merge pull request #1388 from mermaid-js/1386_finetuning_rendering_engine
1386 finetuning rendering engine
2020-05-13 17:36:12 +02:00
Knut Sveidqvist
a636aa592b Merge pull request #1392 from hikerpig/feature/remove-lodash
Replace lodash with specific implementations
2020-05-13 17:34:37 +02:00
Knut Sveidqvist
1fc6603f41 Merge branch 'develop' into feature/remove-lodash 2020-05-13 17:34:26 +02:00
Knut Sveidqvist
d36a233cbf Merge pull request #1400 from markotibold/patch-1
Fix a typo; d is close to s.
2020-05-13 17:32:32 +02:00
Knut Sveidqvist
2a11f42318 Merge pull request #1401 from spopida/feature/1390_avoid_wildcard_d3_imports
Do explicit imports for d3 instead of wildcards
2020-05-13 17:31:10 +02:00
GDFaber
e23383be41 Merge pull request #1407 from zakhenry/patch-1
docs(classDiagram): typo
2020-05-13 16:46:21 +02:00
Zak Henry
36a47febc2 docs(classDiagram): typo 2020-05-13 14:57:51 +01:00
Adrian Hall
053a86c0d4 Do explicit imports for d3 instead of wildcards 2020-05-11 07:10:04 +01:00
Marko Tibold
3ded1b6c6e Fix a typo; d is close to s. 2020-05-11 07:53:47 +02:00
hikerpig
28ea68fe7f Replace lodash with specific implementations, #1389 2020-05-07 21:35:34 +08:00
Knut Sveidqvist
6203c27244 #1386 Updated docs 2020-05-06 18:58:26 +02:00
Knut Sveidqvist
57fb800c77 Merge branch 'develop' into 1386_finetuning_rendering_engine 2020-05-06 18:51:55 +02:00
Knut Sveidqvist
9a3ec31191 #1386 Adding support for click events and links 2020-05-06 18:51:12 +02:00
Knut Sveidqvist
8ef3aee7e7 Merge pull request #1384 from mapio/patch-1
Updated the mkdocs-mermaid-plugin link
2020-05-06 17:40:10 +02:00
Knut Sveidqvist
a20e6086cc #1386 Adding subroutine support for new rendering engine 2020-05-03 21:52:44 +02:00
Knut Sveidqvist
66fa8a7595 Merge branch 'develop' into 1386_finetuning_rendering_engine 2020-05-03 13:31:46 +02:00
Knut Sveidqvist
a8f9e3f0b0 #1386 Adding some docs and adjusted sizing for state diagrams 2020-05-03 13:31:09 +02:00
Massimo Santini
215905213b Updated the mkdocs-mermaid-plugin link
It appears that https://github.com/sebastienwarin/mkdocs-mermaid-plugin has been more recently updated and is more feature rich (allowing for options to override the mermaid rendering defaults).
2020-05-02 02:15:47 +02:00
Knut Sveidqvist
f8865c1413 Merge pull request #1383 from mermaid-js/1382_hiearchy_fix
#1382 Fix for lost parentage for nodes in deep structure
2020-05-01 19:32:37 +02:00
Knut Sveidqvist
67aed51742 #1382 Fix for lost parentage for nodes in deep structure 2020-05-01 19:18:07 +02:00
Knut Sveidqvist
2be2b10e59 #1334 Adding docs for user journey to side nav 2020-05-01 16:04:44 +02:00
Knut Sveidqvist
ed5e194b8e Merge branch 'master' into develop 2020-05-01 15:58:52 +02:00
Knut Sveidqvist
a6b4cb24b8 Tmo disabling of coveralls 2020-05-01 15:16:39 +02:00
Knut Sveidqvist
4276fc0b0b Merge pull request #1379 from spopida/bug/1362_NaN_rendering_ERD
Change ERD fontSize config to an integer to prevent NaN errors
2020-05-01 15:14:33 +02:00
Knut Sveidqvist
0d10957441 Merge pull request #1374 from russellgeraghty/feature/docs-fixes
Feature/docs fixes
2020-05-01 15:12:13 +02:00
Knut Sveidqvist
368720538c Merge branch 'develop' of github.com:mermaid-js/mermaid into develop 2020-05-01 15:10:50 +02:00
Adrian Hall
d068a460bd Change ERD fontSize config to an integer to prevent NaN errors 2020-04-30 15:55:14 +01:00
Russell Geraghty
346ff199c6 Updated doc link 2020-04-28 08:45:41 +01:00
Russell Geraghty
480a4a9d38 Match title to example 2020-04-28 08:42:43 +01:00
Russell Geraghty
77cfd0e1a6 Colours 2020-04-28 08:40:48 +01:00
Russell Geraghty
950af2e753 Tidy up documentation, correct rendering in test 2020-04-28 08:28:16 +01:00
Knut Sveidqvist
aa2845a730 Merge pull request #1373 from phschaer/patch-1
expanded documentation on date formats for gantt
2020-04-27 19:51:13 +02:00
Knut Sveidqvist
aedf066337 Disabling coveralls temporarilly 2020-04-27 19:50:49 +02:00
Philipp Schaer
b975cf3ed4 fixed typo in code block 2020-04-27 17:29:22 +02:00
Philipp Schaer
f2af5ce7eb updated documentation on date formatting for gantt
Rearragend the existing information and added new context information on the date formating process for Gantt charts. The former documentation was not clear on the difference between input and output formatting.
2020-04-27 17:27:03 +02:00
Knut Sveidqvist
fa612b731c Renaming some tests to diffrentiate the old implementation from the impl via the new rendering engine 2020-04-26 17:48:07 +02:00
Knut Sveidqvist
0933268e61 Merge pull request #1371 from jgreywolf/1234-RefactorClassDiagramScaling
1234 refactor class diagram scaling
2020-04-26 17:23:14 +02:00
Knut Sveidqvist
3aa5fc0cc2 Merge pull request #1365 from dany74q/feature/sequence-diagrams-improvements
Feature/sequence diagrams improvements
2020-04-26 17:21:55 +02:00
Knut Sveidqvist
397f57accb Merge pull request #1334 from russellgeraghty/feature/user-journey
Feature/user journey
2020-04-26 17:17:33 +02:00
Knut Sveidqvist
e3b1944e31 Merge pull request #1370 from mermaid-js/feature/1295_generic_rendering_engine
Feature/1295 generic rendering engine
2020-04-26 16:55:11 +02:00
Knut Sveidqvist
507582f40b #1295 Bugfix for descriptions 2020-04-26 16:01:17 +02:00
Justin Greywolf
08e015a951 1234-RefactorDiagramScaling
Changed implementation to ensure that viewport is aligned correctly, rather than increasing size
2020-04-26 06:10:18 -07:00
Justin Greywolf
ef17f4eacb 1274-adjust diagram viewbox 2020-04-26 05:51:03 -07:00
Justin Greywolf
3d185dc622 Merge pull request #20 from mermaid-js/develop
ll
2020-04-26 05:38:45 -07:00
Knut Sveidqvist
76b4b88e4b #1295 Alternating graph directions for subgraphs 2020-04-26 12:57:45 +02:00
Knut Sveidqvist
fd37edc53f #1295 Adding support for forks and joins 2020-04-26 10:07:25 +02:00
Knut Sveidqvist
5662c06a33 #1295 Adding support for multiline descriptions for states 2020-04-26 09:47:47 +02:00
Knut Sveidqvist
0aede618ec #1295 Adding support for multiline descriptions for states 2020-04-25 17:01:20 +02:00
Knut Sveidqvist
e52d4ce033 #1295 Removing invalid title for concurrency clusters 2020-04-25 14:18:23 +02:00
Knut Sveidqvist
b646672d3e #1295 Fix for statediagram labels 2020-04-25 14:12:35 +02:00
Knut Sveidqvist
a1a7d44fd7 #1295 for Multi line labels separated with \n 2020-04-25 14:12:04 +02:00
Knut Sveidqvist
25ea221a6a #1295 Rendering tests for stateDiagram v2 2020-04-25 14:11:05 +02:00
Danny Shemesh
38ee4f556e Added (& pretty-printed) sequence diagram docs
This commit adds documentation to new config variables that were
introduced as part of this PR, namely, the font settings for actors,
messages and notes.

I've also linted the markdown document.
2020-04-23 18:39:23 +03: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
Danny Shemesh
5f6887b316 Sequence diagram fixes & improvements
This commit fixes some bugs, and I believe, improves upon the current
implementation.

In no particular order, it adds:

1. Control over note font size, family and alignment (now defaults to
center)
2. Dynamic actor resizing - actor's width will now scale if its
description is bigger than the static configured width
3. Dynamic actor margins - the margin between actors will now be
dynamically calculated by taking into account the width of connecting
messages or notes
4. Fixed a small visual annoyance where a loop arrow would intersect
with the text it loops on
5. Fixed a bug where if global config -> fontFamily wasn't defined, it
would override the actorFontFamily with an undefined
6. Removed some stale / commented out code
7. Added missing config variables to the global config object in mermaidAPI.js
8. Added messageFontSize, messageFontFamily to control message (non-note)
font settings
9. Memoized the actor widths in a pre-calculation that takes notes and
signals lengths into account
10. Removed redundant console.log lines
11. Extracted out actor width & margin calculation to getMaxMessageWidthPerActor, and
calculateActorMargins
2020-04-23 16:50:00 +03:00
Knut Sveidqvist
45b96bd568 Merge pull request #1364 from dany74q/feature/extract-line-break-regex
Feature/Extracted out the commonly used line break regex
2020-04-23 07:13:57 +02:00
Danny Shemesh
197d006860 Extracted out the commonly used line break regex
This commit extract the commonly used /br\s*\/?>/gi regex to common.js,
in order to keep the code more DRY.
2020-04-23 07:55:28 +03:00
Danny Shemesh
49f8aac6a9 Fixed outdated doc strings
This commit fixes some outdated docstrings, replacing the description
and @params where necessary.
2020-04-23 07:55:09 +03:00
Danny Shemesh
22dd50a047 Extracted out the commonly used line break regex
This commit extract the commonly used /br\s*\/?>/gi regex to common.js,
in order to keep the code more DRY.
2020-04-23 07:20:47 +03:00
Knut Sveidqvist
81d9b5afd6 #1295 Linting 2020-04-22 20:05:36 +02:00
Knut Sveidqvist
59f3d2a11e #1295 Fix for edges in subgraphs and handling of concurrent states in statediagram-v2 2020-04-22 20:03:41 +02:00
Adrian Hall
134a170a61 Update docs to include ER diagram descriptions 2020-04-17 14:24:44 +01:00
Adrian Hall
681f006ae1 Tiny tweaks to docs for ER diagram 2020-04-17 14:24:44 +01:00
Adrian Hall
36abfcc79b Escape the pipes in the syntax table 2020-04-17 14:24:44 +01:00
Russell Geraghty
249a14f84a Merge remote-tracking branch 'upstream/develop' into feature/user-journey 2020-04-17 07:30:53 +01:00
Knut Sveidqvist
10fdc45dea Merge pull request #1356 from mermaid-js/feature/1295_generic_rendering_engine
Feature/1295 generic rendering engine
2020-04-16 20:16:37 +02:00
Knut Sveidqvist
e8e7b419b5 #1295 Lint fixes 2020-04-16 19:57:56 +02:00
Knut Sveidqvist
955fc58773 Merge pull request #1351 from adutton/patch-1
Show source code in later examples
2020-04-16 19:50:53 +02:00
Knut Sveidqvist
2da3d83420 Merge pull request #1355 from spopida/develop
Update docs to include ER diagram descriptions
2020-04-16 19:50:05 +02:00
Knut Sveidqvist
c3f2e8dde1 #1295 Render fix for flowchart, correct marker handling and some cleanup 2020-04-16 19:44:11 +02:00
Adrian Hall
4e4c80b7fa Update docs to include ER diagram descriptions 2020-04-16 12:19:04 +01:00
GDFaber
3e776c8c41 Merge pull request #1353 from TomWright/mermaid-server
Add HTTP Server implementation to related projects.
2020-04-15 22:10:52 +02:00
Tom Wright
7c82e4b6c1 Add mermaid-server to integrations.md 2020-04-15 21:00:47 +01:00
Tom Wright
12d26d5a3d Add HTTP Server implementation to related projects. 2020-04-15 19:29:17 +01:00
Aaron Dutton
d228769b1b Show source code in later examples
The first few examples on the page show source code but the later ones didn't
2020-04-14 15:15:10 -07:00
Russell Geraghty
433f88b459 Merge remote-tracking branch 'upstream/develop' into feature/user-journey 2020-04-13 20:08:20 +01:00
Knut Sveidqvist
704d56d193 #1295 Updates mermaid-graphlib 2020-04-13 16:25:10 +02:00
Knut Sveidqvist
5f4da6e0bc Merge branch 'develop' into feature/1295_generic_rendering_engine 2020-04-11 18:53:47 +02:00
Knut Sveidqvist
0ce89d53d7 Adding ERD diagram section to the docs 2020-04-11 18:50:57 +02:00
Knut Sveidqvist
5bdffd7d20 Merge branch 'master' into develop 2020-04-11 18:10:53 +02:00
Knut Sveidqvist
5996920249 Merge branch 'release/8.5.0' 2020-04-11 18:03:42 +02:00
Knut Sveidqvist
f0119085e4 Updating mermaid to version 8.5.0 2020-04-11 18:02:05 +02:00
Knut Sveidqvist
22e17172dd #1295 Recursive rendering, draft 2020-04-11 17:16:01 +02:00
Knut Sveidqvist
6ec731e263 Merge pull request #1345 from GDFaber/feature/1343_add_flowchart_subroutine_shape
Add flowchart subroutine node shape
2020-04-11 14:12:20 +02:00
Knut Sveidqvist
7cd8b6f938 Merge pull request #1336 from GDFaber/feature/1290_hide_or_style_gantt_today_marker
#1290 Hide/style today marker in gantt diagram
2020-04-11 14:04:31 +02:00
Knut Sveidqvist
a4a19845d4 Merge pull request #1335 from GDFaber/bug/1271_fix_autonumber_position_for_multiline_texts
#1271 Fix autonumber positioning in sequence diagrams with multiline texts
2020-04-11 14:01:24 +02:00
Knut Sveidqvist
fffb0eafde Merge pull request #1332 from Soptq/stateRenderer
Add useMaxWidth to stateRenderer
2020-04-11 11:58:22 +02:00
GDFaber
10f60e2807 Merge pull request #1346 from spopida/develop
Fix docs for ER diagrams
2020-04-10 16:18:49 +02:00
Adrian Hall
3db27e6017 Tiny tweaks to docs for ER diagram 2020-04-10 11:47:29 +01:00
Adrian Hall
91b64798bb Escape the pipes in the syntax table 2020-04-10 11:40:39 +01:00
Knut Sveidqvist
8455db6fae #1295 Moving graph operations into mermaid-graplib and adding tests 2020-04-10 07:27:04 +02:00
Marc Faber
530648e937 Trigger tests once more 2020-04-10 00:28:33 +02:00
Marc Faber
7f67435cb9 #1343 Add flowchart subroutine node shape 2020-04-10 00:14:41 +02:00
Marc Faber
d8eba411ec Trigger tests once more 2020-04-05 02:29:41 +02:00
Marc Faber
dcfa903176 #1290 Hide/style today marker in gantt diagram 2020-04-05 01:59:18 +02:00
Marc Faber
fc70a8e145 #1271 Fix autonumber positioning in sequence diagrams with multiline texts 2020-04-04 21:53:31 +02:00
Russell Geraghty
e4a2d7dfb7 Updated API 2020-04-04 17:50:02 +01:00
Russell Geraghty
f081527731 User journey handler 2020-04-04 16:38:30 +01:00
GDFaber
9f8a0234aa Merge pull request #1333 from spopida/bug/1327_flowchart_cutoff
Prevent un-labelled edges that are left of the left-most vertex from being cut off the diagram
2020-04-04 05:54:32 +02:00
Knut Sveidqvist
857c860952 #1295 Lint fix 2020-04-02 19:50:21 +02:00
Knut Sveidqvist
cff68fc062 #1295 Better way of finding suitable child in cluster to point to 2020-04-02 19:48:28 +02:00
Knut Sveidqvist
365c741864 #1295 Fix for intersection calculation for edges to clusters and adding concurrency in stateDiagrams as clusters 2020-04-02 19:35:12 +02:00
Justin Greywolf
366f9db8a8 Merge pull request #19 from mermaid-js/develop
Merge into fork
2020-04-02 09:49:20 -07:00
Adrian Hall
9d5303c59d Prevent un-labelled edges that are left of the left-most vertex from being cut off the diagram 2020-04-02 15:29:12 +01:00
Soptq
c527392e21 Add useMaxWidth to stateRenderer 2020-04-01 15:12:45 +08:00
Knut Sveidqvist
933cc333cc #1295 Backwards compatability 2020-03-30 22:08:48 +02:00
Knut Sveidqvist
e72c3b2c86 #1295 Re-enabling state diagram tests 2020-03-30 21:40:14 +02:00
Knut Sveidqvist
231c849451 Merge pull request #1326 from mermaid-js/feature/1295_generic_rendering_engine
Feature/1295 generic rendering engine
2020-03-30 21:14:20 +02:00
Knut Sveidqvist
a5af248715 Merge branch 'develop' into feature/1295_generic_rendering_engine 2020-03-30 19:15:17 +02:00
Knut Sveidqvist
8fede48e7b Merge pull request #1324 from spopida/feature/1309_erDiagram_PlantUML
Feature/1309 er diagram plant uml
2020-03-30 19:11:53 +02:00
Knut Sveidqvist
d0492ec7bd Merge pull request #1323 from Pepper-Wood/bug/1294_nonfunctioning_callback_in_docs
Docs workaround for failing callback() section
2020-03-30 19:09:14 +02:00
Knut Sveidqvist
b5399202b6 Merge pull request #1307 from mermaid-js/dependabot/npm_and_yarn/acorn-5.7.4
Bump acorn from 5.7.3 to 5.7.4
2020-03-30 19:07:22 +02:00
Knut Sveidqvist
240077ffe8 #1295 Adding note support to state diagrams 2020-03-29 14:20:49 +02:00
Adrian Hall
eee9a1661f Merge branch 'develop' into feature/1309_erDiagram_PlantUML 2020-03-29 08:55:19 +01:00
Adrian Hall
9199546dca Alter ERD syntax for compatibility with PlantUML 2020-03-29 08:42:20 +01:00
Kathryn DiPippo
e0d97d44aa Docs workaround for failing callback() section 2020-03-29 00:55:14 -04:00
Knut Sveidqvist
5fbb69e7c5 #1295 Styling of composite states 2020-03-28 17:34:23 +01:00
Knut Sveidqvist
3a6aa8f820 #1295 Lint fix 2020-03-28 14:03:22 +01:00
Knut Sveidqvist
44ae5c86a7 #1295 Lint fix 2020-03-28 14:02:01 +01:00
Knut Sveidqvist
85f47e1693 #1295 Styling of start/end nodes, arrows and regular states 2020-03-28 13:59:41 +01:00
Knut Sveidqvist
9a96f8b155 Merge pull request #1315 from rmedaer/feature/multiline-sequence-message-alignment
Feature/Multiline sequence message alignment
2020-03-25 20:31:37 +01:00
Knut Sveidqvist
391dc06013 Merge branch 'develop' into feature/1295_generic_rendering_engine 2020-03-25 20:28:10 +01:00
Knut Sveidqvist
598b392878 #1295 Lint fixes 2020-03-25 20:26:53 +01:00
Knut Sveidqvist
9e75993658 Merge pull request #1314 from rmedaer/feature/multiline-sequence-message
Feature/Multiline sequence message
2020-03-25 20:22:31 +01:00
Knut Sveidqvist
159a3a3706 #1295 Start shape and handling of setting a unique start id per cluster level 2020-03-25 20:16:27 +01:00
Raphael Medaer
cbdb2e6e6f Align left/center/right multiline messages 2020-03-24 22:17:11 +01:00
Raphael Medaer
d409da2201 Multiline sequence message
This commit allow user to write multiline messages in sequence diagram.
For instance:

```
sequenceDiagram
	Alice->>+John: Hello John<br>How are you?<br>I mean...<br>Are you OK today?
	Alice->>+John: John, can you hear me?
	John-->>-Alice: Hi Alice, I can hear you!<br>Keep calm!<br>I'm there.
	John-->>-Alice: And I feel great!
```
2020-03-24 18:26:56 +01:00
Knut Sveidqvist
c7aa67b07a #1295 Lint fix 2020-03-22 23:06:32 +01:00
Knut Sveidqvist
5b302ae2e6 #1295 Applying new rendering engine for stateDiagrams 2020-03-22 21:45:14 +01:00
Knut Sveidqvist
df2925e51c #1295 Fix for edges form clusters 2020-03-22 16:08:57 +01:00
Knut Sveidqvist
02b19fed27 Merge branch 'develop' into feature/1295_generic_rendering_engine 2020-03-22 14:44:43 +01:00
Knut Sveidqvist
17f06564a2 #1295 Added the flowchart shapes 2020-03-18 22:08:19 +01:00
Knut Sveidqvist
6ddd394e33 Merge pull request #1308 from spopida/feature/117_er_diagram
Feature/117 er diagram
2020-03-18 20:32:12 +01:00
Adrian Hall
d3f78299e7 Add integration tests, basic docs, and fix multi-diagram bug 2020-03-18 16:53:26 +00:00
Adrian Hall
3e76b2374c Initial documentation for ER diagrams 2020-03-18 09:31:10 +00:00
Adrian Hall
a3b97f7c24 Remove roleB - only roleA is labelled 2020-03-17 10:16:19 +00:00
Adrian Hall
4f50e36e5b Tidy up for lint 2020-03-17 09:48:32 +00:00
Adrian Hall
a0bbbe1404 Merge branch 'develop' into feature/117_er_diagram 2020-03-17 09:28:10 +00:00
Adrian Hall
50f983871b Add labels to relationships (needs further tidy up) 2020-03-17 09:25:16 +00:00
Adrian Hall
2d3b02df6a Minor tidy up 2020-03-16 10:08:43 +00:00
Knut Sveidqvist
4010c89899 #1295 'arrow' renamed to 'arrow_point' 2020-03-16 08:02:32 +01:00
Knut Sveidqvist
215e930da4 #1295 Markers implmented, the gereric pattern and diagram specific for flowcharts. 2020-03-16 07:55:02 +01:00
Knut Sveidqvist
5b74d75011 #1295 Arrow head start 2020-03-14 18:13:34 +01:00
Knut Sveidqvist
9266eaef16 #1295 Small fix for import 2020-03-14 17:49:02 +01:00
Knut Sveidqvist
963a0ce6ef #1295 Edges between subgraphs 2020-03-14 17:38:35 +01:00
Knut Sveidqvist
5f5e453fb3 Small for for merge issue 2020-03-14 08:56:47 +01:00
Knut Sveidqvist
0cacd111df Merge branch 'develop' into feature/1295_generic_rendering_engine 2020-03-14 08:51:11 +01:00
Knut Sveidqvist
d86a7ccf3e Restoring docs README 2020-03-14 08:49:30 +01:00
Knut Sveidqvist
35ea4d1a00 Merge branch 'develop' into feature/1295_generic_rendering_engine 2020-03-14 08:44:49 +01:00
Knut Sveidqvist
10583610bd Lint fixes 2020-03-14 08:36:49 +01:00
Knut Sveidqvist
55816a09fe Merge pull request #1303 from NeilCuzon/develop
Gantt Documentation expanded.
2020-03-14 08:35:31 +01:00
Knut Sveidqvist
ad288be2ee 1295 Lint fixes 2020-03-14 08:24:45 +01:00
dependabot[bot]
c9071ff724 Bump acorn from 5.7.3 to 5.7.4
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-03-13 23:07:17 +00:00
Neil Cuzon
96b8dce982 Update README.md 2020-03-11 18:59:06 -07:00
Adrian Hall
1e498eccb6 Change rendering algorithm 2020-03-11 22:17:11 +00:00
Knut Sveidqvist
da048cbc7b 1295 Handling labels of clusters 2020-03-11 20:25:55 +01:00
Knut Sveidqvist
7bd5529bb7 1295 Support for subgraphs with wide labels 2020-03-11 19:52:57 +01:00
Knut Sveidqvist
1b64af143e #1295 Drawing edges between nodes 2020-03-11 17:36:30 +01:00
Neil Cuzon
d2685f2544 Update README.md 2020-03-10 19:42:11 -07:00
Neil Cuzon
83c6aef078 Update README.md 2020-03-10 19:26:26 -07:00
Neil Cuzon
a9570f7298 Update README.md 2020-03-10 19:24:55 -07:00
Neil Cuzon
71e0a788d1 Update mermaidAPI.md 2020-03-10 19:16:24 -07:00
Neil Cuzon
e6910d3c52 Update SUMMARY.md 2020-03-10 19:15:44 -07:00
Neil Cuzon
9a6e4ba77f Update README.md 2020-03-10 19:14:46 -07:00
Adrian Hall
bab4649a1e Use markers with rounded crows feet 2020-03-10 13:48:53 +00:00
NeilCuzon
5a763230e5 Revert "Revert "Revert "Revert "Revert "Update README.md"""""
This reverts commit 09e6804761.
2020-03-09 23:26:00 -07:00
NeilCuzon
09e6804761 Revert "Revert "Revert "Revert "Update README.md""""
This reverts commit a414aa27b6.
2020-03-09 23:25:55 -07:00
NeilCuzon
a414aa27b6 Revert "Revert "Revert "Update README.md"""
This reverts commit c598fd9ec4.
2020-03-09 23:25:28 -07:00
NeilCuzon
c598fd9ec4 Revert "Revert "Update README.md""
This reverts commit d28e3374c7.
2020-03-09 23:25:24 -07:00
NeilCuzon
a8eeb7f76a Revert "Revert "Delete README.md""
This reverts commit c3e9ae0ca0.
2020-03-09 23:25:19 -07:00
NeilCuzon
d28e3374c7 Revert "Update README.md"
This reverts commit 71cfec91af.
2020-03-09 23:23:44 -07:00
NeilCuzon
c3e9ae0ca0 Revert "Delete README.md"
This reverts commit b085222253.
2020-03-09 23:23:27 -07:00
Neil Cuzon
71cfec91af Update README.md 2020-03-09 23:02:14 -07:00
Neil Cuzon
b085222253 Delete README.md 2020-03-09 22:55:03 -07:00
Adrian Hall
29b6e00071 clean up for eslint 2020-03-09 12:36:43 +00:00
Adrian Hall
9aacc85a16 Working experimental version using markers 2020-03-08 22:22:33 +00:00
Knut Sveidqvist
aa32d454c9 #1295 First draft of generic renderer applied to flowcharts. 2020-03-08 09:49:41 +01:00
Neil Cuzon
d3b69abd87 Update gantt.md 2020-03-07 16:54:49 -08:00
Neil Cuzon
df88300e6e Update README.md 2020-03-07 16:50:39 -08:00
Neil Cuzon
e90ed7a853 Update gantt.md 2020-03-07 16:46:59 -08:00
Neil Cuzon
fdaf13bdc4 Update gantt.md 2020-03-07 16:26:22 -08:00
Neil Cuzon
d96d40e0b0 Update gantt.md 2020-03-07 16:23:51 -08:00
Neil Cuzon
5dae0c14d9 Add files via upload 2020-03-07 16:22:55 -08:00
Neil Cuzon
5cd54c4831 Update gantt.md 2020-03-07 16:21:07 -08:00
Neil Cuzon
4caa02474c Update gantt.md 2020-03-07 16:17:11 -08:00
Neil Cuzon
005defbb5c Add files via upload 2020-03-07 16:17:03 -08:00
Adrian Hall
061045016f Minor tidy up of prototype code 2020-03-07 11:05:56 +00:00
Neil Cuzon
997353ab71 Update gantt.md 2020-03-07 00:59:39 -08:00
Neil Cuzon
1570ed4610 Update mermaidAPI.md 2020-03-05 17:34:06 -08:00
Knut Sveidqvist
25e2d78311 #1295 Start renderer 2020-03-04 20:35:59 +01:00
Adrian Hall
1e2d014ac9 Basic rendering for ER diagrams 2020-03-03 21:44:18 +00:00
Neil Cuzon
a0b1d16e79 Update SUMMARY.md 2020-03-02 16:47:08 -08:00
Adrian Hall
6985391437 Minor clean up for eslint 2020-03-02 11:46:07 +00:00
Adrian Hall
e90f58a0a7 Merge branch 'develop' into feature/117_er_diagram 2020-03-02 10:48:32 +00:00
Adrian Hall
0555fca5d8 Initial parsing logic for ER diagrams 2020-03-02 10:03:55 +00:00
GDFaber
2a55e74e11 Merge pull request #1287 from mermaid-js/revert-1281-feature/1249_BlockComments
Revert "Multiline comments" - accidentally merged
2020-02-29 21:40:55 +01:00
GDFaber
94ace2348f Revert "Multiline comments" 2020-02-29 21:32:20 +01:00
GDFaber
2b58a2a176 Merge pull request #1286 from woehrl01/patch-1
Update README.md (fix broken image link)
2020-02-29 21:29:51 +01:00
Lukas Wöhrl
7bc82365c6 Update README.md 2020-02-29 20:55:20 +01:00
Knut Sveidqvist
de11dc43ab Merge pull request #1285 from mermaid-js/bug/1269_fix_label_background_on_safari
Bug/1269 fix label background on safari
2020-02-29 15:49:23 +01:00
Knut Sveidqvist
756927b6f8 #1269 Fix for build issue - lint 2020-02-29 15:39:21 +01:00
Neil Cuzon
5693c69457 Update README.md 2020-02-29 00:07:47 -08:00
Neil Cuzon
cda41a1506 Update README.md 2020-02-29 00:04:38 -08:00
Neil Cuzon
890298457a Update README.md 2020-02-29 00:03:42 -08:00
Justin Greywolf
ccfc7351e7 Merge pull request #18 from mermaid-js/develop
Merge
2020-02-28 09:52:44 -08:00
GDFaber
df6c5dd22e Merge pull request #1282 from joebordes/patch-1
add crm/erp category with corebos in the docs
2020-02-27 18:23:29 +01:00
erelling
60f23c838b Merge pull request #1281 from mermaid-js/feature/1249_BlockComments
Multiline comments
2020-02-27 15:19:15 +01:00
Knut Sveidqvist
dcd807c49b Merge pull request #1270 from NeilCuzon/develop
Edited n00b-GettingStarted.md and smaller edits to README.md and n00b-overview.md
2020-02-27 15:06:31 +01:00
Joe Bordes
575b921a15 add crm/erp category with corebos 2020-02-27 12:59:30 +01:00
Neil Cuzon
67473f07b1 Update n00b-gettingStarted.md 2020-02-27 01:07:25 -08:00
Neil Cuzon
3aa368b630 Update n00b-gettingStarted.md 2020-02-27 01:06:38 -08:00
Neil Cuzon
4e044d66b4 Update n00b-gettingStarted.md 2020-02-27 01:05:23 -08:00
Neil Cuzon
065a5d2a47 Update n00b-overview.md 2020-02-27 00:53:20 -08:00
Neil Cuzon
5103da09c5 Update README.md 2020-02-27 00:37:24 -08:00
Neil Cuzon
33ea1d44fb Merge branch 'develop' into develop 2020-02-27 00:32:17 -08:00
Erik Ellingsen
e62027b73c Multiline comments 2020-02-27 00:02:25 +01:00
erelling
26c43667aa Suggestion in comment 2020-02-26 23:10:18 +01:00
erelling
92fbc26852 Suggestion in comment 2020-02-26 23:09:04 +01:00
erelling
a4e488a1eb Suggestion from comment 2020-02-26 23:07:11 +01:00
Knut Sveidqvist
0ee9c69ddf #1269 Work around for inaccurate bounding box results in Safari. Fix for multiple lines 2020-02-26 20:53:08 +01:00
Knut Sveidqvist
dd5e6c18d5 #1269 Work around for inaccurate bounding box results in Safari. 2020-02-26 20:01:53 +01:00
Knut Sveidqvist
737e95c3f9 Merge pull request #1278 from jgreywolf/1264-UpdatedDocumentationFoUsages
1264-Update documentation
2020-02-26 17:45:40 +01:00
Justin Greywolf
4b064dc19f 1264-Update documentation
Reorder main readme.md file, add link to integrations - and add list of areas where mermaid is used
2020-02-25 13:11:08 -08:00
Knut Sveidqvist
f2e5c913d6 Merge pull request #1275 from ginomempin/docs/add-section-parallel-blocks-for-sequence-diagrams
Add section on showing parallel blocks for sequence diagrams
2020-02-25 19:27:44 +01:00
Knut Sveidqvist
8758bd57ca Merge pull request #1274 from GDFaber/bug/apply_default_class_to_flowchart_nodes
Fix applying default class to flowchart nodes
2020-02-25 19:20:52 +01:00
Knut Sveidqvist
73e31373a8 Merge pull request #1273 from mvandermade/patch-1
Removed GitBook, add howto contribute docs.
2020-02-25 19:17:53 +01:00
GDFaber
990e620dc7 Merge pull request #1268 from jgreywolf/1169-RefactorGetRowsFunctionality
1169 refactor get rows functionality
2020-02-25 19:14:22 +01:00
Marc Faber
9103e58314 Trigger tests once more 2020-02-25 19:01:33 +01:00
Neil Cuzon
a26fe71171 Update README.md 2020-02-24 11:19:50 -08:00
Neil Cuzon
7a44e46d6d Update n00b-overview.md 2020-02-23 23:16:13 -08:00
gino
b376e4da1f docs: Fix typo "possiebl" 2020-02-24 13:51:15 +09:00
gino
f8481f8d4c docs: Fix markdown lint MD012 and MD022
MD012 Multiple Consecutive Blanks
https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md012---multiple-consecutive-blank-lines

MD022 Headings should be surrounded by blank lines
https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md022---headings-should-be-surrounded-by-blank-lines
2020-02-24 13:49:18 +09:00
gino
54f55cc021 #425: Add documentation on using par for sequence diagrams
Support for `par` was already added here:
https://github.com/mermaid-js/mermaid/issues/425

But is not in the docs:
https://mermaid-js.github.io/mermaid/#/sequenceDiagram
2020-02-24 13:41:47 +09:00
Marc Faber
a7a4f38d58 Trigger tests again 2020-02-24 01:43:21 +01:00
Marc Faber
d67e49400f #684 Fix applying default class to flowchart nodes 2020-02-24 01:31:39 +01:00
mvandermade
6789f2c1e3 Removed GitBook, add howto contribute docs.
Also added the online submission step-by-step via github.com.
2020-02-23 10:47:51 +01:00
NeilCuzon
e8a3ffcb41 Merge pull request #2 from NeilCuzon/NeilCuzon-patch-2
Updated noob-gettingStarted.md
2020-02-22 23:24:05 -08:00
NeilCuzon
9607c743a0 Updated noob-gettingStarted.md
updated documentation for noob-gettingStarted.md. 
-added a new screenshot and edited directions for copying markdown code from live editor
-made some alterations with the instructions in effort to make it more n00b friendly.
-added link to Atom-mermaid plugin
2020-02-22 23:20:50 -08:00
NeilCuzon
553b964ab8 Update n00b-gettingStarted.md 2020-02-22 23:11:51 -08:00
NeilCuzon
72ac408429 Update n00b-gettingStarted.md 2020-02-22 23:10:42 -08:00
NeilCuzon
8456905960 Update n00b-gettingStarted.md 2020-02-22 23:10:08 -08:00
NeilCuzon
13261c974a Update n00b-gettingStarted.md 2020-02-22 23:09:06 -08:00
NeilCuzon
eafabdce36 Update n00b-gettingStarted.md 2020-02-22 23:07:45 -08:00
NeilCuzon
d02a57744c Add files via upload 2020-02-22 23:04:33 -08:00
NeilCuzon
58374add90 Update n00b-gettingStarted.md 2020-02-22 23:03:42 -08:00
NeilCuzon
a52d501ba2 Update n00b-gettingStarted.md 2020-02-22 23:03:11 -08:00
NeilCuzon
702abbad6d Add files via upload 2020-02-22 23:01:35 -08:00
NeilCuzon
2d0edb5270 Update n00b-gettingStarted.md 2020-02-22 22:24:39 -08:00
NeilCuzon
7aab34b540 Update n00b-gettingStarted.md 2020-02-22 22:16:26 -08:00
NeilCuzon
d637a13f59 Update n00b-gettingStarted.md 2020-02-22 22:16:00 -08:00
NeilCuzon
17f99aeed8 Updated n00b-gettingStarted.md
this section had some outdated info regarding the live editor and its capabilities. 
-replaced and outdated screenshot
-edited the documentation to make it a little more n00b friendly. 
-added a link to the Atom mermaid plugin

-Neil
2020-02-22 19:21:37 -08:00
NeilCuzon
8729414da9 Merge pull request #1 from NeilCuzon/NeilCuzon-patch-1
Update README.md
2020-02-21 22:00:50 -08:00
NeilCuzon
cd8b7e5528 Update README.md
Hi, I love your program and how it reimagines the whole dynamic of creating diagrams and graphs, I also like the wit of the documentation, but I had some small trouble in initially figuring out what the application was about. 

I propose a few line changes to clarify the purpose of the application and an additional a link to the syntax section of docs to  hopefully decrease the friction and increase the interest in using the product.  
I changed:
-"__mermaid is a Javascript based diagramming and charting tool. It generates diagrams flowcharts and more, using markdown-inspired text for ease and speed.__"
and I added:
-"__The following are some examples of the diagrams, charts and graphs that can be made using mermaid and the Markdown-inspired text specific to it. Click here jump into the [text syntax](https://mermaid-js.github.io/mermaid/#/n00b-syntaxReference).__"


More power to you and your team.
-Neil
2020-02-21 21:11:21 -08:00
Justin Greywolf
6d74c5663f 1169- break out getRows
Moved getRows function from `state/stateRenderer.js` and `state/shapes.js` into `common/common.js`. Broke out section into small one line functions for replacing line breaks, then moved the `sanitize` function from `utils.js` to this new module as there is shared functionality
2020-02-21 13:49:05 -08:00
Justin Greywolf
5ccca5e329 Merge pull request #17 from mermaid-js/develop
Merge
2020-02-21 12:35:38 -08:00
Knut Sveidqvist
6c7b7b796e Docs updated to new version 2020-02-21 10:49:52 +01:00
Knut Sveidqvist
4ee3cea6ce Setting version to 8.4.8 2020-02-21 10:31:11 +01:00
Knut Sveidqvist
1c07e550bb Merge pull request #1267 from mermaid-js/bug/1261_removal_of_cosole.log-calls
Bug/1261 removal of console.log calls
2020-02-21 10:23:37 +01:00
Knut Sveidqvist
50c71ebb01 #1261 Removal of emojis making rendering tests give false warnings from time to time 2020-02-21 10:08:52 +01:00
Knut Sveidqvist
348d086c11 #1261 Tmp reversal of build.yml to get make release possible 2020-02-21 10:00:36 +01:00
Knut Sveidqvist
89c1853977 #1261 Removed calls to console.log 2020-02-21 09:50:04 +01:00
Knut Sveidqvist
3acff54837 Merge pull request #1260 from mermaid-js/chris579-patch-1
Build action fix
2020-02-17 17:13:25 +01:00
Christian Klemm
c7466f7a1a adj 2020-02-16 19:54:29 +01:00
Christian Klemm
6420ad9f69 Merge remote-tracking branch 'origin/chris579-patch-1' into chris579-patch-1 2020-02-16 19:47:55 +01:00
Christian Klemm
b30823d5ac mermaid upgrade 2020-02-16 19:47:14 +01:00
Christian Klemm
864472d648 Update build.yml 2020-02-16 19:41:52 +01:00
Christian Klemm
36b02ec008 adj 2020-02-16 19:32:10 +01:00
Knut Sveidqvist
aad080aa1b Merge pull request #1259 from mermaid-js/bug/1257_autonumbering
#1257 Adding the autonumber keyword + tests and docs
2020-02-16 17:13:59 +01:00
Christian Klemm
7b7a6e10f8 adj 2020-02-16 17:11:13 +01:00
Christian Klemm
aeccf92375 Update build.yml 2020-02-16 16:52:15 +01:00
Christian Klemm
f90d271739 Update build.yml 2020-02-16 16:40:43 +01:00
Christian Klemm
9c2fde940d Update build.yml 2020-02-16 16:35:59 +01:00
Christian Klemm
2b57cc6be8 Update build.yml 2020-02-16 16:31:37 +01:00
Christian Klemm
b62819e3fb Update build.yml 2020-02-16 16:26:29 +01:00
Christian Klemm
3eb5f2c65b Update build.yml 2020-02-16 16:10:47 +01:00
Christian Klemm
41be7f951c Update build.yml 2020-02-16 16:04:20 +01:00
Christian Klemm
7812fdb6ed Merge pull request #1258 from mermaid-js/actions-fix
Actions fix
2020-02-16 15:54:55 +01:00
Christian Klemm
4eeb2a0583 lockfile update 2020-02-16 15:46:45 +01:00
Knut Sveidqvist
3dd0c537ee Font update for e2e tests 2020-02-16 15:39:52 +01:00
Christian Klemm
e0aa42f695 Update package.json 2020-02-16 15:39:20 +01:00
Christian Klemm
5dddf2f757 Update build.yml 2020-02-16 15:38:52 +01:00
Knut Sveidqvist
f8137ea7c1 #1257 Adding the autonumber keyword + tests and docs 2020-02-16 15:26:08 +01:00
Knut Sveidqvist
cf6f1a083e Upgarding version in docs 2020-02-16 14:19:27 +01:00
Knut Sveidqvist
f9cfeacc67 Version bump 2020-02-16 13:56:37 +01:00
Knut Sveidqvist
98229a47b2 Renabling build for node 10 2020-02-16 12:46:23 +01:00
Knut Sveidqvist
530ace1507 Disabling e2e tests in github actions 2020-02-16 12:39:05 +01:00
Knut Sveidqvist
792c657ff2 Modified build.yml 2020-02-16 09:42:57 +01:00
Knut Sveidqvist
5aa07439a8 Modified build.yml 2020-02-16 09:40:35 +01:00
Knut Sveidqvist
bf2862f164 Updated packages 2020-02-16 09:30:08 +01:00
Knut Sveidqvist
d9ef227435 Updated packages, trying to fix e2e tests in build 2020-02-16 09:17:17 +01:00
Knut Sveidqvist
324c845dc4 Disabling Static tests action due to issues with cypress 2020-02-16 09:06:05 +01:00
Knut Sveidqvist
5d0c44e84b Adding @babel/preset-env inorder to help build action 2020-02-16 08:54:17 +01:00
GDFaber
01a71c3dbb Merge pull request #1254 from xbojch/patch-1
Typos
2020-02-15 23:54:05 +01:00
Bojan Bedrac
b018f026e3 Typo
- fixes a typo
2020-02-13 15:51:00 +01:00
Knut Sveidqvist
0a38e3557d Merge pull request #1248 from DCsunset/bug/1247_ssr_error
Bug/1247 Fix "window is not defined" with ssr
2020-02-11 07:02:50 +01:00
DCsunset
6f450272b8 #1247 fix "window is not defined" with ssr 2020-02-06 20:26:09 -08:00
Knut Sveidqvist
7e01f9be6e Merge pull request #1245 from mermaid-js/feature/1224_styling_of_subgraphs
Feature/1224 styling of subgraphs
2020-02-05 20:06:22 +01:00
Knut Sveidqvist
00d2a1fe9f Merge branch 'develop' of github.com:mermaid-js/mermaid into develop 2020-02-05 19:42:13 +01:00
Knut Sveidqvist
18d0d435c6 Merge pull request #1241 from jgreywolf/1240-ClassDiagramRefactor
1240 class diagram refactor
2020-02-05 19:42:01 +01:00
Knut Sveidqvist
f298c154e2 Merge branch 'develop' of github.com:mermaid-js/mermaid into develop 2020-02-05 19:40:18 +01:00
Knut Sveidqvist
822df37f8c #1224 Possibility to style text color of nodes and subgraphs as well as apply classes to subgraphs 2020-02-05 19:39:50 +01:00
Knut Sveidqvist
73cac95255 Merge pull request #1238 from GDFaber/feature/962_flowchart_line_label_color_from_linkstyle
Set text color for flowchart link labels according to linkStyle definitions
2020-02-05 19:36:12 +01:00
Marc Faber
a0e7789d50 #962 added color setting for default link style 2020-02-04 22:07:10 +01:00
Justin Greywolf
c825b37cc6 1240-refactor for class renderer
prep for future functionality work
2020-02-03 16:04:59 -08:00
Marc Faber
2dd4aa31e5 #962 moved "style from array" function to utils.js, added unit test 2020-02-04 00:24:50 +01:00
Marc Faber
c95adfaf74 #962 Set text color for flowchart link labels according to linkStyle definitions 2020-02-02 22:59:59 +01:00
Justin Greywolf
9da8ea5967 Merge pull request #16 from mermaid-js/develop
Merge from parent
2020-01-30 10:20:14 -08:00
Knut Sveidqvist
4d5ecc5518 Merge pull request #1203 from jgreywolf/1179-SupportGenericTypesForMembers
1179 support generic types for members
2020-01-29 21:08:41 +01:00
Knut Sveidqvist
963a0fcd77 Merge branch 'develop' into 1179-SupportGenericTypesForMembers 2020-01-29 21:08:31 +01:00
Ashish Jain
fbd8dfa5be Merge pull request #1230 from mermaid-js/bug/1223_multiple_transitions_in_statediagram
Bug/1223 multiple transitions in statediagram
2020-01-29 21:02:14 +01:00
Knut Sveidqvist
c43f791b29 #1223 Removing/updating some logging, adding current.html to .gitignore 2020-01-29 20:44:15 +01:00
Ashish Jain
39b873cd5f Merge pull request #1229 from mermaid-js/bug/1217_fix_for_keyword_as_in_stateDiagram
#1217 Better matching of words beginning with as as matching token
2020-01-29 20:24:28 +01:00
Knut Sveidqvist
ec90537181 #1223 Adding support for multiple transitions to a node from another node 2020-01-29 20:01:21 +01:00
Knut Sveidqvist
4709195a1d #1223 Adding support for multiple transitions to a node from another node 2020-01-29 19:57:59 +01:00
Knut Sveidqvist
0082c23a90 #1217 Better matchingof words beginning with as as matching token AS in stateDiagram's state definition. 2020-01-29 19:05:51 +01:00
Knut Sveidqvist
c7b559f449 Update todo.md 2020-01-27 20:28:43 +01:00
Knut Sveidqvist
d571c7e08e Merge pull request #1225 from jgreywolf/1058-ClassDiagramScaling
1058 class diagram scaling
2020-01-27 20:14:39 +01:00
Knut Sveidqvist
b6f0b25f24 Merge pull request #1222 from GDFaber/bug/1218_fix_link_click_events
Fix anchor and script support in link click events
2020-01-27 20:13:07 +01:00
Knut Sveidqvist
5ea6bd5980 Merge branch 'develop' into bug/1218_fix_link_click_events 2020-01-27 20:06:00 +01:00
Knut Sveidqvist
ea29b67c5c Merge pull request #1221 from mermaid-js/bug/1216_dodging_huge_diagrams
#1216 Fix for issue when mermaid freezes the browser tab due to large…
2020-01-27 20:01:54 +01:00
Knut Sveidqvist
1f851bc04c Merge pull request #1219 from GDFaber/feature/487_flowchart_node_text_color_from_style
#487 Set text color for flowchart nodes according to style definitions
2020-01-27 20:01:19 +01:00
Justin Greywolf
0921007d92 1058-Set diagram dimensions appropriately
Make sure height and width are set so that all of the diagram is displayed
2020-01-27 10:27:05 -08:00
Justin Greywolf
4a2e0bfa00 Merge branch 'develop' into 1179-SupportGenericTypesForMembers 2020-01-27 09:44:12 -08:00
Justin Greywolf
8ebc587fb5 Merge pull request #15 from mermaid-js/develop
Merge from parent
2020-01-27 09:43:46 -08:00
Marc Faber
c7b46f4fba #1218 Fix anchor and script support in link click events 2020-01-26 16:56:42 +01:00
Knut Sveidqvist
4ad354a561 #1216 Fix for issue when mermaid freezes the browser tab due to large diagrams 2020-01-25 13:35:11 +01:00
Justin Greywolf
587592449a 1179 Add ability to use generics for members
Created new class to handle parsing of members with regex to handle determining type of member and the different elements within.  Also moved addTSpan in drawClass method to this new file.  Finally, I added a "catch all" section in case something fails in the regex to make sure everything gets formatted correctly.

Added more tests and documentation

updating gitignore

Tired of constantly having to ignore files and stash/pop when switching between branches
2020-01-24 16:01:04 -08:00
Justin Greywolf
425b071a50 Merge pull request #14 from mermaid-js/develop
merge from
2020-01-24 15:58:42 -08:00
Marc Faber
4dd72e6793 Trigger tests again 2020-01-24 01:42:46 +01:00
Marc Faber
d2d4a24229 #487 Set text color for flowchart nodes according to style definitions 2020-01-24 01:24:47 +01:00
Knut Sveidqvist
4805394e61 New version in the docs 2020-01-22 19:22:37 +01:00
Knut Sveidqvist
5cbd723f8d Merge branch 'release/8.4.6' 2020-01-22 19:07:20 +01:00
Knut Sveidqvist
28153656d7 Updated docs with info on chaining of nodes and using ::: to attach a class 2020-01-22 18:52:16 +01:00
Knut Sveidqvist
d2eaf16751 Updating version to 8.4.6 2020-01-22 18:33:33 +01:00
Knut Sveidqvist
e0d98b2e14 Merge pull request #1214 from GDFaber/bug/1212_apply_classDef_to_flowchart_nodes_with_links
Fix styling of flowchart nodes with links when class definitions are assigned
2020-01-22 17:59:53 +01:00
Marc Faber
c38f053294 #1212 Class definition is not applied to flowchart nodes with links 2020-01-19 18:10:14 +01:00
Knut Sveidqvist
921d274579 Merge pull request #1208 from mermaid-js/feature/Issue-1206_Parsing_Crashing_Browser_In_Class_Diagram
Feature/issue 1206 parsing crashing browser in class diagram
2020-01-15 20:55:21 +01:00
Ashish Jain
c9f95a1866 Merge pull request #1207 from mermaid-js/bug/1205_activations_error
#1205 Adding parsing exception for then an inactive participant is inactivated
2020-01-15 20:48:36 +01:00
Ashish Jain
99469f8404 #1206 Added test case to verify parsing fails to allow EOF until first '{' is closed 2020-01-15 20:34:41 +01:00
Ashish Jain
417d2c0336 #1206 Added test case to verify parsing fails to allow another '{' until first one is closed 2020-01-15 20:33:23 +01:00
Ashish Jain
2a3de1a090 #1206 Updated the classDiagram JISON to not allow EOF or another '{' until first one is closed 2020-01-15 20:29:13 +01:00
Knut Sveidqvist
d9318c5af3 #1205 Adding parsing exception for then an inactive participant is inactivated 2020-01-15 20:27:31 +01:00
Justin Greywolf
0e02cf5c86 Merge pull request #1195 from fgrandel/bug/1193_allow_multiple_relations
fix(#1193): render multiple relations
2020-01-15 09:29:02 -08:00
Knut Sveidqvist
45277affe8 Merge pull request #1204 from GDFaber/bug/1196_keep_flowchart_label_text_when_style_is_applied
Keep flowchart node label text (if already defined) when a style is applied
2020-01-15 18:27:48 +01:00
Knut Sveidqvist
c564a843fa Merge pull request #1202 from GDFaber/bug/1200_unify_regex_for_br_tags
Unify regex for finding <br> tags throughout mermaid
2020-01-15 16:53:06 +01:00
Knut Sveidqvist
efa810da91 Merge pull request #1199 from GDFaber/bug/fix_mermaidAPI_configuration_example_in_the_docs
Fix mermaidAPI configuration example in the docs
2020-01-15 16:50:11 +01:00
Knut Sveidqvist
c0e1c90497 Merge pull request #1198 from GDFaber/bug/add_docs_and_defaults_for_node_spacing
Add docs and default values for node spacing in mermaidAPI
2020-01-15 16:48:58 +01:00
Marc Faber
b1bfdec473 #1196 Keep flowchart node label text (if already defined) when a style is applied 2020-01-14 23:37:30 +01:00
Justin Greywolf
244f423baf Merge pull request #1194 from fgrandel/bug/1192_relation_cut_off
fix(#1192): relation got cut off
2020-01-14 09:35:00 -08:00
Justin Greywolf
8897b32cd3 Merge pull request #13 from mermaid-js/develop
sync
2020-01-13 16:01:40 -08:00
Marc Faber
5493fadc9e #1200 Unify regex for finding <br> tags throughout mermaid 2020-01-13 22:04:47 +01:00
Knut Sveidqvist
eade3d0a2d Merge pull request #1178 from jgreywolf/1119-SpecifyMethodReturnTypeInClassDiagram
1119 specify method return type in class diagram
2020-01-13 19:55:47 +01:00
Marc Faber
36f9eca33e Example 2 is not shown in mermaidAPI configuration section of the docs 2020-01-12 14:38:57 +01:00
Marc Faber
4dd90e56b1 Add docs and default values for node spacing in mermaidAPI 2020-01-12 14:09:24 +01:00
Knut Sveidqvist
5e7484a12d Update mermaidAPI.md 2020-01-12 01:04:15 -08:00
Knut Sveidqvist
fdbc44e41b Update mermaidAPI.md 2020-01-12 01:03:46 -08:00
Knut Sveidqvist
e0d16dcb22 Version 8.4.5 2020-01-11 10:07:41 +01:00
Knut Sveidqvist
0a5ee0634f Merge branch 'master' of github.com:mermaid-js/mermaid
# Conflicts:
#	docs/classDiagram.md
2020-01-11 09:47:51 +01:00
Justin Greywolf
fa1331ffd5 Fix after removing other code 2020-01-10 10:24:04 -08:00
Justin Greywolf
57b5b9a7a6 Added conditional to fallback to old style 2020-01-10 09:50:21 -08:00
Justin Greywolf
58fbfc3c38 1119 Support method return types
Small refactor to split out logic for determining method display text and style. Updated documentation
Used regex to parse method statements in class diagrams to extract discrete elements to set display appropriately. Added tests and updated docs
2020-01-10 09:50:21 -08:00
Justin Greywolf
0af5e0b795 Address code style issues 2020-01-10 09:50:21 -08:00
Justin Greywolf
d7771eb4b6 1119 Add ability to define return type for methods
Updated ClassRenderer to check for `[]` to indicate return type for method. Small refactor to split out logic for determining method display text and style. Updated documentation
2020-01-10 09:50:21 -08:00
Justin Greywolf
fc0902c290 Merge pull request #12 from mermaid-js/develop
sync
2020-01-10 09:47:16 -08:00
Florian Grandel
75890f88fa fix(#1193): render multiple relations 2020-01-09 17:00:34 +01:00
Florian Grandel
9a6b07e1e1 fix(#1192): relation got cut off 2020-01-09 16:24:47 +01:00
Knut Sveidqvist
ce02d1dc98 Merge pull request #1190 from mermaid-js/Issue-1092_Mangled_Multiple_Class_Diagrams
#1092 Fix for mangling of multiple classDiagrams
2020-01-08 21:05:42 +01:00
Knut Sveidqvist
7760e63b47 Merge pull request #1189 from GDFaber/maintenance/1182_flowchart_remove_newDagreD3
Maintenance/Remove "newDagreD3" switch from the flowchart renderer
2020-01-08 20:56:54 +01:00
Christian Klemm
a483f2466f added artifact to build action 2020-01-08 20:52:39 +01:00
Ashish Jain
48c345a403 #1092 Fix for mangling of multiple classDiagrams 2020-01-08 20:48:57 +01:00
Marc Faber
82b79aa332 Trigger tests once more 2020-01-08 20:42:58 +01:00
Marc Faber
ffbf9f265f #1182: remove "newDagreD3" switch from the flowchart renderer 2020-01-08 20:27:33 +01:00
Knut Sveidqvist
144f65c459 Merge pull request #1176 from GDFaber/feature/1152_flowchart_node_spacing
Feature/Add node spacing to flowchart configuration
2020-01-08 18:16:03 +01:00
Ashish Jain
18204586e1 Merge pull request #1188 from GDFaber/feature/743_gantt_multiline_section_titles
Feature/Handle multiline section titles in gantt diagrams
2020-01-08 18:06:29 +01:00
Marc Faber
1f3c970e7a Trigger tests once more 2020-01-08 14:03:16 +01:00
Marc Faber
1cfd93640c #743 handle multiline section titles in gantt diagrams 2020-01-08 13:50:58 +01:00
Marc Faber
553ea4971f Trigger tests one more time 2020-01-07 01:24:24 +01:00
Justin Greywolf
ac8b01a94c Merge pull request #11 from mermaid-js/develop
sync
2020-01-06 10:08:43 -08:00
Marc Faber
b3934c9788 #1152 add node spacing to flowchart configuration 2020-01-05 22:03:53 +01:00
Knut Sveidqvist
37ae863443 Merge pull request #1170 from jgreywolf/1064-ClickEventInClassDiagram
1064 click event in class diagram
2020-01-05 12:07:34 +01:00
Knut Sveidqvist
f57356006d Merge pull request #1171 from mermaid-js/feature/Issue-1146_Dashed_Line_For_Class_Diagram
Feature/issue 1146 dashed line for class diagram
2020-01-05 12:02:36 +01:00
Justin Greywolf
591a104c80 1064 Class diagram interactivity docs
Updated documentation for Class Diagram with details for interactivity
2020-01-03 10:14:07 -08:00
Justin Greywolf
38097c9095 code style 2020-01-02 11:27:56 -08:00
Justin Greywolf
7f31e624ca Addressing code style issues 2020-01-02 11:24:06 -08:00
Justin Greywolf
e6fbfcb1e8 1064 Adding tooltip and function calls to click evens in class diagrams 2020-01-02 11:06:29 -08:00
Justin Greywolf
00687f21cd Merge pull request #10 from mermaid-js/develop
sync fork
2020-01-02 11:05:54 -08:00
Ashish Jain
96fc0d043e #1146 Added cypress test for dash line (dependecy) rendering 2020-01-02 19:57:11 +01:00
Ashish Jain
190353785e #1146 Added jest test for dash line (dependecy) parsing 2020-01-02 19:51:25 +01:00
Ashish Jain
f54adb4a3e #1146 Updated classDiagram documentation with new relation types 2020-01-02 19:35:22 +01:00
Ashish Jain
f2a5d92398 #1146 Added stroke-dasharray style for Dependency relation 2020-01-02 19:29:17 +01:00
Ashish Jain
b14c768fa2 #1146 Fix for dashed line (Dependency) support for classDiagram 2020-01-02 19:25:31 +01:00
Ashish Jain
851d2f2d91 Merge pull request #1168 from mermaid-js/feature/834_linking_to_multiple_nodes
#834 Using & as a separator for the multiple nodes
2020-01-02 19:13:22 +01:00
Knut Sveidqvist
4e6aad5115 #834 Using & as a separator for the multiple nodes 2020-01-02 18:52:50 +01:00
Knut Sveidqvist
7bd1408de0 Merge pull request #1165 from jgreywolf/1064-ClickEventInClassDiagram
1064 click event in class diagram
2020-01-02 08:10:48 -08:00
Justin Greywolf
d63eb396e1 Fix code style issues 2020-01-02 07:59:36 -08:00
Knut Sveidqvist
465e99ab5d Merge pull request #1167 from mermaid-js/feature/921_adding_interaction_tests
Adding interaction tests for gantt callbacks with arguments
2020-01-01 03:41:14 -08:00
Knut Sveidqvist
33916cfbd3 Adding interaction tests for gantt callbacks with arguments 2020-01-01 12:03:29 -08:00
Knut Sveidqvist
a1626927cc Merge pull request #1136 from keenanjt33/feature/921_callback_params
Gantt: Add support for callback with parameters
2020-01-01 00:29:00 -08:00
Knut Sveidqvist
75e2abe242 Merge pull request #1166 from GDFaber/feature/flowchart_add_cylindric_shape
#1154 Flow diagram DB shape request
2020-01-01 00:24:56 -08:00
Knut Sveidqvist
2db8075e3f Merge pull request #1163 from GDFaber/bug/891_make_link_clickable_on_the_entire_node
Bug/Clicking on a link only works directly on the node text
2019-12-31 07:58:47 -08:00
Knut Sveidqvist
413876644c Merge pull request #1162 from sdankel/bug/1060_date_infinite_loop
Fix infinite loop caused by date iteration
2019-12-31 07:57:16 -08:00
Knut Sveidqvist
d5e9f2e23e Merge pull request #1156 from gene1wood/extend_br_tag_regex
Extend the `br` tag regex
2019-12-31 07:56:21 -08:00
Marc Faber
bc59d015e6 #1154 Flow diagram DB shape request 2019-12-31 16:30:03 +01:00
Justin Greywolf
2decf94ad0 1064- Add click functionality to class diagrams
modified interaction functionality from flowcharts to work with class diagrams
2019-12-30 17:27:20 -08:00
Justin Greywolf
b52744ae18 Merge pull request #9 from mermaid-js/develop
update fork
2019-12-30 17:26:40 -08:00
Knut Sveidqvist
6cbbf0af2f Merge pull request #1159 from DavertMik/develop
Check tests on PR
2019-12-29 08:47:08 +01:00
Christian Klemm
5d7ef149aa Merge pull request #1161 from wfnuser/fix/typos-in-flowDb
Error typos in flowDb
2019-12-26 16:26:02 +01:00
Marc Faber
7ce0974767 #891 Clicking on a link only works directly on the node text 2019-12-26 15:38:53 +01:00
Sophie Dankel
7b12c7a07d Fix infinite loop caused by date iteration 2019-12-24 19:01:29 -08:00
Christian Klemm
728e3fd2f0 Added task list to pull request template 2019-12-24 23:37:18 +01:00
wfnuser
4eedeebd46 other/typos in flowDb 2019-12-24 16:14:42 +08:00
Michael Bodnarchuk
85fb12155b Create checks.yml (#1)
* Create checks.yml

* Update checks.yml
2019-12-24 00:08:38 +02:00
Justin Greywolf
f99daa696e Merge pull request #8 from mermaid-js/develop
merge from base
2019-12-23 12:21:44 -08:00
Gene Wood
b4f9dd46a9 Add tests for <br \t> case
This adds tests for the case where
* multiple pieces of whitespace are used
* one of those whitespace characters is a tab
2019-12-23 08:52:15 -08:00
Nacho
ffe16f89bb Merge pull request #1157
Fix mispelling
2019-12-23 11:33:49 -05:00
Gene Wood
7604d92d5c Fix mispelling 2019-12-23 08:11:47 -08:00
Gene Wood
3abd77a1e6 Extend the br tag regex
This extends the `br` tag regex to accommodate an arbitrary amount of
any type of whitespace instead of a single space character, which holds
more closely to the HTML spec[1]

This extends the fix to #702 added in #1153

[1]: http://www.w3.org/TR/REC-xml/#sec-starttags
2019-12-23 08:02:11 -08:00
Knut Sveidqvist
d96b79a9ba Merge pull request #1153 from GDFaber/bug/702_br_tags_in_sequence_diagrams
Bug/702 br tags in sequence diagrams
2019-12-23 10:04:30 +01:00
Knut Sveidqvist
14bb888c21 Merge pull request #1151 from Progressive-Insurance/bug/git-graph-clear
Git graph not clearing
2019-12-23 10:03:16 +01:00
Knut Sveidqvist
c8f59ea1a7 Merge pull request #1140 from jdavis61/docs/1124_incorrect_include
Removed docs reference to mermaidAPI.js
2019-12-23 08:56:40 +01:00
Marc Faber
233520b797 #702 improve handling of different "br" tag notations for multiline texts in sequence diagrams 2019-12-21 20:39:32 +01:00
GDFaber
061d31af33 Merge pull request #6 from mermaid-js/develop
sync fork
2019-12-21 00:02:01 +01:00
Matthew Schott
ec742d3180 fix git graph not clearing 2019-12-20 14:48:36 -05:00
Nacho
1bc62cfba4 Merge pull request #1150 2019-12-19 13:45:21 -05:00
erinleck@gmail.com
028d9a2667 changes tick contrast for gantt chart 2019-12-19 09:52:46 -07:00
Knut Sveidqvist
d53e00ffe0 Change of broken docs 2019-12-18 19:43:35 +01:00
Knut Sveidqvist
b90fcc1b71 test commit 2019-12-18 19:40:50 +01:00
Knut Sveidqvist
a4e7305d52 #834 Adding unit tests and rendering tests 2019-12-18 19:13:56 +01:00
Knut Sveidqvist
a3378f8d03 Merge pull request #1149 from mermaid-js/other/1143_utilze_browser_console_object_better
#1143 Adding support in grammar for multiple nodes in dependency decl…
2019-12-18 18:41:45 +01:00
Knut Sveidqvist
5716d163ec Merge branch 'develop' into other/1143_utilze_browser_console_object_better 2019-12-18 18:41:14 +01:00
Knut Sveidqvist
42ef035241 #834 Using space as separator, simplfifying the grammar some more, reomving some logging 2019-12-18 18:36:34 +01:00
Knut Sveidqvist
b6157195b3 Merge pull request #1148 from mermaid-js/other/1142_simplify_flowshart_grammar
#1142 Simplified arrows/edges in the grammar
2019-12-18 18:12:55 +01:00
GDFaber
b8ee68034d Merge pull request #5 from mermaid-js/develop
fork sync
2019-12-16 17:18:15 +01:00
Knut Sveidqvist
6598b1b10d #1143 Adding support in grammar for multiple nodes in dependency declarations 2019-12-15 18:10:52 +01:00
Knut Sveidqvist
4ff4058244 #1142 Simplified arrows/edges in the grammar 2019-12-15 13:34:35 +01:00
Knut Sveidqvist
dddd5af830 Merge pull request #1144 from mermaid-js/other/1143_utilze_browser_console_object_better
#1143 Fixing up the color output of the logger
2019-12-15 10:09:27 +01:00
Knut Sveidqvist
26fac9507e #1143 Fixing up the color putput of the logger 2019-12-15 09:50:24 +01:00
GDFaber
1f1c9698ce Merge pull request #4 from mermaid-js/develop
sync my fork
2019-12-15 02:18:38 +01:00
GitHub actions
56f7459617 Release 8.4.4 2019-12-14 08:50:41 +00:00
GitHub actions
86604b5de1 Bump version 8.4.4 2019-12-14 08:50:41 +00:00
Knut Sveidqvist
0544dbe891 Merge branch 'master' into develop 2019-12-14 09:27:38 +01:00
Knut Sveidqvist
6365cea0b2 Upgrading docs to 8.4.4 2019-12-14 09:26:21 +01:00
Knut Sveidqvist
7fef13346e Bumping version to 8.4.4 2019-12-14 09:00:53 +01:00
Knut Sveidqvist
81216e6ece Merge branch 'release/8.4.4' 2019-12-14 08:52:40 +01:00
James Davis
1d0b305332 Readded call to mermaidAPI in docs 2019-12-12 22:25:07 -05:00
James Davis
c10ccc011f Removed reference to mermaidAPI.js 2019-12-12 07:47:36 -05:00
Christian Klemm
3fe7995060 Merge pull request #1137 from mermaid-js/master
Master sync
2019-12-12 01:30:51 +01:00
Knut Sveidqvist
c441d04e8a Merge branch 'itprdev-issue-552' into develop 2019-12-11 21:31:33 +01:00
Knut Sveidqvist
52d84a99ac #552 Adding docs 2019-12-11 21:28:07 +01:00
Knut Sveidqvist
fcf20215a6 #552 Adding rendering test 2019-12-11 21:12:48 +01:00
Knut Sveidqvist
aa2f9622f8 Merge branch 'issue-552' of https://github.com/itprdev/mermaid into itprdev-issue-552 2019-12-11 21:10:11 +01:00
Knut Sveidqvist
1811318dea #1088 Adding rendering tests 2019-12-11 20:17:51 +01:00
Knut Sveidqvist
5eb50cb2b6 Merge pull request #1132 from GDFaber/develop_Bugfixes_linkStyle_910_1088
Flow: Bugfixes for link style
2019-12-11 20:04:32 +01:00
Knut Sveidqvist
f6ef6ff7db Merge pull request #1130 from GDFaber/develop
Flow: Add stadium shape for nodes
2019-12-11 19:48:47 +01:00
Knut Sveidqvist
2f33a80e1e Merge pull request #1131 from jgreywolf/1104(b)-SupportForAbstractMethodInClassDiagram
Class: Support for abstract methods
2019-12-11 19:43:32 +01:00
Justin Greywolf
363d49b655 Renumber render tests 2019-12-11 10:34:51 -08:00
Justin Greywolf
de8c6d5572 Merge branch 'develop' into 1104(b)-SupportForAbstractMethodInClassDiagram 2019-12-11 10:31:27 -08:00
Justin Greywolf
9406bda93d Merge pull request #7 from mermaid-js/develop
update fork
2019-12-11 10:24:17 -08:00
Knut Sveidqvist
d17a447a5f Merge pull request #1128 from mermaid-js/bug/1123_Upgrade_serialize-javascript
#1127 Ugrading of webpack and adding newer terser-webpack-plugin
2019-12-11 19:18:45 +01:00
Knut Sveidqvist
5b4e95484e Merge pull request #1120 from jgreywolf/1063-GenericTypeSupportInClassDiagrams
Class: Generic type support
2019-12-11 19:09:19 +01:00
Knut Sveidqvist
bebea41e19 Merge pull request #1121 from mermaid-js/pr_template
Add pull request template
2019-12-11 19:04:29 +01:00
Keenan Tullis
442474fc44 Merge branch 'develop' of https://github.com/mermaid-js/mermaid into feature/921_callback_params 2019-12-10 19:13:02 -05:00
Keenan Tullis
0d9112a4c1 Adds basic documentation for interaction with gantt 2019-12-10 19:04:42 -05:00
Keenan Tullis
d504e00e18 Adds simple tests for parsing callbacks wrt args 2019-12-10 18:27:06 -05:00
Justin Greywolf
74c8e7fad9 another style fix 2019-12-10 15:21:25 -08:00
Justin Greywolf
4b781d3827 remove extra space 2019-12-10 15:18:26 -08:00
Justin Greywolf
9fbcc5c32d Code style fix 2019-12-10 15:12:37 -08:00
Keenan Tullis
c7ec8190fb Gantt callback: default to node id as callback arg 2019-12-10 15:25:28 -05:00
Christian Klemm
b73a6d84ee Set release drafter sorting direction 2019-12-10 20:52:00 +01:00
Justin Greywolf
2eaa7f1ab6 Generic Type support for classes
Fixed typos after refactor
2019-12-10 11:39:25 -08:00
Marc Faber
608445e64f #910 set correct position and style for edge labels when using linkStyle, #1088 handle multiline texts in edge labels when using linkStyle 2019-12-10 03:51:37 +01:00
Marc Faber
1f4be77662 Revert "#910 set correct position and style for edge labels when using linkStyle, #1088 handle multiline texts in edge labels when using linkStyle" - Sorry, forgot to push to a new branch.
This reverts commit 0deae4abf9.
2019-12-10 03:48:12 +01:00
Marc Faber
0deae4abf9 #910 set correct position and style for edge labels when using linkStyle, #1088 handle multiline texts in edge labels when using linkStyle 2019-12-10 03:34:40 +01:00
Justin Greywolf
5b2f9351c7 Add support for abstract methods
Added logic to allow rendering of a method name with italics or underline based on modifier at beginning of name to set css style
2019-12-09 18:13:06 -08:00
Justin Greywolf
6fdf30357c 1104-Add support to designate a method as abstract
Added logic to allow rendering of a method name with italics or underline based on modifier at beginning of name to set css style
2019-12-09 17:41:26 -08:00
Justin Greywolf
cf5d7478fc Merge pull request #6 from mermaid-js/develop
Merge
2019-12-09 11:42:26 -08:00
Marc Faber
9a0df5afb0 #723 Add stadium shape for flowchart nodes 2019-12-08 16:51:47 +01:00
GDFaber
813b2fcb38 Merge pull request #3 from mermaid-js/develop
sync develop branch
2019-12-08 16:43:28 +01:00
Christian Klemm
08cbc0f187 Merge pull request #1129 from mermaid-js/master
Master sync
2019-12-08 13:14:32 +01:00
Knut Sveidqvist
d8251c8f79 Merge pull request #1126 from mermaid-js/bug/935_styling_of_dotted_think_links
#935 Fix for stylink of links. Default theme colors are picked up and…
2019-12-08 10:51:28 +01:00
Knut Sveidqvist
5ea70baa6f #1127 Ugrading of webpack and adding newer terser-webpack-plugin 2019-12-08 10:42:41 +01:00
Knut Sveidqvist
d23ce9fb63 #935 Fix for stylink of links. Default theme colors are picked up and styling via themeCSS works 2019-12-08 10:10:03 +01:00
Knut Sveidqvist
ddf8016a0c Merge pull request #1125 from mermaid-js/bug/903_flochart_escaping_in_non_html_mode
Bug/903 flowchart escaping in non html mode
2019-12-08 09:57:48 +01:00
Knut Sveidqvist
ab191abd5a #903 Fix for broken build 2019-12-07 15:06:44 +01:00
Knut Sveidqvist
c2e5e94b37 #903 Allowing >,< and = characters in svg. Updating xss tests to handle both htmlLabels and non htmlLabels 2019-12-07 12:19:45 +01:00
Justin Greywolf
6a9b251be1 Fix code style errors 2019-12-06 20:35:22 -08:00
Christian Klemm
6b5185abfb Create pull_request_template.md 2019-12-06 21:41:16 +01:00
Justin Greywolf
2a41280076 Add support for Generic class definitions
Added support in parser to translate characters surrounded by `~` into generic type definition ie: `Class01~T~` would turn into `Class01<T>`
2019-12-05 12:59:22 -08:00
Justin Greywolf
91d986970b Merge pull request #5 from mermaid-js/develop
Develop
2019-12-05 12:58:48 -08:00
Christian Klemm
b4192bba7a Added skip changelog label to release drafter 2019-12-04 19:35:25 +01:00
Knut Sveidqvist
9fe0aa0604 Merge pull request #1116 from mermaid-js/bug/1110_state_diagram_rendering_composit_state
Bug/1110 state diagram rendering composit state
2019-12-04 19:15:06 +01:00
Knut Sveidqvist
fc528749f8 Merge pull request #1114 from mermaid-js/feature/1112_revert_offical_dagre_d3
Feature/1112 Revert to offical dagre d3
2019-12-04 19:14:35 +01:00
Knut Sveidqvist
5c71a3c85b #1110 Fix for transparent rect under edge title, was misaligned 2019-12-04 18:20:28 +01:00
Knut Sveidqvist
94e768dd01 #1110 Cleanup and removal of loggings 2019-12-04 18:04:56 +01:00
Knut Sveidqvist
0fb91d6bcc #1110 Fixing height issue 2019-12-03 23:38:51 +01:00
Knut Sveidqvist
02854881b4 #1110 Zoom in a bit 2019-12-03 22:48:55 +01:00
Christian Klemm
4254781391 Adjusted imports 2019-12-03 22:09:43 +01:00
Christian Klemm
31f4f4096e upgraded packages 2019-12-03 22:05:39 +01:00
Christian Klemm
e95e016378 switched to official dagre d3 2019-12-03 21:59:28 +01:00
Knut Sveidqvist
c337c9128c Merge branch 'master' into bug/1110_state_diagram_rendering_composit_state 2019-12-03 21:04:18 +01:00
Knut Sveidqvist
5a38562bfc #1110 Handling case with concurrency lines 2019-12-03 20:59:17 +01:00
Justin Greywolf
a3dd0e5f7d Merge pull request #4 from mermaid-js/develop
Merge from main
2019-12-02 16:00:32 -08:00
Knut Sveidqvist
fcd1e106a5 #1110 Handling case when title is less wide then subgraph 2019-12-02 21:22:22 +01:00
Knut Sveidqvist
346328156a #1110 Adding tests for this case and some calcuations for width 2019-12-02 21:10:37 +01:00
Christian Klemm
3239f99ea8 Set develop branch for release drafter 2019-12-02 14:48:16 +01:00
Christian Klemm
93c32d3f29 Set develop branch for release drafter 2019-12-02 14:47:34 +01:00
Christian Klemm
98449dac3f Set develop branch for release drafter 2019-12-02 14:43:55 +01:00
Knut Sveidqvist
32b60edda7 Merge branch 'develop' 2019-12-01 13:36:04 +01:00
Knut Sveidqvist
823c95bd9c Updated mermaid version 2019-12-01 13:34:43 +01:00
Knut Sveidqvist
e99d872f2b Create FUNDING.yml 2019-12-01 09:15:56 +01:00
Knut Sveidqvist
de8f8b02dc Merge branch 'master' into develop 2019-12-01 07:54:02 +01:00
Knut Sveidqvist
eec45dfff9 Merge branch 'release/8.4.3' 2019-12-01 07:52:44 +01:00
Knut Sveidqvist
cce86c8e96 Merge pull request #1107 from chris579/feature/1106_release_management
Feature/1106 Release management
2019-12-01 07:34:59 +01:00
Christian Klemm
aabdc47c38 small fixes 2019-12-01 01:06:00 +01:00
Knut Sveidqvist
cb07a729e5 Merge pull request #1098 from mermaid-js/feature/1053_documentation-update
Feature/1053 documentation update
2019-12-01 00:42:41 +01:00
Knut Sveidqvist
df10f7fbe7 Merge pull request #1103 from penenkel/patch-2
Bug/1030 Adjust babel config to account for IE11
2019-12-01 00:42:02 +01:00
Knut Sveidqvist
71c531240f Merge pull request #1089 from jgreywolf/1073-CommentsInClassDiagrams
Bug/1073 Comments in class diagrams
2019-12-01 00:39:33 +01:00
Christian Klemm
1e83207dac small fixes 2019-12-01 00:39:09 +01:00
Christian Klemm
3311fcdc8e Reenable yarn install 2019-12-01 00:21:12 +01:00
Christian Klemm
f368be925f Removed release branch deletion 2019-12-01 00:18:49 +01:00
Christian Klemm
075c57ca06 Check out branches 2019-12-01 00:03:06 +01:00
Christian Klemm
49fc80d506 Prepare git for push 2019-11-30 23:54:42 +01:00
Christian Klemm
74fc2fcfa9 Release tag fixes 2019-11-30 23:49:04 +01:00
Christian Klemm
7cc427e28d Disable yarn install 2019-11-30 23:36:13 +01:00
Christian Klemm
87c571412c version fix 2019-11-30 23:35:39 +01:00
Christian Klemm
ab093b2cde Remove v from release tag 2019-11-30 23:28:48 +01:00
Christian Klemm
bbc4ede768 Added first workflows 2019-11-30 23:23:09 +01:00
penenkel
64c20dc528 Bug/1030 Adjust babel config to account for IE11
An attempt at adding IE11 compatibility (`ie >= 11`) while preserving the current requirements (`current node`) and following browserlist [best practices](https://github.com/browserslist/browserslist#best-practices) (`defaults`).
2019-11-29 23:06:49 +01:00
Knut Sveidqvist
50ea9bda89 Removed loggin 2019-11-28 11:41:54 -05:00
Nacho
2cf8c4e37a Absolute URIs in readme images 2019-11-28 11:41:54 -05:00
Knut Sveidqvist
fe4719f656 Added analytics for docs 2019-11-28 11:41:54 -05:00
James A. Bednar
1d43b7b316 Fixed typos 2019-11-28 11:41:54 -05:00
Itprdev
78e4fead49 Feature request 552. Gnatt chart task with multiple dependencies 2019-11-28 16:53:33 +02:00
Nacho
02d5143ff2 Merge pull request #1095 from mermaid-js/fixes/readme-uris
Absolute URIs in readme images
2019-11-28 08:28:12 -05:00
Erik Ellingsen
d9c92b2c6d syntax error 2019-11-28 13:22:02 +01:00
Erik Ellingsen
27ac9bbaf3 polish 2019-11-28 13:14:29 +01:00
Erik Ellingsen
11cdd393f2 Knuts comments 2019-11-28 13:13:26 +01:00
Erik Ellingsen
1ca8578035 polish 2019-11-28 13:07:14 +01:00
Erik Ellingsen
2516718882 Clarification 2019-11-28 13:06:16 +01:00
Erik Ellingsen
5283314c4f Polish 2019-11-28 13:03:58 +01:00
Erik Ellingsen
dcae8da0d1 Better header 2019-11-28 13:01:24 +01:00
Erik Ellingsen
34f2a1a02f polish 2019-11-28 13:00:12 +01:00
Erik Ellingsen
ee5a68a23c Better intro 2019-11-28 12:59:34 +01:00
Erik Ellingsen
6c706ccd9f Diagram references 2019-11-28 12:57:55 +01:00
Erik Ellingsen
94106f5825 Added syntax reference link 2019-11-28 12:53:33 +01:00
Erik Ellingsen
72ab2b8011 Added coming soon 2019-11-28 12:44:37 +01:00
Erik Ellingsen
8978ab5917 Links added 2019-11-28 12:43:55 +01:00
Erik Ellingsen
94577316f9 Drafting advanced usage 2019-11-28 12:38:42 +01:00
Erik Ellingsen
91650fb052 Script bug and clarifications 2019-11-28 12:34:26 +01:00
Knut Sveidqvist
e9aa037230 Removed loggin 2019-11-27 20:15:21 +01:00
Nacho
871e6f691c Absolute URIs in readme images 2019-11-27 14:12:34 -05:00
Knut Sveidqvist
fe60836a89 Added analytics for docs 2019-11-27 20:08:54 +01:00
Knut Sveidqvist
bea2e73b82 #1065 Updated dependency of dagre-d3 to unofficial release 2019-11-27 19:09:14 +01:00
Nacho
481e55e8da Merge pull request #1090 from jgreywolf/1074-CommentsDocumentation
Bug/1074 Comments documentation
2019-11-27 11:23:50 -05:00
Justin Greywolf
d26a67297a Updated documentation with comment syntax 2019-11-26 15:34:52 -08:00
Justin Greywolf
753bd7e1d9 Update class diagrams to handle comments
updated regex in parser to correctly handle comments in class diagrams.  Also updated flowchart parser to remove unused elements for comments, as well as modifying the regex to match
2019-11-26 11:23:07 -08:00
Justin Greywolf
b57492c1c6 Initial checkin 2019-11-26 11:22:21 -08:00
Justin Greywolf
4ff5c3b455 Merge pull request #3 from mermaid-js/develop
Develop
2019-11-26 11:20:20 -08:00
Knut Sveidqvist
f62c47a757 Updating version to 8.4.3 2019-11-23 13:10:27 +01:00
Knut Sveidqvist
a85bb0d86f Merge pull request #1086 from chris579/bug/1085_coveralls_build_fix
Bug/1085 Coveralls not working for GitHub builds
2019-11-21 20:58:49 +01:00
Knut Sveidqvist
5736d523dd Merge pull request #1081 from jgreywolf/Bug1061-CannotMarkMembersAsProtectedInClassDiagram
Bug/1061 Cannot mark members as protected in class diagram
2019-11-21 20:54:15 +01:00
Justin Greywolf
5004b5723d Added separate render test 2019-11-21 11:17:53 -08:00
Knut Sveidqvist
ad2802d8e8 Merge pull request #1084 from mermaid-js/bug/1078_handling_of_arrowMarkerAbsolute
Bug/1078 handling of arrow marker absolute
2019-11-20 21:50:50 +01:00
Christian Klemm
3fedd452a5 added parallel build support 2019-11-20 21:18:19 +01:00
Christian Klemm
292bc3c4e5 Switched to coveralls action 2019-11-20 21:11:48 +01:00
Knut Sveidqvist
512ba8e733 Merge pull request #1077 from mermaid-js/bug/1076_remove_jest_packages
Bug/1076 Remove jest packages
2019-11-20 19:42:55 +01:00
Knut Sveidqvist
9a87ff684d Removed logging 2019-11-20 19:33:42 +01:00
Knut Sveidqvist
f79fc21bfc Merge branch 'develop' into bug/1078_handling_of_arrowMarkerAbsolute 2019-11-20 19:22:10 +01:00
Knut Sveidqvist
ffddd58b6b Merge branch 'develop' of github.com:knsv/mermaid into develop 2019-11-20 19:21:34 +01:00
Knut Sveidqvist
087e5eaa32 #1055 Fix for tests 2019-11-20 19:21:19 +01:00
Knut Sveidqvist
cbd27831df #1078 Lint fixes 2019-11-20 19:14:32 +01:00
Knut Sveidqvist
f6028b63b6 #1078 Using the configuration of the arrowMarkerAbsolute 2019-11-20 19:06:46 +01:00
Justin Greywolf
a60e01db97 Corrected typo in test 2019-11-19 13:02:08 -08:00
Justin Greywolf
68c2ea38c9 Bug1061-CannotMarkMembersAsProtectedInClassDiagram
Using # to indicate protected status of a member or method causing parser error when not used inside class declaration brackets {}.  Removed '#' from `LABEL` regex
2019-11-19 12:49:59 -08:00
Justin Greywolf
3469cfca2f Merge pull request #2 from mermaid-js/develop
Develop
2019-11-19 12:49:39 -08:00
Christian Klemm
afd189d24c removed packages 2019-11-19 21:02:56 +01:00
Knut Sveidqvist
06cb09c267 Merge pull request #1049 from mermaid-js/feature/1048_build_workflows
Feature/1048 Build workflows
2019-11-19 19:45:27 +01:00
Nacho
e461b57a48 Merge pull request #1075 from jbednar/master
Fixed typos
2019-11-19 08:33:22 -05:00
James A. Bednar
eca9d49575 Fixed typos 2019-11-18 09:32:39 -06:00
Nacho
15a37a5062 Merge pull request #1070 from GDFaber/develop
Bug/1062 Parallelogram shaped nodes are not in documentation
2019-11-18 08:41:24 -05:00
Christian Klemm
3f8f9eb92c remove debugging 2019-11-17 22:20:53 +01:00
Christian Klemm
33de2bda9e cypress cache folder fix 2019-11-17 22:13:02 +01:00
Christian Klemm
94d913fbab debug 2019-11-17 22:04:50 +01:00
Christian Klemm
beb1fcc176 debug 2019-11-17 21:58:53 +01:00
Christian Klemm
1e1a6e3a2d debug 2019-11-17 21:54:15 +01:00
Christian Klemm
6e7c21e439 debug 2019-11-17 21:47:05 +01:00
Christian Klemm
cfe9aaf639 adjusts 2019-11-17 21:41:55 +01:00
Christian Klemm
69e701befb adjusts 2019-11-17 21:27:30 +01:00
Christian Klemm
5174a085b7 test path pattern adjust 2019-11-17 21:21:25 +01:00
Christian Klemm
15fab69eca cache adjusts 2019-11-17 21:03:08 +01:00
Christian Klemm
20b103a0fb cache adjusts 2019-11-17 21:00:55 +01:00
Christian Klemm
8ebe7ee81a cache adjusts 2019-11-17 20:57:55 +01:00
Marc Faber
1d747f664b #1062 added parallelogram nodes to documentation 2019-11-17 17:37:30 +01:00
GDFaber
dbf5988c28 Merge pull request #2 from mermaid-js/develop
sync fork
2019-11-17 17:14:49 +01:00
Christian Klemm
31ab0e4b7d Clear cache 2019-11-12 22:15:49 +01:00
Christian Klemm
35ea7083bb fix cypress cache 2019-11-12 22:12:53 +01:00
Christian Klemm
bf90e8bf44 switched caching method 2019-11-12 22:10:16 +01:00
Christian Klemm
b1305644f4 fixed cypress cache folder 2019-11-12 22:04:47 +01:00
Christian Klemm
34707a057b temp delete cache 2019-11-12 21:58:05 +01:00
Christian Klemm
f5e90252f1 force reinstalling packages 2019-11-12 21:52:50 +01:00
Christian Klemm
e75acf69aa Adjusted cache location 2019-11-12 21:43:11 +01:00
Christian Klemm
3ad3fc2622 Cache adjusts 2019-11-12 21:24:35 +01:00
Christian Klemm
a59468d6c1 Caching adjusts 2019-11-12 21:20:05 +01:00
Christian Klemm
86e63b1614 Add caching 2019-11-12 21:14:42 +01:00
Knut Sveidqvist
3f8f9f6711 #1055 Better selectors 2019-11-08 20:15:48 +01:00
Knut Sveidqvist
d01f494277 Merge branch 'master' into develop 2019-11-08 19:32:54 +01:00
Knut Sveidqvist
4db525c6a9 #1050 Merge of PR 2019-11-08 11:42:26 +01:00
Erik Ellingsen
8b5f8b0cb4 grammar 2019-11-08 10:36:41 +01:00
Erik Ellingsen
d0c9b5e98f grammar 2019-11-08 10:35:38 +01:00
Knut Sveidqvist
e313625ccb Fixing the conflict 2019-11-08 08:54:48 +01:00
erelling
7dead548f3 Update n00b-gettingStarted.md 2019-11-08 01:59:44 +01:00
erelling
8db46ff762 Update n00b-overview.md 2019-11-08 01:57:18 +01:00
erelling
93f54a997a Update n00b-gettingStarted.md 2019-11-08 01:53:58 +01:00
erelling
1353491952 Update n00b-gettingStarted.md 2019-11-08 01:47:34 +01:00
erelling
00802ffe7a Update n00b-gettingStarted.md 2019-11-08 01:45:29 +01:00
erelling
78e556aaf7 Update n00b-gettingStarted.md 2019-11-08 01:44:12 +01:00
erelling
e34988d65a Update n00b-gettingStarted.md 2019-11-08 01:32:09 +01:00
erelling
07f5c7c89c Update n00b-gettingStarted.md 2019-11-08 01:31:21 +01:00
erelling
7319d8941a Update n00b-gettingStarted.md 2019-11-08 01:25:41 +01:00
erelling
3d7933135b Update n00b-gettingStarted.md 2019-11-08 01:23:33 +01:00
erelling
a778472461 Update n00b-gettingStarted.md 2019-11-08 01:21:50 +01:00
erelling
cbe2a7446d Update n00b-gettingStarted.md 2019-11-08 01:17:21 +01:00
erelling
8251dc5cd1 Update n00b-gettingStarted.md 2019-11-08 01:16:16 +01:00
erelling
5a4103a248 Update n00b-gettingStarted.md 2019-11-08 01:15:41 +01:00
erelling
d7996f5c1a Update n00b-gettingStarted.md 2019-11-08 01:14:38 +01:00
erelling
db4229f033 Update n00b-gettingStarted.md 2019-11-08 01:13:14 +01:00
erelling
e103664963 Update n00b-gettingStarted.md 2019-11-08 01:12:14 +01:00
erelling
fbf3936ddc Update n00b-overview.md 2019-11-08 01:11:07 +01:00
erelling
62d03f1976 Update n00b-overview.md 2019-11-08 01:10:24 +01:00
erelling
f3ea159c6b Update n00b-overview.md 2019-11-08 01:08:14 +01:00
erelling
3c99294a3a Update n00b-overview.md 2019-11-08 01:06:57 +01:00
erelling
7a2a8cffbb Update n00b-overview.md 2019-11-08 01:06:20 +01:00
erelling
6d90f87b2f Update n00b-overview.md 2019-11-08 01:04:21 +01:00
erelling
f506d24a82 Update n00b-overview.md 2019-11-08 01:01:37 +01:00
Erik Ellingsen
ddb0d23ca7 grammar 2019-11-08 00:04:53 +01:00
Erik Ellingsen
763be9bb95 better instruction 2019-11-07 23:52:47 +01:00
Erik Ellingsen
77109144e7 grammar 2019-11-07 23:47:34 +01:00
Erik Ellingsen
840e7bd985 clarification 2019-11-07 23:47:08 +01:00
Erik Ellingsen
a6c12f4b25 clarification 2019-11-07 23:46:30 +01:00
Erik Ellingsen
e8e9a4d07b simplification 2019-11-07 23:45:23 +01:00
Erik Ellingsen
ba00182ce4 Clarification 2019-11-07 23:44:47 +01:00
Erik Ellingsen
2ad78ee3b8 grammar 2019-11-07 23:42:56 +01:00
Erik Ellingsen
4995d59499 Knuts comments 2019-11-07 23:42:07 +01:00
Erik Ellingsen
d58ef7aa36 Removed redundant heading 2019-11-07 23:40:13 +01:00
Erik Ellingsen
dc59632fb3 Polishing 2019-11-07 23:37:46 +01:00
Erik Ellingsen
1542e15a1b Introduction and getting started howtos 2019-11-07 23:15:53 +01:00
Ashish Jain
5b5be40dd5 Fixing the binding function error 2019-11-07 22:09:34 +01:00
Knut Sveidqvist
1ecf0f4c23 Updated version 2019-11-07 21:16:43 +01:00
Knut Sveidqvist
fa7d1ac554 #1023 Fix for interaction tests 2019-11-07 19:42:09 +01:00
Knut Sveidqvist
48ce7a9b78 #1023 Fix for tests 2019-11-07 19:19:44 +01:00
Knut Sveidqvist
09bf54f9af #1038 Updated prefix for the internal dom id 2019-11-07 19:14:06 +01:00
Erik Ellingsen
43b9bcdb0b version update 2019-11-07 18:39:57 +01:00
knsv
a3017b8456 Merge branch 'release/8.4.1' 2019-11-06 10:52:10 -08:00
MATSUDA Takashi
aac915b285 #1044 fix: Multiple class diagrams are not rendered correctly 2019-11-05 18:00:52 +09:00
MATSUDA Takashi
7208f045c1 add test for multiple class diagram 2019-11-05 17:54:52 +09:00
MATSUDA Takashi
f7a3c42da1 e2e support multiple diagram 2019-11-05 17:54:52 +09:00
Christian Klemm
4d1c53eb1e added percy token 2019-11-03 19:40:15 +01:00
Christian Klemm
7bcc9b19ac fixed vars 2019-11-03 18:30:01 +01:00
Christian Klemm
7cfc729679 added coveralls vars 2019-11-03 18:28:27 +01:00
Christian Klemm
1f8480f0af Added npm badge (#1047) 2019-11-03 16:18:43 +01:00
Christian Klemm
ec3b68ad28 Added build workflow 2019-11-03 15:20:10 +01:00
Nacho
3674e27e0f Reworked readme (#1045) 2019-11-01 13:38:00 -04:00
Knut Sveidqvist
e4486420ce Update some path changes after repo move 2019-10-30 20:21:35 +01:00
Knut Sveidqvist
fe64cc697b Updated version 2019-10-30 20:01:54 +01:00
Knut Sveidqvist
97177dffd6 Updated coveralls badge 2019-10-30 19:54:47 +01:00
Knut Sveidqvist
061a02dddc Merge branch 'develop' of github.com:knsv/mermaid into develop 2019-10-30 19:48:43 +01:00
Knut Sveidqvist
1f72c3e720 Updating the repo path after migration to mermaid-js 2019-10-30 19:48:37 +01:00
Knut Sveidqvist
8270469652 Update README.md 2019-10-30 19:44:53 +01:00
Knut Sveidqvist
5e6590a0f7 Fix of travis badge for new org 2019-10-30 19:40:02 +01:00
Knut Sveidqvist
06dfd13927 Merge pull request #1041 from mermaid-js/maintainence_pie
Maintainance pie
2019-10-30 19:34:19 +01:00
ashishjain0512
486cc92f2e Merge pull request #1039 from lf-novelt/master
Support for underscore in classDiagrams class names
2019-10-30 19:01:11 +01:00
Ashish Jain
e8d649b152 Updated documentation for Pie Chart 2019-10-30 18:32:07 +01:00
Ashish Jain
e96bd14d21 Updated Examples for Pie Chart 2019-10-30 18:30:14 +01:00
Ashish Jain
e4a2d2a290 Updated Jest test cases for Pie diagram 2019-10-30 18:29:26 +01:00
Louis Frament
d8d5d0fa61 update classDiagram documentation:
fix typos and describe naming convention
2019-10-29 17:50:19 +01:00
Louis Frament
e010a03dd5 package-lock version update 2019-10-29 17:39:39 +01:00
Louis Frament
427aea73e7 test pass with underscore in a class name 2019-10-29 17:39:15 +01:00
Louis Frament
c4436b7a1e ALPHA pattern now include underscore 2019-10-29 17:20:25 +01:00
Knut Sveidqvist
d098051047 Merge pull request #1035 from knsv/bug/1033_state_diagram_new_lines_in_notes
Bug/1033 state diagram new lines in notes
2019-10-28 06:56:33 +01:00
Knut Sveidqvist
034a7c424d #1033 Better handling of multiline notes 2019-10-27 17:16:29 +01:00
Knut Sveidqvist
b113436055 #1033 Fix for diagram bounds and viewbox 2019-10-27 16:58:32 +01:00
Knut Sveidqvist
e550d974da Merge pull request #1032 from knsv/bug/1031_stricter_code_checks
Fix for Bug/1031 stricter code checks
2019-10-27 15:33:48 +01:00
Knut Sveidqvist
bc34ef4b66 Merge pull request #1028 from knsv/Issue-1027_Pie-Chart-Legends
#1027  Updated Pie chart to render percentages and labels separately …
2019-10-27 15:26:54 +01:00
Knut Sveidqvist
a5cc1e804b #1031 Adding stricter code checks 2019-10-27 15:24:56 +01:00
Knut Sveidqvist
aac51979cc Merge branch 'develop' of github.com:knsv/mermaid into develop 2019-10-24 19:47:14 +02:00
Knut Sveidqvist
8f8638fb7c #1029 Linting fixes 2019-10-24 19:46:42 +02:00
Knut Sveidqvist
d1c74070ab #1029 Fix for issues after switching to master branch of dagre-d3 2019-10-24 19:33:13 +02:00
Nacho
ee01d09af5 Merge pull request #1008
Added e2e tests to prepublish task
2019-10-24 08:52:05 -04:00
Nacho
caaf4e3e40 Merge pull request #1010
Delete package-lock.json
2019-10-24 08:49:41 -04:00
Nacho
34037e58e5 Added package-lock to gitignore 2019-10-24 08:48:55 -04:00
Knut Sveidqvist
66152b42ae #1023 New line in transition labels, basic support 2019-10-23 21:16:59 +02:00
Ashish Jain
76c8737485 #1027 Updated Pie chart to render percentages and labels separately as legends 2019-10-23 21:00:33 +02:00
Knut Sveidqvist
4a1eb55127 #1022 Fix for long names for state diagrams 2019-10-23 19:22:36 +02:00
Knut Sveidqvist
c87637c6f4 #1024 Removal of leftover loggings 2019-10-23 18:47:41 +02:00
Knut Sveidqvist
364b81a1b9 Merge pull request #1018 from pravi/switch-to-dagre-d3
Use dagre-d3 master branch (for d3v5)
2019-10-23 18:38:45 +02:00
Nacho
d4c8cf66ef Merge pull request #1025
Spelling, markdown lint cleanup
2019-10-23 09:21:30 -04:00
Doug Hill
08762bc066 Spelling, markdown lint cleanup
Fixed spelling errors. Applied some markdown lint standards.
2019-10-22 20:10:35 -10:00
Nacho
0add11a257 Merge pull request #1021 from knsv/master
Keeping development branch up to date
2019-10-21 13:45:47 -04:00
Pirate Praveen
ca5e60b38b Use dagre-d3 master branch (for d3v5) 2019-10-21 22:46:20 +05:30
Knut Sveidqvist
0e7876536d Highlighting state diagrams and class diagrams in the readme 2019-10-21 22:46:19 +05:30
Nacho
be61a03a98 Removed gitter and added slack badge 2019-10-21 22:46:19 +05:30
abeaton
50c707ba51 Fix typos in CONTRIBUTING.md 2019-10-21 22:46:18 +05:30
Sakis bal
2a2fd7a8b1 Small gramatical mistake 2019-10-21 22:46:18 +05:30
Kolja Markwardt
ad126c838e reference the CONTRIBUTING.md in README 2019-10-21 22:46:18 +05:30
Knut Sveidqvist
cafc18a78f Highlighting state diagrams and class diagrams in the readme 2019-10-21 12:38:01 -04:00
Nacho
ffca12a8b0 Removed gitter and added slack badge 2019-10-21 12:38:01 -04:00
abeaton
137f57ad9c Fix typos in CONTRIBUTING.md 2019-10-21 12:38:01 -04:00
Sakis bal
153b3322a6 Small gramatical mistake 2019-10-21 12:38:01 -04:00
Kolja Markwardt
575535bdbd reference the CONTRIBUTING.md in README 2019-10-21 12:38:01 -04:00
Knut Sveidqvist
61a3802494 Highlighting state diagrams and class diagrams in the readme 2019-10-19 17:45:56 +02:00
knsv
0157f665a3 Merge branch 'release/8.4.0' 2019-10-19 07:59:04 -07:00
Knut Sveidqvist
d366605d91 Merge branch 'release/8.4.0' of github.com:knsv/mermaid into release/8.4.0 2019-10-19 16:19:56 +02:00
Knut Sveidqvist
fd5bcad5d6 Fixes after verification, version upgrade 2019-10-19 14:44:54 +02:00
Knut Sveidqvist
7adb80b35b Fixes after verification, font-family set to label of transitions in statediagram 2019-10-19 14:43:26 +02:00
Knut Sveidqvist
dc88e7a2c2 Fixes after verification, documentation of stateDiagram 2019-10-19 14:42:34 +02:00
Nacho
dd68a7151f Removed gitter and added slack badge 2019-10-18 09:57:51 -04:00
Nacho
bf2497ea3e Merge pull request #1014
Fix typos in CONTRIBUTING.md
2019-10-18 09:46:36 -04:00
abeaton
202c889246 Fix typos in CONTRIBUTING.md 2019-10-18 09:41:51 -04:00
Knut Sveidqvist
ec0e93bd6f Merge pull request #1012 from knsv/develop
Moving resolution for #1001 to the release branch for proper prerelease publish
2019-10-17 19:43:31 +02:00
Knut Sveidqvist
def9bef988 Merge pull request #1002 from knsv/feature/1001_alpha_releases_for_release_branches
Feature/1001 preview releases for release branches
2019-10-17 19:31:56 +02:00
Christian Klemm
c3db9032f3 Delete package-lock.json 2019-10-16 23:53:19 +02:00
Christian Klemm
016dc17d94 clean up branch 2019-10-16 22:16:25 +02:00
Christian Klemm
8e1672568a added preview builds to readme 2019-10-16 22:09:33 +02:00
Christian Klemm
42b8ac1235 Added e2e tests to prepublish task 2019-10-16 22:00:57 +02:00
Christian Klemm
2348f9d785 finished ci 2019-10-16 21:57:35 +02:00
Christian Klemm
04f86ef130 testing 2019-10-16 21:50:06 +02:00
Nacho
f436086aae Merge pull request #1004
Small gramatical mistake
2019-10-16 08:32:08 -04:00
Sakis bal
1b813d371d Small gramatical mistake 2019-10-16 10:08:24 +03:00
Knut Sveidqvist
8f49d96c3a Merge pull request #1000 from edekadigital/doc-contributing
reference the CONTRIBUTING.md in README
2019-10-16 08:48:02 +02:00
Christian Klemm
49f5b8d150 testing 2019-10-16 03:42:37 +02:00
Christian Klemm
f0bbb063dd testing 2019-10-16 03:34:22 +02:00
Christian Klemm
d95a9469ac testing 2019-10-16 03:23:22 +02:00
Christian Klemm
6e088d17fd testing 2019-10-16 03:15:33 +02:00
Christian Klemm
42aeafc907 testing 2019-10-16 02:54:11 +02:00
Christian Klemm
3073b6559c testing 2019-10-16 02:44:22 +02:00
Christian Klemm
af57da8e6b testing 2019-10-16 02:40:09 +02:00
Christian Klemm
56e9abfc92 testing 2019-10-15 23:28:16 +02:00
Christian Klemm
61b4c6d3ac testing 2019-10-15 23:24:13 +02:00
Christian Klemm
7e6b43236a testing 2019-10-15 23:19:05 +02:00
Christian Klemm
6a33ac05a3 workflow adjusts 2019-10-15 23:18:26 +02:00
Christian Klemm
5f1246280c Added alpha release build ci 2019-10-15 22:43:36 +02:00
Kolja Markwardt
ecef0c78d2 reference the CONTRIBUTING.md in README 2019-10-15 22:22:01 +02:00
Knut Sveidqvist
0ce42e6185 Merge pull request #994 from edekadigital/bug-478
#478 API crashes on 2nd render() call
2019-10-15 19:40:29 +02:00
Knut Sveidqvist
3709d9d5c8 Merge pull request #996 from edekadigital/bug-783
#783 Hard to customize font-size for gantt charts
2019-10-15 19:38:20 +02:00
Knut Sveidqvist
e65f916ba5 Merge pull request #992 from edekadigital/enhancement-958
#958 Cannot center-justify text in nodes
2019-10-15 18:54:28 +02:00
Knut Sveidqvist
f9c8ce1ac7 Merge branch 'master' into develop 2019-10-15 18:50:11 +02:00
Knut Sveidqvist
b881e5c69c Merge pull request #991 from christopherkade/feature/divided-flow-tests
#906 Divided flow unit tests
2019-10-15 18:43:39 +02:00
Knut Sveidqvist
51a89c80aa Merge pull request #985 from knsv/bug/984_bracket_syntax_properties_reversed_order
bug/984 Class diagram: properties with bracket syntax are reversed in order
2019-10-15 18:39:20 +02:00
Knut Sveidqvist
97a5f408d2 Merge pull request #978 from aledileo/bugfix/node12
Updates node-sass to 4.12 and regenerates lockfiles
2019-10-15 18:38:47 +02:00
Knut Sveidqvist
2f00d7d145 Merge branch 'master' of github.com:knsv/mermaid 2019-10-15 18:36:55 +02:00
Kolja Markwardt
d743838716 #478 API crashes on 2nd render() call
- add e2e test for (re)rendering by api
2019-10-15 17:36:02 +02:00
Kolja Markwardt
069b4854f8 #478 API crashes on 2nd render() call
- remove element from DOM before rendering to avoid conflicts in case of rerendering
2019-10-15 17:36:02 +02:00
Kolja Markwardt
f089c45115 #958 Cannot center-justify text in nodes
- changed fit() to it() to reactivate test
2019-10-15 16:02:11 +02:00
Kolja Markwardt
90fe015d68 #958 Cannot center-justify text in nodes
- assign text-align style to text node to allow aligning of node text
2019-10-15 16:02:11 +02:00
Kolja Markwardt
96c86fd4b2 #783 Hard to customize font-size for gantt charts
- deselect theme style if font-size is set on the taskText element (e.g. via gantt-config)
2019-10-15 15:59:36 +02:00
Nacho
d921c36cd4 Merge pull request #998
Added missing code snippets for trapezoid nodes in flow chart documentation
2019-10-15 09:59:24 -04:00
Paweł Gajda
4a552069cf Added missing code snippets for trapezoid nodes in flow chart 2019-10-15 15:45:04 +02:00
Nacho
74c171b6d1 Merge pull request #997 from knsv/master 2019-10-15 09:17:46 -04:00
Ashish Jain
1ae1313edd #993 Added mermaid documentation for class diagram-minor fixes 2019-10-15 00:32:21 +02:00
Ashish Jain
5949d01821 #993 Added mermaid documentation for class diagram-minor fixes 2019-10-15 00:05:49 +02:00
Ashish Jain
3cdb0ae4c8 #993 Added mermaid documentation for class diagram 2019-10-14 22:59:26 +02:00
christopherkade
89b6ccf47d #906 Divided flow unit tests 2019-10-14 16:17:43 +02:00
Knut Sveidqvist
047ce2949a #989 Added font styling classes to diagrams lacking then 2019-10-13 19:16:35 +02:00
Knut Sveidqvist
53bdfee057 #989 Font configuration 2019-10-12 16:53:21 +02:00
Knut Sveidqvist
2da55993e0 Test of font-settings for correct image snapshots 2019-10-12 09:16:33 +02:00
Knut Sveidqvist
a258eda035 #945 Setting up stylesheet, classes and colors 2019-10-11 18:12:24 +02:00
Knut Sveidqvist
7c125cf9d6 #945 Moving hardcoded sizes etc to config 2019-10-11 15:39:50 +02:00
Nacho
2af76230f7 Merge pull request #987
Grammar/spelling changes to the "Usage" docs
2019-10-11 09:21:39 -04:00
Knut Sveidqvist
bdb530f831 Adding more info about documentation and moving the contributing file to its proper place 2019-10-11 08:17:47 +02:00
Knut Sveidqvist
7a7c09493c Adding more info about documentation and moving the contributing file to its proper place 2019-10-11 08:17:39 +02:00
Knut Sveidqvist
f3d588eca5 Adding contributing information 2019-10-11 08:10:54 +02:00
Knut Sveidqvist
031c0b7b21 #945 Increasing size, handling forks and joins in multiple directions 2019-10-10 20:55:27 +02:00
Knut Sveidqvist
ce017ecd40 Merge branch 'master' of github.com:knsv/mermaid 2019-10-10 17:57:39 +02:00
Knut Sveidqvist
85e58faa78 #945 White background and forks in composite mode 2019-10-10 17:57:29 +02:00
Steven Engler
808ed11e91 Grammar/spelling changes to the "Usage" docs 2019-10-09 15:43:54 -04:00
Ashish Jain
f8f52c4587 Fix for viewport in classDiagram and stateDiagram renndering 2019-10-09 21:15:17 +02:00
Knut Sveidqvist
54e6e2f66e #945 Some bug fixes and draft docs 2019-10-09 20:05:24 +02:00
Knut Sveidqvist
fe1e09f06b Merge branch 'feature/945_state_diagrams' 2019-10-09 18:16:32 +02:00
Knut Sveidqvist
cd646c0e42 Updated yarn.lockl 2019-10-09 18:16:23 +02:00
Knut Sveidqvist
f180510fbb Merge pull request #983 from knsv/feature/Issue-949_Add_cardinality_support
Feature/issue 949 add cardinality support
2019-10-08 23:06:17 +02:00
Christian Klemm
687e74de9b fixed members order 2019-10-08 22:59:59 +02:00
Knut Sveidqvist
65f91dd051 Merge branch 'master' of github.com:knsv/mermaid 2019-10-08 22:56:56 +02:00
Knut Sveidqvist
a8a4616cab #916 Docs for chaining of links 2019-10-08 22:56:50 +02:00
Ashish Jain
aaac86fd9d #949 Added cypress test case for class diagram cardinality support 2019-10-08 21:46:03 +02:00
Ashish Jain
35ddf9235f #949 Added rendering of cardinality for class diagrams 2019-10-08 21:43:58 +02:00
Knut Sveidqvist
554189908d Merge pull request #970 from mearns/issue-530-hexagon
Add hex shape for flow charts
2019-10-08 21:43:10 +02:00
Ashish Jain
54dbbd154c #949 Added utility function for calculating cardinality position 2019-10-08 21:42:49 +02:00
Knut Sveidqvist
a9224015e0 Merge pull request #964 from volkanunsal/master
Add useMaxWidth to flowRenderer
2019-10-08 21:33:50 +02:00
Eduardas Michelsonas
1cba50266e #755 Linting fixes + merge 2019-10-08 14:25:29 +02:00
edumicse
341456cc25 Merge pull request #981 from knsv/feature/755_handling_br_in_sequence_diagram
Feature/755 handling br in sequence diagram
2019-10-08 14:19:36 +02:00
edumicse
ae7852d9b9 Merge branch 'master' into feature/755_handling_br_in_sequence_diagram 2019-10-08 14:18:55 +02:00
ashishjain0512
4ce523f33b Merge pull request #973 from chris579/feature/963_class_annotations
Class diagram: annotations support
2019-10-08 12:56:49 +02:00
Ashish Jain
6b4a8325ae Merge branch 'feature/963_class_annotations' of https://github.com/chris579/mermaid into develop 2019-10-08 12:49:52 +02:00
Knut Sveidqvist
6d3044bddd Merge pull request #974 from vikyaiyer/Issue-893
added css path to styling in documentation
2019-10-07 10:13:15 +02:00
Alejandro Di Leo
0678f61ce9 Updates node-sass to 4.12 and regenerates lockfiles 2019-10-06 13:15:36 -03:00
Knut Sveidqvist
ebede9b910 #945 Log removal 2019-10-06 16:06:15 +02:00
Knut Sveidqvist
b12791d3e0 #945 Divider lines for concurrency, full width when in a composit state 2019-10-06 15:53:34 +02:00
Knut Sveidqvist
ce0b0fa0c8 #945 Divider lines for concurrency 2019-10-06 15:44:31 +02:00
Knut Sveidqvist
dce09586cd #945 Support for forks and joins 2019-10-06 14:11:17 +02:00
Knut Sveidqvist
4f1186a610 #945 Support for notes, better width and handling of +/- 2019-10-06 11:35:46 +02:00
Knut Sveidqvist
1cb52a602a #945 Support for notes 2019-10-06 10:52:37 +02:00
Knut Sveidqvist
c482083d82 Update README.md 2019-10-06 09:03:56 +02:00
Knut Sveidqvist
d9dda88164 Replaced info about linting 2019-10-06 09:02:07 +02:00
Brian Mearns
c9fe948b90 #530 Finished basic unit tests for flow shapes 2019-10-05 13:48:20 -04:00
Brian Mearns
cc731fe3c4 #530 Pull shape functions out to shorten functions 2019-10-05 09:38:03 -04:00
Christian Klemm
40b7262c19 exchanged class readme image 2019-10-05 12:46:28 +02:00
Christian Klemm
9da61ad562 added some documentation 2019-10-05 12:38:29 +02:00
Knut Sveidqvist
3b731282e3 #945Renabling support for descriptions 2019-10-05 12:15:14 +02:00
Knut Sveidqvist
cfc14ade2a #945 Some more cleanup focusing on stateDb 2019-10-05 10:02:58 +02:00
Knut Sveidqvist
d4306e61c2 #945 Some cleanup 2019-10-05 09:02:20 +02:00
Vignesh Aiyer
3afa6e2350 Update sequenceDiagram.md 2019-10-05 11:15:12 +05:30
Vignesh
8bbb0448dc added css path to styling in documentation 2019-10-05 10:52:23 +05:30
Brian Mearns
dcbcbf40a0 #530 Started adding some tests around how flowchart shapes are rendered in SVG 2019-10-04 22:38:27 -04:00
Brian Mearns
9a0a5ca804 #530 Add some unit tests for flowRenderer.addVertices 2019-10-04 22:03:20 -04:00
Brian Mearns
20b2866631 #530 Further encapsulation of common code 2019-10-04 21:21:00 -04:00
Christian Klemm
92eec664b1 test fix 2019-10-05 00:57:58 +02:00
Christian Klemm
723fe84383 added diagram escaping for e2e tests 2019-10-05 00:39:07 +02:00
Christian Klemm
3ca9347361 test fix 2019-10-05 00:05:47 +02:00
Christian Klemm
704d36a7eb adjusted integration test 2019-10-04 23:58:06 +02:00
Christian Klemm
612df99c34 added tests + alt syntax 2019-10-04 23:49:58 +02:00
Christian Klemm
912e850db4 added grammar 2019-10-04 21:49:02 +02:00
Christian Klemm
96735dd543 Added rendering for annotations 2019-10-04 21:09:49 +02:00
Knut Sveidqvist
65cbfbdb40 #945 Tweaking 2019-10-03 19:54:07 +02:00
Knut Sveidqvist
7865fd4f02 #945 Rendering of composite state in a box 2019-10-03 19:08:15 +02:00
Nacho
801f001098 Merge pull request #972
Removed reference to mermaid.min.css in usage docs #797
2019-10-03 10:18:25 -04:00
Rick Ulrich
7e92257c3c Removed reference to mermaid.min.css in usage docs #797 2019-10-03 09:13:12 -05:00
Nacho
7d4777a8bf Merge pull request #971
Revert "Removed reference to mermaid.min.css in usage docs #797"
2019-10-03 09:35:44 -04:00
Nacho
e7428afb3e Revert "Removed reference to mermaid.min.css in usage docs #797" 2019-10-03 09:35:22 -04:00
Nacho
51b7c90dae Merge pull request #969
Removed reference to mermaid.min.css in usage docs #797
2019-10-03 09:31:59 -04:00
Brian Mearns
c9f84ccae5 #530 Testing Coverage 2019-10-03 06:41:36 -04:00
Brian Mearns
01fd54dd6f #530 Encapsulate some redudant flow shape code 2019-10-02 22:51:12 -04:00
Brian Mearns
e1446ce38a #530 Add unit test for hex nodes 2019-10-02 22:44:56 -04:00
Brian Mearns
1920e9f758 #530 Add hexagon to flow docs 2019-10-02 22:38:41 -04:00
Brian Mearns
550f91aa68 #530 Better shaping of hexagon
The "corner" triangles are a fixed ratio to the height,
so the triangles will always be mathemtically similar.
2019-10-02 22:36:02 -04:00
Brian Mearns
57921e3f52 #530 Add Hex example to index.html 2019-10-02 22:31:41 -04:00
Brian Mearns
b300a4decb #530 Fit hexagon to width and height
The hexagon shape in flow chart now fits
the width and height independently, so it can better fit
large content without taking up too much space.
2019-10-02 22:23:30 -04:00
Brian Mearns
51e902cd36 Added the hex shape to the renderer, and support for it in the flow parser.
Need to work on properly sizing it.
2019-10-02 22:11:02 -04:00
Harrison Ulrich
ea359c0037 Removed reference to mermaid.min.css in usage docs #797 2019-10-02 15:04:58 -05:00
Knut Sveidqvist
f9f8785aef #945 Recursive object from parsing and stateDb 2019-10-02 19:32:13 +02:00
Knut Sveidqvist
0abeaa4dc2 Merge branch 'feature/945_state_diagrams' into develop 2019-10-02 19:17:38 +02:00
Nacho
18f35ac213 Merge pull request #968
Fixes #848
2019-10-02 09:54:34 -04:00
Brian Mearns
9ca077b3dc Add some test coverage for getBranchesAsObjArray 2019-10-01 22:29:07 -04:00
Brian Mearns
351dd3728e #848 - Add Unit Test 2019-10-01 22:03:43 -04:00
Brian Mearns
054901cb79 Fixes #848 - Use more secure PRNG
Math.random() is not cryptogaphically secure, but the crypto-random-string
package provides what is needed with a cryptographically secure pseudo-random
number generator.
2019-10-01 21:29:42 -04:00
Nacho
4f29f7c3a7 Automatically lock/unlock issues on close/reopen 2019-10-01 11:02:26 -04:00
Nacho
f149f090a6 Merge pull request #965
Corrected docs
2019-10-01 08:51:24 -04:00
Nacho
d113364f82 Merge pull request #966
Optimize images
2019-10-01 08:38:02 -04:00
Arnaud ZHENG
d499cce371 remove old files 2019-10-01 10:49:55 +02:00
Arnaud ZHENG
5d7dbd701f remove old files 2019-10-01 10:48:37 +02:00
Arnaud ZHENG
8345134d2a Merge branch 'master' of github.com:knsv/mermaid 2019-10-01 10:47:03 +02:00
Gianfrancø Palumbo
55f9cba0f9 docs: small improvement to flowchart.md 2019-09-30 21:59:10 +03:00
Knut Sveidqvist
94afcfb6f9 #945 Rendering of state descriptions 2019-09-29 15:50:43 +02:00
Volkan Unsal
682faa4f9d Add useMaxWidth to flowRenderer 2019-09-29 09:31:41 -04:00
Knut Sveidqvist
3cffd1e3ed #945 Rendering of labels and new label positioning algorithm 2019-09-28 13:31:10 +02:00
Nacho
0730f73f73 Merge pull request #960
Update gantt.md
2019-09-27 13:21:28 -04:00
lilisha100
dffe20b76c Update gantt.md 2019-09-27 10:15:03 -07:00
lilisha100
e7161fcca6 Update gantt.md 2019-09-27 09:52:22 -07:00
lilisha100
3bf873b99f Update gantt.md 2019-09-27 09:27:53 -07:00
Nacho
f49bae6622 Merge pull request #957 from GDFaber/master
Flowchart parsing issue with CRLF #894
2019-09-27 09:12:19 -04:00
Marc Faber
095233e6cf Flowchart parsing issue with CRLF #894 2019-09-27 01:05:25 +02:00
Nacho
490d42fce1 Merge pull request #956
Created issue template for questions
2019-09-26 11:44:50 -04:00
Nacho
11d2db08fa Created issue template for questions 2019-09-26 11:42:33 -04:00
Knut Sveidqvist
13baa43081 #945 Rendering from diagram data 2019-09-25 21:29:32 +02:00
Knut Sveidqvist
fad76ad534 #945 Rendering of start & end node 2019-09-25 21:01:21 +02:00
Nacho
1c3ddcd120 Merge pull request #954
Create github/action for triage labelling
2019-09-25 11:18:09 -04:00
Nacho
2ccdeec550 Create github/action for triage labelling 2019-09-25 11:14:52 -04:00
Nacho
3164f99b3b Merge pull request #953
Reverted to stalebot instead of github actions/stale
2019-09-25 11:01:23 -04:00
Nacho
1bceae12dd Added config for stalebot 2019-09-25 10:53:08 -04:00
Nacho
b2c60135f5 Deleted github action for stale 2019-09-25 10:52:30 -04:00
Nacho
0dddf3c50c Merge pull request #952
Updated issue templates
2019-09-25 10:06:46 -04:00
Nacho
b4badf6e7f Update issue templates 2019-09-25 09:55:18 -04:00
Nacho
9c69afeddd Merge pull request #951
Corrected typo in mermaidAPI.md
2019-09-24 12:53:16 -04:00
Nacho
e8835429fd Merge branch 'master' into master 2019-09-24 12:47:46 -04:00
0xflotus
029a84159e Update mermaidAPI.md 2019-09-24 18:47:38 +02:00
Knut Sveidqvist
ba01e3778a Tets change to see if it triggers 2019-09-24 09:38:16 +02:00
Nacho
6cfd4e6422 Switching stalebot to github/action (#950)
* Added configuration for github action stale
* Deleted stalebot configuration
2019-09-23 11:29:02 -04:00
Nacho
bb372751f7 Reverted test settings 2019-09-23 10:30:23 -04:00
Nacho
3fdf2c7e32 Updated cron expresion for test 2019-09-23 10:22:19 -04:00
Nacho
9f4ca63603 Deleted stalebot configuration 2019-09-23 10:21:04 -04:00
Nacho
4bdf772130 Added stale pr/issue workflow for test 2019-09-23 10:20:02 -04:00
Nacho
6110640fc2 Merge pull request #940
Use https in githu urls
2019-09-23 09:44:20 -04:00
nothingismagick
6c243488fa revert to http 2019-09-23 12:06:22 +02:00
nothingismagick
4f218435e3 revert to http 2019-09-23 12:05:13 +02:00
nothingismagick
7ca13fd163 revert to http 2019-09-23 12:04:39 +02:00
knsv
2306534248 #945 Handling of dimples state definitions 2019-09-22 03:30:36 -07:00
knsv
2f0248e6d5 #945 Handling of note statements 2019-09-22 02:38:04 -07:00
knsv
3a8564de92 #945 Handling of fork statements 2019-09-21 23:19:03 -07:00
knsv
1aa8b9b804 #945 Handling recursive logn descriptions for states with quotes 2019-09-21 11:31:09 -07:00
knsv
921d5464a1 #945 Handling recursive logn descriptions for states with quotes 2019-09-21 09:12:02 -07:00
knsv
9993b90a20 #945 Handling recursive state statements 2019-09-21 08:54:18 -07:00
knsv
6f054519e7 #945 Handling simple state statements 2019-09-21 08:50:32 -07:00
knsv
51bf4a4c5c #945 Parsing happy case and scale/hide statements 2019-09-21 08:19:55 -07:00
knsv
046b83582d Local docs to use 8.3.1 2019-09-19 15:10:49 -07:00
knsv
be2e467583 Release 8.3.1. Reseting the flow parser between parsings 2019-09-19 15:00:21 -07:00
Knut Sveidqvist
b1d137770c Merge pull request #942 from knsv/bugfix_941
Bugfix 941
2019-09-19 23:19:32 +02:00
knsv
40c7cab1da Merge branch 'master' into HEAD 2019-09-19 13:59:03 -07:00
knsv
f39e120952 #941 Fix for issue with directions iin flowchart 2019-09-19 13:56:41 -07:00
Daniel Thompson-Yvetot
f30f607b0c feat(https): use https in SVGs 2019-09-19 20:53:42 +02:00
Nacho
e40e1da292 Merge pull request #939
Fix accidental paste and code style in readme
2019-09-19 09:00:58 -04:00
Philipp A
1783ef501d Fix accidental paste and code style in readme 2019-09-19 09:45:13 +02:00
knsv
b4ec22ecea Local docs to use 8.3.0 2019-09-18 22:49:33 -07:00
knsv
0200fef389 Release 8.3.0 2019-09-18 22:19:48 -07:00
knsv
d8397f146b #937 Handling direction keywords in node ids 2019-09-18 12:56:24 -07:00
Knut Sveidqvist
244be86207 E2e test of interaction in graphs 2019-09-18 19:42:19 +02:00
Knut Sveidqvist
c26135780d Adding build to travis steps 2019-09-18 19:01:58 +02:00
Knut Sveidqvist
4411a26002 Cleanup, removed old e2e in favour of cypress 2019-09-18 18:37:53 +02:00
Knut Sveidqvist
21622f575b Updating cypress tests 2019-09-18 18:25:06 +02:00
Knut Sveidqvist
23e6df04d4 Merge pull request #929 from knsv/dependabot/npm_and_yarn/eslint-utils-1.4.2
chore(deps): bump eslint-utils from 1.3.1 to 1.4.2
2019-09-18 18:08:09 +02:00
Knut Sveidqvist
bf403dfc62 Merge pull request #933 from Dunning-Kruger/features/close-stale-issues
Close stale issues
2019-09-18 18:06:57 +02:00
Knut Sveidqvist
c3f48b5a13 Merge pull request #936 from janverb/fix-configuration-defaults-htmllabels-value
Correctly document htmlLabels as true by default
2019-09-18 13:51:16 +02:00
Jan Verbeek
e192454f54 Correctly document htmlLabels as true by default
The "mermaidAPI configuration defaults" section in the documentation
listed `htmlLabels` as `false`, but the real default is `true`, as
seen in the code and elsewhere in the documentation.
2019-09-18 13:05:08 +02:00
Ignacio Orlandoni
a55573be94 Update stale.yml
Stalebot now closes inactive stale issues.
2019-09-13 14:15:49 -04:00
dependabot[bot]
0e548f63f9 chore(deps): bump eslint-utils from 1.3.1 to 1.4.2
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.2.
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](https://github.com/mysticatea/eslint-utils/compare/v1.3.1...v1.4.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-09-12 20:20:09 +00:00
Knut Sveidqvist
4d1a34661e Merge pull request #932 from knsv/i931_code_standard
I931 code standard
2019-09-12 22:18:46 +02:00
knsv
7e5802e799 #931 Last code standard fixes 2019-09-12 12:59:13 -07:00
knsv
0e8164d805 #931 Compliacne with code standard 2019-09-12 12:58:57 -07:00
knsv
f9b30bdb43 #931 Reformatting for compliacne with code standard 2019-09-12 12:58:32 -07:00
knsv
34de31195f #931 Aligning with code standard 2019-09-12 12:58:04 -07:00
knsv
cf05a8d8fa #931 Updating code to align witn new code standard 2019-09-12 12:57:36 -07:00
knsv
a2e3f3d900 #931 Reformatting code for gitGraph 2019-09-12 12:56:54 -07:00
knsv
0890ba0fdd #931 replacing linter 2019-09-12 12:56:20 -07:00
knsv
d2f082b2e2 #931 Replacing linter 2019-09-12 12:55:56 -07:00
knsv
e67b8c86d6 #931 Aligning code standard 2019-09-12 12:55:31 -07:00
knsv
e14922f15c #931 Aligning code standard 2019-09-12 12:55:20 -07:00
knsv
ad5669b523 #931 Aligning code standard 2019-09-12 12:55:10 -07:00
knsv
f2a6ba80b5 #931 Aligning code standard 2019-09-12 12:54:59 -07:00
knsv
b3dac15d57 Merge branch 'master' into i931_code_standard 2019-09-12 12:51:41 -07:00
Knut Sveidqvist
def4ca699a #931 added conf and libraries 2019-09-12 21:03:49 +02:00
knsv
f98fa82134 Adding percy badge 2019-09-11 13:57:53 -07:00
Knut Sveidqvist
ff44671ae5 Merge pull request #928 from knsv/feature/Issue-22_Pie-Chart-Feature
#22 Basic Pie Chart
2019-09-11 21:50:42 +02:00
Ashish Jain
398d66bda9 #22 Update SCSS for pie chart specific title class 2019-09-11 21:39:39 +02:00
Ashish Jain
eb9ac1bbe5 #22 Updated yarn.lock 2019-09-11 21:29:31 +02:00
Ashish Jain
42fc23cff2 #22 Basic Pie Chart 2019-09-11 21:20:28 +02:00
Knut Sveidqvist
78cae3dce7 Finding the missing cypress binary 2019-09-11 20:23:41 +02:00
Knut Sveidqvist
beed86ff37 Update for accessing missing binary 2019-09-11 20:20:15 +02:00
Knut Sveidqvist
ec7324e12e Restore documention written in autoigenerated file 2019-09-11 20:03:22 +02:00
Knut Sveidqvist
d097b673bb #927 enabling the e2e tests 2019-09-11 19:23:08 +02:00
Knut Sveidqvist
7eea957a3b #927 Upgrading node 2019-09-11 19:18:55 +02:00
Knut Sveidqvist
4dda6b8a81 #927 Updated yarn.lock 2019-09-11 19:16:15 +02:00
Knut Sveidqvist
5fd5a65283 #927 reverted changes 2019-09-11 19:04:30 +02:00
Knut Sveidqvist
ca0513396d Investigation of build issues 2019-09-11 18:59:44 +02:00
Knut Sveidqvist
9f87ab4941 #927 Adding support for cypress and Percy 2019-09-11 18:53:05 +02:00
knsv
e37f5a6eb2 #926 Applying the color styling on the label instead of the node 2019-09-08 02:56:06 -07:00
knsv
ece40cdc54 #926 E2e test for issue 2019-09-08 00:33:56 -07:00
knsv
65561b22c5 #926 Adding e2e tools for replicating issues 2019-09-08 00:33:38 -07:00
knsv
21aa8c5f15 #922 Fix for click binding on nodes with ids starting with a number 2019-09-03 11:31:47 -07:00
knsv
f4bafacc62 Release 8.2.6 2019-09-01 04:16:09 -07:00
knsv
2cb54293f8 Lint fixes 2019-09-01 02:18:00 -07:00
knsv
5610185050 #918 Removed som logging 2019-09-01 00:45:24 -07:00
knsv
699bd61045 #918 Fix for issue with nodes starting with a number in a subgraph 2019-09-01 00:44:48 -07:00
Knut Sveidqvist
27d0b934a1 Merge pull request #917 from knsv/dependabot/npm_and_yarn/mixin-deep-1.3.2
chore(deps): bump mixin-deep from 1.3.1 to 1.3.2
2019-08-29 17:16:43 +02:00
Knut Sveidqvist
0f1b704385 Merge pull request #912 from knsv/dependabot/npm_and_yarn/eslint-utils-1.4.2
chore(deps): bump eslint-utils from 1.3.1 to 1.4.2
2019-08-29 17:16:28 +02:00
Knut Sveidqvist
7d0c1d2594 Merge pull request #909 from davidpendraykalibrate/patch-1
Fix typos in README
2019-08-29 17:15:24 +02:00
dependabot[bot]
43cff9e1a3 chore(deps): bump mixin-deep from 1.3.1 to 1.3.2
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-29 02:30:07 +00:00
erelling
f5ddf869e4 Link and clarification 2019-08-28 22:01:19 +02:00
erelling
185db4c112 Update mermaidAPI.md 2019-08-28 21:57:10 +02:00
erelling
07e3815b74 Update mermaidAPI.md 2019-08-28 21:56:27 +02:00
erelling
187ddfd80c Clarification 2019-08-28 21:55:35 +02:00
erelling
d3f7923bc6 Formatting, defaults example 2019-08-28 21:50:44 +02:00
erelling
e52db94c1a Formatting 2019-08-28 21:26:38 +02:00
erelling
e50959c1fe Formatting 2019-08-28 21:14:07 +02:00
erelling
bab75625cb Configuration example 2 2019-08-28 21:13:38 +02:00
erelling
f0b039ad10 Security level, update for new syntax 2019-08-28 21:08:27 +02:00
erelling
5c8dc7ab07 Better formatting 2019-08-28 21:03:23 +02:00
erelling
de2b5390cb Syntax clarification and full example 2019-08-28 20:59:28 +02:00
Knut Sveidqvist
d89ceb2125 Merge branch 'master' of github.com:knsv/mermaid 2019-08-28 20:25:59 +02:00
Knut Sveidqvist
c43d58d3c9 #916 Allow chaining of vertice in flowcharts 2019-08-28 20:25:54 +02:00
Eduardas Michelsonas
c6efddee87 #755 lint fixes 2019-08-28 20:13:37 +02:00
Eduardas Michelsonas
f6377e6125 #755 2019-08-28 20:09:45 +02:00
Eduardas Michelsonas
357c47910a Test commit 2019-08-28 18:53:49 +02:00
Knut Sveidqvist
4ae48f4284 #915 Reviving the possibility to use underscore in text in vertices 2019-08-28 17:34:57 +02:00
knsv
a48a306fe8 #914 Fix for issue identifying node wehen the id of the node starts with a digit 2019-08-27 12:16:11 -07:00
dependabot[bot]
a3c1928fc0 chore(deps): bump eslint-utils from 1.3.1 to 1.4.2
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.2.
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](https://github.com/mysticatea/eslint-utils/compare/v1.3.1...v1.4.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-26 18:25:33 +00:00
knsv
34d3b85227 Release 8.2.5 2019-08-26 11:23:54 -07:00
Knut Sveidqvist
06a91d8564 #835 Backwords compatible syntax for associating classes with nodes/vertices 2019-08-26 20:10:44 +02:00
knsv
e1f0367631 Release 8.2.4 2019-08-25 06:31:58 -07:00
David Pendray
dbcd4f635e Fix typos in README 2019-08-22 11:53:26 +01:00
Knut Sveidqvist
a3142aad69 Adding some test pages 2019-08-20 20:07:12 +02:00
Knut Sveidqvist
980749536b Fix for issue with bindFunctions being called when there are none. 2019-08-20 18:42:19 +02:00
Knut Sveidqvist
5dbddfb6a1 Merge pull request #908 from knsv/bug/subgraphs_number_in_id_and_space_in_titles_895_and_900
Bug/subgraphs number in id and space in titles 895 and 900
2019-08-16 13:02:30 +02:00
Knut Sveidqvist
c4d2be7a0d Merge branch 'master' into bug/subgraphs_number_in_id_and_space_in_titles_895_and_900 2019-08-16 12:52:17 +02:00
Knut Sveidqvist
ef51f543a3 Fix for test 2019-08-16 12:42:42 +02:00
Knut Sveidqvist
4eda2aa36d #900 Handling ids starting with a number and styling for other nodes as well 2019-08-16 12:38:34 +02:00
Knut Sveidqvist
a35892da4f Fix for issue #895 2019-08-15 08:57:49 +02:00
Knut Sveidqvist
23b567e11b #900 Fix for subgraph ids starting with a number 2019-08-14 20:00:06 +02:00
Ashish Jain
abdbf2cb8a Bug fix handling non-click graphs 2019-08-14 19:25:52 +02:00
Ashish Jain
ca97ac11e1 Fix for failing yarn dev on Standard syntax check for mermaidAPI.js 2019-08-14 18:33:10 +02:00
Nacho
8f0a7f56e2 Merge pull request #904 from lakario/master
Typo in Readme
2019-08-14 09:47:03 -04:00
Nacho
0a61971d29 Merge pull request #905 from i-am-the-slime/fix-typo
Fix typo
2019-08-14 09:45:08 -04:00
knsv
7b335fb62e #901 Fixed the issue with multiple calls to bind the click functions. Also sanitized the tooltips so that no tags are allowed in them for (#847). 2019-08-11 03:26:44 -07:00
knsv
a6f21c2b91 Re-enabling all tests 2019-08-08 01:19:14 -07:00
Mark Eibes
e74378a8ac Fix typo 2019-08-08 08:42:03 +02:00
Nathan Taylor
ec67ee946a Typo in Readme
Fixed a typo in readme
2019-08-07 12:07:23 -07:00
knsv
c5e8a52205 t push origin masterMerge branch 'sagea-sagea/jison-webpack' 2019-08-04 00:11:28 -07:00
Alexander Sage
78dd0e6ddc remove dev code 2019-08-03 15:10:53 -07:00
Alexander Sage
cfea52f570 chore: integrate jison into webpack build 2019-08-03 15:05:43 -07:00
Knut Sveidqvist
2d88982729 Merge pull request #898 from sagea/rect-documentation
chore: Documentation for rect
2019-08-01 22:32:57 -07:00
Alexander Sage
148a3c4cf7 chore: Documentation for rect 2019-07-30 22:24:48 -07:00
knsv
533b55bb68 Merge of feat: sequence diagram background rect #889 2019-07-25 12:04:01 -07:00
knsv
5b85fe9293 Merge branch 'sagea-sagea/sequencediagram-background-rect' 2019-07-25 12:00:57 -07:00
Knut Sveidqvist
1ac126fb7a Merge pull request #890 from knsv/feature/allow-class-directly-at-node-flow
#835 Feature/allow class directly at node flow
2019-07-25 01:12:05 -07:00
Alexander Sage
b5e3323a93 fix: workaround for function 25 line limit 2019-07-23 21:33:03 -07:00
Alexander Sage
8f6d148481 chore: added test for background rect dimensions 2019-07-23 21:28:48 -07:00
Alexander Sage
671a892b52 fix: removed it.only 2019-07-23 21:08:33 -07:00
Alexander Sage
5c25c5563a chore: Added e2e snapshot tests 2019-07-23 21:07:01 -07:00
Alexander Sage
8b05eeaa59 chore: Added unit tests around drawBackgroundRect and drawRect 2019-07-23 19:15:54 -07:00
Alexander Sage
1b001cf1e8 chore: Added unit tests around drawBackgroundRect and drawRect 2019-07-23 19:11:31 -07:00
ashishjain0512
855bad2f40 Added sequenceDiagram.js 2019-07-23 06:54:45 -07:00
ashishjain0512
b6d9407246 Added Jest test case for handling underscore in vertex name 2019-07-23 06:51:18 -07:00
ashishjain0512
957687ed39 Added Jest test for use-case A[text]-->B[test2].class 2019-07-23 06:49:44 -07:00
ashishjain0512
db86cfa7d9 Added Jest test case for use-case A[text].class-->B[test2] 2019-07-23 06:47:03 -07:00
ashishjain0512
afa95172b6 Added new Jest test case for usecase A[text].class 2019-07-23 06:45:35 -07:00
ashishjain0512
2e0843c226 Added Jest test case for 'should be possible to apply a class to a vertex directly' use-case 2019-07-23 06:41:45 -07:00
ashishjain0512
b312901705 Updated JISON for flow diagram to allow . class in vertex declaration 2019-07-23 06:37:28 -07:00
Ashish Jain
16028b51c7 Merge branch 'master' into feature/allow-class-directly-at-node-flow 2019-07-23 10:48:45 +02:00
Alexander Sage
c8091c61c0 feat: sequence diagram background rect 2019-07-22 22:47:49 -07:00
knsv
5d9018aeec Merge remote-tracking branch 'origin/master' 2019-07-22 05:23:17 -07:00
knsv
cf686c445c Standard fixes 2019-07-22 05:23:03 -07:00
knsv
0478e4217b Version bump 2019-07-22 02:20:29 -07:00
knsv
f11d1a6fa1 #847 Better sanitizing of urls 2019-07-22 02:18:09 -07:00
Knut Sveidqvist
9dc6668e8a Merge pull request #888 from stanhu/sh-fix-security-level-docs
Fix securityLevel documentation
2019-07-21 09:48:49 -07:00
Stan Hu
527aea9264 Fix securityLevel documentation
Instead of boolean values, only `strict` and `loose` should be
used.
2019-07-21 09:46:35 -07:00
Knut Sveidqvist
056f321ee6 Merge pull request #887 from stanhu/sh-fix-readme-typo
Fix typo: wich -> which
2019-07-21 09:29:07 -07:00
Knut Sveidqvist
e679556975 Merge pull request #886 from stanhu/sh-fix-flowchart-label
Fix text label colors for flow charts. Thanks for the fix!
2019-07-21 09:28:12 -07:00
Stan Hu
e9f4ac7425 Fix typo: wich -> which 2019-07-21 09:16:47 -07:00
Stan Hu
c6502fb03b Style the flow chart labels via SCSS 2019-07-21 08:51:44 -07:00
Stan Hu
83b7163844 Fix text label colors for flow charts
When htmlLabels is set to `false` and a background fill color is used
for a node, the text label will inherit the fill color, hiding the
actual text. To fix this, explicitly set the fill color to `#333`, the
same value used in `src/themes/flowchart.scss`.

Closes https://github.com/knsv/mermaid/issues/885
2019-07-21 08:25:33 -07:00
knsv
c33533082c #847 Handling of embedded javascript in links 2019-07-21 07:39:36 -07:00
knsv
5dd392127f Release docs 2019-07-21 02:23:23 -07:00
knsv
9c150eec4e Linting fixes 2019-07-21 02:14:49 -07:00
knsv
c25a3cf1c1 #731 Issue with clicks in flowcharts. Replacing d3 with document.querySelect and addEventListener 2019-07-21 02:12:54 -07:00
knsv
b9ad9ba674 #884 Merging configuration updates to previous condifguration. 2019-07-21 02:09:22 -07:00
Knut Sveidqvist
92ac7d7c24 Fixing labels in the new docsify documentation so that they does not get cut 2019-07-17 18:14:22 +02:00
knsv
8e27318eda #847 fix for case texts with multiple br tags, explanation in usage doc on how to avoid labels out of bounds. 2019-07-16 16:05:22 -07:00
knsv
976d16b0db Updated docs with working code examples 2019-07-16 12:13:40 -07:00
ashishjain0512
1cee9828b0 Added script for update e2e snapshots 2019-07-16 08:32:27 -07:00
Ashish Jain
2c7f00bac1 Merge branch 'master' into feature/allow-class-directly-at-node-flow 2019-07-15 12:37:18 +02:00
Knut Sveidqvist
484b24d097 Merge pull request #882 from IOrlandoni/fix/whitespace-in-participant
Trimming whitespace after participant id
2019-07-14 10:36:10 -07:00
IOrlandoni
e93cc85e9b Trimming whitespace after participant id 2019-07-14 11:51:20 -04:00
Knut Sveidqvist
615381f8e7 Merge pull request #879 from knsv/dependabot/npm_and_yarn/js-yaml-3.13.1
chore(deps): bump js-yaml from 3.12.0 to 3.13.1
2019-07-14 08:48:59 -07:00
Knut Sveidqvist
b01f7e1d54 Merge pull request #880 from knsv/dependabot/npm_and_yarn/fstream-1.0.12
chore(deps): bump fstream from 1.0.11 to 1.0.12
2019-07-14 08:48:15 -07:00
Knut Sveidqvist
f29e1e2ee0 Merge pull request #881 from knsv/dependabot/npm_and_yarn/atob-2.1.2
chore(deps): bump atob from 2.0.3 to 2.1.2
2019-07-14 08:47:56 -07:00
dependabot[bot]
ec4be237b5 chore(deps): bump atob from 2.0.3 to 2.1.2
Bumps [atob](https://github.com/coolaj86/node-browser-compat) from 2.0.3 to 2.1.2.
- [Release notes](https://github.com/coolaj86/node-browser-compat/releases)
- [Commits](https://github.com/coolaj86/node-browser-compat/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-14 13:50:12 +00:00
dependabot[bot]
6249c90bc9 chore(deps): bump fstream from 1.0.11 to 1.0.12
Bumps [fstream](https://github.com/npm/fstream) from 1.0.11 to 1.0.12.
- [Release notes](https://github.com/npm/fstream/releases)
- [Commits](https://github.com/npm/fstream/compare/v1.0.11...v1.0.12)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-14 13:50:06 +00:00
dependabot[bot]
69efac3634 chore(deps): bump js-yaml from 3.12.0 to 3.13.1
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.12.0 to 3.13.1.
- [Release notes](https://github.com/nodeca/js-yaml/releases)
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.12.0...3.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-14 13:49:54 +00:00
Knut Sveidqvist
77b68ec12e Merge pull request #878 from knsv/i847-cross-site-scripting
I847 cross site scripting
2019-07-14 06:47:42 -07:00
Knut Sveidqvist
c818dbb5a0 Setting default securityLevel to strict, updated docs in mermaidAPI 2019-07-14 06:07:27 -07:00
Knut Sveidqvist
9753578903 Removed filelog as it causes a security warning 2019-07-14 02:44:46 -07:00
Knut Sveidqvist
5abedab095 e2e test for stricter security in mermaid 2019-07-14 02:05:59 -07:00
Knut Sveidqvist
31576f8f55 #847 Removing </> in text 2019-07-13 22:50:53 -07:00
Knut Sveidqvist
31a2b2ca3c Merge pull request #877 from knsv/dependabot/npm_and_yarn/lodash.mergewith-4.6.2
Bump lodash.mergewith from 4.6.1 to 4.6.2
2019-07-13 15:45:26 +02:00
dependabot[bot]
27cc737fe1 Bump lodash.mergewith from 4.6.1 to 4.6.2
Bumps [lodash.mergewith](https://github.com/lodash/lodash) from 4.6.1 to 4.6.2.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-13 08:00:36 +00:00
Knut Sveidqvist
064700be36 Merge pull request #875 from knsv/dependabot/npm_and_yarn/lodash-4.17.13
Bump lodash from 4.17.11 to 4.17.13
2019-07-13 09:58:57 +02:00
Knut Sveidqvist
343277e387 Merge pull request #876 from knsv/docsify
Adding docs into core repo again
2019-07-13 09:36:41 +02:00
dependabot[bot]
363b878a24 Bump lodash from 4.17.11 to 4.17.13
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.13.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.13)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-13 07:04:21 +00:00
Knut Sveidqvist
69c7d31e69 Adding docs into core repo again 2019-07-12 20:40:54 +02:00
Knut Sveidqvist
e5bd0e6dc7 Merge pull request #874 from knsv/feature/update-stale-bot-config
feat(stale.yml): update issue label and bot comment
2019-07-12 18:07:57 +02:00
Knut Sveidqvist
3b41ba9dd9 Merge pull request #872 from knsv/feature/allow-inclusive-enddates
Feature/allow inclusive enddates
2019-07-12 18:05:21 +02:00
Jason Würtz
17b4c98db1 feat(stale.yml): update issue label and bot comment 2019-07-11 19:28:00 -03:00
Ashish Jain
04d55f60ea Test Commit 2019-07-10 17:46:08 +02:00
Knut Sveidqvist
86f430f61b Update issue templates 2019-07-08 07:38:05 +02:00
Jason Würtz
c6511ed829 test(ganttDb.spec): add simple tests for the durationToDate fn 2019-07-07 17:17:22 -03:00
Jason Würtz
047760ad4b chore(ganttDb): export durationToDate so it can be tested 2019-07-07 17:17:05 -03:00
Jason Würtz
b7c4b66b61 test(ganttDb.spec): fix missing initialization for clear test 2019-07-07 17:04:40 -03:00
Jason Würtz
67bb5ffa73 refactor(ganttDb.js): extract durationToDate function
codeclimate was complaining about the getEndDate function so I split it up
2019-07-07 17:01:45 -03:00
Jason Würtz
a671576578 feat(index.html): add example to display new behavior 2019-07-07 16:51:40 -03:00
Jason Würtz
1ee4b964e2 test(gantt.spec): add assertions to check that the parser didn't error 2019-07-07 16:41:07 -03:00
Jason Würtz
cb7d05bd53 chore(gantt.js): generate parser from jison 2019-07-07 16:28:53 -03:00
Jason Würtz
16f3338b3d feat(gantt.jison): update parser to accept a inclusive end date arg
if a line contains inclusiveEndDates then it will toggle the chart to use inclusive end dates
2019-07-07 16:28:31 -03:00
Jason Würtz
0a567a3ef9 test(ganttDb): update inclusive end date tests 2019-07-07 16:27:41 -03:00
Jason Würtz
660e0f3d8b refactor(ganttDb): separate out the inclusive end date toggle 2019-07-07 16:27:28 -03:00
Jason Würtz
ee766ec88e fix(ganttDb): change manual end time determination
now it just checks if a valid end time was provided and instead of the comparison that went on before.
This needed to be done in order to support manual end dates with inclusive set to true since they don't match anymore as the 'manually' supplied end date is increased by one
2019-07-06 12:28:56 -03:00
Jason Würtz
63096a5c26 feat(ganttDb.js): add 1 day to end dates if inclusive is set to true
This will essentially keep all old behavior the same while still allowing users to specify if they want inclusive end dates
2019-07-06 12:27:28 -03:00
Jason Würtz
b5b714861d test(ganttDb.spec): flip function design to specify inclusive instead 2019-07-06 12:26:32 -03:00
Jason Würtz
5c2d416a34 test(ganttDB.spec): fix typo 2019-07-06 12:25:57 -03:00
Jason Würtz
0515375cfa test(ganttDb.spec): clear function 2019-07-06 11:54:45 -03:00
Jason Würtz
6d20ccccd0 feat(ganttDb.js): add getters for excludes,sections and date format 2019-07-06 11:54:18 -03:00
Jason Würtz
6dce255393 fix(ganttDb.js): clear formats and excludes on clear 2019-07-06 11:30:13 -03:00
Jason Würtz
402d4bdee1 test(gantt.spec): add parser test for inclusive end dates 2019-07-06 11:29:50 -03:00
Jason Würtz
123fba5b07 test(ganttDb.spec): add test case for inclusive end dates 2019-07-06 11:29:10 -03:00
Knut Sveidqvist
f506c795d6 git push origin master Merge branch 'paulbland-sequence-numbers' 2019-06-30 16:15:21 +02:00
Knut Sveidqvist
5fd803d479 Fix merge changes for pr 722 and issue #782 2019-06-30 16:14:59 +02:00
Knut Sveidqvist
1241664d8d Merge branch 'master' of github.com:knsv/mermaid 2019-06-29 17:55:53 +02:00
Knut Sveidqvist
3e6efb663b #865 Updated Changelog 2019-06-29 17:55:47 +02:00
Knut Sveidqvist
cd907ff430 Update README.md 2019-06-29 16:15:53 +02:00
Knut Sveidqvist
724189e4ef Update README.md 2019-06-29 16:14:31 +02:00
Knut Sveidqvist
4bb0da0ce6 Merge of pull request #741 2019-06-29 10:41:44 +02:00
Knut Sveidqvist
666e587114 Merge branch 'adamwulf-flow/trapezoid' 2019-06-29 10:34:12 +02:00
Knut Sveidqvist
3e9e5acdab Fix of merge conflicts 2019-06-29 10:33:44 +02:00
Knut Sveidqvist
40d10ea741 #457 Added grammar for double directional arrows 2019-06-28 12:10:16 +02:00
Knut Sveidqvist
231aaedec8 Update for double arrows - regular 2019-06-28 11:26:20 +02:00
Knut Sveidqvist
d86a4b15c1 Adding stalebot for personal sanity 2019-06-28 09:24:30 +02:00
Adam Wulf
03abeacea4 Added parallelograms. 2019-06-25 23:15:43 -05:00
Adam Wulf
99169398b7 Simpler syntax for trapezoid nodes 2019-06-25 23:06:53 -05:00
Adam Wulf
24600355c8 Merge remote-tracking branch 'origin/master' into flow/trapezoid 2019-06-25 22:36:13 -05:00
Adam Wulf
db2a21cea1 updated flow parser 2019-06-25 22:30:28 -05:00
Knut Sveidqvist
95967151ae Release 8.1.0 2019-06-25 10:24:57 +02:00
Knut Sveidqvist
f2137e4cdd Merge pull request #861 from Arthaey/remove-console-log
Remove console.log in classDB.
2019-06-25 10:14:31 +02:00
Arthaey
bba6bb6255 Remove console.log in classDB. 2019-06-23 19:56:50 -07:00
Knut Sveidqvist
7d7bc9782b Merge pull request #795 from DanShai/fix-class-diagram
fix class diagram mermaid
2019-06-16 08:24:03 +02:00
Knut Sveidqvist
5667694652 info diagram to show version of mermaid, bugfixes for gantt chart 2019-06-15 14:29:26 +02:00
Knut Sveidqvist
4cb0b9174b Added info diagram to show the version pf mermaid, buig fixes for gannt diagrams 2019-06-15 14:28:13 +02:00
Knut Sveidqvist
7493031d11 Small doc change 2019-06-15 09:38:02 +02:00
Dan Shai
e64d2dcada fixed class diagram hopefuly no conflict 2019-06-14 17:29:40 +03:00
Dan Shai
f057bd1e89 fixed class diagram 2nd pr 2019-06-14 08:01:51 +03:00
Dan Shai
1e7e719dbf fixed class diagram 2nd pr 2019-06-14 07:37:16 +03:00
Dan Shai
5b6e9747b7 fixed class diagram 2nd pr 2019-06-14 01:22:46 +03:00
Knut Sveidqvist
803c12877c git push origin masterMerge branch 'ivan-danilov-linkStyle-list-support' 2019-06-11 08:35:59 -07:00
Knut Sveidqvist
db5be3c28a Resolving som conflicts from merge 2019-06-11 08:35:46 -07:00
Knut Sveidqvist
434a033411 Resolved an name change issue fom a merge 2019-06-11 08:22:55 -07:00
Knut Sveidqvist
fd2ee3e109 Merge branch 'jsyang-patch-1' 2019-06-11 08:20:35 -07:00
Knut Sveidqvist
0816591cf9 Resolved some merge conflicts 2019-06-11 08:20:12 -07:00
Knut Sveidqvist
836d02d0b9 Merge pull request #828 from stanhu/sh-fix-dotted-lines-flowchart
Fix dotted lines not appearing in flowcharts when HTML labels disabled
2019-06-11 17:13:51 +02:00
Knut Sveidqvist
b951d506d9 Merge pull request #832 from vaniship/master
fix draw function can only call once
2019-06-11 17:13:00 +02:00
Arnaud Zheng
ec5627a44c Merge pull request #1 from arnaud-zg/imgbot
[ImgBot] Optimize images
2019-06-10 13:33:40 +02:00
Knut Sveidqvist
333a13269c git push origin master
Merge branch 'abzicht-master'
2019-06-09 12:41:05 -07:00
Knut Sveidqvist
e0a70bd352 Merge of latest changesin to pr #804 2019-06-09 12:40:37 -07:00
Knut Sveidqvist
fe913ec10f Merge pull request #705 from Vrixyz/602-cardinality-not-showing
wip: class diagram  cardinality display
2019-06-09 11:22:03 -07:00
Knut Sveidqvist
50899b845d Merge branch 'gijswijs-gantt-milestones' 2019-06-09 10:55:58 -07:00
Knut Sveidqvist
3e6396cc4b Merged in recent updates 2019-06-09 10:53:46 -07:00
Knut Sveidqvist
a8d9b269ff Fixed reference in test file 2019-06-09 07:07:57 -07:00
Knut Sveidqvist
df7dc21893 Merge branch 'no-bloat' 2019-06-09 07:00:29 -07:00
Knut Sveidqvist
750c74eea7 Merge branch 'master' of github.com:knsv/mermaid 2019-06-09 06:51:41 -07:00
Knut Sveidqvist
2f7da8b577 Added test of usage via webpack to the e2e tests 2019-06-09 06:49:40 -07:00
ImgBotApp
5e52138861 [ImgBot] Optimize images
*Total -- 213.50kb -> 206.22kb (3.41%)

/dist/www/images/logo.png -- 3.29kb -> 1.21kb (63.29%)
/docs/site/images/logo.png -- 3.29kb -> 1.21kb (63.29%)
/docs/img/header.png -- 68.97kb -> 67.93kb (1.5%)
/docs/site/images/header.png -- 68.97kb -> 67.93kb (1.5%)
/dist/www/images/header.png -- 68.97kb -> 67.93kb (1.5%)
2019-06-08 15:55:06 +00:00
Knut Sveidqvist
e2dba9e9b8 Added job listing 2019-06-08 09:09:44 +02:00
Knut Sveidqvist
c79fcf7ad5 Update README.md 2019-06-07 15:23:24 +02:00
Knut Sveidqvist
c6abc43ca5 Merge pull request #851 from knsv/dependabot/npm_and_yarn/sshpk-1.16.1
Bump sshpk from 1.13.1 to 1.16.1
2019-06-04 21:04:00 +02:00
dependabot[bot]
2c1913af23 Bump sshpk from 1.13.1 to 1.16.1
Bumps [sshpk](https://github.com/joyent/node-sshpk) from 1.13.1 to 1.16.1.
- [Release notes](https://github.com/joyent/node-sshpk/releases)
- [Commits](https://github.com/joyent/node-sshpk/compare/v1.13.1...v1.16.1)
2019-06-04 19:01:24 +00:00
Fabio Spampinato
ed3d15501a Aligned “lodash” version with other dependencies, so that it gets deduplicated 2019-06-04 03:52:01 +02:00
Fabio Spampinato
fef85cf259 Importing only specific modules from "lodash" 2019-06-04 03:32:56 +02:00
Fabio Spampinato
00be016979 Avoiding publishing the “src” folder to NPM 2019-06-04 03:17:14 +02:00
Fabio Spampinato
9290aa2b61 Replaced “moment” with “moment-mini" 2019-06-04 03:14:35 +02:00
Knut Sveidqvist
977491ef8d Merge branch 'master' of github.com:knsv/mermaid 2019-06-01 19:21:59 +02:00
Knut Sveidqvist
86fcbf9c5e Added e2e tests and snapshot files 2019-06-01 19:21:15 +02:00
Knut Sveidqvist
e081e4c9c6 Fixed som dependencies 2019-05-31 14:59:23 +02:00
Knut Sveidqvist
357e738983 Adding image snapshots for graphs 2019-05-31 14:20:43 +02:00
Knut Sveidqvist
7242a98adb Moving jest config out of package.json to facilitate different jest configurations for unit tests and e2e tests 2019-05-30 19:31:41 +02:00
Knut Sveidqvist
6974892a11 Added jest, jest-puppeteer and jest-image-snapshot for e2e tests 2019-05-30 19:27:27 +02:00
Knut Sveidqvist
ee0cb8793f Merge pull request #791 from flying-sheep/svg-links
SVG link rendering
2019-05-28 23:18:39 +02:00
Knut Sveidqvist
0cfd3c7e02 Merge pull request #749 from monsterkrampe/issue-748-make-mermaid-class-diagrams-usable-in-stackedit
Make Class Diagrams usable in Stackedit and Live Editor
2019-05-28 22:32:36 +02:00
Knut Sveidqvist
23693bd57e Merge pull request #845 from Qix-/style-subgraph
Support styling of subgraphs
2019-05-28 22:22:45 +02:00
Knut Sveidqvist
d742211797 Merge pull request #837 from jnnnnn/master
fix dark theme loop labels not visible
2019-05-28 22:16:22 +02:00
Knut Sveidqvist
9191663a1a Merge pull request #792 from jopapo/master
Added exclude weekdays to definition
2019-05-28 22:12:18 +02:00
Knut Sveidqvist
b3dd2a4282 Merge pull request #810 from 0xflotus/patch-1
fixed diagrams
2019-05-28 22:01:58 +02:00
Josh Junon
f51596eb61 Support styling of subgraphs 2019-05-24 17:08:45 +02:00
Jonathan Newnham
c1d252afe0 fix dark theme loop labels not visible
* fix loop label text forced to black, ignoring styles
* fix styles that were being ignored
2019-05-14 11:23:37 +10:00
Vaniship
c3f03e4497 fix: fix draw function can only call once 2019-05-07 15:06:58 +08:00
Stan Hu
9e67de8a9f Fix dotted lines not appearing in flowcharts when HTML labels disabled
For some reason, `edgeData.style` was being overwritten when it
was already set earlier in the method.
2019-05-01 22:48:16 -07:00
Philipp A
6f09b14f44 Fix group labels 2019-04-26 11:01:21 +02:00
Philipp A
d78b33ca75 Fixed tests 2019-04-26 10:04:46 +02:00
jsyang
fa9cf2b345 Fix line styling (dashed / thick) when not using HTML labels option 2019-04-24 16:31:09 +01:00
Jim Yang
b2c833b879 Remove escape inside regex for StandardJS 2019-04-18 18:38:33 +01:00
Jim Yang
96516d6dd5 Fix issue with XML line breaks inside vertex labels
The regex needed to match the `<br>` or `<br/>` wasn't completely correct since some browsers (e.g. Chrome) attempt to turn `<br>` elements into their XHTML counter-parts: `<br/>`. This fixes the regex so both will match.
2019-04-18 10:46:52 +01:00
0xflotus
7071cd7381 fixed diagrams 2019-03-18 11:48:18 +01:00
abzicht
0a7b8840a4 Added css for clickable when task text is outside of task 2019-03-15 20:34:26 +01:00
abzicht
f272cff7f6 Adding minify capability 2019-03-10 18:23:11 +01:00
abzicht
6ede0f6166 Allowing brackets in taskTxt, adjusted index.html example to include brackets in task text 2019-03-10 14:07:33 +01:00
abzicht
c44ff8a70f Adding a gantt clickable example to the existing gantt diagram 2019-03-10 13:56:49 +01:00
abzicht
d2eb507e7d Adding styles for clickable tasks 2019-03-10 13:43:20 +01:00
abzicht
fa04e3de75 Adding jison processed js file because it seems that this is always committed to github 2019-03-10 13:42:43 +01:00
abzicht
63184d53c1 Argument processing now allows double quoted strings 2019-03-10 13:41:59 +01:00
abzicht
1dfff7ac0e Added documentation and implemented empty functionarguments 2019-03-10 13:41:02 +01:00
abzicht
6c84544521 Changed href to scan for the next double quoted word. This allows whitespace in links and resolves the issue with href ending with EOF 2019-03-10 11:49:16 +01:00
abzicht
91651ca6ce Fixed lint issues 2019-03-09 23:17:13 +01:00
abzicht
6fd790570a Removed <a> tag, moved id attribute to text section 2019-03-09 23:14:28 +01:00
abzicht
b322a964ca Code refactoring: Pushing functions is now to the funs list is now available in a separate function. Also, setLink no longer using the .link attribute and instead calls links directly via window.open 2019-03-09 23:13:53 +01:00
abzicht
20b35cbe13 Removed STR remains and fixed whitespace issue for 'call' which lead to undesired whitespace in function names 2019-03-09 22:42:27 +01:00
abzicht
d169641c99 Fixed lint issue 2019-03-09 22:19:08 +01:00
abzicht
856591d253 Removed STR as it is no longer required; made 'click' a state such that it returns the id that is specified after the keyword 2019-03-09 22:18:37 +01:00
abzicht
4587f5a73d Added 'clickable' class to all elements with interactivity. This allows css styling for clickable elements 2019-03-09 20:08:52 +01:00
abzicht
10057217cb Fixed issue which only passed the first char of functionargs to the function by splitting the functionargs by commas 2019-03-09 20:07:51 +01:00
abzicht
0c66e1b5b9 Added href support and improved callback argument handling 2019-03-09 12:11:56 +01:00
monsterkrampe
4800460e07 748: class diagram: allow linebreak after last statement; rerender correctly; allow unassociated classes 2019-03-09 09:54:28 +01:00
abzicht
67ee649d99 Added setLink and setClickEvent to gantt 2019-03-08 00:19:53 +01:00
abzicht
57b780a0d7 In render: added calling callback for gantt functions 2019-03-08 00:07:36 +01:00
abzicht
19d9dd6954 Fixed clickStatement to include ids 2019-03-07 22:31:38 +01:00
abzicht
e298351caa Added <a href> and callback functionality to gantt diagrams 2019-03-07 22:00:02 +01:00
ivan-danilov
752a12bda4 linkStyle now supports list of indexes with a few tests
For example:
linkStyle 0,1,2 interpolate basis stroke:#00f,stroke-width:2px;

Other variants of linkStyle syntax are also included
2019-02-21 22:06:11 +02:00
João Paulo Poffo
afeb3b53c9 Simplified methods 2019-02-12 17:52:18 -02:00
João Paulo Poffo
8ce658416b Simplify to codeclimate 2019-02-12 17:40:57 -02:00
João Paulo Poffo
6e846ac3e5 Defined a renderEndDate 2019-02-12 17:29:38 -02:00
Dan Shai
ec298185a3 fix class diagram mermaid 2019-02-12 10:27:05 +02:00
João Paulo Poffo
58df72984f Standard 2019-02-07 12:05:09 -02:00
João Paulo Poffo
5bfddcc444 Complexity 2019-02-07 11:27:01 -02:00
João Paulo Poffo
a99b31a61d Standard 2019-02-07 11:22:46 -02:00
João Paulo Poffo
8a8b7bd48c Fixed weekend between dates; Manual endtimes; Additional testing 2019-02-07 11:21:00 -02:00
João Paulo Poffo
1d04c7e1fe Standard JS 2019-02-06 17:25:39 -02:00
João Paulo Poffo
9f1c37ecb3 Codeclimate - Complexity 2019-02-06 17:24:20 -02:00
João Paulo Poffo
8e8651a0e1 Comments 2019-02-06 17:12:05 -02:00
João Paulo Poffo
a8e9f21035 Standard 2019-02-06 17:09:59 -02:00
João Paulo Poffo
997cdfffb4 Doc HTML 2019-02-06 17:00:51 -02:00
João Paulo Poffo
5a9c57ec0f Docs 2019-02-06 16:59:57 -02:00
João Paulo Poffo
418ac501aa Added excludes weekdays to gantt 2019-02-06 16:54:09 -02:00
Philipp A
12b58a17e1 SVG link rendering 2019-02-06 10:53:26 +01:00
Gijs van Dam
7ca9df9357 Refactor ganttDb tests 2019-02-04 11:33:24 +08:00
Gijs van Dam
f912f8582d Remove MomentJS dependency from Gantt Jest test cases
To reduce the dependencies of the Jest test cases, the moment dates in
both Jest test files are replaced with native javascript. Also the
physical file gantt.spec.js is moved to be in the same folder as
gantt.js
2019-02-04 10:21:58 +08:00
Gijs van Dam
a211b6d55d Use it.each in test cases to prevent code repetition 2019-02-01 17:04:43 +08:00
Gijs van Dam
c84c154603 Add tests for all possible task tags 2019-02-01 16:16:28 +08:00
Gijs van Dam
f903090e0f Refactor tag parsing of tags
The allowed tags are now a const at the top of the code.
Adding a tag there, automatically assigns the property to the
javascript object, if the tag is present in the data.
2019-02-01 14:21:25 +08:00
Gijs van Dam
901df242b7 Replace multiple returns with single return 2019-02-01 13:28:12 +08:00
Gijs van Dam
9dbb3767e2 Extract tag parsing in separate function 2019-02-01 13:27:42 +08:00
Gijs van Dam
5565d36ef2 Fix lint issues 2019-02-01 12:41:03 +08:00
Gijs van Dam
48f8c3f85a Add custom rendering of milestone tasks
If a task is a milestone, the rect shape will be square in the center of
the original width of the rectangular calculated if it weren't a
milestone. The placement of the label text is adjusted accordingly.
Both the rect and the text get a 'milestone' and 'milestoneText' class
accordingly.
The scss rotates the square and scales it a bit down, so that it's a
diamond, which appears to be the defacto standard for milestone icons.
The label text is put in italics.
The rotational transform is done in the scss, so that it's easy for
users to create their own milestone icon-style.
2019-02-01 12:34:55 +08:00
Gijs van Dam
a3eef7298e Add milestone to ganttDb 2019-01-31 15:33:35 +08:00
Tyler Long
7d3578b31a Merge pull request #721 from paulbland/right-angles
Add option for right angles
2018-12-18 14:04:19 +08:00
Tyler Long
2914d4975b Fix arrowhead style issue 2018-12-18 13:55:14 +08:00
Tyler Long
2a0fcd99e4 Merge pull request #720 from paulbland/add-activation-class
Add nested activation classes
2018-12-18 13:39:18 +08:00
Tyler Long
d7e0e4afc5 Fix code style issue 2018-12-18 13:32:36 +08:00
Tyler Long
de78bb5ffe Merge pull request #688 from imma90/master
add comments about CSS in config
2018-12-17 17:37:25 +08:00
Tyler Long
9ecee6b163 Generate jison files 2018-12-17 17:31:22 +08:00
Tyler Long
e25e8af135 Support latest version of font awesome 2018-12-17 16:27:46 +08:00
Tyler Long
4ab2fed8d2 Merge pull request #757 from gjlubbertsen/master
Fix issue with marker-end.
2018-12-17 15:56:49 +08:00
Tyler Long
3e8fea6533 Merge pull request #764 from watsoncj/master
Support Multi-line Actor Descriptions
2018-12-17 15:53:20 +08:00
Tyler Long
a57b90809b Merge pull request #765 from flying-sheep/links
Render nodes as real links
2018-12-17 15:30:13 +08:00
Tyler Long
b097b8bb34 Merge pull request #768 from znxkznxk1030/master
Remove duplicate code
2018-12-17 15:06:00 +08:00
Tyler Long
349aeb5a26 Upgrade dependencies 2018-12-17 14:56:26 +08:00
Tyler Long
e8aebb00ee Fix typos in test cases 2018-12-17 14:42:52 +08:00
ysKim
6ece2838bd Remove duplicate code 2018-12-05 22:45:03 +09:00
Philipp A
bcd3aa7d61 Improved docs, split setClickEvent and setLink 2018-12-01 15:31:57 +01:00
Philipp A
aca80726d7 Render nodes as real links 2018-11-28 17:09:34 +01:00
Casey Watson
2fc5745c58 Support Multi-line Actor Descriptions
- Add support for <br/> delimiter in actor descriptions.
- Add actorFontFamily and actorFontSize options to sequence diagram.
- Change default actor description font from times to sans.

Fix #384 #702 #755
2018-11-26 11:49:33 -07:00
Gerrit-Jan Lubbertsen
ba2f2cb284 Fix issue with marker-end.
I had issues with marker-end. Assuming that CSS got more strict over time.
2018-11-13 16:32:26 +01:00
Adam Wulf
ac2a4b54e7 Adjust the spacing of the trapezoid 2018-10-11 13:46:47 -05:00
Adam Wulf
9326e91832 Adding trapezoid and inverse trapezoid vertex options. 2018-10-10 02:25:44 -05:00
Bland, Paul
06aa4a5c07 prevent deeply nested activations from calling classes that don't exist (by limiting to 3) 2018-08-29 14:24:42 -04:00
Bland, Paul
80c7c9a86e added ability to style nested activations 2018-08-24 11:56:28 -04:00
Bland, Paul
0fdddfe548 make default sequence numbers a little smaller 2018-08-23 14:30:47 -04:00
Bland, Paul
42d66fd3d9 tweak for lint 2018-08-23 11:53:04 -04:00
Bland, Paul
ae8dde981b make path a bit wider 2018-08-22 15:30:12 -04:00
Bland, Paul
228b832bed moved hard-coded fill and stroke colors from svgDraw.js to scss files, and added defaults to all themes 2018-08-22 10:22:50 -04:00
Bland, Paul
8035572fac make default node number a little smaller 2018-08-17 13:37:44 -04:00
Bland, Paul
7fcccb4ab2 fixing formatting for lint 2018-08-17 11:07:04 -04:00
Bland, Paul
b80bad0a93 created option for right angle arrows 2018-08-17 10:56:15 -04:00
Bland, Paul
f87c503d5e fixed issue where some sequence number would be skipped 2018-08-17 10:25:06 -04:00
Bland, Paul
568c0318be centered two-digit sequence numbers 2018-08-17 09:37:49 -04:00
Bland, Paul
5903b33016 typo in word "sequence" 2018-08-16 16:55:28 -04:00
Bland, Paul
47bad33949 change all occurences of node number to "sequence number" 2018-08-16 16:53:30 -04:00
Bland, Paul
fb79b133e9 added sequence numbers 2018-08-16 13:44:59 -04:00
Vrixyz
ad1763a8f2 wip codeclimate refactoring request 2018-07-30 21:15:28 +02:00
Vrixyz
97e26686f4 wip #602 cardinality display 2018-07-29 18:50:57 +02:00
Imma
f476002691 add comments about CSS in config 2018-07-15 19:04:42 +02:00
Tyler Long
a4992963b3 Set SVG viewBox 2018-04-12 23:05:08 +08:00
Tyler Long
44ff608868 ultimate solution to position the svg 2018-04-12 09:06:20 +08:00
Tyler Long
f2ea725edb Add a sample to test diagram cut off issue 2018-04-12 07:39:02 +08:00
Tyler Long
40a87fa736 Update todo list 2018-04-12 07:38:01 +08:00
Tyler Long
a5627f97ff Make diamond shape a little bit bigger 2018-03-21 22:06:44 +08:00
Tyler Long
8b1698b17d Fix flowchart text size measuring issue 2018-03-21 21:29:12 +08:00
Tyler Long
f8da3c2e48 More padding to fix cutoff issue 2018-03-20 23:04:01 +08:00
Tyler Long
03f9264394 Update dependencies 2018-03-20 21:49:31 +08:00
Tyler Long
33da5bcee1 Fix flowchart cut off issue 2018-03-20 20:08:52 +08:00
Tyler Long
01541a3dc1 Fix a typo in flowRenderer. Fix #541 2018-03-19 09:31:29 +08:00
Tyler Long
13ec3f6c0d Support all d3 curves 2018-03-18 09:35:28 +08:00
Tyler Long
a949c2aaec config.sequenceDiagram backwards compatibility 2018-03-18 09:08:05 +08:00
Tyler Long
f4324d1de6 Fix test about curve 2018-03-17 23:19:13 +08:00
Tyler Long
f1d2808594 Support flowchart curve as option 2018-03-17 23:05:14 +08:00
Tyler Long
52d0605066 Fix subgraph issue 2018-03-17 18:12:24 +08:00
Tyler Long
015b976c28 Fix CSS cannot select number ID issue 2018-03-17 09:10:10 +08:00
Tyler Long
b777c8de15 Release 8.0.0-beta.3 2018-03-16 20:13:39 +08:00
Tyler Long
93201b2ded Merge pull request #641 from sopherio/master
SequenceDiagram: Add support for multiple alt else statements
2018-03-16 20:03:44 +08:00
Tyler Long
234d39cf96 Chrome browser is no longer a requirement for project setup 2018-03-15 23:46:22 +08:00
Tyler Long
9913bf654b Properly handle wrong theme name 2018-03-15 22:44:00 +08:00
Tyler Long
2d560861df Support Custom CSS 2018-03-15 21:47:53 +08:00
Tyler Long
24786c643b Fix a typo 2018-03-15 21:22:49 +08:00
Stefan Sechelmann
3b4e48e32f remove whitespace to adhere to standards 2018-03-15 14:10:10 +01:00
Stefan Sechelmann
45b81a9db9 add par and alt examples to index.html 2018-03-15 14:08:37 +01:00
Stefan Sechelmann
500dea182f change grammar to support multiple alt else statements 2018-03-15 13:57:54 +01:00
Stefan Sechelmann
274e9f3e42 add test:tdd script to package.json 2018-03-15 13:57:26 +01:00
Stefan Sechelmann
cf589f713d add spec for multiple else statements 2018-03-15 13:56:56 +01:00
Tyler Long
07d881cd5e Release 8.0.0-alpha.9 2018-03-14 21:40:26 +08:00
Tyler Long
0d0f793f81 Simplify code 2018-03-14 21:38:29 +08:00
Tyler Long
23dfe1e8a9 Fix classDef issue 2018-03-14 21:36:10 +08:00
Tyler Long
a8e49a0d2d Auto convert <br> to <br/> 2018-03-13 21:58:37 +08:00
Tyler Long
594847ba04 Release 8.0.0-alpha.7 2018-03-13 21:18:09 +08:00
Tyler Long
f3fcfb635b Gantt numberSectionStyles should be 4 2018-03-13 21:17:32 +08:00
Tyler Long
011220180c Release 8.0.0-alpha.6 2018-03-13 19:31:04 +08:00
Tyler Long
3e9215b27d Rename folders 2018-03-13 15:28:48 +08:00
Tyler Long
6ce2dfeaec Remove example graph 2018-03-13 15:19:24 +08:00
Tyler Long
9176237361 Remove dot graph 2018-03-13 15:14:43 +08:00
Tyler Long
9b65abe76a Remove useless code 2018-03-13 15:04:05 +08:00
Tyler Long
d6085fcdb9 Rename flow.scss to flowchart.scss 2018-03-13 14:49:46 +08:00
Tyler Long
259d2a9b5c Refactor css loading code 2018-03-13 14:31:56 +08:00
Tyler Long
f62736c749 Support customization of gantt diagram xAxis format using diagram code 2018-03-13 14:01:44 +08:00
Tyler Long
7ef1b28c83 Remvoe ganttDb getDateFormat 2018-03-13 13:48:27 +08:00
Tyler Long
7df9dea72a Fix sequence diagram note text y position issue 2018-03-13 13:23:38 +08:00
Tyler Long
2a061fba07 Fix note text y position 2018-03-13 11:06:27 +08:00
Tyler Long
93aa575697 Minor change to code 2018-03-13 10:58:10 +08:00
Tyler Long
8a20a71906 Test a complex sequence diagram 2018-03-13 10:54:39 +08:00
Tyler Long
37076d3d1f Support global config of gantt axisFormat 2018-03-12 21:33:02 +08: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
6f43082e38 Rename graphDb to flowDb 2018-03-12 20:52:06 +08:00
Tyler Long
964bc4dc12 Rename info to example 2018-03-12 20:46:29 +08:00
Tyler Long
ecf7870b3e Refactor scss 2018-03-12 20:21:19 +08:00
Tyler Long
30fcab1c63 Rename scss files 2018-03-12 20:10:33 +08:00
Tyler Long
edde501d54 Inline window.getComputedStyle(svg) so you can save the svg. 2018-03-11 23:47:45 +08:00
Tyler Long
35c0e2cea2 Release 8.0.0-alpha.2 2018-03-11 23:26:37 +08:00
Tyler Long
5cf061cb32 Fix foreignObject issue 2018-03-11 23:19:38 +08:00
Tyler Long
5b6dfb01a6 Use timestamp to generate uniq id 2018-03-11 22:46:59 +08:00
Tyler Long
a0b589979d Simplify API 2018-03-11 22:38:13 +08:00
Tyler Long
0d0cdd0542 Remove render2 method 2018-03-11 22:23:26 +08:00
Tyler Long
297fa7a069 Remove codeclimate config file 2018-03-11 22:15:43 +08:00
Tyler Long
2ed515091f Add id as css scope 2018-03-11 21:36:59 +08:00
Tyler Long
b093f9fd41 Simplify css code 2018-03-11 20:26:23 +08:00
Tyler Long
fde6396f48 Minor change to css code 2018-03-11 20:14:22 +08:00
Tyler Long
11250290a2 Simplify inline css code 2018-03-11 20:10:17 +08:00
Tyler Long
be33c41a40 Scope all css rules to .mermaid 2018-03-11 18:24:58 +08:00
Tyler Long
e20528ab0d Simplify scss code 2018-03-11 18:06:28 +08:00
Tyler Long
a40d89ba0d Simplify SCSS code 2018-03-11 17:26:55 +08:00
Tyler Long
c0c7c96f28 Re-generate jison js files 2018-03-11 16:43:02 +08:00
Tyler Long
003e5575b9 Setup code coverage 2018-03-10 08:54:28 +08:00
Tyler Long
d904574ea8 Replace Karma + Jasmine with Jest 2018-03-10 08:42:59 +08:00
Tyler Long
cbb884edae Simplify webpack config 2018-03-09 20:49:12 +08:00
Tyler Long
0a7829fcfe Replace less with scss 2018-03-09 16:23:35 +08:00
Tyler Long
7c970d6ff0 Get rid of global.mermaid_config 2018-03-09 15:13:05 +08:00
Tyler Long
048b39ae16 Remove coveralls 2018-03-09 14:23:37 +08:00
Tyler Long
bb9d5e38fa Fix coveralls issue 2018-03-09 14:11:51 +08:00
Tyler Long
bb365ca1b5 Replace CodeClimate with coveralls 2018-03-09 14:01:53 +08:00
Tyler Long
53b97b3ffa Refactor code 2018-03-09 13:46:58 +08:00
Tyler Long
9c101eb8af Add interpolateToCurve util method 2018-03-09 13:33:35 +08:00
Tyler Long
c251270633 Release 8.0.0-alpha.1 2018-03-09 09:35:11 +08:00
Tyler Long
dfb1095908 Fix sequence diagram node text alignment 2018-03-09 09:09:41 +08:00
Tyler Long
cf2b415cd3 Update todo list 2018-03-08 22:26:30 +08:00
Tyler Long
e9f3ad63c6 Remove local d3 file 2018-03-08 21:42:39 +08:00
Tyler Long
6a9bd22904 Remove d3-textwrap 2018-03-08 21:33:23 +08:00
Tyler Long
ebbf3bfa77 Fix sequence diagram textWidth issue 2018-03-08 21:10:57 +08:00
Tyler Long
661aaead35 Fix a flowchat selection issue 2018-03-08 21:07:18 +08:00
Tyler Long
197671960d Fix gantt diagram xAxis format 2018-03-07 22:05:54 +08:00
Tyler Long
e434ac9a1f Improve gantt diagram code 2018-03-06 19:11:55 +08:00
Tyler Long
388ec2cd97 Get log level correct 2018-03-06 18:56:37 +08:00
Tyler Long
1d7589abb9 Try to fix gantt diagram 2018-03-06 18:41:06 +08:00
Tyler Long
da47ba11f8 Fix class diagram 2018-03-06 18:08:50 +08:00
Tyler Long
eaa572aafe Fix git graph 2018-03-06 18:05:03 +08:00
Tyler Long
d4ac9f8114 Try to upgrade d3 to v4 2018-03-06 16:32:29 +08:00
Tyler Long
4bc2f4d26d Add husky 2018-03-06 16:11:36 +08:00
Tyler Long
7dd174642c Use graphlibrary 2018-03-06 16:04:40 +08:00
Tyler Long
89f3de169c Upgrade more dependencies 2018-03-06 16:00:14 +08:00
Tyler Long
bc04bb28fe Update karma 2018-03-06 15:27:12 +08:00
Tyler Long
9df8d319c3 Update puppeteer to latest version 2018-03-06 15:06:23 +08:00
Tyler Long
3f55200737 Update some dependencies 2018-03-06 14:37:27 +08:00
Tyler Long
204b029973 Update config files 2018-03-06 13:40:11 +08:00
Tyler Long
3fbe3a3078 Merge pull request #595 from frankschmitt/spec-fix-1
Spec fix 1
2017-12-26 21:19:55 +08:00
Tyler Long
8848203d90 Fix issues of last PR 2017-12-26 20:58:54 +08:00
Tyler Long
8edd89c665 Merge pull request #598 from thomasleveil/pr/426
fix #426 - add class .clickable on nodes with click function or link
2017-12-26 20:49:35 +08:00
Tyler Long
c78d623e93 Add link to mermaid-parcel-demo 2017-12-25 13:49:53 +08:00
Tyler Long
b093fc8a55 Update webpack config 2017-12-20 22:20:56 +08:00
Tyler Long
7e01b2b3fb Get rid of babel-preset-es2015 2017-12-20 22:10:58 +08:00
Tyler Long
26eaaa8c79 Update dependencies 2017-12-20 22:02:21 +08:00
Thomas LEVEIL
8cd0e3bb05 flowchart css: add cursor pointer style for class .clickable 2017-12-03 04:36:33 +01:00
Thomas LEVEIL
e0f74690b0 flowchart: add class 'clickable' on vertices with link or click function 2017-12-03 04:29:49 +01:00
Thomas LEVEIL
8db7d73dc0 add quick test for clickable flow chart node with tooltip 2017-12-03 04:29:49 +01:00
Frank Schmitt
48ef5d74e8 Several small fixes in the Gantt spec
- removed duplicate test for date spec
 - fixed title of title spec
 - added section to section spec
2017-11-18 16:22:49 +01:00
Frank Schmitt
18117af067 Fixed grammar in Gantt spec 2017-11-18 16:18:24 +01:00
Tyler Long
b418642359 Update readme 2017-09-16 10:28:53 +08:00
Tyler Long
6a2f62a084 Update readme 2017-09-16 10:27:17 +08:00
Tyler Long
1ec262becf Get rid of "var " 2017-09-14 21:28:16 +08:00
Tyler Long
6cd5ffe637 Get rid of var 2017-09-14 21:12:35 +08:00
Tyler Long
20b43d8ad1 Get rid of var 2017-09-14 20:59:58 +08:00
Tyler Long
f16143de7c Get rid of "var " 2017-09-14 20:53:36 +08:00
Tyler Long
daba43dcba Replace var with const 2017-09-14 20:45:14 +08:00
Tyler Long
7c74107f36 Replace var with const 2017-09-14 20:35:00 +08:00
Tyler Long
2e0bfaeb74 Replace var with const 2017-09-14 20:27:52 +08:00
Tyler Long
d31e03d04e Replace 'var ' with 'const ' 2017-09-14 20:17:27 +08:00
Tyler Long
8da5f26452 Replace 'var ' with 'const ' 2017-09-14 20:12:54 +08:00
Tyler Long
d6e22d5f5e Replace 'var ' with 'const ' 2017-09-14 19:40:38 +08:00
Tyler Long
c52f4d6307 Repalce 'var ' with 'const ' 2017-09-14 19:32:35 +08:00
Tyler Long
77f1a8ecac Remove mermaid CLI from main project. Release 7.1.0 2017-09-14 11:26:21 +08:00
Tyler Long
a4348f1963 Inline svg font 2017-09-13 10:15:35 +08:00
Tyler Long
fe0434cb16 Release 7.0.17 2017-09-12 23:13:49 +08:00
Tyler Long
a6f992ce5b Allow user to configure theme 2017-09-12 22:54:50 +08:00
Tyler Long
04fc5e51fc Release 7.0.15 2017-09-12 22:21:10 +08:00
Tyler Long
d430019b44 Remove clone css style code 2017-09-12 22:13:58 +08:00
Tyler Long
72493b7a8b Correct way to handle inline style 2017-09-12 22:06:19 +08:00
Tyler Long
0a828ee67f Load less tyle as string 2017-09-12 21:33:39 +08:00
Tyler Long
385454f3f1 Refactor webpack config 2017-09-12 21:23:05 +08:00
Tyler Long
f0ff4d087f Update codeclimate config 2017-09-12 19:23:47 +08:00
Tyler Long
89081ea169 Remove before_script from Travis config 2017-09-12 19:18:19 +08:00
Tyler Long
e3d753da76 Remove sudo from Travis config 2017-09-12 19:12:20 +08:00
Tyler Long
1e89aa7d92 Remove before_install section from travis config 2017-09-12 18:25:44 +08:00
Tyler Long
f979d941b6 Remove chrome addon from travis 2017-09-12 18:22:36 +08:00
Tyler Long
b1dffc9eec Fix styleSheets index issue 2017-09-12 16:23:21 +08:00
Tyler Long
5424092189 Use puppeteer and sourcemap 2017-09-12 16:08:03 +08:00
Tyler Long
bfa8f75d3b Simplify karma config 2017-09-12 15:50:58 +08:00
Tyler Long
75d9e7bc59 webpack fs: 'empty' 2017-09-11 23:06:34 +08:00
Tyler Long
c5a7eeaa0f Remove 'fs' as dependency 2017-09-10 23:16:35 +08:00
Tyler Long
4947c75ff7 Release 7.0.12 2017-09-10 23:00:20 +08:00
Tyler Long
d07a7f505b Update folder structure in dist folder 2017-09-10 22:29:37 +08:00
Tyler Long
7ab5dac5c7 Remove unused file 2017-09-10 22:17:31 +08:00
Tyler Long
4fc082b526 Add export default to diagram files 2017-09-10 22:03:10 +08:00
Tyler Long
2a0bc3b2e8 Add export default to *Db.js 2017-09-10 21:51:48 +08:00
Tyler Long
a7d79baf00 Replace require with import 2017-09-10 21:23:04 +08:00
Tyler Long
c9442653e9 Replace require with import 2017-09-10 19:41:34 +08:00
Tyler Long
969faf91fe ack ignore coverage dir 2017-09-10 17:31:04 +08:00
Tyler Long
8fe218676a Refactor logger 2017-09-10 17:00:15 +08:00
Tyler Long
f6b518ed49 Refactor logger code 2017-09-10 16:56:10 +08:00
Tyler Long
c53c679c6b jest --runInBand 2017-09-10 11:56:53 +08:00
Tyler Long
2d91daf858 Replace tape with jest 2017-09-10 11:42:39 +08:00
Tyler Long
a5b7145527 No global mermaidAPI 2017-09-10 10:45:38 +08:00
Tyler Long
ee912c2b29 No global mermaid 2017-09-10 10:24:48 +08:00
Tyler Long
bdf9b33b10 Remove parseError properties 2017-09-10 10:19:15 +08:00
Tyler Long
167368d508 Throw parseError instead of emit parseError 2017-09-10 10:10:36 +08:00
Tyler Long
bb534225b3 Refactor testing code for parseError 2017-09-10 00:47:09 +08:00
Tyler Long
ab69dacc6d Restore commented test 2017-09-10 00:31:29 +08:00
Tyler Long
8c2690e01f Emit parseError 2017-09-10 00:29:22 +08:00
Tyler Long
57db10a4c0 Make yarn release work 2017-09-09 21:51:12 +08:00
Tyler Long
fc5c07027c No manual global mermaid 2017-09-09 21:47:21 +08:00
Tyler Long
5da8c26cb6 Replace exports. with module.exports 2017-09-09 17:08:52 +08:00
Tyler Long
626fdfe345 Start to refactor mermaid.js 2017-09-09 16:52:09 +08:00
Tyler Long
c071503f19 Refactor logger.js 2017-09-09 15:16:15 +08:00
Tyler Long
873f7a591b Refactor utils.js 2017-09-09 14:46:58 +08:00
Tyler Long
e0f5f10215 Release 7.0.10 2017-09-09 00:58:41 +08:00
Tyler Long
11a949b78e Release 7.0.9 2017-09-06 11:12:21 +08:00
Tyler Long
81007f841a Use babel-plugin-lodash 2017-09-05 21:19:53 +08:00
Tyler Long
84f592c417 Update dagre-d3-renderer 2017-09-05 20:57:13 +08:00
Tyler Long
1e3b61a188 Add todo items 2017-09-04 09:08:36 +08:00
Tyler Long
baeeedcc16 Update todo list 2017-09-03 22:56:46 +08:00
Tyler Long
70763fd13b Remove console.log in test code 2017-09-03 22:34:01 +08:00
Tyler Long
21c91a8408 Release 7.0.8 2017-09-03 22:20:00 +08:00
Tyler Long
07af7123c9 Remove bower support 2017-09-03 20:13:19 +08:00
Tyler Long
3fbb5f08b8 Remove live-server 2017-09-03 20:07:40 +08:00
Tyler Long
973f5b2591 Minor change to package.json scripts 2017-09-03 12:21:42 +08:00
Tyler Long
64b5880444 Move gulp tasks 2017-09-03 12:19:34 +08:00
Tyler Long
81132bf0ed Remove jison.sh 2017-09-03 12:16:32 +08:00
Tyler Long
a9c23f205b Remove jison_legacy 2017-09-03 12:15:58 +08:00
Tyler Long
801d1e9eda jison 'token-stack': true 2017-09-03 12:06:40 +08:00
Tyler Long
15977695cd Re-run jison 2017-09-03 11:57:36 +08:00
Tyler Long
e0d578920a jison token-stack 2017-09-03 11:56:44 +08:00
Tyler Long
b6c75c8d62 Fix gulp-shell issue 2017-09-03 11:20:30 +08:00
Tyler Long
e4cb1dcbfd Fix a typo 2017-09-03 09:50:25 +08:00
Tyler Long
ceb8430f9b Minor change to webpack config 2017-09-03 09:20:39 +08:00
Tyler Long
2565b47637 Update karma config 2017-09-03 09:09:58 +08:00
Tyler Long
73eb98c4c3 Remove babel-plugin-transform-remove-strict-mode 2017-09-03 08:26:57 +08:00
Tyler Long
8c7e8b7a6c Remove 'use strict' 2017-09-02 23:48:25 +08:00
Tyler Long
894616bef9 Release 7.0.7 2017-09-02 23:44:00 +08:00
Tyler Long
1cfd6b67b3 Remove unused dependencies 2017-09-01 21:54:58 +08:00
Tyler Long
5e4d8a1034 Remove unused dependencies 2017-09-01 21:20:40 +08:00
Tyler Long
00785daac9 Remove useless dependencies 2017-09-01 21:14:33 +08:00
Tyler Long
12bfc9570a Remove useless dependencies 2017-09-01 21:10:26 +08:00
Tyler Long
f6b5c704e8 Make build faster 2017-09-01 18:34:10 +08:00
Tyler Long
6fe62060c6 Update config 2017-09-01 18:05:46 +08:00
Tyler Long
51fe2e8a9b Remove useless gulp scripts 2017-09-01 17:45:01 +08:00
Tyler Long
a18179e6db Remove editor 2017-09-01 17:35:13 +08:00
Tyler Long
89e1da4780 Update build scripts 2017-09-01 16:15:41 +08:00
Tyler Long
cb9a7f4cd1 Remove dist/www 2017-09-01 16:04:22 +08:00
Tyler Long
dcad2e9a17 Add screenshot for gantt diagram 2017-09-01 16:01:03 +08:00
Tyler Long
75eb6b1b6a Update screenshots 2017-09-01 15:53:20 +08:00
Tyler Long
47be3df96a Remove docs 2017-09-01 15:46:40 +08:00
Tyler Long
b077918832 Update library 2017-09-01 15:33:20 +08:00
Tyler Long
73a66b8206 Update libries 2017-09-01 14:52:27 +08:00
Tyler Long
89179ff5d1 Update badge position 2017-08-17 00:03:06 +08:00
Tyler Long
12a4882efe Update README 2017-08-17 00:02:13 +08:00
Tyler Long
4017628630 Release 7.0.4 2017-08-17 00:00:26 +08:00
Tyler Long
d596b58895 Update dependencies 2017-08-16 23:57:43 +08:00
Tyler Long
398f4bf56d Update readme 2017-08-16 23:19:44 +08:00
Tyler Long
e2b4fd4b20 New documentation website: https://mermaidjs.github.io/ 2017-08-16 22:02:28 +08:00
Tyler Long
e0c732ad47 Update readme 2017-06-04 15:26:45 +08:00
Tyler Long
3a0e665c13 Add installation guide to readme 2017-06-04 12:21:13 +08:00
Tyler Long
1076d67137 Disable amd parse for lodash 2017-06-04 12:13:22 +08:00
Tyler Long
b023892c57 Format demo code 2017-06-02 14:42:04 +08:00
Tyler Long
5f5c8a2df0 package.json specify files 2017-06-01 13:38:08 +08:00
Tyler Long
0c4bab2966 Release 7.0.1 2017-06-01 13:19:03 +08:00
Tyler Long
054950ef16 webpack target node '6.9' 2017-05-31 23:17:24 +08:00
Tyler Long
e08496d84c Merge pull request #536 from gibson042/2017-05-cli-output
Improve CLI output
2017-05-31 22:51:58 +08:00
Tyler Long
ef07012359 Merge branch 'master' into 2017-05-cli-output 2017-05-31 22:43:19 +08:00
Tyler Long
952fe4923c Don't use google CDN because we cannot access it from China 2017-05-31 22:35:17 +08:00
Tyler Long
fb94892ca6 Merge pull request #537 from ctruelson/fix-spelling
Fix spelling of 'you' in sequenceDiagram docs
2017-05-31 22:22:08 +08:00
Tyler Long
b81b3bb118 Merge pull request #538 from tylingsoft/master
Update Travis config
2017-05-31 22:16:05 +08:00
Tyler Long
5496f790bf Update Travis to remove node 6 2017-05-31 21:58:22 +08:00
Tyler Long
a6ab0a5742 Update libraries 2017-05-31 21:46:09 +08:00
Tyler Long
ef053a813d Merge branch 'master' of github.com:tylingsoft/mermaid 2017-05-31 21:11:55 +08:00
Tyler Long
550e7beb61 Try to fix Chrome issue 2017-05-31 21:11:12 +08:00
Tyler Long
e8930e7ded Merge branch 'master' into master 2017-05-31 21:04:23 +08:00
Tyler Long
22ad977349 Disable Chrome headless mode because it's not supported by stable version of Chrome 2017-05-31 20:58:50 +08:00
Charles Truelson
c223c2be5c Fix spelling of 'you' 2017-05-26 15:04:56 -04:00
Richard Gibson
e3585a7d66 Use valid values in .travis.yml 2017-05-25 12:53:28 -04:00
Richard Gibson
905e0c20d9 Let Travis CI use headless chrome 2017-05-25 12:40:22 -04:00
Richard Gibson
981c3e0ce4 Inherit environment variables when testing 2017-05-25 12:29:20 -04:00
Richard Gibson
de2db39161 Include file paths in CLI log output 2017-05-25 10:14:11 -04:00
Richard Gibson
ef25bfee14 Always use verbosity-aware CLI logging 2017-05-25 10:04:50 -04:00
Richard Gibson
4cfd18e25f Output all CLI log messages in the same way 2017-05-25 09:57:30 -04:00
Richard Gibson
e0f3656629 Fix phantomjs invocation for Ubuntu 16.04 2017-05-25 09:52:06 -04:00
Richard Gibson
2ddad07fc7 Fix typo 2017-05-25 09:51:02 -04:00
Tyler Long
1dcb6cd390 Update travis config 2017-04-26 10:45:12 +08:00
Tyler Long
1a3d37d8a5 Merge pull request #524 from tylingsoft/master
Modernize mermaid
2017-04-24 23:56:45 +08:00
Tyler Long
5cd8ac1fac Try to fix travis chrome headless issue 2017-04-24 23:11:55 +08:00
Tyler Long
7889e35340 Run Chrome with --no-sandbox 2017-04-24 23:00:51 +08:00
Tyler Long
dcffde3e98 Update travis config 2017-04-24 22:42:07 +08:00
Tyler Long
d38b9be891 Update todo list 2017-04-22 23:37:23 +08:00
Tyler Long
42846cce50 Fix class diagram in dark theme issue 2017-04-22 23:33:54 +08:00
Tyler Long
2134dbb2fd Fix git graph dark theme text color issue 2017-04-22 23:27:19 +08:00
Tyler Long
ccec3810df Fix neutral theme sequence diagram issue 2017-04-22 23:15:50 +08:00
Tyler Long
12af9b0b66 Fix class diagram css style in other themes 2017-04-22 23:10:22 +08:00
Tyler Long
97b9edf7c3 Adjust class diagram label size 2017-04-22 22:31:18 +08:00
Tyler Long
c63d556cf8 Fix class diagram display issue 2017-04-22 22:25:07 +08:00
Tyler Long
b4e8cffd0a Fix git graph default style issue 2017-04-22 22:12:10 +08:00
Tyler Long
4ba3ff6769 Fix class diagram default theme color issue 2017-04-22 21:43:07 +08:00
Tyler Long
c56ac30d39 Fix labelBox style issue 2017-04-22 21:24:21 +08:00
Tyler Long
7072979cfc beautify less code 2017-04-22 20:43:18 +08:00
Tyler Long
727f6c0e28 Format less code 2017-04-22 20:26:53 +08:00
Tyler Long
1c7c109960 Refactor or remove some file 2017-04-22 17:13:05 +08:00
Tyler Long
391149dbd8 Refactor webpack config code 2017-04-22 17:12:12 +08:00
Tyler Long
7bb988c48b Update contributing.md 2017-04-22 17:10:37 +08:00
Tyler Long
1927ed47ff Update some config files 2017-04-22 17:09:51 +08:00
Tyler Long
73027d5cec yarn dist generates minified css files 2017-04-22 16:04:16 +08:00
Tyler Long
c52a8fc442 Webpack compile less to css 2017-04-22 15:40:35 +08:00
Tyler Long
acab3a5ee1 Remove css files from dist folder 2017-04-22 10:46:42 +08:00
Tyler Long
0bd8aabd7c Add instructions for manual test 2017-04-21 20:49:35 +08:00
Tyler Long
99de658093 Add documentation for contributors 2017-04-21 20:31:49 +08:00
Tyler Long
a4d06742c3 Remove jshint because we are using standard style based on ESLint 2017-04-21 11:21:42 +08:00
Tyler Long
3ebae8f331 Use Chrome stable instead of Chrome Canary 2017-04-21 10:25:16 +08:00
Tyler Long
7fed3b408e Refactor git graph code 2017-04-19 20:17:57 +08:00
Tyler Long
95712ea357 Update package.json 2017-04-19 18:37:55 +08:00
Tyler Long
d5178f61f1 Remove gulp-uglify 2017-04-19 00:02:38 +08:00
Tyler Long
941a7f9ff5 Get rid of browserify 2017-04-18 23:35:52 +08:00
Tyler Long
0ccc216a2c Replace karma-browserify with karma-webpack 2017-04-18 23:20:38 +08:00
Tyler Long
f0dc7f89e4 Replace phantomjs with phantomjs-prebuilt 2017-04-18 22:20:49 +08:00
Tyler Long
332ceb0da6 Replace karma + PhantomJS with karma + Chrome headless 2017-04-18 22:14:02 +08:00
Knut Sveidqvist
189758cca4 Merge pull request #519 from tylingsoft/master
Modernize mermaid
2017-04-17 19:45:59 +02:00
Tyler Long
2fa4df2830 yarn doesn't support node 4 2017-04-17 23:11:51 +08:00
Tyler Long
a8ff7a65f4 Fix Travis CI env issue 2017-04-17 22:58:54 +08:00
Tyler Long
5d68359eb6 First working version of babel 2017-04-17 22:34:25 +08:00
Tyler Long
4032824c79 Format code 2017-04-17 17:13:37 +08:00
Tyler Long
0ebf162673 Try babel 2017-04-17 16:47:26 +08:00
Tyler Long
166acad749 Remove some dependencies 2017-04-17 00:52:23 +08:00
Tyler Long
15bfc12cbe Remove useless dependencies 2017-04-17 00:37:01 +08:00
Tyler Long
3ac23c21d9 Refactor code 2017-04-17 00:12:30 +08:00
Tyler Long
8b44401b1b Update some configuration files 2017-04-17 00:12:05 +08:00
Tyler Long
5624453c87 Refactor code 2017-04-16 23:48:36 +08:00
Tyler Long
87c7f73245 Refactor code 2017-04-16 23:24:47 +08:00
Tyler Long
110e4ee586 Refactor code 2017-04-16 23:08:37 +08:00
Tyler Long
6a7a5b9249 Format code of src/d3.js 2017-04-16 22:49:59 +08:00
Tyler Long
8832aa61fe Remove useless jasmine config file 2017-04-16 21:44:31 +08:00
Tyler Long
e16e501b93 mermaidAPI should target node 2017-04-16 21:38:48 +08:00
Tyler Long
8536c975bf Refactor code of gulp scripts 2017-04-16 18:36:42 +08:00
Tyler Long
3d500800f1 Refactor code 2017-04-16 18:27:48 +08:00
Tyler Long
b9b991c5fe Refactor code in lib/ folder 2017-04-16 17:52:09 +08:00
Tyler Long
701e638907 Add demo for all the 5 diagram types 2017-04-16 17:30:40 +08:00
Tyler Long
52d03f3ce3 Remove useless file 2017-04-16 16:00:38 +08:00
Tyler Long
ebf00eecaa Remove useless file 2017-04-16 15:57:56 +08:00
Tyler Long
262a917952 Test mermaidAPI 2017-04-16 15:37:32 +08:00
Tyler Long
a730225700 Replace window.console with console in order to support node 2017-04-16 09:37:05 +08:00
Tyler Long
538d2c2b83 Remove getTransformToElement polyfill because it's fixed in dagre-d3 2017-04-16 09:30:04 +08:00
Tyler Long
736d57f3f2 Create demo folder 2017-04-16 09:17:25 +08:00
Tyler Long
053388a2d3 Add todo.md 2017-04-15 16:46:10 +08:00
Tyler Long
e17ec3e299 Don't use d3-textwrap before it's for d3 v4 only 2017-04-15 16:44:25 +08:00
Tyler Long
869a64e457 Generate all the dist files using webpack 2017-04-15 16:09:30 +08:00
Tyler Long
9d56595d48 Update libraries to latest version 2017-04-15 15:34:23 +08:00
Tyler Long
ea11f8bff1 Use external d3-textwrap 2017-04-15 14:49:35 +08:00
Tyler Long
fd5b3083dd Update d3 to 3.5.17 2017-04-15 13:26:58 +08:00
Tyler Long
58a787b660 Upgrade D3 to 3.5.12 2017-04-15 13:22:26 +08:00
Tyler Long
dffc53b7b1 Minor changes 2017-04-15 13:13:54 +08:00
Tyler Long
173899fc76 First fully working version of webpack 2017-04-15 12:38:24 +08:00
Tyler Long
7166ade310 Debug flowchart 2017-04-15 12:28:16 +08:00
Tyler Long
7b935823da First working version of webpack 2017-04-15 10:28:37 +08:00
Tyler Long
e945bf884e First try of webpack 2017-04-14 17:43:53 +08:00
Tyler Long
d87da684a9 eslint watch 2017-04-13 22:35:27 +08:00
Tyler Long
15bdaca2f9 Use yarn install of npm 2017-04-13 22:21:09 +08:00
Tyler Long
df8085bee0 Fix all code style issues 2017-04-13 21:53:23 +08:00
Tyler Long
f04d415b0a Fix gulpfile.js style issue 2017-04-13 21:08:51 +08:00
Tyler Long
ab398c64a8 Fix code style issues 2017-04-13 20:50:22 +08:00
Tyler Long
a2ce9e6a54 Fix code style issues 2017-04-13 20:16:38 +08:00
Tyler Long
dc4edf775d Fix style issue of logger.js 2017-04-11 23:46:11 +08:00
Tyler Long
e91229f69f Fix style issue of mermaid.js and mermaidAPI.js 2017-04-11 23:31:59 +08:00
Tyler Long
f136a7fd8d Add .ackrc 2017-04-11 23:11:12 +08:00
Tyler Long
413162dfad Fix some code style issues 2017-04-11 22:57:57 +08:00
Tyler Long
7d1c1e3845 Add index.html to dist folder 2017-04-11 22:24:55 +08:00
Tyler Long
620f3e8734 Auto fix standard style voilations 2017-04-11 22:14:25 +08:00
Tyler Long
d46fda537d Use JavaScript Standard Style for lint 2017-04-11 22:02:50 +08:00
Tyler Long
fc96360e17 Get all tape tests correct 2017-04-11 21:52:19 +08:00
Tyler Long
bc94fc3d6d Convert test/cli_test-sample.js to ES6 2017-04-10 22:24:20 +08:00
Tyler Long
c1e5fe3281 Change cli_test-parser.js to ES6 2017-04-10 21:59:40 +08:00
Tyler Long
69ceab9f44 Change cli_test-output.js to ES6 2017-04-10 21:26:38 +08:00
Tyler Long
546e766fd9 Add JavaScript Standard Style 2017-04-10 21:15:12 +08:00
Tyler Long
82220638a0 package.json scripts test should do dist 2017-04-10 20:51:01 +08:00
Tyler Long
432f3446b0 Minor change to d3 version 2017-04-10 20:28:50 +08:00
Tyler Long
19212eb4aa Upgrade all libraries except d3 2017-04-10 18:10:30 +08:00
Tyler Long
176ffa8e7c Update phantomjs 2017-04-10 17:52:19 +08:00
Tyler Long
3caa755b28 Update some libraries 2017-04-10 17:46:52 +08:00
Tyler Long
e48ff4c7e9 Update chalk, he and lodash 2017-04-10 17:43:02 +08:00
Tyler Long
e1e7be07f7 Remove auto generated js file from dist folder 2017-04-10 17:09:21 +08:00
Tyler Long
23dd96be97 Update .gitignore 2017-04-10 16:53:32 +08:00
Tyler Long
2525929e8d Add yarn.lock file 2017-04-10 16:45:22 +08:00
Tyler Long
2deacb8e97 Format files in root folder 2017-04-10 16:36:54 +08:00
Tyler Long
3b2b0da3a1 Add .editorconfig 2017-04-10 16:33:31 +08:00
Knut Sveidqvist
ca5a96f53a Merge pull request #509 from filipedeschamps/patch-1
Update CLI instructions
2017-04-08 08:45:40 +02:00
Filipe Deschamps
c2227e1a48 Update CLI instructions
Documentation `Usage` section wasn't reflecting CLI `--help` instructions anymore.
2017-04-07 23:11:16 -03:00
Knut Sveidqvist
dff8027be6 Merge pull request #503 from yudenzel/master
Add style for classDiagram to dark/default theme
2017-04-07 07:27:11 +02:00
YuDenzel
8f7f1ee0b5 Add style for classDiagram to dark/default theme
Copy classDiagram.less in forest theme to dark and default theme.

Issue: #454
2017-04-06 00:40:14 +08:00
Knut Sveidqvist
c7c077c21c Fix for issue #501
Added heko request to readme
2017-04-01 13:51:03 +02:00
Knut Sveidqvist
d7b1eb74e5 Upgraded version of node 2017-04-01 12:04:02 +02:00
Knut Sveidqvist
8772a5bba0 Merge pull request #498 from gomlgs/patch-1
Fix documentation for git graph.
2017-04-01 11:45:07 +02:00
Knut Sveidqvist
c6ccfa8b6a Merge pull request #497 from saveman71/master
Fix links in documentations
2017-04-01 11:43:59 +02:00
Knut Sveidqvist
63057c2f60 Merge pull request #470 from u-minor/support_parallel
add par statement to sequenceDiagram
2017-04-01 11:41:25 +02:00
Minoru Nakata
3b9baeb866 add generated parser 2017-03-30 18:39:48 +09:00
Minoru Nakata
38c5e65c35 add par statement to sequenceDiagram 2017-03-30 18:28:44 +09:00
gomlgs
fa7570efd8 Fix documentation for git graph. 2017-03-24 13:27:26 -07:00
Antoine Bolvy
b50c15e278 Fix links in documentations
* The main change (in term of importance) is the fix of two broken links that were
pointing to outdated sections ids.
* Added a link to mermaidCLI in the sequenceDiagram section, to reflect the one in
the gantt section.

* Converted some links to https.
2017-03-23 20:17:01 -04:00
Knut Sveidqvist
96be32225e Merge pull request #473 from gnkm/Add-viewbox-to-class-diagram
Add viewbox attr to class diagram
2017-03-19 13:37:39 +01:00
Knut Sveidqvist
dab3bc6ce4 Merge pull request #481 from raghur/gitgraph-doc-updates
Update README.md with git graph sample
2017-03-19 13:34:33 +01:00
Knut Sveidqvist
b0e81bf188 Merge pull request #479 from stevenschobert/ss-fix-typo
Fix misspelling of “another”
2017-03-19 13:34:14 +01:00
Knut Sveidqvist
acbbfbe419 Merge pull request #477 from brookhong/sequenceDiagram
Fixed #456 sequenceDiagram: dotted line for alt and empty bracket sho…
2017-03-19 13:33:52 +01:00
Raghu Rajagopalan
c1478418ae Add documenation for git graph 2017-02-21 12:32:19 +05:30
Steven Schobert
37f9655714 fix misspelling of “another” 2017-02-20 11:56:57 -06:00
brook hong
4f12596e29 Update color for label to make it align with loop line 2017-02-16 23:11:53 +08:00
brook hong
c714a7a28c Fixed #456 sequenceDiagram: dotted line for alt and empty bracket should be hidden
And draw label with right bottom corner cut
2017-02-16 22:50:39 +08:00
Genki Matsunaga
b935108ed8 Add viewbox attr to class diagram 2017-02-07 18:29:49 +09:00
Knut Sveidqvist
fb70b9742a New release 2017-01-29 12:14:02 +01:00
Knut Sveidqvist
8d91a42fe7 Fix for merge error 2017-01-09 21:36:01 +01:00
Knut Sveidqvist
0be8d62f7d Fix for merge error 2017-01-09 21:35:53 +01:00
Knut Sveidqvist
cac960c6b8 Merge pull request #452 from joshuacolvin/issue416_link_style_fill_none
Fix for #416, customizing link style with any color sets `fill` property to `black` instead of `none`
2017-01-09 21:30:03 +01:00
Knut Sveidqvist
8596eb6091 Merge branch 'master' into issue416_link_style_fill_none 2017-01-09 08:02:08 +01:00
Knut Sveidqvist
7ff87fdac9 Merge pull request #447 from jawn/patch-1
Fix spelling
2017-01-09 07:58:36 +01:00
Knut Sveidqvist
4c04001637 Merge pull request #449 from bfriedz/circle-styles
Allow .node>circle to receive css styles
2017-01-09 07:58:07 +01:00
Joshua Colvin
8c6cfebc1c Add unit tests to check that 'fill:none' is being set by default.
Updated unit tests to include 'fill:none' in expect style array values.
2017-01-07 12:58:47 -05:00
Joshua Colvin
ff0ab048df Add unit tests for isSubstringInArray utility function 2017-01-07 12:57:32 -05:00
Joshua Colvin
9b66b114cc Add conditional to add 'fill:none' to styles array if fill not present 2017-01-07 12:54:49 -05:00
Joshua Colvin
957244583c Add utilty function to check for substring in array 2017-01-07 12:53:49 -05:00
Rebecca Dreezer
a124be71b1 Allow .node>circle to receive css styles 2017-01-05 22:02:38 -05:00
Bernard Vander Beken
345d460643 Fix spelling 2017-01-04 11:19:14 +01:00
Knut Sveidqvist
7f0d4fff1b Merge pull request #445 from whyzdev/flowchat_text
added tests and fix cli css style selector lowercase problem
2017-01-03 19:28:06 +01:00
Knut Sveidqvist
1903154d01 Merge pull request #441 from hetz/hetz-patch-gulp-uglify
Update d3.js
2017-01-03 19:27:18 +01:00
whyzdev
9558ebcb0b remove dups 2017-01-01 23:41:38 -05:00
whyzdev
d63934637f remove dups 2017-01-01 23:36:42 -05:00
whyzdev
256c529de8 fix cli css style selector text lowercase problem by setting svg style content to commandline css content, if available -- this overwrites cloneCssStyles 2017-01-01 22:47:09 -05:00
whyzdev
a56fe7a8fe add more tests in cli_test-samples: flowchart, sequence, gantt, gitgraph, load html in phantomjs and save screenshot png 2017-01-01 22:47:09 -05:00
贺天卓
be4bbed687 Update d3.js
fix gulp-uglify error.
2016-12-20 01:45:23 +08:00
Knut Sveidqvist
2d2f0b9281 Update .codeclimate.yml 2016-12-19 13:07:43 +01:00
Knut Sveidqvist
dfd9622ce7 Merge pull request #439 from whyzdev/flowchat_text
adde tests to reproduce #434 in flowchart
2016-12-19 13:04:36 +01:00
whyzdev
71125e7b86 change " to ' per code climate 2016-12-19 00:40:29 -05:00
whyzdev
4a5bbe1791 added a flowchart cli test to reproduce #434 2016-12-18 23:17:24 -05:00
whyzdev
0ecbbf8ddf add tests 2016-12-18 22:52:41 -05:00
whyzdev
b73698849d rename tests 2016-12-18 18:05:37 -05:00
whyzdev
e13c939583 added cli_test_run-samples to test samples from commandline; added --outputSuffix option 2016-12-18 12:30:37 -05:00
whyzdev
96a25935ac fix warnings per code climate 2016-12-17 18:03:11 -05:00
Knut Sveidqvist
7d5c3144dc Merge pull request #437 from larkinscott/master
Code Climate config
2016-12-15 12:02:13 +01:00
Scott Larkin
2cf9a07bb2 Update .codeclimate.yml 2016-12-14 15:11:07 -05:00
Knut Sveidqvist
72718c14d1 Merge pull request #435 from whyzdev/issue428_fix_gantt_cli_cfg
fix gantt and sequence digram cli cfg
2016-12-14 12:43:50 +01:00
Knut Sveidqvist
fbe64b21bc Fix for issue #311, mermaid will clear div used for rendering initially in the redner function. 2016-12-14 12:41:29 +01:00
Knut Sveidqvist
d65741177a Fix for issue #311, mermaid will clear div used for rendering initially in the redner function. 2016-12-14 12:41:22 +01:00
Knut Sveidqvist
046b4fdae4 Fix for issue #311, mermaid will clear div used for rendering initially in the redner function. 2016-12-14 12:41:12 +01:00
Knut Sveidqvist
a179212c60 Fix for issue #311, mermaid will clear div used for rendering initially in the redner function. 2016-12-14 12:40:44 +01:00
whyzdev
5d99e9c0b8 changed tspan as default of sequence actor text placement 2016-12-13 21:07:32 -05:00
whyzdev
b426e600ce fix gantt chart cli configuration one more time missing }; make sequenceConfig cli configuration work; added guantt and sequence files in tape cli output tests 2016-12-13 21:07:32 -05:00
Knut Sveidqvist
66d7c00e84 Merge pull request #433 from whyzdev/issue428_fix_gantt_cli_cfg
fix gantt chart cli configuration broken
2016-12-13 09:28:37 +01:00
whyzdev
293c23ec52 fix gantt chart cli configuration broken #430; remove json quote around function in the config e.g. axisFormatter 2016-12-13 00:19:35 -05:00
Knut Sveidqvist
9e701b0fb3 Merge pull request #430 from whyzdev/issue428_fix_gantt_cli_cfg
fix gantt chart cli configuration parsing including functions
2016-12-11 14:01:56 +01:00
whyzdev
95a0cb53d3 fix gantt chart cli configuration parsing including functions 2016-12-10 16:21:21 -05:00
Knut Sveidqvist
3c03c84782 Merge pull request #427 from whyzdev/issue422_seq_actor_text_placement
use tspan via d3.textwrap to place actor text in sequence diagram
2016-12-10 10:05:18 +01:00
Knut Sveidqvist
a3fa318edc Merge pull request #429 from daveaglick/master
Uses an empty text node instead of a string for svg group labels
2016-12-10 10:05:01 +01:00
Dave Glick
0187407cff Uses an empty text node instead of a string for svg group labels 2016-12-09 15:47:26 -05:00
whyzdev
1424ff7d22 fix karma tests where text.textwrap is undefined; added textPlacement parameters to some test cases 2016-12-07 21:46:58 -05:00
whyzdev
db62447c98 fix logger to display exception stack includig message not just {} 2016-12-07 20:26:22 -05:00
whyzdev
b96ae68aee added byTspan in _drawText candidate function, which uses d3textwrap and align middle vertically by setting text.y 2016-12-07 20:26:22 -05:00
Scott Larkin
7d3f0da75c Create .codeclimate.yml
Created a Code Climate config that uses your existing ESLint configuration (also, enabled our Duplication engine).
2016-12-05 16:06:17 -05:00
Knut Sveidqvist
4984f9e041 Merge pull request #423 from whyzdev/issue422_seq_actor_text_placement_by_fo
#422 use foreignObject/div to place actor label in sequence diagram
2016-12-02 13:25:59 +01:00
whyzdev
1e27238083 fix non-fo y position as before 2016-12-01 20:09:57 -05:00
whyzdev
1e41cea107 use foreignObject/div to place actor label in sequence diagram, enabled by config.textPlacement:fo 2016-12-01 01:00:53 -05:00
Knut Sveidqvist
da99d3b15e Merge pull request #413 from sifb/patch-1
Clarify the need for a CSS stylesheet
2016-11-25 18:55:40 +01:00
sifb
a0dafb4093 Clarify the need for a CSS stylesheet
Issue #273 says "the need for mermaid.css should be mentioned explicitly in the intro docs" - I ran into this problem as well, because I read `mermaid.min.js This bundle contains everything you need to run mermaid` very literally, but it doesn't contain everything and it needs a stylesheet as well.

This edit tries to make that more clear.
2016-11-24 21:26:07 +00:00
Knut Sveidqvist
f5485c1265 Merge pull request #412 from sinedied/master
Added hads downstream project
2016-11-20 10:22:33 +01:00
Yohan Lasorsa
24da004bd6 Added hads downstream project 2016-11-17 17:10:50 +01:00
Knut Sveidqvist
e8f28b71f7 Merge pull request #406 from jinntrance/master
update usage and fix #273
2016-11-06 22:42:10 +01:00
Knut Sveidqvist
fa91653beb Merge pull request #404 from raghur/docs-downstream-pandoc-filter
Add https://github.com/raghur/mermaid-filter to downstream projects docs page
2016-11-06 22:40:56 +01:00
Joseph Jin-Chuan Tang
aa93860466 update usage and fix #273 2016-11-07 01:00:13 +08:00
Raghu Rajagopalan
ea26bd0ff2 Add https://github.com/raghur/mermaid-filter to downstream projects documentation page 2016-11-03 09:15:46 +05:30
Knut Sveidqvist
214fc1d8c4 Fix for issue #400, added unix new line at the end of generated svg 2016-10-31 20:34:34 +01:00
Knut Sveidqvist
09558e6e9a Merge branch 'master' of https://github.com/knsv/mermaid 2016-10-30 16:13:11 +01:00
Knut Sveidqvist
cc069d3987 Some change 2016-10-30 16:13:06 +01:00
Knut Sveidqvist
db3dc0ffab Merge pull request #395 from sinedied/master
New neutral theme
2016-10-05 20:05:13 +02:00
Yohan Lasorsa
6a6d6b6f85 Added neutral style 2016-10-05 15:20:58 +02:00
Knut Sveidqvist
605d74dd0d Merge pull request #390 from ben-page/cli-fix
fix cli issues
2016-09-29 07:34:07 +02:00
Ben Page
0c62c08abd fixed css, sequenceConfig, and ganttConfig being sent as buffer to phantomjs
made verbose cli argument a boolean
2016-09-28 15:08:46 -05:00
Knut Sveidqvist
aa6e15e3ac Merge pull request #386 from The-Alchemist/patch-1
Add missing space for 'Labels out of bounds' section
2016-09-02 07:43:17 +02:00
Knut Sveidqvist
537cba4bda Merge pull request #382 from swhgoon/patch-1
Fix typo: `pats` -> `paths`
2016-09-02 07:42:24 +02:00
The Alchemist
7e9419f299 Add missing space for 'Labels out of bounds' section
If you go to http://knsv.github.io/mermaid/#simple-usage-on-a-web-page, you'll see that the '###' did not get translated, probably because there needs to be a space between '###' and the text.
2016-09-01 15:48:49 -04:00
SwhGo_oN
d59ac53f64 Fix typo: pats -> paths 2016-08-29 20:15:04 +08:00
Knut Sveidqvist
92c7fe9bf6 Merge pull request #379 from HustLion/master
Added class diagram example to README.md
2016-07-27 18:31:34 +02:00
HustLion
3f2cd65159 made a better shot 2016-07-27 20:01:01 +08:00
HustLion
da717b5a91 reindent loop 2016-07-27 19:57:50 +08:00
HustLion
e277f286c0 td style not accepted, so use p style 2016-07-27 19:55:39 +08:00
HustLion
d45e21a786 Adjust img to make it look better 2016-07-27 19:49:35 +08:00
HustLion
22fc99d521 Reformat code block 2016-07-27 19:31:21 +08:00
HustLion
1026ad7011 Add Class-diagram example 2016-07-27 19:29:15 +08:00
Knut Sveidqvist
f9491ef193 Merge pull request #376 from dodoinblue/enhance-arrowhead-style
override normal flowchart arrowhead to allow css styling
2016-07-20 12:25:29 +02:00
Charles Liu
5302ca38da override normal flowchart arrowhead to allow css styling 2016-07-20 13:19:27 +08:00
Knut Sveidqvist
2830c70140 Merge pull request #371 from mgaitan/patch-1
added sphinx extension
2016-07-10 21:49:49 +02:00
Knut Sveidqvist
5e2d8d1c90 Merge pull request #369 from ggpasqualino/master
Fix typo in the sequence diagram documentation
2016-07-10 21:44:09 +02:00
Martín Gaitán
65797742ef added sphinx extension 2016-07-09 12:04:41 -03:00
Guilherme Pasqualino
1a5a52358e Merge pull request #1 from ggpasqualino/ggpasqualino-patch-1
Fix typo in sequence diagram documentation
2016-07-07 11:10:26 +02:00
Guilherme Pasqualino
5852fc2d68 Fix typo in sequence diagram documentation 2016-07-07 11:08:26 +02:00
Knut Sveidqvist
b8d3b01f64 New release 2016-05-29 19:25:02 +02:00
Knut Sveidqvist
165d43b0cd New release 2016-05-29 19:22:10 +02:00
Knut Sveidqvist
d8929db208 New release 2016-05-29 19:18:04 +02:00
Knut Sveidqvist
0ab0be01c2 Merge pull request #353 from zeroyonichihachi/gantt-width
The option of gantt for the spaces for the section names.
2016-05-25 13:59:27 +02:00
tkfm.yamaguchi
f2e4b922a9 Fix tests 2016-05-23 11:45:47 +09:00
tkfm.yamaguchi
a7e5db6e19 Fix API: gantt's side paddings 2016-05-23 11:44:46 +09:00
tkfm.yamaguchi
e8be61e062 Add example for side span of gantt 2016-05-23 11:23:49 +09:00
tkfm.yamaguchi
0cd04af6a4 Replace sidePadding with left/rightPadding 2016-05-23 11:21:38 +09:00
Knut Sveidqvist
23105211f8 Merge pull request #349 from AsaAyers/master
Remove the text-shadows that make the text look blurry
2016-05-08 23:02:42 +02:00
Knut Sveidqvist
618bc4fbc2 Merge pull request #350 from raghur/gitgraph-updates
Gitgraph: Make reset work with parent ref carets
2016-05-08 20:05:19 +02:00
Raghu Rajagopalan
cbefb716e3 Make reset work with parent ref carets 2016-05-07 11:31:05 +05:30
Asa Ayers
d2cecca297 Remove the text-shadows that make the text look blurry 2016-05-04 13:55:50 -04:00
Knut Sveidqvist
8f8856b767 Merge pull request #346 from AlanHohn/line-interpolation
add line interpolation to linkStyle in flowchart
2016-04-29 07:39:32 +02:00
Alan Hohn
00682160b6 add line interpolation to linkStyle in flowchart 2016-04-28 20:59:09 -04:00
Knut Sveidqvist
6ffef61afc Merge pull request #344 from raghur/options
Support git graph diagrams in mermaid
2016-04-28 15:48:35 +02:00
Raghu Rajagopalan
75c9debb5e fix branching lines 2016-04-28 11:27:52 +05:30
Raghu Rajagopalan
6521cc81fe formatting clean up 2016-04-28 11:27:24 +05:30
Raghu Rajagopalan
b634439765 infer svg height, width from # of nodes 2016-04-27 10:05:50 +05:30
Raghu Rajagopalan
1d8d42ad08 Show commit msg if available in BT orientation 2016-04-27 09:47:39 +05:30
Raghu Rajagopalan
4e26b8e645 Support different colors for each branch 2016-04-27 09:27:56 +05:30
Raghu Rajagopalan
6a674a0a40 add support for BT rendering 2016-04-26 22:53:38 +05:30
Raghu Rajagopalan
a5a3bc8b7c fix logging output in prettyprint 2016-04-26 22:52:27 +05:30
Raghu Rajagopalan
6ff536fca7 fix eslintrc so eslint doesn't barf - duplicated keys 2016-04-25 16:35:20 +05:30
Raghu Rajagopalan
719ee2e001 fix more eslint issues 2016-04-25 16:34:45 +05:30
Raghu Rajagopalan
6c28c55ea7 Update node label distance. 2016-04-25 13:01:17 +05:30
Raghu Rajagopalan
6032e05581 fix eslint issues. 2016-04-25 12:38:48 +05:30
Raghu Rajagopalan
0538048f24 add case block for mermaid api parser. 2016-04-25 11:36:36 +05:30
Raghu Rajagopalan
89307d3f13 foreignObject works. labels work! Yeah! 2016-04-25 11:36:36 +05:30
Raghu Rajagopalan
5dcd3e6f35 Apply commit and branch labels using foreignObjects.
Only works in browser.
2016-04-25 11:36:36 +05:30
Raghu Rajagopalan
59ef2b0d4f Options are working. 2016-04-25 11:36:36 +05:30
Raghu Rajagopalan
a92e116a21 remove magic nos in renderer 2016-04-25 11:36:36 +05:30
Raghu Rajagopalan
d8805ae4d7 WIP - prettier curves. 2016-04-25 11:36:36 +05:30
Raghu Rajagopalan
942bd02add handle multiple branches; handle unmerged branches 2016-04-25 11:36:36 +05:30
Raghu Rajagopalan
0d6d848325 WIP - code simplified. Draw arrows later. still ugly 2016-04-25 11:36:36 +05:30
Raghu Rajagopalan
c6494f92fa draw bezier curves - still butt ugly 2016-04-25 11:36:36 +05:30
Raghu Rajagopalan
9cb9407e1c working but ugly 2016-04-25 11:36:36 +05:30
Raghu Rajagopalan
43ab44d8ba fix LR layout - node position and arrow direction. 2016-04-25 11:36:36 +05:30
Raghu Rajagopalan
c2bc3317c3 WIP - basic arrows. 2016-04-25 11:36:36 +05:30
Raghu Rajagopalan
413c6e12f5 WIP - Bug - shows only 5 of 6 nodes with test file. 2016-04-25 11:36:36 +05:30
Raghu Rajagopalan
65140f6b3f WIP - able to draw circles now. 2016-04-25 11:36:36 +05:30
Raghu Rajagopalan
2fee6e62aa WIP - scaffolding for rendering gitgraph. 2016-04-25 11:36:36 +05:30
Raghu Rajagopalan
4b91dbfed6 gitgraph.jison - handle LF & CRLF as line endings 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
e17b35a96a WIP-hook up a renderer 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
44dc30c02c add pretty print function 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
038062b3c3 fix bug in tracking parent commits 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
5cb44d55ff logger improvements - allow multiple args 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
8befe916fb WIP - pretty print commit on console 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
d3caa9b97d handle merge commits in history walk 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
2d99ccfcda Handle merge commit with two parents 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
92be61dc48 make logger print object instead of string concatentation 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
2fecb4d945 handle case when merge is a noop 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
462c3d3a6c handle fast forward merges 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
422d78cbcd basic reset command 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
7b0e2513bd refactor fns in ast 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
f8f0454f33 add another test for checkout 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
d937a3c552 support orientation, commit msg, branch checkout 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
dbd2855bfc first couple of tests for the half baked parser 2016-04-25 11:35:44 +05:30
Raghu Rajagopalan
8084d80d64 WIP - very basic grammar 2016-04-25 11:35:44 +05:30
Knut Sveidqvist
d585121bdb Merge pull request #338 from ssbarnea/master
Build and test execution changes
2016-03-29 20:00:34 +02:00
Knut Sveidqvist
9e496175d9 Merge pull request #331 from Jmuccigr/master
Reformatting of css files
2016-03-29 19:59:00 +02:00
Sorin Sbarnea
e6fcc2b3e3 Added LTS and current STABLE versions of nodejs to Travis test matrix. 2016-03-29 14:16:25 +01:00
Sorin Sbarnea
f748969186 Removed dist/ directory from source as is not supposed to be tracked here. 2016-03-29 14:15:48 +01:00
Sorin Sbarnea
4750769c63 Configured travis to use an osx_image which has nvm preinstalled. 2016-03-29 12:54:58 +01:00
Sorin Sbarnea
8c5c2b0fe1 Attempt to convince Travis to install the missing nvm 2016-03-29 12:49:17 +01:00
Sorin Sbarnea
1b04dbf7f9 Fixed .gitignore 2016-03-29 12:41:57 +01:00
Sorin Sbarnea
97e208f081 Enabled OS X build on Travis. 2016-03-29 12:37:46 +01:00
Knut Sveidqvist
2de974f71d Merge remote-tracking branch 'origin/master'
# Conflicts:
#	dist/mermaid.js
#	dist/mermaid.min.js
#	dist/mermaid.slim.js
#	dist/mermaid.slim.min.js
#	dist/mermaidAPI.js
#	dist/mermaidAPI.min.js
#	dist/mermaidAPI.slim.js
#	dist/mermaidAPI.slim.min.js
2016-03-23 20:35:34 +01:00
Knut Sveidqvist
bda1aaa5db Draft fix for issue #304 2016-03-23 20:34:44 +01:00
John Muccigrosso
b69010d83b Merge pull request #2 from Jmuccigr/patch-2
Reformat with no changes to content.
2016-03-21 19:16:14 -04:00
John Muccigrosso
2e3bc443ff Merge pull request #1 from Jmuccigr/patch-1
Reformat with no changes to content.
2016-03-21 19:15:14 -04:00
John Muccigrosso
d2e3517c78 Reformat with no changes to content. 2016-03-21 19:11:38 -04:00
John Muccigrosso
e930c5a30c Reformat with no changes to content. 2016-03-21 19:10:33 -04:00
Knut Sveidqvist
fb500ace8a Merge pull request #320 from bronsoja/seq-diagram-title-support
(WIP) Sequence Diagram Title Support
2016-03-16 19:40:59 +01:00
Josh Bronson
4f9a2a8083 Update dist files 2016-03-14 18:09:27 -04:00
Josh Bronson
2acaef67b1 Support title in parser, add to renderer, with naive positioning logic 2016-03-14 17:51:03 -04:00
Knut Sveidqvist
1ad9e75a86 Merge pull request #318 from ciekawy/activation_draft
activations doc + few fixes
2016-03-14 07:20:15 +01:00
Knut Sveidqvist
e9c6db4d8c Merge pull request #317 from crodriguez1a/feature/dark-theme
Dark theme for better contrast on darker backgrounds
2016-03-14 07:14:37 +01:00
Szymon Stasik
d070029856 activations doc 2016-03-12 19:54:09 +01:00
Szymon Stasik
68b65ba5d4 adjust activation after message to self 2016-03-12 19:40:45 +01:00
Szymon Stasik
c3f840126c fix loop/block bounds with activations through them 2016-03-12 19:33:35 +01:00
Carlos Rodriguez
7404de6776 fix bad spacing 2016-03-12 13:24:53 -05:00
Carlos Rodriguez
d763fffd7a some clean up, fix mix.html 404 2016-03-12 13:23:31 -05:00
Szymon Stasik
0435509952 fix message to self with activation 2016-03-12 18:39:49 +01:00
Carlos Rodriguez
bba1050e5e Use mix as test file instead 2016-03-12 12:36:37 -05:00
Carlos Rodriguez
28f9e6f17b Starting with gantt theme 2016-03-12 12:00:47 -05:00
Knut Sveidqvist
b3d147b97a Merge pull request #316 from ciekawy/activation_draft
Activations
2016-03-12 16:41:43 +01:00
Szymon Stasik
3f85391bde better align activation box start 2016-03-12 15:50:11 +01:00
Szymon Stasik
513c35d0ef handle one line arrow activation notation 2016-03-12 15:27:37 +01:00
Szymon Stasik
499a2582e6 fix deactivating proper actor from activation stack 2016-03-12 13:58:22 +01:00
knsv
d6363e908d Fix for issue with rednering in IE as described in #303 2016-03-12 11:28:14 +01:00
knsv
325d0dd075 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	dist/mermaid.js
2016-03-12 11:24:22 +01:00
knsv
2c90034d39 Fix for issue with rednering in IE as described in #303 2016-03-12 11:23:57 +01:00
Szymon Stasik
614e9f4b87 draw activation boxes 2016-03-11 16:44:45 +01:00
Szymon Stasik
2452532557 draft of activation boxes handling 2016-03-08 10:40:52 +01:00
Knut Sveidqvist
6c621f243d Merge pull request #312 from ashsearle/master
Support leading comments for sequenceDiagrams
2016-03-04 07:16:02 +01:00
Ash Searle
9cedbea2cf Support leading comments for sequenceDiagrams 2016-03-02 17:26:21 +00:00
Knut Sveidqvist
2168cce020 Merge pull request #309 from ashsearle/master
Show a little lenience for white-space around names
2016-02-29 07:55:48 +01:00
Ash Searle
7858186ecd Show a little lenience for white-space around names 2016-02-28 18:44:14 +00:00
Knut Sveidqvist
d2e9918e5f Merge pull request #307 from maxArturo/add-to-downstream-projs
Update list of downstream projects
2016-02-27 16:21:10 +01:00
Max Arturo AS
9a7b498818 Update list of downstream projects
Add [Previm](https://github.com/kannokanno/previm), allows live viewing of mermaid diagrams + .md from vim
2016-02-24 11:27:24 -06:00
Knut Sveidqvist
3ff23b3c45 Merge pull request #300 from LarryKlugerDS/master
Issue 299: Sequence diagram Loops: changing boxMargin spoils the "loop" notation
2016-02-10 16:51:16 +01:00
LarryKlugerDS
0f7dda9dfc #296 Further edit of build instructions 2016-02-10 09:10:15 +02:00
LarryKlugerDS
eef6eb93f8 Issue #296 -- better build instructions 2016-02-10 09:08:19 +02:00
LarryKlugerDS
31f78d1aa9 Issue 299: Sequence diagram Loops: changing boxMargin spoils the "loop" notation
In Sequence diagrams, a loop section draws a box with the word "loop"
in the top left corner. This is all good. In addition, the title of the
loop is in the center of the box, near the top of the box.

To add a bit of margin between the Loop title and the line at the top
of the box, change the configuration field boxMargin

Problem: by error, the boxMargin is also used for positioning the
"loop" label. SInce the loop label is in a fixed small place, changing
boxMargin causes the word "loop" to move out of its box.
2016-02-10 08:33:12 +02:00
Knut Sveidqvist
193ee657e6 Merge pull request #298 from LarryKlugerDS/master
Issue 297 - src/mermaid.js generates bad code
2016-02-10 07:22:17 +01:00
LarryKlugerDS
b5a030c78d Issue 297 - src/mermaid.js generates bad code 2016-02-10 08:16:03 +02:00
Knut Sveidqvist
5e447e8938 Merge pull request #295 from LarryKlugerDS/master
Updated instructions for running tests
2016-02-09 19:14:41 +01:00
Knut Sveidqvist
b495a7d834 Merge pull request #288 from tylerlong/master
Add Markdown Plus to Downstream projects
2016-02-09 19:13:56 +01:00
LarryKlugerDS
9aa4a79d6e Updated instructions for running tests 2016-02-09 20:11:10 +02:00
Tyler Long
cabd0769a8 Add Markdown Plus to Downstream projects
Markdown Plus is a markdown editor with extra features. The frontend is open source under MIT license. It provides apps for OS X and Windows for purchase.
2016-02-02 09:39:50 +08:00
Knut Sveidqvist
803916c99b Merge pull request #286 from raghur/master
Quote phantomPath so that it doesn't fail on window
2016-02-01 20:31:17 +01:00
Raghu
54433ee555 Quote phantomPath so that it doesn't fail on window
Quote phantomPath so that it doesn't fail on windows when path has spaces. Fixes #236
2016-02-01 11:02:01 +05:30
Knut Sveidqvist
6ee298dc7d New release 2016-01-27 15:02:41 +01:00
knsv
9bd140ce42 Fix for issue windows builds as described in #284 2016-01-26 18:03:58 +01:00
knsv
f005c72669 Fix for issue #281, support for Chrome v 48 2016-01-25 18:59:03 +01:00
knsv
d56af022c1 Fix for issue #262 2015-12-27 15:57:11 +01:00
knsv
cc8c5aecaf Fix for issue #271 2015-12-27 14:18:21 +01:00
knsv
8c8f5928f5 Changes to build environment for windows compatability 2015-12-26 10:59:44 +01:00
Knut Sveidqvist
ab38e17936 Merge pull request #267 from Anoia/master
gh-50 Allow styling of edge labels in css
2015-12-08 22:45:45 +01:00
esther.machata
52fcd18e6a gh-50 Allow styling of edge labels in css 2015-12-08 17:26:17 +01:00
Knut Sveidqvist
9fb980ab2c Merge pull request #265 from gibson042/sequenceDiagram-alias
Allow sequenceDiagram participant aliasing
2015-12-06 13:42:53 +01:00
Richard Gibson
b42939796c Allow sequenceDiagram participant aliasing
Fixes gh-263
2015-12-06 05:53:08 -05:00
Richard Gibson
69ce29841d Test for sequenceDiagram participant aliasing 2015-12-06 05:51:02 -05:00
knsv
425a83c0da Fix for issue #259 2015-11-22 18:55:37 +01:00
knsv
a9f4f8e06c Fix for issue #259 2015-11-22 18:53:09 +01:00
knsv
989ff03e43 Set version to 0.5.6
Removed logging
One more iteration in handling of parser API
2015-11-22 18:10:38 +01:00
knsv
64b0517bac Added missing karma dependencies 2015-11-21 12:20:37 +01:00
knsv
f52fa46326 Added missing karma dependencies 2015-11-21 11:58:16 +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
knsv
4a5828c732 Version change of d3 to 3.5.6 2015-11-11 20:15:02 +01:00
knsv
774ebfe671 Version change of babelify 2015-11-11 18:37:53 +01:00
knsv
6e2534aa77 Labels for relations between classes in classdiagrams 2015-11-11 16:19:06 +01:00
knsv
ad4e0a2ad5 Labels for relations between classes in classdiagrams 2015-11-11 13:16:38 +01:00
knsv
24d1afd40f Redering arrow heads depending on relation defined in class diagram. 2015-11-07 10:00:40 +01:00
Knut Sveidqvist
2278325822 Merge pull request #253 from gibson042/optional-terminal-newline
Make sequenceDiagram terminal newline optional
2015-11-06 20:17:19 +01:00
Knut Sveidqvist
49c13f19ff Merge pull request #252 from gibson042/sequenceDiagram-over
Support sequenceDiagram "over" notes
2015-11-06 20:16:24 +01:00
Richard Gibson
dbd63ff797 Make sequenceDiagram terminal newline optional
Fixes gh-229
2015-11-06 10:47:59 -05:00
Richard Gibson
a59a5a2402 Update documentation 2015-11-06 10:24:51 -05:00
Richard Gibson
26ebbf82ee Support sequenceDiagram "over" notes 2015-11-06 03:00:02 -05:00
knsv
76130bc485 Updated distribution after PR #251 2015-11-06 07:36:14 +01:00
knsv
f79577c816 Merge remote-tracking branch 'origin/master' 2015-11-06 07:23:44 +01:00
Knut Sveidqvist
ecca3588bc Merge pull request #251 from gibson042/gh-247
Properly handle "rest of line" statements
2015-11-06 07:23:23 +01:00
Knut Sveidqvist
34209db57b Merge pull request #250 from gibson042/exit-code
CLI: Propagate exit code from lib (i.e., phantomjs)
2015-11-06 07:11:26 +01:00
Richard Gibson
ec37fc897b Clean up lexer definitions 2015-11-06 00:05:16 -05:00
Richard Gibson
5666d5f298 Properly handle "rest of line" statements
Closes gh-247
2015-11-06 00:05:00 -05:00
Richard Gibson
6ac0c00e30 Add no-label test cases 2015-11-06 00:04:01 -05:00
Richard Gibson
990cab53a9 Add special-character test cases 2015-11-06 00:04:01 -05:00
Richard Gibson
18766466c6 Minor test cleanup 2015-11-06 00:04:01 -05:00
Richard Gibson
73e1957c62 Be explicit about testing semicolons 2015-11-06 00:04:00 -05:00
Richard Gibson
e0a31feaec Make testing quieter 2015-11-06 00:04:00 -05:00
Richard Gibson
c62061090a CLI: Propagate exit code from lib (i.e., phantomjs) 2015-11-05 15:50:59 -05:00
Tomasz Szczęśniak-Szlagowski
0f689c2ea1 Commit built files 2015-11-05 19:40:42 +00: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
c8fef693fa Added extension markers for classDiagrams
Added styling (forest) for classDiagrams
2015-11-04 20:38:14 +01:00
knsv
a9ac654040 Class diagram example 2015-11-04 16:36:19 +01:00
Knut Sveidqvist
17be68f5d9 Merge pull request #244 from ma-zal/master
flowRender.js - Fix FontAwesome icon insert
2015-11-04 16:21:18 +01:00
Martin Zaloudek
5d7815c98a flowRender.js - Fix fontAwesome icon insert
Missing ending tag </i> in fontAwesome icon inserting.
2015-11-04 15:46:31 +01:00
knsv
7fe5b5af7a Rendering of class diagrams with methods and members represented 2015-11-01 19:00:14 +01:00
knsv
068b7ce6a9 Simple rendering of class diagrams 2015-10-30 11:34:24 +01:00
knsv
eec89e0442 Merge remote-tracking branch 'origin/master' 2015-10-30 10:47:51 +01:00
knsv
7a58e8261f Simple rendering of class diagrams 2015-10-30 10:47:25 +01:00
Knut Sveidqvist
eec0aced7f Merge pull request #240 from r-a-v-a-s/patch-1
updated links in README.md
2015-10-30 08:47:27 +01:00
ravas
74eb2e4493 updated links in README.md 2015-10-29 23:06:36 -07:00
knsv
01ddfea478 1st version parsing for class diagrams, parsing draft completed, starting rendering work 2015-10-29 07:49:08 +01:00
knsv
a694f61003 1st version parsing for class diagrams, fetching data from parsing 2015-10-28 08:12:47 +01:00
Knut Sveidqvist
d3a025acd6 Merge pull request #237 from spect88/ellipse-syntax
Ellipse syntax
2015-10-27 07:23:40 +01:00
Tomasz Szczęśniak-Szlagowski
51d5c90c9f Add build with new ellipse syntax 2015-10-26 23:03:07 +00:00
Tomasz Szczęśniak-Szlagowski
e4d25ed9cd Add support for node(-ellipse shape-) in flow charts 2015-10-26 23:03:07 +00:00
knsv
1a60b6e412 1st version parsing for class diagrams 2015-10-26 08:03:30 +01:00
knsv
dd6495abf6 1st version parsing for class diagrams 2015-10-25 18:09:58 +01:00
knsv
35865ba70e Starting work with addition of class diagrams 2015-10-25 11:35:26 +01:00
Knut Sveidqvist
cee267193f Merge pull request #235 from spect88/fix-keyword-suffix
Allow keywords as suffixes of node ids
2015-10-25 07:38:14 +01:00
Tomasz Szczęśniak-Szlagowski
30149df88e Allow node ids with keywords as suffixes
I've extracted alpha and punctuation characters from the huge regex and
made multiple occurences of alpha characters be recognised as a single
ALPHA token.

This way everything should work just like before, with the
difference that alpha strings will swallow keywords, ie. `spend` is
`ALPHA`, while previously it would have been `ALPHA ALPHA end`.
2015-10-24 22:25:13 +01:00
Tomasz Szczęśniak-Szlagowski
841aea9d97 Add changes in generated files after jison update 2015-10-24 21:33:19 +01:00
knsv
d68323d7bb Using the latest jison in build 2015-10-24 20:45:42 +02:00
knsv
a583daf712 Using the latest jison in build 2015-10-24 20:33:52 +02:00
knsv
cf1912523b Using the latest jison in build 2015-10-24 20:27:54 +02:00
knsv
eecd56d6e0 Fix for issue #229, poor handling of activities in a gantt diagram where one activities follows a yet undefined activity. 2015-10-24 12:44:47 +02:00
Knut Sveidqvist
1cd1423780 Merge pull request #230 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-10-23 20:13:16 +02:00
The Gitter Badger
68812b0f04 Add Gitter badge 2015-10-23 18:12:08 +00:00
knsv
c9d29c16e2 New release 2015-10-21 21:14:41 +02:00
Knut Sveidqvist
185233c971 Merge pull request #228 from tylerlong/master
Fix a typo: crosshead --> arrowhead
2015-10-21 16:19:00 +02:00
Tyler Long
ca42976c62 Merge pull request #1 from tylerlong/tylerlong-patch-1
Fix a typo: crosshead --> arrowhead
2015-10-21 03:08:29 -07:00
Tyler Long
9ff2b35ae0 Fix a typo: crosshead --> arrowhead
Fix https://github.com/knsv/mermaid/issues/227
2015-10-21 18:07:51 +08:00
knsv
ecb12ae2a8 New release 2015-10-19 22:08:17 +02:00
knsv
b43e695da2 Fix for issue #204, added width option to the CLI. Default value for width is 1200.
Added logger using es6 syntax
2015-10-19 21:36:55 +02:00
knsv
57b731842b Fixed uglify command 2015-10-17 15:21:34 +02:00
knsv
a8ef091cd6 Fixed uglify command 2015-10-17 15:12:59 +02:00
knsv
315923d1d3 Modernization of build environment, better linting, adjustment after stricter static rules, cleanup of package.json 2015-10-17 12:46:36 +02: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
2417741283 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	dist/mermaid.js
#	dist/mermaid.min.js
#	dist/mermaid.slim.js
#	dist/mermaid.slim.min.js
#	dist/mermaidAPI.js
#	dist/mermaidAPI.slim.js
#	dist/mermaidAPI.slim.min.js
#	package.json
2015-10-15 07:21:30 +02:00
Knut Sveidqvist
e0033965bc Merge pull request #224 from spect88/fix-end-substring
Allow `end` as a substring of vertex id
2015-10-15 07:16:59 +02:00
Knut Sveidqvist
ae73583d53 Merge pull request #223 from spect88/remove-duplicate-dependencies
Remove duplicate npm dependencies: d3 and he
2015-10-15 07:14:49 +02:00
Tomasz Szczęśniak-Szlagowski
b87764ed94 Allow end as a substring of vertex id
Jison adds \b (word boundary) to literal string patterns by default.
It does so, because it doesn't follow traditional match-longest
approach, but does match-first instead. Without including word
boundaries, it'd be hard to distinguish between a keyword and
identifier.

The pattern for `end` keyword is not a simple string literal - it
swallows trailing whitespace, so we have to add \b manually.

This partially fixes #184 - at least now `end` behaves the same as other
keywords: it can be used as a prefix and infix, but not as a suffix.

To solve this issue completely, ALPHA pattern would have to match
multiple letters, which is a much bigger change.
2015-10-15 00:31:18 +01:00
Tomasz Szczęśniak-Szlagowski
7e9e9cc98c Remove duplicate npm dependencies: d3 and he
These are already defined as dependencies (same versions), so there's
no point keeping them as devDependencies. npm complains about that.
2015-10-14 21:52:41 +01:00
knsv
658ed3d790 Modernization of build environment. Less gulp, more npm. Eslint. 2015-10-12 07:37:02 +02:00
knsv
ed65e6df3b Draft of font-awesome support as described in issue #49. 2015-10-07 18:35:30 +02:00
knsv
16906ee242 New version 2015-10-04 23:28:37 +02:00
knsv
a611ff3abd New version 2015-10-04 23:09:00 +02:00
knsv
8258fb059c Fix for defect #180, SVG foreignObject rendering 2015-10-04 21:18:05 +02:00
knsv
122274bf52 Fix of broken tests 2015-10-04 19:30:53 +02:00
knsv
c5d41c5a21 Added support for entity codes for sequence diagrams so that it for instance is possible to represent a " with #quot; and a heart with #9829;. This as referenced in issue #74 and issue #193. 2015-10-04 14:05:53 +02:00
knsv
a2b6bc5213 Added support for entity codes so that it for instance is possible to represent a " with #quot; and a heart with #9829; This differs from the regular html codes in that the leading & isreplaced with a dsh and for dec codes dropped. This as referenced in issue #219. 2015-10-03 21:50:32 +02:00
knsv
cb5e88c2f1 Documentation of usage of the mermaidAPI and binding user interaction events 2015-10-03 16:53:27 +02:00
knsv
8bc3bdd300 Added styling for mermaid tooltips
Adjustments of tooltip positioning for large documents

Documentation of tooltips
2015-10-03 16:30:50 +02:00
knsv
b3fa6378bd Reenabled all tests.
Subgraph issue with ids written as title resolved.
2015-10-02 00:21:38 +02:00
knsv
e406fda9cd Draft implementation of tooltips and hyperlinks as described in issue #34. More tests and documentation to follow. 2015-10-02 00:18:47 +02:00
knsv
30a755221b Fix for broken build 2015-09-27 20:51:22 +02:00
knsv
40efbc5b84 Fix for issue #210, classDef broken also added some documentation on how to predefine classes in the css and set them from the graph definition. 2015-09-26 18:32:35 +02:00
knsv
dc1a6ba8b5 Wit 2015-09-26 18:30:13 +02:00
knsv
709ebe524d New docs and updated dist 2015-09-26 13:00:30 +02:00
knsv
fb94aaaa6f Fix for issue #209, missing links when baste tag is used
Fix for issue #195, text wrap in sequence diagrams drops last word
Documentation
2015-09-26 12:09:47 +02:00
knsv
bae1e80ac0 Updated package.json 2015-09-24 18:41:38 +02:00
knsv
4536930e17 New style docs 2015-09-24 08:04:06 +02:00
knsv
189325508e Usage of path.join for adding styles as per suggestions from @fardog 2015-09-16 07:30:25 +02:00
Knut Sveidqvist
c81e933dc3 Merge pull request #205 from gillesdemey/dev-default-style
Default style when using the CLI
2015-09-16 07:23:39 +02:00
Gilles De Mey
85481b2310 Added test for using a default style 2015-09-15 19:22:07 +02:00
Gilles De Mey
b04f198f3e auto width for the default style 2015-09-15 19:11:05 +02:00
Gilles De Mey
a989b5ccde fall back to using the default mermaid style 2015-09-15 19:10:53 +02:00
Knut Sveidqvist
4ee0f9b6be Merge pull request #198 from dbrans/master
Gantt chart - add minutes and seconds durations
2015-08-29 18:50:34 +02:00
Derek Brans
1d371e0a1e Gantt chart - add minutes and seconds durations 2015-08-25 14:49:56 -07:00
knsv
3ec7c6d18b Fix for being able to use the character v in node ids as described in issue #192 2015-07-23 15:33:26 +02:00
Knut Sveidqvist
80912ffaee Merge pull request #190 from bollwyvl/amd
Using QUnit for AMD testing
2015-07-22 08:46:51 +02:00
Nicholas Bollweg
4777fe0d91 doing build before test 2015-07-22 01:15:05 -04:00
Nicholas Bollweg
feddb6d048 fixing weird sort, travis bait 2015-07-22 01:00:45 -04:00
Nicholas Bollweg
b148ec0850 restoring standalone 2015-07-22 00:47:03 -04:00
Nicholas Bollweg
1a36ed9786 adding failing test for requirejs 2015-07-22 00:36:31 -04:00
knsv
1b7ad1fc38 Beta fix for binding of click events when using the render function as discussed in issue #188. (Try num 2) 2015-07-18 00:40:42 +02:00
knsv
71d4113ecf Beta fix for binding of click events when using the render function as discussed in issue #188. 2015-07-17 23:13:40 +02:00
knsv
ed712fa673 Fix for startOnLoad issues 2015-07-15 11:59:01 +02:00
knsv
fcb2af780d Added callback to be called after each diagram is rendered as described in issue #176 2015-07-15 11:39:46 +02:00
knsv
a8c8f9a472 Set height of actor line height in sequenceDiagrams as discussed in issue #181 2015-07-04 10:00:14 +02:00
knsv
ab1dd1e549 Fix of broken logger 2015-07-04 09:30:26 +02:00
knsv
145983fc5d Merge remote-tracking branch 'origin/master' 2015-07-03 08:53:10 +02:00
knsv
9fb45a3ab7 Cleanup 2015-07-03 08:52:55 +02:00
knsv
b97e5ff5b0 Cleanup 2015-07-03 08:52:34 +02:00
knsv
0ca04671ed New version of docs 2015-07-03 08:52:01 +02:00
knsv
6e062b241e New version of docs 2015-07-03 08:51:10 +02:00
knsv
df77276805 New version of docs 2015-07-03 08:50:32 +02:00
Knut Sveidqvist
a85a694cc1 Merge pull request #182 from phairow/master
Update phantomscript.js
2015-07-03 08:39:29 +02:00
phairow
590fa0894b Update phantomscript.js
clean up
2015-07-02 17:52:37 -07:00
phairow
4d7f7d0756 Update phantomscript.js
attempt two at fixing the rendering issue
2015-07-02 17:32:13 -07:00
phairow
af0d40e907 Update phantomscript.js
Computing the display size seems to cause the svg rendering to complete bofore saving the image. Referencing issue #181 https://github.com/knsv/mermaid/issues/181
2015-07-02 14:53:35 -07: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
knsv
0dc983d04a New release 2015-06-21 17:26:19 +02:00
knsv
50219cf2d9 Fix for issues with generating diagrams using the cli: default style for clusters and fixes for autoscaling side effects 2015-06-21 17:25:58 +02:00
knsv
4ed345101a Fix for issue #178, auto-line wrap of notes in sequence diagrams 2015-06-20 20:58:58 +02:00
knsv
e5a701d04d Fix for issue #175 2015-06-16 10:40:08 +02:00
knsv
342b83a010 Fix for issue #174 2015-06-14 14:46:01 +02:00
knsv
eb555f7da6 Deleted dead code and unused code 2015-06-14 09:51:42 +02:00
knsv
8a0c857a92 Merge remote-tracking branch 'origin/master' 2015-06-14 09:39:00 +02:00
knsv
31d5899011 Fix for issue #170 2015-06-14 09:37:59 +02:00
knsv
14520e8bd5 Path fix for jison parser generation 2015-06-14 09:37:25 +02:00
knsv
efb4e464b2 Fix for issue #170 2015-06-14 09:33:48 +02:00
Knut Sveidqvist
6042ca9c56 Merge pull request #172 from kkirsche/patch-1
Remove moot `version` property from bower.json
2015-06-14 09:32:44 +02:00
knsv
e5c16fd960 Added subgraphs in new grammar 2015-06-13 18:34:45 +02:00
knsv
6eb018489e Fix issue with new line in the lexer 2015-06-13 08:19:31 +02:00
knsv
5447a88c34 Cleanup of bundles 2015-06-11 08:22:01 +02:00
Kevin Kirsche
4fbebcfab4 Remove moot version property from bower.json
Per bower/bower.json-spec@a325da3
2015-06-10 18:51:14 -04:00
Knut Sveidqvist
35e4cd7c18 Update README.md 2015-06-07 21:09:09 +02:00
knsv
999430f9e0 New release 2015-06-07 17:05:57 +02:00
knsv
be535604ab Cleanup of bundles 2015-06-07 16:56:09 +02:00
knsv
0703292fb9 Bumped up version and removed logging 2015-06-07 16:51:56 +02:00
Knut Sveidqvist
c0ca932ccf Merge pull request #168 from knsv/dev-0.5.0
Merge of changes in dev-0.5.0 branch into master before release
2015-06-07 09:32:51 +02:00
knsv
08fa19bc83 Updated conf handling
Added initialize function
Moved genric configuration as clonseCssStyles till conf root
Added parse funtion to the mermaidAPI api
2015-06-07 09:21:19 +02:00
knsv
55fa62d9c0 Chineese example 2015-06-06 12:13:55 +02:00
knsv
94e5177bb1 Fixed build issue 2015-05-31 08:19:26 +02:00
knsv
45f34d871b Added option for whether or not to cloneCssStyles as mentioned in issue #157. 2015-05-30 17:20:24 +02:00
knsv
173a2b12aa Fix for issue #150. 2015-05-30 13:00:04 +02:00
knsv
3f0ead3e0a Fix for issue #150 this change makes gant diagram autoscale. 2015-05-30 12:59:20 +02:00
knsv
6864652b80 Initial fix for defect #162. 2015-05-29 08:23:13 +02:00
knsv
ca99a30b71 Example page for using the slim bundle and with some nested subgraphs. 2015-05-28 23:05:49 +02:00
knsv
b2e489b689 Fix for issue #161 concering nested subgraphs and correct labels for each subgraph. 2015-05-28 23:02:41 +02:00
knsv
cf67307711 Fix for build scripts, mermaid full was not including d3. 2015-05-26 21:10:33 +02:00
knsv
2d1f5aa6cb Adding missing files 2015-05-26 20:59:23 +02:00
Knut Sveidqvist
56375faa65 Update README.md 2015-05-26 20:45:30 +02:00
Knut Sveidqvist
1236c0c272 Update README.md 2015-05-26 20:44:44 +02:00
knsv
b4a96c9b21 Render function as mentioned in issue #146, only works in browser context
Updated build scripts
New way for bundling content in dist, tobe tested, currently to be considered beta
2015-05-26 20:41:53 +02:00
knsv
05f3982632 Fix for defect #161, nested subgraphs. 2015-05-15 12:11:36 +02:00
knsv
9face45357 Merge remote-tracking branch 'origin/master'
Conflicts:
	dist/mermaid.full.js
	dist/mermaid.full.min.js
	dist/mermaid.slim.js
	dist/mermaid.slim.min.js
	src/diagrams/gantt/ganttRenderer.js
	test/gantt.html
2015-05-09 19:18:12 +02:00
knsv
824a43f537 Added support for nested subgraphs in grammar, part 1 of issue #161 2015-05-09 19:08:04 +02:00
knsv
ae6bb57cf5 Added support for nested subgraphs in grammar, part 1 of issue #161 2015-05-09 19:05:47 +02:00
knsv
82dffe0a1d Fix for defect #158 2015-04-20 21:22:37 +02:00
knsv
22cee7e4b0 Fix for defect #158 2015-04-20 21:22:05 +02:00
knsv
c65f6aaed3 Merge remote-tracking branch 'origin/master' 2015-04-20 21:21:37 +02:00
knsv
2204d46ce1 Fix for defect #158 2015-04-20 21:21:17 +02:00
Knut Sveidqvist
11a30dd505 Merge pull request #155 from tylerlong/master
IE, local html, cssRules access is denied
2015-04-19 10:14:59 +02:00
Tyler Long
e0d90def93 IE, local html, cssRules access is denied
IE, open html file directly from hard disk(insead of from a http server), cssRules access is denied.

Thus an expection is thrown. But in the catch statement, another one is thrown again thus caused the whole mermaid code break. 

In this line `console.warn('Invalid CSS selector "' + rule.selectorText + '"', err);`  rule is undefined, so exception will be thrown if we don't check.
2015-04-19 15:58:09 +08:00
knsv
f310eb0574 Fix for default arguments to init method 2015-04-11 16:47:14 +02:00
knsv
2bd7dee3c7 Fix for init not running by default 2015-04-11 16:36:04 +02:00
knsv
594e69dd93 Adjusted cli tool for new init functionality 2015-03-29 12:26:47 +02:00
knsv
1fd94f9cf1 Remoed a console.log 2015-03-29 12:08:07 +02:00
knsv
78d8ee01ac #Adjustments of init - **could break some integrations!!**
* Configuration are picked up from the mermaid object and is not passed as arguments. Same handling for all diagram types, sequenceDiagrams were handled in a different way before this commit.

When init is called with:

* 0 arguments - all mermaid divs are processed
* 1 argument - this is interpreted as a definition of what nodes to process
* 2 arguments - for (some) backwards compatability the second argument is interpreted as the definition of nodes to process. The first argument (prrobably a sequence config is ignored)

A definition of nodes to process can be

* a css selector for what elements to be processed
* a list of nodes as in the result of a command like the one below

```
document.querySelectorAll('.tbProcessed');
```
2015-03-29 11:54:54 +02:00
knsv
c966aad496 Fix for subgraphs 2015-03-22 18:36:17 +01:00
knsv
0ed5a01756 Fix fir defect #141 regarding comment characters 2015-03-22 18:02:45 +01:00
knsv
22b9ee4919 Comment handling 2015-03-22 17:51:13 +01:00
knsv
3781dea498 Removed duplicate code 2015-03-15 14:55:16 +01:00
Knut Sveidqvist
60392424dc Merge pull request #139 from skywinder/add-change-log-file
Add automatically generated change log file.
2015-03-14 09:20:35 +01:00
Petr Korolev
23bd06c2d3 Added automatically generated change log file 2015-03-13 11:36:49 +02:00
Knut Sveidqvist
1644f06ec8 Merge pull request #137 from bollwyvl/patch-4
Adding init argument to the global API
2015-03-10 20:44:01 +01:00
bollwyvl
f591fedb77 Adding init argument to the global API
Will also handle future arguments :)
2015-03-10 15:38:53 -04:00
Knut Sveidqvist
b0cf9836af Merge pull request #135 from bollwyvl/patch-2
Allow other forms of node selection for init()
2015-03-10 20:07:58 +01:00
Knut Sveidqvist
34ee8a0e21 Merge pull request #134 from bollwyvl/patch-1
Use a library-level variable for assigning ids
2015-03-10 20:06:43 +01:00
bollwyvl
d61aac362c Allow other forms of node selection for init()
The existing behavior of init will always re-render the whole page, and requires that a chart be classed `mermaid`.

This change allows the user to specify:
- a DOM Node (as from getQuerySelector)
- a DOM NodeList  (as from getQuerySelectorAll)
- an array of nodes (as from jQuery.find)
- a string (to be handed to getQuerySelectorAll)
2015-03-10 13:25:16 -04:00
bollwyvl
6aff481e9b Use a library-level variable for assigning ids
The current behavior is unexpected when re-running `init()`, as every run through will start with the first `.mermaid` it finds, and start re-indexing at 0, irrespective if the original `id=mermaidChart0` is still around.

This change ensures that successive runs will not clobber old ones.
2015-03-10 13:06:39 -04:00
knsv
3ae1b5f1a3 Fix for issue #129 - Possibility to set the width of the generated flowchart 2015-03-07 14:52:18 +01:00
knsv
cbebf126ce Fix for issue #128 - flowchart - styling of edges via css overrides specific styles set in the graph definition 2015-03-07 13:51:47 +01:00
knsv
3fedc1263c Fix for issue #126 2015-03-07 13:37:24 +01:00
knsv
f4b2211f8f Fix for issue #37
Updated dependencies to dagre/dagre-d3
2015-03-07 12:30:16 +01:00
knsv
bc5f73daa2 Fix for issue #37
Updated dependencies to dagre/dagre-d3
2015-03-07 12:28:52 +01:00
knsv
ec9094696b Modified the number of week for which the x-axis stays in week mode as discussed in issue #125 2015-03-05 08:12:17 +01:00
knsv
85cdfbaaf8 Modified the number of week for which the x-axis stays in week mode as discussed in issue #125 2015-03-05 08:11:29 +01:00
Knut Sveidqvist
421409181d Added the css files 2015-03-02 09:53:56 +01:00
knsv
cc1a4be15a Added default stylesheet and less structure to create new themes as described in issue #122 2015-03-01 16:48:16 +01:00
knsv
ead74558ea Added default stylesheet and less structure to create new themes 2015-03-01 16:29:41 +01:00
knsv
3c5a19e5a7 Gantt: Configurable format for dates on x-axis
Flowchart: Default styles for links as discussed in issue #31
2015-02-28 23:50:23 +01:00
knsv
8598a7d712 More forgiving flowcharts, space at the end of the line allowed 2015-02-25 07:57:26 +01:00
knsv
0955c4c428 Today line for gantt chart 2015-02-25 00:07:13 +01:00
knsv
182729e015 Small fixes for linting 2015-02-24 23:03:09 +01:00
Knut Sveidqvist
a7dd6a6614 Better width calculations for task texts 2015-02-24 15:48:41 +01:00
knsv
e5657d028d Better styling for gantt diagrams and addition of critical path, active and completed tasks 2015-02-22 20:18:44 +01:00
knsv
4078cf3aed Removed semantic-ui form package 2015-02-20 20:42:59 +01:00
knsv
a7339eaf1c Experimental support for gantt diagrams 2015-02-20 19:34:18 +01:00
knsv
2877501ff5 Experimental support for gantt diagrams 2015-02-20 19:06:15 +01:00
knsv
1b016bd412 First rendering draft 2015-02-20 16:22:37 +01:00
knsv
2512666f49 New release 2015-02-15 19:34:18 +01:00
knsv
074a819ca8 New release 2015-02-15 18:11:46 +01:00
knsv
c211434c38 Draft parser for gantt diagrams. 2015-02-08 20:07:15 +01:00
Knut Sveidqvist
7896a7152e Merge pull request #116 from fardog/cli-css
Adds CSS option to the CLI
2015-02-03 22:17:48 +01:00
fardog
3a96682b9c Adds CSS option to the CLI 2015-02-02 19:32:15 -08:00
Knut Sveidqvist
c4639d11c8 Merge pull request #112 from jasonbellamy/bower
Ignore all files except the license and dist/ folder when installing with Bower.
2015-01-29 20:59:19 +01:00
Jason Bellamy
10b47b5785 ignore all files except the license and dist/ folder 2015-01-28 12:03:19 -05:00
knsv
5452be9fed New release 2015-01-25 16:41:43 +01:00
knsv
4562a811fc Better margin calculation when there are several diagrams on one page. 2015-01-25 16:40:12 +01:00
knsv
910b90b79c Better margin calclulation when there are several diagrams on one page. 2015-01-25 16:39:34 +01:00
knsv
a38a156d3b Mirror actors below sequence diagram possible as described in issue #106 2015-01-25 14:24:58 +01:00
knsv
d3d44ec806 Api for validating the syntax without rendering 2015-01-25 13:06:25 +01:00
knsv
6612b3e01e Fix relatwed to issue number #54 - % in text 2015-01-24 19:33:10 +01:00
knsv
d0428d492b Fix for issue number #108 - v in text 2015-01-20 20:23:02 +01:00
knsv
ee6ad01209 Merge branch 'master' of https://github.com/knsv/mermaid
Conflicts:
	dist/mermaid.full.js
	dist/mermaid.full.min.js
	dist/mermaid.slim.js
	dist/mermaid.slim.min.js
2015-01-20 20:04:16 +01:00
knsv
33973354ed * Removed logging 2015-01-20 19:53:38 +01:00
knsv
2af4a1f9f8 * Removed logging 2015-01-20 19:52:13 +01:00
knsv
44a2e0472a * Draft implementation of info diagram
* Fix for issue #109
2015-01-20 19:48:33 +01:00
Knut Sveidqvist
699d3bca52 Merge pull request #107 from markdalgleish/require-d3
Require d3 directly to better support Node usage
2015-01-20 07:28:03 +01:00
Mark Dalgleish
50d285bc49 Require d3 directly to better support Node usage 2015-01-20 16:59:58 +11:00
knsv
48500652b3 Allow overriding sequence diagram configuration (SVG properties) - handling of non existent configuration 2015-01-14 19:10:39 +01:00
knsv
8e050d4223 Merge branch 'jjmr-sequence_config_file' 2015-01-14 18:11:14 +01:00
knsv
73f567f3e2 Merge branch 'sequence_config_file' of https://github.com/jjmr/mermaid into jjmr-sequence_config_file
Conflicts:
	dist/mermaid.full.js
	dist/mermaid.full.min.js
	dist/mermaid.slim.js
	dist/mermaid.slim.min.js
	src/main.js
2015-01-14 18:10:21 +01:00
Knut Sveidqvist
1033a74970 Merge pull request #101 from bjowes/text-labels
Text based labels, new shape
2015-01-14 08:13:49 +01:00
Björn Weström
595fe1fd32 New build 2015-01-14 00:06:38 +01:00
Björn Weström
9095b2df97 Corrected example syntax 2015-01-14 00:06:14 +01:00
Björn Weström
8e45e7284b Removed extraction of dagre-d3
Pending resolution of a issue with globals
2015-01-14 00:05:58 +01:00
Björn Weström
fe437550fc Test cases for styling 2015-01-14 00:05:06 +01: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
3fe38237e6 New config attribute, htmlLabels 2015-01-14 00:03:41 +01:00
Björn Weström
9c8e36ea95 Syntax suggestion for reverse asymmetric shape 2015-01-14 00:03:19 +01:00
Björn Weström
8e9890d6e1 New shape, text labels
Added support to configure mermaid to use plain text labels for better
SVG compatibility
Added a reverse asymmetric shape, not in the graph syntax yet
2015-01-14 00:02:58 +01:00
Björn Weström
1abb53ce00 Merge branch 'master' into text-labels 2015-01-13 22:13:51 +01:00
Björn Weström
fec3101f37 Merge pull request #5 from knsv/master
Update README.md
2015-01-13 22:13:30 +01:00
Björn Weström
a23fce6c2d Cleanup after merge 2015-01-13 21:55:10 +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
jjmr
9b892ef128 Add new parameter to the console client to override the svg configuration in sequence diagrams 2015-01-13 16:17:30 +01:00
Knut Sveidqvist
0b2afb8e71 Update README.md 2015-01-12 07:31:51 +01:00
Björn Weström
cbd7393d36 Additional tests for labels 2015-01-11 16:17:02 +01:00
Björn Weström
a27b3d8fcb Added edge labels 2015-01-11 16:16:50 +01:00
Björn Weström
9246df4410 Break out dagre-d3 dependency 2015-01-11 16:16:18 +01:00
Björn Weström
5ad30c86c5 Improved style handling 2015-01-11 16:16:07 +01:00
Björn Weström
43d2b0b9d7 Improved style handling 2015-01-11 16:15:57 +01:00
Björn Weström
367d620a82 Break out dagre-d3, new label styling 2015-01-11 16:15:38 +01:00
Björn Weström
1b76160a7d Break out dagre-d3 dependency 2015-01-11 16:15:19 +01:00
Björn Weström
d9f8ef6d57 Generated 2015-01-11 16:14:34 +01:00
Björn Weström
58659c4d85 Merge pull request #4 from knsv/master
Merge from master
2015-01-11 16:12:13 +01:00
knsv
911cd09dd8 New release 2015-01-11 15:02:35 +01:00
knsv
27687fc742 Added notation for titles on subgraphs 2015-01-10 19:23:57 +01:00
knsv
3027882847 Added notation for dotted links as described in issue #26 and support for thicker links 2015-01-10 14:33:50 +01:00
Knut Sveidqvist
a7fd52237a Merge pull request #96 from gkchic/master
Merge pull request #1 from knsv/master
2015-01-10 09:46:04 +01:00
knsv
36b389b1fd Added arrow head to async arrow with cross 2015-01-09 08:21:48 +01:00
knsv
952723706b Making it possible to have style/% in class definitions as described in issue #54 2015-01-08 08:20:07 +01:00
knsv
5a720b6d63 Introducing subgraphs 2015-01-07 21:02:58 +01:00
gkchic
0ae130de0a Merge pull request #1 from knsv/master
Update from original
2015-01-07 13:23:17 +01:00
knsv
273eb63efb Added link to demos page 2015-01-07 11:30:08 +01:00
knsv
c5c995c916 Added the option to disable auto rendering via the mermaid namespace as described in issue #91
Added optional ; as statement separator equal to newline for sequence diagrams (help for tidy users)
2015-01-06 19:33:00 +01:00
knsv
222a6e0682 New release 0.3.1 2015-01-05 15:32:39 +01:00
knsv
7741f49ed8 Move of drawLoop to svgDraw 2015-01-05 15:06:01 +01:00
knsv
786d9ddb54 Move of drawLoop to svgDraw 2015-01-05 14:41:00 +01:00
knsv
03a711d82d Cleanup of code 2015-01-05 14:12:49 +01:00
knsv
758a9d7254 Cleanup of code 2015-01-05 13:41:32 +01:00
knsv
9bc23129d5 Html file for testing sequence diagrams 2015-01-05 13:26:15 +01:00
knsv
343bd52c17 Support for alt & opt statements. 2015-01-05 13:25:37 +01:00
knsv
f9943b6b82 Support for different arrow types in sequence diagrams: no arrow head, cross head and regular arrow head. 2015-01-04 17:56:58 +01:00
knsv
c7e2c2b3c6 Fix for issue #84 2015-01-03 15:34:49 +01:00
Knut Sveidqvist
c10b4553ae Update README.md
Referring further reading to new documentation site
2014-12-31 11:32:25 +01:00
Knut Sveidqvist
c8d1b388d8 Merge pull request #79 from it0a/master
Fix for issue #73
2014-12-31 09:57:50 +01:00
it0a
da37b4dee5 Fix for issue #73 2014-12-31 02:02:39 -05:00
Knut Sveidqvist
9f904da7b3 Merge pull request #75 from fardog/enhancement-71
Show help and version even if phantom isn't present. Fixes #71
2014-12-28 12:06:14 +01:00
fardog
7bcbe6f469 Show help and version even if phantom isn't present. Fixes #71 2014-12-28 00:26:37 -08:00
Knut Sveidqvist
439cca926d Merge pull request #72 from sudodoki/modify/contibuting
Add apostrophe & 'and'
2014-12-28 09:21:54 +01:00
Oleksandr Lapshyn
5bc20a4b08 Add apostrophe & 'and' 2014-12-27 20:05:15 -05:00
knsv
26d0908b27 Fix for issue #53 2014-12-27 09:46:28 +01:00
knsv
385e823c17 Fix for issue #70 2014-12-23 18:06:07 +01:00
knsv
83d9a3269e Merge branch 'master' of https://github.com/knsv/mermaid
Conflicts:
	README.md
2014-12-22 13:58:30 +01:00
knsv
c50178c640 Merge branch 'master' of https://github.com/knsv/mermaid
Conflicts:
	README.md
2014-12-22 13:52:00 +01:00
knsv
96b12e876e New release 2014-12-22 13:49:38 +01:00
knsv
9a8d7a8c57 Handling of min size of messages to self 2014-12-22 13:47:21 +01:00
Knut Sveidqvist
d4b35b5594 Update README.md
Added an image example of a sequence diagram
2014-12-22 13:22:45 +01:00
knsv
0af92a1626 Support messages to self in sequence diagrams 2014-12-22 09:07:28 +01:00
knsv
c3eb62255f Support for backslash in nodes 2014-12-22 08:11:49 +01:00
knsv
5fc873468d Styling of sequence diagrams from css classes 2014-12-21 20:59:11 +01:00
knsv
307c599a0e Inclusion of tape tests in new test target for travis 2014-12-21 11:25:31 +01:00
Knut Sveidqvist
a83639addd Merge pull request #69 from fardog/master
Adds Command Line Interface for generating PNGs from mermaid description files
2014-12-21 09:18:18 +01:00
fardog
8920411b3c Make obvious that README known issues section is for the CLI 2014-12-20 17:50:45 -08:00
fardog
46a7eaea7d Better information around CLI's phantomjs requirement 2014-12-20 17:49:06 -08:00
fardog
d2513e9b50 Adds CLI information to the README. 2014-12-20 17:46:23 -08:00
fardog
f349ddd796 Adds CLI tests 2014-12-20 17:40:58 -08:00
fardog
c703c9a0d3 Adds CLI for rendering mermaid files 2014-12-20 17:18:38 -08:00
Björn Weström
6a1550fbdf Merge pull request #3 from knsv/master
Merge from master
2014-12-20 19:02:32 +01:00
knsv
9458bfb24f Sequence diagram loop margins
Handling of arrows to the left in loops in sequence diagrams
Addition of labels
2014-12-20 18:41:20 +01:00
knsv
7bb75c16da Work with loop rendering for sequence diagrams 2014-12-20 09:19:56 +01:00
knsv
69c84df367 Box rendering 2014-12-20 09:18:12 +01:00
knsv
000ffbb622 Modifications of sequence diagram rendering + tests 2014-12-20 08:40:48 +01:00
knsv
53d5221aed Minor changes 2014-12-18 23:47:30 +01:00
knsv
0dc8aa32c6 Added additional tests for sequence diagram rendering. Removed some log output 2014-12-18 23:17:32 +01:00
Knut Sveidqvist
8fa47dac37 Merge pull request #66 from vijay40/master
Allow special symbols for direction along with acronyms
2014-12-17 19:20:10 +01:00
vijay40
cebe033b4b The directions can now be specified with special symbols along with acronyms. So >,<,^,v can be used in place of LR,RL,BT,TB respectively. 2014-12-17 15:24:28 +05:30
knsv
0a3e9ac8e8 Small change to the README reflecting the new syntax without semicolons for the flowcharts 2014-12-16 23:23:27 +01:00
knsv
a1e415686c Adding support for loops to the sequence diagram grammar. 2014-12-16 20:51:48 +01:00
knsv
21daaf3e29 Adding support for notes to the left of the actor in sequence diagrams. 2014-12-16 20:12:24 +01:00
knsv
5712c6de7b Release 0.2.16 2014-12-15 19:35:09 +01:00
Knut Sveidqvist
e32cbe3004 Merge pull request #63 from vijay40/master
New grammar will allow statements ending without semicolon as disccused in Issue #38
2014-12-15 19:00:28 +01:00
vijay40
3279edab33 Flow grammer is modified to allow each line ending without semicolon to improve readablity. The old declarations also work. One test is also included in flow.spec.js to test the changes. 2014-12-15 15:32:47 +05:30
Knut Sveidqvist
13a65db40e Merge pull request #62 from bjowes/master
Class based styling
2014-12-14 22:49:32 +01:00
Björn Weström
e550ef9e25 Merge branch 'pr/2'
Conflicts:
	.gitignore
	dist/mermaid.full.min.js
	dist/mermaid.slim.min.js
2014-12-14 22:30:42 +01:00
Björn Weström
429b901e7a Removed unused variables 2014-12-14 22:18:16 +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
eb7c341046 Removed logging from sequence diagram test 2014-12-14 19:34:14 +01:00
knsv
71b6a664f7 Support for comments to the right of the Actor 2014-12-14 19:30:58 +01:00
knsv
7de9687911 Support for comments to the right of the Actor 2014-12-14 19:30:58 +01:00
Knut Sveidqvist
7e3bd2e574 Merge pull request #60 from sublimino/patch-1
Fix typos
2014-12-14 17:46:52 +01:00
Andrew Martin
764907ce34 Fix typos 2014-12-14 16:09:12 +00:00
Knut Sveidqvist
ae76dc957a Merge pull request #57 from alvynmcq/master
Included .DS_Store in gitignore
2014-12-14 12:35:16 +01:00
Björn Weström
6ef6d79b48 Added proper SVG namespace attribute 2014-12-14 00:46:20 +01:00
Björn Weström
3fcbc7ae56 Added class definitions to nodes
Removed the inline styling of nodes with classes, replaced with class
attributes and a common CSS Style section at the start of the SVG.
2014-12-14 00:32:27 +01:00
Alvyn McQuitty
bb9e36d5fa Included .DS_Store in gitignore 2014-12-13 22:57:16 +00:00
Knut Sveidqvist
8a129d7384 Moved main bulk of documentation into the wiki 2014-12-13 21:34:39 +01:00
Björn Weström
71fd8e1b70 Merge pull request #1 from knsv/master
Update from master
2014-12-13 21:24:14 +01:00
knsv
28594138e0 Fix for issue #46, slashes in text 2014-12-13 21:10:50 +01:00
knsv
7fc2a0a544 Increased scope of lint check, removed some issues 2014-12-13 20:58:53 +01:00
knsv
48af3b3590 Refactoring/cleanup of flowchart grammar 2014-12-13 18:04:55 +01:00
knsv
8a13c4cc06 Refactoring/cleanup of flowchart grammar 2014-12-13 18:01:25 +01:00
Knut Sveidqvist
bfd93627a0 Merge pull request #56 from vijay40/master
Improves readablity discussed in issue #38
2014-12-13 17:01:05 +01:00
Vijay Jain
d4451ef8a1 flow.jison is modified to include a single spaces between vertices and link to improve readablity for issue #38. There should not be any space between vertex and its text and link and its text. flow.spec.js is modified to include three new tests for testing new graphs. 2014-12-13 17:09:03 +05:30
knsv
3f3e23b419 Fixes for issues #47 and #55 including new test cases. 2014-12-13 08:43:25 +01:00
Knut Sveidqvist
728bd656d7 Added link to live editor 2014-12-12 19:05:27 +01:00
knsv
1cc3f16d7a Refactoring, split of diagrams into different folders for easier additions of more diagram types 2014-12-11 21:02:11 +01:00
knsv
92439fbdf3 Merge branch 'master' of https://github.com/knsv/mermaid
Conflicts:
	gulpfile.js
2014-12-11 19:35:03 +01:00
knsv
0955305076 * Support for comments pointed out in issue #47 2014-12-11 19:29:40 +01:00
knsv
977df99c80 * Support for comments pointed out in issue #47 2014-12-11 19:23:36 +01:00
Knut Sveidqvist
fcfbce8a97 Merge pull request #43 from serv/chore/refactor-tests
Added a linting task for gulp
2014-12-10 19:44:27 +01:00
Jason Kim
202af046aa Made changes based on jslint 2014-12-09 22:26:42 -08:00
Jason Kim
bd2633acf4 Settig up a linting task for src/ 2014-12-09 22:17:07 -08:00
knsv
9aeff6be2d * Changed the license in package json to the correct license (MIT).
* Changed the link style from the pointed one to a more triangle formed style as default style for links
* Updated the readme file regarding linkStyles to explain the magic number 3a s described in issue #41
2014-12-09 20:42:31 +01:00
knsv
6988dea353 Release 0.2.15 2014-12-05 10:50:47 +01:00
Knut Sveidqvist
afe12b5636 Merge pull request #33 from serv/chore/bower-comp-gitignore
Include bower_components/ to .gitignore
2014-12-05 10:20:34 +01:00
knsv
7b79b0c8e0 Merge remote-tracking branch 'origin/master' 2014-12-05 10:19:47 +01:00
knsv
2b9e464798 Cleanup of sequence diagram rendering code (still experimental)
Better handling of width. Instead uf using width 100% the width is set to the width of the graph. Should help issue #19.
2014-12-05 10:19:07 +01:00
Jason Kim
89780140c8 Include bower_components/ to .gitignore
We should prevent `bower_components` from accidentally getting committed
2014-12-04 13:11:04 -08:00
Knut Sveidqvist
907bd62678 Merge pull request #32 from guyellis/master
Fixed reference to Git repo.
2014-12-04 21:24:28 +01:00
Guy Ellis
76d48db219 Fixed reference to Git repo. 2014-12-04 15:16:40 -05:00
Knut Sveidqvist
9e3253ee70 Update README.md 2014-12-04 18:28:53 +01:00
knsv
8949166a17 Adding experimental new grammars 2014-12-04 18:06:54 +01:00
knsv
4c564ebe9e Adding experimental new grammars 2014-12-04 17:58:05 +01:00
knsv
2a0a2a2269 Adding experimental new grammars 2014-12-04 17:35:07 +01:00
Knut Sveidqvist
53e3b431d5 Update README.md
Added some info about the parser available in the api.
2014-12-03 20:03:15 +01:00
knsv
dd26960852 New release 2014-12-03 19:35:00 +01:00
knsv
fe2f3b403d Patch release 2014-12-03 19:29:44 +01:00
knsv
dabedb379d Added support for more characters as described in issue #25 2014-12-03 18:34:18 +01:00
knsv
1e53b588fc Exposing parser in API as requested in issue #21 2014-12-03 18:12:33 +01:00
knsv
c0e2c86fd8 Merge remote-tracking branch 'origin/master' 2014-12-03 17:43:31 +01:00
knsv
52a78375a4 Added check for previously processed div elements, fix for issue #29, thank to user madebits for fix. 2014-12-03 17:42:39 +01:00
Knut Sveidqvist
c0e9638109 Update CONTRIBUTING.md 2014-12-03 17:28:21 +01:00
knsv
0539b8a74e Added keywords as valid text token, fix for issue #8 2014-12-03 07:49:41 +01:00
knsv
7b09a6d1bf Added DIR element as valid text token, fix for issue #8 2014-12-03 07:42:11 +01:00
knsv
ab78295faf Preparation for npm package 2014-12-02 19:05:09 +01:00
knsv
540c614c88 Preparation for npm package 2014-12-02 18:36:16 +01:00
Knut Sveidqvist
d0ed2d2735 Merge remote-tracking branch 'origin/ImanimalXI-graph_editor_page' 2014-12-02 10:00:07 +01:00
Knut Sveidqvist
fb58204900 Merge remote-tracking branch 'origin/master' 2014-12-02 09:16:07 +01:00
Knut Sveidqvist
240939a7ec Guidelines for contributing 2014-12-02 09:15:58 +01:00
knsv
c067b31a57 Mermaid editor added 2014-12-02 07:49:33 +01:00
knsv
1502346172 Support for cyrillic characters 2014-12-01 21:12:14 +01:00
knsv
9537f60b01 Support for cyrillic characters 2014-12-01 21:10:09 +01:00
knsv
1a7997cdef Support for unicode letters.
Merge branch 'master' of https://github.com/knsv/mermaid

Conflicts:
	src/parser/flow.jison
	src/parser/flow.js
2014-12-01 21:00:47 +01:00
Knut Sveidqvist
3a65cd1df3 Merge pull request #13 from codebeige/unicode_labels
Allow unicode chars in labels
2014-12-01 20:55:13 +01:00
IamanimalXI
225560dcdf initial setup for editor page to generate graph through textarea input 2014-12-01 20:50:58 +01:00
Tibor Claassen
d6766de7be Use ranges to allow unicode chars in labels 2014-12-01 21:48:34 +02:00
knsv
8906ee8097 Merge remote-tracking branch 'origin/master'
Conflicts:
	bower.json
	dist/mermaid.full.js
	dist/mermaid.full.min.js
	dist/mermaid.slim.js
	dist/mermaid.slim.min.js
	src/main.js
2014-12-01 20:43:49 +01:00
knsv
fc4f6e617f Better support for unicode and cyrillic letters 2014-12-01 20:41:08 +01:00
Knut Sveidqvist
8261429afb Update README.md
Added link to jsbin thanks to Christian Genco.
2014-12-01 19:08:55 +01:00
Knut Sveidqvist
733cbc753c Update README.md
Added a link to a live example.
2014-12-01 16:53:20 +01:00
Knut Sveidqvist
1d2327c4c2 Added test for caps in vertices 2014-12-01 09:59:34 +01:00
Knut Sveidqvist
5f8508ab52 Version fix 2014-12-01 09:40:12 +01:00
Knut Sveidqvist
cb7b8a4b98 Version fix 2014-12-01 09:38:49 +01:00
Knut Sveidqvist
cbd41dbb1b Version fix 2014-12-01 09:28:47 +01:00
Knut Sveidqvist
9d5c6d5d1d Update README.md 2014-12-01 09:16:27 +01:00
Knut Sveidqvist
ba0ea20388 Update bower.json 2014-12-01 09:13:01 +01:00
knsv
0c87128902 Release 0.2.6
* Default shape set to rect when none is set
2014-11-28 18:08:36 +01:00
knsv
9a35844731 Release 0.2.5
* Support for new shapes circle,  irregular rectangle
* Support for styling of links
* Support for newlines in texts
* Centered text on links
* Shaded background for text on links
* Support for click on nodes
2014-11-27 21:28:04 +01:00
knsv
18be0e02aa Updated readme and changes to the coverage setting on the ci server 2014-11-27 21:16:17 +01:00
knsv
167431d677 Merge remote-tracking branch 'origin/master' 2014-11-27 21:15:50 +01:00
knsv
9eac1ff9c4 Updated readme and changes to the coverage setting on the ci server 2014-11-27 20:08:27 +01:00
Knut Sveidqvist
1077261a18 Update README.md 2014-11-27 19:42:31 +01:00
knsv
f1bffb5814 Updated readme and changes to the coverage setting on the ci server 2014-11-27 19:34:35 +01:00
knsv
12fdc9f10d Updated readme and changes to the coverage setting on the ci server 2014-11-27 19:04:41 +01:00
knsv
fa46d61ab0 Updated readme and changes to the coverage setting on the ci server 2014-11-27 18:55:15 +01:00
knsv
fe1c78ca29 Updated shape syntax
Coverage instrumentation in tests
2014-11-27 18:21:15 +01:00
Knut Sveidqvist
289329736d Merge pull request #1 from bjowes/master
Added new shapes!
2014-11-27 09:06:53 +01:00
Björn Weström
28f6b93c16 Dists for new shapes 2014-11-27 09:01:54 +01:00
Björn Weström
c7b44679c1 Added shapes
Added UTF-8 tag to test webpage
Added tests for shapes on test webpage
Added odd shape
Added circle shape
Modified diamond shape to always use right angles
2014-11-27 09:00:25 +01:00
knsv
d52224194c Styles on links 2014-11-26 20:47:22 +01:00
knsv
8e591c0494 Background on labels and centering of labels 2014-11-26 19:03:15 +01:00
knsv
d6c26ab2cd Merge remote-tracking branch 'origin/master' 2014-11-26 18:51:06 +01:00
knsv
6757709f45 Small fix, Cleaner add node code 2014-11-26 18:50:12 +01:00
Knut Sveidqvist
62fc161193 Update README.md
Added build status
2014-11-25 23:28:21 +01:00
knsv
a5b9de2c43 Setting up continuous integration using travis 2014-11-25 23:23:40 +01:00
knsv
6382fe07ab Fix for br tags within nodes for new line 2014-11-25 23:16:44 +01:00
364 changed files with 164579 additions and 9951 deletions

4
.ackrc Normal file
View File

@@ -0,0 +1,4 @@
--ignore-dir=dist
--ignore-file=match:/^yarn\.lock$/
--ignore-file=match:/^yarn-error\.log$/
--ignore-dir=coverage

11
.editorconfig Normal file
View File

@@ -0,0 +1,11 @@
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
indent_size = 4

1
.eslintignore Normal file
View File

@@ -0,0 +1 @@
**/*.spec.js

20
.eslintrc.json Normal file
View File

@@ -0,0 +1,20 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"extends": ["prettier", "eslint:recommended"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": ["error"]
}
}

12
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [knsv]
#patreon: # Replace with a single Patreon username
#open_collective: # Replace with a single Open Collective username
#ko_fi: # Replace with a single Ko-fi username
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
#liberapay: # Replace with a single Liberapay username
#issuehunt: # Replace with a single IssueHunt username
#otechie: # Replace with a single Otechie username
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

38
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'Status: Triage, Type: Bug / Error'
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'Status: Triage, Type: Enhancement'
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

15
.github/ISSUE_TEMPLATE/question.md vendored Normal file
View File

@@ -0,0 +1,15 @@
---
name: Question
about: Get some help from the community.
title: ''
labels: 'Help wanted!, Type: Other'
assignees: ''
---
## Help us help you!
You want an answer. Here are some ways to get it quicker:
* Use a clear and concise title.
* Try to pose a clear and concise question.
* Include as much, or as little, code as necessary.
* Don't be shy to give us some screenshots, if it helps!

3
.github/pr-labeler.yml vendored Normal file
View File

@@ -0,0 +1,3 @@
'Type: Bug / Error': 'bug/*'
'Type: Enhancement': 'feature/*'
'Type: Other': 'other/*'

13
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,13 @@
## :bookmark_tabs: Summary
Brief description about the content of your PR.
Resolves #<your issue id here>
## :straight_ruler: Design Decisions
Describe the way your implementation works or what design decisions you made if applicable.
### :clipboard: Tasks
Make sure you
- [ ] :book: have read the [contribution guidelines](https://github.com/mermaid-js/mermaid/blob/develop/CONTRIBUTING.md)
- [ ] :computer: have added unit/e2e tests (if appropriate)
- [ ] :bookmark: targeted `develop` branch

25
.github/release-drafter.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name-template: '$NEXT_PATCH_VERSION'
tag-template: '$NEXT_PATCH_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'Type: Enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'Type: Bug / Error'
- title: '🧰 Maintenance'
label: 'Type: Other'
change-template: '- $TITLE (#$NUMBER) @$AUTHOR'
sort-by: title
sort-direction: ascending
branches:
- develop
exclude-labels:
- 'Skip changelog'
no-changes-template: 'This release contains minor changes and bugfixes.'
template: |
# Release Notes
$CHANGES
🎉 **Thanks to all contributors helping with this release!** 🎉

19
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 14
# Issues with these labels will never be considered stale
exemptLabels:
- Retained
# Label to use when marking an issue as stale
staleLabel: Inactive
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
If you are still interested in this issue and it is still relevant you can comment to revive it.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
This issue has been been automatically closed due to a lack of activity.
This is done to maintain a clean list of issues that the community is interested in developing.

64
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x]
steps:
- uses: actions/checkout@v1
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Yarn
run: npm i yarn --global
- name: Cache Node Modules
uses: actions/cache@v1
with:
path: .cache
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
- name: Install Packages
run: |
yarn config set cache-folder $GITHUB_WORKSPACE/.cache/yarn
yarn install --frozen-lockfile
env:
CYPRESS_CACHE_FOLDER: .cache/Cypress
- name: Run Build
run: yarn build
- name: Upload Build as Artifact
uses: actions/upload-artifact@v1
with:
name: dist
path: dist
- name: Run Unit Tests
run: |
yarn test --coverage
#- name: Upload Test Results
# uses: coverallsapp/github-action@v1.0.1
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# parallel: true
# - name: Run E2E Tests
# run: yarn e2e
# env:
# PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
# CYPRESS_CACHE_FOLDER: .cache/Cypress
#- name: Post Upload Test Results
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# parallel-finished: true

19
.github/workflows/checks vendored Normal file
View File

@@ -0,0 +1,19 @@
on: [push]
name: Static analysis
jobs:
test:
runs-on: ubuntu-latest
name: check tests
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: testomatio/check-tests@stable
with:
framework: cypress
tests: "./cypress/integration/**/**.spec.js"
token: ${{ secrets.GITHUB_TOKEN }}
has-tests-label: true

14
.github/workflows/issue-triage.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: Apply triage label to new issue
on:
issues:
types: [opened]
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: andymckay/labeler@1.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
labels: "Status: Triage"

13
.github/workflows/lock-closed-issue.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
name: Lock closed issue
on:
issues:
types: [closed]
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: Dunning-Kruger/lock-issues@v1
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

13
.github/workflows/pr-labeler.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
name: Apply labels to PR
on:
pull_request:
types: [opened]
jobs:
pr-labeler:
runs-on: ubuntu-latest
steps:
- name: Label PR
uses: TimonVS/pr-labeler-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

15
.github/workflows/release-draft.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: Draft Release
on:
push:
branches:
- develop
jobs:
draft-release:
runs-on: ubuntu-latest
steps:
- name: Draft Release
uses: toolmantim/release-drafter@v5.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -0,0 +1,37 @@
name: Publish release preview package
on:
push:
branches:
- 'release/**'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Install Yarn
run: npm i yarn --global
- name: Install Json
run: npm i json --global
- name: Install Packages
run: yarn install --frozen-lockfile
- name: Publish
run: |
PREVIEW_VERSION=$(git rev-list --count --first-parent HEAD)
VERSION=$(echo ${{github.ref}} | tail -c +20)-preview.$PREVIEW_VERSION
echo $VERSION
npm version --no-git-tag-version --allow-same-version $VERSION
npm set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }}
npm set registry https://npm.pkg.github.com/mermaid-js
json -I -f package.json -e 'this.name="@mermaid-js/mermaid"' # Package name needs to be set to a scoped one because GitHub registry requires this
json -I -f package.json -e 'this.repository="git://github.com/mermaid-js/mermaid"' # Repo url needs to have a specific format too
npm publish

44
.github/workflows/release-publish.yml vendored Normal file
View File

@@ -0,0 +1,44 @@
name: Publish release
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: fregante/setup-git-user@v1
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Install Yarn
run: npm i yarn --global
- name: Install Json
run: npm i json --global
- name: Install Packages
run: yarn install --frozen-lockfile
- name: Prepare release
run: |
VERSION=${GITHUB_REF:10}
echo "Preparing release $VERSION"
git checkout -t origin/release/$VERSION
npm version --no-git-tag-version --allow-same-version $VERSION
git add package.json
git commit -m "Bump version $VERSION"
git checkout -t origin/master
git merge -m "Release $VERSION" --no-ff release/$VERSION
git push --no-verify
- name: Publish
run: |
npm set //registry.npmjs.org/:_authToken $NPM_TOKEN
npm publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@@ -0,0 +1,13 @@
name: Unlock reopened issue
on:
issues:
types: [reopened]
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: Dunning-Kruger/unlock-issues@v1
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

26
.gitignore vendored Normal file
View File

@@ -0,0 +1,26 @@
.DS_Store
node_modules/
coverage/
.idea/
dist/*.js
dist/*.map
yarn-error.log
.npmrc
token
package-lock.json
dist/classTest.html
dist/sequenceTest.html
.vscode/
cypress/platform/current.html
cypress/platform/experimental.html
local/
_site
Gemfile.lock

3
.percy.yml Normal file
View File

@@ -0,0 +1,3 @@
version: 1
snapshot:
widths: [1280]

4
.prettierrc Normal file
View File

@@ -0,0 +1,4 @@
{
"printWidth": 100,
"singleQuote": true
}

22
.tern-project Normal file
View File

@@ -0,0 +1,22 @@
{
"ecmaVersion": 6,
"libs": [
"browser"
],
"loadEagerly": [
"path/to/your/js/**/*.js"
],
"dontLoad": [
"node_modules/**",
"path/to/your/js/**/*.js"
],
"plugins": {
"modules": {},
"es_modules": {},
"node": {},
"doc_comment": {
"fullDocs": true,
"strong": true
}
}
}

12
.travis.yml Normal file
View File

@@ -0,0 +1,12 @@
dist: trusty
language: node_js
node_js:
- "10"
cache:
npm: false
script:
- yarn build
- yarn test --coverage
- yarn e2e
after_success:
- cat ./coverage/lcov.info | ./node_modules/.bin/coveralls

863
CHANGELOG.md Normal file
View File

@@ -0,0 +1,863 @@
# Change Log
## [Unreleased](https://github.com/knsv/mermaid/tree/HEAD)
[Full Changelog](https://github.com/knsv/mermaid/compare/8.2.0...HEAD)
**Closed issues:**
- Cross-Site Scripting:DOM - Issue [\#847](https://github.com/knsv/mermaid/issues/847)
## [8.2.0](https://github.com/knsv/mermaid/tree/8.2.0) (2019-07-17)
[Full Changelog](https://github.com/knsv/mermaid/compare/8.1.0...8.2.0)
**Closed issues:**
- Create issue templates [\#871](https://github.com/knsv/mermaid/issues/871)
- cross site scripting in mermaid [\#869](https://github.com/knsv/mermaid/issues/869)
- Make Gantt chart date inclusive [\#868](https://github.com/knsv/mermaid/issues/868)
- CHANGELOG missing updates for all versions since 0.4.0 [\#865](https://github.com/knsv/mermaid/issues/865)
- please add tag for 8.0.0 release [\#863](https://github.com/knsv/mermaid/issues/863)
- classDiagram breaks on any edit [\#858](https://github.com/knsv/mermaid/issues/858)
- found 1 high severity vulnerability [\#839](https://github.com/knsv/mermaid/issues/839)
- Missing fontawesome icon support [\#830](https://github.com/knsv/mermaid/issues/830)
- Docs for integration with wiki.js? [\#829](https://github.com/knsv/mermaid/issues/829)
- Is this project still maintained? [\#826](https://github.com/knsv/mermaid/issues/826)
- typroa [\#823](https://github.com/knsv/mermaid/issues/823)
- Maintain the order of the nodes in Flowchart [\#815](https://github.com/knsv/mermaid/issues/815)
- Overlap, Overflow and cut titles in flowchart [\#814](https://github.com/knsv/mermaid/issues/814)
- How load mermaidApi notejs electron [\#813](https://github.com/knsv/mermaid/issues/813)
- How to set the spacing between the text of the flowchart node and the border? [\#812](https://github.com/knsv/mermaid/issues/812)
- no triming participant name and the name following spaces is as another actor in sequence [\#809](https://github.com/knsv/mermaid/issues/809)
- uml Class as shape type [\#807](https://github.com/knsv/mermaid/issues/807)
- Force-directed graph Layout Style [\#806](https://github.com/knsv/mermaid/issues/806)
- how can I start a newLine in FlowChart [\#805](https://github.com/knsv/mermaid/issues/805)
- UOEProcessShow [\#801](https://github.com/knsv/mermaid/issues/801)
- Why the use of code blocks? [\#799](https://github.com/knsv/mermaid/issues/799)
- fixing class diagram [\#794](https://github.com/knsv/mermaid/issues/794)
- Autonumber support in sequence diagrams [\#782](https://github.com/knsv/mermaid/issues/782)
- MomentJS dependency [\#781](https://github.com/knsv/mermaid/issues/781)
- Feature : Can we color code the flow/arrows [\#766](https://github.com/knsv/mermaid/issues/766)
- Is there any way to convert flowchart.js code to mermaid code [\#726](https://github.com/knsv/mermaid/issues/726)
- Fixed width of nodes [\#653](https://github.com/knsv/mermaid/issues/653)
- Inline comment [\#650](https://github.com/knsv/mermaid/issues/650)
- alt attribute of img tag in HTML [\#619](https://github.com/knsv/mermaid/issues/619)
- Just wanted to say : THANKS ! [\#618](https://github.com/knsv/mermaid/issues/618)
- "animation" [\#446](https://github.com/knsv/mermaid/issues/446)
**Merged pull requests:**
- Trimming whitespace after participant id [\#882](https://github.com/knsv/mermaid/pull/882) ([IOrlandoni](https://github.com/IOrlandoni))
- chore\(deps\): bump atob from 2.0.3 to 2.1.2 [\#881](https://github.com/knsv/mermaid/pull/881) ([dependabot[bot]](https://github.com/apps/dependabot))
- chore\(deps\): bump fstream from 1.0.11 to 1.0.12 [\#880](https://github.com/knsv/mermaid/pull/880) ([dependabot[bot]](https://github.com/apps/dependabot))
- chore\(deps\): bump js-yaml from 3.12.0 to 3.13.1 [\#879](https://github.com/knsv/mermaid/pull/879) ([dependabot[bot]](https://github.com/apps/dependabot))
- I847 cross site scripting [\#878](https://github.com/knsv/mermaid/pull/878) ([knsv](https://github.com/knsv))
- Bump lodash.mergewith from 4.6.1 to 4.6.2 [\#877](https://github.com/knsv/mermaid/pull/877) ([dependabot[bot]](https://github.com/apps/dependabot))
- Adding docs into core repo again [\#876](https://github.com/knsv/mermaid/pull/876) ([knsv](https://github.com/knsv))
- Bump lodash from 4.17.11 to 4.17.13 [\#875](https://github.com/knsv/mermaid/pull/875) ([dependabot[bot]](https://github.com/apps/dependabot))
- feat\(stale.yml\): update issue label and bot comment [\#874](https://github.com/knsv/mermaid/pull/874) ([ThePenguin1140](https://github.com/ThePenguin1140))
- Feature/allow inclusive enddates [\#872](https://github.com/knsv/mermaid/pull/872) ([ThePenguin1140](https://github.com/ThePenguin1140))
- Adding trapezoid and inverse trapezoid vertex options. [\#741](https://github.com/knsv/mermaid/pull/741) ([adamwulf](https://github.com/adamwulf))
## [8.1.0](https://github.com/knsv/mermaid/tree/8.1.0) (2019-06-25)
[Full Changelog](https://github.com/knsv/mermaid/compare/7.0.5...8.1.0)
**Closed issues:**
- Gantt and sequence diagram do not render [\#853](https://github.com/knsv/mermaid/issues/853)
- margins around flowchart are not balanced [\#852](https://github.com/knsv/mermaid/issues/852)
- Smaller bundles [\#843](https://github.com/knsv/mermaid/issues/843)
- unicode in labels [\#776](https://github.com/knsv/mermaid/issues/776)
- Hard-changing drawing of arrows per edge type [\#775](https://github.com/knsv/mermaid/issues/775)
- SequenceDiagram wrong [\#773](https://github.com/knsv/mermaid/issues/773)
- Render mermaid on github pages with simple code [\#772](https://github.com/knsv/mermaid/issues/772)
- FlowChart - large space between text and the image [\#754](https://github.com/knsv/mermaid/issues/754)
- Class Diagram Issues when using Mermaid in Stackedit [\#748](https://github.com/knsv/mermaid/issues/748)
- Multi-platform CI [\#744](https://github.com/knsv/mermaid/issues/744)
- gantt: sections can't have a colon [\#742](https://github.com/knsv/mermaid/issues/742)
- Yarn build does not add mermaid.min.css to dist [\#732](https://github.com/knsv/mermaid/issues/732)
- Is there a grammar / keyword / more than just the basic examples? [\#718](https://github.com/knsv/mermaid/issues/718)
- Click event and react component [\#717](https://github.com/knsv/mermaid/issues/717)
- Long text going outside the box [\#706](https://github.com/knsv/mermaid/issues/706)
- How to migrate from yUML to mermaid? [\#704](https://github.com/knsv/mermaid/issues/704)
- Issue on Dynamic Creation in PHP [\#690](https://github.com/knsv/mermaid/issues/690)
- `click "\#target"` and `click "http://url"` should create regular links [\#689](https://github.com/knsv/mermaid/issues/689)
- Support Chinese punctuation [\#687](https://github.com/knsv/mermaid/issues/687)
- \[Question\] Proper way to install on Mac? [\#681](https://github.com/knsv/mermaid/issues/681)
- Has Mermaid a graphical interface to make diagrams? [\#668](https://github.com/knsv/mermaid/issues/668)
- mermaid installation on debian [\#649](https://github.com/knsv/mermaid/issues/649)
- "Cannot activate" in sequenceDiagram [\#647](https://github.com/knsv/mermaid/issues/647)
- Link \("click" statement\) in flowchart does not work in exported SVG [\#646](https://github.com/knsv/mermaid/issues/646)
- How to pass styling [\#639](https://github.com/knsv/mermaid/issues/639)
- The live editor cant show seq diagram with notes for 8.0.0-alpha.3 [\#638](https://github.com/knsv/mermaid/issues/638)
- import mermaid.css with ES6 + NPM [\#634](https://github.com/knsv/mermaid/issues/634)
- Actor line cuts through other elements [\#633](https://github.com/knsv/mermaid/issues/633)
- Graph TD line out of the picture \(left side\) [\#630](https://github.com/knsv/mermaid/issues/630)
- Flowchart labels appear "cutoff" [\#628](https://github.com/knsv/mermaid/issues/628)
- Uncaught TypeError: \_.constant is not a function \(mermaid.js\) [\#626](https://github.com/knsv/mermaid/issues/626)
- Missing tags and releases for newer versions [\#623](https://github.com/knsv/mermaid/issues/623)
- Mermaid and Leo / Leo Vue [\#622](https://github.com/knsv/mermaid/issues/622)
- mermaidAPI gantt Vue.js [\#621](https://github.com/knsv/mermaid/issues/621)
- Gantt sections are not separated by colors - Fix: set numberSectionStyles to 4 instead of 3 [\#620](https://github.com/knsv/mermaid/issues/620)
- how to get mermaidAPI? [\#617](https://github.com/knsv/mermaid/issues/617)
- Error in startOnLoad documentation? [\#616](https://github.com/knsv/mermaid/issues/616)
- Example export to SVG generates error [\#614](https://github.com/knsv/mermaid/issues/614)
- The new online editor does not support previously generated links [\#613](https://github.com/knsv/mermaid/issues/613)
- Grammar / Syntax documentation for flowcharts [\#607](https://github.com/knsv/mermaid/issues/607)
- Mermaid does not work with d3.js [\#606](https://github.com/knsv/mermaid/issues/606)
- Why does this code's flowchart lines get cut-off on screen? [\#604](https://github.com/knsv/mermaid/issues/604)
- click keyword does not fire my callback \(on the demo Website too\) [\#603](https://github.com/knsv/mermaid/issues/603)
- Online Editor fails to show exported SVG [\#601](https://github.com/knsv/mermaid/issues/601)
- Just saying thanks! [\#597](https://github.com/knsv/mermaid/issues/597)
- stylesheet crashed with other library like abcjs [\#596](https://github.com/knsv/mermaid/issues/596)
- Missing connection [\#594](https://github.com/knsv/mermaid/issues/594)
- How to use mermaid on node.js restful api? [\#593](https://github.com/knsv/mermaid/issues/593)
- Remove status code [\#589](https://github.com/knsv/mermaid/issues/589)
- Golang based editor [\#588](https://github.com/knsv/mermaid/issues/588)
- sequenceDiagram -\> notetext css font is hardcoded [\#587](https://github.com/knsv/mermaid/issues/587)
- Multiple graph in the live editor [\#586](https://github.com/knsv/mermaid/issues/586)
- All \<svg\> elements in page are colored black [\#584](https://github.com/knsv/mermaid/issues/584)
- Styling: classes aren't applied to elements. [\#582](https://github.com/knsv/mermaid/issues/582)
- Rounded connections [\#580](https://github.com/knsv/mermaid/issues/580)
- Arrows are not being shown correctly in the dark theme [\#578](https://github.com/knsv/mermaid/issues/578)
- The documentation for CLI seems outdated. [\#572](https://github.com/knsv/mermaid/issues/572)
- No effect of click event:can not open link [\#571](https://github.com/knsv/mermaid/issues/571)
- Text colors are not correct in VSCODE [\#570](https://github.com/knsv/mermaid/issues/570)
- Nodes aren't aligned properly \(just need an explanation\) [\#568](https://github.com/knsv/mermaid/issues/568)
- setting margin around figure in R [\#567](https://github.com/knsv/mermaid/issues/567)
- Arrows should Come out in upward and Downward direction from decision Node [\#566](https://github.com/knsv/mermaid/issues/566)
- TypeError: Cannot read property 'select' of undefined [\#563](https://github.com/knsv/mermaid/issues/563)
- A little bug [\#557](https://github.com/knsv/mermaid/issues/557)
- Japanese text appears garbled [\#554](https://github.com/knsv/mermaid/issues/554)
- classdiagram not works in mermaid live\_editor [\#553](https://github.com/knsv/mermaid/issues/553)
- font awesome in link text? [\#546](https://github.com/knsv/mermaid/issues/546)
- q: heard of the cosmogol standard? [\#545](https://github.com/knsv/mermaid/issues/545)
- Arrow heads missing \(cli, 7.0.3\) [\#544](https://github.com/knsv/mermaid/issues/544)
- No Edge Boxes if useHtmlLabels=false [\#541](https://github.com/knsv/mermaid/issues/541)
- how to change mermaid text color or line text block color [\#534](https://github.com/knsv/mermaid/issues/534)
- FlowChart visualization broken when downloading from live editor [\#533](https://github.com/knsv/mermaid/issues/533)
- Can't get flowchart to render paths at the top of the diagram; I even tried the online editor and that shows the same issue. Thoughts? [\#532](https://github.com/knsv/mermaid/issues/532)
- live editor make browser\(safari on macOS&iOS\) not longer respond [\#531](https://github.com/knsv/mermaid/issues/531)
- css classes need a prefix/namespace [\#527](https://github.com/knsv/mermaid/issues/527)
- input activate/deactivate cause safari unresponding [\#521](https://github.com/knsv/mermaid/issues/521)
- Cannot Render the Mermaid Graph to PDF ? [\#520](https://github.com/knsv/mermaid/issues/520)
- clicking links works from inset in subgraph but not from nodes [\#516](https://github.com/knsv/mermaid/issues/516)
- Strange syntax error - when importing mermaid.js [\#515](https://github.com/knsv/mermaid/issues/515)
- gantt x-axis display [\#510](https://github.com/knsv/mermaid/issues/510)
- phantomjs renamed to phantomjs-prebuilt [\#508](https://github.com/knsv/mermaid/issues/508)
- issue when using sphinxcontrib-mermaid extension for sphinx [\#507](https://github.com/knsv/mermaid/issues/507)
- layout of docs page looks broken [\#504](https://github.com/knsv/mermaid/issues/504)
- Problem showing graph with php on localhost [\#502](https://github.com/knsv/mermaid/issues/502)
- logLevel's option doesnt work at 7.0.0 [\#501](https://github.com/knsv/mermaid/issues/501)
- How do I get the log for a render or parse attempt? [\#500](https://github.com/knsv/mermaid/issues/500)
- Mermaid neutral style style to built in latest release [\#499](https://github.com/knsv/mermaid/issues/499)
- Any plans for adding a typescript definition file? [\#495](https://github.com/knsv/mermaid/issues/495)
- Gantt diagrams too narrow [\#493](https://github.com/knsv/mermaid/issues/493)
- Flowchart edge labels placement [\#490](https://github.com/knsv/mermaid/issues/490)
- Very different styles when rendering as png vs. svg [\#489](https://github.com/knsv/mermaid/issues/489)
- New editor that supports mermaid: Caret [\#488](https://github.com/knsv/mermaid/issues/488)
- Gant PNG margin [\#486](https://github.com/knsv/mermaid/issues/486)
- ReferenceError: window is not defined [\#485](https://github.com/knsv/mermaid/issues/485)
- Menu and layout bugs in docs [\#484](https://github.com/knsv/mermaid/issues/484)
- Mermaid resets some of the page CSS styles [\#482](https://github.com/knsv/mermaid/issues/482)
- Arrows rendering incorrectly in online editor [\#480](https://github.com/knsv/mermaid/issues/480)
- CSS stroke-dasharray ignored by browsers but not other viewers [\#474](https://github.com/knsv/mermaid/issues/474)
- mermaid - Browser Support issue [\#472](https://github.com/knsv/mermaid/issues/472)
- Totally love mermaid I might pop! [\#471](https://github.com/knsv/mermaid/issues/471)
- Sequence Diagram: Missing x on async arrows \(png\) [\#469](https://github.com/knsv/mermaid/issues/469)
- live editor: the svg file rendered from graph is not supported by browsers [\#468](https://github.com/knsv/mermaid/issues/468)
- Not found css [\#462](https://github.com/knsv/mermaid/issues/462)
- Phantomjs Dependency [\#461](https://github.com/knsv/mermaid/issues/461)
- Mermaid cli not working for subgraphs [\#459](https://github.com/knsv/mermaid/issues/459)
- Support for notes across multiple participants? [\#458](https://github.com/knsv/mermaid/issues/458)
- Related to Issue \#329: Phantomjs issues. [\#455](https://github.com/knsv/mermaid/issues/455)
- Add a click style [\#426](https://github.com/knsv/mermaid/issues/426)
- Add Parallel block \(par\) to sequence diagrams [\#425](https://github.com/knsv/mermaid/issues/425)
- updating shapes after the flow chart rendering complete [\#424](https://github.com/knsv/mermaid/issues/424)
- can't catch parse error Maximum call stack size exceeded on safari [\#421](https://github.com/knsv/mermaid/issues/421)
- Arrows endings are missing [\#419](https://github.com/knsv/mermaid/issues/419)
- shouldn't mermaid become more like Markdown ? [\#417](https://github.com/knsv/mermaid/issues/417)
- Live editor show rendered diagram if syntax invalid [\#415](https://github.com/knsv/mermaid/issues/415)
- Live editor sticky sidebar [\#414](https://github.com/knsv/mermaid/issues/414)
- Linkstyle stroke does not work [\#410](https://github.com/knsv/mermaid/issues/410)
- flowchart id's with dots in them .. break links [\#408](https://github.com/knsv/mermaid/issues/408)
- Flowchart: Link text beginning with lowercase 'o' causes flowchart to break [\#407](https://github.com/knsv/mermaid/issues/407)
- Some chinese character will case Safari no responding. [\#405](https://github.com/knsv/mermaid/issues/405)
- Cannot center-justify text in nodes? [\#397](https://github.com/knsv/mermaid/issues/397)
- Edge labels should have white background in live editor [\#396](https://github.com/knsv/mermaid/issues/396)
- Live editor does not support activate/deactivate [\#394](https://github.com/knsv/mermaid/issues/394)
- Styling subgraph? [\#391](https://github.com/knsv/mermaid/issues/391)
- Update live editor to version 6.0.0 [\#387](https://github.com/knsv/mermaid/issues/387)
- sequence diagram config issue [\#385](https://github.com/knsv/mermaid/issues/385)
- How to add newline in the text [\#384](https://github.com/knsv/mermaid/issues/384)
- PhantomJS crashes on a large graph [\#380](https://github.com/knsv/mermaid/issues/380)
- Finnish support for class diagrams using plantuml syntax [\#377](https://github.com/knsv/mermaid/issues/377)
- mermaidAPI.render generated different svg code from mermaid.int\(\) [\#374](https://github.com/knsv/mermaid/issues/374)
- Put your own action on the chart [\#372](https://github.com/knsv/mermaid/issues/372)
- when declaring participants the elements are generated twice [\#370](https://github.com/knsv/mermaid/issues/370)
- Example Flowchart is cut in display \(Chrome\). [\#368](https://github.com/knsv/mermaid/issues/368)
- Add shebang support to diagrams [\#365](https://github.com/knsv/mermaid/issues/365)
- Silencing CLI output [\#352](https://github.com/knsv/mermaid/issues/352)
- SequenceDiagram: 3+ Alternative Paths [\#348](https://github.com/knsv/mermaid/issues/348)
- Smaller height of actor boxes [\#342](https://github.com/knsv/mermaid/issues/342)
- Question: lib/phantomscript.js - foreignObjects in SVG - related to \#58 [\#340](https://github.com/knsv/mermaid/issues/340)
- npm test fails on osx being blocked at Can not load "PhantomJS", it is not registered! [\#337](https://github.com/knsv/mermaid/issues/337)
- Tabs & subgraphs cause rendering error [\#336](https://github.com/knsv/mermaid/issues/336)
- Display question: right angles [\#335](https://github.com/knsv/mermaid/issues/335)
- No Arrows rendered v0.5.8 [\#330](https://github.com/knsv/mermaid/issues/330)
- mermaid -v filename.mmd gives You must specify at least one source file. [\#328](https://github.com/knsv/mermaid/issues/328)
- You had errors in your syntax. Use --help for further information. [\#327](https://github.com/knsv/mermaid/issues/327)
- Allow alternate arrow syntax that doesn't close html comments [\#322](https://github.com/knsv/mermaid/issues/322)
- Comment in subgraph [\#319](https://github.com/knsv/mermaid/issues/319)
- Update graph [\#311](https://github.com/knsv/mermaid/issues/311)
- css conflicts with boostrap's css [\#308](https://github.com/knsv/mermaid/issues/308)
- Can not get click event to fire. [\#306](https://github.com/knsv/mermaid/issues/306)
- Fix phantomjs2 compatibility [\#304](https://github.com/knsv/mermaid/issues/304)
- Flowcharts do not work in native IE11 [\#303](https://github.com/knsv/mermaid/issues/303)
- Integration with remark.js - tutorial added [\#302](https://github.com/knsv/mermaid/issues/302)
- Theme for dark background [\#301](https://github.com/knsv/mermaid/issues/301)
- Sequence diagram Loops: changing boxMargin spoils the "loop" notation [\#299](https://github.com/knsv/mermaid/issues/299)
- src/mermaid.js generates bad code [\#297](https://github.com/knsv/mermaid/issues/297)
- Fresh fork: jasmine tests fail [\#294](https://github.com/knsv/mermaid/issues/294)
- CSS clash [\#292](https://github.com/knsv/mermaid/issues/292)
- Mermaid does not work in Chrome 48 [\#281](https://github.com/knsv/mermaid/issues/281)
- node click is not effective [\#272](https://github.com/knsv/mermaid/issues/272)
- circle and ellipse cannot change color by classDef [\#271](https://github.com/knsv/mermaid/issues/271)
- \[Feature request\] gantt diagram axis format [\#269](https://github.com/knsv/mermaid/issues/269)
- Not Able to See Labels even htmlLabels:false added [\#268](https://github.com/knsv/mermaid/issues/268)
- npm run watch doesnt work due missing dependencies [\#266](https://github.com/knsv/mermaid/issues/266)
- label out of node [\#262](https://github.com/knsv/mermaid/issues/262)
- IE11 Support issue [\#261](https://github.com/knsv/mermaid/issues/261)
- mermaid without browser [\#260](https://github.com/knsv/mermaid/issues/260)
- Insufficient capacity of gantt diagrams [\#226](https://github.com/knsv/mermaid/issues/226)
- some WARN about installion [\#222](https://github.com/knsv/mermaid/issues/222)
- Live editor offline access [\#217](https://github.com/knsv/mermaid/issues/217)
- suggest: code highlight mode config for editors [\#212](https://github.com/knsv/mermaid/issues/212)
- Uncaught RangeError: Maximum call stack size exceeded [\#189](https://github.com/knsv/mermaid/issues/189)
- Implement render function for server side rendering using phantomjs [\#169](https://github.com/knsv/mermaid/issues/169)
- Styling label texts [\#50](https://github.com/knsv/mermaid/issues/50)
- Graphviz DOT syntax [\#5](https://github.com/knsv/mermaid/issues/5)
**Merged pull requests:**
- Remove console.log in classDB. [\#861](https://github.com/knsv/mermaid/pull/861) ([Arthaey](https://github.com/Arthaey))
- Bump sshpk from 1.13.1 to 1.16.1 [\#851](https://github.com/knsv/mermaid/pull/851) ([dependabot[bot]](https://github.com/apps/dependabot))
- Significantly smaller bundles [\#850](https://github.com/knsv/mermaid/pull/850) ([fabiospampinato](https://github.com/fabiospampinato))
- Support styling of subgraphs [\#845](https://github.com/knsv/mermaid/pull/845) ([Qix-](https://github.com/Qix-))
- fix dark theme loop labels not visible [\#837](https://github.com/knsv/mermaid/pull/837) ([jnnnnn](https://github.com/jnnnnn))
- fix draw function can only call once [\#832](https://github.com/knsv/mermaid/pull/832) ([vaniship](https://github.com/vaniship))
- Fix dotted lines not appearing in flowcharts when HTML labels disabled [\#828](https://github.com/knsv/mermaid/pull/828) ([stanhu](https://github.com/stanhu))
- Fix issue with XML line breaks inside vertex labels [\#824](https://github.com/knsv/mermaid/pull/824) ([jsyang](https://github.com/jsyang))
- fixed diagrams [\#810](https://github.com/knsv/mermaid/pull/810) ([0xflotus](https://github.com/0xflotus))
- Clickable gantt tasks [\#804](https://github.com/knsv/mermaid/pull/804) ([abzicht](https://github.com/abzicht))
- linkStyle now supports list of indexes with a few tests [\#798](https://github.com/knsv/mermaid/pull/798) ([ivan-danilov](https://github.com/ivan-danilov))
- fix class diagram mermaid [\#795](https://github.com/knsv/mermaid/pull/795) ([DanShai](https://github.com/DanShai))
- Added exclude weekdays to definition [\#792](https://github.com/knsv/mermaid/pull/792) ([jopapo](https://github.com/jopapo))
- SVG link rendering [\#791](https://github.com/knsv/mermaid/pull/791) ([flying-sheep](https://github.com/flying-sheep))
- Gantt milestones [\#788](https://github.com/knsv/mermaid/pull/788) ([gijswijs](https://github.com/gijswijs))
- Remove duplicate code [\#768](https://github.com/knsv/mermaid/pull/768) ([znxkznxk1030](https://github.com/znxkznxk1030))
- Render nodes as real links [\#765](https://github.com/knsv/mermaid/pull/765) ([flying-sheep](https://github.com/flying-sheep))
- Support Multi-line Actor Descriptions [\#764](https://github.com/knsv/mermaid/pull/764) ([watsoncj](https://github.com/watsoncj))
- Fix issue with marker-end. [\#757](https://github.com/knsv/mermaid/pull/757) ([gjlubbertsen](https://github.com/gjlubbertsen))
- Make Class Diagrams usable in Stackedit and Live Editor [\#749](https://github.com/knsv/mermaid/pull/749) ([monsterkrampe](https://github.com/monsterkrampe))
- Sequence numbers [\#722](https://github.com/knsv/mermaid/pull/722) ([paulbland](https://github.com/paulbland))
- Add option for right angles [\#721](https://github.com/knsv/mermaid/pull/721) ([paulbland](https://github.com/paulbland))
- Add nested activation classes [\#720](https://github.com/knsv/mermaid/pull/720) ([paulbland](https://github.com/paulbland))
- wip: class diagram cardinality display [\#705](https://github.com/knsv/mermaid/pull/705) ([Vrixyz](https://github.com/Vrixyz))
- add comments about CSS in config [\#688](https://github.com/knsv/mermaid/pull/688) ([imma90](https://github.com/imma90))
- SequenceDiagram: Add support for multiple alt else statements [\#641](https://github.com/knsv/mermaid/pull/641) ([sechel](https://github.com/sechel))
- fix \#426 - add class .clickable on nodes with click function or link [\#598](https://github.com/knsv/mermaid/pull/598) ([thomasleveil](https://github.com/thomasleveil))
- Spec fix 1 [\#595](https://github.com/knsv/mermaid/pull/595) ([frankschmitt](https://github.com/frankschmitt))
## [7.0.5](https://github.com/knsv/mermaid/tree/7.0.5) (2017-09-01)
[Full Changelog](https://github.com/knsv/mermaid/compare/7.0.3...7.0.5)
**Closed issues:**
- live editor latin error after update [\#560](https://github.com/knsv/mermaid/issues/560)
- Simple full example in online documentation is broken [\#558](https://github.com/knsv/mermaid/issues/558)
- Graph No Arrow Head v7.0.3 [\#543](https://github.com/knsv/mermaid/issues/543)
- Conflict while using mermaid along with core-js [\#512](https://github.com/knsv/mermaid/issues/512)
- Export to pdf on website [\#496](https://github.com/knsv/mermaid/issues/496)
- New downstream project: Mermaid Preview for VSCode [\#442](https://github.com/knsv/mermaid/issues/442)
- Can't Zoom the flowchart ? [\#399](https://github.com/knsv/mermaid/issues/399)
- line labels are not rendered correctly in live editor [\#366](https://github.com/knsv/mermaid/issues/366)
- mermaid-loader [\#361](https://github.com/knsv/mermaid/issues/361)
- Are there any documentation or examples for classDiagram and gitGraph? [\#359](https://github.com/knsv/mermaid/issues/359)
- \# character broken in 0.5.8 [\#347](https://github.com/knsv/mermaid/issues/347)
- Documentation issue: CSS example is not visible [\#345](https://github.com/knsv/mermaid/issues/345)
- Include documentation for command line usage [\#326](https://github.com/knsv/mermaid/issues/326)
- Fresh fork: can't build dist [\#296](https://github.com/knsv/mermaid/issues/296)
- Invalid value for \<svg\> attribute viewBox="0 0 -Infinity -Infinity" [\#291](https://github.com/knsv/mermaid/issues/291)
- Webpack require fails [\#277](https://github.com/knsv/mermaid/issues/277)
- New documentation - need improved logo [\#216](https://github.com/knsv/mermaid/issues/216)
## [7.0.3](https://github.com/knsv/mermaid/tree/7.0.3) (2017-06-04)
[Full Changelog](https://github.com/knsv/mermaid/compare/7.0.2...7.0.3)
**Closed issues:**
- the documentation website is down [\#539](https://github.com/knsv/mermaid/issues/539)
- Good example of interactivity with mermaidAPI [\#514](https://github.com/knsv/mermaid/issues/514)
## [7.0.2](https://github.com/knsv/mermaid/tree/7.0.2) (2017-06-01)
[Full Changelog](https://github.com/knsv/mermaid/compare/7.0.0...7.0.2)
**Closed issues:**
- CDN is not working [\#511](https://github.com/knsv/mermaid/issues/511)
- A sampe sequenceDiagram crashes mermaid-cli [\#492](https://github.com/knsv/mermaid/issues/492)
- Mermaid doesn't delete nodes when called multiple times [\#491](https://github.com/knsv/mermaid/issues/491)
- API crashes on 2nd render\(\) call [\#478](https://github.com/knsv/mermaid/issues/478)
- sequenceDiagram: dotted line for alt and empty bracket should be hidden [\#456](https://github.com/knsv/mermaid/issues/456)
- SVG output \(almost\) not correct [\#434](https://github.com/knsv/mermaid/issues/434)
- How to set axisFormatter of gantt in mermaid CLI? [\#428](https://github.com/knsv/mermaid/issues/428)
- customizing link style with any color sets `fill` property to `black` instead of `none` [\#416](https://github.com/knsv/mermaid/issues/416)
- New line at the end of SVG file [\#400](https://github.com/knsv/mermaid/issues/400)
- CLI doesn't work [\#389](https://github.com/knsv/mermaid/issues/389)
- Can't render subgraphs with htmlLabels: false [\#367](https://github.com/knsv/mermaid/issues/367)
- Color arrowhead [\#362](https://github.com/knsv/mermaid/issues/362)
- CLI: Invisible text, lines in SVG output [\#341](https://github.com/knsv/mermaid/issues/341)
**Merged pull requests:**
- Update Travis config [\#538](https://github.com/knsv/mermaid/pull/538) ([tylerlong](https://github.com/tylerlong))
- Fix spelling of 'you' in sequenceDiagram docs [\#537](https://github.com/knsv/mermaid/pull/537) ([ctruelson](https://github.com/ctruelson))
- Improve CLI output [\#536](https://github.com/knsv/mermaid/pull/536) ([gibson042](https://github.com/gibson042))
- Modernize mermaid [\#524](https://github.com/knsv/mermaid/pull/524) ([tylerlong](https://github.com/tylerlong))
- Modernize mermaid [\#519](https://github.com/knsv/mermaid/pull/519) ([tylerlong](https://github.com/tylerlong))
- Update CLI instructions [\#509](https://github.com/knsv/mermaid/pull/509) ([filipedeschamps](https://github.com/filipedeschamps))
- Add style for classDiagram to dark/default theme [\#503](https://github.com/knsv/mermaid/pull/503) ([yudenzel](https://github.com/yudenzel))
- Fix documentation for git graph. [\#498](https://github.com/knsv/mermaid/pull/498) ([gomlgs](https://github.com/gomlgs))
- Fix links in documentations [\#497](https://github.com/knsv/mermaid/pull/497) ([saveman71](https://github.com/saveman71))
- Update README.md with git graph sample [\#481](https://github.com/knsv/mermaid/pull/481) ([raghur](https://github.com/raghur))
- Fix misspelling of “another” [\#479](https://github.com/knsv/mermaid/pull/479) ([stevenschobert](https://github.com/stevenschobert))
- Fixed \#456 sequenceDiagram: dotted line for alt and empty bracket sho… [\#477](https://github.com/knsv/mermaid/pull/477) ([brookhong](https://github.com/brookhong))
- Add viewbox attr to class diagram [\#473](https://github.com/knsv/mermaid/pull/473) ([gnkm](https://github.com/gnkm))
- add par statement to sequenceDiagram [\#470](https://github.com/knsv/mermaid/pull/470) ([u-minor](https://github.com/u-minor))
## [7.0.0](https://github.com/knsv/mermaid/tree/7.0.0) (2017-01-29)
[Full Changelog](https://github.com/knsv/mermaid/compare/6.0.0...7.0.0)
**Closed issues:**
- demos on io site not working [\#466](https://github.com/knsv/mermaid/issues/466)
- Can not be generated PNG pictures through CLI with Chinese [\#451](https://github.com/knsv/mermaid/issues/451)
- Round nodes cannot be styled with CSS classes [\#443](https://github.com/knsv/mermaid/issues/443)
- webpack gulp UglifyJsPlugin error. [\#440](https://github.com/knsv/mermaid/issues/440)
- String concatenation isn't working [\#432](https://github.com/knsv/mermaid/issues/432)
- text flow/wrap in actor box of sequence diagram [\#422](https://github.com/knsv/mermaid/issues/422)
- Online live editor still use old version [\#402](https://github.com/knsv/mermaid/issues/402)
- uncaught TypeError: t.getTransformToElement is not a function [\#401](https://github.com/knsv/mermaid/issues/401)
- Only works when using browserify'd code [\#373](https://github.com/knsv/mermaid/issues/373)
- document the use of shebang line in mmd files [\#364](https://github.com/knsv/mermaid/issues/364)
- Diagrams are small and unreadable in IE 11 - since 0.5.1 [\#356](https://github.com/knsv/mermaid/issues/356)
- \[Feature Request\] ER-Diagram Support [\#354](https://github.com/knsv/mermaid/issues/354)
- npm install -g mermaid does not install phantomjs [\#329](https://github.com/knsv/mermaid/issues/329)
- activation boxes [\#313](https://github.com/knsv/mermaid/issues/313)
- The need for mermaid.css should be mentioned explicitly in the intro docs... [\#273](https://github.com/knsv/mermaid/issues/273)
**Merged pull requests:**
- Update index.html [\#465](https://github.com/knsv/mermaid/pull/465) ([bmsleight](https://github.com/bmsleight))
- Fix for \#416, customizing link style with any color sets `fill` property to `black` instead of `none` [\#452](https://github.com/knsv/mermaid/pull/452) ([joshuacolvin](https://github.com/joshuacolvin))
- Allow .node\>circle to receive css styles [\#449](https://github.com/knsv/mermaid/pull/449) ([bfriedz](https://github.com/bfriedz))
- Fix spelling [\#447](https://github.com/knsv/mermaid/pull/447) ([jawn](https://github.com/jawn))
- added tests and fix cli css style selector lowercase problem [\#445](https://github.com/knsv/mermaid/pull/445) ([whyzdev](https://github.com/whyzdev))
- Update d3.js [\#441](https://github.com/knsv/mermaid/pull/441) ([hetz](https://github.com/hetz))
- adde tests to reproduce \#434 in flowchart [\#439](https://github.com/knsv/mermaid/pull/439) ([whyzdev](https://github.com/whyzdev))
- Code Climate config [\#437](https://github.com/knsv/mermaid/pull/437) ([larkinscott](https://github.com/larkinscott))
- fix gantt and sequence digram cli cfg [\#435](https://github.com/knsv/mermaid/pull/435) ([whyzdev](https://github.com/whyzdev))
- fix gantt chart cli configuration broken [\#433](https://github.com/knsv/mermaid/pull/433) ([whyzdev](https://github.com/whyzdev))
- fix gantt chart cli configuration parsing including functions [\#430](https://github.com/knsv/mermaid/pull/430) ([whyzdev](https://github.com/whyzdev))
- Uses an empty text node instead of a string for svg group labels [\#429](https://github.com/knsv/mermaid/pull/429) ([daveaglick](https://github.com/daveaglick))
- use tspan via d3.textwrap to place actor text in sequence diagram [\#427](https://github.com/knsv/mermaid/pull/427) ([whyzdev](https://github.com/whyzdev))
- \#422 use foreignObject/div to place actor label in sequence diagram [\#423](https://github.com/knsv/mermaid/pull/423) ([whyzdev](https://github.com/whyzdev))
- Clarify the need for a CSS stylesheet [\#413](https://github.com/knsv/mermaid/pull/413) ([sifb](https://github.com/sifb))
- Added hads downstream project [\#412](https://github.com/knsv/mermaid/pull/412) ([sinedied](https://github.com/sinedied))
- update usage and fix \#273 [\#406](https://github.com/knsv/mermaid/pull/406) ([jinntrance](https://github.com/jinntrance))
- Add https://github.com/raghur/mermaid-filter to downstream projects docs page [\#404](https://github.com/knsv/mermaid/pull/404) ([raghur](https://github.com/raghur))
- New neutral theme [\#395](https://github.com/knsv/mermaid/pull/395) ([sinedied](https://github.com/sinedied))
- fix cli issues [\#390](https://github.com/knsv/mermaid/pull/390) ([ben-page](https://github.com/ben-page))
- Add missing space for 'Labels out of bounds' section [\#386](https://github.com/knsv/mermaid/pull/386) ([The-Alchemist](https://github.com/The-Alchemist))
- Fix typo: `pats` -\> `paths` [\#382](https://github.com/knsv/mermaid/pull/382) ([swhgoon](https://github.com/swhgoon))
- Added class diagram example to README.md [\#379](https://github.com/knsv/mermaid/pull/379) ([HustLion](https://github.com/HustLion))
- override normal flowchart arrowhead to allow css styling [\#376](https://github.com/knsv/mermaid/pull/376) ([dodoinblue](https://github.com/dodoinblue))
- added sphinx extension [\#371](https://github.com/knsv/mermaid/pull/371) ([mgaitan](https://github.com/mgaitan))
- Fix typo in the sequence diagram documentation [\#369](https://github.com/knsv/mermaid/pull/369) ([ggpasqualino](https://github.com/ggpasqualino))
## [6.0.0](https://github.com/knsv/mermaid/tree/6.0.0) (2016-05-29)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.5.8...6.0.0)
**Closed issues:**
- Docs css: code hard to read [\#324](https://github.com/knsv/mermaid/issues/324)
- About Markpad integration [\#323](https://github.com/knsv/mermaid/issues/323)
- How to link backwords in flowchat? [\#321](https://github.com/knsv/mermaid/issues/321)
- Help with editor [\#310](https://github.com/knsv/mermaid/issues/310)
- +1 [\#293](https://github.com/knsv/mermaid/issues/293)
- Basic chart does not render on Chome, but does in Firefox [\#290](https://github.com/knsv/mermaid/issues/290)
- Live editor is broken [\#285](https://github.com/knsv/mermaid/issues/285)
- "No such file or directory" trying to run mermaid 0.5.7 on OS X [\#284](https://github.com/knsv/mermaid/issues/284)
- participant name as "Long Long Name" [\#283](https://github.com/knsv/mermaid/issues/283)
- Windows - cli - could not find phantomjs at the specified path [\#236](https://github.com/knsv/mermaid/issues/236)
**Merged pull requests:**
- The option of gantt for the spaces for the section names. [\#353](https://github.com/knsv/mermaid/pull/353) ([zeroyonichihachi](https://github.com/zeroyonichihachi))
- Gitgraph: Make reset work with parent ref carets [\#350](https://github.com/knsv/mermaid/pull/350) ([raghur](https://github.com/raghur))
- Remove the text-shadows that make the text look blurry [\#349](https://github.com/knsv/mermaid/pull/349) ([AsaAyers](https://github.com/AsaAyers))
- add line interpolation to linkStyle in flowchart [\#346](https://github.com/knsv/mermaid/pull/346) ([AlanHohn](https://github.com/AlanHohn))
- Support git graph diagrams in mermaid [\#344](https://github.com/knsv/mermaid/pull/344) ([raghur](https://github.com/raghur))
- Build and test execution changes [\#338](https://github.com/knsv/mermaid/pull/338) ([ssbarnea](https://github.com/ssbarnea))
- Reformatting of css files [\#331](https://github.com/knsv/mermaid/pull/331) ([Jmuccigr](https://github.com/Jmuccigr))
- \(WIP\) Sequence Diagram Title Support [\#320](https://github.com/knsv/mermaid/pull/320) ([bronsoja](https://github.com/bronsoja))
- activations doc + few fixes [\#318](https://github.com/knsv/mermaid/pull/318) ([ciekawy](https://github.com/ciekawy))
- Dark theme for better contrast on darker backgrounds [\#317](https://github.com/knsv/mermaid/pull/317) ([crodriguez1a](https://github.com/crodriguez1a))
- Activations [\#316](https://github.com/knsv/mermaid/pull/316) ([ciekawy](https://github.com/ciekawy))
- Support leading comments for sequenceDiagrams [\#312](https://github.com/knsv/mermaid/pull/312) ([ashsearle](https://github.com/ashsearle))
- Show a little lenience for white-space around names [\#309](https://github.com/knsv/mermaid/pull/309) ([ashsearle](https://github.com/ashsearle))
- Update list of downstream projects [\#307](https://github.com/knsv/mermaid/pull/307) ([maxArturo](https://github.com/maxArturo))
- Issue 299: Sequence diagram Loops: changing boxMargin spoils the "loop" notation [\#300](https://github.com/knsv/mermaid/pull/300) ([LarryKlugerDS](https://github.com/LarryKlugerDS))
- Issue 297 - src/mermaid.js generates bad code [\#298](https://github.com/knsv/mermaid/pull/298) ([LarryKlugerDS](https://github.com/LarryKlugerDS))
- Updated instructions for running tests [\#295](https://github.com/knsv/mermaid/pull/295) ([LarryKlugerDS](https://github.com/LarryKlugerDS))
- Add Markdown Plus to Downstream projects [\#288](https://github.com/knsv/mermaid/pull/288) ([tylerlong](https://github.com/tylerlong))
- Quote phantomPath so that it doesn't fail on window [\#286](https://github.com/knsv/mermaid/pull/286) ([raghur](https://github.com/raghur))
## [0.5.8](https://github.com/knsv/mermaid/tree/0.5.8) (2016-01-27)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.5.7...0.5.8)
## [0.5.7](https://github.com/knsv/mermaid/tree/0.5.7) (2016-01-25)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.5.6...0.5.7)
**Closed issues:**
- Mermaid + LightPaper = ❤️ [\#280](https://github.com/knsv/mermaid/issues/280)
- Bower Integration [\#278](https://github.com/knsv/mermaid/issues/278)
- Mermaid breaks when variables end in 'v' [\#276](https://github.com/knsv/mermaid/issues/276)
- sequence diagrams don't support participant aliasing [\#263](https://github.com/knsv/mermaid/issues/263)
- One diagram that fails to render stops further execution on the page [\#259](https://github.com/knsv/mermaid/issues/259)
- Where to find line layout algorithm? [\#258](https://github.com/knsv/mermaid/issues/258)
- Compatibility with node.js [\#257](https://github.com/knsv/mermaid/issues/257)
- Label resizing with dynamically loaded fonts [\#255](https://github.com/knsv/mermaid/issues/255)
- SVG arrowheads are broken in the CLI [\#249](https://github.com/knsv/mermaid/issues/249)
- Cannot read property 'replace' of undefined [\#239](https://github.com/knsv/mermaid/issues/239)
**Merged pull requests:**
- gh-50 Allow styling of edge labels in css [\#267](https://github.com/knsv/mermaid/pull/267) ([Anoia](https://github.com/Anoia))
- Allow sequenceDiagram participant aliasing [\#265](https://github.com/knsv/mermaid/pull/265) ([gibson042](https://github.com/gibson042))
## [0.5.6](https://github.com/knsv/mermaid/tree/0.5.6) (2015-11-22)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.5.5...0.5.6)
**Closed issues:**
- title doesn't work in sequenceDiagram [\#248](https://github.com/knsv/mermaid/issues/248)
- hypen-minus should be valid in sequence diagram alt/else/etc. descriptions [\#247](https://github.com/knsv/mermaid/issues/247)
- Broken in firefox? [\#245](https://github.com/knsv/mermaid/issues/245)
- When there is a Chinese symbol in the flowchart, it will crash。 [\#238](https://github.com/knsv/mermaid/issues/238)
- Non-alpha characters included in ALPHA token \(flow graph jison\) [\#232](https://github.com/knsv/mermaid/issues/232)
- subgraph not rendering with change to sample [\#231](https://github.com/knsv/mermaid/issues/231)
- sequence diagram requires a new line at the end? [\#229](https://github.com/knsv/mermaid/issues/229)
- Live Editor: Permalink address not being parsed [\#202](https://github.com/knsv/mermaid/issues/202)
- Add download SVG link to the live editor [\#144](https://github.com/knsv/mermaid/issues/144)
**Merged pull requests:**
- Make sequenceDiagram terminal newline optional [\#253](https://github.com/knsv/mermaid/pull/253) ([gibson042](https://github.com/gibson042))
- Support sequenceDiagram "over" notes [\#252](https://github.com/knsv/mermaid/pull/252) ([gibson042](https://github.com/gibson042))
- Properly handle "rest of line" statements [\#251](https://github.com/knsv/mermaid/pull/251) ([gibson042](https://github.com/gibson042))
- CLI: Propagate exit code from lib \(i.e., phantomjs\) [\#250](https://github.com/knsv/mermaid/pull/250) ([gibson042](https://github.com/gibson042))
- flowRender.js - Fix FontAwesome icon insert [\#244](https://github.com/knsv/mermaid/pull/244) ([ma-zal](https://github.com/ma-zal))
- updated sequence diagram link in live editor [\#242](https://github.com/knsv/mermaid/pull/242) ([r-a-v-a-s](https://github.com/r-a-v-a-s))
- updated links in README.md [\#240](https://github.com/knsv/mermaid/pull/240) ([r-a-v-a-s](https://github.com/r-a-v-a-s))
- Ellipse syntax [\#237](https://github.com/knsv/mermaid/pull/237) ([spect88](https://github.com/spect88))
- Allow keywords as suffixes of node ids [\#235](https://github.com/knsv/mermaid/pull/235) ([spect88](https://github.com/spect88))
- Highlighted the editor in the nav [\#234](https://github.com/knsv/mermaid/pull/234) ([knsv](https://github.com/knsv))
- Live editor tweaks [\#233](https://github.com/knsv/mermaid/pull/233) ([spect88](https://github.com/spect88))
- Add a Gitter chat badge to README.md [\#230](https://github.com/knsv/mermaid/pull/230) ([gitter-badger](https://github.com/gitter-badger))
## [0.5.5](https://github.com/knsv/mermaid/tree/0.5.5) (2015-10-21)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.5.4...0.5.5)
**Closed issues:**
- sequence diagram, arrowhead instead of crosshead [\#227](https://github.com/knsv/mermaid/issues/227)
**Merged pull requests:**
- Fix a typo: crosshead --\> arrowhead [\#228](https://github.com/knsv/mermaid/pull/228) ([tylerlong](https://github.com/tylerlong))
## [0.5.4](https://github.com/knsv/mermaid/tree/0.5.4) (2015-10-19)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.5.3...0.5.4)
**Closed issues:**
- Weird bug in live editor when using words with substring `end` [\#184](https://github.com/knsv/mermaid/issues/184)
- Custom icons [\#15](https://github.com/knsv/mermaid/issues/15)
- Marker-end arrow cannot be shown for URL with query parameter [\#225](https://github.com/knsv/mermaid/issues/225)
- Please update bower's D3 version [\#221](https://github.com/knsv/mermaid/issues/221)
- Set log level from mermaid configuration [\#220](https://github.com/knsv/mermaid/issues/220)
- Width fixed to 400px [\#204](https://github.com/knsv/mermaid/issues/204)
- render to png from the cli does not display the marker-end arrow heads [\#181](https://github.com/knsv/mermaid/issues/181)
- Links in sequence diagrams [\#159](https://github.com/knsv/mermaid/issues/159)
- comment characters `%%` cause parse error [\#141](https://github.com/knsv/mermaid/issues/141)
- Add a reversed assymetric shape [\#124](https://github.com/knsv/mermaid/issues/124)
- Add syntax for double headed arrows [\#123](https://github.com/knsv/mermaid/issues/123)
- Support for font-awesome [\#49](https://github.com/knsv/mermaid/issues/49)
**Merged pull requests:**
- Allow `end` as a substring of vertex id [\#224](https://github.com/knsv/mermaid/pull/224) ([spect88](https://github.com/spect88))
- Remove duplicate npm dependencies: d3 and he [\#223](https://github.com/knsv/mermaid/pull/223) ([spect88](https://github.com/spect88))
## [0.5.3](https://github.com/knsv/mermaid/tree/0.5.3) (2015-10-04)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.5.2...0.5.3)
## [0.5.2](https://github.com/knsv/mermaid/tree/0.5.2) (2015-10-04)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.5.1...0.5.2)
**Closed issues:**
- Installing “atom-mermaid@0.1.3” failed [\#218](https://github.com/knsv/mermaid/issues/218)
- Render mermaid code on websites? [\#215](https://github.com/knsv/mermaid/issues/215)
- Brackets in a node with text? [\#213](https://github.com/knsv/mermaid/issues/213)
- node feature request [\#211](https://github.com/knsv/mermaid/issues/211)
- Please add prefix for styles [\#208](https://github.com/knsv/mermaid/issues/208)
- Bad handling of block arguments [\#207](https://github.com/knsv/mermaid/issues/207)
- please consider port to mac osx [\#203](https://github.com/knsv/mermaid/issues/203)
- allow phantomjs \>=1.9.x [\#201](https://github.com/knsv/mermaid/issues/201)
- syntax for venn diagrams? [\#200](https://github.com/knsv/mermaid/issues/200)
- Broken CLI Graphs? \(v0.5.1\) [\#196](https://github.com/knsv/mermaid/issues/196)
- Static site does not render under HTTPS [\#194](https://github.com/knsv/mermaid/issues/194)
- Error on simple graph [\#192](https://github.com/knsv/mermaid/issues/192)
- Escape "~" [\#191](https://github.com/knsv/mermaid/issues/191)
- Trying to add link using 'click' to flowchart [\#188](https://github.com/knsv/mermaid/issues/188)
- cli: no lines and arrowheads rendered / only dotted lines [\#187](https://github.com/knsv/mermaid/issues/187)
- text of mermaid div displayed on page [\#186](https://github.com/knsv/mermaid/issues/186)
- using mermaid with laravel [\#185](https://github.com/knsv/mermaid/issues/185)
- Atom editor package [\#183](https://github.com/knsv/mermaid/issues/183)
- Auto linewrap for notes in sequence diagrams [\#178](https://github.com/knsv/mermaid/issues/178)
- Execute code after initialize [\#176](https://github.com/knsv/mermaid/issues/176)
- Autoscaling for all diagram types [\#175](https://github.com/knsv/mermaid/issues/175)
- Problem wit click event callback [\#174](https://github.com/knsv/mermaid/issues/174)
- How to escape characters? [\#170](https://github.com/knsv/mermaid/issues/170)
- it can not work [\#167](https://github.com/knsv/mermaid/issues/167)
- UML Class diagram [\#154](https://github.com/knsv/mermaid/issues/154)
- Broken subgraph using the CLI [\#153](https://github.com/knsv/mermaid/issues/153)
- Support PlantUML syntax [\#149](https://github.com/knsv/mermaid/issues/149)
- IE Support issue [\#142](https://github.com/knsv/mermaid/issues/142)
- Flowchart truncated [\#140](https://github.com/knsv/mermaid/issues/140)
- Double Quote as text is not working [\#219](https://github.com/knsv/mermaid/issues/219)
- classDef / class not working with htmlLabels? [\#210](https://github.com/knsv/mermaid/issues/210)
- Links in graph missing [\#209](https://github.com/knsv/mermaid/issues/209)
- Last word in comment boxes getting cut off by word wrap library : \( [\#195](https://github.com/knsv/mermaid/issues/195)
- Escaping characters in sequence diagram [\#193](https://github.com/knsv/mermaid/issues/193)
- SVG foreignObject rendering [\#180](https://github.com/knsv/mermaid/issues/180)
- IE9 issue [\#179](https://github.com/knsv/mermaid/issues/179)
- inoperable in an AMD/requirejs environment: IPython Notebook [\#127](https://github.com/knsv/mermaid/issues/127)
- \[Parser\] Hyphen in participant name bring TypeError [\#74](https://github.com/knsv/mermaid/issues/74)
- Support for hyperlink and tooltip [\#34](https://github.com/knsv/mermaid/issues/34)
**Merged pull requests:**
- Update flowchart.md [\#214](https://github.com/knsv/mermaid/pull/214) ([orschiro](https://github.com/orschiro))
- Default style when using the CLI [\#205](https://github.com/knsv/mermaid/pull/205) ([gillesdemey](https://github.com/gillesdemey))
- Gantt chart - add minutes and seconds durations [\#198](https://github.com/knsv/mermaid/pull/198) ([dbrans](https://github.com/dbrans))
- Using QUnit for AMD testing [\#190](https://github.com/knsv/mermaid/pull/190) ([bollwyvl](https://github.com/bollwyvl))
- Update phantomscript.js [\#182](https://github.com/knsv/mermaid/pull/182) ([phairow](https://github.com/phairow))
## [0.5.1](https://github.com/knsv/mermaid/tree/0.5.1) (2015-06-21)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.5.0...0.5.1)
**Closed issues:**
- Live editor is broken [\#173](https://github.com/knsv/mermaid/issues/173)
- 0.5.0 no longer respects custom date definitions in Gantt diagrams [\#171](https://github.com/knsv/mermaid/issues/171)
- Drop label character restrictions [\#162](https://github.com/knsv/mermaid/issues/162)
- can't nest subgraphs in flowchart [\#161](https://github.com/knsv/mermaid/issues/161)
- Unable to generate gantt diagram with mermaid CLI [\#158](https://github.com/knsv/mermaid/issues/158)
- Inline css by "mermaid" [\#157](https://github.com/knsv/mermaid/issues/157)
- Finite State Machine Diagram [\#152](https://github.com/knsv/mermaid/issues/152)
- How to center align gantt diagram [\#150](https://github.com/knsv/mermaid/issues/150)
- Security concern regarding class definition [\#148](https://github.com/knsv/mermaid/issues/148)
- File Extension [\#147](https://github.com/knsv/mermaid/issues/147)
- To SVG Export [\#146](https://github.com/knsv/mermaid/issues/146)
- `setTimeout` with clusters problematic with programmatic edits and no callback [\#133](https://github.com/knsv/mermaid/issues/133)
- Possibility to set the width of the generated flowchart [\#129](https://github.com/knsv/mermaid/issues/129)
- flowchart - styling of edges via css overrides specific styles set in the graph definition [\#128](https://github.com/knsv/mermaid/issues/128)
- module.exports.cloneCssStyles\(\) in combination with Angularjs breaks display in Chrome and IE [\#126](https://github.com/knsv/mermaid/issues/126)
- Gantt - suitable xAxis for longer project [\#125](https://github.com/knsv/mermaid/issues/125)
- Mix horizontal and vertical graph [\#68](https://github.com/knsv/mermaid/issues/68)
- How to get started with this project ? [\#64](https://github.com/knsv/mermaid/issues/64)
- Special characters break parsing [\#54](https://github.com/knsv/mermaid/issues/54)
- Responsive graph layout for mobile viewers [\#51](https://github.com/knsv/mermaid/issues/51)
- Styling connector lines [\#31](https://github.com/knsv/mermaid/issues/31)
**Merged pull requests:**
- Remove moot `version` property from bower.json [\#172](https://github.com/knsv/mermaid/pull/172) ([kkirsche](https://github.com/kkirsche))
## [0.5.0](https://github.com/knsv/mermaid/tree/0.5.0) (2015-06-07)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.4.0...0.5.0)
**Closed issues:**
- it can not work where graph TD contains chinese character [\#166](https://github.com/knsv/mermaid/issues/166)
- Broken Examples [\#163](https://github.com/knsv/mermaid/issues/163)
- uglifyjs wanrings which means we can improve the code [\#156](https://github.com/knsv/mermaid/issues/156)
- New\(er\) features unavailable in downloadable js files? [\#151](https://github.com/knsv/mermaid/issues/151)
- Add gh-gapes link to description [\#143](https://github.com/knsv/mermaid/issues/143)
- Some examples not displayed on Firefox 36.0.1 [\#138](https://github.com/knsv/mermaid/issues/138)
- tags ending in a "v" don't render [\#132](https://github.com/knsv/mermaid/issues/132)
- Links in flowchart [\#131](https://github.com/knsv/mermaid/issues/131)
- Using the library for iOS development [\#130](https://github.com/knsv/mermaid/issues/130)
- Add a css file, mermaid.css, with default styling [\#122](https://github.com/knsv/mermaid/issues/122)
- Add capability for gantt diagrams [\#118](https://github.com/knsv/mermaid/issues/118)
- lower case v causes error in the parser [\#108](https://github.com/knsv/mermaid/issues/108)
- Label's css conflict with boostrap's .label [\#67](https://github.com/knsv/mermaid/issues/67)
- TypeError: Cannot read property 'layout' of undefined [\#37](https://github.com/knsv/mermaid/issues/37)
- software architecture diagram [\#36](https://github.com/knsv/mermaid/issues/36)
- Support for bar charts and pie diagrams [\#22](https://github.com/knsv/mermaid/issues/22)
**Merged pull requests:**
- Dev 0.5.0 [\#168](https://github.com/knsv/mermaid/pull/168) ([knsv](https://github.com/knsv))
- Fix spacing [\#164](https://github.com/knsv/mermaid/pull/164) ([rhcarvalho](https://github.com/rhcarvalho))
- Fixing typo: "Think" -\> "Thick" [\#160](https://github.com/knsv/mermaid/pull/160) ([it0a](https://github.com/it0a))
- IE, local html, cssRules access is denied [\#155](https://github.com/knsv/mermaid/pull/155) ([tylerlong](https://github.com/tylerlong))
- Add automatically generated change log file. [\#139](https://github.com/knsv/mermaid/pull/139) ([skywinder](https://github.com/skywinder))
- Adding init argument to the global API [\#137](https://github.com/knsv/mermaid/pull/137) ([bollwyvl](https://github.com/bollwyvl))
- Add description of manual calling of init [\#136](https://github.com/knsv/mermaid/pull/136) ([bollwyvl](https://github.com/bollwyvl))
- Allow other forms of node selection for init\(\) [\#135](https://github.com/knsv/mermaid/pull/135) ([bollwyvl](https://github.com/bollwyvl))
- Use a library-level variable for assigning ids [\#134](https://github.com/knsv/mermaid/pull/134) ([bollwyvl](https://github.com/bollwyvl))
## [0.4.0](https://github.com/knsv/mermaid/tree/0.4.0) (2015-03-01)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.3.5...0.4.0)
**Closed issues:**
- subgraph background is black in rendered flowchart PNG via CLI [\#121](https://github.com/knsv/mermaid/issues/121)
- Integrate editor at https://github.com/naseer/mermaid-webapp [\#110](https://github.com/knsv/mermaid/issues/110)
- Internet Explorer Support [\#99](https://github.com/knsv/mermaid/issues/99)
- Assymetric shapes not documented [\#82](https://github.com/knsv/mermaid/issues/82)
- NoModificationAllowedError [\#23](https://github.com/knsv/mermaid/issues/23)
- Improve arrows [\#3](https://github.com/knsv/mermaid/issues/3)
## [0.3.5](https://github.com/knsv/mermaid/tree/0.3.5) (2015-02-15)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.3.4...0.3.5)
## [0.3.4](https://github.com/knsv/mermaid/tree/0.3.4) (2015-02-15)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.3.3...0.3.4)
**Closed issues:**
- Subgraph syntax bug? [\#120](https://github.com/knsv/mermaid/issues/120)
- Live editor [\#115](https://github.com/knsv/mermaid/issues/115)
- Error in "Basic Syntax" wiki page [\#113](https://github.com/knsv/mermaid/issues/113)
- semicolons, anyone? [\#111](https://github.com/knsv/mermaid/issues/111)
- undefined `sequenceConfig` fails [\#109](https://github.com/knsv/mermaid/issues/109)
- Sequence Diagrams: Show Actors below as well [\#106](https://github.com/knsv/mermaid/issues/106)
- Allow overriding sequence diagram configuration \(SVG properties\) [\#103](https://github.com/knsv/mermaid/issues/103)
- Error when rendering A-- This is the text -- B [\#102](https://github.com/knsv/mermaid/issues/102)
- Clipping in documentation [\#97](https://github.com/knsv/mermaid/issues/97)
- isolate class styling to the svg container [\#92](https://github.com/knsv/mermaid/issues/92)
- Apply styling from css when using the CLI utility [\#85](https://github.com/knsv/mermaid/issues/85)
- Generated SVG works poorly outside web browsers [\#58](https://github.com/knsv/mermaid/issues/58)
- Make the new graph declaration more visual [\#40](https://github.com/knsv/mermaid/issues/40)
- Generating SVG text blob for use in Node [\#2](https://github.com/knsv/mermaid/issues/2)
**Merged pull requests:**
- Add live editor [\#119](https://github.com/knsv/mermaid/pull/119) ([naseer](https://github.com/naseer))
- Adds CSS option to the CLI [\#116](https://github.com/knsv/mermaid/pull/116) ([fardog](https://github.com/fardog))
- Update flowchart.md in response Issue \#113 [\#114](https://github.com/knsv/mermaid/pull/114) ([vijay40](https://github.com/vijay40))
- Ignore all files except the license and dist/ folder when installing with Bower. [\#112](https://github.com/knsv/mermaid/pull/112) ([jasonbellamy](https://github.com/jasonbellamy))
## [0.3.3](https://github.com/knsv/mermaid/tree/0.3.3) (2015-01-25)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.3.2...0.3.3)
**Closed issues:**
- Missing arrows in sequence diagram [\#98](https://github.com/knsv/mermaid/issues/98)
- Error with \>9 linkStyles [\#95](https://github.com/knsv/mermaid/issues/95)
- Support for dotted links [\#26](https://github.com/knsv/mermaid/issues/26)
**Merged pull requests:**
- Require d3 directly to better support Node usage [\#107](https://github.com/knsv/mermaid/pull/107) ([markdalgleish](https://github.com/markdalgleish))
- update doc with -c option [\#105](https://github.com/knsv/mermaid/pull/105) ([jjmr](https://github.com/jjmr))
- Add new parameter to the console client to override the svg configuration in sequence diagrams [\#104](https://github.com/knsv/mermaid/pull/104) ([jjmr](https://github.com/jjmr))
- Text based labels, new shape [\#101](https://github.com/knsv/mermaid/pull/101) ([bjowes](https://github.com/bjowes))
- fix html tags in example usage [\#100](https://github.com/knsv/mermaid/pull/100) ([deiwin](https://github.com/deiwin))
## [0.3.2](https://github.com/knsv/mermaid/tree/0.3.2) (2015-01-11)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.3.1...0.3.2)
**Closed issues:**
- disable auto render [\#91](https://github.com/knsv/mermaid/issues/91)
- Tidy breaks mermaid \(linebreaks in \<div\>\) [\#87](https://github.com/knsv/mermaid/issues/87)
- Bug: \<br\> being rendered as text in node [\#73](https://github.com/knsv/mermaid/issues/73)
- Graph edges appear to render outside of the canvas [\#70](https://github.com/knsv/mermaid/issues/70)
- Make link text look like it is on the line [\#53](https://github.com/knsv/mermaid/issues/53)
**Merged pull requests:**
- Merge pull request \#1 from knsv/master [\#96](https://github.com/knsv/mermaid/pull/96) ([gkchic](https://github.com/gkchic))
- Removed duplicated section in flowchart docs [\#94](https://github.com/knsv/mermaid/pull/94) ([kaime](https://github.com/kaime))
- Grammar changes to sequence page [\#93](https://github.com/knsv/mermaid/pull/93) ([gkchic](https://github.com/gkchic))
- Github buttons [\#89](https://github.com/knsv/mermaid/pull/89) ([gkchic](https://github.com/gkchic))
- Template change [\#88](https://github.com/knsv/mermaid/pull/88) ([gkchic](https://github.com/gkchic))
## [0.3.1](https://github.com/knsv/mermaid/tree/0.3.1) (2015-01-05)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.3.0...0.3.1)
**Closed issues:**
- Non ASCII chars in labels [\#84](https://github.com/knsv/mermaid/issues/84)
- 'undefined' titles of Quicklinks on the usage page [\#80](https://github.com/knsv/mermaid/issues/80)
- \[cli\] Enhancement proposal: not fail --version / --help if phantomjs isn't installed [\#71](https://github.com/knsv/mermaid/issues/71)
- Neural Networks [\#39](https://github.com/knsv/mermaid/issues/39)
- Support for sequence diagrams [\#16](https://github.com/knsv/mermaid/issues/16)
- Client utility for mermaid [\#6](https://github.com/knsv/mermaid/issues/6)
**Merged pull requests:**
- Flowchart doc: Text in the circle now in a circle [\#81](https://github.com/knsv/mermaid/pull/81) ([Grahack](https://github.com/Grahack))
- Fix for issue \#73 [\#79](https://github.com/knsv/mermaid/pull/79) ([it0a](https://github.com/it0a))
- Ink template [\#78](https://github.com/knsv/mermaid/pull/78) ([gkchic](https://github.com/gkchic))
- Show help and version even if phantom isn't present. Fixes \#71 [\#75](https://github.com/knsv/mermaid/pull/75) ([fardog](https://github.com/fardog))
- Add apostrophe & 'and' [\#72](https://github.com/knsv/mermaid/pull/72) ([sudodoki](https://github.com/sudodoki))
## [0.3.0](https://github.com/knsv/mermaid/tree/0.3.0) (2014-12-22)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.2.16...0.3.0)
**Closed issues:**
- Consider shipping a standalone executable [\#65](https://github.com/knsv/mermaid/issues/65)
- Trailing whitespace at the end of lines is not ignored [\#55](https://github.com/knsv/mermaid/issues/55)
- How do I do comments? [\#47](https://github.com/knsv/mermaid/issues/47)
- This characters failed the lexical parsing [\#46](https://github.com/knsv/mermaid/issues/46)
- tutorial for creating new type of graph/layout [\#44](https://github.com/knsv/mermaid/issues/44)
- Improve readability with new line as terminator and whitespace [\#38](https://github.com/knsv/mermaid/issues/38)
- Use classes instead of inline style for easy styling [\#24](https://github.com/knsv/mermaid/issues/24)
**Merged pull requests:**
- Adds Command Line Interface for generating PNGs from mermaid description files [\#69](https://github.com/knsv/mermaid/pull/69) ([fardog](https://github.com/fardog))
- Allow special symbols for direction along with acronyms [\#66](https://github.com/knsv/mermaid/pull/66) ([vijay40](https://github.com/vijay40))
## [0.2.16](https://github.com/knsv/mermaid/tree/0.2.16) (2014-12-15)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.2.15...0.2.16)
**Closed issues:**
- Mermaid not rendering properly on Wordpress pages [\#59](https://github.com/knsv/mermaid/issues/59)
- Improve example page with live demo [\#52](https://github.com/knsv/mermaid/issues/52)
- Create image file via CLI? [\#48](https://github.com/knsv/mermaid/issues/48)
- Does not render upon AngularJS Updates [\#45](https://github.com/knsv/mermaid/issues/45)
- Download link in README.MD doesn't work. [\#42](https://github.com/knsv/mermaid/issues/42)
- linkStyle usage is not obvious [\#41](https://github.com/knsv/mermaid/issues/41)
- Move \*.spec.js in src/ to test/ [\#35](https://github.com/knsv/mermaid/issues/35)
- Lines routed outside visible area [\#19](https://github.com/knsv/mermaid/issues/19)
**Merged pull requests:**
- New grammar will allow statements ending without semicolon as disccused in Issue \#38 [\#63](https://github.com/knsv/mermaid/pull/63) ([vijay40](https://github.com/vijay40))
- Class based styling [\#62](https://github.com/knsv/mermaid/pull/62) ([bjowes](https://github.com/bjowes))
- Fix typos [\#60](https://github.com/knsv/mermaid/pull/60) ([sublimino](https://github.com/sublimino))
- Included .DS\_Store in gitignore [\#57](https://github.com/knsv/mermaid/pull/57) ([alvynmcq](https://github.com/alvynmcq))
- Improves readablity discussed in issue \#38 [\#56](https://github.com/knsv/mermaid/pull/56) ([vijay40](https://github.com/vijay40))
- Added a linting task for gulp [\#43](https://github.com/knsv/mermaid/pull/43) ([serv](https://github.com/serv))
## [0.2.15](https://github.com/knsv/mermaid/tree/0.2.15) (2014-12-05)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.2.14...0.2.15)
**Closed issues:**
- Question marks don't render properly with /dist/mermaid.full.min.js [\#30](https://github.com/knsv/mermaid/issues/30)
- Error with some characters [\#25](https://github.com/knsv/mermaid/issues/25)
- Provide parse function in browser widthout `require`? [\#21](https://github.com/knsv/mermaid/issues/21)
- Better label text support [\#18](https://github.com/knsv/mermaid/issues/18)
- Cap-cased words break parser [\#8](https://github.com/knsv/mermaid/issues/8)
**Merged pull requests:**
- Include bower\_components/ to .gitignore [\#33](https://github.com/knsv/mermaid/pull/33) ([serv](https://github.com/serv))
- Fixed reference to Git repo. [\#32](https://github.com/knsv/mermaid/pull/32) ([guyellis](https://github.com/guyellis))
## [0.2.14](https://github.com/knsv/mermaid/tree/0.2.14) (2014-12-03)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.2.13...0.2.14)
## [0.2.13](https://github.com/knsv/mermaid/tree/0.2.13) (2014-12-03)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.2.10...0.2.13)
**Closed issues:**
- modified init to be applied more than once [\#29](https://github.com/knsv/mermaid/issues/29)
- Wanted to know build process for the project. [\#28](https://github.com/knsv/mermaid/issues/28)
- Container support [\#27](https://github.com/knsv/mermaid/issues/27)
- can not support Chinese description [\#20](https://github.com/knsv/mermaid/issues/20)
- Node Label text mistaken for Direction [\#17](https://github.com/knsv/mermaid/issues/17)
- Support unicode chars in labels [\#9](https://github.com/knsv/mermaid/issues/9)
- Publish to NPM [\#7](https://github.com/knsv/mermaid/issues/7)
## [0.2.10](https://github.com/knsv/mermaid/tree/0.2.10) (2014-12-01)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.2.9...0.2.10)
## [0.2.9](https://github.com/knsv/mermaid/tree/0.2.9) (2014-12-01)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.2.8...0.2.9)
**Closed issues:**
- Add link to jsbin playground to README [\#11](https://github.com/knsv/mermaid/issues/11)
- What are the requirements ? [\#10](https://github.com/knsv/mermaid/issues/10)
**Merged pull requests:**
- Allow unicode chars in labels [\#13](https://github.com/knsv/mermaid/pull/13) ([codebeige](https://github.com/codebeige))
## [0.2.8](https://github.com/knsv/mermaid/tree/0.2.8) (2014-12-01)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.2.7...0.2.8)
## [0.2.7](https://github.com/knsv/mermaid/tree/0.2.7) (2014-12-01)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.2.6...0.2.7)
**Closed issues:**
- Provide parser as separate module [\#4](https://github.com/knsv/mermaid/issues/4)
## [0.2.6](https://github.com/knsv/mermaid/tree/0.2.6) (2014-11-27)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.2.5...0.2.6)
## [0.2.5](https://github.com/knsv/mermaid/tree/0.2.5) (2014-11-27)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.2.4...0.2.5)
**Merged pull requests:**
- Added new shapes! [\#1](https://github.com/knsv/mermaid/pull/1) ([bjowes](https://github.com/bjowes))
## [0.2.4](https://github.com/knsv/mermaid/tree/0.2.4) (2014-11-25)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.2.3...0.2.4)
## [0.2.3](https://github.com/knsv/mermaid/tree/0.2.3) (2014-11-24)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.2.2...0.2.3)
## [0.2.2](https://github.com/knsv/mermaid/tree/0.2.2) (2014-11-22)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.2.1...0.2.2)
## [0.2.1](https://github.com/knsv/mermaid/tree/0.2.1) (2014-11-22)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.2.0...0.2.1)
## [0.2.0](https://github.com/knsv/mermaid/tree/0.2.0) (2014-11-22)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.1.1...0.2.0)
## [0.1.1](https://github.com/knsv/mermaid/tree/0.1.1) (2014-11-17)
[Full Changelog](https://github.com/knsv/mermaid/compare/0.1.0...0.1.1)
## [0.1.0](https://github.com/knsv/mermaid/tree/0.1.0) (2014-11-16)
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*

126
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,126 @@
# Contributing
So you want to help? That's great!
![Image of happy people jumping with excitement](https://media.giphy.com/media/BlVnrxJgTGsUw/giphy.gif)
Here are a few things to know to get you started on the right path.
## Committing code
We make all changes via pull requests. As we have many pull requests from developers new to mermaid, the current approach is to have *knsv, Knut Sveidqvist* as a main reviewer of changes and merging pull requests. More precisely like this:
* Large changes reviewed by knsv or other developer asked to review by knsv
* Smaller low-risk changes like dependecies, documentation etc can be merged by active collaborators
* documentation (updates to the docs folder is also allowed via direct commits)
To commit code, create a branch, let it start with the type like feature or bug followed by the issue number for reference and some describing text.
One example:
`feature/945_state_diagrams`
Another:
`bug/123_nasty_bug_branch`
## Committing documentation
Less strict here, it is OK to commit directly in the `develop` branch if you are a collaborator.
The documentation is located in the `docs` directory and published using GitHub Pages.
The documentation site is powered by [Docsify](https://docsify.js.org), a simple documentation site generator.
The documentation is written in Markdown, for more information about Markdown [see the GitHub Markdown help page](https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax).
If you want to preview the documentation site on your machine, you need to install `docsify-cli`:
```
$ npm i docsify-cli -g
````
If you are more familiar with Yarn, you can use the following command:
```
$ yarn global add docsify-cli
```
The above command will install `docsify-cli` globally.
If the installation is successful, the command `docsify` will be available in your `PATH`.
You can now run the following command to serve the documentation site:
```
$ docsify serve docs
```
Once the local HTTP server is listening, you can point your browser at http://localhost:3000.
## Branching
Going forward we will use a git flow inspired approach to branching. So development is done in develop, to do the development in the develop.
Once development is done we branch a release branch from develop for testing.
Once the release happens we merge the release branch to master and kill the release branch.
This means... **branch off your pull request from develop**
## Content of a pull request
A new feature has been born. Great! But without the steps below it might just ... fade away ...
### **Add unit tests for the parsing part**
This is important so that, if someone else does a change to the grammar that does not know about this great feature, gets notified early on when that change breaks the parser. Another important aspect is that without proper parsing tests refactoring is pretty much impossible.
### **Add e2e tests**
This tests the rendering and visual apearance of the diagram. This ensures that the rendering of that feature in the e2e will be reviewed in the release process going forward. Less chance that it breaks!
To start working with the e2e tests, run `yarn dev` to start the dev server, after that start cypress by running `cypress open` in the mermaid folder. (Make sure you have path to cypress in order, the binary is located in node_modules/.bin).
The rendering tests are very straightforward to create. There is a function imgSnapshotTest. This function takes a diagram in text form, the mermaid options and renders that diagram in cypress.
When running in ci it will take a snapshot of the rendered diagram and compare it with the snapshot from last build and flag for review it if it differs.
This is what a rendering test looks like:
```
it('should render forks and joins', () => {
imgSnapshotTest(
`
stateDiagram
state fork_state &lt;&lt;fork&gt;&gt;
[*] --> fork_state
fork_state --> State2
fork_state --> State3
state join_state &lt;&lt;join&gt;&gt;
State2 --> join_state
State3 --> join_state
join_state --> State4
State4 --> [*]
`,
{ logLevel: 0 }
);
cy.get('svg');
});
```
### **Add documentation for it**
Finally, if it is not in the documentation, no one will know about it and then **no one will use it**. Wouldn't that be sad? With all the effort that was put into the feature?
The docs are located in the docs folder and are ofc written in markdown. Just pick the right section and start typing. If you want to add to the structure as in adding a new section and new file you do that via the _navbar.md.
The changes in master is reflected in http://mermaid-js.github.io/mermaid/ once released the updates are commited to https://mermaid-js.github.io/#/
## Last words
Don't get daunted if it is hard in the beginning. We have a great community with only encouraging words. So if you get stuck, ask for help and hints in the slack forum. If you want to show off something good, show it off there.
[Join our slack community if you want closer contact!](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE)
![Image of superhero wishing you good luck](https://media.giphy.com/media/l49JHz7kJvl6MCj3G/giphy.gif)

View File

@@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2014 Knut Sveidqvist
Copyright (c) 2014 - 2020 Knut Sveidqvist
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

397
README.md
View File

@@ -1,222 +1,219 @@
mermaid
=======
# mermaid [![Build Status](https://travis-ci.org/mermaid-js/mermaid.svg?branch=master)](https://travis-ci.org/mermaid-js/mermaid) [![NPM](https://img.shields.io/npm/v/mermaid)](https://www.npmjs.com/package/mermaid) [![Coverage Status](https://coveralls.io/repos/github/mermaid-js/mermaid/badge.svg?branch=master)](https://coveralls.io/github/mermaid-js/mermaid?branch=master) [![Join our Slack!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=slack&label=slack)](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) [![This project is using Percy.io for visual regression testing.](https://percy.io/static/images/percy-badge.svg)](https://percy.io/Mermaid/mermaid)
Generation of diagrams and flowcharts from text in a similar manner as markdown.
![banner](./img/header.png)
Ever wanted to simplify documentation and avoid heavy tools like Visio when explaining your code?
:trophy: **Mermaid was nominated and won the [JS Open Source Awards (2019)](https://osawards.com/javascript/2019) in the category "The most exciting use of technology"!!!**
This is why mermaid was born, a simple markdown-like script language for generating charts from text via javascript.
**Thanks to all involved, people committing pull requests, people answering questions and special thanks to Tyler Long who is helping me maintain the project 🙏**
The code below would render the following image
## About
```
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```
<!-- <Main description> -->
Mermaid is a Javascript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. The main purpose of Mermaid is to help documentation catch up with development.
would render this lovely chart:
> Doc-Rot is a Catch-22 that Mermaid helps to solve.
![Example 1](http://www.sveido.com/mermaid/img/ex1.png)
Diagramming and documentation costs precious developer time and gets outdated quickly.
But not having diagrams or docs ruins productivity and hurts organizational learning. <br/>
Mermaid addresses this problem by cutting the time, effort and tooling that is required to create modifiable diagrams and charts, for smarter and more reusable content.
The text definitions for Mermaid diagrams allows for it to be updated easily, it can also be made part of production scripts (and other pieces of code).
So less time needs be spent on documenting, as a separate and laborious task. <br/>
Even non-programmers can create diagrams through the [Mermaid Live Editor](https://github.com/mermaid-js/mermaid-live-editor).<br/>
[Tutorials](./docs/Tutorials.md) has video tutorials.
Use Mermaid with your favorite applications, check out the list of [Integrations and Usages of Mermaid](./docs/integrations.md).
For a more detailed introduction to Mermaid and some of its more basic uses, look to the [Beginner's Guide](./docs/n00b-overview.md) and [Usage](./docs/usage.md).
#Installation
🌐 [CDN](https://unpkg.com/mermaid/) | 📖 [Documentation](https://mermaidjs.github.io) | 🙌 [Contribution](https://github.com/mermaid-js/mermaid/blob/develop/CONTRIBUTING.md) | 📜 [Changelog](./docs/CHANGELOG.md)
Either use the bower package manager as per below:
<!-- </Main description> -->
```
bower install mermaid --save-dev
```
## Examples
Or download javascript files:
* [mermaid including dependencies](http://www.sveido.com/mermaid/dist/mermaid.full.min.js)
This file bundles mermaid with d3 and dagre-d3.
* [mermaid without dependencies](http://www.sveido.com/mermaid/dist/mermaid.slim.min.js)
With this file you will need to include d3 and dagre-d3 yourself.
# Usage
Include mermaid on your web page:
```
<script src="mermaid.full.min.js"></script>
```
Further down on your page mermaid will look for tags with ```class="mermaid"```. From these tags mermaid will try to
read the chart definiton which will be replaced with the svg chart.
A chart defined like this:
```
<div class="mermaid">
CHART DEFINITION GOES HERE
</div>
```
Would end up like this:
```
<div class="mermaid" id="mermaidChart0">
<svg>
Chart ends up here
</svg>
</div>
```
An id is also added to mermaid tags without id.
# A graph example
```
graph LR;
A[Hard edge]-->|Link text|B(Round edge);
B-->C{Decision};
C-->|One|D[Result one];
C-->|Two|E[Result two];
```
![Example 2](http://www.sveido.com/mermaid/img/ex2.png)
#Syntax
## Graph
This statement declares a new graph and the direction of the graph layout.
```
__The following are some examples of the diagrams, charts and graphs that can be made using Mermaid and the Markdown-inspired text specific to it. Click here jump into the [text syntax](https://mermaid-js.github.io/mermaid/#/n00b-syntaxReference).__
<table>
<!-- <Flowchart> -->
<tr><td colspan=2 align="center">
<b>Flow</b></br>
[<a href="http://mermaid-js.github.io/mermaid/#/flowchart">docs</a> - <a href="https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ3JhcGggVERcbiAgICBBW0hhcmRdIC0tPnxUZXh0fCBCKFJvdW5kKVxuICAgIEIgLS0-IEN7RGVjaXNpb259XG4gICAgQyAtLT58T25lfCBEW1Jlc3VsdCAxXVxuICAgIEMgLS0-fFR3b3wgRVtSZXN1bHQgMl0iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9fQ">live editor</a>]
</td></tr>
<tr>
<td><pre>
graph TD
```
A[Hard] -->|Text| B(Round)
B --> C{Decision}
C -->|One| D[Result 1]
C -->|Two| E[Result 2]
</pre></td>
<td align="center">
<img src="https://raw.githubusercontent.com/mermaid-js/mermaid/master/img/gray-flow.png" />
</td>
</tr>
<!-- </Flowchart> -->
<!-- <Sequence> -->
<tr><td colspan=2 align="center">
<b>Sequence</b><br />
[<a href="http://mermaid-js.github.io/mermaid/#/sequenceDiagram">docs</a> - <a href="https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG5BbGljZS0-PkpvaG46IEhlbGxvIEpvaG4sIGhvdyBhcmUgeW91P1xubG9vcCBIZWFsdGhjaGVja1xuICAgIEpvaG4tPj5Kb2huOiBGaWdodCBhZ2FpbnN0IGh5cG9jaG9uZHJpYVxuZW5kXG5Ob3RlIHJpZ2h0IG9mIEpvaG46IFJhdGlvbmFsIHRob3VnaHRzIVxuSm9obi0tPj5BbGljZTogR3JlYXQhXG5Kb2huLT4-Qm9iOiBIb3cgYWJvdXQgeW91P1xuQm9iLS0-PkpvaG46IEpvbGx5IGdvb2QhIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0">live editor</a>]
</td></tr>
<tr>
<td><pre>
sequenceDiagram
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
</pre></td>
<td align="center">
<img src="https://raw.githubusercontent.com/mermaid-js/mermaid/master/img/gray-sequence.png" />
</td>
</tr>
<!-- </Sequence> -->
<!-- <Gantt> -->
<tr><td colspan=2 align="center">
<b>Gantt</b><br />
[<a href="http://mermaid-js.github.io/mermaid/#/gantt">docs</a> - <a href="https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ2FudHRcbnNlY3Rpb24gU2VjdGlvblxuQ29tcGxldGVkIDpkb25lLCAgICBkZXMxLCAyMDE0LTAxLTA2LDIwMTQtMDEtMDhcbkFjdGl2ZSAgICAgICAgOmFjdGl2ZSwgIGRlczIsIDIwMTQtMDEtMDcsIDNkXG5QYXJhbGxlbCAxICAgOiAgICAgICAgIGRlczMsIGFmdGVyIGRlczEsIDFkXG5QYXJhbGxlbCAyICAgOiAgICAgICAgIGRlczQsIGFmdGVyIGRlczEsIDFkXG5QYXJhbGxlbCAzICAgOiAgICAgICAgIGRlczUsIGFmdGVyIGRlczMsIDFkXG5QYXJhbGxlbCA0ICAgOiAgICAgICAgIGRlczYsIGFmdGVyIGRlczQsIDFkIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0">live editor</a>]
</td></tr>
<tr>
<td><pre>
gantt
section Section
Completed :done, des1, 2014-01-06,2014-01-08
Active :active, des2, 2014-01-07, 3d
Parallel 1 : des3, after des1, 1d
Parallel 2 : des4, after des1, 1d
Parallel 3 : des5, after des3, 1d
Parallel 4 : des6, after des4, 1d
</pre></td>
<td align="center">
<img src="https://raw.githubusercontent.com/mermaid-js/mermaid/master/img/gray-gantt.png" />
</td>
</tr>
<!-- </Gantt> -->
<!-- <Class> -->
<tr><td colspan=2 align="center">
<b>Class</b><br />
[<a href="http://mermaid-js.github.io/mermaid/#/classDiagram">docs</a> - <a href="https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiY2xhc3NEaWFncmFtXG5DbGFzczAxIDx8LS0gQXZlcnlMb25nQ2xhc3MgOiBDb29sXG48PGludGVyZmFjZT4-IENsYXNzMDFcbkNsYXNzMDkgLS0-IEMyIDogV2hlcmUgYW0gaT9cbkNsYXNzMDkgLS0qIEMzXG5DbGFzczA5IC0tfD4gQ2xhc3MwN1xuQ2xhc3MwNyA6IGVxdWFscygpXG5DbGFzczA3IDogT2JqZWN0W10gZWxlbWVudERhdGFcbkNsYXNzMDEgOiBzaXplKClcbkNsYXNzMDEgOiBpbnQgY2hpbXBcbkNsYXNzMDEgOiBpbnQgZ29yaWxsYVxuY2xhc3MgQ2xhc3MxMCB7XG4gID4-c2VydmljZT4-XG4gIGludCBpZFxuICBzaXplKClcbn0iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9fQ">live editor</a>]
</td></tr>
<tr>
<td><pre>
classDiagram
Class01 &lt;|-- AveryLongClass : Cool
&lt;&lt;interface>> Class01
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
class Class10 {
&lt;&lt;service>>
int id
size()
}
</pre></td>
<td align="center">
<img src="https://raw.githubusercontent.com/mermaid-js/mermaid/master/img/gray-class.png" />
</td>
</tr>
<!-- </Class> -->
<!-- <State> -->
<tr><td colspan=2 align="center">
<b>State</b><br />
[<a href="http://mermaid-js.github.io/mermaid/#/stateDiagram">docs</a> - <a href="https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic3RhdGVEaWFncmFtLXYyXG4gICAgWypdIC0tPiBTdGlsbFxuICAgIFN0aWxsIC0tPiBbKl1cbiAgICBTdGlsbCAtLT4gTW92aW5nXG4gICAgTW92aW5nIC0tPiBTdGlsbFxuICAgIE1vdmluZyAtLT4gQ3Jhc2hcbiAgICBDcmFzaCAtLT4gWypdIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQiLCJ0aGVtZVZhcmlhYmxlcyI6eyJiYWNrZ3JvdW5kIjoid2hpdGUiLCJwcmltYXJ5Q29sb3IiOiIjRUNFQ0ZGIiwic2Vjb25kYXJ5Q29sb3IiOiIjZmZmZmRlIiwidGVydGlhcnlDb2xvciI6ImhzbCg4MCwgMTAwJSwgOTYuMjc0NTA5ODAzOSUpIiwicHJpbWFyeUJvcmRlckNvbG9yIjoiaHNsKDI0MCwgNjAlLCA4Ni4yNzQ1MDk4MDM5JSkiLCJzZWNvbmRhcnlCb3JkZXJDb2xvciI6ImhzbCg2MCwgNjAlLCA4My41Mjk0MTE3NjQ3JSkiLCJ0ZXJ0aWFyeUJvcmRlckNvbG9yIjoiaHNsKDgwLCA2MCUsIDg2LjI3NDUwOTgwMzklKSIsInByaW1hcnlUZXh0Q29sb3IiOiIjMTMxMzAwIiwic2Vjb25kYXJ5VGV4dENvbG9yIjoiIzAwMDAyMSIsInRlcnRpYXJ5VGV4dENvbG9yIjoicmdiKDkuNTAwMDAwMDAwMSwgOS41MDAwMDAwMDAxLCA5LjUwMDAwMDAwMDEpIiwibGluZUNvbG9yIjoiIzMzMzMzMyIsInRleHRDb2xvciI6IiMzMzMiLCJtYWluQmtnIjoiI0VDRUNGRiIsInNlY29uZEJrZyI6IiNmZmZmZGUiLCJib3JkZXIxIjoiIzkzNzBEQiIsImJvcmRlcjIiOiIjYWFhYTMzIiwiYXJyb3doZWFkQ29sb3IiOiIjMzMzMzMzIiwiZm9udEZhbWlseSI6IlwidHJlYnVjaGV0IG1zXCIsIHZlcmRhbmEsIGFyaWFsIiwiZm9udFNpemUiOiIxNnB4IiwibGFiZWxCYWNrZ3JvdW5kIjoiI2U4ZThlOCIsIm5vZGVCa2ciOiIjRUNFQ0ZGIiwibm9kZUJvcmRlciI6IiM5MzcwREIiLCJjbHVzdGVyQmtnIjoiI2ZmZmZkZSIsImNsdXN0ZXJCb3JkZXIiOiIjYWFhYTMzIiwiZGVmYXVsdExpbmtDb2xvciI6IiMzMzMzMzMiLCJ0aXRsZUNvbG9yIjoiIzMzMyIsImVkZ2VMYWJlbEJhY2tncm91bmQiOiIjZThlOGU4IiwiYWN0b3JCb3JkZXIiOiJoc2woMjU5LjYyNjE2ODIyNDMsIDU5Ljc3NjUzNjMxMjglLCA4Ny45MDE5NjA3ODQzJSkiLCJhY3RvckJrZyI6IiNFQ0VDRkYiLCJhY3RvclRleHRDb2xvciI6ImJsYWNrIiwiYWN0b3JMaW5lQ29sb3IiOiJncmV5Iiwic2lnbmFsQ29sb3IiOiIjMzMzIiwic2lnbmFsVGV4dENvbG9yIjoiIzMzMyIsImxhYmVsQm94QmtnQ29sb3IiOiIjRUNFQ0ZGIiwibGFiZWxCb3hCb3JkZXJDb2xvciI6ImhzbCgyNTkuNjI2MTY4MjI0MywgNTkuNzc2NTM2MzEyOCUsIDg3LjkwMTk2MDc4NDMlKSIsImxhYmVsVGV4dENvbG9yIjoiYmxhY2siLCJsb29wVGV4dENvbG9yIjoiYmxhY2siLCJub3RlQm9yZGVyQ29sb3IiOiIjYWFhYTMzIiwibm90ZUJrZ0NvbG9yIjoiI2ZmZjVhZCIsIm5vdGVUZXh0Q29sb3IiOiJibGFjayIsImFjdGl2YXRpb25Cb3JkZXJDb2xvciI6IiM2NjYiLCJhY3RpdmF0aW9uQmtnQ29sb3IiOiIjZjRmNGY0Iiwic2VxdWVuY2VOdW1iZXJDb2xvciI6IndoaXRlIiwic2VjdGlvbkJrZ0NvbG9yIjoicmdiYSgxMDIsIDEwMiwgMjU1LCAwLjQ5KSIsImFsdFNlY3Rpb25Ca2dDb2xvciI6IndoaXRlIiwic2VjdGlvbkJrZ0NvbG9yMiI6IiNmZmY0MDAiLCJ0YXNrQm9yZGVyQ29sb3IiOiIjNTM0ZmJjIiwidGFza0JrZ0NvbG9yIjoiIzhhOTBkZCIsInRhc2tUZXh0TGlnaHRDb2xvciI6IndoaXRlIiwidGFza1RleHRDb2xvciI6IndoaXRlIiwidGFza1RleHREYXJrQ29sb3IiOiJibGFjayIsInRhc2tUZXh0T3V0c2lkZUNvbG9yIjoiYmxhY2siLCJ0YXNrVGV4dENsaWNrYWJsZUNvbG9yIjoiIzAwMzE2MyIsImFjdGl2ZVRhc2tCb3JkZXJDb2xvciI6IiM1MzRmYmMiLCJhY3RpdmVUYXNrQmtnQ29sb3IiOiIjYmZjN2ZmIiwiZ3JpZENvbG9yIjoibGlnaHRncmV5IiwiZG9uZVRhc2tCa2dDb2xvciI6ImxpZ2h0Z3JleSIsImRvbmVUYXNrQm9yZGVyQ29sb3IiOiJncmV5IiwiY3JpdEJvcmRlckNvbG9yIjoiI2ZmODg4OCIsImNyaXRCa2dDb2xvciI6InJlZCIsInRvZGF5TGluZUNvbG9yIjoicmVkIiwibGFiZWxDb2xvciI6ImJsYWNrIiwiZXJyb3JCa2dDb2xvciI6IiM1NTIyMjIiLCJlcnJvclRleHRDb2xvciI6IiM1NTIyMjIiLCJjbGFzc1RleHQiOiIjMTMxMzAwIiwiZmlsbFR5cGUwIjoiI0VDRUNGRiIsImZpbGxUeXBlMSI6IiNmZmZmZGUiLCJmaWxsVHlwZTIiOiJoc2woMzA0LCAxMDAlLCA5Ni4yNzQ1MDk4MDM5JSkiLCJmaWxsVHlwZTMiOiJoc2woMTI0LCAxMDAlLCA5My41Mjk0MTE3NjQ3JSkiLCJmaWxsVHlwZTQiOiJoc2woMTc2LCAxMDAlLCA5Ni4yNzQ1MDk4MDM5JSkiLCJmaWxsVHlwZTUiOiJoc2woLTQsIDEwMCUsIDkzLjUyOTQxMTc2NDclKSIsImZpbGxUeXBlNiI6ImhzbCg4LCAxMDAlLCA5Ni4yNzQ1MDk4MDM5JSkiLCJmaWxsVHlwZTciOiJoc2woMTg4LCAxMDAlLCA5My41Mjk0MTE3NjQ3JSkifX0sInVwZGF0ZUVkaXRvciI6ZmFsc2V9">live editor</a>]
</td></tr>
<tr>
<td><pre>
stateDiagram-v2
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
</pre></td>
<td align="center">
<img src="https://raw.githubusercontent.com/mermaid-js/mermaid/master/img/gray-state.png" />
</td>
</tr>
<!-- </State> -->
<!-- <Pie> -->
<tr><td colspan=2 align="center">
<b>Pie</b><br />
[<a href="http://mermaid-js.github.io/mermaid/#/pie">docs</a> - <a href="https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoicGllXG5cIkRvZ3NcIiA6IDQyLjk2XG5cIkNhdHNcIiA6IDUwLjA1XG5cIlJhdHNcIiA6IDEwLjAxIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0">live editor</a>]
</td></tr>
<tr>
<td><pre>
pie
"Dogs" : 386
"Cats" : 85
"Rats" : 15
</pre></td>
<td align="center">
<img src="https://raw.githubusercontent.com/mermaid-js/mermaid/master/img/gray-pie.png" />
</td>
</tr>
<!-- </Pie> -->
<!-- <Git> -->
<tr><td colspan=2 align="center">
<b>Git</b><br />
[experimental - <a href="https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ2l0R3JhcGg6XG5vcHRpb25zXG57XG4gICAgXCJub2RlU3BhY2luZ1wiOiAxNTAsXG4gICAgXCJub2RlUmFkaXVzXCI6IDEwXG59XG5lbmRcbmNvbW1pdFxuYnJhbmNoIG5ld2JyYW5jaFxuY2hlY2tvdXQgbmV3YnJhbmNoXG5jb21taXRcbmNvbW1pdFxuY2hlY2tvdXQgbWFzdGVyXG5jb21taXRcbmNvbW1pdFxubWVyZ2UgbmV3YnJhbmNoXG4iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9fQ">live editor</a>]
</td></tr>
<tr>
<td colspan="2" align="center"><i>Coming soon!</i></td>
</tr>
<!-- </Git> -->
<!-- <Journey> -->
<tr><td colspan=2 align="center">
<b>User Journey</b><br />
[<a href="http://mermaid-js.github.io/mermaid/#/user-journey">docs</a> - <a href="https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic3RhdGVEaWFncmFtXG4gICAgWypdIC0tPiBTdGlsbFxuICAgIFN0aWxsIC0tPiBbKl1cbiAgICBTdGlsbCAtLT4gTW92aW5nXG4gICAgTW92aW5nIC0tPiBTdGlsbFxuICAgIE1vdmluZyAtLT4gQ3Jhc2hcbiAgICBDcmFzaCAtLT4gWypdIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0">live editor</a>]
</td></tr>
<tr>
<td>
<pre>
journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 3: Me
</pre></td>
<td align="center">
<img alt="User Journey Diagram" src="img/gray-user-journey.png" />
</td>
</tr>
<!-- </Journey> -->
This declares a graph oriented from top to bottom.
</table>
![Example 3](http://www.sveido.com/mermaid/img/ex3.png)
## Related projects
```
graph LR
```
- [Command Line Interface](https://github.com/mermaid-js/mermaid-cli)
- [Live Editor](https://github.com/mermaid-js/mermaid-live-editor)
- [HTTP Server](https://github.com/TomWright/mermaid-server)
This declares a graph oriented from left to right.
## Contributors [![Help wanted](https://img.shields.io/github/labels/mermaid-js/mermaid/Help%20wanted!)](https://github.com/mermaid-js/mermaid/issues?q=is%3Aissue+is%3Aopen+label%3A%22Help+wanted%21%22) [![Contributors](https://img.shields.io/github/contributors/mermaid-js/mermaid)](https://github.com/mermaid-js/mermaid/graphs/contributors) [![Commits](https://img.shields.io/github/commit-activity/m/mermaid-js/mermaid)](https://github.com/mermaid-js/mermaid/graphs/contributors)
Possible directions are:
Mermaid is a growing community and is always accepting new contributors. There's a lot of different ways to help out and we're always looking for extra hands! Look at [this issue](https://github.com/mermaid-js/mermaid/issues/866) if you want to know where to start helping out.
* TB - top bottom
* BT - bottom top
* RL - right left
* LR - left right
* TD - same as TB
Detailed information about how to contribute can be found in the [contribution guide](CONTRIBUTING.md)
![Example 4](http://www.sveido.com/mermaid/img/ex4.png)
## Appreciation
A quick note from Knut Sveidqvist:
>*Many thanks to the [d3](http://d3js.org/) and [dagre-d3](https://github.com/cpettitt/dagre-d3) projects for providing the graphical layout and drawing libraries!*
>*Thanks also to the [js-sequence-diagram](http://bramp.github.io/js-sequence-diagrams) project for usage of the grammar for the sequence diagrams. Thanks to Jessica Peter for inspiration and starting point for gantt rendering.*
>*Thank you to [Tyler Long](https://github.com/tylerlong) who has been a collaborator since April 2017.*
>
>*Thank you to the ever-growing list of [contributors](https://github.com/knsv/mermaid/graphs/contributors) that brought the project this far!*
## Nodes
---
### A node (default)
```
id1;
```
![Single node](http://www.sveido.com/mermaid/img/ex5.png)
Note that the id is what is displayed in the box.
### A node with text
It is also possible to set text in the box that differs from the id. If this is done several times, it is the last text
found for the node that will be used. Also if you define edges for the node later on, you can omit text definitions. The
one previously defined will be used when rendering the box.
```
id1[This is the text in the box];
```
![Text in node](http://www.sveido.com/mermaid/img/ex6.png)
### A node with round edges
```
id1(This is the text in the box);
```
![Node with round edges](http://www.sveido.com/mermaid/img/ex7.png)
### A node (rhombus)
```
id1{This is the text in the box};
```
![Decision box](http://www.sveido.com/mermaid/img/ex8.png)
### Styling a node
It is possible to apply specific styles such as a thicker border or a different background color to a node.
```
graph LR;
id1(Start)-->id2(Stop);
style id1 fill:#f9f,stroke:#333,stroke-width:4px;
style id2 fill:#ccf,stroke:#f66,stroke-width:2px,stroke-dasharray: 5, 5;
```
![Node with styles](http://www.sveido.com/mermaid/img/ex9.png)
#### Classes
More convenient then defining the style everytime is to define a class of styles and attach this class to the nodes that
should have a different look.
a class definition looks like the example below:
```
classDef className fill:#f9f,stroke:#333,stroke-width:4px;
```
Attachment of a class to a node is done as per below:
```
class nodeId1 className;
```
It is also possible to attach a class to a list of nodes in one statement:
```
class nodeId1,nodeId2 className;
```
#### Default class
If a class is named default it will be assigned to all classes without specific class definitions.
```
classDef default fill:#f9f,stroke:#333,stroke-width:4px;
```
## Links between nodes
Nodes can be connected with links/edges. It is possible to have different types of links or attach a text string to a link.
### A link with arrow head
```
A-->B;
```
![Link with arrowhead](http://www.sveido.com/mermaid/img/ex4.png)
### An open link
```
A---B;
```
![Open link](http://www.sveido.com/mermaid/img/ex10.png)
### Text on links
```
A---|This is the text|B;
```
![Text on links](http://www.sveido.com/mermaid/img/ex11.png)
# Credits
Many thanks to the [d3](http://d3js.org/) and [dagre-d3](https://github.com/cpettitt/dagre-d3) projects for providing the graphical layout and drawing libraries!!!
*Mermaid was created by Knut Sveidqvist for easier documentation.*

3
__mocks__/MERMAID.js Normal file
View File

@@ -0,0 +1,3 @@
export const curveBasis = 'basis'
export const curveLinear = 'linear'
export const curveCardinal = 'cardinal'

56
__mocks__/d3.js vendored Normal file
View File

@@ -0,0 +1,56 @@
/* eslint-env jest */
let NewD3 = function () {
function returnThis () {
return this
}
return {
append: function () {
return NewD3()
},
lower: returnThis,
attr: returnThis,
style: returnThis,
text: returnThis,
0: {
0: {
getBBox: function () {
return {
height: 10,
width: 20
}
}
}
}
}
}
export const select = function () {
return new NewD3()
}
export const selectAll = function () {
return new NewD3()
}
export const curveBasis = 'basis'
export const curveLinear = 'linear'
export const curveCardinal = 'cardinal'
export const MockD3 = (name, parent) => {
const children = []
const elem = {
get __children () { return children },
get __name () { return name },
get __parent () { return parent }
}
elem.append = (name) => {
const mockElem = MockD3(name, elem)
children.push(mockElem)
return mockElem
}
elem.lower = jest.fn(() => elem)
elem.attr = jest.fn(() => elem)
elem.text = jest.fn(() => elem)
elem.style = jest.fn(() => elem)
return elem
}

10
babel.config.js Normal file
View File

@@ -0,0 +1,10 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: "defaults, ie >= 11, current node"
}
]
]
}

View File

@@ -1,28 +0,0 @@
{
"name": "mermaid",
"version": "0.2.4",
"authors": [
"knsv <knut@sveido.com>"
],
"description": "Markdownish syntax for generating flowcharts",
"main": "dist/mermaid.slim.js",
"keywords": [
"diagram",
"markdown",
"flowchart"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"vendor",
"test",
"tests"
],
"devDependencies": {
"jasmine": "~2.0.4",
"dagre": "0.6.2",
"d3": "3.3.8",
"dagre-d3": "0.3.2"
}
}

View File

@@ -1,60 +0,0 @@
// Karma configuration
// Generated on Mon Nov 03 2014 07:53:38 GMT+0100 (CET)
module.exports = function (config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'../src/**/*.js'
],
// list of files to exclude
exclude: ['../src/backup/**/*.js'],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_DEBUG,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false
});
};

1
cypress.json Normal file
View File

@@ -0,0 +1 @@
{ "video": false }

View File

@@ -0,0 +1,272 @@
/// <reference types="Cypress" />
context('Actions', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/commands/actions')
})
// https://on.cypress.io/interacting-with-elements
it('.type() - type into a DOM element', () => {
// https://on.cypress.io/type
cy.get('.action-email')
.type('fake@email.com').should('have.value', 'fake@email.com')
// .type() with special character sequences
.type('{leftarrow}{rightarrow}{uparrow}{downarrow}')
.type('{del}{selectall}{backspace}')
// .type() with key modifiers
.type('{alt}{option}') //these are equivalent
.type('{ctrl}{control}') //these are equivalent
.type('{meta}{command}{cmd}') //these are equivalent
.type('{shift}')
// Delay each keypress by 0.1 sec
.type('slow.typing@email.com', { delay: 100 })
.should('have.value', 'slow.typing@email.com')
cy.get('.action-disabled')
// Ignore error checking prior to type
// like whether the input is visible or disabled
.type('disabled error checking', { force: true })
.should('have.value', 'disabled error checking')
})
it('.focus() - focus on a DOM element', () => {
// https://on.cypress.io/focus
cy.get('.action-focus').focus()
.should('have.class', 'focus')
.prev().should('have.attr', 'style', 'color: orange;')
})
it('.blur() - blur off a DOM element', () => {
// https://on.cypress.io/blur
cy.get('.action-blur').type('About to blur').blur()
.should('have.class', 'error')
.prev().should('have.attr', 'style', 'color: red;')
})
it('.clear() - clears an input or textarea element', () => {
// https://on.cypress.io/clear
cy.get('.action-clear').type('Clear this text')
.should('have.value', 'Clear this text')
.clear()
.should('have.value', '')
})
it('.submit() - submit a form', () => {
// https://on.cypress.io/submit
cy.get('.action-form')
.find('[type="text"]').type('HALFOFF')
cy.get('.action-form').submit()
.next().should('contain', 'Your form has been submitted!')
})
it('.click() - click on a DOM element', () => {
// https://on.cypress.io/click
cy.get('.action-btn').click()
// You can click on 9 specific positions of an element:
// -----------------------------------
// | topLeft top topRight |
// | |
// | |
// | |
// | left center right |
// | |
// | |
// | |
// | bottomLeft bottom bottomRight |
// -----------------------------------
// clicking in the center of the element is the default
cy.get('#action-canvas').click()
cy.get('#action-canvas').click('topLeft')
cy.get('#action-canvas').click('top')
cy.get('#action-canvas').click('topRight')
cy.get('#action-canvas').click('left')
cy.get('#action-canvas').click('right')
cy.get('#action-canvas').click('bottomLeft')
cy.get('#action-canvas').click('bottom')
cy.get('#action-canvas').click('bottomRight')
// .click() accepts an x and y coordinate
// that controls where the click occurs :)
cy.get('#action-canvas')
.click(80, 75) // click 80px on x coord and 75px on y coord
.click(170, 75)
.click(80, 165)
.click(100, 185)
.click(125, 190)
.click(150, 185)
.click(170, 165)
// click multiple elements by passing multiple: true
cy.get('.action-labels>.label').click({ multiple: true })
// Ignore error checking prior to clicking
cy.get('.action-opacity>.btn').click({ force: true })
})
it('.dblclick() - double click on a DOM element', () => {
// https://on.cypress.io/dblclick
// Our app has a listener on 'dblclick' event in our 'scripts.js'
// that hides the div and shows an input on double click
cy.get('.action-div').dblclick().should('not.be.visible')
cy.get('.action-input-hidden').should('be.visible')
})
it('.check() - check a checkbox or radio element', () => {
// https://on.cypress.io/check
// By default, .check() will check all
// matching checkbox or radio elements in succession, one after another
cy.get('.action-checkboxes [type="checkbox"]').not('[disabled]')
.check().should('be.checked')
cy.get('.action-radios [type="radio"]').not('[disabled]')
.check().should('be.checked')
// .check() accepts a value argument
cy.get('.action-radios [type="radio"]')
.check('radio1').should('be.checked')
// .check() accepts an array of values
cy.get('.action-multiple-checkboxes [type="checkbox"]')
.check(['checkbox1', 'checkbox2']).should('be.checked')
// Ignore error checking prior to checking
cy.get('.action-checkboxes [disabled]')
.check({ force: true }).should('be.checked')
cy.get('.action-radios [type="radio"]')
.check('radio3', { force: true }).should('be.checked')
})
it('.uncheck() - uncheck a checkbox element', () => {
// https://on.cypress.io/uncheck
// By default, .uncheck() will uncheck all matching
// checkbox elements in succession, one after another
cy.get('.action-check [type="checkbox"]')
.not('[disabled]')
.uncheck().should('not.be.checked')
// .uncheck() accepts a value argument
cy.get('.action-check [type="checkbox"]')
.check('checkbox1')
.uncheck('checkbox1').should('not.be.checked')
// .uncheck() accepts an array of values
cy.get('.action-check [type="checkbox"]')
.check(['checkbox1', 'checkbox3'])
.uncheck(['checkbox1', 'checkbox3']).should('not.be.checked')
// Ignore error checking prior to unchecking
cy.get('.action-check [disabled]')
.uncheck({ force: true }).should('not.be.checked')
})
it('.select() - select an option in a <select> element', () => {
// https://on.cypress.io/select
// Select option(s) with matching text content
cy.get('.action-select').select('apples')
cy.get('.action-select-multiple')
.select(['apples', 'oranges', 'bananas'])
// Select option(s) with matching value
cy.get('.action-select').select('fr-bananas')
cy.get('.action-select-multiple')
.select(['fr-apples', 'fr-oranges', 'fr-bananas'])
})
it('.scrollIntoView() - scroll an element into view', () => {
// https://on.cypress.io/scrollintoview
// normally all of these buttons are hidden,
// because they're not within
// the viewable area of their parent
// (we need to scroll to see them)
cy.get('#scroll-horizontal button')
.should('not.be.visible')
// scroll the button into view, as if the user had scrolled
cy.get('#scroll-horizontal button').scrollIntoView()
.should('be.visible')
cy.get('#scroll-vertical button')
.should('not.be.visible')
// Cypress handles the scroll direction needed
cy.get('#scroll-vertical button').scrollIntoView()
.should('be.visible')
cy.get('#scroll-both button')
.should('not.be.visible')
// Cypress knows to scroll to the right and down
cy.get('#scroll-both button').scrollIntoView()
.should('be.visible')
})
it('.trigger() - trigger an event on a DOM element', () => {
// https://on.cypress.io/trigger
// To interact with a range input (slider)
// we need to set its value & trigger the
// event to signal it changed
// Here, we invoke jQuery's val() method to set
// the value and trigger the 'change' event
cy.get('.trigger-input-range')
.invoke('val', 25)
.trigger('change')
.get('input[type=range]').siblings('p')
.should('have.text', '25')
})
it('cy.scrollTo() - scroll the window or element to a position', () => {
// https://on.cypress.io/scrollTo
// You can scroll to 9 specific positions of an element:
// -----------------------------------
// | topLeft top topRight |
// | |
// | |
// | |
// | left center right |
// | |
// | |
// | |
// | bottomLeft bottom bottomRight |
// -----------------------------------
// if you chain .scrollTo() off of cy, we will
// scroll the entire window
cy.scrollTo('bottom')
cy.get('#scrollable-horizontal').scrollTo('right')
// or you can scroll to a specific coordinate:
// (x axis, y axis) in pixels
cy.get('#scrollable-vertical').scrollTo(250, 250)
// or you can scroll to a specific percentage
// of the (width, height) of the element
cy.get('#scrollable-both').scrollTo('75%', '25%')
// control the easing of the scroll (default is 'swing')
cy.get('#scrollable-vertical').scrollTo('center', { easing: 'linear' })
// control the duration of the scroll (in ms)
cy.get('#scrollable-both').scrollTo('center', { duration: 2000 })
})
})

View File

@@ -0,0 +1,42 @@
/// <reference types="Cypress" />
context('Aliasing', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/commands/aliasing')
})
it('.as() - alias a DOM element for later use', () => {
// https://on.cypress.io/as
// Alias a DOM element for use later
// We don't have to traverse to the element
// later in our code, we reference it with @
cy.get('.as-table').find('tbody>tr')
.first().find('td').first()
.find('button').as('firstBtn')
// when we reference the alias, we place an
// @ in front of its name
cy.get('@firstBtn').click()
cy.get('@firstBtn')
.should('have.class', 'btn-success')
.and('contain', 'Changed')
})
it('.as() - alias a route for later use', () => {
// Alias the route to wait for its response
cy.server()
cy.route('GET', 'comments/*').as('getComment')
// we have code that gets a comment when
// the button is clicked in scripts.js
cy.get('.network-btn').click()
// https://on.cypress.io/wait
cy.wait('@getComment').its('status').should('eq', 200)
})
})

View File

@@ -0,0 +1,168 @@
/// <reference types="Cypress" />
context('Assertions', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/commands/assertions')
})
describe('Implicit Assertions', () => {
it('.should() - make an assertion about the current subject', () => {
// https://on.cypress.io/should
cy.get('.assertion-table')
.find('tbody tr:last')
.should('have.class', 'success')
.find('td')
.first()
// checking the text of the <td> element in various ways
.should('have.text', 'Column content')
.should('contain', 'Column content')
.should('have.html', 'Column content')
// chai-jquery uses "is()" to check if element matches selector
.should('match', 'td')
// to match text content against a regular expression
// first need to invoke jQuery method text()
// and then match using regular expression
.invoke('text')
.should('match', /column content/i)
// a better way to check element's text content against a regular expression
// is to use "cy.contains"
// https://on.cypress.io/contains
cy.get('.assertion-table')
.find('tbody tr:last')
// finds first <td> element with text content matching regular expression
.contains('td', /column content/i)
.should('be.visible')
// for more information about asserting element's text
// see https://on.cypress.io/using-cypress-faq#How-do-I-get-an-elements-text-contents
})
it('.and() - chain multiple assertions together', () => {
// https://on.cypress.io/and
cy.get('.assertions-link')
.should('have.class', 'active')
.and('have.attr', 'href')
.and('include', 'cypress.io')
})
})
describe('Explicit Assertions', () => {
// https://on.cypress.io/assertions
it('expect - make an assertion about a specified subject', () => {
// We can use Chai's BDD style assertions
expect(true).to.be.true
const o = { foo: 'bar' }
expect(o).to.equal(o)
expect(o).to.deep.equal({ foo: 'bar' })
// matching text using regular expression
expect('FooBar').to.match(/bar$/i)
})
it('pass your own callback function to should()', () => {
// Pass a function to should that can have any number
// of explicit assertions within it.
// The ".should(cb)" function will be retried
// automatically until it passes all your explicit assertions or times out.
cy.get('.assertions-p')
.find('p')
.should(($p) => {
// https://on.cypress.io/$
// return an array of texts from all of the p's
// @ts-ignore TS6133 unused variable
const texts = $p.map((i, el) => Cypress.$(el).text())
// jquery map returns jquery object
// and .get() convert this to simple array
const paragraphs = texts.get()
// array should have length of 3
expect(paragraphs, 'has 3 paragraphs').to.have.length(3)
// use second argument to expect(...) to provide clear
// message with each assertion
expect(paragraphs, 'has expected text in each paragraph').to.deep.eq([
'Some text from first p',
'More text from second p',
'And even more text from third p',
])
})
})
it('finds element by class name regex', () => {
cy.get('.docs-header')
.find('div')
// .should(cb) callback function will be retried
.should(($div) => {
expect($div).to.have.length(1)
const className = $div[0].className
expect(className).to.match(/heading-/)
})
// .then(cb) callback is not retried,
// it either passes or fails
.then(($div) => {
expect($div, 'text content').to.have.text('Introduction')
})
})
it('can throw any error', () => {
cy.get('.docs-header')
.find('div')
.should(($div) => {
if ($div.length !== 1) {
// you can throw your own errors
throw new Error('Did not find 1 element')
}
const className = $div[0].className
if (!className.match(/heading-/)) {
throw new Error(`Could not find class "heading-" in ${className}`)
}
})
})
it('matches unknown text between two elements', () => {
/**
* Text from the first element.
* @type {string}
*/
let text
/**
* Normalizes passed text,
* useful before comparing text with spaces and different capitalization.
* @param {string} s Text to normalize
*/
const normalizeText = (s) => s.replace(/\s/g, '').toLowerCase()
cy.get('.two-elements')
.find('.first')
.then(($first) => {
// save text from the first element
text = normalizeText($first.text())
})
cy.get('.two-elements')
.find('.second')
.should(($div) => {
// we can massage text before comparing
const secondText = normalizeText($div.text())
expect(secondText, 'second text').to.equal(text)
})
})
it('assert - assert shape of an object', () => {
const person = {
name: 'Joe',
age: 20,
}
assert.isObject(person, 'value is object')
})
})
})

View File

@@ -0,0 +1,56 @@
/// <reference types="Cypress" />
context('Connectors', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/commands/connectors')
})
it('.each() - iterate over an array of elements', () => {
// https://on.cypress.io/each
cy.get('.connectors-each-ul>li')
.each(($el, index, $list) => {
console.log($el, index, $list)
})
})
it('.its() - get properties on the current subject', () => {
// https://on.cypress.io/its
cy.get('.connectors-its-ul>li')
// calls the 'length' property yielding that value
.its('length')
.should('be.gt', 2)
})
it('.invoke() - invoke a function on the current subject', () => {
// our div is hidden in our script.js
// $('.connectors-div').hide()
// https://on.cypress.io/invoke
cy.get('.connectors-div').should('be.hidden')
// call the jquery method 'show' on the 'div.container'
.invoke('show')
.should('be.visible')
})
it('.spread() - spread an array as individual args to callback function', () => {
// https://on.cypress.io/spread
const arr = ['foo', 'bar', 'baz']
cy.wrap(arr).spread((foo, bar, baz) => {
expect(foo).to.eq('foo')
expect(bar).to.eq('bar')
expect(baz).to.eq('baz')
})
})
it('.then() - invoke a callback function with the current subject', () => {
// https://on.cypress.io/then
cy.get('.connectors-list > li')
.then(($lis) => {
expect($lis, '3 items').to.have.length(3)
expect($lis.eq(0), 'first item').to.contain('Walk the dog')
expect($lis.eq(1), 'second item').to.contain('Feed the cat')
expect($lis.eq(2), 'third item').to.contain('Write JavaScript')
})
})
})

View File

@@ -0,0 +1,78 @@
/// <reference types="Cypress" />
context('Cookies', () => {
beforeEach(() => {
Cypress.Cookies.debug(true)
cy.visit('https://example.cypress.io/commands/cookies')
// clear cookies again after visiting to remove
// any 3rd party cookies picked up such as cloudflare
cy.clearCookies()
})
it('cy.getCookie() - get a browser cookie', () => {
// https://on.cypress.io/getcookie
cy.get('#getCookie .set-a-cookie').click()
// cy.getCookie() yields a cookie object
cy.getCookie('token').should('have.property', 'value', '123ABC')
})
it('cy.getCookies() - get browser cookies', () => {
// https://on.cypress.io/getcookies
cy.getCookies().should('be.empty')
cy.get('#getCookies .set-a-cookie').click()
// cy.getCookies() yields an array of cookies
cy.getCookies().should('have.length', 1).should((cookies) => {
// each cookie has these properties
expect(cookies[0]).to.have.property('name', 'token')
expect(cookies[0]).to.have.property('value', '123ABC')
expect(cookies[0]).to.have.property('httpOnly', false)
expect(cookies[0]).to.have.property('secure', false)
expect(cookies[0]).to.have.property('domain')
expect(cookies[0]).to.have.property('path')
})
})
it('cy.setCookie() - set a browser cookie', () => {
// https://on.cypress.io/setcookie
cy.getCookies().should('be.empty')
cy.setCookie('foo', 'bar')
// cy.getCookie() yields a cookie object
cy.getCookie('foo').should('have.property', 'value', 'bar')
})
it('cy.clearCookie() - clear a browser cookie', () => {
// https://on.cypress.io/clearcookie
cy.getCookie('token').should('be.null')
cy.get('#clearCookie .set-a-cookie').click()
cy.getCookie('token').should('have.property', 'value', '123ABC')
// cy.clearCookies() yields null
cy.clearCookie('token').should('be.null')
cy.getCookie('token').should('be.null')
})
it('cy.clearCookies() - clear browser cookies', () => {
// https://on.cypress.io/clearcookies
cy.getCookies().should('be.empty')
cy.get('#clearCookies .set-a-cookie').click()
cy.getCookies().should('have.length', 1)
// cy.clearCookies() yields null
cy.clearCookies()
cy.getCookies().should('be.empty')
})
})

View File

@@ -0,0 +1,222 @@
/// <reference types="Cypress" />
context('Cypress.Commands', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/cypress-api')
})
// https://on.cypress.io/custom-commands
it('.add() - create a custom command', () => {
Cypress.Commands.add('console', {
prevSubject: true,
}, (subject, method) => {
// the previous subject is automatically received
// and the commands arguments are shifted
// allow us to change the console method used
method = method || 'log'
// log the subject to the console
// @ts-ignore TS7017
console[method]('The subject is', subject)
// whatever we return becomes the new subject
// we don't want to change the subject so
// we return whatever was passed in
return subject
})
// @ts-ignore TS2339
cy.get('button').console('info').then(($button) => {
// subject is still $button
})
})
})
context('Cypress.Cookies', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/cypress-api')
})
// https://on.cypress.io/cookies
it('.debug() - enable or disable debugging', () => {
Cypress.Cookies.debug(true)
// Cypress will now log in the console when
// cookies are set or cleared
cy.setCookie('fakeCookie', '123ABC')
cy.clearCookie('fakeCookie')
cy.setCookie('fakeCookie', '123ABC')
cy.clearCookie('fakeCookie')
cy.setCookie('fakeCookie', '123ABC')
})
it('.preserveOnce() - preserve cookies by key', () => {
// normally cookies are reset after each test
cy.getCookie('fakeCookie').should('not.be.ok')
// preserving a cookie will not clear it when
// the next test starts
cy.setCookie('lastCookie', '789XYZ')
Cypress.Cookies.preserveOnce('lastCookie')
})
it('.defaults() - set defaults for all cookies', () => {
// now any cookie with the name 'session_id' will
// not be cleared before each new test runs
Cypress.Cookies.defaults({
whitelist: 'session_id',
})
})
})
context('Cypress.Server', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/cypress-api')
})
// Permanently override server options for
// all instances of cy.server()
// https://on.cypress.io/cypress-server
it('.defaults() - change default config of server', () => {
Cypress.Server.defaults({
delay: 0,
force404: false,
})
})
})
context('Cypress.arch', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/cypress-api')
})
it('Get CPU architecture name of underlying OS', () => {
// https://on.cypress.io/arch
expect(Cypress.arch).to.exist
})
})
context('Cypress.config()', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/cypress-api')
})
it('Get and set configuration options', () => {
// https://on.cypress.io/config
let myConfig = Cypress.config()
expect(myConfig).to.have.property('animationDistanceThreshold', 5)
expect(myConfig).to.have.property('baseUrl', null)
expect(myConfig).to.have.property('defaultCommandTimeout', 4000)
expect(myConfig).to.have.property('requestTimeout', 5000)
expect(myConfig).to.have.property('responseTimeout', 30000)
expect(myConfig).to.have.property('viewportHeight', 660)
expect(myConfig).to.have.property('viewportWidth', 1000)
expect(myConfig).to.have.property('pageLoadTimeout', 60000)
expect(myConfig).to.have.property('waitForAnimations', true)
expect(Cypress.config('pageLoadTimeout')).to.eq(60000)
// this will change the config for the rest of your tests!
Cypress.config('pageLoadTimeout', 20000)
expect(Cypress.config('pageLoadTimeout')).to.eq(20000)
Cypress.config('pageLoadTimeout', 60000)
})
})
context('Cypress.dom', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/cypress-api')
})
// https://on.cypress.io/dom
it('.isHidden() - determine if a DOM element is hidden', () => {
let hiddenP = Cypress.$('.dom-p p.hidden').get(0)
let visibleP = Cypress.$('.dom-p p.visible').get(0)
// our first paragraph has css class 'hidden'
expect(Cypress.dom.isHidden(hiddenP)).to.be.true
expect(Cypress.dom.isHidden(visibleP)).to.be.false
})
})
context('Cypress.env()', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/cypress-api')
})
// We can set environment variables for highly dynamic values
// https://on.cypress.io/environment-variables
it('Get environment variables', () => {
// https://on.cypress.io/env
// set multiple environment variables
Cypress.env({
host: 'veronica.dev.local',
api_server: 'http://localhost:8888/v1/',
})
// get environment variable
expect(Cypress.env('host')).to.eq('veronica.dev.local')
// set environment variable
Cypress.env('api_server', 'http://localhost:8888/v2/')
expect(Cypress.env('api_server')).to.eq('http://localhost:8888/v2/')
// get all environment variable
expect(Cypress.env()).to.have.property('host', 'veronica.dev.local')
expect(Cypress.env()).to.have.property('api_server', 'http://localhost:8888/v2/')
})
})
context('Cypress.log', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/cypress-api')
})
it('Control what is printed to the Command Log', () => {
// https://on.cypress.io/cypress-log
})
})
context('Cypress.platform', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/cypress-api')
})
it('Get underlying OS name', () => {
// https://on.cypress.io/platform
expect(Cypress.platform).to.be.exist
})
})
context('Cypress.version', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/cypress-api')
})
it('Get current version of Cypress being run', () => {
// https://on.cypress.io/version
expect(Cypress.version).to.be.exist
})
})
context('Cypress.spec', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/cypress-api')
})
it('Get current spec information', () => {
// https://on.cypress.io/spec
// wrap the object so we can inspect it easily by clicking in the command log
cy.wrap(Cypress.spec).should('have.keys', ['name', 'relative', 'absolute'])
})
})

View File

@@ -0,0 +1,114 @@
/// <reference types="Cypress" />
/// JSON fixture file can be loaded directly using
// the built-in JavaScript bundler
// @ts-ignore
const requiredExample = require('../../fixtures/example')
context('Files', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/commands/files')
})
beforeEach(() => {
// load example.json fixture file and store
// in the test context object
cy.fixture('example.json').as('example')
})
it('cy.fixture() - load a fixture', () => {
// https://on.cypress.io/fixture
// Instead of writing a response inline you can
// use a fixture file's content.
cy.server()
cy.fixture('example.json').as('comment')
// when application makes an Ajax request matching "GET comments/*"
// Cypress will intercept it and reply with object
// from the "comment" alias
cy.route('GET', 'comments/*', '@comment').as('getComment')
// we have code that gets a comment when
// the button is clicked in scripts.js
cy.get('.fixture-btn').click()
cy.wait('@getComment').its('responseBody')
.should('have.property', 'name')
.and('include', 'Using fixtures to represent data')
// you can also just write the fixture in the route
cy.route('GET', 'comments/*', 'fixture:example.json').as('getComment')
// we have code that gets a comment when
// the button is clicked in scripts.js
cy.get('.fixture-btn').click()
cy.wait('@getComment').its('responseBody')
.should('have.property', 'name')
.and('include', 'Using fixtures to represent data')
// or write fx to represent fixture
// by default it assumes it's .json
cy.route('GET', 'comments/*', 'fx:example').as('getComment')
// we have code that gets a comment when
// the button is clicked in scripts.js
cy.get('.fixture-btn').click()
cy.wait('@getComment').its('responseBody')
.should('have.property', 'name')
.and('include', 'Using fixtures to represent data')
})
it('cy.fixture() or require - load a fixture', function () {
// we are inside the "function () { ... }"
// callback and can use test context object "this"
// "this.example" was loaded in "beforeEach" function callback
expect(this.example, 'fixture in the test context')
.to.deep.equal(requiredExample)
// or use "cy.wrap" and "should('deep.equal', ...)" assertion
// @ts-ignore
cy.wrap(this.example, 'fixture vs require')
.should('deep.equal', requiredExample)
})
it('cy.readFile() - read a files contents', () => {
// https://on.cypress.io/readfile
// You can read a file and yield its contents
// The filePath is relative to your project's root.
cy.readFile('cypress.json').then((json) => {
expect(json).to.be.an('object')
})
})
it('cy.writeFile() - write to a file', () => {
// https://on.cypress.io/writefile
// You can write to a file
// Use a response from a request to automatically
// generate a fixture file for use later
cy.request('https://jsonplaceholder.cypress.io/users')
.then((response) => {
cy.writeFile('cypress/fixtures/users.json', response.body)
})
cy.fixture('users').should((users) => {
expect(users[0].name).to.exist
})
// JavaScript arrays and objects are stringified
// and formatted into text.
cy.writeFile('cypress/fixtures/profile.json', {
id: 8739,
name: 'Jane',
email: 'jane@example.com',
})
cy.fixture('profile').should((profile) => {
expect(profile.name).to.eq('Jane')
})
})
})

View File

@@ -0,0 +1,52 @@
/// <reference types="Cypress" />
context('Local Storage', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/commands/local-storage')
})
// Although local storage is automatically cleared
// in between tests to maintain a clean state
// sometimes we need to clear the local storage manually
it('cy.clearLocalStorage() - clear all data in local storage', () => {
// https://on.cypress.io/clearlocalstorage
cy.get('.ls-btn').click().should(() => {
expect(localStorage.getItem('prop1')).to.eq('red')
expect(localStorage.getItem('prop2')).to.eq('blue')
expect(localStorage.getItem('prop3')).to.eq('magenta')
})
// clearLocalStorage() yields the localStorage object
cy.clearLocalStorage().should((ls) => {
expect(ls.getItem('prop1')).to.be.null
expect(ls.getItem('prop2')).to.be.null
expect(ls.getItem('prop3')).to.be.null
})
// Clear key matching string in Local Storage
cy.get('.ls-btn').click().should(() => {
expect(localStorage.getItem('prop1')).to.eq('red')
expect(localStorage.getItem('prop2')).to.eq('blue')
expect(localStorage.getItem('prop3')).to.eq('magenta')
})
cy.clearLocalStorage('prop1').should((ls) => {
expect(ls.getItem('prop1')).to.be.null
expect(ls.getItem('prop2')).to.eq('blue')
expect(ls.getItem('prop3')).to.eq('magenta')
})
// Clear keys matching regex in Local Storage
cy.get('.ls-btn').click().should(() => {
expect(localStorage.getItem('prop1')).to.eq('red')
expect(localStorage.getItem('prop2')).to.eq('blue')
expect(localStorage.getItem('prop3')).to.eq('magenta')
})
cy.clearLocalStorage(/prop1|2/).should((ls) => {
expect(ls.getItem('prop1')).to.be.null
expect(ls.getItem('prop2')).to.be.null
expect(ls.getItem('prop3')).to.eq('magenta')
})
})
})

View File

@@ -0,0 +1,32 @@
/// <reference types="Cypress" />
context('Location', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/commands/location')
})
it('cy.hash() - get the current URL hash', () => {
// https://on.cypress.io/hash
cy.hash().should('be.empty')
})
it('cy.location() - get window.location', () => {
// https://on.cypress.io/location
cy.location().should((location) => {
expect(location.hash).to.be.empty
expect(location.href).to.eq('https://example.cypress.io/commands/location')
expect(location.host).to.eq('example.cypress.io')
expect(location.hostname).to.eq('example.cypress.io')
expect(location.origin).to.eq('https://example.cypress.io')
expect(location.pathname).to.eq('/commands/location')
expect(location.port).to.eq('')
expect(location.protocol).to.eq('https:')
expect(location.search).to.be.empty
})
})
it('cy.url() - get the current URL', () => {
// https://on.cypress.io/url
cy.url().should('eq', 'https://example.cypress.io/commands/location')
})
})

View File

@@ -0,0 +1,83 @@
/// <reference types="Cypress" />
context('Misc', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/commands/misc')
})
it('.end() - end the command chain', () => {
// https://on.cypress.io/end
// cy.end is useful when you want to end a chain of commands
// and force Cypress to re-query from the root element
cy.get('.misc-table').within(() => {
// ends the current chain and yields null
cy.contains('Cheryl').click().end()
// queries the entire table again
cy.contains('Charles').click()
})
})
it('cy.exec() - execute a system command', () => {
// https://on.cypress.io/exec
// execute a system command.
// so you can take actions necessary for
// your test outside the scope of Cypress.
cy.exec('echo Jane Lane')
.its('stdout').should('contain', 'Jane Lane')
// we can use Cypress.platform string to
// select appropriate command
// https://on.cypress/io/platform
cy.log(`Platform ${Cypress.platform} architecture ${Cypress.arch}`)
if (Cypress.platform === 'win32') {
cy.exec('print cypress.json')
.its('stderr').should('be.empty')
} else {
cy.exec('cat cypress.json')
.its('stderr').should('be.empty')
cy.exec('pwd')
.its('code').should('eq', 0)
}
})
it('cy.focused() - get the DOM element that has focus', () => {
// https://on.cypress.io/focused
cy.get('.misc-form').find('#name').click()
cy.focused().should('have.id', 'name')
cy.get('.misc-form').find('#description').click()
cy.focused().should('have.id', 'description')
})
context('Cypress.Screenshot', function () {
it('cy.screenshot() - take a screenshot', () => {
// https://on.cypress.io/screenshot
cy.screenshot('my-image')
})
it('Cypress.Screenshot.defaults() - change default config of screenshots', function () {
Cypress.Screenshot.defaults({
blackout: ['.foo'],
capture: 'viewport',
clip: { x: 0, y: 0, width: 200, height: 200 },
scale: false,
disableTimersAndAnimations: true,
screenshotOnRunFailure: true,
beforeScreenshot () { },
afterScreenshot () { },
})
})
})
it('cy.wrap() - wrap an object', () => {
// https://on.cypress.io/wrap
cy.wrap({ foo: 'bar' })
.should('have.property', 'foo')
.and('include', 'bar')
})
})

View File

@@ -0,0 +1,56 @@
/// <reference types="Cypress" />
context('Navigation', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io')
cy.get('.navbar-nav').contains('Commands').click()
cy.get('.dropdown-menu').contains('Navigation').click()
})
it('cy.go() - go back or forward in the browser\'s history', () => {
// https://on.cypress.io/go
cy.location('pathname').should('include', 'navigation')
cy.go('back')
cy.location('pathname').should('not.include', 'navigation')
cy.go('forward')
cy.location('pathname').should('include', 'navigation')
// clicking back
cy.go(-1)
cy.location('pathname').should('not.include', 'navigation')
// clicking forward
cy.go(1)
cy.location('pathname').should('include', 'navigation')
})
it('cy.reload() - reload the page', () => {
// https://on.cypress.io/reload
cy.reload()
// reload the page without using the cache
cy.reload(true)
})
it('cy.visit() - visit a remote url', () => {
// https://on.cypress.io/visit
// Visit any sub-domain of your current domain
// Pass options to the visit
cy.visit('https://example.cypress.io/commands/navigation', {
timeout: 50000, // increase total time for the visit to resolve
onBeforeLoad (contentWindow) {
// contentWindow is the remote page's window object
expect(typeof contentWindow === 'object').to.be.true
},
onLoad (contentWindow) {
// contentWindow is the remote page's window object
expect(typeof contentWindow === 'object').to.be.true
},
})
})
})

View File

@@ -0,0 +1,194 @@
/// <reference types="Cypress" />
context('Network Requests', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/commands/network-requests')
})
// Manage AJAX / XHR requests in your app
it('cy.server() - control behavior of network requests and responses', () => {
// https://on.cypress.io/server
cy.server().should((server) => {
// the default options on server
// you can override any of these options
expect(server.delay).to.eq(0)
expect(server.method).to.eq('GET')
expect(server.status).to.eq(200)
expect(server.headers).to.be.null
expect(server.response).to.be.null
expect(server.onRequest).to.be.undefined
expect(server.onResponse).to.be.undefined
expect(server.onAbort).to.be.undefined
// These options control the server behavior
// affecting all requests
// pass false to disable existing route stubs
expect(server.enable).to.be.true
// forces requests that don't match your routes to 404
expect(server.force404).to.be.false
// whitelists requests from ever being logged or stubbed
expect(server.whitelist).to.be.a('function')
})
cy.server({
method: 'POST',
delay: 1000,
status: 422,
response: {},
})
// any route commands will now inherit the above options
// from the server. anything we pass specifically
// to route will override the defaults though.
})
it('cy.request() - make an XHR request', () => {
// https://on.cypress.io/request
cy.request('https://jsonplaceholder.cypress.io/comments')
.should((response) => {
expect(response.status).to.eq(200)
expect(response.body).to.have.length(500)
expect(response).to.have.property('headers')
expect(response).to.have.property('duration')
})
})
it('cy.request() - verify response using BDD syntax', () => {
cy.request('https://jsonplaceholder.cypress.io/comments')
.then((response) => {
// https://on.cypress.io/assertions
expect(response).property('status').to.equal(200)
expect(response).property('body').to.have.length(500)
expect(response).to.include.keys('headers', 'duration')
})
})
it('cy.request() with query parameters', () => {
// will execute request
// https://jsonplaceholder.cypress.io/comments?postId=1&id=3
cy.request({
url: 'https://jsonplaceholder.cypress.io/comments',
qs: {
postId: 1,
id: 3,
},
})
.its('body')
.should('be.an', 'array')
.and('have.length', 1)
.its('0') // yields first element of the array
.should('contain', {
postId: 1,
id: 3,
})
})
it('cy.request() - pass result to the second request', () => {
// first, let's find out the userId of the first user we have
cy.request('https://jsonplaceholder.cypress.io/users?_limit=1')
.its('body.0') // yields the first element of the returned list
.then((user) => {
expect(user).property('id').to.be.a('number')
// make a new post on behalf of the user
cy.request('POST', 'https://jsonplaceholder.cypress.io/posts', {
userId: user.id,
title: 'Cypress Test Runner',
body: 'Fast, easy and reliable testing for anything that runs in a browser.',
})
})
// note that the value here is the returned value of the 2nd request
// which is the new post object
.then((response) => {
expect(response).property('status').to.equal(201) // new entity created
expect(response).property('body').to.contain({
id: 101, // there are already 100 posts, so new entity gets id 101
title: 'Cypress Test Runner',
})
// we don't know the user id here - since it was in above closure
// so in this test just confirm that the property is there
expect(response.body).property('userId').to.be.a('number')
})
})
it('cy.request() - save response in the shared test context', () => {
// https://on.cypress.io/variables-and-aliases
cy.request('https://jsonplaceholder.cypress.io/users?_limit=1')
.its('body.0') // yields the first element of the returned list
.as('user') // saves the object in the test context
.then(function () {
// NOTE 👀
// By the time this callback runs the "as('user')" command
// has saved the user object in the test context.
// To access the test context we need to use
// the "function () { ... }" callback form,
// otherwise "this" points at a wrong or undefined object!
cy.request('POST', 'https://jsonplaceholder.cypress.io/posts', {
userId: this.user.id,
title: 'Cypress Test Runner',
body: 'Fast, easy and reliable testing for anything that runs in a browser.',
})
.its('body').as('post') // save the new post from the response
})
.then(function () {
// When this callback runs, both "cy.request" API commands have finished
// and the test context has "user" and "post" objects set.
// Let's verify them.
expect(this.post, 'post has the right user id').property('userId').to.equal(this.user.id)
})
})
it('cy.route() - route responses to matching requests', () => {
// https://on.cypress.io/route
let message = 'whoa, this comment does not exist'
cy.server()
// Listen to GET to comments/1
cy.route('GET', 'comments/*').as('getComment')
// we have code that gets a comment when
// the button is clicked in scripts.js
cy.get('.network-btn').click()
// https://on.cypress.io/wait
cy.wait('@getComment').its('status').should('eq', 200)
// Listen to POST to comments
cy.route('POST', '/comments').as('postComment')
// we have code that posts a comment when
// the button is clicked in scripts.js
cy.get('.network-post').click()
cy.wait('@postComment')
// get the route
cy.get('@postComment').should((xhr) => {
expect(xhr.requestBody).to.include('email')
expect(xhr.requestHeaders).to.have.property('Content-Type')
expect(xhr.responseBody).to.have.property('name', 'Using POST in cy.route()')
})
// Stub a response to PUT comments/ ****
cy.route({
method: 'PUT',
url: 'comments/*',
status: 404,
response: { error: message },
delay: 500,
}).as('putComment')
// we have code that puts a comment when
// the button is clicked in scripts.js
cy.get('.network-put').click()
cy.wait('@putComment')
// our 404 statusCode logic in scripts.js executed
cy.get('.network-put-comment').should('contain', message)
})
})

View File

@@ -0,0 +1,87 @@
/// <reference types="Cypress" />
context('Querying', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/commands/querying')
})
// The most commonly used query is 'cy.get()', you can
// think of this like the '$' in jQuery
it('cy.get() - query DOM elements', () => {
// https://on.cypress.io/get
cy.get('#query-btn').should('contain', 'Button')
cy.get('.query-btn').should('contain', 'Button')
cy.get('#querying .well>button:first').should('contain', 'Button')
// ↲
// Use CSS selectors just like jQuery
cy.get('[data-test-id="test-example"]').should('have.class', 'example')
// 'cy.get()' yields jQuery object, you can get its attribute
// by invoking `.attr()` method
cy.get('[data-test-id="test-example"]')
.invoke('attr', 'data-test-id')
.should('equal', 'test-example')
// or you can get element's CSS property
cy.get('[data-test-id="test-example"]')
.invoke('css', 'position')
.should('equal', 'static')
// or use assertions directly during 'cy.get()'
// https://on.cypress.io/assertions
cy.get('[data-test-id="test-example"]')
.should('have.attr', 'data-test-id', 'test-example')
.and('have.css', 'position', 'static')
})
it('cy.contains() - query DOM elements with matching content', () => {
// https://on.cypress.io/contains
cy.get('.query-list')
.contains('bananas')
.should('have.class', 'third')
// we can pass a regexp to `.contains()`
cy.get('.query-list')
.contains(/^b\w+/)
.should('have.class', 'third')
cy.get('.query-list')
.contains('apples')
.should('have.class', 'first')
// passing a selector to contains will
// yield the selector containing the text
cy.get('#querying')
.contains('ul', 'oranges')
.should('have.class', 'query-list')
cy.get('.query-button')
.contains('Save Form')
.should('have.class', 'btn')
})
it('.within() - query DOM elements within a specific element', () => {
// https://on.cypress.io/within
cy.get('.query-form').within(() => {
cy.get('input:first').should('have.attr', 'placeholder', 'Email')
cy.get('input:last').should('have.attr', 'placeholder', 'Password')
})
})
it('cy.root() - query the root DOM element', () => {
// https://on.cypress.io/root
// By default, root is the document
cy.root().should('match', 'html')
cy.get('.query-ul').within(() => {
// In this within, the root is now the ul DOM element
cy.root().should('have.class', 'query-ul')
})
})
})

View File

@@ -0,0 +1,95 @@
/// <reference types="Cypress" />
context('Spies, Stubs, and Clock', () => {
it('cy.spy() - wrap a method in a spy', () => {
// https://on.cypress.io/spy
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
const obj = {
foo () {},
}
const spy = cy.spy(obj, 'foo').as('anyArgs')
obj.foo()
expect(spy).to.be.called
})
it('cy.spy() retries until assertions pass', () => {
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
const obj = {
/**
* Prints the argument passed
* @param x {any}
*/
foo (x) {
console.log('obj.foo called with', x)
},
}
cy.spy(obj, 'foo').as('foo')
setTimeout(() => {
obj.foo('first')
}, 500)
setTimeout(() => {
obj.foo('second')
}, 2500)
cy.get('@foo').should('have.been.calledTwice')
})
it('cy.stub() - create a stub and/or replace a function with stub', () => {
// https://on.cypress.io/stub
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
const obj = {
/**
* prints both arguments to the console
* @param a {string}
* @param b {string}
*/
foo (a, b) {
console.log('a', a, 'b', b)
},
}
const stub = cy.stub(obj, 'foo').as('foo')
obj.foo('foo', 'bar')
expect(stub).to.be.called
})
it('cy.clock() - control time in the browser', () => {
// https://on.cypress.io/clock
// create the date in UTC so its always the same
// no matter what local timezone the browser is running in
const now = new Date(Date.UTC(2017, 2, 14)).getTime()
cy.clock(now)
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
cy.get('#clock-div').click()
.should('have.text', '1489449600')
})
it('cy.tick() - move time in the browser', () => {
// https://on.cypress.io/tick
// create the date in UTC so its always the same
// no matter what local timezone the browser is running in
const now = new Date(Date.UTC(2017, 2, 14)).getTime()
cy.clock(now)
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
cy.get('#tick-div').click()
.should('have.text', '1489449600')
cy.tick(10000) // 10 seconds passed
cy.get('#tick-div').click()
.should('have.text', '1489449610')
})
})

View File

@@ -0,0 +1,121 @@
/// <reference types="Cypress" />
context('Traversal', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/commands/traversal')
})
it('.children() - get child DOM elements', () => {
// https://on.cypress.io/children
cy.get('.traversal-breadcrumb')
.children('.active')
.should('contain', 'Data')
})
it('.closest() - get closest ancestor DOM element', () => {
// https://on.cypress.io/closest
cy.get('.traversal-badge')
.closest('ul')
.should('have.class', 'list-group')
})
it('.eq() - get a DOM element at a specific index', () => {
// https://on.cypress.io/eq
cy.get('.traversal-list>li')
.eq(1).should('contain', 'siamese')
})
it('.filter() - get DOM elements that match the selector', () => {
// https://on.cypress.io/filter
cy.get('.traversal-nav>li')
.filter('.active').should('contain', 'About')
})
it('.find() - get descendant DOM elements of the selector', () => {
// https://on.cypress.io/find
cy.get('.traversal-pagination')
.find('li').find('a')
.should('have.length', 7)
})
it('.first() - get first DOM element', () => {
// https://on.cypress.io/first
cy.get('.traversal-table td')
.first().should('contain', '1')
})
it('.last() - get last DOM element', () => {
// https://on.cypress.io/last
cy.get('.traversal-buttons .btn')
.last().should('contain', 'Submit')
})
it('.next() - get next sibling DOM element', () => {
// https://on.cypress.io/next
cy.get('.traversal-ul')
.contains('apples').next().should('contain', 'oranges')
})
it('.nextAll() - get all next sibling DOM elements', () => {
// https://on.cypress.io/nextall
cy.get('.traversal-next-all')
.contains('oranges')
.nextAll().should('have.length', 3)
})
it('.nextUntil() - get next sibling DOM elements until next el', () => {
// https://on.cypress.io/nextuntil
cy.get('#veggies')
.nextUntil('#nuts').should('have.length', 3)
})
it('.not() - remove DOM elements from set of DOM elements', () => {
// https://on.cypress.io/not
cy.get('.traversal-disabled .btn')
.not('[disabled]').should('not.contain', 'Disabled')
})
it('.parent() - get parent DOM element from DOM elements', () => {
// https://on.cypress.io/parent
cy.get('.traversal-mark')
.parent().should('contain', 'Morbi leo risus')
})
it('.parents() - get parent DOM elements from DOM elements', () => {
// https://on.cypress.io/parents
cy.get('.traversal-cite')
.parents().should('match', 'blockquote')
})
it('.parentsUntil() - get parent DOM elements from DOM elements until el', () => {
// https://on.cypress.io/parentsuntil
cy.get('.clothes-nav')
.find('.active')
.parentsUntil('.clothes-nav')
.should('have.length', 2)
})
it('.prev() - get previous sibling DOM element', () => {
// https://on.cypress.io/prev
cy.get('.birds').find('.active')
.prev().should('contain', 'Lorikeets')
})
it('.prevAll() - get all previous sibling DOM elements', () => {
// https://on.cypress.io/prevAll
cy.get('.fruits-list').find('.third')
.prevAll().should('have.length', 2)
})
it('.prevUntil() - get all previous sibling DOM elements until el', () => {
// https://on.cypress.io/prevUntil
cy.get('.foods-list').find('#nuts')
.prevUntil('#veggies').should('have.length', 3)
})
it('.siblings() - get all sibling DOM elements', () => {
// https://on.cypress.io/siblings
cy.get('.traversal-pills .active')
.siblings().should('have.length', 2)
})
})

View File

@@ -0,0 +1,133 @@
/// <reference types="Cypress" />
context('Utilities', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/utilities')
})
it('Cypress._ - call a lodash method', () => {
// https://on.cypress.io/_
cy.request('https://jsonplaceholder.cypress.io/users')
.then((response) => {
let ids = Cypress._.chain(response.body).map('id').take(3).value()
expect(ids).to.deep.eq([1, 2, 3])
})
})
it('Cypress.$ - call a jQuery method', () => {
// https://on.cypress.io/$
let $li = Cypress.$('.utility-jquery li:first')
cy.wrap($li)
.should('not.have.class', 'active')
.click()
.should('have.class', 'active')
})
it('Cypress.Blob - blob utilities and base64 string conversion', () => {
// https://on.cypress.io/blob
cy.get('.utility-blob').then(($div) =>
// https://github.com/nolanlawson/blob-util#imgSrcToDataURL
// get the dataUrl string for the javascript-logo
Cypress.Blob.imgSrcToDataURL('https://example.cypress.io/assets/img/javascript-logo.png', undefined, 'anonymous')
.then((dataUrl) => {
// create an <img> element and set its src to the dataUrl
let img = Cypress.$('<img />', { src: dataUrl })
// need to explicitly return cy here since we are initially returning
// the Cypress.Blob.imgSrcToDataURL promise to our test
// append the image
$div.append(img)
cy.get('.utility-blob img').click()
.should('have.attr', 'src', dataUrl)
}))
})
it('Cypress.minimatch - test out glob patterns against strings', () => {
// https://on.cypress.io/minimatch
let matching = Cypress.minimatch('/users/1/comments', '/users/*/comments', {
matchBase: true,
})
expect(matching, 'matching wildcard').to.be.true
matching = Cypress.minimatch('/users/1/comments/2', '/users/*/comments', {
matchBase: true,
})
expect(matching, 'comments').to.be.false
// ** matches against all downstream path segments
matching = Cypress.minimatch('/foo/bar/baz/123/quux?a=b&c=2', '/foo/**', {
matchBase: true,
})
expect(matching, 'comments').to.be.true
// whereas * matches only the next path segment
matching = Cypress.minimatch('/foo/bar/baz/123/quux?a=b&c=2', '/foo/*', {
matchBase: false,
})
expect(matching, 'comments').to.be.false
})
it('Cypress.moment() - format or parse dates using a moment method', () => {
// https://on.cypress.io/moment
const time = Cypress.moment().utc('2014-04-25T19:38:53.196Z').format('h:mm A')
expect(time).to.be.a('string')
cy.get('.utility-moment').contains('3:38 PM')
.should('have.class', 'badge')
// the time in the element should be between 3pm and 5pm
const start = Cypress.moment('3:00 PM', 'LT')
const end = Cypress.moment('5:00 PM', 'LT')
cy.get('.utility-moment .badge')
.should(($el) => {
// parse American time like "3:38 PM"
const m = Cypress.moment($el.text().trim(), 'LT')
// display hours + minutes + AM|PM
const f = 'h:mm A'
expect(m.isBetween(start, end),
`${m.format(f)} should be between ${start.format(f)} and ${end.format(f)}`).to.be.true
})
})
it('Cypress.Promise - instantiate a bluebird promise', () => {
// https://on.cypress.io/promise
let waited = false
/**
* @return Bluebird<string>
*/
function waitOneSecond () {
// return a promise that resolves after 1 second
// @ts-ignore TS2351 (new Cypress.Promise)
return new Cypress.Promise((resolve, reject) => {
setTimeout(() => {
// set waited to true
waited = true
// resolve with 'foo' string
resolve('foo')
}, 1000)
})
}
cy.then(() =>
// return a promise to cy.then() that
// is awaited until it resolves
// @ts-ignore TS7006
waitOneSecond().then((str) => {
expect(str).to.eq('foo')
expect(waited).to.be.true
}))
})
})

View File

@@ -0,0 +1,59 @@
/// <reference types="Cypress" />
context('Viewport', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/commands/viewport')
})
it('cy.viewport() - set the viewport size and dimension', () => {
// https://on.cypress.io/viewport
cy.get('#navbar').should('be.visible')
cy.viewport(320, 480)
// the navbar should have collapse since our screen is smaller
cy.get('#navbar').should('not.be.visible')
cy.get('.navbar-toggle').should('be.visible').click()
cy.get('.nav').find('a').should('be.visible')
// lets see what our app looks like on a super large screen
cy.viewport(2999, 2999)
// cy.viewport() accepts a set of preset sizes
// to easily set the screen to a device's width and height
// We added a cy.wait() between each viewport change so you can see
// the change otherwise it is a little too fast to see :)
cy.viewport('macbook-15')
cy.wait(200)
cy.viewport('macbook-13')
cy.wait(200)
cy.viewport('macbook-11')
cy.wait(200)
cy.viewport('ipad-2')
cy.wait(200)
cy.viewport('ipad-mini')
cy.wait(200)
cy.viewport('iphone-6+')
cy.wait(200)
cy.viewport('iphone-6')
cy.wait(200)
cy.viewport('iphone-5')
cy.wait(200)
cy.viewport('iphone-4')
cy.wait(200)
cy.viewport('iphone-3')
cy.wait(200)
// cy.viewport() accepts an orientation for all presets
// the default orientation is 'portrait'
cy.viewport('ipad-2', 'portrait')
cy.wait(200)
cy.viewport('iphone-4', 'landscape')
cy.wait(200)
// The viewport will be reset back to the default dimensions
// in between tests (the default can be set in cypress.json)
})
})

View File

@@ -0,0 +1,34 @@
/// <reference types="Cypress" />
context('Waiting', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/commands/waiting')
})
// BE CAREFUL of adding unnecessary wait times.
// https://on.cypress.io/best-practices#Unnecessary-Waiting
// https://on.cypress.io/wait
it('cy.wait() - wait for a specific amount of time', () => {
cy.get('.wait-input1').type('Wait 1000ms after typing')
cy.wait(1000)
cy.get('.wait-input2').type('Wait 1000ms after typing')
cy.wait(1000)
cy.get('.wait-input3').type('Wait 1000ms after typing')
cy.wait(1000)
})
it('cy.wait() - wait for a specific route', () => {
cy.server()
// Listen to GET to comments/1
cy.route('GET', 'comments/*').as('getComment')
// we have code that gets a comment when
// the button is clicked in scripts.js
cy.get('.network-btn').click()
// wait for GET comments/1
cy.wait('@getComment').its('status').should('eq', 200)
})
})

View File

@@ -0,0 +1,22 @@
/// <reference types="Cypress" />
context('Window', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/commands/window')
})
it('cy.window() - get the global window object', () => {
// https://on.cypress.io/window
cy.window().should('have.property', 'top')
})
it('cy.document() - get the document object', () => {
// https://on.cypress.io/document
cy.document().should('have.property', 'charset').and('eq', 'UTF-8')
})
it('cy.title() - get the title', () => {
// https://on.cypress.io/title
cy.title().should('include', 'Kitchen Sink')
})
})

View File

@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}

59
cypress/helpers/util.js Normal file
View File

@@ -0,0 +1,59 @@
/* eslint-env jest */
/* global cy */
import { Base64 } from 'js-base64';
export const mermaidUrl = (graphStr, options, api) => {
const obj = {
code: graphStr,
mermaid: options
};
const objStr = JSON.stringify(obj);
let url = 'http://localhost:9000/e2e.html?graph=' + Base64.encodeURI(objStr);
if (api) {
url = 'http://localhost:9000/xss.html?graph=' + graphStr;
}
if (options.listUrl) {
cy.log(options.listId, ' ', url);
}
return url;
};
export const imgSnapshotTest = (graphStr, _options, api) => {
cy.log(_options);
const options = Object.assign(_options);
if (!options.fontFamily) {
options.fontFamily = 'courier';
}
if (!options.sequence) {
options.sequence = {};
}
if (!options.sequence || (options.sequence && !options.sequence.actorFontFamily)) {
options.sequence.actorFontFamily = 'courier';
}
if (options.sequence && !options.sequence.noteFontFamily) {
options.sequence.noteFontFamily = 'courier';
}
options.sequence.actorFontFamily = 'courier';
options.sequence.noteFontFamily = 'courier';
options.sequence.messageFontFamily = 'courier';
if (options.sequence && !options.sequence.actorFontFamily) {
options.sequence.actorFontFamily = 'courier';
}
if (!options.fontSize) {
options.fontSize = '16px';
}
cy.log(options);
const url = mermaidUrl(graphStr, options, api);
cy.visit(url);
cy.get('svg');
cy.percySnapshot();
};
export const renderGraph = (graphStr, options, api) => {
const url = mermaidUrl(graphStr, options, api);
cy.visit(url);
};

View File

@@ -0,0 +1,100 @@
import { renderGraph } from '../../helpers/util';
/* eslint-env jest */
describe('Configuration', () => {
describe('arrowMarkerAbsolute', () => {
it('should handle default value false of arrowMarkerAbsolute', () => {
renderGraph(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{ }
);
// Check the marker-end property to make sure it is properly set to
// start with #
cy.get('.edgePath path').first().should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(#');
});
it('should handle default value false of arrowMarkerAbsolute', () => {
renderGraph(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{ }
);
// Check the marker-end property to make sure it is properly set to
// start with #
cy.get('.edgePath path').first().should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(#');
});
it('should handle arrowMarkerAbsolute excplicitly set to false', () => {
renderGraph(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{
arrowMarkerAbsolute: false
}
);
// Check the marker-end property to make sure it is properly set to
// start with #
cy.get('.edgePath path').first().should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(#');
});
it('should handle arrowMarkerAbsolute excplicitly set to "false" as false', () => {
renderGraph(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{
arrowMarkerAbsolute: "false"
}
);
// Check the marker-end property to make sure it is properly set to
// start with #
cy.get('.edgePath path').first().should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(#');
});
it('should handle arrowMarkerAbsolute set to true', () => {
renderGraph(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{
arrowMarkerAbsolute: true
}
);
cy.get('.edgePath path').first().should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(http://localhost');
});
});
});

View File

@@ -0,0 +1,309 @@
/* eslint-env jest */
describe('Interaction', () => {
describe('Interaction - security level loose', () => {
it('Graph: should handle a click on a node with a bound function', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g#flowchart-Function-2')
.click();
cy.get('.created-by-click').should('have.text', 'Clicked By Flow');
});
it('Graph: should handle a click on a node with a bound function where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g[id="flowchart-1Function-6"]')
.click();
cy.get('.created-by-click').should('have.text', 'Clicked By Flow');
});
it('Graph: should handle a click on a node with a bound url', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('#flowchart-URL-3')
.click();
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('Graph: should handle a click on a node with a bound url where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g[id="flowchart-2URL-7"]')
.click();
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('Flowchart-v2: should handle a click on a node with a bound function', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g#flowchart-Function-10')
.click();
cy.get('.created-by-click').should('have.text', 'Clicked By Flow');
});
it('Flowchart-v2: should handle a click on a node with a bound function where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g[id="flowchart-1Function-14"]')
.click();
cy.get('.created-by-click').should('have.text', 'Clicked By Flow');
});
it('Flowchart-v2: should handle a click on a node with a bound url', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('#flowchart-URL-11')
.click();
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('Flowchart-v2: should handle a click on a node with a bound url where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g[id="flowchart-2URL-15"]')
.click();
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a task with a bound URL clicking on the rect', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('rect#cl1')
.click({ force: true });
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a task with a bound URL clicking on the text', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('text#cl1-text')
.click({ force: true });
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a task with a bound function without args', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('rect#cl2')
.click({ force: true });
cy.get('.created-by-gant-click').should('have.text', 'Clicked By Gant cl2');
});
it('should handle a click on a task with a bound function with args', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('rect#cl3')
.click({ force: true });
cy.get('.created-by-gant-click').should('have.text', 'Clicked By Gant test1 test2 test3');
});
it('should handle a click on a task with a bound function without args', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('text#cl2-text')
.click({ force: true });
cy.get('.created-by-gant-click').should('have.text', 'Clicked By Gant cl2');
});
it('should handle a click on a task with a bound function with args ', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('text#cl3-text')
.click({ force: true });
cy.get('.created-by-gant-click').should('have.text', 'Clicked By Gant test1 test2 test3');
});
});
describe('Interaction - security level tight', () => {
it('should handle a click on a node without a bound function', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g#flowchart-Function-2')
.click();
cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
});
it('should handle a click on a node with a bound function where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g[id="flowchart-1Function-6"]')
.click();
cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
});
it('should handle a click on a node with a bound url', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g#flowchart-URL-3')
.click();
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a node with a bound url where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g[id="flowchart-2URL-7"]')
.click();
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a task with a bound URL clicking on the rect', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('rect#cl1')
.click({ force: true });
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a task with a bound URL clicking on the text', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('text#cl1-text')
.click({ force: true });
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a task with a bound function', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('rect#cl2')
.click({ force: true });
cy.get('.created-by-gant-click').should('not.have.text', 'Clicked By Gant cl2');
});
it('should handle a click on a task with a bound function', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('text#cl2-text')
.click({ force: true });
cy.get('.created-by-gant-click').should('not.have.text', 'Clicked By Gant cl2');
});
});
describe('Interaction - security level other, missspelling', () => {
it('should handle a click on a node with a bound function', () => {
const url = 'http://localhost:9000/click_security_other.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g#flowchart-Function-2')
.click();
cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
});
it('should handle a click on a node with a bound function where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_other.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g[id="flowchart-1Function-6"]')
.click();
cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
});
it('should handle a click on a node with a bound url', () => {
const url = 'http://localhost:9000/click_security_other.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g#flowchart-URL-3')
.click();
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a task with a bound function', () => {
const url = 'http://localhost:9000/click_security_other.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('rect#cl2')
.click({ force: true });
cy.get('.created-by-gant-click').should('not.have.text', 'Clicked By Gant cl2');
});
it('should handle a click on a task with a bound function', () => {
const url = 'http://localhost:9000/click_security_other.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('text#cl2-text')
.click({ force: true });
cy.get('.created-by-gant-click').should('not.have.text', 'Clicked By Gant cl2');
});
});
});

View File

@@ -0,0 +1,22 @@
/* eslint-env jest */
describe('Rerendering', () => {
it('should be able to render after an error has occured', () => {
const url = 'http://localhost:9000/render-after-error.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('#graphDiv').should('exist');
});
it('should be able to render and rerender a graph via API', () => {
const url = 'http://localhost:9000/rerender.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('#graph [id^=flowchart-A]').should('have.text', 'XMas');
cy.get('body')
.find('#rerender')
.click({ force: true });
cy.get('#graph [id^=flowchart-A]').should('have.text', 'Saturday');
});
});

View File

@@ -0,0 +1,21 @@
/* eslint-env jest */
describe('Sequencediagram', () => {
it('should render a simple sequence diagrams', () => {
const url = 'http://localhost:9000/webpackUsage.html';
cy.visit(url);
cy.get('body')
.find('svg')
.should('have.length', 1);
});
it('should handle html escapings properly', () => {
const url = 'http://localhost:9000/webpackUsage.html?test-html-escaping=true';
cy.visit(url);
cy.get('body')
.find('svg')
.should('have.length', 1);
cy.get('.label > g > foreignobject > div').should('not.contain.text', '<b>');
});
});

View File

@@ -0,0 +1,35 @@
/* eslint-env jest */
import { mermaidUrl } from '../../helpers/util.js';
/* eslint-disable */
describe('XSS', () => {
it('should handle xss in tags', () => {
const str = 'eyJjb2RlIjoiXG5ncmFwaCBMUlxuICAgICAgQi0tPkQoPGltZyBvbmVycm9yPWxvY2F0aW9uPWBqYXZhc2NyaXB0XFx1MDAzYXhzc0F0dGFja1xcdTAwMjhkb2N1bWVudC5kb21haW5cXHUwMDI5YCBzcmM9eD4pOyIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In19';
const url = mermaidUrl(str,{}, true);
cy.visit(url);
cy.wait(1000).then(()=>{
cy.get('.mermaid').should('exist');
});
cy.get('svg')
// cy.percySnapshot()
})
it('should handle xss in tags in non-html mode', () => {
const str = 'eyJjb2RlIjoiXG5ncmFwaCBMUlxuICAgICAgQi0tPkQoPGltZyBvbmVycm9yPWxvY2F0aW9uPWBqYXZhc2NyaXB0XFx1MDAzYXhzc0F0dGFja1xcdTAwMjhkb2N1bWVudC5kb21haW5cXHUwMDI5YCBzcmM9eD4pOyIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0IiwiZmxvd2NoYXJ0Ijp7Imh0bWxMYWJlbHMiOmZhbHNlfX19';
const url = mermaidUrl(str,{
"theme": "default",
"flowchart": {
"htmlMode": false
}
}, true);
cy.visit(url);
// cy.get('svg')
// cy.percySnapshot()
cy.get('.malware').should('not.exist');
})
})

View File

@@ -0,0 +1,373 @@
/* eslint-env jest */
import { imgSnapshotTest } from '../../helpers/util';
describe('Class diagram V2', () => {
it('0: should render a simple class diagram', () => {
imgSnapshotTest(
`
classDiagram-v2
classA -- classB : Inheritance
classA -- classC : link
classC -- classD : link
classB -- classD
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('1: should render a simple class diagram', () => {
imgSnapshotTest(
`
classDiagram-v2
Class01 <|-- AveryLongClass : Cool
&lt;&lt;interface&gt;&gt; Class01
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class12 <|.. Class08
Class11 ..>Class12
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class01 : -int privateChimp
Class01 : +int publicGorilla
Class01 : #int protectedMarmoset
Class08 <--> C2: Cool label
class Class10 {
&lt;&lt;service&gt;&gt;
int id
test()
}
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('2: should render a simple class diagrams with cardinality', () => {
imgSnapshotTest(
`
classDiagram-v2
Class01 "1" <|--|> "*" AveryLongClass : Cool
&lt;&lt;interface&gt;&gt; Class01
Class03 "1" *-- "*" Class04
Class05 "1" o-- "many" Class06
Class07 "1" .. "*" Class08
Class09 "1" --> "*" C2 : Where am i?
Class09 "*" --* "*" C3
Class09 "1" --|> "1" Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 "1" <--> "*" C2: Cool label
class Class10 {
&lt;&lt;service&gt;&gt;
int id
test()
}
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('should render a simple class diagram with different visibilities', () => {
imgSnapshotTest(
`
classDiagram-v2
Class01 <|-- AveryLongClass : Cool
&lt;&lt;interface&gt;&gt; Class01
Class01 : -privateMethod()
Class01 : +publicMethod()
Class01 : #protectedMethod()
Class01 : -int privateChimp
Class01 : +int publicGorilla
Class01 : #int protectedMarmoset
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('should render multiple class diagrams', () => {
imgSnapshotTest(
[
`
classDiagram-v2
Class01 "1" <|--|> "*" AveryLongClass : Cool
&lt;&lt;interface&gt;&gt; Class01
Class03 "1" *-- "*" Class04
Class05 "1" o-- "many" Class06
Class07 "1" .. "*" Class08
Class09 "1" --> "*" C2 : Where am i?
Class09 "*" --* "*" C3
Class09 "1" --|> "1" Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 "1" <--> "*" C2: Cool label
class Class10 {
&lt;&lt;service&gt;&gt;
int id
test()
}
`,
`
classDiagram-v2
Class01 "1" <|--|> "*" AveryLongClass : Cool
&lt;&lt;interface&gt;&gt; Class01
Class03 "1" *-- "*" Class04
Class05 "1" o-- "many" Class06
Class07 "1" .. "*" Class08
Class09 "1" --> "*" C2 : Where am i?
Class09 "*" --* "*" C3
Class09 "1" --|> "1" Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 "1" <--> "*" C2: Cool label
class Class10 {
&lt;&lt;service&gt;&gt;
int id
test()
}
`,
],
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('4: should render a simple class diagram with comments', () => {
imgSnapshotTest(
`
classDiagram-v2
%% this is a comment
Class01 <|-- AveryLongClass : Cool
&lt;&lt;interface&gt;&gt; Class01
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
class Class10 {
&lt;&lt;service&gt;&gt;
int id
test()
}
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('5: should render a simple class diagram with abstract method', () => {
imgSnapshotTest(
`
classDiagram-v2
Class01 <|-- AveryLongClass : Cool
Class01 : someMethod()*
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('6: should render a simple class diagram with static method', () => {
imgSnapshotTest(
`
classDiagram-v2
Class01 <|-- AveryLongClass : Cool
Class01 : someMethod()$
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('7: should render a simple class diagram with Generic class', () => {
imgSnapshotTest(
`
classDiagram-v2
class Class01~T~
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
class Class10~T~ {
&lt;&lt;service&gt;&gt;
int id
test()
}
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('8: should render a simple class diagram with Generic class and relations', () => {
imgSnapshotTest(
`
classDiagram-v2
Class01~T~ <|-- AveryLongClass : Cool
Class03~T~ *-- Class04~T~
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
class Class10~T~ {
&lt;&lt;service&gt;&gt;
int id
test()
}
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('9: should render a simple class diagram with clickable link', () => {
imgSnapshotTest(
`
classDiagram-v2
Class01~T~ <|-- AveryLongClass : Cool
Class03~T~ *-- Class04~T~
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
class Class10~T~ {
&lt;&lt;service&gt;&gt;
int id
test()
}
link Class01 "google.com" "A Tooltip"
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('10: should render a simple class diagram with clickable callback', () => {
imgSnapshotTest(
`
classDiagram-v2
Class01~T~ <|-- AveryLongClass : Cool
Class03~T~ *-- Class04~T~
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
class Class10~T~ {
&lt;&lt;service&gt;&gt;
int id
test()
}
callback Class01 "functionCall" "A Tooltip"
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('11: should render a simple class diagram with return type on method', () => {
imgSnapshotTest(
`
classDiagram-v2
class Class10~T~ {
int[] id
test(int[] ids) bool
testArray() bool[]
}
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('12: should render a simple class diagram with generic types', () => {
imgSnapshotTest(
`
classDiagram-v2
class Class10~T~ {
int[] id
List~int~ ids
test(List~int~ ids) List~bool~
testArray() bool[]
}
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('13: should render a simple class diagram with css classes applied', () => {
imgSnapshotTest(
`
classDiagram-v2
class Class10 {
int[] id
List~int~ ids
test(List~int~ ids) List~bool~
testArray() bool[]
}
cssClass "Class10" exClass2
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('14: should render a simple class diagram with css classes applied directly', () => {
imgSnapshotTest(
`
classDiagram-v2
class Class10:::exClass2 {
int[] id
List~int~ ids
test(List~int~ ids) List~bool~
testArray() bool[]
}
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
it('15: should render a simple class diagram with css classes applied two multiple classes', () => {
imgSnapshotTest(
`
classDiagram-v2
class Class10
class Class20
cssClass "Class10, class20" exClass2
`,
{logLevel : 1, flowchart: { "htmlLabels": false },}
);
cy.get('svg');
});
});

View File

@@ -0,0 +1,406 @@
/* eslint-env jest */
import { imgSnapshotTest, renderGraph } from '../../helpers/util';
describe('Class diagram', () => {
it('1: should render a simple class diagram', () => {
imgSnapshotTest(
`
classDiagram
Class01 <|-- AveryLongClass : Cool
&lt;&lt;interface&gt;&gt; Class01
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class12 <|.. Class08
Class11 ..>Class12
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class01 : -int privateChimp
Class01 : +int publicGorilla
Class01 : #int protectedMarmoset
Class08 <--> C2: Cool label
class Class10 {
&lt;&lt;service&gt;&gt;
int id
test()
}
`,
{logLevel : 1}
);
cy.get('svg');
});
it('2: should render a simple class diagrams with cardinality', () => {
imgSnapshotTest(
`
classDiagram
Class01 "1" <|--|> "*" AveryLongClass : Cool
&lt;&lt;interface&gt;&gt; Class01
Class03 "1" *-- "*" Class04
Class05 "1" o-- "many" Class06
Class07 "1" .. "*" Class08
Class09 "1" --> "*" C2 : Where am i?
Class09 "*" --* "*" C3
Class09 "1" --|> "1" Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 "1" <--> "*" C2: Cool label
class Class10 {
&lt;&lt;service&gt;&gt;
int id
test()
}
`,
{}
);
cy.get('svg');
});
it('3: should render a simple class diagram with different visibilities', () => {
imgSnapshotTest(
`
classDiagram
Class01 <|-- AveryLongClass : Cool
&lt;&lt;interface&gt;&gt; Class01
Class01 : -privateMethod()
Class01 : +publicMethod()
Class01 : #protectedMethod()
Class01 : -int privateChimp
Class01 : +int publicGorilla
Class01 : #int protectedMarmoset
`,
{}
);
cy.get('svg');
});
it('4: should render a simple class diagram with comments', () => {
imgSnapshotTest(
`
classDiagram
%% this is a comment
Class01 <|-- AveryLongClass : Cool
&lt;&lt;interface&gt;&gt; Class01
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
class Class10 {
&lt;&lt;service&gt;&gt;
int id
test()
}
`,
{}
);
cy.get('svg');
});
it('5: should render a simple class diagram with abstract method', () => {
imgSnapshotTest(
`
classDiagram
Class01 <|-- AveryLongClass : Cool
Class01 : someMethod()*
`,
{}
);
cy.get('svg');
});
it('6: should render a simple class diagram with static method', () => {
imgSnapshotTest(
`
classDiagram
Class01 <|-- AveryLongClass : Cool
Class01 : someMethod()$
`,
{}
);
cy.get('svg');
});
it('7: should render a simple class diagram with Generic class', () => {
imgSnapshotTest(
`
classDiagram
class Class01~T~
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
class Class10~T~ {
&lt;&lt;service&gt;&gt;
int id
test()
}
`,
{}
);
cy.get('svg');
});
it('8: should render a simple class diagram with Generic class and relations', () => {
imgSnapshotTest(
`
classDiagram
Class01~T~ <|-- AveryLongClass : Cool
Class03~T~ *-- Class04~T~
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
class Class10~T~ {
&lt;&lt;service&gt;&gt;
int id
test()
}
`,
{}
);
cy.get('svg');
});
it('9: should render a simple class diagram with clickable link', () => {
imgSnapshotTest(
`
classDiagram
Class01~T~ <|-- AveryLongClass : Cool
Class03~T~ *-- Class04~T~
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
class Class10~T~ {
&lt;&lt;service&gt;&gt;
int id
test()
}
link Class01 "google.com" "A Tooltip"
`,
{}
);
cy.get('svg');
});
it('10: should render a simple class diagram with clickable callback', () => {
imgSnapshotTest(
`
classDiagram
Class01~T~ <|-- AveryLongClass : Cool
Class03~T~ *-- Class04~T~
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
class Class10~T~ {
&lt;&lt;service&gt;&gt;
int id
test()
}
callback Class01 "functionCall" "A Tooltip"
`,
{}
);
cy.get('svg');
});
it('11: should render a simple class diagram with return type on method', () => {
imgSnapshotTest(
`
classDiagram
class Class10~T~ {
int[] id
test(int[] ids) bool
testArray() bool[]
}
`,
{}
);
cy.get('svg');
});
it('12: should render a simple class diagram with generic types', () => {
imgSnapshotTest(
`
classDiagram
class Class10~T~ {
int[] id
List~int~ ids
test(List~int~ ids) List~bool~
testArray() bool[]
}
`,
{}
);
cy.get('svg');
});
it('13: should render a simple class diagram with css classes applied', () => {
imgSnapshotTest(
`
classDiagram
class Class10 {
int[] id
List~int~ ids
test(List~int~ ids) List~bool~
testArray() bool[]
}
cssClass "Class10" exClass
`,
{}
);
cy.get('svg');
});
it('14: should render a simple class diagram with css classes applied directly', () => {
imgSnapshotTest(
`
classDiagram
class Class10:::exClass {
int[] id
List~int~ ids
test(List~int~ ids) List~bool~
testArray() bool[]
}
`,
{}
);
cy.get('svg');
});
it('15: should render a simple class diagram with css classes applied two multiple classes', () => {
imgSnapshotTest(
`
classDiagram
class Class10
class Class20
cssClass "Class10, class20" exClass
`,
{}
);
cy.get('svg');
});
it('16: should render multiple class diagrams', () => {
imgSnapshotTest(
[
`
classDiagram
Class01 "1" <|--|> "*" AveryLongClass : Cool
&lt;&lt;interface&gt;&gt; Class01
Class03 "1" *-- "*" Class04
Class05 "1" o-- "many" Class06
Class07 "1" .. "*" Class08
Class09 "1" --> "*" C2 : Where am i?
Class09 "*" --* "*" C3
Class09 "1" --|> "1" Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 "1" <--> "*" C2: Cool label
class Class10 {
&lt;&lt;service&gt;&gt;
int id
test()
}
`,
`
classDiagram
Class01 "1" <|--|> "*" AveryLongClass : Cool
&lt;&lt;interface&gt;&gt; Class01
Class03 "1" *-- "*" Class04
Class05 "1" o-- "many" Class06
Class07 "1" .. "*" Class08
Class09 "1" --> "*" C2 : Where am i?
Class09 "*" --* "*" C3
Class09 "1" --|> "1" Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 "1" <--> "*" C2: Cool label
class Class10 {
&lt;&lt;service&gt;&gt;
int id
test()
}
`,
],
{}
);
cy.get('svg');
});
it('17: should render a class diagram when useMaxWidth is true (default)', () => {
renderGraph(
`
classDiagram
Class01 <|-- AveryLongClass : Cool
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class01 : -int privateChimp
Class01 : +int publicGorilla
Class01 : #int protectedMarmoset
`,
{ class: { useMaxWidth: true } }
);
cy.get('svg')
.should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height', '218');
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseInt(style.match(/[\d.]+/g).join(''));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(maxWidthValue).to.be.within(160 * .95, 160 * 1.05);
});
});
it('18: should render a class diagram when useMaxWidth is false', () => {
renderGraph(
`
classDiagram
Class01 <|-- AveryLongClass : Cool
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class01 : -int privateChimp
Class01 : +int publicGorilla
Class01 : #int protectedMarmoset
`,
{ class: { useMaxWidth: false } }
);
cy.get('svg')
.should((svg) => {
const width = parseFloat(svg.attr('width'));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(width).to.be.within(160 * .95, 160 * 1.05);
expect(svg).to.have.attr('height', '218');
expect(svg).to.not.have.attr('style');
});
});
});

View File

@@ -0,0 +1,141 @@
/* eslint-env jest */
import { imgSnapshotTest } from '../../helpers/util.js';
describe('Configuration and directives - nodes should be light blue', () => {
it('No config - use default', () => {
imgSnapshotTest(
`
graph TD
A(Default) --> B[/Another/]
A --> C[End]
subgraph section
B
C
end
`,
{}
);
cy.get('svg');
});
it('Settigns from intitialize - nodes should be green', () => {
imgSnapshotTest(
`
graph TD
A(Forest) --> B[/Another/]
A --> C[End]
subgraph section
B
C
end `,
{theme:'forest'}
);
cy.get('svg');
});
it('Settings from initialize overriding themeVariable - nodes shold be red', () => {
imgSnapshotTest(
`
%%{init: { 'theme': 'base', 'themeVariables':{ 'primaryColor': '#ff0000'}}}%%
graph TD
A(Start) --> B[/Another/]
A[/Another/] --> C[End]
subgraph section
B
C
end
`,
{theme:'base', themeVariables:{ primaryColor: '#ff0000'}, logLevel: 0}
);
cy.get('svg');
});
it('Settings from directive - nodes should be grey', () => {
imgSnapshotTest(
`
%%{init: { 'logLevel': 0, 'theme': 'neutral'} }%%
graph TD
A(Start) --> B[/Another/]
A[/Another/] --> C[End]
subgraph section
B
C
end
`,
{}
);
cy.get('svg');
});
it('Settings from directive overriding theme variable - nodes should be red', () => {
imgSnapshotTest(
`
%%{init: {'theme': 'base', 'themeVariables':{ 'primaryColor': '#ff0000'}}}%%
graph TD
A(Start) --> B[/Another/]
A[/Another/] --> C[End]
subgraph section
B
C
end
`,
{}
);
cy.get('svg');
});
it('Settings from initialize and directive - nodes should be grey', () => {
imgSnapshotTest(
`
%%{init: { 'logLevel': 0, 'theme': 'neutral'} }%%
graph TD
A(Start) --> B[/Another/]
A[/Another/] --> C[End]
subgraph section
B
C
end
`,
{theme:'forest'}
);
cy.get('svg');
});
it('Theme from initialize, directive overriding theme variable - nodes should be red', () => {
imgSnapshotTest(
`
%%{init: {'theme': 'base', 'themeVariables':{ 'primaryColor': '#ff0000'}}}%%
graph TD
A(Start) --> B[/Another/]
A[/Another/] --> C[End]
subgraph section
B
C
end
`,
{theme:'base'}
);
cy.get('svg');
});
it('Theme variable from initialize, theme from directive - nodes should be red', () => {
imgSnapshotTest(
`
%%{init: { 'logLevel': 0, 'theme': 'base'} }%%
graph TD
A(Start) --> B[/Another/]
A[/Another/] --> C[End]
subgraph section
B
C
end
`,
{themeVariables:{primaryColor: '#ff0000'}}
);
cy.get('svg');
});
describe('when rendering several diagrams', () => {
it('diagrams should not taint later diagrams', () => {
const url = 'http://localhost:9000/theme-directives.html';
cy.visit(url);
cy.get('svg');
cy.percySnapshot();
});
});
});

View File

@@ -0,0 +1,21 @@
/* eslint-env jest */
import { imgSnapshotTest } from '../../helpers/util';
describe('State diagram', () => {
it('should render a state with states in it', () => {
imgSnapshotTest(
`
stateDiagram
state PersonalizedCockpit {
Other
state Parent {
C
}
}
`,
{
logLevel: 0,
}
);
});
});

View File

@@ -0,0 +1,14 @@
/* eslint-env jest */
import { imgSnapshotTest } from '../../helpers/util';
describe('Flowchart', () => {
it('34: testing the label width in percy', () => {
imgSnapshotTest(
`graph TD
A[Christmas]
`,
{ theme: 'forest' , fontFamily: '"Noto Sans SC", sans-serif' }
);
});
});

View File

@@ -0,0 +1,189 @@
/* eslint-env jest */
import { imgSnapshotTest, renderGraph } from '../../helpers/util';
describe('Entity Relationship Diagram', () => {
it('should render a simple ER diagram', () => {
imgSnapshotTest(
`
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`,
{logLevel : 1}
);
cy.get('svg');
});
it('should render an ER diagram with a recursive relationship', () => {
imgSnapshotTest(
`
erDiagram
CUSTOMER ||..o{ CUSTOMER : refers
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`,
{logLevel : 1}
);
cy.get('svg');
});
it('should render an ER diagram with multiple relationships between the same two entities', () => {
imgSnapshotTest(
`
erDiagram
CUSTOMER ||--|{ ADDRESS : "invoiced at"
CUSTOMER ||--|{ ADDRESS : "receives goods at"
`,
{logLevel : 1}
);
cy.get('svg');
});
it('should render a cyclical ER diagram', () => {
imgSnapshotTest(
`
erDiagram
A ||--|{ B : likes
B ||--|{ C : likes
C ||--|{ A : likes
`,
{logLevel : 1}
);
cy.get('svg');
});
it('should render a not-so-simple ER diagram', () => {
imgSnapshotTest(
`
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
`,
{logLevel : 1}
);
cy.get('svg');
});
it('should render multiple ER diagrams', () => {
imgSnapshotTest(
[
`
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`,
`
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`
],
{logLevel : 1}
);
cy.get('svg');
});
it('should render an ER diagram with blank or empty labels', () => {
imgSnapshotTest(
`
erDiagram
BOOK }|..|{ AUTHOR : ""
BOOK }|..|{ GENRE : " "
AUTHOR }|..|{ GENRE : " "
`,
{logLevel : 1}
);
cy.get('svg');
});
it('should render an ER diagrams when useMaxWidth is true (default)', () => {
renderGraph(
`
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`,
{ er: { useMaxWidth: true } }
);
cy.get('svg')
.should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height', '465');
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(maxWidthValue).to.be.within(140 * .95, 140 * 1.05);
});
});
it('should render an ER when useMaxWidth is false', () => {
renderGraph(
`
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`,
{ er: { useMaxWidth: false } }
);
cy.get('svg')
.should((svg) => {
const width = parseFloat(svg.attr('width'));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(width).to.be.within(140 * .95, 140 * 1.05);
expect(svg).to.have.attr('height', '465');
expect(svg).to.not.have.attr('style');
});
});
it('should render entities that have no relationships', () => {
renderGraph(
`
erDiagram
DEAD_PARROT
HERMIT
RECLUSE
SOCIALITE }o--o{ SOCIALITE : "interacts with"
RECLUSE }o--o{ SOCIALITE : avoids
`,
{ er: { useMaxWidth: false } }
);
cy.get('svg');
});
it('should render entities with and without attributes', () => {
renderGraph(
`
erDiagram
BOOK { string title }
AUTHOR }|..|{ BOOK : writes
BOOK { float price }
`,
{ logLevel : 1 }
);
cy.get('svg');
});
it('should render entities and attributes with big and small entity names', () => {
renderGraph(
`
erDiagram
PRIVATE_FINANCIAL_INSTITUTION {
string name
int turnover
}
PRIVATE_FINANCIAL_INSTITUTION ||..|{ EMPLOYEE : employs
EMPLOYEE { bool officer_of_firm }
`,
{ logLevel : 1 }
);
cy.get('svg');
});
});

View File

@@ -0,0 +1,408 @@
/* eslint-env jest */
import { imgSnapshotTest, renderGraph } from '../../helpers/util';
describe('Flowchart v2', () => {
it('1: should render a simple flowchart', () => {
imgSnapshotTest(
`flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{}
);
});
it('2: should render a simple flowchart with diagramPadding set to 0', () => {
imgSnapshotTest(
`flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
%% this is a comment
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{ flowchart: { diagramPadding: 0 } }
);
});
it('3: a link with correct arrowhead to a subgraph', () => {
imgSnapshotTest(
`flowchart TD
P1
P1 -->P1.5
subgraph P1.5
P2
P2.5(( A ))
P3
end
P2 --> P4
P3 --> P6
P1.5 --> P5
`,
{ flowchart: { diagramPadding: 0 } }
);
});
it('4: Length of edges', () => {
imgSnapshotTest(
`flowchart TD
L1 --- L2
L2 --- C
M1 ---> C
R1 .-> R2
R2 <.-> C
C -->|Label 1| E1
C <-- Label 2 ---> E2
C ----> E3
C <-...-> E4
C ======> E5
`,
{ flowchart: { diagramPadding: 0 } }
);
});
it('5: should render escaped without html labels', () => {
imgSnapshotTest(
`flowchart TD
a["<strong>Haiya</strong>"]---->b
`,
{htmlLabels: false, flowchart: {htmlLabels: false}}
);
});
it('6: should render non-escaped with html labels', () => {
imgSnapshotTest(
`flowchart TD
a["<strong>Haiya</strong>"]===>b
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('7: should render a flowchart when useMaxWidth is true (default)', () => {
renderGraph(
`flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{ flowchart: { useMaxWidth: true } }
);
cy.get('svg')
.should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
// use within because the absolute value can be slightly different depending on the environment ±5%
const height = parseFloat(svg.attr('height'));
expect(height).to.be.within(446 * .95, 446 * 1.05);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
expect(maxWidthValue).to.be.within(300 * .95-1, 300 * 1.05);
});
});
it('8: should render a flowchart when useMaxWidth is false', () => {
renderGraph(
`flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{ flowchart: { useMaxWidth: false } }
);
cy.get('svg')
.should((svg) => {
const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(height).to.be.within(446 * .95, 446 * 1.05);
expect(width).to.be.within(300 * .95-1, 300 * 1.05);
expect(svg).to.not.have.attr('style');
});
});
it('V2 - 16: Render Stadium shape', () => {
imgSnapshotTest(
` flowchart TD
A([stadium shape test])
A -->|Get money| B([Go shopping])
B --> C([Let me think...<br />Do I want something for work,<br />something to spend every free second with,<br />or something to get around?])
C -->|One| D([Laptop])
C -->|Two| E([iPhone])
C -->|Three| F([Car<br/>wroom wroom])
click A "index.html#link-clicked" "link test"
click B testClick "click test"
classDef someclass fill:#f96;
class A someclass;
class C someclass;
`,
{ flowchart: { htmlLabels: false } , fontFamily: 'courier'}
);
});
it('50: handle nested subgraphs in reverse order', () => {
imgSnapshotTest(
`flowchart LR
a -->b
subgraph A
B
end
subgraph B
b
end
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('51: handle nested subgraphs in reverse order', () => {
imgSnapshotTest(
`flowchart LR
a -->b
subgraph A
B
end
subgraph B
b
end
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('52: handle nested subgraphs in several levels', () => {
imgSnapshotTest(
`flowchart TB
b-->B
a-->c
subgraph O
A
end
subgraph B
c
end
subgraph A
a
b
B
end
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('53: handle nested subgraphs with edges in and out', () => {
imgSnapshotTest(
`flowchart TB
internet
nat
routeur
lb1
lb2
compute1
compute2
subgraph project
routeur
nat
subgraph subnet1
compute1
lb1
end
subgraph subnet2
compute2
lb2
end
end
internet --> routeur
routeur --> subnet1 & subnet2
subnet1 & subnet2 --> nat --> internet
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('54: handle nested subgraphs with outgoing links', () => {
imgSnapshotTest(
`flowchart TD
subgraph main
subgraph subcontainer
subcontainer-child
end
subcontainer-child--> subcontainer-sibling
end
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('55: handle nested subgraphs with outgoing links 2', () => {
imgSnapshotTest(
`flowchart TD
subgraph one[One]
subgraph sub_one[Sub One]
_sub_one
end
subgraph sub_two[Sub Two]
_sub_two
end
_one
end
%% here, either the first or the second one
sub_one --> sub_two
_one --> b
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('56: handle nested subgraphs with outgoing links 3', () => {
imgSnapshotTest(
`flowchart TB
subgraph container_Beta
process_C-->Process_D
end
subgraph container_Alpha
process_A-->process_B
process_A-->|messages|process_C
end
process_B-->|via_AWSBatch|container_Beta
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('57: handle nested subgraphs with outgoing links 4', () => {
imgSnapshotTest(
`flowchart LR
subgraph A
a -->b
end
subgraph B
b
end
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('57: handle nested subgraphs with outgoing links 2', () => {
imgSnapshotTest(
`flowchart TB
c1-->a2
subgraph one
a1-->a2
end
subgraph two
b1-->b2
end
subgraph three
c1-->c2
end
one --> two
three --> two
two --> c2
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('57.x: handle nested subgraphs with outgoing links 5', () => {
imgSnapshotTest(
`%% this does not produce the desired result
flowchart TB
subgraph container_Beta
process_C-->Process_D
end
subgraph container_Alpha
process_A-->process_B
process_B-->|via_AWSBatch|container_Beta
process_A-->|messages|process_C
end
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('58: handle styling with style expressions', () => {
imgSnapshotTest(
`
flowchart LR
id1(Start)-->id2(Stop)
style id1 fill:#f9f,stroke:#333,stroke-width:4px
style id2 fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('59: handle styling of subgraphs and links', () => {
imgSnapshotTest(
`
flowchart TD
A[Christmas] ==> D
A[Christmas] -->|Get money| B(Go shopping)
A[Christmas] ==> C
subgraph T ["Test"]
A
B
C
end
classDef Test fill:#F84E68,stroke:#333,color:white;
class A,T Test
classDef TestSub fill:green;
class T TestSub
linkStyle 0,1 color:orange, stroke: orange;
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('61: fontawesome icons in edge labels', () => {
imgSnapshotTest(
`
flowchart TD
C -->|fa:fa-car Car| F[fa:fa-car Car]
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('62: should render styled subgraphs', () => {
imgSnapshotTest(
`
flowchart TB
A
B
subgraph foo[Foo SubGraph]
C
D
end
subgraph bar[Bar SubGraph]
E
F
end
G
A-->B
B-->C
C-->D
B-->D
D-->E
E-->A
E-->F
F-->D
F-->G
B-->G
G-->D
style foo fill:#F99,stroke-width:2px,stroke:#F0F,color:darkred
style bar fill:#999,stroke-width:10px,stroke:#0F0,color:blue
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
});

View File

@@ -0,0 +1,800 @@
/* eslint-env jest */
import { imgSnapshotTest, renderGraph } from '../../helpers/util';
describe('Flowchart', () => {
it('1: should render a simple flowchart no htmlLabels', () => {
imgSnapshotTest(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{ flowchart: { htmlLabels: false }, fontFamily: 'courier' }
);
});
it('2: should render a simple flowchart with htmlLabels', () => {
imgSnapshotTest(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{ flowchart: { htmlLabels: true }, fontFamily: 'courier' }
);
});
it('3: should render a simple flowchart with line breaks', () => {
imgSnapshotTest(
`
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me thinksssss<br/>ssssssssssssssssssssss<br/>sssssssssssssssssssssssssss}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[Car]
`,
{fontFamily: 'courier'}
);
});
it('4: should render a simple flowchart with trapezoid and inverse trapezoid vertex options.', () => {
imgSnapshotTest(
`
graph TD
A[/Christmas\\]
A -->|Get money| B[\\Go shopping/]
B --> C{Let me thinksssss<br/>ssssssssssssssssssssss<br/>sssssssssssssssssssssssssss}
C -->|One| D[/Laptop/]
C -->|Two| E[\\iPhone\\]
C -->|Three| F[Car]
`,
{ fontFamily: 'courier'}
);
});
it('5: should style nodes via a class.', () => {
imgSnapshotTest(
`
graph TD
1A --> 1B
1B --> 1C
1C --> D
1C --> E
classDef processHead fill:#888888,color:white,font-weight:bold,stroke-width:3px,stroke:#001f3f
class 1A,1B,D,E processHead
`,
{fontFamily: 'courier'}
);
});
it('6: should render a flowchart full of circles', () => {
imgSnapshotTest(
`
graph LR
47(SAM.CommonFA.FMESummary)-->48(SAM.CommonFA.CommonFAFinanceBudget)
37(SAM.CommonFA.BudgetSubserviceLineVolume)-->48(SAM.CommonFA.CommonFAFinanceBudget)
35(SAM.CommonFA.PopulationFME)-->47(SAM.CommonFA.FMESummary)
41(SAM.CommonFA.MetricCost)-->47(SAM.CommonFA.FMESummary)
44(SAM.CommonFA.MetricOutliers)-->47(SAM.CommonFA.FMESummary)
46(SAM.CommonFA.MetricOpportunity)-->47(SAM.CommonFA.FMESummary)
40(SAM.CommonFA.OPVisits)-->47(SAM.CommonFA.FMESummary)
38(SAM.CommonFA.CommonFAFinanceRefund)-->47(SAM.CommonFA.FMESummary)
43(SAM.CommonFA.CommonFAFinancePicuDays)-->47(SAM.CommonFA.FMESummary)
42(SAM.CommonFA.CommonFAFinanceNurseryDays)-->47(SAM.CommonFA.FMESummary)
45(SAM.CommonFA.MetricPreOpportunity)-->46(SAM.CommonFA.MetricOpportunity)
35(SAM.CommonFA.PopulationFME)-->45(SAM.CommonFA.MetricPreOpportunity)
41(SAM.CommonFA.MetricCost)-->45(SAM.CommonFA.MetricPreOpportunity)
41(SAM.CommonFA.MetricCost)-->44(SAM.CommonFA.MetricOutliers)
39(SAM.CommonFA.ChargeDetails)-->43(SAM.CommonFA.CommonFAFinancePicuDays)
39(SAM.CommonFA.ChargeDetails)-->42(SAM.CommonFA.CommonFAFinanceNurseryDays)
39(SAM.CommonFA.ChargeDetails)-->41(SAM.CommonFA.MetricCost)
39(SAM.CommonFA.ChargeDetails)-->40(SAM.CommonFA.OPVisits)
35(SAM.CommonFA.PopulationFME)-->39(SAM.CommonFA.ChargeDetails)
36(SAM.CommonFA.PremetricCost)-->39(SAM.CommonFA.ChargeDetails)
`,
{ fontFamily: 'courier' }
);
});
it('7: should render a flowchart full of icons', () => {
imgSnapshotTest(
`
graph TD
9e122290_1ec3_e711_8c5a_005056ad0002("fa:fa-creative-commons My System | Test Environment")
82072290_1ec3_e711_8c5a_005056ad0002("fa:fa-cogs Shared Business Logic Server:Service 1")
db052290_1ec3_e711_8c5a_005056ad0002("fa:fa-cogs Shared Business Logic Server:Service 2")
4e112290_1ec3_e711_8c5a_005056ad0002("fa:fa-cogs Shared Report Server:Service 1")
30122290_1ec3_e711_8c5a_005056ad0002("fa:fa-cogs Shared Report Server:Service 2")
5e112290_1ec3_e711_8c5a_005056ad0002("fa:fa-cogs Dedicated Test Business Logic Server:Service 1")
c1112290_1ec3_e711_8c5a_005056ad0002("fa:fa-cogs Dedicated Test Business Logic Server:Service 2")
b7042290_1ec3_e711_8c5a_005056ad0002("fa:fa-circle [DBServer\\SharedDbInstance].[SupportDb]")
8f102290_1ec3_e711_8c5a_005056ad0002("fa:fa-circle [DBServer\\SharedDbInstance].[DevelopmentDb]")
0e102290_1ec3_e711_8c5a_005056ad0002("fa:fa-circle [DBServer\\SharedDbInstance].[TestDb]")
07132290_1ec3_e711_8c5a_005056ad0002("fa:fa-circle [DBServer\\SharedDbInstance].[SharedReportingDb]")
c7072290_1ec3_e711_8c5a_005056ad0002("fa:fa-server Shared Business Logic Server")
ca122290_1ec3_e711_8c5a_005056ad0002("fa:fa-server Shared Report Server")
68102290_1ec3_e711_8c5a_005056ad0002("fa:fa-server Dedicated Test Business Logic Server")
f4112290_1ec3_e711_8c5a_005056ad0002("fa:fa-database [DBServer\\SharedDbInstance]")
d6072290_1ec3_e711_8c5a_005056ad0002("fa:fa-server DBServer")
71082290_1ec3_e711_8c5a_005056ad0002("fa:fa-cogs DBServer\\:MSSQLSERVER")
c0102290_1ec3_e711_8c5a_005056ad0002("fa:fa-cogs DBServer\\:SQLAgent")
9a072290_1ec3_e711_8c5a_005056ad0002("fa:fa-cogs DBServer\\:SQLBrowser")
1d0a2290_1ec3_e711_8c5a_005056ad0002("fa:fa-server VmHost1")
200a2290_1ec3_e711_8c5a_005056ad0002("fa:fa-server VmHost2")
1c0a2290_1ec3_e711_8c5a_005056ad0002("fa:fa-server VmHost3")
9e122290_1ec3_e711_8c5a_005056ad0002-->82072290_1ec3_e711_8c5a_005056ad0002
9e122290_1ec3_e711_8c5a_005056ad0002-->db052290_1ec3_e711_8c5a_005056ad0002
9e122290_1ec3_e711_8c5a_005056ad0002-->4e112290_1ec3_e711_8c5a_005056ad0002
9e122290_1ec3_e711_8c5a_005056ad0002-->30122290_1ec3_e711_8c5a_005056ad0002
9e122290_1ec3_e711_8c5a_005056ad0002-->5e112290_1ec3_e711_8c5a_005056ad0002
9e122290_1ec3_e711_8c5a_005056ad0002-->c1112290_1ec3_e711_8c5a_005056ad0002
82072290_1ec3_e711_8c5a_005056ad0002-->b7042290_1ec3_e711_8c5a_005056ad0002
82072290_1ec3_e711_8c5a_005056ad0002-->8f102290_1ec3_e711_8c5a_005056ad0002
82072290_1ec3_e711_8c5a_005056ad0002-->0e102290_1ec3_e711_8c5a_005056ad0002
82072290_1ec3_e711_8c5a_005056ad0002-->c7072290_1ec3_e711_8c5a_005056ad0002
db052290_1ec3_e711_8c5a_005056ad0002-->c7072290_1ec3_e711_8c5a_005056ad0002
db052290_1ec3_e711_8c5a_005056ad0002-->82072290_1ec3_e711_8c5a_005056ad0002
4e112290_1ec3_e711_8c5a_005056ad0002-->b7042290_1ec3_e711_8c5a_005056ad0002
4e112290_1ec3_e711_8c5a_005056ad0002-->8f102290_1ec3_e711_8c5a_005056ad0002
4e112290_1ec3_e711_8c5a_005056ad0002-->0e102290_1ec3_e711_8c5a_005056ad0002
4e112290_1ec3_e711_8c5a_005056ad0002-->07132290_1ec3_e711_8c5a_005056ad0002
4e112290_1ec3_e711_8c5a_005056ad0002-->ca122290_1ec3_e711_8c5a_005056ad0002
30122290_1ec3_e711_8c5a_005056ad0002-->ca122290_1ec3_e711_8c5a_005056ad0002
30122290_1ec3_e711_8c5a_005056ad0002-->4e112290_1ec3_e711_8c5a_005056ad0002
5e112290_1ec3_e711_8c5a_005056ad0002-->8f102290_1ec3_e711_8c5a_005056ad0002
5e112290_1ec3_e711_8c5a_005056ad0002-->68102290_1ec3_e711_8c5a_005056ad0002
c1112290_1ec3_e711_8c5a_005056ad0002-->68102290_1ec3_e711_8c5a_005056ad0002
c1112290_1ec3_e711_8c5a_005056ad0002-->5e112290_1ec3_e711_8c5a_005056ad0002
b7042290_1ec3_e711_8c5a_005056ad0002-->f4112290_1ec3_e711_8c5a_005056ad0002
8f102290_1ec3_e711_8c5a_005056ad0002-->f4112290_1ec3_e711_8c5a_005056ad0002
0e102290_1ec3_e711_8c5a_005056ad0002-->f4112290_1ec3_e711_8c5a_005056ad0002
07132290_1ec3_e711_8c5a_005056ad0002-->f4112290_1ec3_e711_8c5a_005056ad0002
c7072290_1ec3_e711_8c5a_005056ad0002-->1d0a2290_1ec3_e711_8c5a_005056ad0002
ca122290_1ec3_e711_8c5a_005056ad0002-->200a2290_1ec3_e711_8c5a_005056ad0002
68102290_1ec3_e711_8c5a_005056ad0002-->1c0a2290_1ec3_e711_8c5a_005056ad0002
f4112290_1ec3_e711_8c5a_005056ad0002-->d6072290_1ec3_e711_8c5a_005056ad0002
f4112290_1ec3_e711_8c5a_005056ad0002-->71082290_1ec3_e711_8c5a_005056ad0002
f4112290_1ec3_e711_8c5a_005056ad0002-->c0102290_1ec3_e711_8c5a_005056ad0002
f4112290_1ec3_e711_8c5a_005056ad0002-->9a072290_1ec3_e711_8c5a_005056ad0002
d6072290_1ec3_e711_8c5a_005056ad0002-->1c0a2290_1ec3_e711_8c5a_005056ad0002
71082290_1ec3_e711_8c5a_005056ad0002-->d6072290_1ec3_e711_8c5a_005056ad0002
c0102290_1ec3_e711_8c5a_005056ad0002-->d6072290_1ec3_e711_8c5a_005056ad0002
c0102290_1ec3_e711_8c5a_005056ad0002-->71082290_1ec3_e711_8c5a_005056ad0002
9a072290_1ec3_e711_8c5a_005056ad0002-->d6072290_1ec3_e711_8c5a_005056ad0002
9a072290_1ec3_e711_8c5a_005056ad0002-->71082290_1ec3_e711_8c5a_005056ad0002
`,
{ fontFamily: 'courier' }
);
});
it('8: should render labels with numbers at the start', () => {
imgSnapshotTest(
`
graph TB;subgraph "number as labels";1;end;
`,
{ fontFamily: 'courier' }
);
});
it('9: should render subgraphs', () => {
imgSnapshotTest(
`
graph TB
subgraph One
a1-->a2
end
`,
{ fontFamily: 'courier' }
);
});
it('10: should render subgraphs with a title starting with a digit', () => {
imgSnapshotTest(
`
graph TB
subgraph 2Two
a1-->a2
end
`,
{ fontFamily: 'courier' }
);
});
it('11: should render styled subgraphs', () => {
imgSnapshotTest(
`
graph TB
A
B
subgraph foo[Foo SubGraph]
C
D
end
subgraph bar[Bar SubGraph]
E
F
end
G
A-->B
B-->C
C-->D
B-->D
D-->E
E-->A
E-->F
F-->D
F-->G
B-->G
G-->D
style foo fill:#F99,stroke-width:2px,stroke:#F0F,color:darkred
style bar fill:#999,stroke-width:10px,stroke:#0F0,color:blue
`,
{ fontFamily: 'courier' }
);
});
it('12: should render a flowchart with long names and class definitions', () => {
imgSnapshotTest(
`graph LR
sid-B3655226-6C29-4D00-B685-3D5C734DC7E1["
提交申请
熊大
"];
class sid-B3655226-6C29-4D00-B685-3D5C734DC7E1 node-executed;
sid-4DA958A0-26D9-4D47-93A7-70F39FD7D51A["
负责人审批
强子
"];
class sid-4DA958A0-26D9-4D47-93A7-70F39FD7D51A node-executed;
sid-E27C0367-E6D6-497F-9736-3CDC21FDE221["
DBA审批
强子
"];
class sid-E27C0367-E6D6-497F-9736-3CDC21FDE221 node-executed;
sid-BED98281-9585-4D1B-934E-BD1AC6AC0EFD["
SA审批
阿美
"];
class sid-BED98281-9585-4D1B-934E-BD1AC6AC0EFD node-executed;
sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7["
主管审批
光头强
"];
class sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7 node-executed;
sid-A1B3CD96-7697-4D7C-BEAA-73D187B1BE89["
DBA确认
强子
"];
class sid-A1B3CD96-7697-4D7C-BEAA-73D187B1BE89 node-executed;
sid-3E35A7FF-A2F4-4E07-9247-DBF884C81937["
SA确认
阿美
"];
class sid-3E35A7FF-A2F4-4E07-9247-DBF884C81937 node-executed;
sid-4FC27B48-A6F9-460A-A675-021F5854FE22["
结束
"];
class sid-4FC27B48-A6F9-460A-A675-021F5854FE22 node-executed;
sid-19DD9E9F-98C1-44EE-B604-842AFEE76F1E["
SA执行1
强子
"];
class sid-19DD9E9F-98C1-44EE-B604-842AFEE76F1E node-executed;
sid-6C2120F3-D940-4958-A067-0903DCE879C4["
SA执行2
强子
"];
class sid-6C2120F3-D940-4958-A067-0903DCE879C4 node-executed;
sid-9180E2A0-5C4B-435F-B42F-0D152470A338["
DBA执行1
强子
"];
class sid-9180E2A0-5C4B-435F-B42F-0D152470A338 node-executed;
sid-03A2C3AC-5337-48A5-B154-BB3FD0EC8DAD["
DBA执行3
强子
"];
class sid-03A2C3AC-5337-48A5-B154-BB3FD0EC8DAD node-executed;
sid-D5E1F2F4-306C-47A2-BF74-F66E3D769756["
DBA执行2
强子
"];
class sid-D5E1F2F4-306C-47A2-BF74-F66E3D769756 node-executed;
sid-8C3F2F1D-F014-4F99-B966-095DC1A2BD93["
DBA执行4
强子
"];
class sid-8C3F2F1D-F014-4F99-B966-095DC1A2BD93 node-executed;
sid-1897B30A-9C5C-4D5B-B80B-76A038785070["
负责人确认
梁静茹
"];
class sid-1897B30A-9C5C-4D5B-B80B-76A038785070 node-executed;
sid-B3655226-6C29-4D00-B685-3D5C734DC7E1-->sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7;
sid-4DA958A0-26D9-4D47-93A7-70F39FD7D51A-->sid-1897B30A-9C5C-4D5B-B80B-76A038785070;
sid-E27C0367-E6D6-497F-9736-3CDC21FDE221-->sid-A1B3CD96-7697-4D7C-BEAA-73D187B1BE89;
sid-BED98281-9585-4D1B-934E-BD1AC6AC0EFD-->sid-3E35A7FF-A2F4-4E07-9247-DBF884C81937;
sid-19DD9E9F-98C1-44EE-B604-842AFEE76F1E-->sid-6C2120F3-D940-4958-A067-0903DCE879C4;
sid-9180E2A0-5C4B-435F-B42F-0D152470A338-->sid-D5E1F2F4-306C-47A2-BF74-F66E3D769756;
sid-03A2C3AC-5337-48A5-B154-BB3FD0EC8DAD-->sid-8C3F2F1D-F014-4F99-B966-095DC1A2BD93;
sid-6C2120F3-D940-4958-A067-0903DCE879C4-->sid-4DA958A0-26D9-4D47-93A7-70F39FD7D51A;
sid-1897B30A-9C5C-4D5B-B80B-76A038785070-->sid-4FC27B48-A6F9-460A-A675-021F5854FE22;
sid-3E35A7FF-A2F4-4E07-9247-DBF884C81937-->sid-19DD9E9F-98C1-44EE-B604-842AFEE76F1E;
sid-A1B3CD96-7697-4D7C-BEAA-73D187B1BE89-->sid-9180E2A0-5C4B-435F-B42F-0D152470A338;
sid-A1B3CD96-7697-4D7C-BEAA-73D187B1BE89-->sid-03A2C3AC-5337-48A5-B154-BB3FD0EC8DAD;
sid-D5E1F2F4-306C-47A2-BF74-F66E3D769756-->sid-4DA958A0-26D9-4D47-93A7-70F39FD7D51A;
sid-8C3F2F1D-F014-4F99-B966-095DC1A2BD93-->sid-4DA958A0-26D9-4D47-93A7-70F39FD7D51A;
sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7-->sid-BED98281-9585-4D1B-934E-BD1AC6AC0EFD;
sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7-->sid-E27C0367-E6D6-497F-9736-3CDC21FDE221;
sid-3E35A7FF-A2F4-4E07-9247-DBF884C81937-->sid-6C2120F3-D940-4958-A067-0903DCE879C4;
sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7-->sid-4DA958A0-26D9-4D47-93A7-70F39FD7D51A;
sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7-->sid-4FC27B48-A6F9-460A-A675-021F5854FE22;
`,
{ fontFamily: 'courier' }
);
});
it('13: should render color of styled nodes', () => {
imgSnapshotTest(
`
graph LR
foo-->bar
classDef foo fill:lightblue,color:green,stroke:#FF9E2C,font-weight:bold
style foo fill:#F99,stroke-width:2px,stroke:#F0F
style bar fill:#999,color: #00ff00, stroke-width:10px,stroke:#0F0
`,
{
listUrl: false,
listId: 'color styling',
fontFamily: 'courier',
logLevel: 0
}
);
});
it('14: should render hexagons', () => {
imgSnapshotTest(
`
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{{Let me think...<br />Do I want something for work,<br />something to spend every free second with,<br />or something to get around?}}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[Car]
click A "index.html#link-clicked" "link test"
click B testClick "click test"
classDef someclass fill:#f96;
class A someclass;
class C someclass;
`,
{
listUrl: false,
listId: 'color styling', fontFamily: 'courier',
logLevel: 0
}
);
});
it('15: should render a simple flowchart with comments', () => {
imgSnapshotTest(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
%% this is a comment
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{ flowchart: { htmlLabels: false } , fontFamily: 'courier'}
);
});
it('16: Render Stadium shape', () => {
imgSnapshotTest(
` graph TD
A([stadium shape test])
A -->|Get money| B([Go shopping])
B --> C([Let me think...<br />Do I want something for work,<br />something to spend every free second with,<br />or something to get around?])
C -->|One| D([Laptop])
C -->|Two| E([iPhone])
C -->|Three| F([Car<br/>wroom wroom])
click A "index.html#link-clicked" "link test"
click B testClick "click test"
classDef someclass fill:#f96;
class A someclass;
class C someclass;
`,
{ flowchart: { htmlLabels: false } , fontFamily: 'courier'}
);
});
it('17: Render multiline texts', () => {
imgSnapshotTest(
`graph LR
A1[Multi<br>Line] -->|Multi<br>Line| B1(Multi<br>Line)
C1[Multi<br/>Line] -->|Multi<br/>Line| D1(Multi<br/>Line)
E1[Multi<br />Line] -->|Multi<br />Line| F1(Multi<br />Line)
A2[Multi<br>Line] -->|Multi<br>Line| B2(Multi<br>Line)
C2[Multi<br/>Line] -->|Multi<br/>Line| D2(Multi<br/>Line)
E2[Multi<br />Line] -->|Multi<br />Line| F2(Multi<br />Line)
linkStyle 0 stroke:DarkGray,stroke-width:2px
linkStyle 1 stroke:DarkGray,stroke-width:2px
linkStyle 2 stroke:DarkGray,stroke-width:2px
`,
{ flowchart: { htmlLabels: false } , fontFamily: 'courier'}
);
});
it('18: Chaining of nodes', () => {
imgSnapshotTest(
`graph LR
a --> b --> c
`,
{ flowchart: { htmlLabels: false } , fontFamily: 'courier'}
);
});
it('19: Multiple nodes and chaining in one statement', () => {
imgSnapshotTest(
`graph LR
a --> b & c--> d
`,
{ flowchart: { htmlLabels: false } , fontFamily: 'courier'}
);
});
it('20: Multiple nodes and chaining in one statement', () => {
imgSnapshotTest(
`graph TD
A[ h ] -- hello --> B[" test "]:::exClass & C --> D;
classDef exClass background:#bbb,border:1px solid red;
`,
{ flowchart: { htmlLabels: false } , fontFamily: 'courier'}
);
});
it('21: Render cylindrical shape', () => {
imgSnapshotTest(
`graph LR
A[(cylindrical<br />shape<br />test)]
A -->|Get money| B1[(Go shopping 1)]
A -->|Get money| B2[(Go shopping 2)]
A -->|Get money| B3[(Go shopping 3)]
C[(Let me think...<br />Do I want something for work,<br />something to spend every free second with,<br />or something to get around?)]
B1 --> C
B2 --> C
B3 --> C
C -->|One| D[(Laptop)]
C -->|Two| E[(iPhone)]
C -->|Three| F[(Car)]
click A "index.html#link-clicked" "link test"
click B testClick "click test"
classDef someclass fill:#f96;
class A someclass;`,
{ flowchart: { htmlLabels: false } , fontFamily: 'courier'}
);
});
it('22: Render a simple flowchart with nodeSpacing set to 100', () => {
imgSnapshotTest(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
%% this is a comment
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{ flowchart: { nodeSpacing: 50 }, fontFamily: 'courier' }
);
});
it('23: Render a simple flowchart with rankSpacing set to 100', () => {
imgSnapshotTest(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
%% this is a comment
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{ flowchart: { rankSpacing: '100' }, fontFamily: 'courier' }
);
});
it('24: Keep node label text (if already defined) when a style is applied', () => {
imgSnapshotTest(
`graph LR
A(( )) -->|step 1| B(( ))
B(( )) -->|step 2| C(( ))
C(( )) -->|step 3| D(( ))
linkStyle 1 stroke:greenyellow,stroke-width:2px
style C fill:greenyellow,stroke:green,stroke-width:4px
`,
{ flowchart: { htmlLabels: false } , fontFamily: 'courier'}
);
});
it('25: Handle link click events (link, anchor, mailto, other protocol, script)', () => {
imgSnapshotTest(
`graph TB
TITLE["Link Click Events<br>(click the nodes below)"]
A["link test (open in same tab)"]
B["link test (open in new tab)"]
C[anchor test]
D[mailto test]
E[other protocol test]
F[script test]
TITLE --> A & B & C & D & E & F
click A "https://mermaid-js.github.io/mermaid/#/" "link test (open in same tab)"
click B "https://mermaid-js.github.io/mermaid/#/" "link test (open in new tab)" _blank
click C "#link-clicked"
click D "mailto:user@user.user" "mailto test"
click E "notes://do-your-thing/id" "other protocol test"
click F "javascript:alert('test')" "script test"
`,
{ securityLevel: 'loose', fontFamily: 'courier' }
);
});
it('26: Set text color of nodes and links according to styles when html labels are enabled', () => {
imgSnapshotTest(
`graph LR
A[red<br>text] -->|red<br>text| B(blue<br>text)
C[/red<br/>text/] -->|blue<br/>text| D{blue<br/>text}
E{{default<br />style}} -->|default<br />style| F([default<br />style])
linkStyle default color:Sienna;
linkStyle 0 color:red;
linkStyle 1 stroke:DarkGray,stroke-width:2px,color:#0000ff
style A color:red;
style B color:blue;
style C stroke:#ff0000,fill:#ffcccc,color:#ff0000
style D stroke:#0000ff,fill:#ccccff,color:#0000ff
click B "index.html#link-clicked" "link test"
click D testClick "click test"
`,
{ flowchart: { htmlLabels: true } }
);
});
it('27: Set text color of nodes and links according to styles when html labels are disabled', () => {
imgSnapshotTest(
`graph LR
A[red<br>text] -->|red<br>text| B(blue<br>text)
C[/red<br/>text/] -->|blue<br/>text| D{blue<br/>text}
E{{default<br />style}} -->|default<br />style| F([default<br />style])
linkStyle default color:Sienna;
linkStyle 0 color:red;
linkStyle 1 stroke:DarkGray,stroke-width:2px,color:#0000ff
style A color:red;
style B color:blue;
style C stroke:#ff0000,fill:#ffcccc,color:#ff0000
style D stroke:#0000ff,fill:#ccccff,color:#0000ff
click B "index.html#link-clicked" "link test"
click D testClick "click test"
`,
{ flowchart: { htmlLabels: false } , fontFamily: 'courier'}
);
});
it('28: Apply default class to all nodes which do not have another class assigned (htmlLabels enabled)', () => {
imgSnapshotTest(
`graph TD
A[myClass1] --> B[default] & C[default]
B[default] & C[default] --> D[myClass2]
classDef default stroke-width:2px,fill:none,stroke:silver
classDef node color:red
classDef myClass1 color:#0000ff
classDef myClass2 stroke:#0000ff,fill:#ccccff
class A myClass1
class D myClass2
`,
{ flowchart: { htmlLabels: true } }
);
});
it('29: Apply default class to all nodes which do not have another class assigned (htmlLabels disabled)', () => {
imgSnapshotTest(
`graph TD
A[myClass1] --> B[default] & C[default]
B[default] & C[default] --> D[myClass2]
classDef default stroke-width:2px,fill:none,stroke:silver
classDef node color:red
classDef myClass1 color:#0000ff
classDef myClass2 stroke:#0000ff,fill:#ccccff
class A myClass1
class D myClass2
`,
{ flowchart: { htmlLabels: false } , fontFamily: 'courier'}
);
});
it('30: Possibility to style text color of nodes and subgraphs as well as apply classes to subgraphs', () => {
imgSnapshotTest(
`graph LR
subgraph id1 [title is set]
A-->B
end
subgraph id2 [title]
E
end
B-->C
subgraph id3
C-->D
end
class id3,id2,A redBg;
class id3,A whiteTxt;
classDef redBg fill:#622;
classDef whiteTxt color: white;
`,
{ flowchart: { htmlLabels: false } , fontFamily: 'courier'}
);
});
it('31: should not slice off edges that are to the left of the left-most vertex', () => {
imgSnapshotTest(
`graph TD
work --> sleep
sleep --> work
eat --> sleep
work --> eat
`,
{ flowchart: { htmlLabels: false } , fontFamily: 'courier'}
);
});
it('32: Render Subroutine shape', () => {
imgSnapshotTest(
`graph LR
A[[subroutine shape test]]
A -->|Get money| B[[Go shopping]]
B --> C[[Let me think...<br />Do I want something for work,<br />something to spend every free second with,<br />or something to get around?]]
C -->|One| D[[Laptop]]
C -->|Two| E[[iPhone]]
C -->|Three| F[[Car<br/>wroom wroom]]
click A "index.html#link-clicked" "link test"
click B testClick "click test"
classDef someclass fill:#f96;
class A someclass;
class C someclass;
`,
{ flowchart: { htmlLabels: false } , fontFamily: 'courier'}
);
});
it('33: should render a simple flowchart with diagramPadding set to 0', () => {
imgSnapshotTest(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
%% this is a comment
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{ flowchart: { diagramPadding: 0 } }
);
});
it('34: testing the label width in percy', () => {
imgSnapshotTest(
`graph TD
A[Christmas]
`,
{ }
);
});
it('35: should honor minimum edge length as specified by the user', () => {
imgSnapshotTest(
`graph TD
L1 --- L2
L2 --- C
M1 ---> C
R1 .-> R2
R2 <.-> C
C -->|Label 1| E1
C -- Label 2 ---> E2
C ----> E3
C -----> E4
C ======> E5
`,
{ }
);
});
it('36: should render escaped without html labels', () => {
imgSnapshotTest(
`graph TD
a["<strong>Haiya</strong>"]-->b
`,
{htmlLabels: false, flowchart: {htmlLabels: false}}
);
});
it('37: should render non-escaped with html labels', () => {
imgSnapshotTest(
`graph TD
a["<strong>Haiya</strong>"]-->b
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('38: should render a flowchart when useMaxWidth is true (default)', () => {
renderGraph(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{ flowchart: { useMaxWidth: true } }
);
cy.get('svg')
.should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
// use within because the absolute value can be slightly different depending on the environment ±5%
const height = parseFloat(svg.attr('height'));
expect(height).to.be.within(446 * .95, 446 * 1.05);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
expect(maxWidthValue).to.be.within(300 * .95, 300 * 1.05);
});
});
it('39: should render a flowchart when useMaxWidth is false', () => {
renderGraph(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{ flowchart: { useMaxWidth: false } }
);
cy.get('svg')
.should((svg) => {
const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(height).to.be.within(446 * .95, 446 * 1.05);
expect(width).to.be.within(300 * .95, 300 * 1.05);
expect(svg).to.not.have.attr('style');
});
});
it('58: handle styling with style expressions', () => {
imgSnapshotTest(
`
graph LR
id1(Start)-->id2(Stop)
style id1 fill:#f9f,stroke:#333,stroke-width:4px
style id2 fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
it('61: fontawesome icons in edge labels', () => {
imgSnapshotTest(
`
graph TD
C -->|fa:fa-car Car| F[fa:fa-car Car]
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
});

View File

@@ -0,0 +1,261 @@
/* eslint-env jest */
import { imgSnapshotTest, renderGraph } from '../../helpers/util.js';
describe('Gantt diagram', () => {
beforeEach(()=>{
cy.clock((new Date('1010-10-10')).getTime())
})
it('should render a gantt chart', () => {
imgSnapshotTest(
`
gantt
dateFormat YYYY-MM-DD
axisFormat %d/%m
title Adding GANTT diagram to mermaid
excludes weekdays 2014-01-10
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page : 20h
Add another diagram to demo page : 48h
`,
{}
);
});
it('Handle multiline section titles with different line breaks', () => {
imgSnapshotTest(
`
gantt
dateFormat YYYY-MM-DD
axisFormat %d/%m
title GANTT diagram with multiline section titles
excludes weekdays 2014-01-10
section A section<br>multiline
Completed task : done, des1, 2014-01-06,2014-01-08
Active task : active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks<br/>multiline
Completed task in the critical line : crit, done, 2014-01-06, 24h
Implement parser and jison : crit, done, after des1, 2d
Create tests for parser : crit, active, 3d
Future task in critical line : crit, 5d
Create tests for renderer : 2d
Add to mermaid : 1d
section Documentation<br />multiline
Describe gantt syntax : active, a1, after des1, 3d
Add gantt diagram to demo page : after a1, 20h
Add another diagram to demo page : doc1, after a1, 48h
section Last section<br />multiline
Describe gantt syntax : after doc1, 3d
Add gantt diagram to demo page : 20h
Add another diagram to demo page : 48h
`,
{}
);
});
it('Multiple dependencies syntax', () => {
imgSnapshotTest(
`
gantt
dateFormat YYYY-MM-DD
axisFormat %d/%m
title Adding GANTT diagram to mermaid
excludes weekdays 2014-01-10
apple :a, 2017-07-20, 1w
banana :crit, b, 2017-07-23, 1d
cherry :active, c, after b a, 1d
`,
{}
);
});
it('should render a gantt chart for issue #1060', () => {
imgSnapshotTest(
`
gantt
excludes weekdays 2017-01-10
title Projects Timeline
section asdf
specs :done, :ps, 2019-05-10, 50d
Plasma :pc, 2019-06-20, 60d
Rollup :or, 2019-08-20, 50d
section CEL
plasma-chamber :done, :pc, 2019-05-20, 60d
Plasma Implementation (Rust) :por, 2019-06-20, 120d
Predicates (Atomic Swap) :pred, 2019-07-20, 60d
section DEX
History zkSNARK :hs, 2019-08-10, 40d
Exit :vs, after hs, 60d
PredicateSpec :ps, 2019-09-1, 20d
PlasmaIntegration :pi, after ps,40d
section Events
ETHBoston :done, :eb, 2019-09-08, 3d
DevCon :active, :dc, 2019-10-08, 3d
section Plasma Calls & updates
OVM :ovm, 2019-07-12, 120d
Plasma call 26 :pc26, 2019-08-21, 1d
Plasma call 27 :pc27, 2019-09-03, 1d
Plasma call 28 :pc28, 2019-09-17, 1d
`,
{}
);
});
it('should hide today marker', () => {
imgSnapshotTest(
`
gantt
title Hide today marker (vertical line should not be visible)
dateFormat YYYY-MM-DD
axisFormat %d
todayMarker off
section Section1
Today: 1, -1h
`,
{}
);
});
it('should style today marker', () => {
imgSnapshotTest(
`
gantt
title Style today marker (vertical line should be 5px wide and half-transparent blue)
dateFormat YYYY-MM-DD
axisFormat %d
todayMarker stroke-width:5px,stroke:#00f,opacity:0.5
section Section1
Today: 1, -1h
`,
{}
);
});
it('should render a gantt diagram when useMaxWidth is true (default)', () => {
renderGraph(
`
gantt
dateFormat YYYY-MM-DD
axisFormat %d/%m
title Adding GANTT diagram to mermaid
excludes weekdays 2014-01-10
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page : 20h
Add another diagram to demo page : 48h
`,
{ gantt: { useMaxWidth: true } }
);
cy.get('svg')
.should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
// use within because the absolute value can be slightly different depending on the environment ±5%
const height = parseFloat(svg.attr('height'));
expect(height).to.be.within(484 * .95, 484 * 1.05);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
expect(maxWidthValue).to.be.within(984 * .95, 984 * 1.05);
});
});
it('should render a gantt diagram when useMaxWidth is false', () => {
renderGraph(
`
gantt
dateFormat YYYY-MM-DD
axisFormat %d/%m
title Adding GANTT diagram to mermaid
excludes weekdays 2014-01-10
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page : 20h
Add another diagram to demo page : 48h
`,
{ gantt: { useMaxWidth: false } }
);
cy.get('svg')
.should((svg) => {
const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(height).to.be.within(484 * .95, 484 * 1.05);
expect(width).to.be.within(984 * .95, 984 * 1.05);
expect(svg).to.not.have.attr('style');
});
});
});

View File

@@ -0,0 +1,21 @@
/* eslint-env jest */
import { imgSnapshotTest } from '../../helpers/util.js';
describe('Sequencediagram', () => {
// it('should render a simple git graph', () => {
// imgSnapshotTest(
// `
// gitGraph:
// commit
// branch newbranch
// checkout newbranch
// commit
// commit
// checkout master
// commit
// commit
// merge newbranch`,
// { logLevel: 0 }
// );
// });
});

View File

@@ -0,0 +1,14 @@
/* eslint-env jest */
import { imgSnapshotTest } from '../../helpers/util.js';
describe('Sequencediagram', () => {
it('should render a simple info diagrams', () => {
imgSnapshotTest(
`
info
showInfo
`,
{}
);
});
});

View File

@@ -0,0 +1,70 @@
/* eslint-env jest */
import { imgSnapshotTest, renderGraph } from '../../helpers/util.js';
describe('User journey diagram', () => {
it('Simple test', () => {
imgSnapshotTest(
`journey
title Adding journey diagram functionality to mermaid
section Order from website
`,
{}
);
});
it('should render a user journey chart', () => {
imgSnapshotTest(
`
journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 3: Me
`,
{}
);
});
it('should render a user journey diagram when useMaxWidth is true (default)', () => {
renderGraph(
`journey
title Adding journey diagram functionality to mermaid
section Order from website
`,
{ journey: { useMaxWidth: true } }
);
cy.get('svg')
.should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
const height = parseFloat(svg.attr('height'));
expect(height).to.eq(20);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
expect(maxWidthValue).to.eq(400);
});
});
it('should render a user journey diagram when useMaxWidth is false', () => {
renderGraph(
`journey
title Adding journey diagram functionality to mermaid
section Order from website
`,
{ journey: { useMaxWidth: false } }
);
cy.get('svg')
.should((svg) => {
const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
expect(height).to.eq(20);
expect(width).to.eq(400);
expect(svg).to.not.have.attr('style');
});
});
});

View File

@@ -0,0 +1,81 @@
/* eslint-env jest */
import { imgSnapshotTest, renderGraph } from '../../helpers/util.js';
describe('Pie Chart', () => {
it('should render a simple pie diagram', () => {
imgSnapshotTest(
`
pie title Sports in Sweden
"Bandy" : 40
"Ice-Hockey" : 80
"Football" : 90
`,
{}
);
cy.get('svg');
});
it('should render a simple pie diagram with long labels', () => {
imgSnapshotTest(
`
pie title NETFLIX
"Time spent looking for movie" : 90
"Time spent watching it" : 10
`,
{}
);
cy.get('svg');
});
it('should render a simple pie diagram with capital letters for labels', () => {
imgSnapshotTest(
`
pie title What Voldemort doesn't have?
"FRIENDS" : 2
"FAMILY" : 3
"NOSE" : 45
`,
{}
);
cy.get('svg');
});
it('should render a pie diagram when useMaxWidth is true (default)', () => {
renderGraph(
`
pie title Sports in Sweden
"Bandy" : 40
"Ice-Hockey" : 80
"Football" : 90
`,
{ pie: { useMaxWidth: true } }
);
cy.get('svg')
.should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
const height = parseFloat(svg.attr('height'));
expect(height).to.eq(450);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
expect(maxWidthValue).to.eq(984);
});
});
it('should render a pie diagram when useMaxWidth is false', () => {
renderGraph(
`
pie title Sports in Sweden
"Bandy" : 40
"Ice-Hockey" : 80
"Football" : 90
`,
{ pie: { useMaxWidth: false } }
);
cy.get('svg')
.should((svg) => {
const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
expect(height).to.eq(450);
expect(width).to.eq(984);
expect(svg).to.not.have.attr('style');
});
});
});

View File

@@ -0,0 +1,614 @@
/// <reference types="Cypress" />
import { imgSnapshotTest, renderGraph } from '../../helpers/util';
context('Sequence diagram', () => {
it('should render a simple sequence diagram', () => {
imgSnapshotTest(
`
sequenceDiagram
participant Alice
participant Bob
participant John as John<br/>Second Line
Alice ->> Bob: Hello Bob, how are you?
Bob-->>John: How about you John?
Bob--x Alice: I am good thanks!
Bob-x John: I am good thanks!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
Bob-->Alice: Checking with John...
alt either this
Alice->>John: Yes
else or this
Alice->>John: No
else or this will happen
Alice->John: Maybe
end
par this happens in parallel
Alice -->> Bob: Parallel message 1
and
Alice -->> John: Parallel message 2
end
`,
{sequence:{actorFontFamily:'courier'}}
);
});
it('should handle different line breaks', () => {
imgSnapshotTest(
`
sequenceDiagram
participant 1 as multiline<br>using #lt;br#gt;
participant 2 as multiline<br/>using #lt;br/#gt;
participant 3 as multiline<br />using #lt;br /#gt;
participant 4 as multiline<br \t/>using #lt;br \t/#gt;
1->>2: multiline<br>using #lt;br#gt;
note right of 2: multiline<br>using #lt;br#gt;
2->>3: multiline<br/>using #lt;br/#gt;
note right of 3: multiline<br/>using #lt;br/#gt;
3->>4: multiline<br />using #lt;br /#gt;
note right of 4: multiline<br />using #lt;br /#gt;
4->>1: multiline<br />using #lt;br /#gt;
note right of 1: multiline<br \t/>using #lt;br \t/#gt;
`,
{}
);
});
it('should render loops with a slight margin', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
loop Loopy
Bob->>Alice: Pasten
end `,
{}
);
});
context('font settings', () => {
it('should render different note fonts when configured', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob: I'm short
note left of Alice: I should have bigger fonts
Bob->>Alice: Short as well
`,
{ sequence: { noteFontSize: 18, noteFontFamily: 'Arial' } }
);
});
it('should render different message fonts when configured', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob: I'm short
Bob->>Alice: Short as well
`,
{ sequence: { messageFontSize: 18, messageFontFamily: 'Arial' } }
);
});
it('should render different actor fonts when configured', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob: I'm short
Bob->>Alice: Short as well
`,
{ sequence: { actorFontSize: 18, actorFontFamily: 'times' } }
);
});
it('should render notes aligned to the left when configured', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob: I'm short
note left of Alice: I am left aligned
Bob->>Alice: Short as well
`,
{ sequence: { noteAlign: 'left' } }
);
});
it('should render notes aligned to the right when configured', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob: I'm short
note left of Alice: I am right aligned
Bob->>Alice: Short as well
`,
{ sequence: { noteAlign: 'right' } }
);
});
});
context('auth width scaling', () => {
it('should render long actor descriptions', () => {
imgSnapshotTest(
`
sequenceDiagram
participant A as Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
A->>Bob: Hola
Bob-->A: Pasten !
`,
{logLevel: 0}
);
});
it('should wrap (inline) long actor descriptions', () => {
imgSnapshotTest(
`
sequenceDiagram
participant A as wrap:Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
A->>Bob: Hola
Bob-->A: Pasten !
`,
{logLevel: 0}
);
});
it('should wrap (directive) long actor descriptions', () => {
imgSnapshotTest(
`
%%{init: {'config': {'wrap': true }}}%%
sequenceDiagram
participant A as Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
A->>Bob: Hola
Bob-->A: Pasten !
`,
{}
);
});
it('should render long notes left of actor', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob: Hola
Note left of Alice: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render long notes wrapped (inline) left of actor', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob: Hola
Note left of Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render long notes right of actor', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob: Hola
Note right of Alice: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render long notes wrapped (inline) right of actor', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob: Hola
Note right of Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render long notes over actor', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob: Hola
Note over Alice: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render long notes wrapped (inline) over actor', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob: Hola
Note over Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render long messages from an actor to the left to one to the right', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render long messages wrapped (inline) from an actor to the left to one to the right', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob:wrap:Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
`,
{}
);
});
it('should render long messages from an actor to the right to one to the left', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob: I'm short
Bob->>Alice: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
`,
{}
);
});
it('should render long messages wrapped (inline) from an actor to the right to one to the left', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>Bob: I'm short
Bob->>Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
`,
{}
);
});
});
context('background rects', () => {
it('should render a single and nested rects', () => {
imgSnapshotTest(
`
sequenceDiagram
participant A
participant B
participant C
participant D
participant E
participant G
A ->>+ B: Task 1
rect rgb(178, 102, 255)
B ->>+ C: Task 2
C -->>- B: Return
end
A ->> D: Task 3
rect rgb(0, 128, 255)
D ->>+ E: Task 4
rect rgb(0, 204, 0)
E ->>+ G: Task 5
G -->>- E: Return
end
E ->> E: Task 6
end
D -->> A: Complete
`,
{}
);
});
it('should render a single and nested opt with long test overflowing', () => {
imgSnapshotTest(
`
sequenceDiagram
participant A
participant B
participant C
participant D
participant E
participant G
A ->>+ B: Task 1
opt this is an opt with a long title that will overflow
B ->>+ C: Task 2
C -->>- B: Return
end
A ->> D: Task 3
opt this is another opt with a long title that will overflow
D ->>+ E: Task 4
opt this is a nested opt with a long title that will overflow
E ->>+ G: Task 5
G -->>- E: Return
end
E ->> E: Task 6
end
D -->> A: Complete
`,
{}
);
});
it('should render a single and nested opt with long test wrapping', () => {
imgSnapshotTest(
`
%%{init: { 'config': { 'wrap': true } } }%%
sequenceDiagram
participant A
participant B
participant C
participant D
participant E
participant G
A ->>+ B: Task 1
opt this is an opt with a long title that will overflow
B ->>+ C: Task 2
C -->>- B: Return
end
A ->> D: Task 3
opt this is another opt with a long title that will overflow
D ->>+ E: Task 4
opt this is a nested opt with a long title that will overflow
E ->>+ G: Task 5
G -->>- E: Return
end
E ->> E: Task 6
end
D -->> A: Complete
`,
{}
);
});
it('should render rect around and inside loops', () => {
imgSnapshotTest(
`
sequenceDiagram
A ->> B: 1
rect rgb(204, 0, 102)
loop check C
C ->> C: Every 10 seconds
end
end
A ->> B: 2
loop check D
C ->> D: 3
rect rgb(153, 153, 255)
D -->> D: 5
D --> C: 4
end
end
`,
{}
);
});
it('should render rect around and inside alts', () => {
imgSnapshotTest(
`
sequenceDiagram
A ->> B: 1
rect rgb(204, 0, 102)
alt yes
C ->> C: 1
else no
rect rgb(0, 204, 204)
C ->> C: 0
end
end
end
B ->> A: Return
`,
{}
);
});
it('should render rect around and inside opts', () => {
imgSnapshotTest(
`
sequenceDiagram
A ->> B: 1
rect rgb(204, 0, 102)
opt maybe
C -->> D: Do something
rect rgb(0, 204, 204)
C ->> C: 0
end
end
end
opt possibly
rect rgb(0, 204, 204)
C ->> C: 0
end
end
B ->> A: Return
`,
{}
);
});
it('should render autonumber when configured with such', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
`,
{ sequence: { actorMargin: 50, showSequenceNumbers: true } }
);
});
it('should render autonumber when autonumber keyword is used', () => {
imgSnapshotTest(
`
sequenceDiagram
autonumber
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
`,
{}
);
});
it('should render autonumber with different line breaks', () => {
imgSnapshotTest(
`
sequenceDiagram
autonumber
Alice->>John: Hello John,<br>how are you?
Alice->>John: John,<br/>can you hear me?
John-->>Alice: Hi Alice,<br />I can hear you!
John-->>Alice: I feel great!
`,
{}
);
});
it('should render dark theme from init directive and configure font size 24 font', () => {
imgSnapshotTest(
`
%%{init: {'theme': 'dark', 'config': {'fontSize': 24}}}%%
sequenceDiagram
Alice->>John: Hello John, how are you?
Alice->>John: John, can you hear me?
John-->>Alice: Hi Alice, I can hear you!
John-->>Alice: I feel great!
`,
{}
);
});
it('should render with wrapping enabled', () => {
imgSnapshotTest(
`
%%{init: { 'config': { 'wrap': true }}}%%
sequenceDiagram
participant A as Alice, the talkative one
A->>John: Hello John, how are you today? I'm feeling quite verbose today.
A->>John: John, can you hear me? If you are not available, we can talk later.
John-->>A: Hi Alice, I can hear you! I was finishing up an important meeting.
John-->>A: I feel great! I was not ignoring you. I am sorry you had to wait for a response.
`,
{}
);
});
it('should render with an init directive', () => {
imgSnapshotTest(
`%%{init: { "theme": "dark", 'config': { "fontFamily": "Menlo", "fontSize": 18, "fontWeight": 400, "wrap": true }}}%%
sequenceDiagram
Alice->>Bob: Hello Bob, how are you? If you are not available right now, I can leave you a message. Please get back to me as soon as you can!
Note left of Alice: Bob thinks
Bob->>Alice: Fine!`,
{}
)
});
});
context('directives', () => {
it('should override config with directive settings', () => {
imgSnapshotTest(
`
%%{init: { "config": { "mirrorActors": true }}}%%
sequenceDiagram
Alice->>Bob: I'm short
note left of Alice: config set to mirrorActors: false<br/>directive set to mirrorActors: true
Bob->>Alice: Short as well
`,
{ logLevel:0, sequence: { mirrorActors: false, noteFontSize: 18, noteFontFamily: 'Arial' } }
);
});
it('should override config with directive settings', () => {
imgSnapshotTest(
`
%%{init: { "config": { "mirrorActors": false, "wrap": true }}}%%
sequenceDiagram
Alice->>Bob: I'm short
note left of Alice: config: mirrorActors=true<br/>directive: mirrorActors=false
Bob->>Alice: Short as well
`,
{ logLevel:0, sequence: { mirrorActors: true, noteFontSize: 18, noteFontFamily: 'Arial' } }
);
});
});
context('svg size', () => {
it('should render a sequence diagram when useMaxWidth is true (default)', () => {
renderGraph(
`
sequenceDiagram
participant Alice
participant Bob
participant John as John<br/>Second Line
Alice ->> Bob: Hello Bob, how are you?
Bob-->>John: How about you John?
Bob--x Alice: I am good thanks!
Bob-x John: I am good thanks!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
Bob-->Alice: Checking with John...
alt either this
Alice->>John: Yes
else or this
Alice->>John: No
else or this will happen
Alice->John: Maybe
end
par this happens in parallel
Alice -->> Bob: Parallel message 1
and
Alice -->> John: Parallel message 2
end
`,
{ sequence: { useMaxWidth: true } }
);
cy.get('svg')
.should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
const height = parseFloat(svg.attr('height'));
expect(height).to.eq(920);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(maxWidthValue).to.be.within(820 * .95, 820 * 1.05);
});
});
it('should render a sequence diagram when useMaxWidth is false', () => {
renderGraph(
`
sequenceDiagram
participant Alice
participant Bob
participant John as John<br/>Second Line
Alice ->> Bob: Hello Bob, how are you?
Bob-->>John: How about you John?
Bob--x Alice: I am good thanks!
Bob-x John: I am good thanks!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
Bob-->Alice: Checking with John...
alt either this
Alice->>John: Yes
else or this
Alice->>John: No
else or this will happen
Alice->John: Maybe
end
par this happens in parallel
Alice -->> Bob: Parallel message 1
and
Alice -->> John: Parallel message 2
end
`,
{ sequence: { useMaxWidth: false } }
);
cy.get('svg')
.should((svg) => {
const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
expect(height).to.eq(920);
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(width).to.be.within(820 * .95, 820 * 1.05);
expect(svg).to.not.have.attr('style');
});
});
});
});

View File

@@ -0,0 +1,400 @@
/* eslint-env jest */
import { imgSnapshotTest, renderGraph } from '../../helpers/util';
describe('State diagram', () => {
it('v2 should render a simple info', () => {
imgSnapshotTest(
`
info
`,
{ logLevel: 1, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render a simple state diagrams', () => {
imgSnapshotTest(
`
stateDiagram-v2
[*] --> State1
State1 --> [*]
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render a long descriptions instead of id when available', () => {
imgSnapshotTest(
`
stateDiagram-v2
[*] --> S1
state "Some long name" as S1
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render a long descriptions with additional descriptions', () => {
imgSnapshotTest(
`
stateDiagram-v2
[*] --> S1
state "Some long name" as S1: The description
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render a single state with short descriptions', () => {
imgSnapshotTest(
`
stateDiagram-v2
state "A long long name" as long1
state "A" as longlonglongid
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render a transition descriptions with new lines', () => {
imgSnapshotTest(
`
stateDiagram-v2
[*] --> S1
S1 --> S2: long line using<br/>should work
S1 --> S3: long line using <br>should work
S1 --> S4: long line using \\nshould work
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render a state with a note', () => {
imgSnapshotTest(
`
stateDiagram-v2
State1: The state with a note
note right of State1
Important information! You can write
notes.
end note
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render a state with on the left side when so specified', () => {
imgSnapshotTest(
`
stateDiagram-v2
State1: The state with a note with minus - and plus + in it
note left of State1
Important information! You can write
notes with . and in them.
end note
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render a state with a note together with another state', () => {
imgSnapshotTest(
`
stateDiagram-v2
State1: The state with a note +,-
note right of State1
Important information! You can write +,-
notes.
end note
State1 --> State2 : With +,-
note left of State2 : This is the note +,-<br/>
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render a note with multiple lines in it', () => {
imgSnapshotTest(
`
stateDiagram-v2
State1: The state with a note
note right of State1
Important information! You\ncan write
notes with multiple lines...
Here is another line...
And another line...
end note
`,
{ logLevel: 0, fontFamily: 'courier' }
);
});
it('v2 should handle multiline notes with different line breaks', () => {
imgSnapshotTest(
`
stateDiagram-v2
State1
note right of State1
Line1<br>Line2<br/>Line3<br />Line4<br />Line5
end note
`,
{ logLevel: 0, fontFamily: 'courier' }
);
});
it('v2 should render a states with descriptions including multi-line descriptions', () => {
imgSnapshotTest(
`
stateDiagram-v2
State1: This a a single line description
State2: This a a multi line description
State2: here comes the multi part
[*] --> State1
State1 --> State2
State2 --> [*]
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render a simple state diagrams', () => {
imgSnapshotTest(
`
stateDiagram-v2
[*] --> State1
State1 --> State2
State1 --> State3
State1 --> [*]
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render a simple state diagrams with labels', () => {
imgSnapshotTest(
`
stateDiagram-v2
[*] --> State1
State1 --> State2 : Transition 1
State1 --> State3 : Transition 2
State1 --> State4 : Transition 3
State1 --> State5 : Transition 4
State2 --> State3 : Transition 5
State1 --> [*]
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render state descriptions', () => {
imgSnapshotTest(
`
stateDiagram-v2
state "Long state description" as XState1
state "Another Long state description" as XState2
XState2 : New line
XState1 --> XState2
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render composite states', () => {
imgSnapshotTest(
`
stateDiagram-v2
[*] --> NotShooting: Pacifist
NotShooting --> A
NotShooting --> B
NotShooting --> C
state NotShooting {
[*] --> Idle: Yet another long long öong öong öong label
Idle --> Configuring : EvConfig
Configuring --> Idle : EvConfig EvConfig EvConfig EvConfig EvConfig
}
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render multiple composite states', () => {
imgSnapshotTest(
`
stateDiagram-v2
[*]-->TV
state TV {
[*] --> Off: Off to start with
On --> Off : Turn off
Off --> On : Turn on
}
TV--> Console
state Console {
[*] --> Off2: Off to start with
On2--> Off2 : Turn off
Off2 --> On2 : Turn on
On2-->Playing
state Playing {
Alive --> Dead
Dead-->Alive
}
}
`,
{ logLevel: 0, fontFamily: 'courier' }
);
});
it('v2 should render forks in composite states', () => {
imgSnapshotTest(
`
stateDiagram-v2
[*]-->TV
state TV {
state fork_state &lt;&lt;fork&gt;&gt;
[*] --> fork_state
fork_state --> State2
fork_state --> State3
state join_state &lt;&lt;join&gt;&gt;
State2 --> join_state
State3 --> join_state
join_state --> State4
State4 --> [*]
}
`,
{ logLevel: 0, fontFamily: 'courier' }
);
});
it('v2 should render forks and joins', () => {
imgSnapshotTest(
`
stateDiagram-v2
state fork_state &lt;&lt;fork&gt;&gt;
[*] --> fork_state
fork_state --> State2
fork_state --> State3
state join_state &lt;&lt;join&gt;&gt;
State2 --> join_state
State3 --> join_state
join_state --> State4
State4 --> [*]
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render concurrency states', () => {
imgSnapshotTest(
`
stateDiagram-v2
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('v2 should render a state with states in it', () => {
imgSnapshotTest(
`
stateDiagram-v2
state PilotCockpit {
state Parent {
C
}
}
`,
{
logLevel: 0,
}
);
});
it('v2 Simplest composite state', () => {
imgSnapshotTest(
`
stateDiagram-v2
state Parent {
C
}
`,
{
logLevel: 0, fontFamily: 'courier'
}
);
});
it('v2 should handle multiple arrows from one node to another', () => {
imgSnapshotTest(
`
stateDiagram-v2
a --> b: Start
a --> b: Stop
`,
{
logLevel: 0, fontFamily: 'courier',
}
);
});
it('v2 should render a state diagram when useMaxWidth is true (default)', () => {
renderGraph(
`
stateDiagram-v2
[*] --> State1
State1 --> [*]
`,
{ state: { useMaxWidth: true } }
);
cy.get('svg')
.should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
const height = parseFloat(svg.attr('height'));
expect(height).to.eq(177);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(maxWidthValue).to.be.within(135 * .95, 135 * 1.05);
});
});
it('v2 should render a state diagram when useMaxWidth is false', () => {
renderGraph(
`
stateDiagram-v2
[*] --> State1
State1 --> [*]
`,
{ state: { useMaxWidth: false } }
);
cy.get('svg')
.should((svg) => {
const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
expect(height).to.eq(177);
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(width).to.be.within(135 * .95, 135 * 1.05);
expect(svg).to.not.have.attr('style');
});
});
});

View File

@@ -0,0 +1,388 @@
/* eslint-env jest */
import { imgSnapshotTest, renderGraph } from '../../helpers/util';
describe('State diagram', () => {
it('should render a simple state diagrams', () => {
imgSnapshotTest(
`
stateDiagram
[*] --> State1
State1 --> [*]
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('should render a long descriptions instead of id when available', () => {
imgSnapshotTest(
`
stateDiagram
[*] --> S1
state "Some long name" as S1
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('should render a long descriptions with additional descriptions', () => {
imgSnapshotTest(
`
stateDiagram
[*] --> S1
state "Some long name" as S1: The description
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('should render a single state with short descriptions', () => {
imgSnapshotTest(
`
stateDiagram
state "A long long name" as long1
state "A" as longlonglongid
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('should render a transition descriptions with new lines', () => {
imgSnapshotTest(
`
stateDiagram
[*] --> S1
S1 --> S2: long line using<br/>should work
S1 --> S3: long line using <br>should work
S1 --> S4: long line using \\nshould work
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('should render a state with a note', () => {
imgSnapshotTest(
`
stateDiagram
State1: The state with a note
note right of State1
Important information! You can write
notes.
end note
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('should render a state with on the left side when so specified', () => {
imgSnapshotTest(
`
stateDiagram
State1: The state with a note with minus - and plus + in it
note left of State1
Important information! You can write
notes with . and in them.
end note
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('should render a state with a note together with another state', () => {
imgSnapshotTest(
`
stateDiagram
State1: The state with a note +,-
note right of State1
Important information! You can write +,-
notes.
end note
State1 --> State2 : With +,-
note left of State2 : This is the note +,-<br/>
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('should render a note with multiple lines in it', () => {
imgSnapshotTest(
`
stateDiagram
State1: The state with a note
note right of State1
Important information! You\ncan write
notes with multiple lines...
Here is another line...
And another line...
end note
`,
{ logLevel: 0, fontFamily: 'courier' }
);
});
it('should handle multiline notes with different line breaks', () => {
imgSnapshotTest(
`
stateDiagram
State1
note right of State1
Line1<br>Line2<br/>Line3<br />Line4<br />Line5
end note
`,
{ logLevel: 0, fontFamily: 'courier' }
);
});
it('should render a states with descriptions including multi-line descriptions', () => {
imgSnapshotTest(
`
stateDiagram
State1: This a a single line description
State2: This a a multi line description
State2: here comes the multi part
[*] --> State1
State1 --> State2
State2 --> [*]
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('should render a simple state diagrams', () => {
imgSnapshotTest(
`
stateDiagram
[*] --> State1
State1 --> State2
State1 --> State3
State1 --> [*]
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('should render a simple state diagrams with labels', () => {
imgSnapshotTest(
`
stateDiagram
[*] --> State1
State1 --> State2 : Transition 1
State1 --> State3 : Transition 2
State1 --> State4 : Transition 3
State1 --> State5 : Transition 4
State2 --> State3 : Transition 5
State1 --> [*]
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('should render state descriptions', () => {
imgSnapshotTest(
`
stateDiagram
state "Long state description" as XState1
state "Another Long state description" as XState2
XState2 : New line
XState1 --> XState2
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('should render composite states', () => {
imgSnapshotTest(
`
stateDiagram
[*] --> NotShooting: Pacifist
NotShooting --> A
NotShooting --> B
NotShooting --> C
state NotShooting {
[*] --> Idle: Yet another long long öong öong öong label
Idle --> Configuring : EvConfig
Configuring --> Idle : EvConfig EvConfig EvConfig EvConfig EvConfig
}
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('should render multiple composit states', () => {
imgSnapshotTest(
`
stateDiagram
[*]-->TV
state TV {
[*] --> Off: Off to start with
On --> Off : Turn off
Off --> On : Turn on
}
TV--> Console
state Console {
[*] --> Off2: Off to start with
On2--> Off2 : Turn off
Off2 --> On2 : Turn on
On2-->Playing
state Playing {
Alive --> Dead
Dead-->Alive
}
}
`,
{ logLevel: 0, fontFamily: 'courier' }
);
});
it('should render forks in composit states', () => {
imgSnapshotTest(
`
stateDiagram
[*]-->TV
state TV {
state fork_state &lt;&lt;fork&gt;&gt;
[*] --> fork_state
fork_state --> State2
fork_state --> State3
state join_state &lt;&lt;join&gt;&gt;
State2 --> join_state
State3 --> join_state
join_state --> State4
State4 --> [*]
}
`,
{ logLevel: 0, fontFamily: 'courier' }
);
});
it('should render forks and joins', () => {
imgSnapshotTest(
`
stateDiagram
state fork_state &lt;&lt;fork&gt;&gt;
[*] --> fork_state
fork_state --> State2
fork_state --> State3
state join_state &lt;&lt;join&gt;&gt;
State2 --> join_state
State3 --> join_state
join_state --> State4
State4 --> [*]
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('should render concurrency states', () => {
imgSnapshotTest(
`
stateDiagram
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
`,
{ logLevel: 0, fontFamily: 'courier' }
);
cy.get('svg');
});
it('should render a state with states in it', () => {
imgSnapshotTest(
`
stateDiagram
state PilotCockpit {
state Parent {
C
}
}
`,
{
logLevel: 0, fontFamily: 'courier'
}
);
});
it('Simplest composite state', () => {
imgSnapshotTest(
`
stateDiagram
state Parent {
C
}
`,
{
logLevel: 0, fontFamily: 'courier'
}
);
});
it('should handle multiple arrows from one node to another', () => {
imgSnapshotTest(
`
stateDiagram
a --> b: Start
a --> b: Stop
`,
{
logLevel: 0, fontFamily: 'courier'
}
);
});
it('should render a state diagram when useMaxWidth is true (default)', () => {
renderGraph(
`
stateDiagram
[*] --> State1
State1 --> [*]
`,
{ state: { useMaxWidth: true } }
);
cy.get('svg')
.should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
const height = parseFloat(svg.attr('height'));
expect(height).to.eq(139);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(maxWidthValue).to.be.within(112 * .95, 112 * 1.05);
});
});
it('should render a state diagram when useMaxWidth is false', () => {
renderGraph(
`
stateDiagram
[*] --> State1
State1 --> [*]
`,
{ state: { useMaxWidth: false } }
);
cy.get('svg')
.should((svg) => {
const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
expect(height).to.eq(139);
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(width).to.be.within(112 * .95, 112 * 1.05);
expect(svg).to.not.have.attr('style');
});
});
});

View File

@@ -0,0 +1,280 @@
/* eslint-env jest */
import { imgSnapshotTest } from '../../helpers/util.js';
describe('Pie Chart', () => {
// beforeEach(()=>{
// cy.clock((new Date('2014-06-09')).getTime());
// });
['default', 'forest', 'dark', 'neutral'].forEach(theme=>{
describe(theme, () => {
it('should render a pie diagram', () => {
imgSnapshotTest(
`
pie title Sports in Sweden
"Bandy" : 40
"Ice-Hockey" : 80
"Football" : 90
`,
{theme}
);
cy.get('svg');
});
it('should render a flowchart diagram', () => {
imgSnapshotTest(
`
%%{init: { 'logLevel': 0} }%%
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[/Another/]
C ==>|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
subgraph section
C
D
E
F
G
end
`,
{theme}
);
cy.get('svg');
});
it('should render a new flowchart diagram', () => {
imgSnapshotTest(
`
%%{init: { 'logLevel': 0, 'theme': '${theme}'} }%%
flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[Another]
C ==>|One| D[Laptop]
C x--x|Two| E[iPhone]
C o--o|Three| F[fa:fa-car Car]
subgraph section
C
D
E
F
G
end
`,
{theme}
);
cy.get('svg');
});
it('should render a sequence diagram', () => {
imgSnapshotTest(
`
%%{init: { 'logLevel': 0, 'theme': '${theme}'} }%%
sequenceDiagram
autonumber
par Action 1
Alice->>John: Hello John, how are you?
and Action 2
Alice->>Bob: Hello Bob, how are you?
end
Alice->>+John: Hello John, how are you?
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
Note right of John: John is perceptive
John-->>-Alice: I feel great!
loop Every minute
John-->Alice: Great!
end
`,
{theme}
);
cy.get('svg');
});
it('should render a class diagram', () => {
imgSnapshotTest(
`
%%{init: { 'logLevel': 0, 'theme': '${theme}'} }%%
classDiagram
Animal "*" <|-- "1" Duck
Animal "1" <|-- "10" Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
classA <|-- classB
classC *-- classD
classE o-- classF
classG <-- classH
classI -- classJ
classK <.. classL
classM <|.. classN
classO .. classP
classA --|> classB : Inheritance
classC --* classD : Composition
classE --o classF : Aggregation
classG --> classH : Association
classI -- classJ : Link(Solid)
classK ..> classL : Dependency
classM ..|> classN : Realization
classO .. classP : Link(Dashed)
`,
{theme}
);
cy.get('svg');
});
it('should render a state diagram', () => {
imgSnapshotTest(
`
%%{init: { 'logLevel': 0, 'theme': '${theme}'} }%%
stateDiagram
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
state SomethingElse {
A --> B
B --> A
}
Active --> SomethingElse
note right of SomethingElse : This is the note to the right.
`,
{theme}
);
cy.get('svg');
});
it('should render a state diagram (v2)', () => {
imgSnapshotTest(
`
%%{init: { 'logLevel': 0, 'theme': '${theme}'} }%%
stateDiagram-v2
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
state SomethingElse {
A --> B
B --> A
}
Active --> SomethingElse2
note right of SomethingElse2 : This is the note to the right.
`,
{theme}
);
cy.get('svg');
});
it('should render a er diagram', () => {
imgSnapshotTest(
`
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
`,
{theme}
);
cy.get('svg');
});
it('should render a user journey diagram', () => {
imgSnapshotTest(
`
%%{init: { 'logLevel': 0, 'theme': '${theme}'} }%%
journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 5: Me
`,
{theme}
);
cy.get('svg');
});
it('should render a gantt diagram', () => {
cy.clock((new Date('2014-01-06')).getTime());
imgSnapshotTest(
`
gantt
dateFormat :YYYY-MM-DD
title :Adding GANTT diagram functionality to mermaid
excludes :excludes the named dates/days from being included in a charted task..
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page :20h
Add another diagram to demo page :48h
`,
{theme}
);
cy.get('svg');
});
});
});
});

View File

@@ -0,0 +1,61 @@
import mermaid from '../../dist/mermaid.core';
let code = `flowchart LR
Power_Supply --> Transmitter_A
Power_Supply --> Transmitter_B
Transmitter_A --> D
Transmitter_B --> D`;
let code2 = `gantt
dateFormat YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d`;
const code3 = `flowchart TD
A(<img scr='https://iconscout.com/ms-icon-310x310.png' width='20' height='20' />)
B(<b>Bold text!</b>)`;
if (location.href.match('test-html-escaping')) {
code = code3;
}
mermaid.initialize({
theme: 'default',
// fontFamily: '"Lucida Console", Monaco, monospace',
startOnLoad: false,
securityLevel: 'loose',
flowchart: {
htmlLabels: true
},
gantt: {
axisFormatter: [
[
'%Y-%m-%d',
d => {
return d.getDay() === 1;
}
]
]
}
});
mermaid.render(
'the-id-of-the-svg',
code,
svg => {
console.log(svg);
const elem = document.querySelector('#graph-to-be');
elem.innerHTML = svg;
}
// ,document.querySelector('#tmp')
);

139
cypress/platform/class.html Normal file
View File

@@ -0,0 +1,139 @@
<html>
<head>
<link
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet">
<style>
body {
background: rgb(221, 208, 208);
/*background:#333;*/
font-family: 'Arial';
}
h1 { color: white;}
.mermaid2 {
display: none;
}
.customCss > rect, .customCss{
fill:#FF0000 !important;
stroke:#FFFF00 !important;
stroke-width:4px !important;
}
</style>
</head>
<body>
<h1>info below</h1>
<div class="mermaid" style="width: 100%; height: 20%;">
%%{init: {'theme': 'base', 'fontFamily': 'courier', 'themeVariables': { 'primaryColor': '#fff000'}}}%%
classDiagram
class BankAccount{
+String owner
+BigDecimal balance
+deposit(amount) bool
+withdrawl(amount) int
}
cssClass "BankAccount" customCss
</div>
<div class="mermaid" style="width: 100%; height: 20%;">
%%{init: {'theme': 'base', 'fontFamily': 'courier', 'themeVariables': { 'primaryColor': '#fff000'}}}%%
classDiagram-v2
class BankAccount{
+String owner
+BigDecimal balance
+deposit(amount) bool
+withdrawl(amount) int
}
cssClass "BankAccount" customCss
</div>
<div class="mermaid2" style="width: 100%; height: 20%;">
%%{init: {'theme': 'base', 'fontFamily': 'courier', 'themeVariables': { 'primaryColor': '#fff000'}}}%%
classDiagram
class BankAccount{
+String owner
+BigDecimal balance
+deposit(amount) bool
+withdrawl(amount) int
}
Class01~T~ <|-- AveryLongClass : Cool
Class03~T~ *-- Class04~T~
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
class Class10~T~ {
&lt;&lt;service&gt;&gt;
int id
test()
}
callback Class01 "callback" "A Tooltip"
</div>
<div class="mermaid2" style="width: 100%; height: 20%;">
flowchart TB
a_a(Aftonbladet) --> b_b[gorilla]:::apa --> c_c{chimp}:::apa -->a_a
a_a --> c --> d_d --> c_c
classDef apa fill:#f9f,stroke:#333,stroke-width:4px;
class a_a apa;
click a_a "http://www.aftonbladet.se" "apa"
</div>
<div class="mermaid2" style="width: 100%; height: 20%;">
classDiagram-v2
classA -- classB : Inheritance
classA -- classC : link
classC -- classD : link
classB -- classD
classA --|> classB : Inheritance
classC --* classD : Composition
classE --o classF : Aggregation
classG --> classH : Association
classI -- classJ : Link(Solid)
classK ..> classL : Dependency
classM ..|> classN : Realization
classO .. classP : Link(Dashed)
classA : +attr1
classA : attr2
classA : method1()
&lt;&lt;interface&gt;&gt; classB
classB : method2() int
Customer "1" --> "*" Ticket
Student "1" --> "1..*" Course
Galaxy --> "many" Star : Contains
&lt;&lt;interface&gt;&gt; Customer
class Shape
callback Shape "callbackFunction" "This is a tooltip for a callback"
</div>
<script src="./mermaid.js"></script>
<script>
mermaid.parseError = function (err, hash) {
// console.error('Mermaid error: ', err);
};
mermaid.initialize({
theme: 'default',
// arrowMarkerAbsolute: true,
// themeCSS: '.edgePath .path {stroke: red;} .arrowheadPath {fill: red;}',
logLevel: 0,
flowchart: { curve: 'linear', "htmlLabels": true },
// gantt: { axisFormat: '%m/%d/%Y' },
sequence: { actorMargin: 50, showSequenceNumbers: true },
// sequenceDiagram: { actorMargin: 300 } // deprecated
// fontFamily: '"arial", sans-serif',
// themeVariables: {
// fontFamily: '"arial", sans-serif',
// },
curve: 'linear',
securityLevel: 'loose'
});
function callback(){alert('It worked');}
</script>
</body>
</html>

View File

@@ -0,0 +1,131 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Mermaid Quick Test Page</title>
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=">
<style>
.mermaid2 {
display: none;
}
</style>
</head>
<body>
<div style="display: flex">
<div id="FirstLine" class="mermaid">
graph TB
Function-->URL
click Function clickByFlow "Add a div"
click URL "http://localhost:9000/webpackUsage.html" "Visit <strong>mermaid docs</strong>"
</div>
<div id="FirstLine" class="mermaid">
graph TB
1Function--->2URL
click 1Function clickByFlow "Add a div"
click 2URL "http://localhost:9000/webpackUsage.html" "Visit <strong>mermaid docs</strong>"
</div>
<div id="FirstLine" class="mermaid">
flowchart TB
Function-->URL
click Function clickByFlow "Add a div"
click URL "http://localhost:9000/webpackUsage.html" "Visit <strong>mermaid docs</strong>" _self
</div>
<div id="FirstLine" class="mermaid">
flowchart TB
1Function--->2URL
click 1Function clickByFlow "Add a div"
click 2URL "http://localhost:9000/webpackUsage.html" "Visit <strong>mermaid docs</strong>" _self
</div>
<div id="FirstLine" class="mermaid">
classDiagram
class ShapeLink
link ShapeLink "http://localhost:9000/webpackUsage.html" "This is a tooltip for a link"
class ShapeCallback
callback ShapeCallback "clickByClass" "This is a tooltip for a callback"
</div>
<div id="FirstLine" class="mermaid">
classDiagram-v2
class ShapeLink2
link ShapeLink2 "http://localhost:9000/webpackUsage.html" "This is a tooltip for a link"
class ShapeCallback2
callback ShapeCallback2 "clickByClass" "This is a tooltip for a callback"
</div>
</div>
<div class="mermaid">
gantt
dateFormat YYYY-MM-DD
axisFormat %d/%m
title Adding GANTT diagram to mermaid
excludes weekdays 2014-01-10
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Clickable
Visit mermaidjs :active, cl1, 2014-01-07,2014-01-10
Calling a Callback (look at the console log) :cl2, after cl1, 3d
Calling a Callback with args :cl3, after cl1, 3d
click cl1 href "http://localhost:9000/webpackUsage.html"
click cl2 call clickByGantt()
click cl3 call clickByGantt("test1", test2, test3)
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page : 20h
Add another diagram to demo page : 48h
</div>
<script src="./mermaid.js"></script>
<script>
function clickByFlow(elemName) {
const div = document.createElement('div')
div.className = 'created-by-click'
div.style = 'padding: 20px; background: green; color: white;'
div.innerText = 'Clicked By Flow'
document.getElementsByTagName('body')[0].appendChild(div)
}
function clickByGantt(arg1, arg2, arg3) {
const div = document.createElement('div')
div.className = 'created-by-gant-click'
div.style = 'padding: 20px; background: green; color: white;'
div.innerText = 'Clicked By Gant'
if (arg1) div.innerText += ' ' + arg1;
if (arg2) div.innerText += ' ' + arg2;
if (arg3) div.innerText += ' ' + arg3;
document.getElementsByTagName('body')[0].appendChild(div)
}
function clickByClass() {
const div = document.createElement('div')
div.className = 'created-by-class-click'
div.style = 'padding: 20px; background: purple; color: white;'
div.innerText = 'Clicked By Class'
document.getElementsByTagName('body')[0].appendChild(div)
}
mermaid.initialize({ startOnLoad: true, securityLevel: 'loose', logLevel: 1 });
</script>
</body>
</html>

View File

@@ -0,0 +1,83 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Mermaid Quick Test Page</title>
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=">
</head>
<body>
<div id="FirstLine" class="mermaid">
graph TB
Function-->URL
click Function clickByFlow "Add a div"
click URL "http://localhost:9000/webpackUsage.html" "Visit <strong>mermaid docs</strong>"
</div>
<div id="FirstLine" class="mermaid">
graph TB
1Function-->2URL
click 1Function clickByFlow "Add a div"
click 2URL "http://localhost:9000/webpackUsage.html" "Visit <strong>mermaid docs</strong>"
</div>
<div class="mermaid">
gantt
dateFormat YYYY-MM-DD
axisFormat %d/%m
title Adding GANTT diagram to mermaid
excludes weekdays 2014-01-10
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Clickable
Visit mermaidjs :active, cl1, 2014-01-07,2014-01-10
Calling a Callback (look at the console log) :cl2, after cl1, 3d
click cl1 href "http://localhost:9000/webpackUsage.html"
click cl2 call clickByGantt("test", test, test)
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page : 20h
Add another diagram to demo page : 48h
</div>
<script src="./mermaid.js"></script>
<script>
function clickByFlow(elemName) {
const div = document.createElement('div')
div.className = 'created-by-click'
div.style = 'padding: 20px; background: green; color: white;'
div.innerText = 'Clicked By Flow'
document.getElementsByTagName('body')[0].appendChild(div)
}
function clickByGantt(elemName) {
const div = document.createElement('div')
div.className = 'created-by-gant-click'
div.style = 'padding: 20px; background: green; color: white;'
div.innerText = 'Clicked By Gant'
document.getElementsByTagName('body')[0].appendChild(div)
}
mermaid.initialize({ startOnLoad: true, securityLevel: 'strct', logLevel: 1 });
</script>
</body>
</html>

View File

@@ -0,0 +1,88 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Mermaid Quick Test Page</title>
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=">
</head>
<body>
<div id="FirstLine" class="mermaid">
graph TB
Function-->URL
click Function clickByFlow "Add a div"
click URL "http://localhost:9000/webpackUsage.html" "Visit <strong>mermaid docs</strong>"
</div>
<div id="FirstLine" class="mermaid">
graph TB
1Function-->2URL
click 1Function clickByFlow "Add a div"
click 2URL "http://localhost:9000/webpackUsage.html" "Visit <strong>mermaid docs</strong>"
</div>
<div class="mermaid">
gantt
dateFormat YYYY-MM-DD
axisFormat %d/%m
title Adding GANTT diagram to mermaid
excludes weekdays 2014-01-10
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Clickable
Visit mermaidjs :active, cl1, 2014-01-07,2014-01-10
Calling a Callback (look at the console log) :cl2, after cl1, 3d
Calling a Callback with args :cl3, after cl1, 3d
click cl1 href "http://localhost:9000/webpackUsage.html"
click cl2 call clickByGantt()
click cl3 call clickByGantt("test1", test2, test3)
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page : 20h
Add another diagram to demo page : 48h
</div>
<script src="./mermaid.js"></script>
<script>
function clickByFlow(elemName) {
const div = document.createElement('div')
div.className = 'created-by-click'
div.style = 'padding: 20px; background: green; color: white;'
div.innerText = 'Clicked By Flow'
document.getElementsByTagName('body')[0].appendChild(div)
}
function clickByGantt(arg1, arg2, arg3) {
const div = document.createElement('div')
div.className = 'created-by-gant-click'
div.style = 'padding: 20px; background: green; color: white;'
div.innerText = 'Clicked By Gant'
if (arg1) div.innerText += ' ' + arg1;
if (arg2) div.innerText += ' ' + arg2;
if (arg3) div.innerText += ' ' + arg3;
document.getElementsByTagName('body')[0].appendChild(div)
}
mermaid.initialize({ startOnLoad: true, securityLevel: 'strict', logLevel: 1 });
</script>
</body>
</html>

View File

@@ -0,0 +1,188 @@
<html>
<head>
<link
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
rel="stylesheet"
/>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet">
<style>
body {
/* background: rgb(221, 208, 208); */
/* background:#333; */
font-family: 'Arial';
}
h1 { color: grey;}
.mermaid2 {
display: none;
}
</style>
</head>
<body>
<h1>info below</h1>
<div class="flex">
<div class="mermaid2" style="width: 50%; height: 20%;">
flowchart BT
subgraph two
b1
end
subgraph three
c1-->c2
end
c1 --apa apa apa--> b1
two --> c2
</div>
<div class="mermaid2" style="width: 50%; height: 200px;">
sequenceDiagram
Alice->>Bob:Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
</div>
<div class="mermaid2" style="width: 50%; height: 200px;">
%%{init: {'securityLevel': 'loose'}}%%
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{{Let me think...<br />Do I want something for work,<br />something to spend every free second with,<br />or something to get around?}}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[Car]
click A "index.html#link-clicked" "link test"
click B callback "click test"
classDef someclass fill:#f96;
class A someclass;
class C someclass;
</div>
<div class="mermaid2" style="width: 50%; height: 200px;">
flowchart BT
subgraph a
b1 -- ok --> b2
end
a -- sert --> c
c --> d
b1 --> d
a --asd123 --> d
</div>
<div class="mermaid2" style="width: 50%; height: 20%;">
stateDiagram-v2
state A {
B1 --> B2: ok
}
A --> C: sert
C --> D
B1 --> D
A --> D: asd123
</div>
</div>
<div class="mermaid" style="width: 50%; height: 40%;">
%% this does not produce the desired result
flowchart TB
subgraph container_Beta
process_C-->Process_D
end
subgraph container_Alpha
process_A-->process_B
process_B-->|via_AWSBatch|container_Beta
process_A-->|messages|process_C
end
</div>
<div class="mermaid" style="width: 50%; height: 40%;">
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#ff0000'}}}%%
flowchart TB
b-->B
a-->c
subgraph O
A
end
subgraph B
c
end
subgraph A
a
b
B
end
</div>
<div class="mermaid" style="width: 50%; height: 50%;">
flowchart TB
internet
nat
routeur
lb1
lb2
compute1
compute2
subgraph project
routeur
nat
subgraph subnet1
compute1
lb1
end
subgraph subnet2
compute2
lb2
end
end
internet --> routeur
routeur --> subnet1 & subnet2
subnet1 & subnet2 --> nat --> internet
</div>
<div class="mermaid" style="width: 50%; height: 50%;">
flowchart TD
subgraph one[One]
subgraph sub_one[Sub One]
_sub_one
end
end
subgraph two[Two]
_two
end
sub_one --> two
</div>
<div class="mermaid" style="width: 50%; height: 50%;">
flowchart TD
subgraph one[One]
subgraph sub_one[Sub One]
_sub_one
end
subgraph sub_two[Sub Two]
_sub_two
end
_one
end
%% here, either the first or the second one
sub_one --> sub_two
_one --> b
</div>
<script src="./mermaid.js"></script>
<script>
mermaid.parseError = function (err, hash) {
// console.error('Mermaid error: ', err);
};
mermaid.initialize({
// theme: 'forest',
// themeVariables:{primaryColor: '#ff0000'},
// arrowMarkerAbsolute: true,
// themeCSS: '.edgePath .path {stroke: red;} .arrowheadPath {fill: red;}',
logLevel: 0,
flowchart: { curve: 'cardinal', "htmlLabels": false },
// gantt: { axisFormat: '%m/%d/%Y' },
sequence: { actorMargin: 50, showSequenceNumbers: true },
// sequenceDiagram: { actorMargin: 300 } // deprecated
fontFamily: '"arial", sans-serif',
curve: 'cardinal',
securityLevel: 'strict'
});
function callback(){alert('It worked');}
</script>
</body>
</html>

View File

@@ -0,0 +1,129 @@
<html>
<head>
<link
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
rel="stylesheet"
/>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet">
<style>
body {
/* background: rgb(221, 208, 208); */
/* background:#333; */
font-family: 'Arial';
}
h1 { color: grey;}
.mermaid2 {
display: none;
}
</style>
</head>
<body>
<h1>info below</h1>
<div class="flex">
<div class="mermaid2" style="width: 50%; height: 20%;">
flowchart BT
subgraph two
b1
end
subgraph three
c1-->c2
end
c1 --apa apa apa--> b1
two --> c2
</div>
<div class="mermaid2" style="width: 50%; height: 200px;">
sequenceDiagram
Alice->>Bob:Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
</div>
<div class="mermaid2" style="width: 50%; height: 200px;">
%%{init: {'securityLevel': 'loose'}}%%
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{{Let me think...<br />Do I want something for work,<br />something to spend every free second with,<br />or something to get around?}}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[Car]
click A "index.html#link-clicked" "link test"
click B callback "click test"
classDef someclass fill:#f96;
class A someclass;
class C someclass;
</div>
<div class="mermaid2" style="width: 50%; height: 200px;">
flowchart BT
subgraph a
b1 -- ok --> b2
end
a -- sert --> c
c --> d
b1 --> d
a --asd123 --> d
</div>
<div class="mermaid2" style="width: 50%; height: 20%;">
stateDiagram-v2
state A {
B1 --> B2: ok
}
A --> C: sert
C --> D
B1 --> D
A --> D: asd123
</div>
</div>
<div class="mermaid2" style="width: 50%; height: 20%;">
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#ff0000'}}}%%
flowchart LR
a -->b
subgraph A
B
end
subgraph B
b
end
</div>
<div class="mermaid" style="width: 50%; height: 20%;">
flowchart TB
subgraph A
b-->B
a-->c
end
subgraph B
c
end
</div>
<div class="mermaid2" style="width: 50%; height: 20%;">
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
Note over Alice,Bob: Looks
Note over Bob,Alice: Looks back
</div>
<script src="./mermaid.js"></script>
<script>
mermaid.parseError = function (err, hash) {
// console.error('Mermaid error: ', err);
};
mermaid.initialize({
// theme: 'forest',
// themeVariables:{primaryColor: '#ff0000'},
// arrowMarkerAbsolute: true,
// themeCSS: '.edgePath .path {stroke: red;} .arrowheadPath {fill: red;}',
logLevel: 0,
flowchart: { curve: 'cardinal', "htmlLabels": false },
// gantt: { axisFormat: '%m/%d/%Y' },
sequence: { actorMargin: 50, showSequenceNumbers: true },
// sequenceDiagram: { actorMargin: 300 } // deprecated
fontFamily: '"arial", sans-serif',
curve: 'cardinal',
securityLevel: 'strict'
});
function callback(){alert('It worked');}
</script>
</body>
</html>

52
cypress/platform/e2e.html Normal file
View File

@@ -0,0 +1,52 @@
<html>
<head>
<meta charset="utf-8"/>
<!-- <meta charset="iso-8859-15"/> -->
<script src="/e2e.js"></script>
<!-- <link href="https://fonts.googleapis.com/css?family=Mansalva&display=swap" rel="stylesheet" /> -->
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet">
<style>
body {
/* font-family: 'Mansalva', cursive;*/
/* font-family: 'Mansalva', cursive; */
/* font-family: 'arial'; */
/* font-family: "trebuchet ms", verdana, arial; */
}
/* div {
font-family: 'arial';
} */
/* .mermaid-main-font {
font-family: "trebuchet ms", verdana, arial;
font-family: var(--mermaid-font-family);
} */
/* :root {
--mermaid-font-family: '"trebuchet ms", verdana, arial';
--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive;
--mermaid-font-family: '"Lucida Console", Monaco, monospace';
} */
svg {
border: 2px solid darkred;
}
.exClass2 > rect, .exClass {
fill: greenyellow !important;
}
</style>
</head>
<body>
<script src="./mermaid.js"></script>
<script>
// Notice startOnLoad=false
// This prevents default handling in mermaid from render before the e2e logic is applied
// mermaid.initialize({
// startOnLoad: false,
// useMaxWidth: true,
// // "themeCSS": ":root { --mermaid-font-family: \"trebuchet ms\", verdana, arial;}",
// // fontFamily: '\"trebuchet ms\", verdana, arial;'
// // fontFamily: '"Comic Sans MS", "Comic Sans", cursive'
// // fontFamily: '"Mansalva", cursive',
// // fontFamily: '"Noto Sans SC", sans-serif'
// fontFamily: '"Noto Sans SC", sans-serif'
// });
</script>
</body>
</html>

View File

@@ -0,0 +1,46 @@
<html>
<head>
<link
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
rel="stylesheet"
/>
<style>body {
font-family: 'trebuchet ms', verdana, arial;
}</style>
</head>
<body>
<div class="mermaid">
graph TB
subgraph One
a1-->a2-->a3
end
</div>
<div class="mermaid">
graph TB
a_a --> b_b:::apa --> c_c:::apa
classDef apa fill:#f9f,stroke:#333,stroke-width:4px;
class a_a apa;
</div>
<div class="mermaid">
graph TB
a_a(Aftonbladet) --> b_b[gorilla]:::apa --> c_c{chimp}:::apa -->a_a
a_a --> c --> d_d --> c_c
classDef apa fill:#f9f,stroke:#333,stroke-width:4px;
class a_a apa;
click a_a "http://www.aftonbladet.se" "apa"
</div>
<script src="./mermaid.js"></script>
<script>
mermaid.initialize({
theme: 'forest',
// themeCSS: '.node rect { fill: red; }',
logLevel: 3,
flowchart: { curve: 'linear' },
gantt: { axisFormat: '%m/%d/%Y' },
sequence: { actorMargin: 50 },
// sequenceDiagram: { actorMargin: 300 } // deprecated
});
</script>
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,26 @@
<html>
<head>
<link
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
rel="stylesheet"
/>
</head>
<body>
<h1>info below</h1>
<div class="mermaid">info</div>
<script src="./mermaid.js"></script>
<script>
mermaid.initialize({
theme: 'forest',
// themeCSS: '.node rect { fill: red; }',
logLevel: 3,
flowchart: { curve: 'linear' },
gantt: { axisFormat: '%m/%d/%Y' },
sequence: { actorMargin: 50 },
// sequenceDiagram: { actorMargin: 300 } // deprecated
});
</script>
</script>
</body>
</html>

View File

@@ -0,0 +1,122 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Mermaid Quick Test Page</title>
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=">
<style>
.mermaid2 {
display: none;
}
</style>
</head>
<body>
<div style="display: flex">
<div id="FirstLine" class="mermaid">
graph TB
Function-->URL
click Function clickByFlow "Add a div"
click URL "http://localhost:9000/webpackUsage.html" "Visit <strong>mermaid docs</strong>"
</div>
<div id="FirstLine" class="mermaid2">
graph TB
1Function-->2URL
click 1Function clickByFlow "Add a div"
click 2URL "http://localhost:9000/webpackUsage.html" "Visit <strong>mermaid docs</strong>"
</div>
<div id="FirstLine" class="mermaid2">
classDiagram
class Test
class ShapeLink
link ShapeLink "http://localhost:9000/webpackUsage.html" "This is a tooltip for a link"
class ShapeCallback
callback ShapeCallback "clickByClass" "This is a tooltip for a callback"
</div>
<div id="FirstLine" class="mermaid">
classDiagram-v2
class ShapeCallback
callback ShapeCallback "clickByClass" "This is a tooltip for a callback"
</div>
<div id="FirstLine" class="mermaid">
classDiagram-v2
class ShapeLink
link ShapeLink "http://localhost:9000/webpackUsage.html" "This is a tooltip for a link"
</div>
</div>
<div class="mermaid2">
gantt
dateFormat YYYY-MM-DD
axisFormat %d/%m
title Adding GANTT diagram to mermaid
excludes weekdays 2014-01-10
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Clickable
Visit mermaidjs :active, cl1, 2014-01-07,2014-01-10
Calling a Callback (look at the console log) :cl2, after cl1, 3d
Calling a Callback with args :cl3, after cl1, 3d
click cl1 href "http://localhost:9000/webpackUsage.html"
click cl2 call clickByGantt()
click cl3 call clickByGantt("test1", test2, test3)
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page : 20h
Add another diagram to demo page : 48h
</div>
<script src="./mermaid.js"></script>
<script>
function clickByFlow(elemName) {
const div = document.createElement('div')
div.className = 'created-by-click'
div.style = 'padding: 20px; background: green; color: white;'
div.innerText = 'Clicked By Flow'
document.getElementsByTagName('body')[0].appendChild(div)
}
function clickByGantt(arg1, arg2, arg3) {
const div = document.createElement('div')
div.className = 'created-by-gant-click'
div.style = 'padding: 20px; background: green; color: white;'
div.innerText = 'Clicked By Gant'
if (arg1) div.innerText += ' ' + arg1;
if (arg2) div.innerText += ' ' + arg2;
if (arg3) div.innerText += ' ' + arg3;
document.getElementsByTagName('body')[0].appendChild(div)
}
function clickByClass() {
const div = document.createElement('div')
div.className = 'created-by-class-click'
div.style = 'padding: 20px; background: purple; color: white;'
div.innerText = 'Clicked By Class'
document.getElementsByTagName('body')[0].appendChild(div)
}
mermaid.initialize({ startOnLoad: true, securityLevel: 'loose', logLevel: 1 });
</script>
</body>
</html>

123
cypress/platform/knsv.html Normal file
View File

@@ -0,0 +1,123 @@
<html>
<head>
<link
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
rel="stylesheet"
/>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet">
<style>
body {
/* background: rgb(221, 208, 208); */
/* background:#333; */
font-family: 'Arial';
}
h1 { color: grey;}
.mermaid2 {
display: none;
}
</style>
</head>
<body>
<h1>info below</h1>
<div class="flex">
<div class="mermaid2" style="width: 50%; height: 400px;">
graph TD
A[Christmas] ==> D
A[Christmas] -->|Get money| B(Go shopping)
A[Christmas] ==> C
subgraph T ["Test"]
A
B
C
end
classDef Test fill:#F84E68,stroke:#333,color:white;
class A,T Test
classDef TestSub fill:green;
class T TestSub
linkStyle 0,1 color:orange, stroke: orange;
</div>
<div class="mermaid2" style="width: 50%; height: 400px;">
flowchart TD
A[Christmas] ==> D
A[Christmas] -->|Get money| B(Go shopping)
A[Christmas] ==> C
subgraph T ["Test"]
A
B
C
end
classDef Test fill:#F84E68,stroke:#333,color:white;
class A,T Test
classDef TestSub fill:green;
class T TestSub
linkStyle 0,1 color:orange, stroke: orange;
</div>
<div class="mermaid" style="width: 50%; height: 20%;">
graph TD
C -->|fa:fa-car Car| F[fa:fa-car Car]
</div>
<div class="mermaid" style="width: 50%; height: 20%;">
flowchart TD
C -->|fa:fa-car Car| F[fa:fa-car Car]
</div>
<div class="mermaid2" style="width: 50%; height: 20%;">
%%{init: {"fontFamily": "arial2"}}%%
graph TD
A[Christmas]
</div>
<div class="mermaid2" style="width: 50%; height: 20%;">
flowchart TD
L1 --- L2
L2 --- C
M1 ---> C
R1 .-> R2
R2 <.-> C
C -->|Label 1| E1
C <-- Label 2 ---> E2
C ----> E3
C <-...-> E4
C ======> E5
</div>
<div class="mermaid2" style="width: 50%; height: 20%;">
graph TD
L1 --- L2
L2 --- C
M1 ---> C
R1 .-> R2
R2 <.-> C
C -->|Label 1| E1
C -- Label 2 ---> E2
C ----> E3
C -----> E4
C ======> E5
</div>
<script src="./mermaid.js"></script>
<script>
mermaid.parseError = function (err, hash) {
// console.error('Mermaid error: ', err);
};
mermaid.initialize({
// theme: 'forest',
// themeVariables:{primaryColor: '#ff0000'},
// arrowMarkerAbsolute: true,
// themeCSS: '.edgePath .path {stroke: red;} .arrowheadPath {fill: red;}',
logLevel: 0,
flowchart: { curve: 'cardinal', htmlLabels: true },
htmlLabels: true,
// gantt: { axisFormat: '%m/%d/%Y' },
sequence: { actorFontFamily: 'courier',actorMargin: 50, showSequenceNumbers: true },
// sequenceDiagram: { actorMargin: 300 } // deprecated
// fontFamily: '"arial", sans-serif',
fontFamily: 'courier',
curve: 'cardinal',
securityLevel: 'loose'
});
function callback(){alert('It worked');}
</script>
</body>
</html>

View File

@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Mermaid Quick Test Page</title>
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=">
</head>
<body>
<div id="graph">
</div>
<script src="./mermaid.js"></script>
<script>
mermaid.init({ startOnLoad: false });
mermaid.mermaidAPI.initialize();
try{
mermaid.mermaidAPI.render("graphDiv",
`>`);
} catch(e){}
mermaid.mermaidAPI.render("graphDiv",
`graph LR\n a --> b`, html => {
document.getElementById('graph').innerHTML=html;
});
</script>
</body>
</html>

View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Mermaid Quick Test Page</title>
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=">
</head>
<body>
<div id="graph">
</div>
<script src="./mermaid.js"></script>
<script>
mermaid.init({ startOnLoad: false });
mermaid.mermaidAPI.initialize();
rerender('XMas');
function rerender(text) {
var graphText = `graph TD
A[${text}] -->|Get money| B(Go shopping)`
var graph = mermaid.mermaidAPI.render('id', graphText);
console.log('\x1b[35m%s\x1b[0m', '>> graph', graph)
document.getElementById('graph').innerHTML=graph;
}
</script>
<button id="rerender" onclick="rerender('Saturday')">Rerender</button>
</body>
</html>

View File

@@ -0,0 +1,251 @@
<html>
<head>
<link
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
rel="stylesheet"
/>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet">
<style>
body {
/* background: rgb(221, 208, 208); */
background: #f4f4f4;
font-family: 'Arial';
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
h1 { color: grey;}
.mermaid2 {
display: none;
}
.height {
min-height: 600px;
height: 600px;
}
.height2 {
min-height: 600px;
height: 1300px;
}
.width {
width: 33%;
border: 1px solid blue;
padding: 10px;
}
</style>
</head>
<body>
<h1>Showcases of diagrams</h1>
<div class="flex flex-wrap">
<div class="mermaid width height">
%%{init2: {'securityLevel': 'loose', 'theme':'base'}}%%
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[/Another/]
C ==>|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
subgraph section
C
D
E
F
G
end
</div>
<div class="mermaid width height">
%%{init2: {'securityLevel': 'loose', 'theme':'base'}}%%
flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[Another]
C ==>|One| D[Laptop]
C x--x|Two| E[iPhone]
C o--o|Three| F[fa:fa-car Car]
subgraph section
C
D
E
F
G
end
</div>
<div class="mermaid width height" >
%%{init2: {'securityLevel': 'loose', 'theme':'base'}}%%
sequenceDiagram
autonumber
par Action 1
Alice->>John: Hello John, how are you?
and Action 2
Alice->>Bob: Hello Bob, how are you?
end
Alice->>+John: Hello John, how are you?
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
Note right of John: John is perceptive
John-->>-Alice: I feel great!
loop Every minute
John-->Alice: Great!
end
</div>
<div class="mermaid width height" >
%%{init: {'securityLevel': 'loose', 'theme':'base'}}%%
classDiagram
Animal "1" <|-- Duck
Animal <|-- Fish
Animal <--o Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
</div>
<div class="mermaid width height">
gantt
dateFormat :YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid
excludes :excludes the named dates/days from being included in a charted task..
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page :20h
Add another diagram to demo page :48h
</div>
<div class="mermaid width height2">
%%{init2: {'securityLevel': 'loose', 'theme':'base'}}%%
stateDiagram
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
state SomethingElse {
A --> B
B --> A
}
Active --> SomethingElse
note right of SomethingElse : This is the note to the right.
SomethingElse --> [*]
</div>
<div class="mermaid width height2">
%%{init: {'securityLevel': 'loose', 'theme':'base'}}%%
stateDiagram-v2
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
state SomethingElse {
A --> B
B --> A
}
Active --> SomethingElse2
note right of SomethingElse2 : This is the note to the right.
SomethingElse2 --> [*]
</div>
<div class="mermaid width height2">
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
</div>
<div class="mermaid width height">
journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 5: Me
</div>
<script src="./mermaid.js"></script>
<script>
mermaid.parseError = function (err, hash) {
// console.error('Mermaid error: ', err);
};
mermaid.initialize({
theme: 'base',
// themeVariables:
// arrowMarkerAbsolute: true,
// themeCSS: '.edgePath .path {stroke: red;} .arrowheadPath {fill: red;}',
logLevel: 0,
flowchart: { curve: 'cardinal', "htmlLabels": false },
// gantt: { axisFormat: '%m/%d/%Y' },
sequence: { actorMargin: 50, showSequenceNumbers: true },
// sequenceDiagram: { actorMargin: 300 } // deprecated
fontFamily: '"arial", sans-serif',
curve: 'cardinal',
securityLevel: 'strict'
});
function callback(){alert('It worked');}
</script>
</body>
</html>

View File

@@ -0,0 +1,245 @@
<html>
<head>
<link
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
rel="stylesheet"
/>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet">
<style>
body {
/* background: rgb(221, 208, 208); */
background: #f4f4f4;
background: #222;
font-family: 'Arial';
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
h1 { color: grey;}
.mermaid2 {
display: none;
}
.height {
min-height: 600px;
height: 600px;
}
.height2 {
min-height: 600px;
height: 1300px;
}
.width {
width: 33%;
border: 1px solid blue;
padding: 10px;
}
</style>
</head>
<body>
<h1>Showcases of diagrams</h1>
<div class="flex flex-wrap">
<div class="mermaid width height">
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[/Another/]
C ==>|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
subgraph section
C
D
E
F
G
end
</div>
<div class="mermaid width height">
%%{init2: {'securityLevel': 'loose', 'theme':'base'}}%%
flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[Another]
C ==>|One| D[Laptop]
C x--x|Two| E[iPhone]
C o--o|Three| F[fa:fa-car Car]
subgraph section
C
D
E
F
G
end
</div>
<div class="mermaid width height" >
sequenceDiagram
autonumber
par Action 1
Alice->>John: Hello John, how are you?
and Action 2
Alice->>Bob: Hello Bob, how are you?
end
Alice->>+John: Hello John, how are you?
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
Note right of John: John is perceptive
John-->>-Alice: I feel great!
loop Every minute
John-->Alice: Great!
end
</div>
<div class="mermaid width height" >
classDiagram
Animal "1" <|-- Duck
Animal <|-- Fish
Animal <--o Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
</div>
<div class="mermaid width height">
gantt
dateFormat :YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid
excludes :excludes the named dates/days from being included in a charted task..
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page :20h
Add another diagram to demo page :48h
</div>
<div class="mermaid width height2">
stateDiagram
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
state SomethingElse {
A --> B
B --> A
}
Active --> SomethingElse
note right of SomethingElse : This is the note to the right.
SomethingElse --> [*]
</div>
<div class="mermaid width height2">
stateDiagram-v2
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
state SomethingElse {
A --> B
B --> A
}
Active --> SomethingElse2
note right of SomethingElse2 : This is the note to the right.
SomethingElse2 --> [*]
</div>
<div class="mermaid width height2">
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
</div>
<div class="mermaid width height">
journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 5: Me
</div>
<script src="./mermaid.js"></script>
<script>
mermaid.parseError = function (err, hash) {
// console.error('Mermaid error: ', err);
};
mermaid.initialize({
theme: 'base',
themeVariables: { primaryColor: '#9400D3', darkMode: true, background: '#222', textColor:'white', primaryTextColor: '#f4f4f4', nodeBkg: '#ff0000', mainBkg:'#0000ff', tertiaryColor:'#ffffcc' },
// arrowMarkerAbsolute: true,
// themeCSS: '.edgePath .path {stroke: red;} .arrowheadPath {fill: red;}',
logLevel: 0,
flowchart: { curve: 'cardinal', "htmlLabels": false },
// gantt: { axisFormat: '%m/%d/%Y' },
sequence: { actorMargin: 50, showSequenceNumbers: true },
// sequenceDiagram: { actorMargin: 300 } // deprecated
fontFamily: '"arial", sans-serif',
curve: 'cardinal',
// securityLevel: 'strict'
});
function callback(){alert('It worked');}
</script>
</body>
</html>

View File

@@ -0,0 +1,242 @@
<html>
<head>
<link
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
rel="stylesheet"
/>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet">
<style>
body {
/* background: rgb(221, 208, 208); */
background:#333;
font-family: 'Arial';
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
h1 { color: grey;}
.mermaid2 {
display: none;
}
.height {
min-height: 600px;
height: 600px;
}
.height2 {
min-height: 600px;
height: 1300px;
}
.width {
width: 33%;
border: 1px solid blue;
padding: 10px;
}
</style>
</head>
<body>
<h1>Showcases of diagrams</h1>
<div class="flex flex-wrap">
<div class="mermaid width height">
%%{init: {'theme': 'base', 'themeVariables':{'primaryColor': '#ff0000'}}%%
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[/Another/]
C ==>|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
subgraph section
C
D
E
F
G
end
</div>
<div class="mermaid width height">
flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[Another]
C ==>|One| D[Laptop]
C x--x|Two| E[iPhone]
C o--o|Three| F[fa:fa-car Car]
subgraph section
C
D
E
F
G
end
</div>
<div class="mermaid width height" >
sequenceDiagram
autonumber
par Action 1
Alice->>John: Hello John, how are you?
and Action 2
Alice->>Bob: Hello Bob, how are you?
end
Alice->>+John: Hello John, how are you?
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
Note right of John: John is perceptive
John-->>-Alice: I feel great!
loop Every minute
John-->Alice: Great!
end
</div>
<div class="mermaid width height" >
%%{init: {'theme':'dark'}}%%
classDiagram
Animal "1" <|-- Duck
Animal <|-- Fish
Animal <--o Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
</div>
<div class="mermaid width height">
gantt
dateFormat :YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid
excludes :excludes the named dates/days from being included in a charted task..
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page :20h
Add another diagram to demo page :48h
</div>
<div class="mermaid width height2">
stateDiagram
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
state SomethingElse {
A --> B
B --> A
}
Active --> SomethingElse
SomethingElse --> [*]
note right of SomethingElse : This is the note to the right.
</div>
<div class="mermaid width height2">
stateDiagram-v2
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
state SomethingElse {
A --> B
B --> A
}
Active --> SomethingElse2
SomethingElse2 --> [*]
note right of SomethingElse2 : This is the note to the right.
</div>
<div class="mermaid width height2">
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
</div>
<div class="mermaid width height">
journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 5: Me
</div>
<script src="./mermaid.js"></script>
<script>
mermaid.parseError = function (err, hash) {
// console.error('Mermaid error: ', err);
};
mermaid.initialize({
theme: 'dark',
// arrowMarkerAbsolute: true,
// themeCSS: '.edgePath .path {stroke: red;} .arrowheadPath {fill: red;}',
logLevel: 0,
flowchart: { curve: 'cardinal', "htmlLabels": true },
// gantt: { axisFormat: '%m/%d/%Y' },
sequence: { actorMargin: 50, showSequenceNumbers: true },
// sequenceDiagram: { actorMargin: 300 } // deprecated
fontFamily: '"arial", sans-serif',
curve: 'cardinal',
securityLevel: 'strict'
});
function callback(){alert('It worked');}
</script>
</body>
</html>

View File

@@ -0,0 +1,237 @@
<html>
<head>
<link
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
rel="stylesheet"
/>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet">
<style>
body {
/* background: rgb(221, 208, 208); */
/* background:#333; */
font-family: 'Arial';
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
h1 { color: grey;}
.mermaid2 {
display: none;
}
.height {
min-height: 600px;
height: 600px;
}
.height2 {
min-height: 600px;
height: 1300px;
}
.width {
width: 33%;
border: 1px solid blue;
padding: 10px;
}
</style>
</head>
<body>
<h1>Showcases of diagrams</h1>
<div class="flex flex-wrap">
<div class="mermaid width height">
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[/Another/]
C ==>|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
subgraph section
C
D
E
F
G
end
</div>
<div class="mermaid width height">
flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[Another]
C ==>|One| D[Laptop]
C x--x|Two| E[iPhone]
C o--o|Three| F[fa:fa-car Car]
subgraph section
C
D
E
F
G
end
</div>
<div class="mermaid width height" >
sequenceDiagram
autonumber
par Action 1
Alice->>John: Hello John, how are you?
and Action 2
Alice->>Bob: Hello Bob, how are you?
end
Alice->>+John: Hello John, how are you?
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
Note right of John: John is perceptive
John-->>-Alice: I feel great!
loop Every minute
John-->Alice: Great!
end
</div>
<div class="mermaid width height" >
classDiagram
Animal "1" <|-- Duck
Animal <|-- Fish
Animal <--o Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
</div>
<div class="mermaid width height">
gantt
dateFormat :YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid
excludes :excludes the named dates/days from being included in a charted task..
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page :20h
Add another diagram to demo page :48h
</div>
<div class="mermaid width height2">
stateDiagram
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
state SomethingElse {
A --> B
B --> A
}
Active --> SomethingElse
note right of SomethingElse : This is the note to the right.
</div>
<div class="mermaid width height2">
stateDiagram-v2
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
state SomethingElse {
A --> B
B --> A
}
Active --> SomethingElse2
note right of SomethingElse2 : This is the note to the right.
</div>
<div class="mermaid width height2">
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
</div>
<div class="mermaid width height">
journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 5: Me
</div>
<script src="./mermaid.js"></script>
<script>
mermaid.parseError = function (err, hash) {
// console.error('Mermaid error: ', err);
};
mermaid.initialize({
// theme: 'dark',
// arrowMarkerAbsolute: true,
// themeCSS: '.edgePath .path {stroke: red;} .arrowheadPath {fill: red;}',
logLevel: 0,
flowchart: { curve: 'cardinal', "htmlLabels": false },
// gantt: { axisFormat: '%m/%d/%Y' },
sequence: { actorMargin: 50, showSequenceNumbers: true },
// sequenceDiagram: { actorMargin: 300 } // deprecated
fontFamily: '"arial", sans-serif',
curve: 'cardinal',
securityLevel: 'strict'
});
function callback(){alert('It worked');}
</script>
</body>
</html>

View File

@@ -0,0 +1,241 @@
<html>
<head>
<link
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
rel="stylesheet"
/>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet">
<style>
body {
/* background: rgb(221, 208, 208); */
/* background:#333; */
font-family: 'Arial';
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
h1 { color: grey;}
.mermaid2 {
display: none;
}
.height {
min-height: 600px;
height: 600px;
}
.height2 {
min-height: 600px;
height: 1300px;
}
.width {
width: 33%;
border: 1px solid blue;
padding: 10px;
}
</style>
</head>
<body>
<h1>Showcases of diagrams</h1>
<div class="flex flex-wrap">
<div class="mermaid width height">
%%{init: {'theme': 'forest'}}%%
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[/Another/]
C ==>|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
subgraph section
C
D
E
F
G
end
</div>
<div class="mermaid width height">
flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[Another]
C ==>|One| D[Laptop]
C x--x|Two| E[iPhone]
C o--o|Three| F[fa:fa-car Car]
subgraph section
C
D
E
F
G
end
</div>
<div class="mermaid width height" >
sequenceDiagram
autonumber
par Action 1
Alice->>John: Hello John, how are you?
and Action 2
Alice->>Bob: Hello Bob, how are you?
end
Alice->>+John: Hello John, how are you?
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
Note right of John: John is perceptive
John-->>-Alice: I feel great!
loop Every minute
John-->Alice: Great!
end
</div>
<div class="mermaid width height" >
%%{init: {'theme':'forest'}}%%
classDiagram
Animal "1" <|-- Duck
Animal <|-- Fish
Animal <--o Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
</div>
<div class="mermaid width height">
gantt
dateFormat :YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid
excludes :excludes the named dates/days from being included in a charted task..
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page :20h
Add another diagram to demo page :48h
</div>
<div class="mermaid width height2">
stateDiagram
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
state SomethingElse {
A --> B
B --> A
}
Active --> SomethingElse
note right of SomethingElse : This is the note to the right.
SomethingElse --> [*]
</div>
<div class="mermaid width height2">
stateDiagram-v2
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
state SomethingElse {
A --> B
B --> A
}
Active --> SomethingElse2
note right of SomethingElse2 : This is the note to the right.
</div>
<div class="mermaid width height2">
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
</div>
<div class="mermaid width height">
journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 5: Me
</div>
<script src="./mermaid.js"></script>
<script>
mermaid.parseError = function (err, hash) {
// console.error('Mermaid error: ', err);
};
mermaid.initialize({
theme: 'forest',
// arrowMarkerAbsolute: true,
// themeCSS: '.edgePath .path {stroke: red;} .arrowheadPath {fill: red;}',
logLevel: 0,
flowchart: { curve: 'cardinal', "htmlLabels": false },
// gantt: { axisFormat: '%m/%d/%Y' },
sequence: { actorMargin: 50, showSequenceNumbers: true },
// sequenceDiagram: { actorMargin: 300 } // deprecated
fontFamily: '"arial", sans-serif',
curve: 'cardinal',
securityLevel: 'strict'
});
function callback(){alert('It worked');}
</script>
</body>
</html>

View File

@@ -0,0 +1,240 @@
<html>
<head>
<link
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
rel="stylesheet"
/>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet">
<style>
body {
/* background: rgb(221, 208, 208); */
/* background:#333; */
font-family: 'Arial';
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
h1 { color: grey;}
.mermaid2 {
display: none;
}
.height {
min-height: 600px;
height: 600px;
}
.height2 {
min-height: 600px;
height: 1300px;
}
.width {
width: 33%;
border: 1px solid blue;
padding: 10px;
}
</style>
</head>
<body>
<h1>Showcases of diagrams</h1>
<div class="flex flex-wrap">
<div class="mermaid width height">
%%{init: {'theme': 'neutral'}}%%
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[/Another/]
C ==>|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
subgraph section
C
D
E
F
G
end
</div>
<div class="mermaid width height">
flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[Another]
C ==>|One| D[Laptop]
C x--x|Two| E[iPhone]
C o--o|Three| F[fa:fa-car Car]
subgraph section
C
D
E
F
G
end
</div>
<div class="mermaid width height" >
sequenceDiagram
autonumber
par Action 1
Alice->>John: Hello John, how are you?
and Action 2
Alice->>Bob: Hello Bob, how are you?
end
Alice->>+John: Hello John, how are you?
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
Note right of John: John is perceptive
John-->>-Alice: I feel great!
loop Every minute
John-->Alice: Great!
end
</div>
<div class="mermaid width height" >
%%{init: {'theme':'neutral'}}%%
classDiagram
Animal "1" <|-- Duck
Animal <|-- Fish
Animal <--o Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
</div>
<div class="mermaid width height">
gantt
dateFormat :YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid
excludes :excludes the named dates/days from being included in a charted task..
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page :20h
Add another diagram to demo page :48h
</div>
<div class="mermaid width height2">
stateDiagram
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
state SomethingElse {
A --> B
B --> A
}
Active --> SomethingElse
note right of SomethingElse : This is the note to the right.
</div>
<div class="mermaid width height2">
stateDiagram-v2
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
state SomethingElse {
A --> B
B --> A
}
Active --> SomethingElse2
note right of SomethingElse2 : This is the note to the right.
</div>
<div class="mermaid width height2">
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
</div>
<div class="mermaid width height">
journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 5: Me
</div>
<script src="./mermaid.js"></script>
<script>
mermaid.parseError = function (err, hash) {
// console.error('Mermaid error: ', err);
};
mermaid.initialize({
theme: 'neutral',
// arrowMarkerAbsolute: true,
// themeCSS: '.edgePath .path {stroke: red;} .arrowheadPath {fill: red;}',
logLevel: 0,
flowchart: { curve: 'cardinal', "htmlLabels": false },
// gantt: { axisFormat: '%m/%d/%Y' },
sequence: { actorMargin: 50, showSequenceNumbers: true },
// sequenceDiagram: { actorMargin: 300 } // deprecated
fontFamily: '"arial", sans-serif',
curve: 'cardinal',
securityLevel: 'strict'
});
function callback(){alert('It worked');}
</script>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More