Skip to content

v1.0.1

Choose a tag to compare

@johnleider johnleider released this 24 Jul 16:11
8b2f66f

Overview

🔧 Bug Fixes

  • Snackbar: SnackbarPortal creates a stacking context so its z-index takes effect (#602)
  • Snackbar: add an urgent prop that switches the live region to role="alert" (#624)
  • createTokens: a token removed via its own ticket.unregister() no longer leaves a stale value in the resolution cache (#567)
  • createTokens: resolve aliases reached through a segment path, return directly-passed TokenAlias literals, and cache chained resolutions (#566)

Patch Changes

  • #602 e866af7 Thanks @sridhar-3009! - fix(Snackbar): SnackbarPortal creates a stacking context so its z-index takes effect (#602)

    The teleported snackbar region applied its stack z-index to a position: static element, which CSS ignores — a body-fallback snackbar could render behind positioned page chrome regardless of its z-index. SnackbarPortal now sets position: relative alongside the z-index (visually neutral, no offsets) so the stacking context is established. Portal's zIndex slot prop is now documented to require a positioned element.

  • #624 64b839c Thanks @sridhar-3009! - fix(Snackbar): add an urgent prop that switches the live region to role="alert" (#624)

    Informational snackbars keep role="status" (a polite live region); setting urgent switches to role="alert" (assertive) so critical notifications interrupt assistive technology instead of waiting for it to go idle (WCAG 4.1.3, Status Messages).

  • #567 05526f0 Thanks @johnleider! - fix(createTokens): a token removed via its own ticket.unregister() no longer leaves a stale value in the resolution cache (#567)

    resolve() results were only invalidated through the context-level mutator methods, so removing a token via its ticket's own unregister() — which is bound to the underlying registry — left the cache stale and subsequent resolve() calls returned the removed value. Cache invalidation now runs off registry mutation events, covering every removal and update path uniformly.

  • #566 ff9c430 Thanks @johnleider! - fix(createTokens): resolve aliases reached through a segment path, return directly-passed TokenAlias literals, and cache chained resolutions (#566)

    resolve() now follows a {alias} that a dotted-segment lookup lands on — previously it returned the raw '{alias}' string (visible under flat: true, where nested objects are stored whole and addressed by segment). A TokenAlias object passed directly to resolve() now returns its $value (previously a non-alias $value was stringified and looked up as an id, yielding undefined), and aliased resolutions cache the outer key rather than only the terminal hop. resolve<T = unknown>() also accepts an optional return-type parameter.