@oxyhq/bloom 0.37.2 → 0.38.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.
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.bloomThemeBlock = bloomThemeBlock;
7
7
  exports.bloomThemeCss = bloomThemeCss;
8
8
  var _colorRoles = require("./color-roles.js");
9
+ var _tokenRegistry = require("../theme/token-registry.js");
9
10
  var _scales = require("./scales.js");
10
11
  var _shadows = require("./shadows");
11
12
  /**
@@ -47,7 +48,7 @@ var _shadows = require("./shadows");
47
48
  function bloomThemeCss() {
48
49
  const lines = [];
49
50
 
50
- // Color roles.
51
+ // Bloom's namespaced semantic color roles (bg-fill, text-text-*, border-*).
51
52
  for (const [role, value] of Object.entries({
52
53
  ..._colorRoles.FILL_ROLES,
53
54
  ..._colorRoles.TEXT_ROLES,
@@ -56,6 +57,22 @@ function bloomThemeCss() {
56
57
  lines.push(` --color-${role}: ${value};`);
57
58
  }
58
59
 
60
+ // shadcn-canonical color utilities (bg-card, bg-primary, bg-background,
61
+ // text-muted-foreground, …). Emitted here — the SINGLE source of truth — for
62
+ // every runtime token, so consumer apps get these utilities by importing
63
+ // `@oxyhq/bloom/design-tokens/theme.css` and NEVER re-declare a per-app
64
+ // `@theme { --color-*: var(--*) }` block (that per-app duplication is what let
65
+ // `--color-card` drift to `var(--surface)`). Mirrors the `--color-<token>`
66
+ // aliases `buildScopeVars` emits at runtime, so the static and runtime maps
67
+ // agree. Each `--x` token already resolves to a full `rgb(...)` color, so the
68
+ // alias is a direct `var(--x)` — never `hsl(var(--x))`.
69
+ for (const token of _tokenRegistry.CANONICAL_TOKENS) {
70
+ lines.push(` --color-${token}: var(--${token});`);
71
+ }
72
+ // `destructive` carries no themed foreground token; its text is always the
73
+ // fixed light-on-error colour.
74
+ lines.push(' --color-destructive-foreground: #ffffff;');
75
+
59
76
  // Spacing.
60
77
  for (const [key, value] of Object.entries(_scales.SPACING)) {
61
78
  lines.push(` --spacing-${key}: ${value}px;`);
@@ -1 +1 @@
1
- {"version":3,"names":["_colorRoles","require","_scales","_shadows","bloomThemeCss","lines","role","value","Object","entries","FILL_ROLES","TEXT_ROLES","BORDER_ROLES","push","key","SPACING","RADIUS","BORDER_WIDTH","name","keys","TYPOGRAPHY","size","lineHeight","weight","FONT_FAMILY_VARS","family","sans","display","mono","SHADOW_BOX","s","m","join","bloomThemeBlock"],"sourceRoot":"../../../src","sources":["design-tokens/theme-css.ts"],"mappings":";;;;;;;AAyBA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAQA,IAAAE,QAAA,GAAAF,OAAA;AAlCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,aAAaA,CAAA,EAAW;EACtC,MAAMC,KAAe,GAAG,EAAE;;EAE1B;EACA,KAAK,MAAM,CAACC,IAAI,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAAC;IACzC,GAAGC,sBAAU;IACb,GAAGC,sBAAU;IACb,GAAGC;EACL,CAAC,CAAC,EAAE;IACFP,KAAK,CAACQ,IAAI,CAAC,aAAaP,IAAI,KAAKC,KAAK,GAAG,CAAC;EAC5C;;EAEA;EACA,KAAK,MAAM,CAACO,GAAG,EAAEP,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACM,eAAO,CAAC,EAAE;IAClDV,KAAK,CAACQ,IAAI,CAAC,eAAeC,GAAG,KAAKP,KAAK,KAAK,CAAC;EAC/C;;EAEA;EACA,KAAK,MAAM,CAACO,GAAG,EAAEP,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACO,cAAM,CAAC,EAAE;IACjDX,KAAK,CAACQ,IAAI,CAAC,cAAc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AW;EACxC,OAAO,aAAa7B,aAAa,CAAC,CAAC,KAAK;AAC1C","ignoreList":[]}
1
+ {"version":3,"names":["_colorRoles","require","_tokenRegistry","_scales","_shadows","bloomThemeCss","lines","role","value","Object","entries","FILL_ROLES","TEXT_ROLES","BORDER_ROLES","push","token","CANONICAL_TOKENS","key","SPACING","RADIUS","BORDER_WIDTH","name","keys","TYPOGRAPHY","size","lineHeight","weight","FONT_FAMILY_VARS","family","sans","display","mono","SHADOW_BOX","s","m","join","bloomThemeBlock"],"sourceRoot":"../../../src","sources":["design-tokens/theme-css.ts"],"mappings":";;;;;;;AAyBA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAQA,IAAAG,QAAA,GAAAH,OAAA;AAnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,aAAaA,CAAA,EAAW;EACtC,MAAMC,KAAe,GAAG,EAAE;;EAE1B;EACA,KAAK,MAAM,CAACC,IAAI,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAAC;IACzC,GAAGC,sBAAU;IACb,GAAGC,sBAAU;IACb,GAAGC;EACL,CAAC,CAAC,EAAE;IACFP,KAAK,CAACQ,IAAI,CAAC,aAAaP,IAAI,KAAKC,KAAK,GAAG,CAAC;EAC5C;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,KAAK,MAAMO,KAAK,IAAIC,+BAAgB,EAAE;IACpCV,KAAK,CAACQ,IAAI,CAAC,aAAaC,KAAK,WAAWA,KAAK,IAAI,CAAC;EACpD;EACA;EACA;EACAT,KAAK,CAACQ,IAAI,CAAC,4CAA4C,CAAC;;EAExD;EACA,KAAK,MAAM,CAACG,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AAwBa,wBAAgB,CAACI,IAAI,GAAG,CAAC;;EAE5D;EACAzB,KAAK,CAACQ,IAAI,CAAC,iBAAiBkB,mBAAU,CAACC,CAAC,GAAG,CAAC;EAC5C3B,KAAK,CAACQ,IAAI,CAAC,iBAAiBkB,mBAAU,CAACE,CAAC,GAAG,CAAC;EAE5C,OAAO5B,KAAK,CAAC6B,IAAI,CAAC,IAAI,CAAC;AACzB;;AAEA;AACO,SAASC,eAAeA,CAAA,EAAW;EACxC,OAAO,aAAa/B,aAAa,CAAC,CAAC,KAAK;AAC1C","ignoreList":[]}
@@ -26,6 +26,41 @@
26
26
  --color-border-secondary: var(--input);
27
27
  --color-border-input: var(--input);
28
28
  --color-border-input-active: var(--ring);
29
+ --color-background: var(--background);
30
+ --color-foreground: var(--foreground);
31
+ --color-surface: var(--surface);
32
+ --color-surface-foreground: var(--surface-foreground);
33
+ --color-popover: var(--popover);
34
+ --color-popover-foreground: var(--popover-foreground);
35
+ --color-primary: var(--primary);
36
+ --color-primary-foreground: var(--primary-foreground);
37
+ --color-secondary: var(--secondary);
38
+ --color-secondary-foreground: var(--secondary-foreground);
39
+ --color-muted: var(--muted);
40
+ --color-muted-foreground: var(--muted-foreground);
41
+ --color-accent: var(--accent);
42
+ --color-accent-foreground: var(--accent-foreground);
43
+ --color-destructive: var(--destructive);
44
+ --color-border: var(--border);
45
+ --color-input: var(--input);
46
+ --color-ring: var(--ring);
47
+ --color-sidebar: var(--sidebar);
48
+ --color-card: var(--card);
49
+ --color-card-foreground: var(--card-foreground);
50
+ --color-chart-1: var(--chart-1);
51
+ --color-chart-2: var(--chart-2);
52
+ --color-chart-3: var(--chart-3);
53
+ --color-chart-4: var(--chart-4);
54
+ --color-chart-5: var(--chart-5);
55
+ --color-content-area: var(--content-area);
56
+ --color-sidebar-foreground: var(--sidebar-foreground);
57
+ --color-sidebar-primary: var(--sidebar-primary);
58
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
59
+ --color-sidebar-accent: var(--sidebar-accent);
60
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
61
+ --color-sidebar-border: var(--sidebar-border);
62
+ --color-sidebar-ring: var(--sidebar-ring);
63
+ --color-destructive-foreground: #ffffff;
29
64
  --spacing-space-2: 2px;
30
65
  --spacing-space-4: 4px;
31
66
  --spacing-space-8: 8px;
@@ -26,6 +26,7 @@
26
26
  */
27
27
 
28
28
  import { BORDER_ROLES, FILL_ROLES, TEXT_ROLES } from "./color-roles.js";
29
+ import { CANONICAL_TOKENS } from "../theme/token-registry.js";
29
30
  import { BORDER_WIDTH, FONT_FAMILY_VARS, RADIUS, SPACING, TYPOGRAPHY } from "./scales.js";
30
31
  import { SHADOW_BOX } from './shadows';
31
32
 
@@ -43,7 +44,7 @@ import { SHADOW_BOX } from './shadows';
43
44
  export function bloomThemeCss() {
44
45
  const lines = [];
45
46
 
46
- // Color roles.
47
+ // Bloom's namespaced semantic color roles (bg-fill, text-text-*, border-*).
47
48
  for (const [role, value] of Object.entries({
48
49
  ...FILL_ROLES,
49
50
  ...TEXT_ROLES,
@@ -52,6 +53,22 @@ export function bloomThemeCss() {
52
53
  lines.push(` --color-${role}: ${value};`);
53
54
  }
54
55
 
56
+ // shadcn-canonical color utilities (bg-card, bg-primary, bg-background,
57
+ // text-muted-foreground, …). Emitted here — the SINGLE source of truth — for
58
+ // every runtime token, so consumer apps get these utilities by importing
59
+ // `@oxyhq/bloom/design-tokens/theme.css` and NEVER re-declare a per-app
60
+ // `@theme { --color-*: var(--*) }` block (that per-app duplication is what let
61
+ // `--color-card` drift to `var(--surface)`). Mirrors the `--color-<token>`
62
+ // aliases `buildScopeVars` emits at runtime, so the static and runtime maps
63
+ // agree. Each `--x` token already resolves to a full `rgb(...)` color, so the
64
+ // alias is a direct `var(--x)` — never `hsl(var(--x))`.
65
+ for (const token of CANONICAL_TOKENS) {
66
+ lines.push(` --color-${token}: var(--${token});`);
67
+ }
68
+ // `destructive` carries no themed foreground token; its text is always the
69
+ // fixed light-on-error colour.
70
+ lines.push(' --color-destructive-foreground: #ffffff;');
71
+
55
72
  // Spacing.
56
73
  for (const [key, value] of Object.entries(SPACING)) {
57
74
  lines.push(` --spacing-${key}: ${value}px;`);
@@ -1 +1 @@
1
- {"version":3,"names":["BORDER_ROLES","FILL_ROLES","TEXT_ROLES","BORDER_WIDTH","FONT_FAMILY_VARS","RADIUS","SPACING","TYPOGRAPHY","SHADOW_BOX","bloomThemeCss","lines","role","value","Object","entries","push","key","name","keys","size","lineHeight","weight","family","sans","display","mono","s","m","join","bloomThemeBlock"],"sourceRoot":"../../../src","sources":["design-tokens/theme-css.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,EAAEC,UAAU,EAAEC,UAAU,QAAQ,kBAAe;AACpE,SACEC,YAAY,EACZC,gBAAgB,EAChBC,MAAM,EACNC,OAAO,EACPC,UAAU,QAEL,aAAU;AACjB,SAASC,UAAU,QAAQ,WAAW;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAA,EAAW;EACtC,MAAMC,KAAe,GAAG,EAAE;;EAE1B;EACA,KAAK,MAAM,CAACC,IAAI,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAAC;IACzC,GAAGb,UAAU;IACb,GAAGC,UAAU;IACb,GAAGF;EACL,CAAC,CAAC,EAAE;IACFU,KAAK,CAACK,IAAI,CAAC,aAAaJ,IAAI,KAAKC,KAAK,GAAG,CAAC;EAC5C;;EAEA;EACA,KAAK,MAAM,CAACI,GAAG,EAAEJ,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACR,OAAO,CAAC,EAAE;IAClDI,KAAK,CAACK,IAAI,CAAC,eAAeC,GAAG,KAAKJ,KAAK,KAAK,CAAC;EAC/C;;E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B,CAAC,GAAG,CAAC;EAE5C,OAAOjB,KAAK,CAACkB,IAAI,CAAC,IAAI,CAAC;AACzB;;AAEA;AACA,OAAO,SAASC,eAAeA,CAAA,EAAW;EACxC,OAAO,aAAapB,aAAa,CAAC,CAAC,KAAK;AAC1C","ignoreList":[]}
1
+ {"version":3,"names":["BORDER_ROLES","FILL_ROLES","TEXT_ROLES","CANONICAL_TOKENS","BORDER_WIDTH","FONT_FAMILY_VARS","RADIUS","SPACING","TYPOGRAPHY","SHADOW_BOX","bloomThemeCss","lines","role","value","Object","entries","push","token","key","name","keys","size","lineHeight","weight","family","sans","display","mono","s","m","join","bloomThemeBlock"],"sourceRoot":"../../../src","sources":["design-tokens/theme-css.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,EAAEC,UAAU,EAAEC,UAAU,QAAQ,kBAAe;AACpE,SAASC,gBAAgB,QAAQ,4BAAyB;AAC1D,SACEC,YAAY,EACZC,gBAAgB,EAChBC,MAAM,EACNC,OAAO,EACPC,UAAU,QAEL,aAAU;AACjB,SAASC,UAAU,QAAQ,WAAW;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAA,EAAW;EACtC,MAAMC,KAAe,GAAG,EAAE;;EAE1B;EACA,KAAK,MAAM,CAACC,IAAI,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAAC;IACzC,GAAGd,UAAU;IACb,GAAGC,UAAU;IACb,GAAGF;EACL,CAAC,CAAC,EAAE;IACFW,KAAK,CAACK,IAAI,CAAC,aAAaJ,IAAI,KAAKC,KAAK,GAAG,CAAC;EAC5C;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,KAAK,MAAMI,KAAK,IAAId,gBAAgB,EAAE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,CAACoB,IAAI,GAAG,CAAC;EAC5Dd,KAAK,CAACK,IAAI,CAAC,2BAA2BX,gBAAgB,CAACqB,OAAO,GAAG,CAAC;EAClEf,KAAK,CAACK,IAAI,CAAC,wBAAwBX,gBAAgB,CAACsB,IAAI,GAAG,CAAC;;EAE5D;EACAhB,KAAK,CAACK,IAAI,CAAC,iBAAiBP,UAAU,CAACmB,CAAC,GAAG,CAAC;EAC5CjB,KAAK,CAACK,IAAI,CAAC,iBAAiBP,UAAU,CAACoB,CAAC,GAAG,CAAC;EAE5C,OAAOlB,KAAK,CAACmB,IAAI,CAAC,IAAI,CAAC;AACzB;;AAEA;AACA,OAAO,SAASC,eAAeA,CAAA,EAAW;EACxC,OAAO,aAAarB,aAAa,CAAC,CAAC,KAAK;AAC1C","ignoreList":[]}
@@ -26,6 +26,41 @@
26
26
  --color-border-secondary: var(--input);
27
27
  --color-border-input: var(--input);
28
28
  --color-border-input-active: var(--ring);
29
+ --color-background: var(--background);
30
+ --color-foreground: var(--foreground);
31
+ --color-surface: var(--surface);
32
+ --color-surface-foreground: var(--surface-foreground);
33
+ --color-popover: var(--popover);
34
+ --color-popover-foreground: var(--popover-foreground);
35
+ --color-primary: var(--primary);
36
+ --color-primary-foreground: var(--primary-foreground);
37
+ --color-secondary: var(--secondary);
38
+ --color-secondary-foreground: var(--secondary-foreground);
39
+ --color-muted: var(--muted);
40
+ --color-muted-foreground: var(--muted-foreground);
41
+ --color-accent: var(--accent);
42
+ --color-accent-foreground: var(--accent-foreground);
43
+ --color-destructive: var(--destructive);
44
+ --color-border: var(--border);
45
+ --color-input: var(--input);
46
+ --color-ring: var(--ring);
47
+ --color-sidebar: var(--sidebar);
48
+ --color-card: var(--card);
49
+ --color-card-foreground: var(--card-foreground);
50
+ --color-chart-1: var(--chart-1);
51
+ --color-chart-2: var(--chart-2);
52
+ --color-chart-3: var(--chart-3);
53
+ --color-chart-4: var(--chart-4);
54
+ --color-chart-5: var(--chart-5);
55
+ --color-content-area: var(--content-area);
56
+ --color-sidebar-foreground: var(--sidebar-foreground);
57
+ --color-sidebar-primary: var(--sidebar-primary);
58
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
59
+ --color-sidebar-accent: var(--sidebar-accent);
60
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
61
+ --color-sidebar-border: var(--sidebar-border);
62
+ --color-sidebar-ring: var(--sidebar-ring);
63
+ --color-destructive-foreground: #ffffff;
29
64
  --spacing-space-2: 2px;
30
65
  --spacing-space-4: 4px;
31
66
  --spacing-space-8: 8px;
@@ -1 +1 @@
1
- {"version":3,"file":"theme-css.d.ts","sourceRoot":"","sources":["../../../../src/design-tokens/theme-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAaH;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,IAAI,MAAM,CA8CtC;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,IAAI,MAAM,CAExC"}
1
+ {"version":3,"file":"theme-css.d.ts","sourceRoot":"","sources":["../../../../src/design-tokens/theme-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAcH;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,IAAI,MAAM,CA8DtC;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,IAAI,MAAM,CAExC"}
@@ -1 +1 @@
1
- {"version":3,"file":"theme-css.d.ts","sourceRoot":"","sources":["../../../../src/design-tokens/theme-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAaH;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,IAAI,MAAM,CA8CtC;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,IAAI,MAAM,CAExC"}
1
+ {"version":3,"file":"theme-css.d.ts","sourceRoot":"","sources":["../../../../src/design-tokens/theme-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAcH;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,IAAI,MAAM,CA8DtC;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,IAAI,MAAM,CAExC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/bloom",
3
- "version": "0.37.2",
3
+ "version": "0.38.0",
4
4
  "description": "Bloom UI — Oxy ecosystem component library for React Native + Expo + Web",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -24,6 +24,7 @@
24
24
  */
25
25
 
26
26
  import { BORDER_ROLES, FILL_ROLES, TEXT_ROLES } from './color-roles';
27
+ import { CANONICAL_TOKENS } from '../theme/token-registry';
27
28
  import {
28
29
  BORDER_WIDTH,
29
30
  FONT_FAMILY_VARS,
@@ -48,7 +49,7 @@ import { SHADOW_BOX } from './shadows';
48
49
  export function bloomThemeCss(): string {
49
50
  const lines: string[] = [];
50
51
 
51
- // Color roles.
52
+ // Bloom's namespaced semantic color roles (bg-fill, text-text-*, border-*).
52
53
  for (const [role, value] of Object.entries({
53
54
  ...FILL_ROLES,
54
55
  ...TEXT_ROLES,
@@ -57,6 +58,22 @@ export function bloomThemeCss(): string {
57
58
  lines.push(` --color-${role}: ${value};`);
58
59
  }
59
60
 
61
+ // shadcn-canonical color utilities (bg-card, bg-primary, bg-background,
62
+ // text-muted-foreground, …). Emitted here — the SINGLE source of truth — for
63
+ // every runtime token, so consumer apps get these utilities by importing
64
+ // `@oxyhq/bloom/design-tokens/theme.css` and NEVER re-declare a per-app
65
+ // `@theme { --color-*: var(--*) }` block (that per-app duplication is what let
66
+ // `--color-card` drift to `var(--surface)`). Mirrors the `--color-<token>`
67
+ // aliases `buildScopeVars` emits at runtime, so the static and runtime maps
68
+ // agree. Each `--x` token already resolves to a full `rgb(...)` color, so the
69
+ // alias is a direct `var(--x)` — never `hsl(var(--x))`.
70
+ for (const token of CANONICAL_TOKENS) {
71
+ lines.push(` --color-${token}: var(--${token});`);
72
+ }
73
+ // `destructive` carries no themed foreground token; its text is always the
74
+ // fixed light-on-error colour.
75
+ lines.push(' --color-destructive-foreground: #ffffff;');
76
+
60
77
  // Spacing.
61
78
  for (const [key, value] of Object.entries(SPACING)) {
62
79
  lines.push(` --spacing-${key}: ${value}px;`);
@@ -26,6 +26,41 @@
26
26
  --color-border-secondary: var(--input);
27
27
  --color-border-input: var(--input);
28
28
  --color-border-input-active: var(--ring);
29
+ --color-background: var(--background);
30
+ --color-foreground: var(--foreground);
31
+ --color-surface: var(--surface);
32
+ --color-surface-foreground: var(--surface-foreground);
33
+ --color-popover: var(--popover);
34
+ --color-popover-foreground: var(--popover-foreground);
35
+ --color-primary: var(--primary);
36
+ --color-primary-foreground: var(--primary-foreground);
37
+ --color-secondary: var(--secondary);
38
+ --color-secondary-foreground: var(--secondary-foreground);
39
+ --color-muted: var(--muted);
40
+ --color-muted-foreground: var(--muted-foreground);
41
+ --color-accent: var(--accent);
42
+ --color-accent-foreground: var(--accent-foreground);
43
+ --color-destructive: var(--destructive);
44
+ --color-border: var(--border);
45
+ --color-input: var(--input);
46
+ --color-ring: var(--ring);
47
+ --color-sidebar: var(--sidebar);
48
+ --color-card: var(--card);
49
+ --color-card-foreground: var(--card-foreground);
50
+ --color-chart-1: var(--chart-1);
51
+ --color-chart-2: var(--chart-2);
52
+ --color-chart-3: var(--chart-3);
53
+ --color-chart-4: var(--chart-4);
54
+ --color-chart-5: var(--chart-5);
55
+ --color-content-area: var(--content-area);
56
+ --color-sidebar-foreground: var(--sidebar-foreground);
57
+ --color-sidebar-primary: var(--sidebar-primary);
58
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
59
+ --color-sidebar-accent: var(--sidebar-accent);
60
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
61
+ --color-sidebar-border: var(--sidebar-border);
62
+ --color-sidebar-ring: var(--sidebar-ring);
63
+ --color-destructive-foreground: #ffffff;
29
64
  --spacing-space-2: 2px;
30
65
  --spacing-space-4: 4px;
31
66
  --spacing-space-8: 8px;