Guide

Changelog

Verified release notes, including explicit breaking changes.

All notable changes to this project are documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning. Dates for published releases are the UTC publication dates reported by npm. Versions marked as unpublished have a Git tag but are not present in the npm registry.

[5.0.1] - 2026-11-17

Changed

  • Internal: source uses arrow functions throughout, and clearing rendered content uses replaceChildren(). No API or behavior change.
  • Internal: the toast store behind ToastState is a closure-based object instead of a class instance, following the family rule (no classes or this). Its public members and behavior are unchanged; the former private helpers are no longer reachable on the object.

5.0.0 - 2026-11-15

Breaking changes

  • The classic script no longer has a default export: use window.Notify (or globalThis.Notify). Code that read Notify.default must drop .default.
  • The browser bundle is now dist/browser/notify.global.js, following the family naming. dist/browser/global.global.js is still shipped as an identical alias, so existing CDN URLs keep working.
  • The stylesheet is now @samline/notify/style.css (dist/style.css). @samline/notify/styles.css and dist/styles.css remain as aliases of the same file.

Changed

  • Installs with pnpm and runs every script with Bun, with the @samline family CI, Prettier settings and size budgets for each public entry.
  • CDN examples use pinned jsDelivr URLs.

Fixed

  • Destroying a toaster while one of its toasts has focus returns focus to the element focused before entering the toaster, instead of dropping it on <body>.

Tests

  • Coverage thresholds raised to 90 % branches and 95 % statements, functions and lines.
  • Playwright tests of the CDN bundle in Chromium, Firefox and WebKit.

4.0.1 - 2026-11-05

Fixed

  • Publish CHANGELOG.md in the npm tarball. 4.0.0 only shipped dist, so the changelog could not be read from the installed package (Drawer and Ticker already include it).

4.0.0 - 2026-11-05

Includes every change prepared for 3.2.1, which was never published.

Added

  • Added the public website workspace in site/: a landing page with a live @samline/notify demo, an examples gallery and the documentation app. The site uses an amber accent and is published from the site/ build.

  • toast.custom() callbacks receive a { id, dismiss } context and may return a cleanup function, which runs before every re-render and when the toast is removed. New CustomContentContext type.

  • Action and cancel buttons stay open when their onClick calls event.preventDefault().

  • Toasts re-measure with a ResizeObserver when their content or the viewport changes size.

  • HISTORY_LIMIT export (50): the number of dismissed records kept for getHistory().

  • Website: a “Toast types” panel on Home and a schematic preview of each example’s notification.

Behavior changes

  • onDismiss runs once from the shared state, regardless of how many toasters are mounted (previously once per mounted renderer, and never without one).
  • getHistory() keeps only the newest 50 dismissed records so long-lived pages do not retain every toast.
  • toast.dismiss(id) for an id that was never created is a no-op instead of reserving that id.
  • A PromiseData.description function now also runs on success, receiving the resolved value.
  • Toast items no longer carry an aria-label (it replaced the description and actions for screen readers); their rendered content is the accessible name.
  • [data-custom] is now a direct child of the toast item instead of being nested in [data-icon].
  • Centered positions support vertical swipe dismissal; getDefaultSwipeDirections no longer returns 'center'.
  • When the focused toast leaves, focus moves to the next toast or back to the element focused before entering the toaster, instead of the element focused when the toaster mounted.

Fixed

  • Inverted toasts had unreadable descriptions (dark grey on black in light theme, light grey on white in dark theme). Description color and focus rings are now theme tokens (--description-text, --focus-ring).
  • A fast tap with a few pixels of jitter could dismiss a toast as a flick; flicks now need at least 10 px.
  • Releasing an aborted drag no longer fires the toast’s onClick.
  • Delete/Backspace only dismisses toasts that belong to the focused toaster.
  • The stylesheet no longer defines its direction variables on the html element.

Changed

  • Moved the documentation from the retired Starlight app in example/ to site/docs/, and redirected the previous public routes (/getting-started/, /reference/*, /guides/*) to their new location under /docs/.

[3.2.1] - Not published (folded into 4.0.0)

Fixed

  • The standalone IIFE now exposes the registry directly as window.Notify; the bundler no longer overwrites it with the module namespace. ESM and CommonJS exports remain unchanged.

  • Promise notifications no longer reappear after dismissal, reset or singleton teardown, and an older promise cannot overwrite a newer same-id notification. Async formatters check ownership again after awaiting. unwrap() still preserves the original promise outcome.

  • Settled-only promise notifications retain their toast options. Omitted or failed result formatters dismiss their loading state instead of leaving it indefinitely.

  • Mounting renders buffered toast state immediately. Destroyed controllers and queued measurements cannot rearm timers. New notifications pause while the document is hidden.

  • Singleton teardown and reset complete even when consumer dismissal callbacks throw. Subscription dispatch tolerates a subscriber removing itself.

  • Hidden and exiting notifications are inert, and the keyboard shortcut focuses the newest visible notification. Lazy message factories now have matching public TypeScript types.

  • Custom width overrides now apply through the style map. Position updates refresh swipe direction and eligibility on existing notifications; canceled or opposite-direction gestures no longer displace or dismiss them.

  • Editable controls retain Backspace/Delete and text-selection gestures. Keyboard focus expands the stack for reading, and updated durations take effect while the document is hidden.

  • Rich-color success, information, warning and error messages meet normal-text contrast requirements in the default light palette.

  • Two-action notifications now place their controls below the message instead of squeezing the description into a narrow column. Long labels can wrap without overflowing.

Maintenance

  • Updated compatible development dependencies and pinned corrected Vite and source-map-js resolutions after the dependency audit. The runtime remains dependency-free.

Documentation

  • Rebuilt the notification examples and onboarding around working consumer tasks, with ESM and CDN files, historical fragment preservation, synchronized Markdown sources and complete host integration examples.
  • Version 3.2.1 is prepared locally and has not been published. CDN recipes remain pinned to published 3.2.0 and resolve its namespace compatibility issue explicitly.

3.2.0 - 2026-09-23

Added

  • Added the named Notify namespace export alongside browser.

Changed

  • Made the root entrypoint, browser module, IIFE, and window.Notify consume the exact same singleton namespace.

3.1.5 - 2026-09-23

Added

  • Added complete public documentation for promises, browser builds, accessibility, framework integrations, styling, troubleshooting, and every exported API/type.

Changed

  • Made RenderableOrFactory and ToastToDismiss available as root type exports.
  • Made public toast history and active-list getters return defensive snapshots.
  • Clarified the shared-state behavior of direct toaster mounts and replaced non-runnable or misleading examples.

Fixed

  • Moved the GitHub Pages workflow to the repository root so Actions can discover it and deploy the example/dist documentation build.
  • Preserved mounted renderer subscriptions when resetToasts() clears toast state.
  • Cleared the singleton registry when its controller is destroyed directly and delivered dismissal callbacks before destroyToaster() unmounts it.
  • Generated a valid id when toast.custom() receives an empty string id.
  • Removed stale empty accessibility labels when a typed toast is updated to a normal toast.

3.1.4 - Unpublished

Changed

  • Reworked package, README, and website copy to highlight accessibility, zero runtime dependencies, typed APIs, and all supported build formats.
  • Added npm discovery keywords for toast notifications, JavaScript, TypeScript, browser usage, and accessibility.

Fixed

  • Updated documentation CI and deployment to Node.js 22, as required by Astro 7.

3.1.3 - Unpublished

Added

  • Added package smoke tests for ESM, CommonJS, browser, IIFE, CSS, and early DOM loading.
  • Added coverage thresholds and a root continuous integration workflow.
  • Added a dedicated ESM/CommonJS @samline/notify/browser entry point.

Changed

  • Updated the test and build toolchain, package metadata, documentation, and CDN examples.
  • Improved keyboard interaction, reduced-motion behavior, decorative icon semantics, and close-button sizing.

Fixed

  • Kept numeric and string toast IDs distinct and prevented explicit IDs from colliding with generated IDs.
  • Preserved timer deadlines across hover, focus, visibility changes, updates, and rerenders.
  • Made partial toaster updates preserve omitted layout and theme settings.
  • Refreshed callbacks, content, actions, classes, test IDs, and accessibility labels on same-ID updates.
  • Corrected same-ID recreation during exit transitions and from dismissal callbacks.
  • Ensured description factories run once and toast.promise().unwrap() preserves the original result.
  • Deferred browser-global mounting until the document body is available.
  • Declared CSS and the IIFE bundle as package side effects.

3.1.2 - Unpublished

Fixed

  • Preserved the configured exit duration instead of truncating exit transitions.
  • Applied dynamic toast gaps consistently during layout updates.

3.1.1 - 2026-07-14

Fixed

  • Allowed exit animations to complete for their full duration.
  • Prevented hover movement from causing repeated rerenders.
  • Applied configured gaps while the toast stack is expanded.
  • Restored the data-swipe-out state used by dismissal animations.

3.1.0 - 2026-07-14

Added

  • Added toaster hotkeys and focus restoration.
  • Added accessibility behavior and labels across the toast lifecycle.

Changed

  • Preserved remaining timer duration when toast activity pauses and resumes.

Fixed

  • Restored five missing configuration options and corrected regressions from the vanilla runtime rewrite.

3.0.0 - 2026-07-14

Changed

  • Rebuilt the package as a framework-agnostic TypeScript toast runtime.
  • Replaced framework-specific adapters with a vanilla/browser API and direct IIFE bundle.
  • Moved the build to tsup with ESM, CommonJS, declarations, CSS, and browser outputs.
  • Raised the supported Node.js version to 20.

Removed

  • Removed React, Vue, and Svelte runtime dependencies and framework-specific entry points.

2.0.3 - 2026-04-08

Fixed

  • Corrected the package author metadata.

2.0.2 - 2026-04-08

Added

  • Added a profile-saving toast.promise example.

Changed

  • Hardened the distribution copy/build script.
  • Standardized source formatting and refreshed API and browser documentation.

Fixed

  • Corrected browser documentation examples and syntax.

2.0.1 - 2026-04-01

Fixed

  • Corrected the browser bundle release and its loading instructions.

2.0.0 - 2026-04-01

Added

  • Added dedicated React, Vue, Svelte, Vanilla, and browser entry points.
  • Added Vue plugin/component support and Svelte integration.
  • Added a build pipeline for copying the complete distribution package.

Changed

  • Reorganized the package around a shared notification core and framework adapters.
  • Renamed the package and internal references to @samline/notify.
  • Replaced Playwright/Jest-era setup with Vitest coverage for the package adapters.

1.0.2 - 2026-04-01

Added

  • Added a browser renderer and the styles required for CDN usage.

Fixed

  • Corrected generated browser entry points and exports.

1.0.1 - 2026-04-01

Changed

  • Standardized the browser global as window.notify and updated the documentation.

Fixed

  • Corrected method names in the global Window interface.

1.0.0 - 2026-04-01

Added

  • Added a unified notification API for React, Vue, Svelte, and Vanilla JavaScript.
  • Added framework entry points, lifecycle cleanup, tests, and English documentation.
  • Added npm publication automation with tag/version validation.

Changed

  • Consolidated the package under the @samline/notify name.
  • Removed obsolete Sileo files and tests.

0.3.0 - 2026-03-31

Changed

  • Simplified the experimental gooey visuals and removed the temporary demo assets.
  • Updated package and CDN documentation for the minor release.

0.2.7 - 2026-03-31

Changed

  • Simplified SVG gooey-filter markup and visual styling across framework adapters.

0.2.6 - 2026-03-31

Changed

  • Refined gooey filters, layered shadows, and the left accent treatment.

0.2.5 - 2026-03-31

Added

  • Added gooey SVG effects and runnable React, Vue, Svelte, and Vanilla demos.

Changed

  • Expanded the visual treatment and adapter implementations for the new effects.

0.2.3 - 2026-03-30

Added

  • Added centered top and bottom toaster positions.

0.2.2 - 2026-03-30

Changed

  • Reworked Vanilla fallback behavior and clarified bundler/CDN usage in the documentation.
  • Updated the documentation to English.

Fixed

  • Removed warnings caused by uninitialized toast positions.
  • Added jsdom coverage for the Vanilla toaster manager.

0.2.0 - 2026-03-30

Added

  • Expanded notification options and API parity across React, Vue, Svelte, and Vanilla adapters.
  • Added comprehensive usage, configuration, promise, action, and lifecycle examples.
  • Added tests for the expanded core and Vanilla APIs.

0.1.15 - 2026-03-28

Changed

  • Unified and clarified the public API documentation for every framework adapter.

Fixed

  • Made NotifyController members public to prevent TypeScript declaration error TS4094.

0.1.10 - 2026-03-28

Fixed

  • Corrected the UMD browser bundle and synchronized browser documentation.

0.1.9 - 2026-03-28

Changed

  • Synchronized CDN links and documentation for the published package.

0.1.8 - 2026-03-27

Fixed

  • Corrected UMD output for direct browser compatibility.
  • Updated browser examples and package metadata for CDN consumers.

0.1.7 - 2026-03-27

Changed

  • Updated npm publication automation and tag/version validation.

0.1.6 - 2026-03-27

Fixed

  • Migrated the Rollup configuration to ESM so package builds could run under type: module.
  • Corrected npm authentication and publication workflow setup.
  • Added the npm package inclusion/exclusion rules used by releases.

0.1.1 - 2026-03-27

Changed

  • Republished after a registry conflict on 0.1.0; no functional changes.

0.1.0 - 2026-03-27

Added

  • Published the first @samline/notify release with React, Vue, Svelte, Vanilla, and UMD adapters.
  • Added dist/styles.css to the build output.

Changed

  • Renamed the internal controller and package from Sileo to Notify.
  • Exposed window.notify while retaining the previous browser global as a compatibility alias.