Repository navigation
v0.0.4
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,labelsandnonce.Toasterdraws 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", soToastercan go straight into a serverapp/layout.tsx. Thanks to @tcisse (#8, #10). - CSP nonce. Pass
noncetoToaster(React, Svelte, Vue) ormountToaster({ nonce })when yourstyle-srcblocks 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