@markdy/renderer-dom 1.5.5 → 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.d.ts +5 -0
- package/dist/index.js +276 -92
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -163,6 +163,11 @@ interface DiagramOptions {
|
|
|
163
163
|
clickToPlay?: boolean;
|
|
164
164
|
/** Base URL for the Share control. Defaults to the Markdy playground. */
|
|
165
165
|
shareUrl?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Show floating Studio playground link button at top-right corner.
|
|
168
|
+
* Defaults to true when undefined. Set to false to disable.
|
|
169
|
+
*/
|
|
170
|
+
studioLink?: boolean;
|
|
166
171
|
/** Host controls override. `true` enables the legacy default set; `false` suppresses script controls; or pass a granular controls configuration object. */
|
|
167
172
|
controls?: boolean | (PlayerControlsConfig & {
|
|
168
173
|
playback?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -3692,28 +3692,28 @@ function ensureSceneStyles(doc) {
|
|
|
3692
3692
|
min-height: 0;
|
|
3693
3693
|
overflow: hidden;
|
|
3694
3694
|
box-sizing: border-box;
|
|
3695
|
-
border-radius: 11px
|
|
3695
|
+
border-radius: 11px;
|
|
3696
3696
|
}
|
|
3697
3697
|
.markdy-footer {
|
|
3698
3698
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
3699
|
-
position:
|
|
3699
|
+
position: static;
|
|
3700
3700
|
width: 100%;
|
|
3701
3701
|
box-sizing: border-box;
|
|
3702
3702
|
display: flex;
|
|
3703
3703
|
align-items: center;
|
|
3704
3704
|
justify-content: space-between;
|
|
3705
|
-
gap:
|
|
3706
|
-
padding:
|
|
3705
|
+
gap: 6px;
|
|
3706
|
+
padding: 0;
|
|
3707
|
+
height: 0;
|
|
3708
|
+
min-height: 0;
|
|
3709
|
+
line-height: 0;
|
|
3710
|
+
background: transparent;
|
|
3711
|
+
border-top: none;
|
|
3712
|
+
overflow: visible;
|
|
3707
3713
|
color: var(--md-text, #64748b);
|
|
3708
|
-
|
|
3709
|
-
backdrop-filter: blur(12px);
|
|
3710
|
-
-webkit-backdrop-filter: blur(12px);
|
|
3711
|
-
border-top: 1px solid var(--md-card-border, rgba(148, 163, 184, 0.16));
|
|
3712
|
-
z-index: 100;
|
|
3714
|
+
z-index: 40;
|
|
3713
3715
|
pointer-events: auto;
|
|
3714
3716
|
flex-shrink: 0;
|
|
3715
|
-
border-radius: 0 0 11px 11px;
|
|
3716
|
-
transition: background 0.2s ease, border-color 0.2s ease;
|
|
3717
3717
|
}
|
|
3718
3718
|
/* \u2500\u2500 Real Embedded Footer Scrubber \u2500\u2500 */
|
|
3719
3719
|
.markdy-player-scrubber {
|
|
@@ -3817,24 +3817,32 @@ function ensureSceneStyles(doc) {
|
|
|
3817
3817
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
|
|
3818
3818
|
}
|
|
3819
3819
|
.markdy-controls {
|
|
3820
|
+
position: absolute;
|
|
3821
|
+
bottom: 8px;
|
|
3822
|
+
left: 8px;
|
|
3820
3823
|
display: inline-flex;
|
|
3821
3824
|
align-items: center;
|
|
3822
3825
|
justify-content: flex-start;
|
|
3823
3826
|
flex: 0 1 auto;
|
|
3824
3827
|
width: auto;
|
|
3825
3828
|
min-width: 0;
|
|
3826
|
-
gap:
|
|
3829
|
+
gap: 2px;
|
|
3827
3830
|
max-width: 100%;
|
|
3828
|
-
padding:
|
|
3831
|
+
padding: 2px;
|
|
3829
3832
|
margin: 0;
|
|
3830
|
-
|
|
3831
|
-
|
|
3833
|
+
border-radius: 5px;
|
|
3834
|
+
background: rgba(255, 255, 255, 0.75);
|
|
3835
|
+
backdrop-filter: blur(8px);
|
|
3836
|
+
-webkit-backdrop-filter: blur(8px);
|
|
3837
|
+
border: 1px solid rgba(203, 213, 225, 0.6);
|
|
3838
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
3839
|
+
z-index: 50;
|
|
3832
3840
|
pointer-events: auto;
|
|
3833
3841
|
}
|
|
3834
3842
|
.markdy-controls-group {
|
|
3835
3843
|
display: inline-flex;
|
|
3836
3844
|
align-items: center;
|
|
3837
|
-
gap:
|
|
3845
|
+
gap: 2px;
|
|
3838
3846
|
flex-shrink: 0;
|
|
3839
3847
|
position: relative;
|
|
3840
3848
|
z-index: 5;
|
|
@@ -3843,23 +3851,19 @@ function ensureSceneStyles(doc) {
|
|
|
3843
3851
|
.markdy-controls-tools {
|
|
3844
3852
|
display: inline-flex;
|
|
3845
3853
|
align-items: center;
|
|
3846
|
-
gap:
|
|
3854
|
+
gap: 2px;
|
|
3847
3855
|
flex-shrink: 0;
|
|
3848
3856
|
margin-left: 0;
|
|
3849
3857
|
}
|
|
3850
3858
|
.markdy-control-divider {
|
|
3851
3859
|
width: 1px;
|
|
3852
|
-
height:
|
|
3860
|
+
height: 10px;
|
|
3853
3861
|
background: var(--md-divider, rgba(148, 163, 184, 0.2));
|
|
3854
|
-
margin: 0
|
|
3862
|
+
margin: 0 1px;
|
|
3855
3863
|
flex-shrink: 0;
|
|
3856
3864
|
}
|
|
3857
3865
|
.markdy-btn-label {
|
|
3858
|
-
display:
|
|
3859
|
-
margin-left: 3px;
|
|
3860
|
-
font-size: 11px;
|
|
3861
|
-
font-weight: 500;
|
|
3862
|
-
line-height: 1;
|
|
3866
|
+
display: none;
|
|
3863
3867
|
}
|
|
3864
3868
|
.markdy-controls button {
|
|
3865
3869
|
appearance: none;
|
|
@@ -3867,49 +3871,45 @@ function ensureSceneStyles(doc) {
|
|
|
3867
3871
|
touch-action: manipulation;
|
|
3868
3872
|
user-select: none;
|
|
3869
3873
|
-webkit-user-select: none;
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
cursor: pointer;
|
|
3875
|
-
font: 500 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
3876
|
-
height: 25px;
|
|
3877
|
-
min-width: 25px;
|
|
3878
|
-
padding: 0 7px;
|
|
3874
|
+
width: 20px;
|
|
3875
|
+
height: 20px;
|
|
3876
|
+
min-width: 20px;
|
|
3877
|
+
padding: 0;
|
|
3879
3878
|
display: inline-flex;
|
|
3880
3879
|
align-items: center;
|
|
3881
3880
|
justify-content: center;
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3881
|
+
border-radius: 3px;
|
|
3882
|
+
background: transparent;
|
|
3883
|
+
border: none;
|
|
3884
|
+
box-shadow: none;
|
|
3885
|
+
color: #64748b;
|
|
3886
|
+
opacity: 0.75;
|
|
3887
|
+
cursor: pointer;
|
|
3888
|
+
transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;
|
|
3886
3889
|
position: relative;
|
|
3887
3890
|
pointer-events: auto;
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
+
}
|
|
3892
|
+
.markdy-controls button svg,
|
|
3893
|
+
.markdy-controls button .markdy-icon {
|
|
3894
|
+
width: 11px;
|
|
3895
|
+
height: 11px;
|
|
3891
3896
|
}
|
|
3892
3897
|
.markdy-controls button:hover:not([aria-pressed="true"]) {
|
|
3893
|
-
|
|
3894
|
-
z-index: 20;
|
|
3895
|
-
background: #ffffff;
|
|
3898
|
+
background: rgba(148, 163, 184, 0.15);
|
|
3896
3899
|
color: #0f172a;
|
|
3897
|
-
|
|
3898
|
-
transform:
|
|
3899
|
-
box-shadow:
|
|
3900
|
+
opacity: 1;
|
|
3901
|
+
transform: none;
|
|
3902
|
+
box-shadow: none;
|
|
3900
3903
|
}
|
|
3901
3904
|
.markdy-controls-tools button:hover:not([aria-pressed="true"]) {
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
+
background: rgba(148, 163, 184, 0.15);
|
|
3906
|
+
color: #0f172a;
|
|
3907
|
+
opacity: 1;
|
|
3905
3908
|
}
|
|
3906
3909
|
.markdy-controls button[aria-pressed="true"] {
|
|
3907
|
-
position: relative;
|
|
3908
|
-
z-index: 20;
|
|
3909
3910
|
background: #0f172a !important;
|
|
3910
3911
|
color: #ffffff !important;
|
|
3911
|
-
|
|
3912
|
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) !important;
|
|
3912
|
+
opacity: 1 !important;
|
|
3913
3913
|
}
|
|
3914
3914
|
.markdy-controls button:focus-visible {
|
|
3915
3915
|
position: relative;
|
|
@@ -3918,7 +3918,7 @@ function ensureSceneStyles(doc) {
|
|
|
3918
3918
|
outline-offset: 1px;
|
|
3919
3919
|
}
|
|
3920
3920
|
.markdy-controls button:active {
|
|
3921
|
-
transform:
|
|
3921
|
+
transform: scale(0.96);
|
|
3922
3922
|
}
|
|
3923
3923
|
.markdy-icon {
|
|
3924
3924
|
display: inline-block;
|
|
@@ -3926,27 +3926,102 @@ function ensureSceneStyles(doc) {
|
|
|
3926
3926
|
vertical-align: middle;
|
|
3927
3927
|
}
|
|
3928
3928
|
.markdy-badge {
|
|
3929
|
+
position: absolute;
|
|
3930
|
+
bottom: 8px;
|
|
3931
|
+
right: 8px;
|
|
3929
3932
|
display: inline-flex;
|
|
3930
3933
|
align-items: center;
|
|
3931
3934
|
gap: 4px;
|
|
3932
3935
|
text-align: right;
|
|
3933
3936
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
3934
|
-
font-size:
|
|
3937
|
+
font-size: 9px;
|
|
3935
3938
|
line-height: 1;
|
|
3936
3939
|
color: #64748b;
|
|
3937
3940
|
text-decoration: none;
|
|
3938
|
-
padding:
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
+
padding: 2px 4px;
|
|
3942
|
+
letter-spacing: 0.01em;
|
|
3943
|
+
border-radius: 4px;
|
|
3944
|
+
background: transparent;
|
|
3945
|
+
border: none;
|
|
3946
|
+
opacity: 0.35;
|
|
3941
3947
|
margin-left: auto;
|
|
3942
3948
|
flex-shrink: 0;
|
|
3949
|
+
z-index: 50;
|
|
3943
3950
|
transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;
|
|
3944
3951
|
white-space: nowrap;
|
|
3952
|
+
pointer-events: auto;
|
|
3945
3953
|
}
|
|
3946
3954
|
.markdy-badge:hover {
|
|
3947
|
-
opacity:
|
|
3948
|
-
color: #
|
|
3949
|
-
background-color: rgba(148, 163, 184, 0.
|
|
3955
|
+
opacity: 0.8;
|
|
3956
|
+
color: #0f172a;
|
|
3957
|
+
background-color: rgba(148, 163, 184, 0.1);
|
|
3958
|
+
}
|
|
3959
|
+
.markdy-control-fullscreen,
|
|
3960
|
+
.markdy-studio-link {
|
|
3961
|
+
position: absolute;
|
|
3962
|
+
top: 8px;
|
|
3963
|
+
z-index: 50;
|
|
3964
|
+
display: inline-flex;
|
|
3965
|
+
align-items: center;
|
|
3966
|
+
justify-content: center;
|
|
3967
|
+
width: 22px;
|
|
3968
|
+
height: 22px;
|
|
3969
|
+
min-width: 22px;
|
|
3970
|
+
border-radius: 5px;
|
|
3971
|
+
background: rgba(255, 255, 255, 0.75);
|
|
3972
|
+
backdrop-filter: blur(8px);
|
|
3973
|
+
-webkit-backdrop-filter: blur(8px);
|
|
3974
|
+
border: 1px solid rgba(203, 213, 225, 0.6);
|
|
3975
|
+
color: #64748b;
|
|
3976
|
+
text-decoration: none;
|
|
3977
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
3978
|
+
transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;
|
|
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;
|
|
3998
|
+
}
|
|
3999
|
+
@media (hover: hover) {
|
|
4000
|
+
.markdy-control-fullscreen,
|
|
4001
|
+
.markdy-studio-link {
|
|
4002
|
+
opacity: 0;
|
|
4003
|
+
}
|
|
4004
|
+
.markdy-diagram-root:hover .markdy-control-fullscreen,
|
|
4005
|
+
.markdy-diagram-root:hover .markdy-studio-link {
|
|
4006
|
+
opacity: 0.75;
|
|
4007
|
+
}
|
|
4008
|
+
.markdy-control-fullscreen:hover,
|
|
4009
|
+
.markdy-studio-link:hover {
|
|
4010
|
+
opacity: 1 !important;
|
|
4011
|
+
color: #0f172a;
|
|
4012
|
+
background: rgba(255, 255, 255, 0.95);
|
|
4013
|
+
}
|
|
4014
|
+
}
|
|
4015
|
+
@media (hover: none) {
|
|
4016
|
+
.markdy-control-fullscreen,
|
|
4017
|
+
.markdy-studio-link {
|
|
4018
|
+
opacity: 0.75;
|
|
4019
|
+
}
|
|
4020
|
+
.markdy-control-fullscreen:active,
|
|
4021
|
+
.markdy-studio-link:active {
|
|
4022
|
+
opacity: 1;
|
|
4023
|
+
transform: scale(0.96);
|
|
4024
|
+
}
|
|
3950
4025
|
}
|
|
3951
4026
|
.markdy-badge-prefix {
|
|
3952
4027
|
font-weight: 400;
|
|
@@ -3964,19 +4039,20 @@ function ensureSceneStyles(doc) {
|
|
|
3964
4039
|
}
|
|
3965
4040
|
.markdy-controls button {
|
|
3966
4041
|
padding: 0 !important;
|
|
3967
|
-
width:
|
|
3968
|
-
height:
|
|
3969
|
-
min-width:
|
|
4042
|
+
width: 20px !important;
|
|
4043
|
+
height: 20px !important;
|
|
4044
|
+
min-width: 20px !important;
|
|
3970
4045
|
justify-content: center !important;
|
|
3971
4046
|
}
|
|
3972
4047
|
.markdy-speed-group {
|
|
3973
4048
|
display: none !important;
|
|
3974
4049
|
}
|
|
3975
4050
|
.markdy-controls {
|
|
3976
|
-
gap:
|
|
4051
|
+
gap: 2px !important;
|
|
4052
|
+
padding: 2px !important;
|
|
3977
4053
|
}
|
|
3978
4054
|
.markdy-footer {
|
|
3979
|
-
padding:
|
|
4055
|
+
padding: 0 !important;
|
|
3980
4056
|
}
|
|
3981
4057
|
.markdy-badge {
|
|
3982
4058
|
font-size: 9px !important;
|
|
@@ -3995,16 +4071,17 @@ function ensureSceneStyles(doc) {
|
|
|
3995
4071
|
}
|
|
3996
4072
|
.markdy-controls button {
|
|
3997
4073
|
padding: 0 !important;
|
|
3998
|
-
width:
|
|
3999
|
-
height:
|
|
4000
|
-
min-width:
|
|
4074
|
+
width: 20px !important;
|
|
4075
|
+
height: 20px !important;
|
|
4076
|
+
min-width: 20px !important;
|
|
4001
4077
|
justify-content: center !important;
|
|
4002
4078
|
}
|
|
4003
4079
|
.markdy-speed-group {
|
|
4004
4080
|
display: none !important;
|
|
4005
4081
|
}
|
|
4006
4082
|
.markdy-controls {
|
|
4007
|
-
gap:
|
|
4083
|
+
gap: 2px !important;
|
|
4084
|
+
padding: 2px !important;
|
|
4008
4085
|
}
|
|
4009
4086
|
.markdy-badge {
|
|
4010
4087
|
font-size: 9px !important;
|
|
@@ -4361,10 +4438,22 @@ function ensureSceneStyles(doc) {
|
|
|
4361
4438
|
:root[data-theme="dark"] .markdy-footer,
|
|
4362
4439
|
.theme-dark .markdy-footer,
|
|
4363
4440
|
.dark .markdy-footer {
|
|
4364
|
-
background:
|
|
4365
|
-
border-top
|
|
4441
|
+
background: transparent;
|
|
4442
|
+
border-top: none;
|
|
4366
4443
|
color: #94a3b8;
|
|
4367
4444
|
}
|
|
4445
|
+
[data-markdy-theme="midnight"] .markdy-controls,
|
|
4446
|
+
[data-markdy-theme="blueprint"] .markdy-controls,
|
|
4447
|
+
[data-markdy-theme="terminal"] .markdy-controls,
|
|
4448
|
+
[data-markdy-theme="graphite"] .markdy-controls,
|
|
4449
|
+
[data-markdy-theme="nebula"] .markdy-controls,
|
|
4450
|
+
:root[data-theme="dark"] .markdy-controls,
|
|
4451
|
+
.theme-dark .markdy-controls,
|
|
4452
|
+
.dark .markdy-controls {
|
|
4453
|
+
background: rgba(15, 23, 42, 0.65);
|
|
4454
|
+
border-color: rgba(255, 255, 255, 0.08);
|
|
4455
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
4456
|
+
}
|
|
4368
4457
|
[data-markdy-theme="midnight"] .markdy-player-scrubber-track,
|
|
4369
4458
|
[data-markdy-theme="blueprint"] .markdy-player-scrubber-track,
|
|
4370
4459
|
[data-markdy-theme="terminal"] .markdy-player-scrubber-track,
|
|
@@ -4382,9 +4471,34 @@ function ensureSceneStyles(doc) {
|
|
|
4382
4471
|
:root[data-theme="dark"] .markdy-controls button:not([aria-pressed="true"]),
|
|
4383
4472
|
.theme-dark .markdy-controls button:not([aria-pressed="true"]),
|
|
4384
4473
|
.dark .markdy-controls button:not([aria-pressed="true"]) {
|
|
4385
|
-
background:
|
|
4386
|
-
border
|
|
4387
|
-
color: #
|
|
4474
|
+
background: transparent;
|
|
4475
|
+
border: none;
|
|
4476
|
+
color: #94a3b8;
|
|
4477
|
+
opacity: 0.75;
|
|
4478
|
+
}
|
|
4479
|
+
[data-markdy-theme="midnight"] .markdy-controls button:hover:not([aria-pressed="true"]),
|
|
4480
|
+
[data-markdy-theme="blueprint"] .markdy-controls button:hover:not([aria-pressed="true"]),
|
|
4481
|
+
[data-markdy-theme="terminal"] .markdy-controls button:hover:not([aria-pressed="true"]),
|
|
4482
|
+
[data-markdy-theme="graphite"] .markdy-controls button:hover:not([aria-pressed="true"]),
|
|
4483
|
+
[data-markdy-theme="nebula"] .markdy-controls button:hover:not([aria-pressed="true"]),
|
|
4484
|
+
:root[data-theme="dark"] .markdy-controls button:hover:not([aria-pressed="true"]),
|
|
4485
|
+
.theme-dark .markdy-controls button:hover:not([aria-pressed="true"]),
|
|
4486
|
+
.dark .markdy-controls button:hover:not([aria-pressed="true"]) {
|
|
4487
|
+
background: rgba(255, 255, 255, 0.1);
|
|
4488
|
+
color: #f8fafc;
|
|
4489
|
+
opacity: 1;
|
|
4490
|
+
}
|
|
4491
|
+
[data-markdy-theme="midnight"] .markdy-controls button[aria-pressed="true"],
|
|
4492
|
+
[data-markdy-theme="blueprint"] .markdy-controls button[aria-pressed="true"],
|
|
4493
|
+
[data-markdy-theme="terminal"] .markdy-controls button[aria-pressed="true"],
|
|
4494
|
+
[data-markdy-theme="graphite"] .markdy-controls button[aria-pressed="true"],
|
|
4495
|
+
[data-markdy-theme="nebula"] .markdy-controls button[aria-pressed="true"],
|
|
4496
|
+
:root[data-theme="dark"] .markdy-controls button[aria-pressed="true"],
|
|
4497
|
+
.theme-dark .markdy-controls button[aria-pressed="true"],
|
|
4498
|
+
.dark .markdy-controls button[aria-pressed="true"] {
|
|
4499
|
+
background: #3b82f6 !important;
|
|
4500
|
+
color: #ffffff !important;
|
|
4501
|
+
opacity: 1 !important;
|
|
4388
4502
|
}
|
|
4389
4503
|
.markdy-footer a {
|
|
4390
4504
|
transition: opacity 0.15s ease, color 0.15s ease;
|
|
@@ -4398,6 +4512,7 @@ function ensureSceneStyles(doc) {
|
|
|
4398
4512
|
.theme-dark .markdy-badge,
|
|
4399
4513
|
.dark .markdy-badge {
|
|
4400
4514
|
color: #94a3b8;
|
|
4515
|
+
background: transparent;
|
|
4401
4516
|
}
|
|
4402
4517
|
[data-markdy-theme="midnight"] .markdy-badge:hover,
|
|
4403
4518
|
[data-markdy-theme="blueprint"] .markdy-badge:hover,
|
|
@@ -4409,6 +4524,49 @@ function ensureSceneStyles(doc) {
|
|
|
4409
4524
|
.dark .markdy-badge:hover {
|
|
4410
4525
|
color: #f1f5f9 !important;
|
|
4411
4526
|
background-color: rgba(255, 255, 255, 0.08);
|
|
4527
|
+
opacity: 0.8 !important;
|
|
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,
|
|
4537
|
+
[data-markdy-theme="midnight"] .markdy-studio-link,
|
|
4538
|
+
[data-markdy-theme="blueprint"] .markdy-studio-link,
|
|
4539
|
+
[data-markdy-theme="terminal"] .markdy-studio-link,
|
|
4540
|
+
[data-markdy-theme="graphite"] .markdy-studio-link,
|
|
4541
|
+
[data-markdy-theme="nebula"] .markdy-studio-link,
|
|
4542
|
+
:root[data-theme="dark"] .markdy-studio-link,
|
|
4543
|
+
.theme-dark .markdy-studio-link,
|
|
4544
|
+
.dark .markdy-studio-link {
|
|
4545
|
+
background: rgba(15, 23, 42, 0.65);
|
|
4546
|
+
border-color: rgba(255, 255, 255, 0.08);
|
|
4547
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
4548
|
+
color: #94a3b8;
|
|
4549
|
+
}
|
|
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,
|
|
4559
|
+
[data-markdy-theme="midnight"] .markdy-studio-link:hover,
|
|
4560
|
+
[data-markdy-theme="blueprint"] .markdy-studio-link:hover,
|
|
4561
|
+
[data-markdy-theme="terminal"] .markdy-studio-link:hover,
|
|
4562
|
+
[data-markdy-theme="graphite"] .markdy-studio-link:hover,
|
|
4563
|
+
[data-markdy-theme="nebula"] .markdy-studio-link:hover,
|
|
4564
|
+
:root[data-theme="dark"] .markdy-studio-link:hover,
|
|
4565
|
+
.theme-dark .markdy-studio-link:hover,
|
|
4566
|
+
.dark .markdy-studio-link:hover {
|
|
4567
|
+
color: #f8fafc;
|
|
4568
|
+
background: rgba(30, 41, 59, 0.9);
|
|
4569
|
+
}
|
|
4412
4570
|
}
|
|
4413
4571
|
[data-markdy-theme="midnight"] .markdy-badge-brand,
|
|
4414
4572
|
[data-markdy-theme="blueprint"] .markdy-badge-brand,
|
|
@@ -6828,7 +6986,7 @@ function createDiagram(opts) {
|
|
|
6828
6986
|
footer.className = "markdy-footer";
|
|
6829
6987
|
applyThemeVariables(footer, plan.theme);
|
|
6830
6988
|
Object.assign(footer.style, {
|
|
6831
|
-
position: "
|
|
6989
|
+
position: "static",
|
|
6832
6990
|
zIndex: "100",
|
|
6833
6991
|
display: "flex",
|
|
6834
6992
|
alignItems: "center",
|
|
@@ -6838,7 +6996,14 @@ function createDiagram(opts) {
|
|
|
6838
6996
|
width: "100%",
|
|
6839
6997
|
boxSizing: "border-box",
|
|
6840
6998
|
pointerEvents: "auto",
|
|
6841
|
-
flexShrink: "0"
|
|
6999
|
+
flexShrink: "0",
|
|
7000
|
+
height: "0",
|
|
7001
|
+
minHeight: "0",
|
|
7002
|
+
padding: "0",
|
|
7003
|
+
margin: "0",
|
|
7004
|
+
background: "transparent",
|
|
7005
|
+
borderTop: "none",
|
|
7006
|
+
overflow: "visible"
|
|
6842
7007
|
});
|
|
6843
7008
|
for (const eventName of [
|
|
6844
7009
|
"click",
|
|
@@ -6877,6 +7042,19 @@ function createDiagram(opts) {
|
|
|
6877
7042
|
badge.appendChild(badgeBrand);
|
|
6878
7043
|
ensureFooter().appendChild(badge);
|
|
6879
7044
|
}
|
|
7045
|
+
let studioLink = null;
|
|
7046
|
+
const studioLinkEnabled = opts.studioLink !== false;
|
|
7047
|
+
if (studioLinkEnabled) {
|
|
7048
|
+
studioLink = document.createElement("a");
|
|
7049
|
+
studioLink.className = "markdy-studio-link";
|
|
7050
|
+
studioLink.href = `${shareUrl ?? MARKDY_PLAYGROUND_URL}#code=${encodeCodeForPlaygroundHash(code)}`;
|
|
7051
|
+
studioLink.target = "_blank";
|
|
7052
|
+
studioLink.rel = "noopener noreferrer";
|
|
7053
|
+
studioLink.title = "Open in Markdy Studio";
|
|
7054
|
+
studioLink.setAttribute("aria-label", "Open in Markdy Studio");
|
|
7055
|
+
studioLink.innerHTML = `<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 5H6a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-4M14 4h6v6m0-6L10 14"/></svg>`;
|
|
7056
|
+
container.appendChild(studioLink);
|
|
7057
|
+
}
|
|
6880
7058
|
ensureSceneStyles(document);
|
|
6881
7059
|
ensureNodeStyles(document);
|
|
6882
7060
|
const sceneFrame = document.createElement("div");
|
|
@@ -7835,6 +8013,9 @@ function createDiagram(opts) {
|
|
|
7835
8013
|
container.classList.remove("markdy--pseudo-fullscreen");
|
|
7836
8014
|
if (progressEl?.parentNode === viewport) viewport.removeChild(progressEl);
|
|
7837
8015
|
if (footer?.parentNode === container) container.removeChild(footer);
|
|
8016
|
+
if (studioLink?.parentNode === container) container.removeChild(studioLink);
|
|
8017
|
+
if (fullscreenControlEl?.parentNode === container) container.removeChild(fullscreenControlEl);
|
|
8018
|
+
fullscreenControlEl = null;
|
|
7838
8019
|
if (viewport.parentNode === container) container.removeChild(viewport);
|
|
7839
8020
|
}
|
|
7840
8021
|
};
|
|
@@ -8378,7 +8559,8 @@ function createDiagram(opts) {
|
|
|
8378
8559
|
}
|
|
8379
8560
|
let removeFullscreenListeners = null;
|
|
8380
8561
|
let syncFullscreenHandler = null;
|
|
8381
|
-
|
|
8562
|
+
let fullscreenControlEl = null;
|
|
8563
|
+
function mountFullscreenControl(parent = container) {
|
|
8382
8564
|
if (!fullscreenButton) return;
|
|
8383
8565
|
const button = makeControlButton("Full", "Toggle fullscreen view", ICONS2.fullscreen);
|
|
8384
8566
|
button.className = "markdy-control-fullscreen";
|
|
@@ -8546,8 +8728,13 @@ function createDiagram(opts) {
|
|
|
8546
8728
|
host.classList.remove("markdy--pseudo-fullscreen");
|
|
8547
8729
|
host.classList.remove("markdy-fullscreen-host");
|
|
8548
8730
|
}
|
|
8731
|
+
if (fullscreenControlEl?.parentNode) {
|
|
8732
|
+
fullscreenControlEl.parentNode.removeChild(fullscreenControlEl);
|
|
8733
|
+
}
|
|
8734
|
+
fullscreenControlEl = null;
|
|
8549
8735
|
};
|
|
8550
|
-
|
|
8736
|
+
fullscreenControlEl = button;
|
|
8737
|
+
parent.appendChild(button);
|
|
8551
8738
|
}
|
|
8552
8739
|
function handleKeyDown(event) {
|
|
8553
8740
|
const target = event.target;
|
|
@@ -8582,20 +8769,15 @@ function createDiagram(opts) {
|
|
|
8582
8769
|
toolbar.setAttribute("role", "toolbar");
|
|
8583
8770
|
toolbar.setAttribute("aria-label", "Diagram controls");
|
|
8584
8771
|
Object.assign(toolbar.style, {
|
|
8585
|
-
position: "
|
|
8772
|
+
position: "absolute",
|
|
8773
|
+
bottom: "8px",
|
|
8774
|
+
left: "8px",
|
|
8586
8775
|
display: "inline-flex",
|
|
8587
8776
|
alignItems: "center",
|
|
8588
8777
|
justifyContent: "flex-start",
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
borderRadius: "0",
|
|
8593
|
-
background: "transparent",
|
|
8594
|
-
boxShadow: "none",
|
|
8595
|
-
backdropFilter: "none",
|
|
8596
|
-
transform: "none",
|
|
8597
|
-
pointerEvents: "auto",
|
|
8598
|
-
zIndex: "10"
|
|
8778
|
+
gap: "3px",
|
|
8779
|
+
zIndex: "50",
|
|
8780
|
+
pointerEvents: "auto"
|
|
8599
8781
|
});
|
|
8600
8782
|
for (const eventName of [
|
|
8601
8783
|
"click",
|
|
@@ -8623,14 +8805,16 @@ function createDiagram(opts) {
|
|
|
8623
8805
|
mountSpeedControls(speedGroup);
|
|
8624
8806
|
toolsGroup.appendChild(speedGroup);
|
|
8625
8807
|
}
|
|
8626
|
-
if (resetViewButton
|
|
8808
|
+
if (resetViewButton) {
|
|
8627
8809
|
if (toolsGroup.children.length > 0) {
|
|
8628
8810
|
const divider = document.createElement("div");
|
|
8629
8811
|
divider.className = "markdy-control-divider";
|
|
8630
8812
|
toolsGroup.appendChild(divider);
|
|
8631
8813
|
}
|
|
8632
8814
|
mountResetViewControl(toolsGroup);
|
|
8633
|
-
|
|
8815
|
+
}
|
|
8816
|
+
if (fullscreenButton) {
|
|
8817
|
+
mountFullscreenControl(container);
|
|
8634
8818
|
}
|
|
8635
8819
|
if (svgButton || gifButton || shareButton || codeButton || themeButton) {
|
|
8636
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",
|