@livelayer/react 0.18.1 → 0.18.3
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/dist/styles.css +55 -25
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -582,34 +582,64 @@
|
|
|
582
582
|
flex-direction: column;
|
|
583
583
|
}
|
|
584
584
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
585
|
+
/* Sizing is media-query-driven, NOT JS-class-driven.
|
|
586
|
+
*
|
|
587
|
+
* Why: useIsMobile() is SSR-safe — it returns `false` on the server
|
|
588
|
+
* and on the very first client paint, then flips to `true` on the
|
|
589
|
+
* first useEffect tick. If sizing were keyed off the .ll-expanded--
|
|
590
|
+
* desktop / .ll-expanded--mobile class (which IS JS-driven), the
|
|
591
|
+
* first paint would render at desktop dimensions (400×560), then
|
|
592
|
+
* snap down to mobile dimensions (160×230) once the effect ran.
|
|
593
|
+
* Visitors on phones saw a visible flash of an oversized widget.
|
|
594
|
+
*
|
|
595
|
+
* The component still adds the .ll-expanded--desktop / --mobile
|
|
596
|
+
* class — other styles (the compact-status pill positioning,
|
|
597
|
+
* topbar padding, PIP sizing, etc.) key off it. But the bounding-
|
|
598
|
+
* box dimensions live in the .ll-expanded base + the media query
|
|
599
|
+
* below, so the right size is applied at first paint regardless
|
|
600
|
+
* of JS readiness.
|
|
601
|
+
*
|
|
602
|
+
* Breakpoint: 640px (matches Tailwind's `sm`). When a consumer
|
|
603
|
+
* passes a custom mobileBreakpoint prop, the JS still computes
|
|
604
|
+
* isMobile against that custom value (drives layout / waveform /
|
|
605
|
+
* compactControls behavior) — but the CSS box dims stick to 640px.
|
|
606
|
+
* Acceptable tradeoff: the visual size flickers slightly when the
|
|
607
|
+
* custom breakpoint differs from 640, but the common case (every
|
|
608
|
+
* site using the default breakpoint) has zero flash.
|
|
609
|
+
*
|
|
610
|
+
* LL landing reference (components/landing/ExperienceFork.tsx:36):
|
|
611
|
+
* mobile (default): w-[160px] h-[230px]
|
|
612
|
+
* sm+ (≥640px): w-[180px] h-[260px]
|
|
613
|
+
* Desktop reference: 400 × 560, matches editor preview at app.livelayer.studio.
|
|
614
|
+
*/
|
|
615
|
+
.ll-expanded {
|
|
616
|
+
/* Mobile-first: phones get the thumbnail card by default. The
|
|
617
|
+
desktop override below kicks in at ≥1024px where there's
|
|
618
|
+
actually room for the full 400 × 560 panel. */
|
|
619
|
+
width: 160px;
|
|
620
|
+
height: 230px;
|
|
610
621
|
border-radius: 16px;
|
|
611
622
|
}
|
|
612
623
|
|
|
624
|
+
@media (min-width: 640px) and (max-width: 1023px) {
|
|
625
|
+
.ll-expanded {
|
|
626
|
+
/* Sm-to-lg breakpoint — small tablets / large phones in
|
|
627
|
+
landscape. Slightly larger thumbnail. Matches the LL demo's
|
|
628
|
+
`sm:w-[180px] sm:h-[260px]` exactly. */
|
|
629
|
+
width: 180px;
|
|
630
|
+
height: 260px;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
@media (min-width: 1024px) {
|
|
635
|
+
.ll-expanded {
|
|
636
|
+
/* Desktop card — full 400 × 560 with a softer 20px radius. */
|
|
637
|
+
width: 400px;
|
|
638
|
+
height: 560px;
|
|
639
|
+
border-radius: 20px;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
|
|
613
643
|
/* ── Background layers ───────────────────────────────────────── */
|
|
614
644
|
|
|
615
645
|
.ll-expanded__bg,
|