@youtyan/code-viewer 0.1.0 → 0.1.1
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/README.md +12 -5
- package/package.json +4 -3
- package/web/app.js +1393 -90
- package/web/favicon.png +0 -0
- package/web/index.html +36 -26
- package/web/style.css +737 -59
- package/web-src/server/dev.ts +95 -0
- package/web-src/server/git.ts +104 -3
- package/web-src/server/preview.ts +88 -6
- package/web-src/server/range.ts +8 -0
- package/web-src/server/runtime.d.ts +6 -1
- package/web-src/types.ts +18 -0
package/web/style.css
CHANGED
|
@@ -31,15 +31,20 @@
|
|
|
31
31
|
--done: #8250df;
|
|
32
32
|
/* diff colors (GitHub exact) */
|
|
33
33
|
--diff-add-bg: #dafbe1;
|
|
34
|
-
--diff-add-num-bg: #
|
|
34
|
+
--diff-add-num-bg: #aceebb;
|
|
35
|
+
--diff-add-num-sticky-bg: #aceebb;
|
|
35
36
|
--diff-add-word-bg: #aceebb;
|
|
36
37
|
--diff-del-bg: #ffebe9;
|
|
37
|
-
--diff-del-num-bg: #
|
|
38
|
+
--diff-del-num-bg: #ffcecb;
|
|
39
|
+
--diff-del-num-sticky-bg: #ffcecb;
|
|
38
40
|
--diff-del-word-bg: #ff818266;
|
|
39
41
|
--diff-hunk-bg: #ddf4ff;
|
|
40
42
|
--diff-hunk-fg: #0550ae;
|
|
43
|
+
--blob-tab-active: #fd8c73;
|
|
41
44
|
/* sizing */
|
|
45
|
+
--global-header-h: 48px;
|
|
42
46
|
--topbar-h: 56px;
|
|
47
|
+
--chrome-h: calc(var(--global-header-h) + var(--topbar-h));
|
|
43
48
|
--sidebar-w: 308px;
|
|
44
49
|
/* shadows */
|
|
45
50
|
--shadow-sm: 0 1px 0 rgba(31,35,40,0.04);
|
|
@@ -70,12 +75,15 @@
|
|
|
70
75
|
--done: #a371f7;
|
|
71
76
|
--diff-add-bg: rgba(46,160,67,0.15);
|
|
72
77
|
--diff-add-num-bg: rgba(46,160,67,0.30);
|
|
78
|
+
--diff-add-num-sticky-bg: #173d20;
|
|
73
79
|
--diff-add-word-bg: rgba(46,160,67,0.40);
|
|
74
80
|
--diff-del-bg: rgba(248,81,73,0.15);
|
|
75
81
|
--diff-del-num-bg: rgba(248,81,73,0.30);
|
|
82
|
+
--diff-del-num-sticky-bg: #58211f;
|
|
76
83
|
--diff-del-word-bg: rgba(248,81,73,0.40);
|
|
77
84
|
--diff-hunk-bg: rgba(56,139,253,0.10);
|
|
78
85
|
--diff-hunk-fg: #58a6ff;
|
|
86
|
+
--blob-tab-active: #ec775c;
|
|
79
87
|
}
|
|
80
88
|
|
|
81
89
|
/* ===== Reset / base ===== */
|
|
@@ -93,13 +101,27 @@ html, body {
|
|
|
93
101
|
-moz-osx-font-smoothing: auto;
|
|
94
102
|
}
|
|
95
103
|
|
|
96
|
-
/* Window scrolls; topbar + sidebar are fixed */
|
|
104
|
+
/* Window scrolls; global header + topbar + sidebar are fixed */
|
|
97
105
|
#app { display: block; }
|
|
98
106
|
|
|
107
|
+
/* ===== Global header ===== */
|
|
108
|
+
#global-header {
|
|
109
|
+
position: fixed;
|
|
110
|
+
top: 0; left: 0; right: 0;
|
|
111
|
+
height: var(--global-header-h);
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
gap: 20px;
|
|
115
|
+
padding: 0 18px;
|
|
116
|
+
background: var(--bg-soft);
|
|
117
|
+
border-bottom: 1px solid var(--border);
|
|
118
|
+
z-index: 60;
|
|
119
|
+
}
|
|
120
|
+
|
|
99
121
|
/* ===== Topbar ===== */
|
|
100
122
|
#topbar {
|
|
101
123
|
position: fixed;
|
|
102
|
-
top:
|
|
124
|
+
top: var(--global-header-h); left: 0; right: 0;
|
|
103
125
|
height: var(--topbar-h);
|
|
104
126
|
display: flex;
|
|
105
127
|
align-items: center;
|
|
@@ -110,17 +132,88 @@ html, body {
|
|
|
110
132
|
z-index: 50;
|
|
111
133
|
}
|
|
112
134
|
.brand {
|
|
113
|
-
display: flex; align-items: center; gap:
|
|
135
|
+
display: flex; align-items: center; gap: 9px;
|
|
114
136
|
font-weight: 600;
|
|
115
137
|
font-size: 14px;
|
|
116
138
|
color: var(--fg);
|
|
139
|
+
flex-shrink: 0;
|
|
140
|
+
text-decoration: none;
|
|
117
141
|
}
|
|
142
|
+
.brand:hover { color: var(--fg); text-decoration: none; }
|
|
118
143
|
.brand .dot {
|
|
119
144
|
width: 8px; height: 8px; border-radius: 50%;
|
|
120
145
|
background: var(--accent);
|
|
121
146
|
}
|
|
122
147
|
.brand .title { letter-spacing: -0.005em; }
|
|
123
148
|
|
|
149
|
+
.app-menu {
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
gap: 18px;
|
|
153
|
+
height: 100%;
|
|
154
|
+
margin-left: 0;
|
|
155
|
+
padding-left: 18px;
|
|
156
|
+
border-left: 1px solid var(--border-muted);
|
|
157
|
+
flex-shrink: 0;
|
|
158
|
+
}
|
|
159
|
+
.app-menu-item {
|
|
160
|
+
position: relative;
|
|
161
|
+
display: inline-flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
height: 100%;
|
|
164
|
+
padding: 0 2px;
|
|
165
|
+
border-radius: 0;
|
|
166
|
+
color: var(--fg-muted);
|
|
167
|
+
font-size: 14px;
|
|
168
|
+
font-weight: 600;
|
|
169
|
+
line-height: 1;
|
|
170
|
+
text-decoration: none;
|
|
171
|
+
white-space: nowrap;
|
|
172
|
+
}
|
|
173
|
+
.app-menu-item:hover {
|
|
174
|
+
color: var(--accent);
|
|
175
|
+
text-decoration: none;
|
|
176
|
+
}
|
|
177
|
+
.app-menu-item.active {
|
|
178
|
+
background: transparent;
|
|
179
|
+
color: var(--fg);
|
|
180
|
+
}
|
|
181
|
+
.app-menu-item.active::after {
|
|
182
|
+
content: "";
|
|
183
|
+
position: absolute;
|
|
184
|
+
left: 0;
|
|
185
|
+
right: 0;
|
|
186
|
+
bottom: -1px;
|
|
187
|
+
height: 2px;
|
|
188
|
+
border-radius: 2px 2px 0 0;
|
|
189
|
+
background: var(--blob-tab-active);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.global-actions {
|
|
193
|
+
margin-left: auto;
|
|
194
|
+
display: inline-flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
gap: 12px;
|
|
197
|
+
}
|
|
198
|
+
.global-actions #theme {
|
|
199
|
+
display: inline-flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
justify-content: center;
|
|
202
|
+
width: 28px;
|
|
203
|
+
height: 28px;
|
|
204
|
+
border: 1px solid var(--border);
|
|
205
|
+
background: var(--bg);
|
|
206
|
+
color: var(--fg);
|
|
207
|
+
border-radius: 6px;
|
|
208
|
+
cursor: pointer;
|
|
209
|
+
font-size: 13px;
|
|
210
|
+
transition: background 0.12s, border-color 0.12s;
|
|
211
|
+
}
|
|
212
|
+
.global-actions #theme:hover {
|
|
213
|
+
background: var(--bg-mute);
|
|
214
|
+
border-color: var(--border-strong);
|
|
215
|
+
}
|
|
216
|
+
|
|
124
217
|
#meta {
|
|
125
218
|
display: flex; align-items: center; gap: 10px;
|
|
126
219
|
color: var(--fg-muted);
|
|
@@ -251,7 +344,8 @@ html, body {
|
|
|
251
344
|
color: #fff;
|
|
252
345
|
border-color: var(--attn);
|
|
253
346
|
}
|
|
254
|
-
.hidden-by-tests
|
|
347
|
+
.hidden-by-tests,
|
|
348
|
+
.hidden-by-filter { display: none !important; }
|
|
255
349
|
|
|
256
350
|
/* ===== Ref picker popover ===== */
|
|
257
351
|
#ref-popover[hidden] { display: none !important; }
|
|
@@ -543,7 +637,6 @@ html, body {
|
|
|
543
637
|
#status {
|
|
544
638
|
width: 8px; height: 8px; border-radius: 50%;
|
|
545
639
|
background: var(--fg-subtle);
|
|
546
|
-
margin-left: 4px;
|
|
547
640
|
transition: background 0.2s ease, box-shadow 0.2s ease;
|
|
548
641
|
}
|
|
549
642
|
#status.live { background: #2ea043; box-shadow: 0 0 0 3px rgba(46,160,67,0.20); }
|
|
@@ -553,7 +646,7 @@ html, body {
|
|
|
553
646
|
/* ===== Top-edge loading bar (indeterminate) ===== */
|
|
554
647
|
#load-bar {
|
|
555
648
|
position: fixed;
|
|
556
|
-
top: var(--
|
|
649
|
+
top: var(--chrome-h);
|
|
557
650
|
left: 0; right: 0;
|
|
558
651
|
height: 2px;
|
|
559
652
|
z-index: 49;
|
|
@@ -581,7 +674,7 @@ html, body {
|
|
|
581
674
|
#sidebar {
|
|
582
675
|
position: fixed;
|
|
583
676
|
left: 0;
|
|
584
|
-
top: var(--
|
|
677
|
+
top: var(--chrome-h);
|
|
585
678
|
bottom: 0;
|
|
586
679
|
width: var(--sidebar-w);
|
|
587
680
|
background: var(--bg-soft);
|
|
@@ -635,6 +728,10 @@ html, body {
|
|
|
635
728
|
border-color: var(--accent);
|
|
636
729
|
box-shadow: 0 0 0 3px var(--accent-muted);
|
|
637
730
|
}
|
|
731
|
+
#sb-filter[aria-invalid="true"] {
|
|
732
|
+
border-color: var(--danger);
|
|
733
|
+
box-shadow: 0 0 0 3px rgba(207,34,46,0.20);
|
|
734
|
+
}
|
|
638
735
|
#sb-filter::placeholder { color: var(--fg-subtle); }
|
|
639
736
|
|
|
640
737
|
/* ===== Sidebar resizer (drag right edge to resize) ===== */
|
|
@@ -675,46 +772,62 @@ body.gdp-resizing * { user-select: none !important; }
|
|
|
675
772
|
padding: 4px 0 0;
|
|
676
773
|
}
|
|
677
774
|
#filelist.tree .tree-dir {
|
|
678
|
-
display:
|
|
775
|
+
display: grid;
|
|
776
|
+
grid-template-columns: 16px 16px minmax(0, 1fr);
|
|
679
777
|
align-items: center;
|
|
680
|
-
gap:
|
|
681
|
-
padding:
|
|
778
|
+
gap: 8px;
|
|
779
|
+
padding: 5.6px 8px 5.6px var(--lvl-pad, 12px);
|
|
682
780
|
cursor: pointer;
|
|
683
|
-
color: var(--fg
|
|
684
|
-
font-size:
|
|
781
|
+
color: var(--fg);
|
|
782
|
+
font-size: 14px;
|
|
783
|
+
line-height: 21px;
|
|
685
784
|
user-select: none;
|
|
785
|
+
border-radius: 6px;
|
|
686
786
|
}
|
|
687
787
|
#filelist.tree .tree-dir:hover { background: var(--bg-mute); color: var(--fg); }
|
|
688
788
|
#filelist.tree .tree-dir .chev {
|
|
689
|
-
display:
|
|
690
|
-
width:
|
|
691
|
-
|
|
789
|
+
display: flex;
|
|
790
|
+
width: 16px;
|
|
791
|
+
height: 20.8px;
|
|
792
|
+
align-items: flex-start;
|
|
793
|
+
justify-content: center;
|
|
794
|
+
padding-top: 4.4px;
|
|
692
795
|
font-weight: 700;
|
|
693
796
|
transition: transform 0.15s, color 0.15s;
|
|
694
|
-
color:
|
|
797
|
+
color: #59636e;
|
|
695
798
|
}
|
|
696
799
|
#filelist.tree .tree-dir.collapsed .chev { transform: rotate(-90deg); }
|
|
697
|
-
#filelist.tree .tree-dir:hover .chev { color:
|
|
800
|
+
#filelist.tree .tree-dir:hover .chev { color: #59636e; }
|
|
801
|
+
#filelist.tree .tree-dir .chev .octicon {
|
|
802
|
+
display: block;
|
|
803
|
+
width: 12px;
|
|
804
|
+
height: 12px;
|
|
805
|
+
}
|
|
698
806
|
#filelist.tree .tree-dir .dir-name {
|
|
699
|
-
font-size:
|
|
807
|
+
font-size: 14px;
|
|
808
|
+
line-height: 21px;
|
|
700
809
|
color: var(--fg);
|
|
701
|
-
font-weight:
|
|
810
|
+
font-weight: 400;
|
|
702
811
|
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
703
812
|
}
|
|
704
813
|
#filelist.tree .tree-dir .dir-icon {
|
|
705
|
-
color:
|
|
814
|
+
color: #54aeff;
|
|
706
815
|
flex-shrink: 0;
|
|
707
|
-
|
|
708
|
-
|
|
816
|
+
width: 16px;
|
|
817
|
+
height: 16px;
|
|
818
|
+
display: grid;
|
|
819
|
+
align-items: center;
|
|
820
|
+
justify-content: center;
|
|
709
821
|
}
|
|
710
|
-
#filelist.tree .tree-dir.
|
|
711
|
-
#filelist.tree .tree-dir.collapsed
|
|
822
|
+
#filelist.tree .tree-dir .dir-icon .octicon { display: block; }
|
|
823
|
+
#filelist.tree .tree-dir.collapsed { color: var(--fg); }
|
|
824
|
+
#filelist.tree .tree-dir.collapsed .dir-name { color: var(--fg); font-weight: 400; }
|
|
712
825
|
#filelist.tree .tree-children { list-style: none; padding: 0; margin: 0; }
|
|
713
826
|
#filelist.tree .tree-dir.collapsed + .tree-children { display: none; }
|
|
714
827
|
|
|
715
828
|
#filelist.tree .tree-file {
|
|
716
829
|
display: grid;
|
|
717
|
-
grid-template-columns: 16px 1fr auto;
|
|
830
|
+
grid-template-columns: 16px 16px minmax(0, 1fr) auto;
|
|
718
831
|
align-items: center;
|
|
719
832
|
gap: 8px;
|
|
720
833
|
padding: 4px 12px 4px var(--lvl-pad, 12px);
|
|
@@ -729,6 +842,13 @@ body.gdp-resizing * { user-select: none !important; }
|
|
|
729
842
|
background: var(--accent-subtle);
|
|
730
843
|
border-left-color: var(--accent);
|
|
731
844
|
}
|
|
845
|
+
#filelist.tree .tree-file .chev-spacer {
|
|
846
|
+
width: 16px;
|
|
847
|
+
height: 1px;
|
|
848
|
+
}
|
|
849
|
+
#filelist li.viewed {
|
|
850
|
+
color: var(--fg-subtle);
|
|
851
|
+
}
|
|
732
852
|
#filelist.tree .tree-file.hidden,
|
|
733
853
|
#filelist.tree .tree-dir.hidden { display: none; }
|
|
734
854
|
#filelist.tree .tree-file .name {
|
|
@@ -813,8 +933,8 @@ body.gdp-resizing * { user-select: none !important; }
|
|
|
813
933
|
/* ===== Main content area ===== */
|
|
814
934
|
#content {
|
|
815
935
|
margin-left: var(--sidebar-w);
|
|
816
|
-
padding: calc(var(--
|
|
817
|
-
min-height: calc(100vh - var(--
|
|
936
|
+
padding: calc(var(--chrome-h) + 18px) 24px 80px;
|
|
937
|
+
min-height: calc(100vh - var(--chrome-h));
|
|
818
938
|
}
|
|
819
939
|
|
|
820
940
|
#diff > *:first-child { margin-top: 0; }
|
|
@@ -840,7 +960,45 @@ body.gdp-resizing * { user-select: none !important; }
|
|
|
840
960
|
transform: none !important;
|
|
841
961
|
will-change: auto !important;
|
|
842
962
|
}
|
|
843
|
-
.d2h-code-wrapper
|
|
963
|
+
.d2h-code-wrapper,
|
|
964
|
+
.d2h-file-side-diff {
|
|
965
|
+
overflow-x: auto !important;
|
|
966
|
+
overflow-y: hidden !important;
|
|
967
|
+
}
|
|
968
|
+
.d2h-code-wrapper::-webkit-scrollbar {
|
|
969
|
+
height: 8px;
|
|
970
|
+
}
|
|
971
|
+
.d2h-file-side-diff::-webkit-scrollbar {
|
|
972
|
+
height: 8px;
|
|
973
|
+
}
|
|
974
|
+
.d2h-code-wrapper::-webkit-scrollbar-thumb {
|
|
975
|
+
background: #d0d7de;
|
|
976
|
+
border: 0;
|
|
977
|
+
border-radius: 4px;
|
|
978
|
+
}
|
|
979
|
+
.d2h-file-side-diff::-webkit-scrollbar-thumb {
|
|
980
|
+
background: #d0d7de;
|
|
981
|
+
border: 0;
|
|
982
|
+
border-radius: 4px;
|
|
983
|
+
}
|
|
984
|
+
.d2h-code-wrapper::-webkit-scrollbar-track {
|
|
985
|
+
background: var(--bg-soft);
|
|
986
|
+
}
|
|
987
|
+
.d2h-file-side-diff::-webkit-scrollbar-track {
|
|
988
|
+
background: var(--bg-soft);
|
|
989
|
+
}
|
|
990
|
+
[data-theme="dark"] .d2h-code-wrapper::-webkit-scrollbar-thumb {
|
|
991
|
+
background: #6e7681;
|
|
992
|
+
}
|
|
993
|
+
[data-theme="dark"] .d2h-file-side-diff::-webkit-scrollbar-thumb {
|
|
994
|
+
background: #6e7681;
|
|
995
|
+
}
|
|
996
|
+
[data-theme="dark"] .d2h-code-wrapper::-webkit-scrollbar-track {
|
|
997
|
+
background: var(--bg-soft);
|
|
998
|
+
}
|
|
999
|
+
[data-theme="dark"] .d2h-file-side-diff::-webkit-scrollbar-track {
|
|
1000
|
+
background: var(--bg-soft);
|
|
1001
|
+
}
|
|
844
1002
|
|
|
845
1003
|
.d2h-wrapper {
|
|
846
1004
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
@@ -856,35 +1014,39 @@ body.gdp-resizing * { user-select: none !important; }
|
|
|
856
1014
|
isolation: isolate;
|
|
857
1015
|
box-shadow: var(--shadow-sm);
|
|
858
1016
|
/* When scrolled to (e.g. from sidebar click), leave room for the fixed
|
|
859
|
-
|
|
860
|
-
scroll-margin-top: calc(var(--
|
|
1017
|
+
fixed headers so the file header doesn't get hidden behind them. */
|
|
1018
|
+
scroll-margin-top: calc(var(--chrome-h) + 8px);
|
|
861
1019
|
}
|
|
862
1020
|
|
|
863
|
-
.d2h-file-header
|
|
1021
|
+
.d2h-file-header,
|
|
1022
|
+
.d2h-file-header.d2h-sticky-header {
|
|
864
1023
|
background: var(--bg-soft);
|
|
865
|
-
border
|
|
1024
|
+
border: 1px solid var(--border);
|
|
866
1025
|
border-radius: 6px 6px 0 0;
|
|
867
|
-
|
|
1026
|
+
margin: 0 0 -1px;
|
|
1027
|
+
padding: 6px 8px;
|
|
1028
|
+
min-height: 46px;
|
|
868
1029
|
display: flex;
|
|
869
1030
|
align-items: center;
|
|
870
1031
|
gap: 8px;
|
|
871
|
-
/*
|
|
872
|
-
|
|
1032
|
+
/* Keep this in sync with --chrome-h. This selector must also cover
|
|
1033
|
+
* .d2h-sticky-header because Diff2Html's vendor CSS sets top: 0 there. */
|
|
873
1034
|
position: sticky;
|
|
874
|
-
top:
|
|
875
|
-
z-index:
|
|
876
|
-
font-size:
|
|
1035
|
+
top: var(--chrome-h);
|
|
1036
|
+
z-index: 20;
|
|
1037
|
+
font-size: 14px;
|
|
1038
|
+
line-height: 21px;
|
|
877
1039
|
}
|
|
878
1040
|
.d2h-file-name-wrapper {
|
|
879
1041
|
display: flex; align-items: center; gap: 8px;
|
|
880
1042
|
flex: 1; min-width: 0;
|
|
881
|
-
font-size:
|
|
1043
|
+
font-size: 14px;
|
|
882
1044
|
}
|
|
883
1045
|
.d2h-file-name {
|
|
884
1046
|
color: var(--fg) !important;
|
|
885
|
-
font-weight:
|
|
1047
|
+
font-weight: 400;
|
|
886
1048
|
font-family: "Monaspace Neon", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
887
|
-
font-size:
|
|
1049
|
+
font-size: 13px;
|
|
888
1050
|
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
889
1051
|
}
|
|
890
1052
|
.d2h-icon-wrapper { display: inline-flex; color: var(--fg-muted); }
|
|
@@ -942,6 +1104,20 @@ tr.gdp-hunk-row .d2h-code-line-ctn {
|
|
|
942
1104
|
padding-bottom: 0 !important;
|
|
943
1105
|
overflow: hidden;
|
|
944
1106
|
}
|
|
1107
|
+
tr.gdp-trailing-expand-row,
|
|
1108
|
+
tr.gdp-trailing-expand-row > td,
|
|
1109
|
+
tr.gdp-trailing-expand-row .d2h-code-line,
|
|
1110
|
+
tr.gdp-trailing-expand-row .d2h-code-side-line {
|
|
1111
|
+
height: 18px !important;
|
|
1112
|
+
line-height: 18px !important;
|
|
1113
|
+
}
|
|
1114
|
+
tr.gdp-trailing-expand-row > td.d2h-info {
|
|
1115
|
+
background: var(--bg-soft) !important;
|
|
1116
|
+
}
|
|
1117
|
+
tr.gdp-trailing-expand-row .gdp-expand-btn {
|
|
1118
|
+
height: 18px;
|
|
1119
|
+
flex-basis: 18px;
|
|
1120
|
+
}
|
|
945
1121
|
/* Hide any d2h placeholder children inside the hunk-row line-number cell
|
|
946
1122
|
* (e.g. the empty old/new line-num divs) so only the expand stack shows
|
|
947
1123
|
* and the cell collapses to 20px. */
|
|
@@ -960,7 +1136,9 @@ tr.gdp-hunk-row td.d2h-code-side-linenumber > :not(.gdp-expand-stack) {
|
|
|
960
1136
|
* more space, matching github.com which never clips line numbers. */
|
|
961
1137
|
table.d2h-diff-table td.d2h-code-linenumber,
|
|
962
1138
|
table.d2h-diff-table td.d2h-code-side-linenumber {
|
|
963
|
-
position:
|
|
1139
|
+
position: sticky !important;
|
|
1140
|
+
left: 0;
|
|
1141
|
+
z-index: 2;
|
|
964
1142
|
display: table-cell !important;
|
|
965
1143
|
width: 1%; /* shrink-to-fit while still respecting min-width */
|
|
966
1144
|
min-width: 50px;
|
|
@@ -1064,6 +1242,77 @@ table.d2h-diff-table .d2h-code-line-prefix {
|
|
|
1064
1242
|
[data-theme="dark"] .gdp-stat-text .a { color: #3fb950; }
|
|
1065
1243
|
[data-theme="dark"] .gdp-stat-text .d { color: #f85149; }
|
|
1066
1244
|
|
|
1245
|
+
.gdp-file-header-icon {
|
|
1246
|
+
appearance: none;
|
|
1247
|
+
display: grid;
|
|
1248
|
+
place-items: center;
|
|
1249
|
+
width: 28px;
|
|
1250
|
+
height: 28px;
|
|
1251
|
+
border: 1px solid transparent;
|
|
1252
|
+
background: transparent;
|
|
1253
|
+
color: var(--fg-muted);
|
|
1254
|
+
border-radius: 6px;
|
|
1255
|
+
padding: 0 8px;
|
|
1256
|
+
cursor: pointer;
|
|
1257
|
+
flex: 0 0 28px;
|
|
1258
|
+
}
|
|
1259
|
+
.gdp-file-header-icon:hover {
|
|
1260
|
+
color: var(--fg);
|
|
1261
|
+
background: var(--bg-mute);
|
|
1262
|
+
}
|
|
1263
|
+
.gdp-file-header-icon svg {
|
|
1264
|
+
display: block;
|
|
1265
|
+
}
|
|
1266
|
+
.gdp-file-collapsed .gdp-file-toggle svg {
|
|
1267
|
+
transform: rotate(-90deg);
|
|
1268
|
+
}
|
|
1269
|
+
.gdp-copy-path.copied { color: var(--success); }
|
|
1270
|
+
.gdp-copy-path.failed { color: var(--danger); }
|
|
1271
|
+
.gdp-file-unfold[aria-pressed="true"] {
|
|
1272
|
+
color: var(--accent);
|
|
1273
|
+
background: var(--accent-subtle);
|
|
1274
|
+
}
|
|
1275
|
+
.gdp-btn {
|
|
1276
|
+
appearance: none;
|
|
1277
|
+
display: inline-flex;
|
|
1278
|
+
align-items: center;
|
|
1279
|
+
justify-content: center;
|
|
1280
|
+
border: 1px solid var(--border);
|
|
1281
|
+
border-radius: 6px;
|
|
1282
|
+
background: var(--bg);
|
|
1283
|
+
color: var(--fg);
|
|
1284
|
+
font-weight: 500;
|
|
1285
|
+
cursor: pointer;
|
|
1286
|
+
white-space: nowrap;
|
|
1287
|
+
text-decoration: none;
|
|
1288
|
+
}
|
|
1289
|
+
.gdp-btn-sm {
|
|
1290
|
+
height: 28px;
|
|
1291
|
+
padding: 0 10px;
|
|
1292
|
+
font-size: 12px;
|
|
1293
|
+
line-height: 26px;
|
|
1294
|
+
}
|
|
1295
|
+
.gdp-btn:hover {
|
|
1296
|
+
background: var(--bg-mute);
|
|
1297
|
+
text-decoration: none;
|
|
1298
|
+
}
|
|
1299
|
+
.gdp-btn[aria-pressed="true"] {
|
|
1300
|
+
background: var(--bg-mute);
|
|
1301
|
+
color: var(--fg);
|
|
1302
|
+
border-color: var(--border-strong);
|
|
1303
|
+
}
|
|
1304
|
+
.gdp-btn:disabled {
|
|
1305
|
+
color: var(--fg-subtle);
|
|
1306
|
+
cursor: not-allowed;
|
|
1307
|
+
opacity: 0.65;
|
|
1308
|
+
}
|
|
1309
|
+
.d2h-file-collapse-input {
|
|
1310
|
+
width: 13px;
|
|
1311
|
+
height: 13px;
|
|
1312
|
+
margin: 0;
|
|
1313
|
+
accent-color: var(--accent);
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1067
1316
|
/* GitHub-style diff squares appended to the file header. */
|
|
1068
1317
|
.gdp-stat-squares {
|
|
1069
1318
|
display: inline-flex;
|
|
@@ -1085,6 +1334,421 @@ table.d2h-diff-table .d2h-code-line-prefix {
|
|
|
1085
1334
|
[data-theme="dark"] .gdp-stat-squares .sq.del { background: #da3633; }
|
|
1086
1335
|
[data-theme="dark"] .gdp-stat-squares .sq.nu { background: var(--border-strong); }
|
|
1087
1336
|
|
|
1337
|
+
.gdp-source-viewer {
|
|
1338
|
+
border: 1px solid var(--border);
|
|
1339
|
+
border-radius: 6px;
|
|
1340
|
+
background: var(--bg);
|
|
1341
|
+
overflow: auto;
|
|
1342
|
+
box-shadow: var(--shadow-sm);
|
|
1343
|
+
}
|
|
1344
|
+
.gdp-standalone-source .gdp-source-viewer {
|
|
1345
|
+
margin-top: 0;
|
|
1346
|
+
border-top: 0;
|
|
1347
|
+
border-radius: 0 0 6px 6px;
|
|
1348
|
+
overflow: visible;
|
|
1349
|
+
}
|
|
1350
|
+
.gdp-source-viewer.loading,
|
|
1351
|
+
.gdp-source-viewer.error,
|
|
1352
|
+
.gdp-source-viewer.binary {
|
|
1353
|
+
padding: 16px;
|
|
1354
|
+
color: var(--fg-muted);
|
|
1355
|
+
font-size: 13px;
|
|
1356
|
+
}
|
|
1357
|
+
.gdp-source-viewer.error {
|
|
1358
|
+
background: var(--diff-del-bg);
|
|
1359
|
+
color: var(--danger);
|
|
1360
|
+
}
|
|
1361
|
+
.gdp-source-viewer.media {
|
|
1362
|
+
padding: 16px;
|
|
1363
|
+
}
|
|
1364
|
+
.gdp-source-viewer.media img,
|
|
1365
|
+
.gdp-source-viewer.media video {
|
|
1366
|
+
display: block;
|
|
1367
|
+
max-width: 100%;
|
|
1368
|
+
max-height: 70vh;
|
|
1369
|
+
background: var(--bg);
|
|
1370
|
+
}
|
|
1371
|
+
.gdp-source-meta {
|
|
1372
|
+
padding: 8px 12px;
|
|
1373
|
+
border-bottom: 1px solid var(--border-muted);
|
|
1374
|
+
background: var(--bg-soft);
|
|
1375
|
+
color: var(--fg-muted);
|
|
1376
|
+
font-size: 12px;
|
|
1377
|
+
font-family: "Monaspace Neon", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
1378
|
+
white-space: nowrap;
|
|
1379
|
+
overflow: hidden;
|
|
1380
|
+
text-overflow: ellipsis;
|
|
1381
|
+
}
|
|
1382
|
+
.gdp-source-tabs {
|
|
1383
|
+
display: flex;
|
|
1384
|
+
align-items: center;
|
|
1385
|
+
gap: 4px;
|
|
1386
|
+
padding: 8px 12px 0;
|
|
1387
|
+
background: var(--bg);
|
|
1388
|
+
border-bottom: 1px solid var(--border-muted);
|
|
1389
|
+
}
|
|
1390
|
+
.gdp-source-tabs button {
|
|
1391
|
+
appearance: none;
|
|
1392
|
+
border: 0;
|
|
1393
|
+
border-bottom: 2px solid transparent;
|
|
1394
|
+
background: transparent;
|
|
1395
|
+
color: var(--fg-muted);
|
|
1396
|
+
padding: 8px 10px;
|
|
1397
|
+
font: inherit;
|
|
1398
|
+
font-size: 13px;
|
|
1399
|
+
font-weight: 600;
|
|
1400
|
+
cursor: pointer;
|
|
1401
|
+
}
|
|
1402
|
+
.gdp-source-tabs button:hover {
|
|
1403
|
+
color: var(--fg);
|
|
1404
|
+
}
|
|
1405
|
+
.gdp-source-tabs button.active {
|
|
1406
|
+
color: var(--fg);
|
|
1407
|
+
border-bottom-color: var(--blob-tab-active);
|
|
1408
|
+
}
|
|
1409
|
+
.gdp-source-table {
|
|
1410
|
+
width: 100%;
|
|
1411
|
+
border-collapse: collapse;
|
|
1412
|
+
table-layout: auto;
|
|
1413
|
+
font-family: "Monaspace Neon", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
1414
|
+
font-size: 12px;
|
|
1415
|
+
line-height: 20px;
|
|
1416
|
+
}
|
|
1417
|
+
.gdp-standalone-source .gdp-source-table {
|
|
1418
|
+
display: block;
|
|
1419
|
+
overflow: auto;
|
|
1420
|
+
}
|
|
1421
|
+
.gdp-source-tabs + .gdp-source-table,
|
|
1422
|
+
.gdp-source-viewer > .gdp-source-table:first-child {
|
|
1423
|
+
border-radius: 6px;
|
|
1424
|
+
}
|
|
1425
|
+
.gdp-source-line-number {
|
|
1426
|
+
position: sticky;
|
|
1427
|
+
left: 0;
|
|
1428
|
+
z-index: 1;
|
|
1429
|
+
width: 1%;
|
|
1430
|
+
min-width: 50px;
|
|
1431
|
+
padding: 0 8px;
|
|
1432
|
+
text-align: right;
|
|
1433
|
+
color: var(--fg-muted);
|
|
1434
|
+
background: var(--bg);
|
|
1435
|
+
box-shadow: inset -1px 0 0 var(--border-muted);
|
|
1436
|
+
font-variant-numeric: tabular-nums;
|
|
1437
|
+
user-select: none;
|
|
1438
|
+
white-space: nowrap;
|
|
1439
|
+
}
|
|
1440
|
+
.gdp-source-line-code {
|
|
1441
|
+
padding: 0 12px;
|
|
1442
|
+
color: var(--fg);
|
|
1443
|
+
white-space: pre;
|
|
1444
|
+
}
|
|
1445
|
+
.gdp-source-line-code.hljs {
|
|
1446
|
+
background: var(--bg);
|
|
1447
|
+
}
|
|
1448
|
+
.gdp-standalone-source.gdp-file-shell {
|
|
1449
|
+
border: 0;
|
|
1450
|
+
border-radius: 0;
|
|
1451
|
+
box-shadow: none;
|
|
1452
|
+
background: transparent;
|
|
1453
|
+
content-visibility: visible;
|
|
1454
|
+
}
|
|
1455
|
+
.gdp-file-shell.gdp-source-mode {
|
|
1456
|
+
content-visibility: visible;
|
|
1457
|
+
contain-intrinsic-size: auto;
|
|
1458
|
+
}
|
|
1459
|
+
.gdp-file-detail-wrapper {
|
|
1460
|
+
display: block;
|
|
1461
|
+
margin: 0;
|
|
1462
|
+
}
|
|
1463
|
+
.gdp-file-detail-sticky {
|
|
1464
|
+
position: sticky;
|
|
1465
|
+
top: var(--global-header-h);
|
|
1466
|
+
z-index: 35;
|
|
1467
|
+
background: var(--bg);
|
|
1468
|
+
border-bottom: 1px solid var(--border-muted);
|
|
1469
|
+
}
|
|
1470
|
+
.gdp-file-detail-header {
|
|
1471
|
+
display: flex;
|
|
1472
|
+
align-items: center;
|
|
1473
|
+
gap: 12px;
|
|
1474
|
+
min-height: 34px;
|
|
1475
|
+
margin-bottom: 0;
|
|
1476
|
+
padding: 8px 0 10px;
|
|
1477
|
+
border: 0;
|
|
1478
|
+
}
|
|
1479
|
+
.gdp-file-detail-tabs[hidden] {
|
|
1480
|
+
display: none !important;
|
|
1481
|
+
}
|
|
1482
|
+
.gdp-file-detail-tabs .gdp-source-tabs {
|
|
1483
|
+
border-bottom: 0;
|
|
1484
|
+
padding-left: 0;
|
|
1485
|
+
padding-right: 0;
|
|
1486
|
+
}
|
|
1487
|
+
.gdp-file-detail-path {
|
|
1488
|
+
display: flex;
|
|
1489
|
+
align-items: center;
|
|
1490
|
+
min-width: 0;
|
|
1491
|
+
flex: 1;
|
|
1492
|
+
gap: 6px;
|
|
1493
|
+
}
|
|
1494
|
+
.gdp-file-breadcrumb {
|
|
1495
|
+
display: flex;
|
|
1496
|
+
align-items: center;
|
|
1497
|
+
min-width: 0;
|
|
1498
|
+
gap: 4px;
|
|
1499
|
+
padding-top: 2px;
|
|
1500
|
+
overflow: hidden;
|
|
1501
|
+
color: var(--fg);
|
|
1502
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
|
|
1503
|
+
font-size: 16px;
|
|
1504
|
+
font-weight: 400;
|
|
1505
|
+
}
|
|
1506
|
+
.gdp-file-breadcrumb-part,
|
|
1507
|
+
.gdp-file-breadcrumb-current {
|
|
1508
|
+
overflow: hidden;
|
|
1509
|
+
text-overflow: ellipsis;
|
|
1510
|
+
white-space: nowrap;
|
|
1511
|
+
}
|
|
1512
|
+
.gdp-file-breadcrumb-current {
|
|
1513
|
+
color: var(--fg);
|
|
1514
|
+
font-weight: 600;
|
|
1515
|
+
}
|
|
1516
|
+
.gdp-file-breadcrumb-sep {
|
|
1517
|
+
color: var(--fg-muted);
|
|
1518
|
+
font-weight: 400;
|
|
1519
|
+
flex-shrink: 0;
|
|
1520
|
+
margin: 0 2px;
|
|
1521
|
+
}
|
|
1522
|
+
.gdp-file-detail-header .gdp-view-file {
|
|
1523
|
+
flex-shrink: 0;
|
|
1524
|
+
}
|
|
1525
|
+
.gdp-file-detail-header .gdp-copy-path {
|
|
1526
|
+
flex-shrink: 0;
|
|
1527
|
+
color: var(--fg-muted);
|
|
1528
|
+
}
|
|
1529
|
+
.gdp-markdown-preview {
|
|
1530
|
+
width: 100%;
|
|
1531
|
+
max-width: none;
|
|
1532
|
+
padding: 24px 32px 40px;
|
|
1533
|
+
color: var(--fg);
|
|
1534
|
+
overflow-wrap: break-word;
|
|
1535
|
+
}
|
|
1536
|
+
.gdp-markdown-preview h1,
|
|
1537
|
+
.gdp-markdown-preview h2 {
|
|
1538
|
+
padding-bottom: 0.3em;
|
|
1539
|
+
border-bottom: 1px solid var(--border-muted);
|
|
1540
|
+
}
|
|
1541
|
+
.gdp-markdown-preview h1 {
|
|
1542
|
+
margin: 0 0 16px;
|
|
1543
|
+
font-size: 2em;
|
|
1544
|
+
line-height: 1.25;
|
|
1545
|
+
}
|
|
1546
|
+
.gdp-markdown-preview h2 {
|
|
1547
|
+
margin: 24px 0 16px;
|
|
1548
|
+
font-size: 1.5em;
|
|
1549
|
+
line-height: 1.25;
|
|
1550
|
+
}
|
|
1551
|
+
.gdp-markdown-preview h3 {
|
|
1552
|
+
margin: 24px 0 16px;
|
|
1553
|
+
font-size: 1.25em;
|
|
1554
|
+
}
|
|
1555
|
+
.gdp-markdown-preview p,
|
|
1556
|
+
.gdp-markdown-preview ul,
|
|
1557
|
+
.gdp-markdown-preview ol,
|
|
1558
|
+
.gdp-markdown-preview blockquote,
|
|
1559
|
+
.gdp-markdown-preview pre {
|
|
1560
|
+
margin: 0 0 16px;
|
|
1561
|
+
}
|
|
1562
|
+
.gdp-markdown-preview ul,
|
|
1563
|
+
.gdp-markdown-preview ol {
|
|
1564
|
+
padding-left: 2em;
|
|
1565
|
+
}
|
|
1566
|
+
.gdp-markdown-preview blockquote {
|
|
1567
|
+
padding: 0 1em;
|
|
1568
|
+
color: var(--fg-muted);
|
|
1569
|
+
border-left: 0.25em solid var(--border);
|
|
1570
|
+
}
|
|
1571
|
+
.gdp-markdown-preview code {
|
|
1572
|
+
padding: 0.2em 0.4em;
|
|
1573
|
+
border-radius: 6px;
|
|
1574
|
+
background: var(--bg-mute);
|
|
1575
|
+
font-family: "Monaspace Neon", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
1576
|
+
font-size: 85%;
|
|
1577
|
+
}
|
|
1578
|
+
.gdp-markdown-preview pre {
|
|
1579
|
+
padding: 16px;
|
|
1580
|
+
overflow: auto;
|
|
1581
|
+
border-radius: 6px;
|
|
1582
|
+
background: var(--bg-soft);
|
|
1583
|
+
}
|
|
1584
|
+
.gdp-markdown-preview pre code {
|
|
1585
|
+
padding: 0;
|
|
1586
|
+
background: transparent;
|
|
1587
|
+
font-size: 100%;
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
body.gdp-file-detail-page #sidebar,
|
|
1591
|
+
body.gdp-repo-page #sidebar,
|
|
1592
|
+
body.gdp-file-detail-page #sidebar-resizer {
|
|
1593
|
+
display: none;
|
|
1594
|
+
}
|
|
1595
|
+
body.gdp-file-detail-page.gdp-repo-blob-page #sidebar {
|
|
1596
|
+
display: block;
|
|
1597
|
+
}
|
|
1598
|
+
body.gdp-file-detail-page.gdp-repo-blob-page #sidebar-resizer {
|
|
1599
|
+
display: block;
|
|
1600
|
+
}
|
|
1601
|
+
#repo-target-wrap {
|
|
1602
|
+
display: none;
|
|
1603
|
+
}
|
|
1604
|
+
body.gdp-file-detail-page.gdp-repo-blob-page #repo-target-wrap {
|
|
1605
|
+
display: flex;
|
|
1606
|
+
}
|
|
1607
|
+
#repo-target-wrap.sb-repo-target {
|
|
1608
|
+
padding: 12px 12px 8px;
|
|
1609
|
+
border-bottom: 1px solid var(--border);
|
|
1610
|
+
}
|
|
1611
|
+
#repo-target {
|
|
1612
|
+
width: 100%;
|
|
1613
|
+
}
|
|
1614
|
+
body.gdp-repo-page #sidebar-resizer {
|
|
1615
|
+
display: none;
|
|
1616
|
+
}
|
|
1617
|
+
body.gdp-file-detail-page {
|
|
1618
|
+
--chrome-h: var(--global-header-h);
|
|
1619
|
+
}
|
|
1620
|
+
body.gdp-repo-page {
|
|
1621
|
+
--chrome-h: var(--global-header-h);
|
|
1622
|
+
}
|
|
1623
|
+
body.gdp-file-detail-page #topbar {
|
|
1624
|
+
display: none;
|
|
1625
|
+
}
|
|
1626
|
+
body.gdp-repo-page #topbar {
|
|
1627
|
+
display: none;
|
|
1628
|
+
}
|
|
1629
|
+
body.gdp-file-detail-page #load-bar {
|
|
1630
|
+
top: var(--global-header-h);
|
|
1631
|
+
}
|
|
1632
|
+
body.gdp-repo-page #load-bar {
|
|
1633
|
+
top: var(--global-header-h);
|
|
1634
|
+
}
|
|
1635
|
+
body.gdp-file-detail-page #content {
|
|
1636
|
+
margin-left: 0;
|
|
1637
|
+
padding-top: calc(var(--global-header-h) + 18px);
|
|
1638
|
+
min-height: calc(100vh - var(--global-header-h));
|
|
1639
|
+
}
|
|
1640
|
+
body.gdp-file-detail-page.gdp-repo-blob-page #content {
|
|
1641
|
+
margin-left: var(--sidebar-w);
|
|
1642
|
+
}
|
|
1643
|
+
body.gdp-repo-page #content {
|
|
1644
|
+
margin-left: 0;
|
|
1645
|
+
padding: calc(var(--global-header-h) + 24px) 32px 48px;
|
|
1646
|
+
min-height: calc(100vh - var(--global-header-h));
|
|
1647
|
+
}
|
|
1648
|
+
body.gdp-file-detail-page #diff > .gdp-file-shell:not(.gdp-standalone-source),
|
|
1649
|
+
body.gdp-file-detail-page #diff > .gdp-repo-shell,
|
|
1650
|
+
body.gdp-file-detail-page #empty {
|
|
1651
|
+
display: none !important;
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
.gdp-repo-blob-layout .gdp-standalone-source {
|
|
1655
|
+
min-width: 0;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
.gdp-repo-shell {
|
|
1659
|
+
width: min(1120px, calc(100vw - 64px));
|
|
1660
|
+
margin: 0;
|
|
1661
|
+
}
|
|
1662
|
+
.gdp-repo-header,
|
|
1663
|
+
.gdp-repo-toolbar {
|
|
1664
|
+
padding-left: 0;
|
|
1665
|
+
padding-right: 0;
|
|
1666
|
+
}
|
|
1667
|
+
.gdp-repo-target {
|
|
1668
|
+
max-width: 320px;
|
|
1669
|
+
width: 240px;
|
|
1670
|
+
flex-shrink: 0;
|
|
1671
|
+
}
|
|
1672
|
+
.gdp-repo-breadcrumb {
|
|
1673
|
+
flex: 1;
|
|
1674
|
+
}
|
|
1675
|
+
.gdp-repo-breadcrumb button {
|
|
1676
|
+
max-width: 260px;
|
|
1677
|
+
border: 0;
|
|
1678
|
+
background: transparent;
|
|
1679
|
+
color: var(--accent);
|
|
1680
|
+
padding: 0;
|
|
1681
|
+
font: inherit;
|
|
1682
|
+
cursor: pointer;
|
|
1683
|
+
}
|
|
1684
|
+
.gdp-repo-breadcrumb button:disabled {
|
|
1685
|
+
color: var(--fg);
|
|
1686
|
+
cursor: default;
|
|
1687
|
+
}
|
|
1688
|
+
.gdp-repo-file-list {
|
|
1689
|
+
border-top: 0;
|
|
1690
|
+
border-radius: 0 0 6px 6px;
|
|
1691
|
+
padding: 0;
|
|
1692
|
+
overflow: hidden;
|
|
1693
|
+
}
|
|
1694
|
+
.gdp-repo-row {
|
|
1695
|
+
display: grid;
|
|
1696
|
+
grid-template-columns: 28px minmax(0, 1fr) 120px;
|
|
1697
|
+
align-items: center;
|
|
1698
|
+
width: 100%;
|
|
1699
|
+
min-height: 42px;
|
|
1700
|
+
border: 0;
|
|
1701
|
+
border-bottom: 1px solid var(--border-muted);
|
|
1702
|
+
background: var(--bg);
|
|
1703
|
+
color: var(--fg);
|
|
1704
|
+
padding: 0 14px;
|
|
1705
|
+
font: inherit;
|
|
1706
|
+
text-align: left;
|
|
1707
|
+
cursor: pointer;
|
|
1708
|
+
}
|
|
1709
|
+
.gdp-repo-row:last-child {
|
|
1710
|
+
border-bottom: 0;
|
|
1711
|
+
}
|
|
1712
|
+
.gdp-repo-row:hover {
|
|
1713
|
+
background: var(--bg-soft);
|
|
1714
|
+
}
|
|
1715
|
+
.gdp-repo-row .d2h-icon-wrapper {
|
|
1716
|
+
color: var(--fg-muted);
|
|
1717
|
+
}
|
|
1718
|
+
.gdp-repo-row .dir-icon,
|
|
1719
|
+
.gdp-repo-list-shell .d2h-file-name-wrapper .dir-icon {
|
|
1720
|
+
color: #54aeff;
|
|
1721
|
+
flex-shrink: 0;
|
|
1722
|
+
width: 16px;
|
|
1723
|
+
height: 16px;
|
|
1724
|
+
display: grid;
|
|
1725
|
+
align-items: center;
|
|
1726
|
+
justify-content: center;
|
|
1727
|
+
}
|
|
1728
|
+
.gdp-repo-row .dir-icon .octicon,
|
|
1729
|
+
.gdp-repo-list-shell .d2h-file-name-wrapper .dir-icon .octicon {
|
|
1730
|
+
display: block;
|
|
1731
|
+
}
|
|
1732
|
+
.gdp-repo-row .name {
|
|
1733
|
+
overflow: hidden;
|
|
1734
|
+
text-overflow: ellipsis;
|
|
1735
|
+
white-space: nowrap;
|
|
1736
|
+
font-weight: 500;
|
|
1737
|
+
}
|
|
1738
|
+
.gdp-repo-row .kind {
|
|
1739
|
+
justify-self: end;
|
|
1740
|
+
color: var(--fg-muted);
|
|
1741
|
+
font-size: 12px;
|
|
1742
|
+
}
|
|
1743
|
+
.gdp-repo-empty {
|
|
1744
|
+
padding: 32px;
|
|
1745
|
+
color: var(--fg-muted);
|
|
1746
|
+
text-align: center;
|
|
1747
|
+
}
|
|
1748
|
+
.gdp-repo-readme {
|
|
1749
|
+
margin-top: 16px;
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1088
1752
|
.d2h-tag {
|
|
1089
1753
|
font-size: 10px;
|
|
1090
1754
|
font-weight: 600;
|
|
@@ -1109,6 +1773,8 @@ table.d2h-diff-table .d2h-code-line-prefix {
|
|
|
1109
1773
|
.d2h-file-wrapper .d2h-file-diff,
|
|
1110
1774
|
.d2h-file-wrapper .d2h-files-diff {
|
|
1111
1775
|
border-radius: 0 0 6px 6px;
|
|
1776
|
+
border: 0;
|
|
1777
|
+
overflow: hidden !important;
|
|
1112
1778
|
}
|
|
1113
1779
|
.d2h-diff-table {
|
|
1114
1780
|
border: 0 !important;
|
|
@@ -1206,16 +1872,18 @@ table.d2h-diff-table .d2h-code-line-prefix {
|
|
|
1206
1872
|
/* Line number column */
|
|
1207
1873
|
.d2h-code-linenumber {
|
|
1208
1874
|
background: var(--bg) !important;
|
|
1209
|
-
color: var(--fg-
|
|
1210
|
-
border-right:
|
|
1875
|
+
color: var(--fg-muted) !important;
|
|
1876
|
+
border-right: 0 !important;
|
|
1877
|
+
box-shadow: inset -1px 0 0 var(--border-muted);
|
|
1211
1878
|
font-size: 12px !important;
|
|
1212
1879
|
font-variant-numeric: tabular-nums;
|
|
1213
1880
|
user-select: none;
|
|
1214
1881
|
}
|
|
1215
1882
|
.d2h-code-side-linenumber {
|
|
1216
1883
|
background: var(--bg) !important;
|
|
1217
|
-
color: var(--fg-
|
|
1218
|
-
border-right:
|
|
1884
|
+
color: var(--fg-muted) !important;
|
|
1885
|
+
border-right: 0 !important;
|
|
1886
|
+
box-shadow: inset -1px 0 0 var(--border-muted);
|
|
1219
1887
|
font-size: 12px !important;
|
|
1220
1888
|
font-variant-numeric: tabular-nums;
|
|
1221
1889
|
}
|
|
@@ -1223,16 +1891,21 @@ table.d2h-diff-table .d2h-code-line-prefix {
|
|
|
1223
1891
|
/* Hunk headers (@@) — GitHub style: blue tint */
|
|
1224
1892
|
.d2h-info {
|
|
1225
1893
|
background: var(--diff-hunk-bg) !important;
|
|
1226
|
-
color: var(--
|
|
1894
|
+
color: var(--fg-muted) !important;
|
|
1227
1895
|
border-color: var(--diff-hunk-bg) !important;
|
|
1228
1896
|
}
|
|
1229
1897
|
.d2h-info .d2h-code-line,
|
|
1230
1898
|
.d2h-info .d2h-code-side-line {
|
|
1231
|
-
color: var(--
|
|
1899
|
+
color: var(--fg-muted) !important;
|
|
1232
1900
|
}
|
|
1233
1901
|
|
|
1234
1902
|
/* Context (unchanged) lines */
|
|
1235
1903
|
.d2h-cntx { background: var(--bg) !important; color: var(--fg) !important; }
|
|
1904
|
+
.d2h-cntx.d2h-code-linenumber,
|
|
1905
|
+
.d2h-cntx.d2h-code-side-linenumber {
|
|
1906
|
+
background: var(--bg) !important;
|
|
1907
|
+
color: var(--fg-muted) !important;
|
|
1908
|
+
}
|
|
1236
1909
|
|
|
1237
1910
|
/* Addition rows */
|
|
1238
1911
|
.d2h-ins,
|
|
@@ -1244,10 +1917,11 @@ table.d2h-diff-table .d2h-code-line-prefix {
|
|
|
1244
1917
|
}
|
|
1245
1918
|
.d2h-ins .d2h-code-linenumber,
|
|
1246
1919
|
.d2h-ins.d2h-code-linenumber,
|
|
1247
|
-
.d2h-ins .d2h-code-side-linenumber
|
|
1248
|
-
|
|
1920
|
+
.d2h-ins .d2h-code-side-linenumber,
|
|
1921
|
+
.d2h-ins.d2h-code-side-linenumber {
|
|
1922
|
+
background: var(--diff-add-num-sticky-bg) !important;
|
|
1249
1923
|
color: var(--fg) !important;
|
|
1250
|
-
|
|
1924
|
+
box-shadow: inset -1px 0 0 rgba(46,160,67,0.30);
|
|
1251
1925
|
}
|
|
1252
1926
|
|
|
1253
1927
|
/* Deletion rows */
|
|
@@ -1260,10 +1934,11 @@ table.d2h-diff-table .d2h-code-line-prefix {
|
|
|
1260
1934
|
}
|
|
1261
1935
|
.d2h-del .d2h-code-linenumber,
|
|
1262
1936
|
.d2h-del.d2h-code-linenumber,
|
|
1263
|
-
.d2h-del .d2h-code-side-linenumber
|
|
1264
|
-
|
|
1937
|
+
.d2h-del .d2h-code-side-linenumber,
|
|
1938
|
+
.d2h-del.d2h-code-side-linenumber {
|
|
1939
|
+
background: var(--diff-del-num-sticky-bg) !important;
|
|
1265
1940
|
color: var(--fg) !important;
|
|
1266
|
-
|
|
1941
|
+
box-shadow: inset -1px 0 0 rgba(207,34,46,0.30);
|
|
1267
1942
|
}
|
|
1268
1943
|
|
|
1269
1944
|
/* Word-level highlights inside add/del lines */
|
|
@@ -1303,7 +1978,7 @@ table.d2h-diff-table .d2h-code-line-prefix {
|
|
|
1303
1978
|
|
|
1304
1979
|
/* ===== Viewed checkbox (top-right of file header) ===== */
|
|
1305
1980
|
.d2h-file-collapse {
|
|
1306
|
-
margin-left:
|
|
1981
|
+
margin-left: 8px;
|
|
1307
1982
|
display: inline-flex;
|
|
1308
1983
|
align-items: center;
|
|
1309
1984
|
gap: 6px;
|
|
@@ -1332,7 +2007,7 @@ table.d2h-diff-table .d2h-code-line-prefix {
|
|
|
1332
2007
|
border-right: 0;
|
|
1333
2008
|
border-bottom: 1px solid var(--border);
|
|
1334
2009
|
}
|
|
1335
|
-
#content { margin-left: 0; max-width: none; padding-top: calc(var(--
|
|
2010
|
+
#content { margin-left: 0; max-width: none; padding-top: calc(var(--chrome-h) + 240px); }
|
|
1336
2011
|
.controls input[type="search"] { width: 130px; }
|
|
1337
2012
|
}
|
|
1338
2013
|
|
|
@@ -1342,7 +2017,7 @@ table.d2h-diff-table .d2h-code-line-prefix {
|
|
|
1342
2017
|
border: 1px solid var(--border);
|
|
1343
2018
|
border-radius: 6px;
|
|
1344
2019
|
margin: 0 0 16px;
|
|
1345
|
-
scroll-margin-top: calc(var(--
|
|
2020
|
+
scroll-margin-top: calc(var(--chrome-h) + 8px);
|
|
1346
2021
|
isolation: isolate;
|
|
1347
2022
|
box-shadow: 0 1px 0 rgba(31,35,40,0.04);
|
|
1348
2023
|
content-visibility: auto;
|
|
@@ -1356,6 +2031,9 @@ table.d2h-diff-table .d2h-code-line-prefix {
|
|
|
1356
2031
|
background: var(--bg-soft);
|
|
1357
2032
|
border-bottom: 1px solid var(--border);
|
|
1358
2033
|
border-radius: 6px 6px 0 0;
|
|
2034
|
+
position: sticky;
|
|
2035
|
+
top: var(--chrome-h);
|
|
2036
|
+
z-index: 20;
|
|
1359
2037
|
font-size: 13px;
|
|
1360
2038
|
font-family: "Monaspace Neon", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
1361
2039
|
}
|