@markdy/renderer-dom 1.5.6 → 1.5.7
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 +83 -30
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3826,11 +3826,11 @@ function ensureSceneStyles(doc) {
|
|
|
3826
3826
|
flex: 0 1 auto;
|
|
3827
3827
|
width: auto;
|
|
3828
3828
|
min-width: 0;
|
|
3829
|
-
gap:
|
|
3829
|
+
gap: 2px;
|
|
3830
3830
|
max-width: 100%;
|
|
3831
|
-
padding:
|
|
3831
|
+
padding: 2px;
|
|
3832
3832
|
margin: 0;
|
|
3833
|
-
border-radius:
|
|
3833
|
+
border-radius: 5px;
|
|
3834
3834
|
background: rgba(255, 255, 255, 0.75);
|
|
3835
3835
|
backdrop-filter: blur(8px);
|
|
3836
3836
|
-webkit-backdrop-filter: blur(8px);
|
|
@@ -3842,7 +3842,7 @@ function ensureSceneStyles(doc) {
|
|
|
3842
3842
|
.markdy-controls-group {
|
|
3843
3843
|
display: inline-flex;
|
|
3844
3844
|
align-items: center;
|
|
3845
|
-
gap:
|
|
3845
|
+
gap: 2px;
|
|
3846
3846
|
flex-shrink: 0;
|
|
3847
3847
|
position: relative;
|
|
3848
3848
|
z-index: 5;
|
|
@@ -3851,15 +3851,15 @@ function ensureSceneStyles(doc) {
|
|
|
3851
3851
|
.markdy-controls-tools {
|
|
3852
3852
|
display: inline-flex;
|
|
3853
3853
|
align-items: center;
|
|
3854
|
-
gap:
|
|
3854
|
+
gap: 2px;
|
|
3855
3855
|
flex-shrink: 0;
|
|
3856
3856
|
margin-left: 0;
|
|
3857
3857
|
}
|
|
3858
3858
|
.markdy-control-divider {
|
|
3859
3859
|
width: 1px;
|
|
3860
|
-
height:
|
|
3860
|
+
height: 10px;
|
|
3861
3861
|
background: var(--md-divider, rgba(148, 163, 184, 0.2));
|
|
3862
|
-
margin: 0
|
|
3862
|
+
margin: 0 1px;
|
|
3863
3863
|
flex-shrink: 0;
|
|
3864
3864
|
}
|
|
3865
3865
|
.markdy-btn-label {
|
|
@@ -3871,14 +3871,14 @@ function ensureSceneStyles(doc) {
|
|
|
3871
3871
|
touch-action: manipulation;
|
|
3872
3872
|
user-select: none;
|
|
3873
3873
|
-webkit-user-select: none;
|
|
3874
|
-
width:
|
|
3875
|
-
height:
|
|
3876
|
-
min-width:
|
|
3874
|
+
width: 20px;
|
|
3875
|
+
height: 20px;
|
|
3876
|
+
min-width: 20px;
|
|
3877
3877
|
padding: 0;
|
|
3878
3878
|
display: inline-flex;
|
|
3879
3879
|
align-items: center;
|
|
3880
3880
|
justify-content: center;
|
|
3881
|
-
border-radius:
|
|
3881
|
+
border-radius: 3px;
|
|
3882
3882
|
background: transparent;
|
|
3883
3883
|
border: none;
|
|
3884
3884
|
box-shadow: none;
|
|
@@ -3891,8 +3891,8 @@ function ensureSceneStyles(doc) {
|
|
|
3891
3891
|
}
|
|
3892
3892
|
.markdy-controls button svg,
|
|
3893
3893
|
.markdy-controls button .markdy-icon {
|
|
3894
|
-
width:
|
|
3895
|
-
height:
|
|
3894
|
+
width: 11px;
|
|
3895
|
+
height: 11px;
|
|
3896
3896
|
}
|
|
3897
3897
|
.markdy-controls button:hover:not([aria-pressed="true"]) {
|
|
3898
3898
|
background: rgba(148, 163, 184, 0.15);
|
|
@@ -3956,17 +3956,18 @@ function ensureSceneStyles(doc) {
|
|
|
3956
3956
|
color: #0f172a;
|
|
3957
3957
|
background-color: rgba(148, 163, 184, 0.1);
|
|
3958
3958
|
}
|
|
3959
|
+
.markdy-control-fullscreen,
|
|
3959
3960
|
.markdy-studio-link {
|
|
3960
3961
|
position: absolute;
|
|
3961
3962
|
top: 8px;
|
|
3962
|
-
right: 8px;
|
|
3963
3963
|
z-index: 50;
|
|
3964
3964
|
display: inline-flex;
|
|
3965
3965
|
align-items: center;
|
|
3966
3966
|
justify-content: center;
|
|
3967
|
-
width:
|
|
3968
|
-
height:
|
|
3969
|
-
|
|
3967
|
+
width: 22px;
|
|
3968
|
+
height: 22px;
|
|
3969
|
+
min-width: 22px;
|
|
3970
|
+
border-radius: 5px;
|
|
3970
3971
|
background: rgba(255, 255, 255, 0.75);
|
|
3971
3972
|
backdrop-filter: blur(8px);
|
|
3972
3973
|
-webkit-backdrop-filter: blur(8px);
|
|
@@ -3976,14 +3977,35 @@ function ensureSceneStyles(doc) {
|
|
|
3976
3977
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
3977
3978
|
transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;
|
|
3978
3979
|
pointer-events: auto;
|
|
3980
|
+
cursor: pointer;
|
|
3981
|
+
padding: 0;
|
|
3982
|
+
}
|
|
3983
|
+
.markdy-control-fullscreen {
|
|
3984
|
+
left: 8px;
|
|
3985
|
+
}
|
|
3986
|
+
.markdy-studio-link {
|
|
3987
|
+
right: 8px;
|
|
3988
|
+
}
|
|
3989
|
+
.markdy-control-fullscreen svg,
|
|
3990
|
+
.markdy-studio-link svg {
|
|
3991
|
+
width: 11px;
|
|
3992
|
+
height: 11px;
|
|
3993
|
+
}
|
|
3994
|
+
.markdy-control-fullscreen[aria-pressed="true"] {
|
|
3995
|
+
background: #0f172a !important;
|
|
3996
|
+
color: #ffffff !important;
|
|
3997
|
+
opacity: 1 !important;
|
|
3979
3998
|
}
|
|
3980
3999
|
@media (hover: hover) {
|
|
4000
|
+
.markdy-control-fullscreen,
|
|
3981
4001
|
.markdy-studio-link {
|
|
3982
4002
|
opacity: 0;
|
|
3983
4003
|
}
|
|
4004
|
+
.markdy-diagram-root:hover .markdy-control-fullscreen,
|
|
3984
4005
|
.markdy-diagram-root:hover .markdy-studio-link {
|
|
3985
4006
|
opacity: 0.75;
|
|
3986
4007
|
}
|
|
4008
|
+
.markdy-control-fullscreen:hover,
|
|
3987
4009
|
.markdy-studio-link:hover {
|
|
3988
4010
|
opacity: 1 !important;
|
|
3989
4011
|
color: #0f172a;
|
|
@@ -3991,11 +4013,14 @@ function ensureSceneStyles(doc) {
|
|
|
3991
4013
|
}
|
|
3992
4014
|
}
|
|
3993
4015
|
@media (hover: none) {
|
|
4016
|
+
.markdy-control-fullscreen,
|
|
3994
4017
|
.markdy-studio-link {
|
|
3995
4018
|
opacity: 0.75;
|
|
3996
4019
|
}
|
|
4020
|
+
.markdy-control-fullscreen:active,
|
|
3997
4021
|
.markdy-studio-link:active {
|
|
3998
4022
|
opacity: 1;
|
|
4023
|
+
transform: scale(0.96);
|
|
3999
4024
|
}
|
|
4000
4025
|
}
|
|
4001
4026
|
.markdy-badge-prefix {
|
|
@@ -4014,19 +4039,20 @@ function ensureSceneStyles(doc) {
|
|
|
4014
4039
|
}
|
|
4015
4040
|
.markdy-controls button {
|
|
4016
4041
|
padding: 0 !important;
|
|
4017
|
-
width:
|
|
4018
|
-
height:
|
|
4019
|
-
min-width:
|
|
4042
|
+
width: 20px !important;
|
|
4043
|
+
height: 20px !important;
|
|
4044
|
+
min-width: 20px !important;
|
|
4020
4045
|
justify-content: center !important;
|
|
4021
4046
|
}
|
|
4022
4047
|
.markdy-speed-group {
|
|
4023
4048
|
display: none !important;
|
|
4024
4049
|
}
|
|
4025
4050
|
.markdy-controls {
|
|
4026
|
-
gap:
|
|
4051
|
+
gap: 2px !important;
|
|
4052
|
+
padding: 2px !important;
|
|
4027
4053
|
}
|
|
4028
4054
|
.markdy-footer {
|
|
4029
|
-
padding:
|
|
4055
|
+
padding: 0 !important;
|
|
4030
4056
|
}
|
|
4031
4057
|
.markdy-badge {
|
|
4032
4058
|
font-size: 9px !important;
|
|
@@ -4045,16 +4071,17 @@ function ensureSceneStyles(doc) {
|
|
|
4045
4071
|
}
|
|
4046
4072
|
.markdy-controls button {
|
|
4047
4073
|
padding: 0 !important;
|
|
4048
|
-
width:
|
|
4049
|
-
height:
|
|
4050
|
-
min-width:
|
|
4074
|
+
width: 20px !important;
|
|
4075
|
+
height: 20px !important;
|
|
4076
|
+
min-width: 20px !important;
|
|
4051
4077
|
justify-content: center !important;
|
|
4052
4078
|
}
|
|
4053
4079
|
.markdy-speed-group {
|
|
4054
4080
|
display: none !important;
|
|
4055
4081
|
}
|
|
4056
4082
|
.markdy-controls {
|
|
4057
|
-
gap:
|
|
4083
|
+
gap: 2px !important;
|
|
4084
|
+
padding: 2px !important;
|
|
4058
4085
|
}
|
|
4059
4086
|
.markdy-badge {
|
|
4060
4087
|
font-size: 9px !important;
|
|
@@ -4499,6 +4526,14 @@ function ensureSceneStyles(doc) {
|
|
|
4499
4526
|
background-color: rgba(255, 255, 255, 0.08);
|
|
4500
4527
|
opacity: 0.8 !important;
|
|
4501
4528
|
}
|
|
4529
|
+
[data-markdy-theme="midnight"] .markdy-control-fullscreen,
|
|
4530
|
+
[data-markdy-theme="blueprint"] .markdy-control-fullscreen,
|
|
4531
|
+
[data-markdy-theme="terminal"] .markdy-control-fullscreen,
|
|
4532
|
+
[data-markdy-theme="graphite"] .markdy-control-fullscreen,
|
|
4533
|
+
[data-markdy-theme="nebula"] .markdy-control-fullscreen,
|
|
4534
|
+
:root[data-theme="dark"] .markdy-control-fullscreen,
|
|
4535
|
+
.theme-dark .markdy-control-fullscreen,
|
|
4536
|
+
.dark .markdy-control-fullscreen,
|
|
4502
4537
|
[data-markdy-theme="midnight"] .markdy-studio-link,
|
|
4503
4538
|
[data-markdy-theme="blueprint"] .markdy-studio-link,
|
|
4504
4539
|
[data-markdy-theme="terminal"] .markdy-studio-link,
|
|
@@ -4513,6 +4548,14 @@ function ensureSceneStyles(doc) {
|
|
|
4513
4548
|
color: #94a3b8;
|
|
4514
4549
|
}
|
|
4515
4550
|
@media (hover: hover) {
|
|
4551
|
+
[data-markdy-theme="midnight"] .markdy-control-fullscreen:hover,
|
|
4552
|
+
[data-markdy-theme="blueprint"] .markdy-control-fullscreen:hover,
|
|
4553
|
+
[data-markdy-theme="terminal"] .markdy-control-fullscreen:hover,
|
|
4554
|
+
[data-markdy-theme="graphite"] .markdy-control-fullscreen:hover,
|
|
4555
|
+
[data-markdy-theme="nebula"] .markdy-control-fullscreen:hover,
|
|
4556
|
+
:root[data-theme="dark"] .markdy-control-fullscreen:hover,
|
|
4557
|
+
.theme-dark .markdy-control-fullscreen:hover,
|
|
4558
|
+
.dark .markdy-control-fullscreen:hover,
|
|
4516
4559
|
[data-markdy-theme="midnight"] .markdy-studio-link:hover,
|
|
4517
4560
|
[data-markdy-theme="blueprint"] .markdy-studio-link:hover,
|
|
4518
4561
|
[data-markdy-theme="terminal"] .markdy-studio-link:hover,
|
|
@@ -7971,6 +8014,8 @@ function createDiagram(opts) {
|
|
|
7971
8014
|
if (progressEl?.parentNode === viewport) viewport.removeChild(progressEl);
|
|
7972
8015
|
if (footer?.parentNode === container) container.removeChild(footer);
|
|
7973
8016
|
if (studioLink?.parentNode === container) container.removeChild(studioLink);
|
|
8017
|
+
if (fullscreenControlEl?.parentNode === container) container.removeChild(fullscreenControlEl);
|
|
8018
|
+
fullscreenControlEl = null;
|
|
7974
8019
|
if (viewport.parentNode === container) container.removeChild(viewport);
|
|
7975
8020
|
}
|
|
7976
8021
|
};
|
|
@@ -8514,7 +8559,8 @@ function createDiagram(opts) {
|
|
|
8514
8559
|
}
|
|
8515
8560
|
let removeFullscreenListeners = null;
|
|
8516
8561
|
let syncFullscreenHandler = null;
|
|
8517
|
-
|
|
8562
|
+
let fullscreenControlEl = null;
|
|
8563
|
+
function mountFullscreenControl(parent = container) {
|
|
8518
8564
|
if (!fullscreenButton) return;
|
|
8519
8565
|
const button = makeControlButton("Full", "Toggle fullscreen view", ICONS2.fullscreen);
|
|
8520
8566
|
button.className = "markdy-control-fullscreen";
|
|
@@ -8682,8 +8728,13 @@ function createDiagram(opts) {
|
|
|
8682
8728
|
host.classList.remove("markdy--pseudo-fullscreen");
|
|
8683
8729
|
host.classList.remove("markdy-fullscreen-host");
|
|
8684
8730
|
}
|
|
8731
|
+
if (fullscreenControlEl?.parentNode) {
|
|
8732
|
+
fullscreenControlEl.parentNode.removeChild(fullscreenControlEl);
|
|
8733
|
+
}
|
|
8734
|
+
fullscreenControlEl = null;
|
|
8685
8735
|
};
|
|
8686
|
-
|
|
8736
|
+
fullscreenControlEl = button;
|
|
8737
|
+
parent.appendChild(button);
|
|
8687
8738
|
}
|
|
8688
8739
|
function handleKeyDown(event) {
|
|
8689
8740
|
const target = event.target;
|
|
@@ -8754,14 +8805,16 @@ function createDiagram(opts) {
|
|
|
8754
8805
|
mountSpeedControls(speedGroup);
|
|
8755
8806
|
toolsGroup.appendChild(speedGroup);
|
|
8756
8807
|
}
|
|
8757
|
-
if (resetViewButton
|
|
8808
|
+
if (resetViewButton) {
|
|
8758
8809
|
if (toolsGroup.children.length > 0) {
|
|
8759
8810
|
const divider = document.createElement("div");
|
|
8760
8811
|
divider.className = "markdy-control-divider";
|
|
8761
8812
|
toolsGroup.appendChild(divider);
|
|
8762
8813
|
}
|
|
8763
8814
|
mountResetViewControl(toolsGroup);
|
|
8764
|
-
|
|
8815
|
+
}
|
|
8816
|
+
if (fullscreenButton) {
|
|
8817
|
+
mountFullscreenControl(container);
|
|
8765
8818
|
}
|
|
8766
8819
|
if (svgButton || gifButton || shareButton || codeButton || themeButton) {
|
|
8767
8820
|
if (toolsGroup.children.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markdy/renderer-dom",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.7",
|
|
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",
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"html2canvas": "^1.4.1",
|
|
49
|
-
"@markdy/core": "1.5.
|
|
49
|
+
"@markdy/core": "1.5.7"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"jsdom": "^29.1.1",
|
|
53
53
|
"tsup": "^8.5.1",
|
|
54
54
|
"typescript": "^5.9.3",
|
|
55
55
|
"vitest": "^4.1.7",
|
|
56
|
-
"@markdy/stdlib-systems": "1.5.
|
|
56
|
+
"@markdy/stdlib-systems": "1.5.7"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "tsup",
|