@katajere/recap 2.1.5 → 2.1.7

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.
@@ -251,3 +251,291 @@
251
251
  .recap-story.screenshot-mode .slide7-products__frames {
252
252
  overflow: visible !important;
253
253
  }
254
+
255
+ /* ===== FIXED-SIZE SCREENSHOT CONTAINER =====
256
+ * Used to render screenshots at consistent 1080x1920 resolution
257
+ * regardless of the user's actual screen size.
258
+ * The container is positioned off-screen and removed after capture.
259
+ *
260
+ * KEY INSIGHT: vw/vh units reference browser viewport, NOT container.
261
+ * We must override ALL vw/vh-based values with fixed pixels.
262
+ * Container: 390px × 692px (~9:16 aspect ratio)
263
+ *
264
+ * This container mimics .app__shell behavior - the actual viewport slides expect.
265
+ */
266
+ :root {
267
+ /* Fixed screenshot container dimensions used throughout this file */
268
+ --screenshot-container-width: 390px;
269
+ --screenshot-container-height: 692px;
270
+ /*
271
+ * Background is slightly taller than the container (≈1.22x) so the noisy
272
+ * texture tiles cleanly at 1080×1920 export resolution without visible seams.
273
+ * 692px * 1.22 ≈ 844px (original hard-coded value).
274
+ */
275
+ --screenshot-background-height: calc(var(--screenshot-container-height) * 1.22);
276
+ }
277
+
278
+ .screenshot-capture-container {
279
+ position: fixed !important;
280
+ left: -9999px !important;
281
+ top: 0 !important;
282
+ z-index: -9999 !important;
283
+
284
+ width: var(--screenshot-container-width) !important;
285
+ height: var(--screenshot-container-height) !important;
286
+ overflow: hidden !important;
287
+ pointer-events: none !important;
288
+ --screenshot-text-offset: -6px;
289
+ /* Mimic .app__shell background */
290
+ background: var(--bg-white) url('https://katajereassets.blob.core.windows.net/recap-videos/noisy-background.png') repeat !important;
291
+ background-size: var(--screenshot-container-width) var(--screenshot-background-height) !important;
292
+ }
293
+
294
+ @media (max-width: 768px) {
295
+ .screenshot-capture-container {
296
+ --screenshot-text-offset: -3px;
297
+ }
298
+ }
299
+
300
+ @media (max-width: 600px) {
301
+ .screenshot-capture-container {
302
+ --screenshot-text-offset: 0px;
303
+ }
304
+ }
305
+
306
+ /* Force the cloned recap-story to fill the fixed container exactly */
307
+ .screenshot-capture-container .recap-story {
308
+ width: var(--screenshot-container-width) !important;
309
+ height: var(--screenshot-container-height) !important;
310
+ min-width: var(--screenshot-container-width) !important;
311
+ min-height: var(--screenshot-container-height) !important;
312
+ max-width: var(--screenshot-container-width) !important;
313
+ max-height: var(--screenshot-container-height) !important;
314
+ position: relative !important;
315
+ transform: none !important;
316
+ }
317
+
318
+ /* Force slides to fill the fixed container */
319
+ .screenshot-capture-container .recap-story__slides {
320
+ width: 100% !important;
321
+ height: 100% !important;
322
+ }
323
+
324
+ .screenshot-capture-container .recap-story__slides > div {
325
+ width: 100% !important;
326
+ height: 100% !important;
327
+ }
328
+
329
+ /* ===== GLOBAL VW/VH → PX OVERRIDES =====
330
+ * Fix env(safe-area-inset) and vw-based font sizes
331
+ * These affect ALL slides consistently
332
+ */
333
+
334
+ /* ===== HTML2CANVAS TEXT OFFSET FIX =====
335
+ * html2canvas renders text ~6px lower than browsers.
336
+ * Apply negative transform to ALL text elements to compensate.
337
+ */
338
+ .screenshot-capture-container .header__badge,
339
+ .screenshot-capture-container .stats-number,
340
+ .screenshot-capture-container .slide3-revenue__amount,
341
+ .screenshot-capture-container .slide4-orders__number,
342
+ .screenshot-capture-container .slide5-buyers__number,
343
+ .screenshot-capture-container .slide6-customer__number,
344
+ .screenshot-capture-container .slide7-products__title,
345
+ .screenshot-capture-container .slide7-products__subtitle,
346
+ .screenshot-capture-container .slide7-products__lead,
347
+ .screenshot-capture-container .slide8-months__entry--current,
348
+ .screenshot-capture-container .slide9-year__crown {
349
+ transform: translateY(var(--screenshot-text-offset, -6px)) !important;
350
+ }
351
+
352
+ /* Top group: remove safe-area-inset dependency */
353
+ .screenshot-capture-container .recap-story__top-group {
354
+ margin: 24px 16px 0 16px !important;
355
+ gap: 6px !important;
356
+ }
357
+
358
+ /* Header badge: fix vw-based font-size clamp(14px, 5.13vw, 20px) */
359
+ .screenshot-capture-container .header__badge {
360
+ font-size: 20px !important;
361
+ line-height: 1.2 !important;
362
+ }
363
+
364
+ /* ===== SLIDE 1 (Intro) OVERRIDES =====
365
+ * Fix env(safe-area-inset) padding and vw/vh font sizes
366
+ */
367
+ .screenshot-capture-container .slide1-intro {
368
+ /* Remove safe-area-inset from padding: calc(48px + env(safe-area-inset-top)) etc */
369
+ padding: 48px 16px 94px 16px !important;
370
+ }
371
+
372
+ /* Fix clamp(40px, 16.41vw, 64px) - set to 32px per design */
373
+ .screenshot-capture-container .slide1-intro__brand-container {
374
+ gap: 8px !important;
375
+ transform: translateY(var(--screenshot-text-offset, -6px)) !important;
376
+ }
377
+
378
+ /* Fix clamp(28px, 10vw, 56px) - 10vw × 390 / 100 = 39px, capped at 56px for short */
379
+ .screenshot-capture-container .slide1-intro__brand {
380
+ font-size: 39px !important;
381
+ }
382
+
383
+ .screenshot-capture-container .slide1-intro__brand--short {
384
+ font-size: 55px !important; /* clamp(40px, 14vw, 72px) - 14vw = 54.6px */
385
+ }
386
+
387
+ .screenshot-capture-container .slide1-intro__brand--medium {
388
+ font-size: 39px !important; /* clamp(32px, 10vw, 56px) */
389
+ }
390
+
391
+ .screenshot-capture-container .slide1-intro__brand--long {
392
+ font-size: 27px !important; /* clamp(24px, 7vw, 44px) - 7vw = 27.3px */
393
+ }
394
+
395
+ /* Fix clamp(24px, 4.7vh, 40px) - 4.7vh × 692 / 100 = 32.5px */
396
+ .screenshot-capture-container .slide1-intro__headline {
397
+ font-size: 33px !important;
398
+ }
399
+
400
+ /* Fix clamp(14px, 4.1vw, 16px) - already covered globally */
401
+ .screenshot-capture-container .slide1-intro__subtitle {
402
+ font-size: 16px !important;
403
+ }
404
+
405
+ /* Fix frames gap: clamp(8px, 3.08vw, 12px) - 3.08vw = 12px */
406
+ .screenshot-capture-container .slide1-intro__frames {
407
+ gap: 12px !important;
408
+ }
409
+
410
+ /* Fix frame width: clamp(140px, 46.15vw, 180px) - 46.15vw = 180px */
411
+ .screenshot-capture-container .slide1-intro__frames .frame-rect {
412
+ width: 180px !important;
413
+ }
414
+
415
+ /* ===== GLOBAL FONT SIZE FIXES =====
416
+ * Many text elements use clamp() with vw units
417
+ * Convert to fixed pixels for 390px width
418
+ * Formula: X vw × 390px / 100 = Y px
419
+ */
420
+
421
+ /* Large numbers/stats: clamp(32px, 10.26vw, 40px) → 40px */
422
+ .screenshot-capture-container .stats-number,
423
+ .screenshot-capture-container .streak-number,
424
+ .screenshot-capture-container .slide3-revenue__amount,
425
+ .screenshot-capture-container .slide4-orders__number,
426
+ .screenshot-capture-container .slide5-buyers__number,
427
+ .screenshot-capture-container .slide6-customer__number,
428
+ .screenshot-capture-container .slide3-revenue__currency,
429
+ .screenshot-capture-container .slide8-months__entry--current {
430
+ font-size: 40px !important;
431
+ }
432
+ .screenshot-capture-container .slide9-year__crown{
433
+ font-size: 60px !important;
434
+ }
435
+ /* Medium text: clamp(18px, 6.15vw, 24px) → 24px */
436
+ .screenshot-capture-container .slide7-products__rank {
437
+ font-size: 24px !important;
438
+ }
439
+
440
+ /* Product titles: clamp(16px, 5.13vw, 20px) → 20px */
441
+ .screenshot-capture-container .slide7-products__title {
442
+ font-size: 18px !important;
443
+ padding-bottom: 10px !important;
444
+ }
445
+
446
+ .screenshot-capture-container .slide7-products__subtitle {
447
+ font-size: 10px !important;
448
+ }
449
+ /* Labels/subtitles: clamp(14px, 4.1vw, 16px) → 16px */
450
+ .screenshot-capture-container .stats-label,
451
+ .screenshot-capture-container .stats-sublabel,
452
+ .screenshot-capture-container .streak-label,
453
+ .screenshot-capture-container .slide5-buyers__label,
454
+ .screenshot-capture-container .slide6-customer__label,
455
+ .screenshot-capture-container .slide7-products__lead,
456
+ .screenshot-capture-container .slide7-products__subtitle {
457
+ font-size: 16px !important;
458
+ }
459
+
460
+ /* ===== SLIDE 9 (Year) VH OVERRIDES =====
461
+ * Convert vh units to fixed pixels for 692px height
462
+ */
463
+ .screenshot-capture-container .slide9-year {
464
+ padding-top: 121px !important; /* 17.54vh = 121px */
465
+ }
466
+
467
+ .screenshot-capture-container .slide9-year__rect-layer--top {
468
+ top: 346px !important; /* 50vh = 346px */
469
+ }
470
+
471
+ .screenshot-capture-container .slide9-year__rect-layer--bottom {
472
+ top: 553px !important; /* 79.86vh = 553px */
473
+ }
474
+
475
+ .screenshot-capture-container .slide9-year__rect {
476
+ height: 197px !important; /* 28.4vh = 197px */
477
+ }
478
+
479
+ /* .screenshot-capture-container .slide6-customer__link-text {
480
+ padding-bottom: 14px !important;
481
+ } */
482
+
483
+ /* ===== SLIDE 7 (Products) VH OVERRIDES =====
484
+ * Convert vh units to fixed pixels for 692px height
485
+ */
486
+ .screenshot-capture-container .slide7-products {
487
+ margin-top: 89px !important; /* 12.8vh = 89px */
488
+ gap: 33px !important; /* 4.74vh = 33px */
489
+ }
490
+
491
+ .screenshot-capture-container .slide7-products__list {
492
+ gap: 6px !important; /* 0.9vh = 6px */
493
+ }
494
+
495
+ .screenshot-capture-container .slide7-products__row {
496
+ height: 79px !important; /* 11.37vh = 79px */
497
+ }
498
+
499
+ .screenshot-capture-container .slide7-products__card {
500
+ height: 72px !important; /* 10.37vh = 72px */
501
+ }
502
+
503
+ .screenshot-capture-container .slide7-products__frames {
504
+ top: 500px !important; /* 72.27vh = 500px */
505
+ }
506
+
507
+ .screenshot-capture-container .slide7-products__title, .slide7-products__subtitle{
508
+ max-width: 300px !important;
509
+ }
510
+
511
+ .screenshot-capture-container .slide7-products__text{
512
+ gap: 8px !important; /* 1.15vh = 8px */
513
+ }
514
+
515
+ .screenshot-capture-container .slide7-products__subtitle{
516
+ margin-top: -10px !important;
517
+ }
518
+
519
+ /* ===== SLIDE 2 (Days) SAFE-AREA OVERRIDES =====
520
+ * Fix env(safe-area-inset) margins
521
+ */
522
+ .screenshot-capture-container .slide2-days__streak-section{
523
+ gap: 16px !important;
524
+ }
525
+ .screenshot-capture-container .slide2-days__stats {
526
+ margin: 128px 16px 0 16px !important; /* Remove safe-area-inset */
527
+ }
528
+
529
+ .screenshot-capture-container .slide2-days__streak {
530
+ margin: 393px 16px 0 16px !important; /* 56.75vh × 692 / 100 = 393px */
531
+ }
532
+
533
+ /* ===== SLIDE 6 (Customer) SAFE-AREA OVERRIDES ===== */
534
+ .screenshot-capture-container .slide6-customer__link-bar {
535
+ bottom: 100px !important; /* Remove safe-area-inset */
536
+ }
537
+
538
+ /* ===== SLIDE 10 (Final) SAFE-AREA OVERRIDES ===== */
539
+ .screenshot-capture-container .slide10-final__bottom {
540
+ padding-bottom: 24px !important; /* Remove safe-area-inset */
541
+ }