@loworbitstudio/visor-theme-engine 0.30.0 → 0.31.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.
@@ -29,7 +29,7 @@ import {
29
29
  resolveThemeBrand,
30
30
  resolveThemeFonts,
31
31
  sectionComment
32
- } from "../chunk-4CCJNJAS.js";
32
+ } from "../chunk-NJLYCTHR.js";
33
33
 
34
34
  // src/adapters/brand-passthrough.ts
35
35
  var SENTINEL_COLOR = "#ff00ff";
@@ -1275,6 +1275,7 @@ var TEXT = "components/ui/text/text.module.css";
1275
1275
  var INLINE_EDIT = "components/ui/inline-edit/inline-edit.module.css";
1276
1276
  var SAVE_STATUS = "components/ui/save-status/save-status.module.css";
1277
1277
  var SEGMENTED_CONTROL = "components/ui/segmented-control/segmented-control.module.css";
1278
+ var TOGGLE_GROUP = "components/ui/toggle-group/toggle-group.module.css";
1278
1279
  var TOOLTIP = "components/ui/tooltip/tooltip.module.css";
1279
1280
  var ACTION_ROW = "components/ui/action-row/action-row.module.css";
1280
1281
  var DIALOG_FIELD = "blocks/dialog-field/dialog-field.module.css";
@@ -2203,6 +2204,26 @@ var segmentedControlFamily = {
2203
2204
  { key: "active-weight", property: "font-weight", description: "Active segment label weight.", consumers: at(SEGMENTED_CONTROL, "var(--font-weight-medium, 500)") }
2204
2205
  ]
2205
2206
  };
2207
+ var toggleGroupFamily = {
2208
+ family: "toggle-group",
2209
+ prefix: "toggle-group",
2210
+ description: "ToggleGroup \u2014 the outline track's fill, the selected option's fill and ink, the unselected ink, and the compact (`xs`) size: its label size, option sides and corners. SegmentedControl takes the `xs` option keys too.",
2211
+ tokens: [
2212
+ { key: "track-bg", property: "background-color", description: "The outline variant's track. Bind a well darker than its plane where the theme wants one.", consumers: at(TOGGLE_GROUP, "transparent") },
2213
+ {
2214
+ key: "selected-bg",
2215
+ property: "background-color",
2216
+ description: "The selected option's fill: the sliding indicator (outline, single) and the item itself (default, and outline multiple).",
2217
+ consumers: each([TOGGLE_GROUP, TOGGLE_GROUP, TOGGLE_GROUP], "var(--interactive-primary-bg, var(--primary, #111827))")
2218
+ },
2219
+ { key: "selected-text", property: "color", description: "The selected option's label ink.", consumers: at(TOGGLE_GROUP, "var(--interactive-primary-text, #f9fafb)") },
2220
+ { key: "unselected-text", property: "color", description: "Every option that is not selected.", consumers: at(TOGGLE_GROUP, "var(--text-primary, #111827)") },
2221
+ { key: "xs-font-size", property: "font-size", description: "Compact (`xs`) label size.", consumers: at(TOGGLE_GROUP, "var(--font-size-xs, 0.75rem)") },
2222
+ { key: "xs-padding-x", property: "padding-inline", description: "Compact (`xs`) option sides.", consumers: at(TOGGLE_GROUP, "var(--spacing-2, 0.5rem)") },
2223
+ { key: "xs-track-radius", property: "border-radius", description: "Compact (`xs`) outline track corner radius.", consumers: at(TOGGLE_GROUP, "var(--radius-md, 0.375rem)") },
2224
+ { key: "xs-item-radius", property: "border-radius", description: "Compact (`xs`) option and indicator corner radius. Concentric with the track is the track radius minus its 2px inset.", consumers: at(TOGGLE_GROUP, "var(--radius-sm, 0.25rem)") }
2225
+ ]
2226
+ };
2206
2227
  var adminUiFamily = {
2207
2228
  family: "admin-ui",
2208
2229
  prefix: "admin-ui",
@@ -2243,6 +2264,7 @@ var COMPONENT_TOKEN_FAMILIES = [
2243
2264
  switchFamily,
2244
2265
  saveStatusFamily,
2245
2266
  segmentedControlFamily,
2267
+ toggleGroupFamily,
2246
2268
  tooltipFamily,
2247
2269
  actionRowFamily,
2248
2270
  inputAffixFamily,
package/dist/index.d.ts CHANGED
@@ -1275,6 +1275,13 @@ var properties = {
1275
1275
  $ref: "#/$defs/componentTokenBinding"
1276
1276
  }
1277
1277
  },
1278
+ "toggle-group": {
1279
+ type: "object",
1280
+ description: "ToggleGroup — the outline track's fill, the selected option's fill and ink, the unselected ink, and the compact (`xs`) size: its label size, option sides and corners. SegmentedControl takes the `xs` option keys too. Keys: track-bg, selected-bg, selected-text, unselected-text, xs-font-size, xs-padding-x, xs-track-radius, xs-item-radius.",
1281
+ additionalProperties: {
1282
+ $ref: "#/$defs/componentTokenBinding"
1283
+ }
1284
+ },
1278
1285
  tooltip: {
1279
1286
  type: "object",
1280
1287
  description: "Tooltip ground and ink, so a dark theme can keep the label legible without retuning the shared inverse pair other components read. Keys: bg, text.",
package/dist/index.js CHANGED
@@ -68,7 +68,7 @@ import {
68
68
  rgbToOklch,
69
69
  serializeColor,
70
70
  validateComponentBindings
71
- } from "./chunk-4CCJNJAS.js";
71
+ } from "./chunk-NJLYCTHR.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;
@@ -1296,6 +1296,13 @@ var visor_theme_schema_default = {
1296
1296
  $ref: "#/$defs/componentTokenBinding"
1297
1297
  }
1298
1298
  },
1299
+ "toggle-group": {
1300
+ type: "object",
1301
+ description: "ToggleGroup \u2014 the outline track's fill, the selected option's fill and ink, the unselected ink, and the compact (`xs`) size: its label size, option sides and corners. SegmentedControl takes the `xs` option keys too. Keys: track-bg, selected-bg, selected-text, unselected-text, xs-font-size, xs-padding-x, xs-track-radius, xs-item-radius.",
1302
+ additionalProperties: {
1303
+ $ref: "#/$defs/componentTokenBinding"
1304
+ }
1305
+ },
1299
1306
  tooltip: {
1300
1307
  type: "object",
1301
1308
  description: "Tooltip ground and ink, so a dark theme can keep the label legible without retuning the shared inverse pair other components read. Keys: bg, text.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loworbitstudio/visor-theme-engine",
3
- "version": "0.30.0",
3
+ "version": "0.31.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",
@@ -675,6 +675,13 @@
675
675
  "$ref": "#/$defs/componentTokenBinding"
676
676
  }
677
677
  },
678
+ "toggle-group": {
679
+ "type": "object",
680
+ "description": "ToggleGroup \u2014 the outline track's fill, the selected option's fill and ink, the unselected ink, and the compact (`xs`) size: its label size, option sides and corners. SegmentedControl takes the `xs` option keys too. Keys: track-bg, selected-bg, selected-text, unselected-text, xs-font-size, xs-padding-x, xs-track-radius, xs-item-radius.",
681
+ "additionalProperties": {
682
+ "$ref": "#/$defs/componentTokenBinding"
683
+ }
684
+ },
678
685
  "tooltip": {
679
686
  "type": "object",
680
687
  "description": "Tooltip ground and ink, so a dark theme can keep the label legible without retuning the shared inverse pair other components read. Keys: bg, text.",