@youtyan/code-viewer 0.1.14 → 0.1.16

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/web/style.css CHANGED
@@ -50,6 +50,7 @@
50
50
  --topbar-h: 56px;
51
51
  --chrome-h: calc(var(--global-header-h) + var(--topbar-h));
52
52
  --sidebar-w: 308px;
53
+ --sidebar-restore-rail-w: 44px;
53
54
  /* shadows */
54
55
  --shadow-sm: 0 1px 0 rgba(31,35,40,0.04);
55
56
  --shadow-md: 0 3px 6px rgba(140,149,159,0.15);
@@ -99,6 +100,7 @@
99
100
  html, body {
100
101
  margin: 0; padding: 0;
101
102
  background: var(--bg); color: var(--fg);
103
+ --code-font-size: 12px;
102
104
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
103
105
  Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
104
106
  font-size: 14px;
@@ -109,6 +111,10 @@ html, body {
109
111
  -moz-osx-font-smoothing: auto;
110
112
  }
111
113
 
114
+ body[data-code-font-size="compact"] { --code-font-size: 11.5px; }
115
+ body[data-code-font-size="large"] { --code-font-size: 13.5px; }
116
+ body[data-code-font-size="xlarge"] { --code-font-size: 15px; }
117
+
112
118
  /* Window scrolls; global header + topbar + sidebar are fixed */
113
119
  #app { display: block; }
114
120
 
@@ -293,20 +299,18 @@ html, body {
293
299
  .app-menu {
294
300
  display: flex;
295
301
  align-items: center;
296
- gap: 18px;
302
+ gap: 8px;
297
303
  height: 100%;
298
304
  margin-left: 0;
299
305
  padding-left: 18px;
300
306
  border-left: 1px solid var(--border-muted);
301
307
  flex-shrink: 0;
302
308
  }
303
- .app-menu-item {
304
- position: relative;
309
+ .global-help-link {
305
310
  display: inline-flex;
306
311
  align-items: center;
307
- height: 100%;
312
+ height: 28px;
308
313
  padding: 0 2px;
309
- border-radius: 0;
310
314
  color: var(--fg-muted);
311
315
  font-size: 14px;
312
316
  font-weight: 600;
@@ -314,12 +318,34 @@ html, body {
314
318
  text-decoration: none;
315
319
  white-space: nowrap;
316
320
  }
321
+ .global-help-link:hover {
322
+ color: var(--accent);
323
+ text-decoration: none;
324
+ }
325
+ .global-help-link.active {
326
+ color: var(--fg);
327
+ }
328
+ .app-menu-item {
329
+ position: relative;
330
+ display: inline-flex;
331
+ align-items: center;
332
+ height: 32px;
333
+ padding: 0 10px;
334
+ border-radius: 6px;
335
+ color: var(--fg-muted);
336
+ font-size: 15px;
337
+ font-weight: 600;
338
+ line-height: 1;
339
+ text-decoration: none;
340
+ white-space: nowrap;
341
+ }
317
342
  .app-menu-item:hover {
318
343
  color: var(--accent);
344
+ background: var(--bg-mute);
319
345
  text-decoration: none;
320
346
  }
321
347
  .app-menu-item.active {
322
- background: transparent;
348
+ background: var(--bg);
323
349
  color: var(--fg);
324
350
  }
325
351
  .app-menu-item.active::after {
@@ -327,7 +353,7 @@ html, body {
327
353
  position: absolute;
328
354
  left: 0;
329
355
  right: 0;
330
- bottom: -1px;
356
+ bottom: -9px;
331
357
  height: 2px;
332
358
  border-radius: 2px 2px 0 0;
333
359
  background: var(--blob-tab-active);
@@ -337,9 +363,11 @@ html, body {
337
363
  margin-left: auto;
338
364
  display: inline-flex;
339
365
  align-items: center;
340
- gap: 12px;
366
+ gap: 8px;
367
+ flex: 0 0 auto;
341
368
  }
342
- .global-actions #theme {
369
+ .global-actions #theme,
370
+ .global-icon-action {
343
371
  display: inline-flex;
344
372
  align-items: center;
345
373
  justify-content: center;
@@ -353,10 +381,18 @@ html, body {
353
381
  font-size: 13px;
354
382
  transition: background 0.12s, border-color 0.12s;
355
383
  }
356
- .global-actions #theme:hover {
384
+ .global-icon-action svg {
385
+ display: block;
386
+ }
387
+ .global-actions #theme:hover,
388
+ .global-icon-action:hover {
357
389
  background: var(--bg-mute);
358
390
  border-color: var(--border-strong);
359
391
  }
392
+ .global-icon-action:focus-visible {
393
+ outline: 2px solid var(--accent);
394
+ outline-offset: 1px;
395
+ }
360
396
 
361
397
  #meta {
362
398
  display: flex; align-items: center; gap: 10px;
@@ -399,27 +435,70 @@ html, body {
399
435
  .ref-pickers {
400
436
  display: flex;
401
437
  align-items: center;
402
- gap: 4px;
438
+ gap: 8px;
403
439
  margin-left: 8px;
404
440
  }
405
- .ref-input {
406
- background: var(--bg-soft);
407
- border: 1px solid var(--border);
408
- color: var(--fg);
441
+ .ref-selector {
442
+ display: flex;
443
+ align-items: center;
444
+ justify-content: space-between;
445
+ flex: 0 0 auto;
446
+ gap: 8px;
447
+ width: 220px;
448
+ height: 32px;
449
+ padding: 0 12px;
450
+ border: 1px solid #d1d9e0;
409
451
  border-radius: 6px;
410
- font-family: "Monaspace Neon", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
411
- font-size: 12px;
412
- padding: 4px 8px;
413
- width: 130px;
414
- height: 26px;
415
- outline: none;
416
- transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
452
+ background: #f6f8fa;
453
+ color: var(--fg);
454
+ font: 500 14px/21px -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
455
+ cursor: pointer;
456
+ transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
417
457
  }
418
- .ref-input::placeholder { color: var(--fg-subtle); }
419
- .ref-input:focus {
420
- background: var(--bg);
458
+ [data-theme="dark"] .ref-selector {
459
+ border-color: var(--border);
460
+ background: var(--bg-soft);
461
+ }
462
+ .ref-selector:hover {
463
+ border-color: var(--border-strong);
464
+ background: var(--bg-soft);
465
+ }
466
+ .ref-selector:focus-within {
421
467
  border-color: var(--accent);
422
468
  box-shadow: 0 0 0 3px var(--accent-muted);
469
+ background: var(--bg);
470
+ }
471
+ .ref-selector-icon,
472
+ .ref-selector-caret {
473
+ display: grid;
474
+ place-items: center;
475
+ flex: 0 0 auto;
476
+ width: 16px;
477
+ height: 16px;
478
+ color: var(--fg-muted);
479
+ }
480
+ .ref-selector .ref-input {
481
+ flex: 1 1 auto;
482
+ min-width: 0;
483
+ width: auto;
484
+ height: 30px;
485
+ padding: 0;
486
+ background: transparent;
487
+ border: 0;
488
+ color: var(--fg);
489
+ border-radius: 0;
490
+ font-family: inherit;
491
+ font-size: 14px;
492
+ font-weight: 500;
493
+ outline: none;
494
+ cursor: pointer;
495
+ text-overflow: ellipsis;
496
+ }
497
+ .ref-selector .ref-input::placeholder { color: var(--fg-subtle); }
498
+ .ref-selector .ref-input:focus {
499
+ background: transparent;
500
+ border-color: transparent;
501
+ box-shadow: none;
423
502
  }
424
503
  .ref-dots {
425
504
  color: var(--fg-subtle);
@@ -805,6 +884,68 @@ html, body {
805
884
  overflow-y: auto;
806
885
  padding: 0 0 32px;
807
886
  z-index: 30;
887
+ --sidebar-dir-font: 14px;
888
+ --sidebar-file-font: 12.5px;
889
+ --sidebar-stat-font: 11px;
890
+ --sidebar-row-y: 4px;
891
+ --sidebar-head-h: 58px;
892
+ }
893
+ #sidebar-toggle {
894
+ position: static;
895
+ flex: 0 0 auto;
896
+ display: inline-grid;
897
+ grid-template-columns: 16px;
898
+ place-items: center;
899
+ width: 28px;
900
+ height: 28px;
901
+ padding: 0;
902
+ border: 1px solid transparent;
903
+ border-radius: 6px;
904
+ background: transparent;
905
+ color: var(--fg-muted);
906
+ box-shadow: none;
907
+ cursor: pointer;
908
+ }
909
+ #sidebar-toggle:hover {
910
+ color: var(--fg);
911
+ background: var(--bg-mute);
912
+ }
913
+ #sidebar-toggle svg {
914
+ display: block;
915
+ }
916
+ .sidebar-toggle-label {
917
+ display: none;
918
+ }
919
+ body.gdp-sidebar-hidden #sidebar-toggle {
920
+ color: var(--fg-muted);
921
+ background: transparent;
922
+ }
923
+ body.gdp-sidebar-hidden #sidebar-toggle .sidebar-toggle-label {
924
+ display: none;
925
+ }
926
+ body.gdp-file-detail-page #sidebar-toggle,
927
+ body.gdp-repo-page #sidebar-toggle,
928
+ body.gdp-file-detail-page.gdp-sidebar-hidden #sidebar-toggle,
929
+ body.gdp-repo-page.gdp-sidebar-hidden #sidebar-toggle {
930
+ display: inline-grid;
931
+ }
932
+ body[data-sidebar-font-size="compact"] #sidebar {
933
+ --sidebar-dir-font: 13px;
934
+ --sidebar-file-font: 12px;
935
+ --sidebar-stat-font: 10.5px;
936
+ --sidebar-row-y: 3px;
937
+ }
938
+ body[data-sidebar-font-size="large"] #sidebar {
939
+ --sidebar-dir-font: 15px;
940
+ --sidebar-file-font: 14px;
941
+ --sidebar-stat-font: 12px;
942
+ --sidebar-row-y: 5px;
943
+ }
944
+ body[data-sidebar-font-size="xlarge"] #sidebar {
945
+ --sidebar-dir-font: 16px;
946
+ --sidebar-file-font: 15px;
947
+ --sidebar-stat-font: 12.5px;
948
+ --sidebar-row-y: 6px;
808
949
  }
809
950
  body[data-focus-scope="sidebar"] #sidebar {
810
951
  background: var(--bg-soft);
@@ -817,42 +958,57 @@ body[data-focus-scope="main"] #content {
817
958
  box-shadow: none;
818
959
  }
819
960
  .sb-head {
820
- display: flex; justify-content: space-between; align-items: center;
821
- padding: 14px 16px 10px;
961
+ display: flex;
962
+ flex-wrap: wrap;
963
+ justify-content: space-between;
964
+ align-items: center;
965
+ gap: 8px;
966
+ padding: 13px 14px 10px;
967
+ min-height: var(--sidebar-head-h);
822
968
  color: var(--fg);
823
969
  font-size: 12px;
824
970
  font-weight: 600;
825
971
  position: sticky; top: 0;
826
972
  background: var(--bg-soft);
827
973
  border-bottom: 1px solid var(--border);
828
- z-index: 1;
974
+ z-index: 3;
829
975
  }
830
976
  .sb-title { letter-spacing: 0.01em; }
977
+ .sb-title,
978
+ .sb-actions,
979
+ .sb-view-seg {
980
+ flex: 0 0 auto;
981
+ }
831
982
  #totals {
832
983
  color: var(--fg-muted);
833
984
  font-weight: 400;
834
985
  font-variant-numeric: tabular-nums;
835
986
  margin-right: auto;
836
987
  margin-left: 6px;
988
+ min-width: 0;
989
+ overflow: hidden;
990
+ text-overflow: ellipsis;
991
+ white-space: nowrap;
837
992
  }
838
993
  .sb-actions {
839
994
  display: inline-flex;
840
995
  align-items: center;
841
- gap: 3px;
996
+ gap: 4px;
842
997
  margin-left: 8px;
843
- padding: 2px;
998
+ padding: 3px;
844
999
  border: 1px solid var(--border-muted);
845
- border-radius: 7px;
1000
+ border-radius: 8px;
846
1001
  background: color-mix(in srgb, var(--bg) 72%, transparent);
847
1002
  }
848
1003
  .sb-icon-action {
849
1004
  appearance: none;
850
1005
  display: grid;
851
1006
  place-items: center;
852
- width: 24px;
853
- height: 24px;
1007
+ flex: 0 0 auto;
1008
+ width: 26px;
1009
+ height: 26px;
854
1010
  border: 1px solid transparent;
855
- border-radius: 5px;
1011
+ border-radius: 6px;
856
1012
  background: transparent;
857
1013
  color: var(--fg-muted);
858
1014
  padding: 0;
@@ -870,6 +1026,10 @@ body[data-focus-scope="main"] #content {
870
1026
  opacity: 0.38;
871
1027
  cursor: default;
872
1028
  }
1029
+ .sb-actions .sb-tree-action:first-of-type {
1030
+ margin-left: 0;
1031
+ box-shadow: none;
1032
+ }
873
1033
  .sb-icon-action svg {
874
1034
  display: block;
875
1035
  }
@@ -877,11 +1037,11 @@ body[data-focus-scope="main"] #content {
877
1037
  .sb-view-seg button { padding: 0 8px; font-size: 11px; }
878
1038
  .sb-filter-wrap {
879
1039
  position: sticky;
880
- top: 36px;
1040
+ top: var(--sidebar-head-h);
881
1041
  background: var(--bg-soft);
882
1042
  padding: 6px 12px 8px;
883
1043
  border-bottom: 1px solid var(--border-muted);
884
- z-index: 1;
1044
+ z-index: 2;
885
1045
  }
886
1046
  #sb-filter {
887
1047
  width: 100%;
@@ -938,6 +1098,109 @@ body.gdp-resizing #sidebar-resizer {
938
1098
  body.gdp-resizing { cursor: col-resize !important; user-select: none; }
939
1099
  body.gdp-resizing * { user-select: none !important; }
940
1100
 
1101
+ #scope-settings-popover {
1102
+ position: fixed;
1103
+ right: 16px;
1104
+ top: calc(var(--global-header-h) + 8px);
1105
+ width: min(460px, calc(100vw - 32px));
1106
+ max-width: calc(100vw - 32px);
1107
+ z-index: 40;
1108
+ padding: 12px;
1109
+ border: 1px solid var(--border);
1110
+ border-radius: 8px;
1111
+ background: var(--bg);
1112
+ box-shadow: var(--shadow);
1113
+ }
1114
+ #scope-settings-popover[hidden] { display: none; }
1115
+ .scope-settings-head {
1116
+ display: flex;
1117
+ align-items: center;
1118
+ justify-content: space-between;
1119
+ gap: 12px;
1120
+ margin-bottom: 10px;
1121
+ }
1122
+ #scope-settings-close {
1123
+ border: 0;
1124
+ background: transparent;
1125
+ color: var(--fg-muted);
1126
+ cursor: pointer;
1127
+ font-size: 18px;
1128
+ line-height: 20px;
1129
+ }
1130
+ #scope-settings-popover label {
1131
+ display: block;
1132
+ color: var(--fg-muted);
1133
+ font-size: 12px;
1134
+ line-height: 16px;
1135
+ margin: 10px 0 6px;
1136
+ }
1137
+ .scope-settings-section-title {
1138
+ display: block;
1139
+ margin-bottom: 6px;
1140
+ color: var(--fg);
1141
+ font-size: 12px;
1142
+ }
1143
+ .scope-settings-section-title + label {
1144
+ margin-top: 0;
1145
+ }
1146
+ .scope-settings-section + .scope-settings-section {
1147
+ margin-top: 12px;
1148
+ }
1149
+ #sidebar-font-size,
1150
+ #code-font-size {
1151
+ width: 100%;
1152
+ height: 30px;
1153
+ border: 1px solid var(--border-muted);
1154
+ border-radius: 6px;
1155
+ background: var(--bg-soft);
1156
+ color: var(--fg);
1157
+ padding: 0 8px;
1158
+ font: inherit;
1159
+ font-size: 12.5px;
1160
+ }
1161
+ #scope-omit-dirs {
1162
+ box-sizing: border-box;
1163
+ width: 100%;
1164
+ min-height: 210px;
1165
+ resize: vertical;
1166
+ border: 1px solid var(--border-muted);
1167
+ border-radius: 6px;
1168
+ background: var(--bg-soft);
1169
+ color: var(--fg);
1170
+ padding: 8px;
1171
+ font: 13px/19px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
1172
+ }
1173
+ #scope-omit-source {
1174
+ margin: 8px 0 0;
1175
+ color: var(--fg-subtle);
1176
+ font-size: 11px;
1177
+ line-height: 15px;
1178
+ }
1179
+ #display-settings-source {
1180
+ margin: 8px 0 0;
1181
+ color: var(--fg-subtle);
1182
+ font-size: 11px;
1183
+ line-height: 15px;
1184
+ }
1185
+ .scope-settings-actions {
1186
+ display: flex;
1187
+ justify-content: flex-end;
1188
+ gap: 8px;
1189
+ margin-top: 10px;
1190
+ }
1191
+ .scope-settings-actions button {
1192
+ border: 1px solid var(--border-muted);
1193
+ border-radius: 6px;
1194
+ background: var(--bg-soft);
1195
+ color: var(--fg);
1196
+ padding: 4px 10px;
1197
+ cursor: pointer;
1198
+ }
1199
+ .scope-settings-actions button:hover {
1200
+ border-color: var(--border-strong);
1201
+ background: var(--bg-mute);
1202
+ }
1203
+
941
1204
  body.gdp-help-page #topbar,
942
1205
  body.gdp-help-page #sidebar,
943
1206
  body.gdp-help-page #sidebar-resizer {
@@ -1081,11 +1344,11 @@ body.gdp-help-page #content {
1081
1344
  grid-template-columns: 16px 16px minmax(0, 1fr) 22px;
1082
1345
  align-items: center;
1083
1346
  gap: 8px;
1084
- padding: 5.6px 8px 5.6px var(--lvl-pad, 12px);
1347
+ padding: calc(var(--sidebar-row-y) + 1.5px) 8px calc(var(--sidebar-row-y) + 1.5px) var(--lvl-pad, 12px);
1085
1348
  cursor: pointer;
1086
1349
  color: var(--fg);
1087
- font-size: 14px;
1088
- line-height: 21px;
1350
+ font-size: var(--sidebar-dir-font);
1351
+ line-height: calc(var(--sidebar-dir-font) + 7px);
1089
1352
  user-select: none;
1090
1353
  border-radius: 6px;
1091
1354
  }
@@ -1100,7 +1363,7 @@ body.gdp-help-page #content {
1100
1363
  #filelist.tree .tree-dir.children-omitted .dir-label {
1101
1364
  border-bottom: 1px dashed var(--border-strong);
1102
1365
  }
1103
- #filelist.tree .tree-dir.children-omitted-ignored {
1366
+ #filelist.tree .tree-dir.children-omitted-heavy {
1104
1367
  cursor: pointer;
1105
1368
  }
1106
1369
  #filelist.tree .tree-dir.children-omitted-internal {
@@ -1138,8 +1401,8 @@ body.gdp-help-page #content {
1138
1401
  }
1139
1402
  #filelist.tree .tree-dir .dir-name {
1140
1403
  min-width: 0;
1141
- font-size: 14px;
1142
- line-height: 21px;
1404
+ font-size: var(--sidebar-dir-font);
1405
+ line-height: calc(var(--sidebar-dir-font) + 7px);
1143
1406
  color: var(--fg);
1144
1407
  font-weight: 400;
1145
1408
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
@@ -1160,7 +1423,7 @@ body.gdp-help-page #content {
1160
1423
  line-height: 15px;
1161
1424
  text-transform: uppercase;
1162
1425
  }
1163
- #filelist.tree .tree-dir .dir-omitted-ignored {
1426
+ #filelist.tree .tree-dir .dir-omitted-heavy {
1164
1427
  color: var(--accent);
1165
1428
  border-color: var(--accent-muted);
1166
1429
  background: var(--accent-subtle);
@@ -1190,9 +1453,9 @@ body.gdp-help-page #content {
1190
1453
  grid-template-columns: 16px 16px minmax(0, 1fr) auto;
1191
1454
  align-items: center;
1192
1455
  gap: 8px;
1193
- padding: 4px 12px 4px var(--lvl-pad, 12px);
1456
+ padding: var(--sidebar-row-y) 12px var(--sidebar-row-y) var(--lvl-pad, 12px);
1194
1457
  cursor: pointer;
1195
- font-size: 12.5px;
1458
+ font-size: var(--sidebar-file-font);
1196
1459
  color: var(--fg);
1197
1460
  border-left: 2px solid transparent;
1198
1461
  transition: background 0.10s, border-color 0.10s;
@@ -1240,11 +1503,11 @@ body.gdp-help-page #content {
1240
1503
  #filelist.tree .tree-dir.hidden { display: none; }
1241
1504
  #filelist.tree .tree-file .name {
1242
1505
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
1243
- font-size: 12.5px;
1506
+ font-size: var(--sidebar-file-font);
1244
1507
  }
1245
1508
  #filelist.tree .tree-file .stat {
1246
1509
  display: inline-flex; align-items: center; gap: 6px;
1247
- font-size: 11px;
1510
+ font-size: var(--sidebar-stat-font);
1248
1511
  font-variant-numeric: tabular-nums;
1249
1512
  }
1250
1513
  #filelist.tree .tree-file .stat .a { color: var(--success); }
@@ -1267,9 +1530,9 @@ body.gdp-help-page #content {
1267
1530
  grid-template-columns: 16px 1fr auto;
1268
1531
  align-items: center;
1269
1532
  gap: 8px;
1270
- padding: 6px 14px 6px 12px;
1533
+ padding: calc(var(--sidebar-row-y) + 2px) 14px calc(var(--sidebar-row-y) + 2px) 12px;
1271
1534
  cursor: pointer;
1272
- font-size: 12.5px;
1535
+ font-size: var(--sidebar-file-font);
1273
1536
  color: var(--fg);
1274
1537
  border-left: 2px solid transparent;
1275
1538
  transition: background 0.10s, border-color 0.10s;
@@ -1288,7 +1551,7 @@ body.gdp-help-page #content {
1288
1551
  #filelist li .name::before { content: "\200E"; }
1289
1552
  #filelist li .stat {
1290
1553
  display: inline-flex; align-items: center; gap: 6px;
1291
- font-size: 11px;
1554
+ font-size: var(--sidebar-stat-font);
1292
1555
  font-variant-numeric: tabular-nums;
1293
1556
  font-family: "Monaspace Neon", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
1294
1557
  }
@@ -1491,7 +1754,7 @@ tr.gdp-hunk-row > td > .d2h-code-line,
1491
1754
  tr.gdp-hunk-row > td > .d2h-code-side-line,
1492
1755
  tr.gdp-hunk-row > td > .gdp-expand-stack {
1493
1756
  /* Stack auto-sizes: 1 button = 20px, 2 buttons (↑+↓) = 40px. */
1494
- font-size: 12px;
1757
+ font-size: var(--code-font-size);
1495
1758
  line-height: 20px;
1496
1759
  }
1497
1760
  tr.gdp-hunk-row .d2h-code-line,
@@ -1934,7 +2197,7 @@ table.d2h-diff-table tr.gdp-diff-line-target > td:first-child {
1934
2197
  border-collapse: collapse;
1935
2198
  table-layout: auto;
1936
2199
  font-family: "Monaspace Neon", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
1937
- font-size: 12px;
2200
+ font-size: var(--code-font-size);
1938
2201
  line-height: 20px;
1939
2202
  }
1940
2203
  .gdp-source-table tr.gdp-source-line-target {
@@ -2087,12 +2350,45 @@ table.d2h-diff-table tr.gdp-diff-line-target > td:first-child {
2087
2350
  text-overflow: ellipsis;
2088
2351
  white-space: nowrap;
2089
2352
  }
2090
- .gdp-source-virtual-actions {
2353
+ .gdp-source-virtual-search {
2091
2354
  display: inline-flex;
2092
2355
  align-items: center;
2093
2356
  gap: 6px;
2357
+ min-width: 0;
2094
2358
  margin-left: auto;
2095
2359
  }
2360
+ .gdp-source-virtual-search[hidden] {
2361
+ display: none;
2362
+ }
2363
+ .gdp-source-virtual-search input {
2364
+ width: min(220px, 28vw);
2365
+ min-width: 120px;
2366
+ height: 28px;
2367
+ padding: 0 8px;
2368
+ border: 1px solid var(--border);
2369
+ border-radius: 6px;
2370
+ background: var(--bg);
2371
+ color: var(--fg);
2372
+ }
2373
+ .gdp-source-virtual-search button {
2374
+ height: 28px;
2375
+ padding: 0 8px;
2376
+ border: 1px solid var(--border);
2377
+ border-radius: 6px;
2378
+ background: var(--bg-subtle);
2379
+ color: var(--fg);
2380
+ cursor: pointer;
2381
+ }
2382
+ .gdp-source-virtual-search-count {
2383
+ min-width: 62px;
2384
+ color: var(--fg-muted);
2385
+ font-size: 12px;
2386
+ }
2387
+ .gdp-source-virtual-actions {
2388
+ display: inline-flex;
2389
+ align-items: center;
2390
+ gap: 6px;
2391
+ }
2096
2392
  .gdp-source-virtual-action {
2097
2393
  display: inline-flex;
2098
2394
  align-items: center;
@@ -2120,10 +2416,9 @@ table.d2h-diff-table tr.gdp-diff-line-target > td:first-child {
2120
2416
  overflow: auto;
2121
2417
  min-height: 0;
2122
2418
  font-family: "Monaspace Neon", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
2123
- font-size: 12px;
2419
+ font-size: var(--code-font-size);
2124
2420
  line-height: 20px;
2125
- cursor: pointer;
2126
- user-select: none;
2421
+ cursor: text;
2127
2422
  }
2128
2423
  .gdp-source-virtual-spacer {
2129
2424
  position: relative;
@@ -2163,6 +2458,15 @@ table.d2h-diff-table tr.gdp-diff-line-target > td:first-child {
2163
2458
  .gdp-source-virtual-line-code.hljs {
2164
2459
  background: var(--bg);
2165
2460
  }
2461
+ .gdp-source-virtual-search-hit {
2462
+ background: #fff8c5;
2463
+ color: inherit;
2464
+ border-radius: 2px;
2465
+ }
2466
+ .gdp-source-virtual-search-hit.active {
2467
+ background: var(--accent);
2468
+ color: var(--bg);
2469
+ }
2166
2470
  .gdp-standalone-source.gdp-file-shell {
2167
2471
  border: 0;
2168
2472
  border-radius: 0;
@@ -2219,7 +2523,8 @@ table.d2h-diff-table tr.gdp-diff-line-target > td:first-child {
2219
2523
  color: var(--fg);
2220
2524
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
2221
2525
  font-size: 16px;
2222
- font-weight: 400;
2526
+ font-weight: 500;
2527
+ line-height: 24px;
2223
2528
  }
2224
2529
  .gdp-file-breadcrumb-part,
2225
2530
  .gdp-file-breadcrumb-current {
@@ -2227,6 +2532,9 @@ table.d2h-diff-table tr.gdp-diff-line-target > td:first-child {
2227
2532
  text-overflow: ellipsis;
2228
2533
  white-space: nowrap;
2229
2534
  }
2535
+ .gdp-file-breadcrumb-part {
2536
+ font-weight: 500;
2537
+ }
2230
2538
  .gdp-file-breadcrumb button.gdp-file-breadcrumb-part {
2231
2539
  appearance: none;
2232
2540
  border: 0;
@@ -2273,6 +2581,12 @@ table.d2h-diff-table tr.gdp-diff-line-target > td:first-child {
2273
2581
  gap: 32px;
2274
2582
  align-items: start;
2275
2583
  }
2584
+ .gdp-standalone-source .gdp-markdown-layout {
2585
+ grid-template-columns: minmax(0, 1fr);
2586
+ }
2587
+ .gdp-standalone-source .gdp-markdown-toc {
2588
+ display: none;
2589
+ }
2276
2590
  .gdp-markdown-toc {
2277
2591
  position: sticky;
2278
2592
  top: 96px;
@@ -2619,18 +2933,38 @@ body.gdp-file-detail-page.gdp-repo-blob-page #sidebar-resizer {
2619
2933
  body.gdp-repo-page #sidebar-resizer {
2620
2934
  display: block;
2621
2935
  }
2622
- #repo-target-wrap {
2936
+ body.gdp-file-detail-page.gdp-repo-blob-page .sb-title,
2937
+ body.gdp-file-detail-page.gdp-repo-blob-page #totals,
2938
+ body.gdp-repo-page .sb-title,
2939
+ body.gdp-repo-page #totals {
2623
2940
  display: none;
2624
2941
  }
2942
+ body.gdp-repo-page .sb-head,
2943
+ body.gdp-file-detail-page.gdp-repo-blob-page .sb-head {
2944
+ display: grid;
2945
+ grid-template:
2946
+ "toggle ref actions view" auto
2947
+ / 28px minmax(80px, 240px) auto auto;
2948
+ justify-content: start;
2949
+ align-items: center;
2950
+ gap: 8px;
2951
+ }
2952
+ body.gdp-repo-page .sb-head > #sidebar-toggle,
2953
+ body.gdp-file-detail-page.gdp-repo-blob-page .sb-head > #sidebar-toggle {
2954
+ grid-area: toggle;
2955
+ }
2956
+ body.gdp-repo-page #repo-target-wrap,
2625
2957
  body.gdp-file-detail-page.gdp-repo-blob-page #repo-target-wrap {
2626
- display: flex;
2958
+ grid-area: ref;
2627
2959
  }
2628
- #repo-target-wrap.sb-repo-target {
2629
- padding: 12px 12px 8px;
2630
- border-bottom: 1px solid var(--border);
2960
+ .ref-selector.ref-selector-in-grid { width: 100%; }
2961
+ body.gdp-repo-page .sb-actions,
2962
+ body.gdp-file-detail-page.gdp-repo-blob-page .sb-actions {
2963
+ grid-area: actions;
2631
2964
  }
2632
- #repo-target {
2633
- width: 100%;
2965
+ body.gdp-repo-page .sb-view-seg,
2966
+ body.gdp-file-detail-page.gdp-repo-blob-page .sb-view-seg {
2967
+ grid-area: view;
2634
2968
  }
2635
2969
  body.gdp-file-detail-page {
2636
2970
  --chrome-h: var(--global-header-h);
@@ -2663,6 +2997,19 @@ body.gdp-repo-page #content {
2663
2997
  padding: calc(var(--global-header-h) + 24px) 32px 48px;
2664
2998
  min-height: calc(100vh - var(--global-header-h));
2665
2999
  }
3000
+ body.gdp-sidebar-hidden #sidebar,
3001
+ body.gdp-sidebar-hidden #sidebar-resizer {
3002
+ display: none !important;
3003
+ }
3004
+ body.gdp-sidebar-hidden #content,
3005
+ body.gdp-sidebar-hidden.gdp-repo-page #content,
3006
+ body.gdp-sidebar-hidden.gdp-file-detail-page.gdp-repo-blob-page #content {
3007
+ margin-left: 0;
3008
+ }
3009
+ body.gdp-repo-page:not(.gdp-sidebar-hidden) .gdp-repo-toolbar > .ref-selector,
3010
+ body.gdp-file-detail-page.gdp-repo-blob-page:not(.gdp-sidebar-hidden) .gdp-file-detail-header > .ref-selector {
3011
+ display: none;
3012
+ }
2666
3013
  body.gdp-file-detail-page #diff > .gdp-file-shell:not(.gdp-standalone-source),
2667
3014
  body.gdp-file-detail-page #diff > .gdp-repo-shell,
2668
3015
  body.gdp-file-detail-page #empty {
@@ -2683,11 +3030,6 @@ body.gdp-file-detail-page #empty {
2683
3030
  padding-left: 0;
2684
3031
  padding-right: 0;
2685
3032
  }
2686
- .gdp-repo-target {
2687
- max-width: 320px;
2688
- width: 240px;
2689
- flex-shrink: 0;
2690
- }
2691
3033
  .gdp-repo-breadcrumb {
2692
3034
  flex: 1;
2693
3035
  }
@@ -2812,7 +3154,7 @@ body.gdp-file-detail-page #empty {
2812
3154
  }
2813
3155
  .d2h-code-line, .d2h-code-side-line, .d2h-code-line-ctn, .d2h-code-side-emptyplaceholder {
2814
3156
  font-family: inherit !important;
2815
- font-size: 12px !important;
3157
+ font-size: var(--code-font-size) !important;
2816
3158
  line-height: 20px !important;
2817
3159
  font-weight: 400 !important;
2818
3160
  }
@@ -2942,7 +3284,7 @@ body.gdp-file-detail-page #empty {
2942
3284
  color: var(--fg-muted) !important;
2943
3285
  border-right: 0 !important;
2944
3286
  box-shadow: inset -1px 0 0 var(--border-muted);
2945
- font-size: 12px !important;
3287
+ font-size: var(--code-font-size) !important;
2946
3288
  font-variant-numeric: tabular-nums;
2947
3289
  user-select: none;
2948
3290
  }
@@ -2951,7 +3293,7 @@ body.gdp-file-detail-page #empty {
2951
3293
  color: var(--fg-muted) !important;
2952
3294
  border-right: 0 !important;
2953
3295
  box-shadow: inset -1px 0 0 var(--border-muted);
2954
- font-size: 12px !important;
3296
+ font-size: var(--code-font-size) !important;
2955
3297
  font-variant-numeric: tabular-nums;
2956
3298
  }
2957
3299