@kawaijs/renderer-dom 0.1.14 → 1.0.0

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 (56) hide show
  1. package/README.md +10 -5
  2. package/dist/components/dialogue-box.d.ts +3 -0
  3. package/dist/components/dialogue-box.d.ts.map +1 -1
  4. package/dist/components/dialogue-box.js +20 -7
  5. package/dist/components/dialogue-box.js.map +1 -1
  6. package/dist/components/main-menu.d.ts +1 -0
  7. package/dist/components/main-menu.d.ts.map +1 -1
  8. package/dist/components/main-menu.js +13 -2
  9. package/dist/components/main-menu.js.map +1 -1
  10. package/dist/components/stage-layer.d.ts +1 -0
  11. package/dist/components/stage-layer.d.ts.map +1 -1
  12. package/dist/components/stage-layer.js +116 -103
  13. package/dist/components/stage-layer.js.map +1 -1
  14. package/dist/modals/about-modal.d.ts.map +1 -1
  15. package/dist/modals/about-modal.js +3 -3
  16. package/dist/modals/about-modal.js.map +1 -1
  17. package/dist/modals/achievements-modal.d.ts.map +1 -1
  18. package/dist/modals/achievements-modal.js +3 -3
  19. package/dist/modals/achievements-modal.js.map +1 -1
  20. package/dist/modals/confirm-modal.d.ts.map +1 -1
  21. package/dist/modals/confirm-modal.js +2 -0
  22. package/dist/modals/confirm-modal.js.map +1 -1
  23. package/dist/modals/gallery-modal.d.ts.map +1 -1
  24. package/dist/modals/gallery-modal.js +19 -6
  25. package/dist/modals/gallery-modal.js.map +1 -1
  26. package/dist/modals/history-modal.d.ts.map +1 -1
  27. package/dist/modals/history-modal.js +3 -3
  28. package/dist/modals/history-modal.js.map +1 -1
  29. package/dist/modals/input-modal.d.ts.map +1 -1
  30. package/dist/modals/input-modal.js +12 -1
  31. package/dist/modals/input-modal.js.map +1 -1
  32. package/dist/modals/save-load-modal.d.ts.map +1 -1
  33. package/dist/modals/save-load-modal.js +3 -3
  34. package/dist/modals/save-load-modal.js.map +1 -1
  35. package/dist/modals/settings-modal.d.ts.map +1 -1
  36. package/dist/modals/settings-modal.js +9 -4
  37. package/dist/modals/settings-modal.js.map +1 -1
  38. package/dist/renderer.d.ts +2 -0
  39. package/dist/renderer.d.ts.map +1 -1
  40. package/dist/renderer.js +57 -37
  41. package/dist/renderer.js.map +1 -1
  42. package/dist/types.d.ts +5 -0
  43. package/dist/types.d.ts.map +1 -1
  44. package/dist/utils/css-url.d.ts +9 -0
  45. package/dist/utils/css-url.d.ts.map +1 -0
  46. package/dist/utils/css-url.js +29 -0
  47. package/dist/utils/css-url.js.map +1 -0
  48. package/dist/utils/modal-lifecycle.d.ts +17 -0
  49. package/dist/utils/modal-lifecycle.d.ts.map +1 -0
  50. package/dist/utils/modal-lifecycle.js +35 -0
  51. package/dist/utils/modal-lifecycle.js.map +1 -0
  52. package/dist/utils/rich-text.d.ts.map +1 -1
  53. package/dist/utils/rich-text.js +8 -0
  54. package/dist/utils/rich-text.js.map +1 -1
  55. package/package.json +4 -4
  56. package/src/theme.css +134 -1
package/src/theme.css CHANGED
@@ -235,6 +235,136 @@ body.kawa-fullscreen {
235
235
  filter: blur(0px);
236
236
  }
237
237
 
238
+ /* Scene Glitch / Corrupt Transition */
239
+ @keyframes kawa-scene-glitch {
240
+ 0% {
241
+ filter: none;
242
+ transform: scale(1) skewX(0deg);
243
+ }
244
+ 20% {
245
+ filter: invert(0.8) hue-rotate(90deg) contrast(200%);
246
+ transform: scale(1.05) skewX(4deg);
247
+ clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%, 0 60%, 100% 60%, 100% 100%, 0 100%);
248
+ }
249
+ 40% {
250
+ filter: saturate(300%) contrast(150%);
251
+ transform: scale(0.98) skewX(-3deg);
252
+ }
253
+ 60% {
254
+ filter: invert(0.3) drop-shadow(-8px 0 #ef4444) drop-shadow(8px 0 #06b6d4);
255
+ transform: scale(1.02) skewX(2deg);
256
+ }
257
+ 80% {
258
+ filter: contrast(180%) brightness(120%);
259
+ transform: scale(1) skewX(-1deg);
260
+ }
261
+ 100% {
262
+ filter: none;
263
+ transform: scale(1) skewX(0deg);
264
+ }
265
+ }
266
+
267
+ .kawa-bg-layer.kawa-glitch-transition {
268
+ animation: kawa-scene-glitch 0.6s ease-in-out forwards;
269
+ }
270
+ .kawa-bg-layer.kawa-glitch-transition.active {
271
+ animation: kawa-scene-glitch 0.6s ease-in-out forwards;
272
+ }
273
+
274
+ /* Animated Rich Text Effects: Glitch, Shake, Rainbow, Corrupt */
275
+ @keyframes kawa-glitch-anim {
276
+ 0% {
277
+ transform: translate(0);
278
+ text-shadow: -2px 0 #ef4444, 2px 0 #06b6d4;
279
+ }
280
+ 20% {
281
+ transform: translate(-2px, 2px);
282
+ text-shadow: 2px 0 #ef4444, -2px 0 #06b6d4;
283
+ }
284
+ 40% {
285
+ transform: translate(-2px, -2px);
286
+ text-shadow: -2px 0 #ec4899, 2px 0 #10b981;
287
+ }
288
+ 60% {
289
+ transform: translate(2px, 2px);
290
+ text-shadow: 2px 0 #3b82f6, -2px 0 #f59e0b;
291
+ }
292
+ 80% {
293
+ transform: translate(2px, -2px);
294
+ text-shadow: -2px 0 #ef4444, 2px 0 #06b6d4;
295
+ }
296
+ 100% {
297
+ transform: translate(0);
298
+ text-shadow: 0 0 transparent;
299
+ }
300
+ }
301
+
302
+ .kawa-text-glitch {
303
+ display: inline-block;
304
+ position: relative;
305
+ color: #f8fafc;
306
+ font-weight: 700;
307
+ animation: kawa-glitch-anim 0.35s infinite steps(2, start);
308
+ }
309
+
310
+ @keyframes kawa-shake-anim {
311
+ 0% { transform: translate(1px, 1px) rotate(0deg); }
312
+ 10% { transform: translate(-1px, -2px) rotate(-1deg); }
313
+ 20% { transform: translate(-3px, 0px) rotate(1deg); }
314
+ 30% { transform: translate(3px, 2px) rotate(0deg); }
315
+ 40% { transform: translate(1px, -1px) rotate(1deg); }
316
+ 50% { transform: translate(-1px, 2px) rotate(-1deg); }
317
+ 60% { transform: translate(-3px, 1px) rotate(0deg); }
318
+ 70% { transform: translate(3px, 1px) rotate(-1deg); }
319
+ 80% { transform: translate(-1px, -1px) rotate(1deg); }
320
+ 90% { transform: translate(1px, 2px) rotate(0deg); }
321
+ 100% { transform: translate(1px, -2px) rotate(-1deg); }
322
+ }
323
+
324
+ .kawa-text-shake {
325
+ display: inline-block;
326
+ animation: kawa-shake-anim 0.2s infinite ease-in-out;
327
+ color: #f43f5e;
328
+ }
329
+
330
+ @keyframes kawa-rainbow-anim {
331
+ 0% { filter: hue-rotate(0deg); }
332
+ 100% { filter: hue-rotate(360deg); }
333
+ }
334
+
335
+ .kawa-text-rainbow {
336
+ display: inline-block;
337
+ background: linear-gradient(90deg, #ff007f, #ffaa00, #00ff66, #00f0ff, #aa00ff, #ff007f);
338
+ background-size: 200% auto;
339
+ -webkit-background-clip: text;
340
+ -webkit-text-fill-color: transparent;
341
+ animation: kawa-rainbow-anim 3s linear infinite;
342
+ font-weight: bold;
343
+ }
344
+
345
+ .kawa-text-corrupt {
346
+ display: inline-block;
347
+ font-family: monospace;
348
+ letter-spacing: 0.15em;
349
+ color: #ef4444;
350
+ text-shadow: 0 0 8px rgba(239, 68, 68, 0.8), 2px 2px 0 rgba(0, 0, 0, 0.9);
351
+ animation: kawa-glitch-anim 0.2s infinite;
352
+ }
353
+
354
+ /* Sprite Meta/Horror Glitch Effects */
355
+ .kawa-sprite.kawa-glitch img {
356
+ animation: kawa-glitch-anim 0.25s infinite steps(2, start);
357
+ filter: drop-shadow(-4px 0 #ef4444) drop-shadow(4px 0 #06b6d4) contrast(140%);
358
+ }
359
+
360
+ .kawa-sprite.kawa-invert img {
361
+ filter: invert(1) hue-rotate(180deg) drop-shadow(0 0 16px rgba(255, 255, 255, 0.8));
362
+ }
363
+
364
+ .kawa-sprite.kawa-vhs img {
365
+ filter: saturate(180%) contrast(130%) brightness(110%);
366
+ }
367
+
238
368
  /* Characters Layer */
239
369
  .kawa-characters {
240
370
  position: absolute;
@@ -2302,7 +2432,10 @@ body.kawa-fullscreen {
2302
2432
  border-color: var(--kawa-primary-accent, #f43f5e);
2303
2433
  }
2304
2434
 
2305
- .kawa-sprite.kawa-speaking {
2435
+ .kawa-sprite.kawa-speaking img {
2436
+ /* Animate the image, not the positioned wrapper — otherwise lip-sync
2437
+ overwrites translateX(-50%) from .kawa-pos-* and recenters the sprite wrong.
2438
+ Also replaces breathe while speaking to avoid competing transform animations. */
2306
2439
  animation: kawa-sprite-lip-sync 0.35s ease-in-out infinite alternate;
2307
2440
  }
2308
2441