-
Notifications
You must be signed in to change notification settings - Fork 588
Expand file tree
/
Copy path.theme-schema.json
More file actions
1247 lines (1247 loc) · 31.8 KB
/
.theme-schema.json
File metadata and controls
1247 lines (1247 loc) · 31.8 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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThemeSet",
"description": "Represents a theme configuration.",
"type": "object",
"properties": {
"name": {
"description": "The name of the theme set.",
"type": "string",
"default": ""
},
"author": {
"description": "The author of the theme.",
"type": ["string", "null"],
"default": null
},
"url": {
"description": "The URL of the theme.",
"type": ["string", "null"],
"default": null
},
"themes": {
"type": "array",
"items": {
"$ref": "#/$defs/ThemeConfig"
},
"default": []
}
},
"required": ["name", "themes"],
"$defs": {
"ThemeConfig": {
"type": "object",
"properties": {
"name": {
"description": "The name of the theme.",
"type": "string",
"default": ""
},
"mode": {
"description": "The mode of the theme, default is light.",
"$ref": "#/$defs/ThemeMode",
"default": "light"
},
"font.size": {
"description": "The base font size, default is 16.",
"type": ["number", "null"],
"format": "float",
"default": 16
},
"font.family": {
"description": "The base font family, default is system font: `.SystemUIFont`.",
"type": ["string", "null"],
"default": ".SystemUIFont"
},
"mono_font.size": {
"description": "The base monospace font size, default is 13.",
"type": ["number", "null"],
"format": "float",
"default": 13
},
"mono_font.family": {
"description": "The monospace font family, default is platform specific:\nmacOS: `Menlo`\n- Windows: `Consolas`\n- Linux: `DejaVu Sans Mono`",
"type": ["string", "null"],
"default": null
},
"radius": {
"description": "The border radius for general elements, default is 6.",
"type": ["number", "null"],
"default": 6
},
"radius.lg": {
"description": "The border radius for large elements like Dialogs and Notifications, default is 8.",
"type": ["number", "null"],
"default": 8
},
"shadow": {
"description": "Set shadows in the theme, for example the Input and Button, default is true.",
"type": ["boolean", "null"],
"default": true
},
"colors": {
"description": "The colors of the theme.",
"$ref": "#/$defs/ThemeConfigColors",
"default": {
"accent.background": null,
"accent.foreground": null,
"background": null,
"border": null,
"danger.background": null,
"foreground": null,
"muted.background": null,
"muted.foreground": null,
"primary.background": null,
"primary.foreground": null,
"secondary.background": null,
"secondary.foreground": null,
"base.blue": null,
"base.cyan": null,
"base.green": null,
"base.magenta": null,
"base.red": null,
"base.yellow": null
}
},
"highlight": {
"description": "The highlight theme, this part is combilbility with `style` section in Zed theme.\n\nhttps://github.com/zed-industries/zed/blob/f50041779dcfd7a76c8aec293361c60c53f02d51/assets/themes/ayu/ayu.json#L9",
"anyOf": [
{
"$ref": "#/$defs/HighlightThemeStyle"
},
{
"type": "null"
}
],
"default": null
}
},
"required": ["name", "mode", "colors"]
},
"ThemeMode": {
"type": "string",
"enum": ["light", "dark"]
},
"ThemeConfigColors": {
"type": "object",
"properties": {
"accent.background": {
"description": "Used for accents such as hover background on MenuItem, ListItem, etc.",
"type": ["string", "null"]
},
"accent.foreground": {
"description": "Used for accent text color.",
"type": ["string", "null"]
},
"accordion.background": {
"description": "Accordion background color.",
"type": ["string", "null"]
},
"accordion.hover.background": {
"description": "Accordion hover background color.",
"type": ["string", "null"]
},
"background": {
"description": "Default background color.",
"type": ["string", "null"]
},
"border": {
"description": "Default border color",
"type": ["string", "null"]
},
"caret": {
"description": "Input caret color (Blinking cursor).",
"type": ["string", "null"]
},
"chart.1": {
"description": "Chart 1 color.",
"type": ["string", "null"]
},
"chart.2": {
"description": "Chart 2 color.",
"type": ["string", "null"]
},
"chart.3": {
"description": "Chart 3 color.",
"type": ["string", "null"]
},
"chart.4": {
"description": "Chart 4 color.",
"type": ["string", "null"]
},
"chart.5": {
"description": "Chart 5 color.",
"type": ["string", "null"]
},
"danger.background": {
"description": "Danger background color.",
"type": ["string", "null"]
},
"danger.active.background": {
"description": "Danger active background color.",
"type": ["string", "null"]
},
"danger.foreground": {
"description": "Danger text color.",
"type": ["string", "null"]
},
"danger.hover.background": {
"description": "Danger hover background color.",
"type": ["string", "null"]
},
"description_list.label.background": {
"description": "Description List label background color.",
"type": ["string", "null"]
},
"description_list.label.foreground": {
"description": "Description List label foreground color.",
"type": ["string", "null"]
},
"drag.border": {
"description": "Drag border color.",
"type": ["string", "null"]
},
"drop_target.background": {
"description": "Drop target background color.",
"type": ["string", "null"]
},
"foreground": {
"description": "Default text color.",
"type": ["string", "null"]
},
"group_box.background": {
"description": "Background color for GroupBox.",
"type": ["string", "null"]
},
"group_box.foreground": {
"description": "Foreground color for GroupBox.",
"type": ["string", "null"]
},
"group_box.title.foreground": {
"description": "Title text color for GroupBox.",
"type": ["string", "null"]
},
"info.background": {
"description": "Info background color.",
"type": ["string", "null"]
},
"info.active.background": {
"description": "Info active background color.",
"type": ["string", "null"]
},
"info.foreground": {
"description": "Info text color.",
"type": ["string", "null"]
},
"info.hover.background": {
"description": "Info hover background color.",
"type": ["string", "null"]
},
"input.border": {
"description": "Border color for inputs such as Input, Select, etc.",
"type": ["string", "null"]
},
"link": {
"description": "Link text color.",
"type": ["string", "null"]
},
"link.active": {
"description": "Active link text color.",
"type": ["string", "null"]
},
"link.hover": {
"description": "Hover link text color.",
"type": ["string", "null"]
},
"list.background": {
"description": "Background color for List and ListItem.",
"type": ["string", "null"]
},
"list.active.background": {
"description": "Background color for active ListItem.",
"type": ["string", "null"]
},
"list.active.border": {
"description": "Border color for active ListItem.",
"type": ["string", "null"]
},
"list.even.background": {
"description": "Stripe background color for even ListItem.",
"type": ["string", "null"]
},
"list.head.background": {
"description": "Background color for List header.",
"type": ["string", "null"]
},
"list.hover.background": {
"description": "Hover background color for ListItem.",
"type": ["string", "null"]
},
"muted.background": {
"description": "Muted backgrounds such as Skeleton and Switch.",
"type": ["string", "null"]
},
"muted.foreground": {
"description": "Muted text color, as used in disabled text.",
"type": ["string", "null"]
},
"popover.background": {
"description": "Background color for Popover.",
"type": ["string", "null"]
},
"popover.foreground": {
"description": "Text color for Popover.",
"type": ["string", "null"]
},
"primary.background": {
"description": "Primary background color.",
"type": ["string", "null"]
},
"primary.active.background": {
"description": "Active primary background color.",
"type": ["string", "null"]
},
"primary.foreground": {
"description": "Primary text color.",
"type": ["string", "null"]
},
"primary.hover.background": {
"description": "Hover primary background color.",
"type": ["string", "null"]
},
"progress.bar.background": {
"description": "Progress bar background color.",
"type": ["string", "null"]
},
"ring": {
"description": "Used for focus ring.",
"type": ["string", "null"]
},
"scrollbar.background": {
"description": "Scrollbar background color.",
"type": ["string", "null"]
},
"scrollbar.thumb.background": {
"description": "Scrollbar thumb background color.",
"type": ["string", "null"]
},
"scrollbar.thumb.hover.background": {
"description": "Scrollbar thumb hover background color.",
"type": ["string", "null"]
},
"secondary.background": {
"description": "Secondary background color.",
"type": ["string", "null"]
},
"secondary.active.background": {
"description": "Active secondary background color.",
"type": ["string", "null"]
},
"secondary.foreground": {
"description": "Secondary text color, used for secondary Button text color or secondary text.",
"type": ["string", "null"]
},
"secondary.hover.background": {
"description": "Hover secondary background color.",
"type": ["string", "null"]
},
"selection.background": {
"description": "Input selection background color.",
"type": ["string", "null"]
},
"sidebar.background": {
"description": "Sidebar background color.",
"type": ["string", "null"]
},
"sidebar.accent.background": {
"description": "Sidebar accent background color.",
"type": ["string", "null"]
},
"sidebar.accent.foreground": {
"description": "Sidebar accent text color.",
"type": ["string", "null"]
},
"sidebar.border": {
"description": "Sidebar border color.",
"type": ["string", "null"]
},
"sidebar.foreground": {
"description": "Sidebar text color.",
"type": ["string", "null"]
},
"sidebar.primary.background": {
"description": "Sidebar primary background color.",
"type": ["string", "null"]
},
"sidebar.primary.foreground": {
"description": "Sidebar primary text color.",
"type": ["string", "null"]
},
"skeleton.background": {
"description": "Skeleton background color.",
"type": ["string", "null"]
},
"slider.background": {
"description": "Slider bar background color.",
"type": ["string", "null"]
},
"slider.thumb.background": {
"description": "Slider thumb background color.",
"type": ["string", "null"]
},
"success.background": {
"description": "Success background color.",
"type": ["string", "null"]
},
"success.foreground": {
"description": "Success text color.",
"type": ["string", "null"]
},
"success.hover.background": {
"description": "Success hover background color.",
"type": ["string", "null"]
},
"success.active.background": {
"description": "Success active background color.",
"type": ["string", "null"]
},
"switch.background": {
"description": "Switch background color.",
"type": ["string", "null"]
},
"switch.thumb.background": {
"description": "Switch thumb background color.",
"type": ["string", "null"]
},
"tab.background": {
"description": "Tab background color.",
"type": ["string", "null"]
},
"tab.active.background": {
"description": "Tab active background color.",
"type": ["string", "null"]
},
"tab.active.foreground": {
"description": "Tab active text color.",
"type": ["string", "null"]
},
"tab_bar.background": {
"description": "TabBar background color.",
"type": ["string", "null"]
},
"tab_bar.segmented.background": {
"description": "TabBar segmented background color.",
"type": ["string", "null"]
},
"tab.foreground": {
"description": "Tab text color.",
"type": ["string", "null"]
},
"table.background": {
"description": "Table background color.",
"type": ["string", "null"]
},
"table.active.background": {
"description": "Table active item background color.",
"type": ["string", "null"]
},
"table.active.border": {
"description": "Table active item border color.",
"type": ["string", "null"]
},
"table.even.background": {
"description": "Stripe background color for even TableRow.",
"type": ["string", "null"]
},
"table.head.background": {
"description": "Table header background color.",
"type": ["string", "null"]
},
"table.head.foreground": {
"description": "Table header text color.",
"type": ["string", "null"]
},
"table.foot.background": {
"description": "Table footer background color.",
"type": ["string", "null"]
},
"table.foot.foreground": {
"description": "Table footer text color.",
"type": ["string", "null"]
},
"table.hover.background": {
"description": "Table item hover background color.",
"type": ["string", "null"]
},
"table.row.border": {
"description": "Table row border color.",
"type": ["string", "null"]
},
"title_bar.background": {
"description": "TitleBar background color, use for Window title bar.",
"type": ["string", "null"]
},
"title_bar.border": {
"description": "TitleBar border color.",
"type": ["string", "null"]
},
"tiles.background": {
"description": "Background color for Tiles.",
"type": ["string", "null"]
},
"warning.background": {
"description": "Warning background color.",
"type": ["string", "null"]
},
"warning.active.background": {
"description": "Warning active background color.",
"type": ["string", "null"]
},
"warning.hover.background": {
"description": "Warning hover background color.",
"type": ["string", "null"]
},
"warning.foreground": {
"description": "Warning foreground color.",
"type": ["string", "null"]
},
"overlay": {
"description": "Overlay background color.",
"type": ["string", "null"]
},
"window.border": {
"description": "Window border color.\n\n# Platform specific:\n\nThis is only works on Linux, other platforms we can't change the window border color.",
"type": ["string", "null"]
},
"base.blue": {
"description": "Base blue color.",
"type": ["string", "null"]
},
"base.blue.light": {
"description": "Base light blue color.",
"type": ["string", "null"]
},
"base.cyan": {
"description": "Base cyan color.",
"type": ["string", "null"]
},
"base.cyan.light": {
"description": "Base light cyan color.",
"type": ["string", "null"]
},
"base.green": {
"description": "Base green color.",
"type": ["string", "null"]
},
"base.green.light": {
"description": "Base light green color.",
"type": ["string", "null"]
},
"base.magenta": {
"description": "Base magenta color.",
"type": ["string", "null"]
},
"base.magenta.light": {
"type": ["string", "null"]
},
"base.red": {
"description": "Base red color.",
"type": ["string", "null"]
},
"base.red.light": {
"description": "Base light red color.",
"type": ["string", "null"]
},
"base.yellow": {
"description": "Base yellow color.",
"type": ["string", "null"]
},
"base.yellow.light": {
"description": "Base light yellow color.",
"type": ["string", "null"]
}
},
"required": [
"accent.background",
"accent.foreground",
"background",
"border",
"foreground",
"muted.background",
"muted.foreground",
"primary.background",
"primary.foreground",
"base.blue",
"base.cyan",
"base.green",
"base.magenta",
"base.red",
"base.yellow"
]
},
"HighlightThemeStyle": {
"type": "object",
"properties": {
"editor.background": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"editor.foreground": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"editor.active_line.background": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"editor.line_number": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"editor.active_line_number": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"error.background": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"error.border": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"warning": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"warning.background": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"warning.border": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"info": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"info.background": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"info.border": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"success": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"success.background": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"success.border": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"hint": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"hint.background": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"hint.border": {
"anyOf": [
{
"$ref": "#/$defs/Rgba"
},
{
"type": "null"
}
]
},
"syntax": {
"$ref": "#/$defs/SyntaxColors"
}
},
"required": ["syntax"]
},
"Rgba": {
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
},
"SyntaxColors": {
"description": "Theme for Tree-sitter Highlight\n\nhttps://docs.rs/tree-sitter-highlight/0.25.4/tree_sitter_highlight/",
"type": "object",
"properties": {
"attribute": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"boolean": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"comment": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"comment_doc": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"constant": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"constructor": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"embedded": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"emphasis": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"emphasis.strong": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"enum": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"function": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"hint": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"label": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"link_text": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"link_uri": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"number": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"predictive": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"preproc": {
"anyOf": [
{
"$ref": "#/$defs/ThemeStyle"
},
{
"type": "null"
}
]
},
"primary": {
"anyOf": [