finch-file-browser 0.1.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.
package/dist/panel.css ADDED
@@ -0,0 +1,498 @@
1
+ :root {
2
+ --fb-bg-root: var(--finch-bg-root, #ffffff);
3
+ --fb-bg-main: var(--finch-bg-main, #ffffff);
4
+ --fb-bg-elevated: var(--finch-bg-elevated, #f6f6f7);
5
+ --fb-bg-hover: var(--finch-bg-hover, rgba(0, 0, 0, 0.05));
6
+ --fb-bg-active: var(--finch-bg-active, rgba(0, 0, 0, 0.08));
7
+ --fb-text-1: var(--finch-text-primary, #18181b);
8
+ --fb-text-2: var(--finch-text-secondary, #52525b);
9
+ --fb-text-3: var(--finch-text-tertiary, #8b8b93);
10
+ --fb-accent: var(--finch-accent, #3b82f6);
11
+ --fb-accent-dim: var(--finch-accent-dim, rgba(59, 130, 246, 0.16));
12
+ --fb-border: var(--finch-border, rgba(0, 0, 0, 0.1));
13
+ --fb-border-subtle: var(--finch-border-subtle, rgba(0, 0, 0, 0.06));
14
+ --fb-positive: var(--finch-positive, #16a34a);
15
+ --fb-warning: var(--finch-warning, #d97706);
16
+ --fb-danger: var(--finch-danger, #dc2626);
17
+ --fb-radius: var(--finch-radius-md, 8px);
18
+ --fb-mono: var(--finch-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
19
+ --fb-sans: var(--finch-font-body, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif);
20
+ --fb-fs: var(--finch-message-font-size, 13px);
21
+ --fb-code-fs: var(--finch-code-font-size, 12px);
22
+ }
23
+
24
+ @media (prefers-color-scheme: dark) {
25
+ :root {
26
+ --fb-bg-root: var(--finch-bg-root, #18181b);
27
+ --fb-bg-main: var(--finch-bg-main, #1c1c1f);
28
+ --fb-bg-elevated: var(--finch-bg-elevated, #232327);
29
+ --fb-bg-hover: var(--finch-bg-hover, rgba(255, 255, 255, 0.06));
30
+ --fb-bg-active: var(--finch-bg-active, rgba(255, 255, 255, 0.1));
31
+ --fb-text-1: var(--finch-text-primary, #ededf0);
32
+ --fb-text-2: var(--finch-text-secondary, #a1a1aa);
33
+ --fb-text-3: var(--finch-text-tertiary, #71717a);
34
+ --fb-border: var(--finch-border, rgba(255, 255, 255, 0.12));
35
+ --fb-border-subtle: var(--finch-border-subtle, rgba(255, 255, 255, 0.07));
36
+ }
37
+ }
38
+
39
+ * { box-sizing: border-box; }
40
+
41
+ [hidden] { display: none !important; }
42
+
43
+ html, body {
44
+ margin: 0;
45
+ height: 100%;
46
+ overflow: hidden;
47
+ background: var(--fb-bg-root);
48
+ color: var(--fb-text-1);
49
+ font-family: var(--fb-sans);
50
+ font-size: var(--fb-fs);
51
+ -webkit-font-smoothing: antialiased;
52
+ }
53
+
54
+ .app { display: flex; flex-direction: column; height: 100%; }
55
+
56
+ /* ── top bar ─────────────────────────────────────────────────────────────── */
57
+
58
+ .topbar {
59
+ display: flex;
60
+ align-items: center;
61
+ gap: 10px;
62
+ padding: 6px 10px;
63
+ min-height: 42px;
64
+ border-bottom: 1px solid var(--fb-border-subtle);
65
+ background: var(--fb-bg-main);
66
+ flex: none;
67
+ }
68
+
69
+ .crumb {
70
+ display: flex;
71
+ align-items: center;
72
+ gap: 4px;
73
+ min-width: 0;
74
+ flex: 1;
75
+ font-family: var(--fb-mono);
76
+ font-size: calc(var(--fb-fs) - 1px);
77
+ color: var(--fb-text-2);
78
+ overflow: hidden;
79
+ white-space: nowrap;
80
+ }
81
+
82
+ .crumb .seg-item { overflow: hidden; text-overflow: ellipsis; }
83
+ .crumb .sep { color: var(--fb-text-3); opacity: 0.6; }
84
+ .crumb .here { color: var(--fb-text-1); font-weight: 600; }
85
+ .crumb .dirty { color: var(--fb-warning); }
86
+
87
+ .topbar-actions { display: flex; align-items: center; gap: 6px; flex: none; }
88
+
89
+ .seg {
90
+ display: inline-flex;
91
+ border: 1px solid var(--fb-border);
92
+ border-radius: var(--fb-radius);
93
+ overflow: hidden;
94
+ }
95
+ .seg button {
96
+ appearance: none;
97
+ border: 0;
98
+ background: transparent;
99
+ color: var(--fb-text-2);
100
+ font: inherit;
101
+ font-size: calc(var(--fb-fs) - 1px);
102
+ padding: 3px 9px;
103
+ cursor: pointer;
104
+ }
105
+ .seg button + button { border-left: 1px solid var(--fb-border); }
106
+ .seg button.on { background: var(--fb-bg-active); color: var(--fb-text-1); font-weight: 600; }
107
+
108
+ .btn {
109
+ appearance: none;
110
+ border: 1px solid var(--fb-border);
111
+ background: var(--fb-bg-elevated);
112
+ color: var(--fb-text-1);
113
+ font: inherit;
114
+ font-size: calc(var(--fb-fs) - 1px);
115
+ padding: 4px 10px;
116
+ border-radius: var(--fb-radius);
117
+ cursor: pointer;
118
+ white-space: nowrap;
119
+ }
120
+ .btn:hover:not(:disabled) { background: var(--fb-bg-hover); }
121
+ .btn:disabled { opacity: 0.42; cursor: default; }
122
+ .btn.primary { background: var(--fb-accent); border-color: transparent; color: #fff; font-weight: 600; }
123
+ .btn.primary:disabled { background: var(--fb-accent); }
124
+
125
+ /* ── body ────────────────────────────────────────────────────────────────── */
126
+
127
+ .body { display: flex; flex: 1; min-height: 0; }
128
+
129
+ .viewer {
130
+ position: relative;
131
+ flex: 1 1 auto;
132
+ min-width: 0;
133
+ display: flex;
134
+ flex-direction: column;
135
+ background: var(--fb-bg-main);
136
+ }
137
+
138
+ .splitter {
139
+ flex: none;
140
+ width: 5px;
141
+ cursor: col-resize;
142
+ background: transparent;
143
+ position: relative;
144
+ }
145
+ .splitter::after {
146
+ content: "";
147
+ position: absolute;
148
+ inset: 0 2px;
149
+ background: var(--fb-border-subtle);
150
+ }
151
+ .splitter:hover::after, .splitter.dragging::after { background: var(--fb-accent); }
152
+
153
+ .sidebar {
154
+ flex: none;
155
+ width: 280px;
156
+ min-width: 180px;
157
+ max-width: 70%;
158
+ display: flex;
159
+ flex-direction: column;
160
+ background: var(--fb-bg-elevated);
161
+ border-left: 1px solid var(--fb-border-subtle);
162
+ }
163
+
164
+ /* ── viewer content ──────────────────────────────────────────────────────── */
165
+
166
+ .empty {
167
+ margin: auto;
168
+ text-align: center;
169
+ color: var(--fb-text-3);
170
+ padding: 24px;
171
+ }
172
+ .empty-title { font-size: calc(var(--fb-fs) + 1px); color: var(--fb-text-2); margin-bottom: 6px; }
173
+ .empty-sub { font-size: calc(var(--fb-fs) - 1px); }
174
+
175
+ .preview {
176
+ flex: 1;
177
+ overflow: auto;
178
+ padding: 20px 26px 60px;
179
+ line-height: var(--finch-message-line-height, 1.65);
180
+ }
181
+ .preview.hidden, .editor-wrap[hidden], .media[hidden], .preview[hidden] { display: none; }
182
+
183
+ .editor-wrap { flex: 1; min-height: 0; display: flex; }
184
+ #editor {
185
+ flex: 1;
186
+ border: 0;
187
+ outline: none;
188
+ resize: none;
189
+ padding: 16px 20px 60px;
190
+ background: var(--fb-bg-main);
191
+ color: var(--fb-text-1);
192
+ font-family: var(--fb-mono);
193
+ font-size: var(--fb-code-fs);
194
+ line-height: var(--finch-code-line-height, 1.6);
195
+ tab-size: 2;
196
+ white-space: pre;
197
+ overflow: auto;
198
+ }
199
+
200
+ .media {
201
+ flex: 1;
202
+ overflow: auto;
203
+ display: flex;
204
+ align-items: center;
205
+ justify-content: center;
206
+ padding: 20px;
207
+ background:
208
+ linear-gradient(45deg, var(--fb-border-subtle) 25%, transparent 25%) 0 0/16px 16px,
209
+ linear-gradient(-45deg, var(--fb-border-subtle) 25%, transparent 25%) 0 8px/16px 16px;
210
+ }
211
+ .media img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
212
+
213
+ .binary-card {
214
+ margin: auto;
215
+ text-align: center;
216
+ padding: 26px 30px;
217
+ border: 1px dashed var(--fb-border);
218
+ border-radius: 12px;
219
+ color: var(--fb-text-2);
220
+ background: var(--fb-bg-main);
221
+ }
222
+ .binary-card .name { font-family: var(--fb-mono); color: var(--fb-text-1); margin-bottom: 6px; word-break: break-all; }
223
+ .binary-card .meta { font-size: calc(var(--fb-fs) - 1px); color: var(--fb-text-3); margin-bottom: 14px; }
224
+
225
+ /* ── markdown ────────────────────────────────────────────────────────────── */
226
+
227
+ .markdown-body { font-size: var(--fb-fs); }
228
+ .markdown-body > *:first-child { margin-top: 0; }
229
+ .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
230
+ margin: 1.5em 0 0.6em;
231
+ line-height: 1.3;
232
+ font-weight: 650;
233
+ }
234
+ .markdown-body h1 { font-size: 1.55em; padding-bottom: 0.3em; border-bottom: 1px solid var(--fb-border-subtle); }
235
+ .markdown-body h2 { font-size: 1.28em; }
236
+ .markdown-body h3 { font-size: 1.1em; }
237
+ .markdown-body p, .markdown-body ul, .markdown-body ol, .markdown-body blockquote { margin: 0.7em 0; }
238
+ .markdown-body ul, .markdown-body ol { padding-left: 1.4em; }
239
+ .markdown-body li { margin: 0.24em 0; }
240
+ .markdown-body a { color: var(--fb-accent); }
241
+ .markdown-body blockquote {
242
+ border-left: 3px solid var(--fb-border);
243
+ padding: 0.1em 0 0.1em 12px;
244
+ color: var(--fb-text-2);
245
+ }
246
+ .markdown-body code {
247
+ font-family: var(--fb-mono);
248
+ font-size: 0.92em;
249
+ background: var(--fb-bg-active);
250
+ padding: 0.14em 0.4em;
251
+ border-radius: 4px;
252
+ }
253
+ .markdown-body pre {
254
+ background: var(--fb-bg-elevated);
255
+ border: 1px solid var(--fb-border-subtle);
256
+ border-radius: var(--fb-radius);
257
+ padding: 12px 14px;
258
+ overflow: auto;
259
+ }
260
+ .markdown-body pre code { background: none; padding: 0; font-size: var(--fb-code-fs); }
261
+ .markdown-body table { border-collapse: collapse; width: 100%; margin: 0.9em 0; font-size: 0.95em; }
262
+ .markdown-body th, .markdown-body td { border: 1px solid var(--fb-border); padding: 6px 9px; text-align: left; vertical-align: top; }
263
+ .markdown-body th { background: var(--fb-bg-elevated); font-weight: 600; }
264
+ .markdown-body hr { border: 0; border-top: 1px solid var(--fb-border-subtle); margin: 1.6em 0; }
265
+ .markdown-body img { max-width: 100%; border-radius: 4px; }
266
+ .markdown-body input[type="checkbox"] { margin-right: 6px; }
267
+
268
+ .banner {
269
+ display: flex;
270
+ align-items: center;
271
+ gap: 10px;
272
+ padding: 7px 12px;
273
+ background: var(--fb-warning);
274
+ color: #fff;
275
+ font-size: calc(var(--fb-fs) - 1px);
276
+ flex: none;
277
+ }
278
+ .banner .link { appearance: none; border: 0; background: rgba(255, 255, 255, 0.22); color: #fff; font: inherit; padding: 2px 9px; border-radius: 999px; cursor: pointer; }
279
+ .banner .link:last-child { margin-left: auto; background: transparent; font-size: 15px; line-height: 1; }
280
+
281
+ /* ── sidebar ─────────────────────────────────────────────────────────────── */
282
+
283
+ .sidebar-head { padding: 8px 8px 4px; flex: none; }
284
+ .search {
285
+ display: flex;
286
+ align-items: center;
287
+ gap: 6px;
288
+ background: var(--fb-bg-root);
289
+ border: 1px solid var(--fb-border);
290
+ border-radius: var(--fb-radius);
291
+ padding: 4px 8px;
292
+ }
293
+ .search svg { width: 13px; height: 13px; fill: none; stroke: var(--fb-text-3); stroke-width: 2; flex: none; }
294
+ .search input {
295
+ border: 0;
296
+ outline: none;
297
+ background: transparent;
298
+ color: var(--fb-text-1);
299
+ font: inherit;
300
+ font-size: calc(var(--fb-fs) - 1px);
301
+ width: 100%;
302
+ min-width: 0;
303
+ }
304
+
305
+ .tabs { display: flex; gap: 2px; padding: 2px 8px 6px; flex: none; }
306
+ .tabs button {
307
+ appearance: none;
308
+ border: 0;
309
+ background: transparent;
310
+ color: var(--fb-text-3);
311
+ font: inherit;
312
+ font-size: calc(var(--fb-fs) - 1px);
313
+ padding: 4px 8px;
314
+ border-radius: 999px;
315
+ cursor: pointer;
316
+ }
317
+ .tabs button.on { background: var(--fb-bg-active); color: var(--fb-text-1); font-weight: 600; }
318
+ .tabs .count {
319
+ display: inline-block;
320
+ min-width: 15px;
321
+ padding: 0 4px;
322
+ margin-left: 2px;
323
+ border-radius: 999px;
324
+ background: var(--fb-accent-dim);
325
+ color: var(--fb-accent);
326
+ font-size: 10px;
327
+ text-align: center;
328
+ }
329
+ .tabs .count[hidden] { display: none; }
330
+
331
+ .tree {
332
+ flex: 1;
333
+ overflow: auto;
334
+ padding: 2px 4px 10px;
335
+ font-size: calc(var(--fb-fs) - 1px);
336
+ }
337
+ .tree[hidden] { display: none; }
338
+ .tree .group { padding: 8px 8px 3px; color: var(--fb-text-3); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; }
339
+
340
+ .row {
341
+ display: flex;
342
+ align-items: center;
343
+ gap: 5px;
344
+ height: 23px;
345
+ padding: 0 6px;
346
+ border-radius: 5px;
347
+ cursor: pointer;
348
+ color: var(--fb-text-2);
349
+ white-space: nowrap;
350
+ overflow: hidden;
351
+ user-select: none;
352
+ }
353
+ .row:hover { background: var(--fb-bg-hover); }
354
+ .row.sel { background: var(--fb-accent-dim); color: var(--fb-accent); font-weight: 600; }
355
+ .row .name { overflow: hidden; text-overflow: ellipsis; font-family: var(--fb-mono); font-size: var(--fb-code-fs); }
356
+ .row.dim .name { color: var(--fb-text-3); }
357
+ .row .chev { width: 11px; flex: none; color: var(--fb-text-3); transition: transform 0.12s ease; font-size: 9px; text-align: center; }
358
+ .row.open .chev { transform: rotate(90deg); }
359
+ .row .ico { width: 13px; height: 13px; flex: none; opacity: 0.85; }
360
+ .row .ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
361
+ .row .grow { flex: 1; }
362
+ .row .dot { width: 5px; height: 5px; border-radius: 50%; flex: none; }
363
+ .row .dot.changed { background: var(--fb-accent); }
364
+ .row .dot.touched { background: var(--fb-warning); }
365
+ .row .sub { color: var(--fb-text-3); font-size: 10px; font-family: var(--fb-mono); }
366
+ .tree .children { margin-left: 0; }
367
+
368
+ .sidebar-foot {
369
+ flex: none;
370
+ padding: 6px 10px;
371
+ border-top: 1px solid var(--fb-border-subtle);
372
+ color: var(--fb-text-3);
373
+ font-size: 10.5px;
374
+ display: flex;
375
+ gap: 8px;
376
+ align-items: center;
377
+ overflow: hidden;
378
+ white-space: nowrap;
379
+ }
380
+ .sidebar-foot .grow { flex: 1; overflow: hidden; text-overflow: ellipsis; }
381
+ .legend-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; margin-right: 3px; }
382
+
383
+ /* ── standalone code preview ─────────────────────────────────────────────── */
384
+
385
+ .preview > pre.code-standalone {
386
+ margin: 0;
387
+ background: transparent;
388
+ border: 0;
389
+ padding: 0;
390
+ }
391
+ .preview > pre.code-standalone code {
392
+ font-family: var(--fb-mono);
393
+ font-size: var(--fb-code-fs);
394
+ line-height: var(--finch-code-line-height, 1.6);
395
+ white-space: pre;
396
+ display: block;
397
+ }
398
+
399
+ /* ── syntax highlighting (theme aware) ───────────────────────────────────── */
400
+
401
+ .hljs-comment, .hljs-quote { color: #7d8799; font-style: italic; }
402
+ .hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-doctag, .hljs-name { color: #a626a4; }
403
+ .hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-meta .hljs-string { color: #50a14f; }
404
+ .hljs-number, .hljs-symbol, .hljs-bullet, .hljs-link, .hljs-selector-attr, .hljs-selector-pseudo { color: #986801; }
405
+ .hljs-title, .hljs-section, .hljs-title.class_, .hljs-title.function_ { color: #4078f2; font-weight: 600; }
406
+ .hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-type, .hljs-selector-class { color: #e45649; }
407
+ .hljs-built_in, .hljs-builtin-name, .hljs-meta, .hljs-punctuation { color: #0184bc; }
408
+ .hljs-deletion { color: #e45649; }
409
+ .hljs-emphasis { font-style: italic; }
410
+ .hljs-strong { font-weight: 700; }
411
+
412
+ @media (prefers-color-scheme: dark) {
413
+ html:not([data-theme="light"]) .hljs-comment, html:not([data-theme="light"]) .hljs-quote { color: #7f848e; }
414
+ html:not([data-theme="light"]) .hljs-keyword, html:not([data-theme="light"]) .hljs-selector-tag,
415
+ html:not([data-theme="light"]) .hljs-literal, html:not([data-theme="light"]) .hljs-doctag,
416
+ html:not([data-theme="light"]) .hljs-name { color: #c678dd; }
417
+ html:not([data-theme="light"]) .hljs-string, html:not([data-theme="light"]) .hljs-regexp,
418
+ html:not([data-theme="light"]) .hljs-addition, html:not([data-theme="light"]) .hljs-attribute,
419
+ html:not([data-theme="light"]) .hljs-meta .hljs-string { color: #98c379; }
420
+ html:not([data-theme="light"]) .hljs-number, html:not([data-theme="light"]) .hljs-symbol,
421
+ html:not([data-theme="light"]) .hljs-bullet, html:not([data-theme="light"]) .hljs-link,
422
+ html:not([data-theme="light"]) .hljs-selector-attr, html:not([data-theme="light"]) .hljs-selector-pseudo { color: #d19a66; }
423
+ html:not([data-theme="light"]) .hljs-title, html:not([data-theme="light"]) .hljs-section,
424
+ html:not([data-theme="light"]) .hljs-title.class_, html:not([data-theme="light"]) .hljs-title.function_ { color: #61afef; }
425
+ html:not([data-theme="light"]) .hljs-attr, html:not([data-theme="light"]) .hljs-variable,
426
+ html:not([data-theme="light"]) .hljs-template-variable, html:not([data-theme="light"]) .hljs-type,
427
+ html:not([data-theme="light"]) .hljs-selector-class { color: #e06c75; }
428
+ html:not([data-theme="light"]) .hljs-built_in, html:not([data-theme="light"]) .hljs-builtin-name,
429
+ html:not([data-theme="light"]) .hljs-meta, html:not([data-theme="light"]) .hljs-punctuation { color: #56b6c2; }
430
+ }
431
+
432
+ html[data-theme="dark"] .hljs-comment, html[data-theme="dark"] .hljs-quote { color: #7f848e; }
433
+ html[data-theme="dark"] .hljs-keyword, html[data-theme="dark"] .hljs-selector-tag,
434
+ html[data-theme="dark"] .hljs-literal, html[data-theme="dark"] .hljs-doctag, html[data-theme="dark"] .hljs-name { color: #c678dd; }
435
+ html[data-theme="dark"] .hljs-string, html[data-theme="dark"] .hljs-regexp, html[data-theme="dark"] .hljs-addition,
436
+ html[data-theme="dark"] .hljs-attribute, html[data-theme="dark"] .hljs-meta .hljs-string { color: #98c379; }
437
+ html[data-theme="dark"] .hljs-number, html[data-theme="dark"] .hljs-symbol, html[data-theme="dark"] .hljs-bullet,
438
+ html[data-theme="dark"] .hljs-link, html[data-theme="dark"] .hljs-selector-attr,
439
+ html[data-theme="dark"] .hljs-selector-pseudo { color: #d19a66; }
440
+ html[data-theme="dark"] .hljs-title, html[data-theme="dark"] .hljs-section,
441
+ html[data-theme="dark"] .hljs-title.class_, html[data-theme="dark"] .hljs-title.function_ { color: #61afef; }
442
+ html[data-theme="dark"] .hljs-attr, html[data-theme="dark"] .hljs-variable, html[data-theme="dark"] .hljs-template-variable,
443
+ html[data-theme="dark"] .hljs-type, html[data-theme="dark"] .hljs-selector-class { color: #e06c75; }
444
+ html[data-theme="dark"] .hljs-built_in, html[data-theme="dark"] .hljs-builtin-name, html[data-theme="dark"] .hljs-meta,
445
+ html[data-theme="dark"] .hljs-punctuation { color: #56b6c2; }
446
+
447
+ /* ── context menu ────────────────────────────────────────────────────────── */
448
+
449
+ .ctxmenu {
450
+ position: fixed;
451
+ z-index: 50;
452
+ min-width: 176px;
453
+ padding: 4px;
454
+ background: var(--fb-bg-elevated);
455
+ border: 1px solid var(--fb-border);
456
+ border-radius: var(--fb-radius);
457
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
458
+ font-size: calc(var(--fb-fs) - 1px);
459
+ }
460
+ .ctxmenu[hidden] { display: none; }
461
+ .ctxmenu button {
462
+ display: flex;
463
+ width: 100%;
464
+ align-items: center;
465
+ gap: 8px;
466
+ appearance: none;
467
+ border: 0;
468
+ background: transparent;
469
+ color: var(--fb-text-1);
470
+ font: inherit;
471
+ text-align: left;
472
+ padding: 5px 8px;
473
+ border-radius: 5px;
474
+ cursor: pointer;
475
+ }
476
+ .ctxmenu button:hover { background: var(--fb-bg-hover); }
477
+ .ctxmenu .danger { color: var(--fb-danger); }
478
+ .ctxmenu hr { border: 0; border-top: 1px solid var(--fb-border-subtle); margin: 4px 2px; }
479
+
480
+ .tip {
481
+ position: fixed;
482
+ left: 50%;
483
+ bottom: 18px;
484
+ transform: translateX(-50%);
485
+ z-index: 60;
486
+ background: rgba(20, 20, 24, 0.92);
487
+ color: #fff;
488
+ padding: 6px 14px;
489
+ border-radius: 999px;
490
+ font-size: calc(var(--fb-fs) - 1px);
491
+ box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
492
+ }
493
+ .tip[hidden] { display: none; }
494
+
495
+ ::-webkit-scrollbar { width: 9px; height: 9px; }
496
+ ::-webkit-scrollbar-thumb { background: var(--fb-border); border-radius: 99px; }
497
+ ::-webkit-scrollbar-thumb:hover { background: var(--fb-text-3); }
498
+ ::-webkit-scrollbar-track { background: transparent; }
@@ -0,0 +1,66 @@
1
+ <!doctype html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Session Files</title>
7
+ <link rel="stylesheet" href="./panel.css" />
8
+ </head>
9
+ <body>
10
+ <div class="app" id="app">
11
+ <header class="topbar">
12
+ <div class="crumb" id="crumb" title=""></div>
13
+ <div class="topbar-actions">
14
+ <div class="seg" id="mode-switch" hidden>
15
+ <button data-mode="preview" class="on" type="button">预览</button>
16
+ <button data-mode="source" type="button">源码</button>
17
+ </div>
18
+ <button class="btn" id="btn-undo" type="button" title="把磁盘上的文件回滚到上一次保存之前的版本" disabled>回滚上次保存</button>
19
+ <button class="btn" id="btn-external" type="button" title="用系统默认程序打开这个文件" disabled>用系统打开</button>
20
+ <button class="btn primary" id="btn-save" type="button" title="把编辑内容写回原文件(⌘S)" disabled>保存</button>
21
+ </div>
22
+ </header>
23
+
24
+ <main class="body">
25
+ <section class="viewer" id="viewer">
26
+ <div class="empty" id="empty">
27
+ <div class="empty-title">选择一个文件开始</div>
28
+ <div class="empty-sub">右侧是这个对话绑定文件夹里的全部文件</div>
29
+ </div>
30
+ <div class="banner" id="banner" hidden>
31
+ <span id="banner-text"></span>
32
+ <button class="link" id="banner-action" type="button" hidden></button>
33
+ <button class="link" id="banner-close" type="button">×</button>
34
+ </div>
35
+ <div class="preview markdown-body" id="preview" hidden></div>
36
+ <div class="editor-wrap" id="editor-wrap" hidden>
37
+ <textarea id="editor" spellcheck="false"></textarea>
38
+ </div>
39
+ <div class="media" id="media" hidden></div>
40
+ </section>
41
+
42
+ <div class="splitter" id="splitter" role="separator" aria-orientation="vertical"></div>
43
+
44
+ <aside class="sidebar">
45
+ <div class="sidebar-head">
46
+ <div class="search">
47
+ <svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
48
+ <input id="search" type="search" placeholder="筛选文件…" autocomplete="off" />
49
+ </div>
50
+ </div>
51
+ <div class="tabs" id="tabs">
52
+ <button data-tab="tree" class="on" type="button">目录</button>
53
+ <button data-tab="session" type="button">本会话 <span class="count" id="touched-count">0</span></button>
54
+ </div>
55
+ <div class="tree" id="tree"></div>
56
+ <div class="tree" id="session-list" hidden></div>
57
+ <footer class="sidebar-foot" id="foot"></footer>
58
+ </aside>
59
+ </main>
60
+
61
+ <div class="ctxmenu" id="ctxmenu" hidden></div>
62
+ <div class="tip" id="toast" hidden></div>
63
+ </div>
64
+ <script src="./panel.js"></script>
65
+ </body>
66
+ </html>