{
  "antiPatterns": [
    "Using message text as a timer or dismissal key.",
    "Moving keyboard focus to transient notifications."
  ],
  "api": {
    "importPath": "@ancrel/ui",
    "symbols": [
      "ToastProvider",
      "ToastViewport",
      "ToastItem",
      "useToast"
    ],
    "typeRef": "api/ui/index.d.ts"
  },
  "constraints": [
    "Mount a single ToastViewport within the ToastProvider that owns the notifications.",
    "Retain the ID returned by push to dismiss a particular notification."
  ],
  "docs": "raw/frontend/toast.md",
  "examples": [
    {
      "code": "'use client'\n\nimport { Button, ToastProvider, ToastViewport, useToast } from '@ancrel/ui'\nimport '@ancrel/tokens/css'\nimport '@ancrel/ui/styles.css'\n\nfunction SaveAction() {\n  const { push } = useToast()\n  return <Button onClick={() => push({ message: 'Draft saved', tone: 'success' })}>Save draft</Button>\n}\n\nexport default function App() {\n  return <ToastProvider durationMs={4500}><SaveAction /><ToastViewport /></ToastProvider>\n}\n",
      "command": "pnpm test",
      "entry": "examples/fe.toast/App.tsx",
      "fixture": "examples/fe.toast/",
      "id": "minimal"
    }
  ],
  "id": "fe.toast",
  "kind": "library",
  "language": "typescript",
  "layer": "frontend",
  "owner": "frontend-infra",
  "package": {
    "ecosystem": "npm",
    "name": "@ancrel/ui",
    "version": "0.2.0"
  },
  "provenance": {
    "changes": "Adapted notification expiry from lines 118–132 with the original 4.5-second default. Each push now has a distinct ID and timer, with concurrent messages, explicit dismissal, provider cleanup and persistent live regions.",
    "commit": "4cc384c3bdbd09a3a50268adf81ba23f53aac93e",
    "mode": "extracted",
    "origin": "rule-studio",
    "path": "frontend/src/App.tsx",
    "rights": "org-internal; approved-by=owner; ref=item-19"
  },
  "schemaVersion": 1,
  "stability": "experimental",
  "summary": "Concurrent notifications with independent ID-keyed expiry, manual dismissal, and polite or urgent announcements."
}
