@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.
Files changed (44) hide show
  1. package/CHANGELOG.md +133 -0
  2. package/README.md +6 -0
  3. package/docs/CAPABILITIES.md +209 -0
  4. package/docs/CHARACTER_LEVEL_CORRUPTION.md +264 -0
  5. package/docs/CORRUPTION_PHRASES.md +529 -0
  6. package/docs/FUTURE_WORK.md +189 -0
  7. package/docs/IMPLEMENTATION_VALIDATION.md +401 -0
  8. package/docs/LLM_PROVIDERS.md +345 -0
  9. package/docs/PERSONALITY.md +128 -0
  10. package/docs/ROADMAP.md +266 -0
  11. package/docs/ROUTING.md +324 -0
  12. package/docs/STYLE_GUIDE.md +605 -0
  13. package/docs/brand/BRAND_OVERVIEW.md +413 -0
  14. package/docs/brand/COLOR_SYSTEM.md +583 -0
  15. package/docs/brand/DESIGN_TOKENS.md +1009 -0
  16. package/docs/brand/TRANSLATION_FAILURE_AESTHETIC.md +525 -0
  17. package/docs/brand/TYPOGRAPHY.md +624 -0
  18. package/docs/components/ANIMATION_GUIDELINES.md +901 -0
  19. package/docs/components/COMPONENT_LIBRARY.md +1061 -0
  20. package/docs/components/GLASSMORPHISM.md +602 -0
  21. package/docs/components/INTERACTIVE_STATES.md +766 -0
  22. package/docs/governance/CONTRIBUTION_GUIDELINES.md +593 -0
  23. package/docs/governance/DESIGN_SYSTEM_GOVERNANCE.md +451 -0
  24. package/docs/governance/VERSION_MANAGEMENT.md +447 -0
  25. package/docs/governance/VERSION_REFERENCES.md +229 -0
  26. package/docs/platforms/CLI_IMPLEMENTATION.md +1025 -0
  27. package/docs/platforms/COMPONENT_MAPPING.md +579 -0
  28. package/docs/platforms/NPM_PACKAGE.md +854 -0
  29. package/docs/platforms/WEB_IMPLEMENTATION.md +1221 -0
  30. package/docs/standards/ACCESSIBILITY.md +715 -0
  31. package/docs/standards/ANTI_PATTERNS.md +554 -0
  32. package/docs/standards/SPACING_SYSTEM.md +549 -0
  33. package/examples/button.html +1 -1
  34. package/examples/card.html +1 -1
  35. package/examples/form.html +1 -1
  36. package/examples/index.html +2 -2
  37. package/examples/layout.html +1 -1
  38. package/examples/nikke-team-builder.html +1 -1
  39. package/examples/showcase-complete.html +840 -15
  40. package/examples/showcase.html +1 -1
  41. package/package.json +4 -2
  42. package/src/css/components.css +676 -0
  43. package/src/lib/character-corruption.js +563 -0
  44. package/src/lib/components.js +283 -0
@@ -0,0 +1,854 @@
1
+ # NPM Package Guide
2
+
3
+ > **Celeste Brand System** | Platform Documentation
4
+ > **Document**: @whykusanagi/corrupted-theme NPM Package
5
+ > **Version**: 1.0.0
6
+ > **Last Updated**: 2025-12-13
7
+
8
+ ---
9
+
10
+ ## Table of Contents
11
+
12
+ 1. [Overview](#overview)
13
+ 2. [Installation](#installation)
14
+ 3. [Import Methods](#import-methods)
15
+ 4. [Package Structure](#package-structure)
16
+ 5. [Design Tokens](#design-tokens)
17
+ 6. [Theming & Customization](#theming--customization)
18
+ 7. [Framework Integration](#framework-integration)
19
+ 8. [Build Configuration](#build-configuration)
20
+ 9. [Version Management](#version-management)
21
+ 10. [Migration Guide](#migration-guide)
22
+
23
+ ---
24
+
25
+ ## Overview
26
+
27
+ **@whykusanagi/corrupted-theme** is the official CSS framework for the Celeste brand system, providing a complete implementation of the translation-failure corruption aesthetic with glassmorphism design.
28
+
29
+ ### Package Information
30
+
31
+ ```json
32
+ {
33
+ "name": "@whykusanagi/corrupted-theme",
34
+ "version": "0.1.2",
35
+ "description": "Premium corrupted AI aesthetic with glassmorphism and translation-failure linguistics",
36
+ "author": "Kusanagi <you@example.com>",
37
+ "license": "MIT",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/whykusanagi/corrupted-theme"
41
+ }
42
+ }
43
+ ```
44
+
45
+ ### Features
46
+
47
+ - ✅ **4,692 lines** of production-ready CSS
48
+ - ✅ **9 modular files** for selective imports
49
+ - ✅ **56 components** covering all common UI patterns
50
+ - ✅ **Design tokens** as CSS custom properties
51
+ - ✅ **Responsive design** (mobile-first, 3 breakpoints)
52
+ - ✅ **WCAG AA accessible** (tested contrast ratios)
53
+ - ✅ **Framework agnostic** (React, Vue, Svelte, vanilla)
54
+ - ✅ **8.2KB gzipped** (full theme)
55
+ - ✅ **Zero dependencies** (pure CSS)
56
+
57
+ ---
58
+
59
+ ## Installation
60
+
61
+ ### NPM
62
+
63
+ ```bash
64
+ npm install @whykusanagi/corrupted-theme
65
+ ```
66
+
67
+ ### Yarn
68
+
69
+ ```bash
70
+ yarn add @whykusanagi/corrupted-theme
71
+ ```
72
+
73
+ ### PNPM
74
+
75
+ ```bash
76
+ pnpm add @whykusanagi/corrupted-theme
77
+ ```
78
+
79
+ ### CDN (Unpkg)
80
+
81
+ ```html
82
+ <!-- Full theme (8.2KB gzipped) -->
83
+ <link rel="stylesheet" href="https://unpkg.com/@whykusanagi/corrupted-theme@0.1.2/dist/theme.css">
84
+ ```
85
+
86
+ ### Local Development
87
+
88
+ For local development or contributing:
89
+
90
+ ```bash
91
+ # Clone repository
92
+ git clone https://github.com/whykusanagi/corrupted-theme.git
93
+ cd corrupted-theme
94
+
95
+ # Install dependencies
96
+ npm install
97
+
98
+ # Build CSS
99
+ npm run build
100
+
101
+ # Watch mode (development)
102
+ npm run dev
103
+
104
+ # Link for local testing
105
+ npm link
106
+
107
+ # In your project
108
+ npm link @whykusanagi/corrupted-theme
109
+ ```
110
+
111
+ ---
112
+
113
+ ## Import Methods
114
+
115
+ ### Method 1: Full Theme (Simplest)
116
+
117
+ Import the complete pre-bundled theme (includes all modules):
118
+
119
+ ```javascript
120
+ // React/Next.js
121
+ import '@whykusanagi/corrupted-theme/dist/theme.css';
122
+
123
+ // Vue
124
+ import '@whykusanagi/corrupted-theme/dist/theme.css';
125
+
126
+ // Vanilla HTML
127
+ <link rel="stylesheet" href="node_modules/@whykusanagi/corrupted-theme/dist/theme.css">
128
+ ```
129
+
130
+ **Size**: 8.2KB gzipped
131
+ **Best for**: Quick prototyping, small projects, simple sites
132
+
133
+ ---
134
+
135
+ ### Method 2: Modular Imports (Optimized)
136
+
137
+ Import only the modules you need for smaller bundle size:
138
+
139
+ ```javascript
140
+ // Import in specific order (CRITICAL - see Import Order below)
141
+ import '@whykusanagi/corrupted-theme/src/css/variables.css'; // Required first
142
+ import '@whykusanagi/corrupted-theme/src/css/base.css'; // Resets
143
+ import '@whykusanagi/corrupted-theme/src/css/glass.css'; // Glassmorphism
144
+ import '@whykusanagi/corrupted-theme/src/css/components.css'; // UI components
145
+ ```
146
+
147
+ **Size**: 2.1KB - 8.2KB (depending on modules)
148
+ **Best for**: Production apps, tree-shaking, performance optimization
149
+
150
+ ---
151
+
152
+ ### Method 3: Direct Source (Advanced)
153
+
154
+ Import raw CSS for custom builds with PostCSS:
155
+
156
+ ```javascript
157
+ // Import source files (requires PostCSS setup)
158
+ import '@whykusanagi/corrupted-theme/src/css/variables.css';
159
+ import '@whykusanagi/corrupted-theme/src/css/components.css';
160
+
161
+ // PostCSS will process:
162
+ // - CSS nesting
163
+ // - Custom properties
164
+ // - Autoprefixer
165
+ // - Minification
166
+ ```
167
+
168
+ **Best for**: Custom build pipelines, advanced optimization, hybrid frameworks
169
+
170
+ ---
171
+
172
+ ## Package Structure
173
+
174
+ ### File Organization
175
+
176
+ ```
177
+ @whykusanagi/corrupted-theme/
178
+ ├── dist/ # Compiled output (use in production)
179
+ │ ├── theme.css # Full bundle (8.2KB gzipped)
180
+ │ └── theme.min.css # Minified (7.8KB gzipped)
181
+ ├── src/
182
+ │ └── css/ # Source files (modular imports)
183
+ │ ├── variables.css # Design tokens (73 lines)
184
+ │ ├── base.css # Resets, typography (210 lines)
185
+ │ ├── animations.css # Keyframe animations (180 lines)
186
+ │ ├── glass.css # Glassmorphism effects (140 lines)
187
+ │ ├── layout.css # Grid, flexbox utilities (95 lines)
188
+ │ ├── components.css # UI components (2,800 lines)
189
+ │ ├── interactive.css # Hover/focus states (480 lines)
190
+ │ ├── utilities.css # Helper classes (320 lines)
191
+ │ └── theme.css # Main entry (imports all)
192
+ ├── tokens/ # Design tokens (future)
193
+ │ ├── design-tokens.json # W3C DTCG format (planned)
194
+ │ ├── tokens.css # Generated CSS variables (planned)
195
+ │ └── tokens.ts # TypeScript types (planned)
196
+ ├── examples/ # Usage examples
197
+ │ ├── vanilla/ # Plain HTML/CSS/JS
198
+ │ ├── react/ # React examples
199
+ │ └── vue/ # Vue examples
200
+ ├── docs/ # Package documentation
201
+ │ ├── COMPONENTS_REFERENCE.md # Component API docs
202
+ │ └── MIGRATION.md # Upgrade guides
203
+ ├── package.json
204
+ └── README.md
205
+ ```
206
+
207
+ ### Import Order (CRITICAL)
208
+
209
+ CSS files **must** be imported in this order to ensure proper cascading:
210
+
211
+ ```javascript
212
+ // 1. Variables (ALWAYS FIRST)
213
+ import '@whykusanagi/corrupted-theme/src/css/variables.css';
214
+
215
+ // 2. Base (resets, defaults)
216
+ import '@whykusanagi/corrupted-theme/src/css/base.css';
217
+
218
+ // 3. Animations (used by components)
219
+ import '@whykusanagi/corrupted-theme/src/css/animations.css';
220
+
221
+ // 4. Glass effects (backdrop-filter setup)
222
+ import '@whykusanagi/corrupted-theme/src/css/glass.css';
223
+
224
+ // 5. Layout (grid, containers)
225
+ import '@whykusanagi/corrupted-theme/src/css/layout.css';
226
+
227
+ // 6. Components (UI elements)
228
+ import '@whykusanagi/corrupted-theme/src/css/components.css';
229
+
230
+ // 7. Interactive states (hover, focus)
231
+ import '@whykusanagi/corrupted-theme/src/css/interactive.css';
232
+
233
+ // 8. Utilities (last to override)
234
+ import '@whykusanagi/corrupted-theme/src/css/utilities.css';
235
+ ```
236
+
237
+ **Why order matters**:
238
+ - Variables must load before any styles that reference them
239
+ - Base styles must apply before components
240
+ - Utilities must override component defaults
241
+
242
+ ---
243
+
244
+ ## Design Tokens
245
+
246
+ ### CSS Custom Properties
247
+
248
+ All design tokens are exposed as CSS custom properties in `variables.css`:
249
+
250
+ ```css
251
+ :root {
252
+ /* Colors */
253
+ --color-accent: #d94f90;
254
+ --color-accent-light: #e86ca8;
255
+ --color-accent-dark: #b61b70;
256
+ --color-secondary-purple: #8b5cf6;
257
+ --color-secondary-cyan: #00d4ff;
258
+
259
+ /* Backgrounds */
260
+ --color-bg-dark: #0a0612;
261
+ --color-bg-medium: #140c28;
262
+ --color-bg-light: #1c1230;
263
+
264
+ /* Glass effects */
265
+ --glass-bg: rgba(20, 12, 40, 0.7);
266
+ --glass-bg-light: rgba(28, 18, 48, 0.5);
267
+ --glass-bg-darker: rgba(10, 6, 18, 0.8);
268
+ --glass-blur: 15px;
269
+ --glass-blur-light: 10px;
270
+ --glass-blur-heavy: 20px;
271
+
272
+ /* Spacing (8pt scale) */
273
+ --spacing-xs: 0.25rem; /* 4px */
274
+ --spacing-sm: 0.5rem; /* 8px */
275
+ --spacing-md: 1rem; /* 16px */
276
+ --spacing-lg: 1.5rem; /* 24px */
277
+ --spacing-xl: 2rem; /* 32px */
278
+ --spacing-2xl: 3rem; /* 48px */
279
+
280
+ /* Typography */
281
+ --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
282
+ 'Hiragino Sans', 'Yu Gothic', sans-serif;
283
+ --font-size-xs: 0.75rem; /* 12px */
284
+ --font-size-sm: 0.875rem; /* 14px */
285
+ --font-size-base: 1rem; /* 16px */
286
+ --font-size-lg: 1.125rem; /* 18px */
287
+ --font-size-xl: 1.25rem; /* 20px */
288
+ --font-size-2xl: 1.5rem; /* 24px */
289
+ --font-size-3xl: 2rem; /* 32px */
290
+ --font-size-4xl: 2.5rem; /* 40px */
291
+ --font-size-5xl: 3.75rem; /* 60px */
292
+
293
+ /* Border radius */
294
+ --radius-sm: 4px;
295
+ --radius-md: 8px;
296
+ --radius-lg: 12px;
297
+ --radius-xl: 16px;
298
+ --radius-full: 9999px;
299
+
300
+ /* Shadows */
301
+ --shadow-sm: 0 1px 2px rgba(217, 79, 144, 0.1);
302
+ --shadow-md: 0 4px 8px rgba(217, 79, 144, 0.15);
303
+ --shadow-lg: 0 8px 16px rgba(217, 79, 144, 0.2);
304
+ --shadow-xl: 0 12px 24px rgba(217, 79, 144, 0.25);
305
+
306
+ /* Transitions */
307
+ --transition-fast: 0.15s ease;
308
+ --transition-normal: 0.3s ease;
309
+ --transition-slow: 0.5s ease;
310
+
311
+ /* Z-index scale */
312
+ --z-dropdown: 1000;
313
+ --z-modal: 1050;
314
+ --z-popover: 1100;
315
+ --z-tooltip: 1200;
316
+ }
317
+ ```
318
+
319
+ ### Using Design Tokens
320
+
321
+ ```css
322
+ /* Reference tokens in your custom CSS */
323
+ .custom-card {
324
+ background: var(--glass-bg);
325
+ backdrop-filter: blur(var(--glass-blur));
326
+ border: 1px solid var(--color-accent);
327
+ border-radius: var(--radius-lg);
328
+ padding: var(--spacing-xl);
329
+ box-shadow: var(--shadow-lg);
330
+ transition: transform var(--transition-fast);
331
+ }
332
+
333
+ .custom-card:hover {
334
+ transform: translateY(-4px);
335
+ box-shadow: var(--shadow-xl);
336
+ }
337
+ ```
338
+
339
+ ### Programmatic Access (JavaScript)
340
+
341
+ ```javascript
342
+ // Read design tokens in JavaScript
343
+ const styles = getComputedStyle(document.documentElement);
344
+
345
+ const accentColor = styles.getPropertyValue('--color-accent'); // "#d94f90"
346
+ const spacingMd = styles.getPropertyValue('--spacing-md'); // "1rem"
347
+ const transitionFast = styles.getPropertyValue('--transition-fast'); // "0.15s ease"
348
+
349
+ console.log(`Accent color: ${accentColor}`);
350
+
351
+ // Modify tokens at runtime (theming)
352
+ document.documentElement.style.setProperty('--color-accent', '#8b5cf6'); // Change to purple
353
+ ```
354
+
355
+ ---
356
+
357
+ ## Theming & Customization
358
+
359
+ ### Override Default Tokens
360
+
361
+ Create a custom theme by overriding CSS variables:
362
+
363
+ ```css
364
+ /* custom-theme.css */
365
+ :root {
366
+ /* Change primary color from pink to purple */
367
+ --color-accent: #8b5cf6;
368
+ --color-accent-light: #a78bfa;
369
+ --color-accent-dark: #7c3aed;
370
+
371
+ /* Adjust glass opacity */
372
+ --glass-bg: rgba(20, 12, 40, 0.85); /* More opaque */
373
+
374
+ /* Larger border radius */
375
+ --radius-md: 12px;
376
+ --radius-lg: 16px;
377
+
378
+ /* Faster animations */
379
+ --transition-normal: 0.2s ease;
380
+ }
381
+ ```
382
+
383
+ ```javascript
384
+ // Import order: theme THEN custom overrides
385
+ import '@whykusanagi/corrupted-theme/dist/theme.css';
386
+ import './custom-theme.css'; // Overrides
387
+ ```
388
+
389
+ ### Dark/Light Mode Toggle
390
+
391
+ ```css
392
+ /* Light mode overrides */
393
+ [data-theme="light"] {
394
+ --color-bg-dark: #f5f5f5;
395
+ --color-bg-medium: #e5e5e5;
396
+ --color-text-primary: #000000;
397
+ --glass-bg: rgba(255, 255, 255, 0.7);
398
+ }
399
+
400
+ /* Dark mode (default) */
401
+ [data-theme="dark"] {
402
+ /* Uses root defaults */
403
+ }
404
+ ```
405
+
406
+ ```javascript
407
+ // Toggle theme
408
+ function toggleTheme() {
409
+ const current = document.documentElement.getAttribute('data-theme');
410
+ const next = current === 'dark' ? 'light' : 'dark';
411
+ document.documentElement.setAttribute('data-theme', next);
412
+ localStorage.setProperty('theme', next);
413
+ }
414
+
415
+ // Persist theme
416
+ const savedTheme = localStorage.getItem('theme') || 'dark';
417
+ document.documentElement.setAttribute('data-theme', savedTheme);
418
+ ```
419
+
420
+ ### Component-Level Customization
421
+
422
+ ```css
423
+ /* Override specific components */
424
+ .glass-card {
425
+ /* Default theme provides base styles */
426
+
427
+ /* Add custom properties */
428
+ --card-padding: var(--spacing-2xl); /* Larger padding */
429
+ --card-radius: var(--radius-xl); /* More rounded */
430
+
431
+ padding: var(--card-padding);
432
+ border-radius: var(--card-radius);
433
+ }
434
+
435
+ /* Custom card variant */
436
+ .glass-card-compact {
437
+ --card-padding: var(--spacing-sm); /* Compact version */
438
+ }
439
+ ```
440
+
441
+ ---
442
+
443
+ ## Framework Integration
444
+
445
+ ### React + TypeScript
446
+
447
+ ```typescript
448
+ // App.tsx
449
+ import '@whykusanagi/corrupted-theme/dist/theme.css';
450
+ import { useState } from 'react';
451
+
452
+ // Optional: Type-safe design tokens
453
+ type DesignToken =
454
+ | '--color-accent'
455
+ | '--spacing-md'
456
+ | '--transition-fast';
457
+
458
+ function getToken(token: DesignToken): string {
459
+ return getComputedStyle(document.documentElement).getPropertyValue(token);
460
+ }
461
+
462
+ function App() {
463
+ const [count, setCount] = useState(0);
464
+
465
+ return (
466
+ <div className="container">
467
+ <div className="glass-card">
468
+ <h1 className="corrupted-text">US使R 統NTERFACE</h1>
469
+ <p>Count: {count}</p>
470
+ <button className="btn btn-primary" onClick={() => setCount(count + 1)}>
471
+ Increment
472
+ </button>
473
+ </div>
474
+ </div>
475
+ );
476
+ }
477
+
478
+ export default App;
479
+ ```
480
+
481
+ ### Vue 3 + Vite
482
+
483
+ ```vue
484
+ <!-- App.vue -->
485
+ <script setup lang="ts">
486
+ import { ref } from 'vue';
487
+ import '@whykusanagi/corrupted-theme/dist/theme.css';
488
+
489
+ const count = ref(0);
490
+ </script>
491
+
492
+ <template>
493
+ <div class="container">
494
+ <div class="glass-card">
495
+ <h1 class="corrupted-text">US使R 統NTERFACE</h1>
496
+ <p>Count: {{ count }}</p>
497
+ <button class="btn btn-primary" @click="count++">
498
+ Increment
499
+ </button>
500
+ </div>
501
+ </div>
502
+ </template>
503
+ ```
504
+
505
+ ### Next.js (App Router)
506
+
507
+ ```typescript
508
+ // app/layout.tsx
509
+ import '@whykusanagi/corrupted-theme/dist/theme.css';
510
+ import type { Metadata } from 'next';
511
+
512
+ export const metadata: Metadata = {
513
+ title: 'Celeste App',
514
+ description: 'Premium corrupted AI aesthetic',
515
+ };
516
+
517
+ export default function RootLayout({
518
+ children,
519
+ }: {
520
+ children: React.ReactNode;
521
+ }) {
522
+ return (
523
+ <html lang="en">
524
+ <body>{children}</body>
525
+ </html>
526
+ );
527
+ }
528
+ ```
529
+
530
+ ### Svelte
531
+
532
+ ```svelte
533
+ <!-- App.svelte -->
534
+ <script lang="ts">
535
+ import '@whykusanagi/corrupted-theme/dist/theme.css';
536
+ let count = 0;
537
+ </script>
538
+
539
+ <div class="container">
540
+ <div class="glass-card">
541
+ <h1 class="corrupted-text">US使R 統NTERFACE</h1>
542
+ <p>Count: {count}</p>
543
+ <button class="btn btn-primary" on:click={() => count++}>
544
+ Increment
545
+ </button>
546
+ </div>
547
+ </div>
548
+ ```
549
+
550
+ ---
551
+
552
+ ## Build Configuration
553
+
554
+ ### Vite
555
+
556
+ ```javascript
557
+ // vite.config.js
558
+ import { defineConfig } from 'vite';
559
+
560
+ export default defineConfig({
561
+ css: {
562
+ devSourcemap: true, // Enable CSS source maps
563
+ },
564
+ build: {
565
+ cssCodeSplit: true, // Split CSS by route
566
+ rollupOptions: {
567
+ output: {
568
+ assetFileNames: (assetInfo) => {
569
+ // Hash CSS files for caching
570
+ if (assetInfo.name.endsWith('.css')) {
571
+ return 'assets/[name].[hash].css';
572
+ }
573
+ return 'assets/[name].[hash][extname]';
574
+ },
575
+ },
576
+ },
577
+ },
578
+ });
579
+ ```
580
+
581
+ ### Webpack
582
+
583
+ ```javascript
584
+ // webpack.config.js
585
+ module.exports = {
586
+ module: {
587
+ rules: [
588
+ {
589
+ test: /\.css$/,
590
+ use: [
591
+ 'style-loader',
592
+ 'css-loader',
593
+ {
594
+ loader: 'postcss-loader',
595
+ options: {
596
+ postcssOptions: {
597
+ plugins: [
598
+ 'autoprefixer',
599
+ 'cssnano', // Minification
600
+ ],
601
+ },
602
+ },
603
+ },
604
+ ],
605
+ },
606
+ ],
607
+ },
608
+ };
609
+ ```
610
+
611
+ ### PostCSS
612
+
613
+ ```javascript
614
+ // postcss.config.js
615
+ module.exports = {
616
+ plugins: {
617
+ 'postcss-import': {}, // Resolve @import
618
+ 'postcss-nesting': {}, // CSS nesting support
619
+ 'autoprefixer': {}, // Vendor prefixes
620
+ 'cssnano': { // Minification
621
+ preset: ['default', {
622
+ discardComments: {
623
+ removeAll: true,
624
+ },
625
+ }],
626
+ },
627
+ },
628
+ };
629
+ ```
630
+
631
+ ### Tailwind CSS Integration (Optional)
632
+
633
+ ```javascript
634
+ // tailwind.config.js
635
+ module.exports = {
636
+ content: ['./src/**/*.{html,js,ts,jsx,tsx}'],
637
+ theme: {
638
+ extend: {
639
+ colors: {
640
+ // Import Celeste colors
641
+ accent: {
642
+ DEFAULT: '#d94f90',
643
+ light: '#e86ca8',
644
+ dark: '#b61b70',
645
+ },
646
+ },
647
+ fontFamily: {
648
+ sans: ['-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Hiragino Sans', 'Yu Gothic'],
649
+ },
650
+ },
651
+ },
652
+ plugins: [],
653
+ };
654
+ ```
655
+
656
+ ---
657
+
658
+ ## Version Management
659
+
660
+ ### Semantic Versioning
661
+
662
+ The package follows [Semantic Versioning 2.0.0](https://semver.org/):
663
+
664
+ ```
665
+ MAJOR.MINOR.PATCH
666
+
667
+ Example: 0.1.2
668
+ │ │ └─ Patch: Bug fixes (backward compatible)
669
+ │ └─── Minor: New features (backward compatible)
670
+ └───── Major: Breaking changes
671
+ ```
672
+
673
+ ### Version History
674
+
675
+ | Version | Date | Changes | Migration |
676
+ |---------|------|---------|-----------|
677
+ | **0.1.2** | 2025-12-10 | Current stable release | N/A |
678
+ | 0.1.1 | 2025-11-15 | Added interactive states | None required |
679
+ | 0.1.0 | 2025-10-01 | Initial public release | N/A |
680
+
681
+ ### Upgrade Strategy
682
+
683
+ ```bash
684
+ # Check current version
685
+ npm list @whykusanagi/corrupted-theme
686
+
687
+ # Update to latest patch (safest)
688
+ npm update @whykusanagi/corrupted-theme
689
+
690
+ # Update to latest minor version
691
+ npm install @whykusanagi/corrupted-theme@^0.2.0
692
+
693
+ # Update to specific version
694
+ npm install @whykusanagi/corrupted-theme@0.1.2
695
+
696
+ # Update to latest (including major - may have breaking changes)
697
+ npm install @whykusanagi/corrupted-theme@latest
698
+ ```
699
+
700
+ ### Breaking Change Policy
701
+
702
+ **Major version changes** may include:
703
+ - Renamed CSS classes (e.g., `.card` → `.glass-card`)
704
+ - Removed components (deprecated >1 version ago)
705
+ - Changed design token names
706
+ - Modified default values (colors, spacing, etc.)
707
+ - Dropped browser support
708
+
709
+ **Migration guides** are provided in `docs/MIGRATION.md` for each major version.
710
+
711
+ ---
712
+
713
+ ## Migration Guide
714
+
715
+ ### From v0.1.x to v0.2.x (Future)
716
+
717
+ **Planned breaking changes**:
718
+ 1. Design tokens moved to external JSON file
719
+ 2. CSS custom property names standardized (e.g., `--accent` → `--color-accent`)
720
+ 3. Component naming conventions updated
721
+
722
+ ```css
723
+ /* Before (v0.1.x) */
724
+ .card {
725
+ background: var(--glass-bg);
726
+ }
727
+
728
+ /* After (v0.2.x) */
729
+ .glass-card { /* Renamed for clarity */
730
+ background: var(--color-bg-glass); /* Standardized naming */
731
+ }
732
+ ```
733
+
734
+ **Automated migration**:
735
+ ```bash
736
+ # Install migration tool (future)
737
+ npm install -g @whykusanagi/theme-migrate
738
+
739
+ # Run migration
740
+ theme-migrate upgrade 0.1.x 0.2.x ./src
741
+ ```
742
+
743
+ ### From Custom CSS to Corrupted Theme
744
+
745
+ **Step 1**: Install package
746
+ ```bash
747
+ npm install @whykusanagi/corrupted-theme
748
+ ```
749
+
750
+ **Step 2**: Replace custom styles incrementally
751
+ ```html
752
+ <!-- Before -->
753
+ <style>
754
+ .my-card {
755
+ background: rgba(20, 12, 40, 0.7);
756
+ backdrop-filter: blur(15px);
757
+ border-radius: 8px;
758
+ padding: 2rem;
759
+ }
760
+ </style>
761
+ <div class="my-card">Content</div>
762
+
763
+ <!-- After -->
764
+ <link rel="stylesheet" href="node_modules/@whykusanagi/corrupted-theme/dist/theme.css">
765
+ <div class="glass-card">Content</div> <!-- Use built-in component -->
766
+ ```
767
+
768
+ **Step 3**: Migrate colors to design tokens
769
+ ```css
770
+ /* Before */
771
+ .custom-element {
772
+ color: #d94f90;
773
+ background: #0a0612;
774
+ }
775
+
776
+ /* After */
777
+ .custom-element {
778
+ color: var(--color-accent);
779
+ background: var(--color-bg-dark);
780
+ }
781
+ ```
782
+
783
+ ---
784
+
785
+ ## Troubleshooting
786
+
787
+ ### Issue: Styles Not Applying
788
+
789
+ **Problem**: Components don't render correctly
790
+
791
+ **Solutions**:
792
+ 1. Check import order (variables.css must be first)
793
+ 2. Ensure CSS is actually imported (check browser DevTools)
794
+ 3. Verify no CSS conflicts with other frameworks
795
+
796
+ ```javascript
797
+ // ✅ Correct order
798
+ import '@whykusanagi/corrupted-theme/src/css/variables.css';
799
+ import '@whykusanagi/corrupted-theme/src/css/components.css';
800
+
801
+ // ❌ Wrong order
802
+ import '@whykusanagi/corrupted-theme/src/css/components.css';
803
+ import '@whykusanagi/corrupted-theme/src/css/variables.css'; // Too late!
804
+ ```
805
+
806
+ ### Issue: Large Bundle Size
807
+
808
+ **Problem**: CSS bundle is too large
809
+
810
+ **Solutions**:
811
+ 1. Use modular imports instead of full theme
812
+ 2. Enable CSS tree-shaking in build config
813
+ 3. Remove unused utility classes
814
+
815
+ ```javascript
816
+ // Before: 8.2KB (full theme)
817
+ import '@whykusanagi/corrupted-theme/dist/theme.css';
818
+
819
+ // After: ~3KB (only what you need)
820
+ import '@whykusanagi/corrupted-theme/src/css/variables.css';
821
+ import '@whykusanagi/corrupted-theme/src/css/glass.css';
822
+ import '@whykusanagi/corrupted-theme/src/css/components.css';
823
+ ```
824
+
825
+ ### Issue: Backdrop-Filter Not Working
826
+
827
+ **Problem**: Glass effect appears solid
828
+
829
+ **Solution**: Add vendor prefix for Safari
830
+
831
+ ```css
832
+ /* Package already includes this, but if using custom CSS: */
833
+ .glass-card {
834
+ backdrop-filter: blur(15px); /* Standard */
835
+ -webkit-backdrop-filter: blur(15px); /* Safari */
836
+ }
837
+ ```
838
+
839
+ ---
840
+
841
+ ## Related Documentation
842
+
843
+ - [WEB_IMPLEMENTATION.md](./WEB_IMPLEMENTATION.md) - Complete web platform guide
844
+ - [COMPONENT_MAPPING.md](./COMPONENT_MAPPING.md) - Component reference
845
+ - [DESIGN_TOKENS.md](../brand/DESIGN_TOKENS.md) - Token specifications
846
+ - [COMPONENT_LIBRARY.md](../components/COMPONENT_LIBRARY.md) - All available components
847
+
848
+ ---
849
+
850
+ **Last Updated**: 2025-12-13
851
+ **Version**: 1.0.0
852
+ **Package Version**: 0.1.2
853
+ **Maintainer**: Celeste Brand System
854
+ **Status**: ✅ Production Ready