@weasel-js/theme 1.9.4 → 1.10.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/README.md +44 -4
- package/dist/{chunk-7LCRXZDY.js → chunk-2PY2YTDY.js} +5 -54
- package/dist/chunk-2PY2YTDY.js.map +1 -0
- package/dist/chunk-3NIEJ77B.js +245 -0
- package/dist/chunk-3NIEJ77B.js.map +1 -0
- package/dist/{chunk-EFGZ56CE.js → chunk-JX2OC444.js} +169 -159
- package/dist/chunk-JX2OC444.js.map +1 -0
- package/dist/chunk-P5F3GZV6.js +54 -0
- package/dist/chunk-P5F3GZV6.js.map +1 -0
- package/dist/{definition-GS7_Kz9D.d.ts → definition-CSeERbSL.d.ts} +79 -21
- package/dist/engine.d.ts +11 -15
- package/dist/engine.js +153 -2
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +38 -3
- package/dist/index.js +46 -25
- package/dist/index.js.map +1 -1
- package/dist/react.d.ts +15 -4
- package/dist/react.js +16 -7
- package/dist/react.js.map +1 -1
- package/dist/themes/platinum.d.ts +22 -0
- package/dist/themes/platinum.js +802 -0
- package/dist/themes/platinum.js.map +1 -0
- package/dist/themes/win9x.d.ts +16 -0
- package/dist/themes/win9x.js +788 -0
- package/dist/themes/win9x.js.map +1 -0
- package/dist/tokens.css +24 -1
- package/package.json +11 -3
- package/dist/chunk-7LCRXZDY.js.map +0 -1
- package/dist/chunk-EFGZ56CE.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isByAxis } from './chunk-P5F3GZV6.js';
|
|
2
2
|
import { isPlainObject } from '@weasel-js/registry';
|
|
3
3
|
|
|
4
4
|
// src/generated/themes.ts
|
|
@@ -63,6 +63,7 @@ var THEMES = {
|
|
|
63
63
|
"--wzl-secondary-fg": "#dc9d15",
|
|
64
64
|
"--wzl-fg-inverse": "#0e0f12",
|
|
65
65
|
"--wzl-shadow": "rgba(0, 0, 0, 0.6)",
|
|
66
|
+
"--wzl-scrim": "rgba(0, 0, 0, 0.4)",
|
|
66
67
|
"--wzl-code-keyword": "#955cf9",
|
|
67
68
|
"--wzl-code-string": "#48e628",
|
|
68
69
|
"--wzl-code-number": "#e69628",
|
|
@@ -122,6 +123,7 @@ var THEMES = {
|
|
|
122
123
|
"--wzl-fg-on-accent": "#f5f5f6",
|
|
123
124
|
"--wzl-line": "rgba(230, 231, 233, 0.2)",
|
|
124
125
|
"--wzl-line-strong": "rgba(230, 231, 233, 0.4)",
|
|
126
|
+
"--wzl-border-on-sunken": "rgba(230, 231, 233, 0.12)",
|
|
125
127
|
"--wzl-curve-color": "#8c94ee",
|
|
126
128
|
"--wzl-accent-hover": "#8c94ee",
|
|
127
129
|
"--wzl-secondary": "#dc9d15",
|
|
@@ -151,19 +153,26 @@ var THEMES = {
|
|
|
151
153
|
"--wzl-handle-size": "9px",
|
|
152
154
|
"--wzl-handle-size-sm": "7px",
|
|
153
155
|
"--wzl-handle-size-lg": "10px",
|
|
156
|
+
"--wzl-handle-dot-size": "8px",
|
|
157
|
+
"--wzl-handle-dot-size-sm": "7px",
|
|
154
158
|
"--wzl-checker-a": "#25272c",
|
|
155
159
|
"--wzl-checker-b": "#181a1e",
|
|
156
160
|
"--wzl-checker-size": "8px",
|
|
157
161
|
"--wzl-workspace-surface": "#0e0f12",
|
|
158
162
|
"--wzl-workspace-line": "rgba(230, 231, 233, 0.1)",
|
|
159
163
|
"--wzl-field-pad-x": "8px",
|
|
164
|
+
"--wzl-gloss": "0",
|
|
160
165
|
"--wzl-font-size": "13px",
|
|
161
166
|
"--wzl-tracking-none": "0",
|
|
162
167
|
"--wzl-tracking-wide": "0.06em",
|
|
163
168
|
"--wzl-tracking-wider": "0.08em",
|
|
164
169
|
"--wzl-z-toolbar": "10",
|
|
165
170
|
"--wzl-z-overlay": "20",
|
|
166
|
-
"--wzl-z-
|
|
171
|
+
"--wzl-z-hud": "900",
|
|
172
|
+
"--wzl-z-modal": "1000",
|
|
173
|
+
"--wzl-z-toast": "1100",
|
|
174
|
+
"--wzl-z-popover": "1200",
|
|
175
|
+
"--wzl-z-drag": "10000",
|
|
167
176
|
"--wzl-leading-tight": "1",
|
|
168
177
|
"--wzl-leading-snug": "1.2",
|
|
169
178
|
"--wzl-leading": "1.4",
|
|
@@ -241,6 +250,7 @@ var THEMES = {
|
|
|
241
250
|
"--wzl-secondary-fg": "#dc9d15",
|
|
242
251
|
"--wzl-fg-inverse": "#0e0f12",
|
|
243
252
|
"--wzl-shadow": "rgba(0, 0, 0, 0.6)",
|
|
253
|
+
"--wzl-scrim": "rgba(0, 0, 0, 0.4)",
|
|
244
254
|
"--wzl-code-keyword": "#955cf9",
|
|
245
255
|
"--wzl-code-string": "#48e628",
|
|
246
256
|
"--wzl-code-number": "#e69628",
|
|
@@ -300,6 +310,7 @@ var THEMES = {
|
|
|
300
310
|
"--wzl-fg-on-accent": "#f5f5f6",
|
|
301
311
|
"--wzl-line": "rgba(230, 231, 233, 0.2)",
|
|
302
312
|
"--wzl-line-strong": "rgba(230, 231, 233, 0.4)",
|
|
313
|
+
"--wzl-border-on-sunken": "rgba(230, 231, 233, 0.12)",
|
|
303
314
|
"--wzl-curve-color": "#8c94ee",
|
|
304
315
|
"--wzl-accent-hover": "#8c94ee",
|
|
305
316
|
"--wzl-secondary": "#dc9d15",
|
|
@@ -329,19 +340,26 @@ var THEMES = {
|
|
|
329
340
|
"--wzl-handle-size": "9px",
|
|
330
341
|
"--wzl-handle-size-sm": "7px",
|
|
331
342
|
"--wzl-handle-size-lg": "10px",
|
|
343
|
+
"--wzl-handle-dot-size": "8px",
|
|
344
|
+
"--wzl-handle-dot-size-sm": "7px",
|
|
332
345
|
"--wzl-checker-a": "#25272c",
|
|
333
346
|
"--wzl-checker-b": "#181a1e",
|
|
334
347
|
"--wzl-checker-size": "8px",
|
|
335
348
|
"--wzl-workspace-surface": "#0e0f12",
|
|
336
349
|
"--wzl-workspace-line": "rgba(230, 231, 233, 0.1)",
|
|
337
350
|
"--wzl-field-pad-x": "8px",
|
|
351
|
+
"--wzl-gloss": "0",
|
|
338
352
|
"--wzl-font-size": "15px",
|
|
339
353
|
"--wzl-tracking-none": "0",
|
|
340
354
|
"--wzl-tracking-wide": "0.06em",
|
|
341
355
|
"--wzl-tracking-wider": "0.08em",
|
|
342
356
|
"--wzl-z-toolbar": "10",
|
|
343
357
|
"--wzl-z-overlay": "20",
|
|
344
|
-
"--wzl-z-
|
|
358
|
+
"--wzl-z-hud": "900",
|
|
359
|
+
"--wzl-z-modal": "1000",
|
|
360
|
+
"--wzl-z-toast": "1100",
|
|
361
|
+
"--wzl-z-popover": "1200",
|
|
362
|
+
"--wzl-z-drag": "10000",
|
|
345
363
|
"--wzl-leading-tight": "1",
|
|
346
364
|
"--wzl-leading-snug": "1.2",
|
|
347
365
|
"--wzl-leading": "1.4",
|
|
@@ -419,6 +437,7 @@ var THEMES = {
|
|
|
419
437
|
"--wzl-secondary-fg": "#dc9d15",
|
|
420
438
|
"--wzl-fg-inverse": "#0e0f12",
|
|
421
439
|
"--wzl-shadow": "rgba(0, 0, 0, 0.6)",
|
|
440
|
+
"--wzl-scrim": "rgba(0, 0, 0, 0.4)",
|
|
422
441
|
"--wzl-code-keyword": "#955cf9",
|
|
423
442
|
"--wzl-code-string": "#48e628",
|
|
424
443
|
"--wzl-code-number": "#e69628",
|
|
@@ -478,6 +497,7 @@ var THEMES = {
|
|
|
478
497
|
"--wzl-fg-on-accent": "#f5f5f6",
|
|
479
498
|
"--wzl-line": "rgba(230, 231, 233, 0.2)",
|
|
480
499
|
"--wzl-line-strong": "rgba(230, 231, 233, 0.4)",
|
|
500
|
+
"--wzl-border-on-sunken": "rgba(230, 231, 233, 0.12)",
|
|
481
501
|
"--wzl-curve-color": "#8c94ee",
|
|
482
502
|
"--wzl-accent-hover": "#8c94ee",
|
|
483
503
|
"--wzl-secondary": "#dc9d15",
|
|
@@ -507,19 +527,26 @@ var THEMES = {
|
|
|
507
527
|
"--wzl-handle-size": "9px",
|
|
508
528
|
"--wzl-handle-size-sm": "7px",
|
|
509
529
|
"--wzl-handle-size-lg": "10px",
|
|
530
|
+
"--wzl-handle-dot-size": "8px",
|
|
531
|
+
"--wzl-handle-dot-size-sm": "7px",
|
|
510
532
|
"--wzl-checker-a": "#25272c",
|
|
511
533
|
"--wzl-checker-b": "#181a1e",
|
|
512
534
|
"--wzl-checker-size": "8px",
|
|
513
535
|
"--wzl-workspace-surface": "#0e0f12",
|
|
514
536
|
"--wzl-workspace-line": "rgba(230, 231, 233, 0.1)",
|
|
515
537
|
"--wzl-field-pad-x": "8px",
|
|
538
|
+
"--wzl-gloss": "0",
|
|
516
539
|
"--wzl-font-size": "18px",
|
|
517
540
|
"--wzl-tracking-none": "0",
|
|
518
541
|
"--wzl-tracking-wide": "0.06em",
|
|
519
542
|
"--wzl-tracking-wider": "0.08em",
|
|
520
543
|
"--wzl-z-toolbar": "10",
|
|
521
544
|
"--wzl-z-overlay": "20",
|
|
522
|
-
"--wzl-z-
|
|
545
|
+
"--wzl-z-hud": "900",
|
|
546
|
+
"--wzl-z-modal": "1000",
|
|
547
|
+
"--wzl-z-toast": "1100",
|
|
548
|
+
"--wzl-z-popover": "1200",
|
|
549
|
+
"--wzl-z-drag": "10000",
|
|
523
550
|
"--wzl-leading-tight": "1",
|
|
524
551
|
"--wzl-leading-snug": "1.2",
|
|
525
552
|
"--wzl-leading": "1.4",
|
|
@@ -597,6 +624,7 @@ var THEMES = {
|
|
|
597
624
|
"--wzl-secondary-fg": "#016458",
|
|
598
625
|
"--wzl-fg-inverse": "#f5f5f6",
|
|
599
626
|
"--wzl-shadow": "rgba(0, 0, 0, 0.18)",
|
|
627
|
+
"--wzl-scrim": "rgba(0, 0, 0, 0.4)",
|
|
600
628
|
"--wzl-code-keyword": "#6d28d9",
|
|
601
629
|
"--wzl-code-string": "#15803d",
|
|
602
630
|
"--wzl-code-number": "#b45309",
|
|
@@ -656,6 +684,7 @@ var THEMES = {
|
|
|
656
684
|
"--wzl-fg-on-accent": "#f5f5f6",
|
|
657
685
|
"--wzl-line": "rgba(14, 15, 18, 0.2)",
|
|
658
686
|
"--wzl-line-strong": "rgba(14, 15, 18, 0.4)",
|
|
687
|
+
"--wzl-border-on-sunken": "rgba(14, 15, 18, 0.12)",
|
|
659
688
|
"--wzl-curve-color": "#6366f1",
|
|
660
689
|
"--wzl-accent-hover": "#6366f1",
|
|
661
690
|
"--wzl-secondary": "#3ee1cb",
|
|
@@ -685,19 +714,26 @@ var THEMES = {
|
|
|
685
714
|
"--wzl-handle-size": "9px",
|
|
686
715
|
"--wzl-handle-size-sm": "7px",
|
|
687
716
|
"--wzl-handle-size-lg": "10px",
|
|
717
|
+
"--wzl-handle-dot-size": "8px",
|
|
718
|
+
"--wzl-handle-dot-size-sm": "7px",
|
|
688
719
|
"--wzl-checker-a": "#c9cbcf",
|
|
689
720
|
"--wzl-checker-b": "#f5f5f6",
|
|
690
721
|
"--wzl-checker-size": "8px",
|
|
691
722
|
"--wzl-workspace-surface": "#c9cbcf",
|
|
692
723
|
"--wzl-workspace-line": "rgba(14, 15, 18, 0.1)",
|
|
693
724
|
"--wzl-field-pad-x": "8px",
|
|
725
|
+
"--wzl-gloss": "0",
|
|
694
726
|
"--wzl-font-size": "13px",
|
|
695
727
|
"--wzl-tracking-none": "0",
|
|
696
728
|
"--wzl-tracking-wide": "0.06em",
|
|
697
729
|
"--wzl-tracking-wider": "0.08em",
|
|
698
730
|
"--wzl-z-toolbar": "10",
|
|
699
731
|
"--wzl-z-overlay": "20",
|
|
700
|
-
"--wzl-z-
|
|
732
|
+
"--wzl-z-hud": "900",
|
|
733
|
+
"--wzl-z-modal": "1000",
|
|
734
|
+
"--wzl-z-toast": "1100",
|
|
735
|
+
"--wzl-z-popover": "1200",
|
|
736
|
+
"--wzl-z-drag": "10000",
|
|
701
737
|
"--wzl-leading-tight": "1",
|
|
702
738
|
"--wzl-leading-snug": "1.2",
|
|
703
739
|
"--wzl-leading": "1.4",
|
|
@@ -775,6 +811,7 @@ var THEMES = {
|
|
|
775
811
|
"--wzl-secondary-fg": "#016458",
|
|
776
812
|
"--wzl-fg-inverse": "#f5f5f6",
|
|
777
813
|
"--wzl-shadow": "rgba(0, 0, 0, 0.18)",
|
|
814
|
+
"--wzl-scrim": "rgba(0, 0, 0, 0.4)",
|
|
778
815
|
"--wzl-code-keyword": "#6d28d9",
|
|
779
816
|
"--wzl-code-string": "#15803d",
|
|
780
817
|
"--wzl-code-number": "#b45309",
|
|
@@ -834,6 +871,7 @@ var THEMES = {
|
|
|
834
871
|
"--wzl-fg-on-accent": "#f5f5f6",
|
|
835
872
|
"--wzl-line": "rgba(14, 15, 18, 0.2)",
|
|
836
873
|
"--wzl-line-strong": "rgba(14, 15, 18, 0.4)",
|
|
874
|
+
"--wzl-border-on-sunken": "rgba(14, 15, 18, 0.12)",
|
|
837
875
|
"--wzl-curve-color": "#6366f1",
|
|
838
876
|
"--wzl-accent-hover": "#6366f1",
|
|
839
877
|
"--wzl-secondary": "#3ee1cb",
|
|
@@ -863,19 +901,26 @@ var THEMES = {
|
|
|
863
901
|
"--wzl-handle-size": "9px",
|
|
864
902
|
"--wzl-handle-size-sm": "7px",
|
|
865
903
|
"--wzl-handle-size-lg": "10px",
|
|
904
|
+
"--wzl-handle-dot-size": "8px",
|
|
905
|
+
"--wzl-handle-dot-size-sm": "7px",
|
|
866
906
|
"--wzl-checker-a": "#c9cbcf",
|
|
867
907
|
"--wzl-checker-b": "#f5f5f6",
|
|
868
908
|
"--wzl-checker-size": "8px",
|
|
869
909
|
"--wzl-workspace-surface": "#c9cbcf",
|
|
870
910
|
"--wzl-workspace-line": "rgba(14, 15, 18, 0.1)",
|
|
871
911
|
"--wzl-field-pad-x": "8px",
|
|
912
|
+
"--wzl-gloss": "0",
|
|
872
913
|
"--wzl-font-size": "15px",
|
|
873
914
|
"--wzl-tracking-none": "0",
|
|
874
915
|
"--wzl-tracking-wide": "0.06em",
|
|
875
916
|
"--wzl-tracking-wider": "0.08em",
|
|
876
917
|
"--wzl-z-toolbar": "10",
|
|
877
918
|
"--wzl-z-overlay": "20",
|
|
878
|
-
"--wzl-z-
|
|
919
|
+
"--wzl-z-hud": "900",
|
|
920
|
+
"--wzl-z-modal": "1000",
|
|
921
|
+
"--wzl-z-toast": "1100",
|
|
922
|
+
"--wzl-z-popover": "1200",
|
|
923
|
+
"--wzl-z-drag": "10000",
|
|
879
924
|
"--wzl-leading-tight": "1",
|
|
880
925
|
"--wzl-leading-snug": "1.2",
|
|
881
926
|
"--wzl-leading": "1.4",
|
|
@@ -953,6 +998,7 @@ var THEMES = {
|
|
|
953
998
|
"--wzl-secondary-fg": "#016458",
|
|
954
999
|
"--wzl-fg-inverse": "#f5f5f6",
|
|
955
1000
|
"--wzl-shadow": "rgba(0, 0, 0, 0.18)",
|
|
1001
|
+
"--wzl-scrim": "rgba(0, 0, 0, 0.4)",
|
|
956
1002
|
"--wzl-code-keyword": "#6d28d9",
|
|
957
1003
|
"--wzl-code-string": "#15803d",
|
|
958
1004
|
"--wzl-code-number": "#b45309",
|
|
@@ -1012,6 +1058,7 @@ var THEMES = {
|
|
|
1012
1058
|
"--wzl-fg-on-accent": "#f5f5f6",
|
|
1013
1059
|
"--wzl-line": "rgba(14, 15, 18, 0.2)",
|
|
1014
1060
|
"--wzl-line-strong": "rgba(14, 15, 18, 0.4)",
|
|
1061
|
+
"--wzl-border-on-sunken": "rgba(14, 15, 18, 0.12)",
|
|
1015
1062
|
"--wzl-curve-color": "#6366f1",
|
|
1016
1063
|
"--wzl-accent-hover": "#6366f1",
|
|
1017
1064
|
"--wzl-secondary": "#3ee1cb",
|
|
@@ -1041,19 +1088,26 @@ var THEMES = {
|
|
|
1041
1088
|
"--wzl-handle-size": "9px",
|
|
1042
1089
|
"--wzl-handle-size-sm": "7px",
|
|
1043
1090
|
"--wzl-handle-size-lg": "10px",
|
|
1091
|
+
"--wzl-handle-dot-size": "8px",
|
|
1092
|
+
"--wzl-handle-dot-size-sm": "7px",
|
|
1044
1093
|
"--wzl-checker-a": "#c9cbcf",
|
|
1045
1094
|
"--wzl-checker-b": "#f5f5f6",
|
|
1046
1095
|
"--wzl-checker-size": "8px",
|
|
1047
1096
|
"--wzl-workspace-surface": "#c9cbcf",
|
|
1048
1097
|
"--wzl-workspace-line": "rgba(14, 15, 18, 0.1)",
|
|
1049
1098
|
"--wzl-field-pad-x": "8px",
|
|
1099
|
+
"--wzl-gloss": "0",
|
|
1050
1100
|
"--wzl-font-size": "18px",
|
|
1051
1101
|
"--wzl-tracking-none": "0",
|
|
1052
1102
|
"--wzl-tracking-wide": "0.06em",
|
|
1053
1103
|
"--wzl-tracking-wider": "0.08em",
|
|
1054
1104
|
"--wzl-z-toolbar": "10",
|
|
1055
1105
|
"--wzl-z-overlay": "20",
|
|
1056
|
-
"--wzl-z-
|
|
1106
|
+
"--wzl-z-hud": "900",
|
|
1107
|
+
"--wzl-z-modal": "1000",
|
|
1108
|
+
"--wzl-z-toast": "1100",
|
|
1109
|
+
"--wzl-z-popover": "1200",
|
|
1110
|
+
"--wzl-z-drag": "10000",
|
|
1057
1111
|
"--wzl-leading-tight": "1",
|
|
1058
1112
|
"--wzl-leading-snug": "1.2",
|
|
1059
1113
|
"--wzl-leading": "1.4",
|
|
@@ -1434,6 +1488,11 @@ var THEME_SOURCES = {
|
|
|
1434
1488
|
"type": "color"
|
|
1435
1489
|
}
|
|
1436
1490
|
},
|
|
1491
|
+
"scrim": {
|
|
1492
|
+
"value": "rgba(0, 0, 0, 0.4)",
|
|
1493
|
+
"type": "color",
|
|
1494
|
+
"description": "What a modal dims the page behind it with."
|
|
1495
|
+
},
|
|
1437
1496
|
"code-keyword": {
|
|
1438
1497
|
"by": "mode",
|
|
1439
1498
|
"dark": {
|
|
@@ -1779,6 +1838,12 @@ var THEME_SOURCES = {
|
|
|
1779
1838
|
"alpha": 0.4,
|
|
1780
1839
|
"description": "Axes and emphasized dividers."
|
|
1781
1840
|
},
|
|
1841
|
+
"border-on-sunken": {
|
|
1842
|
+
"value": "{fg}",
|
|
1843
|
+
"type": "color",
|
|
1844
|
+
"alpha": 0.12,
|
|
1845
|
+
"description": "The edge of a box filled with surface-sunken. Stepped from the text color, because light mode's border is the sunken fill's own gray."
|
|
1846
|
+
},
|
|
1782
1847
|
"curve-color": {
|
|
1783
1848
|
"value": "{accent-strong}",
|
|
1784
1849
|
"type": "color",
|
|
@@ -2053,6 +2118,16 @@ var THEME_SOURCES = {
|
|
|
2053
2118
|
"type": "dimension",
|
|
2054
2119
|
"description": "A handle that is a category of its own rather than one of a row \u2014 a curve's endpoint. Larger so it separates from the handles it sits in line with."
|
|
2055
2120
|
},
|
|
2121
|
+
"handle-dot-size": {
|
|
2122
|
+
"value": "8px",
|
|
2123
|
+
"type": "dimension",
|
|
2124
|
+
"description": "Diameter of a round handle \u2014 a plain anchor on a curve. Its own rank beside handle-size, because a circle and a diamond of one edge do not read as one size."
|
|
2125
|
+
},
|
|
2126
|
+
"handle-dot-size-sm": {
|
|
2127
|
+
"value": "7px",
|
|
2128
|
+
"type": "dimension",
|
|
2129
|
+
"description": "A round handle that belongs to another point \u2014 a bezier control handle at the end of its stem."
|
|
2130
|
+
},
|
|
2056
2131
|
"checker-a": {
|
|
2057
2132
|
"value": "{border}",
|
|
2058
2133
|
"type": "color",
|
|
@@ -2083,6 +2158,11 @@ var THEME_SOURCES = {
|
|
|
2083
2158
|
"type": "dimension",
|
|
2084
2159
|
"description": "Horizontal padding inside a boxed field. Pairs with --wzl-field-h, which is a container override and has no :root default."
|
|
2085
2160
|
},
|
|
2161
|
+
"gloss": {
|
|
2162
|
+
"value": 0,
|
|
2163
|
+
"type": "number",
|
|
2164
|
+
"description": "How much glass a boxed button and a selected segment wear, from 0 to 1: at 0 a flat fill, at 1 the full ramp, specular gloss, rim, and drop shadow."
|
|
2165
|
+
},
|
|
2086
2166
|
"glass-blur": {
|
|
2087
2167
|
"value": "3px",
|
|
2088
2168
|
"type": "dimension",
|
|
@@ -2109,15 +2189,38 @@ var THEME_SOURCES = {
|
|
|
2109
2189
|
},
|
|
2110
2190
|
"z-toolbar": {
|
|
2111
2191
|
"value": 10,
|
|
2112
|
-
"type": "number"
|
|
2192
|
+
"type": "number",
|
|
2193
|
+
"description": "Chrome pinned over a workspace."
|
|
2113
2194
|
},
|
|
2114
2195
|
"z-overlay": {
|
|
2115
2196
|
"value": 20,
|
|
2116
|
-
"type": "number"
|
|
2197
|
+
"type": "number",
|
|
2198
|
+
"description": "A panel or readout floating over the chrome."
|
|
2199
|
+
},
|
|
2200
|
+
"z-hud": {
|
|
2201
|
+
"value": 900,
|
|
2202
|
+
"type": "number",
|
|
2203
|
+
"description": "Debug readouts, over the app and under anything modal."
|
|
2117
2204
|
},
|
|
2118
2205
|
"z-modal": {
|
|
2119
|
-
"value":
|
|
2120
|
-
"type": "number"
|
|
2206
|
+
"value": 1e3,
|
|
2207
|
+
"type": "number",
|
|
2208
|
+
"description": "A dialog or lightbox and its scrim."
|
|
2209
|
+
},
|
|
2210
|
+
"z-toast": {
|
|
2211
|
+
"value": 1100,
|
|
2212
|
+
"type": "number",
|
|
2213
|
+
"description": "Toasts, which stay readable over a dialog."
|
|
2214
|
+
},
|
|
2215
|
+
"z-popover": {
|
|
2216
|
+
"value": 1200,
|
|
2217
|
+
"type": "number",
|
|
2218
|
+
"description": "Tooltips and callouts, which a dialog or a toast can open."
|
|
2219
|
+
},
|
|
2220
|
+
"z-drag": {
|
|
2221
|
+
"value": 1e4,
|
|
2222
|
+
"type": "number",
|
|
2223
|
+
"description": "A drag ghost, over everything it can be dragged across."
|
|
2121
2224
|
},
|
|
2122
2225
|
"leading-tight": {
|
|
2123
2226
|
"value": 1,
|
|
@@ -2770,6 +2873,11 @@ var BAKED_THEMES = {
|
|
|
2770
2873
|
"value": "rgba(0, 0, 0, 0.18)"
|
|
2771
2874
|
}
|
|
2772
2875
|
},
|
|
2876
|
+
"scrim": {
|
|
2877
|
+
"type": "color",
|
|
2878
|
+
"value": "rgba(0, 0, 0, 0.4)",
|
|
2879
|
+
"description": "What a modal dims the page behind it with."
|
|
2880
|
+
},
|
|
2773
2881
|
"code-keyword": {
|
|
2774
2882
|
"by": "mode",
|
|
2775
2883
|
"dark": {
|
|
@@ -3036,6 +3144,12 @@ var BAKED_THEMES = {
|
|
|
3036
3144
|
"alpha": 0.4,
|
|
3037
3145
|
"description": "Axes and emphasized dividers."
|
|
3038
3146
|
},
|
|
3147
|
+
"border-on-sunken": {
|
|
3148
|
+
"type": "color",
|
|
3149
|
+
"value": "{fg}",
|
|
3150
|
+
"alpha": 0.12,
|
|
3151
|
+
"description": "The edge of a box filled with surface-sunken. Stepped from the text color, because light mode's border is the sunken fill's own gray."
|
|
3152
|
+
},
|
|
3039
3153
|
"curve-color": {
|
|
3040
3154
|
"type": "color",
|
|
3041
3155
|
"value": "{accent-strong}",
|
|
@@ -3269,6 +3383,16 @@ var BAKED_THEMES = {
|
|
|
3269
3383
|
"value": "10px",
|
|
3270
3384
|
"description": "A handle that is a category of its own rather than one of a row \u2014 a curve's endpoint. Larger so it separates from the handles it sits in line with."
|
|
3271
3385
|
},
|
|
3386
|
+
"handle-dot-size": {
|
|
3387
|
+
"type": "dimension",
|
|
3388
|
+
"value": "8px",
|
|
3389
|
+
"description": "Diameter of a round handle \u2014 a plain anchor on a curve. Its own rank beside handle-size, because a circle and a diamond of one edge do not read as one size."
|
|
3390
|
+
},
|
|
3391
|
+
"handle-dot-size-sm": {
|
|
3392
|
+
"type": "dimension",
|
|
3393
|
+
"value": "7px",
|
|
3394
|
+
"description": "A round handle that belongs to another point \u2014 a bezier control handle at the end of its stem."
|
|
3395
|
+
},
|
|
3272
3396
|
"checker-a": {
|
|
3273
3397
|
"type": "color",
|
|
3274
3398
|
"value": "{border}",
|
|
@@ -3299,6 +3423,11 @@ var BAKED_THEMES = {
|
|
|
3299
3423
|
"value": "8px",
|
|
3300
3424
|
"description": "Horizontal padding inside a boxed field. Pairs with --wzl-field-h, which is a container override and has no :root default."
|
|
3301
3425
|
},
|
|
3426
|
+
"gloss": {
|
|
3427
|
+
"type": "number",
|
|
3428
|
+
"value": 0,
|
|
3429
|
+
"description": "How much glass a boxed button and a selected segment wear, from 0 to 1: at 0 a flat fill, at 1 the full ramp, specular gloss, rim, and drop shadow."
|
|
3430
|
+
},
|
|
3302
3431
|
"glass-blur": {
|
|
3303
3432
|
"type": "dimension",
|
|
3304
3433
|
"value": "3px",
|
|
@@ -3325,15 +3454,38 @@ var BAKED_THEMES = {
|
|
|
3325
3454
|
},
|
|
3326
3455
|
"z-toolbar": {
|
|
3327
3456
|
"type": "number",
|
|
3328
|
-
"value": 10
|
|
3457
|
+
"value": 10,
|
|
3458
|
+
"description": "Chrome pinned over a workspace."
|
|
3329
3459
|
},
|
|
3330
3460
|
"z-overlay": {
|
|
3331
3461
|
"type": "number",
|
|
3332
|
-
"value": 20
|
|
3462
|
+
"value": 20,
|
|
3463
|
+
"description": "A panel or readout floating over the chrome."
|
|
3464
|
+
},
|
|
3465
|
+
"z-hud": {
|
|
3466
|
+
"type": "number",
|
|
3467
|
+
"value": 900,
|
|
3468
|
+
"description": "Debug readouts, over the app and under anything modal."
|
|
3333
3469
|
},
|
|
3334
3470
|
"z-modal": {
|
|
3335
3471
|
"type": "number",
|
|
3336
|
-
"value":
|
|
3472
|
+
"value": 1e3,
|
|
3473
|
+
"description": "A dialog or lightbox and its scrim."
|
|
3474
|
+
},
|
|
3475
|
+
"z-toast": {
|
|
3476
|
+
"type": "number",
|
|
3477
|
+
"value": 1100,
|
|
3478
|
+
"description": "Toasts, which stay readable over a dialog."
|
|
3479
|
+
},
|
|
3480
|
+
"z-popover": {
|
|
3481
|
+
"type": "number",
|
|
3482
|
+
"value": 1200,
|
|
3483
|
+
"description": "Tooltips and callouts, which a dialog or a toast can open."
|
|
3484
|
+
},
|
|
3485
|
+
"z-drag": {
|
|
3486
|
+
"type": "number",
|
|
3487
|
+
"value": 1e4,
|
|
3488
|
+
"description": "A drag ghost, over everything it can be dragged across."
|
|
3337
3489
|
},
|
|
3338
3490
|
"leading-tight": {
|
|
3339
3491
|
"type": "number",
|
|
@@ -3566,148 +3718,6 @@ function defineTheme(input) {
|
|
|
3566
3718
|
};
|
|
3567
3719
|
}
|
|
3568
3720
|
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
function styleRootOf(el) {
|
|
3573
|
-
const root = el.getRootNode();
|
|
3574
|
-
return root instanceof (el.ownerDocument.defaultView?.ShadowRoot ?? ShadowRoot) ? root : el.ownerDocument;
|
|
3575
|
-
}
|
|
3576
|
-
var documentOf = (root) => "host" in root ? root.ownerDocument : root;
|
|
3577
|
-
var only = (id) => id === 0 ? "" : `:where([data-wzl-variant='${id}'])`;
|
|
3578
|
-
function write(root, held) {
|
|
3579
|
-
const css = [...held.rules].flatMap(([selector, variants]) => (
|
|
3580
|
-
// The bare rule first: it matches a variant's elements too, and the variant's has to win the tie.
|
|
3581
|
-
[...variants].sort((a, b) => a.id - b.id).map((v) => `${selector}${only(v.id)} { ${v.body} }`)
|
|
3582
|
-
)).join("\n");
|
|
3583
|
-
const win = documentOf(root).defaultView;
|
|
3584
|
-
const Sheet = win?.CSSStyleSheet;
|
|
3585
|
-
if (Sheet && "replaceSync" in Sheet.prototype && Array.isArray(root.adoptedStyleSheets)) {
|
|
3586
|
-
if (!held.sheet) {
|
|
3587
|
-
held.sheet = new Sheet();
|
|
3588
|
-
root.adoptedStyleSheets = [...root.adoptedStyleSheets, held.sheet];
|
|
3589
|
-
}
|
|
3590
|
-
held.sheet.replaceSync(css);
|
|
3591
|
-
return;
|
|
3592
|
-
}
|
|
3593
|
-
if (!held.styleEl) {
|
|
3594
|
-
held.styleEl = documentOf(root).createElement("style");
|
|
3595
|
-
held.styleEl.id = STYLE_ID;
|
|
3596
|
-
("host" in root ? root : root.head).appendChild(held.styleEl);
|
|
3597
|
-
}
|
|
3598
|
-
held.styleEl.textContent = css;
|
|
3599
|
-
}
|
|
3600
|
-
function holdRule(root, selector, body) {
|
|
3601
|
-
let held = sheets.get(root);
|
|
3602
|
-
if (!held) sheets.set(root, held = { rules: /* @__PURE__ */ new Map(), sheet: null, styleEl: null });
|
|
3603
|
-
const variants = held.rules.get(selector) ?? [];
|
|
3604
|
-
let variant = variants.find((v) => v.body === body);
|
|
3605
|
-
if (variant) {
|
|
3606
|
-
variant.holds++;
|
|
3607
|
-
} else {
|
|
3608
|
-
let id = 0;
|
|
3609
|
-
while (variants.some((v) => v.id === id)) id++;
|
|
3610
|
-
variant = { id, body, holds: 1 };
|
|
3611
|
-
held.rules.set(selector, [...variants, variant]);
|
|
3612
|
-
write(root, held);
|
|
3613
|
-
}
|
|
3614
|
-
const mine = variant;
|
|
3615
|
-
const sheet = held;
|
|
3616
|
-
let released = false;
|
|
3617
|
-
return {
|
|
3618
|
-
variant: mine.id,
|
|
3619
|
-
release: () => {
|
|
3620
|
-
if (released) return;
|
|
3621
|
-
released = true;
|
|
3622
|
-
if (--mine.holds > 0) return;
|
|
3623
|
-
const left = (sheet.rules.get(selector) ?? []).filter((v) => v !== mine);
|
|
3624
|
-
if (left.length > 0) sheet.rules.set(selector, left);
|
|
3625
|
-
else sheet.rules.delete(selector);
|
|
3626
|
-
write(root, sheet);
|
|
3627
|
-
}
|
|
3628
|
-
};
|
|
3629
|
-
}
|
|
3630
|
-
|
|
3631
|
-
// src/applyTheme.ts
|
|
3632
|
-
var holds = /* @__PURE__ */ new WeakMap();
|
|
3633
|
-
function applyTheme(el, theme, selection = {}) {
|
|
3634
|
-
if (typeof document === "undefined") return () => {
|
|
3635
|
-
};
|
|
3636
|
-
const axes = themeAxes(theme);
|
|
3637
|
-
const sel = fullSelection(axes, selection);
|
|
3638
|
-
const body = Object.entries(resolveTheme(theme, sel)).map(([name, value]) => `${name}: ${value};`).join(" ");
|
|
3639
|
-
const names = Object.keys(axes);
|
|
3640
|
-
const selector = `[data-wzl-theme='${theme.name}']${names.map((a) => `[data-wzl-${a}='${sel[a]}']`).join("")}`;
|
|
3641
|
-
const { variant, release: releaseRule } = holdRule(styleRootOf(el), selector, body);
|
|
3642
|
-
holds.get(el)?.();
|
|
3643
|
-
el.setAttribute("data-wzl-theme", theme.name);
|
|
3644
|
-
for (const a of names) el.setAttribute(`data-wzl-${a}`, sel[a]);
|
|
3645
|
-
if (variant === 0) el.removeAttribute("data-wzl-variant");
|
|
3646
|
-
else el.setAttribute("data-wzl-variant", String(variant));
|
|
3647
|
-
const letGo = () => {
|
|
3648
|
-
holds.delete(el);
|
|
3649
|
-
releaseRule();
|
|
3650
|
-
};
|
|
3651
|
-
holds.set(el, letGo);
|
|
3652
|
-
return () => {
|
|
3653
|
-
if (holds.get(el) !== letGo) return;
|
|
3654
|
-
letGo();
|
|
3655
|
-
for (const a of ["theme", "variant", ...names]) el.removeAttribute(`data-wzl-${a}`);
|
|
3656
|
-
};
|
|
3657
|
-
}
|
|
3658
|
-
|
|
3659
|
-
// src/colorMode.ts
|
|
3660
|
-
function isColorModePreference(v) {
|
|
3661
|
-
return v === "auto" || v === "light" || v === "dark";
|
|
3662
|
-
}
|
|
3663
|
-
|
|
3664
|
-
// src/colorList.ts
|
|
3665
|
-
var wrap = (i, n) => (Math.trunc(i) % n + n) % n;
|
|
3666
|
-
var generated = /* @__PURE__ */ new Map();
|
|
3667
|
-
function generatedColors({ generate: g }) {
|
|
3668
|
-
const key = JSON.stringify([g.count, g.gates ?? {}]);
|
|
3669
|
-
let colors = generated.get(key);
|
|
3670
|
-
if (!colors) {
|
|
3671
|
-
const palette = generate({ ...DEFAULT_CONSTRAINTS, ...g.gates, count: g.count, anchors: [] });
|
|
3672
|
-
colors = palette.swatches.map((s) => s.hex.toLowerCase());
|
|
3673
|
-
generated.set(key, colors);
|
|
3674
|
-
}
|
|
3675
|
-
return colors;
|
|
3676
|
-
}
|
|
3677
|
-
function rampSteps(theme, ramp) {
|
|
3678
|
-
for (const t of themeChain(theme).reverse()) {
|
|
3679
|
-
const steps = t.ramps?.[ramp];
|
|
3680
|
-
if (steps) return steps;
|
|
3681
|
-
}
|
|
3682
|
-
throw new Error(`Theme "${theme.name}" has no ramp "${ramp}"`);
|
|
3683
|
-
}
|
|
3684
|
-
function themeTones(theme) {
|
|
3685
|
-
for (const t of themeChain(theme).reverse()) if (t.tones) return t.tones;
|
|
3686
|
-
return { ramp: "swatch" };
|
|
3687
|
-
}
|
|
3688
|
-
var fallback;
|
|
3689
|
-
var defaultContext = () => fallback ??= { theme: weaselTheme, resolved: resolveTheme(weaselTheme) };
|
|
3690
|
-
function pickStep(list, i, theme) {
|
|
3691
|
-
const steps = rampSteps(theme, list.ramp);
|
|
3692
|
-
return steps[wrap(i, steps.length)];
|
|
3693
|
-
}
|
|
3694
|
-
function colorAt(list, i, ctx = defaultContext()) {
|
|
3695
|
-
if (typeof list === "function") return list(i);
|
|
3696
|
-
if ("ramp" in list) return ctx.resolved[`--wzl-${list.ramp}-${pickStep(list, i, ctx.theme)}`];
|
|
3697
|
-
const colors = "generate" in list ? generatedColors(list) : list;
|
|
3698
|
-
if (colors.length === 0) throw new Error("colorAt: empty color list");
|
|
3699
|
-
return colors[wrap(i, colors.length)];
|
|
3700
|
-
}
|
|
3701
|
-
function colorCssAt(list, i, ctx = defaultContext()) {
|
|
3702
|
-
if (typeof list !== "function" && "ramp" in list) return `var(--wzl-${list.ramp}-${pickStep(list, i, ctx.theme)})`;
|
|
3703
|
-
return colorAt(list, i, ctx);
|
|
3704
|
-
}
|
|
3705
|
-
function colorCount(list, ctx = defaultContext()) {
|
|
3706
|
-
if (typeof list === "function") return void 0;
|
|
3707
|
-
if ("ramp" in list) return rampSteps(ctx.theme, list.ramp).length;
|
|
3708
|
-
return "generate" in list ? list.generate.count : list.length;
|
|
3709
|
-
}
|
|
3710
|
-
|
|
3711
|
-
export { BAKED_THEMES, THEMES, THEME_SOURCES, applyTheme, colorAt, colorCount, colorCssAt, defineTheme, isColorModePreference, rampSteps, themeTones, weaselTheme };
|
|
3712
|
-
//# sourceMappingURL=chunk-EFGZ56CE.js.map
|
|
3713
|
-
//# sourceMappingURL=chunk-EFGZ56CE.js.map
|
|
3721
|
+
export { BAKED_THEMES, THEMES, THEME_SOURCES, defineTheme, weaselTheme };
|
|
3722
|
+
//# sourceMappingURL=chunk-JX2OC444.js.map
|
|
3723
|
+
//# sourceMappingURL=chunk-JX2OC444.js.map
|