@kawaijs/renderer-dom 0.1.13 → 0.1.14

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/src/theme.css CHANGED
@@ -140,16 +140,25 @@ body.kawa-fullscreen {
140
140
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1);
141
141
  }
142
142
 
143
- /* Directional wipe transitions */
143
+ /* Directional wipe & push & zoom transitions */
144
144
  .kawa-background[data-transition="wipeleft"] .kawa-bg-layer,
145
- .kawa-background[data-transition="wiperight"] .kawa-bg-layer {
146
- transition: opacity 0.55s ease, clip-path 0.55s cubic-bezier(0.4, 0, 0.2, 1);
145
+ .kawa-background[data-transition="wiperight"] .kawa-bg-layer,
146
+ .kawa-background[data-transition="wipeup"] .kawa-bg-layer,
147
+ .kawa-background[data-transition="wipedown"] .kawa-bg-layer,
148
+ .kawa-background[data-transition="circlewipe"] .kawa-bg-layer,
149
+ .kawa-background[data-transition="iris"] .kawa-bg-layer,
150
+ .kawa-background[data-transition="pushleft"] .kawa-bg-layer,
151
+ .kawa-background[data-transition="pushright"] .kawa-bg-layer,
152
+ .kawa-background[data-transition="pushup"] .kawa-bg-layer,
153
+ .kawa-background[data-transition="pushdown"] .kawa-bg-layer,
154
+ .kawa-background[data-transition="zoom"] .kawa-bg-layer,
155
+ .kawa-background[data-transition="blur"] .kawa-bg-layer {
156
+ transition: opacity 0.55s ease, clip-path 0.55s cubic-bezier(0.4, 0, 0.2, 1), transform 0.55s cubic-bezier(0.4, 0, 0.2, 1), filter 0.55s ease;
147
157
  }
148
158
 
149
159
  .kawa-bg-layer.kawa-wipe-from-left {
150
160
  clip-path: inset(0 100% 0 0);
151
161
  }
152
-
153
162
  .kawa-bg-layer.kawa-wipe-from-left.active {
154
163
  clip-path: inset(0 0 0 0);
155
164
  }
@@ -157,11 +166,75 @@ body.kawa-fullscreen {
157
166
  .kawa-bg-layer.kawa-wipe-from-right {
158
167
  clip-path: inset(0 0 0 100%);
159
168
  }
160
-
161
169
  .kawa-bg-layer.kawa-wipe-from-right.active {
162
170
  clip-path: inset(0 0 0 0);
163
171
  }
164
172
 
173
+ .kawa-bg-layer.kawa-wipe-from-up {
174
+ clip-path: inset(0 0 100% 0);
175
+ }
176
+ .kawa-bg-layer.kawa-wipe-from-up.active {
177
+ clip-path: inset(0 0 0 0);
178
+ }
179
+
180
+ .kawa-bg-layer.kawa-wipe-from-down {
181
+ clip-path: inset(100% 0 0 0);
182
+ }
183
+ .kawa-bg-layer.kawa-wipe-from-down.active {
184
+ clip-path: inset(0 0 0 0);
185
+ }
186
+
187
+ .kawa-bg-layer.kawa-wipe-circle {
188
+ clip-path: circle(0% at 50% 50%);
189
+ }
190
+ .kawa-bg-layer.kawa-wipe-circle.active {
191
+ clip-path: circle(120% at 50% 50%);
192
+ }
193
+
194
+ .kawa-bg-layer.kawa-push-from-left {
195
+ transform: translateX(-100%);
196
+ }
197
+ .kawa-bg-layer.kawa-push-from-left.active {
198
+ transform: translateX(0);
199
+ }
200
+
201
+ .kawa-bg-layer.kawa-push-from-right {
202
+ transform: translateX(100%);
203
+ }
204
+ .kawa-bg-layer.kawa-push-from-right.active {
205
+ transform: translateX(0);
206
+ }
207
+
208
+ .kawa-bg-layer.kawa-push-from-up {
209
+ transform: translateY(-100%);
210
+ }
211
+ .kawa-bg-layer.kawa-push-from-up.active {
212
+ transform: translateY(0);
213
+ }
214
+
215
+ .kawa-bg-layer.kawa-push-from-down {
216
+ transform: translateY(100%);
217
+ }
218
+ .kawa-bg-layer.kawa-push-from-down.active {
219
+ transform: translateY(0);
220
+ }
221
+
222
+ .kawa-bg-layer.kawa-zoom-in {
223
+ transform: scale(1.15);
224
+ filter: blur(8px);
225
+ }
226
+ .kawa-bg-layer.kawa-zoom-in.active {
227
+ transform: scale(1);
228
+ filter: blur(0px);
229
+ }
230
+
231
+ .kawa-bg-layer.kawa-blur-transition {
232
+ filter: blur(16px);
233
+ }
234
+ .kawa-bg-layer.kawa-blur-transition.active {
235
+ filter: blur(0px);
236
+ }
237
+
165
238
  /* Characters Layer */
166
239
  .kawa-characters {
167
240
  position: absolute;
@@ -1330,6 +1403,17 @@ body.kawa-fullscreen {
1330
1403
  animation: kawa-fade-in 0.5s cubic-bezier(0.16, 1, 0.3, 1);
1331
1404
  }
1332
1405
 
1406
+ .kawa-bg-video,
1407
+ .kawa-cg-video {
1408
+ position: absolute;
1409
+ inset: 0;
1410
+ width: 100%;
1411
+ height: 100%;
1412
+ object-fit: cover;
1413
+ pointer-events: none;
1414
+ z-index: 1;
1415
+ }
1416
+
1333
1417
  /* ==========================================================================
1334
1418
  Camera Shake, Flash & Stage Directives
1335
1419
  ========================================================================== */
@@ -1810,13 +1894,55 @@ body.kawa-fullscreen {
1810
1894
  display: none !important;
1811
1895
  }
1812
1896
 
1813
- /* Embed / iframe compact chrome (`?embed=1`) */
1814
- .kawa-root.kawa-embed .kawa-quick-menu {
1815
- display: none !important;
1897
+ /* Embed: always letterbox 16:9 — never inherit full-page mobile fill sizing. */
1898
+ .kawa-root.kawa-embed {
1899
+ min-height: 0 !important;
1900
+ height: 100% !important;
1901
+ max-height: 100% !important;
1902
+ }
1903
+
1904
+ .kawa-root.kawa-embed .kawa-stage {
1905
+ max-width: 100% !important;
1906
+ max-height: 100% !important;
1907
+ border-radius: 0;
1908
+ box-shadow: none;
1909
+ }
1910
+
1911
+ .kawa-root.kawa-embed .kawa-ui-layer {
1912
+ padding: clamp(8px, 2.2vh, 16px) clamp(10px, 2.5vw, 18px);
1816
1913
  }
1817
1914
 
1818
1915
  .kawa-root.kawa-embed .kawa-dialogue-box {
1916
+ min-height: 0;
1819
1917
  max-width: min(920px, 94%);
1918
+ padding: clamp(10px, 1.8vh, 16px) clamp(12px, 2.5vw, 20px);
1919
+ }
1920
+
1921
+ .kawa-root.kawa-embed .kawa-dialogue-text {
1922
+ font-size: clamp(0.88rem, 2.6vw, 1.05rem);
1923
+ line-height: 1.45;
1924
+ }
1925
+
1926
+ .kawa-root.kawa-embed .kawa-choice-container {
1927
+ width: min(92%, 440px);
1928
+ gap: 8px;
1929
+ top: 48%;
1930
+ }
1931
+
1932
+ .kawa-root.kawa-embed .kawa-choice-btn {
1933
+ font-size: clamp(0.82rem, 2.4vw, 1rem);
1934
+ padding: 0.65rem 0.9rem;
1935
+ min-height: 42px;
1936
+ box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
1937
+ }
1938
+
1939
+ .kawa-root.kawa-embed .kawa-choice-btn:hover,
1940
+ .kawa-root.kawa-embed .kawa-choice-btn:focus-visible {
1941
+ transform: none;
1942
+ }
1943
+
1944
+ .kawa-root.kawa-embed .kawa-quick-menu {
1945
+ display: none !important;
1820
1946
  }
1821
1947
 
1822
1948
  .kawa-continue-link-btn {
@@ -1863,13 +1989,14 @@ body.kawa-fullscreen {
1863
1989
  }
1864
1990
 
1865
1991
  @media (max-width: 768px), (pointer: coarse) {
1866
- .kawa-root {
1992
+ /* Full-page player only — never blow up embedded previews (playground / iframe). */
1993
+ .kawa-root:not(.kawa-embed) {
1867
1994
  /* Use dynamic viewport so mobile browser chrome doesn't clip the stage */
1868
1995
  min-height: 100dvh;
1869
1996
  height: 100dvh;
1870
1997
  }
1871
1998
 
1872
- .kawa-stage {
1999
+ .kawa-root:not(.kawa-embed) .kawa-stage {
1873
2000
  width: 100% !important;
1874
2001
  max-width: none;
1875
2002
  max-height: none;
@@ -1880,7 +2007,7 @@ body.kawa-fullscreen {
1880
2007
  }
1881
2008
 
1882
2009
  @media (orientation: portrait) {
1883
- .kawa-stage {
2010
+ .kawa-root:not(.kawa-embed) .kawa-stage {
1884
2011
  height: 100% !important;
1885
2012
  aspect-ratio: auto;
1886
2013
  }
@@ -2079,3 +2206,109 @@ body.kawa-fullscreen {
2079
2206
  font-size: 0.75rem;
2080
2207
  color: #64748b;
2081
2208
  }
2209
+
2210
+ /* ==========================================================================
2211
+ Accessibility & Themes (A11y, Dyslexia Font & High Contrast)
2212
+ ========================================================================== */
2213
+
2214
+ .kawa-dyslexia-font,
2215
+ .kawa-dyslexia-font .kawa-dialogue-text,
2216
+ .kawa-dyslexia-font .kawa-speaker-tag,
2217
+ .kawa-dyslexia-font .kawa-choice-btn,
2218
+ .kawa-dyslexia-font .kawa-modal-card {
2219
+ font-family: 'OpenDyslexic', 'Comic Sans MS', sans-serif !important;
2220
+ letter-spacing: 0.05em !important;
2221
+ word-spacing: 0.12em !important;
2222
+ line-height: 1.7 !important;
2223
+ }
2224
+
2225
+ .kawa-high-contrast .kawa-dialogue-box {
2226
+ background: #000000 !important;
2227
+ border: 3px solid #ffffff !important;
2228
+ box-shadow: 0 0 0 2px #000000 !important;
2229
+ }
2230
+
2231
+ .kawa-high-contrast .kawa-dialogue-text {
2232
+ color: #ffffff !important;
2233
+ font-weight: 700 !important;
2234
+ text-shadow: none !important;
2235
+ }
2236
+
2237
+ .kawa-high-contrast .kawa-speaker-tag {
2238
+ background: #ffff00 !important;
2239
+ color: #000000 !important;
2240
+ border: 2px solid #ffffff !important;
2241
+ font-weight: 900 !important;
2242
+ }
2243
+
2244
+ .kawa-high-contrast .kawa-choice-btn {
2245
+ background: #000000 !important;
2246
+ color: #ffffff !important;
2247
+ border: 2px solid #ffff00 !important;
2248
+ font-weight: 700 !important;
2249
+ }
2250
+
2251
+ .kawa-high-contrast .kawa-choice-btn:hover,
2252
+ .kawa-high-contrast .kawa-choice-btn:focus-visible {
2253
+ background: #ffff00 !important;
2254
+ color: #000000 !important;
2255
+ }
2256
+
2257
+ .kawa-setting-section {
2258
+ margin-top: 14px;
2259
+ padding-top: 12px;
2260
+ border-top: 1px solid rgba(255, 255, 255, 0.12);
2261
+ display: flex;
2262
+ flex-direction: column;
2263
+ gap: 10px;
2264
+ }
2265
+
2266
+ .kawa-setting-section-title {
2267
+ font-size: 0.95rem;
2268
+ font-weight: 700;
2269
+ color: #f8fafc;
2270
+ margin-bottom: 2px;
2271
+ }
2272
+
2273
+ .kawa-toggle-label {
2274
+ display: flex;
2275
+ align-items: center;
2276
+ gap: 10px;
2277
+ font-size: 0.9rem;
2278
+ color: #cbd5e1;
2279
+ cursor: pointer;
2280
+ }
2281
+
2282
+ .kawa-toggle-label input[type="checkbox"] {
2283
+ width: 18px;
2284
+ height: 18px;
2285
+ accent-color: var(--kawa-primary-accent, #f43f5e);
2286
+ cursor: pointer;
2287
+ }
2288
+
2289
+ .kawa-select {
2290
+ width: 100%;
2291
+ padding: 8px 12px;
2292
+ border-radius: 8px;
2293
+ background: rgba(15, 23, 42, 0.8);
2294
+ color: #f8fafc;
2295
+ border: 1px solid rgba(255, 255, 255, 0.2);
2296
+ font-size: 0.95rem;
2297
+ cursor: pointer;
2298
+ outline: none;
2299
+ }
2300
+
2301
+ .kawa-select:focus {
2302
+ border-color: var(--kawa-primary-accent, #f43f5e);
2303
+ }
2304
+
2305
+ .kawa-sprite.kawa-speaking {
2306
+ animation: kawa-sprite-lip-sync 0.35s ease-in-out infinite alternate;
2307
+ }
2308
+
2309
+ @keyframes kawa-sprite-lip-sync {
2310
+ 0% { transform: translateY(0) scale(1); }
2311
+ 100% { transform: translateY(-3px) scale(1.015); }
2312
+ }
2313
+
2314
+