@happy-nut/monacori 0.1.0 → 0.1.2

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.
@@ -0,0 +1,939 @@
1
+
2
+ :root {
3
+ color-scheme: dark;
4
+ --bg: #2b2b2b;
5
+ --panel: #2b2b2b;
6
+ --text: #a9b7c6;
7
+ --muted: #808080;
8
+ --border: #393b3d;
9
+ --line: #313335;
10
+ --add: #2f3d2c;
11
+ --del: #4b3434;
12
+ --add-strong: #3d5238;
13
+ --del-strong: #6b4242;
14
+ --active: #4a88c7;
15
+ --sidebar: #3c3f41;
16
+ --token-comment: #808080;
17
+ --token-keyword: #cc7832;
18
+ --token-string: #6a8759;
19
+ --token-number: #6897bb;
20
+ --token-literal: #cc7832;
21
+ --token-tag: #e8bf6a;
22
+ --d2h-bg-color: var(--panel);
23
+ --d2h-border-color: var(--border);
24
+ --d2h-dim-color: var(--muted);
25
+ --d2h-line-border-color: var(--border);
26
+ --d2h-file-header-bg-color: var(--line);
27
+ --d2h-file-header-border-color: var(--border);
28
+ --d2h-empty-placeholder-bg-color: var(--line);
29
+ --d2h-code-line-bg-color: var(--panel);
30
+ --d2h-code-line-color: var(--text);
31
+ --d2h-code-side-line-border-color: var(--border);
32
+ --d2h-del-bg-color: var(--del);
33
+ --d2h-ins-bg-color: var(--add);
34
+ --d2h-info-bg-color: var(--line);
35
+ --d2h-info-color: var(--muted);
36
+ }
37
+ * { box-sizing: border-box; }
38
+ html, body { margin: 0; min-height: 100%; }
39
+ /* Reserve the scrollbar gutter so collapsing/expanding a file does not shift the layout. */
40
+ html { scrollbar-gutter: stable; }
41
+ body {
42
+ display: grid;
43
+ grid-template-columns: var(--sidebar-width, 280px) minmax(0, 1fr);
44
+ background: var(--bg);
45
+ color: var(--text);
46
+ font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
47
+ }
48
+ .sidebar {
49
+ position: sticky;
50
+ top: 0;
51
+ height: 100vh;
52
+ display: flex;
53
+ flex-direction: column;
54
+ overflow: hidden;
55
+ border-right: 1px solid var(--border);
56
+ background: var(--sidebar);
57
+ }
58
+ .sidebar-scroll {
59
+ flex: 1 1 auto;
60
+ min-height: 0;
61
+ overflow: auto;
62
+ padding: 12px;
63
+ }
64
+ .sidebar-resizer {
65
+ position: fixed;
66
+ top: 0;
67
+ left: var(--sidebar-width, 280px);
68
+ width: 9px;
69
+ height: 100vh;
70
+ margin-left: -5px;
71
+ cursor: col-resize;
72
+ z-index: 30;
73
+ }
74
+ .sidebar-resizer::after {
75
+ content: "";
76
+ position: absolute;
77
+ inset: 0 4px;
78
+ background: transparent;
79
+ transition: background 120ms ease;
80
+ }
81
+ .sidebar-resizer:hover::after, .sidebar-resizer.resizing::after { background: var(--active); }
82
+ .visually-hidden {
83
+ position: absolute;
84
+ width: 1px;
85
+ height: 1px;
86
+ padding: 0;
87
+ margin: -1px;
88
+ overflow: hidden;
89
+ clip: rect(0, 0, 0, 0);
90
+ white-space: nowrap;
91
+ border: 0;
92
+ }
93
+ .live-status { color: var(--muted); }
94
+ .live-status.watching { color: var(--active); }
95
+ .sidebar-brand {
96
+ display: flex;
97
+ flex-direction: column;
98
+ gap: 2px;
99
+ margin-bottom: 12px;
100
+ padding-bottom: 10px;
101
+ border-bottom: 1px solid var(--border);
102
+ min-width: 0;
103
+ }
104
+ .sidebar-brand .brand-mark {
105
+ font-size: 11px;
106
+ letter-spacing: 0.12em;
107
+ text-transform: uppercase;
108
+ color: var(--muted);
109
+ }
110
+ .sidebar-brand .brand-project {
111
+ font-size: 14px;
112
+ font-weight: 600;
113
+ color: var(--text);
114
+ white-space: nowrap;
115
+ overflow: hidden;
116
+ text-overflow: ellipsis;
117
+ }
118
+ .tabs { display: none; }
119
+ .tab, .plain-button {
120
+ border: 1px solid var(--border);
121
+ border-radius: 6px;
122
+ padding: 6px 9px;
123
+ color: var(--text);
124
+ background: var(--panel);
125
+ font: 12px ui-sans-serif, system-ui, sans-serif;
126
+ cursor: pointer;
127
+ }
128
+ .tab.active, .plain-button:hover { border-color: var(--active); color: var(--active); }
129
+ .hidden { display: none !important; }
130
+ .sidebar-footer {
131
+ flex: 0 0 auto;
132
+ padding: 8px 12px;
133
+ display: flex;
134
+ align-items: center;
135
+ gap: 8px;
136
+ background: var(--sidebar);
137
+ border-top: 1px solid var(--border);
138
+ font-size: 11px;
139
+ color: var(--muted);
140
+ }
141
+ .sidebar-footer .app-version { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
142
+ .app-update-flag { color: var(--active); font-weight: 600; cursor: pointer; white-space: nowrap; }
143
+ .settings-btn {
144
+ margin-left: auto;
145
+ flex: none;
146
+ border: 1px solid transparent;
147
+ border-radius: 6px;
148
+ background: transparent;
149
+ color: var(--muted);
150
+ font-size: 14px;
151
+ line-height: 1;
152
+ padding: 3px 6px;
153
+ cursor: pointer;
154
+ }
155
+ .settings-btn:hover { color: var(--active); border-color: var(--border); }
156
+ .app-info {
157
+ position: fixed;
158
+ left: 12px;
159
+ bottom: 46px;
160
+ z-index: 60;
161
+ width: 320px;
162
+ max-width: calc(100vw - 24px);
163
+ max-height: calc(100vh - 64px);
164
+ overflow: auto;
165
+ padding: 12px;
166
+ border: 1px solid var(--border);
167
+ border-radius: 10px;
168
+ background: var(--panel);
169
+ box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
170
+ font-size: 12px;
171
+ color: var(--text);
172
+ }
173
+ .app-info-head { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
174
+ .app-info-head .app-info-ver { color: var(--muted); font-weight: 500; }
175
+ .app-info-status { color: var(--muted); margin-bottom: 10px; }
176
+ .app-info-status.has-update { color: var(--active); font-weight: 600; }
177
+ .app-info-cmd { display: flex; align-items: center; gap: 6px; }
178
+ .app-info-cmd code {
179
+ flex: 1 1 auto;
180
+ min-width: 0;
181
+ overflow: hidden;
182
+ text-overflow: ellipsis;
183
+ white-space: nowrap;
184
+ padding: 5px 8px;
185
+ border-radius: 6px;
186
+ background: var(--bg);
187
+ border: 1px solid var(--border);
188
+ font: 11px Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
189
+ color: var(--text);
190
+ }
191
+ .app-info-cmd .plain-button { padding: 5px 9px; font-size: 11px; }
192
+ .app-info-keys { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
193
+ .app-info-keys-h { font-weight: 600; color: var(--text); margin-bottom: 8px; }
194
+ .keys-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 10px; align-items: center; }
195
+ .keys-grid kbd {
196
+ justify-self: start;
197
+ font: 10px Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
198
+ background: var(--bg);
199
+ border: 1px solid var(--border);
200
+ border-radius: 4px;
201
+ padding: 2px 5px;
202
+ color: var(--text);
203
+ white-space: nowrap;
204
+ }
205
+ .keys-grid span { color: var(--muted); }
206
+ .diff2html-container { min-width: 0; caret-color: transparent; }
207
+ .mc-diff-cursor-row .d2h-code-side-line { box-shadow: inset 2px 0 0 color-mix(in srgb, var(--active) 70%, transparent); }
208
+ #diff2html-container[contenteditable] { outline: none; }
209
+ #diff2html-container [contenteditable="false"] { caret-color: transparent; }
210
+ .d2h-wrapper { background: transparent; color: var(--text); }
211
+ .d2h-file-wrapper {
212
+ margin: 0;
213
+ overflow: hidden;
214
+ border: 0;
215
+ border-radius: 0;
216
+ background: var(--panel);
217
+ }
218
+ /* The per-file header is merged into the sticky toolbar (path + status + Viewed) to save vertical space. */
219
+ .d2h-file-header { display: none; }
220
+ .diff-viewed-toggle {
221
+ display: inline-flex;
222
+ align-items: center;
223
+ gap: 6px;
224
+ flex: none;
225
+ padding: 3px 10px;
226
+ border: 1px solid var(--border);
227
+ border-radius: 999px;
228
+ color: var(--muted);
229
+ background: var(--panel);
230
+ font-size: 11px;
231
+ font-weight: 600;
232
+ line-height: 1;
233
+ cursor: pointer;
234
+ white-space: nowrap;
235
+ }
236
+ .diff-viewed-toggle[hidden] { display: none; }
237
+ .diff-viewed-toggle:hover { border-color: var(--active); color: var(--text); }
238
+ .diff-viewed-toggle::before {
239
+ content: "";
240
+ box-sizing: border-box;
241
+ width: 13px;
242
+ height: 13px;
243
+ border: 1px solid currentColor;
244
+ border-radius: 4px;
245
+ opacity: 0.75;
246
+ }
247
+ .diff-viewed-toggle.is-viewed {
248
+ color: #6ab04c;
249
+ border-color: color-mix(in srgb, #6ab04c 55%, transparent);
250
+ background: color-mix(in srgb, #6ab04c 16%, transparent);
251
+ }
252
+ .diff-viewed-toggle.is-viewed:hover { border-color: #6ab04c; color: #6ab04c; }
253
+ .diff-viewed-toggle.is-viewed::before {
254
+ content: "✓";
255
+ display: inline-flex;
256
+ align-items: center;
257
+ justify-content: center;
258
+ border-color: #6ab04c;
259
+ background: #6ab04c;
260
+ color: #fff;
261
+ font-size: 9px;
262
+ font-weight: 700;
263
+ opacity: 1;
264
+ }
265
+ .d2h-file-wrapper.file-viewed {
266
+ opacity: 0.68;
267
+ }
268
+ .d2h-file-wrapper.file-viewed:hover {
269
+ opacity: 1;
270
+ }
271
+ /* Marking a file viewed folds its diff down to just the header; toggle viewed again to reopen. */
272
+ .d2h-file-wrapper.file-viewed .d2h-files-diff { display: none; }
273
+ .d2h-file-name { color: var(--text); }
274
+ .d2h-icon { fill: var(--muted); }
275
+ .d2h-tag { border-color: var(--border); }
276
+ .d2h-files-diff { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
277
+ .d2h-file-side-diff { min-width: 0; width: 100%; overflow-x: auto; }
278
+ .d2h-file-side-diff:first-child { border-right: 1px solid var(--border); }
279
+ .d2h-code-wrapper { width: 100%; }
280
+ .d2h-diff-table {
281
+ width: 100%;
282
+ font: 12px Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
283
+ }
284
+ .d2h-diff-table td { line-height: 1.45; }
285
+ .d2h-code-side-linenumber, .d2h-code-linenumber {
286
+ width: 58px;
287
+ color: var(--muted);
288
+ /* diff2html absolutely-positions each line number; a distinct gutter background exposed the tiny
289
+ gaps between those boxes as horizontal "dividers", so keep the gutter transparent + borderless. */
290
+ background: transparent;
291
+ border: 0;
292
+ }
293
+ .d2h-code-side-line, .d2h-code-line {
294
+ /* left pad must exceed the 58px absolutely-positioned line-number, else the +/- prefix renders behind it and looks clipped */
295
+ padding: 0 0.6em 0 64px;
296
+ width: 100%;
297
+ color: var(--text);
298
+ cursor: text;
299
+ -webkit-user-select: text;
300
+ user-select: text;
301
+ }
302
+ .d2h-code-line-prefix { -webkit-user-select: none; user-select: none; }
303
+ .d2h-code-side-linenumber, .d2h-code-linenumber { -webkit-user-select: none; user-select: none; }
304
+ .d2h-code-line-ctn .hljs-keyword,
305
+ .d2h-code-line-ctn .hljs-built_in,
306
+ .d2h-code-line-ctn .hljs-literal,
307
+ .d2h-code-line-ctn .hljs-selector-tag,
308
+ .d2h-code-line-ctn .hljs-section { color: #cc7832; }
309
+ .d2h-code-line-ctn .hljs-string,
310
+ .d2h-code-line-ctn .hljs-regexp,
311
+ .d2h-code-line-ctn .hljs-char.escape_ { color: #6a8759; }
312
+ .d2h-code-line-ctn .hljs-number { color: #6897bb; }
313
+ .d2h-code-line-ctn .hljs-comment,
314
+ .d2h-code-line-ctn .hljs-quote { color: #808080; font-style: italic; }
315
+ .d2h-code-line-ctn .hljs-meta,
316
+ .d2h-code-line-ctn .hljs-doctag { color: #bbb529; }
317
+ .d2h-code-line-ctn .hljs-title,
318
+ .d2h-code-line-ctn .hljs-title.function_,
319
+ .d2h-code-line-ctn .hljs-function .hljs-title { color: #ffc66d; }
320
+ .d2h-code-line-ctn .hljs-title.class_,
321
+ .d2h-code-line-ctn .hljs-class .hljs-title,
322
+ .d2h-code-line-ctn .hljs-type { color: #a9b7c6; }
323
+ .d2h-code-line-ctn .hljs-attr,
324
+ .d2h-code-line-ctn .hljs-variable,
325
+ .d2h-code-line-ctn .hljs-template-variable,
326
+ .d2h-code-line-ctn .hljs-property { color: #9876aa; }
327
+ .d2h-code-line-ctn .hljs-attribute { color: #a9b7c6; }
328
+ .d2h-code-line-ctn .hljs-tag,
329
+ .d2h-code-line-ctn .hljs-name { color: #e8bf6a; }
330
+ .d2h-code-line-ctn .hljs-symbol,
331
+ .d2h-code-line-ctn .hljs-bullet,
332
+ .d2h-code-line-ctn .hljs-link { color: #6897bb; }
333
+ .d2h-code-line-ctn .hljs-emphasis { font-style: italic; }
334
+ .d2h-code-line-ctn .hljs-strong { font-weight: 700; }
335
+ .d2h-info { background: var(--line); color: var(--muted); border-color: var(--border); }
336
+ .d2h-info .d2h-code-side-line, .d2h-info .d2h-code-line { color: transparent; user-select: none; }
337
+ .d2h-info td, td.d2h-info { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
338
+ .d2h-file-wrapper.df-inactive { display: none; }
339
+ .d2h-del { background: var(--del); }
340
+ .d2h-ins { background: var(--add); }
341
+ .d2h-del .d2h-change { background: var(--del-strong); }
342
+ .d2h-ins .d2h-change { background: var(--add-strong); }
343
+ .d2h-code-line-ctn ins, .d2h-code-line-ctn del {
344
+ text-decoration: none;
345
+ border-radius: 2px;
346
+ padding: 0 1px;
347
+ box-decoration-break: clone;
348
+ -webkit-box-decoration-break: clone;
349
+ }
350
+ .d2h-code-line-ctn ins { background: var(--add-strong); }
351
+ .d2h-code-line-ctn del { background: var(--del-strong); }
352
+ .d2h-code-side-linenumber.d2h-del, .d2h-code-linenumber.d2h-del { background: var(--del); }
353
+ .d2h-code-side-linenumber.d2h-ins, .d2h-code-linenumber.d2h-ins { background: var(--add); }
354
+ .d2h-diff-table tr.hunk, .d2h-diff-table tr.hunk-peer { scroll-margin-top: 76px; }
355
+ .d2h-diff-table tr.hunk.active td, .d2h-diff-table tr.hunk-peer.active td {
356
+ box-shadow: none;
357
+ }
358
+ .d2h-diff-table tr.diff-active-row td { background: rgba(74, 136, 199, 0.16) !important; }
359
+ .d2h-diff-table tr.diff-active-row td.d2h-code-side-linenumber { box-shadow: inset 2px 0 0 var(--active); }
360
+ .review-status .ws-ignored { color: var(--token-tag); border: 1px solid color-mix(in srgb, var(--token-tag) 45%, transparent); border-radius: 999px; padding: 0 7px; }
361
+ .index-progress { display: inline-flex; width: 54px; height: 4px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 30%, transparent); overflow: hidden; vertical-align: middle; }
362
+ .index-progress.hidden { display: none; }
363
+ .index-progress-bar { width: 0; height: 100%; background: var(--active); border-radius: 999px; transition: width 0.18s ease; }
364
+ .d2h-file-collapse {
365
+ display: inline-flex;
366
+ align-items: center;
367
+ gap: 6px;
368
+ margin-left: 8px;
369
+ padding: 3px 10px;
370
+ border: 1px solid var(--border);
371
+ border-radius: 999px;
372
+ color: var(--muted);
373
+ background: var(--panel);
374
+ font-size: 11px;
375
+ font-weight: 600;
376
+ line-height: 1;
377
+ cursor: pointer;
378
+ user-select: none;
379
+ -webkit-user-select: none;
380
+ white-space: nowrap;
381
+ }
382
+ .d2h-file-collapse:hover { border-color: var(--active); color: var(--text); }
383
+ .d2h-file-collapse::before {
384
+ content: '';
385
+ box-sizing: border-box;
386
+ width: 13px;
387
+ height: 13px;
388
+ border: 1px solid currentColor;
389
+ border-radius: 4px;
390
+ opacity: 0.75;
391
+ }
392
+ .d2h-file-collapse-input { display: none; }
393
+ .d2h-file-wrapper.file-viewed .d2h-file-collapse {
394
+ color: #6ab04c;
395
+ border-color: color-mix(in srgb, #6ab04c 55%, transparent);
396
+ background: color-mix(in srgb, #6ab04c 16%, transparent);
397
+ }
398
+ .d2h-file-wrapper.file-viewed .d2h-file-collapse:hover { border-color: #6ab04c; color: #6ab04c; }
399
+ .d2h-file-wrapper.file-viewed .d2h-file-collapse::before {
400
+ content: '✓';
401
+ display: inline-flex;
402
+ align-items: center;
403
+ justify-content: center;
404
+ border-color: #6ab04c;
405
+ background: #6ab04c;
406
+ color: #fff;
407
+ font-size: 9px;
408
+ font-weight: 700;
409
+ opacity: 1;
410
+ }
411
+ .tree { display: grid; gap: 1px; font-size: 11.5px; font-family: Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
412
+ .tree-dir { display: grid; gap: 1px; }
413
+ .tree-dir summary {
414
+ display: grid;
415
+ grid-template-columns: 14px minmax(0, 1fr);
416
+ align-items: center;
417
+ gap: 4px;
418
+ min-height: 18px;
419
+ padding: 1px 5px 1px calc(7px + (var(--depth) * 14px));
420
+ color: var(--text);
421
+ border-radius: 6px;
422
+ cursor: default;
423
+ list-style: none;
424
+ }
425
+ .tree-dir summary::-webkit-details-marker { display: none; }
426
+ .tree-dir summary:hover { background: var(--bg); }
427
+ .tree-dir:not([open]) .folder-icon { transform: rotate(-90deg); }
428
+ .folder-icon {
429
+ display: inline-grid;
430
+ place-items: center;
431
+ font-size: 9px;
432
+ color: var(--muted);
433
+ transition: transform 120ms ease;
434
+ }
435
+ .file-link.tree-file { padding-left: calc(8px + (var(--depth) * 14px)); }
436
+ .tree-focus { box-shadow: inset 0 0 0 1px var(--active); border-radius: 6px; }
437
+ summary.tree-focus { background: var(--bg); }
438
+ .file-link {
439
+ display: grid;
440
+ grid-template-columns: auto minmax(0, 1fr) auto;
441
+ align-items: center;
442
+ gap: 6px;
443
+ min-height: 18px;
444
+ padding: 1px 6px;
445
+ color: var(--text);
446
+ text-decoration: none;
447
+ border-radius: 6px;
448
+ border: 1px solid transparent;
449
+ background: transparent;
450
+ width: 100%;
451
+ text-align: left;
452
+ font: inherit;
453
+ cursor: pointer;
454
+ }
455
+ .file-link:hover, .file-link.active { background: var(--bg); border-color: var(--border); }
456
+ .file-link.viewed { opacity: 0.58; }
457
+ .file-link.viewed:hover, .file-link.viewed.active { opacity: 1; }
458
+ .path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
459
+ .count { color: var(--muted); font-size: 11px; }
460
+ .change-name { display: flex; align-items: baseline; gap: 7px; min-width: 0; overflow: hidden; }
461
+ .change-dir { color: var(--muted); opacity: 0.5; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
462
+ .diffstat { display: flex; gap: 6px; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
463
+ .diffstat .adds { color: #6ab04c; }
464
+ .diffstat .dels { color: #cf6679; }
465
+ .status {
466
+ display: inline-flex;
467
+ align-items: center;
468
+ justify-content: center;
469
+ min-width: 16px;
470
+ height: 16px;
471
+ border-radius: 4px;
472
+ padding: 0 3px;
473
+ font-size: 9px;
474
+ font-weight: 700;
475
+ text-transform: uppercase;
476
+ background: var(--line);
477
+ color: var(--muted);
478
+ }
479
+ /* Viewed: dim the row and collapse the status chip into one green check (no stacked glyph). */
480
+ .file-link.viewed .status { font-size: 0; background: color-mix(in srgb, #6ab04c 24%, transparent); color: #6ab04c; }
481
+ .file-link.viewed .status::after { content: '✓'; font-size: 10px; font-weight: 700; line-height: 1; }
482
+ .status-added { background: var(--add); color: #1a7f37; }
483
+ .status-deleted { background: var(--del); color: #cf222e; }
484
+ .status-renamed { background: #fff8c5; color: #9a6700; }
485
+ .status-source { background: var(--line); color: var(--muted); }
486
+ .content { min-width: 0; padding: 0; }
487
+ .toolbar {
488
+ position: sticky;
489
+ top: 0;
490
+ z-index: 5;
491
+ display: flex;
492
+ justify-content: space-between;
493
+ align-items: center;
494
+ gap: 16px;
495
+ margin: 0;
496
+ padding: 10px 12px;
497
+ background: color-mix(in srgb, var(--bg) 88%, transparent);
498
+ backdrop-filter: blur(12px);
499
+ border-bottom: 1px solid var(--border);
500
+ }
501
+ h1 { margin: 0; font-size: 18px; }
502
+ .breadcrumb {
503
+ display: flex;
504
+ align-items: center;
505
+ gap: 5px;
506
+ min-width: 0;
507
+ flex: 1 1 auto;
508
+ overflow: hidden;
509
+ white-space: nowrap;
510
+ font: 13px Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
511
+ }
512
+ .crumb { color: var(--muted); }
513
+ .crumb-leaf { color: var(--text); font-weight: 500; }
514
+ .crumb-sep { color: var(--muted); opacity: 0.55; }
515
+ .review-status {
516
+ display: flex;
517
+ align-items: center;
518
+ gap: 12px;
519
+ min-width: 0;
520
+ color: var(--muted);
521
+ font-size: 12px;
522
+ }
523
+ .toolbar p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
524
+ .empty { padding: 24px; color: var(--muted); }
525
+ .source-viewer { min-height: 100vh; }
526
+ .source-toolbar { margin-bottom: 0; }
527
+ .source-file-meta {
528
+ display: flex;
529
+ flex: 1;
530
+ align-items: center;
531
+ gap: 12px;
532
+ min-width: 0;
533
+ color: var(--muted);
534
+ font-size: 12px;
535
+ }
536
+ .source-file-meta #source-title {
537
+ min-width: 0;
538
+ max-width: min(56vw, 720px);
539
+ overflow: hidden;
540
+ text-overflow: ellipsis;
541
+ white-space: nowrap;
542
+ color: var(--text);
543
+ font: 13px Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
544
+ }
545
+ .source-file-meta #source-meta {
546
+ overflow: hidden;
547
+ text-overflow: ellipsis;
548
+ white-space: nowrap;
549
+ }
550
+ .source-body {
551
+ border: 1px solid var(--border);
552
+ border-radius: 8px;
553
+ overflow: auto;
554
+ background: var(--panel);
555
+ user-select: text;
556
+ }
557
+ /* Empty state ("Select a file…") centered in the available space, not top-left. */
558
+ .source-body.empty {
559
+ display: flex;
560
+ align-items: center;
561
+ justify-content: center;
562
+ min-height: calc(100vh - 7rem);
563
+ font-size: 13px;
564
+ }
565
+ .source-table {
566
+ width: 100%;
567
+ border-collapse: collapse;
568
+ font: 12px Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
569
+ }
570
+ .source-table td {
571
+ vertical-align: top;
572
+ white-space: pre-wrap;
573
+ overflow-wrap: anywhere;
574
+ line-height: 1.45;
575
+ }
576
+ /* perf: let the browser skip layout/paint for off-screen rows in large files/diffs.
577
+ DOM is unchanged (nav, search, comment anchoring still query every row); degrades
578
+ gracefully where unsupported. contain-intrinsic-size keeps the scrollbar stable. */
579
+ .source-row { content-visibility: auto; contain-intrinsic-size: auto 19px; }
580
+ .d2h-diff-table tr { content-visibility: auto; contain-intrinsic-size: auto 18px; }
581
+ .source-row.search-hit .source-code { background: color-mix(in srgb, var(--active) 14%, transparent); }
582
+ .source-row.changed-line .source-code { background: color-mix(in srgb, var(--active) 9%, transparent); box-shadow: inset 2px 0 0 color-mix(in srgb, var(--active) 55%, transparent); }
583
+ .source-row.symbol-target .source-code {
584
+ background: color-mix(in srgb, var(--active) 18%, transparent);
585
+ }
586
+ .source-code {
587
+ padding: 2px 10px;
588
+ cursor: text;
589
+ user-select: text;
590
+ }
591
+ .code-cursor {
592
+ display: inline-block;
593
+ width: 2px;
594
+ height: 1.25em;
595
+ margin: -1px -1px;
596
+ background: #fff;
597
+ vertical-align: text-bottom;
598
+ pointer-events: none;
599
+ animation: cursor-blink 1.06s step-end infinite;
600
+ }
601
+ @keyframes cursor-blink {
602
+ 50% { opacity: 0; }
603
+ }
604
+ .num {
605
+ width: 58px;
606
+ user-select: none;
607
+ text-align: right;
608
+ color: var(--muted);
609
+ background: var(--line);
610
+ border-right: 1px solid var(--border);
611
+ padding: 2px 8px;
612
+ }
613
+ /* Review comments (questions / change-requests) — per-file sidebar count badges (no emoji) */
614
+ .change-row { grid-template-columns: auto auto minmax(0, 1fr) auto auto; }
615
+ .source-link { grid-template-columns: auto minmax(0, 1fr) auto; }
616
+ .file-link .ftype { width: 15px; height: 15px; flex: none; display: block; }
617
+ .source-link.not-embedded { opacity: 0.45; }
618
+ .source-link.not-embedded:hover { opacity: 0.72; }
619
+ .source-type-icon { display: inline-flex; align-items: center; flex: none; margin-right: 2px; }
620
+ .source-type-icon .ftype { width: 16px; height: 16px; display: block; }
621
+ .mc-file-badge { display: inline-flex; gap: 4px; align-items: center; }
622
+ .mc-fb { font-size: 10px; line-height: 1; padding: 1px 6px; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; border: 1px solid transparent; }
623
+ .mc-fb-q { color: var(--token-number); background: color-mix(in srgb, var(--token-number) 16%, transparent); border-color: color-mix(in srgb, var(--token-number) 38%, transparent); }
624
+ .mc-fb-c { color: var(--token-tag); background: color-mix(in srgb, var(--token-tag) 16%, transparent); border-color: color-mix(in srgb, var(--token-tag) 38%, transparent); }
625
+ /* Lines kept highlighted while composing a comment on a drag selection */
626
+ .mc-sel-line .d2h-code-side-line { background: color-mix(in srgb, var(--active) 20%, transparent); }
627
+ .source-row.mc-sel-line .source-code { background: color-mix(in srgb, var(--active) 20%, transparent); }
628
+ /* A comment box "selected" while navigating with arrows (caret hidden; Backspace deletes it) */
629
+ .mc-comment-row.mc-row-selected .mc-card { box-shadow: 0 0 0 2px var(--active); }
630
+ .mc-comment-row td { padding: 0; background: var(--bg); }
631
+ .mc-thread-cell { padding: 4px 12px 8px 64px; }
632
+ .source-table .mc-thread-cell { padding: 4px 12px 8px 66px; }
633
+ .mc-card {
634
+ border: 1px solid var(--border); border-left: 3px solid var(--muted);
635
+ border-radius: 6px; background: var(--panel); margin: 6px 0; max-width: 760px;
636
+ font: 12px/1.5 Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
637
+ }
638
+ .mc-card.mc-q { border-left-color: var(--token-number); }
639
+ .mc-card.mc-c { border-left-color: var(--token-tag); }
640
+ .mc-card-head { display: flex; align-items: center; gap: 8px; padding: 5px 9px; border-bottom: 1px solid var(--border); color: var(--muted); }
641
+ .mc-kind { font-weight: 650; color: var(--text); }
642
+ .mc-del { margin-left: auto; background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
643
+ .mc-del:hover { color: var(--del-strong); }
644
+ .mc-card-body { padding: 7px 10px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
645
+ .mc-input {
646
+ display: block; box-sizing: border-box; resize: vertical;
647
+ margin: 8px 10px; width: calc(100% - 20px); min-height: 56px;
648
+ background: var(--bg); color: var(--text);
649
+ border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px;
650
+ font: 12px/1.5 Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
651
+ }
652
+ .mc-input:focus { outline: none; border-color: var(--active); }
653
+ .mc-actions { display: flex; align-items: center; gap: 8px; padding: 0 10px 9px; }
654
+ .mc-btn { background: var(--active); color: #fff; border: 0; border-radius: 6px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
655
+ .mc-btn:hover { filter: brightness(1.1); }
656
+ .mc-btn.mc-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
657
+ .mc-hint { color: var(--muted); font-size: 11px; }
658
+ .mc-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: start center; padding-top: min(10vh, 80px); background: color-mix(in srgb, #000 32%, transparent); }
659
+ .mc-modal.hidden { display: none; }
660
+ .mc-modal-panel { width: min(900px, calc(100vw - 40px)); height: 80vh; max-height: 80vh; display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid var(--border); border-radius: 10px; background: var(--panel); overflow: hidden; }
661
+ .mc-modal-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text); font-weight: 650; }
662
+ .mc-modal-head span { margin-right: auto; }
663
+ .mc-modal-text { width: 100%; height: 100%; box-sizing: border-box; resize: none; border: 0; padding: 12px; background: var(--bg); color: var(--text); font: 12px/1.55 Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
664
+ .mc-modal-text:focus { outline: none; }
665
+ .tok-comment { color: var(--token-comment); font-style: italic; }
666
+ .tok-keyword { color: var(--token-keyword); font-weight: 650; }
667
+ .tok-string { color: var(--token-string); }
668
+ .tok-number { color: var(--token-number); }
669
+ .tok-literal { color: var(--token-literal); }
670
+ .tok-tag { color: var(--token-tag); font-weight: 650; }
671
+ .quick-open {
672
+ position: fixed;
673
+ inset: 0;
674
+ z-index: 50;
675
+ display: grid;
676
+ place-items: start center;
677
+ padding-top: min(12vh, 96px);
678
+ background: color-mix(in srgb, #000 24%, transparent);
679
+ }
680
+ .quick-open-panel {
681
+ width: min(720px, calc(100vw - 32px));
682
+ max-height: min(680px, calc(100vh - 64px));
683
+ display: grid;
684
+ grid-template-rows: auto auto minmax(0, 1fr);
685
+ border: 1px solid var(--border);
686
+ border-radius: 8px;
687
+ background: var(--panel);
688
+ box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
689
+ overflow: hidden;
690
+ }
691
+ .quick-open-title {
692
+ display: flex;
693
+ justify-content: space-between;
694
+ gap: 12px;
695
+ padding: 10px 12px;
696
+ border-bottom: 1px solid var(--border);
697
+ color: var(--muted);
698
+ font-size: 12px;
699
+ }
700
+ .quick-open-hint { font-family: Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
701
+ #quick-open-input {
702
+ width: 100%;
703
+ border: 0;
704
+ border-bottom: 1px solid var(--border);
705
+ outline: 0;
706
+ padding: 13px 14px;
707
+ background: var(--bg);
708
+ color: var(--text);
709
+ font: 15px Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
710
+ }
711
+ .quick-open-results { overflow: auto; padding: 6px; max-height: 232px; }
712
+ .usage-item { display: flex; align-items: baseline; gap: 10px; }
713
+ .usage-loc { flex: none; color: var(--active); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12px; }
714
+ .usage-code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font: 12px Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
715
+ .quick-open-main { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
716
+ .quick-open-path { flex: 1 1 auto; }
717
+ .quick-open-preview {
718
+ border-top: 1px solid var(--border);
719
+ max-height: 320px;
720
+ overflow: auto;
721
+ background: var(--bg);
722
+ }
723
+ .qp-head {
724
+ position: sticky;
725
+ top: 0;
726
+ padding: 5px 10px;
727
+ background: var(--panel);
728
+ border-bottom: 1px solid var(--border);
729
+ color: var(--muted);
730
+ font: 11px Monaco, ui-monospace, SFMono-Regular, Menlo, monospace;
731
+ }
732
+ .qp-body { padding: 4px 0; font: 12px Monaco, ui-monospace, SFMono-Regular, Menlo, monospace; }
733
+ .qp-line { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 6px; padding: 0 8px; white-space: pre; line-height: 1.5; }
734
+ .qp-num { color: var(--muted); text-align: right; user-select: none; }
735
+ .qp-hit { background: color-mix(in srgb, var(--active) 20%, transparent); }
736
+ .qp-empty { padding: 20px; color: var(--muted); }
737
+ .quick-open-item {
738
+ display: grid;
739
+ grid-template-columns: minmax(0, 1fr) auto;
740
+ gap: 8px;
741
+ width: 100%;
742
+ min-height: 24px;
743
+ border: 1px solid transparent;
744
+ border-radius: 5px;
745
+ padding: 2px 8px;
746
+ background: transparent;
747
+ color: var(--text);
748
+ text-align: left;
749
+ cursor: pointer;
750
+ }
751
+ .quick-open-item.active, .quick-open-item:hover { background: var(--bg); border-color: var(--active); }
752
+ .quick-open-main { min-width: 0; }
753
+ .quick-open-name {
754
+ display: block;
755
+ overflow: hidden;
756
+ text-overflow: ellipsis;
757
+ white-space: nowrap;
758
+ font: 13px Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
759
+ }
760
+ .quick-open-path {
761
+ display: block;
762
+ overflow: hidden;
763
+ text-overflow: ellipsis;
764
+ white-space: nowrap;
765
+ color: var(--muted);
766
+ font-size: 12px;
767
+ margin-top: 2px;
768
+ }
769
+ .quick-open-badge { align-self: center; color: var(--muted); font-size: 12px; }
770
+ .quick-open-empty { padding: 28px 14px; color: var(--muted); font-size: 13px; }
771
+ @media (max-width: 900px) {
772
+ body { grid-template-columns: 1fr; }
773
+ .sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
774
+ .content { padding: 16px; }
775
+ .toolbar { margin: -16px -16px 16px; padding: 12px 16px; }
776
+ .d2h-files-diff { grid-template-columns: 1fr; }
777
+ .d2h-file-side-diff:first-child { border-right: 0; border-bottom: 1px solid var(--border); }
778
+ }
779
+ .http-env-select {
780
+ margin-left: auto;
781
+ background: var(--panel);
782
+ color: var(--fg);
783
+ border: 1px solid var(--border);
784
+ border-radius: 6px;
785
+ padding: 3px 8px;
786
+ font-size: 12px;
787
+ }
788
+ .http-gutter { white-space: nowrap; }
789
+ .http-run {
790
+ display: inline-flex;
791
+ align-items: center;
792
+ justify-content: center;
793
+ width: 15px;
794
+ height: 15px;
795
+ margin-right: 4px;
796
+ padding: 0;
797
+ border: 0;
798
+ border-radius: 3px;
799
+ background: transparent;
800
+ color: #59a869;
801
+ font-size: 10px;
802
+ line-height: 1;
803
+ cursor: pointer;
804
+ vertical-align: middle;
805
+ }
806
+ .http-run:hover { background: color-mix(in srgb, #59a869 28%, transparent); color: #6cc17b; }
807
+ .http-request-line .source-code { font-weight: 600; }
808
+ .http-method { color: var(--token-keyword); font-weight: 700; }
809
+ .http-sep { color: var(--muted); }
810
+ .http-var { border-radius: 3px; padding: 0 1px; }
811
+ .http-var.known { color: var(--token-string); background: color-mix(in srgb, var(--token-string) 15%, transparent); }
812
+ .http-var.unknown { color: #e06c75; background: color-mix(in srgb, #e06c75 16%, transparent); text-decoration: underline dotted; }
813
+ .http-response-row td { padding: 0 14px 0 0; border: 0; background: transparent; }
814
+ .http-response {
815
+ margin: 6px 0 12px;
816
+ border: 1px solid var(--border);
817
+ border-radius: 8px;
818
+ background: color-mix(in srgb, var(--active) 5%, var(--panel));
819
+ overflow: hidden;
820
+ font-size: 12px;
821
+ }
822
+ .http-response.loading { padding: 10px 12px; color: var(--muted); font-style: italic; }
823
+ .http-resp-head {
824
+ display: flex;
825
+ align-items: center;
826
+ gap: 12px;
827
+ padding: 7px 12px;
828
+ border-bottom: 1px solid var(--border);
829
+ background: color-mix(in srgb, var(--active) 8%, transparent);
830
+ }
831
+ .http-status { font-weight: 700; }
832
+ .http-status.ok { color: #59a869; }
833
+ .http-status.warn { color: #d9a343; }
834
+ .http-status.bad { color: #e06c75; }
835
+ .http-resp-meta { color: var(--muted); }
836
+ .http-resp-toggle {
837
+ margin-left: auto;
838
+ background: transparent;
839
+ border: 1px solid var(--border);
840
+ border-radius: 6px;
841
+ color: var(--fg);
842
+ padding: 2px 8px;
843
+ font-size: 11px;
844
+ cursor: pointer;
845
+ }
846
+ .http-resp-toggle:hover { border-color: var(--active); color: var(--active); }
847
+ .http-resp-headers {
848
+ padding: 8px 12px;
849
+ border-bottom: 1px solid var(--border);
850
+ display: grid;
851
+ gap: 3px;
852
+ max-height: 180px;
853
+ overflow: auto;
854
+ }
855
+ .http-resp-headers.hidden { display: none; }
856
+ .http-h { display: flex; gap: 10px; }
857
+ .http-h-k { color: var(--token-keyword); min-width: 170px; flex-shrink: 0; }
858
+ .http-h-v { color: var(--fg); word-break: break-all; }
859
+ .http-resp-body {
860
+ margin: 0;
861
+ padding: 10px 12px;
862
+ max-height: 460px;
863
+ overflow: auto;
864
+ white-space: pre-wrap;
865
+ word-break: break-word;
866
+ font-size: 12px;
867
+ line-height: 1.55;
868
+ }
869
+ .http-resp-empty { color: var(--muted); font-style: italic; }
870
+
871
+ /* --- Image preview (raster images embedded as data URIs) --- */
872
+ .source-body.image-body { display: flex; align-items: flex-start; justify-content: center; padding: 24px; }
873
+ .image-view { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; }
874
+ .image-preview {
875
+ max-width: 100%;
876
+ max-height: calc(100vh - 230px);
877
+ object-fit: contain;
878
+ border: 1px solid var(--border);
879
+ border-radius: 6px;
880
+ background: repeating-conic-gradient(#3a3a3a 0% 25%, #2f2f2f 0% 50%) 50% / 20px 20px;
881
+ cursor: zoom-in;
882
+ }
883
+ .image-cap { color: var(--muted); font: 11px Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
884
+
885
+ /* --- Lightbox (click an image to zoom) --- */
886
+ .mc-lightbox {
887
+ position: fixed; inset: 0; z-index: 50;
888
+ display: flex; align-items: center; justify-content: center;
889
+ background: rgba(0, 0, 0, 0.82); cursor: zoom-out; padding: 32px;
890
+ }
891
+ .mc-lightbox.hidden { display: none; }
892
+ .mc-lightbox-img { max-width: 96vw; max-height: 94vh; object-fit: contain; box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6); }
893
+
894
+ /* --- Rendered markdown: a .source-table whose cells hold rendered HTML, so the line-number gutter
895
+ and per-line/-block comments keep working exactly as in the plain source view. --- */
896
+ .source-body.rendered-body { padding: 0; }
897
+ .md-doc .num { vertical-align: top; }
898
+ .md-doc .md-cell {
899
+ white-space: normal;
900
+ overflow-wrap: anywhere;
901
+ padding: 2px 24px 2px 14px;
902
+ color: var(--text);
903
+ font: 14px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
904
+ }
905
+ .md-cell > :first-child { margin-top: 0; }
906
+ .md-cell > :last-child { margin-bottom: 0; }
907
+ .md-h { line-height: 1.3; margin: 0.25em 0; font-weight: 650; color: #d7e0ea; }
908
+ .md-h1 { font-size: 1.7em; }
909
+ .md-h2 { font-size: 1.4em; }
910
+ .md-h3 { font-size: 1.18em; }
911
+ .md-h4 { font-size: 1.05em; }
912
+ .md-h5, .md-h6 { font-size: 0.95em; color: var(--muted); }
913
+ .md-p { margin: 0.2em 0; }
914
+ .md-cell a { color: var(--active); text-decoration: none; }
915
+ .md-cell a:hover { text-decoration: underline; }
916
+ .md-cell strong { color: #c9d4df; }
917
+ .md-cell del { color: var(--muted); }
918
+ .md-cell code {
919
+ font: 0.86em Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
920
+ background: var(--line); border: 1px solid var(--border); border-radius: 4px; padding: 0.1em 0.4em;
921
+ }
922
+ .md-code { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; overflow: auto; margin: 0.3em 0; }
923
+ .md-code code { font: 12px/1.5 Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: none; border: 0; padding: 0; white-space: pre; }
924
+ .md-quote { margin: 0.3em 0; padding: 2px 14px; color: var(--muted); border-left: 3px solid var(--border); }
925
+ .md-quote p { margin: 0.3em 0; }
926
+ .md-list { margin: 0.2em 0; padding-left: 1.5em; }
927
+ .md-list li { margin: 0.15em 0; }
928
+ .md-hr { border: 0; border-top: 1px solid var(--border); margin: 0.5em 0; }
929
+ .md-img { max-width: 100%; border-radius: 6px; }
930
+ .md-table { border-collapse: collapse; margin: 0.3em 0; font-size: 0.92em; }
931
+ .md-table th, .md-table td { border: 1px solid var(--border); padding: 5px 11px; text-align: left; }
932
+ .md-table thead th { background: var(--line); }
933
+
934
+ /* --- CSV/TSV: an aligned table that is still a .source-table (gutter + per-row comments). --- */
935
+ .csv-doc { width: auto; }
936
+ .csv-cell { border: 1px solid var(--border); padding: 3px 10px; text-align: left; white-space: pre; vertical-align: top; font: 12px Monaco, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
937
+ .csv-head .csv-cell { background: var(--line); color: #d7e0ea; font-weight: 650; }
938
+ .csv-row:nth-child(even) .csv-cell { background: rgba(255, 255, 255, 0.018); }
939
+ .csv-empty { color: var(--muted); font-style: italic; padding: 16px; }