@loworbitstudio/visor-theme-engine 0.32.0 → 0.33.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/dist/adapters/index.js
CHANGED
|
@@ -1698,6 +1698,9 @@ var checkboxFamily = {
|
|
|
1698
1698
|
{ key: "border-checked", property: "outline-color", description: "Checked edge colour.", consumers: at(CHECKBOX, "var(--interactive-primary-bg, var(--primary, #111827))") }
|
|
1699
1699
|
]
|
|
1700
1700
|
};
|
|
1701
|
+
var FOCUS_HALO = "color-mix(in srgb, var(--border-focus, #111827) 15%, transparent)";
|
|
1702
|
+
var INVALID_HALO = "color-mix(in srgb, var(--border-error, #ef4444) 15%, transparent)";
|
|
1703
|
+
var INVALID_HALO_FOCUSED = "color-mix(in srgb, var(--border-error, #ef4444) 30%, transparent)";
|
|
1701
1704
|
var INPUT_MD_PADDING = "var(--spacing-3_5, 0.875rem) var(--spacing-4, 1rem)";
|
|
1702
1705
|
var INPUT_MD_PADDING_NUDGED = "calc(var(--spacing-3_5, 0.875rem) + var(--input-nudge, 0px)) var(--spacing-4, 1rem) calc(var(--spacing-3_5, 0.875rem) - var(--input-nudge, 0px))";
|
|
1703
1706
|
var inputFamily = {
|
|
@@ -1726,6 +1729,20 @@ var inputFamily = {
|
|
|
1726
1729
|
property: "border-radius",
|
|
1727
1730
|
description: "`md` corner rounding. Also the rounding of DialogField's well.",
|
|
1728
1731
|
consumers: each([INPUT, DIALOG_FIELD], "var(--input-radius-md, var(--radius-sm, 0.5rem))")
|
|
1732
|
+
},
|
|
1733
|
+
// VI-699: the refused-value well, read by every text-entry control.
|
|
1734
|
+
{
|
|
1735
|
+
key: "bg-invalid",
|
|
1736
|
+
property: "background-color",
|
|
1737
|
+
description: "Well of a refused field (`aria-invalid`). Input, Textarea, Select and TagInput all read it. Unbound, Input uses `--surface-error-subtle` and the others keep their resting well.",
|
|
1738
|
+
consumers: [
|
|
1739
|
+
{ file: INPUT, fallback: "var(--surface-error-subtle, color-mix(in srgb, var(--border-error, #ef4444) 6%, var(--field-control-bg, var(--input-bg, #f9fafb))))" },
|
|
1740
|
+
{ file: INPUT, fallback: "var(--surface-error-subtle, color-mix(in srgb, var(--border-error, #ef4444) 6%, var(--field-control-bg, var(--surface-card))))" },
|
|
1741
|
+
{ file: TEXTAREA, fallback: "var(--textarea-bg, var(--surface-interactive-default, #f9fafb))" },
|
|
1742
|
+
{ file: SELECT, fallback: "var(--field-control-bg, var(--select-bg, var(--surface-interactive-default, #f9fafb)))" },
|
|
1743
|
+
{ file: SELECT, fallback: "var(--field-control-bg, var(--surface-card))" },
|
|
1744
|
+
{ file: TAG_INPUT, fallback: "var(--tag-input-bg, var(--surface-interactive-default, #f9fafb))" }
|
|
1745
|
+
]
|
|
1729
1746
|
}
|
|
1730
1747
|
]
|
|
1731
1748
|
};
|
|
@@ -1842,6 +1859,31 @@ var controlFamily = {
|
|
|
1842
1859
|
{ file: INPUT, fallback: "0px" },
|
|
1843
1860
|
...each([TEXTAREA, SELECT], "var(--focus-ring-width, 2px)")
|
|
1844
1861
|
]
|
|
1862
|
+
},
|
|
1863
|
+
// VI-699: colours of the focus halo and the refused field's ring and halo.
|
|
1864
|
+
{
|
|
1865
|
+
key: "focus-halo-color",
|
|
1866
|
+
property: "box-shadow",
|
|
1867
|
+
description: "Focus halo colour, apart from the ring (`border-focus`). Unbound, 15% of `border-focus`.",
|
|
1868
|
+
consumers: each([INPUT, TEXTAREA, SELECT, TAG_INPUT], FOCUS_HALO)
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
key: "focus-halo-width",
|
|
1872
|
+
property: "box-shadow",
|
|
1873
|
+
description: "Focus halo width, apart from `--focus-ring-width` (the focus ring's own width). Unbound, `--focus-ring-width`. Also the halo of a focused refused field.",
|
|
1874
|
+
consumers: each([INPUT, TEXTAREA, SELECT, TAG_INPUT], "var(--focus-ring-width, 2px)")
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
key: "invalid-ring-color",
|
|
1878
|
+
property: "box-shadow (Input) / outline-color",
|
|
1879
|
+
description: "Colour of the ring on a refused value. Unbound, `--border-error`.",
|
|
1880
|
+
consumers: each([INPUT, TEXTAREA, SELECT], "var(--border-error, #ef4444)")
|
|
1881
|
+
},
|
|
1882
|
+
{
|
|
1883
|
+
key: "invalid-halo-color",
|
|
1884
|
+
property: "box-shadow",
|
|
1885
|
+
description: "Colour of the halo around a refused value's ring. Unbound, 15% of `--border-error` (30% on a focused Input).",
|
|
1886
|
+
consumers: [...each([INPUT, TEXTAREA, SELECT], INVALID_HALO), ...at(INPUT, INVALID_HALO_FOCUSED)]
|
|
1845
1887
|
}
|
|
1846
1888
|
]
|
|
1847
1889
|
};
|
|
@@ -1883,6 +1925,19 @@ var buttonFamily = {
|
|
|
1883
1925
|
prefix: "button",
|
|
1884
1926
|
description: "Button type treatment and rounding. The unprefixed keys set every size at once; a size key (`dlg-radius`) overrides one size.",
|
|
1885
1927
|
tokens: [
|
|
1928
|
+
// VI-699: fill and ink per variant, apart from the shared `interactive-*`
|
|
1929
|
+
// roles (Switch's on track reads `interactive-primary-bg`).
|
|
1930
|
+
{ key: "default-bg", property: "background-color", description: "`default` variant fill, apart from `interactive-primary-bg`.", consumers: at(BUTTON, "var(--interactive-primary-bg, var(--primary, #111827))") },
|
|
1931
|
+
{ key: "default-bg-hover", property: "background-color", description: "`default` variant fill on hover.", consumers: at(BUTTON, "var(--interactive-primary-bg-hover, #1f2937)") },
|
|
1932
|
+
{ key: "default-text", property: "color", description: "`default` variant ink, apart from `interactive-primary-text`.", consumers: at(BUTTON, "var(--interactive-primary-text, #f9fafb)") },
|
|
1933
|
+
{ key: "hero-bg", property: "background-color", description: "`hero` variant fill, the solid face for special moments. Unbound, it is the `default` look.", consumers: at(BUTTON, "var(--interactive-primary-bg, var(--primary, #111827))") },
|
|
1934
|
+
{ key: "hero-bg-hover", property: "background-color", description: "`hero` variant fill on hover.", consumers: at(BUTTON, "var(--interactive-primary-bg-hover, #1f2937)") },
|
|
1935
|
+
{ key: "hero-text", property: "color", description: "`hero` variant ink.", consumers: at(BUTTON, "var(--interactive-primary-text, #f9fafb)") },
|
|
1936
|
+
{ key: "ghost-text", property: "color", description: "`ghost` variant ink at rest. The `dlg` size rests in secondary ink.", consumers: [...at(BUTTON, "var(--text-primary, #111827)"), ...at(BUTTON, "var(--text-secondary, #6b7280)")] },
|
|
1937
|
+
{ key: "ghost-text-hover", property: "color", description: "`ghost` variant ink on hover.", consumers: [...at(BUTTON, "var(--text-primary, #111827)"), ...at(BUTTON, "var(--text-secondary, #6b7280)")] },
|
|
1938
|
+
{ key: "md-height", property: "height", description: "`md` height. Bind `auto` with `md-padding` to let the padding set the height.", consumers: at(BUTTON, "var(--label-box-height)") },
|
|
1939
|
+
{ key: "md-padding", property: "padding", description: "`md` padding.", consumers: at(BUTTON, "0 var(--spacing-4, 1rem)") },
|
|
1940
|
+
{ key: "dlg-padding", property: "padding", description: "`dlg` padding.", consumers: at(BUTTON, "var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem)") },
|
|
1886
1941
|
{
|
|
1887
1942
|
key: "text-transform",
|
|
1888
1943
|
property: "text-transform",
|
package/dist/index.d.ts
CHANGED
|
@@ -1186,7 +1186,7 @@ var properties = {
|
|
|
1186
1186
|
},
|
|
1187
1187
|
input: {
|
|
1188
1188
|
type: "object",
|
|
1189
|
-
description: "Input shape at the default `md` size. Each key falls back to the matching `--input-*-md` variable, so a scope that sets one still applies while the key is unbound; a bound key wins. Keys: md-height, md-padding, md-radius.",
|
|
1189
|
+
description: "Input shape at the default `md` size. Each key falls back to the matching `--input-*-md` variable, so a scope that sets one still applies while the key is unbound; a bound key wins. Keys: md-height, md-padding, md-radius, bg-invalid.",
|
|
1190
1190
|
additionalProperties: {
|
|
1191
1191
|
$ref: "#/$defs/componentTokenBinding"
|
|
1192
1192
|
}
|
|
@@ -1221,7 +1221,7 @@ var properties = {
|
|
|
1221
1221
|
},
|
|
1222
1222
|
control: {
|
|
1223
1223
|
type: "object",
|
|
1224
|
-
description: "The one switch for form-control edges (VI-655). Every form control draws its resting edge from these, so `edge-width: 0` removes every resting edge at once, dashed edges included, with no layout shift. Keys: edge-width, edge-color, edge-style, drop-edge-width, drop-edge-style, state-edge-width, invalid-ring-width, invalid-halo-width.",
|
|
1224
|
+
description: "The one switch for form-control edges (VI-655). Every form control draws its resting edge from these, so `edge-width: 0` removes every resting edge at once, dashed edges included, with no layout shift. Keys: edge-width, edge-color, edge-style, drop-edge-width, drop-edge-style, state-edge-width, invalid-ring-width, invalid-halo-width, focus-halo-color, focus-halo-width, invalid-ring-color, invalid-halo-color.",
|
|
1225
1225
|
additionalProperties: {
|
|
1226
1226
|
$ref: "#/$defs/componentTokenBinding"
|
|
1227
1227
|
}
|
|
@@ -1242,7 +1242,7 @@ var properties = {
|
|
|
1242
1242
|
},
|
|
1243
1243
|
button: {
|
|
1244
1244
|
type: "object",
|
|
1245
|
-
description: "Button type treatment and rounding. The unprefixed keys set every size at once; a size key (`dlg-radius`) overrides one size. Keys: text-transform, letter-spacing, font-weight, radius, sm-font-size, sm-font-weight, sm-text-transform, sm-letter-spacing, sm-radius, md-font-size, md-font-weight, md-text-transform, md-letter-spacing, md-radius, lg-font-size, lg-font-weight, lg-text-transform, lg-letter-spacing, lg-radius, dlg-font-size, dlg-font-weight, dlg-text-transform, dlg-letter-spacing, dlg-radius, icon-size, icon-pad, icon-radius, icon-ghost-color.",
|
|
1245
|
+
description: "Button type treatment and rounding. The unprefixed keys set every size at once; a size key (`dlg-radius`) overrides one size. Keys: default-bg, default-bg-hover, default-text, hero-bg, hero-bg-hover, hero-text, ghost-text, ghost-text-hover, md-height, md-padding, dlg-padding, text-transform, letter-spacing, font-weight, radius, sm-font-size, sm-font-weight, sm-text-transform, sm-letter-spacing, sm-radius, md-font-size, md-font-weight, md-text-transform, md-letter-spacing, md-radius, lg-font-size, lg-font-weight, lg-text-transform, lg-letter-spacing, lg-radius, dlg-font-size, dlg-font-weight, dlg-text-transform, dlg-letter-spacing, dlg-radius, icon-size, icon-pad, icon-radius, icon-ghost-color.",
|
|
1246
1246
|
additionalProperties: {
|
|
1247
1247
|
$ref: "#/$defs/componentTokenBinding"
|
|
1248
1248
|
}
|
package/dist/index.js
CHANGED
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
rgbToOklch,
|
|
69
69
|
serializeColor,
|
|
70
70
|
validateComponentBindings
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-73LDGC4G.js";
|
|
72
72
|
|
|
73
73
|
// src/fonts/validate-coverage.ts
|
|
74
74
|
var FONT_VAR_RE = /--font-(heading|display|body|sans|mono)\s*:\s*([^;]+);/g;
|
|
@@ -1207,7 +1207,7 @@ var visor_theme_schema_default = {
|
|
|
1207
1207
|
},
|
|
1208
1208
|
input: {
|
|
1209
1209
|
type: "object",
|
|
1210
|
-
description: "Input shape at the default `md` size. Each key falls back to the matching `--input-*-md` variable, so a scope that sets one still applies while the key is unbound; a bound key wins. Keys: md-height, md-padding, md-radius.",
|
|
1210
|
+
description: "Input shape at the default `md` size. Each key falls back to the matching `--input-*-md` variable, so a scope that sets one still applies while the key is unbound; a bound key wins. Keys: md-height, md-padding, md-radius, bg-invalid.",
|
|
1211
1211
|
additionalProperties: {
|
|
1212
1212
|
$ref: "#/$defs/componentTokenBinding"
|
|
1213
1213
|
}
|
|
@@ -1242,7 +1242,7 @@ var visor_theme_schema_default = {
|
|
|
1242
1242
|
},
|
|
1243
1243
|
control: {
|
|
1244
1244
|
type: "object",
|
|
1245
|
-
description: "The one switch for form-control edges (VI-655). Every form control draws its resting edge from these, so `edge-width: 0` removes every resting edge at once, dashed edges included, with no layout shift. Keys: edge-width, edge-color, edge-style, drop-edge-width, drop-edge-style, state-edge-width, invalid-ring-width, invalid-halo-width.",
|
|
1245
|
+
description: "The one switch for form-control edges (VI-655). Every form control draws its resting edge from these, so `edge-width: 0` removes every resting edge at once, dashed edges included, with no layout shift. Keys: edge-width, edge-color, edge-style, drop-edge-width, drop-edge-style, state-edge-width, invalid-ring-width, invalid-halo-width, focus-halo-color, focus-halo-width, invalid-ring-color, invalid-halo-color.",
|
|
1246
1246
|
additionalProperties: {
|
|
1247
1247
|
$ref: "#/$defs/componentTokenBinding"
|
|
1248
1248
|
}
|
|
@@ -1263,7 +1263,7 @@ var visor_theme_schema_default = {
|
|
|
1263
1263
|
},
|
|
1264
1264
|
button: {
|
|
1265
1265
|
type: "object",
|
|
1266
|
-
description: "Button type treatment and rounding. The unprefixed keys set every size at once; a size key (`dlg-radius`) overrides one size. Keys: text-transform, letter-spacing, font-weight, radius, sm-font-size, sm-font-weight, sm-text-transform, sm-letter-spacing, sm-radius, md-font-size, md-font-weight, md-text-transform, md-letter-spacing, md-radius, lg-font-size, lg-font-weight, lg-text-transform, lg-letter-spacing, lg-radius, dlg-font-size, dlg-font-weight, dlg-text-transform, dlg-letter-spacing, dlg-radius, icon-size, icon-pad, icon-radius, icon-ghost-color.",
|
|
1266
|
+
description: "Button type treatment and rounding. The unprefixed keys set every size at once; a size key (`dlg-radius`) overrides one size. Keys: default-bg, default-bg-hover, default-text, hero-bg, hero-bg-hover, hero-text, ghost-text, ghost-text-hover, md-height, md-padding, dlg-padding, text-transform, letter-spacing, font-weight, radius, sm-font-size, sm-font-weight, sm-text-transform, sm-letter-spacing, sm-radius, md-font-size, md-font-weight, md-text-transform, md-letter-spacing, md-radius, lg-font-size, lg-font-weight, lg-text-transform, lg-letter-spacing, lg-radius, dlg-font-size, dlg-font-weight, dlg-text-transform, dlg-letter-spacing, dlg-radius, icon-size, icon-pad, icon-radius, icon-ghost-color.",
|
|
1267
1267
|
additionalProperties: {
|
|
1268
1268
|
$ref: "#/$defs/componentTokenBinding"
|
|
1269
1269
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loworbitstudio/visor-theme-engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Theme engine for the Visor design system — shade generation, token mapping, font resolution, and import/export for .visor.yaml themes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -586,7 +586,7 @@
|
|
|
586
586
|
},
|
|
587
587
|
"input": {
|
|
588
588
|
"type": "object",
|
|
589
|
-
"description": "Input shape at the default `md` size. Each key falls back to the matching `--input-*-md` variable, so a scope that sets one still applies while the key is unbound; a bound key wins. Keys: md-height, md-padding, md-radius.",
|
|
589
|
+
"description": "Input shape at the default `md` size. Each key falls back to the matching `--input-*-md` variable, so a scope that sets one still applies while the key is unbound; a bound key wins. Keys: md-height, md-padding, md-radius, bg-invalid.",
|
|
590
590
|
"additionalProperties": {
|
|
591
591
|
"$ref": "#/$defs/componentTokenBinding"
|
|
592
592
|
}
|
|
@@ -621,7 +621,7 @@
|
|
|
621
621
|
},
|
|
622
622
|
"control": {
|
|
623
623
|
"type": "object",
|
|
624
|
-
"description": "The one switch for form-control edges (VI-655). Every form control draws its resting edge from these, so `edge-width: 0` removes every resting edge at once, dashed edges included, with no layout shift. Keys: edge-width, edge-color, edge-style, drop-edge-width, drop-edge-style, state-edge-width, invalid-ring-width, invalid-halo-width.",
|
|
624
|
+
"description": "The one switch for form-control edges (VI-655). Every form control draws its resting edge from these, so `edge-width: 0` removes every resting edge at once, dashed edges included, with no layout shift. Keys: edge-width, edge-color, edge-style, drop-edge-width, drop-edge-style, state-edge-width, invalid-ring-width, invalid-halo-width, focus-halo-color, focus-halo-width, invalid-ring-color, invalid-halo-color.",
|
|
625
625
|
"additionalProperties": {
|
|
626
626
|
"$ref": "#/$defs/componentTokenBinding"
|
|
627
627
|
}
|
|
@@ -642,7 +642,7 @@
|
|
|
642
642
|
},
|
|
643
643
|
"button": {
|
|
644
644
|
"type": "object",
|
|
645
|
-
"description": "Button type treatment and rounding. The unprefixed keys set every size at once; a size key (`dlg-radius`) overrides one size. Keys: text-transform, letter-spacing, font-weight, radius, sm-font-size, sm-font-weight, sm-text-transform, sm-letter-spacing, sm-radius, md-font-size, md-font-weight, md-text-transform, md-letter-spacing, md-radius, lg-font-size, lg-font-weight, lg-text-transform, lg-letter-spacing, lg-radius, dlg-font-size, dlg-font-weight, dlg-text-transform, dlg-letter-spacing, dlg-radius, icon-size, icon-pad, icon-radius, icon-ghost-color.",
|
|
645
|
+
"description": "Button type treatment and rounding. The unprefixed keys set every size at once; a size key (`dlg-radius`) overrides one size. Keys: default-bg, default-bg-hover, default-text, hero-bg, hero-bg-hover, hero-text, ghost-text, ghost-text-hover, md-height, md-padding, dlg-padding, text-transform, letter-spacing, font-weight, radius, sm-font-size, sm-font-weight, sm-text-transform, sm-letter-spacing, sm-radius, md-font-size, md-font-weight, md-text-transform, md-letter-spacing, md-radius, lg-font-size, lg-font-weight, lg-text-transform, lg-letter-spacing, lg-radius, dlg-font-size, dlg-font-weight, dlg-text-transform, dlg-letter-spacing, dlg-radius, icon-size, icon-pad, icon-radius, icon-ghost-color.",
|
|
646
646
|
"additionalProperties": {
|
|
647
647
|
"$ref": "#/$defs/componentTokenBinding"
|
|
648
648
|
}
|