forestui 0.9.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.
forestui/theme.py ADDED
@@ -0,0 +1,657 @@
1
+ """Theme and styling for forestui."""
2
+
3
+ # CSS styles for Textual
4
+ APP_CSS = """
5
+ $accent: #52B788;
6
+ $accent-dark: #2D6A4F;
7
+ $bg: #1C1C1E;
8
+ $bg-elevated: #2C2C2E;
9
+ $bg-hover: #3A3A3C;
10
+ $bg-selected: #48484A;
11
+ $border: #3D3D3F;
12
+ $text-primary: #F5F5F5;
13
+ $text-secondary: #A8A8A8;
14
+ $text-muted: #7A7A7A;
15
+ $destructive: #FF6B6B;
16
+ $success: #52B788;
17
+ $warning: #FFB347;
18
+
19
+ Screen {
20
+ background: $bg;
21
+ }
22
+
23
+ /* Main Layout */
24
+ #main-container {
25
+ layout: horizontal;
26
+ height: 100%;
27
+ }
28
+
29
+ #sidebar {
30
+ width: 35;
31
+ min-width: 30;
32
+ max-width: 45;
33
+ background: $bg;
34
+ border-right: solid $border;
35
+ }
36
+
37
+ #detail-pane {
38
+ width: 1fr;
39
+ height: 100%;
40
+ background: $bg;
41
+ padding: 1 2;
42
+ }
43
+
44
+ /* Sidebar Header */
45
+ .sidebar-header {
46
+ height: 3;
47
+ padding: 1;
48
+ background: $bg-elevated;
49
+ border-bottom: solid $border;
50
+ }
51
+
52
+ .sidebar-header Label {
53
+ text-style: bold;
54
+ color: $text-primary;
55
+ }
56
+
57
+ .sidebar-header .header-buttons {
58
+ dock: right;
59
+ }
60
+
61
+ /* Tree Items */
62
+ Tree {
63
+ background: $bg;
64
+ padding: 0 1;
65
+ }
66
+
67
+ Tree > .tree--cursor {
68
+ background: $accent-dark;
69
+ color: $text-primary;
70
+ }
71
+
72
+ Tree > .tree--highlight {
73
+ background: $bg-hover;
74
+ }
75
+
76
+ Tree > .tree--highlight-line {
77
+ background: $bg-hover;
78
+ }
79
+
80
+ /* Buttons */
81
+ Button {
82
+ background: $bg-elevated;
83
+ color: $text-primary;
84
+ border: solid $border;
85
+ min-width: 10;
86
+ height: 3;
87
+ }
88
+
89
+ Button:hover {
90
+ background: $bg-hover;
91
+ border: solid $accent;
92
+ }
93
+
94
+ Button:focus {
95
+ border: solid $accent;
96
+ }
97
+
98
+ Button.-primary {
99
+ background: $accent-dark;
100
+ border: solid $accent;
101
+ }
102
+
103
+ Button.-primary:hover {
104
+ background: $accent;
105
+ }
106
+
107
+ Button.-destructive {
108
+ background: #3d2020;
109
+ color: $destructive;
110
+ border: solid #5a3030;
111
+ }
112
+
113
+ Button.-destructive:hover {
114
+ background: #4d2828;
115
+ border: solid $destructive;
116
+ }
117
+
118
+ /* Action Cards */
119
+ .action-card {
120
+ background: $bg-elevated;
121
+ border: solid $border;
122
+ padding: 1;
123
+ margin: 0 0 1 0;
124
+ height: auto;
125
+ }
126
+
127
+ .action-card:hover {
128
+ background: $bg-hover;
129
+ border: solid $accent;
130
+ }
131
+
132
+ .action-card:focus {
133
+ border: solid $accent;
134
+ }
135
+
136
+ /* Section Headers */
137
+ .section-header {
138
+ text-style: bold;
139
+ color: $text-secondary;
140
+ margin: 1 0 0 0;
141
+ padding: 0 0 0 0;
142
+ }
143
+
144
+ /* Labels */
145
+ .label-primary {
146
+ color: $text-primary;
147
+ }
148
+
149
+ .label-secondary {
150
+ color: $text-secondary;
151
+ }
152
+
153
+ .label-muted {
154
+ color: $text-muted;
155
+ }
156
+
157
+ .label-accent {
158
+ color: $accent;
159
+ }
160
+
161
+ .label-destructive {
162
+ color: $destructive;
163
+ }
164
+
165
+ /* Path Display */
166
+ .path-display {
167
+ background: $bg-elevated;
168
+ padding: 0 1;
169
+ border: solid $border;
170
+ color: $text-secondary;
171
+ }
172
+
173
+ /* Detail View */
174
+ .detail-content {
175
+ height: auto;
176
+ width: 100%;
177
+ }
178
+
179
+ RepositoryDetail {
180
+ height: auto;
181
+ width: 100%;
182
+ }
183
+
184
+ WorktreeDetail {
185
+ height: auto;
186
+ width: 100%;
187
+ }
188
+
189
+ EmptyState {
190
+ height: auto;
191
+ width: 100%;
192
+ }
193
+
194
+ .detail-header {
195
+ height: auto;
196
+ margin-bottom: 1;
197
+ }
198
+
199
+ .detail-title {
200
+ text-style: bold;
201
+ color: $text-primary;
202
+ }
203
+
204
+ .detail-subtitle {
205
+ color: $text-secondary;
206
+ }
207
+
208
+ /* Input Fields */
209
+ Input {
210
+ background: $bg-elevated;
211
+ color: $text-primary;
212
+ border: solid $border;
213
+ }
214
+
215
+ Input:focus {
216
+ border: solid $accent;
217
+ }
218
+
219
+ Input.-invalid {
220
+ border: solid $destructive;
221
+ }
222
+
223
+ /* Select */
224
+ Select {
225
+ background: $bg-elevated;
226
+ color: $text-primary;
227
+ border: solid $border;
228
+ }
229
+
230
+ Select:focus {
231
+ border: solid $accent;
232
+ }
233
+
234
+ SelectCurrent {
235
+ background: $bg-elevated;
236
+ }
237
+
238
+ SelectOverlay {
239
+ background: $bg-elevated;
240
+ border: solid $border;
241
+ }
242
+
243
+ /* Modals */
244
+ ModalScreen {
245
+ align: center middle;
246
+ }
247
+
248
+ .modal-container {
249
+ width: 60;
250
+ max-width: 80%;
251
+ height: auto;
252
+ max-height: 90%;
253
+ background: $bg-elevated;
254
+ border: solid $border;
255
+ padding: 1 2;
256
+ }
257
+
258
+ .modal-scroll {
259
+ height: auto;
260
+ max-height: 20;
261
+ }
262
+
263
+ .modal-title {
264
+ text-style: bold;
265
+ color: $text-primary;
266
+ text-align: center;
267
+ margin-bottom: 1;
268
+ }
269
+
270
+ .modal-buttons {
271
+ margin-top: 1;
272
+ align: center middle;
273
+ height: 3;
274
+ }
275
+
276
+ .modal-buttons Button {
277
+ margin: 0 1;
278
+ }
279
+
280
+ /* Session List */
281
+ .session-item {
282
+ background: $bg-elevated;
283
+ border: solid $border;
284
+ padding: 1;
285
+ margin: 0 2 1 0;
286
+ height: auto;
287
+ align: left middle;
288
+ }
289
+
290
+ .session-item:hover {
291
+ background: $bg-hover;
292
+ }
293
+
294
+ .session-header-row {
295
+ width: 100%;
296
+ height: auto;
297
+ align: left middle;
298
+ }
299
+
300
+ .session-info {
301
+ width: 1fr;
302
+ height: auto;
303
+ }
304
+
305
+ .session-title {
306
+ color: $text-primary;
307
+ }
308
+
309
+ .session-last {
310
+ color: $text-secondary;
311
+ }
312
+
313
+ .session-meta {
314
+ color: $text-muted;
315
+ margin-top: 1;
316
+ }
317
+
318
+ .session-buttons {
319
+ height: auto;
320
+ align: right middle;
321
+ }
322
+
323
+ .session-btn {
324
+ min-width: 8;
325
+ height: 3;
326
+ margin-left: 1;
327
+ }
328
+
329
+ /* Status Messages */
330
+ .status-bar {
331
+ dock: bottom;
332
+ height: 1;
333
+ background: $bg-elevated;
334
+ color: $text-secondary;
335
+ padding: 0 1;
336
+ }
337
+
338
+ /* Empty State */
339
+ .empty-state {
340
+ align: center middle;
341
+ height: 100%;
342
+ }
343
+
344
+ .empty-state Label {
345
+ color: $text-muted;
346
+ text-align: center;
347
+ }
348
+
349
+ /* Collapsible */
350
+ Collapsible {
351
+ background: $bg;
352
+ border: none;
353
+ padding: 0;
354
+ }
355
+
356
+ CollapsibleTitle {
357
+ background: $bg;
358
+ color: $text-secondary;
359
+ padding: 0 1;
360
+ }
361
+
362
+ CollapsibleTitle:hover {
363
+ background: $bg-hover;
364
+ }
365
+
366
+ CollapsibleTitle:focus {
367
+ background: $bg-hover;
368
+ }
369
+
370
+ /* OptionList for sidebar */
371
+ OptionList {
372
+ background: $bg;
373
+ border: none;
374
+ padding: 0;
375
+ }
376
+
377
+ OptionList > .option-list--option {
378
+ padding: 0 1;
379
+ }
380
+
381
+ OptionList > .option-list--option-highlighted {
382
+ background: $bg-hover;
383
+ }
384
+
385
+ OptionList > .option-list--option-hover {
386
+ background: $bg-hover;
387
+ }
388
+
389
+ /* DataTable */
390
+ DataTable {
391
+ background: $bg;
392
+ }
393
+
394
+ DataTable > .datatable--header {
395
+ background: $bg-elevated;
396
+ color: $text-secondary;
397
+ text-style: bold;
398
+ }
399
+
400
+ DataTable > .datatable--cursor {
401
+ background: $accent-dark;
402
+ }
403
+
404
+ /* Horizontal Rule */
405
+ Rule.-horizontal {
406
+ color: $border;
407
+ margin: 1 2 1 0;
408
+ }
409
+
410
+ /* Footer */
411
+ Footer {
412
+ background: $bg-elevated;
413
+ }
414
+
415
+ FooterKey {
416
+ background: $bg-elevated;
417
+ color: $text-secondary;
418
+ }
419
+
420
+ FooterKey > .footer-key--key {
421
+ background: $accent-dark;
422
+ color: $text-primary;
423
+ }
424
+
425
+ /* ListItem styling */
426
+ ListItem {
427
+ background: $bg;
428
+ padding: 0 1;
429
+ height: 1;
430
+ }
431
+
432
+ ListItem:hover {
433
+ background: $bg-hover;
434
+ }
435
+
436
+ ListItem.-selected {
437
+ background: $accent-dark;
438
+ }
439
+
440
+ ListView {
441
+ background: $bg;
442
+ }
443
+
444
+ /* Static content */
445
+ Static {
446
+ color: $text-primary;
447
+ }
448
+
449
+ /* Checkbox and RadioButton */
450
+ Checkbox {
451
+ background: transparent;
452
+ }
453
+
454
+ Checkbox > .toggle--button {
455
+ background: $bg-elevated;
456
+ }
457
+
458
+ Checkbox:focus > .toggle--button {
459
+ background: $accent-dark;
460
+ }
461
+
462
+ RadioButton {
463
+ background: transparent;
464
+ }
465
+
466
+ RadioSet {
467
+ background: transparent;
468
+ border: none;
469
+ }
470
+
471
+ /* Tabs */
472
+ Tabs {
473
+ background: $bg;
474
+ }
475
+
476
+ Tab {
477
+ background: $bg;
478
+ color: $text-secondary;
479
+ }
480
+
481
+ Tab:hover {
482
+ background: $bg-hover;
483
+ }
484
+
485
+ Tab.-active {
486
+ background: $bg-elevated;
487
+ color: $accent;
488
+ }
489
+
490
+ /* ContentSwitcher */
491
+ ContentSwitcher {
492
+ background: $bg;
493
+ }
494
+
495
+ /* Containers */
496
+ Horizontal {
497
+ height: auto;
498
+ }
499
+
500
+ Vertical {
501
+ height: auto;
502
+ }
503
+
504
+ Container {
505
+ height: auto;
506
+ }
507
+
508
+ /* Scrollbars */
509
+ .scrollbar {
510
+ background: $bg-elevated;
511
+ }
512
+
513
+ /* Action row */
514
+ .action-row {
515
+ layout: horizontal;
516
+ height: 3;
517
+ margin: 1 0;
518
+ }
519
+
520
+ .action-row Button {
521
+ margin-right: 1;
522
+ }
523
+
524
+ /* Branch tag */
525
+ .branch-tag {
526
+ background: $accent-dark;
527
+ color: $accent;
528
+ padding: 0 1;
529
+ }
530
+
531
+ /* Keyboard shortcut badge */
532
+ .shortcut-badge {
533
+ background: $bg-elevated;
534
+ color: $text-muted;
535
+ padding: 0 1;
536
+ }
537
+
538
+ /* Sidebar Header Box */
539
+ #sidebar-header-box {
540
+ width: 100%;
541
+ height: 4;
542
+ background: $bg-elevated;
543
+ border-bottom: solid $border;
544
+ align: center middle;
545
+ padding: 0;
546
+ }
547
+
548
+ #sidebar-title {
549
+ text-align: center;
550
+ width: 100%;
551
+ color: $accent;
552
+ text-style: bold;
553
+ }
554
+
555
+ #gh-status {
556
+ text-align: center;
557
+ width: 100%;
558
+ color: $text-muted;
559
+ }
560
+
561
+ .gh-status-ok {
562
+ color: $success;
563
+ }
564
+
565
+ .gh-status-warn {
566
+ color: $warning;
567
+ }
568
+
569
+ .gh-status-error {
570
+ color: $text-muted;
571
+ }
572
+
573
+ /* Async-loaded sections */
574
+ #issues-container {
575
+ margin-top: 1;
576
+ }
577
+
578
+ #sessions-container {
579
+ margin-top: 1;
580
+ }
581
+
582
+ /* Section header with refresh button */
583
+ .section-header-row {
584
+ height: auto;
585
+ width: auto;
586
+ }
587
+
588
+ .section-header-row .section-header {
589
+ width: auto;
590
+ margin: 0;
591
+ }
592
+
593
+ .refresh-btn {
594
+ min-width: 3;
595
+ width: 3;
596
+ height: 1;
597
+ padding: 0;
598
+ margin: 0;
599
+ border: none;
600
+ background: transparent;
601
+ color: $text-muted;
602
+ text-style: none;
603
+ }
604
+
605
+ .refresh-btn:focus {
606
+ color: $text-muted;
607
+ background: transparent;
608
+ border: none;
609
+ text-style: none;
610
+ }
611
+
612
+ .refresh-btn:hover {
613
+ color: $accent;
614
+ background: transparent;
615
+ border: none;
616
+ }
617
+
618
+ .refresh-btn:focus:hover {
619
+ color: $accent;
620
+ background: transparent;
621
+ border: none;
622
+ }
623
+
624
+ /* Issue List */
625
+ .issue-row {
626
+ height: auto;
627
+ margin: 0 2 1 0;
628
+ padding: 1;
629
+ background: $bg-elevated;
630
+ border: solid $border;
631
+ }
632
+
633
+ .issue-row:hover {
634
+ background: $bg-hover;
635
+ }
636
+
637
+ .issue-info {
638
+ width: 1fr;
639
+ }
640
+
641
+ .issue-title {
642
+ color: $text-primary;
643
+ }
644
+
645
+ .issue-meta {
646
+ color: $text-muted;
647
+ }
648
+
649
+ .issue-btn {
650
+ min-width: 12;
651
+ margin-left: 1;
652
+ }
653
+
654
+ .issue-title-preview {
655
+ margin-bottom: 1;
656
+ }
657
+ """