@markdy/renderer-dom 1.0.17 → 1.0.18
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 +33 -25
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2626,28 +2626,37 @@ function ensureSceneStyles(doc) {
|
|
|
2626
2626
|
transform: translateY(-1px) scale(1.02);
|
|
2627
2627
|
}
|
|
2628
2628
|
.markdy-badge {
|
|
2629
|
+
position: absolute;
|
|
2630
|
+
top: 10px;
|
|
2631
|
+
right: 12px;
|
|
2632
|
+
z-index: 25;
|
|
2629
2633
|
display: inline-flex;
|
|
2630
2634
|
align-items: center;
|
|
2631
2635
|
gap: 4px;
|
|
2632
2636
|
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
2633
|
-
font-size:
|
|
2634
|
-
font-weight:
|
|
2635
|
-
|
|
2637
|
+
font-size: 10px;
|
|
2638
|
+
font-weight: 500;
|
|
2639
|
+
letter-spacing: 0.02em;
|
|
2640
|
+
color: var(--md-text-muted, #94a3b8);
|
|
2636
2641
|
text-decoration: none;
|
|
2637
|
-
padding:
|
|
2638
|
-
border-radius:
|
|
2639
|
-
background: var(--md-
|
|
2640
|
-
border: 1px solid var(--md-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2642
|
+
padding: 2.5px 7px;
|
|
2643
|
+
border-radius: 5px;
|
|
2644
|
+
background: var(--md-surface, rgba(15, 23, 42, 0.45));
|
|
2645
|
+
border: 1px solid var(--md-border, rgba(148, 163, 184, 0.15));
|
|
2646
|
+
backdrop-filter: blur(4px);
|
|
2647
|
+
-webkit-backdrop-filter: blur(4px);
|
|
2648
|
+
opacity: 0.65;
|
|
2649
|
+
transition: all 0.2s ease;
|
|
2650
|
+
pointer-events: auto;
|
|
2651
|
+
user-select: none;
|
|
2645
2652
|
}
|
|
2646
2653
|
.markdy-badge:hover {
|
|
2654
|
+
opacity: 1;
|
|
2647
2655
|
color: var(--accent, #10b981);
|
|
2648
|
-
background: var(--accent-light, rgba(16, 185, 129, 0.12));
|
|
2649
2656
|
border-color: var(--accent, #10b981);
|
|
2657
|
+
background: var(--md-surface-raised, rgba(15, 23, 42, 0.75));
|
|
2650
2658
|
transform: translateY(-1px);
|
|
2659
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
|
|
2651
2660
|
}
|
|
2652
2661
|
.markdy-speed-group {
|
|
2653
2662
|
display: inline-flex;
|
|
@@ -3301,18 +3310,6 @@ function createDiagram(opts) {
|
|
|
3301
3310
|
else container.appendChild(footer);
|
|
3302
3311
|
return footer;
|
|
3303
3312
|
}
|
|
3304
|
-
let badge = null;
|
|
3305
|
-
if (copyright) {
|
|
3306
|
-
badge = document.createElement("a");
|
|
3307
|
-
badge.className = "markdy-badge";
|
|
3308
|
-
badge.href = `${MARKDY_PLAYGROUND_URL}#code=${encodeCodeForPlaygroundHash(code)}`;
|
|
3309
|
-
badge.target = "_blank";
|
|
3310
|
-
badge.rel = "noopener noreferrer";
|
|
3311
|
-
badge.title = "Open and edit in Markdy Playground";
|
|
3312
|
-
badge.style.marginLeft = "auto";
|
|
3313
|
-
badge.innerHTML = `<span style="opacity:0.9">\u26A1</span> Markdy`;
|
|
3314
|
-
ensureFooter().appendChild(badge);
|
|
3315
|
-
}
|
|
3316
3313
|
ensureSceneStyles(document);
|
|
3317
3314
|
ensureNodeStyles(document);
|
|
3318
3315
|
const scene = document.createElement("div");
|
|
@@ -3329,6 +3326,17 @@ function createDiagram(opts) {
|
|
|
3329
3326
|
});
|
|
3330
3327
|
applyThemeToScene(scene, plan.theme);
|
|
3331
3328
|
viewport.appendChild(scene);
|
|
3329
|
+
let badge = null;
|
|
3330
|
+
if (copyright) {
|
|
3331
|
+
badge = document.createElement("a");
|
|
3332
|
+
badge.className = "markdy-badge";
|
|
3333
|
+
badge.href = "https://markdy.com";
|
|
3334
|
+
badge.target = "_blank";
|
|
3335
|
+
badge.rel = "noopener noreferrer";
|
|
3336
|
+
badge.title = "Powered by Markdy - Diagram as Code";
|
|
3337
|
+
badge.textContent = "Powered by Markdy";
|
|
3338
|
+
viewport.appendChild(badge);
|
|
3339
|
+
}
|
|
3332
3340
|
const viewportTransform = document.createElement("div");
|
|
3333
3341
|
viewportTransform.className = "markdy-viewport-transform";
|
|
3334
3342
|
Object.assign(viewportTransform.style, {
|
|
@@ -4230,7 +4238,7 @@ function createDiagram(opts) {
|
|
|
4230
4238
|
mountCodeControl(toolsGroup);
|
|
4231
4239
|
}
|
|
4232
4240
|
if (toolsGroup.children.length > 0) toolbar.appendChild(toolsGroup);
|
|
4233
|
-
ensureFooter().
|
|
4241
|
+
ensureFooter().appendChild(toolbar);
|
|
4234
4242
|
syncControls();
|
|
4235
4243
|
}
|
|
4236
4244
|
viewport.style.cursor = interactiveViewport ? "grab" : "pointer";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markdy/renderer-dom",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
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.18"
|
|
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.18"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "tsup",
|