@markdy/renderer-dom 1.4.6 → 1.4.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 +188 -86
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3655,6 +3655,13 @@ function ensureSceneStyles(doc) {
|
|
|
3655
3655
|
flex-direction: column;
|
|
3656
3656
|
box-sizing: border-box;
|
|
3657
3657
|
width: 100%;
|
|
3658
|
+
border: 1px solid var(--md-card-border, rgba(148, 163, 184, 0.22));
|
|
3659
|
+
border-radius: 12px;
|
|
3660
|
+
background: var(--md-canvas, #ffffff);
|
|
3661
|
+
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
|
|
3662
|
+
overflow: hidden;
|
|
3663
|
+
container-type: inline-size;
|
|
3664
|
+
container-name: markdy-root;
|
|
3658
3665
|
}
|
|
3659
3666
|
.markdy-viewport {
|
|
3660
3667
|
position: relative;
|
|
@@ -3663,6 +3670,7 @@ function ensureSceneStyles(doc) {
|
|
|
3663
3670
|
min-height: 0;
|
|
3664
3671
|
overflow: hidden;
|
|
3665
3672
|
box-sizing: border-box;
|
|
3673
|
+
border-radius: 11px 11px 0 0;
|
|
3666
3674
|
}
|
|
3667
3675
|
.markdy-footer {
|
|
3668
3676
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
@@ -3673,15 +3681,16 @@ function ensureSceneStyles(doc) {
|
|
|
3673
3681
|
align-items: center;
|
|
3674
3682
|
justify-content: space-between;
|
|
3675
3683
|
gap: 8px;
|
|
3676
|
-
padding:
|
|
3677
|
-
color: var(--md-text, #
|
|
3678
|
-
background:
|
|
3679
|
-
backdrop-filter:
|
|
3680
|
-
-webkit-backdrop-filter:
|
|
3681
|
-
border-top:
|
|
3684
|
+
padding: 6px 12px 6px 10px;
|
|
3685
|
+
color: var(--md-text, #64748b);
|
|
3686
|
+
background: var(--md-footer-bg, rgba(248, 250, 252, 0.82));
|
|
3687
|
+
backdrop-filter: blur(8px);
|
|
3688
|
+
-webkit-backdrop-filter: blur(8px);
|
|
3689
|
+
border-top: 1px solid var(--md-card-border, rgba(148, 163, 184, 0.14));
|
|
3682
3690
|
z-index: 100;
|
|
3683
3691
|
pointer-events: auto;
|
|
3684
3692
|
flex-shrink: 0;
|
|
3693
|
+
border-radius: 0 0 11px 11px;
|
|
3685
3694
|
}
|
|
3686
3695
|
.markdy-controls {
|
|
3687
3696
|
display: flex;
|
|
@@ -3690,14 +3699,14 @@ function ensureSceneStyles(doc) {
|
|
|
3690
3699
|
flex: 1 1 auto;
|
|
3691
3700
|
width: auto;
|
|
3692
3701
|
min-width: 0;
|
|
3693
|
-
gap:
|
|
3702
|
+
gap: 6px;
|
|
3694
3703
|
max-width: 100%;
|
|
3695
3704
|
overflow-x: auto;
|
|
3696
3705
|
overflow-y: visible;
|
|
3697
3706
|
scrollbar-width: none;
|
|
3698
3707
|
-ms-overflow-style: none;
|
|
3699
3708
|
-webkit-overflow-scrolling: touch;
|
|
3700
|
-
padding:
|
|
3709
|
+
padding: 2px 2px 2px;
|
|
3701
3710
|
margin: 0;
|
|
3702
3711
|
position: relative;
|
|
3703
3712
|
z-index: 10;
|
|
@@ -3745,27 +3754,34 @@ function ensureSceneStyles(doc) {
|
|
|
3745
3754
|
margin: 0 2px;
|
|
3746
3755
|
flex-shrink: 0;
|
|
3747
3756
|
}
|
|
3757
|
+
.markdy-btn-label {
|
|
3758
|
+
display: inline;
|
|
3759
|
+
margin-left: 3px;
|
|
3760
|
+
font-size: 11px;
|
|
3761
|
+
font-weight: 500;
|
|
3762
|
+
line-height: 1;
|
|
3763
|
+
}
|
|
3748
3764
|
.markdy-controls button {
|
|
3749
3765
|
appearance: none;
|
|
3750
3766
|
-webkit-appearance: none;
|
|
3751
3767
|
touch-action: manipulation;
|
|
3752
3768
|
user-select: none;
|
|
3753
3769
|
-webkit-user-select: none;
|
|
3754
|
-
border: 1px solid
|
|
3755
|
-
border-radius:
|
|
3756
|
-
background:
|
|
3757
|
-
color:
|
|
3770
|
+
border: 1px solid rgba(203, 213, 225, 0.7);
|
|
3771
|
+
border-radius: 6px;
|
|
3772
|
+
background: rgba(255, 255, 255, 0.9);
|
|
3773
|
+
color: #475569;
|
|
3758
3774
|
cursor: pointer;
|
|
3759
|
-
font:
|
|
3760
|
-
height:
|
|
3761
|
-
min-width:
|
|
3762
|
-
padding: 0
|
|
3775
|
+
font: 500 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
3776
|
+
height: 25px;
|
|
3777
|
+
min-width: 25px;
|
|
3778
|
+
padding: 0 7px;
|
|
3763
3779
|
display: inline-flex;
|
|
3764
3780
|
align-items: center;
|
|
3765
3781
|
justify-content: center;
|
|
3766
|
-
gap:
|
|
3782
|
+
gap: 3px;
|
|
3767
3783
|
white-space: nowrap;
|
|
3768
|
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.
|
|
3784
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
|
|
3769
3785
|
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
|
3770
3786
|
position: relative;
|
|
3771
3787
|
pointer-events: auto;
|
|
@@ -3774,30 +3790,30 @@ function ensureSceneStyles(doc) {
|
|
|
3774
3790
|
.markdy-controls button:hover:not([aria-pressed="true"]) {
|
|
3775
3791
|
position: relative;
|
|
3776
3792
|
z-index: 20;
|
|
3777
|
-
background:
|
|
3778
|
-
color:
|
|
3779
|
-
border-color:
|
|
3780
|
-
transform: translateY(-
|
|
3781
|
-
box-shadow: 0
|
|
3793
|
+
background: #ffffff;
|
|
3794
|
+
color: #0f172a;
|
|
3795
|
+
border-color: #94a3b8;
|
|
3796
|
+
transform: translateY(-0.5px);
|
|
3797
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
|
3782
3798
|
}
|
|
3783
3799
|
.markdy-controls-tools button:hover:not([aria-pressed="true"]) {
|
|
3784
3800
|
z-index: 25;
|
|
3785
|
-
border-color:
|
|
3786
|
-
box-shadow: 0
|
|
3801
|
+
border-color: #64748b;
|
|
3802
|
+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
|
|
3787
3803
|
}
|
|
3788
3804
|
.markdy-controls button[aria-pressed="true"] {
|
|
3789
3805
|
position: relative;
|
|
3790
3806
|
z-index: 20;
|
|
3791
|
-
background:
|
|
3807
|
+
background: #0f172a !important;
|
|
3792
3808
|
color: #ffffff !important;
|
|
3793
|
-
border-color:
|
|
3794
|
-
box-shadow: 0
|
|
3809
|
+
border-color: #0f172a !important;
|
|
3810
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) !important;
|
|
3795
3811
|
}
|
|
3796
3812
|
.markdy-controls button:focus-visible {
|
|
3797
3813
|
position: relative;
|
|
3798
3814
|
z-index: 30;
|
|
3799
|
-
outline: 2px solid
|
|
3800
|
-
outline-offset:
|
|
3815
|
+
outline: 2px solid #2563eb;
|
|
3816
|
+
outline-offset: 1px;
|
|
3801
3817
|
}
|
|
3802
3818
|
.markdy-controls button:active {
|
|
3803
3819
|
transform: translateY(0) scale(0.96);
|
|
@@ -3808,29 +3824,29 @@ function ensureSceneStyles(doc) {
|
|
|
3808
3824
|
vertical-align: middle;
|
|
3809
3825
|
}
|
|
3810
3826
|
.markdy-control-play {
|
|
3811
|
-
background:
|
|
3827
|
+
background: #2563eb !important;
|
|
3812
3828
|
color: #ffffff !important;
|
|
3813
|
-
border-color:
|
|
3814
|
-
padding: 0
|
|
3815
|
-
font-weight:
|
|
3816
|
-
box-shadow: 0 2px
|
|
3829
|
+
border-color: #2563eb !important;
|
|
3830
|
+
padding: 0 9px !important;
|
|
3831
|
+
font-weight: 600 !important;
|
|
3832
|
+
box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25) !important;
|
|
3817
3833
|
}
|
|
3818
3834
|
.markdy-control-play:hover {
|
|
3819
|
-
filter: brightness(1.
|
|
3820
|
-
|
|
3821
|
-
|
|
3835
|
+
filter: brightness(1.06);
|
|
3836
|
+
transform: translateY(-0.5px);
|
|
3837
|
+
box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35) !important;
|
|
3822
3838
|
}
|
|
3823
3839
|
.markdy-badge {
|
|
3824
3840
|
display: inline-flex;
|
|
3825
3841
|
align-items: center;
|
|
3826
3842
|
text-align: right;
|
|
3827
|
-
font-family: system
|
|
3843
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
3828
3844
|
font-size: 10px;
|
|
3829
|
-
font-weight:
|
|
3830
|
-
color:
|
|
3845
|
+
font-weight: 500;
|
|
3846
|
+
color: #94a3b8;
|
|
3831
3847
|
text-decoration: none;
|
|
3832
3848
|
padding: 0;
|
|
3833
|
-
opacity: 0.
|
|
3849
|
+
opacity: 0.6;
|
|
3834
3850
|
margin-left: auto;
|
|
3835
3851
|
flex-shrink: 0;
|
|
3836
3852
|
transition: opacity 0.15s ease, color 0.15s ease;
|
|
@@ -3838,7 +3854,58 @@ function ensureSceneStyles(doc) {
|
|
|
3838
3854
|
}
|
|
3839
3855
|
.markdy-badge:hover {
|
|
3840
3856
|
opacity: 1;
|
|
3841
|
-
color:
|
|
3857
|
+
color: #475569;
|
|
3858
|
+
}
|
|
3859
|
+
@media (max-width: 640px) {
|
|
3860
|
+
.markdy-btn-label {
|
|
3861
|
+
display: none !important;
|
|
3862
|
+
}
|
|
3863
|
+
.markdy-controls button {
|
|
3864
|
+
padding: 0 !important;
|
|
3865
|
+
width: 25px !important;
|
|
3866
|
+
height: 25px !important;
|
|
3867
|
+
min-width: 25px !important;
|
|
3868
|
+
justify-content: center !important;
|
|
3869
|
+
}
|
|
3870
|
+
.markdy-controls-secondary,
|
|
3871
|
+
.markdy-control-divider-secondary {
|
|
3872
|
+
display: none !important;
|
|
3873
|
+
}
|
|
3874
|
+
.markdy-speed-group {
|
|
3875
|
+
display: none !important;
|
|
3876
|
+
}
|
|
3877
|
+
.markdy-controls {
|
|
3878
|
+
gap: 4px !important;
|
|
3879
|
+
}
|
|
3880
|
+
.markdy-footer {
|
|
3881
|
+
padding: 5px 8px !important;
|
|
3882
|
+
}
|
|
3883
|
+
.markdy-badge {
|
|
3884
|
+
font-size: 9px !important;
|
|
3885
|
+
opacity: 0.55;
|
|
3886
|
+
}
|
|
3887
|
+
}
|
|
3888
|
+
@container markdy-root (max-width: 520px) {
|
|
3889
|
+
.markdy-btn-label {
|
|
3890
|
+
display: none !important;
|
|
3891
|
+
}
|
|
3892
|
+
.markdy-controls button {
|
|
3893
|
+
padding: 0 !important;
|
|
3894
|
+
width: 25px !important;
|
|
3895
|
+
height: 25px !important;
|
|
3896
|
+
min-width: 25px !important;
|
|
3897
|
+
justify-content: center !important;
|
|
3898
|
+
}
|
|
3899
|
+
.markdy-controls-secondary,
|
|
3900
|
+
.markdy-control-divider-secondary {
|
|
3901
|
+
display: none !important;
|
|
3902
|
+
}
|
|
3903
|
+
.markdy-speed-group {
|
|
3904
|
+
display: none !important;
|
|
3905
|
+
}
|
|
3906
|
+
.markdy-controls {
|
|
3907
|
+
gap: 4px !important;
|
|
3908
|
+
}
|
|
3842
3909
|
}
|
|
3843
3910
|
.markdy-speed-group {
|
|
3844
3911
|
display: inline-flex;
|
|
@@ -3867,9 +3934,9 @@ function ensureSceneStyles(doc) {
|
|
|
3867
3934
|
transform: none;
|
|
3868
3935
|
}
|
|
3869
3936
|
.markdy-speed-group .markdy-control-rate[aria-pressed="true"] {
|
|
3870
|
-
background: var(--accent, #
|
|
3937
|
+
background: var(--accent, #2563eb) !important;
|
|
3871
3938
|
color: #ffffff !important;
|
|
3872
|
-
box-shadow: 0 1px
|
|
3939
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) !important;
|
|
3873
3940
|
}
|
|
3874
3941
|
.markdy-control-time {
|
|
3875
3942
|
font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
@@ -3881,9 +3948,9 @@ function ensureSceneStyles(doc) {
|
|
|
3881
3948
|
letter-spacing: -0.02em;
|
|
3882
3949
|
}
|
|
3883
3950
|
.markdy-btn-flashed {
|
|
3884
|
-
background: rgba(
|
|
3885
|
-
color: #
|
|
3886
|
-
border-color: #
|
|
3951
|
+
background: rgba(37, 99, 235, 0.15) !important;
|
|
3952
|
+
color: #2563eb !important;
|
|
3953
|
+
border-color: #2563eb !important;
|
|
3887
3954
|
}
|
|
3888
3955
|
/* \u2500\u2500 Code panel overlay \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
3889
3956
|
.markdy-code-panel-overlay {
|
|
@@ -3977,16 +4044,16 @@ function ensureSceneStyles(doc) {
|
|
|
3977
4044
|
white-space: nowrap;
|
|
3978
4045
|
}
|
|
3979
4046
|
.markdy-code-panel__playground {
|
|
3980
|
-
background: var(--accent-light, rgba(
|
|
3981
|
-
color: var(--accent, #
|
|
3982
|
-
border-color: var(--accent, #
|
|
3983
|
-
font-weight:
|
|
4047
|
+
background: var(--accent-light, rgba(37, 99, 235, 0.1));
|
|
4048
|
+
color: var(--accent, #2563eb);
|
|
4049
|
+
border-color: var(--accent, #2563eb);
|
|
4050
|
+
font-weight: 600;
|
|
3984
4051
|
}
|
|
3985
4052
|
.markdy-code-panel__playground:hover {
|
|
3986
|
-
background: var(--accent, #
|
|
4053
|
+
background: var(--accent, #2563eb);
|
|
3987
4054
|
color: #ffffff;
|
|
3988
|
-
border-color: var(--accent, #
|
|
3989
|
-
transform: translateY(-
|
|
4055
|
+
border-color: var(--accent, #2563eb);
|
|
4056
|
+
transform: translateY(-0.5px);
|
|
3990
4057
|
}
|
|
3991
4058
|
.markdy-code-panel__copy:hover,
|
|
3992
4059
|
.markdy-code-panel__close:hover {
|
|
@@ -4058,8 +4125,8 @@ function ensureSceneStyles(doc) {
|
|
|
4058
4125
|
height: 4.5px;
|
|
4059
4126
|
background: linear-gradient(
|
|
4060
4127
|
to right,
|
|
4061
|
-
var(--accent, #
|
|
4062
|
-
var(--accent, #
|
|
4128
|
+
var(--accent, #2563eb) 0%,
|
|
4129
|
+
var(--accent, #2563eb) var(--seek-pct, 0%),
|
|
4063
4130
|
rgba(148, 163, 184, 0.35) var(--seek-pct, 0%),
|
|
4064
4131
|
rgba(148, 163, 184, 0.35) 100%
|
|
4065
4132
|
);
|
|
@@ -4071,28 +4138,28 @@ function ensureSceneStyles(doc) {
|
|
|
4071
4138
|
height: 13px;
|
|
4072
4139
|
width: 13px;
|
|
4073
4140
|
border-radius: 50%;
|
|
4074
|
-
background: var(--accent, #
|
|
4141
|
+
background: var(--accent, #2563eb);
|
|
4075
4142
|
border: 2px solid #ffffff;
|
|
4076
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.
|
|
4143
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
4077
4144
|
margin-top: -4.25px;
|
|
4078
4145
|
cursor: grab;
|
|
4079
4146
|
transition: transform 0.1s ease, box-shadow 0.15s ease;
|
|
4080
4147
|
}
|
|
4081
4148
|
.markdy-control-seek:hover::-webkit-slider-thumb {
|
|
4082
|
-
transform: scale(1.
|
|
4083
|
-
box-shadow: 0
|
|
4149
|
+
transform: scale(1.15);
|
|
4150
|
+
box-shadow: 0 1px 4px rgba(37, 99, 235, 0.4);
|
|
4084
4151
|
}
|
|
4085
4152
|
.markdy-control-seek:active::-webkit-slider-thumb {
|
|
4086
4153
|
cursor: grabbing;
|
|
4087
|
-
transform: scale(1.
|
|
4154
|
+
transform: scale(1.15);
|
|
4088
4155
|
}
|
|
4089
4156
|
.markdy-control-seek::-moz-range-track {
|
|
4090
4157
|
width: 100%;
|
|
4091
4158
|
height: 4.5px;
|
|
4092
4159
|
background: linear-gradient(
|
|
4093
4160
|
to right,
|
|
4094
|
-
var(--accent, #
|
|
4095
|
-
var(--accent, #
|
|
4161
|
+
var(--accent, #2563eb) 0%,
|
|
4162
|
+
var(--accent, #2563eb) var(--seek-pct, 0%),
|
|
4096
4163
|
rgba(148, 163, 184, 0.35) var(--seek-pct, 0%),
|
|
4097
4164
|
rgba(148, 163, 184, 0.35) 100%
|
|
4098
4165
|
);
|
|
@@ -4102,9 +4169,9 @@ function ensureSceneStyles(doc) {
|
|
|
4102
4169
|
height: 13px;
|
|
4103
4170
|
width: 13px;
|
|
4104
4171
|
border-radius: 50%;
|
|
4105
|
-
background: var(--accent, #
|
|
4172
|
+
background: var(--accent, #2563eb);
|
|
4106
4173
|
border: 2px solid #ffffff;
|
|
4107
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.
|
|
4174
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
4108
4175
|
cursor: grab;
|
|
4109
4176
|
transition: transform 0.1s ease, box-shadow 0.15s ease;
|
|
4110
4177
|
}
|
|
@@ -4143,17 +4210,52 @@ function ensureSceneStyles(doc) {
|
|
|
4143
4210
|
[data-markdy-theme="nebula"] .markdy-controls button[aria-pressed="true"],
|
|
4144
4211
|
:root[data-theme="dark"] .markdy-controls button[aria-pressed="true"],
|
|
4145
4212
|
.theme-dark .markdy-controls button[aria-pressed="true"] {
|
|
4146
|
-
background:
|
|
4147
|
-
color: #
|
|
4148
|
-
border-color:
|
|
4149
|
-
box-shadow: 0
|
|
4213
|
+
background: #f8fafc !important;
|
|
4214
|
+
color: #0f172a !important;
|
|
4215
|
+
border-color: #f8fafc !important;
|
|
4216
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
|
|
4217
|
+
}
|
|
4218
|
+
[data-markdy-theme="midnight"].markdy-diagram-root,
|
|
4219
|
+
[data-markdy-theme="blueprint"].markdy-diagram-root,
|
|
4220
|
+
[data-markdy-theme="terminal"].markdy-diagram-root,
|
|
4221
|
+
[data-markdy-theme="graphite"].markdy-diagram-root,
|
|
4222
|
+
[data-markdy-theme="nebula"].markdy-diagram-root,
|
|
4223
|
+
:root[data-theme="dark"] .markdy-diagram-root,
|
|
4224
|
+
.theme-dark .markdy-diagram-root,
|
|
4225
|
+
.dark .markdy-diagram-root {
|
|
4226
|
+
border-color: var(--md-card-border, rgba(255, 255, 255, 0.09));
|
|
4227
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
|
|
4228
|
+
}
|
|
4229
|
+
[data-markdy-theme="midnight"] .markdy-footer,
|
|
4230
|
+
[data-markdy-theme="blueprint"] .markdy-footer,
|
|
4231
|
+
[data-markdy-theme="terminal"] .markdy-footer,
|
|
4232
|
+
[data-markdy-theme="graphite"] .markdy-footer,
|
|
4233
|
+
[data-markdy-theme="nebula"] .markdy-footer,
|
|
4234
|
+
:root[data-theme="dark"] .markdy-footer,
|
|
4235
|
+
.theme-dark .markdy-footer,
|
|
4236
|
+
.dark .markdy-footer {
|
|
4237
|
+
background: var(--md-footer-bg, rgba(15, 23, 42, 0.85));
|
|
4238
|
+
border-top-color: var(--md-card-border, rgba(255, 255, 255, 0.08));
|
|
4239
|
+
color: #94a3b8;
|
|
4240
|
+
}
|
|
4241
|
+
[data-markdy-theme="midnight"] .markdy-controls button:not([aria-pressed="true"]),
|
|
4242
|
+
[data-markdy-theme="blueprint"] .markdy-controls button:not([aria-pressed="true"]),
|
|
4243
|
+
[data-markdy-theme="terminal"] .markdy-controls button:not([aria-pressed="true"]),
|
|
4244
|
+
[data-markdy-theme="graphite"] .markdy-controls button:not([aria-pressed="true"]),
|
|
4245
|
+
[data-markdy-theme="nebula"] .markdy-controls button:not([aria-pressed="true"]),
|
|
4246
|
+
:root[data-theme="dark"] .markdy-controls button:not([aria-pressed="true"]),
|
|
4247
|
+
.theme-dark .markdy-controls button:not([aria-pressed="true"]),
|
|
4248
|
+
.dark .markdy-controls button:not([aria-pressed="true"]) {
|
|
4249
|
+
background: rgba(30, 41, 59, 0.7);
|
|
4250
|
+
border-color: rgba(71, 85, 105, 0.5);
|
|
4251
|
+
color: #cbd5e1;
|
|
4150
4252
|
}
|
|
4151
4253
|
.markdy-footer a {
|
|
4152
4254
|
transition: opacity 0.15s ease, color 0.15s ease;
|
|
4153
4255
|
}
|
|
4154
4256
|
.markdy-footer a:hover {
|
|
4155
4257
|
opacity: 1 !important;
|
|
4156
|
-
color: #
|
|
4258
|
+
color: #94a3b8 !important;
|
|
4157
4259
|
}
|
|
4158
4260
|
/* Fullscreen & Fallback Pseudo-Fullscreen Views */
|
|
4159
4261
|
.markdy-diagram-root:fullscreen,
|
|
@@ -6309,7 +6411,7 @@ function createDiagram(opts) {
|
|
|
6309
6411
|
let playbackRate = player.playback.rate;
|
|
6310
6412
|
const rawColor = player.chrome.progressColor;
|
|
6311
6413
|
const customColor = rawColor && rawColor.trim() !== "rainbow" ? rawColor.trim() : null;
|
|
6312
|
-
const DEFAULT_RAINBOW = "
|
|
6414
|
+
const DEFAULT_RAINBOW = "#f53d3d 0deg, #f57c3d 60deg, #f5d43d 120deg, #3df57c 180deg, #3db2f5 240deg, #863df5 300deg, #f53d3d 360deg";
|
|
6313
6415
|
const totalDurationMs = plan.duration * 1e3;
|
|
6314
6416
|
const durationSeconds = plan.duration;
|
|
6315
6417
|
container.classList.add("markdy-diagram-root");
|
|
@@ -6324,7 +6426,6 @@ function createDiagram(opts) {
|
|
|
6324
6426
|
width: "100%"
|
|
6325
6427
|
});
|
|
6326
6428
|
if (container.style.aspectRatio) container.style.aspectRatio = "unset";
|
|
6327
|
-
if (container.style.overflow === "hidden") container.style.overflow = "visible";
|
|
6328
6429
|
const initialBounds = computeDiagramContentBounds(plan, contentPadding !== void 0 ? { padding: contentPadding } : void 0);
|
|
6329
6430
|
const contentRatio = `${initialBounds.width} / ${initialBounds.height}`;
|
|
6330
6431
|
const viewport = document.createElement("div");
|
|
@@ -6400,8 +6501,6 @@ function createDiagram(opts) {
|
|
|
6400
6501
|
gap: "6px",
|
|
6401
6502
|
width: "100%",
|
|
6402
6503
|
boxSizing: "border-box",
|
|
6403
|
-
padding: "6px 8px 4px",
|
|
6404
|
-
background: "transparent",
|
|
6405
6504
|
pointerEvents: "auto",
|
|
6406
6505
|
flexShrink: "0"
|
|
6407
6506
|
});
|
|
@@ -6996,7 +7095,7 @@ function createDiagram(opts) {
|
|
|
6996
7095
|
function syncControls() {
|
|
6997
7096
|
if (controlsPlayButton) {
|
|
6998
7097
|
const playing = isPlaying;
|
|
6999
|
-
controlsPlayButton.innerHTML = `${playing ? ICONS2.pause : ICONS2.play}
|
|
7098
|
+
controlsPlayButton.innerHTML = `${playing ? ICONS2.pause : ICONS2.play}<span class="markdy-btn-label">${playing ? "Pause" : "Play"}</span>`;
|
|
7000
7099
|
const playLabel = playing ? "Pause diagram" : "Play diagram";
|
|
7001
7100
|
controlsPlayButton.setAttribute("aria-label", playLabel);
|
|
7002
7101
|
controlsPlayButton.title = playLabel;
|
|
@@ -7340,9 +7439,9 @@ function createDiagram(opts) {
|
|
|
7340
7439
|
button.setAttribute("aria-label", ariaLabel);
|
|
7341
7440
|
button.title = ariaLabel;
|
|
7342
7441
|
if (iconSvg) {
|
|
7343
|
-
button.innerHTML = `${iconSvg}
|
|
7442
|
+
button.innerHTML = `${iconSvg}<span class="markdy-btn-label">${label}</span>`;
|
|
7344
7443
|
} else {
|
|
7345
|
-
button.
|
|
7444
|
+
button.innerHTML = `<span class="markdy-btn-label">${label}</span>`;
|
|
7346
7445
|
}
|
|
7347
7446
|
return button;
|
|
7348
7447
|
}
|
|
@@ -7406,7 +7505,7 @@ function createDiagram(opts) {
|
|
|
7406
7505
|
const originalHtml = button.dataset.originalHtml ?? button.innerHTML;
|
|
7407
7506
|
button.dataset.originalHtml = originalHtml;
|
|
7408
7507
|
const isSuccess = !message.toLowerCase().includes("fail");
|
|
7409
|
-
button.innerHTML = isSuccess ? `${ICONS2.check}
|
|
7508
|
+
button.innerHTML = isSuccess ? `${ICONS2.check}<span class="markdy-btn-label">${message}</span>` : `<span class="markdy-btn-label">${message}</span>`;
|
|
7410
7509
|
button.classList.add("markdy-btn-flashed");
|
|
7411
7510
|
setTimeout(() => {
|
|
7412
7511
|
button.innerHTML = button.dataset.originalHtml ?? originalHtml;
|
|
@@ -7702,7 +7801,7 @@ function createDiagram(opts) {
|
|
|
7702
7801
|
const isFull = typeof explicitFull === "boolean" ? explicitFull : isPseudoFull || document.fullscreenElement === host || document.fullscreenElement === viewport || document.webkitFullscreenElement === host || document.webkitFullscreenElement === viewport || document.mozFullScreenElement === host || document.msFullscreenElement === host;
|
|
7703
7802
|
button.setAttribute("aria-pressed", isFull ? "true" : "false");
|
|
7704
7803
|
button.title = isFull ? "Exit fullscreen" : "Toggle fullscreen view";
|
|
7705
|
-
button.innerHTML = isFull ? `${ICONS2.fullscreen}Exit
|
|
7804
|
+
button.innerHTML = isFull ? `${ICONS2.fullscreen}<span class="markdy-btn-label">Exit</span>` : `${ICONS2.fullscreen}<span class="markdy-btn-label">Full</span>`;
|
|
7706
7805
|
if (isFull) {
|
|
7707
7806
|
host.classList.add("markdy-fullscreen-host");
|
|
7708
7807
|
if (isPseudoFull) {
|
|
@@ -7920,14 +8019,17 @@ function createDiagram(opts) {
|
|
|
7920
8019
|
if (svgButton || gifButton || shareButton || codeButton || themeButton) {
|
|
7921
8020
|
if (toolsGroup.children.length > 0) {
|
|
7922
8021
|
const divider = document.createElement("div");
|
|
7923
|
-
divider.className = "markdy-control-divider";
|
|
8022
|
+
divider.className = "markdy-control-divider markdy-control-divider-secondary";
|
|
7924
8023
|
toolsGroup.appendChild(divider);
|
|
7925
8024
|
}
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
8025
|
+
const secondaryGroup = document.createElement("div");
|
|
8026
|
+
secondaryGroup.className = "markdy-controls-group markdy-controls-secondary";
|
|
8027
|
+
mountThemeControl(secondaryGroup);
|
|
8028
|
+
mountSvgControl(secondaryGroup);
|
|
8029
|
+
mountGifControl(secondaryGroup);
|
|
8030
|
+
mountShareControl(secondaryGroup);
|
|
8031
|
+
mountCodeControl(secondaryGroup);
|
|
8032
|
+
toolsGroup.appendChild(secondaryGroup);
|
|
7931
8033
|
}
|
|
7932
8034
|
if (toolsGroup.children.length > 0) toolbar.appendChild(toolsGroup);
|
|
7933
8035
|
ensureFooter().insertBefore(toolbar, badge);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markdy/renderer-dom",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.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.4.
|
|
49
|
+
"@markdy/core": "1.4.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.4.
|
|
56
|
+
"@markdy/stdlib-systems": "1.4.7"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "tsup",
|