Skip to content

Releases: scaccogatto/vue-viewports

v4.1.0

Choose a tag to compare

@scaccogatto scaccogatto released this 17 Jul 12:54

Added

  • useMediaQuery(query) — SSR-safe reactive matchMedia composable with reactive query strings and effect-scope cleanup.
  • Breakpoint rules now accept three forms: legacy numeric min-width (unchanged), { min?, max?, orientation? }, or a raw media-query string. Tie-break: width-based rules win ties; width-less rules match only when they're the sole match.

Changed

  • CI on Node 24 (latest LTS).

100% test coverage (35 tests).

v4.0.1

Choose a tag to compare

@scaccogatto scaccogatto released this 17 Jul 10:05

Anchor release: npm vue-viewports@4.0.1 was published via workflow dispatch without a matching tag. This tag anchors 4.0.1 in repo history (no runtime changes since the npm artifact; docs/CI only).

v4.0.0 — Vue 3 rewrite

Choose a tag to compare

@scaccogatto scaccogatto released this 28 Jun 09:34

Vue 2 → Vue 3, rewritten in TypeScript.

Highlights

  • 🧩 Vue 3 plugin + composable — named, reactive matchMedia breakpoints; $currentViewport reactive in every component
  • 🐛 Fixed the reactivity bug — components now re-render on breakpoint change; replaced deprecated MediaQueryList.addListener
  • 17 tests, 100% coverage against a matchMedia mock that exercises real breakpoint switching
  • 📦 0 vulnerabilities; Vite library build (ESM + CJS + UMD + types)

Breaking (v3 → v4)

  • Now Vue 3 only. Migration note in the README.

npm publish of vue-viewports@4.0.0 follows shortly.

Horizon

Choose a tag to compare

@scaccogatto scaccogatto released this 09 Mar 09:50

Patched

Horizon

Choose a tag to compare

@scaccogatto scaccogatto released this 09 Mar 09:45

Patched

matchMedia refactor

Choose a tag to compare

@scaccogatto scaccogatto released this 10 Nov 12:03

This release introduces matchMedia
Special tanks to: @CthulhuDev