dsh-remote-vs 0.26.0 → 0.28.0

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.
Files changed (75) hide show
  1. package/README.en.md +112 -28
  2. package/README.md +84 -25
  3. package/THIRD-PARTY-NOTICES.md +7 -2
  4. package/lib/client.js +1237 -254
  5. package/lib/index.js +821 -17
  6. package/lib/types/changes/recorder.d.ts +119 -2
  7. package/lib/types/client/CodeEditor.d.ts +29 -0
  8. package/lib/types/client/OutlinePanel.d.ts +22 -0
  9. package/lib/types/client/ProcessesSection.d.ts +19 -0
  10. package/lib/types/client/api.d.ts +22 -2
  11. package/lib/types/client/blame-model.d.ts +77 -0
  12. package/lib/types/client/changes/apply-failure.d.ts +41 -0
  13. package/lib/types/client/changes/block-confirm.d.ts +97 -0
  14. package/lib/types/client/changes/diff-outcome.d.ts +56 -0
  15. package/lib/types/client/changes/freshness.d.ts +51 -0
  16. package/lib/types/client/changes/model.d.ts +19 -1
  17. package/lib/types/client/changes/session-diff.d.ts +100 -0
  18. package/lib/types/client/changes/staleness.d.ts +98 -0
  19. package/lib/types/client/changes/turn-reverted.d.ts +82 -0
  20. package/lib/types/client/changes/turn-view.d.ts +131 -0
  21. package/lib/types/client/changes/undo-affordance.d.ts +44 -10
  22. package/lib/types/client/changes/undo-target.d.ts +12 -0
  23. package/lib/types/client/i18n.d.ts +1 -1
  24. package/lib/types/client/outline-model.d.ts +59 -0
  25. package/lib/types/client/scm/actions.d.ts +12 -1
  26. package/lib/types/client/store.d.ts +109 -1
  27. package/lib/types/client/vsc/blame.d.ts +19 -0
  28. package/lib/types/client/vsc/change-marks.d.ts +21 -0
  29. package/lib/types/client/vsc/kit.d.ts +0 -2
  30. package/lib/types/client/vsc/preview-document.d.ts +46 -0
  31. package/lib/types/client/vsc/preview-model.d.ts +31 -0
  32. package/lib/types/client/vsc/preview-services.d.ts +24 -0
  33. package/lib/types/git-ops.d.ts +18 -0
  34. package/lib/types/processes.d.ts +43 -0
  35. package/lib/types/protocol.d.ts +133 -1
  36. package/package.json +2 -1
  37. package/src/changes/recorder.ts +851 -8
  38. package/src/client/CodeEditor.tsx +86 -4
  39. package/src/client/EditorPane.tsx +581 -41
  40. package/src/client/MonitorView.tsx +16 -5
  41. package/src/client/OutlinePanel.tsx +287 -0
  42. package/src/client/ProcessesSection.tsx +292 -0
  43. package/src/client/api.ts +38 -3
  44. package/src/client/blame-model.ts +242 -0
  45. package/src/client/changes/ChangesDock.tsx +539 -54
  46. package/src/client/changes/apply-failure.ts +73 -0
  47. package/src/client/changes/block-confirm.ts +180 -0
  48. package/src/client/changes/changes.css +45 -0
  49. package/src/client/changes/diff-outcome.ts +97 -0
  50. package/src/client/changes/freshness.ts +68 -0
  51. package/src/client/changes/model.ts +56 -1
  52. package/src/client/changes/session-diff.ts +187 -0
  53. package/src/client/changes/staleness.ts +148 -0
  54. package/src/client/changes/turn-reverted.ts +254 -0
  55. package/src/client/changes/turn-view.ts +195 -0
  56. package/src/client/changes/undo-affordance.ts +295 -63
  57. package/src/client/changes/undo-target.ts +12 -0
  58. package/src/client/i18n.ts +294 -2
  59. package/src/client/index.tsx +4 -0
  60. package/src/client/outline-model.ts +775 -0
  61. package/src/client/scm/DiffView.tsx +32 -13
  62. package/src/client/scm/HistoryPanel.tsx +38 -1
  63. package/src/client/scm/actions.ts +55 -2
  64. package/src/client/store.tsx +446 -21
  65. package/src/client/vsc/blame.ts +147 -0
  66. package/src/client/vsc/change-marks.ts +21 -0
  67. package/src/client/vsc/kit.tsx +3 -11
  68. package/src/client/vsc/preview-document.tsx +326 -0
  69. package/src/client/vsc/preview-model.ts +216 -0
  70. package/src/client/vsc/preview-services.ts +118 -0
  71. package/src/client/vsc/vsc.css +965 -39
  72. package/src/git-ops.ts +34 -0
  73. package/src/processes.ts +177 -0
  74. package/src/protocol.ts +138 -1
  75. package/src/routes.ts +138 -9
@@ -1661,11 +1661,18 @@ body:not([data-ds-dark-theme]) .rvs-fi {
1661
1661
  .rvs-markdown hr { border: none; border-top: 1px solid var(--rvs-border); margin: 12px 0; }
1662
1662
 
1663
1663
  .rvs-html-frame {
1664
- flex: 1;
1664
+ flex: 1 1 auto;
1665
1665
  min-height: 0;
1666
1666
  width: 100%;
1667
1667
  border: none;
1668
- background: #fff;
1668
+ background: var(--rvs-code-bg);
1669
+ }
1670
+
1671
+ .rvs-preview-frame-wrap {
1672
+ display: flex;
1673
+ flex-direction: column;
1674
+ flex: 1 1 auto;
1675
+ min-height: 0;
1669
1676
  }
1670
1677
 
1671
1678
  /* ------------------------------------------------------------------ diff */
@@ -2401,78 +2408,211 @@ body:not([data-ds-dark-theme]) .rvs-edge .rvs-change-block-del {
2401
2408
  .rvs-change-nav-btn:active { background: var(--rvs-active); }
2402
2409
 
2403
2410
  /**
2404
- * 悬浮在改动行上出现的「撤销这处改动」按钮。
2411
+ * 悬浮在改动行上出现的那枚 `⋯`(以及它展开的菜单)。
2405
2412
  *
2406
- * 它**不在编辑器的 DOM 里**:`undo-affordance.ts` 把它当 `position: fixed` 的元素挂到
2407
- * `document.body`(和「添加到对话」那个浮层同一套做法),所以这里的选择器不带
2413
+ * 它们**不在编辑器的 DOM 里**:`undo-affordance.ts` 把它们当 `position: fixed` 的元素
2414
+ * 挂到 `document.body`(和「添加到对话」那个浮层同一套做法),所以这里的选择器不带
2408
2415
  * `.rvs-edge` —— 带上了就一条都不生效。固定定位 + 高 z-index 是刻意的:宿主容器有
2409
2416
  * `overflow: hidden`,挂在里面会被 CodeMirror 的滚动层裁掉。
2410
2417
  *
2411
- * 颜色按"危险动作"给:默认红边红字、悬停实心红。底色不透明(不用半透明的 overlay
2412
- * token),否则后面的代码文字会透出来。
2418
+ * 位置约束:`⋯` 的纵向中线锁在被悬停的那一行上,只做横向夹取。这样指针从行内水平
2419
+ * 移进按钮、再从按钮移进菜单,全程不经过别的 `.cm-line`(早先把整组按钮挪到行上方,
2420
+ * 指针必须路过上一行,一路过就整组收起,按钮永远点不到)。底色不透明(不用半透明的
2421
+ * overlay token),否则后面的代码文字会透出来。
2413
2422
  */
2414
- .rvs-undo-affordance {
2423
+ .rvs-change-actions {
2415
2424
  position: fixed;
2416
2425
  z-index: 2100;
2417
2426
  display: inline-flex;
2418
2427
  align-items: center;
2419
- gap: 4px;
2420
- max-width: 220px;
2421
- padding: 3px 9px;
2422
- border: 1px solid #f85149;
2428
+ justify-content: center;
2429
+ width: 22px;
2430
+ height: 20px;
2431
+ padding: 0;
2432
+ border: 1px solid #6e7681;
2423
2433
  border-radius: 6px;
2424
2434
  background-color: #1e2229;
2425
- color: #ffb4ae;
2435
+ color: #c9d1d9;
2426
2436
  /* 按钮挂在 body 上,没有 .rvs-edge 的字体上下文:跟随宿主页面字体。 */
2427
2437
  font-family: inherit;
2428
- font-size: 12px;
2429
- line-height: 1.5;
2430
- white-space: nowrap;
2438
+ font-size: 13px;
2439
+ line-height: 1;
2431
2440
  cursor: pointer;
2432
2441
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
2433
2442
  /* 纵向以悬停行的中线对齐(横向坐标由 JS 按行尾算好)。 */
2434
2443
  transform: translateY(-50%);
2435
2444
  }
2436
2445
 
2437
- .rvs-undo-affordance:hover {
2446
+ .rvs-change-actions:hover {
2447
+ background-color: #30363d;
2448
+ border-color: #8b949e;
2449
+ color: #ffffff;
2450
+ }
2451
+
2452
+ .rvs-change-actions:focus-visible {
2453
+ outline: 2px solid #ffb4ae;
2454
+ outline-offset: 2px;
2455
+ }
2456
+
2457
+ /* 展开态:按钮本身给一点底色,读得出"菜单是从它出来的"。 */
2458
+ .rvs-change-actions[aria-expanded="true"] {
2459
+ background-color: #30363d;
2460
+ border-color: #8b949e;
2461
+ color: #ffffff;
2462
+ }
2463
+
2464
+ body:not([data-ds-dark-theme]) .rvs-change-actions {
2465
+ border-color: #8c959f;
2466
+ background-color: #ffffff;
2467
+ color: #24292f;
2468
+ box-shadow: 0 6px 18px rgba(31, 35, 40, .18);
2469
+ }
2470
+
2471
+ body:not([data-ds-dark-theme]) .rvs-change-actions:hover,
2472
+ body:not([data-ds-dark-theme]) .rvs-change-actions[aria-expanded="true"] {
2473
+ background-color: #eaeef2;
2474
+ border-color: #6e7781;
2475
+ color: #24292f;
2476
+ }
2477
+
2478
+ body:not([data-ds-dark-theme]) .rvs-change-actions:focus-visible {
2479
+ outline-color: #cf222e;
2480
+ }
2481
+
2482
+ /**
2483
+ * `⋯` 展开的菜单:撤销这处改动 +(可选)确认保留。
2484
+ *
2485
+ * 一行一项,文字左对齐;撤销按"危险动作"给红边红字,确认保留按"安全的记账"给绿色,
2486
+ * 已确认态由 `aria-pressed` + `.is-on` 双重表达(不只靠颜色)。
2487
+ */
2488
+ .rvs-change-actions-menu {
2489
+ position: fixed;
2490
+ z-index: 2100;
2491
+ display: flex;
2492
+ flex-direction: column;
2493
+ min-width: 150px;
2494
+ max-width: 260px;
2495
+ padding: 4px;
2496
+ border: 1px solid #30363d;
2497
+ border-radius: 8px;
2498
+ background-color: #161b22;
2499
+ box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
2500
+ font-family: inherit;
2501
+ }
2502
+
2503
+ .rvs-change-actions-menu[hidden] {
2504
+ display: none;
2505
+ }
2506
+
2507
+ /**
2508
+ * 按钮与菜单之间的透明桥(复核 MUST)。
2509
+ *
2510
+ * 菜单与 `⋯` 在 JS 里是**零缝**相接的,但 `Math.round` 可能留下不足 1px 的缝,
2511
+ * 而按钮只有 20px 高、行高约 19px —— 任何缝都会落在下一行 `.cm-line` 的箱体上,
2512
+ * 指针从按钮移向菜单时经过它就会触发编辑器的 `mousemove`,整组浮层立刻收起,
2513
+ * 菜单项永远点不到。这条 8px 的透明区只覆盖按钮自身所在的区域(不覆盖下一行的
2514
+ * 可点击内容),把接缝兜住;方向由 JS 写的 `data-side` 决定。
2515
+ */
2516
+ .rvs-change-actions-menu::before {
2517
+ content: '';
2518
+ position: absolute;
2519
+ left: 0;
2520
+ right: 0;
2521
+ height: 8px;
2522
+ top: -8px;
2523
+ }
2524
+
2525
+ /* 菜单在按钮上方:桥向下搭,同样只盖住按钮那一侧。 */
2526
+ .rvs-change-actions-menu[data-side='above']::before {
2527
+ top: auto;
2528
+ bottom: -8px;
2529
+ }
2530
+
2531
+ .rvs-change-actions-menu button {
2532
+ display: block;
2533
+ width: 100%;
2534
+ padding: 5px 9px;
2535
+ border: 1px solid transparent;
2536
+ border-radius: 5px;
2537
+ background: none;
2538
+ color: #c9d1d9;
2539
+ font-family: inherit;
2540
+ font-size: 12px;
2541
+ line-height: 1.5;
2542
+ text-align: left;
2543
+ white-space: nowrap;
2544
+ overflow: hidden;
2545
+ text-overflow: ellipsis;
2546
+ cursor: pointer;
2547
+ }
2548
+
2549
+ .rvs-change-actions-menu button:hover,
2550
+ .rvs-change-actions-menu button:focus-visible {
2551
+ outline: none;
2552
+ background-color: #21262d;
2553
+ color: #ffffff;
2554
+ }
2555
+
2556
+ .rvs-change-actions-menu .rvs-change-actions-undo {
2557
+ color: #ffb4ae;
2558
+ }
2559
+
2560
+ .rvs-change-actions-menu .rvs-change-actions-undo:hover,
2561
+ .rvs-change-actions-menu .rvs-change-actions-undo:focus-visible {
2438
2562
  background-color: #f85149;
2439
- border-color: #f85149;
2440
2563
  /* Dark ink, not white: white on #f85149 is 3.35:1. */
2441
2564
  color: #1e2229;
2442
2565
  }
2443
2566
 
2444
- .rvs-undo-affordance:active {
2445
- transform: translateY(-50%) scale(.97);
2567
+ /* 删除锚点:这一行其实已经不在了,虚线边框把它和"真实存在的行"分开。 */
2568
+ .rvs-change-actions-menu .rvs-change-actions-undo[data-kind="del"] {
2569
+ border-style: dashed;
2446
2570
  }
2447
2571
 
2448
- .rvs-undo-affordance:focus-visible {
2449
- /* The pill hangs off <body>, where `--rvs-*` does not resolve, so its focus
2450
- ring comes from its own two-scheme pair: the pale ink of the dark pill
2451
- (9.4:1 on the code surface) and the deep red of the light pill (7.9:1). */
2452
- outline: 2px solid #ffb4ae;
2453
- outline-offset: 2px;
2572
+ .rvs-change-actions-menu .rvs-change-actions-confirm {
2573
+ color: #7ee787;
2454
2574
  }
2455
2575
 
2456
- /* 删除锚点:这一行其实已经不在了,虚线边框把它和"真实存在的行"分开。 */
2457
- .rvs-undo-affordance[data-kind="del"] {
2458
- border-style: dashed;
2576
+ .rvs-change-actions-menu .rvs-change-actions-confirm.is-on,
2577
+ .rvs-change-actions-menu .rvs-change-actions-confirm[aria-pressed="true"] {
2578
+ background-color: #238636;
2579
+ color: #ffffff;
2459
2580
  }
2460
2581
 
2461
- body:not([data-ds-dark-theme]) .rvs-undo-affordance {
2462
- border-color: #cf222e;
2582
+ body:not([data-ds-dark-theme]) .rvs-change-actions-menu {
2583
+ border-color: #d0d7de;
2463
2584
  background-color: #ffffff;
2585
+ box-shadow: 0 8px 24px rgba(31, 35, 40, .18);
2586
+ }
2587
+
2588
+ body:not([data-ds-dark-theme]) .rvs-change-actions-menu button {
2589
+ color: #24292f;
2590
+ }
2591
+
2592
+ body:not([data-ds-dark-theme]) .rvs-change-actions-menu button:hover,
2593
+ body:not([data-ds-dark-theme]) .rvs-change-actions-menu button:focus-visible {
2594
+ background-color: #f6f8fa;
2595
+ color: #24292f;
2596
+ }
2597
+
2598
+ body:not([data-ds-dark-theme]) .rvs-change-actions-menu .rvs-change-actions-undo {
2464
2599
  color: #a40e26;
2465
- box-shadow: 0 6px 18px rgba(31, 35, 40, .18);
2466
2600
  }
2467
2601
 
2468
- body:not([data-ds-dark-theme]) .rvs-undo-affordance:hover {
2602
+ body:not([data-ds-dark-theme]) .rvs-change-actions-menu .rvs-change-actions-undo:hover,
2603
+ body:not([data-ds-dark-theme]) .rvs-change-actions-menu .rvs-change-actions-undo:focus-visible {
2469
2604
  background-color: #cf222e;
2470
- border-color: #cf222e;
2471
- color: #fff;
2605
+ color: #ffffff;
2606
+ }
2607
+
2608
+ body:not([data-ds-dark-theme]) .rvs-change-actions-menu .rvs-change-actions-confirm {
2609
+ color: #116329;
2472
2610
  }
2473
2611
 
2474
- body:not([data-ds-dark-theme]) .rvs-undo-affordance:focus-visible {
2475
- outline-color: #a40e26;
2612
+ body:not([data-ds-dark-theme]) .rvs-change-actions-menu .rvs-change-actions-confirm.is-on,
2613
+ body:not([data-ds-dark-theme]) .rvs-change-actions-menu .rvs-change-actions-confirm[aria-pressed="true"] {
2614
+ background-color: #1a7f37;
2615
+ color: #ffffff;
2476
2616
  }
2477
2617
 
2478
2618
  /**
@@ -5088,14 +5228,32 @@ body[data-ds-dark-theme] .rvs-doctor {
5088
5228
  * tabular-nums so a 5 s refresh does not make the text dance.
5089
5229
  */
5090
5230
  .rvs-monitor-body {
5231
+ display: flex;
5232
+ flex-direction: column;
5091
5233
  flex: 1;
5092
5234
  min-height: 0;
5093
- overflow: auto;
5094
- padding: 8px 8px 14px;
5235
+ overflow: hidden;
5236
+ padding: 0;
5095
5237
  /* Container for the narrow-sidebar layout rules at the end of this section. */
5096
5238
  container-type: inline-size;
5097
5239
  }
5098
5240
 
5241
+ .rvs-monitor-content {
5242
+ display: flex;
5243
+ flex-direction: column;
5244
+ flex: 1 1 auto;
5245
+ min-height: 0;
5246
+ overflow: auto;
5247
+ padding: 8px 8px 4px;
5248
+ }
5249
+
5250
+ /* While the process section is open it owns the leftover height: the metrics
5251
+ keep their natural height (and scroll if they do not fit), so the process
5252
+ header sits directly under the cards instead of halfway down the pane. */
5253
+ .rvs-monitor-body:has(.rvs-proc.expanded) .rvs-monitor-content {
5254
+ flex: 0 1 auto;
5255
+ }
5256
+
5099
5257
  /* The rail title and the scope picker both wanted flex:1; the title yields so
5100
5258
  the picker keeps enough width for its own label at 230px. */
5101
5259
  .rvs-monitor-header .rvs-title {
@@ -5543,6 +5701,774 @@ body[data-ds-dark-theme] .rvs-doctor {
5543
5701
  }
5544
5702
  }
5545
5703
 
5704
+ /* === document previews =================================================== */
5705
+
5706
+ .rvs-preview-notice {
5707
+ display: flex;
5708
+ flex-direction: column;
5709
+ gap: 6px;
5710
+ max-width: 520px;
5711
+ margin: 24px auto;
5712
+ padding: 16px;
5713
+ border: 1px solid var(--rvs-border);
5714
+ border-radius: 6px;
5715
+ background: var(--rvs-code-bg);
5716
+ color: var(--rvs-fg);
5717
+ }
5718
+
5719
+ .rvs-preview-notice-title {
5720
+ font-weight: 600;
5721
+ }
5722
+
5723
+ .rvs-preview-notice-path {
5724
+ color: var(--rvs-fg);
5725
+ word-break: break-all;
5726
+ }
5727
+
5728
+ .rvs-preview-notice-hint {
5729
+ color: var(--rvs-fg3);
5730
+ }
5731
+
5732
+ .rvs-preview-notice-detail {
5733
+ color: var(--rvs-fg3);
5734
+ font-size: 11px;
5735
+ overflow-wrap: anywhere;
5736
+ }
5737
+
5738
+ .rvs-preview-retry {
5739
+ align-self: flex-start;
5740
+ padding: 3px 10px;
5741
+ border: 1px solid var(--rvs-border);
5742
+ border-radius: 3px;
5743
+ background: transparent;
5744
+ color: inherit;
5745
+ cursor: pointer;
5746
+ font: inherit;
5747
+ }
5748
+
5749
+ .rvs-preview-retry:hover {
5750
+ border-color: var(--rvs-accent);
5751
+ color: var(--rvs-accent);
5752
+ }
5753
+
5754
+ .rvs-preview-loading {
5755
+ display: flex;
5756
+ flex-direction: column;
5757
+ align-items: center;
5758
+ gap: 8px;
5759
+ padding: 24px;
5760
+ color: var(--rvs-fg3);
5761
+ }
5762
+
5763
+ .rvs-preview-loading-hint {
5764
+ color: var(--rvs-fg3);
5765
+ font-size: 11px;
5766
+ }
5767
+
5768
+ .rvs-preview-spinner {
5769
+ width: 12px;
5770
+ height: 12px;
5771
+ border: 2px solid var(--rvs-border);
5772
+ border-top-color: var(--rvs-accent);
5773
+ border-radius: 50%;
5774
+ animation: rvs-preview-spin 0.8s linear infinite;
5775
+ }
5776
+
5777
+ @keyframes rvs-preview-spin {
5778
+ to { transform: rotate(360deg); }
5779
+ }
5780
+
5781
+ @media (prefers-reduced-motion: reduce) {
5782
+ .rvs-preview-spinner {
5783
+ animation: none;
5784
+ border-top-color: var(--rvs-border2);
5785
+ }
5786
+ }
5787
+
5788
+ .rvs-preview-banner {
5789
+ padding: 4px 8px;
5790
+ border-bottom: 1px solid var(--rvs-border);
5791
+ background: var(--rvs-layer3);
5792
+ color: var(--rvs-fg2);
5793
+ font-size: 11px;
5794
+ }
5795
+
5796
+ .rvs-preview-document,
5797
+ .rvs-preview-media {
5798
+ display: flex;
5799
+ flex-direction: column;
5800
+ min-height: 0;
5801
+ height: 100%;
5802
+ }
5803
+
5804
+ .rvs-preview-document-frame {
5805
+ flex: 1 1 auto;
5806
+ width: 100%;
5807
+ min-height: 0;
5808
+ border: 0;
5809
+ background: var(--rvs-code-bg);
5810
+ }
5811
+
5812
+ .rvs-preview-document-meta,
5813
+ .rvs-preview-media-meta {
5814
+ display: flex;
5815
+ justify-content: space-between;
5816
+ gap: 12px;
5817
+ padding: 5px 10px;
5818
+ border-top: 1px solid var(--rvs-border);
5819
+ color: var(--rvs-fg3);
5820
+ font-size: 10.5px;
5821
+ }
5822
+
5823
+ .rvs-preview-document-hint,
5824
+ .rvs-preview-media-hint {
5825
+ overflow: hidden;
5826
+ text-overflow: ellipsis;
5827
+ white-space: nowrap;
5828
+ }
5829
+
5830
+ .rvs-preview-media {
5831
+ align-items: center;
5832
+ justify-content: center;
5833
+ gap: 12px;
5834
+ padding: 18px;
5835
+ }
5836
+
5837
+ .rvs-preview-media-el {
5838
+ max-width: 100%;
5839
+ max-height: 100%;
5840
+ }
5841
+
5842
+ .rvs-preview-media:not(.rvs-preview-media-video) .rvs-preview-media-el {
5843
+ width: min(520px, 100%);
5844
+ }
5845
+
5846
+ .rvs-preview-media-video .rvs-preview-media-el {
5847
+ background: #000;
5848
+ }
5849
+
5850
+ .rvs-preview-scroll,
5851
+ .rvs-preview-table-wrap {
5852
+ display: flex;
5853
+ flex-direction: column;
5854
+ min-height: 0;
5855
+ height: 100%;
5856
+ }
5857
+
5858
+ .rvs-preview-scroll {
5859
+ overflow: auto;
5860
+ padding: 14px 18px 24px;
5861
+ }
5862
+
5863
+ .rvs-preview-table-scroll {
5864
+ flex: 1 1 auto;
5865
+ overflow: auto;
5866
+ min-height: 0;
5867
+ }
5868
+
5869
+ .rvs-preview-markdown {
5870
+ min-width: 0;
5871
+ max-width: 900px;
5872
+ margin: 0 auto;
5873
+ font-size: 14px;
5874
+ line-height: 1.65;
5875
+ }
5876
+
5877
+ .rvs-preview-svg {
5878
+ display: flex;
5879
+ flex-direction: column;
5880
+ align-items: center;
5881
+ justify-content: center;
5882
+ min-height: 0;
5883
+ height: 100%;
5884
+ padding: 16px;
5885
+ overflow: auto;
5886
+ }
5887
+
5888
+ .rvs-preview-svg-img {
5889
+ max-width: 100%;
5890
+ max-height: 100%;
5891
+ object-fit: contain;
5892
+ }
5893
+
5894
+ .rvs-preview-svg-hint {
5895
+ margin-top: 8px;
5896
+ color: var(--rvs-fg3);
5897
+ font-size: 10.5px;
5898
+ }
5899
+
5900
+ .rvs-preview-table {
5901
+ border-collapse: collapse;
5902
+ font: 11px/1.5 var(--rvs-mono), monospace;
5903
+ white-space: nowrap;
5904
+ }
5905
+
5906
+ .rvs-preview-table th,
5907
+ .rvs-preview-table td {
5908
+ max-width: 420px;
5909
+ overflow: hidden;
5910
+ padding: 3px 8px;
5911
+ border: 1px solid var(--rvs-border);
5912
+ text-overflow: ellipsis;
5913
+ }
5914
+
5915
+ .rvs-preview-table thead th {
5916
+ position: sticky;
5917
+ top: 0;
5918
+ z-index: 1;
5919
+ background: var(--rvs-layer3);
5920
+ font-weight: 600;
5921
+ }
5922
+
5923
+ .rvs-preview-table .rvs-preview-rownum {
5924
+ position: sticky;
5925
+ left: 0;
5926
+ z-index: 1;
5927
+ min-width: 44px;
5928
+ color: var(--rvs-fg3);
5929
+ background: var(--rvs-code-bg);
5930
+ text-align: right;
5931
+ user-select: none;
5932
+ }
5933
+
5934
+ .rvs-preview-table thead .rvs-preview-rownum {
5935
+ z-index: 3;
5936
+ }
5937
+
5938
+ /* === inline blame + file history ========================================= */
5939
+
5940
+ .rvs-hbtn-on {
5941
+ background: var(--rvs-layer3);
5942
+ color: var(--rvs-accent);
5943
+ }
5944
+
5945
+ .rvs-glyph-text {
5946
+ font-size: 11px;
5947
+ font-weight: 700;
5948
+ line-height: 1;
5949
+ }
5950
+
5951
+ .rvs-blame-gutter {
5952
+ border-left: 1px solid var(--rvs-border);
5953
+ color: var(--rvs-fg3);
5954
+ }
5955
+
5956
+ .rvs-blame-gutter .cm-gutterElement {
5957
+ padding: 0;
5958
+ }
5959
+
5960
+ .rvs-blame-chip,
5961
+ .rvs-blame-cont,
5962
+ .rvs-blame-spacer {
5963
+ display: block;
5964
+ max-width: 124px;
5965
+ padding: 0 6px;
5966
+ overflow: hidden;
5967
+ font-size: 10px;
5968
+ line-height: inherit;
5969
+ text-overflow: ellipsis;
5970
+ white-space: nowrap;
5971
+ }
5972
+
5973
+ .rvs-blame-chip {
5974
+ cursor: pointer;
5975
+ }
5976
+
5977
+ .rvs-blame-chip:hover {
5978
+ color: var(--rvs-accent);
5979
+ text-decoration: underline;
5980
+ }
5981
+
5982
+ .rvs-blame-uncommitted {
5983
+ color: var(--rvs-fg3);
5984
+ opacity: 0.65;
5985
+ cursor: default;
5986
+ }
5987
+
5988
+ .rvs-blame-uncommitted:hover {
5989
+ color: var(--rvs-fg3);
5990
+ text-decoration: none;
5991
+ }
5992
+
5993
+ .rvs-blame-spacer {
5994
+ visibility: hidden;
5995
+ }
5996
+
5997
+ .rvs-file-history {
5998
+ position: absolute;
5999
+ z-index: 60;
6000
+ top: 82px;
6001
+ right: 10px;
6002
+ display: flex;
6003
+ flex-direction: column;
6004
+ width: min(380px, calc(100% - 20px));
6005
+ max-height: 55%;
6006
+ overflow: hidden;
6007
+ border: 1px solid var(--rvs-border);
6008
+ border-radius: 6px;
6009
+ /* Must be OPAQUE: this popover floats over the code, and a translucent (or
6010
+ undefined) token made the history rows unreadable in the screenshot. */
6011
+ background: var(--rvs-code-bg, var(--rvs-overlay, #24262e));
6012
+ box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
6013
+ color: var(--rvs-fg);
6014
+ }
6015
+
6016
+ .rvs-file-history-head {
6017
+ display: flex;
6018
+ align-items: center;
6019
+ gap: 6px;
6020
+ padding: 6px 8px;
6021
+ border-bottom: 1px solid var(--rvs-border);
6022
+ }
6023
+
6024
+ .rvs-file-history-title {
6025
+ flex: 0 0 auto;
6026
+ font-weight: 600;
6027
+ }
6028
+
6029
+ .rvs-file-history-path {
6030
+ flex: 1 1 auto;
6031
+ min-width: 0;
6032
+ overflow: hidden;
6033
+ color: var(--rvs-fg3);
6034
+ font-size: 10px;
6035
+ text-overflow: ellipsis;
6036
+ white-space: nowrap;
6037
+ }
6038
+
6039
+ .rvs-file-history-close {
6040
+ flex: 0 0 auto;
6041
+ display: inline-flex;
6042
+ align-items: center;
6043
+ justify-content: center;
6044
+ width: 18px;
6045
+ height: 18px;
6046
+ padding: 0;
6047
+ border: 0;
6048
+ border-radius: 3px;
6049
+ background: transparent;
6050
+ color: var(--rvs-fg3);
6051
+ cursor: pointer;
6052
+ }
6053
+
6054
+ .rvs-file-history-close:hover {
6055
+ background: var(--rvs-hover, var(--rvs-bg));
6056
+ color: var(--rvs-fg);
6057
+ }
6058
+
6059
+ .rvs-file-history-list {
6060
+ min-height: 0;
6061
+ overflow: auto;
6062
+ }
6063
+
6064
+ .rvs-file-history-row {
6065
+ display: grid;
6066
+ grid-template-columns: auto minmax(0, 1fr);
6067
+ gap: 2px 8px;
6068
+ width: 100%;
6069
+ padding: 5px 8px;
6070
+ border: 0;
6071
+ border-bottom: 1px solid var(--rvs-border-subtle, transparent);
6072
+ background: transparent;
6073
+ color: inherit;
6074
+ cursor: pointer;
6075
+ font: inherit;
6076
+ text-align: left;
6077
+ }
6078
+
6079
+ .rvs-file-history-row:hover {
6080
+ background: var(--rvs-hover, var(--rvs-bg));
6081
+ }
6082
+
6083
+ .rvs-file-history-hash {
6084
+ color: var(--rvs-fg3);
6085
+ font-family: var(--rvs-mono), monospace;
6086
+ font-size: 10px;
6087
+ }
6088
+
6089
+ .rvs-file-history-subject {
6090
+ min-width: 0;
6091
+ overflow: hidden;
6092
+ font-size: 11px;
6093
+ text-overflow: ellipsis;
6094
+ white-space: nowrap;
6095
+ }
6096
+
6097
+ .rvs-file-history-meta {
6098
+ grid-column: 2;
6099
+ color: var(--rvs-fg3);
6100
+ font-size: 10px;
6101
+ }
6102
+
6103
+ .rvs-file-history-note {
6104
+ padding: 10px;
6105
+ color: var(--rvs-fg3);
6106
+ font-size: 11px;
6107
+ }
6108
+
6109
+ .rvs-file-history-note.error {
6110
+ color: var(--rvs-danger-text);
6111
+ }
6112
+
6113
+ /* === 编辑器符号大纲(Ctrl+Shift+O) ======================================= */
6114
+
6115
+ /*
6116
+ * 浮层 portal 到 <body>,token 由 `.rvs-portal` 提供(见上方的 portal 变量块)。
6117
+ * 位置刻意「上方弹」而不是居中:它覆盖的是编辑器信息栏一带,背后的文件仍可辨认。
6118
+ */
6119
+ .rvs-outline-mask {
6120
+ position: fixed;
6121
+ inset: 0;
6122
+ /* 与其它模态层同一层;toast(100001)仍然压在它上面。 */
6123
+ z-index: 100000;
6124
+ display: flex;
6125
+ align-items: flex-start;
6126
+ justify-content: center;
6127
+ padding-top: 10vh;
6128
+ background: rgba(0, 0, 0, .38);
6129
+ backdrop-filter: blur(2px);
6130
+ animation: rvsFade .12s ease;
6131
+ }
6132
+
6133
+ /* 不透明底 + 皮肤 overlay:半透明 overlay 单独用会让下面的代码透上来。 */
6134
+ .rvs-outline {
6135
+ width: min(720px, calc(100vw - 40px));
6136
+ max-height: min(66vh, 620px);
6137
+ display: flex;
6138
+ flex-direction: column;
6139
+ border: 1px solid var(--rvs-border2);
6140
+ border-radius: 10px;
6141
+ background-color: Canvas;
6142
+ background-image: linear-gradient(var(--dsw-alias-bg-overlay, transparent), var(--dsw-alias-bg-overlay, transparent));
6143
+ color: var(--rvs-fg);
6144
+ box-shadow: 0 16px 48px rgba(0, 0, 0, .42);
6145
+ font-size: 12.5px;
6146
+ overflow: hidden;
6147
+ animation: rvsPop .12s ease;
6148
+ }
6149
+
6150
+ .rvs-outline-head {
6151
+ flex: none;
6152
+ display: flex;
6153
+ align-items: center;
6154
+ gap: 8px;
6155
+ padding: 8px 12px;
6156
+ border-bottom: 1px solid var(--rvs-border);
6157
+ }
6158
+
6159
+ .rvs-outline-title {
6160
+ font-weight: 600;
6161
+ }
6162
+
6163
+ .rvs-outline-path {
6164
+ flex: 1 1 auto;
6165
+ min-width: 0;
6166
+ overflow: hidden;
6167
+ text-overflow: ellipsis;
6168
+ white-space: nowrap;
6169
+ color: var(--rvs-fg3);
6170
+ font-family: var(--rvs-mono);
6171
+ font-size: 11px;
6172
+ }
6173
+
6174
+ .rvs-outline-close {
6175
+ flex: none;
6176
+ width: 20px;
6177
+ height: 20px;
6178
+ border: none;
6179
+ border-radius: 4px;
6180
+ background: transparent;
6181
+ color: var(--rvs-fg2);
6182
+ cursor: pointer;
6183
+ font-size: 14px;
6184
+ line-height: 1;
6185
+ }
6186
+
6187
+ .rvs-outline-close:hover {
6188
+ background: var(--rvs-hover);
6189
+ color: var(--rvs-fg);
6190
+ }
6191
+
6192
+ .rvs-outline-bar {
6193
+ flex: none;
6194
+ display: flex;
6195
+ align-items: center;
6196
+ gap: 10px;
6197
+ padding: 8px 12px;
6198
+ border-bottom: 1px solid var(--rvs-border);
6199
+ }
6200
+
6201
+ .rvs-outline-input {
6202
+ flex: 1 1 auto;
6203
+ min-width: 0;
6204
+ padding: 6px 8px;
6205
+ border: 1px solid var(--rvs-border);
6206
+ border-radius: 6px;
6207
+ background: var(--rvs-input);
6208
+ color: var(--rvs-fg);
6209
+ font-size: 12.5px;
6210
+ outline: none;
6211
+ }
6212
+
6213
+ .rvs-outline-input:focus {
6214
+ border-color: var(--rvs-brand);
6215
+ }
6216
+
6217
+ .rvs-outline-hint {
6218
+ flex: none;
6219
+ color: var(--rvs-fg3);
6220
+ font-size: 11px;
6221
+ white-space: nowrap;
6222
+ }
6223
+
6224
+ .rvs-outline-list {
6225
+ flex: 1 1 auto;
6226
+ min-height: 0;
6227
+ overflow: auto;
6228
+ padding: 4px 0;
6229
+ }
6230
+
6231
+ .rvs-outline-row {
6232
+ display: flex;
6233
+ align-items: center;
6234
+ gap: 8px;
6235
+ padding: 3px 12px;
6236
+ cursor: pointer;
6237
+ }
6238
+
6239
+ .rvs-outline-row:hover {
6240
+ background: var(--rvs-hover);
6241
+ }
6242
+
6243
+ .rvs-outline-row.active {
6244
+ background: var(--rvs-active);
6245
+ }
6246
+
6247
+ .rvs-outline-kind {
6248
+ flex: none;
6249
+ width: 58px;
6250
+ color: var(--rvs-fg3);
6251
+ font-size: 10.5px;
6252
+ letter-spacing: .02em;
6253
+ text-transform: uppercase;
6254
+ }
6255
+
6256
+ .rvs-outline-name {
6257
+ flex: 1 1 auto;
6258
+ min-width: 0;
6259
+ overflow: hidden;
6260
+ text-overflow: ellipsis;
6261
+ white-space: nowrap;
6262
+ font-family: var(--rvs-mono);
6263
+ }
6264
+
6265
+ /* `mark` 的浏览器默认底色(黄)在明暗两套主题里都与代码底色冲突:只保留品牌色
6266
+ 文字 + 下划线,让高亮可读又不制造第三种底色。 */
6267
+ .rvs-outline-hit {
6268
+ background: transparent;
6269
+ color: var(--rvs-brand);
6270
+ text-decoration: underline;
6271
+ }
6272
+
6273
+ .rvs-outline-line {
6274
+ flex: none;
6275
+ color: var(--rvs-fg3);
6276
+ font-family: var(--rvs-mono);
6277
+ font-size: 11px;
6278
+ font-variant-numeric: tabular-nums;
6279
+ }
6280
+
6281
+ .rvs-outline-foot {
6282
+ flex: none;
6283
+ display: flex;
6284
+ flex-wrap: wrap;
6285
+ gap: 4px 12px;
6286
+ padding: 6px 12px;
6287
+ border-top: 1px solid var(--rvs-border);
6288
+ }
6289
+
6290
+ .rvs-outline-note {
6291
+ color: var(--rvs-fg3);
6292
+ font-size: 11px;
6293
+ }
6294
+
6295
+ /* 「猜的」「截断」是常驻警告:没有 warning 色 token(`--rvs-git-m` 只在 quick
6296
+ open 的 portal 子集里声明),改用更亮的前景 + 加粗,明暗两套都成立。 */
6297
+ .rvs-outline-note.warn {
6298
+ color: var(--rvs-fg2);
6299
+ font-weight: 600;
6300
+ }
6301
+
6302
+ /* === remote process section (monitor page) ================================ */
6303
+
6304
+ .rvs-proc {
6305
+ flex: 0 0 auto;
6306
+ border-top: 1px solid var(--rvs-editor-chrome-border, var(--rvs-border));
6307
+ background: var(--rvs-layer3);
6308
+ container-type: inline-size;
6309
+ }
6310
+
6311
+ .rvs-proc.expanded {
6312
+ display: flex;
6313
+ /* `basis:0` is what keeps a 500-row table from claiming its intrinsic
6314
+ height: the section gets only the space left after the metrics' natural
6315
+ height, and the table scrolls inside it. */
6316
+ flex: 1 1 0;
6317
+ flex-direction: column;
6318
+ min-height: 150px;
6319
+ }
6320
+
6321
+ .rvs-proc-head {
6322
+ display: flex;
6323
+ align-items: center;
6324
+ gap: 4px;
6325
+ padding: 4px 8px;
6326
+ min-height: 26px;
6327
+ }
6328
+
6329
+ .rvs-proc-toggle {
6330
+ display: inline-flex;
6331
+ align-items: center;
6332
+ justify-content: center;
6333
+ width: 18px;
6334
+ height: 18px;
6335
+ padding: 0;
6336
+ border: 0;
6337
+ background: transparent;
6338
+ color: var(--rvs-fg2);
6339
+ cursor: pointer;
6340
+ }
6341
+
6342
+ .rvs-proc-title {
6343
+ flex: 0 0 auto;
6344
+ font-weight: 600;
6345
+ font-size: 11px;
6346
+ }
6347
+
6348
+ .rvs-proc-host,
6349
+ .rvs-proc-sort {
6350
+ max-width: 110px;
6351
+ height: 20px;
6352
+ font-size: 10px;
6353
+ }
6354
+
6355
+ .rvs-proc-host-label {
6356
+ color: var(--rvs-fg3);
6357
+ font-size: 10px;
6358
+ white-space: nowrap;
6359
+ }
6360
+
6361
+ .rvs-proc-filter {
6362
+ flex: 1 1 auto;
6363
+ min-width: 40px;
6364
+ height: 20px;
6365
+ font-size: 10px;
6366
+ }
6367
+
6368
+ .rvs-proc-banner {
6369
+ margin: 0 8px 4px;
6370
+ }
6371
+
6372
+ .rvs-proc-collapsed {
6373
+ padding: 0 8px 5px;
6374
+ color: var(--rvs-fg3);
6375
+ font-size: 10px;
6376
+ }
6377
+
6378
+ .rvs-proc-table {
6379
+ flex: 1 1 auto;
6380
+ min-height: 0;
6381
+ max-height: none;
6382
+ overflow: auto;
6383
+ scrollbar-width: thin;
6384
+ font-family: var(--rvs-mono), monospace;
6385
+ font-size: 10px;
6386
+ }
6387
+
6388
+ .rvs-proc-row {
6389
+ display: grid;
6390
+ grid-template-columns: 52px 52px 56px 42px 42px 52px minmax(40px, 1fr) 44px;
6391
+ gap: 4px;
6392
+ align-items: center;
6393
+ min-height: 20px;
6394
+ padding: 1px 8px;
6395
+ border-bottom: 1px solid var(--rvs-border);
6396
+ }
6397
+
6398
+ .rvs-proc-row:hover {
6399
+ background: var(--rvs-hover);
6400
+ }
6401
+
6402
+ .rvs-proc-row-head {
6403
+ position: sticky;
6404
+ top: 0;
6405
+ z-index: 1;
6406
+ color: var(--rvs-fg3);
6407
+ background: var(--rvs-layer3);
6408
+ }
6409
+
6410
+ .rvs-proc-pid,
6411
+ .rvs-proc-user,
6412
+ .rvs-proc-elapsed,
6413
+ .rvs-proc-num {
6414
+ overflow: hidden;
6415
+ text-overflow: ellipsis;
6416
+ white-space: nowrap;
6417
+ }
6418
+
6419
+ .rvs-proc-num {
6420
+ text-align: right;
6421
+ }
6422
+
6423
+ .rvs-proc-command {
6424
+ overflow: hidden;
6425
+ text-overflow: ellipsis;
6426
+ white-space: nowrap;
6427
+ }
6428
+
6429
+ .rvs-proc-kill {
6430
+ height: 17px;
6431
+ padding: 0 4px;
6432
+ border: 1px solid var(--rvs-border);
6433
+ border-radius: 3px;
6434
+ background: transparent;
6435
+ color: var(--rvs-fg3);
6436
+ cursor: pointer;
6437
+ font: inherit;
6438
+ font-size: 9px;
6439
+ }
6440
+
6441
+ .rvs-proc-kill:hover:not(:disabled) {
6442
+ border-color: var(--rvs-danger-text);
6443
+ color: var(--rvs-danger-text);
6444
+ }
6445
+
6446
+ .rvs-proc-kill.danger {
6447
+ border-color: var(--rvs-danger-text);
6448
+ color: var(--rvs-danger-text);
6449
+ font-weight: 600;
6450
+ }
6451
+
6452
+ .rvs-proc-kill:disabled {
6453
+ opacity: 0.5;
6454
+ cursor: default;
6455
+ }
6456
+
6457
+ @container (max-width: 330px) {
6458
+ .rvs-proc-row {
6459
+ grid-template-columns: 44px 44px minmax(30px, 1fr) 40px;
6460
+ }
6461
+
6462
+ /* USER/CPU/MEM/ELAPSED are the least useful columns in a 230px rail; keep
6463
+ PID/PPID/COMMAND and the Kill button reachable without scrolling. */
6464
+ .rvs-proc-row > :nth-child(3),
6465
+ .rvs-proc-row > :nth-child(4),
6466
+ .rvs-proc-row > :nth-child(5),
6467
+ .rvs-proc-row > :nth-child(6) {
6468
+ display: none;
6469
+ }
6470
+ }
6471
+
5546
6472
  /* ------------------------------------------------------ Ctrl+P quick open */
5547
6473
 
5548
6474
  .rvs-qo-mask {