Skip to content

v0.0.4

Choose a tag to compare

@YusufCeng1z YusufCeng1z released this 10 Nov 09:51
· 39 commits to main since this release
b7d9828

A release with a new Vue package, Next.js and CSP support, and calmer toasts. No breaking changes. The two fixes have live demos on the What's new page.

New

  • Vue 3 and Nuxt. There is a new package, @yusufceng1z/ding-vue, with the same props as the others: position, theme, labels and nonce. Toaster draws nothing in place and mounts after the page loads, so server rendering is safe. Asked for by @reslear (#7).
  • Next.js without a wrapper. The React build now starts with "use client", so Toaster can go straight into a server app/layout.tsx. Thanks to @tcisse (#8, #10).
  • CSP nonce. Pass nonce to Toaster (React, Svelte, Vue) or mountToaster({ nonce }) when your style-src blocks inline styles. Thanks to @tcisse (#9, #11).

Fixed

  • Progress toasts no longer flicker. A toast that changed its own text while running, like a download with a moving percentage, replayed the text animation on every update. It now only plays when the title really changes. Reported by @MathiasWP (#5, #6).
  • In the plain DOM renderer, and so in Vue and Nuxt, the close button now stays last when an error toast turns into one with an action (Error, then Undo).
  • The icons keep their size when the stylesheet is blocked, instead of filling the page.

For contributors

  • The React, Svelte, Vue and plain DOM renderers all have render tests now, and CI runs them. Thanks to @tcisse (#12, #13).

Install

npm i @yusufceng1z/ding-react@latest   # React
npm i @yusufceng1z/ding-svelte@latest  # Svelte 5
npm i @yusufceng1z/ding-vue@latest     # Vue 3 and Nuxt
npm i @yusufceng1z/ding@latest         # plain DOM