You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config/usage.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,11 @@ Mermaid can load multiple diagrams, in the same page.
98
98
> Try it out, save this code as HTML and load it using any browser.
99
99
> (Except Internet Explorer, please don't use Internet Explorer.)
100
100
101
+
## Tiny Mermaid
102
+
103
+
We have a smaller version of mermaid that is almost half the size of the full library.
104
+
If you need a leaner version without some additional features, you can use the [Mermaid Tiny](https://github.com/mermaid-js/mermaid/tree/develop/packages/tiny) library.
105
+
101
106
## Enabling Click Event and Tags in Nodes
102
107
103
108
A `securityLevel` configuration has to first be cleared. `securityLevel` sets the level of trust for the parsed diagrams and limits click functionality. This was introduced in version 8.2 as a security improvement, aimed at preventing malicious use.
Copy file name to clipboardExpand all lines: packages/mermaid/src/docs/config/usage.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,6 +92,11 @@ Mermaid can load multiple diagrams, in the same page.
92
92
> Try it out, save this code as HTML and load it using any browser.
93
93
> (Except Internet Explorer, please don't use Internet Explorer.)
94
94
95
+
## Tiny Mermaid
96
+
97
+
We have a smaller version of mermaid that is almost half the size of the full library.
98
+
If you need a leaner version without some additional features, you can use the [Mermaid Tiny](https://github.com/mermaid-js/mermaid/tree/develop/packages/tiny) library.
99
+
95
100
## Enabling Click Event and Tags in Nodes
96
101
97
102
A `securityLevel` configuration has to first be cleared. `securityLevel` sets the level of trust for the parsed diagrams and limits click functionality. This was introduced in version 8.2 as a security improvement, aimed at preventing malicious use.
Copy file name to clipboardExpand all lines: packages/tiny/README.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,10 @@
2
2
3
3
This is a tiny version of mermaid that is optimized for the web. It is a subset of the mermaid library and is designed to be used in the browser via CDN.
4
4
5
-
## Usage via NPM
5
+
## Lazy loading
6
6
7
-
This package is not meant to be installed directly from npm. It is designed to be used via CDN.
8
-
If you need to use mermaid in your project, please install the full [`mermaid` package](https://www.npmjs.com/package/mermaid) instead.
7
+
The original mermaid library supports lazy loading, so it will be faster on the initial load, and only load the required diagrams.
8
+
This is not supported in the tiny mermaid library. So it's always recommended to use the full mermaid library unless you have a very specific reason to reduce the bundle size.
9
9
10
10
## Removals from mermaid
11
11
@@ -14,6 +14,12 @@ This does not support
14
14
- Mindmap Diagram
15
15
- Architecture Diagram
16
16
- Katex rendering
17
+
- Lazy loading
18
+
19
+
## Usage via NPM
20
+
21
+
This package is not meant to be installed directly from npm. It is designed to be used via CDN.
22
+
If you need to use mermaid in your project, please install the full [`mermaid` package](https://www.npmjs.com/package/mermaid) instead.
0 commit comments