mbeditor 0.1.4 → 0.1.6

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.

Potentially problematic release.


This version of mbeditor might be problematic. Click here for more details.

Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -1
  3. data/app/assets/javascripts/mbeditor/application.js +1 -0
  4. data/app/assets/javascripts/mbeditor/components/DiffViewer.js +3 -1
  5. data/app/assets/javascripts/mbeditor/components/EditorPanel.js +66 -13
  6. data/app/assets/javascripts/mbeditor/components/FileTree.js +0 -17
  7. data/app/assets/javascripts/mbeditor/components/GitPanel.js +115 -32
  8. data/app/assets/javascripts/mbeditor/components/MbeditorApp.js +253 -30
  9. data/app/assets/javascripts/mbeditor/components/QuickOpenDialog.js +50 -18
  10. data/app/assets/javascripts/mbeditor/components/TabBar.js +2 -2
  11. data/app/assets/javascripts/mbeditor/editor_plugins.js +49 -0
  12. data/app/assets/javascripts/mbeditor/editor_store.js +1 -0
  13. data/app/assets/javascripts/mbeditor/file_icon.js +30 -0
  14. data/app/assets/javascripts/mbeditor/file_service.js +6 -1
  15. data/app/assets/javascripts/mbeditor/search_service.js +8 -4
  16. data/app/assets/stylesheets/mbeditor/application.css +51 -0
  17. data/app/assets/stylesheets/mbeditor/editor.css +379 -5
  18. data/app/controllers/mbeditor/editors_controller.rb +121 -11
  19. data/app/controllers/mbeditor/git_controller.rb +14 -4
  20. data/app/services/mbeditor/git_service.rb +11 -1
  21. data/app/views/layouts/mbeditor/application.html.erb +5 -1
  22. data/config/routes.rb +1 -0
  23. data/lib/mbeditor/rack/silence_ping_request.rb +20 -6
  24. data/lib/mbeditor/version.rb +1 -1
  25. data/public/monaco-editor/vs/basic-languages/shell/shell.js +41 -0
  26. data/public/monaco-editor/vs/basic-languages/typescript/typescript.js +10 -0
  27. data/public/ts_worker.js +5 -0
  28. metadata +6 -2
@@ -1,5 +1,5 @@
1
1
  // Identify all requests as coming from the mbeditor client.
2
- // The server checks this header on every non-GET request as a CSRF guard.
2
+ // The server uses this header to silence editor logs and guard non-GET requests.
3
3
  axios.defaults.headers.common['X-Mbeditor-Client'] = '1';
4
4
 
5
5
  var FileService = (function () {
@@ -43,6 +43,10 @@ var FileService = (function () {
43
43
  return axios.post(basePath() + '/lint', { path: path, code: code }).then(function(res) { return res.data; });
44
44
  }
45
45
 
46
+ function quickFixOffense(path, code, copName) {
47
+ return axios.post(basePath() + '/quick_fix', { path: path, code: code, cop_name: copName }).then(function(res) { return res.data; });
48
+ }
49
+
46
50
  function formatFile(path) {
47
51
  return axios.post(basePath() + '/format', { path: path }).then(function(res) { return res.data; });
48
52
  }
@@ -69,6 +73,7 @@ var FileService = (function () {
69
73
  renamePath: renamePath,
70
74
  deletePath: deletePath,
71
75
  lintFile: lintFile,
76
+ quickFixOffense: quickFixOffense,
72
77
  formatFile: formatFile,
73
78
  ping: ping,
74
79
  getState: getState,
@@ -39,15 +39,19 @@ var SearchService = (function () {
39
39
  }
40
40
 
41
41
  function projectSearch(query) {
42
- if (!query) return Promise.resolve([]);
42
+ if (!query) return Promise.resolve({ results: [], capped: false });
43
43
  return axios.get(basePath() + '/search', { params: { q: query } })
44
44
  .then(function(res) {
45
- EditorStore.setState({ searchResults: res.data });
46
- return res.data;
45
+ var data = res.data;
46
+ // Handle both old array response and new {results, capped} shape
47
+ var results = Array.isArray(data) ? data : (data && data.results || []);
48
+ var capped = !Array.isArray(data) && !!(data && data.capped);
49
+ EditorStore.setState({ searchResults: results, searchCapped: capped });
50
+ return { results: results, capped: capped };
47
51
  })
48
52
  .catch(function(err) {
49
53
  EditorStore.setStatus("Search failed: " + err.message, "error");
50
- return [];
54
+ return { results: [], capped: false };
51
55
  });
52
56
  }
53
57
 
@@ -484,6 +484,57 @@
484
484
  }
485
485
 
486
486
  /* Code Review Panel & Redmine */
487
+ .git-redmine-content {
488
+ padding: 2px 8px 8px;
489
+ }
490
+ .git-redmine-error {
491
+ font-size: 12px;
492
+ color: #f48771;
493
+ padding: 6px 4px;
494
+ line-height: 1.4;
495
+ }
496
+ .git-redmine-section-label {
497
+ display: flex;
498
+ align-items: center;
499
+ min-width: 0;
500
+ flex: 1;
501
+ }
502
+ .redmine-badge--section {
503
+ margin-left: 8px;
504
+ flex-shrink: 0;
505
+ }
506
+ .git-redmine-issue {
507
+ display: flex;
508
+ flex-direction: column;
509
+ gap: 8px;
510
+ }
511
+ .git-redmine-title {
512
+ font-size: 12px;
513
+ font-weight: 600;
514
+ color: #d4d4d4;
515
+ line-height: 1.35;
516
+ display: -webkit-box;
517
+ -webkit-line-clamp: 2;
518
+ -webkit-box-orient: vertical;
519
+ overflow: hidden;
520
+ word-break: break-word;
521
+ }
522
+ .git-redmine-desc {
523
+ font-size: 12px;
524
+ color: #ccc;
525
+ line-height: 1.4;
526
+ white-space: pre-wrap;
527
+ word-wrap: break-word;
528
+ max-height: 120px;
529
+ overflow-y: auto;
530
+ }
531
+ .git-redmine-footer {
532
+ display: flex;
533
+ justify-content: flex-end;
534
+ font-size: 11px;
535
+ color: #858585;
536
+ line-height: 1.3;
537
+ }
487
538
  .ide-code-review {
488
539
  position: absolute;
489
540
  top: 40px;
@@ -117,6 +117,12 @@ html, body, #mbeditor-root {
117
117
  transition: color 0.15s, background 0.15s;
118
118
  }
119
119
 
120
+ .ide-sidebar-tab.ide-sidebar-tab-icon {
121
+ flex: 0 0 auto;
122
+ padding: 5px 10px;
123
+ font-size: 14px;
124
+ }
125
+
120
126
  .ide-sidebar-tab:hover { color: #ccc; background: #2d2d2d; }
121
127
  .ide-sidebar-tab.active { color: #4ec9b0; border-bottom: 2px solid #4ec9b0; }
122
128
 
@@ -206,6 +212,7 @@ html, body, #mbeditor-root {
206
212
  display: flex;
207
213
  flex-direction: column;
208
214
  overflow: hidden;
215
+ min-width: 0;
209
216
  background: #1e1e1e;
210
217
  }
211
218
 
@@ -663,19 +670,47 @@ html, body, #mbeditor-root {
663
670
  gap: 6px;
664
671
  }
665
672
 
666
- .search-input {
673
+ .search-input-shell {
674
+ position: relative;
667
675
  flex: 1;
676
+ min-width: 0;
677
+ }
678
+
679
+ .search-input {
680
+ width: 100%;
668
681
  background: #3c3c3c;
669
682
  border: 1px solid #555;
670
683
  border-radius: 4px;
671
684
  color: #ccc;
672
- padding: 4px 8px;
685
+ padding: 4px 28px 4px 8px;
673
686
  font-size: 12px;
674
687
  outline: none;
675
688
  }
676
689
 
677
690
  .search-input:focus { border-color: #4ec9b0; }
678
691
 
692
+ .search-clear-btn {
693
+ position: absolute;
694
+ right: 4px;
695
+ top: 50%;
696
+ transform: translateY(-50%);
697
+ width: 20px;
698
+ height: 20px;
699
+ border: none;
700
+ border-radius: 3px;
701
+ background: transparent;
702
+ color: #aaa;
703
+ cursor: pointer;
704
+ display: flex;
705
+ align-items: center;
706
+ justify-content: center;
707
+ }
708
+
709
+ .search-clear-btn:hover {
710
+ background: #2a2d2e;
711
+ color: #ddd;
712
+ }
713
+
679
714
  .search-btn {
680
715
  background: #094771;
681
716
  border: none;
@@ -689,6 +724,11 @@ html, body, #mbeditor-root {
689
724
 
690
725
  .search-btn:hover { background: #0e639c; }
691
726
 
727
+ .search-btn:disabled {
728
+ cursor: progress;
729
+ opacity: 0.85;
730
+ }
731
+
692
732
  .search-results {
693
733
  flex: 1;
694
734
  overflow-y: auto;
@@ -700,10 +740,26 @@ html, body, #mbeditor-root {
700
740
  border-radius: 3px;
701
741
  transition: background 0.1s;
702
742
  border-bottom: 1px solid #2d2d2d;
743
+ display: flex;
744
+ align-items: flex-start;
745
+ gap: 8px;
703
746
  }
704
747
 
705
748
  .search-result-item:hover { background: #2a2d2e; }
706
749
 
750
+ .search-result-icon {
751
+ flex-shrink: 0;
752
+ width: 16px;
753
+ margin-top: 2px;
754
+ text-align: center;
755
+ color: #78b4e0;
756
+ }
757
+
758
+ .search-result-body {
759
+ min-width: 0;
760
+ flex: 1;
761
+ }
762
+
707
763
  .search-result-file {
708
764
  font-size: 11px;
709
765
  color: #4ec9b0;
@@ -883,6 +939,7 @@ html, body, #mbeditor-root {
883
939
  display: flex;
884
940
  flex-direction: column;
885
941
  flex-shrink: 0;
942
+ min-height: 0;
886
943
  }
887
944
 
888
945
  /* Only stretch when the graph section is open */
@@ -893,6 +950,7 @@ html, body, #mbeditor-root {
893
950
 
894
951
  .ide-git-right-panel .git-history-graph-wrap {
895
952
  flex: 1;
953
+ min-height: 0;
896
954
  overflow-y: auto;
897
955
  overflow-x: hidden;
898
956
  }
@@ -1211,17 +1269,43 @@ html, body, #mbeditor-root {
1211
1269
  overflow: hidden;
1212
1270
  }
1213
1271
 
1272
+ .quick-open-input-wrap {
1273
+ position: relative;
1274
+ }
1275
+
1214
1276
  .quick-open-input {
1215
1277
  background: transparent;
1216
1278
  border: none;
1217
1279
  border-bottom: 1px solid #3c3c3c;
1218
1280
  color: #ccc;
1219
- padding: 12px 16px;
1281
+ padding: 12px 34px 12px 16px;
1220
1282
  font-size: 14px;
1221
1283
  outline: none;
1222
1284
  width: 100%;
1223
1285
  }
1224
1286
 
1287
+ .quick-open-clear-btn {
1288
+ position: absolute;
1289
+ right: 6px;
1290
+ top: 50%;
1291
+ transform: translateY(-50%);
1292
+ width: 22px;
1293
+ height: 22px;
1294
+ border: none;
1295
+ border-radius: 4px;
1296
+ background: transparent;
1297
+ color: #999;
1298
+ cursor: pointer;
1299
+ display: flex;
1300
+ align-items: center;
1301
+ justify-content: center;
1302
+ }
1303
+
1304
+ .quick-open-clear-btn:hover {
1305
+ background: #2a2d2e;
1306
+ color: #ddd;
1307
+ }
1308
+
1225
1309
  .quick-open-results {
1226
1310
  overflow-y: auto;
1227
1311
  flex: 1;
@@ -1237,11 +1321,27 @@ html, body, #mbeditor-root {
1237
1321
  transition: background 0.1s;
1238
1322
  }
1239
1323
 
1324
+ .quick-open-result-icon {
1325
+ flex-shrink: 0;
1326
+ width: 16px;
1327
+ text-align: center;
1328
+ color: #78b4e0;
1329
+ }
1330
+
1331
+ .quick-open-result-body {
1332
+ min-width: 0;
1333
+ flex: 1;
1334
+ }
1335
+
1240
1336
  .quick-open-result:hover,
1241
1337
  .quick-open-result.selected { background: #094771; }
1242
1338
 
1243
- .quick-open-result-name { color: #ccc; flex: 1; }
1244
- .quick-open-result-path { color: #666; font-size: 11px; }
1339
+ .quick-open-result-name { color: #ccc; }
1340
+ .quick-open-result-path { color: #666; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1341
+
1342
+ .typescript-icon { color: #3178c6 !important; }
1343
+ .shell-icon { color: #89d185 !important; }
1344
+ .pdf-icon { color: #f48771 !important; }
1245
1345
 
1246
1346
  /* ── Scrollbars ────────────────────────────────────────────── */
1247
1347
  ::-webkit-scrollbar { width: 8px; height: 8px; }
@@ -1269,3 +1369,277 @@ html, body, #mbeditor-root {
1269
1369
  from { opacity: 0; transform: translateY(8px); }
1270
1370
  to { opacity: 1; transform: translateY(0); }
1271
1371
  }
1372
+
1373
+ /* ── Settings panel ─────────────────────────────────────────── */
1374
+ .ide-settings-panel { display: flex; flex-direction: column; height: 100%; overflow-y: auto; }
1375
+ .ide-settings-body { padding: 8px 12px; display: flex; flex-direction: column; gap: 14px; }
1376
+ .ide-settings-row { display: flex; flex-direction: column; gap: 4px; }
1377
+ .ide-settings-row-check { flex-direction: row; align-items: center; justify-content: space-between; }
1378
+ .ide-settings-label { font-size: 11px; color: #aaa; text-transform: uppercase; letter-spacing: 0.5px; }
1379
+ .ide-settings-select,
1380
+ .ide-settings-input { background: #2d2d2d; color: #ccc; border: 1px solid #444; border-radius: 3px; padding: 4px 6px; font-size: 12px; width: 100%; box-sizing: border-box; }
1381
+ .ide-settings-input-wide { font-family: monospace; }
1382
+ .ide-settings-checkbox { width: auto; cursor: pointer; }
1383
+ .ide-settings-reset-btn { margin-top: 8px; background: #333; color: #aaa; border: 1px solid #555; border-radius: 3px; padding: 5px 10px; font-size: 11px; cursor: pointer; align-self: flex-start; }
1384
+ .ide-settings-reset-btn:hover { background: #444; color: #ddd; }
1385
+
1386
+ /* Settings tab (pane view) */
1387
+ .ide-settings-tab-content {
1388
+ display: flex;
1389
+ flex-direction: column;
1390
+ height: 100%;
1391
+ overflow-y: auto;
1392
+ background: var(--bg-panel, #1e1e1e);
1393
+ color: var(--text-main, #ccc);
1394
+ }
1395
+
1396
+ /* ── CSS theme tokens (defaults = vs-dark) ───────────────── */
1397
+ :root {
1398
+ --bg-base: #1e1e1e;
1399
+ --bg-panel: #252526;
1400
+ --bg-hover: #2a2d2e;
1401
+ --bg-active: #094771;
1402
+ --bg-input: #2d2d2d;
1403
+ --border: #3c3c3c;
1404
+ --border-input: #444;
1405
+ --text-main: #cccccc;
1406
+ --text-dim: #bbbbbb;
1407
+ --text-muted:#888888;
1408
+ --accent: #007acc;
1409
+ --accent-fg: #4ec9b0;
1410
+ }
1411
+
1412
+ /* ── Light theme (vs) ────────────────────────────────────── */
1413
+ [data-theme="vs"] {
1414
+ --bg-base: #ffffff;
1415
+ --bg-panel: #f3f3f3;
1416
+ --bg-hover: #e8e8e8;
1417
+ --bg-active: #d4e6f5;
1418
+ --bg-input: #ffffff;
1419
+ --border: #cecece;
1420
+ --border-input: #c0c0c0;
1421
+ --text-main: #333333;
1422
+ --text-dim: #616161;
1423
+ --text-muted:#999999;
1424
+ --accent: #007acc;
1425
+ --accent-fg: #0070c1;
1426
+ }
1427
+ [data-theme="vs"] html,
1428
+ [data-theme="vs"] body,
1429
+ [data-theme="vs"] #mbeditor-root { background: #ffffff; color: #333333; }
1430
+ [data-theme="vs"] .ide-shell { background: #ffffff; }
1431
+ [data-theme="vs"] .ide-titlebar { background: #f3f3f3; border-color: #cecece; color: #333; }
1432
+ [data-theme="vs"] .ide-titlebar-title { color: #333; }
1433
+ [data-theme="vs"] .ide-sidebar { background: #f3f3f3; border-color: #cecece; }
1434
+ [data-theme="vs"] .sidebar-divider { background: #e0e0e0; border-color: #cecece; }
1435
+ [data-theme="vs"] .sidebar-divider:hover,
1436
+ [data-theme="vs"] .sidebar-divider.active { background: #c0c0c0; }
1437
+ [data-theme="vs"] .ide-sidebar-header { color: #616161; border-color: #cecece; }
1438
+ [data-theme="vs"] .ide-sidebar-tabs { border-color: #cecece; }
1439
+ [data-theme="vs"] .ide-sidebar-tab { color: #616161; background: transparent; }
1440
+ [data-theme="vs"] .ide-sidebar-tab:hover { color: #333; background: #e8e8e8; }
1441
+ [data-theme="vs"] .ide-sidebar-tab.active { color: #0070c1; border-bottom-color: #0070c1; }
1442
+ [data-theme="vs"] .ide-sidebar-content::-webkit-scrollbar-thumb { background: #c0c0c0; }
1443
+ [data-theme="vs"] .tree-item { color: #333333; }
1444
+ [data-theme="vs"] .tree-item:hover { background: #e8e8e8; }
1445
+ [data-theme="vs"] .tree-item.active { background: #d4e6f5; }
1446
+ [data-theme="vs"] .tree-item.modified { color: #8c7000; }
1447
+ [data-theme="vs"] .ide-sidebar-content .ide-inline-input { background: #fff; border-color: #007acc; color: #333; }
1448
+ [data-theme="vs"] .ide-main { background: #ffffff; }
1449
+ [data-theme="vs"] .tab-bar { background: #ececec; border-color: #cecece; }
1450
+ [data-theme="vs"] .tab-item { background: transparent; color: #666; border-color: transparent; }
1451
+ [data-theme="vs"] .tab-item:hover { background: #e0e0e0; color: #333; }
1452
+ [data-theme="vs"] .tab-item.active { background: #ffffff; color: #333; border-bottom-color: #007acc; }
1453
+ [data-theme="vs"] .tab-item-name { color: inherit; }
1454
+ [data-theme="vs"] .tab-close { color: #999; }
1455
+ [data-theme="vs"] .tab-close:hover { color: #333; background: #d0d0d0; }
1456
+ [data-theme="vs"] .ide-pane.focused-pane { border-color: transparent; }
1457
+ [data-theme="vs"] .ide-statusbar { background: #007acc; }
1458
+ [data-theme="vs"] .ide-empty-pane { background: #ffffff; color: #999; }
1459
+ [data-theme="vs"] .panel-divider { background: #e0e0e0; }
1460
+ [data-theme="vs"] .panel-divider:hover,
1461
+ [data-theme="vs"] .panel-divider.active { background: #007acc; }
1462
+ [data-theme="vs"] .search-input { background: #fff; border-color: #c0c0c0; color: #333; }
1463
+ [data-theme="vs"] .search-input:focus { border-color: #007acc; }
1464
+ [data-theme="vs"] .search-result-item:hover,
1465
+ [data-theme="vs"] .search-result-item.selected { background: #e8e8e8; }
1466
+ [data-theme="vs"] .search-result-file { color: #0070c1; }
1467
+ [data-theme="vs"] .search-result-text { color: #333; }
1468
+ [data-theme="vs"] .search-result-match { color: #792800; }
1469
+ [data-theme="vs"] .ide-settings-tab-content { background: #ffffff; color: #333; }
1470
+ [data-theme="vs"] .ide-settings-label { color: #616161; }
1471
+ [data-theme="vs"] .ide-settings-select,
1472
+ [data-theme="vs"] .ide-settings-input { background: #fff; color: #333; border-color: #c0c0c0; }
1473
+ [data-theme="vs"] .ide-settings-reset-btn { background: #ececec; color: #333; border-color: #c0c0c0; }
1474
+ [data-theme="vs"] .ide-settings-reset-btn:hover { background: #ddd; color: #111; }
1475
+ [data-theme="vs"] .ide-toast { background: #f3f3f3; border-color: #c0c0c0; color: #333; }
1476
+
1477
+ /* ── High Contrast Dark (hc-black) ───────────────────────── */
1478
+ [data-theme="hc-black"] {
1479
+ --bg-base: #000000;
1480
+ --bg-panel: #0c0c0c;
1481
+ --bg-hover: #1a1a1a;
1482
+ --bg-active: #004c8c;
1483
+ --border: #6fc3df;
1484
+ --text-main: #ffffff;
1485
+ --text-dim: #ffffff;
1486
+ --text-muted:#aaaaaa;
1487
+ --accent: #1aebff;
1488
+ }
1489
+ [data-theme="hc-black"] html,
1490
+ [data-theme="hc-black"] body,
1491
+ [data-theme="hc-black"] #mbeditor-root { background: #000; color: #fff; }
1492
+ [data-theme="hc-black"] .ide-shell { background: #000; }
1493
+ [data-theme="hc-black"] .ide-titlebar { background: #000; border-color: #6fc3df; color: #fff; }
1494
+ [data-theme="hc-black"] .ide-titlebar-title { color: #fff; }
1495
+ [data-theme="hc-black"] .ide-sidebar { background: #000; border-color: #6fc3df; }
1496
+ [data-theme="hc-black"] .sidebar-divider { background: #3c3c3c; border-color: #6fc3df; }
1497
+ [data-theme="hc-black"] .ide-sidebar-header { color: #fff; border-color: #6fc3df; }
1498
+ [data-theme="hc-black"] .ide-sidebar-tabs { border-color: #6fc3df; }
1499
+ [data-theme="hc-black"] .ide-sidebar-tab { color: #ccc; }
1500
+ [data-theme="hc-black"] .ide-sidebar-tab:hover { color: #fff; background: #1a1a1a; }
1501
+ [data-theme="hc-black"] .ide-sidebar-tab.active { color: #1aebff; border-bottom-color: #1aebff; }
1502
+ [data-theme="hc-black"] .tree-item { color: #fff; }
1503
+ [data-theme="hc-black"] .tree-item:hover { background: #1a1a1a; outline: 1px solid #6fc3df; }
1504
+ [data-theme="hc-black"] .tree-item.active { background: #004c8c; outline: 1px solid #1aebff; }
1505
+ [data-theme="hc-black"] .ide-main { background: #000; }
1506
+ [data-theme="hc-black"] .tab-bar { background: #000; border-color: #6fc3df; }
1507
+ [data-theme="hc-black"] .tab-item { color: #ccc; }
1508
+ [data-theme="hc-black"] .tab-item:hover { background: #1a1a1a; outline: 1px solid #6fc3df; }
1509
+ [data-theme="hc-black"] .tab-item.active { background: #000; color: #1aebff; border-bottom-color: #1aebff; outline: 1px solid #1aebff; }
1510
+ [data-theme="hc-black"] .ide-statusbar { background: #000; border-top: 1px solid #6fc3df; }
1511
+ [data-theme="hc-black"] .ide-empty-pane { background: #000; color: #aaa; }
1512
+ [data-theme="hc-black"] .ide-settings-tab-content { background: #000; color: #fff; }
1513
+ [data-theme="hc-black"] .ide-settings-label { color: #aaa; }
1514
+ [data-theme="hc-black"] .ide-settings-select,
1515
+ [data-theme="hc-black"] .ide-settings-input { background: #000; color: #fff; border-color: #6fc3df; }
1516
+ [data-theme="hc-black"] .ide-settings-reset-btn { background: #000; color: #fff; border-color: #6fc3df; }
1517
+ [data-theme="hc-black"] .ide-toast { background: #000; border-color: #6fc3df; color: #fff; }
1518
+
1519
+ /* ── High Contrast Light (hc-light) ─────────────────────── */
1520
+ [data-theme="hc-light"] {
1521
+ --bg-base: #ffffff;
1522
+ --bg-panel: #f8f8f8;
1523
+ --bg-hover: #ebebeb;
1524
+ --bg-active: #0f4a85;
1525
+ --border: #000000;
1526
+ --text-main: #000000;
1527
+ --text-dim: #000000;
1528
+ --text-muted:#444444;
1529
+ --accent: #0000c5;
1530
+ }
1531
+ [data-theme="hc-light"] html,
1532
+ [data-theme="hc-light"] body,
1533
+ [data-theme="hc-light"] #mbeditor-root { background: #fff; color: #000; }
1534
+ [data-theme="hc-light"] .ide-shell { background: #fff; }
1535
+ [data-theme="hc-light"] .ide-titlebar { background: #f8f8f8; border-color: #000; color: #000; }
1536
+ [data-theme="hc-light"] .ide-titlebar-title { color: #000; }
1537
+ [data-theme="hc-light"] .ide-sidebar { background: #f8f8f8; border-color: #000; }
1538
+ [data-theme="hc-light"] .sidebar-divider { background: #e0e0e0; border-color: #000; }
1539
+ [data-theme="hc-light"] .ide-sidebar-header { color: #000; border-color: #000; font-weight: 700; }
1540
+ [data-theme="hc-light"] .ide-sidebar-tabs { border-color: #000; }
1541
+ [data-theme="hc-light"] .ide-sidebar-tab { color: #000; }
1542
+ [data-theme="hc-light"] .ide-sidebar-tab:hover { background: #ebebeb; outline: 1px solid #000; }
1543
+ [data-theme="hc-light"] .ide-sidebar-tab.active { color: #0000c5; border-bottom: 2px solid #0000c5; }
1544
+ [data-theme="hc-light"] .tree-item { color: #000; }
1545
+ [data-theme="hc-light"] .tree-item:hover { background: #ebebeb; outline: 1px solid #000; }
1546
+ [data-theme="hc-light"] .tree-item.active { background: #d0e4f7; outline: 1px solid #0000c5; color: #000; }
1547
+ [data-theme="hc-light"] .ide-main { background: #fff; }
1548
+ [data-theme="hc-light"] .tab-bar { background: #f8f8f8; border-color: #000; }
1549
+ [data-theme="hc-light"] .tab-item { color: #000; }
1550
+ [data-theme="hc-light"] .tab-item:hover { background: #ebebeb; outline: 1px solid #000; }
1551
+ [data-theme="hc-light"] .tab-item.active { background: #fff; color: #0000c5; border-bottom: 2px solid #0000c5; outline: 1px solid #0000c5; }
1552
+ [data-theme="hc-light"] .ide-statusbar { background: #0000c5; }
1553
+ [data-theme="hc-light"] .ide-empty-pane { background: #fff; color: #444; }
1554
+ [data-theme="hc-light"] .ide-settings-tab-content { background: #fff; color: #000; }
1555
+ [data-theme="hc-light"] .ide-settings-label { color: #444; }
1556
+ [data-theme="hc-light"] .ide-settings-select,
1557
+ [data-theme="hc-light"] .ide-settings-input { background: #fff; color: #000; border-color: #000; }
1558
+ [data-theme="hc-light"] .ide-settings-reset-btn { background: #f8f8f8; color: #000; border-color: #000; }
1559
+ [data-theme="hc-light"] .ide-toast { background: #f8f8f8; border-color: #000; color: #000; }
1560
+
1561
+ /* ── Markdown preview — light theme ────────────────────── */
1562
+ [data-theme="vs"] .markdown-preview { background: #ffffff; color: #333; }
1563
+ [data-theme="vs"] .markdown-preview h1,
1564
+ [data-theme="vs"] .markdown-preview h2,
1565
+ [data-theme="vs"] .markdown-preview h3,
1566
+ [data-theme="vs"] .markdown-preview h4 { color: #000; }
1567
+ [data-theme="vs"] .markdown-preview a { color: #0070c1; }
1568
+ [data-theme="vs"] .markdown-preview code { background: #efefef; color: #333; }
1569
+ [data-theme="vs"] .markdown-preview pre code { background: #f5f5f5; }
1570
+ [data-theme="vs"] .markdown-preview blockquote { border-left: 3px solid #c0c0c0; color: #555; }
1571
+ [data-theme="vs"] .markdown-preview table td,
1572
+ [data-theme="vs"] .markdown-preview table th { border-color: #c0c0c0; }
1573
+ [data-theme="vs"] .markdown-preview hr { border-color: #c0c0c0; }
1574
+
1575
+ /* ── Markdown preview — HC Dark ─────────────────────────── */
1576
+ [data-theme="hc-black"] .markdown-preview { background: #000; color: #fff; }
1577
+ [data-theme="hc-black"] .markdown-preview h1,
1578
+ [data-theme="hc-black"] .markdown-preview h2,
1579
+ [data-theme="hc-black"] .markdown-preview h3,
1580
+ [data-theme="hc-black"] .markdown-preview h4 { color: #fff; }
1581
+ [data-theme="hc-black"] .markdown-preview a { color: #1aebff; }
1582
+ [data-theme="hc-black"] .markdown-preview code { background: #1a1a1a; color: #fff; }
1583
+ [data-theme="hc-black"] .markdown-preview blockquote { border-left: 3px solid #6fc3df; }
1584
+
1585
+ /* ── Markdown preview — HC Light ────────────────────────── */
1586
+ [data-theme="hc-light"] .markdown-preview { background: #fff; color: #000; }
1587
+ [data-theme="hc-light"] .markdown-preview h1,
1588
+ [data-theme="hc-light"] .markdown-preview h2,
1589
+ [data-theme="hc-light"] .markdown-preview h3,
1590
+ [data-theme="hc-light"] .markdown-preview h4 { color: #000; font-weight: 700; }
1591
+ [data-theme="hc-light"] .markdown-preview a { color: #0000c5; }
1592
+ [data-theme="hc-light"] .markdown-preview code { background: #f0f0f0; color: #000; border: 1px solid #000; }
1593
+ [data-theme="hc-light"] .markdown-preview blockquote { border-left: 3px solid #000; }
1594
+
1595
+ /* ── Git panel — light theme ─────────────────────────────── */
1596
+ [data-theme="vs"] .ide-git-right-panel { background: #f3f3f3; border-color: #cecece; }
1597
+ [data-theme="vs"] .gitpanel-divider { background: #e0e0e0; border-color: #cecece; }
1598
+ [data-theme="vs"] .ide-git-panel { background: #f3f3f3; }
1599
+ [data-theme="vs"] .ide-git-panel-header { border-color: #cecece; }
1600
+ [data-theme="vs"] .ide-git-panel-title { color: #0070c1; }
1601
+ [data-theme="vs"] .ide-git-panel-branch { color: #333; }
1602
+ [data-theme="vs"] .git-header-btn { color: #555; }
1603
+ [data-theme="vs"] .git-header-btn:hover { background: rgba(0,0,0,0.06); color: #000; }
1604
+ [data-theme="vs"] .git-metadata { color: #444; border-color: #cecece; }
1605
+ [data-theme="vs"] .git-section { border-color: #ddd; }
1606
+ [data-theme="vs"] .git-section-title { background: #ececec; color: #555; }
1607
+ [data-theme="vs"] .git-file-item:hover { background: #e3e3e3; }
1608
+ [data-theme="vs"] .git-file-name { color: #333; }
1609
+ [data-theme="vs"] .git-file-dir { color: #888; }
1610
+ [data-theme="vs"] .git-hint { color: #666; }
1611
+ [data-theme="vs"] .git-list::-webkit-scrollbar-thumb { background: #c0c0c0; }
1612
+
1613
+ /* ── Git panel — HC Dark ─────────────────────────────────── */
1614
+ [data-theme="hc-black"] .ide-git-right-panel { background: #000; border-color: #6fc3df; }
1615
+ [data-theme="hc-black"] .gitpanel-divider { background: #000; border-color: #6fc3df; }
1616
+ [data-theme="hc-black"] .ide-git-panel { background: #000; }
1617
+ [data-theme="hc-black"] .ide-git-panel-header { border-color: #6fc3df; }
1618
+ [data-theme="hc-black"] .ide-git-panel-title { color: #1aebff; }
1619
+ [data-theme="hc-black"] .ide-git-panel-branch { color: #fff; }
1620
+ [data-theme="hc-black"] .git-header-btn { color: #ccc; }
1621
+ [data-theme="hc-black"] .git-header-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
1622
+ [data-theme="hc-black"] .git-metadata { color: #ccc; border-color: #6fc3df; }
1623
+ [data-theme="hc-black"] .git-section { border-color: #6fc3df; }
1624
+ [data-theme="hc-black"] .git-section-title { background: #0c0c0c; color: #ccc; }
1625
+ [data-theme="hc-black"] .git-file-item:hover { background: #1a1a1a; outline: 1px solid #6fc3df; }
1626
+ [data-theme="hc-black"] .git-file-name { color: #fff; }
1627
+ [data-theme="hc-black"] .git-file-dir { color: #aaa; }
1628
+ [data-theme="hc-black"] .git-hint { color: #aaa; }
1629
+
1630
+ /* ── Git panel — HC Light ────────────────────────────────── */
1631
+ [data-theme="hc-light"] .ide-git-right-panel { background: #f8f8f8; border-color: #000; }
1632
+ [data-theme="hc-light"] .gitpanel-divider { background: #e0e0e0; border-color: #000; }
1633
+ [data-theme="hc-light"] .ide-git-panel { background: #f8f8f8; }
1634
+ [data-theme="hc-light"] .ide-git-panel-header { border-color: #000; }
1635
+ [data-theme="hc-light"] .ide-git-panel-title { color: #0000c5; font-weight: 700; }
1636
+ [data-theme="hc-light"] .ide-git-panel-branch { color: #000; font-weight: 700; }
1637
+ [data-theme="hc-light"] .git-header-btn { color: #000; }
1638
+ [data-theme="hc-light"] .git-header-btn:hover { background: rgba(0,0,0,0.08); outline: 1px solid #000; }
1639
+ [data-theme="hc-light"] .git-metadata { color: #000; border-color: #000; }
1640
+ [data-theme="hc-light"] .git-section { border-color: #000; }
1641
+ [data-theme="hc-light"] .git-section-title { background: #ebebeb; color: #000; font-weight: 700; }
1642
+ [data-theme="hc-light"] .git-file-item:hover { background: #ebebeb; outline: 1px solid #000; }
1643
+ [data-theme="hc-light"] .git-file-name { color: #000; }
1644
+ [data-theme="hc-light"] .git-file-dir { color: #444; }
1645
+ [data-theme="hc-light"] .git-hint { color: #444; }