@whykusanagi/corrupted-theme 0.1.1 β†’ 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.
Files changed (52) hide show
  1. package/CHANGELOG.md +253 -0
  2. package/README.md +97 -7
  3. package/docs/CAPABILITIES.md +209 -0
  4. package/docs/CHARACTER_LEVEL_CORRUPTION.md +264 -0
  5. package/docs/COMPONENTS_REFERENCE.md +295 -8
  6. package/docs/CORRUPTION_PHRASES.md +529 -0
  7. package/docs/FUTURE_WORK.md +189 -0
  8. package/docs/IMPLEMENTATION_VALIDATION.md +401 -0
  9. package/docs/LLM_PROVIDERS.md +345 -0
  10. package/docs/PERSONALITY.md +128 -0
  11. package/docs/ROADMAP.md +266 -0
  12. package/docs/ROUTING.md +324 -0
  13. package/docs/STYLE_GUIDE.md +605 -0
  14. package/docs/brand/BRAND_OVERVIEW.md +413 -0
  15. package/docs/brand/COLOR_SYSTEM.md +583 -0
  16. package/docs/brand/DESIGN_TOKENS.md +1009 -0
  17. package/docs/brand/TRANSLATION_FAILURE_AESTHETIC.md +525 -0
  18. package/docs/brand/TYPOGRAPHY.md +624 -0
  19. package/docs/components/ANIMATION_GUIDELINES.md +901 -0
  20. package/docs/components/COMPONENT_LIBRARY.md +1061 -0
  21. package/docs/components/GLASSMORPHISM.md +602 -0
  22. package/docs/components/INTERACTIVE_STATES.md +766 -0
  23. package/docs/governance/CONTRIBUTION_GUIDELINES.md +593 -0
  24. package/docs/governance/DESIGN_SYSTEM_GOVERNANCE.md +451 -0
  25. package/docs/governance/VERSION_MANAGEMENT.md +447 -0
  26. package/docs/governance/VERSION_REFERENCES.md +229 -0
  27. package/docs/platforms/CLI_IMPLEMENTATION.md +1025 -0
  28. package/docs/platforms/COMPONENT_MAPPING.md +579 -0
  29. package/docs/platforms/NPM_PACKAGE.md +854 -0
  30. package/docs/platforms/WEB_IMPLEMENTATION.md +1221 -0
  31. package/docs/standards/ACCESSIBILITY.md +715 -0
  32. package/docs/standards/ANTI_PATTERNS.md +554 -0
  33. package/docs/standards/SPACING_SYSTEM.md +549 -0
  34. package/examples/assets/celeste-avatar.png +0 -0
  35. package/examples/button.html +22 -10
  36. package/examples/card.html +22 -9
  37. package/examples/extensions-showcase.html +716 -0
  38. package/examples/form.html +22 -9
  39. package/examples/index.html +619 -396
  40. package/examples/layout.html +22 -8
  41. package/examples/nikke-team-builder.html +23 -9
  42. package/examples/showcase-complete.html +884 -28
  43. package/examples/showcase.html +21 -8
  44. package/package.json +14 -5
  45. package/src/css/components.css +676 -0
  46. package/src/css/extensions.css +933 -0
  47. package/src/css/theme.css +6 -74
  48. package/src/css/typography.css +5 -0
  49. package/src/lib/character-corruption.js +563 -0
  50. package/src/lib/components.js +283 -0
  51. package/src/lib/countdown-widget.js +609 -0
  52. package/src/lib/gallery.js +481 -0
@@ -0,0 +1,1061 @@
1
+ # Celeste Brand System - Component Library
2
+
3
+ **Version**: 1.0.0
4
+ **Last Updated**: 2025-12-13
5
+ **Status**: 🟠 **HIGH PRIORITY DOCUMENT**
6
+
7
+ ---
8
+
9
+ ## Overview
10
+
11
+ This document provides a complete inventory of all Celeste design system components across both platforms:
12
+ - **Web Components** (40+ from corrupted-theme npm package)
13
+ - **CLI Patterns** (6 core TUI patterns)
14
+ - **Cross-platform mapping** showing equivalents
15
+
16
+ ---
17
+
18
+ ## Component Philosophy
19
+
20
+ ### Design Principles
21
+
22
+ 1. **Glassmorphism First** - All containers use frosted glass effects
23
+ 2. **Corruption Aesthetic** - Translation-failure text mixed throughout
24
+ 3. **Terminal-Native Adaptation** - CLI patterns mirror web components
25
+ 4. **Semantic Hierarchy** - Components named by purpose, not appearance
26
+ 5. **Accessibility Built-In** - WCAG AA compliance, keyboard navigation
27
+
28
+ ### Component Categories
29
+
30
+ | Category | Web Count | CLI Count | Purpose |
31
+ |----------|-----------|-----------|---------|
32
+ | **Containers** | 8 | 2 | Cards, panels, sections |
33
+ | **Interactive** | 12 | 1 | Buttons, inputs, dropdowns |
34
+ | **Data Display** | 15 | 3 | Tables, badges, progress bars |
35
+ | **Navigation** | 6 | 0 | Navbar, breadcrumbs, tabs |
36
+ | **Feedback** | 5 | 2 | Alerts, loaders, notifications |
37
+ | **Extensions** | 10 | 0 | Gallery, countdown, social links |
38
+
39
+ **Total**: 56 web components, 8 CLI patterns
40
+
41
+ ---
42
+
43
+ ## Cross-Platform Component Mapping
44
+
45
+ ### Core Equivalents
46
+
47
+ | npm Component | CLI Pattern | Purpose | Shared Attributes |
48
+ |---------------|-------------|---------|-------------------|
49
+ | `.glass-card` | Dashboard section | Primary container | Pink borders, glass bg, padding |
50
+ | `.glass-button` | Menu option highlight | Interactive element | Pink accent, hover glow |
51
+ | `.progress-bar` | `β–ˆβ–ˆβ–ˆβ–ˆβ–“β–’β–‘β–‘` | Progress indicator | Filled/empty ratio, visual feedback |
52
+ | `.spinner` | `⟨ processing... ⟩` | Loading state | Corruption text, animation |
53
+ | `.badge` | Status emoji (πŸŸ’πŸŸ‘πŸ”΄) | Status indicator | Color-coded semantic states |
54
+ | `.alert` | Error/success messages | User feedback | Color + icon + message |
55
+ | `.table` | Formatted data rows | Data display | Aligned columns, headers |
56
+ | `.api-endpoint` | CLI command help | API/command docs | Method + path + description |
57
+
58
+ ### Platform-Specific Components
59
+
60
+ **Web Only** (no CLI equivalent):
61
+ - Gallery with lightbox
62
+ - Social links container
63
+ - Countdown widget
64
+ - NSFW blur overlay
65
+ - Dropdown menus
66
+ - Modal dialogs
67
+ - Tabs navigation
68
+ - Form validation states
69
+
70
+ **CLI Only** (no web equivalent):
71
+ - Terminal status line
72
+ - Skill execution animation
73
+ - Session persistence UI
74
+ - Typing simulation effect
75
+
76
+ ---
77
+
78
+ ## Web Component Inventory
79
+
80
+ ### 1. Glass Components (Core)
81
+
82
+ #### `.glass-card`
83
+
84
+ **Purpose**: Primary container for content sections
85
+ **File**: `src/css/glassmorphism.css`
86
+ **Variants**: None (base only)
87
+
88
+ **Anatomy**:
89
+ ```css
90
+ .glass-card {
91
+ background: rgba(20, 12, 40, 0.7);
92
+ backdrop-filter: blur(15px);
93
+ border: 1px solid rgba(217, 79, 144, 0.3);
94
+ border-radius: 12px;
95
+ padding: var(--spacing-lg);
96
+ box-shadow: 0 4px 16px rgba(217, 79, 144, 0.25);
97
+ }
98
+ ```
99
+
100
+ **Usage**:
101
+ ```html
102
+ <div class="glass-card">
103
+ <h2>Section Title</h2>
104
+ <p>Content goes here...</p>
105
+ </div>
106
+ ```
107
+
108
+ **When to use**:
109
+ - Dashboard sections
110
+ - Content panels
111
+ - Feature showcases
112
+ - Modal content areas
113
+
114
+ **When NOT to use**:
115
+ - Page backgrounds (too heavy)
116
+ - Nested 3+ levels deep (performance)
117
+ - Over images without dark overlay
118
+
119
+ ---
120
+
121
+ #### `.glass-input`
122
+
123
+ **Purpose**: Form inputs with glass effect
124
+ **File**: `src/css/glassmorphism.css`
125
+ **Variants**: None
126
+
127
+ **Anatomy**:
128
+ ```css
129
+ .glass-input {
130
+ background: rgba(20, 12, 40, 0.6);
131
+ backdrop-filter: blur(5px);
132
+ border: 1px solid rgba(217, 79, 144, 0.3);
133
+ color: var(--color-text-primary);
134
+ padding: var(--spacing-sm) var(--spacing-md);
135
+ }
136
+ ```
137
+
138
+ **States**:
139
+ - `:focus` - Border brightens to 70% opacity, pink glow
140
+ - `:hover` - Border brightens to 50% opacity
141
+ - `:disabled` - 30% opacity, no interaction
142
+
143
+ **Usage**:
144
+ ```html
145
+ <input type="text" class="glass-input" placeholder="Enter text...">
146
+ <textarea class="glass-input" rows="4"></textarea>
147
+ ```
148
+
149
+ ---
150
+
151
+ #### `.glass-button`
152
+
153
+ **Purpose**: Primary CTA buttons
154
+ **File**: `src/css/glassmorphism.css`
155
+ **Variants**: None (use `.btn` for variants)
156
+
157
+ **Anatomy**:
158
+ ```css
159
+ .glass-button {
160
+ background: rgba(217, 79, 144, 0.1);
161
+ backdrop-filter: blur(5px);
162
+ border: 1px solid rgba(217, 79, 144, 0.3);
163
+ color: var(--color-accent-primary);
164
+ padding: var(--spacing-sm) var(--spacing-lg);
165
+ transition: all 0.3s ease;
166
+ }
167
+ ```
168
+
169
+ **States**:
170
+ - `:hover` - Background opacity 20%, border 50%, glow shadow
171
+ - `:active` - Background darker pink, scale(0.98)
172
+ - `:disabled` - 30% opacity, cursor not-allowed
173
+
174
+ ---
175
+
176
+ #### `.glass-code`
177
+
178
+ **Purpose**: Code blocks with glass effect
179
+ **File**: `src/css/glassmorphism.css`
180
+ **Variants**: None
181
+
182
+ **Usage**:
183
+ ```html
184
+ <pre class="glass-code"><code>function example() {
185
+ return "Hello, World!";
186
+ }</code></pre>
187
+ ```
188
+
189
+ ---
190
+
191
+ ### 2. Standard Components
192
+
193
+ #### Buttons
194
+
195
+ **File**: `src/css/components.css`
196
+ **Base Class**: `.btn`
197
+
198
+ **Variants**:
199
+ - `.btn` - Primary filled button (pink background)
200
+ - `.btn-secondary` - Secondary outlined button
201
+ - `.btn-ghost` - Transparent with border only
202
+
203
+ **Sizes**:
204
+ - `.btn-sm` - Small (padding: 0.25rem 0.75rem)
205
+ - `.btn` (default) - Medium (padding: 0.5rem 1.5rem)
206
+ - `.btn-lg` - Large (padding: 0.75rem 2rem)
207
+
208
+ **Anatomy**:
209
+ ```css
210
+ .btn {
211
+ background: var(--color-accent-primary);
212
+ color: white;
213
+ border: none;
214
+ padding: var(--spacing-sm) var(--spacing-lg);
215
+ border-radius: var(--radius-md);
216
+ cursor: pointer;
217
+ transition: var(--transition);
218
+ }
219
+ ```
220
+
221
+ **States**:
222
+ - `:hover` - Lighter pink, shadow glow
223
+ - `:active` - Darker pink, scale(0.98)
224
+ - `:focus-visible` - Outline 2px pink
225
+ - `:disabled` - 50% opacity, no pointer
226
+
227
+ **Usage**:
228
+ ```html
229
+ <button class="btn">Primary Action</button>
230
+ <button class="btn btn-secondary">Secondary</button>
231
+ <button class="btn btn-ghost btn-sm">Cancel</button>
232
+ ```
233
+
234
+ **Best Practices**:
235
+ - Use primary for main CTA (1 per section)
236
+ - Secondary for alternative actions
237
+ - Ghost for tertiary/cancel actions
238
+ - Always include hover states
239
+ - Provide disabled state when async loading
240
+
241
+ ---
242
+
243
+ #### Cards
244
+
245
+ **File**: `src/css/components.css`
246
+ **Base Class**: `.card`
247
+
248
+ **Variants**:
249
+ - `.card` - Standard card
250
+ - `.card-sm` - Compact card (less padding)
251
+ - `.card-lg` - Spacious card (more padding)
252
+
253
+ **Anatomy**:
254
+ ```css
255
+ .card {
256
+ background: var(--color-background-secondary);
257
+ border: 1px solid var(--color-border-primary);
258
+ border-radius: var(--radius-lg);
259
+ padding: var(--spacing-lg);
260
+ transition: var(--transition);
261
+ }
262
+ ```
263
+
264
+ **Optional Elements**:
265
+ - `.card-header` - Card title section
266
+ - `.card-body` - Main content area
267
+ - `.card-footer` - Actions/metadata
268
+
269
+ **States**:
270
+ - `:hover` - Border brightens, subtle lift (translateY(-2px))
271
+
272
+ **Usage**:
273
+ ```html
274
+ <div class="card">
275
+ <div class="card-header">
276
+ <h3>Card Title</h3>
277
+ </div>
278
+ <div class="card-body">
279
+ <p>Card content...</p>
280
+ </div>
281
+ <div class="card-footer">
282
+ <button class="btn btn-sm">Action</button>
283
+ </div>
284
+ </div>
285
+ ```
286
+
287
+ **When to use**:
288
+ - Content grouping
289
+ - Feature highlights
290
+ - Team member profiles
291
+ - Product listings
292
+
293
+ **When NOT to use**:
294
+ - For every paragraph (over-carding)
295
+ - Nested cards (use `.glass-card` for nesting)
296
+
297
+ ---
298
+
299
+ #### Badges
300
+
301
+ **File**: `src/css/components.css`
302
+ **Base Class**: `.badge`
303
+
304
+ **Variants** (semantic colors):
305
+ - `.badge` - Default (purple)
306
+ - `.badge-success` - Green
307
+ - `.badge-warning` - Yellow/orange
308
+ - `.badge-error` - Red
309
+ - `.badge-info` - Cyan
310
+
311
+ **Anatomy**:
312
+ ```css
313
+ .badge {
314
+ display: inline-block;
315
+ padding: 0.25rem 0.5rem;
316
+ font-size: 0.75rem;
317
+ font-weight: 600;
318
+ border-radius: var(--radius-sm);
319
+ background: var(--color-secondary-purple);
320
+ color: white;
321
+ }
322
+ ```
323
+
324
+ **Usage**:
325
+ ```html
326
+ <span class="badge">New</span>
327
+ <span class="badge badge-success">Active</span>
328
+ <span class="badge badge-warning">Pending</span>
329
+ <span class="badge badge-error">Error</span>
330
+ ```
331
+
332
+ **Best Practices**:
333
+ - Use semantic variants (success/warning/error) for status
334
+ - Keep text short (1-2 words)
335
+ - Don't overuse (max 1-2 per item)
336
+
337
+ ---
338
+
339
+ #### Alerts
340
+
341
+ **File**: `src/css/components.css`
342
+ **Base Class**: `.alert`
343
+
344
+ **Variants**:
345
+ - `.alert` - Default info alert (purple)
346
+ - `.alert-success` - Green
347
+ - `.alert-warning` - Yellow/orange
348
+ - `.alert-error` - Red
349
+
350
+ **Anatomy**:
351
+ ```css
352
+ .alert {
353
+ padding: var(--spacing-md);
354
+ border-left: 4px solid var(--color-secondary-purple);
355
+ border-radius: var(--radius-md);
356
+ background: rgba(139, 92, 246, 0.1);
357
+ }
358
+ ```
359
+
360
+ **Usage**:
361
+ ```html
362
+ <div class="alert alert-success">
363
+ <strong>Success!</strong> Your changes have been saved.
364
+ </div>
365
+ ```
366
+
367
+ **Best Practices**:
368
+ - Use appropriate semantic variant
369
+ - Include icon for visual reinforcement
370
+ - Provide actionable next steps
371
+ - Make dismissible for non-critical alerts
372
+
373
+ ---
374
+
375
+ #### Tables
376
+
377
+ **File**: `src/css/components.css`
378
+ **Base Class**: `.table`
379
+
380
+ **Variants**:
381
+ - `.table` - Standard table
382
+ - `.table-striped` - Alternating row colors
383
+
384
+ **Anatomy**:
385
+ ```css
386
+ .table {
387
+ width: 100%;
388
+ border-collapse: collapse;
389
+ }
390
+
391
+ .table th {
392
+ background: rgba(217, 79, 144, 0.1);
393
+ padding: var(--spacing-sm);
394
+ text-align: left;
395
+ font-weight: 600;
396
+ }
397
+
398
+ .table td {
399
+ padding: var(--spacing-sm);
400
+ border-bottom: 1px solid var(--color-border-primary);
401
+ }
402
+ ```
403
+
404
+ **Usage**:
405
+ ```html
406
+ <table class="table table-striped">
407
+ <thead>
408
+ <tr>
409
+ <th>Name</th>
410
+ <th>Status</th>
411
+ <th>Actions</th>
412
+ </tr>
413
+ </thead>
414
+ <tbody>
415
+ <tr>
416
+ <td>Item 1</td>
417
+ <td><span class="badge badge-success">Active</span></td>
418
+ <td><button class="btn btn-sm">Edit</button></td>
419
+ </tr>
420
+ </tbody>
421
+ </table>
422
+ ```
423
+
424
+ **Best Practices**:
425
+ - Use `.table-striped` for long tables (improves scannability)
426
+ - Keep columns to 3-6 (responsive concern)
427
+ - Consider horizontal scroll on mobile
428
+
429
+ ---
430
+
431
+ ### 3. Data Display Components
432
+
433
+ #### API Endpoint Display
434
+
435
+ **File**: `src/css/components.css`
436
+ **Classes**: `.api-endpoint`, `.api-method`, `.api-path`
437
+
438
+ **Purpose**: Document API routes with method badges
439
+
440
+ **Anatomy**:
441
+ ```css
442
+ .api-endpoint {
443
+ display: flex;
444
+ align-items: center;
445
+ gap: var(--spacing-sm);
446
+ padding: var(--spacing-sm);
447
+ background: rgba(20, 12, 40, 0.5);
448
+ border-radius: var(--radius-md);
449
+ }
450
+
451
+ .api-method {
452
+ padding: 0.25rem 0.5rem;
453
+ border-radius: var(--radius-sm);
454
+ font-weight: 600;
455
+ font-size: 0.75rem;
456
+ }
457
+
458
+ .api-method.get { background: #22c55e; color: white; }
459
+ .api-method.post { background: #3b82f6; color: white; }
460
+ .api-method.put { background: #f59e0b; color: white; }
461
+ .api-method.delete { background: #ef4444; color: white; }
462
+ ```
463
+
464
+ **Usage**:
465
+ ```html
466
+ <div class="api-endpoint">
467
+ <span class="api-method get">GET</span>
468
+ <code class="api-path">/api/v1/users/:id</code>
469
+ </div>
470
+ ```
471
+
472
+ ---
473
+
474
+ #### API Parameters
475
+
476
+ **File**: `src/css/components.css`
477
+ **Classes**: `.api-param`, `.api-param-name`, `.api-param-type`, `.api-param-description`
478
+
479
+ **Purpose**: Document API request/response parameters
480
+
481
+ **Usage**:
482
+ ```html
483
+ <div class="api-param">
484
+ <code class="api-param-name">userId</code>
485
+ <span class="api-param-type">string</span>
486
+ <p class="api-param-description">Unique identifier for the user</p>
487
+ </div>
488
+ ```
489
+
490
+ ---
491
+
492
+ #### Progress Bar
493
+
494
+ **File**: `src/css/components.css`
495
+ **Base Class**: `.progress-bar`
496
+
497
+ **Anatomy**:
498
+ ```css
499
+ .progress-bar {
500
+ width: 100%;
501
+ height: 8px;
502
+ background: rgba(255, 255, 255, 0.1);
503
+ border-radius: var(--radius-sm);
504
+ overflow: hidden;
505
+ }
506
+
507
+ .progress-bar-fill {
508
+ height: 100%;
509
+ background: linear-gradient(90deg, var(--color-accent-primary), var(--color-secondary-purple));
510
+ transition: width 0.3s ease;
511
+ }
512
+ ```
513
+
514
+ **Usage**:
515
+ ```html
516
+ <div class="progress-bar">
517
+ <div class="progress-bar-fill" style="width: 65%;"></div>
518
+ </div>
519
+ ```
520
+
521
+ ---
522
+
523
+ ### 4. Navigation Components
524
+
525
+ #### Navbar
526
+
527
+ **File**: `src/css/components.css`
528
+ **Base Class**: `.navbar`
529
+
530
+ **Features**:
531
+ - Mobile responsive with toggle
532
+ - Submenu support
533
+ - Fixed positioning
534
+ - Glassmorphic background
535
+
536
+ **Anatomy**:
537
+ ```css
538
+ .navbar {
539
+ position: fixed;
540
+ top: 0;
541
+ width: 100%;
542
+ background: rgba(20, 12, 40, 0.9);
543
+ backdrop-filter: blur(15px);
544
+ border-bottom: 1px solid rgba(217, 79, 144, 0.3);
545
+ z-index: var(--z-navbar);
546
+ }
547
+ ```
548
+
549
+ **Elements**:
550
+ - `.navbar-brand` - Logo/site name
551
+ - `.navbar-menu` - Navigation links container
552
+ - `.navbar-item` - Individual nav link
553
+ - `.navbar-toggle` - Mobile hamburger button
554
+
555
+ **Usage**:
556
+ ```html
557
+ <nav class="navbar">
558
+ <div class="navbar-brand">Celeste</div>
559
+ <ul class="navbar-menu">
560
+ <li class="navbar-item"><a href="/">Home</a></li>
561
+ <li class="navbar-item"><a href="/about">About</a></li>
562
+ </ul>
563
+ <button class="navbar-toggle">☰</button>
564
+ </nav>
565
+ ```
566
+
567
+ ---
568
+
569
+ #### Dropdown
570
+
571
+ **File**: `src/css/components.css`
572
+ **Base Class**: `.dropdown`
573
+
574
+ **Features**:
575
+ - Click-to-open menu
576
+ - Auto-close on outside click
577
+ - Keyboard navigation
578
+
579
+ **Elements**:
580
+ - `.dropdown` - Container
581
+ - `.dropdown-toggle` - Button to open
582
+ - `.dropdown-menu` - Menu content (hidden by default)
583
+ - `.dropdown-item` - Menu option
584
+
585
+ **Usage**:
586
+ ```html
587
+ <div class="dropdown">
588
+ <button class="dropdown-toggle">Options β–Ό</button>
589
+ <div class="dropdown-menu">
590
+ <a href="#" class="dropdown-item">Edit</a>
591
+ <a href="#" class="dropdown-item">Delete</a>
592
+ </div>
593
+ </div>
594
+ ```
595
+
596
+ ---
597
+
598
+ ### 5. Animation & Feedback Components
599
+
600
+ #### Spinner
601
+
602
+ **File**: `src/css/animations.css`
603
+ **Base Class**: `.spinner`
604
+
605
+ **Purpose**: Loading indicator
606
+
607
+ **Anatomy**:
608
+ ```css
609
+ .spinner {
610
+ width: 40px;
611
+ height: 40px;
612
+ border: 4px solid rgba(217, 79, 144, 0.2);
613
+ border-top: 4px solid var(--color-accent-primary);
614
+ border-radius: 50%;
615
+ animation: spin 1s linear infinite;
616
+ }
617
+
618
+ @keyframes spin {
619
+ to { transform: rotate(360deg); }
620
+ }
621
+ ```
622
+
623
+ **Usage**:
624
+ ```html
625
+ <div class="spinner"></div>
626
+ ```
627
+
628
+ ---
629
+
630
+ #### Loading Bar
631
+
632
+ **File**: `src/css/animations.css`
633
+ **Base Class**: `.loading-bar`
634
+
635
+ **Purpose**: Indeterminate progress indicator
636
+
637
+ **Usage**:
638
+ ```html
639
+ <div class="loading-bar"></div>
640
+ ```
641
+
642
+ ---
643
+
644
+ ### 6. Extension Components
645
+
646
+ #### Gallery
647
+
648
+ **File**: `src/css/extensions.css`, `src/lib/gallery.js`
649
+ **Base Class**: `.gallery-container`
650
+
651
+ **Features**:
652
+ - Responsive grid layout
653
+ - Filtering by category
654
+ - Lightbox viewer
655
+ - NSFW blur overlay
656
+ - Lazy loading support
657
+
658
+ **Elements**:
659
+ - `.gallery-container` - Main wrapper
660
+ - `.filter-bar` - Category filters
661
+ - `.filter-btn` - Individual filter button
662
+ - `.gallery-item` - Individual image
663
+ - `.lightbox` - Full-screen image viewer
664
+
665
+ **Usage**:
666
+ ```html
667
+ <div class="gallery-container" data-gallery>
668
+ <div class="filter-bar">
669
+ <button class="filter-btn active" data-filter="all">All</button>
670
+ <button class="filter-btn" data-filter="art">Art</button>
671
+ </div>
672
+ <div class="gallery-item" data-category="art">
673
+ <img src="image.jpg" alt="Artwork">
674
+ </div>
675
+ </div>
676
+
677
+ <script type="module">
678
+ import { initGallery } from './lib/gallery.js';
679
+ initGallery({ filtering: true, lightbox: true });
680
+ </script>
681
+ ```
682
+
683
+ ---
684
+
685
+ #### Countdown Widget
686
+
687
+ **File**: `src/css/extensions.css`, `src/lib/countdown-widget.js`
688
+ **Base Class**: `.countdown-container`
689
+
690
+ **Features**:
691
+ - Event countdown timer
692
+ - Shape variants (diamond, circle, heart, star, hexagon, octagon)
693
+ - Character image backgrounds
694
+ - Completion message
695
+
696
+ **Usage**:
697
+ ```html
698
+ <div class="countdown-container"
699
+ data-countdown
700
+ data-event-date="2025-12-25T00:00:00"
701
+ data-shape="heart">
702
+ </div>
703
+
704
+ <script type="module">
705
+ import { initCountdown } from './lib/countdown-widget.js';
706
+ initCountdown();
707
+ </script>
708
+ ```
709
+
710
+ ---
711
+
712
+ #### Social Links
713
+
714
+ **File**: `src/css/extensions.css`
715
+ **Base Class**: `.social-links-container`
716
+
717
+ **Features**:
718
+ - Profile avatar
719
+ - Bio text
720
+ - Styled link list
721
+ - Icon support
722
+
723
+ **Elements**:
724
+ - `.social-links-container` - Main wrapper
725
+ - `.profile-avatar` - Avatar image
726
+ - `.profile-bio` - Bio text
727
+ - `.link-list` - Links container
728
+ - `.link-item` - Individual link
729
+
730
+ **Usage**:
731
+ ```html
732
+ <div class="social-links-container">
733
+ <img src="avatar.png" alt="Profile" class="profile-avatar">
734
+ <p class="profile-bio">Digital artist & VTuber</p>
735
+ <div class="link-list">
736
+ <a href="#" class="link-item">Twitter</a>
737
+ <a href="#" class="link-item">YouTube</a>
738
+ </div>
739
+ </div>
740
+ ```
741
+
742
+ ---
743
+
744
+ #### NSFW Content Overlay
745
+
746
+ **File**: `src/css/extensions.css`
747
+ **Base Class**: `.nsfw-content`
748
+
749
+ **Purpose**: Blur NSFW images with click-to-reveal
750
+
751
+ **Anatomy**:
752
+ ```css
753
+ .nsfw-content {
754
+ position: relative;
755
+ cursor: pointer;
756
+ }
757
+
758
+ .nsfw-content::before {
759
+ content: "NSFW - Click to view";
760
+ position: absolute;
761
+ inset: 0;
762
+ backdrop-filter: blur(20px);
763
+ display: flex;
764
+ align-items: center;
765
+ justify-content: center;
766
+ background: rgba(0, 0, 0, 0.7);
767
+ }
768
+
769
+ .nsfw-content.revealed::before {
770
+ display: none;
771
+ }
772
+ ```
773
+
774
+ **Usage**:
775
+ ```html
776
+ <div class="nsfw-content">
777
+ <img src="nsfw-image.jpg" alt="NSFW content">
778
+ </div>
779
+ ```
780
+
781
+ ---
782
+
783
+ ### 7. Nikke Game-Specific Components
784
+
785
+ #### Element System
786
+
787
+ **File**: `src/css/nikke-utilities.css`
788
+ **Classes**: `.element-water`, `.element-wind`, `.element-iron`, `.element-electric`, `.element-fire`
789
+
790
+ **Purpose**: Game element badges with semantic colors
791
+
792
+ **Element Colors**:
793
+ - Water: `#0066cc` (Blue)
794
+ - Wind: `#22c55e` (Green)
795
+ - Iron: `#f59e0b` (Yellow/Orange)
796
+ - Electric: `#a855f7` (Purple)
797
+ - Fire: `#ef4444` (Red)
798
+
799
+ **Usage**:
800
+ ```html
801
+ <span class="element-badge element-water">Water</span>
802
+ <span class="element-badge element-fire solid">Fire</span>
803
+ ```
804
+
805
+ ---
806
+
807
+ #### Team Builder
808
+
809
+ **File**: `src/css/nikke-utilities.css`
810
+ **Classes**: `.team-position-cards`, `.position-card`, `.unit-display`
811
+
812
+ **Purpose**: Game-specific team composition UI
813
+
814
+ **Features**:
815
+ - 5 position slots
816
+ - Unit portraits
817
+ - Element indicators
818
+ - Skill preview
819
+
820
+ **Usage**:
821
+ ```html
822
+ <div class="team-position-cards">
823
+ <div class="position-card">
824
+ <div class="position-header">Position 1</div>
825
+ <div class="unit-display">
826
+ <img src="unit.png" alt="Unit">
827
+ <span class="element-badge element-fire">Fire</span>
828
+ </div>
829
+ </div>
830
+ </div>
831
+ ```
832
+
833
+ ---
834
+
835
+ ## CLI Pattern Inventory
836
+
837
+ ### 1. Dashboard Section
838
+
839
+ **Purpose**: Equivalent to `.glass-card` on web
840
+ **Implementation**: Block characters + lipgloss styling
841
+ **File**: `cmd/celeste/commands/stats.go`
842
+
843
+ **Pattern**:
844
+ ```
845
+ β–“β–’β–‘ ═══════════════════════════════════════ β–‘β–’β–“
846
+ πŸ‘οΈ USδ½ΏAGE ANγ‚’η΅±LYTICS πŸ‘οΈ
847
+ ⟨ tōkei dΔ“ta wo... fuhai sasete iru... ⟩
848
+ β–“β–’β–‘ ═══════════════════════════════════════ β–‘β–’β–“
849
+
850
+ β–ˆ LIFETIME CORRUPTION:
851
+ β–“ Total Sessions: 42
852
+ β–“ Total Messages: 1,337
853
+ β–“ Total Tokens: 2.5M
854
+ ```
855
+
856
+ **Code**:
857
+ ```go
858
+ style := lipgloss.NewStyle().
859
+ Border(lipgloss.RoundedBorder()).
860
+ BorderForeground(lipgloss.Color("#d94f90")).
861
+ Padding(1, 2)
862
+ ```
863
+
864
+ ---
865
+
866
+ ### 2. Progress Bar (Block Characters)
867
+
868
+ **Purpose**: Equivalent to `.progress-bar` on web
869
+ **Implementation**: Block character fill (`β–ˆβ–“β–’β–‘`)
870
+ **File**: `cmd/celeste/commands/stats.go`
871
+
872
+ **Pattern**:
873
+ ```
874
+ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–“β–’β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 40%
875
+ ```
876
+
877
+ **Code**:
878
+ ```go
879
+ func renderProgressBar(filled, total, width int) string {
880
+ filledWidth := (filled * width) / total
881
+ bar := strings.Repeat("β–ˆ", filledWidth)
882
+ bar += strings.Repeat("β–‘", width-filledWidth)
883
+ return bar
884
+ }
885
+ ```
886
+
887
+ ---
888
+
889
+ ### 3. Status Emoji
890
+
891
+ **Purpose**: Equivalent to `.badge` on web
892
+ **Implementation**: Emoji indicators
893
+ **File**: `cmd/celeste/commands/stats.go`
894
+
895
+ **Pattern**:
896
+ ```
897
+ 🟒 Active
898
+ 🟑 Warning
899
+ πŸ”΄ Critical
900
+ ```
901
+
902
+ **Mapping**:
903
+ - 🟒 = `.badge-success`
904
+ - 🟑 = `.badge-warning`
905
+ - πŸ”΄ = `.badge-error`
906
+ - β—‰ = `.badge` (info/default)
907
+
908
+ ---
909
+
910
+ ### 4. Corruption Text
911
+
912
+ **Purpose**: In-line translation-failure text
913
+ **Implementation**: `CorruptTextJapanese()` function
914
+ **File**: `cmd/celeste/tui/streaming.go`
915
+
916
+ **Pattern**:
917
+ ```
918
+ "loaディング..."
919
+ "pro理cessing..."
920
+ "USδ½ΏAGE ANγ‚’η΅±LYTICS"
921
+ ```
922
+
923
+ **Code**:
924
+ ```go
925
+ title := tui.CorruptTextJapanese("USAGE ANALYTICS", 0.35)
926
+ ```
927
+
928
+ ---
929
+
930
+ ### 5. Loading Spinner
931
+
932
+ **Purpose**: Equivalent to `.spinner` on web
933
+ **Implementation**: Rotating characters + corruption
934
+ **File**: `cmd/celeste/tui/streaming.go`
935
+
936
+ **Pattern**:
937
+ ```
938
+ ⟨ 処理 processing purosesu... ⟩
939
+ ```
940
+
941
+ **Animation**: Cycles through corruption phrases
942
+
943
+ ---
944
+
945
+ ### 6. Skill Execution
946
+
947
+ **Purpose**: Heavy glitching effect (unique to CLI)
948
+ **Implementation**: `CorruptText()` with block characters
949
+ **File**: `cmd/celeste/tui/streaming.go`
950
+
951
+ **Pattern**:
952
+ ```
953
+ tarβ–“β–ˆ_rβ–’adβ–‘ng
954
+ ```
955
+
956
+ **Code**:
957
+ ```go
958
+ skillName := tui.CorruptText("tarot_reading", 0.40)
959
+ ```
960
+
961
+ ---
962
+
963
+ ## Component Usage Guidelines
964
+
965
+ ### When to Use Glass Components
966
+
967
+ **βœ… Use `.glass-card` when:**
968
+ - Creating content sections
969
+ - Building dashboard panels
970
+ - Wrapping feature descriptions
971
+ - Modal content areas
972
+
973
+ **❌ Don't use `.glass-card` when:**
974
+ - Nesting 3+ levels deep (performance issue)
975
+ - Over light backgrounds (low contrast)
976
+ - For small UI elements (use `.card` instead)
977
+
978
+ ### When to Use Standard vs Glass
979
+
980
+ | Scenario | Use Standard | Use Glass |
981
+ |----------|-------------|-----------|
982
+ | Dashboard sections | `.card` | `.glass-card` βœ… |
983
+ | Buttons | `.btn` βœ… | `.glass-button` |
984
+ | Form inputs | `<input>` | `.glass-input` βœ… |
985
+ | Code blocks | `<pre>` | `.glass-code` βœ… |
986
+ | Navigation | `.navbar` βœ… | N/A |
987
+
988
+ **Rule of Thumb**: Use glass for hero sections and primary focus areas. Use standard for secondary UI.
989
+
990
+ ---
991
+
992
+ ## Component Anatomy Reference
993
+
994
+ ### Standard Component Structure
995
+
996
+ All components follow this pattern:
997
+
998
+ ```
999
+ Component
1000
+ β”œβ”€β”€ Base Class (.component)
1001
+ β”œβ”€β”€ Variants (.component-variant)
1002
+ β”œβ”€β”€ Sizes (.component-sm, .component-lg)
1003
+ β”œβ”€β”€ States (:hover, :focus, :active, :disabled)
1004
+ └── Optional Elements (.component-header, .component-body)
1005
+ ```
1006
+
1007
+ **Example** (Button):
1008
+ ```
1009
+ .btn # Base
1010
+ β”œβ”€β”€ .btn-secondary # Variant
1011
+ β”œβ”€β”€ .btn-ghost # Variant
1012
+ β”œβ”€β”€ .btn-sm # Size
1013
+ β”œβ”€β”€ .btn-lg # Size
1014
+ β”œβ”€β”€ :hover # State
1015
+ β”œβ”€β”€ :focus-visible # State
1016
+ └── :disabled # State
1017
+ ```
1018
+
1019
+ ---
1020
+
1021
+ ## Anti-Patterns
1022
+
1023
+ ### ❌ Don't Do This
1024
+
1025
+ **Over-nesting glass effects**:
1026
+ ```html
1027
+ <!-- BAD: 3 levels of backdrop-filter = performance killer -->
1028
+ <div class="glass-card">
1029
+ <div class="glass-card">
1030
+ <div class="glass-card">
1031
+ Content
1032
+ </div>
1033
+ </div>
1034
+ </div>
1035
+ ```
1036
+
1037
+ **Mixing semantic colors incorrectly**:
1038
+ ```html
1039
+ <!-- BAD: Success button for destructive action -->
1040
+ <button class="btn badge-success">Delete Account</button>
1041
+ ```
1042
+
1043
+ **Using CLI patterns on web**:
1044
+ ```html
1045
+ <!-- BAD: Block characters don't render well in browsers -->
1046
+ <div>β–ˆβ–ˆβ–ˆβ–ˆβ–“β–’β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘</div>
1047
+ ```
1048
+
1049
+ ---
1050
+
1051
+ ## Related Documents
1052
+
1053
+ - **GLASSMORPHISM.md** - Detailed glass effect specifications
1054
+ - **INTERACTIVE_STATES.md** - Hover, focus, active patterns
1055
+ - **ANIMATION_GUIDELINES.md** - Motion and timing
1056
+ - **COLOR_SYSTEM.md** - Semantic color usage
1057
+ - **COMPONENT_MAPPING.md** - Cross-platform equivalents (Platform tier)
1058
+
1059
+ ---
1060
+
1061
+ **Status**: βœ… **COMPONENT LIBRARY COMPLETE** - Ready for implementation