Adopt (or create) a polite live region and expose an imperative API for
showing and dismissing toasts. Declarative [data-hl-toast-trigger] buttons
are handled through event delegation, so triggers added later need no
re-enhancement. Hovering or focusing a toast pauses its auto-dismiss timer,
danger toasts are announced assertively, and every show/dismiss is
observable through onOpenChange/hl:open-change. Outside a browser this
is a safe no-op that returns an empty handle. Markup can set
data-hl-duration on the region.
Adopt (or create) a polite live region and expose an imperative API for showing and dismissing toasts. Declarative
[data-hl-toast-trigger]buttons are handled through event delegation, so triggers added later need no re-enhancement. Hovering or focusing a toast pauses its auto-dismiss timer,dangertoasts are announced assertively, and every show/dismiss is observable throughonOpenChange/hl:open-change. Outside a browser this is a safe no-op that returns an empty handle. Markup can setdata-hl-durationon the region.