@lace-cloud/design-tokens 0.31.2 → 0.32.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 +7 -5
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -13
- package/tokens.css +18 -0
package/README.md
CHANGED
|
@@ -45,8 +45,9 @@ stylesheet — reads the themes' semantic colours from `darkTheme` and
|
|
|
45
45
|
`lightTheme`, keyed by the same custom property names, and declares them in
|
|
46
46
|
rules of its own: `darkTheme` at `:root`, `lightTheme` (the light block's
|
|
47
47
|
overrides) under `[data-theme="light"]`. `tokens.css` is their one owner: the
|
|
48
|
-
package build resolves its semantic tier's aliases and
|
|
49
|
-
`
|
|
48
|
+
package build resolves its semantic tier's aliases and compiles the two themes
|
|
49
|
+
into the package's entry (`dist/`), so a colour changes in the stylesheet and
|
|
50
|
+
nowhere else.
|
|
50
51
|
|
|
51
52
|
```ts
|
|
52
53
|
import { darkTheme, lightTheme, themeDeclarations } from '@lace-cloud/design-tokens';
|
|
@@ -64,9 +65,10 @@ const css = `:root{${themeDeclarations(darkTheme)}}[data-theme="light"]{${themeD
|
|
|
64
65
|
semantic (purpose-named, e.g. `--lace-bg-surface`), component
|
|
65
66
|
(component-scoped overrides where needed).
|
|
66
67
|
- **CSS custom property naming:** `--lace-{category}-{role}-{variant?}`.
|
|
67
|
-
- **A semantic colour changes in `tokens.css`,**
|
|
68
|
-
`pnpm --filter @lace-cloud/design-tokens build`
|
|
69
|
-
`src/themes.gen.ts
|
|
68
|
+
- **A semantic colour changes in `tokens.css`,** and
|
|
69
|
+
`pnpm --filter @lace-cloud/design-tokens build` carries it into
|
|
70
|
+
`darkTheme` and `lightTheme`: the build writes `src/themes.gen.ts` (a build
|
|
71
|
+
output, never committed) and compiles it with the rest of the entry.
|
|
70
72
|
|
|
71
73
|
## License
|
|
72
74
|
|
package/dist/index.cjs
CHANGED
|
@@ -47,6 +47,10 @@ var darkTheme = {
|
|
|
47
47
|
"--lace-color-text-link": "#60a5fa",
|
|
48
48
|
"--lace-color-text-danger": "#e5484d",
|
|
49
49
|
"--lace-color-text-danger-soft": "#f87171",
|
|
50
|
+
"--lace-color-text-faint": "#8c8f8c",
|
|
51
|
+
"--lace-color-row-hover": "rgba(255, 255, 255, 0.025)",
|
|
52
|
+
"--lace-color-badge-purple": "#c084fc",
|
|
53
|
+
"--lace-color-badge-purple-bg": "rgba(192, 132, 252, 0.1)",
|
|
50
54
|
"--lace-color-accent": "#cefe65",
|
|
51
55
|
"--lace-color-text-on-accent": "#111111",
|
|
52
56
|
"--lace-color-accent-alpha-subtle": "rgba(206, 254, 101, 0.1)",
|
|
@@ -80,6 +84,10 @@ var lightTheme = {
|
|
|
80
84
|
"--lace-color-text-link": "#2563eb",
|
|
81
85
|
"--lace-color-text-danger": "#dc2626",
|
|
82
86
|
"--lace-color-text-danger-soft": "#ef4444",
|
|
87
|
+
"--lace-color-text-faint": "#94a3b8",
|
|
88
|
+
"--lace-color-row-hover": "rgba(0, 0, 0, 0.02)",
|
|
89
|
+
"--lace-color-badge-purple": "#7c3aed",
|
|
90
|
+
"--lace-color-badge-purple-bg": "#faf5ff",
|
|
83
91
|
"--lace-color-accent": "#3d6600",
|
|
84
92
|
"--lace-color-accent-alpha-subtle": "rgba(132, 204, 22, 0.08)",
|
|
85
93
|
"--lace-color-accent-alpha-medium": "rgba(132, 204, 22, 0.16)",
|
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
|
|
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":";;;;;;;;;;;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A2B;AAAA,EAC3B,0BAA0B;AAAA,EAC1B,6BAA6B;AAAA,EAC7B,gCAAgC;AAAA,EAChC,uBAAuB;AAAA,EACvB,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;;;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":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -22,6 +22,10 @@ declare const darkTheme: {
|
|
|
22
22
|
readonly '--lace-color-text-link': "#60a5fa";
|
|
23
23
|
readonly '--lace-color-text-danger': "#e5484d";
|
|
24
24
|
readonly '--lace-color-text-danger-soft': "#f87171";
|
|
25
|
+
readonly '--lace-color-text-faint': "#8c8f8c";
|
|
26
|
+
readonly '--lace-color-row-hover': "rgba(255, 255, 255, 0.025)";
|
|
27
|
+
readonly '--lace-color-badge-purple': "#c084fc";
|
|
28
|
+
readonly '--lace-color-badge-purple-bg': "rgba(192, 132, 252, 0.1)";
|
|
25
29
|
readonly '--lace-color-accent': "#cefe65";
|
|
26
30
|
readonly '--lace-color-text-on-accent': "#111111";
|
|
27
31
|
readonly '--lace-color-accent-alpha-subtle': "rgba(206, 254, 101, 0.1)";
|
|
@@ -60,6 +64,10 @@ declare const lightTheme: {
|
|
|
60
64
|
readonly '--lace-color-text-link': "#2563eb";
|
|
61
65
|
readonly '--lace-color-text-danger': "#dc2626";
|
|
62
66
|
readonly '--lace-color-text-danger-soft': "#ef4444";
|
|
67
|
+
readonly '--lace-color-text-faint': "#94a3b8";
|
|
68
|
+
readonly '--lace-color-row-hover': "rgba(0, 0, 0, 0.02)";
|
|
69
|
+
readonly '--lace-color-badge-purple': "#7c3aed";
|
|
70
|
+
readonly '--lace-color-badge-purple-bg': "#faf5ff";
|
|
63
71
|
readonly '--lace-color-accent': "#3d6600";
|
|
64
72
|
readonly '--lace-color-accent-alpha-subtle': "rgba(132, 204, 22, 0.08)";
|
|
65
73
|
readonly '--lace-color-accent-alpha-medium': "rgba(132, 204, 22, 0.16)";
|
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ declare const darkTheme: {
|
|
|
22
22
|
readonly '--lace-color-text-link': "#60a5fa";
|
|
23
23
|
readonly '--lace-color-text-danger': "#e5484d";
|
|
24
24
|
readonly '--lace-color-text-danger-soft': "#f87171";
|
|
25
|
+
readonly '--lace-color-text-faint': "#8c8f8c";
|
|
26
|
+
readonly '--lace-color-row-hover': "rgba(255, 255, 255, 0.025)";
|
|
27
|
+
readonly '--lace-color-badge-purple': "#c084fc";
|
|
28
|
+
readonly '--lace-color-badge-purple-bg': "rgba(192, 132, 252, 0.1)";
|
|
25
29
|
readonly '--lace-color-accent': "#cefe65";
|
|
26
30
|
readonly '--lace-color-text-on-accent': "#111111";
|
|
27
31
|
readonly '--lace-color-accent-alpha-subtle': "rgba(206, 254, 101, 0.1)";
|
|
@@ -60,6 +64,10 @@ declare const lightTheme: {
|
|
|
60
64
|
readonly '--lace-color-text-link': "#2563eb";
|
|
61
65
|
readonly '--lace-color-text-danger': "#dc2626";
|
|
62
66
|
readonly '--lace-color-text-danger-soft': "#ef4444";
|
|
67
|
+
readonly '--lace-color-text-faint': "#94a3b8";
|
|
68
|
+
readonly '--lace-color-row-hover': "rgba(0, 0, 0, 0.02)";
|
|
69
|
+
readonly '--lace-color-badge-purple': "#7c3aed";
|
|
70
|
+
readonly '--lace-color-badge-purple-bg': "#faf5ff";
|
|
63
71
|
readonly '--lace-color-accent': "#3d6600";
|
|
64
72
|
readonly '--lace-color-accent-alpha-subtle': "rgba(132, 204, 22, 0.08)";
|
|
65
73
|
readonly '--lace-color-accent-alpha-medium': "rgba(132, 204, 22, 0.16)";
|
package/dist/index.mjs
CHANGED
|
@@ -17,6 +17,10 @@ var darkTheme = {
|
|
|
17
17
|
"--lace-color-text-link": "#60a5fa",
|
|
18
18
|
"--lace-color-text-danger": "#e5484d",
|
|
19
19
|
"--lace-color-text-danger-soft": "#f87171",
|
|
20
|
+
"--lace-color-text-faint": "#8c8f8c",
|
|
21
|
+
"--lace-color-row-hover": "rgba(255, 255, 255, 0.025)",
|
|
22
|
+
"--lace-color-badge-purple": "#c084fc",
|
|
23
|
+
"--lace-color-badge-purple-bg": "rgba(192, 132, 252, 0.1)",
|
|
20
24
|
"--lace-color-accent": "#cefe65",
|
|
21
25
|
"--lace-color-text-on-accent": "#111111",
|
|
22
26
|
"--lace-color-accent-alpha-subtle": "rgba(206, 254, 101, 0.1)",
|
|
@@ -50,6 +54,10 @@ var lightTheme = {
|
|
|
50
54
|
"--lace-color-text-link": "#2563eb",
|
|
51
55
|
"--lace-color-text-danger": "#dc2626",
|
|
52
56
|
"--lace-color-text-danger-soft": "#ef4444",
|
|
57
|
+
"--lace-color-text-faint": "#94a3b8",
|
|
58
|
+
"--lace-color-row-hover": "rgba(0, 0, 0, 0.02)",
|
|
59
|
+
"--lace-color-badge-purple": "#7c3aed",
|
|
60
|
+
"--lace-color-badge-purple-bg": "#faf5ff",
|
|
53
61
|
"--lace-color-accent": "#3d6600",
|
|
54
62
|
"--lace-color-accent-alpha-subtle": "rgba(132, 204, 22, 0.08)",
|
|
55
63
|
"--lace-color-accent-alpha-medium": "rgba(132, 204, 22, 0.16)",
|
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-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-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
|
|
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+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,6BAA6B;AAAA,EAC7B,mCAAmC;AAAA,EACnC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,2BAA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|
"name": "@lace-cloud/design-tokens",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.1",
|
|
4
|
+
"lace": {
|
|
5
|
+
"owner": "library"
|
|
6
|
+
},
|
|
4
7
|
"license": "BUSL-1.1",
|
|
5
8
|
"type": "module",
|
|
6
9
|
"main": "./dist/index.cjs",
|
|
10
|
+
"module": "./dist/index.mjs",
|
|
7
11
|
"types": "./dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.mjs",
|
|
16
|
+
"require": "./dist/index.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./tokens.css": "./tokens.css",
|
|
19
|
+
"./package.json": "./package.json"
|
|
20
|
+
},
|
|
8
21
|
"devDependencies": {
|
|
9
|
-
"tsup": "^
|
|
10
|
-
"typescript": "^
|
|
22
|
+
"tsup": "^9.0.0",
|
|
23
|
+
"typescript": "^6.0.2",
|
|
24
|
+
"vitest": "^4.1.0"
|
|
11
25
|
},
|
|
12
26
|
"publishConfig": {
|
|
13
27
|
"registry": "https://registry.npmjs.org",
|
|
@@ -27,15 +41,5 @@
|
|
|
27
41
|
"build": "node scripts/gen-themes.mjs && tsup",
|
|
28
42
|
"clean": "rm -rf dist",
|
|
29
43
|
"test": "vitest run"
|
|
30
|
-
},
|
|
31
|
-
"module": "./dist/index.mjs",
|
|
32
|
-
"exports": {
|
|
33
|
-
".": {
|
|
34
|
-
"types": "./dist/index.d.ts",
|
|
35
|
-
"import": "./dist/index.mjs",
|
|
36
|
-
"require": "./dist/index.cjs"
|
|
37
|
-
},
|
|
38
|
-
"./tokens.css": "./tokens.css",
|
|
39
|
-
"./package.json": "./package.json"
|
|
40
44
|
}
|
|
41
45
|
}
|
package/tokens.css
CHANGED
|
@@ -259,6 +259,16 @@
|
|
|
259
259
|
--lace-color-text-link: var(--lace-color-blue-bright-500);
|
|
260
260
|
--lace-color-text-danger: var(--lace-color-red-500);
|
|
261
261
|
--lace-color-text-danger-soft: var(--lace-color-red-400);
|
|
262
|
+
/* A stop below muted, for tertiary labels and placeholders: muted itself
|
|
263
|
+
* would over-emphasise them, most visibly in the light theme. */
|
|
264
|
+
--lace-color-text-faint: #8c8f8c;
|
|
265
|
+
|
|
266
|
+
/* ── Row ── */
|
|
267
|
+
--lace-color-row-hover: rgba(255, 255, 255, 0.025);
|
|
268
|
+
|
|
269
|
+
/* ── Badge: purple ── */
|
|
270
|
+
--lace-color-badge-purple: #c084fc;
|
|
271
|
+
--lace-color-badge-purple-bg: rgba(192, 132, 252, 0.1);
|
|
262
272
|
|
|
263
273
|
/* ── Accent ── */
|
|
264
274
|
--lace-color-accent: var(--lace-color-green-500);
|
|
@@ -586,6 +596,14 @@
|
|
|
586
596
|
--lace-color-text-link: var(--lace-color-blue-deep-700);
|
|
587
597
|
--lace-color-text-danger: #dc2626;
|
|
588
598
|
--lace-color-text-danger-soft: #ef4444;
|
|
599
|
+
--lace-color-text-faint: #94a3b8;
|
|
600
|
+
|
|
601
|
+
/* ── Tier-2: Row ── */
|
|
602
|
+
--lace-color-row-hover: rgba(0, 0, 0, 0.02);
|
|
603
|
+
|
|
604
|
+
/* ── Tier-2: Badge: purple ── */
|
|
605
|
+
--lace-color-badge-purple: #7c3aed;
|
|
606
|
+
--lace-color-badge-purple-bg: #faf5ff;
|
|
589
607
|
|
|
590
608
|
/* ── Tier-2: Accent ──
|
|
591
609
|
* Two-color brand system in light: --lace-color-green-500 (Tier-1,
|