Skip to content

Commit acc69f1

Browse files
authored
Merge pull request #8022 from mermaid-js/release/11.16.1
Release Candidate 11.16.1
2 parents 7c0cafc + eba7287 commit acc69f1

36 files changed

Lines changed: 591 additions & 380 deletions

‎.changeset/cold-pillows-judge.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'mermaid': patch
3+
---
4+
5+
fix: handle CSS sibling combinators in compileCSS
6+
7+
author: aloisklink
8+
commit: 12d472c9ed43f94814b110da8d7a9ae6dd5266ed

‎.changeset/curly-lands-taste.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'mermaid': patch
3+
---
4+
5+
fix: increase protections against prototype pollution
6+
7+
User-controlled input already has protections against prototype pollution.
8+
9+
Fixes: GHSA-c4c3-pg64-4m4v
10+
11+
commit: 2cd6dcf735533b323507e3e889ffdea870540b43
12+
author: @aloisklink

‎.changeset/dry-ducks-agree.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'mermaid': patch
3+
---
4+
5+
fix(architecture): use `Map`s and `Set`s to store groups/services
6+
7+
Services are now rendered in the order they are defined and more service IDs
8+
are now supported.
9+
10+
author: aloisklink
11+
commit: 99af3fc35ef0a9a9c8c6314521344d67523ddccf

‎.changeset/proud-breads-stick.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'mermaid': minor
3+
---
4+
5+
deprecate: Deprecate the `mermaidAPI.setConfig()` function
6+
7+
commit: 2cd6dcf735533b323507e3e889ffdea870540b43
8+
author: @aloisklink

‎.changeset/solid-clubs-care.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'mermaid': patch
3+
---
4+
5+
fix(xychart): support zero-width x-axis ranges
6+
7+
author: aloisklink
8+
commit: 630aa7e5dd417e1f56bff2a1ce8df2c5ad08d289

‎.changeset/wet-emus-sit.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'mermaid': patch
3+
---
4+
5+
fix(radar): limit number of ticks to 32
6+
7+
Setting a ticks value higher than this would only show 32 ticks.
8+
9+
commit: 59b22fad2b3bb04f87a476c84a8a2b24679e607e

‎.cspell/misc-terms.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ BRANDES
22
browserlist
33
Buzan
44
circo
5+
GHSA
56
handDrawn
67
KOEPF
78
MMLU

‎cypress/integration/rendering/xychart/xyChart.spec.js‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ describe('XY Chart', () => {
102102
{}
103103
);
104104
});
105+
it('x-axis range with same values is supported', () => {
106+
imgSnapshotTest(
107+
`---
108+
title: Dirac delta function
109+
---
110+
xychart-beta
111+
x-axis "Only 0 matters" 0 --> 0
112+
line "dirac" [0, 0.5, 1]
113+
`,
114+
{}
115+
);
116+
117+
cy.get('g.plot g.line-plot-0 path').should('exist');
118+
});
105119
it('Render spark line with "plotReservedSpacePercent"', () => {
106120
imgSnapshotTest(
107121
`

‎demos/dev/example.html‎

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<!--Do not edit this file-->
2-
<!--Duplicate this file to any name you like, run `pnpm dev`, open http://localhost:9000/dev/name.html to view-->
1+
<!doctype html>
32
<html>
43
<head>
54
<title>Mermaid development page</title>
@@ -21,36 +20,73 @@
2120
</style>
2221
</head>
2322
<body>
24-
<pre id="diagram" class="mermaid">
23+
<div class="container">
24+
<pre id="diagram" class="mermaid">
2525
graph TB
2626
a --> b
2727
a --> c
2828
b --> d
2929
c --> d
30-
</pre>
30+
</pre>
31+
<pre class="mermaid">info</pre>
32+
</div>
3133

3234
<hr />
3335
Type code to view diagram:
3436
<div class="container">
3537
<textarea name="code" id="code" cols="30" rows="10"></textarea>
3638
<div id="dynamicDiagram"></div>
3739
</div>
38-
<pre class="mermaid">info</pre>
40+
41+
<table>
42+
<tbody>
43+
<tr>
44+
<th scope="row">Error</th>
45+
<td>
46+
<pre><code id="errors"></code></pre>
47+
</td>
48+
</tr>
49+
<tr>
50+
<th scope="row">Render time</th>
51+
<td>
52+
<time id="renderTime">N/A</time>
53+
</td>
54+
</tr>
55+
</tbody>
56+
</table>
3957

4058
<script type="module">
4159
import mermaid from '/mermaid.esm.mjs';
4260
import layouts from '/mermaid-layout-elk.esm.mjs';
4361
mermaid.registerLayoutLoaders(layouts);
62+
63+
function setRenderTime(start, end) {
64+
const durationMs = end - start;
65+
document
66+
.getElementById('renderTime')
67+
.setAttribute('datetime', `PT${(durationMs / 1000).toFixed(3)}s`);
68+
document.getElementById('renderTime').innerText = new Intl.NumberFormat('en', {
69+
style: 'unit',
70+
unit: 'millisecond',
71+
}).format(durationMs);
72+
}
73+
4474
async function render(str) {
45-
const { svg } = await mermaid.render('dynamic', str);
46-
document.getElementById('dynamicDiagram').innerHTML = svg;
75+
const start = performance.now();
76+
try {
77+
const { svg } = await mermaid.render('dynamic', str);
78+
const end = performance.now();
79+
document.getElementById('dynamicDiagram').innerHTML = svg;
80+
document.getElementById('errors').innerText = 'No errors';
81+
setRenderTime(start, end);
82+
} catch (err) {
83+
const end = performance.now();
84+
document.getElementById('errors').innerText = err;
85+
setRenderTime(start, end);
86+
}
4787
}
4888
const storeKey = window.location.pathname;
4989
const code = localStorage.getItem(storeKey);
50-
if (code) {
51-
document.getElementById('code').value = code;
52-
await render(code);
53-
}
5490
mermaid.initialize({
5591
startOnLoad: true,
5692
logLevel: 0,
@@ -60,6 +96,10 @@
6096
localStorage.setItem(storeKey, value);
6197
await render(value);
6298
});
99+
if (code) {
100+
document.getElementById('code').value = code;
101+
await render(code);
102+
}
63103
</script>
64104

65105
<script src="/dev/reload.js"></script>

‎docs/config/setup/config/README.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
- [reset](functions/reset.md)
2626
- [sanitize](functions/sanitize.md)
2727
- [saveConfigFromInitialize](functions/saveConfigFromInitialize.md)
28-
- [setConfig](functions/setConfig.md)
28+
- [~~setConfig~~](functions/setConfig.md)
2929
- [setSiteConfig](functions/setSiteConfig.md)
30-
- [updateCurrentConfig](functions/updateCurrentConfig.md)
3130
- [updateSiteConfig](functions/updateSiteConfig.md)

0 commit comments

Comments
 (0)