@weasel-js/theme 1.9.3 → 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.
@@ -1,4 +1,5 @@
1
- import { themeAxes, fullSelection, selectionKey, resolveTheme, themeChain, isByAxis, generate, DEFAULT_CONSTRAINTS } from './chunk-NUILKH2Z.js';
1
+ import { isByAxis } from './chunk-P5F3GZV6.js';
2
+ import { isPlainObject } from '@weasel-js/registry';
2
3
 
3
4
  // src/generated/themes.ts
4
5
  var THEMES = {
@@ -62,6 +63,7 @@ var THEMES = {
62
63
  "--wzl-secondary-fg": "#dc9d15",
63
64
  "--wzl-fg-inverse": "#0e0f12",
64
65
  "--wzl-shadow": "rgba(0, 0, 0, 0.6)",
66
+ "--wzl-scrim": "rgba(0, 0, 0, 0.4)",
65
67
  "--wzl-code-keyword": "#955cf9",
66
68
  "--wzl-code-string": "#48e628",
67
69
  "--wzl-code-number": "#e69628",
@@ -121,6 +123,7 @@ var THEMES = {
121
123
  "--wzl-fg-on-accent": "#f5f5f6",
122
124
  "--wzl-line": "rgba(230, 231, 233, 0.2)",
123
125
  "--wzl-line-strong": "rgba(230, 231, 233, 0.4)",
126
+ "--wzl-border-on-sunken": "rgba(230, 231, 233, 0.12)",
124
127
  "--wzl-curve-color": "#8c94ee",
125
128
  "--wzl-accent-hover": "#8c94ee",
126
129
  "--wzl-secondary": "#dc9d15",
@@ -145,24 +148,31 @@ var THEMES = {
145
148
  "--wzl-slider-thumb-size": "8px",
146
149
  "--wzl-slider-track-slop": "6px",
147
150
  "--wzl-slider-thumb-slop": "6px",
148
- "--wzl-slider-track-mix": "18%",
149
- "--wzl-slider-thumb-mix": "70%",
151
+ "--wzl-slider-track-mix": "40%",
152
+ "--wzl-slider-thumb-mix": "100%",
150
153
  "--wzl-handle-size": "9px",
151
154
  "--wzl-handle-size-sm": "7px",
152
155
  "--wzl-handle-size-lg": "10px",
156
+ "--wzl-handle-dot-size": "8px",
157
+ "--wzl-handle-dot-size-sm": "7px",
153
158
  "--wzl-checker-a": "#25272c",
154
159
  "--wzl-checker-b": "#181a1e",
155
160
  "--wzl-checker-size": "8px",
156
161
  "--wzl-workspace-surface": "#0e0f12",
157
162
  "--wzl-workspace-line": "rgba(230, 231, 233, 0.1)",
158
163
  "--wzl-field-pad-x": "8px",
164
+ "--wzl-gloss": "0",
159
165
  "--wzl-font-size": "13px",
160
166
  "--wzl-tracking-none": "0",
161
167
  "--wzl-tracking-wide": "0.06em",
162
168
  "--wzl-tracking-wider": "0.08em",
163
169
  "--wzl-z-toolbar": "10",
164
170
  "--wzl-z-overlay": "20",
165
- "--wzl-z-modal": "30",
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",
166
176
  "--wzl-leading-tight": "1",
167
177
  "--wzl-leading-snug": "1.2",
168
178
  "--wzl-leading": "1.4",
@@ -240,6 +250,7 @@ var THEMES = {
240
250
  "--wzl-secondary-fg": "#dc9d15",
241
251
  "--wzl-fg-inverse": "#0e0f12",
242
252
  "--wzl-shadow": "rgba(0, 0, 0, 0.6)",
253
+ "--wzl-scrim": "rgba(0, 0, 0, 0.4)",
243
254
  "--wzl-code-keyword": "#955cf9",
244
255
  "--wzl-code-string": "#48e628",
245
256
  "--wzl-code-number": "#e69628",
@@ -299,6 +310,7 @@ var THEMES = {
299
310
  "--wzl-fg-on-accent": "#f5f5f6",
300
311
  "--wzl-line": "rgba(230, 231, 233, 0.2)",
301
312
  "--wzl-line-strong": "rgba(230, 231, 233, 0.4)",
313
+ "--wzl-border-on-sunken": "rgba(230, 231, 233, 0.12)",
302
314
  "--wzl-curve-color": "#8c94ee",
303
315
  "--wzl-accent-hover": "#8c94ee",
304
316
  "--wzl-secondary": "#dc9d15",
@@ -323,24 +335,31 @@ var THEMES = {
323
335
  "--wzl-slider-thumb-size": "8px",
324
336
  "--wzl-slider-track-slop": "6px",
325
337
  "--wzl-slider-thumb-slop": "6px",
326
- "--wzl-slider-track-mix": "18%",
327
- "--wzl-slider-thumb-mix": "70%",
338
+ "--wzl-slider-track-mix": "40%",
339
+ "--wzl-slider-thumb-mix": "100%",
328
340
  "--wzl-handle-size": "9px",
329
341
  "--wzl-handle-size-sm": "7px",
330
342
  "--wzl-handle-size-lg": "10px",
343
+ "--wzl-handle-dot-size": "8px",
344
+ "--wzl-handle-dot-size-sm": "7px",
331
345
  "--wzl-checker-a": "#25272c",
332
346
  "--wzl-checker-b": "#181a1e",
333
347
  "--wzl-checker-size": "8px",
334
348
  "--wzl-workspace-surface": "#0e0f12",
335
349
  "--wzl-workspace-line": "rgba(230, 231, 233, 0.1)",
336
350
  "--wzl-field-pad-x": "8px",
351
+ "--wzl-gloss": "0",
337
352
  "--wzl-font-size": "15px",
338
353
  "--wzl-tracking-none": "0",
339
354
  "--wzl-tracking-wide": "0.06em",
340
355
  "--wzl-tracking-wider": "0.08em",
341
356
  "--wzl-z-toolbar": "10",
342
357
  "--wzl-z-overlay": "20",
343
- "--wzl-z-modal": "30",
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",
344
363
  "--wzl-leading-tight": "1",
345
364
  "--wzl-leading-snug": "1.2",
346
365
  "--wzl-leading": "1.4",
@@ -418,6 +437,7 @@ var THEMES = {
418
437
  "--wzl-secondary-fg": "#dc9d15",
419
438
  "--wzl-fg-inverse": "#0e0f12",
420
439
  "--wzl-shadow": "rgba(0, 0, 0, 0.6)",
440
+ "--wzl-scrim": "rgba(0, 0, 0, 0.4)",
421
441
  "--wzl-code-keyword": "#955cf9",
422
442
  "--wzl-code-string": "#48e628",
423
443
  "--wzl-code-number": "#e69628",
@@ -477,6 +497,7 @@ var THEMES = {
477
497
  "--wzl-fg-on-accent": "#f5f5f6",
478
498
  "--wzl-line": "rgba(230, 231, 233, 0.2)",
479
499
  "--wzl-line-strong": "rgba(230, 231, 233, 0.4)",
500
+ "--wzl-border-on-sunken": "rgba(230, 231, 233, 0.12)",
480
501
  "--wzl-curve-color": "#8c94ee",
481
502
  "--wzl-accent-hover": "#8c94ee",
482
503
  "--wzl-secondary": "#dc9d15",
@@ -501,24 +522,31 @@ var THEMES = {
501
522
  "--wzl-slider-thumb-size": "8px",
502
523
  "--wzl-slider-track-slop": "6px",
503
524
  "--wzl-slider-thumb-slop": "6px",
504
- "--wzl-slider-track-mix": "18%",
505
- "--wzl-slider-thumb-mix": "70%",
525
+ "--wzl-slider-track-mix": "40%",
526
+ "--wzl-slider-thumb-mix": "100%",
506
527
  "--wzl-handle-size": "9px",
507
528
  "--wzl-handle-size-sm": "7px",
508
529
  "--wzl-handle-size-lg": "10px",
530
+ "--wzl-handle-dot-size": "8px",
531
+ "--wzl-handle-dot-size-sm": "7px",
509
532
  "--wzl-checker-a": "#25272c",
510
533
  "--wzl-checker-b": "#181a1e",
511
534
  "--wzl-checker-size": "8px",
512
535
  "--wzl-workspace-surface": "#0e0f12",
513
536
  "--wzl-workspace-line": "rgba(230, 231, 233, 0.1)",
514
537
  "--wzl-field-pad-x": "8px",
538
+ "--wzl-gloss": "0",
515
539
  "--wzl-font-size": "18px",
516
540
  "--wzl-tracking-none": "0",
517
541
  "--wzl-tracking-wide": "0.06em",
518
542
  "--wzl-tracking-wider": "0.08em",
519
543
  "--wzl-z-toolbar": "10",
520
544
  "--wzl-z-overlay": "20",
521
- "--wzl-z-modal": "30",
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",
522
550
  "--wzl-leading-tight": "1",
523
551
  "--wzl-leading-snug": "1.2",
524
552
  "--wzl-leading": "1.4",
@@ -596,6 +624,7 @@ var THEMES = {
596
624
  "--wzl-secondary-fg": "#016458",
597
625
  "--wzl-fg-inverse": "#f5f5f6",
598
626
  "--wzl-shadow": "rgba(0, 0, 0, 0.18)",
627
+ "--wzl-scrim": "rgba(0, 0, 0, 0.4)",
599
628
  "--wzl-code-keyword": "#6d28d9",
600
629
  "--wzl-code-string": "#15803d",
601
630
  "--wzl-code-number": "#b45309",
@@ -655,6 +684,7 @@ var THEMES = {
655
684
  "--wzl-fg-on-accent": "#f5f5f6",
656
685
  "--wzl-line": "rgba(14, 15, 18, 0.2)",
657
686
  "--wzl-line-strong": "rgba(14, 15, 18, 0.4)",
687
+ "--wzl-border-on-sunken": "rgba(14, 15, 18, 0.12)",
658
688
  "--wzl-curve-color": "#6366f1",
659
689
  "--wzl-accent-hover": "#6366f1",
660
690
  "--wzl-secondary": "#3ee1cb",
@@ -684,19 +714,26 @@ var THEMES = {
684
714
  "--wzl-handle-size": "9px",
685
715
  "--wzl-handle-size-sm": "7px",
686
716
  "--wzl-handle-size-lg": "10px",
717
+ "--wzl-handle-dot-size": "8px",
718
+ "--wzl-handle-dot-size-sm": "7px",
687
719
  "--wzl-checker-a": "#c9cbcf",
688
720
  "--wzl-checker-b": "#f5f5f6",
689
721
  "--wzl-checker-size": "8px",
690
722
  "--wzl-workspace-surface": "#c9cbcf",
691
723
  "--wzl-workspace-line": "rgba(14, 15, 18, 0.1)",
692
724
  "--wzl-field-pad-x": "8px",
725
+ "--wzl-gloss": "0",
693
726
  "--wzl-font-size": "13px",
694
727
  "--wzl-tracking-none": "0",
695
728
  "--wzl-tracking-wide": "0.06em",
696
729
  "--wzl-tracking-wider": "0.08em",
697
730
  "--wzl-z-toolbar": "10",
698
731
  "--wzl-z-overlay": "20",
699
- "--wzl-z-modal": "30",
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",
700
737
  "--wzl-leading-tight": "1",
701
738
  "--wzl-leading-snug": "1.2",
702
739
  "--wzl-leading": "1.4",
@@ -774,6 +811,7 @@ var THEMES = {
774
811
  "--wzl-secondary-fg": "#016458",
775
812
  "--wzl-fg-inverse": "#f5f5f6",
776
813
  "--wzl-shadow": "rgba(0, 0, 0, 0.18)",
814
+ "--wzl-scrim": "rgba(0, 0, 0, 0.4)",
777
815
  "--wzl-code-keyword": "#6d28d9",
778
816
  "--wzl-code-string": "#15803d",
779
817
  "--wzl-code-number": "#b45309",
@@ -833,6 +871,7 @@ var THEMES = {
833
871
  "--wzl-fg-on-accent": "#f5f5f6",
834
872
  "--wzl-line": "rgba(14, 15, 18, 0.2)",
835
873
  "--wzl-line-strong": "rgba(14, 15, 18, 0.4)",
874
+ "--wzl-border-on-sunken": "rgba(14, 15, 18, 0.12)",
836
875
  "--wzl-curve-color": "#6366f1",
837
876
  "--wzl-accent-hover": "#6366f1",
838
877
  "--wzl-secondary": "#3ee1cb",
@@ -862,19 +901,26 @@ var THEMES = {
862
901
  "--wzl-handle-size": "9px",
863
902
  "--wzl-handle-size-sm": "7px",
864
903
  "--wzl-handle-size-lg": "10px",
904
+ "--wzl-handle-dot-size": "8px",
905
+ "--wzl-handle-dot-size-sm": "7px",
865
906
  "--wzl-checker-a": "#c9cbcf",
866
907
  "--wzl-checker-b": "#f5f5f6",
867
908
  "--wzl-checker-size": "8px",
868
909
  "--wzl-workspace-surface": "#c9cbcf",
869
910
  "--wzl-workspace-line": "rgba(14, 15, 18, 0.1)",
870
911
  "--wzl-field-pad-x": "8px",
912
+ "--wzl-gloss": "0",
871
913
  "--wzl-font-size": "15px",
872
914
  "--wzl-tracking-none": "0",
873
915
  "--wzl-tracking-wide": "0.06em",
874
916
  "--wzl-tracking-wider": "0.08em",
875
917
  "--wzl-z-toolbar": "10",
876
918
  "--wzl-z-overlay": "20",
877
- "--wzl-z-modal": "30",
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",
878
924
  "--wzl-leading-tight": "1",
879
925
  "--wzl-leading-snug": "1.2",
880
926
  "--wzl-leading": "1.4",
@@ -952,6 +998,7 @@ var THEMES = {
952
998
  "--wzl-secondary-fg": "#016458",
953
999
  "--wzl-fg-inverse": "#f5f5f6",
954
1000
  "--wzl-shadow": "rgba(0, 0, 0, 0.18)",
1001
+ "--wzl-scrim": "rgba(0, 0, 0, 0.4)",
955
1002
  "--wzl-code-keyword": "#6d28d9",
956
1003
  "--wzl-code-string": "#15803d",
957
1004
  "--wzl-code-number": "#b45309",
@@ -1011,6 +1058,7 @@ var THEMES = {
1011
1058
  "--wzl-fg-on-accent": "#f5f5f6",
1012
1059
  "--wzl-line": "rgba(14, 15, 18, 0.2)",
1013
1060
  "--wzl-line-strong": "rgba(14, 15, 18, 0.4)",
1061
+ "--wzl-border-on-sunken": "rgba(14, 15, 18, 0.12)",
1014
1062
  "--wzl-curve-color": "#6366f1",
1015
1063
  "--wzl-accent-hover": "#6366f1",
1016
1064
  "--wzl-secondary": "#3ee1cb",
@@ -1040,19 +1088,26 @@ var THEMES = {
1040
1088
  "--wzl-handle-size": "9px",
1041
1089
  "--wzl-handle-size-sm": "7px",
1042
1090
  "--wzl-handle-size-lg": "10px",
1091
+ "--wzl-handle-dot-size": "8px",
1092
+ "--wzl-handle-dot-size-sm": "7px",
1043
1093
  "--wzl-checker-a": "#c9cbcf",
1044
1094
  "--wzl-checker-b": "#f5f5f6",
1045
1095
  "--wzl-checker-size": "8px",
1046
1096
  "--wzl-workspace-surface": "#c9cbcf",
1047
1097
  "--wzl-workspace-line": "rgba(14, 15, 18, 0.1)",
1048
1098
  "--wzl-field-pad-x": "8px",
1099
+ "--wzl-gloss": "0",
1049
1100
  "--wzl-font-size": "18px",
1050
1101
  "--wzl-tracking-none": "0",
1051
1102
  "--wzl-tracking-wide": "0.06em",
1052
1103
  "--wzl-tracking-wider": "0.08em",
1053
1104
  "--wzl-z-toolbar": "10",
1054
1105
  "--wzl-z-overlay": "20",
1055
- "--wzl-z-modal": "30",
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",
1056
1111
  "--wzl-leading-tight": "1",
1057
1112
  "--wzl-leading-snug": "1.2",
1058
1113
  "--wzl-leading": "1.4",
@@ -1433,6 +1488,11 @@ var THEME_SOURCES = {
1433
1488
  "type": "color"
1434
1489
  }
1435
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
+ },
1436
1496
  "code-keyword": {
1437
1497
  "by": "mode",
1438
1498
  "dark": {
@@ -1778,6 +1838,12 @@ var THEME_SOURCES = {
1778
1838
  "alpha": 0.4,
1779
1839
  "description": "Axes and emphasized dividers."
1780
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
+ },
1781
1847
  "curve-color": {
1782
1848
  "value": "{accent-strong}",
1783
1849
  "type": "color",
@@ -2012,14 +2078,30 @@ var THEME_SOURCES = {
2012
2078
  "description": "How far past a range thumb's edge a press still grabs the thumb rather than landing on the track. Sits over the track's own slop."
2013
2079
  },
2014
2080
  "slider-track-mix": {
2015
- "value": "18%",
2016
- "type": "dimension",
2017
- "description": "Accent proportion in a range track, as a color-mix percentage \u2014 not a color. Mixed into a real property, never into another custom property."
2081
+ "by": "mode",
2082
+ "dark": {
2083
+ "value": "40%",
2084
+ "type": "dimension",
2085
+ "description": "Proportion of accent-fg in a range track, as a color-mix percentage \u2014 not a color. Mixed into a real property, never into another custom property. Higher in dark mode, where a light tint of the accent sinks into the surface."
2086
+ },
2087
+ "light": {
2088
+ "value": "18%",
2089
+ "type": "dimension",
2090
+ "description": "Proportion of accent-fg in a range track, as a color-mix percentage \u2014 not a color."
2091
+ }
2018
2092
  },
2019
2093
  "slider-thumb-mix": {
2020
- "value": "70%",
2021
- "type": "dimension",
2022
- "description": "Accent proportion in a range thumb, as a color-mix percentage \u2014 not a color."
2094
+ "by": "mode",
2095
+ "dark": {
2096
+ "value": "100%",
2097
+ "type": "dimension",
2098
+ "description": "Proportion of accent-fg in a range thumb, as a color-mix percentage \u2014 not a color. Solid in dark mode."
2099
+ },
2100
+ "light": {
2101
+ "value": "70%",
2102
+ "type": "dimension",
2103
+ "description": "Proportion of accent-fg in a range thumb, as a color-mix percentage \u2014 not a color."
2104
+ }
2023
2105
  },
2024
2106
  "handle-size": {
2025
2107
  "value": "9px",
@@ -2036,6 +2118,16 @@ var THEME_SOURCES = {
2036
2118
  "type": "dimension",
2037
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."
2038
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
+ },
2039
2131
  "checker-a": {
2040
2132
  "value": "{border}",
2041
2133
  "type": "color",
@@ -2066,6 +2158,11 @@ var THEME_SOURCES = {
2066
2158
  "type": "dimension",
2067
2159
  "description": "Horizontal padding inside a boxed field. Pairs with --wzl-field-h, which is a container override and has no :root default."
2068
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
+ },
2069
2166
  "glass-blur": {
2070
2167
  "value": "3px",
2071
2168
  "type": "dimension",
@@ -2092,15 +2189,38 @@ var THEME_SOURCES = {
2092
2189
  },
2093
2190
  "z-toolbar": {
2094
2191
  "value": 10,
2095
- "type": "number"
2192
+ "type": "number",
2193
+ "description": "Chrome pinned over a workspace."
2096
2194
  },
2097
2195
  "z-overlay": {
2098
2196
  "value": 20,
2099
- "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."
2100
2204
  },
2101
2205
  "z-modal": {
2102
- "value": 30,
2103
- "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."
2104
2224
  },
2105
2225
  "leading-tight": {
2106
2226
  "value": 1,
@@ -2753,6 +2873,11 @@ var BAKED_THEMES = {
2753
2873
  "value": "rgba(0, 0, 0, 0.18)"
2754
2874
  }
2755
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
+ },
2756
2881
  "code-keyword": {
2757
2882
  "by": "mode",
2758
2883
  "dark": {
@@ -3019,6 +3144,12 @@ var BAKED_THEMES = {
3019
3144
  "alpha": 0.4,
3020
3145
  "description": "Axes and emphasized dividers."
3021
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
+ },
3022
3153
  "curve-color": {
3023
3154
  "type": "color",
3024
3155
  "value": "{accent-strong}",
@@ -3212,14 +3343,30 @@ var BAKED_THEMES = {
3212
3343
  "description": "How far past a range thumb's edge a press still grabs the thumb rather than landing on the track. Sits over the track's own slop."
3213
3344
  },
3214
3345
  "slider-track-mix": {
3215
- "type": "dimension",
3216
- "value": "18%",
3217
- "description": "Accent proportion in a range track, as a color-mix percentage \u2014 not a color. Mixed into a real property, never into another custom property."
3346
+ "by": "mode",
3347
+ "dark": {
3348
+ "type": "dimension",
3349
+ "value": "40%",
3350
+ "description": "Proportion of accent-fg in a range track, as a color-mix percentage \u2014 not a color. Mixed into a real property, never into another custom property. Higher in dark mode, where a light tint of the accent sinks into the surface."
3351
+ },
3352
+ "light": {
3353
+ "type": "dimension",
3354
+ "value": "18%",
3355
+ "description": "Proportion of accent-fg in a range track, as a color-mix percentage \u2014 not a color."
3356
+ }
3218
3357
  },
3219
3358
  "slider-thumb-mix": {
3220
- "type": "dimension",
3221
- "value": "70%",
3222
- "description": "Accent proportion in a range thumb, as a color-mix percentage \u2014 not a color."
3359
+ "by": "mode",
3360
+ "dark": {
3361
+ "type": "dimension",
3362
+ "value": "100%",
3363
+ "description": "Proportion of accent-fg in a range thumb, as a color-mix percentage \u2014 not a color. Solid in dark mode."
3364
+ },
3365
+ "light": {
3366
+ "type": "dimension",
3367
+ "value": "70%",
3368
+ "description": "Proportion of accent-fg in a range thumb, as a color-mix percentage \u2014 not a color."
3369
+ }
3223
3370
  },
3224
3371
  "handle-size": {
3225
3372
  "type": "dimension",
@@ -3236,6 +3383,16 @@ var BAKED_THEMES = {
3236
3383
  "value": "10px",
3237
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."
3238
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
+ },
3239
3396
  "checker-a": {
3240
3397
  "type": "color",
3241
3398
  "value": "{border}",
@@ -3266,6 +3423,11 @@ var BAKED_THEMES = {
3266
3423
  "value": "8px",
3267
3424
  "description": "Horizontal padding inside a boxed field. Pairs with --wzl-field-h, which is a container override and has no :root default."
3268
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
+ },
3269
3431
  "glass-blur": {
3270
3432
  "type": "dimension",
3271
3433
  "value": "3px",
@@ -3292,15 +3454,38 @@ var BAKED_THEMES = {
3292
3454
  },
3293
3455
  "z-toolbar": {
3294
3456
  "type": "number",
3295
- "value": 10
3457
+ "value": 10,
3458
+ "description": "Chrome pinned over a workspace."
3296
3459
  },
3297
3460
  "z-overlay": {
3298
3461
  "type": "number",
3299
- "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."
3300
3469
  },
3301
3470
  "z-modal": {
3302
3471
  "type": "number",
3303
- "value": 30
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."
3304
3489
  },
3305
3490
  "leading-tight": {
3306
3491
  "type": "number",
@@ -3492,9 +3677,7 @@ var BAKED_THEMES = {
3492
3677
  }
3493
3678
  }
3494
3679
  };
3495
-
3496
- // src/theme.ts
3497
- var isPinObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v) && "value" in v;
3680
+ var isPinObject = (v) => isPlainObject(v) && "value" in v;
3498
3681
  function toRaw(v) {
3499
3682
  if (isByAxis(v)) {
3500
3683
  const out = { by: v.by };
@@ -3535,99 +3718,6 @@ function defineTheme(input) {
3535
3718
  };
3536
3719
  }
3537
3720
 
3538
- // src/applyTheme.ts
3539
- var STYLE_ID = "wzl-themes";
3540
- var emitted = /* @__PURE__ */ new Map();
3541
- var sheet = null;
3542
- var styleEl = null;
3543
- function canAdopt() {
3544
- return typeof CSSStyleSheet !== "undefined" && "replaceSync" in CSSStyleSheet.prototype && Array.isArray(document.adoptedStyleSheets);
3545
- }
3546
- function flushRules() {
3547
- const css = [...emitted.values()].join("\n");
3548
- if (canAdopt()) {
3549
- if (!sheet) {
3550
- sheet = new CSSStyleSheet();
3551
- document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
3552
- }
3553
- sheet.replaceSync(css);
3554
- return;
3555
- }
3556
- if (!styleEl) {
3557
- styleEl = document.createElement("style");
3558
- styleEl.id = STYLE_ID;
3559
- document.head.appendChild(styleEl);
3560
- }
3561
- styleEl.textContent = css;
3562
- }
3563
- function applyTheme(el, theme, selection = {}) {
3564
- if (typeof document === "undefined") return;
3565
- const axes = themeAxes(theme);
3566
- const sel = fullSelection(axes, selection);
3567
- const key = `${theme.name}::${selectionKey(axes, sel)}`;
3568
- const body = Object.entries(resolveTheme(theme, sel)).map(([name, value]) => `${name}: ${value};`).join(" ");
3569
- const attrs = Object.keys(axes).map((a) => `[data-wzl-${a}='${sel[a]}']`).join("");
3570
- const rule = `[data-wzl-theme='${theme.name}']${attrs} { ${body} }`;
3571
- if (emitted.get(key) !== rule) {
3572
- emitted.set(key, rule);
3573
- flushRules();
3574
- }
3575
- el.setAttribute("data-wzl-theme", theme.name);
3576
- for (const a of Object.keys(axes)) el.setAttribute(`data-wzl-${a}`, sel[a]);
3577
- }
3578
-
3579
- // src/colorMode.ts
3580
- function isColorModePreference(v) {
3581
- return v === "auto" || v === "light" || v === "dark";
3582
- }
3583
-
3584
- // src/colorList.ts
3585
- var wrap = (i, n) => (Math.trunc(i) % n + n) % n;
3586
- var generated = /* @__PURE__ */ new Map();
3587
- function generatedColors({ generate: g }) {
3588
- const key = JSON.stringify([g.count, g.gates ?? {}]);
3589
- let colors = generated.get(key);
3590
- if (!colors) {
3591
- const palette = generate({ ...DEFAULT_CONSTRAINTS, ...g.gates, count: g.count, anchors: [] });
3592
- colors = palette.swatches.map((s) => s.hex.toLowerCase());
3593
- generated.set(key, colors);
3594
- }
3595
- return colors;
3596
- }
3597
- function rampSteps(theme, ramp) {
3598
- for (const t of themeChain(theme).reverse()) {
3599
- const steps = t.ramps?.[ramp];
3600
- if (steps) return steps;
3601
- }
3602
- throw new Error(`Theme "${theme.name}" has no ramp "${ramp}"`);
3603
- }
3604
- function themeTones(theme) {
3605
- for (const t of themeChain(theme).reverse()) if (t.tones) return t.tones;
3606
- return { ramp: "swatch" };
3607
- }
3608
- var fallback;
3609
- var defaultContext = () => fallback ??= { theme: weaselTheme, resolved: resolveTheme(weaselTheme) };
3610
- function pickStep(list, i, theme) {
3611
- const steps = rampSteps(theme, list.ramp);
3612
- return steps[wrap(i, steps.length)];
3613
- }
3614
- function colorAt(list, i, ctx = defaultContext()) {
3615
- if (typeof list === "function") return list(i);
3616
- if ("ramp" in list) return ctx.resolved[`--wzl-${list.ramp}-${pickStep(list, i, ctx.theme)}`];
3617
- const colors = "generate" in list ? generatedColors(list) : list;
3618
- if (colors.length === 0) throw new Error("colorAt: empty color list");
3619
- return colors[wrap(i, colors.length)];
3620
- }
3621
- function colorCssAt(list, i, ctx = defaultContext()) {
3622
- if (typeof list !== "function" && "ramp" in list) return `var(--wzl-${list.ramp}-${pickStep(list, i, ctx.theme)})`;
3623
- return colorAt(list, i, ctx);
3624
- }
3625
- function colorCount(list, ctx = defaultContext()) {
3626
- if (typeof list === "function") return void 0;
3627
- if ("ramp" in list) return rampSteps(ctx.theme, list.ramp).length;
3628
- return "generate" in list ? list.generate.count : list.length;
3629
- }
3630
-
3631
- export { BAKED_THEMES, THEMES, THEME_SOURCES, applyTheme, colorAt, colorCount, colorCssAt, defineTheme, isColorModePreference, rampSteps, themeTones, weaselTheme };
3632
- //# sourceMappingURL=chunk-7FYXA7TA.js.map
3633
- //# sourceMappingURL=chunk-7FYXA7TA.js.map
3721
+ export { BAKED_THEMES, THEMES, THEME_SOURCES, defineTheme, weaselTheme };
3722
+ //# sourceMappingURL=chunk-JX2OC444.js.map
3723
+ //# sourceMappingURL=chunk-JX2OC444.js.map