Repository navigation
Expand file tree
/
Copy pathplugin.js
More file actions
10014 lines (9715 loc) · 379 KB
/
Copy pathplugin.js
File metadata and controls
10014 lines (9715 loc) · 379 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"use strict";
var plugins = (() => {
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// plugin.js
var plugin_exports = {};
__export(plugin_exports, {
Plugin: () => Plugin
});
// ../../shared/settings-ui/tokens.css
var tokens_default = `/*
* Thymer Plugin Settings UI \u2014 Design Tokens
*
* Canonical CSS custom properties for the plugin settings panel system.
* Plugins consume this verbatim; component CSS reads from these vars.
*
* See shared/settings-ui/DESIGN.md for rationale.
*
* Thymer var names verified against library/css-tokens/ (ripped from shipped CSS).
* Fallbacks use color-mix(currentColor) so panels work when a token is absent.
*
* SCOPE IS DOUBLED ON PURPOSE (.tps-panel.tps-panel, specificity 0,2,0).
* Every plugin bundles its own copy of this file and injects it into the same
* document, all declaring the same global .tps-panel class. At equal specificity
* the last stylesheet injected wins for EVERY panel in the app, so one plugin
* running an outdated bundle silently redefines these tokens for all the others.
* That shipped: pre-1f753f6 builds set --tps-accent from --accent-color, a var
* Thymer never defines, which collapsed the accent to currentColor (white text)
* across every installed plugin's panel. Doubling the class lets a current copy
* outrank any stale plain-.tps-panel copy regardless of injection order.
* Do not "simplify" this back to a single class.
*/
.tps-panel.tps-panel {
/* \u2500\u2500 Color: text \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
--tps-text: var(--text-default, currentColor);
--tps-text-muted: var(--text-muted, color-mix(in srgb, currentColor 62%, transparent));
--tps-text-faint: var(--text-subtle, color-mix(in srgb, currentColor 48%, transparent));
--tps-text-whisper: var(--text-disabled, color-mix(in srgb, currentColor 34%, transparent));
/* \u2500\u2500 Color: surfaces \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
--tps-bg-input: var(--input-bg-color,
color-mix(in srgb, currentColor 6%, transparent));
--tps-bg-hover: var(--hover-subtle,
var(--sidebar-bg-hover,
color-mix(in srgb, currentColor 8%, transparent)));
--tps-bg-active: var(--active-bg-color,
color-mix(in srgb, currentColor 12%, transparent));
/* \u2500\u2500 Color: borders / dividers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
--tps-divider: var(--divider-color,
var(--thin-divider-color,
color-mix(in srgb, currentColor 14%, transparent)));
--tps-border: var(--input-border-color,
var(--divider-color,
color-mix(in srgb, currentColor 22%, transparent)));
--tps-border-strong: var(--titlebar-border-color,
var(--selection-border,
color-mix(in srgb, currentColor 32%, transparent)));
/* \u2500\u2500 Color: accent (Thymer uses --logo-color) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
/* Fallback is a real color, never currentColor: an accent that degrades into
the text color fails invisibly. Deliberately the brand mark, not the theme's
--color-primary-500 \u2014 that one is a muted slate on themes like
basalt-bedrock, which would make checked rows harder to read, not easier. */
--tps-accent: var(--logo-color, #04d1ab);
--tps-accent-soft: color-mix(in srgb, var(--tps-accent) 15%, transparent);
--tps-accent-strong: color-mix(in srgb, var(--tps-accent) 80%, var(--tps-text));
/* \u2500\u2500 Color: semantic \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
--tps-danger: var(--enum-red-fg, #ef4444);
--tps-danger-soft: color-mix(in srgb, var(--tps-danger) 15%, transparent);
--tps-warning: var(--text-warning,
var(--enum-yellow-fg, #f59e0b));
--tps-success: var(--enum-green-fg, #10b981);
--tps-success-soft: color-mix(in srgb, var(--tps-success) 12%, transparent);
--tps-on-accent: var(--text-on-accent, light-dark(#111111, #fafafa));
/* Panel chrome */
--tps-panel-bg: var(--panel-bg-color, transparent);
--tps-swatch-inset: color-mix(in srgb, var(--tps-text) 8%, transparent);
/* \u2500\u2500 Typography \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
/* Font is INHERITED from Thymer's panel chrome (see components.css). */
--tps-fs-title: 18px;
--tps-fs-lede: 13px;
--tps-fs-section: 11px;
--tps-fs-hint: 12px;
--tps-fs-label: 13px;
--tps-fs-desc: 12px;
--tps-fs-body: 13px;
--tps-fs-value: 12px;
--tps-fs-button: 12px;
--tps-fs-list-header: 10px;
--tps-lh-tight: 1;
--tps-lh-snug: 1.2;
--tps-lh-base: 1.4;
--tps-lh-loose: 1.5;
--tps-fw-regular: 400;
--tps-fw-medium: 500;
--tps-fw-semibold: 600;
--tps-fw-bold: 700;
--tps-ls-section: 0.06em;
--tps-ls-list: 0.08em;
--tps-ls-title: 0;
/* \u2500\u2500 Spacing (8px scale) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
--tps-space-1: 4px;
--tps-space-2: 8px;
--tps-space-3: 12px;
--tps-space-4: 16px;
--tps-space-5: 24px;
--tps-space-6: 32px;
--tps-space-7: 48px;
/* \u2500\u2500 Radii \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
--tps-radius-sm: 4px;
--tps-radius-md: 6px;
--tps-radius-lg: 8px;
--tps-radius-pill: 999px;
--tps-radius-circle: 50%;
/* \u2500\u2500 Motion \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
--tps-ease-out: cubic-bezier(0.2, 0.6, 0.2, 1);
--tps-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
--tps-dur-fast: 80ms;
--tps-dur-base: 160ms;
--tps-shadow-thumb: 0 1px 3px color-mix(in srgb, var(--tps-text) 28%, transparent);
/* \u2500\u2500 Component dimensions \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
--tps-control-h-sm: 28px;
--tps-control-h-md: 32px;
--tps-input-w: 64px;
--tps-num-step-w: 28px;
--tps-swatch-size: 22px;
--tps-thumb-size: 16px;
--tps-track-h: 6px;
--tps-slider-track: color-mix(in srgb, var(--tps-text) 22%, transparent);
--tps-slider-thumb-border: color-mix(in srgb, var(--tps-text) 28%, transparent);
}
@media (prefers-reduced-motion: reduce) {
.tps-panel.tps-panel {
--tps-dur-fast: 1ms;
--tps-dur-base: 1ms;
}
}
`;
// ../../shared/settings-ui/components.css
var components_default = `/*
* Thymer Plugin Panel \u2014 Component Primitives
*
* All primitives scope under .tps-panel. Plugin-specific styles live elsewhere.
* Reads tokens from tokens.css.
*/
/* \u2500\u2500 Panel root \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
/* Inherit Thymer's font + sizing \u2014 DO NOT override. plugin-collection-icons
demonstrates the right approach: simply \`font-family: inherit\`. Forcing a
custom var fights both Thymer's body font AND the .ti icon font. */
.tps-panel {
font-family: inherit;
font-size: var(--tps-fs-body);
line-height: var(--tps-lh-base);
color: var(--tps-text);
padding: 0 var(--tps-panel-pad-x, var(--tps-space-5)) var(--tps-space-7);
width: 100%;
height: 100%;
box-sizing: border-box;
overflow: auto;
}
.tps-panel *,
.tps-panel *::before,
.tps-panel *::after {
box-sizing: border-box;
}
/* Mono opt-ins are explicit per-element, never via a panel-wide override. */
.tps-panel .tps-num-input,
.tps-panel .tps-slider-value,
.tps-panel .tps-mono,
.tps-panel .tps-mono * {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}
/* \u2500\u2500 Title block \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
.tps-title {
font-size: var(--tps-fs-title);
line-height: var(--tps-lh-snug);
font-weight: var(--tps-fw-semibold);
letter-spacing: var(--tps-ls-title);
color: var(--tps-text);
margin: 0 0 var(--tps-space-1);
}
.tps-lede {
font-size: var(--tps-fs-lede);
line-height: var(--tps-lh-loose);
color: var(--tps-text-muted);
margin: 0 0 var(--tps-space-3);
}
/* \u2500\u2500 Canonical plugin header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
.tps-plugin-header {
position: relative;
margin: var(--tps-space-5) 0 var(--tps-space-5);
padding: 18px var(--tps-space-4);
overflow: hidden;
background:
linear-gradient(to right,
#f26548 8%, #f26548 28%,
#fbac56 28%, #fbac56 48%,
#fff460 48%, #fff460 68%,
#f067a6 68%, #f067a6 88%,
#03bdf2 88%
) top left / 100% 1px no-repeat,
linear-gradient(to right,
#f26548 0%, #f26548 12%,
#fbac56 12%, #fbac56 32%,
#fff460 32%, #fff460 52%,
#f067a6 52%, #f067a6 72%,
#03bdf2 72%, #03bdf2 92%
) bottom left / 100% 1px no-repeat,
var(--tps-panel-bg, var(--panel-bg-color, var(--plg-ci-theme-bg, transparent)));
border-left: 1px solid #f26548;
border-right: 1px solid #03bdf2;
}
.tps-plugin-header-logo {
display: inline-flex;
align-items: center;
justify-content: center;
padding: var(--tps-space-2, 8px);
margin: 0 0 var(--tps-space-3, 12px);
background: var(--tps-bg-hover);
border-radius: var(--tps-radius-md, 6px);
}
.tps-plugin-header-logo-icon {
flex: 0 0 auto;
font-size: 34px;
line-height: 1;
color: var(--tps-text, currentColor);
}
.tps-plugin-header-title {
font-size: 22px;
line-height: var(--tps-lh-snug, 1.2);
font-weight: var(--tps-fw-semibold, 600);
letter-spacing: 0;
color: var(--tps-text, var(--text-default, currentColor));
margin: 0 0 var(--tps-space-3, 12px);
}
.tps-panel .tps-plugin-header-version {
display: inline-flex;
flex: 0 0 auto;
align-items: center;
font-size: 11px;
line-height: inherit;
font-weight: var(--tps-fw-medium, 500);
letter-spacing: 0;
color: var(--tps-text-faint) !important;
white-space: nowrap;
}
.tps-plugin-header-lede {
font-size: 14px;
line-height: var(--tps-lh-base, 1.4);
color: var(--tps-text-muted);
margin: 0 0 var(--tps-space-3, 12px);
}
.tps-plugin-header-helper-wrap {
margin: 0 0 var(--tps-space-3, 12px);
}
.tps-plugin-header-helper-toggle {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 0;
margin: 0;
border: 0;
background: transparent;
color: inherit;
opacity: 0.28;
font: inherit;
font-size: var(--tps-fs-section, 11px);
font-weight: var(--tps-fw-semibold, 600);
line-height: var(--tps-lh-tight, 1);
letter-spacing: var(--tps-ls-section, 0.06em);
text-transform: uppercase;
cursor: pointer;
transition: opacity var(--tps-dur-fast, 80ms) var(--tps-ease-out, ease-out);
}
.tps-plugin-header-helper-toggle:hover {
opacity: 0.72;
}
.tps-plugin-header-helper-toggle:focus-visible {
outline: 1px solid color-mix(in srgb, var(--tps-accent, currentColor) 45%, transparent);
outline-offset: 2px;
}
.tps-plugin-header-helper-icon {
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
width: 13px;
height: 13px;
font-size: 13px;
line-height: 1;
color: inherit;
}
.tps-plugin-header-helper-wrap[data-open="true"] .tps-plugin-header-helper-toggle {
opacity: 0.72;
}
.tps-plugin-header-helper-wrap[data-open="true"] .tps-plugin-header-helper-toggle:hover {
opacity: 1;
}
.tps-plugin-header-helper-body {
display: none;
margin: 8px 0 0;
padding-left: 18px;
}
.tps-plugin-header-helper-wrap[data-open="true"] .tps-plugin-header-helper-body {
display: block;
cursor: pointer;
}
.tps-plugin-header-helper-line {
margin: 0;
font-size: var(--tps-fs-hint, 12px);
line-height: var(--tps-lh-base, 1.4);
color: inherit;
opacity: 0.72;
transition: opacity var(--tps-dur-fast, 80ms) var(--tps-ease-out, ease-out);
}
.tps-plugin-header-helper-wrap[data-open="true"] .tps-plugin-header-helper-body:hover .tps-plugin-header-helper-line {
opacity: 1;
}
/* Scoped .tps-panel on purpose: every plugin injects its own copy of this
file, and older copies baseline-align this row (plus translateY icon
shims). Higher specificity here makes the newest layout win the cascade
war regardless of plugin load order. */
.tps-panel .tps-plugin-header-attr {
position: relative;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0;
width: 100%;
font-size: 11.5px;
line-height: var(--tps-lh-base, 1.4);
color: var(--tps-text-muted);
margin: var(--tps-space-3, 12px) 0 0;
padding-top: var(--tps-space-3, 12px);
border-top: 0;
}
.tps-plugin-header-attr::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: clamp(40%, 50%, 55%);
height: 1px;
background: var(--tps-bg-hover);
}
.tps-plugin-header-link-group + .tps-plugin-header-link-group {
margin-left: var(--tps-space-3, 12px);
padding-left: var(--tps-space-3, 12px);
border-left: 1px solid var(--tps-bg-hover);
}
.tps-panel .tps-plugin-header-icon,
.tps-panel .tps-plugin-header-attr .ti {
display: inline-flex;
flex: 0 0 auto;
align-items: center;
justify-content: center;
width: 12px;
height: 12px;
font-size: 12px;
line-height: 1;
color: var(--tps-text-muted);
margin-right: var(--tps-space-1, 4px);
}
.tps-plugin-header-iconify {
background-color: currentColor;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-size: 100% 100%;
mask-size: 100% 100%;
}
.tps-plugin-header-iconify-github {
--tps-iconify-github: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61-.546-1.385-1.335-1.755-1.335-1.755-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.418-1.305.762-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E");
-webkit-mask-image: var(--tps-iconify-github);
mask-image: var(--tps-iconify-github);
}
.tps-plugin-header-link {
color: inherit;
text-decoration: underline;
text-decoration-color: color-mix(in srgb, currentColor 42%, transparent);
transition: color var(--tps-dur-fast, 80ms) var(--tps-ease-out, ease-out),
text-decoration-color var(--tps-dur-fast, 80ms) var(--tps-ease-out, ease-out),
filter var(--tps-dur-fast, 80ms) var(--tps-ease-out, ease-out);
}
.tps-plugin-header-link--blue,
.tps-plugin-header-link--blue:hover {
color: #03bdf2;
text-decoration-color: #03bdf2;
}
.tps-plugin-header-link--pink,
.tps-plugin-header-link--pink:hover {
color: #f067a6;
text-decoration-color: #f067a6;
}
.tps-plugin-header-link--muted,
.tps-plugin-header-link--muted:hover {
color: var(--tps-text-faint) !important;
text-decoration-color: color-mix(in srgb, currentColor 42%, transparent);
}
.tps-plugin-header-link:hover {
text-decoration: none;
text-decoration-color: transparent;
filter: brightness(1.2);
}
/* \u2500\u2500 Header controls: scope pill + bug report + kill switch \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
/* Settings-scope cluster. Resting: one dim "All devices" pill. Diverged:
pill lights amber (full-perimeter border + tint \u2014 never a single-edge
accent) and the \u2191 push / \u21BA discard icon buttons appear beside it. Amber
rides Thymer's orange enum tokens so it tracks the theme. */
.tps-scope {
display: inline-flex;
align-items: center;
gap: 4px;
}
.tps-scope-pill {
display: inline-flex;
align-items: center;
gap: 5px;
height: 22px;
padding: 0 8px;
border: 1px solid var(--tps-border, rgba(127, 127, 127, 0.16));
border-radius: 999px;
font-size: 10.5px;
line-height: 1;
white-space: nowrap;
color: var(--tps-text-muted);
background: transparent;
user-select: none;
}
.tps-scope-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--tps-text-muted);
opacity: 0.55;
}
/* "This device" is a normal, saved state (per-device settings), NOT a warning \u2014
so it wears the calm brand accent, not an alarming amber. Full-perimeter
border, never a single-edge accent. */
.tps-scope-pill[data-diverged="true"] {
color: var(--tps-accent);
border-color: color-mix(in srgb, var(--tps-accent) 45%, transparent);
background: var(--tps-accent-soft);
}
.tps-scope-pill[data-diverged="true"] .tps-scope-dot {
background: var(--tps-accent);
opacity: 1;
}
.tps-scope-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
padding: 0;
border: 1px solid var(--tps-border, rgba(127, 127, 127, 0.16));
border-radius: var(--tps-radius-sm, 4px);
background: transparent;
color: var(--tps-text-muted);
cursor: pointer;
transition: color var(--tps-dur-fast, 80ms) var(--tps-ease-out, ease-out),
background-color var(--tps-dur-fast, 80ms) var(--tps-ease-out, ease-out),
border-color var(--tps-dur-fast, 80ms) var(--tps-ease-out, ease-out);
}
/* Inline-SVG icons: a viewBox-centered vector in a block box has no font
metrics \u2014 no baseline, no ascent/descent ink drift. The 14px vector in the
22px button gives an exact 4px inset on every side. */
.tps-panel .tps-scope-svg {
display: flex;
width: 14px;
height: 14px;
flex: 0 0 auto;
}
.tps-panel .tps-scope-svg svg {
width: 100%;
height: 100%;
display: block;
}
/* Optical correction for the (still webfont) bug glyph: near-zero descent
rides the ink ~1px high of any line-box centering. */
.tps-panel .tps-plugin-header-bug .ti::before {
display: inline-block;
transform: translateY(1px);
}
.tps-scope-btn:hover {
color: var(--tps-text);
background: var(--tps-bg-hover);
border-color: var(--tps-border);
}
.tps-scope-btn:focus-visible {
outline: 2px solid var(--tps-accent);
outline-offset: 2px;
}
.tps-scope-btn--push:hover {
color: var(--enum-green-fg, #3fa653);
border-color: var(--enum-green-border, rgba(63, 166, 83, 0.45));
background: var(--enum-green-bg, rgba(63, 166, 83, 0.12));
}
/* Armed state must beat the generic :hover recolor (same specificity, order-
dependent) \u2014 scope it up so the icon reddens with the box, hovered or not. */
.tps-panel .tps-scope-btn--discard[data-armed="true"],
.tps-panel .tps-scope-btn--discard[data-armed="true"]:hover {
color: var(--enum-red-fg, #d64545);
border-color: var(--enum-red-border, rgba(214, 69, 69, 0.5));
background: var(--enum-red-bg, rgba(214, 69, 69, 0.12));
}
.tps-scope-btn[disabled] {
opacity: 0.5;
cursor: default;
}
/* \u2500\u2500 Header controls: bug report + kill switch \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
/* Last flex item of the attr row; margin-left:auto pins the group to the
right edge, align-self:center opts out of the row's baseline alignment. */
.tps-plugin-header-controls {
display: inline-flex;
align-items: center;
gap: var(--tps-space-2, 8px);
margin-left: auto;
padding-left: var(--tps-space-3, 12px);
}
/* In-row placement (right of the version link). */
.tps-panel .tps-plugin-header-attr > .tps-plugin-header-bug {
margin-left: var(--tps-space-2, 8px);
}
.tps-plugin-header-bug {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
padding: 0;
border: 1px solid transparent;
border-radius: var(--tps-radius-sm, 4px);
background: transparent;
color: var(--tps-text-muted);
cursor: pointer;
transition: color var(--tps-dur-fast, 80ms) var(--tps-ease-out, ease-out),
background-color var(--tps-dur-fast, 80ms) var(--tps-ease-out, ease-out),
border-color var(--tps-dur-fast, 80ms) var(--tps-ease-out, ease-out);
}
/* Undo the attr row's generic .ti treatment (translateY + margin) inside the button. */
.tps-panel .tps-plugin-header-bug .ti {
width: 14px;
height: 14px;
font-size: 14px;
transform: none;
margin: 0;
}
.tps-plugin-header-bug:hover {
color: var(--tps-text);
background: var(--tps-bg-hover);
border-color: var(--tps-border);
}
.tps-plugin-header-bug:focus-visible {
outline: 2px solid var(--tps-accent);
outline-offset: 2px;
}
.tps-switch {
position: relative;
display: inline-flex;
flex: 0 0 auto;
width: 30px;
height: 16px;
padding: 0;
border: 1px solid var(--tps-border);
border-radius: var(--tps-radius-pill, 999px);
background: var(--tps-bg-input);
cursor: pointer;
transition: background-color var(--tps-dur-base, 160ms) var(--tps-ease-out, ease-out),
border-color var(--tps-dur-base, 160ms) var(--tps-ease-out, ease-out);
}
.tps-switch-knob {
position: absolute;
top: 1px;
left: 1px;
width: 12px;
height: 12px;
border-radius: var(--tps-radius-circle, 50%);
background: var(--tps-text-muted);
transition: transform var(--tps-dur-base, 160ms) var(--tps-ease-out, ease-out),
background-color var(--tps-dur-base, 160ms) var(--tps-ease-out, ease-out);
}
.tps-switch[aria-checked="true"] {
background: var(--tps-accent);
border-color: var(--tps-accent);
}
.tps-switch[aria-checked="true"] .tps-switch-knob {
transform: translateX(14px);
background: var(--tps-on-accent, #fff);
}
.tps-switch:focus-visible {
outline: 2px solid var(--tps-accent);
outline-offset: 2px;
}
.tps-switch[data-busy],
.tps-switch:disabled {
opacity: 0.55;
pointer-events: none;
}
/* Off-state "safe mode": dim the body, keep it interactive \u2014 edits stage in the
plugin's local drafts and apply on re-enable. Keyed off the pill's aria state
so the optimistic flip dims instantly and heal re-renders stay correct with
no JS. The header (pill, bug button, off-note) stays full opacity \u2014 exclude
any direct child containing it (collection-icons wraps the header in a row
element, so exclude by content, not class). */
.tps-panel:has(.tps-plugin-header .tps-switch[aria-checked="false"]) > :not(:has(.tps-plugin-header)) {
opacity: 0.65;
transition: opacity var(--tps-dur-base, 160ms) var(--tps-ease-out, ease-out);
}
/* Rendered whenever the header has a kill switch; shown only while it's off. */
.tps-plugin-header-off-note {
display: none;
margin: var(--tps-space-2, 8px) 0 0;
font-size: var(--tps-fs-hint, 12px);
line-height: var(--tps-lh-base, 1.4);
color: var(--tps-text-muted);
}
.tps-plugin-header:has(.tps-switch[aria-checked="false"]) .tps-plugin-header-off-note {
display: block;
}
/* \u2500\u2500 Feedback dialog (panel-scoped modal) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
/* The overlay positions against the .tps-panel root (the scroll container). */
.tps-panel {
position: relative;
}
.tps-feedback-overlay {
position: absolute;
left: 0;
right: 0;
z-index: 50;
display: flex;
align-items: center;
justify-content: center;
padding: var(--tps-space-4);
background: color-mix(in srgb, var(--panel-bg-color, light-dark(#ffffff, #131316)) 55%, transparent);
-webkit-backdrop-filter: blur(6px);
backdrop-filter: blur(6px);
}
@supports not ((backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px))) {
.tps-feedback-overlay {
background: color-mix(in srgb, var(--panel-bg-color, light-dark(#ffffff, #131316)) 90%, transparent);
}
}
/* Flex column with a growing description field: the card stretches to the
available panel height (capped) and the textarea absorbs the difference,
so the card itself never needs a scrollbar. */
.tps-feedback-card {
display: flex;
flex-direction: column;
width: min(440px, 100%);
height: min(760px, 100%);
overflow: auto;
background: var(--panel-bg-color, light-dark(#ffffff, #17171b));
border: 1px solid var(--tps-border);
border-radius: var(--tps-radius-lg);
padding: var(--tps-space-4);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
/* Rows keep their natural height \u2014 when content doesn't fit (e.g. the system
report drawer opens in a short panel) the CARD scrolls; rows must never be
squeezed into overlapping each other. Only the description field flexes. */
.tps-feedback-card > * {
flex: 0 0 auto;
}
.tps-feedback-card > .tps-feedback-field--grow {
flex: 1 1 auto;
}
.tps-feedback-field--grow {
display: flex;
flex-direction: column;
}
.tps-feedback-field--grow .tps-feedback-textarea {
flex: 1 1 auto;
min-height: 72px;
}
.tps-feedback-head {
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 0 var(--tps-space-2);
}
.tps-feedback-title {
margin: 0;
font-size: var(--tps-fs-label, 12.5px);
font-weight: var(--tps-fw-semibold, 600);
letter-spacing: var(--tps-ls-section, 0.06em);
text-transform: uppercase;
color: var(--tps-text);
}
.tps-feedback-close {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
padding: 0;
border: 1px solid transparent;
border-radius: var(--tps-radius-sm, 4px);
background: transparent;
color: var(--tps-text-muted);
cursor: pointer;
font-size: 14px;
}
.tps-feedback-close:hover {
color: var(--tps-text);
background: var(--tps-bg-hover);
border-color: var(--tps-border);
}
.tps-feedback-close:focus-visible {
outline: 2px solid var(--tps-accent);
outline-offset: 2px;
}
.tps-feedback-hint {
margin: 0 0 var(--tps-space-3);
font-size: var(--tps-fs-hint, 12px);
line-height: var(--tps-lh-base, 1.4);
color: var(--tps-text-muted);
}
.tps-feedback-field {
display: block;
margin: 0 0 var(--tps-space-3);
}
.tps-feedback-label {
display: block;
margin: 0 0 var(--tps-space-1);
font-size: var(--tps-fs-label, 12.5px);
font-weight: var(--tps-fw-medium, 500);
color: var(--tps-text);
}
.tps-feedback-input,
.tps-feedback-textarea {
width: 100%;
padding: var(--tps-space-1, 4px) var(--tps-space-2, 8px);
font-family: inherit;
font-size: var(--tps-fs-body, 13px);
line-height: var(--tps-lh-base, 1.4);
color: var(--tps-text);
background: var(--tps-bg-input);
border: 1px solid var(--tps-border);
border-radius: var(--tps-radius-sm, 4px);
}
.tps-feedback-textarea {
resize: vertical;
min-height: 72px;
}
.tps-feedback-input:focus,
.tps-feedback-textarea:focus {
outline: none;
border-color: color-mix(in srgb, var(--tps-accent) 60%, transparent);
}
.tps-feedback-input[aria-invalid="true"],
.tps-feedback-textarea[aria-invalid="true"] {
border-color: var(--tps-danger);
}
.tps-feedback-details {
margin: 0 0 var(--tps-space-3);
}
.tps-feedback-summary {
font-size: var(--tps-fs-hint, 12px);
color: var(--tps-text-muted);
cursor: pointer;
}
.tps-feedback-summary:hover {
color: var(--tps-text);
}
.tps-feedback-report {
margin: var(--tps-space-2) 0 0;
padding: var(--tps-space-2);
max-height: 140px;
overflow: auto;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
font-size: 11px;
line-height: 1.5;
white-space: pre-wrap;
word-break: break-word;
color: var(--tps-text-muted);
background: var(--tps-bg-input);
border: 1px solid var(--tps-divider);
border-radius: var(--tps-radius-sm, 4px);
}
/* Themed thin scrollbars \u2014 the card (short panels) and the report pre both scroll. */
.tps-feedback-card,
.tps-feedback-report {
scrollbar-width: thin;
scrollbar-color: var(--tps-border, rgba(127, 127, 127, 0.25)) transparent;
}
.tps-feedback-card::-webkit-scrollbar,
.tps-feedback-report::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.tps-feedback-card::-webkit-scrollbar-track,
.tps-feedback-report::-webkit-scrollbar-track {
background: transparent;
}
.tps-feedback-card::-webkit-scrollbar-thumb,
.tps-feedback-report::-webkit-scrollbar-thumb {
background: var(--tps-border, rgba(127, 127, 127, 0.25));
border-radius: 999px;
border: 2px solid transparent;
background-clip: padding-box;
}
.tps-feedback-actions {
display: flex;
justify-content: flex-end;
gap: var(--tps-space-2);
}
/* \u2500\u2500 Section \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
.tps-section {
padding: 0;
}
.tps-section + .tps-section {
border-top: 1px solid var(--tps-divider);
margin-top: var(--tps-space-4);
padding-top: var(--tps-space-4);
}
.tps-section-label {
display: block;
font-size: var(--tps-fs-section);
line-height: var(--tps-lh-tight);
font-weight: var(--tps-fw-semibold);
letter-spacing: var(--tps-ls-section);
text-transform: uppercase;
color: var(--tps-text-muted);
margin: 0 0 var(--tps-space-2);
}
.tps-section-hint {
font-size: var(--tps-fs-hint);
line-height: var(--tps-lh-base);
color: var(--tps-text-muted);
margin: 0 0 var(--tps-space-3);
}
.tps-section-body {
display: flex;
flex-direction: column;
gap: var(--tps-space-3);
margin-top: var(--tps-space-2);
}
.tps-section-body:first-child {
margin-top: 0;
}
/* When the body is full of list rows (mode rows), drop the gap and the top
margin entirely so the first row's hover background sits flush under the
section label and adjacent rows tile with no dead space between them. */
.tps-section-body:has(> .tps-list-row),
.tps-section-body:has(> .tps-opt) {
margin-top: 0;
gap: 0;
}
/* Collapsible variant: header is a button, body is hidden when closed */
.tps-section--collapsible > .tps-section-header {
display: flex;
align-items: center;
gap: var(--tps-space-2);
width: 100%;
min-height: 34px;
padding: 0;
margin: 0 0 var(--tps-space-2);