@whykusanagi/corrupted-theme 0.1.2 → 0.1.3
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/CHANGELOG.md +133 -0
- package/README.md +6 -0
- package/docs/CAPABILITIES.md +209 -0
- package/docs/CHARACTER_LEVEL_CORRUPTION.md +264 -0
- package/docs/CORRUPTION_PHRASES.md +529 -0
- package/docs/FUTURE_WORK.md +189 -0
- package/docs/IMPLEMENTATION_VALIDATION.md +401 -0
- package/docs/LLM_PROVIDERS.md +345 -0
- package/docs/PERSONALITY.md +128 -0
- package/docs/ROADMAP.md +266 -0
- package/docs/ROUTING.md +324 -0
- package/docs/STYLE_GUIDE.md +605 -0
- package/docs/brand/BRAND_OVERVIEW.md +413 -0
- package/docs/brand/COLOR_SYSTEM.md +583 -0
- package/docs/brand/DESIGN_TOKENS.md +1009 -0
- package/docs/brand/TRANSLATION_FAILURE_AESTHETIC.md +525 -0
- package/docs/brand/TYPOGRAPHY.md +624 -0
- package/docs/components/ANIMATION_GUIDELINES.md +901 -0
- package/docs/components/COMPONENT_LIBRARY.md +1061 -0
- package/docs/components/GLASSMORPHISM.md +602 -0
- package/docs/components/INTERACTIVE_STATES.md +766 -0
- package/docs/governance/CONTRIBUTION_GUIDELINES.md +593 -0
- package/docs/governance/DESIGN_SYSTEM_GOVERNANCE.md +451 -0
- package/docs/governance/VERSION_MANAGEMENT.md +447 -0
- package/docs/governance/VERSION_REFERENCES.md +229 -0
- package/docs/platforms/CLI_IMPLEMENTATION.md +1025 -0
- package/docs/platforms/COMPONENT_MAPPING.md +579 -0
- package/docs/platforms/NPM_PACKAGE.md +854 -0
- package/docs/platforms/WEB_IMPLEMENTATION.md +1221 -0
- package/docs/standards/ACCESSIBILITY.md +715 -0
- package/docs/standards/ANTI_PATTERNS.md +554 -0
- package/docs/standards/SPACING_SYSTEM.md +549 -0
- package/examples/button.html +1 -1
- package/examples/card.html +1 -1
- package/examples/form.html +1 -1
- package/examples/index.html +2 -2
- package/examples/layout.html +1 -1
- package/examples/nikke-team-builder.html +1 -1
- package/examples/showcase-complete.html +840 -15
- package/examples/showcase.html +1 -1
- package/package.json +4 -2
- package/src/css/components.css +676 -0
- package/src/lib/character-corruption.js +563 -0
- package/src/lib/components.js +283 -0
|
@@ -0,0 +1,1009 @@
|
|
|
1
|
+
# Celeste Brand System - Design Tokens
|
|
2
|
+
|
|
3
|
+
**Version**: 1.0.0
|
|
4
|
+
**Last Updated**: 2025-12-13
|
|
5
|
+
**Token Format**: W3C Design Tokens Community Group (DTCG)
|
|
6
|
+
**Status**: 🔴 **CRITICAL FOUNDATION DOCUMENT**
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## What Are Design Tokens?
|
|
11
|
+
|
|
12
|
+
Design tokens are **platform-agnostic design decisions** stored in a structured format (JSON) that can be transformed into platform-specific code (CSS, Go constants, Swift, Kotlin, etc.).
|
|
13
|
+
|
|
14
|
+
**Benefits**:
|
|
15
|
+
- ✅ **Single source of truth** for all design values
|
|
16
|
+
- ✅ **Cross-platform consistency** (CLI, web, mobile)
|
|
17
|
+
- ✅ **Programmatic updates** (change JSON → regenerate all platforms)
|
|
18
|
+
- ✅ **Version control** (track design changes in Git)
|
|
19
|
+
- ✅ **Tooling support** (Figma, Style Dictionary, Theo)
|
|
20
|
+
|
|
21
|
+
**Celeste's Implementation**:
|
|
22
|
+
- **Master file**: `design-tokens.json` (W3C DTCG format)
|
|
23
|
+
- **Generated files**:
|
|
24
|
+
- `tokens.css` (CSS custom properties for web)
|
|
25
|
+
- `tokens.go` (Go constants for CLI)
|
|
26
|
+
- `tokens.ts` (TypeScript types for npm package)
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Token Format: W3C DTCG Standard
|
|
31
|
+
|
|
32
|
+
Celeste uses the **W3C Design Tokens Community Group** format for future-proof compatibility.
|
|
33
|
+
|
|
34
|
+
**Format structure**:
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"$schema": "https://tr.designtokens.org/format/",
|
|
38
|
+
"tokenGroup": {
|
|
39
|
+
"tokenName": {
|
|
40
|
+
"$value": "actual-value",
|
|
41
|
+
"$type": "token-type",
|
|
42
|
+
"$description": "Human-readable explanation"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Why W3C DTCG?**
|
|
49
|
+
- Industry standard (adopted by Adobe, Figma, Microsoft)
|
|
50
|
+
- Future-proof (official specification in progress)
|
|
51
|
+
- Tool support (Design Tokens Studio, Theo, Style Dictionary)
|
|
52
|
+
- Human-readable JSON (easy to review in PRs)
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Token Naming Conventions
|
|
57
|
+
|
|
58
|
+
### Semantic vs Component Tokens
|
|
59
|
+
|
|
60
|
+
**Semantic tokens** (intent-based):
|
|
61
|
+
```
|
|
62
|
+
color.accent.primary
|
|
63
|
+
color.surface.glass
|
|
64
|
+
typography.size.heading-1
|
|
65
|
+
spacing.scale.medium
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Component tokens** (usage-based):
|
|
69
|
+
```
|
|
70
|
+
button.background.primary
|
|
71
|
+
card.border.default
|
|
72
|
+
input.text.placeholder
|
|
73
|
+
header.padding.vertical
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Naming Pattern
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
{category}.{subcategory}.{variant}.{state}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Examples**:
|
|
83
|
+
```
|
|
84
|
+
color.accent.primary.default // Base accent color
|
|
85
|
+
color.accent.primary.hover // Hover state
|
|
86
|
+
color.accent.primary.active // Active state
|
|
87
|
+
color.accent.primary.disabled // Disabled state
|
|
88
|
+
|
|
89
|
+
spacing.scale.xs // Extra small (4px)
|
|
90
|
+
spacing.scale.md // Medium (16px)
|
|
91
|
+
spacing.scale.xl // Extra large (32px)
|
|
92
|
+
|
|
93
|
+
animation.timing.fast // 150ms
|
|
94
|
+
animation.timing.normal // 300ms
|
|
95
|
+
animation.easing.default // ease-in-out
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Color Tokens
|
|
101
|
+
|
|
102
|
+
### Accent Colors (Celeste Pink)
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"color": {
|
|
107
|
+
"accent": {
|
|
108
|
+
"primary": {
|
|
109
|
+
"$value": "#d94f90",
|
|
110
|
+
"$type": "color",
|
|
111
|
+
"$description": "Celeste Pink - primary brand accent"
|
|
112
|
+
},
|
|
113
|
+
"light": {
|
|
114
|
+
"$value": "#e86ca8",
|
|
115
|
+
"$type": "color",
|
|
116
|
+
"$description": "Hover state for pink accent"
|
|
117
|
+
},
|
|
118
|
+
"dark": {
|
|
119
|
+
"$value": "#b61b70",
|
|
120
|
+
"$type": "color",
|
|
121
|
+
"$description": "Active state for pink accent"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Generated CSS**:
|
|
129
|
+
```css
|
|
130
|
+
:root {
|
|
131
|
+
--color-accent-primary: #d94f90;
|
|
132
|
+
--color-accent-light: #e86ca8;
|
|
133
|
+
--color-accent-dark: #b61b70;
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Generated Go**:
|
|
138
|
+
```go
|
|
139
|
+
const (
|
|
140
|
+
ColorAccentPrimary = "#d94f90"
|
|
141
|
+
ColorAccentLight = "#e86ca8"
|
|
142
|
+
ColorAccentDark = "#b61b70"
|
|
143
|
+
)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Secondary Colors
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"color": {
|
|
151
|
+
"secondary": {
|
|
152
|
+
"purple": {
|
|
153
|
+
"$value": "#8b5cf6",
|
|
154
|
+
"$type": "color",
|
|
155
|
+
"$description": "Purple Neon - secondary accent"
|
|
156
|
+
},
|
|
157
|
+
"cyan": {
|
|
158
|
+
"$value": "#00d4ff",
|
|
159
|
+
"$type": "color",
|
|
160
|
+
"$description": "Cyan Glow - tertiary accent"
|
|
161
|
+
},
|
|
162
|
+
"red": {
|
|
163
|
+
"$value": "#ff4757",
|
|
164
|
+
"$type": "color",
|
|
165
|
+
"$description": "Error/danger state"
|
|
166
|
+
},
|
|
167
|
+
"green": {
|
|
168
|
+
"$value": "#2ed573",
|
|
169
|
+
"$type": "color",
|
|
170
|
+
"$description": "Success state"
|
|
171
|
+
},
|
|
172
|
+
"yellow": {
|
|
173
|
+
"$value": "#ffa502",
|
|
174
|
+
"$type": "color",
|
|
175
|
+
"$description": "Warning state"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Glass Surface Colors
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"color": {
|
|
187
|
+
"surface": {
|
|
188
|
+
"glass": {
|
|
189
|
+
"default": {
|
|
190
|
+
"$value": "rgba(20, 12, 40, 0.7)",
|
|
191
|
+
"$type": "color",
|
|
192
|
+
"$description": "Default glassmorphism background"
|
|
193
|
+
},
|
|
194
|
+
"light": {
|
|
195
|
+
"$value": "rgba(28, 18, 48, 0.5)",
|
|
196
|
+
"$type": "color",
|
|
197
|
+
"$description": "Lighter glass for hover/nested elements"
|
|
198
|
+
},
|
|
199
|
+
"darker": {
|
|
200
|
+
"$value": "rgba(12, 8, 28, 0.8)",
|
|
201
|
+
"$type": "color",
|
|
202
|
+
"$description": "Darker glass for elevated elements"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Background Colors
|
|
211
|
+
|
|
212
|
+
```json
|
|
213
|
+
{
|
|
214
|
+
"color": {
|
|
215
|
+
"background": {
|
|
216
|
+
"primary": {
|
|
217
|
+
"$value": "#0a0612",
|
|
218
|
+
"$type": "color",
|
|
219
|
+
"$description": "Page background (deep purple-black)"
|
|
220
|
+
},
|
|
221
|
+
"secondary": {
|
|
222
|
+
"$value": "#140c28",
|
|
223
|
+
"$type": "color",
|
|
224
|
+
"$description": "Card/section background"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Text Colors
|
|
232
|
+
|
|
233
|
+
```json
|
|
234
|
+
{
|
|
235
|
+
"color": {
|
|
236
|
+
"text": {
|
|
237
|
+
"primary": {
|
|
238
|
+
"$value": "#ffffff",
|
|
239
|
+
"$type": "color",
|
|
240
|
+
"$description": "Primary text (high contrast)"
|
|
241
|
+
},
|
|
242
|
+
"secondary": {
|
|
243
|
+
"$value": "rgba(255, 255, 255, 0.7)",
|
|
244
|
+
"$type": "color",
|
|
245
|
+
"$description": "Secondary text (medium contrast)"
|
|
246
|
+
},
|
|
247
|
+
"tertiary": {
|
|
248
|
+
"$value": "rgba(255, 255, 255, 0.5)",
|
|
249
|
+
"$type": "color",
|
|
250
|
+
"$description": "Tertiary text (low contrast, placeholders)"
|
|
251
|
+
},
|
|
252
|
+
"disabled": {
|
|
253
|
+
"$value": "rgba(255, 255, 255, 0.3)",
|
|
254
|
+
"$type": "color",
|
|
255
|
+
"$description": "Disabled text"
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Corruption Colors (for corrupted text)
|
|
263
|
+
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"color": {
|
|
267
|
+
"corruption": {
|
|
268
|
+
"magenta": {
|
|
269
|
+
"$value": "#d94f90",
|
|
270
|
+
"$type": "color",
|
|
271
|
+
"$description": "Japanese glitches (ニャー, かわいい)"
|
|
272
|
+
},
|
|
273
|
+
"purple": {
|
|
274
|
+
"$value": "#c084fc",
|
|
275
|
+
"$type": "color",
|
|
276
|
+
"$description": "Full Japanese phrases (壊れちゃう...)"
|
|
277
|
+
},
|
|
278
|
+
"cyan": {
|
|
279
|
+
"$value": "#00d4ff",
|
|
280
|
+
"$type": "color",
|
|
281
|
+
"$description": "Romaji phrases (nyaa~, ara ara~)"
|
|
282
|
+
},
|
|
283
|
+
"red": {
|
|
284
|
+
"$value": "#ff4757",
|
|
285
|
+
"$type": "color",
|
|
286
|
+
"$description": "English lewd phrases, block chars"
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Typography Tokens
|
|
296
|
+
|
|
297
|
+
### Font Families
|
|
298
|
+
|
|
299
|
+
```json
|
|
300
|
+
{
|
|
301
|
+
"typography": {
|
|
302
|
+
"font-family": {
|
|
303
|
+
"base": {
|
|
304
|
+
"$value": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
|
|
305
|
+
"$type": "fontFamily",
|
|
306
|
+
"$description": "System font stack for Latin text"
|
|
307
|
+
},
|
|
308
|
+
"japanese": {
|
|
309
|
+
"$value": "'Hiragino Sans', 'Yu Gothic', 'Meiryo', 'MS PGothic', sans-serif",
|
|
310
|
+
"$type": "fontFamily",
|
|
311
|
+
"$description": "Japanese character support"
|
|
312
|
+
},
|
|
313
|
+
"monospace": {
|
|
314
|
+
"$value": "'SF Mono', 'Monaco', 'Consolas', 'Liberation Mono', monospace",
|
|
315
|
+
"$type": "fontFamily",
|
|
316
|
+
"$description": "Terminal/code font (CLI default)"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### Font Sizes (Responsive Scale)
|
|
324
|
+
|
|
325
|
+
```json
|
|
326
|
+
{
|
|
327
|
+
"typography": {
|
|
328
|
+
"font-size": {
|
|
329
|
+
"xs": {
|
|
330
|
+
"$value": "0.75rem",
|
|
331
|
+
"$type": "dimension",
|
|
332
|
+
"$description": "12px - Labels, captions"
|
|
333
|
+
},
|
|
334
|
+
"sm": {
|
|
335
|
+
"$value": "0.875rem",
|
|
336
|
+
"$type": "dimension",
|
|
337
|
+
"$description": "14px - Small text"
|
|
338
|
+
},
|
|
339
|
+
"base": {
|
|
340
|
+
"$value": "1rem",
|
|
341
|
+
"$type": "dimension",
|
|
342
|
+
"$description": "16px - Body text (default)"
|
|
343
|
+
},
|
|
344
|
+
"lg": {
|
|
345
|
+
"$value": "1.125rem",
|
|
346
|
+
"$type": "dimension",
|
|
347
|
+
"$description": "18px - Large body text"
|
|
348
|
+
},
|
|
349
|
+
"xl": {
|
|
350
|
+
"$value": "1.25rem",
|
|
351
|
+
"$type": "dimension",
|
|
352
|
+
"$description": "20px - H6"
|
|
353
|
+
},
|
|
354
|
+
"2xl": {
|
|
355
|
+
"$value": "1.5rem",
|
|
356
|
+
"$type": "dimension",
|
|
357
|
+
"$description": "24px - H5"
|
|
358
|
+
},
|
|
359
|
+
"3xl": {
|
|
360
|
+
"$value": "1.875rem",
|
|
361
|
+
"$type": "dimension",
|
|
362
|
+
"$description": "30px - H4"
|
|
363
|
+
},
|
|
364
|
+
"4xl": {
|
|
365
|
+
"$value": "2.25rem",
|
|
366
|
+
"$type": "dimension",
|
|
367
|
+
"$description": "36px - H3"
|
|
368
|
+
},
|
|
369
|
+
"5xl": {
|
|
370
|
+
"$value": "3rem",
|
|
371
|
+
"$type": "dimension",
|
|
372
|
+
"$description": "48px - H2"
|
|
373
|
+
},
|
|
374
|
+
"6xl": {
|
|
375
|
+
"$value": "3.75rem",
|
|
376
|
+
"$type": "dimension",
|
|
377
|
+
"$description": "60px - H1"
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Font Weights
|
|
385
|
+
|
|
386
|
+
```json
|
|
387
|
+
{
|
|
388
|
+
"typography": {
|
|
389
|
+
"font-weight": {
|
|
390
|
+
"normal": {
|
|
391
|
+
"$value": "400",
|
|
392
|
+
"$type": "fontWeight",
|
|
393
|
+
"$description": "Regular text"
|
|
394
|
+
},
|
|
395
|
+
"medium": {
|
|
396
|
+
"$value": "500",
|
|
397
|
+
"$type": "fontWeight",
|
|
398
|
+
"$description": "Slightly emphasized"
|
|
399
|
+
},
|
|
400
|
+
"semibold": {
|
|
401
|
+
"$value": "600",
|
|
402
|
+
"$type": "fontWeight",
|
|
403
|
+
"$description": "Headers, labels"
|
|
404
|
+
},
|
|
405
|
+
"bold": {
|
|
406
|
+
"$value": "700",
|
|
407
|
+
"$type": "fontWeight",
|
|
408
|
+
"$description": "Strong emphasis"
|
|
409
|
+
},
|
|
410
|
+
"black": {
|
|
411
|
+
"$value": "900",
|
|
412
|
+
"$type": "fontWeight",
|
|
413
|
+
"$description": "Extra bold (dashboard headers)"
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
### Line Heights
|
|
421
|
+
|
|
422
|
+
```json
|
|
423
|
+
{
|
|
424
|
+
"typography": {
|
|
425
|
+
"line-height": {
|
|
426
|
+
"tight": {
|
|
427
|
+
"$value": "1.2",
|
|
428
|
+
"$type": "number",
|
|
429
|
+
"$description": "Headers, tight spacing"
|
|
430
|
+
},
|
|
431
|
+
"normal": {
|
|
432
|
+
"$value": "1.5",
|
|
433
|
+
"$type": "number",
|
|
434
|
+
"$description": "Body text (default)"
|
|
435
|
+
},
|
|
436
|
+
"relaxed": {
|
|
437
|
+
"$value": "1.8",
|
|
438
|
+
"$type": "number",
|
|
439
|
+
"$description": "Long-form content"
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
## Spacing Tokens (8pt Scale)
|
|
449
|
+
|
|
450
|
+
```json
|
|
451
|
+
{
|
|
452
|
+
"spacing": {
|
|
453
|
+
"scale": {
|
|
454
|
+
"0": {
|
|
455
|
+
"$value": "0",
|
|
456
|
+
"$type": "dimension",
|
|
457
|
+
"$description": "No spacing"
|
|
458
|
+
},
|
|
459
|
+
"xs": {
|
|
460
|
+
"$value": "4px",
|
|
461
|
+
"$type": "dimension",
|
|
462
|
+
"$description": "Extra small (0.25rem)"
|
|
463
|
+
},
|
|
464
|
+
"sm": {
|
|
465
|
+
"$value": "8px",
|
|
466
|
+
"$type": "dimension",
|
|
467
|
+
"$description": "Small (0.5rem)"
|
|
468
|
+
},
|
|
469
|
+
"md": {
|
|
470
|
+
"$value": "16px",
|
|
471
|
+
"$type": "dimension",
|
|
472
|
+
"$description": "Medium (1rem) - base unit"
|
|
473
|
+
},
|
|
474
|
+
"lg": {
|
|
475
|
+
"$value": "24px",
|
|
476
|
+
"$type": "dimension",
|
|
477
|
+
"$description": "Large (1.5rem)"
|
|
478
|
+
},
|
|
479
|
+
"xl": {
|
|
480
|
+
"$value": "32px",
|
|
481
|
+
"$type": "dimension",
|
|
482
|
+
"$description": "Extra large (2rem)"
|
|
483
|
+
},
|
|
484
|
+
"2xl": {
|
|
485
|
+
"$value": "48px",
|
|
486
|
+
"$type": "dimension",
|
|
487
|
+
"$description": "2X large (3rem)"
|
|
488
|
+
},
|
|
489
|
+
"3xl": {
|
|
490
|
+
"$value": "64px",
|
|
491
|
+
"$type": "dimension",
|
|
492
|
+
"$description": "3X large (4rem)"
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
---
|
|
500
|
+
|
|
501
|
+
## Animation Tokens
|
|
502
|
+
|
|
503
|
+
### Timing (Duration)
|
|
504
|
+
|
|
505
|
+
```json
|
|
506
|
+
{
|
|
507
|
+
"animation": {
|
|
508
|
+
"timing": {
|
|
509
|
+
"instant": {
|
|
510
|
+
"$value": "0s",
|
|
511
|
+
"$type": "duration",
|
|
512
|
+
"$description": "No transition"
|
|
513
|
+
},
|
|
514
|
+
"fast": {
|
|
515
|
+
"$value": "0.15s",
|
|
516
|
+
"$type": "duration",
|
|
517
|
+
"$description": "Micro-interactions (hover, focus)"
|
|
518
|
+
},
|
|
519
|
+
"normal": {
|
|
520
|
+
"$value": "0.3s",
|
|
521
|
+
"$type": "duration",
|
|
522
|
+
"$description": "Standard transitions (default)"
|
|
523
|
+
},
|
|
524
|
+
"slow": {
|
|
525
|
+
"$value": "0.5s",
|
|
526
|
+
"$type": "duration",
|
|
527
|
+
"$description": "Page transitions, large animations"
|
|
528
|
+
},
|
|
529
|
+
"slower": {
|
|
530
|
+
"$value": "1s",
|
|
531
|
+
"$type": "duration",
|
|
532
|
+
"$description": "Loading states, progress"
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
### Easing (Timing Functions)
|
|
540
|
+
|
|
541
|
+
```json
|
|
542
|
+
{
|
|
543
|
+
"animation": {
|
|
544
|
+
"easing": {
|
|
545
|
+
"default": {
|
|
546
|
+
"$value": "ease-in-out",
|
|
547
|
+
"$type": "cubicBezier",
|
|
548
|
+
"$description": "Default easing (smooth start and end)"
|
|
549
|
+
},
|
|
550
|
+
"in": {
|
|
551
|
+
"$value": "ease-in",
|
|
552
|
+
"$type": "cubicBezier",
|
|
553
|
+
"$description": "Acceleration (slow start)"
|
|
554
|
+
},
|
|
555
|
+
"out": {
|
|
556
|
+
"$value": "ease-out",
|
|
557
|
+
"$type": "cubicBezier",
|
|
558
|
+
"$description": "Deceleration (slow end)"
|
|
559
|
+
},
|
|
560
|
+
"linear": {
|
|
561
|
+
"$value": "linear",
|
|
562
|
+
"$type": "cubicBezier",
|
|
563
|
+
"$description": "No easing (constant speed)"
|
|
564
|
+
},
|
|
565
|
+
"bounce": {
|
|
566
|
+
"$value": "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
567
|
+
"$type": "cubicBezier",
|
|
568
|
+
"$description": "Bouncy effect (overshoots then settles)"
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
---
|
|
576
|
+
|
|
577
|
+
## Shadow Tokens
|
|
578
|
+
|
|
579
|
+
### Glass Shadows (Pink-Tinted)
|
|
580
|
+
|
|
581
|
+
```json
|
|
582
|
+
{
|
|
583
|
+
"shadow": {
|
|
584
|
+
"glass": {
|
|
585
|
+
"sm": {
|
|
586
|
+
"$value": "0 2px 8px rgba(217, 79, 144, 0.15)",
|
|
587
|
+
"$type": "shadow",
|
|
588
|
+
"$description": "Small shadow (subtle glow)"
|
|
589
|
+
},
|
|
590
|
+
"md": {
|
|
591
|
+
"$value": "0 4px 16px rgba(217, 79, 144, 0.25)",
|
|
592
|
+
"$type": "shadow",
|
|
593
|
+
"$description": "Medium shadow (default)"
|
|
594
|
+
},
|
|
595
|
+
"lg": {
|
|
596
|
+
"$value": "0 8px 32px rgba(217, 79, 144, 0.35)",
|
|
597
|
+
"$type": "shadow",
|
|
598
|
+
"$description": "Large shadow (elevated elements)"
|
|
599
|
+
},
|
|
600
|
+
"xl": {
|
|
601
|
+
"$value": "0 16px 64px rgba(217, 79, 144, 0.45)",
|
|
602
|
+
"$type": "shadow",
|
|
603
|
+
"$description": "Extra large shadow (modals)"
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
---
|
|
611
|
+
|
|
612
|
+
## Border Tokens
|
|
613
|
+
|
|
614
|
+
```json
|
|
615
|
+
{
|
|
616
|
+
"border": {
|
|
617
|
+
"width": {
|
|
618
|
+
"thin": {
|
|
619
|
+
"$value": "1px",
|
|
620
|
+
"$type": "dimension",
|
|
621
|
+
"$description": "Thin border (default)"
|
|
622
|
+
},
|
|
623
|
+
"medium": {
|
|
624
|
+
"$value": "2px",
|
|
625
|
+
"$type": "dimension",
|
|
626
|
+
"$description": "Medium border (emphasis)"
|
|
627
|
+
},
|
|
628
|
+
"thick": {
|
|
629
|
+
"$value": "4px",
|
|
630
|
+
"$type": "dimension",
|
|
631
|
+
"$description": "Thick border (strong emphasis)"
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
"radius": {
|
|
635
|
+
"none": {
|
|
636
|
+
"$value": "0",
|
|
637
|
+
"$type": "dimension",
|
|
638
|
+
"$description": "No rounding"
|
|
639
|
+
},
|
|
640
|
+
"sm": {
|
|
641
|
+
"$value": "4px",
|
|
642
|
+
"$type": "dimension",
|
|
643
|
+
"$description": "Small radius (buttons)"
|
|
644
|
+
},
|
|
645
|
+
"md": {
|
|
646
|
+
"$value": "8px",
|
|
647
|
+
"$type": "dimension",
|
|
648
|
+
"$description": "Medium radius (cards, default)"
|
|
649
|
+
},
|
|
650
|
+
"lg": {
|
|
651
|
+
"$value": "16px",
|
|
652
|
+
"$type": "dimension",
|
|
653
|
+
"$description": "Large radius (modals)"
|
|
654
|
+
},
|
|
655
|
+
"full": {
|
|
656
|
+
"$value": "9999px",
|
|
657
|
+
"$type": "dimension",
|
|
658
|
+
"$description": "Fully rounded (pills, avatars)"
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
---
|
|
666
|
+
|
|
667
|
+
## Opacity Tokens
|
|
668
|
+
|
|
669
|
+
```json
|
|
670
|
+
{
|
|
671
|
+
"opacity": {
|
|
672
|
+
"transparent": {
|
|
673
|
+
"$value": "0",
|
|
674
|
+
"$type": "number",
|
|
675
|
+
"$description": "Fully transparent"
|
|
676
|
+
},
|
|
677
|
+
"low": {
|
|
678
|
+
"$value": "0.3",
|
|
679
|
+
"$type": "number",
|
|
680
|
+
"$description": "Disabled elements"
|
|
681
|
+
},
|
|
682
|
+
"medium": {
|
|
683
|
+
"$value": "0.5",
|
|
684
|
+
"$type": "number",
|
|
685
|
+
"$description": "Glass-light surfaces"
|
|
686
|
+
},
|
|
687
|
+
"high": {
|
|
688
|
+
"$value": "0.7",
|
|
689
|
+
"$type": "number",
|
|
690
|
+
"$description": "Glass surfaces (default)"
|
|
691
|
+
},
|
|
692
|
+
"higher": {
|
|
693
|
+
"$value": "0.8",
|
|
694
|
+
"$type": "number",
|
|
695
|
+
"$description": "Glass-darker surfaces"
|
|
696
|
+
},
|
|
697
|
+
"opaque": {
|
|
698
|
+
"$value": "1",
|
|
699
|
+
"$type": "number",
|
|
700
|
+
"$description": "Fully opaque"
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
```
|
|
705
|
+
|
|
706
|
+
---
|
|
707
|
+
|
|
708
|
+
## Blur Tokens (Glassmorphism)
|
|
709
|
+
|
|
710
|
+
```json
|
|
711
|
+
{
|
|
712
|
+
"blur": {
|
|
713
|
+
"none": {
|
|
714
|
+
"$value": "0",
|
|
715
|
+
"$type": "dimension",
|
|
716
|
+
"$description": "No blur"
|
|
717
|
+
},
|
|
718
|
+
"sm": {
|
|
719
|
+
"$value": "2px",
|
|
720
|
+
"$type": "dimension",
|
|
721
|
+
"$description": "Subtle blur"
|
|
722
|
+
},
|
|
723
|
+
"md": {
|
|
724
|
+
"$value": "5px",
|
|
725
|
+
"$type": "dimension",
|
|
726
|
+
"$description": "Medium blur (default glass)"
|
|
727
|
+
},
|
|
728
|
+
"lg": {
|
|
729
|
+
"$value": "10px",
|
|
730
|
+
"$type": "dimension",
|
|
731
|
+
"$description": "Large blur"
|
|
732
|
+
},
|
|
733
|
+
"xl": {
|
|
734
|
+
"$value": "15px",
|
|
735
|
+
"$type": "dimension",
|
|
736
|
+
"$description": "Extra large blur (elevated glass)"
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
---
|
|
743
|
+
|
|
744
|
+
## Z-Index Tokens
|
|
745
|
+
|
|
746
|
+
```json
|
|
747
|
+
{
|
|
748
|
+
"z-index": {
|
|
749
|
+
"base": {
|
|
750
|
+
"$value": "0",
|
|
751
|
+
"$type": "number",
|
|
752
|
+
"$description": "Base layer"
|
|
753
|
+
},
|
|
754
|
+
"dropdown": {
|
|
755
|
+
"$value": "1000",
|
|
756
|
+
"$type": "number",
|
|
757
|
+
"$description": "Dropdowns, tooltips"
|
|
758
|
+
},
|
|
759
|
+
"sticky": {
|
|
760
|
+
"$value": "1100",
|
|
761
|
+
"$type": "number",
|
|
762
|
+
"$description": "Sticky headers"
|
|
763
|
+
},
|
|
764
|
+
"modal": {
|
|
765
|
+
"$value": "1300",
|
|
766
|
+
"$type": "number",
|
|
767
|
+
"$description": "Modals, dialogs"
|
|
768
|
+
},
|
|
769
|
+
"toast": {
|
|
770
|
+
"$value": "1500",
|
|
771
|
+
"$type": "number",
|
|
772
|
+
"$description": "Notifications, toasts"
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
```
|
|
777
|
+
|
|
778
|
+
---
|
|
779
|
+
|
|
780
|
+
## Platform-Specific Output
|
|
781
|
+
|
|
782
|
+
### CSS Custom Properties
|
|
783
|
+
|
|
784
|
+
**Generated from JSON**: `tokens.css`
|
|
785
|
+
|
|
786
|
+
```css
|
|
787
|
+
:root {
|
|
788
|
+
/* Colors */
|
|
789
|
+
--color-accent-primary: #d94f90;
|
|
790
|
+
--color-accent-light: #e86ca8;
|
|
791
|
+
--color-accent-dark: #b61b70;
|
|
792
|
+
|
|
793
|
+
/* Typography */
|
|
794
|
+
--font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
795
|
+
--font-size-base: 1rem;
|
|
796
|
+
--font-weight-bold: 700;
|
|
797
|
+
--line-height-normal: 1.5;
|
|
798
|
+
|
|
799
|
+
/* Spacing */
|
|
800
|
+
--space-xs: 4px;
|
|
801
|
+
--space-sm: 8px;
|
|
802
|
+
--space-md: 16px;
|
|
803
|
+
--space-lg: 24px;
|
|
804
|
+
--space-xl: 32px;
|
|
805
|
+
|
|
806
|
+
/* Animation */
|
|
807
|
+
--timing-fast: 0.15s;
|
|
808
|
+
--timing-normal: 0.3s;
|
|
809
|
+
--easing-default: ease-in-out;
|
|
810
|
+
|
|
811
|
+
/* Shadows */
|
|
812
|
+
--shadow-glass-md: 0 4px 16px rgba(217, 79, 144, 0.25);
|
|
813
|
+
|
|
814
|
+
/* Blur */
|
|
815
|
+
--blur-md: 5px;
|
|
816
|
+
}
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
**Usage in CSS**:
|
|
820
|
+
```css
|
|
821
|
+
.glass-card {
|
|
822
|
+
background: var(--color-surface-glass-default);
|
|
823
|
+
border: 1px solid var(--color-accent-primary);
|
|
824
|
+
border-radius: var(--border-radius-md);
|
|
825
|
+
box-shadow: var(--shadow-glass-md);
|
|
826
|
+
backdrop-filter: blur(var(--blur-md));
|
|
827
|
+
padding: var(--space-lg);
|
|
828
|
+
transition: all var(--timing-normal) var(--easing-default);
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
.glass-card:hover {
|
|
832
|
+
border-color: var(--color-accent-light);
|
|
833
|
+
}
|
|
834
|
+
```
|
|
835
|
+
|
|
836
|
+
### Go Constants
|
|
837
|
+
|
|
838
|
+
**Generated from JSON**: `cmd/celeste/config/tokens.go`
|
|
839
|
+
|
|
840
|
+
```go
|
|
841
|
+
package config
|
|
842
|
+
|
|
843
|
+
const (
|
|
844
|
+
// Colors
|
|
845
|
+
ColorAccentPrimary = "#d94f90"
|
|
846
|
+
ColorAccentLight = "#e86ca8"
|
|
847
|
+
ColorAccentDark = "#b61b70"
|
|
848
|
+
|
|
849
|
+
ColorSecondaryPurple = "#8b5cf6"
|
|
850
|
+
ColorSecondaryCyan = "#00d4ff"
|
|
851
|
+
|
|
852
|
+
// Spacing (for terminal, use character counts)
|
|
853
|
+
SpacingXS = 1 // 1 space
|
|
854
|
+
SpacingSM = 2 // 2 spaces
|
|
855
|
+
SpacingMD = 4 // 4 spaces
|
|
856
|
+
SpacingLG = 6 // 6 spaces
|
|
857
|
+
|
|
858
|
+
// Animation timing (milliseconds)
|
|
859
|
+
TimingFast = 150
|
|
860
|
+
TimingNormal = 300
|
|
861
|
+
TimingSlow = 500
|
|
862
|
+
)
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
**Usage in Go**:
|
|
866
|
+
```go
|
|
867
|
+
import (
|
|
868
|
+
"github.com/charmbracelet/lipgloss"
|
|
869
|
+
"github.com/whykusanagi/celesteCLI/cmd/celeste/config"
|
|
870
|
+
)
|
|
871
|
+
|
|
872
|
+
style := lipgloss.NewStyle().
|
|
873
|
+
Foreground(lipgloss.Color(config.ColorAccentPrimary)).
|
|
874
|
+
Padding(0, config.SpacingMD)
|
|
875
|
+
```
|
|
876
|
+
|
|
877
|
+
### TypeScript Types
|
|
878
|
+
|
|
879
|
+
**Generated from JSON**: `src/tokens/tokens.ts`
|
|
880
|
+
|
|
881
|
+
```typescript
|
|
882
|
+
export const tokens = {
|
|
883
|
+
color: {
|
|
884
|
+
accent: {
|
|
885
|
+
primary: '#d94f90',
|
|
886
|
+
light: '#e86ca8',
|
|
887
|
+
dark: '#b61b70',
|
|
888
|
+
},
|
|
889
|
+
secondary: {
|
|
890
|
+
purple: '#8b5cf6',
|
|
891
|
+
cyan: '#00d4ff',
|
|
892
|
+
},
|
|
893
|
+
},
|
|
894
|
+
spacing: {
|
|
895
|
+
xs: '4px',
|
|
896
|
+
sm: '8px',
|
|
897
|
+
md: '16px',
|
|
898
|
+
lg: '24px',
|
|
899
|
+
xl: '32px',
|
|
900
|
+
},
|
|
901
|
+
animation: {
|
|
902
|
+
timing: {
|
|
903
|
+
fast: '0.15s',
|
|
904
|
+
normal: '0.3s',
|
|
905
|
+
slow: '0.5s',
|
|
906
|
+
},
|
|
907
|
+
easing: {
|
|
908
|
+
default: 'ease-in-out',
|
|
909
|
+
bounce: 'cubic-bezier(0.34, 1.56, 0.64, 1)',
|
|
910
|
+
},
|
|
911
|
+
},
|
|
912
|
+
} as const;
|
|
913
|
+
|
|
914
|
+
export type Tokens = typeof tokens;
|
|
915
|
+
```
|
|
916
|
+
|
|
917
|
+
---
|
|
918
|
+
|
|
919
|
+
## Token Management Workflow
|
|
920
|
+
|
|
921
|
+
### 1. Update Master JSON
|
|
922
|
+
Edit `design-tokens.json` (W3C DTCG format)
|
|
923
|
+
|
|
924
|
+
### 2. Generate Platform Files
|
|
925
|
+
Run token generation script:
|
|
926
|
+
```bash
|
|
927
|
+
# Using Style Dictionary
|
|
928
|
+
npm run tokens:build
|
|
929
|
+
|
|
930
|
+
# Or manually
|
|
931
|
+
node scripts/generate-tokens.js
|
|
932
|
+
```
|
|
933
|
+
|
|
934
|
+
### 3. Review Generated Files
|
|
935
|
+
- `tokens.css` (web)
|
|
936
|
+
- `tokens.go` (CLI)
|
|
937
|
+
- `tokens.ts` (npm package)
|
|
938
|
+
|
|
939
|
+
### 4. Commit to Git
|
|
940
|
+
```bash
|
|
941
|
+
git add design-tokens.json tokens.css tokens.go tokens.ts
|
|
942
|
+
git commit -m "chore: update design tokens"
|
|
943
|
+
```
|
|
944
|
+
|
|
945
|
+
### 5. Publish Updates
|
|
946
|
+
- npm package: Bump version, publish to npm
|
|
947
|
+
- CLI: Tag release, rebuild Go binary
|
|
948
|
+
|
|
949
|
+
---
|
|
950
|
+
|
|
951
|
+
## Version Management
|
|
952
|
+
|
|
953
|
+
**Semantic Versioning for Design Tokens**:
|
|
954
|
+
|
|
955
|
+
- **MAJOR** (1.0.0 → 2.0.0): Breaking changes
|
|
956
|
+
- Color palette changes (hex values)
|
|
957
|
+
- Token renames (--color-primary → --color-accent)
|
|
958
|
+
- Removal of tokens
|
|
959
|
+
- **MINOR** (1.0.0 → 1.1.0): Additive changes
|
|
960
|
+
- New tokens added
|
|
961
|
+
- New token groups
|
|
962
|
+
- **PATCH** (1.0.0 → 1.0.1): Non-breaking fixes
|
|
963
|
+
- Documentation updates
|
|
964
|
+
- Small value adjustments (shadows, blur)
|
|
965
|
+
|
|
966
|
+
---
|
|
967
|
+
|
|
968
|
+
## Tooling Integration
|
|
969
|
+
|
|
970
|
+
### Figma (Design Tokens Studio Plugin)
|
|
971
|
+
|
|
972
|
+
1. Install **Design Tokens Studio** plugin
|
|
973
|
+
2. Import `design-tokens.json`
|
|
974
|
+
3. Sync tokens to Figma variables
|
|
975
|
+
4. Design using token names (--color-accent-primary)
|
|
976
|
+
|
|
977
|
+
### Style Dictionary (Build Tool)
|
|
978
|
+
|
|
979
|
+
```javascript
|
|
980
|
+
// style-dictionary.config.js
|
|
981
|
+
module.exports = {
|
|
982
|
+
source: ['design-tokens.json'],
|
|
983
|
+
platforms: {
|
|
984
|
+
css: {
|
|
985
|
+
transformGroup: 'css',
|
|
986
|
+
buildPath: 'src/',
|
|
987
|
+
files: [{ destination: 'tokens.css', format: 'css/variables' }]
|
|
988
|
+
},
|
|
989
|
+
js: {
|
|
990
|
+
transformGroup: 'js',
|
|
991
|
+
buildPath: 'src/',
|
|
992
|
+
files: [{ destination: 'tokens.ts', format: 'javascript/es6' }]
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
};
|
|
996
|
+
```
|
|
997
|
+
|
|
998
|
+
---
|
|
999
|
+
|
|
1000
|
+
## Related Documents
|
|
1001
|
+
|
|
1002
|
+
- **BRAND_OVERVIEW.md** - High-level brand identity
|
|
1003
|
+
- **COLOR_SYSTEM.md** - Complete color specifications with WCAG
|
|
1004
|
+
- **TYPOGRAPHY.md** - Font system details
|
|
1005
|
+
- **SPACING_SYSTEM.md** - 8pt scale application guidelines
|
|
1006
|
+
|
|
1007
|
+
---
|
|
1008
|
+
|
|
1009
|
+
**Status**: ✅ **FOUNDATION COMPLETE** - Tokens defined, ready for generation
|