Skip to content

v0.11.0 API stable

Choose a tag to compare

@ctorgalson ctorgalson released this 12 Sep 20:11
· 40 commits to main since this release

The public API is now stable. Method names, event names, BhCarouselSettings, and BhCarouselState are frozen; future 0.x releases will not break them without a major version bump.

Highlights

  • View Transitions API integration — slide changes animate via document.startViewTransition() where supported, with a worked .bhc--horizontal example that pattern-matches for authoring your own effects. Falls back to instant swap under prefers-reduced-motion or in non-supporting browsers.
  • wrap: false setting — new option to stop navigation at the first/last slide instead of wrapping.
  • State-driven rendering — internal refactor to a single source of truth in BhCarouselState, exposed via getState(). Custom-event detail payloads now carry the full state plus the triggering action.
  • Robust teardown — disable() cleanly removes every listener (Next, Previous, Play/Pause, keydown, reduced-motion) and clears the autoplay interval; re-enabling doesn't accumulate handlers.
  • Keyboard scoping — arrow/P keys are scoped to the carousel element, so multiple carousels on one page don't cross-fire.

Also

  • Published to npm as @bedlamhotel/bh-carousel.
  • Test suite expanded to 109 tests.
  • Dependency refresh: typedoc 0.28, vitest 4.1.11, all security advisories cleared.