@lace-cloud/design-tokens 0.36.0 → 0.37.1
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 +14 -0
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/tokens.css +216 -5
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,
|
package/dist/index.cjs.map
CHANGED
|
@@ -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;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,EAC3B,+BAA+B;AAAA,EAC/B,yBAAyB;AAAA,EACzB,gCAAgC;AAAA,EAChC,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,6BA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K,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;AA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;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,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,
|
package/dist/index.mjs.map
CHANGED
|
@@ -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;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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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;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AoC;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;;;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,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/package.json
CHANGED
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
|
/* ══════════════════════════════════════════════════════════════════════
|
|
@@ -236,7 +244,8 @@
|
|
|
236
244
|
* with one edit.
|
|
237
245
|
* ══════════════════════════════════════════════════════════════════════ */
|
|
238
246
|
|
|
239
|
-
:root
|
|
247
|
+
:root,
|
|
248
|
+
[data-lace-dark-tokens] {
|
|
240
249
|
/* ── Surface (background layers) ── */
|
|
241
250
|
--lace-color-bg-canvas: var(--lace-color-neutral-900);
|
|
242
251
|
--lace-color-bg-surface: var(--lace-color-neutral-850);
|
|
@@ -359,7 +368,8 @@
|
|
|
359
368
|
* component-specific colors.
|
|
360
369
|
* ══════════════════════════════════════════════════════════════════════ */
|
|
361
370
|
|
|
362
|
-
:root
|
|
371
|
+
:root,
|
|
372
|
+
[data-lace-dark-tokens] {
|
|
363
373
|
/* ── Brand aliases (prefer semantic tokens) ── */
|
|
364
374
|
--lace-green: var(--lace-color-green-500);
|
|
365
375
|
--lace-green-bright: var(--lace-color-green-300);
|
|
@@ -430,6 +440,11 @@
|
|
|
430
440
|
--lace-input-border-hover: var(--lace-color-border-input-hover);
|
|
431
441
|
--lace-input-border-focus: var(--lace-color-focus-ring);
|
|
432
442
|
--lace-input-border-error: var(--lace-color-danger);
|
|
443
|
+
/* The error input's non-colour cue at high contrast; it moves no border. */
|
|
444
|
+
--lace-input-error-outline: none;
|
|
445
|
+
--lace-input-error-focus-outline-width: 2px;
|
|
446
|
+
--lace-input-error-focus-outline-style: solid;
|
|
447
|
+
--lace-card-border: rgba(255, 255, 255, 0.08);
|
|
433
448
|
--lace-input-text: var(--lace-color-text-primary);
|
|
434
449
|
--lace-input-placeholder: var(--lace-color-text-muted);
|
|
435
450
|
|
|
@@ -502,7 +517,18 @@
|
|
|
502
517
|
--lace-node-error-border: var(--lace-color-red-500);
|
|
503
518
|
--lace-node-error-shadow-color: var(--lace-color-red-alpha-30);
|
|
504
519
|
--lace-node-new-border: #3b82f6;
|
|
520
|
+
--lace-node-rename-border: var(--lace-color-accent-alpha-medium);
|
|
505
521
|
--lace-node-new-shadow-color: var(--lace-color-blue-alpha-30);
|
|
522
|
+
/* The shapes that tell the states with no colour of their own apart at high contrast. */
|
|
523
|
+
--lace-node-selected-ring-width: 1.5px;
|
|
524
|
+
--lace-node-focus-ring-style: solid;
|
|
525
|
+
--lace-node-focus-ring-offset: 2px;
|
|
526
|
+
--lace-node-selected-focus-ring-width: 2px;
|
|
527
|
+
--lace-node-selected-focus-ring-style: solid;
|
|
528
|
+
--lace-node-error-border-width: 1px;
|
|
529
|
+
--lace-node-error-border-style: solid;
|
|
530
|
+
--lace-node-new-border-width: 1px;
|
|
531
|
+
--lace-node-new-border-style: solid;
|
|
506
532
|
|
|
507
533
|
/* ── Canvas pin colors (Blender-style type handles) ── */
|
|
508
534
|
--lace-pin-string-fill: var(--lace-color-cyan-500);
|
|
@@ -528,6 +554,16 @@
|
|
|
528
554
|
--lace-pin-map-ring: var(--lace-pin-map-fill);
|
|
529
555
|
--lace-pin-object-ring: var(--lace-pin-object-fill);
|
|
530
556
|
--lace-pin-any-ring: var(--lace-pin-any-fill);
|
|
557
|
+
/* A pin the engine has a finding on is also outlined, by tone, where a colour alone
|
|
558
|
+
* would not tell it. */
|
|
559
|
+
--lace-pin-problem-outline-width: 0px;
|
|
560
|
+
--lace-pin-error-outline-style: none;
|
|
561
|
+
--lace-pin-warn-outline-style: none;
|
|
562
|
+
/* A hovered control is outlined as well as filled, where a fill alone would not show it. */
|
|
563
|
+
--lace-hover-outline: none;
|
|
564
|
+
/* The card a dragged connection would connect to is outlined; at high contrast in the
|
|
565
|
+
* active channel and a dashed shape, so the cue is not colour alone. */
|
|
566
|
+
--lace-node-drop-outline: 2px solid var(--lace-color-accent);
|
|
531
567
|
|
|
532
568
|
/* ── Canvas controls + minimap ── */
|
|
533
569
|
--lace-canvas-controls-bg: var(--lace-gunmetal);
|
|
@@ -544,6 +580,8 @@
|
|
|
544
580
|
--lace-canvas-edge-stroke-selected: var(--lace-color-accent-strong);
|
|
545
581
|
--lace-canvas-edge-stroke-width: 1.5px;
|
|
546
582
|
--lace-canvas-edge-stroke-width-selected: 2.5px;
|
|
583
|
+
--lace-canvas-edge-stroke-width-hover: 2px;
|
|
584
|
+
--lace-canvas-connection-stroke: #b1b1b7;
|
|
547
585
|
--lace-canvas-grid-dot: var(--lace-color-green-alpha-04);
|
|
548
586
|
|
|
549
587
|
/* ── Tooltip ──
|
|
@@ -578,11 +616,13 @@
|
|
|
578
616
|
*
|
|
579
617
|
* Override Tier-2 semantic + Tier-3 component tokens for light surfaces.
|
|
580
618
|
* Tier-1 primitives (raw palette + alpha variants) stay theme-neutral.
|
|
581
|
-
* Apps opt in via `<html data-theme="light"
|
|
582
|
-
*
|
|
619
|
+
* Apps opt in via `<html data-theme="light">`, or `high-contrast-light`, which
|
|
620
|
+
* takes these and the high-contrast remap below. A nested surface may apply
|
|
621
|
+
* `[data-lace-dark-tokens]` to restore the dark semantic and component tokens.
|
|
583
622
|
* ══════════════════════════════════════════════════════════════════════ */
|
|
584
623
|
|
|
585
|
-
[data-theme="light"]
|
|
624
|
+
[data-theme="light"],
|
|
625
|
+
[data-theme="high-contrast-light"] {
|
|
586
626
|
/* ── Tier-2: Surface ── */
|
|
587
627
|
--lace-color-bg-canvas: #ffffff;
|
|
588
628
|
--lace-color-bg-surface: #f8fafc;
|
|
@@ -770,6 +810,98 @@
|
|
|
770
810
|
--lace-policy-predicate-eval-bg: rgba(0, 0, 0, 0.04);
|
|
771
811
|
}
|
|
772
812
|
|
|
813
|
+
/* ══════════════════════════════════════════════════════════════════════
|
|
814
|
+
* HIGH CONTRAST — VS Code's contrast, active and focus borders and editor background, else
|
|
815
|
+
* its stock values; the active and focus borders share a colour, so shape tells states apart.
|
|
816
|
+
* ══════════════════════════════════════════════════════════════════════ */
|
|
817
|
+
|
|
818
|
+
[data-theme="high-contrast"] {
|
|
819
|
+
--lace-hc-edge: var(--vscode-contrastBorder, var(--lace-color-hc-edge-dark));
|
|
820
|
+
--lace-hc-active: var(--vscode-contrastActiveBorder, var(--lace-color-hc-focus-dark));
|
|
821
|
+
--lace-hc-focus: var(--vscode-focusBorder, var(--lace-color-hc-focus-dark));
|
|
822
|
+
--lace-hc-surface: var(--vscode-editor-background, var(--lace-color-hc-surface-dark));
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
[data-theme="high-contrast-light"] {
|
|
826
|
+
--lace-hc-edge: var(--vscode-contrastBorder, var(--lace-color-hc-edge-light));
|
|
827
|
+
--lace-hc-active: var(--vscode-contrastActiveBorder, var(--lace-color-hc-focus-light));
|
|
828
|
+
--lace-hc-focus: var(--vscode-focusBorder, var(--lace-color-hc-focus-light));
|
|
829
|
+
--lace-hc-surface: var(--vscode-editor-background, var(--lace-color-hc-surface-light));
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
[data-theme="high-contrast"],
|
|
833
|
+
[data-theme="high-contrast-light"],
|
|
834
|
+
[data-theme="high-contrast"] [data-lace-dark-tokens],
|
|
835
|
+
[data-theme="high-contrast-light"] [data-lace-dark-tokens] {
|
|
836
|
+
--lace-color-border-default: var(--lace-hc-edge);
|
|
837
|
+
--lace-color-border-subtle: var(--lace-hc-edge);
|
|
838
|
+
--lace-color-border-input: var(--lace-hc-edge);
|
|
839
|
+
--lace-color-border-input-hover: var(--lace-hc-edge);
|
|
840
|
+
--lace-color-focus-ring: var(--lace-hc-focus);
|
|
841
|
+
--lace-group-border: var(--lace-hc-edge);
|
|
842
|
+
--lace-forbidden-border: var(--lace-hc-edge);
|
|
843
|
+
--lace-card-border: var(--lace-hc-edge);
|
|
844
|
+
--lace-badge-gy-border: var(--lace-hc-edge);
|
|
845
|
+
--lace-badge-info-border: var(--lace-hc-edge);
|
|
846
|
+
--lace-badge-purple-border: var(--lace-hc-edge);
|
|
847
|
+
--lace-badge-success-border: var(--lace-hc-edge);
|
|
848
|
+
--lace-badge-warning-border: var(--lace-hc-edge);
|
|
849
|
+
--lace-banner-error-border: var(--lace-hc-edge);
|
|
850
|
+
--lace-banner-warning-border: var(--lace-hc-edge);
|
|
851
|
+
--lace-mode-toggle-active-border: var(--lace-hc-edge);
|
|
852
|
+
--lace-toast-error-border: var(--lace-hc-edge);
|
|
853
|
+
--lace-toast-success-border: var(--lace-hc-edge);
|
|
854
|
+
--lace-node-rename-border: var(--lace-hc-edge);
|
|
855
|
+
--lace-green: var(--lace-hc-active);
|
|
856
|
+
--lace-canvas-controls-border: var(--lace-hc-edge);
|
|
857
|
+
--lace-canvas-minimap-border: var(--lace-hc-edge);
|
|
858
|
+
--lace-canvas-edge-stroke: var(--lace-hc-edge);
|
|
859
|
+
--lace-canvas-edge-stroke-hover: var(--lace-hc-active);
|
|
860
|
+
--lace-canvas-edge-stroke-selected: var(--lace-hc-active);
|
|
861
|
+
--lace-canvas-connection-stroke: var(--lace-hc-active);
|
|
862
|
+
--lace-node-selected-ring: var(--lace-hc-active);
|
|
863
|
+
--lace-node-error-border: var(--lace-hc-edge);
|
|
864
|
+
--lace-node-new-border: var(--lace-hc-edge);
|
|
865
|
+
--lace-node-bg: var(--lace-hc-surface);
|
|
866
|
+
--lace-node-header-bg: var(--lace-hc-surface);
|
|
867
|
+
--lace-paper-thread-fine: transparent;
|
|
868
|
+
--lace-paper-thread-major: transparent;
|
|
869
|
+
--lace-pin-string-ring: var(--lace-hc-edge);
|
|
870
|
+
--lace-pin-string-stroke: var(--lace-hc-edge);
|
|
871
|
+
--lace-pin-number-ring: var(--lace-hc-edge);
|
|
872
|
+
--lace-pin-number-stroke: var(--lace-hc-edge);
|
|
873
|
+
--lace-pin-bool-ring: var(--lace-hc-edge);
|
|
874
|
+
--lace-pin-bool-stroke: var(--lace-hc-edge);
|
|
875
|
+
--lace-pin-list-ring: var(--lace-hc-edge);
|
|
876
|
+
--lace-pin-list-stroke: var(--lace-hc-edge);
|
|
877
|
+
--lace-pin-map-ring: var(--lace-hc-edge);
|
|
878
|
+
--lace-pin-map-stroke: var(--lace-hc-edge);
|
|
879
|
+
--lace-pin-object-ring: var(--lace-hc-edge);
|
|
880
|
+
--lace-pin-object-stroke: var(--lace-hc-edge);
|
|
881
|
+
--lace-pin-any-ring: var(--lace-hc-edge);
|
|
882
|
+
--lace-pin-any-stroke: var(--lace-hc-edge);
|
|
883
|
+
--lace-node-selected-ring-width: 3px;
|
|
884
|
+
--lace-node-focus-ring-style: dashed;
|
|
885
|
+
--lace-node-focus-ring-offset: 5px;
|
|
886
|
+
--lace-node-selected-focus-ring-width: 6px;
|
|
887
|
+
--lace-node-selected-focus-ring-style: double;
|
|
888
|
+
--lace-node-error-border-width: 3px;
|
|
889
|
+
--lace-node-error-border-style: double;
|
|
890
|
+
--lace-node-new-border-width: 3px;
|
|
891
|
+
--lace-node-new-border-style: dotted;
|
|
892
|
+
--lace-canvas-edge-stroke-width-selected: 4px;
|
|
893
|
+
--lace-canvas-edge-stroke-width-hover: 3px;
|
|
894
|
+
--lace-pin-problem-outline-width: 3px;
|
|
895
|
+
--lace-pin-error-outline-style: double;
|
|
896
|
+
--lace-pin-warn-outline-style: dotted;
|
|
897
|
+
--lace-hover-outline: 2px dotted var(--lace-hc-active);
|
|
898
|
+
--lace-node-drop-outline: 4px dashed var(--lace-hc-active);
|
|
899
|
+
--lace-input-error-focus-outline-width: var(--lace-node-error-border-width);
|
|
900
|
+
--lace-input-error-focus-outline-style: var(--lace-node-error-border-style);
|
|
901
|
+
--lace-input-error-outline: var(--lace-node-error-border-width)
|
|
902
|
+
var(--lace-node-error-border-style) var(--lace-node-error-border);
|
|
903
|
+
}
|
|
904
|
+
|
|
773
905
|
/* ══════════════════════════════════════════════════════════════════════
|
|
774
906
|
* GLOBAL DEFAULTS
|
|
775
907
|
*
|
|
@@ -871,3 +1003,82 @@ body {
|
|
|
871
1003
|
background-image: none;
|
|
872
1004
|
}
|
|
873
1005
|
}
|
|
1006
|
+
|
|
1007
|
+
/* Windows forced colours: the high-contrast remap above, on system colours, for every theme.
|
|
1008
|
+
* It is the last rule so it outranks each theme block at equal specificity. */
|
|
1009
|
+
@media (forced-colors: active) {
|
|
1010
|
+
:root,
|
|
1011
|
+
[data-lace-dark-tokens] {
|
|
1012
|
+
--lace-hc-edge: CanvasText;
|
|
1013
|
+
--lace-hc-active: Highlight;
|
|
1014
|
+
--lace-hc-focus: Highlight;
|
|
1015
|
+
--lace-hc-surface: Canvas;
|
|
1016
|
+
--lace-color-border-default: var(--lace-hc-edge);
|
|
1017
|
+
--lace-color-border-subtle: var(--lace-hc-edge);
|
|
1018
|
+
--lace-color-border-input: var(--lace-hc-edge);
|
|
1019
|
+
--lace-color-border-input-hover: var(--lace-hc-edge);
|
|
1020
|
+
--lace-color-focus-ring: var(--lace-hc-focus);
|
|
1021
|
+
--lace-group-border: var(--lace-hc-edge);
|
|
1022
|
+
--lace-forbidden-border: var(--lace-hc-edge);
|
|
1023
|
+
--lace-card-border: var(--lace-hc-edge);
|
|
1024
|
+
--lace-badge-gy-border: var(--lace-hc-edge);
|
|
1025
|
+
--lace-badge-info-border: var(--lace-hc-edge);
|
|
1026
|
+
--lace-badge-purple-border: var(--lace-hc-edge);
|
|
1027
|
+
--lace-badge-success-border: var(--lace-hc-edge);
|
|
1028
|
+
--lace-badge-warning-border: var(--lace-hc-edge);
|
|
1029
|
+
--lace-banner-error-border: var(--lace-hc-edge);
|
|
1030
|
+
--lace-banner-warning-border: var(--lace-hc-edge);
|
|
1031
|
+
--lace-mode-toggle-active-border: var(--lace-hc-edge);
|
|
1032
|
+
--lace-toast-error-border: var(--lace-hc-edge);
|
|
1033
|
+
--lace-toast-success-border: var(--lace-hc-edge);
|
|
1034
|
+
--lace-node-rename-border: var(--lace-hc-edge);
|
|
1035
|
+
--lace-green: var(--lace-hc-active);
|
|
1036
|
+
--lace-canvas-controls-border: var(--lace-hc-edge);
|
|
1037
|
+
--lace-canvas-minimap-border: var(--lace-hc-edge);
|
|
1038
|
+
--lace-canvas-edge-stroke: var(--lace-hc-edge);
|
|
1039
|
+
--lace-canvas-edge-stroke-hover: var(--lace-hc-active);
|
|
1040
|
+
--lace-canvas-edge-stroke-selected: var(--lace-hc-active);
|
|
1041
|
+
--lace-canvas-connection-stroke: var(--lace-hc-active);
|
|
1042
|
+
--lace-node-selected-ring: var(--lace-hc-active);
|
|
1043
|
+
--lace-node-error-border: var(--lace-hc-edge);
|
|
1044
|
+
--lace-node-new-border: var(--lace-hc-edge);
|
|
1045
|
+
--lace-node-bg: var(--lace-hc-surface);
|
|
1046
|
+
--lace-node-header-bg: var(--lace-hc-surface);
|
|
1047
|
+
--lace-paper-thread-fine: transparent;
|
|
1048
|
+
--lace-paper-thread-major: transparent;
|
|
1049
|
+
--lace-pin-string-ring: var(--lace-hc-edge);
|
|
1050
|
+
--lace-pin-string-stroke: var(--lace-hc-edge);
|
|
1051
|
+
--lace-pin-number-ring: var(--lace-hc-edge);
|
|
1052
|
+
--lace-pin-number-stroke: var(--lace-hc-edge);
|
|
1053
|
+
--lace-pin-bool-ring: var(--lace-hc-edge);
|
|
1054
|
+
--lace-pin-bool-stroke: var(--lace-hc-edge);
|
|
1055
|
+
--lace-pin-list-ring: var(--lace-hc-edge);
|
|
1056
|
+
--lace-pin-list-stroke: var(--lace-hc-edge);
|
|
1057
|
+
--lace-pin-map-ring: var(--lace-hc-edge);
|
|
1058
|
+
--lace-pin-map-stroke: var(--lace-hc-edge);
|
|
1059
|
+
--lace-pin-object-ring: var(--lace-hc-edge);
|
|
1060
|
+
--lace-pin-object-stroke: var(--lace-hc-edge);
|
|
1061
|
+
--lace-pin-any-ring: var(--lace-hc-edge);
|
|
1062
|
+
--lace-pin-any-stroke: var(--lace-hc-edge);
|
|
1063
|
+
--lace-node-selected-ring-width: 3px;
|
|
1064
|
+
--lace-node-focus-ring-style: dashed;
|
|
1065
|
+
--lace-node-focus-ring-offset: 5px;
|
|
1066
|
+
--lace-node-selected-focus-ring-width: 6px;
|
|
1067
|
+
--lace-node-selected-focus-ring-style: double;
|
|
1068
|
+
--lace-node-error-border-width: 3px;
|
|
1069
|
+
--lace-node-error-border-style: double;
|
|
1070
|
+
--lace-node-new-border-width: 3px;
|
|
1071
|
+
--lace-node-new-border-style: dotted;
|
|
1072
|
+
--lace-canvas-edge-stroke-width-selected: 4px;
|
|
1073
|
+
--lace-canvas-edge-stroke-width-hover: 3px;
|
|
1074
|
+
--lace-pin-problem-outline-width: 3px;
|
|
1075
|
+
--lace-pin-error-outline-style: double;
|
|
1076
|
+
--lace-pin-warn-outline-style: dotted;
|
|
1077
|
+
--lace-hover-outline: 2px dotted var(--lace-hc-active);
|
|
1078
|
+
--lace-node-drop-outline: 4px dashed var(--lace-hc-active);
|
|
1079
|
+
--lace-input-error-focus-outline-width: var(--lace-node-error-border-width);
|
|
1080
|
+
--lace-input-error-focus-outline-style: var(--lace-node-error-border-style);
|
|
1081
|
+
--lace-input-error-outline: var(--lace-node-error-border-width)
|
|
1082
|
+
var(--lace-node-error-border-style) var(--lace-node-error-border);
|
|
1083
|
+
}
|
|
1084
|
+
}
|