tmcode 0.2.0__py3-none-any.whl

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.
termcode/styles.tcss ADDED
@@ -0,0 +1,796 @@
1
+ /* TermCode — slate theme.
2
+ * Palette tokens mirror src/termcode/theme.py; keep both in sync.
3
+ * Rule of thumb: chrome is $bg, the place you type is $surface, and the only
4
+ * saturated color on screen is either $accent (focus) or a run state. */
5
+
6
+ $bg: #14171c;
7
+ $surface: #191d23;
8
+ $raised: #20252d;
9
+ $line: #2a303a;
10
+ $text: #c7ccd4;
11
+ $muted: #6c7584;
12
+ $faint: #465061;
13
+ $accent: #8ea2ff;
14
+ $accent-ink: #14171c;
15
+ $ok: #7ccf9e;
16
+ $fail: #f07a7d;
17
+ $busy: #e7bf72;
18
+ $select: #2f3b5c;
19
+
20
+ Screen {
21
+ background: $bg;
22
+ color: $text;
23
+ layers: base overlay;
24
+ }
25
+
26
+ * {
27
+ scrollbar-size: 1 1;
28
+ scrollbar-background: $bg;
29
+ scrollbar-background-hover: $bg;
30
+ scrollbar-background-active: $bg;
31
+ scrollbar-color: $line;
32
+ scrollbar-color-hover: $faint;
33
+ scrollbar-color-active: $muted;
34
+ scrollbar-corner-color: $bg;
35
+ }
36
+
37
+ Tooltip {
38
+ background: $raised;
39
+ color: $text;
40
+ border: none;
41
+ padding: 0 1;
42
+ }
43
+
44
+ #workspace-body {
45
+ height: 1fr;
46
+ }
47
+
48
+ /* ---------- Sidebar ---------- */
49
+
50
+ #sidebar {
51
+ width: 30;
52
+ background: $bg;
53
+ }
54
+
55
+ /* The sidebar's edge doubles as its resize handle: it lights up on hover. */
56
+ #sidebar-handle {
57
+ width: 1;
58
+ height: 1fr;
59
+ background: $bg;
60
+ color: $line;
61
+ pointer: ew-resize;
62
+ }
63
+
64
+ #sidebar-handle:hover,
65
+ #sidebar-handle.-hover,
66
+ #sidebar-handle.-dragging {
67
+ color: $accent;
68
+ text-style: bold;
69
+ }
70
+
71
+ .spacer {
72
+ width: 1fr;
73
+ height: 1;
74
+ }
75
+
76
+ #sidebar-folder-bar {
77
+ height: 2;
78
+ margin: 1 0 1 0;
79
+ background: $bg;
80
+ }
81
+
82
+ #sidebar-actions {
83
+ height: 1;
84
+ padding: 0 0 0 1;
85
+ }
86
+
87
+ #sidebar-folder {
88
+ width: 1fr;
89
+ height: 1;
90
+ padding: 0 1 0 2;
91
+ color: $text;
92
+ text-style: bold;
93
+ text-overflow: ellipsis;
94
+ text-wrap: nowrap;
95
+ }
96
+
97
+ .sidebar-tool-btn {
98
+ width: auto;
99
+ min-width: 3;
100
+ height: 1;
101
+ background: $bg;
102
+ color: $muted;
103
+ border: none;
104
+ padding: 0 1;
105
+ text-style: none;
106
+ }
107
+
108
+ .sidebar-tool-btn:hover,
109
+ .sidebar-tool-btn:focus {
110
+ background: $raised;
111
+ color: $text;
112
+ text-style: none;
113
+ }
114
+
115
+ #no-folder-box {
116
+ height: 1fr;
117
+ padding: 1 2;
118
+ background: $bg;
119
+ }
120
+
121
+ #no-folder-text {
122
+ color: $muted;
123
+ margin-bottom: 1;
124
+ }
125
+
126
+ #sidebar-open-folder-btn {
127
+ width: 100%;
128
+ height: 1;
129
+ background: $raised;
130
+ color: $text;
131
+ border: none;
132
+ margin-bottom: 1;
133
+ text-style: none;
134
+ }
135
+
136
+ #sidebar-open-folder-btn:hover,
137
+ #sidebar-open-folder-btn:focus {
138
+ background: $accent;
139
+ color: $accent-ink;
140
+ text-style: bold;
141
+ }
142
+
143
+ #no-folder-hint {
144
+ color: $faint;
145
+ }
146
+
147
+ #file-tree {
148
+ height: 1fr;
149
+ background: $bg;
150
+ color: $text;
151
+ border: none;
152
+ padding: 0 0 0 1;
153
+ }
154
+
155
+ #file-tree:focus {
156
+ border: none;
157
+ }
158
+
159
+ #file-tree > .tree--cursor {
160
+ background: $raised;
161
+ color: $text;
162
+ text-style: none;
163
+ }
164
+
165
+ #file-tree:focus > .tree--cursor {
166
+ background: $select;
167
+ color: $text;
168
+ text-style: bold;
169
+ }
170
+
171
+ #file-tree > .tree--guides,
172
+ #file-tree > .tree--guides-hover,
173
+ #file-tree > .tree--guides-selected {
174
+ color: $line;
175
+ }
176
+
177
+ #file-tree > .directory-tree--folder {
178
+ color: $text;
179
+ text-style: bold;
180
+ }
181
+
182
+ #file-tree > .directory-tree--file {
183
+ color: $text;
184
+ }
185
+
186
+ #file-tree > .directory-tree--extension {
187
+ color: $muted;
188
+ text-style: none;
189
+ }
190
+
191
+ #file-tree > .directory-tree--hidden {
192
+ color: $faint;
193
+ }
194
+
195
+ /* ---------- Editors ---------- */
196
+
197
+ #main-pane {
198
+ width: 1fr;
199
+ height: 1fr;
200
+ background: $surface;
201
+ }
202
+
203
+ #editors-row {
204
+ height: 1fr;
205
+ }
206
+
207
+ #left-editor-col,
208
+ #right-editor-col {
209
+ width: 1fr;
210
+ height: 1fr;
211
+ background: $surface;
212
+ }
213
+
214
+ #right-editor-col {
215
+ border-left: vkey $line;
216
+ }
217
+
218
+ /* Tabs are two rows tall: a hairline row on top that turns accent on the
219
+ * active tab (like VS Code), then the name and its close button. */
220
+ #tab-bar,
221
+ #right-tab-bar {
222
+ height: 2;
223
+ background: $bg;
224
+ }
225
+
226
+ #left-tabs,
227
+ #right-tabs {
228
+ width: 1fr;
229
+ height: 2;
230
+ background: $bg;
231
+ }
232
+
233
+ #active-tab {
234
+ width: auto;
235
+ height: 2;
236
+ background: $surface;
237
+ color: $text;
238
+ padding: 0 2;
239
+ border-top: tall $accent;
240
+ text-style: bold;
241
+ }
242
+
243
+ .editor-tab {
244
+ width: auto;
245
+ height: 2;
246
+ background: $bg;
247
+ border-top: tall $bg;
248
+ }
249
+
250
+ .editor-tab:hover {
251
+ background: $raised;
252
+ border-top: tall $raised;
253
+ }
254
+
255
+ /* Active: shares the editor's surface color and carries the accent line. */
256
+ .editor-tab.-active {
257
+ background: $surface;
258
+ border-top: tall $accent;
259
+ }
260
+
261
+ .editor-tab-btn {
262
+ width: auto;
263
+ min-width: 4;
264
+ height: 1;
265
+ background: transparent;
266
+ color: $muted;
267
+ border: none;
268
+ padding: 0 0 0 2;
269
+ text-style: none;
270
+ }
271
+
272
+ .editor-tab-btn:hover,
273
+ .editor-tab-btn:focus {
274
+ background: transparent;
275
+ color: $text;
276
+ text-style: none;
277
+ }
278
+
279
+ .editor-tab.-active .editor-tab-btn {
280
+ color: $text;
281
+ text-style: bold;
282
+ }
283
+
284
+ .editor-tab-close {
285
+ width: 3;
286
+ min-width: 3;
287
+ height: 1;
288
+ background: transparent;
289
+ color: $faint;
290
+ border: none;
291
+ padding: 0 1;
292
+ text-style: none;
293
+ }
294
+
295
+ .editor-tab.-active .editor-tab-close {
296
+ color: $muted;
297
+ }
298
+
299
+ .editor-tab-close:hover {
300
+ background: $line;
301
+ color: $text;
302
+ text-style: none;
303
+ }
304
+
305
+ .editor-tab.-dirty .editor-tab-close {
306
+ color: $busy;
307
+ }
308
+
309
+ #tab-meta {
310
+ width: auto;
311
+ max-width: 40;
312
+ height: 1;
313
+ margin-top: 1;
314
+ background: $bg;
315
+ color: $faint;
316
+ padding: 0 1;
317
+ text-wrap: nowrap;
318
+ text-overflow: ellipsis;
319
+ }
320
+
321
+ #editor,
322
+ #editor-right {
323
+ height: 1fr;
324
+ min-height: 5;
325
+ background: $surface;
326
+ border: none;
327
+ padding: 0;
328
+ scrollbar-background: $surface;
329
+ scrollbar-background-hover: $surface;
330
+ scrollbar-background-active: $surface;
331
+ }
332
+
333
+ #editor:focus,
334
+ #editor-right:focus {
335
+ border: none;
336
+ }
337
+
338
+ /* ---------- Welcome ---------- */
339
+
340
+ #welcome-view {
341
+ height: 1fr;
342
+ background: $surface;
343
+ align: center middle;
344
+ padding: 2 4;
345
+ }
346
+
347
+ #welcome-card {
348
+ width: 56;
349
+ max-width: 92%;
350
+ height: auto;
351
+ background: $surface;
352
+ padding: 1 2;
353
+ }
354
+
355
+ #welcome-title {
356
+ margin-bottom: 0;
357
+ }
358
+
359
+ #welcome-subtitle {
360
+ color: $muted;
361
+ margin-bottom: 2;
362
+ }
363
+
364
+ #home-open-folder-btn {
365
+ width: auto;
366
+ min-width: 24;
367
+ height: 1;
368
+ padding: 0 2;
369
+ background: $accent;
370
+ color: $accent-ink;
371
+ border: none;
372
+ text-style: bold;
373
+ margin-bottom: 2;
374
+ }
375
+
376
+ #home-open-folder-btn:hover,
377
+ #home-open-folder-btn:focus {
378
+ background: #a9b8ff;
379
+ color: $accent-ink;
380
+ text-style: bold;
381
+ }
382
+
383
+ #home-recent-section {
384
+ height: auto;
385
+ }
386
+
387
+ .welcome-section-title {
388
+ color: $muted;
389
+ margin-bottom: 1;
390
+ }
391
+
392
+ #recent-list,
393
+ #palette-list,
394
+ #picker-list,
395
+ #folder-list {
396
+ text-wrap: nowrap;
397
+ text-overflow: ellipsis;
398
+ }
399
+
400
+ #recent-list {
401
+ height: auto;
402
+ max-height: 8;
403
+ background: $surface;
404
+ border: none;
405
+ padding: 0;
406
+ }
407
+
408
+ #recent-list:focus {
409
+ border: none;
410
+ }
411
+
412
+ #recent-list > .option-list--option-highlighted {
413
+ background: $raised;
414
+ color: $text;
415
+ text-style: none;
416
+ }
417
+
418
+ #recent-list:focus > .option-list--option-highlighted {
419
+ background: $select;
420
+ }
421
+
422
+ #recent-empty {
423
+ color: $faint;
424
+ }
425
+
426
+ #welcome-tip {
427
+ color: $faint;
428
+ margin-top: 2;
429
+ }
430
+
431
+ /* ---------- Completion popup ---------- */
432
+
433
+ #completion-popup {
434
+ layer: overlay;
435
+ width: 32;
436
+ height: auto;
437
+ max-height: 9;
438
+ background: $raised;
439
+ border: none;
440
+ color: $text;
441
+ padding: 0;
442
+ display: none;
443
+ }
444
+
445
+ #completion-popup > .option-list--option-highlighted {
446
+ background: $select;
447
+ color: $text;
448
+ text-style: bold;
449
+ }
450
+
451
+ /* ---------- Find / replace bar ---------- */
452
+
453
+ #find-bar {
454
+ height: auto;
455
+ background: $raised;
456
+ border-top: tall $accent;
457
+ padding: 0 1;
458
+ }
459
+
460
+ #find-row,
461
+ #replace-row {
462
+ height: 1;
463
+ }
464
+
465
+ #find-input,
466
+ #replace-input {
467
+ width: 1fr;
468
+ height: 1;
469
+ border: none;
470
+ background: $bg;
471
+ color: $text;
472
+ padding: 0 1;
473
+ }
474
+
475
+ #find-input:focus,
476
+ #replace-input:focus {
477
+ border: none;
478
+ background: $bg;
479
+ }
480
+
481
+ #find-input > .input--placeholder,
482
+ #replace-input > .input--placeholder {
483
+ color: $faint;
484
+ }
485
+
486
+ #find-count {
487
+ width: 16;
488
+ height: 1;
489
+ padding: 0 1;
490
+ text-wrap: nowrap;
491
+ }
492
+
493
+ .find-btn {
494
+ width: auto;
495
+ min-width: 3;
496
+ height: 1;
497
+ background: $raised;
498
+ color: $muted;
499
+ border: none;
500
+ padding: 0 1;
501
+ margin-left: 1;
502
+ text-style: none;
503
+ }
504
+
505
+ .find-btn:hover,
506
+ .find-btn:focus {
507
+ background: $line;
508
+ color: $text;
509
+ text-style: none;
510
+ }
511
+
512
+ /* Toggles that are on (Aa / .*) take the accent so their state is visible. */
513
+ .find-btn.-on {
514
+ background: $accent;
515
+ color: $accent-ink;
516
+ text-style: bold;
517
+ }
518
+
519
+ #replace-row {
520
+ margin-top: 0;
521
+ }
522
+
523
+ /* ---------- Output panel ----------
524
+ * The one loud element: a stripe down the left edge that reports the last
525
+ * run at a glance — amber while running, green on exit 0, red on failure. */
526
+
527
+ #output-pane {
528
+ height: 10;
529
+ min-height: 4;
530
+ background: $bg;
531
+ border-left: tall $bg;
532
+ }
533
+
534
+ /* Top edge of Output = resize handle; lights up like the sidebar edge. */
535
+ #output-edge {
536
+ width: 1fr;
537
+ height: 1;
538
+ background: $bg;
539
+ color: $line;
540
+ pointer: ns-resize;
541
+ }
542
+
543
+ #output-edge:hover,
544
+ #output-edge.-hover,
545
+ #output-edge.-dragging,
546
+ #output-header.-dragging {
547
+ color: $accent;
548
+ text-style: bold;
549
+ }
550
+
551
+ #output-pane.-running { border-left: tall $busy; }
552
+ #output-pane.-ok { border-left: tall $ok; }
553
+ #output-pane.-fail { border-left: tall $fail; }
554
+ #output-pane.-stopped { border-left: tall $faint; }
555
+
556
+ #output-header-bar {
557
+ height: 1;
558
+ background: $bg;
559
+ }
560
+
561
+ #output-header {
562
+ pointer: ns-resize;
563
+ width: 1fr;
564
+ height: 1;
565
+ background: $bg;
566
+ padding: 0 1;
567
+ }
568
+
569
+ .term-tool-btn {
570
+ width: auto;
571
+ min-width: 3;
572
+ height: 1;
573
+ background: $bg;
574
+ color: $muted;
575
+ border: none;
576
+ padding: 0 1;
577
+ text-style: none;
578
+ }
579
+
580
+ .term-tool-btn:hover,
581
+ .term-tool-btn:focus {
582
+ background: $raised;
583
+ color: $text;
584
+ text-style: none;
585
+ }
586
+
587
+ #output-log {
588
+ height: 1fr;
589
+ background: $bg;
590
+ color: $text;
591
+ border: none;
592
+ padding: 0 1;
593
+ }
594
+
595
+ #output-log:focus {
596
+ border: none;
597
+ }
598
+
599
+ #stdin-input {
600
+ height: 1;
601
+ border: none;
602
+ background: $raised;
603
+ color: $text;
604
+ padding: 0 1;
605
+ }
606
+
607
+ #stdin-input:focus {
608
+ border: none;
609
+ background: $raised;
610
+ }
611
+
612
+ #stdin-input > .input--placeholder {
613
+ color: $faint;
614
+ }
615
+
616
+ /* ---------- Status bar ---------- */
617
+
618
+ #status-bar {
619
+ dock: bottom;
620
+ height: 1;
621
+ background: $bg;
622
+ color: $muted;
623
+ }
624
+
625
+ .status-toggle {
626
+ width: auto;
627
+ min-width: 4;
628
+ height: 1;
629
+ background: $bg;
630
+ color: $faint;
631
+ border: none;
632
+ padding: 0 1;
633
+ text-style: none;
634
+ }
635
+
636
+ .status-toggle.-on {
637
+ color: $text;
638
+ }
639
+
640
+ .status-toggle:hover,
641
+ .status-toggle:focus {
642
+ background: $raised;
643
+ color: $text;
644
+ text-style: none;
645
+ }
646
+
647
+ #status-left {
648
+ width: 1fr;
649
+ height: 1;
650
+ padding: 0 2;
651
+ }
652
+
653
+ #status-right {
654
+ width: auto;
655
+ height: 1;
656
+ padding: 0 2;
657
+ }
658
+
659
+ /* ---------- Modals ---------- */
660
+
661
+ CommandPaletteModal,
662
+ TextInputModal,
663
+ FilePickerModal,
664
+ FolderPickerModal,
665
+ ConfirmModal,
666
+ UnsavedChangesModal {
667
+ align: center top;
668
+ padding-top: 4;
669
+ background: rgba(8, 10, 14, 0.6);
670
+ }
671
+
672
+ .modal-box {
673
+ width: 72;
674
+ max-width: 92%;
675
+ height: auto;
676
+ max-height: 84%;
677
+ background: $raised;
678
+ border: none;
679
+ border-top: tall $accent;
680
+ padding: 1 2;
681
+ }
682
+
683
+ .modal-title {
684
+ text-style: bold;
685
+ color: $text;
686
+ margin-bottom: 1;
687
+ }
688
+
689
+ .modal-subtitle {
690
+ color: $muted;
691
+ margin-bottom: 1;
692
+ }
693
+
694
+ .modal-box Input {
695
+ height: 1;
696
+ background: $bg;
697
+ border: none;
698
+ color: $text;
699
+ padding: 0 1;
700
+ }
701
+
702
+ .modal-box Input:focus {
703
+ border: none;
704
+ background: $bg;
705
+ }
706
+
707
+ .modal-box Input > .input--placeholder {
708
+ color: $faint;
709
+ }
710
+
711
+ .quick-bar {
712
+ height: auto;
713
+ margin-top: 1;
714
+ }
715
+
716
+ .quick-btn {
717
+ height: 1;
718
+ min-width: 6;
719
+ background: $bg;
720
+ color: $muted;
721
+ border: none;
722
+ margin-right: 1;
723
+ padding: 0 1;
724
+ text-style: none;
725
+ }
726
+
727
+ .quick-btn:hover,
728
+ .quick-btn:focus {
729
+ background: $line;
730
+ color: $text;
731
+ text-style: none;
732
+ }
733
+
734
+ #palette-list,
735
+ #picker-list,
736
+ #folder-list {
737
+ height: 13;
738
+ max-height: 17;
739
+ margin-top: 1;
740
+ border: none;
741
+ background: $raised;
742
+ }
743
+
744
+ #palette-list > .option-list--option-highlighted,
745
+ #picker-list > .option-list--option-highlighted,
746
+ #folder-list > .option-list--option-highlighted {
747
+ background: $select;
748
+ color: $text;
749
+ text-style: bold;
750
+ }
751
+
752
+ .modal-buttons {
753
+ height: auto;
754
+ align: right middle;
755
+ margin-top: 1;
756
+ }
757
+
758
+ .modal-buttons Button {
759
+ margin-left: 1;
760
+ height: 1;
761
+ min-width: 8;
762
+ padding: 0 2;
763
+ border: none;
764
+ background: $line;
765
+ color: $text;
766
+ text-style: none;
767
+ }
768
+
769
+ .modal-buttons Button:hover,
770
+ .modal-buttons Button:focus {
771
+ background: $faint;
772
+ text-style: none;
773
+ }
774
+
775
+ .modal-buttons Button.-primary {
776
+ background: $accent;
777
+ color: $accent-ink;
778
+ text-style: bold;
779
+ }
780
+
781
+ .modal-buttons Button.-primary:hover,
782
+ .modal-buttons Button.-primary:focus {
783
+ background: #a9b8ff;
784
+ }
785
+
786
+ .modal-buttons Button.-error {
787
+ background: $fail;
788
+ color: $accent-ink;
789
+ text-style: bold;
790
+ }
791
+
792
+ /* Buttons in the two-row tab bars sit on the label row. */
793
+ #tab-bar .term-tool-btn,
794
+ #right-tab-bar .term-tool-btn {
795
+ margin-top: 1;
796
+ }