@youtyan/code-viewer 0.1.45 → 0.1.46

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/index.html CHANGED
@@ -122,6 +122,11 @@
122
122
  </div>
123
123
  <div class="scope-settings-section">
124
124
  <strong class="scope-settings-section-title">Display</strong>
125
+ <label for="viewer-language">Language</label>
126
+ <select id="viewer-language">
127
+ <option value="en">English</option>
128
+ <option value="ja">日本語</option>
129
+ </select>
125
130
  <label for="sidebar-font-size">File list font size</label>
126
131
  <select id="sidebar-font-size">
127
132
  <option value="compact">Small</option>
package/web/style.css CHANGED
@@ -945,21 +945,73 @@ body.gdp-history-page #topbar .ref-pickers {
945
945
  border-bottom: 1px solid var(--border);
946
946
  z-index: 1;
947
947
  }
948
- .history-title { font-weight: 600; font-size: 13px; }
948
+ .history-title {
949
+ flex: 0 0 auto;
950
+ white-space: nowrap;
951
+ font-weight: 600;
952
+ font-size: 13px;
953
+ }
954
+ .history-head .ref-selector {
955
+ flex: 1 1 auto;
956
+ min-width: 0;
957
+ }
949
958
  .history-filter-wrap {
950
- padding: 0 12px 8px;
959
+ position: relative;
960
+ padding: 7px 12px 9px;
951
961
  background: var(--bg-soft);
952
962
  border-bottom: 1px solid var(--border);
953
963
  }
964
+ .history-filter-wrap::before {
965
+ content: "";
966
+ position: absolute;
967
+ left: 23px;
968
+ top: 17px;
969
+ width: 12px;
970
+ height: 12px;
971
+ border: 1.7px solid var(--fg-subtle);
972
+ border-radius: 50%;
973
+ pointer-events: none;
974
+ }
975
+ .history-filter-wrap::after {
976
+ content: "";
977
+ position: absolute;
978
+ left: 34px;
979
+ top: 28px;
980
+ width: 6px;
981
+ height: 1.7px;
982
+ border-radius: 999px;
983
+ background: var(--fg-subtle);
984
+ transform: rotate(45deg);
985
+ transform-origin: left center;
986
+ pointer-events: none;
987
+ }
954
988
  #history-filter {
989
+ box-sizing: border-box;
955
990
  width: 100%;
956
- background: var(--bg);
957
- border: 1px solid var(--border);
991
+ height: 32px;
992
+ background: color-mix(in srgb, var(--bg) 78%, var(--bg-soft));
993
+ border: 1px solid var(--border-muted);
958
994
  color: var(--fg);
959
- border-radius: 6px;
995
+ border-radius: 8px;
960
996
  font: inherit;
961
- font-size: 12px;
962
- padding: 5px 8px;
997
+ font-size: 13px;
998
+ line-height: 30px;
999
+ padding: 0 11px 0 34px;
1000
+ outline: none;
1001
+ transition: border-color 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
1002
+ }
1003
+ #history-filter:hover {
1004
+ border-color: var(--border);
1005
+ background: var(--bg);
1006
+ }
1007
+ #history-filter:focus {
1008
+ border-color: var(--accent);
1009
+ background: var(--bg);
1010
+ box-shadow: 0 0 0 3px var(--accent-muted);
1011
+ }
1012
+ #history-filter::placeholder {
1013
+ color: var(--fg-subtle);
1014
+ opacity: 1;
963
1015
  }
964
1016
  .history-banner {
965
1017
  margin: 8px 10px 0;
@@ -1232,31 +1284,66 @@ body[data-focus-scope="main"] #content {
1232
1284
  position: sticky;
1233
1285
  top: var(--sidebar-head-h);
1234
1286
  background: var(--bg-soft);
1235
- padding: 6px 12px 8px;
1287
+ padding: 7px 12px 9px;
1236
1288
  border-bottom: 1px solid var(--border-muted);
1237
1289
  z-index: 2;
1238
1290
  }
1291
+ .sb-filter-wrap::before {
1292
+ content: "";
1293
+ position: absolute;
1294
+ left: 23px;
1295
+ top: 17px;
1296
+ width: 12px;
1297
+ height: 12px;
1298
+ border: 1.7px solid var(--fg-subtle);
1299
+ border-radius: 50%;
1300
+ pointer-events: none;
1301
+ }
1302
+ .sb-filter-wrap::after {
1303
+ content: "";
1304
+ position: absolute;
1305
+ left: 34px;
1306
+ top: 28px;
1307
+ width: 6px;
1308
+ height: 1.7px;
1309
+ border-radius: 999px;
1310
+ background: var(--fg-subtle);
1311
+ transform: rotate(45deg);
1312
+ transform-origin: left center;
1313
+ pointer-events: none;
1314
+ }
1239
1315
  #sb-filter {
1316
+ box-sizing: border-box;
1240
1317
  width: 100%;
1241
- background: var(--bg);
1242
- border: 1px solid var(--border);
1318
+ height: 32px;
1319
+ background: color-mix(in srgb, var(--bg) 78%, var(--bg-soft));
1320
+ border: 1px solid var(--border-muted);
1243
1321
  color: var(--fg);
1244
- border-radius: 6px;
1322
+ border-radius: 8px;
1245
1323
  font: inherit;
1246
- font-size: 12.5px;
1247
- padding: 5px 10px;
1324
+ font-size: 13px;
1325
+ line-height: 30px;
1326
+ padding: 0 11px 0 34px;
1248
1327
  outline: none;
1249
- transition: border-color 0.12s ease, box-shadow 0.12s ease;
1328
+ transition: border-color 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
1329
+ }
1330
+ #sb-filter:hover {
1331
+ border-color: var(--border);
1332
+ background: var(--bg);
1250
1333
  }
1251
1334
  #sb-filter:focus {
1252
1335
  border-color: var(--accent);
1336
+ background: var(--bg);
1253
1337
  box-shadow: 0 0 0 3px var(--accent-muted);
1254
1338
  }
1255
1339
  #sb-filter[aria-invalid="true"] {
1256
1340
  border-color: var(--danger);
1257
1341
  box-shadow: 0 0 0 3px rgba(207,34,46,0.20);
1258
1342
  }
1259
- #sb-filter::placeholder { color: var(--fg-subtle); }
1343
+ #sb-filter::placeholder {
1344
+ color: var(--fg-subtle);
1345
+ opacity: 1;
1346
+ }
1260
1347
 
1261
1348
  /* ===== Sidebar resizer (drag right edge to resize) ===== */
1262
1349
  #sidebar-resizer {
@@ -1340,17 +1427,44 @@ body.gdp-resizing * { user-select: none !important; }
1340
1427
  .scope-settings-section + .scope-settings-section {
1341
1428
  margin-top: 12px;
1342
1429
  }
1430
+ #viewer-language,
1343
1431
  #sidebar-font-size,
1344
1432
  #code-font-size {
1433
+ appearance: none;
1434
+ box-sizing: border-box;
1345
1435
  width: 100%;
1346
- height: 30px;
1347
- border: 1px solid var(--border-muted);
1436
+ height: 36px;
1437
+ border: 1px solid var(--border);
1348
1438
  border-radius: 6px;
1349
- background: var(--bg-soft);
1439
+ background:
1440
+ linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%) right 17px center / 5px 5px no-repeat,
1441
+ linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%) right 12px center / 5px 5px no-repeat,
1442
+ var(--bg-soft);
1350
1443
  color: var(--fg);
1351
- padding: 0 8px;
1444
+ padding: 0 36px 0 10px;
1352
1445
  font: inherit;
1353
- font-size: 12.5px;
1446
+ font-size: 13px;
1447
+ line-height: 34px;
1448
+ cursor: pointer;
1449
+ }
1450
+ #viewer-language:hover,
1451
+ #sidebar-font-size:hover,
1452
+ #code-font-size:hover {
1453
+ border-color: var(--border-strong);
1454
+ background-color: var(--bg-mute);
1455
+ }
1456
+ #viewer-language:focus,
1457
+ #sidebar-font-size:focus,
1458
+ #code-font-size:focus {
1459
+ border-color: var(--accent);
1460
+ outline: none;
1461
+ box-shadow: 0 0 0 3px var(--accent-muted);
1462
+ }
1463
+ #viewer-language:disabled,
1464
+ #sidebar-font-size:disabled,
1465
+ #code-font-size:disabled {
1466
+ cursor: not-allowed;
1467
+ opacity: 0.65;
1354
1468
  }
1355
1469
  #scope-omit-dirs,
1356
1470
  #scope-exclude-names {
@@ -1497,6 +1611,45 @@ body.gdp-help-page #content {
1497
1611
  margin: 0 0 10px;
1498
1612
  font-size: 16px;
1499
1613
  }
1614
+ .gdp-help-group p {
1615
+ max-width: 840px;
1616
+ margin: 0 0 14px;
1617
+ color: var(--fg-muted);
1618
+ line-height: 1.65;
1619
+ }
1620
+ .gdp-help-steps {
1621
+ max-width: 840px;
1622
+ margin: 0 0 18px;
1623
+ padding-left: 26px;
1624
+ color: var(--fg-muted);
1625
+ line-height: 1.65;
1626
+ }
1627
+ .gdp-help-steps li {
1628
+ margin: 6px 0;
1629
+ }
1630
+ .gdp-help-command {
1631
+ max-width: 920px;
1632
+ margin: 0 0 16px;
1633
+ }
1634
+ .gdp-help-command-title {
1635
+ margin: 0 0 6px;
1636
+ color: var(--fg-muted);
1637
+ font-size: 13px;
1638
+ font-weight: 700;
1639
+ }
1640
+ .gdp-help-command pre {
1641
+ margin: 0;
1642
+ overflow-x: auto;
1643
+ border: 1px solid var(--border-muted);
1644
+ border-radius: 8px;
1645
+ background: var(--bg-soft);
1646
+ padding: 12px 14px;
1647
+ }
1648
+ .gdp-help-command code {
1649
+ color: var(--fg);
1650
+ font: 13px "Monaspace Neon", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
1651
+ white-space: pre;
1652
+ }
1500
1653
  .gdp-help-group table {
1501
1654
  width: 100%;
1502
1655
  border-collapse: collapse;