Compare commits

...

6 Commits

Author SHA1 Message Date
darshanr0107
13d9bfa474 chore: add changeset
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-12-19 17:53:12 +05:30
darshanr0107
7a14a1ac40 fix: hexagon shape column span
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
2025-12-19 17:10:22 +05:30
Shubham P
7b167cf331 Merge pull request #7242 from mermaid-js/renovate/patch-dompurify
fix(deps): update dependency dompurify to ^3.3.1
2025-12-15 11:41:32 +00:00
Shubham P
d435ac6fe1 Merge pull request #7228 from mermaid-js/renovate/peter-evans-create-pull-request-digest
chore(deps): update peter-evans/create-pull-request digest to 0979079
2025-12-15 06:47:12 +00:00
renovate[bot]
ed96d067fc fix(deps): update dependency dompurify to ^3.3.1 2025-12-15 00:42:27 +00:00
renovate[bot]
09c60be450 chore(deps): update peter-evans/create-pull-request digest to 0979079 2025-12-10 10:49:20 +00:00
6 changed files with 27 additions and 10 deletions

View File

@@ -0,0 +1,5 @@
---
'mermaid': patch
---
fix: Ensure block diagram hexagon blocks respect column spanning syntax

View File

@@ -58,7 +58,7 @@ jobs:
echo "EOF" >> $GITHUB_OUTPUT
- name: Commit and create pull request
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412
uses: peter-evans/create-pull-request@0979079bc20c05bbbb590a56c21c4e2b1d1f1bbe
with:
add-paths: |
cypress/timings.json

View File

@@ -404,6 +404,18 @@ describe('Block diagram', () => {
a
b
a --- b
`,
{}
);
});
it('BL32: hexagon shape block should span correctly', () => {
imgSnapshotTest(
`block-beta
columns 3
A1{{"Opening tag"}} space A3{{"Closing tag"}}
B1["&lt;tagname&gt;"] B2["content"] B3["&lt;/tagname&gt;"]
C{{"Element"}}:3
`,
{}
);

View File

@@ -78,7 +78,7 @@
"d3-sankey": "^0.12.3",
"dagre-d3-es": "7.0.13",
"dayjs": "^1.11.19",
"dompurify": "^3.3.0",
"dompurify": "^3.3.1",
"katex": "^0.16.25",
"khroma": "^2.1.0",
"lodash-es": "^4.17.21",

View File

@@ -96,9 +96,9 @@ const hexagon = async (parent, node) => {
);
const f = 4;
const h = bbox.height + node.padding;
const h = node.positioned ? node.height : bbox.height + node.padding;
const m = h / f;
const w = bbox.width + 2 * m + node.padding;
const w = node.positioned ? node.width : bbox.width + 2 * m + node.padding;
const points = [
{ x: m, y: 0 },
{ x: w - m, y: 0 },

12
pnpm-lock.yaml generated
View File

@@ -257,8 +257,8 @@ importers:
specifier: ^1.11.19
version: 1.11.19
dompurify:
specifier: ^3.3.0
version: 3.3.0
specifier: ^3.3.1
version: 3.3.1
katex:
specifier: ^0.16.25
version: 0.16.25
@@ -5328,8 +5328,8 @@ packages:
resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==}
engines: {node: '>= 4'}
dompurify@3.3.0:
resolution: {integrity: sha512-r+f6MYR1gGN1eJv0TVQbhA7if/U7P87cdPl3HN5rikqaBSBxLiCb/b9O+2eG0cxz0ghyU+mU1QkbsOwERMYlWQ==}
dompurify@3.3.1:
resolution: {integrity: sha512-qkdCKzLNtrgPFP1Vo+98FRzJnBRGe4ffyCea9IwHB1fyxPOeNTHpLKYGd4Uk9xvNoH0ZoOjwZxNptyMwqrId1Q==}
domutils@3.2.2:
resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==}
@@ -14677,7 +14677,7 @@ snapshots:
class-variance-authority: 0.7.1
clsx: 2.1.1
color-string: 2.1.2
dompurify: 3.3.0
dompurify: 3.3.1
highlight.js: 10.7.3
html-to-image: 1.11.13
immer: 10.1.3
@@ -16281,7 +16281,7 @@ snapshots:
dependencies:
domelementtype: 2.3.0
dompurify@3.3.0:
dompurify@3.3.1:
optionalDependencies:
'@types/trusted-types': 2.0.7