@markdy/renderer-dom 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1636,6 +1636,16 @@ function ensureNodeStyles(doc) {
|
|
|
1636
1636
|
transform: rotate(0deg);
|
|
1637
1637
|
clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
|
|
1638
1638
|
}
|
|
1639
|
+
.markdy-node[data-shape="diamond"] .markdy-node__body {
|
|
1640
|
+
justify-content: center;
|
|
1641
|
+
padding: 6px 16%;
|
|
1642
|
+
text-align: center;
|
|
1643
|
+
}
|
|
1644
|
+
.markdy-node[data-shape="diamond"] .markdy-node__label {
|
|
1645
|
+
flex: 0 1 auto;
|
|
1646
|
+
line-height: 1.18;
|
|
1647
|
+
text-align: center;
|
|
1648
|
+
}
|
|
1639
1649
|
.markdy-node[data-shape="pill"] {
|
|
1640
1650
|
border-radius: 999px;
|
|
1641
1651
|
min-height: 54px;
|
|
@@ -2100,11 +2110,11 @@ function createNodeEl(node, theme, assets) {
|
|
|
2100
2110
|
el.setAttribute("aria-label", el.title);
|
|
2101
2111
|
const body = document.createElement("div");
|
|
2102
2112
|
body.className = "markdy-node__body";
|
|
2103
|
-
const icon = createNodeMediaEl(document, node, assets);
|
|
2104
2113
|
const label = document.createElement("div");
|
|
2105
2114
|
label.className = "markdy-node__label";
|
|
2106
2115
|
label.textContent = node.label;
|
|
2107
|
-
body.append(
|
|
2116
|
+
if (node.shape !== "diamond") body.append(createNodeMediaEl(document, node, assets));
|
|
2117
|
+
body.append(label);
|
|
2108
2118
|
const value = node.props?.value ?? node.props?.metric;
|
|
2109
2119
|
if (value !== void 0 && value !== null) {
|
|
2110
2120
|
const valueEl = document.createElement("div");
|
|
@@ -2973,7 +2983,7 @@ function createDiagram(opts) {
|
|
|
2973
2983
|
Object.assign(structuralEdgeHost.style, {
|
|
2974
2984
|
position: "absolute",
|
|
2975
2985
|
inset: "0",
|
|
2976
|
-
zIndex: "
|
|
2986
|
+
zIndex: "55",
|
|
2977
2987
|
pointerEvents: "none"
|
|
2978
2988
|
});
|
|
2979
2989
|
cameraLayer.appendChild(structuralEdgeHost);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markdy/renderer-dom",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "Browser renderer for diagram-native animated MarkdyScript architecture diagrams, built on the Web Animations API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"html2canvas": "^1.4.1",
|
|
48
|
-
"@markdy/core": "1.0.
|
|
48
|
+
"@markdy/core": "1.0.13"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"jsdom": "^29.1.1",
|
|
52
52
|
"tsup": "^8.5.1",
|
|
53
53
|
"typescript": "^5.9.3",
|
|
54
54
|
"vitest": "^4.1.7",
|
|
55
|
-
"@markdy/stdlib-systems": "1.0.
|
|
55
|
+
"@markdy/stdlib-systems": "1.0.13"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "tsup",
|