@weasel-js/theme 1.7.3 → 1.8.1
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 +7 -0
- package/dist/{chunk-AN5JVL2S.js → chunk-NUILKH2Z.js} +9 -3
- package/dist/chunk-NUILKH2Z.js.map +1 -0
- package/dist/{chunk-HO2AM2OB.js → chunk-VUNWK7T2.js} +111 -39
- package/dist/chunk-VUNWK7T2.js.map +1 -0
- package/dist/{definition-DxvV2RH3.d.ts → definition-BQHKxPoy.d.ts} +37 -25
- package/dist/engine.d.ts +2 -2
- package/dist/engine.js +2 -2
- package/dist/index.d.ts +14 -3
- package/dist/index.js +27 -9
- package/dist/index.js.map +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +3 -3
- package/dist/tokens.css +16 -6
- package/package.json +2 -2
- package/dist/chunk-AN5JVL2S.js.map +0 -1
- package/dist/chunk-HO2AM2OB.js.map +0 -1
|
@@ -72,7 +72,7 @@ declare function bakeChain(definition: ThemeDefinition, lookup?: Lookup): BakedT
|
|
|
72
72
|
|
|
73
73
|
/** Every design token the built-in themes declare, spelled as the CSS
|
|
74
74
|
* custom property it becomes. */
|
|
75
|
-
type TokenName = '--wzl-accent' | '--wzl-accent-base' | '--wzl-accent-fg' | '--wzl-accent-hover' | '--wzl-accent-soft' | '--wzl-accent-strong' | '--wzl-backdrop' | '--wzl-border' | '--wzl-border-strong' | '--wzl-border-w' | '--wzl-checker-a' | '--wzl-checker-b' | '--wzl-checker-size' | '--wzl-control-h' | '--wzl-control-h-sm' | '--wzl-control-h-xs' | '--wzl-curve-color' | '--wzl-curve-width' | '--wzl-danger' | '--wzl-danger-base' | '--wzl-ease-in-cubic' | '--wzl-ease-in-out-cubic' | '--wzl-ease-out-back' | '--wzl-ease-out-cubic' | '--wzl-fg' | '--wzl-fg-inverse' | '--wzl-fg-muted' | '--wzl-fg-on-accent' | '--wzl-fg-subtle' | '--wzl-field-pad-x' | '--wzl-focus-ring' | '--wzl-font-body' | '--wzl-font-display' | '--wzl-font-mono' | '--wzl-font-numeric' | '--wzl-font-size' | '--wzl-font-size-2xs' | '--wzl-font-size-lg' | '--wzl-font-size-md' | '--wzl-font-size-sm' | '--wzl-font-size-xl' | '--wzl-font-size-xs' | '--wzl-font-ui' | '--wzl-font-weight-bold' | '--wzl-font-weight-light' | '--wzl-font-weight-medium' | '--wzl-font-weight-normal' | '--wzl-glass-blur' | '--wzl-glass-tint' | '--wzl-gray-100' | '--wzl-gray-200' | '--wzl-gray-300' | '--wzl-gray-400' | '--wzl-gray-50' | '--wzl-gray-500' | '--wzl-gray-600' | '--wzl-gray-700' | '--wzl-gray-800' | '--wzl-gray-900' | '--wzl-handle-size' | '--wzl-handle-size-lg' | '--wzl-handle-size-sm' | '--wzl-icon-button-size' | '--wzl-leading' | '--wzl-leading-snug' | '--wzl-leading-tight' | '--wzl-line' | '--wzl-line-strong' | '--wzl-line-subtle' | '--wzl-line-width' | '--wzl-motion-fast' | '--wzl-motion-medium' | '--wzl-panel-blur' | '--wzl-panel-border-color' | '--wzl-panel-border-style' | '--wzl-panel-border-width' | '--wzl-panel-pad' | '--wzl-panel-radius' | '--wzl-panel-surface' | '--wzl-panel-title-case' | '--wzl-panel-title-color' | '--wzl-panel-title-font' | '--wzl-panel-title-inset' | '--wzl-panel-title-size' | '--wzl-panel-title-tracking' | '--wzl-panel-title-weight' | '--wzl-panel-tone-mix' | '--wzl-radius-lg' | '--wzl-radius-md' | '--wzl-radius-pill' | '--wzl-radius-sm' | '--wzl-secondary' | '--wzl-secondary-base' | '--wzl-secondary-fg' | '--wzl-secondary-soft' | '--wzl-secondary-strong' | '--wzl-shadow' | '--wzl-slider-thumb-mix' | '--wzl-slider-thumb-size' | '--wzl-slider-thumb-slop' | '--wzl-slider-track-h' | '--wzl-slider-track-mix' | '--wzl-slider-track-slop' | '--wzl-space-1' | '--wzl-space-2' | '--wzl-space-3' | '--wzl-space-4' | '--wzl-space-5' | '--wzl-space-6' | '--wzl-space-7' | '--wzl-space-8' | '--wzl-space-lg' | '--wzl-space-md' | '--wzl-space-sm' | '--wzl-space-xs' | '--wzl-stance-advanced-title-color' | '--wzl-stance-aside-blur' | '--wzl-stance-aside-border-color' | '--wzl-stance-aside-surface' | '--wzl-stance-aside-title-color' | '--wzl-stance-danger-border-color' | '--wzl-stance-danger-title-color' | '--wzl-stance-danger-tone' | '--wzl-stance-debug-border-style' | '--wzl-stance-debug-title-case' | '--wzl-stance-debug-title-font' | '--wzl-stance-important-border-color' | '--wzl-stance-important-title-color' | '--wzl-stance-notice-tone' | '--wzl-stance-notice-tone-mix' | '--wzl-stance-preview-pad' | '--wzl-stance-preview-title-case' | '--wzl-stance-preview-title-inset' | '--wzl-stance-preview-title-size' | '--wzl-stance-scope-border-width' | '--wzl-stance-scope-nested-radius' | '--wzl-stance-scope-nested-surface' | '--wzl-stance-scope-radius' | '--wzl-stance-scope-tone-mix' | '--wzl-success' | '--wzl-success-base' | '--wzl-surface' | '--wzl-surface-hover' | '--wzl-surface-pressed' | '--wzl-surface-raised' | '--wzl-surface-sunken' | '--wzl-swatch-amber' | '--wzl-swatch-blue' | '--wzl-swatch-citron' | '--wzl-swatch-fuchsia' | '--wzl-swatch-green' | '--wzl-swatch-red' | '--wzl-swatch-rose' | '--wzl-swatch-sky' | '--wzl-swatch-teal' | '--wzl-swatch-violet' | '--wzl-tb-height' | '--wzl-tracking-none' | '--wzl-tracking-wide' | '--wzl-tracking-wider' | '--wzl-warning' | '--wzl-warning-base' | '--wzl-workspace-line' | '--wzl-workspace-surface' | '--wzl-z-modal' | '--wzl-z-overlay' | '--wzl-z-toolbar';
|
|
75
|
+
type TokenName = '--wzl-accent' | '--wzl-accent-base' | '--wzl-accent-fg' | '--wzl-accent-hover' | '--wzl-accent-soft' | '--wzl-accent-strong' | '--wzl-backdrop' | '--wzl-border' | '--wzl-border-strong' | '--wzl-border-w' | '--wzl-checker-a' | '--wzl-checker-b' | '--wzl-checker-size' | '--wzl-control-h' | '--wzl-control-h-sm' | '--wzl-control-h-xs' | '--wzl-curve-color' | '--wzl-curve-width' | '--wzl-danger' | '--wzl-danger-base' | '--wzl-ease-in-cubic' | '--wzl-ease-in-out-cubic' | '--wzl-ease-out-back' | '--wzl-ease-out-cubic' | '--wzl-fg' | '--wzl-fg-inverse' | '--wzl-fg-muted' | '--wzl-fg-muted-on-accent' | '--wzl-fg-on-accent' | '--wzl-fg-subtle' | '--wzl-fg-subtle-on-accent' | '--wzl-field-pad-x' | '--wzl-focus-ring' | '--wzl-font-body' | '--wzl-font-display' | '--wzl-font-mono' | '--wzl-font-numeric' | '--wzl-font-size' | '--wzl-font-size-2xs' | '--wzl-font-size-lg' | '--wzl-font-size-md' | '--wzl-font-size-sm' | '--wzl-font-size-xl' | '--wzl-font-size-xs' | '--wzl-font-ui' | '--wzl-font-weight-bold' | '--wzl-font-weight-light' | '--wzl-font-weight-medium' | '--wzl-font-weight-normal' | '--wzl-glass-blur' | '--wzl-glass-tint' | '--wzl-gray-100' | '--wzl-gray-200' | '--wzl-gray-300' | '--wzl-gray-400' | '--wzl-gray-50' | '--wzl-gray-500' | '--wzl-gray-600' | '--wzl-gray-700' | '--wzl-gray-800' | '--wzl-gray-900' | '--wzl-handle-size' | '--wzl-handle-size-lg' | '--wzl-handle-size-sm' | '--wzl-icon-button-size' | '--wzl-leading' | '--wzl-leading-snug' | '--wzl-leading-tight' | '--wzl-line' | '--wzl-line-strong' | '--wzl-line-subtle' | '--wzl-line-width' | '--wzl-motion-fast' | '--wzl-motion-medium' | '--wzl-panel-blur' | '--wzl-panel-border-color' | '--wzl-panel-border-style' | '--wzl-panel-border-width' | '--wzl-panel-pad' | '--wzl-panel-radius' | '--wzl-panel-surface' | '--wzl-panel-title-case' | '--wzl-panel-title-color' | '--wzl-panel-title-font' | '--wzl-panel-title-inset' | '--wzl-panel-title-size' | '--wzl-panel-title-tracking' | '--wzl-panel-title-weight' | '--wzl-panel-tone-mix' | '--wzl-radius-lg' | '--wzl-radius-md' | '--wzl-radius-pill' | '--wzl-radius-sm' | '--wzl-secondary' | '--wzl-secondary-base' | '--wzl-secondary-fg' | '--wzl-secondary-soft' | '--wzl-secondary-strong' | '--wzl-shadow' | '--wzl-slider-thumb-mix' | '--wzl-slider-thumb-size' | '--wzl-slider-thumb-slop' | '--wzl-slider-track-h' | '--wzl-slider-track-mix' | '--wzl-slider-track-slop' | '--wzl-space-1' | '--wzl-space-2' | '--wzl-space-3' | '--wzl-space-4' | '--wzl-space-5' | '--wzl-space-6' | '--wzl-space-7' | '--wzl-space-8' | '--wzl-space-lg' | '--wzl-space-md' | '--wzl-space-sm' | '--wzl-space-xs' | '--wzl-stance-advanced-title-color' | '--wzl-stance-aside-blur' | '--wzl-stance-aside-border-color' | '--wzl-stance-aside-surface' | '--wzl-stance-aside-title-color' | '--wzl-stance-danger-border-color' | '--wzl-stance-danger-title-color' | '--wzl-stance-danger-tone' | '--wzl-stance-debug-border-style' | '--wzl-stance-debug-title-case' | '--wzl-stance-debug-title-font' | '--wzl-stance-important-border-color' | '--wzl-stance-important-title-color' | '--wzl-stance-notice-tone' | '--wzl-stance-notice-tone-mix' | '--wzl-stance-preview-pad' | '--wzl-stance-preview-title-case' | '--wzl-stance-preview-title-inset' | '--wzl-stance-preview-title-size' | '--wzl-stance-scope-border-width' | '--wzl-stance-scope-nested-radius' | '--wzl-stance-scope-nested-surface' | '--wzl-stance-scope-radius' | '--wzl-stance-scope-tone-mix' | '--wzl-success' | '--wzl-success-base' | '--wzl-surface' | '--wzl-surface-hover' | '--wzl-surface-pressed' | '--wzl-surface-raised' | '--wzl-surface-sunken' | '--wzl-swatch-amber' | '--wzl-swatch-blue' | '--wzl-swatch-citron' | '--wzl-swatch-fuchsia' | '--wzl-swatch-green' | '--wzl-swatch-red' | '--wzl-swatch-rose' | '--wzl-swatch-sky' | '--wzl-swatch-teal' | '--wzl-swatch-violet' | '--wzl-tb-height' | '--wzl-tracking-none' | '--wzl-tracking-wide' | '--wzl-tracking-wider' | '--wzl-warning' | '--wzl-warning-base' | '--wzl-workspace-line' | '--wzl-workspace-surface' | '--wzl-z-modal' | '--wzl-z-overlay' | '--wzl-z-toolbar';
|
|
76
76
|
/** A built-in theme with its aliases already collapsed: every selection
|
|
77
77
|
* (keyed `mode=dark`, axes in declaration order) maps every token name to
|
|
78
78
|
* a final CSS value. */
|
|
@@ -153,8 +153,10 @@ declare const THEMES: {
|
|
|
153
153
|
readonly '--wzl-surface-raised': "#25272c";
|
|
154
154
|
readonly '--wzl-surface-sunken': "#0e0f12";
|
|
155
155
|
readonly '--wzl-fg': "#e6e7e9";
|
|
156
|
-
readonly '--wzl-fg-muted': "
|
|
157
|
-
readonly '--wzl-fg-subtle': "
|
|
156
|
+
readonly '--wzl-fg-muted': "rgb(from currentColor r g b / 0.7)";
|
|
157
|
+
readonly '--wzl-fg-subtle': "rgb(from currentColor r g b / 0.54)";
|
|
158
|
+
readonly '--wzl-fg-muted-on-accent': "rgb(from currentColor r g b / 0.98)";
|
|
159
|
+
readonly '--wzl-fg-subtle-on-accent': "rgb(from currentColor r g b / 0.96)";
|
|
158
160
|
readonly '--wzl-border': "#25272c";
|
|
159
161
|
readonly '--wzl-border-strong': "#6f737b";
|
|
160
162
|
readonly '--wzl-accent-fg': "#8c94ee";
|
|
@@ -189,8 +191,8 @@ declare const THEMES: {
|
|
|
189
191
|
readonly '--wzl-line-subtle': "rgba(230, 231, 233, 0.1)";
|
|
190
192
|
readonly '--wzl-stance-aside-border-color': "rgba(230, 231, 233, 0.1)";
|
|
191
193
|
readonly '--wzl-stance-aside-blur': "0px";
|
|
192
|
-
readonly '--wzl-stance-aside-title-color': "
|
|
193
|
-
readonly '--wzl-stance-advanced-title-color': "
|
|
194
|
+
readonly '--wzl-stance-aside-title-color': "rgb(from currentColor r g b / 0.54)";
|
|
195
|
+
readonly '--wzl-stance-advanced-title-color': "rgb(from currentColor r g b / 0.54)";
|
|
194
196
|
readonly '--wzl-stance-debug-border-style': "dashed";
|
|
195
197
|
readonly '--wzl-font-mono': "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
196
198
|
readonly '--wzl-stance-debug-title-font': "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
@@ -322,8 +324,10 @@ declare const THEMES: {
|
|
|
322
324
|
readonly '--wzl-surface-raised': "#25272c";
|
|
323
325
|
readonly '--wzl-surface-sunken': "#0e0f12";
|
|
324
326
|
readonly '--wzl-fg': "#e6e7e9";
|
|
325
|
-
readonly '--wzl-fg-muted': "
|
|
326
|
-
readonly '--wzl-fg-subtle': "
|
|
327
|
+
readonly '--wzl-fg-muted': "rgb(from currentColor r g b / 0.7)";
|
|
328
|
+
readonly '--wzl-fg-subtle': "rgb(from currentColor r g b / 0.54)";
|
|
329
|
+
readonly '--wzl-fg-muted-on-accent': "rgb(from currentColor r g b / 0.98)";
|
|
330
|
+
readonly '--wzl-fg-subtle-on-accent': "rgb(from currentColor r g b / 0.96)";
|
|
327
331
|
readonly '--wzl-border': "#25272c";
|
|
328
332
|
readonly '--wzl-border-strong': "#6f737b";
|
|
329
333
|
readonly '--wzl-accent-fg': "#8c94ee";
|
|
@@ -358,8 +362,8 @@ declare const THEMES: {
|
|
|
358
362
|
readonly '--wzl-line-subtle': "rgba(230, 231, 233, 0.1)";
|
|
359
363
|
readonly '--wzl-stance-aside-border-color': "rgba(230, 231, 233, 0.1)";
|
|
360
364
|
readonly '--wzl-stance-aside-blur': "0px";
|
|
361
|
-
readonly '--wzl-stance-aside-title-color': "
|
|
362
|
-
readonly '--wzl-stance-advanced-title-color': "
|
|
365
|
+
readonly '--wzl-stance-aside-title-color': "rgb(from currentColor r g b / 0.54)";
|
|
366
|
+
readonly '--wzl-stance-advanced-title-color': "rgb(from currentColor r g b / 0.54)";
|
|
363
367
|
readonly '--wzl-stance-debug-border-style': "dashed";
|
|
364
368
|
readonly '--wzl-font-mono': "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
365
369
|
readonly '--wzl-stance-debug-title-font': "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
@@ -491,8 +495,10 @@ declare const THEMES: {
|
|
|
491
495
|
readonly '--wzl-surface-raised': "#25272c";
|
|
492
496
|
readonly '--wzl-surface-sunken': "#0e0f12";
|
|
493
497
|
readonly '--wzl-fg': "#e6e7e9";
|
|
494
|
-
readonly '--wzl-fg-muted': "
|
|
495
|
-
readonly '--wzl-fg-subtle': "
|
|
498
|
+
readonly '--wzl-fg-muted': "rgb(from currentColor r g b / 0.7)";
|
|
499
|
+
readonly '--wzl-fg-subtle': "rgb(from currentColor r g b / 0.54)";
|
|
500
|
+
readonly '--wzl-fg-muted-on-accent': "rgb(from currentColor r g b / 0.98)";
|
|
501
|
+
readonly '--wzl-fg-subtle-on-accent': "rgb(from currentColor r g b / 0.96)";
|
|
496
502
|
readonly '--wzl-border': "#25272c";
|
|
497
503
|
readonly '--wzl-border-strong': "#6f737b";
|
|
498
504
|
readonly '--wzl-accent-fg': "#8c94ee";
|
|
@@ -527,8 +533,8 @@ declare const THEMES: {
|
|
|
527
533
|
readonly '--wzl-line-subtle': "rgba(230, 231, 233, 0.1)";
|
|
528
534
|
readonly '--wzl-stance-aside-border-color': "rgba(230, 231, 233, 0.1)";
|
|
529
535
|
readonly '--wzl-stance-aside-blur': "0px";
|
|
530
|
-
readonly '--wzl-stance-aside-title-color': "
|
|
531
|
-
readonly '--wzl-stance-advanced-title-color': "
|
|
536
|
+
readonly '--wzl-stance-aside-title-color': "rgb(from currentColor r g b / 0.54)";
|
|
537
|
+
readonly '--wzl-stance-advanced-title-color': "rgb(from currentColor r g b / 0.54)";
|
|
532
538
|
readonly '--wzl-stance-debug-border-style': "dashed";
|
|
533
539
|
readonly '--wzl-font-mono': "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
534
540
|
readonly '--wzl-stance-debug-title-font': "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
@@ -660,8 +666,10 @@ declare const THEMES: {
|
|
|
660
666
|
readonly '--wzl-surface-raised': "#e6e7e9";
|
|
661
667
|
readonly '--wzl-surface-sunken': "#c9cbcf";
|
|
662
668
|
readonly '--wzl-fg': "#0e0f12";
|
|
663
|
-
readonly '--wzl-fg-muted': "
|
|
664
|
-
readonly '--wzl-fg-subtle': "
|
|
669
|
+
readonly '--wzl-fg-muted': "rgb(from currentColor r g b / 0.78)";
|
|
670
|
+
readonly '--wzl-fg-subtle': "rgb(from currentColor r g b / 0.64)";
|
|
671
|
+
readonly '--wzl-fg-muted-on-accent': "rgb(from currentColor r g b / 0.78)";
|
|
672
|
+
readonly '--wzl-fg-subtle-on-accent': "rgb(from currentColor r g b / 0.73)";
|
|
665
673
|
readonly '--wzl-border': "#c9cbcf";
|
|
666
674
|
readonly '--wzl-border-strong': "#4d5058";
|
|
667
675
|
readonly '--wzl-accent-fg': "#4338ca";
|
|
@@ -696,8 +704,8 @@ declare const THEMES: {
|
|
|
696
704
|
readonly '--wzl-line-subtle': "rgba(14, 15, 18, 0.1)";
|
|
697
705
|
readonly '--wzl-stance-aside-border-color': "rgba(14, 15, 18, 0.1)";
|
|
698
706
|
readonly '--wzl-stance-aside-blur': "0px";
|
|
699
|
-
readonly '--wzl-stance-aside-title-color': "
|
|
700
|
-
readonly '--wzl-stance-advanced-title-color': "
|
|
707
|
+
readonly '--wzl-stance-aside-title-color': "rgb(from currentColor r g b / 0.64)";
|
|
708
|
+
readonly '--wzl-stance-advanced-title-color': "rgb(from currentColor r g b / 0.64)";
|
|
701
709
|
readonly '--wzl-stance-debug-border-style': "dashed";
|
|
702
710
|
readonly '--wzl-font-mono': "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
703
711
|
readonly '--wzl-stance-debug-title-font': "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
@@ -829,8 +837,10 @@ declare const THEMES: {
|
|
|
829
837
|
readonly '--wzl-surface-raised': "#e6e7e9";
|
|
830
838
|
readonly '--wzl-surface-sunken': "#c9cbcf";
|
|
831
839
|
readonly '--wzl-fg': "#0e0f12";
|
|
832
|
-
readonly '--wzl-fg-muted': "
|
|
833
|
-
readonly '--wzl-fg-subtle': "
|
|
840
|
+
readonly '--wzl-fg-muted': "rgb(from currentColor r g b / 0.78)";
|
|
841
|
+
readonly '--wzl-fg-subtle': "rgb(from currentColor r g b / 0.64)";
|
|
842
|
+
readonly '--wzl-fg-muted-on-accent': "rgb(from currentColor r g b / 0.78)";
|
|
843
|
+
readonly '--wzl-fg-subtle-on-accent': "rgb(from currentColor r g b / 0.73)";
|
|
834
844
|
readonly '--wzl-border': "#c9cbcf";
|
|
835
845
|
readonly '--wzl-border-strong': "#4d5058";
|
|
836
846
|
readonly '--wzl-accent-fg': "#4338ca";
|
|
@@ -865,8 +875,8 @@ declare const THEMES: {
|
|
|
865
875
|
readonly '--wzl-line-subtle': "rgba(14, 15, 18, 0.1)";
|
|
866
876
|
readonly '--wzl-stance-aside-border-color': "rgba(14, 15, 18, 0.1)";
|
|
867
877
|
readonly '--wzl-stance-aside-blur': "0px";
|
|
868
|
-
readonly '--wzl-stance-aside-title-color': "
|
|
869
|
-
readonly '--wzl-stance-advanced-title-color': "
|
|
878
|
+
readonly '--wzl-stance-aside-title-color': "rgb(from currentColor r g b / 0.64)";
|
|
879
|
+
readonly '--wzl-stance-advanced-title-color': "rgb(from currentColor r g b / 0.64)";
|
|
870
880
|
readonly '--wzl-stance-debug-border-style': "dashed";
|
|
871
881
|
readonly '--wzl-font-mono': "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
872
882
|
readonly '--wzl-stance-debug-title-font': "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
@@ -998,8 +1008,10 @@ declare const THEMES: {
|
|
|
998
1008
|
readonly '--wzl-surface-raised': "#e6e7e9";
|
|
999
1009
|
readonly '--wzl-surface-sunken': "#c9cbcf";
|
|
1000
1010
|
readonly '--wzl-fg': "#0e0f12";
|
|
1001
|
-
readonly '--wzl-fg-muted': "
|
|
1002
|
-
readonly '--wzl-fg-subtle': "
|
|
1011
|
+
readonly '--wzl-fg-muted': "rgb(from currentColor r g b / 0.78)";
|
|
1012
|
+
readonly '--wzl-fg-subtle': "rgb(from currentColor r g b / 0.64)";
|
|
1013
|
+
readonly '--wzl-fg-muted-on-accent': "rgb(from currentColor r g b / 0.78)";
|
|
1014
|
+
readonly '--wzl-fg-subtle-on-accent': "rgb(from currentColor r g b / 0.73)";
|
|
1003
1015
|
readonly '--wzl-border': "#c9cbcf";
|
|
1004
1016
|
readonly '--wzl-border-strong': "#4d5058";
|
|
1005
1017
|
readonly '--wzl-accent-fg': "#4338ca";
|
|
@@ -1034,8 +1046,8 @@ declare const THEMES: {
|
|
|
1034
1046
|
readonly '--wzl-line-subtle': "rgba(14, 15, 18, 0.1)";
|
|
1035
1047
|
readonly '--wzl-stance-aside-border-color': "rgba(14, 15, 18, 0.1)";
|
|
1036
1048
|
readonly '--wzl-stance-aside-blur': "0px";
|
|
1037
|
-
readonly '--wzl-stance-aside-title-color': "
|
|
1038
|
-
readonly '--wzl-stance-advanced-title-color': "
|
|
1049
|
+
readonly '--wzl-stance-aside-title-color': "rgb(from currentColor r g b / 0.64)";
|
|
1050
|
+
readonly '--wzl-stance-advanced-title-color': "rgb(from currentColor r g b / 0.64)";
|
|
1039
1051
|
readonly '--wzl-stance-debug-border-style': "dashed";
|
|
1040
1052
|
readonly '--wzl-font-mono': "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
1041
1053
|
readonly '--wzl-stance-debug-title-font': "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
package/dist/engine.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OklchDeg, oklchDegToHex } from '@weasel-js/paint';
|
|
2
|
-
import { T as ThemeDefinition, L as Lookup, F as FlatTokens, R as RawToken, S as Selection, B as BakedTheme, A as AxisDefs, a as Theme } from './definition-
|
|
3
|
-
export { C as CategoricalRampDef, b as ContrastRule, c as LightnessRampDef, d as LiteralRule, N as NumberParam, O as OffsetRule, P as PinObject, e as PinValue, f as RampDef, g as RefRule, h as ScaleDef, i as SemanticRule, j as StepRule, k as bake, l as bakeChain, m as mergeChain } from './definition-
|
|
2
|
+
import { T as ThemeDefinition, L as Lookup, F as FlatTokens, R as RawToken, S as Selection, B as BakedTheme, A as AxisDefs, a as Theme } from './definition-BQHKxPoy.js';
|
|
3
|
+
export { C as CategoricalRampDef, b as ContrastRule, c as LightnessRampDef, d as LiteralRule, N as NumberParam, O as OffsetRule, P as PinObject, e as PinValue, f as RampDef, g as RefRule, h as ScaleDef, i as SemanticRule, j as StepRule, k as bake, l as bakeChain, m as mergeChain } from './definition-BQHKxPoy.js';
|
|
4
4
|
|
|
5
5
|
/** A color in OKLCH: lightness 0–1, chroma, hue in degrees. paint's own type,
|
|
6
6
|
* under the name this engine has always called it. */
|
package/dist/engine.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { overrideKey, AXES_EXT, ALPHA_EXT } from './chunk-Z675UQ26.js';
|
|
2
|
-
import { mergeAxes, toLch, toHex, generate, DEFAULT_CONSTRAINTS, fullSelection, pick, enumerateSelections, resolveTokens, pickAll, themeAxes, selectionKey, isByAxis, contrast } from './chunk-
|
|
3
|
-
export { CHROMA_WEIGHT, DEFAULT_CONSTRAINTS, anchorFromHex, chromaCap, contrast, deltaE, floorDegrees, generate, hexToRgb, hueGap, hueName, luminance, toHex, toHexPreview, toLab, toLch, vividAt } from './chunk-
|
|
2
|
+
import { mergeAxes, toLch, toHex, generate, DEFAULT_CONSTRAINTS, fullSelection, pick, enumerateSelections, resolveTokens, pickAll, themeAxes, selectionKey, isByAxis, contrast } from './chunk-NUILKH2Z.js';
|
|
3
|
+
export { CHROMA_WEIGHT, DEFAULT_CONSTRAINTS, anchorFromHex, chromaCap, contrast, deltaE, floorDegrees, generate, hexToRgb, hueGap, hueName, luminance, toHex, toHexPreview, toLab, toLch, vividAt } from './chunk-NUILKH2Z.js';
|
|
4
4
|
|
|
5
5
|
// src/engine/steps.ts
|
|
6
6
|
var stepList = (x) => Array.isArray(x) ? [...new Set(x.filter((s) => typeof s === "string"))] : [];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as TokenName, o as ResolvedTheme, a as Theme, S as Selection, p as TokenValue } from './definition-
|
|
2
|
-
export { q as AxisDef, A as AxisDefs, r as AxisValue, s as BAKED_THEMES, B as BakedTheme, t as ByAxis, u as ColorContext, v as ColorList, F as FlatTokens, G as GeneratedColors, w as GeneratedTheme, P as PinObject, e as PinValue, x as RampColors, R as RawToken, y as SerializableColorList, z as THEMES, D as THEME_SOURCES, T as ThemeDefinition, E as ThemeInput, V as Varying, H as colorAt, I as colorCount, J as colorCssAt, K as defineTheme, M as enumerateSelections, Q as fullSelection, U as isByAxis, W as rampSteps, X as resolveTheme, Y as selectionKey, Z as themeAxes, _ as themeTones, $ as weaselTheme } from './definition-
|
|
1
|
+
import { n as TokenName, o as ResolvedTheme, a as Theme, S as Selection, p as TokenValue } from './definition-BQHKxPoy.js';
|
|
2
|
+
export { q as AxisDef, A as AxisDefs, r as AxisValue, s as BAKED_THEMES, B as BakedTheme, t as ByAxis, u as ColorContext, v as ColorList, F as FlatTokens, G as GeneratedColors, w as GeneratedTheme, P as PinObject, e as PinValue, x as RampColors, R as RawToken, y as SerializableColorList, z as THEMES, D as THEME_SOURCES, T as ThemeDefinition, E as ThemeInput, V as Varying, H as colorAt, I as colorCount, J as colorCssAt, K as defineTheme, M as enumerateSelections, Q as fullSelection, U as isByAxis, W as rampSteps, X as resolveTheme, Y as selectionKey, Z as themeAxes, _ as themeTones, $ as weaselTheme } from './definition-BQHKxPoy.js';
|
|
3
3
|
export { C as ColorMode, a as ColorModePreference, i as isColorModePreference } from './colorMode-CoklZomJ.js';
|
|
4
4
|
|
|
5
5
|
/** One row of `TOKEN_MANIFEST`: a token, its DTCG type, the name-prefix
|
|
@@ -45,6 +45,17 @@ declare function tokenPx(name: TokenName, resolved?: ResolvedTheme): number;
|
|
|
45
45
|
*/
|
|
46
46
|
declare function applyTheme(el: HTMLElement, theme: Theme, selection?: Selection): void;
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* A resolved token value with `currentColor` taken to be `current`, for a surface drawn without the
|
|
50
|
+
* cascade — a canvas reading a resolved theme — where `currentColor` has nothing to resolve against.
|
|
51
|
+
* Pass the color of the text the value is drawn beside, usually `--wzl-fg`. A value that never
|
|
52
|
+
* mentions `currentColor` comes back unchanged.
|
|
53
|
+
*
|
|
54
|
+
* Flattens the forms the kit's themes write: bare `currentColor`, `rgb(from currentColor r g b / a)`
|
|
55
|
+
* and `color-mix(in <space>, currentColor p%, transparent)`. Throws on any other use of it.
|
|
56
|
+
*/
|
|
57
|
+
declare function resolveCurrentColor(value: string, current: string): string;
|
|
58
|
+
|
|
48
59
|
interface DtcgDocument {
|
|
49
60
|
name?: unknown;
|
|
50
61
|
defaultMode?: unknown;
|
|
@@ -119,4 +130,4 @@ interface StanceLookup<S extends string> {
|
|
|
119
130
|
*/
|
|
120
131
|
declare function resolveStanceSlots<S extends string>(tokens: Readonly<Record<string, string>>, base: Readonly<Record<S, string>>, { stance, nested, stanced }?: StanceLookup<S>): Record<S, string>;
|
|
121
132
|
|
|
122
|
-
export { ResolvedTheme, STANCES, STANCE_SLOTS, Selection, type Stance, type StanceLookup, type StanceSlot, TOKEN_MANIFEST, Theme, type TokenManifestEntry, TokenName, TokenValue, applyTheme, loadDTCG, parseTokenValue, resolveStanceSlots, serializeTokenValue, stanceSlotNames, tokenPx };
|
|
133
|
+
export { ResolvedTheme, STANCES, STANCE_SLOTS, Selection, type Stance, type StanceLookup, type StanceSlot, TOKEN_MANIFEST, Theme, type TokenManifestEntry, TokenName, TokenValue, applyTheme, loadDTCG, parseTokenValue, resolveCurrentColor, resolveStanceSlots, serializeTokenValue, stanceSlotNames, tokenPx };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { weaselTheme } from './chunk-
|
|
2
|
-
export { BAKED_THEMES, THEMES, THEME_SOURCES, applyTheme, colorAt, colorCount, colorCssAt, defineTheme, isColorModePreference, rampSteps, themeTones, weaselTheme } from './chunk-
|
|
1
|
+
import { weaselTheme } from './chunk-VUNWK7T2.js';
|
|
2
|
+
export { BAKED_THEMES, THEMES, THEME_SOURCES, applyTheme, colorAt, colorCount, colorCssAt, defineTheme, isColorModePreference, rampSteps, themeTones, weaselTheme } from './chunk-VUNWK7T2.js';
|
|
3
3
|
import { AXES_EXT, overrideKey, ALPHA_EXT } from './chunk-Z675UQ26.js';
|
|
4
|
-
import { themeAxes, mergeAxes } from './chunk-
|
|
5
|
-
export { enumerateSelections, fullSelection, isByAxis, parseTokenValue, resolveTheme, selectionKey, serializeTokenValue, themeAxes } from './chunk-
|
|
4
|
+
import { atAlpha, withAlpha, themeAxes, mergeAxes } from './chunk-NUILKH2Z.js';
|
|
5
|
+
export { enumerateSelections, fullSelection, isByAxis, parseTokenValue, resolveTheme, selectionKey, serializeTokenValue, themeAxes } from './chunk-NUILKH2Z.js';
|
|
6
6
|
|
|
7
7
|
// src/generated/manifest.ts
|
|
8
8
|
var TOKEN_MANIFEST = [
|
|
@@ -50,8 +50,10 @@ var TOKEN_MANIFEST = [
|
|
|
50
50
|
{ name: "--wzl-surface-raised", type: "color", group: "surface", defaultValue: "#25272c", description: "", hook: false },
|
|
51
51
|
{ name: "--wzl-surface-sunken", type: "color", group: "surface", defaultValue: "#0e0f12", description: "", hook: false },
|
|
52
52
|
{ name: "--wzl-fg", type: "color", group: "fg", defaultValue: "#e6e7e9", description: "", hook: false },
|
|
53
|
-
{ name: "--wzl-fg-muted", type: "color", group: "fg", defaultValue: "
|
|
54
|
-
{ name: "--wzl-fg-subtle", type: "color", group: "fg", defaultValue: "
|
|
53
|
+
{ name: "--wzl-fg-muted", type: "color", group: "fg", defaultValue: "rgb(from currentColor r g b / 0.7)", description: "Secondary text: the text color in effect where it is used, at reduced alpha, so it steps down from whatever text it sits beside on any surface. The alpha is absolute, so muted text nested in muted text stays one step down. Under fg it clears WCAG 4.5:1 on surface, surface-raised, and surface-sunken in both modes.", hook: false },
|
|
54
|
+
{ name: "--wzl-fg-subtle", type: "color", group: "fg", defaultValue: "rgb(from currentColor r g b / 0.54)", description: "Tertiary text: a further step down from the text color in effect, by the same rule as fg-muted. Under fg it clears WCAG 4.5:1 on surface, surface-raised, and surface-sunken in both modes.", hook: false },
|
|
55
|
+
{ name: "--wzl-fg-muted-on-accent", type: "color", group: "fg", defaultValue: "rgb(from currentColor r g b / 0.98)", description: "Secondary text on an accent fill. Every rule that sets --wzl-fg-on-accent text redirects --wzl-fg-muted here (npm run check:on-accent), because the general step falls below WCAG 4.5:1 on the accent. In dark mode that leaves almost no step to show.", hook: false },
|
|
56
|
+
{ name: "--wzl-fg-subtle-on-accent", type: "color", group: "fg", defaultValue: "rgb(from currentColor r g b / 0.96)", description: "Tertiary text on an accent fill, redirected from --wzl-fg-subtle by the same rule as fg-muted-on-accent. Clears WCAG 4.5:1 on the accent in both modes.", hook: false },
|
|
55
57
|
{ name: "--wzl-border", type: "color", group: "border", defaultValue: "#25272c", description: "", hook: false },
|
|
56
58
|
{ name: "--wzl-border-strong", type: "color", group: "border", defaultValue: "#6f737b", description: "The line that has to be seen: a control's edge, a raised surface's outline. Clears WCAG 1.4.11's 3:1 against every surface in both modes.", hook: false },
|
|
57
59
|
{ name: "--wzl-accent-fg", type: "color", group: "accent", defaultValue: "#8c94ee", description: "Accent for foreground use \u2014 text, icons, selected labels drawn on a surface. accent is a fill; the midnight base is too dim to read as text on dark surfaces.", hook: false },
|
|
@@ -81,8 +83,8 @@ var TOKEN_MANIFEST = [
|
|
|
81
83
|
{ name: "--wzl-stance-aside-surface", type: "color", group: "stance", defaultValue: "transparent", description: "", hook: false },
|
|
82
84
|
{ name: "--wzl-stance-aside-border-color", type: "color", group: "stance", defaultValue: "rgba(230, 231, 233, 0.1)", description: "", hook: false },
|
|
83
85
|
{ name: "--wzl-stance-aside-blur", type: "dimension", group: "stance", defaultValue: "0px", description: "", hook: false },
|
|
84
|
-
{ name: "--wzl-stance-aside-title-color", type: "color", group: "stance", defaultValue: "
|
|
85
|
-
{ name: "--wzl-stance-advanced-title-color", type: "color", group: "stance", defaultValue: "
|
|
86
|
+
{ name: "--wzl-stance-aside-title-color", type: "color", group: "stance", defaultValue: "rgb(from currentColor r g b / 0.54)", description: "", hook: false },
|
|
87
|
+
{ name: "--wzl-stance-advanced-title-color", type: "color", group: "stance", defaultValue: "rgb(from currentColor r g b / 0.54)", description: "", hook: false },
|
|
86
88
|
{ name: "--wzl-stance-debug-border-style", type: "string", group: "stance", defaultValue: "dashed", description: "", hook: false },
|
|
87
89
|
{ name: "--wzl-stance-debug-title-font", type: "fontFamily", group: "stance", defaultValue: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace", description: "", hook: false },
|
|
88
90
|
{ name: "--wzl-stance-debug-title-case", type: "string", group: "stance", defaultValue: "none", description: "", hook: false },
|
|
@@ -206,6 +208,22 @@ function tokenPx(name, resolved) {
|
|
|
206
208
|
return Number(m[1]);
|
|
207
209
|
}
|
|
208
210
|
|
|
211
|
+
// src/currentColor.ts
|
|
212
|
+
var NUMBER = String.raw`(\d*\.?\d+)(%?)`;
|
|
213
|
+
var RELATIVE = new RegExp(String.raw`^rgb\(\s*from\s+currentcolor\s+r\s+g\s+b\s*/\s*${NUMBER}\s*\)$`, "i");
|
|
214
|
+
var MIX = new RegExp(String.raw`^color-mix\(\s*in\s+[\w-]+\s*,\s*currentcolor\s+${NUMBER}\s*,\s*transparent\s*\)$`, "i");
|
|
215
|
+
var fraction = (n, pct) => Number(n) / (pct ? 100 : 1);
|
|
216
|
+
function resolveCurrentColor(value, current) {
|
|
217
|
+
const v = value.trim();
|
|
218
|
+
if (!/currentcolor/i.test(v)) return value;
|
|
219
|
+
if (/^currentcolor$/i.test(v)) return current;
|
|
220
|
+
const rel = RELATIVE.exec(v);
|
|
221
|
+
if (rel) return atAlpha(current, fraction(rel[1], rel[2]));
|
|
222
|
+
const mix = MIX.exec(v);
|
|
223
|
+
if (mix && mix[2] === "%") return withAlpha(current, fraction(mix[1], mix[2]));
|
|
224
|
+
throw new Error(`resolveCurrentColor: cannot flatten "${value}"`);
|
|
225
|
+
}
|
|
226
|
+
|
|
209
227
|
// src/dtcg/flatten.ts
|
|
210
228
|
var isToken = (v) => typeof v === "object" && v !== null && "$value" in v;
|
|
211
229
|
function flattenTokens(doc) {
|
|
@@ -355,6 +373,6 @@ function resolveStanceSlots(tokens, base, { stance, nested, stanced } = {}) {
|
|
|
355
373
|
return out;
|
|
356
374
|
}
|
|
357
375
|
|
|
358
|
-
export { STANCES, STANCE_SLOTS, TOKEN_MANIFEST, loadDTCG, resolveStanceSlots, stanceSlotNames, tokenPx };
|
|
376
|
+
export { STANCES, STANCE_SLOTS, TOKEN_MANIFEST, loadDTCG, resolveCurrentColor, resolveStanceSlots, stanceSlotNames, tokenPx };
|
|
359
377
|
//# sourceMappingURL=index.js.map
|
|
360
378
|
//# sourceMappingURL=index.js.map
|