Skip to content

Releases: zerodevx/svelte-toast

v0.9.6

21 Sep 09:01
Compare
Choose a tag to compare

This is a maintenance update that brings tooling and dependencies in sync with the latest Svelte decisions.

Changelog

  • onpop() callback returns a details object as its second param containing the close event, if any (#104):
toast.push('foo', {
  onpop: (id, details) => {
    const { event } = details
    // `undefined` if closed by timeout; 
    // `MouseEvent|KeyboardEvent` if closed by dismiss button
    console.log(event)
  }
})
<script lang="ts">
import { toast, type SvelteToastOptions } from '@zerodevx/svelte-toast'

function stub(msg: string, options: SvelteToastOptions) {
  toast.push(msg, options)
}
</script>
  • Support Svelte v5 since it's backward compatible

Roadmap

The next minor v0.10.0 will contain breaking changes - strictly speaking, semver allows that between minor increments of the v0 branch. Changes include:

  • onpop(): callback deprecated in favour of a promise-based implementation;
  • component: decoupling of ToastItem into a Controller and View - this allows greater control on how a toast looks;
  • pausable: none|hover|hidden|all - finer control on when toasts pause (#103);
  • reverse: applies to container-level only;
  • and probably some other stuff.

These changes prepare us for v1.0.0 where codebase will be refactored to Svelte v5 only - this repo greatly benefits from v5's fine-grained reactivity and snippet runes. Work on this begins when v5 stable ships.

Moving forward, the v0 branch will be maintained based on Svelte v4 (can be used in both v4 and v5 projects), while the v1 branch will be written in Svelte v5 and can only be used in v5 projects.

v0.9.5

02 Jul 07:37
Compare
Choose a tag to compare
  • Improve accessibility (fixes #85)
  • Some tooling updates

v0.9.4

23 Jun 15:44
Compare
Choose a tag to compare
  • Add Svelte v4 support (#83)

v0.9.3

25 Mar 19:39
Compare
Choose a tag to compare
  • Fix webpack module resolution (#71)

v0.9.2

27 Feb 14:29
Compare
Choose a tag to compare
  • Fix UMD build (#67)

v0.9.1

27 Feb 13:00
Compare
Choose a tag to compare
  • Update some tooling internals

v0.9.0

24 Feb 09:53
Compare
Choose a tag to compare

Sorry this took some time.

v0.9 introduces a big tooling upgrade to svelte-package to better keep in sync with any changes in the Svelte ecosystem. Consequently, compiled packages (for non-Svelte consumers) are moved to a separate /dist endpoint. This distinction helps the package work with virtually any permutation of environment setup.

Under the hood, we added better type safety, moved away from handwritten ts.d to generated ones, and performed a slight code refactor/cleanup.

v1.0.0-rc.1

30 Nov 12:24
Compare
Choose a tag to compare
v1.0.0-rc.1 Pre-release
Pre-release

⚠️ IMPORTANT NOTICE!
Install this component if you're using the latest SvelteKit. That's because of a breaking change that landed there. Background of the issue here. Track progress as we work towards v1 here.

v0.8.2...v1.0.0-rc.1

Edit: resolved from v0.9 onwards. SvelteKit users should switch back to @latest stable:

$ npm i -D @zerodevx/svelte-toast@latest

v0.8.2

08 Nov 11:59
Compare
Choose a tag to compare
  • Fix custom SVG button in demo (#58)

v0.8.1

05 Nov 09:01
Compare
Choose a tag to compare
  • Refactor visibilitychange logic to play nice with SSR (fixes #56)