v - 1.2.0
The first release since 1.0.1 — it rolls up versions 1.1.0 through 1.2.0.
Added
- Variable-width slides —
slidesPerView="auto"(1.1.0). Each slide keeps its own content width instead of an equal fraction of the viewport (tag rows, chips, hero strips, self-sizing cards). The carousel measures every slide, re-measures when their content resizes, and drives all geometry from those measurements: positions are measured rather than derived (trailing slides sharing the final viewport collapse into one flush position), drag / free /free snapproject onto the real boundaries, and the last position rests flush — never blank space. Works withloop,flow,gap,align,axis="y",lazyMount, andbreakpoints. Server-side the slides render at their natural width —initialIndex0 withoutloopis zero-CLS. - Adaptive viewport height — the new
lightslide/autoheightentry (1.2.0). PassautoHeight={<AutoHeight />}and the viewport takes the active slide's measured height, animating every change in step with the snap (same duration and easing) instead of staying as tall as the tallest slide (dead air) or cropping. Slides top-align while engaged; the height re-measures when the active slide's content resizes (an image loads, text expands) and when the viewport reflows, and follows every navigation source — drag, controls, autoplay, the external API, a free-scroll coast settling.prefers-reduced-motionapplies each height instantly. Inert whileflowruns and on a vertical carousel (axis="y"); unmounting the plugin restores the default tallest-slide box. The entry weighs ~0.7 kB brotli.
Fixed
- React 19: loop clones stayed reachable by assistive tech (1.1.1). React 19 promoted
inertto a real boolean prop and treats the React-18 empty-string form as false — so on React 19 the loop clones silently lost theirinert, putting their focusable duplicates back into the tab order. The attribute now follows the running React major:trueon 19+,''on 18. The peer range is unchanged (>=18).
Changed
- Bundle budgets follow the features honestly. Variable width raised the core 5.5 → 6 kB (1.1.0); a source-level size pass then clawed bytes back and tightened core to 6,
lightslide/freeto 2,lightslide/flowto 1.85 kB (1.1.2); the autoheight slot's core-side seam costs ~55 B, so the core budget is now 6.05 kB (actual ~6.02, brotli). Bundles that never importlightslide/autoheightpay only the seam; the plugin logic lives entirely in the opt-in entry. - Dev-dependency majors landed along the way (Jest 30, React 19 in the unit matrix), and a fresh high advisory in transitive dev dependencies (js-yaml, CVE-2026-59870) was resolved via
npm audit fix— 0 known vulnerabilities.
Full details: CHANGELOG.md · Docs: Variable width · Adaptive height · Demo: lightslide.vercel.app