@ganjingworld/theme 0.0.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.
@@ -0,0 +1,249 @@
1
+ import StyleDictionary from "style-dictionary";
2
+ import { readFileSync } from "node:fs";
3
+ import { resolve, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ const __dirname = dirname(fileURLToPath(import.meta.url));
7
+ const tokensDir = resolve(__dirname, "src/tokens");
8
+
9
+ // ─── Helpers ──────────────────────────────────────────────
10
+
11
+ /**
12
+ * Convert a hex colour to HSL channel string: "H S% L%"
13
+ * This matches the shadcn convention used in globals.css
14
+ */
15
+ function hexToHSL(hex) {
16
+ hex = hex.replace("#", "");
17
+ const r = Number.parseInt(hex.substring(0, 2), 16) / 255;
18
+ const g = Number.parseInt(hex.substring(2, 4), 16) / 255;
19
+ const b = Number.parseInt(hex.substring(4, 6), 16) / 255;
20
+
21
+ const max = Math.max(r, g, b);
22
+ const min = Math.min(r, g, b);
23
+ const l = (max + min) / 2;
24
+ let h = 0;
25
+ let s = 0;
26
+
27
+ if (max !== min) {
28
+ const d = max - min;
29
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
30
+ switch (max) {
31
+ case r:
32
+ h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
33
+ break;
34
+ case g:
35
+ h = ((b - r) / d + 2) / 6;
36
+ break;
37
+ case b:
38
+ h = ((r - g) / d + 4) / 6;
39
+ break;
40
+ }
41
+ }
42
+
43
+ return `${Math.round(h * 360 * 10) / 10} ${Math.round(s * 1000) / 10}% ${Math.round(l * 1000) / 10}%`;
44
+ }
45
+
46
+ // ─── Load token files ─────────────────────────────────────
47
+
48
+ const coreTokens = JSON.parse(readFileSync(resolve(tokensDir, "core.json"), "utf-8"));
49
+ const lightTokens = JSON.parse(readFileSync(resolve(tokensDir, "semantic/light.json"), "utf-8"));
50
+ const darkTokens = JSON.parse(readFileSync(resolve(tokensDir, "semantic/dark.json"), "utf-8"));
51
+
52
+ // ─── Resolve references ───────────────────────────────────
53
+
54
+ /**
55
+ * Walk through core tokens and build a flat lookup of { path: value }
56
+ * e.g. "color.blue.600" → "#2563eb"
57
+ */
58
+ function flattenCore(obj, prefix = "") {
59
+ const result = {};
60
+ for (const [key, val] of Object.entries(obj)) {
61
+ if (key.startsWith("$")) continue;
62
+ const path = prefix ? `${prefix}.${key}` : key;
63
+ if (val && typeof val === "object" && "$value" in val) {
64
+ result[path] = val.$value;
65
+ } else if (val && typeof val === "object") {
66
+ Object.assign(result, flattenCore(val, path));
67
+ }
68
+ }
69
+ return result;
70
+ }
71
+
72
+ const coreLookup = flattenCore(coreTokens);
73
+
74
+ /**
75
+ * Resolve a reference like "{color.blue.600}" against the core lookup
76
+ */
77
+ function resolveRef(value) {
78
+ if (typeof value !== "string") return value;
79
+ const match = value.match(/^\{(.+)\}$/);
80
+ if (match) {
81
+ const resolved = coreLookup[match[1]];
82
+ if (resolved === undefined) {
83
+ console.warn(` Warning: unresolved reference "${value}"`);
84
+ return value;
85
+ }
86
+ return resolved;
87
+ }
88
+ return value;
89
+ }
90
+
91
+ // ─── Build CSS output ─────────────────────────────────────
92
+
93
+ /**
94
+ * Flatten semantic tokens into CSS variable declarations
95
+ */
96
+ function buildCSSVars(tokens, prefix = "") {
97
+ const lines = [];
98
+ for (const [key, val] of Object.entries(tokens)) {
99
+ if (key.startsWith("$")) continue;
100
+ const varName = prefix ? `${prefix}-${key}` : key;
101
+ if (val && typeof val === "object" && "$value" in val) {
102
+ const resolved = resolveRef(val.$value);
103
+ const type = val.$type;
104
+ if (type === "color" && typeof resolved === "string" && resolved.startsWith("#")) {
105
+ lines.push(`\t\t--${varName}: ${hexToHSL(resolved)};`);
106
+ } else {
107
+ lines.push(`\t\t--${varName}: ${resolved};`);
108
+ }
109
+ } else if (val && typeof val === "object") {
110
+ lines.push(...buildCSSVars(val, varName));
111
+ }
112
+ }
113
+ return lines;
114
+ }
115
+
116
+ const lightVars = buildCSSVars(lightTokens);
117
+ const darkVars = buildCSSVars(darkTokens);
118
+
119
+ const css = `/* Auto-generated by build-tokens.js — DO NOT EDIT */
120
+ @tailwind base;
121
+ @tailwind components;
122
+ @tailwind utilities;
123
+
124
+ @layer base {
125
+ \t:root {
126
+ ${lightVars.join("\n")}
127
+ \t}
128
+
129
+ \t.dark {
130
+ ${darkVars.join("\n")}
131
+ \t}
132
+ }
133
+
134
+ @layer base {
135
+ \t* {
136
+ \t\t@apply border-border;
137
+ \t}
138
+ \tbody {
139
+ \t\t@apply bg-background text-foreground;
140
+ \t}
141
+ }
142
+ `;
143
+
144
+ // ─── Build Tailwind preset ────────────────────────────────
145
+
146
+ /**
147
+ * Collect all top-level semantic token names that are colors,
148
+ * grouping nested tokens (e.g. sidebar.background → sidebar: { ... })
149
+ */
150
+ function buildTailwindColors(tokens, prefix = "") {
151
+ const result = {};
152
+ for (const [key, val] of Object.entries(tokens)) {
153
+ if (key.startsWith("$")) continue;
154
+ if (val && typeof val === "object" && "$value" in val) {
155
+ if (val.$type === "color") {
156
+ const varName = prefix ? `${prefix}-${key}` : key;
157
+ result[key] = `hsl(var(--${varName}))`;
158
+ }
159
+ } else if (val && typeof val === "object") {
160
+ // nested group (e.g. sidebar)
161
+ const nested = buildTailwindColors(val, prefix ? `${prefix}-${key}` : key);
162
+ if (Object.keys(nested).length > 0) {
163
+ result[key] = nested;
164
+ }
165
+ }
166
+ }
167
+ return result;
168
+ }
169
+
170
+ const tailwindColors = buildTailwindColors(lightTokens);
171
+
172
+ // For colors that have a "foreground" sibling, structure as { DEFAULT, foreground }
173
+ const structuredColors = {};
174
+ for (const [key, val] of Object.entries(tailwindColors)) {
175
+ if (typeof val === "object" && !("DEFAULT" in val) && !key.endsWith("-foreground")) {
176
+ // Already a nested object (e.g. sidebar)
177
+ structuredColors[key] = val;
178
+ } else if (key.endsWith("-foreground")) {
179
+ // handled by the non-foreground key below
180
+ continue;
181
+ } else if (typeof val === "string") {
182
+ const fgKey = `${key}-foreground`;
183
+ if (tailwindColors[fgKey]) {
184
+ structuredColors[key] = {
185
+ DEFAULT: val,
186
+ foreground: tailwindColors[fgKey],
187
+ };
188
+ } else {
189
+ structuredColors[key] = val;
190
+ }
191
+ }
192
+ }
193
+
194
+ // Read fontFamily from core tokens
195
+ const fontFamilySans = coreTokens.fontFamily?.sans?.$value || ["Inter", "ui-sans-serif", "system-ui", "sans-serif"];
196
+ const fontFamilyMono = coreTokens.fontFamily?.mono?.$value || ["Fira Code", "ui-monospace", "monospace"];
197
+
198
+ /**
199
+ * Serialize a JS object to properly-indented source code.
200
+ * Keys with hyphens get quoted, simple keys don't.
201
+ */
202
+ function serializeObj(obj, indent = "\t\t\t") {
203
+ const lines = ["{"];
204
+ const entries = Object.entries(obj);
205
+ for (const [key, val] of entries) {
206
+ const safeKey = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(key) ? key : `"${key}"`;
207
+ if (typeof val === "string") {
208
+ lines.push(`${indent}\t${safeKey}: "${val}",`);
209
+ } else if (typeof val === "object" && !Array.isArray(val)) {
210
+ lines.push(`${indent}\t${safeKey}: ${serializeObj(val, `${indent}\t`)},`);
211
+ }
212
+ }
213
+ lines.push(`${indent}}`);
214
+ return lines.join("\n");
215
+ }
216
+
217
+ const tailwindPreset = `/** Auto-generated by build-tokens.js — DO NOT EDIT */
218
+ /** @type {import('tailwindcss').Config} */
219
+ export default {
220
+ \tdarkMode: "class",
221
+ \ttheme: {
222
+ \t\textend: {
223
+ \t\t\tcolors: ${serializeObj(structuredColors)},
224
+ \t\t\tborderRadius: {
225
+ \t\t\t\tlg: "var(--radius)",
226
+ \t\t\t\tmd: "calc(var(--radius) - 2px)",
227
+ \t\t\t\tsm: "calc(var(--radius) - 4px)",
228
+ \t\t\t},
229
+ \t\t\tfontFamily: {
230
+ \t\t\t\tsans: ${JSON.stringify(fontFamilySans)},
231
+ \t\t\t\tmono: ${JSON.stringify(fontFamilyMono)},
232
+ \t\t\t},
233
+ \t\t},
234
+ \t},
235
+ \tplugins: [],
236
+ };
237
+ `;
238
+
239
+ // ─── Write output ─────────────────────────────────────────
240
+
241
+ import { writeFileSync } from "node:fs";
242
+
243
+ writeFileSync(resolve(__dirname, "src/globals.css"), css, "utf-8");
244
+ console.log(" ✓ src/globals.css");
245
+
246
+ writeFileSync(resolve(__dirname, "tailwind-preset.js"), tailwindPreset, "utf-8");
247
+ console.log(" ✓ tailwind-preset.js");
248
+
249
+ console.log("\nToken build complete.");
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@ganjingworld/theme",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "exports": {
9
+ "./globals.css": "./src/globals.css",
10
+ "./tailwind-preset": "./tailwind-preset.js",
11
+ "./tokens/*": "./src/tokens/*"
12
+ },
13
+ "files": [
14
+ "src",
15
+ "tailwind-preset.js",
16
+ "build-tokens.js"
17
+ ],
18
+ "scripts": {
19
+ "build": "node build-tokens.js",
20
+ "clean": "rm -rf .turbo"
21
+ },
22
+ "dependencies": {
23
+ "tailwindcss": "^3.4.0"
24
+ },
25
+ "devDependencies": {
26
+ "style-dictionary": "^4.4.0"
27
+ }
28
+ }
@@ -0,0 +1,81 @@
1
+ /* Auto-generated by build-tokens.js — DO NOT EDIT */
2
+ @tailwind base;
3
+ @tailwind components;
4
+ @tailwind utilities;
5
+
6
+ @layer base {
7
+ :root {
8
+ --background: 0 0% 100%;
9
+ --foreground: 220.9 39.3% 11%;
10
+ --card: 0 0% 100%;
11
+ --card-foreground: 220.9 39.3% 11%;
12
+ --primary: 221.2 83.2% 53.3%;
13
+ --primary-foreground: 213.8 100% 96.9%;
14
+ --secondary: 220 14.3% 95.9%;
15
+ --secondary-foreground: 220.9 39.3% 11%;
16
+ --destructive: 0 84.2% 60.2%;
17
+ --destructive-foreground: 0 0% 100%;
18
+ --success: 142.1 76.2% 36.3%;
19
+ --success-foreground: 0 0% 100%;
20
+ --warning: 37.7 92.1% 50.2%;
21
+ --warning-foreground: 0 0% 100%;
22
+ --muted: 220 14.3% 95.9%;
23
+ --muted-foreground: 220 8.9% 46.1%;
24
+ --accent: 220 14.3% 95.9%;
25
+ --accent-foreground: 220.9 39.3% 11%;
26
+ --border: 220 13% 91%;
27
+ --input: 220 13% 91%;
28
+ --ring: 221.2 83.2% 53.3%;
29
+ --radius: 8px;
30
+ --sidebar-background: 210 20% 98%;
31
+ --sidebar-foreground: 216.9 19.1% 26.7%;
32
+ --sidebar-primary: 220.9 39.3% 11%;
33
+ --sidebar-primary-foreground: 210 20% 98%;
34
+ --sidebar-accent: 220 14.3% 95.9%;
35
+ --sidebar-accent-foreground: 220.9 39.3% 11%;
36
+ --sidebar-border: 220 13% 91%;
37
+ --sidebar-ring: 217.2 91.2% 59.8%;
38
+ }
39
+
40
+ .dark {
41
+ --background: 224 71.4% 4.1%;
42
+ --foreground: 210 20% 98%;
43
+ --card: 224 71.4% 4.1%;
44
+ --card-foreground: 210 20% 98%;
45
+ --primary: 217.2 91.2% 59.8%;
46
+ --primary-foreground: 220.9 39.3% 11%;
47
+ --secondary: 215 27.9% 16.9%;
48
+ --secondary-foreground: 210 20% 98%;
49
+ --destructive: 0 73.7% 41.8%;
50
+ --destructive-foreground: 210 20% 98%;
51
+ --success: 142.1 70.6% 45.3%;
52
+ --success-foreground: 220.9 39.3% 11%;
53
+ --warning: 37.7 92.1% 50.2%;
54
+ --warning-foreground: 220.9 39.3% 11%;
55
+ --muted: 215 27.9% 16.9%;
56
+ --muted-foreground: 217.9 10.6% 64.9%;
57
+ --accent: 215 27.9% 16.9%;
58
+ --accent-foreground: 210 20% 98%;
59
+ --border: 215 27.9% 16.9%;
60
+ --input: 215 27.9% 16.9%;
61
+ --ring: 224.3 76.3% 48%;
62
+ --radius: 8px;
63
+ --sidebar-background: 220.9 39.3% 11%;
64
+ --sidebar-foreground: 220 14.3% 95.9%;
65
+ --sidebar-primary: 224.3 76.3% 48%;
66
+ --sidebar-primary-foreground: 0 0% 100%;
67
+ --sidebar-accent: 215 27.9% 16.9%;
68
+ --sidebar-accent-foreground: 220 14.3% 95.9%;
69
+ --sidebar-border: 215 27.9% 16.9%;
70
+ --sidebar-ring: 217.2 91.2% 59.8%;
71
+ }
72
+ }
73
+
74
+ @layer base {
75
+ * {
76
+ @apply border-border;
77
+ }
78
+ body {
79
+ @apply bg-background text-foreground;
80
+ }
81
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "tokenSetOrder": ["core", "semantic/light", "semantic/dark"]
3
+ }
@@ -0,0 +1,18 @@
1
+ [
2
+ {
3
+ "id": "light",
4
+ "name": "Light",
5
+ "selectedTokenSets": {
6
+ "core": "source",
7
+ "semantic/light": "enabled"
8
+ }
9
+ },
10
+ {
11
+ "id": "dark",
12
+ "name": "Dark",
13
+ "selectedTokenSets": {
14
+ "core": "source",
15
+ "semantic/dark": "enabled"
16
+ }
17
+ }
18
+ ]
@@ -0,0 +1,99 @@
1
+ {
2
+ "color": {
3
+ "$type": "color",
4
+ "black": { "$value": "#000000" },
5
+ "white": { "$value": "#ffffff" },
6
+ "gray": {
7
+ "50": { "$value": "#f9fafb" },
8
+ "100": { "$value": "#f3f4f6" },
9
+ "200": { "$value": "#e5e7eb" },
10
+ "300": { "$value": "#d1d5db" },
11
+ "400": { "$value": "#9ca3af" },
12
+ "500": { "$value": "#6b7280" },
13
+ "600": { "$value": "#4b5563" },
14
+ "700": { "$value": "#374151" },
15
+ "800": { "$value": "#1f2937" },
16
+ "900": { "$value": "#111827" },
17
+ "950": { "$value": "#030712" }
18
+ },
19
+ "blue": {
20
+ "50": { "$value": "#eff6ff" },
21
+ "100": { "$value": "#dbeafe" },
22
+ "200": { "$value": "#bfdbfe" },
23
+ "300": { "$value": "#93c5fd" },
24
+ "400": { "$value": "#60a5fa" },
25
+ "500": { "$value": "#3b82f6" },
26
+ "600": { "$value": "#2563eb" },
27
+ "700": { "$value": "#1d4ed8" },
28
+ "800": { "$value": "#1e40af" },
29
+ "900": { "$value": "#1e3a8a" }
30
+ },
31
+ "red": {
32
+ "50": { "$value": "#fef2f2" },
33
+ "500": { "$value": "#ef4444" },
34
+ "600": { "$value": "#dc2626" },
35
+ "700": { "$value": "#b91c1c" }
36
+ },
37
+ "green": {
38
+ "50": { "$value": "#f0fdf4" },
39
+ "500": { "$value": "#22c55e" },
40
+ "600": { "$value": "#16a34a" },
41
+ "700": { "$value": "#15803d" }
42
+ },
43
+ "amber": {
44
+ "50": { "$value": "#fffbeb" },
45
+ "500": { "$value": "#f59e0b" },
46
+ "600": { "$value": "#d97706" }
47
+ }
48
+ },
49
+ "spacing": {
50
+ "$type": "dimension",
51
+ "0": { "$value": "0px" },
52
+ "1": { "$value": "4px" },
53
+ "2": { "$value": "8px" },
54
+ "3": { "$value": "12px" },
55
+ "4": { "$value": "16px" },
56
+ "5": { "$value": "20px" },
57
+ "6": { "$value": "24px" },
58
+ "8": { "$value": "32px" },
59
+ "10": { "$value": "40px" },
60
+ "12": { "$value": "48px" },
61
+ "16": { "$value": "64px" },
62
+ "20": { "$value": "80px" },
63
+ "24": { "$value": "96px" }
64
+ },
65
+ "borderRadius": {
66
+ "$type": "dimension",
67
+ "none": { "$value": "0px" },
68
+ "sm": { "$value": "2px" },
69
+ "md": { "$value": "6px" },
70
+ "lg": { "$value": "8px" },
71
+ "xl": { "$value": "12px" },
72
+ "2xl": { "$value": "16px" },
73
+ "full": { "$value": "9999px" }
74
+ },
75
+ "fontSize": {
76
+ "$type": "dimension",
77
+ "xs": { "$value": "12px" },
78
+ "sm": { "$value": "14px" },
79
+ "base": { "$value": "16px" },
80
+ "lg": { "$value": "18px" },
81
+ "xl": { "$value": "20px" },
82
+ "2xl": { "$value": "24px" },
83
+ "3xl": { "$value": "30px" },
84
+ "4xl": { "$value": "36px" },
85
+ "5xl": { "$value": "48px" }
86
+ },
87
+ "fontWeight": {
88
+ "$type": "fontWeight",
89
+ "normal": { "$value": 400 },
90
+ "medium": { "$value": 500 },
91
+ "semibold": { "$value": 600 },
92
+ "bold": { "$value": 700 }
93
+ },
94
+ "fontFamily": {
95
+ "$type": "fontFamily",
96
+ "sans": { "$value": ["Inter", "ui-sans-serif", "system-ui", "-apple-system", "sans-serif"] },
97
+ "mono": { "$value": ["Fira Code", "ui-monospace", "SFMono-Regular", "monospace"] }
98
+ }
99
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "background": { "$type": "color", "$value": "{color.gray.950}" },
3
+ "foreground": { "$type": "color", "$value": "{color.gray.50}" },
4
+ "card": { "$type": "color", "$value": "{color.gray.950}" },
5
+ "card-foreground": { "$type": "color", "$value": "{color.gray.50}" },
6
+ "primary": { "$type": "color", "$value": "{color.blue.500}" },
7
+ "primary-foreground": { "$type": "color", "$value": "{color.gray.900}" },
8
+ "secondary": { "$type": "color", "$value": "{color.gray.800}" },
9
+ "secondary-foreground": { "$type": "color", "$value": "{color.gray.50}" },
10
+ "destructive": { "$type": "color", "$value": "{color.red.700}" },
11
+ "destructive-foreground": { "$type": "color", "$value": "{color.gray.50}" },
12
+ "success": { "$type": "color", "$value": "{color.green.500}" },
13
+ "success-foreground": { "$type": "color", "$value": "{color.gray.900}" },
14
+ "warning": { "$type": "color", "$value": "{color.amber.500}" },
15
+ "warning-foreground": { "$type": "color", "$value": "{color.gray.900}" },
16
+ "muted": { "$type": "color", "$value": "{color.gray.800}" },
17
+ "muted-foreground": { "$type": "color", "$value": "{color.gray.400}" },
18
+ "accent": { "$type": "color", "$value": "{color.gray.800}" },
19
+ "accent-foreground": { "$type": "color", "$value": "{color.gray.50}" },
20
+ "border": { "$type": "color", "$value": "{color.gray.800}" },
21
+ "input": { "$type": "color", "$value": "{color.gray.800}" },
22
+ "ring": { "$type": "color", "$value": "{color.blue.700}" },
23
+ "radius": { "$type": "dimension", "$value": "{borderRadius.lg}" },
24
+ "sidebar": {
25
+ "background": { "$type": "color", "$value": "{color.gray.900}" },
26
+ "foreground": { "$type": "color", "$value": "{color.gray.100}" },
27
+ "primary": { "$type": "color", "$value": "{color.blue.700}" },
28
+ "primary-foreground": { "$type": "color", "$value": "{color.white}" },
29
+ "accent": { "$type": "color", "$value": "{color.gray.800}" },
30
+ "accent-foreground": { "$type": "color", "$value": "{color.gray.100}" },
31
+ "border": { "$type": "color", "$value": "{color.gray.800}" },
32
+ "ring": { "$type": "color", "$value": "{color.blue.500}" }
33
+ }
34
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "background": { "$type": "color", "$value": "{color.white}" },
3
+ "foreground": { "$type": "color", "$value": "{color.gray.900}" },
4
+ "card": { "$type": "color", "$value": "{color.white}" },
5
+ "card-foreground": { "$type": "color", "$value": "{color.gray.900}" },
6
+ "primary": { "$type": "color", "$value": "{color.blue.600}" },
7
+ "primary-foreground": { "$type": "color", "$value": "{color.blue.50}" },
8
+ "secondary": { "$type": "color", "$value": "{color.gray.100}" },
9
+ "secondary-foreground": { "$type": "color", "$value": "{color.gray.900}" },
10
+ "destructive": { "$type": "color", "$value": "{color.red.500}" },
11
+ "destructive-foreground": { "$type": "color", "$value": "{color.white}" },
12
+ "success": { "$type": "color", "$value": "{color.green.600}" },
13
+ "success-foreground": { "$type": "color", "$value": "{color.white}" },
14
+ "warning": { "$type": "color", "$value": "{color.amber.500}" },
15
+ "warning-foreground": { "$type": "color", "$value": "{color.white}" },
16
+ "muted": { "$type": "color", "$value": "{color.gray.100}" },
17
+ "muted-foreground": { "$type": "color", "$value": "{color.gray.500}" },
18
+ "accent": { "$type": "color", "$value": "{color.gray.100}" },
19
+ "accent-foreground": { "$type": "color", "$value": "{color.gray.900}" },
20
+ "border": { "$type": "color", "$value": "{color.gray.200}" },
21
+ "input": { "$type": "color", "$value": "{color.gray.200}" },
22
+ "ring": { "$type": "color", "$value": "{color.blue.600}" },
23
+ "radius": { "$type": "dimension", "$value": "{borderRadius.lg}" },
24
+ "sidebar": {
25
+ "background": { "$type": "color", "$value": "{color.gray.50}" },
26
+ "foreground": { "$type": "color", "$value": "{color.gray.700}" },
27
+ "primary": { "$type": "color", "$value": "{color.gray.900}" },
28
+ "primary-foreground": { "$type": "color", "$value": "{color.gray.50}" },
29
+ "accent": { "$type": "color", "$value": "{color.gray.100}" },
30
+ "accent-foreground": { "$type": "color", "$value": "{color.gray.900}" },
31
+ "border": { "$type": "color", "$value": "{color.gray.200}" },
32
+ "ring": { "$type": "color", "$value": "{color.blue.500}" }
33
+ }
34
+ }
@@ -0,0 +1,68 @@
1
+ /** Auto-generated by build-tokens.js — DO NOT EDIT */
2
+ /** @type {import('tailwindcss').Config} */
3
+ export default {
4
+ darkMode: "class",
5
+ theme: {
6
+ extend: {
7
+ colors: {
8
+ background: "hsl(var(--background))",
9
+ foreground: "hsl(var(--foreground))",
10
+ card: {
11
+ DEFAULT: "hsl(var(--card))",
12
+ foreground: "hsl(var(--card-foreground))",
13
+ },
14
+ primary: {
15
+ DEFAULT: "hsl(var(--primary))",
16
+ foreground: "hsl(var(--primary-foreground))",
17
+ },
18
+ secondary: {
19
+ DEFAULT: "hsl(var(--secondary))",
20
+ foreground: "hsl(var(--secondary-foreground))",
21
+ },
22
+ destructive: {
23
+ DEFAULT: "hsl(var(--destructive))",
24
+ foreground: "hsl(var(--destructive-foreground))",
25
+ },
26
+ success: {
27
+ DEFAULT: "hsl(var(--success))",
28
+ foreground: "hsl(var(--success-foreground))",
29
+ },
30
+ warning: {
31
+ DEFAULT: "hsl(var(--warning))",
32
+ foreground: "hsl(var(--warning-foreground))",
33
+ },
34
+ muted: {
35
+ DEFAULT: "hsl(var(--muted))",
36
+ foreground: "hsl(var(--muted-foreground))",
37
+ },
38
+ accent: {
39
+ DEFAULT: "hsl(var(--accent))",
40
+ foreground: "hsl(var(--accent-foreground))",
41
+ },
42
+ border: "hsl(var(--border))",
43
+ input: "hsl(var(--input))",
44
+ ring: "hsl(var(--ring))",
45
+ sidebar: {
46
+ background: "hsl(var(--sidebar-background))",
47
+ foreground: "hsl(var(--sidebar-foreground))",
48
+ primary: "hsl(var(--sidebar-primary))",
49
+ "primary-foreground": "hsl(var(--sidebar-primary-foreground))",
50
+ accent: "hsl(var(--sidebar-accent))",
51
+ "accent-foreground": "hsl(var(--sidebar-accent-foreground))",
52
+ border: "hsl(var(--sidebar-border))",
53
+ ring: "hsl(var(--sidebar-ring))",
54
+ },
55
+ },
56
+ borderRadius: {
57
+ lg: "var(--radius)",
58
+ md: "calc(var(--radius) - 2px)",
59
+ sm: "calc(var(--radius) - 4px)",
60
+ },
61
+ fontFamily: {
62
+ sans: ["Inter","ui-sans-serif","system-ui","-apple-system","sans-serif"],
63
+ mono: ["Fira Code","ui-monospace","SFMono-Regular","monospace"],
64
+ },
65
+ },
66
+ },
67
+ plugins: [],
68
+ };