MC-1730 Fix for data-et as cluster

This commit is contained in:
Ashish Jain
2024-07-08 14:52:07 +02:00
parent df7de0e796
commit d7497c179e
6 changed files with 10184 additions and 8050 deletions

View File

@@ -57,7 +57,7 @@
</style> </style>
</head> </head>
<body> <body>
<pre id="diagram" class="mermaid"> <pre id="diagram" class="mermaid2">
%%{init: {"look": "neo", "theme": "neo","fontFamily": "Arial"} }%% %%{init: {"look": "neo", "theme": "neo","fontFamily": "Arial"} }%%
flowchart flowchart
A[A really really really super long node] --> B & C A[A really really really super long node] --> B & C
@@ -66,7 +66,7 @@ flowchart
end end
</pre </pre
> >
<pre id="diagram" class="mermaid"> <pre id="diagram" class="mermaid2">
%%{init: {"look": "neo", "theme": "forest","fontFamily": "Arial", "themeVariables": { %%{init: {"look": "neo", "theme": "forest","fontFamily": "Arial", "themeVariables": {
"useGradient": true, "useGradient": true,
"gradientStart": '#fff', "gradientStart": '#fff',
@@ -94,15 +94,30 @@ flowchart LR
class C ash class C ash
style C stroke:#00f, fill:black style C stroke:#00f, fill:black
</pre>
<!-- Flowchart with subgraph-->
<pre id="diagram3" class="mermaid">
flowchart TB
c1-->a2
subgraph one
a1-->a2
end
subgraph two
b1-->b2
end
subgraph three
c1-->c2
end
</pre> </pre>
<pre id="diagram4" class="mermaid2"> <pre id="diagram4" class="mermaid">
stateDiagram stateDiagram-v2
A:::foo [*] --> First
B:::bar --> C:::foobar state First {
classDef foo stroke:#f00 [*] --> second
classDef bar stroke:#0f0 second --> [*]
style C stroke:#00f, fill:black, color:white }
</pre> </pre>

View File

@@ -1,7 +1,7 @@
// @ts-nocheck File not ready to check types // @ts-nocheck File not ready to check types
import { curveLinear } from 'd3'; import { curveLinear } from 'd3';
import ELK from 'elkjs/lib/elk.bundled.js'; import ELK from 'elkjs/lib/elk.bundled.js';
import mermaid, { type LayoutData } from 'mermaid'; import { type LayoutData } from 'mermaid';
import { type TreeData, findCommonAncestor } from './find-common-ancestor.js'; import { type TreeData, findCommonAncestor } from './find-common-ancestor.js';
const { const {

View File

@@ -1,6 +1,6 @@
{ {
"name": "@mermaid-chart/mermaid", "name": "@mermaid-chart/mermaid",
"version": "11.0.0-b.38", "version": "11.0.0-b.41",
"description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", "description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
"type": "module", "type": "module",
"module": "./dist/mermaid.core.mjs", "module": "./dist/mermaid.core.mjs",

View File

@@ -149,7 +149,7 @@ There are ten types of arrows currently supported:
| `-->` | Dotted line without arrow | | `-->` | Dotted line without arrow |
| `->>` | Solid line with arrowhead | | `->>` | Solid line with arrowhead |
| `-->>` | Dotted line with arrowhead | | `-->>` | Dotted line with arrowhead |
| `<<->>` | Solid line with bidirectional arrowheads (v<MERMAID_RELEASE_VERSION>+) | | `<<->>` | Solid line with bidirectional arrowheads (v11.0.0-b.41+) |
| `<<-->>` | Dotted line with bidirectional arrowheads (v<MERMAID_RELEASE_VERSION>+) | | `<<-->>` | Dotted line with bidirectional arrowheads (v<MERMAID_RELEASE_VERSION>+) |
| `-x` | Solid line with a cross at the end | | `-x` | Solid line with a cross at the end |
| `--x` | Dotted line with a cross at the end. | | `--x` | Dotted line with a cross at the end. |

View File

@@ -179,8 +179,7 @@ const roundedWithTitle = async (parent, node) => {
.insert('g') .insert('g')
.attr('class', node.cssClasses) .attr('class', node.cssClasses)
.attr('id', node.id) .attr('id', node.id)
.attr('data-et', 'node') .attr('data-et', 'cluster')
.attr('data-node', 'true')
.attr('data-id', node.id) .attr('data-id', node.id)
.attr('data-look', node.look); .attr('data-look', node.look);

18190
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff