@whykusanagi/corrupted-theme 0.1.0 → 0.1.2

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 CHANGED
@@ -21,6 +21,168 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
21
21
 
22
22
  ---
23
23
 
24
+ ## [0.1.2] - 2025-11-26
25
+
26
+ ### Added
27
+
28
+ #### Extension Components (`src/css/extensions.css`)
29
+ Production-tested components from whykusanagi.xyz, now part of the core package:
30
+
31
+ - **Gallery System**
32
+ - `.gallery-container` - Responsive grid layout with variants (compact, large)
33
+ - `.gallery-item` - Image cards with aspect ratio options (square, portrait, landscape)
34
+ - `.filter-bar` and `.filter-btn` - Category filtering with animated transitions
35
+ - `gallery.js` - JavaScript module for filtering, lightbox, and NSFW handling
36
+
37
+ - **Lightbox Component**
38
+ - `.lightbox` - Fullscreen image viewer overlay
39
+ - `.lightbox-image`, `.lightbox-close`, `.lightbox-prev`, `.lightbox-next`
40
+ - `.lightbox-caption`, `.lightbox-counter`
41
+ - Keyboard navigation (Arrow keys, Escape)
42
+ - Touch gesture support for mobile
43
+
44
+ - **NSFW Content Blur**
45
+ - `.nsfw-content` - Click-to-reveal blur overlay
46
+ - Custom warning text via `data-warning` attribute
47
+ - `.revealed` state for toggling visibility
48
+ - Auto-reveal in lightbox mode
49
+
50
+ - **Social Links List**
51
+ - `.social-links-container` - Link-in-bio layout
52
+ - `.profile-avatar` - Circular avatar with glow (sm, default, lg sizes)
53
+ - `.profile-name`, `.profile-bio` - Profile text components
54
+ - `.link-list`, `.link-item` - Styled link buttons
55
+ - Platform-specific hover colors (twitter, instagram, youtube, github, discord, twitch)
56
+
57
+ - **Countdown Widget**
58
+ - `.countdown-container`, `.shape-container` - Event countdown layout
59
+ - Shape variants: diamond, circle, heart, star, hexagon, octagon
60
+ - `.countdown-box`, `.countdown-timer` - Timer display
61
+ - `.countdown-popup` - Animated popup messages
62
+ - `.countdown-character`, `.countdown-overlay-wrapper` - Image support
63
+ - `countdown-widget.js` - JavaScript module with JSON config support
64
+
65
+ #### New JavaScript Modules (`src/lib/`)
66
+ - `gallery.js` - Gallery system with filtering, lightbox, and NSFW handling
67
+ - `countdown-widget.js` - Countdown widget with JSON configuration
68
+
69
+ #### New Package Exports
70
+ ```javascript
71
+ '@whykusanagi/corrupted-theme/extensions' // extensions.css
72
+ '@whykusanagi/corrupted-theme/gallery' // gallery.js
73
+ '@whykusanagi/corrupted-theme/countdown' // countdown-widget.js
74
+ ```
75
+
76
+ #### Example Pages
77
+ - `examples/extensions-showcase.html` - Interactive demo for all extension components
78
+ - `examples/index.html` - Central landing hub for the design system with categorized navigation
79
+ - `examples/assets/celeste-avatar.png` - Local avatar image for demos
80
+
81
+ #### Design System Architecture
82
+ - **Central Landing Hub** (`examples/index.html`)
83
+ - Hero section with quick install instructions
84
+ - Categorized cards linking to Core Components, Extensions, Glass Components, API Docs, Nikke, Animations
85
+ - Quick links for common component pages
86
+ - Professional Netflix/Meta-level information architecture
87
+
88
+ - **Global Navigation System**
89
+ - Consistent navigation bar across all 9 example pages
90
+ - Home, Components (dropdown), Extensions (dropdown), Examples (dropdown), Docs links
91
+ - Section anchors in dropdowns for quick navigation
92
+ - Proper active state highlighting
93
+
94
+ ### Fixed
95
+
96
+ #### Chrome White Background Flash
97
+ - **Added:** `background-color: var(--bg)` to both `html` and `body` in `typography.css`
98
+ - **Why:** Chrome browsers showed white flash before CSS variables loaded
99
+ - **Impact:** Consistent dark background across all browsers immediately on load
100
+
101
+ #### Navigation Consistency
102
+ - **Updated:** All 9 example pages now have identical global navigation
103
+ - **Why:** Some pages (button.html, card.html, form.html, layout.html) had minimal "Back" links only
104
+ - **Impact:** Users can navigate the entire design system from any page
105
+
106
+ #### Dead Links Fixed
107
+ - **Fixed:** "Customization" links pointed to non-existent `CUSTOMIZATION.md`
108
+ - **Changed to:** `COMPONENTS_REFERENCE.md#customization`
109
+ - **Fixed:** Backgrounds section link added to Components dropdown
110
+
111
+ #### Image Hotlinking
112
+ - **Removed:** All Unsplash hotlinks (9 instances)
113
+ - **Replaced with:** Local `assets/celeste-avatar.png` and `placehold.co` placeholders
114
+ - **Why:** External hotlinks may break, cause CORS issues, or violate terms
115
+ - **Impact:** All demo images load reliably in any environment
116
+
117
+ ### Changed
118
+
119
+ #### Documentation Updates
120
+ - **README.md** - Added "Extension Components" section with usage examples
121
+ - **COMPONENTS_REFERENCE.md** - Added full documentation for all extension components
122
+ - Updated table of contents in both files
123
+
124
+ #### CSS Architecture
125
+ - `theme.css` now imports `extensions.css` automatically
126
+ - Cleaned up duplicate NSFW styles (now in extensions.css only)
127
+ - Added explicit background color to `html` element for faster paint
128
+
129
+ #### Example Page Updates
130
+ - All example pages updated with consistent global navigation
131
+ - `showcase-complete.html` - Added `id="backgrounds"` anchor and dropdown link
132
+ - `index.html` - Transformed into design system landing hub
133
+ - Layouts page added to Examples dropdown across all pages
134
+
135
+ ### Files Added
136
+ - `src/css/extensions.css`
137
+ - `src/lib/gallery.js`
138
+ - `src/lib/countdown-widget.js`
139
+ - `examples/extensions-showcase.html`
140
+ - `examples/assets/celeste-avatar.png`
141
+
142
+ ---
143
+
144
+ ## [0.1.1] - 2025-11-26
145
+
146
+ ### Fixed
147
+
148
+ #### Navbar Z-Index Issue
149
+ - **Changed:** `--z-navbar` from `500` to `1000` in `variables.css`
150
+ - **Why:** Navbar was appearing behind content when using video backgrounds with `.app-shell` structure
151
+ - **Impact:** Navbar now always renders above all content layers
152
+
153
+ #### Navbar Styles Not Available with Modular Imports
154
+ - **Moved:** All navbar styles (`nav.navbar`, `.navbar-content`, `.navbar-logo`, `.navbar-links`) from `theme.css` to `components.css`
155
+ - **Why:** When using modular imports (as documented), navbar styles were missing because they only existed in `theme.css`
156
+ - **Impact:** Navbar now works correctly with both single-file and modular import methods
157
+
158
+ ### Changed
159
+
160
+ #### Documentation Improvements
161
+ - **Added:** "Video Backgrounds with Navigation" section to README
162
+ - Proper navbar placement outside `.app-shell` for z-index stacking
163
+ - Complete z-index hierarchy table with all tokens
164
+ - HTML structure example for video backgrounds with navigation
165
+
166
+ - **Added:** "HTML Import Methods" section to README
167
+ - Method 1: Single file import (recommended)
168
+ - Method 2: Modular imports with correct dependency order
169
+ - CSS `@import` syntax examples
170
+ - HTML `<link>` tag syntax examples
171
+ - Explanation of why import order matters
172
+
173
+ #### CSS Architecture
174
+ - Navbar responsive styles consolidated in `components.css`
175
+ - Removed duplicate navbar styles from `theme.css`
176
+ - Z-index values now use CSS custom properties consistently (`var(--z-negative)`, `var(--z-background)`, etc.)
177
+
178
+ ### Files Modified
179
+ - `src/css/variables.css` - Z-index value change
180
+ - `src/css/components.css` - Added navbar base styles and responsive styles
181
+ - `src/css/theme.css` - Removed navbar styles (now imported via components.css)
182
+ - `README.md` - Enhanced documentation
183
+
184
+ ---
185
+
24
186
  ## [0.1.0] - 2025-11-23
25
187
 
26
188
  ### Added
package/README.md CHANGED
@@ -11,13 +11,14 @@ A production-ready glassmorphic design system for cinematic, cyberpunk-inspired
11
11
  6. [Component Quick Reference](#component-quick-reference)
12
12
  7. [Animations & Experience Layer](#animations--experience-layer)
13
13
  8. [Nikke Utilities](#nikke-utilities)
14
- 9. [Customization & Tokens](#customization--tokens)
15
- 10. [Coding Standards](#coding-standards)
16
- 11. [Development Workflow](#development-workflow)
17
- 12. [Testing & QA Expectations](#testing--qa-expectations)
18
- 13. [Support](#support)
19
- 14. [Celeste Widget Integration](#celeste-widget-integration-optional)
20
- 15. [License](#license)
14
+ 9. [Extension Components](#extension-components)
15
+ 10. [Customization & Tokens](#customization--tokens)
16
+ 11. [Coding Standards](#coding-standards)
17
+ 12. [Development Workflow](#development-workflow)
18
+ 13. [Testing & QA Expectations](#testing--qa-expectations)
19
+ 14. [Support](#support)
20
+ 15. [Celeste Widget Integration](#celeste-widget-integration-optional)
21
+ 16. [License](#license)
21
22
 
22
23
  ## Overview
23
24
  - **Glassmorphism-first** visual language with layered depth, gradients, and scanlines.
@@ -76,6 +77,16 @@ Copy `src/css` into your project (or use `dist/theme.min.css`) and import it loc
76
77
  - `npm run dev:proxy` – Celeste proxy (port 5000)
77
78
 
78
79
  ## Base Layout & Background
80
+
81
+ ### Static Background
82
+ ```html
83
+ <body>
84
+ <div class="glass-backdrop"></div>
85
+ <main class="app-shell"><!-- your glass UI --></main>
86
+ </body>
87
+ ```
88
+
89
+ ### Video Background
79
90
  ```html
80
91
  <body>
81
92
  <video class="background-media" autoplay muted loop playsinline>
@@ -85,27 +96,128 @@ Copy `src/css` into your project (or use `dist/theme.min.css`) and import it loc
85
96
  <main class="app-shell"><!-- your glass UI --></main>
86
97
  </body>
87
98
  ```
99
+
100
+ ### Required CSS
88
101
  ```css
89
102
  html, body { min-height: 100vh; background: var(--bg); margin: 0; }
90
- .background-media { position: fixed; inset: 0; object-fit: cover; z-index: -2; }
91
- .glass-backdrop { position: fixed; inset: 0; background: linear-gradient(180deg, rgba(5,0,16,.85), rgba(10,10,10,.9)); z-index: -1; }
92
- .app-shell { position: relative; z-index: 1; padding: clamp(1.5rem, 3vw, 3rem); backdrop-filter: blur(0); }
103
+ .background-media { position: fixed; inset: 0; object-fit: cover; z-index: var(--z-negative); }
104
+ .glass-backdrop { position: fixed; inset: 0; background: linear-gradient(180deg, rgba(5,0,16,.85), rgba(10,10,10,.9)); z-index: var(--z-background); }
105
+ .app-shell { position: relative; z-index: var(--z-elevated); padding: clamp(1.5rem, 3vw, 3rem); backdrop-filter: blur(0); }
106
+ ```
107
+
108
+ ### Video Backgrounds with Navigation
109
+
110
+ When using video backgrounds, place the navbar **outside** `.app-shell` for proper z-index stacking:
111
+
112
+ ```html
113
+ <body>
114
+ <!-- Background layer -->
115
+ <video class="background-media" autoplay muted loop playsinline>
116
+ <source src="/media/corruption-loop.mp4" type="video/mp4" />
117
+ </video>
118
+ <div class="glass-backdrop"></div>
119
+
120
+ <!-- Navigation MUST be outside app-shell for proper stacking -->
121
+ <nav class="navbar">
122
+ <div class="navbar-content">
123
+ <a class="navbar-logo" href="/">Brand</a>
124
+ <ul class="navbar-links">
125
+ <li><a href="#home" class="active">Home</a></li>
126
+ <li><a href="#about">About</a></li>
127
+ <li><a href="#contact">Contact</a></li>
128
+ </ul>
129
+ </div>
130
+ </nav>
131
+
132
+ <!-- Main content -->
133
+ <main class="app-shell">
134
+ <!-- your glass UI components -->
135
+ </main>
136
+ </body>
93
137
  ```
94
- Use `.app-shell` as the only stacking context above the backdrop so containers never block the video/image layer.
138
+
139
+ ### Z-Index Hierarchy
140
+
141
+ The theme uses a systematic z-index scale defined in `variables.css`:
142
+
143
+ | Token | Value | Purpose |
144
+ |-------|-------|---------|
145
+ | `--z-negative` | `-2` | Background media (video/image) |
146
+ | `--z-background` | `-1` | Glass backdrop overlay |
147
+ | `--z-base` | `0` | Default stacking |
148
+ | `--z-elevated` | `1` | App shell and content |
149
+ | `--z-navbar` | `1000` | Navigation (always above content) |
150
+ | `--z-modal` | `1000` | Modals and overlays |
151
+
152
+ > **Important:** The navbar uses `z-index: 1000` to ensure it always appears above all content, including video backgrounds and elevated containers.
95
153
 
96
154
  ## CSS & JS Imports
155
+
156
+ ### Method 1: Single File Import (Recommended)
157
+
158
+ The simplest approach — import everything in one line:
159
+
97
160
  ```html
98
- <link rel="stylesheet" href="@whykusanagi/corrupted-theme/dist/theme.min.css">
161
+ <!-- HTML -->
162
+ <link rel="stylesheet" href="node_modules/@whykusanagi/corrupted-theme/dist/theme.min.css">
163
+ ```
164
+
165
+ ```css
166
+ /* CSS */
167
+ @import '@whykusanagi/corrupted-theme';
168
+ ```
169
+
170
+ ✅ **Recommended for most projects.** Includes all styles in the correct order automatically.
171
+
172
+ ### Method 2: Modular Imports (Advanced)
173
+
174
+ Import only the modules you need for smaller bundle sizes.
175
+
176
+ > ⚠️ **CRITICAL: Import order matters!** Modules have dependencies that require specific ordering.
177
+
178
+ #### CSS @import Syntax
179
+ ```css
180
+ /* Correct order (matches theme.css structure) */
181
+ @import '@whykusanagi/corrupted-theme/variables'; /* 1. Foundation tokens */
182
+ @import '@whykusanagi/corrupted-theme/typography'; /* 2. Font styles */
183
+ @import '@whykusanagi/corrupted-theme/glassmorphism'; /* 3. Glass effects */
184
+ @import '@whykusanagi/corrupted-theme/animations'; /* 4. Keyframes - MUST come before components */
185
+ @import '@whykusanagi/corrupted-theme/components'; /* 5. UI components - MUST come after animations */
186
+ @import '@whykusanagi/corrupted-theme/utilities'; /* 6. Utility classes */
187
+ ```
188
+
189
+ #### HTML Link Tags
190
+ ```html
191
+ <!-- Correct order (matches theme.css structure) -->
192
+ <link rel="stylesheet" href="node_modules/@whykusanagi/corrupted-theme/src/css/variables.css">
193
+ <link rel="stylesheet" href="node_modules/@whykusanagi/corrupted-theme/src/css/typography.css">
194
+ <link rel="stylesheet" href="node_modules/@whykusanagi/corrupted-theme/src/css/glassmorphism.css">
195
+ <link rel="stylesheet" href="node_modules/@whykusanagi/corrupted-theme/src/css/animations.css"> <!-- MUST come before components -->
196
+ <link rel="stylesheet" href="node_modules/@whykusanagi/corrupted-theme/src/css/components.css"> <!-- MUST come after animations -->
197
+ <link rel="stylesheet" href="node_modules/@whykusanagi/corrupted-theme/src/css/utilities.css">
198
+ ```
199
+
200
+ #### Why Order Matters
201
+ - `components.css` uses animation keyframes defined in `animations.css`
202
+ - If `components.css` loads before `animations.css`, spinner and loading animations won't work
203
+ - Always verify order by checking `src/css/theme.css` (shows canonical import structure)
204
+
205
+ ### JavaScript Imports
206
+
207
+ ```html
208
+ <!-- HTML -->
99
209
  <script type="module" src="@whykusanagi/corrupted-theme/src/lib/corrupted-text.js"></script>
100
210
  <script type="module" src="@whykusanagi/corrupted-theme/src/lib/corruption-loading.js"></script>
101
211
  ```
212
+
102
213
  ```js
214
+ // ES Modules
103
215
  import { initCorruptedText } from '@whykusanagi/corrupted-theme/src/lib/corrupted-text.js';
104
216
  import { showCorruptionLoading } from '@whykusanagi/corrupted-theme/src/lib/corruption-loading.js';
105
217
 
106
218
  document.addEventListener('DOMContentLoaded', () => {
107
- initCorruptedText(); // re-init if you stream new DOM
108
- // showCorruptionLoading({ force: true }); // force-run outside 72h cadence
219
+ initCorruptedText(); // Initialize glitch text effects
220
+ // showCorruptionLoading({ force: true }); // Force loader outside 72h cadence
109
221
  });
110
222
  ```
111
223
 
@@ -292,6 +404,89 @@ Class | Behavior
292
404
  ```
293
405
  All Nikke-specific helpers live alongside the main utilities (`src/css/nikke-utilities.css`) and observe the same token set, so there are no visual disconnects between game-specific and general UI.
294
406
 
407
+ ## Extension Components
408
+
409
+ Production-tested components from whykusanagi.xyz for galleries, social links, countdowns, and more. All extension styles are included in `theme.css` or can be imported separately via `extensions.css`.
410
+
411
+ ### Gallery System
412
+
413
+ Responsive gallery grid with filtering, lightbox, and NSFW content support.
414
+
415
+ ```html
416
+ <div class="filter-bar">
417
+ <button class="filter-btn active" data-filter="all">All</button>
418
+ <button class="filter-btn" data-filter="photos">Photos</button>
419
+ </div>
420
+
421
+ <div class="gallery-container" id="my-gallery">
422
+ <div class="gallery-item" data-tags="photos">
423
+ <img src="image.jpg" alt="Description">
424
+ <div class="gallery-caption">Caption text</div>
425
+ </div>
426
+ </div>
427
+ ```
428
+
429
+ ```javascript
430
+ import { initGallery } from '@whykusanagi/corrupted-theme/gallery';
431
+
432
+ const gallery = initGallery('#my-gallery', {
433
+ enableLightbox: true,
434
+ enableNsfw: true,
435
+ filterAnimation: true
436
+ });
437
+
438
+ gallery.filter('photos'); // Filter by category
439
+ gallery.openLightbox(0); // Open first image
440
+ ```
441
+
442
+ ### Social Links List
443
+
444
+ Link-in-bio style layout with branded platform colors.
445
+
446
+ ```html
447
+ <div class="social-links-container">
448
+ <img src="avatar.jpg" class="profile-avatar">
449
+ <h1 class="profile-name">@username</h1>
450
+ <p class="profile-bio">Your bio here</p>
451
+ <div class="link-list">
452
+ <a href="#" class="link-item twitter"><i class="fab fa-twitter"></i> Twitter</a>
453
+ <a href="#" class="link-item github"><i class="fab fa-github"></i> GitHub</a>
454
+ </div>
455
+ </div>
456
+ ```
457
+
458
+ ### Countdown Widget
459
+
460
+ Event countdown with configurable shapes (diamond, circle, heart, star, hexagon, octagon).
461
+
462
+ ```javascript
463
+ import { initCountdown } from '@whykusanagi/corrupted-theme/countdown';
464
+
465
+ initCountdown({
466
+ config: {
467
+ title: 'Launch Countdown',
468
+ eventDate: '2025-04-01T00:00:00-07:00',
469
+ completedMessage: 'Now Live!',
470
+ character: {
471
+ image: 'character.png',
472
+ background: { type: 'diamond' }
473
+ }
474
+ }
475
+ });
476
+ ```
477
+
478
+ ### NSFW Content Blur
479
+
480
+ Click-to-reveal overlay for sensitive content.
481
+
482
+ ```html
483
+ <div class="gallery-item nsfw-content" data-warning="18+ Click to View">
484
+ <img src="sensitive-image.jpg" alt="Description">
485
+ </div>
486
+ ```
487
+
488
+ See `examples/extensions-showcase.html` for interactive demos and `docs/COMPONENTS_REFERENCE.md` for complete API documentation.
489
+
295
490
  ## Customization & Tokens
296
491
  Override only the tokens you need. The defaults intentionally mirror the showcase.
297
492
  ```css