@lace-cloud/design-tokens 0.35.0 → 0.37.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/README.md CHANGED
@@ -55,6 +55,20 @@ import { darkTheme, lightTheme, themeDeclarations } from '@lace-cloud/design-tok
55
55
  const css = `:root{${themeDeclarations(darkTheme)}}[data-theme="light"]{${themeDeclarations(lightTheme)}}`;
56
56
  ```
57
57
 
58
+ ## High contrast
59
+
60
+ `data-theme="high-contrast"` and `"high-contrast-light"` (`THEMES` lists all four
61
+ themes) draw every edge, ring and wire in four channels, `--lace-hc-edge`,
62
+ `--lace-hc-active`, `--lace-hc-focus` and `--lace-hc-surface`. Each reads VS Code's
63
+ own `--vscode-contrastBorder`, `-contrastActiveBorder`, `-focusBorder` and
64
+ `-editor-background`, else VS Code's stock high-contrast value. VS Code gives the
65
+ active and focus borders one colour, so a selected, a focused and a selected-and-focused
66
+ card differ by shape (`--lace-node-*-ring-*`), as error and new do (`--lace-node-*-border-*`).
67
+ `high-contrast-light` takes the light block's surfaces. Under Windows forced colours
68
+ the same channels are system colours, for every theme. A host maps its own theme names
69
+ onto `THEMES`; a custom property added to the remap is added to both the theme block and
70
+ the forced-colors block at the end of `tokens.css`, which a test holds equal.
71
+
58
72
  ## Conventions
59
73
 
60
74
  - **Tokens first.** No raw hex in consumer code. If a color isn't in
package/dist/index.cjs CHANGED
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ THEMES: () => THEMES,
23
24
  brand: () => brand,
24
25
  darkTheme: () => darkTheme,
25
26
  lightTheme: () => lightTheme,
@@ -122,11 +123,13 @@ var pin = {
122
123
  object: { fill: "#FF8A4C", stroke: "#8A3A10" },
123
124
  any: { fill: "#9BA19E", stroke: "#4A4F4C" }
124
125
  };
126
+ var THEMES = ["dark", "light", "high-contrast", "high-contrast-light"];
125
127
  function themeDeclarations(theme) {
126
128
  return Object.entries(theme).map(([name, value]) => `${name}:${value}`).join(";");
127
129
  }
128
130
  // Annotate the CommonJS export names for ESM import in node:
129
131
  0 && (module.exports = {
132
+ THEMES,
130
133
  brand,
131
134
  darkTheme,
132
135
  lightTheme,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/themes.gen.ts"],"sourcesContent":["// @lace-cloud/design-tokens — JS/TS token exports\n// Primary distribution is tokens.css; use this for JS/TS consumers that\n// need programmatic access to token values (e.g., pinColor.ts).\n\nexport const brand = {\n green: '#CEFE65',\n greenBright: '#e0ff8a',\n gunmetal: '#153238',\n gunmetalLight: '#1a3f47',\n night: '#161616',\n cyan: '#95E7FF',\n grey: '#ECEFED',\n} as const;\n\nexport const pin = {\n string: { fill: '#95E7FF', stroke: '#2C9DB9' },\n number: { fill: '#F5A623', stroke: '#8A5A10' },\n bool: { fill: '#B084F0', stroke: '#5C3E9A' },\n list: { fill: '#CEFE65', stroke: '#5E8A1A' },\n map: { fill: '#F288C6', stroke: '#8A2E5C' },\n object: { fill: '#FF8A4C', stroke: '#8A3A10' },\n any: { fill: '#9BA19E', stroke: '#4A4F4C' },\n} as const;\n\n// The themes' semantic colours, generated from tokens.css at build\n// (`src/themes-source.ts`): `darkTheme` and `lightTheme`, for a consumer that\n// cannot load the stylesheet.\nexport { darkTheme, lightTheme } from './themes.gen';\n\n/** A theme's colours as the declarations of one CSS rule, `name:value` joined\n * by `;`, for a page that declares the tokens in a rule of its own. */\nexport function themeDeclarations(theme: Readonly<Record<string, string>>): string {\n return Object.entries(theme)\n .map(([name, value]) => `${name}:${value}`)\n .join(';');\n}\n","// Generated from tokens.css by scripts/gen-themes.mjs; `pnpm --filter @lace-cloud/design-tokens build`\n// rewrites it. Edit tokens.css, never this file.\n\n/**\n * The dark theme's semantic colours — every `--lace-color-*` of tokens.css's semantic tier, at the\n * value it resolves to in the default (dark) theme — for a consumer that cannot load tokens.css: a\n * server-rendered page declares them in its own `:root` and reads them by the names the\n * stylesheet uses.\n */\nexport const darkTheme = {\n '--lace-color-bg-canvas': '#161616',\n '--lace-color-bg-surface': '#1e1e1e',\n '--lace-color-bg-surface-alt': '#252526',\n '--lace-color-bg-input': '#0f0f0f',\n '--lace-color-bg-context-menu': '#1a1a1a',\n '--lace-color-border-default': '#333333',\n '--lace-color-border-subtle': '#3c3c3c',\n '--lace-color-border-input': '#555555',\n '--lace-color-border-input-hover': '#888888',\n '--lace-color-text-primary': '#ecefed',\n '--lace-color-text-label': '#e6e6e6',\n '--lace-color-text-muted': '#999999',\n '--lace-color-text-description': '#9ca3af',\n '--lace-color-text-accent': '#cefe65',\n '--lace-color-text-link': '#60a5fa',\n '--lace-color-text-danger': '#e5484d',\n '--lace-color-text-danger-soft': '#f87171',\n '--lace-color-text-faint': '#8c8f8c',\n '--lace-color-row-hover': 'rgba(255, 255, 255, 0.025)',\n '--lace-color-badge-purple': '#c084fc',\n '--lace-color-badge-purple-bg': 'rgba(192, 132, 252, 0.1)',\n '--lace-color-accent': '#cefe65',\n '--lace-color-text-on-accent': '#111111',\n '--lace-color-accent-alpha-subtle': 'rgba(206, 254, 101, 0.1)',\n '--lace-color-accent-alpha-medium': 'rgba(206, 254, 101, 0.2)',\n '--lace-color-accent-strong': '#e0ff8a',\n '--lace-color-success': '#4ade80',\n '--lace-color-success-hover': '#22c55e',\n '--lace-color-success-strong': '#16a34a',\n '--lace-color-danger': '#e5484d',\n '--lace-color-danger-bg-soft': 'rgba(248, 113, 113, 0.12)',\n '--lace-color-danger-fg': '#f87171',\n '--lace-color-warning-bg': '#3b2507',\n '--lace-color-warning-fg': '#fbbf24',\n '--lace-color-focus-ring': '#cefe65',\n} as const;\n\n/**\n * The light theme's semantic colours — every `--lace-color-*` tokens.css's `[data-theme=\"light\"]`\n * block overrides, at the value it resolves to there — declared after `darkTheme` under the\n * page's own `[data-theme=\"light\"]`.\n */\nexport const lightTheme = {\n '--lace-color-bg-canvas': '#ffffff',\n '--lace-color-bg-surface': '#f8fafc',\n '--lace-color-bg-surface-alt': '#f1f5f9',\n '--lace-color-bg-input': '#ffffff',\n '--lace-color-bg-context-menu': '#ffffff',\n '--lace-color-border-default': '#cbd5e1',\n '--lace-color-border-subtle': '#e2e8f0',\n '--lace-color-border-input': '#cbd5e1',\n '--lace-color-border-input-hover': '#94a3b8',\n '--lace-color-text-primary': '#0f172a',\n '--lace-color-text-label': '#1f2937',\n '--lace-color-text-muted': '#64748b',\n '--lace-color-text-description': '#475569',\n '--lace-color-text-accent': '#3d6600',\n '--lace-color-text-link': '#2563eb',\n '--lace-color-text-danger': '#dc2626',\n '--lace-color-text-danger-soft': '#ef4444',\n '--lace-color-text-faint': '#94a3b8',\n '--lace-color-row-hover': 'rgba(0, 0, 0, 0.02)',\n '--lace-color-badge-purple': '#7c3aed',\n '--lace-color-badge-purple-bg': '#faf5ff',\n '--lace-color-accent': '#3d6600',\n '--lace-color-accent-alpha-subtle': 'rgba(132, 204, 22, 0.08)',\n '--lace-color-accent-alpha-medium': 'rgba(132, 204, 22, 0.16)',\n '--lace-color-accent-strong': '#2d4a00',\n '--lace-color-success': '#047857',\n '--lace-color-success-hover': '#065f46',\n '--lace-color-success-strong': '#064e3b',\n '--lace-color-danger': '#dc2626',\n '--lace-color-danger-bg-soft': '#fef2f2',\n '--lace-color-danger-fg': '#b91c1c',\n '--lace-color-warning-bg': '#fffbeb',\n '--lace-color-warning-fg': '#b45309',\n '--lace-color-focus-ring': '#3d6600',\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACSO,IAAM,YAAY;AAAA,EACvB,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,+BAA+B;AAAA,EAC/B,yBAAyB;AAAA,EACzB,gCAAgC;AAAA,EAChC,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,6BAA6B;AAAA,EAC7B,mCAAmC;A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;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,2BAA2B;AAAA,EAC3B,2BAA2B;AAC7B;;;ADnFO,IAAM,QAAQ;AAAA,EACnB,OAAO;AAAA,EACP,aAAa;AAAA,EACb,UAAU;AAAA,EACV,eAAe;AAAA,EACf,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AACR;AAEO,IAAM,MAAM;AAAA,EACjB,QAAQ,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC7C,QAAQ,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC7C,MAAM,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC3C,MAAM,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC3C,KAAK,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC1C,QAAQ,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC7C,KAAK,EAAE,MAAM,WAAW,QAAQ,UAAU;AAC5C;AASO,SAAS,kBAAkB,OAAiD;AACjF,SAAO,OAAO,QAAQ,KAAK,EACxB,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,GAAG,IAAI,IAAI,KAAK,EAAE,EACzC,KAAK,GAAG;AACb;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/themes.gen.ts"],"sourcesContent":["// @lace-cloud/design-tokens — JS/TS token exports\n// Primary distribution is tokens.css; use this for JS/TS consumers that\n// need programmatic access to token values (e.g., pinColor.ts).\n\nexport const brand = {\n green: '#CEFE65',\n greenBright: '#e0ff8a',\n gunmetal: '#153238',\n gunmetalLight: '#1a3f47',\n night: '#161616',\n cyan: '#95E7FF',\n grey: '#ECEFED',\n} as const;\n\nexport const pin = {\n string: { fill: '#95E7FF', stroke: '#2C9DB9' },\n number: { fill: '#F5A623', stroke: '#8A5A10' },\n bool: { fill: '#B084F0', stroke: '#5C3E9A' },\n list: { fill: '#CEFE65', stroke: '#5E8A1A' },\n map: { fill: '#F288C6', stroke: '#8A2E5C' },\n object: { fill: '#FF8A4C', stroke: '#8A3A10' },\n any: { fill: '#9BA19E', stroke: '#4A4F4C' },\n} as const;\n\n// The themes' semantic colours, generated from tokens.css at build\n// (`src/themes-source.ts`): `darkTheme` and `lightTheme`, for a consumer that\n// cannot load the stylesheet.\nexport { darkTheme, lightTheme } from './themes.gen';\n\n/** The themes tokens.css declares, read through `data-theme` on <html>: `dark` is the default,\n * the rest are `[data-theme=\"<name>\"]` blocks. A host maps its own theme names onto these. */\nexport const THEMES = ['dark', 'light', 'high-contrast', 'high-contrast-light'] as const;\n\n/** A theme's colours as the declarations of one CSS rule, `name:value` joined\n * by `;`, for a page that declares the tokens in a rule of its own. */\nexport function themeDeclarations(theme: Readonly<Record<string, string>>): string {\n return Object.entries(theme)\n .map(([name, value]) => `${name}:${value}`)\n .join(';');\n}\n","// Generated from tokens.css by scripts/gen-themes.mjs; `pnpm --filter @lace-cloud/design-tokens build`\n// rewrites it. Edit tokens.css, never this file.\n\n/**\n * The dark theme's semantic colours — every `--lace-color-*` of tokens.css's semantic tier, at the\n * value it resolves to in the default (dark) theme — for a consumer that cannot load tokens.css: a\n * server-rendered page declares them in its own `:root` and reads them by the names the\n * stylesheet uses.\n */\nexport const darkTheme = {\n '--lace-color-bg-canvas': '#161616',\n '--lace-color-bg-surface': '#1e1e1e',\n '--lace-color-bg-surface-alt': '#252526',\n '--lace-color-bg-input': '#0f0f0f',\n '--lace-color-bg-context-menu': '#1a1a1a',\n '--lace-color-border-default': '#333333',\n '--lace-color-border-subtle': '#3c3c3c',\n '--lace-color-border-input': '#555555',\n '--lace-color-border-input-hover': '#888888',\n '--lace-color-text-primary': '#ecefed',\n '--lace-color-text-label': '#e6e6e6',\n '--lace-color-text-muted': '#999999',\n '--lace-color-text-description': '#9ca3af',\n '--lace-color-text-accent': '#cefe65',\n '--lace-color-text-link': '#60a5fa',\n '--lace-color-text-danger': '#e5484d',\n '--lace-color-text-danger-soft': '#f87171',\n '--lace-color-text-faint': '#8c8f8c',\n '--lace-color-row-hover': 'rgba(255, 255, 255, 0.025)',\n '--lace-color-badge-purple': '#c084fc',\n '--lace-color-badge-purple-bg': 'rgba(192, 132, 252, 0.1)',\n '--lace-color-accent': '#cefe65',\n '--lace-color-text-on-accent': '#111111',\n '--lace-color-accent-alpha-subtle': 'rgba(206, 254, 101, 0.1)',\n '--lace-color-accent-alpha-medium': 'rgba(206, 254, 101, 0.2)',\n '--lace-color-accent-strong': '#e0ff8a',\n '--lace-color-success': '#4ade80',\n '--lace-color-success-hover': '#22c55e',\n '--lace-color-success-strong': '#16a34a',\n '--lace-color-danger': '#e5484d',\n '--lace-color-danger-bg-soft': 'rgba(248, 113, 113, 0.12)',\n '--lace-color-danger-fg': '#f87171',\n '--lace-color-warning-bg': '#3b2507',\n '--lace-color-warning-fg': '#fbbf24',\n '--lace-color-focus-ring': '#cefe65',\n} as const;\n\n/**\n * The light theme's semantic colours — every `--lace-color-*` tokens.css's `[data-theme=\"light\"]`\n * block overrides, at the value it resolves to there — declared after `darkTheme` under the\n * page's own `[data-theme=\"light\"]`.\n */\nexport const lightTheme = {\n '--lace-color-bg-canvas': '#ffffff',\n '--lace-color-bg-surface': '#f8fafc',\n '--lace-color-bg-surface-alt': '#f1f5f9',\n '--lace-color-bg-input': '#ffffff',\n '--lace-color-bg-context-menu': '#ffffff',\n '--lace-color-border-default': '#cbd5e1',\n '--lace-color-border-subtle': '#e2e8f0',\n '--lace-color-border-input': '#cbd5e1',\n '--lace-color-border-input-hover': '#94a3b8',\n '--lace-color-text-primary': '#0f172a',\n '--lace-color-text-label': '#1f2937',\n '--lace-color-text-muted': '#64748b',\n '--lace-color-text-description': '#475569',\n '--lace-color-text-accent': '#3d6600',\n '--lace-color-text-link': '#2563eb',\n '--lace-color-text-danger': '#dc2626',\n '--lace-color-text-danger-soft': '#ef4444',\n '--lace-color-text-faint': '#94a3b8',\n '--lace-color-row-hover': 'rgba(0, 0, 0, 0.02)',\n '--lace-color-badge-purple': '#7c3aed',\n '--lace-color-badge-purple-bg': '#faf5ff',\n '--lace-color-accent': '#3d6600',\n '--lace-color-accent-alpha-subtle': 'rgba(132, 204, 22, 0.08)',\n '--lace-color-accent-alpha-medium': 'rgba(132, 204, 22, 0.16)',\n '--lace-color-accent-strong': '#2d4a00',\n '--lace-color-success': '#047857',\n '--lace-color-success-hover': '#065f46',\n '--lace-color-success-strong': '#064e3b',\n '--lace-color-danger': '#dc2626',\n '--lace-color-danger-bg-soft': '#fef2f2',\n '--lace-color-danger-fg': '#b91c1c',\n '--lace-color-warning-bg': '#fffbeb',\n '--lace-color-warning-fg': '#b45309',\n '--lace-color-focus-ring': '#3d6600',\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACSO,IAAM,YAAY;AAAA,EACvB,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,+BAA+B;AAAA,EAC/B,yBAAyB;AAAA,EACzB,gCAAgC;AAAA,EAChC,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,6BAA6B;AAAA,EAC7B,mCAAmC;AAAA,EACnC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,2BAA2B;AAAA,EAC3B,iCAAiC;AAAA,EACjC,4BAA4B;AAAA,EAC5B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAC5B,iCAAiC;AAAA,EACjC,2BAA2B;AAAA,EAC3B,0BAA0B;AAAA,EAC1B,6BAA6B;AAAA,EAC7B,gCAAgC;AAAA,EAChC,uBAAuB;AAAA,EACvB,+BAA+B;AAAA,EAC/B,oCAAoC;AAAA,EACpC,oCAAoC;AAAA,EACpC,8BAA8B;AAAA,EAC9B,wBAAwB;AAAA,EACxB,8BAA8B;AAAA,EAC9B,+BAA+B;AAAA,EAC/B,uBAAuB;AAAA,EACvB,+BAA+B;AAAA,EAC/B,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B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AAM,WAAW,QAAQ,UAAU;AAAA,EAC7C,KAAK,EAAE,MAAM,WAAW,QAAQ,UAAU;AAC5C;AASO,IAAM,SAAS,CAAC,QAAQ,SAAS,iBAAiB,qBAAqB;AAIvE,SAAS,kBAAkB,OAAiD;AACjF,SAAO,OAAO,QAAQ,KAAK,EACxB,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,GAAG,IAAI,IAAI,KAAK,EAAE,EACzC,KAAK,GAAG;AACb;","names":[]}
package/dist/index.d.cts CHANGED
@@ -123,8 +123,11 @@ declare const pin: {
123
123
  };
124
124
  };
125
125
 
126
+ /** The themes tokens.css declares, read through `data-theme` on <html>: `dark` is the default,
127
+ * the rest are `[data-theme="<name>"]` blocks. A host maps its own theme names onto these. */
128
+ declare const THEMES: readonly ["dark", "light", "high-contrast", "high-contrast-light"];
126
129
  /** A theme's colours as the declarations of one CSS rule, `name:value` joined
127
130
  * by `;`, for a page that declares the tokens in a rule of its own. */
128
131
  declare function themeDeclarations(theme: Readonly<Record<string, string>>): string;
129
132
 
130
- export { brand, darkTheme, lightTheme, pin, themeDeclarations };
133
+ export { THEMES, brand, darkTheme, lightTheme, pin, themeDeclarations };
package/dist/index.d.ts CHANGED
@@ -123,8 +123,11 @@ declare const pin: {
123
123
  };
124
124
  };
125
125
 
126
+ /** The themes tokens.css declares, read through `data-theme` on <html>: `dark` is the default,
127
+ * the rest are `[data-theme="<name>"]` blocks. A host maps its own theme names onto these. */
128
+ declare const THEMES: readonly ["dark", "light", "high-contrast", "high-contrast-light"];
126
129
  /** A theme's colours as the declarations of one CSS rule, `name:value` joined
127
130
  * by `;`, for a page that declares the tokens in a rule of its own. */
128
131
  declare function themeDeclarations(theme: Readonly<Record<string, string>>): string;
129
132
 
130
- export { brand, darkTheme, lightTheme, pin, themeDeclarations };
133
+ export { THEMES, brand, darkTheme, lightTheme, pin, themeDeclarations };
package/dist/index.mjs CHANGED
@@ -92,10 +92,12 @@ var pin = {
92
92
  object: { fill: "#FF8A4C", stroke: "#8A3A10" },
93
93
  any: { fill: "#9BA19E", stroke: "#4A4F4C" }
94
94
  };
95
+ var THEMES = ["dark", "light", "high-contrast", "high-contrast-light"];
95
96
  function themeDeclarations(theme) {
96
97
  return Object.entries(theme).map(([name, value]) => `${name}:${value}`).join(";");
97
98
  }
98
99
  export {
100
+ THEMES,
99
101
  brand,
100
102
  darkTheme,
101
103
  lightTheme,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/themes.gen.ts","../src/index.ts"],"sourcesContent":["// Generated from tokens.css by scripts/gen-themes.mjs; `pnpm --filter @lace-cloud/design-tokens build`\n// rewrites it. Edit tokens.css, never this file.\n\n/**\n * The dark theme's semantic colours — every `--lace-color-*` of tokens.css's semantic tier, at the\n * value it resolves to in the default (dark) theme — for a consumer that cannot load tokens.css: a\n * server-rendered page declares them in its own `:root` and reads them by the names the\n * stylesheet uses.\n */\nexport const darkTheme = {\n '--lace-color-bg-canvas': '#161616',\n '--lace-color-bg-surface': '#1e1e1e',\n '--lace-color-bg-surface-alt': '#252526',\n '--lace-color-bg-input': '#0f0f0f',\n '--lace-color-bg-context-menu': '#1a1a1a',\n '--lace-color-border-default': '#333333',\n '--lace-color-border-subtle': '#3c3c3c',\n '--lace-color-border-input': '#555555',\n '--lace-color-border-input-hover': '#888888',\n '--lace-color-text-primary': '#ecefed',\n '--lace-color-text-label': '#e6e6e6',\n '--lace-color-text-muted': '#999999',\n '--lace-color-text-description': '#9ca3af',\n '--lace-color-text-accent': '#cefe65',\n '--lace-color-text-link': '#60a5fa',\n '--lace-color-text-danger': '#e5484d',\n '--lace-color-text-danger-soft': '#f87171',\n '--lace-color-text-faint': '#8c8f8c',\n '--lace-color-row-hover': 'rgba(255, 255, 255, 0.025)',\n '--lace-color-badge-purple': '#c084fc',\n '--lace-color-badge-purple-bg': 'rgba(192, 132, 252, 0.1)',\n '--lace-color-accent': '#cefe65',\n '--lace-color-text-on-accent': '#111111',\n '--lace-color-accent-alpha-subtle': 'rgba(206, 254, 101, 0.1)',\n '--lace-color-accent-alpha-medium': 'rgba(206, 254, 101, 0.2)',\n '--lace-color-accent-strong': '#e0ff8a',\n '--lace-color-success': '#4ade80',\n '--lace-color-success-hover': '#22c55e',\n '--lace-color-success-strong': '#16a34a',\n '--lace-color-danger': '#e5484d',\n '--lace-color-danger-bg-soft': 'rgba(248, 113, 113, 0.12)',\n '--lace-color-danger-fg': '#f87171',\n '--lace-color-warning-bg': '#3b2507',\n '--lace-color-warning-fg': '#fbbf24',\n '--lace-color-focus-ring': '#cefe65',\n} as const;\n\n/**\n * The light theme's semantic colours — every `--lace-color-*` tokens.css's `[data-theme=\"light\"]`\n * block overrides, at the value it resolves to there — declared after `darkTheme` under the\n * page's own `[data-theme=\"light\"]`.\n */\nexport const lightTheme = {\n '--lace-color-bg-canvas': '#ffffff',\n '--lace-color-bg-surface': '#f8fafc',\n '--lace-color-bg-surface-alt': '#f1f5f9',\n '--lace-color-bg-input': '#ffffff',\n '--lace-color-bg-context-menu': '#ffffff',\n '--lace-color-border-default': '#cbd5e1',\n '--lace-color-border-subtle': '#e2e8f0',\n '--lace-color-border-input': '#cbd5e1',\n '--lace-color-border-input-hover': '#94a3b8',\n '--lace-color-text-primary': '#0f172a',\n '--lace-color-text-label': '#1f2937',\n '--lace-color-text-muted': '#64748b',\n '--lace-color-text-description': '#475569',\n '--lace-color-text-accent': '#3d6600',\n '--lace-color-text-link': '#2563eb',\n '--lace-color-text-danger': '#dc2626',\n '--lace-color-text-danger-soft': '#ef4444',\n '--lace-color-text-faint': '#94a3b8',\n '--lace-color-row-hover': 'rgba(0, 0, 0, 0.02)',\n '--lace-color-badge-purple': '#7c3aed',\n '--lace-color-badge-purple-bg': '#faf5ff',\n '--lace-color-accent': '#3d6600',\n '--lace-color-accent-alpha-subtle': 'rgba(132, 204, 22, 0.08)',\n '--lace-color-accent-alpha-medium': 'rgba(132, 204, 22, 0.16)',\n '--lace-color-accent-strong': '#2d4a00',\n '--lace-color-success': '#047857',\n '--lace-color-success-hover': '#065f46',\n '--lace-color-success-strong': '#064e3b',\n '--lace-color-danger': '#dc2626',\n '--lace-color-danger-bg-soft': '#fef2f2',\n '--lace-color-danger-fg': '#b91c1c',\n '--lace-color-warning-bg': '#fffbeb',\n '--lace-color-warning-fg': '#b45309',\n '--lace-color-focus-ring': '#3d6600',\n} as const;\n","// @lace-cloud/design-tokens — JS/TS token exports\n// Primary distribution is tokens.css; use this for JS/TS consumers that\n// need programmatic access to token values (e.g., pinColor.ts).\n\nexport const brand = {\n green: '#CEFE65',\n greenBright: '#e0ff8a',\n gunmetal: '#153238',\n gunmetalLight: '#1a3f47',\n night: '#161616',\n cyan: '#95E7FF',\n grey: '#ECEFED',\n} as const;\n\nexport const pin = {\n string: { fill: '#95E7FF', stroke: '#2C9DB9' },\n number: { fill: '#F5A623', stroke: '#8A5A10' },\n bool: { fill: '#B084F0', stroke: '#5C3E9A' },\n list: { fill: '#CEFE65', stroke: '#5E8A1A' },\n map: { fill: '#F288C6', stroke: '#8A2E5C' },\n object: { fill: '#FF8A4C', stroke: '#8A3A10' },\n any: { fill: '#9BA19E', stroke: '#4A4F4C' },\n} as const;\n\n// The themes' semantic colours, generated from tokens.css at build\n// (`src/themes-source.ts`): `darkTheme` and `lightTheme`, for a consumer that\n// cannot load the stylesheet.\nexport { darkTheme, lightTheme } from './themes.gen';\n\n/** A theme's colours as the declarations of one CSS rule, `name:value` joined\n * by `;`, for a page that declares the tokens in a rule of its own. */\nexport function themeDeclarations(theme: Readonly<Record<string, string>>): string {\n return Object.entries(theme)\n .map(([name, value]) => `${name}:${value}`)\n .join(';');\n}\n"],"mappings":";AASO,IAAM,YAAY;AAAA,EACvB,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,+BAA+B;AAAA,EAC/B,yBAAyB;AAAA,EACzB,gCAAgC;AAAA,EAChC,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,6BAA6B;AAAA,EAC7B,mCAAmC;AAAA,EACnC,6BAA6B;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2B;AAAA,EAC3B,2BAA2B;AAAA,EAC3B,2BAA2B;AAC7B;;;ACnFO,IAAM,QAAQ;AAAA,EACnB,OAAO;AAAA,EACP,aAAa;AAAA,EACb,UAAU;AAAA,EACV,eAAe;AAAA,EACf,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AACR;AAEO,IAAM,MAAM;AAAA,EACjB,QAAQ,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC7C,QAAQ,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC7C,MAAM,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC3C,MAAM,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC3C,KAAK,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC1C,QAAQ,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC7C,KAAK,EAAE,MAAM,WAAW,QAAQ,UAAU;AAC5C;AASO,SAAS,kBAAkB,OAAiD;AACjF,SAAO,OAAO,QAAQ,KAAK,EACxB,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,GAAG,IAAI,IAAI,KAAK,EAAE,EACzC,KAAK,GAAG;AACb;","names":[]}
1
+ {"version":3,"sources":["../src/themes.gen.ts","../src/index.ts"],"sourcesContent":["// Generated from tokens.css by scripts/gen-themes.mjs; `pnpm --filter @lace-cloud/design-tokens build`\n// rewrites it. Edit tokens.css, never this file.\n\n/**\n * The dark theme's semantic colours — every `--lace-color-*` of tokens.css's semantic tier, at the\n * value it resolves to in the default (dark) theme — for a consumer that cannot load tokens.css: a\n * server-rendered page declares them in its own `:root` and reads them by the names the\n * stylesheet uses.\n */\nexport const darkTheme = {\n '--lace-color-bg-canvas': '#161616',\n '--lace-color-bg-surface': '#1e1e1e',\n '--lace-color-bg-surface-alt': '#252526',\n '--lace-color-bg-input': '#0f0f0f',\n '--lace-color-bg-context-menu': '#1a1a1a',\n '--lace-color-border-default': '#333333',\n '--lace-color-border-subtle': '#3c3c3c',\n '--lace-color-border-input': '#555555',\n '--lace-color-border-input-hover': '#888888',\n '--lace-color-text-primary': '#ecefed',\n '--lace-color-text-label': '#e6e6e6',\n '--lace-color-text-muted': '#999999',\n '--lace-color-text-description': '#9ca3af',\n '--lace-color-text-accent': '#cefe65',\n '--lace-color-text-link': '#60a5fa',\n '--lace-color-text-danger': '#e5484d',\n '--lace-color-text-danger-soft': '#f87171',\n '--lace-color-text-faint': '#8c8f8c',\n '--lace-color-row-hover': 'rgba(255, 255, 255, 0.025)',\n '--lace-color-badge-purple': '#c084fc',\n '--lace-color-badge-purple-bg': 'rgba(192, 132, 252, 0.1)',\n '--lace-color-accent': '#cefe65',\n '--lace-color-text-on-accent': '#111111',\n '--lace-color-accent-alpha-subtle': 'rgba(206, 254, 101, 0.1)',\n '--lace-color-accent-alpha-medium': 'rgba(206, 254, 101, 0.2)',\n '--lace-color-accent-strong': '#e0ff8a',\n '--lace-color-success': '#4ade80',\n '--lace-color-success-hover': '#22c55e',\n '--lace-color-success-strong': '#16a34a',\n '--lace-color-danger': '#e5484d',\n '--lace-color-danger-bg-soft': 'rgba(248, 113, 113, 0.12)',\n '--lace-color-danger-fg': '#f87171',\n '--lace-color-warning-bg': '#3b2507',\n '--lace-color-warning-fg': '#fbbf24',\n '--lace-color-focus-ring': '#cefe65',\n} as const;\n\n/**\n * The light theme's semantic colours — every `--lace-color-*` tokens.css's `[data-theme=\"light\"]`\n * block overrides, at the value it resolves to there — declared after `darkTheme` under the\n * page's own `[data-theme=\"light\"]`.\n */\nexport const lightTheme = {\n '--lace-color-bg-canvas': '#ffffff',\n '--lace-color-bg-surface': '#f8fafc',\n '--lace-color-bg-surface-alt': '#f1f5f9',\n '--lace-color-bg-input': '#ffffff',\n '--lace-color-bg-context-menu': '#ffffff',\n '--lace-color-border-default': '#cbd5e1',\n '--lace-color-border-subtle': '#e2e8f0',\n '--lace-color-border-input': '#cbd5e1',\n '--lace-color-border-input-hover': '#94a3b8',\n '--lace-color-text-primary': '#0f172a',\n '--lace-color-text-label': '#1f2937',\n '--lace-color-text-muted': '#64748b',\n '--lace-color-text-description': '#475569',\n '--lace-color-text-accent': '#3d6600',\n '--lace-color-text-link': '#2563eb',\n '--lace-color-text-danger': '#dc2626',\n '--lace-color-text-danger-soft': '#ef4444',\n '--lace-color-text-faint': '#94a3b8',\n '--lace-color-row-hover': 'rgba(0, 0, 0, 0.02)',\n '--lace-color-badge-purple': '#7c3aed',\n '--lace-color-badge-purple-bg': '#faf5ff',\n '--lace-color-accent': '#3d6600',\n '--lace-color-accent-alpha-subtle': 'rgba(132, 204, 22, 0.08)',\n '--lace-color-accent-alpha-medium': 'rgba(132, 204, 22, 0.16)',\n '--lace-color-accent-strong': '#2d4a00',\n '--lace-color-success': '#047857',\n '--lace-color-success-hover': '#065f46',\n '--lace-color-success-strong': '#064e3b',\n '--lace-color-danger': '#dc2626',\n '--lace-color-danger-bg-soft': '#fef2f2',\n '--lace-color-danger-fg': '#b91c1c',\n '--lace-color-warning-bg': '#fffbeb',\n '--lace-color-warning-fg': '#b45309',\n '--lace-color-focus-ring': '#3d6600',\n} as const;\n","// @lace-cloud/design-tokens — JS/TS token exports\n// Primary distribution is tokens.css; use this for JS/TS consumers that\n// need programmatic access to token values (e.g., pinColor.ts).\n\nexport const brand = {\n green: '#CEFE65',\n greenBright: '#e0ff8a',\n gunmetal: '#153238',\n gunmetalLight: '#1a3f47',\n night: '#161616',\n cyan: '#95E7FF',\n grey: '#ECEFED',\n} as const;\n\nexport const pin = {\n string: { fill: '#95E7FF', stroke: '#2C9DB9' },\n number: { fill: '#F5A623', stroke: '#8A5A10' },\n bool: { fill: '#B084F0', stroke: '#5C3E9A' },\n list: { fill: '#CEFE65', stroke: '#5E8A1A' },\n map: { fill: '#F288C6', stroke: '#8A2E5C' },\n object: { fill: '#FF8A4C', stroke: '#8A3A10' },\n any: { fill: '#9BA19E', stroke: '#4A4F4C' },\n} as const;\n\n// The themes' semantic colours, generated from tokens.css at build\n// (`src/themes-source.ts`): `darkTheme` and `lightTheme`, for a consumer that\n// cannot load the stylesheet.\nexport { darkTheme, lightTheme } from './themes.gen';\n\n/** The themes tokens.css declares, read through `data-theme` on <html>: `dark` is the default,\n * the rest are `[data-theme=\"<name>\"]` blocks. A host maps its own theme names onto these. */\nexport const THEMES = ['dark', 'light', 'high-contrast', 'high-contrast-light'] as const;\n\n/** A theme's colours as the declarations of one CSS rule, `name:value` joined\n * by `;`, for a page that declares the tokens in a rule of its own. */\nexport function themeDeclarations(theme: Readonly<Record<string, string>>): string {\n return Object.entries(theme)\n .map(([name, value]) => `${name}:${value}`)\n .join(';');\n}\n"],"mappings":";AASO,IAAM,YAAY;AAAA,EACvB,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,+BAA+B;AAAA,EAC/B,yBAAyB;AAAA,EACzB,gCAAgC;AAAA,EAChC,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,6BAA6B;AAAA,EAC7B,mCAAmC;AAAA,EACnC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,2BAA2B;AAAA,EAC3B,iCAAiC;AAAA,EACjC,4BAA4B;AAAA,EAC5B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAC5B,iCAAiC;AAAA,EACjC,2BAA2B;AAAA,EAC3B,0BAA0B;AAAA,EAC1B,6BAA6B;AAAA,EAC7B,gCAAgC;AAAA,EAChC,uBAAuB;AAAA,EACvB,+BAA+B;AAAA,EAC/B,oCAAoC;AAAA,EACpC,oCAAoC;AAAA,EACpC,8BAA8B;AAAA,EAC9B,wBAAwB;AAAA,EACxB,8BAA8B;AAAA,EAC9B,+BAA+B;AAAA,EAC/B,uBAAuB;AAAA,EACvB,+BAA+B;AAAA,EAC/B,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,2BAA2B;AAAA,EAC3B,2BAA2B;AAC7B;AAOO,IAAM,aAAa;AAAA,EACxB,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,E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AAQ,SAAS,iBAAiB,qBAAqB;AAIvE,SAAS,kBAAkB,OAAiD;AACjF,SAAO,OAAO,QAAQ,KAAK,EACxB,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,GAAG,IAAI,IAAI,KAAK,EAAE,EACzC,KAAK,GAAG;AACb;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lace-cloud/design-tokens",
3
- "version": "0.35.0",
3
+ "version": "0.37.0",
4
4
  "lace": {
5
5
  "owner": "library"
6
6
  },
package/tokens.css CHANGED
@@ -226,6 +226,14 @@
226
226
  --lace-duration-slow: 300ms;
227
227
  --lace-easing-standard: ease;
228
228
  --lace-easing-out: ease-out;
229
+
230
+ /* ── High-contrast stock colours: VS Code's own, where it supplies no --vscode-* variable ── */
231
+ --lace-color-hc-edge-dark: #6fc3df;
232
+ --lace-color-hc-edge-light: #0f4a85;
233
+ --lace-color-hc-focus-dark: #f38518;
234
+ --lace-color-hc-focus-light: #006bbd;
235
+ --lace-color-hc-surface-dark: #000000;
236
+ --lace-color-hc-surface-light: #ffffff;
229
237
  }
230
238
 
231
239
  /* ══════════════════════════════════════════════════════════════════════
@@ -430,6 +438,11 @@
430
438
  --lace-input-border-hover: var(--lace-color-border-input-hover);
431
439
  --lace-input-border-focus: var(--lace-color-focus-ring);
432
440
  --lace-input-border-error: var(--lace-color-danger);
441
+ /* The error input's non-colour cue at high contrast; it moves no border. */
442
+ --lace-input-error-outline: none;
443
+ --lace-input-error-focus-outline-width: 2px;
444
+ --lace-input-error-focus-outline-style: solid;
445
+ --lace-card-border: rgba(255, 255, 255, 0.08);
433
446
  --lace-input-text: var(--lace-color-text-primary);
434
447
  --lace-input-placeholder: var(--lace-color-text-muted);
435
448
 
@@ -502,7 +515,18 @@
502
515
  --lace-node-error-border: var(--lace-color-red-500);
503
516
  --lace-node-error-shadow-color: var(--lace-color-red-alpha-30);
504
517
  --lace-node-new-border: #3b82f6;
518
+ --lace-node-rename-border: var(--lace-color-accent-alpha-medium);
505
519
  --lace-node-new-shadow-color: var(--lace-color-blue-alpha-30);
520
+ /* The shapes that tell the states with no colour of their own apart at high contrast. */
521
+ --lace-node-selected-ring-width: 1.5px;
522
+ --lace-node-focus-ring-style: solid;
523
+ --lace-node-focus-ring-offset: 2px;
524
+ --lace-node-selected-focus-ring-width: 2px;
525
+ --lace-node-selected-focus-ring-style: solid;
526
+ --lace-node-error-border-width: 1px;
527
+ --lace-node-error-border-style: solid;
528
+ --lace-node-new-border-width: 1px;
529
+ --lace-node-new-border-style: solid;
506
530
 
507
531
  /* ── Canvas pin colors (Blender-style type handles) ── */
508
532
  --lace-pin-string-fill: var(--lace-color-cyan-500);
@@ -528,6 +552,16 @@
528
552
  --lace-pin-map-ring: var(--lace-pin-map-fill);
529
553
  --lace-pin-object-ring: var(--lace-pin-object-fill);
530
554
  --lace-pin-any-ring: var(--lace-pin-any-fill);
555
+ /* A pin the engine has a finding on is also outlined, by tone, where a colour alone
556
+ * would not tell it. */
557
+ --lace-pin-problem-outline-width: 0px;
558
+ --lace-pin-error-outline-style: none;
559
+ --lace-pin-warn-outline-style: none;
560
+ /* A hovered control is outlined as well as filled, where a fill alone would not show it. */
561
+ --lace-hover-outline: none;
562
+ /* The card a dragged connection would connect to is outlined; at high contrast in the
563
+ * active channel and a dashed shape, so the cue is not colour alone. */
564
+ --lace-node-drop-outline: 2px solid var(--lace-color-accent);
531
565
 
532
566
  /* ── Canvas controls + minimap ── */
533
567
  --lace-canvas-controls-bg: var(--lace-gunmetal);
@@ -544,6 +578,8 @@
544
578
  --lace-canvas-edge-stroke-selected: var(--lace-color-accent-strong);
545
579
  --lace-canvas-edge-stroke-width: 1.5px;
546
580
  --lace-canvas-edge-stroke-width-selected: 2.5px;
581
+ --lace-canvas-edge-stroke-width-hover: 2px;
582
+ --lace-canvas-connection-stroke: #b1b1b7;
547
583
  --lace-canvas-grid-dot: var(--lace-color-green-alpha-04);
548
584
 
549
585
  /* ── Tooltip ──
@@ -578,11 +614,13 @@
578
614
  *
579
615
  * Override Tier-2 semantic + Tier-3 component tokens for light surfaces.
580
616
  * Tier-1 primitives (raw palette + alpha variants) stay theme-neutral.
581
- * Apps opt in via `<html data-theme="light">`; otherwise the `:root`
617
+ * Apps opt in via `<html data-theme="light">`, or `high-contrast-light`, which
618
+ * takes these and the high-contrast remap below; otherwise the `:root`
582
619
  * dark defaults apply.
583
620
  * ══════════════════════════════════════════════════════════════════════ */
584
621
 
585
- [data-theme="light"] {
622
+ [data-theme="light"],
623
+ [data-theme="high-contrast-light"] {
586
624
  /* ── Tier-2: Surface ── */
587
625
  --lace-color-bg-canvas: #ffffff;
588
626
  --lace-color-bg-surface: #f8fafc;
@@ -770,6 +808,96 @@
770
808
  --lace-policy-predicate-eval-bg: rgba(0, 0, 0, 0.04);
771
809
  }
772
810
 
811
+ /* ══════════════════════════════════════════════════════════════════════
812
+ * HIGH CONTRAST — VS Code's contrast, active and focus borders and editor background, else
813
+ * its stock values; the active and focus borders share a colour, so shape tells states apart.
814
+ * ══════════════════════════════════════════════════════════════════════ */
815
+
816
+ [data-theme="high-contrast"] {
817
+ --lace-hc-edge: var(--vscode-contrastBorder, var(--lace-color-hc-edge-dark));
818
+ --lace-hc-active: var(--vscode-contrastActiveBorder, var(--lace-color-hc-focus-dark));
819
+ --lace-hc-focus: var(--vscode-focusBorder, var(--lace-color-hc-focus-dark));
820
+ --lace-hc-surface: var(--vscode-editor-background, var(--lace-color-hc-surface-dark));
821
+ }
822
+
823
+ [data-theme="high-contrast-light"] {
824
+ --lace-hc-edge: var(--vscode-contrastBorder, var(--lace-color-hc-edge-light));
825
+ --lace-hc-active: var(--vscode-contrastActiveBorder, var(--lace-color-hc-focus-light));
826
+ --lace-hc-focus: var(--vscode-focusBorder, var(--lace-color-hc-focus-light));
827
+ --lace-hc-surface: var(--vscode-editor-background, var(--lace-color-hc-surface-light));
828
+ }
829
+
830
+ [data-theme="high-contrast"],
831
+ [data-theme="high-contrast-light"] {
832
+ --lace-color-border-default: var(--lace-hc-edge);
833
+ --lace-color-border-subtle: var(--lace-hc-edge);
834
+ --lace-color-border-input: var(--lace-hc-edge);
835
+ --lace-color-border-input-hover: var(--lace-hc-edge);
836
+ --lace-color-focus-ring: var(--lace-hc-focus);
837
+ --lace-group-border: var(--lace-hc-edge);
838
+ --lace-forbidden-border: var(--lace-hc-edge);
839
+ --lace-card-border: var(--lace-hc-edge);
840
+ --lace-badge-gy-border: var(--lace-hc-edge);
841
+ --lace-badge-info-border: var(--lace-hc-edge);
842
+ --lace-badge-purple-border: var(--lace-hc-edge);
843
+ --lace-badge-success-border: var(--lace-hc-edge);
844
+ --lace-badge-warning-border: var(--lace-hc-edge);
845
+ --lace-banner-error-border: var(--lace-hc-edge);
846
+ --lace-banner-warning-border: var(--lace-hc-edge);
847
+ --lace-mode-toggle-active-border: var(--lace-hc-edge);
848
+ --lace-toast-error-border: var(--lace-hc-edge);
849
+ --lace-toast-success-border: var(--lace-hc-edge);
850
+ --lace-node-rename-border: var(--lace-hc-edge);
851
+ --lace-green: var(--lace-hc-active);
852
+ --lace-canvas-controls-border: var(--lace-hc-edge);
853
+ --lace-canvas-minimap-border: var(--lace-hc-edge);
854
+ --lace-canvas-edge-stroke: var(--lace-hc-edge);
855
+ --lace-canvas-edge-stroke-hover: var(--lace-hc-active);
856
+ --lace-canvas-edge-stroke-selected: var(--lace-hc-active);
857
+ --lace-canvas-connection-stroke: var(--lace-hc-active);
858
+ --lace-node-selected-ring: var(--lace-hc-active);
859
+ --lace-node-error-border: var(--lace-hc-edge);
860
+ --lace-node-new-border: var(--lace-hc-edge);
861
+ --lace-node-bg: var(--lace-hc-surface);
862
+ --lace-node-header-bg: var(--lace-hc-surface);
863
+ --lace-paper-thread-fine: transparent;
864
+ --lace-paper-thread-major: transparent;
865
+ --lace-pin-string-ring: var(--lace-hc-edge);
866
+ --lace-pin-string-stroke: var(--lace-hc-edge);
867
+ --lace-pin-number-ring: var(--lace-hc-edge);
868
+ --lace-pin-number-stroke: var(--lace-hc-edge);
869
+ --lace-pin-bool-ring: var(--lace-hc-edge);
870
+ --lace-pin-bool-stroke: var(--lace-hc-edge);
871
+ --lace-pin-list-ring: var(--lace-hc-edge);
872
+ --lace-pin-list-stroke: var(--lace-hc-edge);
873
+ --lace-pin-map-ring: var(--lace-hc-edge);
874
+ --lace-pin-map-stroke: var(--lace-hc-edge);
875
+ --lace-pin-object-ring: var(--lace-hc-edge);
876
+ --lace-pin-object-stroke: var(--lace-hc-edge);
877
+ --lace-pin-any-ring: var(--lace-hc-edge);
878
+ --lace-pin-any-stroke: var(--lace-hc-edge);
879
+ --lace-node-selected-ring-width: 3px;
880
+ --lace-node-focus-ring-style: dashed;
881
+ --lace-node-focus-ring-offset: 5px;
882
+ --lace-node-selected-focus-ring-width: 6px;
883
+ --lace-node-selected-focus-ring-style: double;
884
+ --lace-node-error-border-width: 3px;
885
+ --lace-node-error-border-style: double;
886
+ --lace-node-new-border-width: 3px;
887
+ --lace-node-new-border-style: dotted;
888
+ --lace-canvas-edge-stroke-width-selected: 4px;
889
+ --lace-canvas-edge-stroke-width-hover: 3px;
890
+ --lace-pin-problem-outline-width: 3px;
891
+ --lace-pin-error-outline-style: double;
892
+ --lace-pin-warn-outline-style: dotted;
893
+ --lace-hover-outline: 2px dotted var(--lace-hc-active);
894
+ --lace-node-drop-outline: 4px dashed var(--lace-hc-active);
895
+ --lace-input-error-focus-outline-width: var(--lace-node-error-border-width);
896
+ --lace-input-error-focus-outline-style: var(--lace-node-error-border-style);
897
+ --lace-input-error-outline: var(--lace-node-error-border-width)
898
+ var(--lace-node-error-border-style) var(--lace-node-error-border);
899
+ }
900
+
773
901
  /* ══════════════════════════════════════════════════════════════════════
774
902
  * GLOBAL DEFAULTS
775
903
  *
@@ -871,3 +999,81 @@ body {
871
999
  background-image: none;
872
1000
  }
873
1001
  }
1002
+
1003
+ /* Windows forced colours: the high-contrast remap above, on system colours, for every theme.
1004
+ * It is the last rule so it outranks each theme block at equal specificity. */
1005
+ @media (forced-colors: active) {
1006
+ :root {
1007
+ --lace-hc-edge: CanvasText;
1008
+ --lace-hc-active: Highlight;
1009
+ --lace-hc-focus: Highlight;
1010
+ --lace-hc-surface: Canvas;
1011
+ --lace-color-border-default: var(--lace-hc-edge);
1012
+ --lace-color-border-subtle: var(--lace-hc-edge);
1013
+ --lace-color-border-input: var(--lace-hc-edge);
1014
+ --lace-color-border-input-hover: var(--lace-hc-edge);
1015
+ --lace-color-focus-ring: var(--lace-hc-focus);
1016
+ --lace-group-border: var(--lace-hc-edge);
1017
+ --lace-forbidden-border: var(--lace-hc-edge);
1018
+ --lace-card-border: var(--lace-hc-edge);
1019
+ --lace-badge-gy-border: var(--lace-hc-edge);
1020
+ --lace-badge-info-border: var(--lace-hc-edge);
1021
+ --lace-badge-purple-border: var(--lace-hc-edge);
1022
+ --lace-badge-success-border: var(--lace-hc-edge);
1023
+ --lace-badge-warning-border: var(--lace-hc-edge);
1024
+ --lace-banner-error-border: var(--lace-hc-edge);
1025
+ --lace-banner-warning-border: var(--lace-hc-edge);
1026
+ --lace-mode-toggle-active-border: var(--lace-hc-edge);
1027
+ --lace-toast-error-border: var(--lace-hc-edge);
1028
+ --lace-toast-success-border: var(--lace-hc-edge);
1029
+ --lace-node-rename-border: var(--lace-hc-edge);
1030
+ --lace-green: var(--lace-hc-active);
1031
+ --lace-canvas-controls-border: var(--lace-hc-edge);
1032
+ --lace-canvas-minimap-border: var(--lace-hc-edge);
1033
+ --lace-canvas-edge-stroke: var(--lace-hc-edge);
1034
+ --lace-canvas-edge-stroke-hover: var(--lace-hc-active);
1035
+ --lace-canvas-edge-stroke-selected: var(--lace-hc-active);
1036
+ --lace-canvas-connection-stroke: var(--lace-hc-active);
1037
+ --lace-node-selected-ring: var(--lace-hc-active);
1038
+ --lace-node-error-border: var(--lace-hc-edge);
1039
+ --lace-node-new-border: var(--lace-hc-edge);
1040
+ --lace-node-bg: var(--lace-hc-surface);
1041
+ --lace-node-header-bg: var(--lace-hc-surface);
1042
+ --lace-paper-thread-fine: transparent;
1043
+ --lace-paper-thread-major: transparent;
1044
+ --lace-pin-string-ring: var(--lace-hc-edge);
1045
+ --lace-pin-string-stroke: var(--lace-hc-edge);
1046
+ --lace-pin-number-ring: var(--lace-hc-edge);
1047
+ --lace-pin-number-stroke: var(--lace-hc-edge);
1048
+ --lace-pin-bool-ring: var(--lace-hc-edge);
1049
+ --lace-pin-bool-stroke: var(--lace-hc-edge);
1050
+ --lace-pin-list-ring: var(--lace-hc-edge);
1051
+ --lace-pin-list-stroke: var(--lace-hc-edge);
1052
+ --lace-pin-map-ring: var(--lace-hc-edge);
1053
+ --lace-pin-map-stroke: var(--lace-hc-edge);
1054
+ --lace-pin-object-ring: var(--lace-hc-edge);
1055
+ --lace-pin-object-stroke: var(--lace-hc-edge);
1056
+ --lace-pin-any-ring: var(--lace-hc-edge);
1057
+ --lace-pin-any-stroke: var(--lace-hc-edge);
1058
+ --lace-node-selected-ring-width: 3px;
1059
+ --lace-node-focus-ring-style: dashed;
1060
+ --lace-node-focus-ring-offset: 5px;
1061
+ --lace-node-selected-focus-ring-width: 6px;
1062
+ --lace-node-selected-focus-ring-style: double;
1063
+ --lace-node-error-border-width: 3px;
1064
+ --lace-node-error-border-style: double;
1065
+ --lace-node-new-border-width: 3px;
1066
+ --lace-node-new-border-style: dotted;
1067
+ --lace-canvas-edge-stroke-width-selected: 4px;
1068
+ --lace-canvas-edge-stroke-width-hover: 3px;
1069
+ --lace-pin-problem-outline-width: 3px;
1070
+ --lace-pin-error-outline-style: double;
1071
+ --lace-pin-warn-outline-style: dotted;
1072
+ --lace-hover-outline: 2px dotted var(--lace-hc-active);
1073
+ --lace-node-drop-outline: 4px dashed var(--lace-hc-active);
1074
+ --lace-input-error-focus-outline-width: var(--lace-node-error-border-width);
1075
+ --lace-input-error-focus-outline-style: var(--lace-node-error-border-style);
1076
+ --lace-input-error-outline: var(--lace-node-error-border-width)
1077
+ var(--lace-node-error-border-style) var(--lace-node-error-border);
1078
+ }
1079
+ }