@loworbitstudio/visor-theme-engine 0.47.0 → 0.48.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.
@@ -34,7 +34,7 @@ import {
34
34
  resolveThemeBrand,
35
35
  resolveThemeFonts,
36
36
  sectionComment
37
- } from "../chunk-JEGHNZOT.js";
37
+ } from "../chunk-ZQ2LB76I.js";
38
38
 
39
39
  // src/adapters/brand-passthrough.ts
40
40
  var SENTINEL_COLOR = "#ff00ff";
@@ -1983,6 +1983,7 @@ var controlFamily = {
1983
1983
  description: "THE switch. Resting-edge weight for every form control; `0` turns every resting edge off.",
1984
1984
  consumers: [
1985
1985
  ...each(EDGE_CONTROLS, "1px"),
1986
+ { file: FIELD, fallback: "1px" },
1986
1987
  { file: CHIP, fallback: "var(--stroke-width-thin, 1px)" },
1987
1988
  { file: FILE_UPLOAD, fallback: "1px" },
1988
1989
  { file: EMPTY_STATE, fallback: "1px" }
@@ -1992,7 +1993,7 @@ var controlFamily = {
1992
1993
  key: "edge-color",
1993
1994
  property: "outline-color",
1994
1995
  description: "Resting-edge colour. A component's own `--<component>-border` override still wins over it.",
1995
- consumers: each([INPUT, NUMBER_INPUT, TEXTAREA, SELECT, CHECKBOX, TAG_INPUT, CHIP, FILE_UPLOAD, EMPTY_STATE, BUTTON], "var(--border-default, #e5e7eb)")
1996
+ consumers: each([INPUT, NUMBER_INPUT, TEXTAREA, SELECT, CHECKBOX, TAG_INPUT, CHIP, FILE_UPLOAD, EMPTY_STATE, BUTTON, FIELD], "var(--border-default, #e5e7eb)")
1996
1997
  },
1997
1998
  {
1998
1999
  key: "edge-style",
@@ -2069,8 +2070,55 @@ var controlFamily = {
2069
2070
  var fieldFamily = {
2070
2071
  family: "field",
2071
2072
  prefix: "field",
2072
- description: "Field label treatment \u2014 size, case, tracking and colour of `FieldLabel`, in both densities.",
2073
+ description: 'Field\'s parts: the label (size, weight, line height, case, tracking, colour, the "optional" mark), the hint, the error line (a theme error colour, weight, icon gap and size) and the `FieldControl` box a control sits in (height, corners, fill, focus ring, invalid fill and line, the control\'s padding, type and placeholder, the tall box for a Textarea). Under `data-glass="on"` the box reads the glass layer\'s control values and the error line its on-photo ink.',
2073
2074
  tokens: [
2075
+ { key: "gap", property: "gap", description: "Space between the label, the control, the hint and the error line.", consumers: at(FIELD, "var(--spacing-2, 0.5rem)") },
2076
+ { key: "text-inset", property: "padding-inline-start", description: "Start inset of the label, the hint and the error line, so their text lines up inside the box's corner.", consumers: [{ file: FIELD, fallback: "0" }, { file: FIELD, fallback: "0" }, { file: FIELD, fallback: "0" }] },
2077
+ { key: "label-font-weight", property: "font-weight", description: "Label weight.", consumers: at(FIELD, "var(--font-weight-medium, 500)") },
2078
+ { key: "label-line-height", property: "line-height", description: "Label line height.", consumers: at(FIELD, "1.4") },
2079
+ { key: "label-optional-color", property: "color", description: 'Colour of the "optional" mark after the label (`FieldLabel optional`).', consumers: at(FIELD, "var(--text-secondary, currentColor)") },
2080
+ { key: "label-optional-font-weight", property: "font-weight", description: 'Weight of the "optional" mark.', consumers: at(FIELD, "var(--font-weight-normal, 400)") },
2081
+ {
2082
+ key: "description-font-size",
2083
+ property: "font-size",
2084
+ description: "Hint (`FieldDescription`) type size. Drives both the standard and editorial-density steps.",
2085
+ consumers: [
2086
+ { file: FIELD, fallback: "var(--font-size-xs, 0.75rem)" },
2087
+ { file: FIELD, fallback: "11px" }
2088
+ ]
2089
+ },
2090
+ {
2091
+ key: "description-color",
2092
+ property: "color",
2093
+ description: "Hint colour. Drives both the standard and editorial-density steps.",
2094
+ consumers: [
2095
+ { file: FIELD, fallback: "var(--text-secondary, currentColor)" },
2096
+ { file: FIELD, fallback: "var(--text-tertiary)" }
2097
+ ]
2098
+ },
2099
+ { key: "description-line-height", property: "line-height", description: "Hint line height.", consumers: at(FIELD, "1.5") },
2100
+ { key: "error-color", property: "color", description: "The error line's colour, icon included. Under `data-glass=\"on\"` the glass layer's on-photo ink (`glass.ink`) draws it instead.", consumers: at(FIELD, "var(--text-error, currentColor)") },
2101
+ { key: "error-font-weight", property: "font-weight", description: "Error line weight.", consumers: at(FIELD, "var(--font-weight-normal, 400)") },
2102
+ { key: "error-line-height", property: "line-height", description: "Error line height.", consumers: at(FIELD, "inherit") },
2103
+ { key: "error-icon-gap", property: "gap", description: "Space between the error icon and its message.", consumers: at(FIELD, "calc(var(--spacing-1, 0.25rem) + var(--spacing-1, 0.25rem) / 2)") },
2104
+ { key: "error-icon-size", property: "font-size", description: "Error icon size.", consumers: at(FIELD, "1.077em") },
2105
+ { key: "error-fill", property: "background-color", description: "`FieldControl` fill while its control is invalid. Under glass, the glass hover fill.", consumers: at(FIELD, "var(--input-bg-invalid, var(--surface-error-subtle, color-mix(in srgb, var(--border-error, #ef4444) 6%, var(--field-control-bg, var(--input-bg, #f9fafb)))))") },
2106
+ { key: "error-line", property: "box-shadow (inset ring)", description: "`FieldControl` edge colour while its control is invalid. Under glass, the on-photo ink.", consumers: at(FIELD, "var(--control-invalid-ring-color, var(--border-error, #ef4444))") },
2107
+ { key: "error-line-width", property: "box-shadow (inset ring)", description: "`FieldControl` edge width while its control is invalid.", consumers: at(FIELD, "var(--control-invalid-ring-width, 1.5px)") },
2108
+ { key: "control-height", property: "height", description: "`FieldControl` box height.", consumers: at(FIELD, "var(--input-md-height, 2.75rem)") },
2109
+ { key: "control-radius", property: "border-radius", description: "`FieldControl` corner radius.", consumers: at(FIELD, "var(--input-md-radius, var(--input-radius-md, var(--radius-sm, 0.5rem)))") },
2110
+ { key: "control-fill", property: "background-color", description: "`FieldControl` fill. Under glass, the glass control fill.", consumers: at(FIELD, "var(--field-control-bg, var(--input-bg, var(--surface-interactive-default, #f9fafb)))") },
2111
+ { key: "control-fill-hover", property: "background-color", description: "`FieldControl` fill on hover and focus. Unset, the resting fill. Under glass, the glass hover fill.", consumers: [{ file: FIELD, fallback: "var(--field-control-fill, var(--field-control-bg, var(--input-bg, var(--surface-interactive-default, #f9fafb))))" }, { file: FIELD, fallback: "var(--field-control-fill, var(--field-control-bg, var(--input-bg, var(--surface-interactive-default, #f9fafb))))" }] },
2112
+ { key: "control-focus-ring-color", property: "box-shadow (inset ring)", description: "Focus ring colour: 1px on pointer focus, the full ring on keyboard focus. Under glass, the glass control ink.", consumers: [{ file: FIELD, fallback: "var(--border-focus, #111827)" }, { file: FIELD, fallback: "var(--border-focus, #111827)" }] },
2113
+ { key: "control-focus-ring-width", property: "box-shadow (inset ring)", description: "Keyboard focus ring width. Unset, the shared focus ring width.", consumers: at(FIELD, "var(--focus-ring-width, 2px)") },
2114
+ { key: "control-padding-x", property: "padding-inline", description: "Side inset of the control inside the box.", consumers: [{ file: FIELD, fallback: "var(--spacing-4, 1rem)" }, { file: FIELD, fallback: "var(--spacing-4, 1rem)" }] },
2115
+ { key: "control-font-size", property: "font-size", description: "The control's type size inside the box.", consumers: at(FIELD, "var(--font-size-sm, 0.875rem)") },
2116
+ { key: "control-font-weight", property: "font-weight", description: "The control's weight inside the box.", consumers: at(FIELD, "inherit") },
2117
+ { key: "control-letter-spacing", property: "letter-spacing", description: "The control's tracking inside the box.", consumers: at(FIELD, "inherit") },
2118
+ { key: "control-placeholder-color", property: "color", description: "Placeholder colour inside the box, the Select trigger's placeholder included.", consumers: at(FIELD, "var(--input-placeholder-color, var(--text-secondary, #9ca3af))") },
2119
+ { key: "control-tall-min-height", property: "min-height", description: "The tall box's (`FieldControl tall`) shortest; it grows with the Textarea's content.", consumers: at(FIELD, "6.25rem") },
2120
+ { key: "control-tall-max-height", property: "max-height", description: "The tall box's tallest; the Textarea scrolls beyond it.", consumers: at(FIELD, "none") },
2121
+ { key: "control-tall-padding-y", property: "padding-block", description: "Top and bottom inset of the Textarea in the tall box.", consumers: at(FIELD, "var(--spacing-3_5, 0.875rem)") },
2074
2122
  {
2075
2123
  key: "label-font-size",
2076
2124
  property: "font-size",
package/dist/index.d.ts CHANGED
@@ -1375,7 +1375,7 @@ var properties = {
1375
1375
  },
1376
1376
  field: {
1377
1377
  type: "object",
1378
- description: "Field label treatment — size, case, tracking and colour of `FieldLabel`, in both densities. Keys: label-font-size, label-text-transform, label-letter-spacing, label-color.",
1378
+ description: "Field's parts: the label (size, weight, line height, case, tracking, colour, the \"optional\" mark), the hint, the error line (a theme error colour, weight, icon gap and size) and the `FieldControl` box a control sits in (height, corners, fill, focus ring, invalid fill and line, the control's padding, type and placeholder, the tall box for a Textarea). Under `data-glass=\"on\"` the box reads the glass layer's control values and the error line its on-photo ink. Keys: gap, text-inset, label-font-weight, label-line-height, label-optional-color, label-optional-font-weight, description-font-size, description-color, description-line-height, error-color, error-font-weight, error-line-height, error-icon-gap, error-icon-size, error-fill, error-line, error-line-width, control-height, control-radius, control-fill, control-fill-hover, control-focus-ring-color, control-focus-ring-width, control-padding-x, control-font-size, control-font-weight, control-letter-spacing, control-placeholder-color, control-tall-min-height, control-tall-max-height, control-tall-padding-y, label-font-size, label-text-transform, label-letter-spacing, label-color.",
1379
1379
  additionalProperties: {
1380
1380
  $ref: "#/$defs/componentTokenBinding"
1381
1381
  }
package/dist/index.js CHANGED
@@ -70,7 +70,7 @@ import {
70
70
  rgbToOklch,
71
71
  serializeColor,
72
72
  validateComponentBindings
73
- } from "./chunk-JEGHNZOT.js";
73
+ } from "./chunk-ZQ2LB76I.js";
74
74
 
75
75
  // src/fonts/validate-coverage.ts
76
76
  var FONT_VAR_RE = /--font-(heading|display|body|sans|mono)\s*:\s*([^;]+);/g;
@@ -1395,7 +1395,7 @@ var visor_theme_schema_default = {
1395
1395
  },
1396
1396
  field: {
1397
1397
  type: "object",
1398
- description: "Field label treatment \u2014 size, case, tracking and colour of `FieldLabel`, in both densities. Keys: label-font-size, label-text-transform, label-letter-spacing, label-color.",
1398
+ description: 'Field\'s parts: the label (size, weight, line height, case, tracking, colour, the "optional" mark), the hint, the error line (a theme error colour, weight, icon gap and size) and the `FieldControl` box a control sits in (height, corners, fill, focus ring, invalid fill and line, the control\'s padding, type and placeholder, the tall box for a Textarea). Under `data-glass="on"` the box reads the glass layer\'s control values and the error line its on-photo ink. Keys: gap, text-inset, label-font-weight, label-line-height, label-optional-color, label-optional-font-weight, description-font-size, description-color, description-line-height, error-color, error-font-weight, error-line-height, error-icon-gap, error-icon-size, error-fill, error-line, error-line-width, control-height, control-radius, control-fill, control-fill-hover, control-focus-ring-color, control-focus-ring-width, control-padding-x, control-font-size, control-font-weight, control-letter-spacing, control-placeholder-color, control-tall-min-height, control-tall-max-height, control-tall-padding-y, label-font-size, label-text-transform, label-letter-spacing, label-color.',
1399
1399
  additionalProperties: {
1400
1400
  $ref: "#/$defs/componentTokenBinding"
1401
1401
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loworbitstudio/visor-theme-engine",
3
- "version": "0.47.0",
3
+ "version": "0.48.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",
@@ -772,7 +772,7 @@
772
772
  },
773
773
  "field": {
774
774
  "type": "object",
775
- "description": "Field label treatment — size, case, tracking and colour of `FieldLabel`, in both densities. Keys: label-font-size, label-text-transform, label-letter-spacing, label-color.",
775
+ "description": "Field's parts: the label (size, weight, line height, case, tracking, colour, the \"optional\" mark), the hint, the error line (a theme error colour, weight, icon gap and size) and the `FieldControl` box a control sits in (height, corners, fill, focus ring, invalid fill and line, the control's padding, type and placeholder, the tall box for a Textarea). Under `data-glass=\"on\"` the box reads the glass layer's control values and the error line its on-photo ink. Keys: gap, text-inset, label-font-weight, label-line-height, label-optional-color, label-optional-font-weight, description-font-size, description-color, description-line-height, error-color, error-font-weight, error-line-height, error-icon-gap, error-icon-size, error-fill, error-line, error-line-width, control-height, control-radius, control-fill, control-fill-hover, control-focus-ring-color, control-focus-ring-width, control-padding-x, control-font-size, control-font-weight, control-letter-spacing, control-placeholder-color, control-tall-min-height, control-tall-max-height, control-tall-padding-y, label-font-size, label-text-transform, label-letter-spacing, label-color.",
776
776
  "additionalProperties": {
777
777
  "$ref": "#/$defs/componentTokenBinding"
778
778
  }