Skip to content

v2.1.0

Compare
Choose a tag to compare
@smastrom smastrom released this 02 Jan 05:40
· 21 commits to main since this release
fc297b7

Release notes

The first minor release of Notivue v2, ships a new feature, fixes a NotivueSwipe bug and brings various improvements to the built-in notifications component.

What's new

useNotivue update聽method

The object returned by useNotivue now includes an update聽method that can be used to update the configuration. Before this release it was only possible to update it by directly assigning a value to each returned ref:

Pre v2.1.0

const config = useNotivue()

config.postion.value = 'bottom-right'
config.enqueue.value = true

v2.1.0

const config聽= useNotivue()

config.update({
  position: 'bottom-right',
  enqueue: true,
})

New options will be merged to your initial configuration and so on. Alternatively, the same method also accepts a function that returns new options and exposes the current configuration as argument:

config.update((currConfig) => ({
  enqueue: !currConfig.enqueue
}))

To update the configuration from outside the setup context, you can use the updateConfig utility which has the same signature of the above-mentioned update method:

import {聽updateConfig }聽from 'notivue'

What's fixed

NotivueSwipe - Fixed a bug where the computation of isPointerInside was not performed correctly.

What's Improved

Notifications

  • Add a tiny and light transition on promise-resolve聽and promise-reject icons appear using Vue Transition component.
  • Reduced the font-size from 1rem to 0.925rem.
  • Disabled spinner animation when prefers-reduced-motion is set to reduce
  • Lowered by little the saturation of the slateTheme foreground color.
  • Improved rendering performance by avoiding unnecessary computed properties to tracked.

Nuxt Module

  • Add auto-imports for any theme and icon set.

Other

  • Did a huge rename refactoring to the demo source files for better user inspection.
  • Set the Vue compiler version to the latest 3.3.x release.