@whykusanagi/corrupted-theme 0.1.4 → 0.1.6

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
@@ -11,13 +11,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
  - [ ] CDN distribution via jsDelivr
12
12
  - [ ] Figma design system (components library)
13
13
  - [ ] Storybook integration for component showcase
14
- - [ ] SCSS/SASS version for advanced customization
15
- - [ ] CSS-in-JS library bindings (Styled Components, Emotion)
16
- - [ ] Dark mode + light mode theme switcher example
17
- - [ ] Animation performance improvements
18
- - [ ] Web font optimization
19
- - [ ] Additional color palette presets
20
- - [ ] Tailwind CSS integration guide
14
+
15
+ ---
16
+
17
+ ## [0.1.6] - 2026-01-16
18
+
19
+ ### Changed
20
+ - **Package Cleanup** - Removed internal documentation from NPM package
21
+ - Created `docs/planning/` directory for internal planning documents
22
+ - Moved `COMPONENT_INTEGRATION_PLAN.md` to `docs/planning/`
23
+ - Moved `CONTENT_CLASSIFICATION_NORMALIZATION.md` to `docs/planning/`
24
+ - Moved `TERMINOLOGY_CLARIFICATION.md` to `docs/planning/`
25
+ - Updated `.npmignore` to exclude `docs/planning/` directory
26
+ - Added `CORRUPTED_THEME_SPEC.md` and `CORRUPTION_BUFFER_IMPLEMENTATIONS.md` to `.npmignore`
27
+ - No functional changes - purely package cleanup
28
+ - **Note:** v0.1.5 contained internal planning docs and should not be used. Please upgrade to 0.1.6.
29
+
30
+ ---
31
+
32
+ ## [0.1.5] - 2026-01-15
33
+
34
+ ### Fixed
35
+ - **Corruption Example Styling** - Aligned all three corruption examples with theme.css design system
36
+ - examples/basic/corrupted-text.html - Now uses CSS variables and glassmorphism
37
+ - examples/basic/typing-animation.html - Consistent button and component styling
38
+ - examples/advanced/nsfw-corruption.html - Proper navbar and design system integration
39
+ - **Documentation Links** - Fixed broken markdown links across all 12 HTML example files
40
+ - Updated "Docs" navigation to point to showcase-complete.html instead of .md files
41
+ - Ensures all documentation is accessible in browser
42
+
43
+ ### Changed
44
+ - **Corruption Examples** - Replaced custom inline styles with theme.css design system
45
+ - Now uses CSS variables (--accent, --bg, --glass, --spacing-*, etc.)
46
+ - Added proper navbar component matching other examples
47
+ - Applied consistent .example-group sections with glassmorphism
48
+ - Added Font Awesome icons throughout
49
+ - All corruption functionality and interactivity preserved
21
50
 
22
51
  ---
23
52
 
package/README.md CHANGED
@@ -30,10 +30,32 @@ A production-ready glassmorphic design system for cinematic, cyberpunk-inspired
30
30
  - **Glassmorphism-first** visual language with layered depth, gradients, and scanlines.
31
31
  - **Systemized tokens** (`src/css/variables.css`) for colors, typography, spacing, motion, and elevation.
32
32
  - **Bootstrap-scale coverage** of components (navigation, forms, data display, API docs, Nikke-specific UI).
33
- - **First-visit cinematic experiences** via `corrupted-text.js` and `corruption-loading.js`.
33
+ - **Buffer corruption effects** with SFW/NSFW phrase modes (Pattern 1 & 2 from spec).
34
34
  - **WCAG AA** compliance, motion safety, and keyboard support baked in.
35
35
  - **Dockerized showcase** at `examples/showcase-complete.html` for instant QA.
36
36
 
37
+ ### Content Warnings
38
+
39
+ This package includes two corruption animation modes:
40
+
41
+ **SFW Mode (Default)**
42
+ - Playful anime-style expressions
43
+ - Cute/teasing phrases
44
+ - Atmospheric corruption themes
45
+ - Safe for professional and public projects
46
+
47
+ **NSFW Mode (Opt-in Required)**
48
+ - ⚠️ **18+ Content Warning**
49
+ - Explicit intimate/sexual phrases
50
+ - Loss of control themes
51
+ - **NOT suitable for:**
52
+ - Professional/corporate projects
53
+ - Public streams without 18+ rating
54
+ - Educational contexts
55
+ - All-ages content
56
+
57
+ **All examples and default behavior use SFW mode.** NSFW requires explicit `{ nsfw: true }` configuration.
58
+
37
59
  ## Installation
38
60
  ### npm (public registry)
39
61
  ```bash
@@ -354,26 +376,49 @@ document.addEventListener('click', e => {
354
376
  </div>
355
377
  ```
356
378
 
357
- ### Corrupted Text & Loader
379
+ ### Corrupted Text & Buffer Corruption
380
+
381
+ **Pattern 1: Character-Level Corruption (Visual Glitch)**
358
382
  ```html
359
- <span class="corrupted-text" data-text="CORRUPTED">CORRUPTED</span>
360
- <span class="glitch-kanji">
361
- <span class="glitch-word" data-text="CORRUPTED TEXT">CORRUPTED TEXT</span>
383
+ <!-- Multi-language cycling with character-level glitch -->
384
+ <span class="corrupted-multilang"
385
+ data-english="Hello World"
386
+ data-romaji="konnichiwa"
387
+ data-hiragana="こんにちは"
388
+ data-katakana="コンニチハ"
389
+ data-kanji="今日は">
362
390
  </span>
391
+
392
+ <script type="module" src="@whykusanagi/corrupted-theme/src/core/corrupted-text.js"></script>
363
393
  ```
394
+
395
+ **Pattern 2: Phrase Flickering (Buffer Corruption)**
364
396
  ```html
365
- <video class="background-media" autoplay muted loop playsinline>
366
- <source src="/media/corruption-loop.mp4" type="video/mp4" />
367
- </video>
368
- <script type="module" src="@whykusanagi/corrupted-theme/src/lib/corruption-loading.js"></script>
369
- <script>
370
- showCorruptionLoading(); // auto once every 72h
371
- // showCorruptionLoading({ force: true });
397
+ <!-- Typing animation with SFW phrase buffer corruption -->
398
+ <div class="typing-output" id="typing1"></div>
399
+
400
+ <script type="module">
401
+ import { TypingAnimation } from '@whykusanagi/corrupted-theme/src/core/typing-animation.js';
402
+
403
+ const typing = new TypingAnimation(document.getElementById('typing1'), {
404
+ typingSpeed: 40, // chars/sec
405
+ glitchChance: 0.08, // 8% buffer corruption
406
+ nsfw: false // SFW mode (default)
407
+ });
408
+
409
+ typing.start('Neural corruption detected... System Online');
372
410
  </script>
373
411
  ```
374
- Japanese overlay text is sourced from the lewd phrase array inside `examples/showcase-complete.html`; supply your own by updating the data attribute or reusing the script snippet.
412
+
413
+ **⚠️ Content Classification:**
414
+ - **SFW Mode (Default)**: Cute, playful, atmospheric phrases - safe for all audiences
415
+ - **NSFW Mode (Opt-in)**: Explicit 18+ content - requires `{ nsfw: true }` flag
416
+
417
+ See `examples/basic/` for SFW examples and `examples/advanced/nsfw-corruption.html` for NSFW demo.
375
418
 
376
419
  ## Animations & Experience Layer
420
+
421
+ ### Standard CSS Animations
377
422
  Class | Behavior
378
423
  --- | ---
379
424
  `.fade-in`, `.fade-up`, `.slide-in-left/right`, `.scale-in` | Standard entrance motions synchronized to `var(--transition)`
@@ -381,8 +426,27 @@ Class | Behavior
381
426
  `.corrupted-text`, `.corrupted-strong` | Brute-force corruption effect for headings and pills
382
427
  `.scanlines`, `.tear`, `.data-corrupt` | Utility effects inspired by whykusanagi.xyz hero
383
428
  `.spinner`, `.loading-bar`, `.progress-bar` | Loading indicators with shimmer + accent variants
384
- `.corruption-loading` (JS) | Full-screen loader with 72h replay timer
385
- `.corrupted-multilang` (JS) | First-visit Japanese/English/Romaji cycling text
429
+
430
+ ### JavaScript Corruption Components
431
+
432
+ **CorruptedText** - Pattern 1: Character-Level Corruption
433
+ - Visual glitch effect using random characters (Katakana, Hiragana, symbols)
434
+ - Always SFW (no phrases, just character-level noise)
435
+ - Cycles through multi-language variants
436
+ - Class: `.corrupted-multilang`
437
+
438
+ **TypingAnimation** - Pattern 2: Phrase Flickering (Buffer Corruption)
439
+ - Simulates neural network decoding corrupted data buffer
440
+ - Phrases flicker through before revealing final text
441
+ - SFW mode (default): Cute, playful, atmospheric phrases
442
+ - NSFW mode (opt-in): Explicit 18+ content with `{ nsfw: true }`
443
+ - Color: Magenta (#d94f90) for SFW, Purple (#8b5cf6) for NSFW
444
+
445
+ **Corruption Phrases Library**
446
+ - Normalized SFW/NSFW phrase sets
447
+ - Separate exports for each mode
448
+ - Helper functions for random phrase selection
449
+ - Module: `src/core/corruption-phrases.js`
386
450
 
387
451
  ## Nikke Utilities
388
452
  ```html
@@ -0,0 +1,348 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>NSFW Corruption (18+) - Corrupted Theme</title>
7
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
8
+ <link rel="stylesheet" href="../../src/css/theme.css">
9
+ <style>
10
+ .container {
11
+ max-width: 1000px;
12
+ margin: 0 auto;
13
+ padding: var(--spacing-lg);
14
+ }
15
+
16
+ .example-group {
17
+ margin-bottom: var(--spacing-2xl);
18
+ background: var(--glass);
19
+ border: 1px solid var(--border);
20
+ border-radius: var(--radius-lg);
21
+ padding: var(--spacing-lg);
22
+ }
23
+
24
+ .example-group h3 {
25
+ color: var(--accent);
26
+ margin-bottom: var(--spacing-lg);
27
+ font-size: 1.25rem;
28
+ }
29
+
30
+ .warning-box {
31
+ background: rgba(255, 0, 0, 0.1);
32
+ border: 3px solid var(--corrupted-red);
33
+ border-radius: var(--radius-lg);
34
+ padding: var(--spacing-xl);
35
+ margin-bottom: var(--spacing-2xl);
36
+ box-shadow: 0 0 30px rgba(255, 0, 0, 0.3);
37
+ }
38
+
39
+ .warning-box h2 {
40
+ color: var(--corrupted-red);
41
+ margin-top: 0;
42
+ font-size: 1.75rem;
43
+ text-align: center;
44
+ }
45
+
46
+ .warning-box p {
47
+ color: var(--text);
48
+ line-height: 1.6;
49
+ }
50
+
51
+ .warning-box ul {
52
+ color: var(--text-secondary);
53
+ line-height: 1.8;
54
+ }
55
+
56
+ .demo-area {
57
+ background: var(--bg-secondary);
58
+ border: 1px solid var(--border);
59
+ border-radius: var(--radius-md);
60
+ padding: var(--spacing-xl);
61
+ margin-bottom: var(--spacing-md);
62
+ min-height: 100px;
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: center;
66
+ }
67
+
68
+ .typing-output {
69
+ font-size: 1.25rem;
70
+ min-height: 40px;
71
+ letter-spacing: 1px;
72
+ font-family: 'Courier New', monospace;
73
+ text-align: center;
74
+ width: 100%;
75
+ }
76
+
77
+ .controls {
78
+ display: flex;
79
+ gap: var(--spacing-md);
80
+ margin-top: var(--spacing-md);
81
+ flex-wrap: wrap;
82
+ }
83
+
84
+ .code-block {
85
+ background: var(--bg);
86
+ border: 1px solid var(--border);
87
+ border-radius: var(--radius-md);
88
+ padding: var(--spacing-md);
89
+ margin-top: var(--spacing-md);
90
+ font-family: 'Courier New', monospace;
91
+ font-size: 0.875rem;
92
+ color: var(--text-secondary);
93
+ overflow-x: auto;
94
+ }
95
+
96
+ .info-badge {
97
+ display: inline-flex;
98
+ align-items: center;
99
+ gap: var(--spacing-sm);
100
+ background: var(--glass);
101
+ border: 1px solid var(--border);
102
+ border-radius: var(--radius-full);
103
+ padding: var(--spacing-sm) var(--spacing-md);
104
+ font-size: 0.875rem;
105
+ color: var(--text-secondary);
106
+ margin-bottom: var(--spacing-md);
107
+ }
108
+
109
+ .nsfw-badge {
110
+ background: rgba(255, 0, 0, 0.2);
111
+ border-color: var(--corrupted-red);
112
+ color: var(--corrupted-red);
113
+ }
114
+
115
+ .comparison-grid {
116
+ display: grid;
117
+ grid-template-columns: 1fr 1fr;
118
+ gap: var(--spacing-lg);
119
+ margin-bottom: var(--spacing-md);
120
+ }
121
+
122
+ .comparison-box {
123
+ background: var(--bg-secondary);
124
+ border: 2px solid;
125
+ border-radius: var(--radius-md);
126
+ padding: var(--spacing-lg);
127
+ }
128
+
129
+ .comparison-box.sfw {
130
+ border-color: var(--corrupted-magenta2);
131
+ }
132
+
133
+ .comparison-box.nsfw {
134
+ border-color: var(--corrupted-purple);
135
+ }
136
+
137
+ .comparison-box h4 {
138
+ margin-top: 0;
139
+ font-size: 1rem;
140
+ }
141
+
142
+ .comparison-box.sfw h4 {
143
+ color: var(--corrupted-magenta2);
144
+ }
145
+
146
+ .comparison-box.nsfw h4 {
147
+ color: var(--corrupted-purple);
148
+ }
149
+
150
+ @media (max-width: 768px) {
151
+ .comparison-grid {
152
+ grid-template-columns: 1fr;
153
+ }
154
+ }
155
+ </style>
156
+ </head>
157
+ <body>
158
+ <!-- Global Navigation -->
159
+ <nav class="navbar">
160
+ <div class="navbar-content">
161
+ <a href="../index.html" class="navbar-logo"><i class="fas fa-palette"></i> Corrupted Theme</a>
162
+ <ul class="navbar-links">
163
+ <li><a href="../index.html"><i class="fas fa-home"></i> Home</a></li>
164
+ <li><a href="../showcase-complete.html"><i class="fas fa-cube"></i> Components</a></li>
165
+ <li><a href="../extensions-showcase.html"><i class="fas fa-puzzle-piece"></i> Extensions</a></li>
166
+ <li class="has-submenu">
167
+ <a href="#" class="active">
168
+ <i class="fas fa-flask"></i> Examples
169
+ <i class="fas fa-chevron-down" style="font-size: 0.7em; margin-left: 4px;"></i>
170
+ </a>
171
+ <div class="submenu">
172
+ <a href="../nikke-team-builder.html"><i class="fas fa-users"></i> Nikke Team Builder</a>
173
+ <a href="../button.html"><i class="fas fa-hand-pointer"></i> Buttons</a>
174
+ <a href="../card.html"><i class="fas fa-square"></i> Cards</a>
175
+ <a href="../form.html"><i class="fas fa-edit"></i> Forms</a>
176
+ <a href="../layout.html"><i class="fas fa-columns"></i> Layouts</a>
177
+ <a href="../basic/corrupted-text.html"><i class="fas fa-terminal"></i> Character Corruption</a>
178
+ <a href="../basic/typing-animation.html"><i class="fas fa-keyboard"></i> Buffer Corruption</a>
179
+ <a href="nsfw-corruption.html" class="active"><i class="fas fa-exclamation-triangle"></i> NSFW (18+)</a>
180
+ </div>
181
+ </li>
182
+ <li><a href="../showcase-complete.html"><i class="fas fa-book"></i> Docs</a></li>
183
+ </ul>
184
+ </div>
185
+ </nav>
186
+
187
+ <div class="container">
188
+ <!-- Content Warning -->
189
+ <div class="warning-box">
190
+ <h2><i class="fas fa-exclamation-triangle"></i> 18+ Content Warning</h2>
191
+ <p style="text-align: center;"><strong>This page contains explicit mature content (NSFW mode).</strong></p>
192
+ <p>This example demonstrates the NSFW mode of TypingAnimation, which includes:</p>
193
+ <ul>
194
+ <li>Explicit intimate/sexual phrases</li>
195
+ <li>Loss of control themes</li>
196
+ <li>Adult-oriented corruption aesthetics</li>
197
+ </ul>
198
+ <p><strong>NOT suitable for:</strong></p>
199
+ <ul>
200
+ <li>Professional/corporate projects</li>
201
+ <li>Public streams without 18+ rating</li>
202
+ <li>Educational contexts</li>
203
+ <li>All-ages content</li>
204
+ </ul>
205
+ <p style="text-align: center; margin-top: var(--spacing-lg); font-weight: bold;">
206
+ By continuing, you confirm you are 18+ and accept viewing explicit content.
207
+ </p>
208
+ </div>
209
+
210
+ <h1><i class="fas fa-exclamation-triangle"></i> NSFW Buffer Corruption</h1>
211
+ <p style="color: var(--text-secondary); margin-bottom: var(--spacing-lg);">
212
+ Pattern 2: Phrase flickering with explicit adult content (18+ only).
213
+ </p>
214
+
215
+ <div class="info-badge nsfw-badge">
216
+ <i class="fas fa-exclamation-triangle"></i>
217
+ <span>18+ ONLY - Explicit Content</span>
218
+ </div>
219
+
220
+ <!-- SFW vs NSFW Comparison -->
221
+ <section id="comparison" class="example-group">
222
+ <h3>SFW vs NSFW Comparison</h3>
223
+ <p>See the difference between default SFW mode and explicit NSFW mode side-by-side.</p>
224
+
225
+ <div class="comparison-grid">
226
+ <div class="comparison-box sfw">
227
+ <h4><i class="fas fa-check-circle"></i> SFW Mode (Default)</h4>
228
+ <div class="demo-area">
229
+ <div class="typing-output" id="outputSFW"></div>
230
+ </div>
231
+ </div>
232
+ <div class="comparison-box nsfw">
233
+ <h4><i class="fas fa-exclamation-triangle"></i> NSFW Mode (Explicit)</h4>
234
+ <div class="demo-area">
235
+ <div class="typing-output" id="outputNSFW"></div>
236
+ </div>
237
+ </div>
238
+ </div>
239
+
240
+ <div class="controls">
241
+ <button class="btn" onclick="startComparison()">
242
+ <i class="fas fa-play"></i> Start Comparison
243
+ </button>
244
+ </div>
245
+
246
+ <div class="code-block">// SFW mode (default - safe for all audiences)
247
+ const typingSFW = new TypingAnimation(element, {
248
+ nsfw: false // Default behavior
249
+ });
250
+
251
+ // NSFW mode (explicit opt-in required)
252
+ const typingNSFW = new TypingAnimation(element, {
253
+ nsfw: true // ⚠️ Enables 18+ explicit content
254
+ });</div>
255
+ </section>
256
+
257
+ <!-- NSFW-Only Example -->
258
+ <section id="nsfw-only" class="example-group">
259
+ <h3>NSFW-Only Example</h3>
260
+ <p>Pure NSFW buffer corruption with explicit phrases in purple (#8b5cf6).</p>
261
+
262
+ <div class="demo-area">
263
+ <div class="typing-output" id="outputNSFWOnly"></div>
264
+ </div>
265
+
266
+ <div class="controls">
267
+ <button class="btn" onclick="startNSFWOnly()">
268
+ <i class="fas fa-play"></i> Start NSFW Animation
269
+ </button>
270
+ <button class="btn btn-secondary" onclick="stopNSFWOnly()">
271
+ <i class="fas fa-stop"></i> Stop
272
+ </button>
273
+ </div>
274
+
275
+ <div class="code-block">const typing = new TypingAnimation(element, {
276
+ nsfw: true, // ⚠️ NSFW mode enabled
277
+ typingSpeed: 35,
278
+ glitchChance: 0.12
279
+ });
280
+
281
+ typing.start('Neural corruption detected...');</div>
282
+ </section>
283
+
284
+ <!-- Component Info -->
285
+ <section class="example-group">
286
+ <h3><i class="fas fa-info-circle"></i> NSFW Mode Configuration</h3>
287
+ <ul style="color: var(--text-secondary); line-height: 1.8;">
288
+ <li><strong>Requires Explicit Opt-in:</strong> <code>{ nsfw: true }</code></li>
289
+ <li><strong>Phrase Examples:</strong> "壊れちゃう...", "Pleasure protocols loading...", "変態", "えっち"</li>
290
+ <li><strong>Color:</strong> Deep Purple (#8b5cf6) for NSFW corruption</li>
291
+ <li><strong>Default Behavior:</strong> SFW mode (safe for all audiences)</li>
292
+ <li><strong>Content Rating:</strong> 18+ only, explicit intimate content</li>
293
+ </ul>
294
+
295
+ <div class="alert alert-warning" style="margin-top: var(--spacing-md);">
296
+ <i class="fas fa-shield-alt"></i>
297
+ <strong>Important:</strong> NSFW phrases are ONLY shown when <code>nsfw: true</code> is explicitly set.
298
+ The default behavior is always SFW for safety.
299
+ </div>
300
+ </section>
301
+ </div>
302
+
303
+ <script type="module">
304
+ import { TypingAnimation } from '../../src/core/typing-animation.js';
305
+
306
+ // SFW vs NSFW Comparison
307
+ const outputSFW = document.getElementById('outputSFW');
308
+ const outputNSFW = document.getElementById('outputNSFW');
309
+
310
+ window.startComparison = () => {
311
+ // SFW instance
312
+ const typingSFW = new TypingAnimation(outputSFW, {
313
+ nsfw: false,
314
+ glitchChance: 0.10
315
+ });
316
+
317
+ // NSFW instance
318
+ const typingNSFW = new TypingAnimation(outputNSFW, {
319
+ nsfw: true,
320
+ glitchChance: 0.10
321
+ });
322
+
323
+ // Start both simultaneously
324
+ typingSFW.start('System Online');
325
+ typingNSFW.start('System Online');
326
+ };
327
+
328
+ // NSFW-only example
329
+ const outputNSFWOnly = document.getElementById('outputNSFWOnly');
330
+ let typingNSFWOnly = new TypingAnimation(outputNSFWOnly, {
331
+ nsfw: true,
332
+ typingSpeed: 35,
333
+ glitchChance: 0.12
334
+ });
335
+
336
+ window.startNSFWOnly = () => {
337
+ typingNSFWOnly.start('Neural corruption detected... Decoding data buffer...');
338
+ };
339
+
340
+ window.stopNSFWOnly = () => {
341
+ typingNSFWOnly.stop();
342
+ };
343
+
344
+ // Auto-start comparison on load
345
+ setTimeout(() => startComparison(), 1000);
346
+ </script>
347
+ </body>
348
+ </html>