Merge from Upstream & fix version

This commit is contained in:
Ashish Jain
2024-08-27 14:41:03 +02:00
parent d421cfb1fd
commit 41b8a1e6f4
4 changed files with 751 additions and 1422 deletions

View File

@@ -34,10 +34,10 @@
}, },
"devDependencies": { "devDependencies": {
"@types/d3": "^7.4.3", "@types/d3": "^7.4.3",
"mermaid": "workspace:^" "@mermaid-chart/mermaid": "workspace:^"
}, },
"peerDependencies": { "peerDependencies": {
"mermaid": "^11.0.0" "@mermaid-chart/mermaid": "^11.0.0"
}, },
"files": [ "files": [
"dist" "dist"

View File

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

View File

@@ -14,13 +14,12 @@ export const rect_left_inv_arrow = async (
const { labelStyles, nodeStyles } = styles2String(node); const { labelStyles, nodeStyles } = styles2String(node);
node.labelStyle = labelStyles; node.labelStyle = labelStyles;
const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node)); const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));
const labelPaddingX = node.look === 'neo' ? node.padding * 3 : node.padding; const nodePadding = node.padding ?? 0;
const labelPaddingY = node.look === 'neo' ? node.padding * 1.5 : node.padding; const labelPaddingX = node.look === 'neo' ? nodePadding * 3 : node.padding;
const labelPaddingY = node.look === 'neo' ? nodePadding * 1.5 : node.padding;
const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node)); const w = Math.max(bbox.width + labelPaddingY, node?.width ?? 0);
const h = Math.max(bbox.height + labelPaddingX, node?.height ?? 0);
const w = Math.max(bbox.width + (labelPaddingY ?? 0), node?.width ?? 0);
const h = Math.max(bbox.height + (labelPaddingX ?? 0), node?.height ?? 0);
const x = -w / 2; const x = -w / 2;
const y = -h / 2; const y = -h / 2;

2154
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff