{
  "component": {
    "id": "notification-inbox",
    "name": "Notification inbox",
    "tier": "pro",
    "exampleId": "notification-inbox",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/notification-inbox-demo.tsx",
    "exportName": "NotificationInboxDemo",
    "sha256": "777fc17383a318ee353344f56a03e4c91d54e89d8fe1db54433604583c888ade",
    "helperImports": [],
    "directComponentImports": [
      "notification-inbox"
    ],
    "sampleBoundary": "Existing local demo fixture with fictional data and callbacks. No live service, customer data, access key, or Pro source is included."
  },
  "install": {
    "command": "npx shadcn@latest add @tidal-pro/notification-inbox",
    "registryUrl": "https://tidalui.com/r/pro/notification-inbox.json",
    "namespace": "@tidal-pro",
    "access": "pro",
    "sourceDelivery": "server-gated",
    "requiresAuthorization": true,
    "tokenSource": "local-env",
    "tokenEnvName": "TIDALUI_TOKEN",
    "cli": {
      "package": "shadcn",
      "requested": "latest"
    }
  },
  "installPlan": [
    {
      "order": 1,
      "kind": "primary",
      "dependency": "@tidal-pro/notification-inbox",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/notification-inbox",
      "registryUrl": "https://tidalui.com/r/pro/notification-inbox.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/notification-inbox.tsx",
    "exports": [
      "TidalNotificationInbox",
      "TidalNotificationInboxItem"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/notification-inbox.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "lucide-react"
    ],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "notification-inbox"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/notification-inbox.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/notification-inbox.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/notification-inbox-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useState, type MouseEvent } from \"react\";\n\nimport { Check, ClipboardCheck, RotateCcw, Settings2 } from \"lucide-react\";\n\nimport { TidalNotificationInbox, type TidalNotificationInboxItem } from \"./components/ui/notification-inbox\";\n\nimport \"./components/ui/notification-inbox.css\";\n\nfunction tidalExampleAvatarDataUri(seed: unknown) {\n  const text = String(seed).replace(/[^a-z0-9]/gi, \"\").slice(-2) || \"UI\";\n  const palette = [\"#333333\", \"#555555\", \"#777777\", \"#999999\", \"#bbbbbb\"];\n  const color = palette[Array.from(text).reduce((sum, character) => sum + character.charCodeAt(0), 0) % palette.length];\n  const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\"><rect width=\"96\" height=\"96\" rx=\"48\" fill=\"${color}\"/><circle cx=\"48\" cy=\"38\" r=\"17\" fill=\"white\" fill-opacity=\".92\"/><path d=\"M18 92c3-22 15-34 30-34s27 12 30 34\" fill=\"white\" fill-opacity=\".92\"/></svg>`;\n  return `data:image/svg+xml,${encodeURIComponent(svg)}`;\n}\n\nfunction tidalExampleImageDataUri(label: string) {\n  const safeLabel = label.replace(/[<>&]/g, \"\").slice(0, 28) || \"Sample image\";\n  const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1200 675\"><defs><linearGradient id=\"g\" x1=\"0\" x2=\"1\" y1=\"0\" y2=\"1\"><stop stop-color=\"#171717\"/><stop offset=\"1\" stop-color=\"#555555\"/></linearGradient></defs><rect width=\"1200\" height=\"675\" fill=\"url(#g)\"/><circle cx=\"950\" cy=\"100\" r=\"260\" fill=\"white\" fill-opacity=\".08\"/><text x=\"80\" y=\"570\" fill=\"white\" font-family=\"system-ui,sans-serif\" font-size=\"64\" font-weight=\"700\">${safeLabel}</text></svg>`;\n  return `data:image/svg+xml,${encodeURIComponent(svg)}`;\n}\n\nconst tidalExampleStyles = \".tidal-scope .notification-inbox-specimen {\\n  width: 100%;\\n  max-width: 780px;\\n  min-width: 0;\\n  padding: 20px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 18px;\\n  background: var(--t-subtle);\\n  color: var(--t-ink);\\n  box-shadow: 0 24px 48px -36px #00000048;\\n  container-type: inline-size;\\n}\\n\\n.tidal-scope .notification-inbox-specimen,\\n.tidal-scope .notification-inbox-specimen * {\\n  box-sizing: border-box;\\n}\\n\\n.tidal-scope .notification-inbox-demo-header {\\n  display: flex;\\n  align-items: center;\\n  justify-content: space-between;\\n  gap: 16px;\\n  margin-bottom: 13px;\\n  padding: 0 3px;\\n}\\n\\n.tidal-scope .notification-inbox-demo-header > div {\\n  min-width: 0;\\n}\\n\\n.tidal-scope .notification-inbox-demo-header span,\\n.tidal-scope .notification-inbox-demo-detail > span {\\n  display: block;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  font-weight: 600;\\n  letter-spacing: 0.95px;\\n  line-height: 1.4;\\n}\\n\\n.tidal-scope .notification-inbox-demo-header strong {\\n  display: block;\\n  margin-top: 5px;\\n  color: var(--t-ink);\\n  font-size: 12px;\\n  font-weight: 600;\\n  line-height: 1.4;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .notification-inbox-demo-header > button {\\n  display: inline-flex;\\n  align-items: center;\\n  justify-content: center;\\n  gap: 7px;\\n  min-height: 44px;\\n  flex: none;\\n  padding: 8px 11px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 10px;\\n  background: var(--t-surface);\\n  color: var(--t-ink);\\n  font: inherit;\\n  font-size: 11px;\\n  cursor: pointer;\\n  transition:\\n    background 160ms,\\n    transform 140ms var(--t-ease-out);\\n}\\n\\n.tidal-scope .notification-inbox-demo-header > button:hover {\\n  background: var(--t-wash);\\n}\\n\\n.tidal-scope .notification-inbox-demo-header > button:active {\\n  transform: scale(0.98);\\n}\\n\\n.tidal-scope .notification-inbox-demo-header > button:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 2px;\\n}\\n\\n.tidal-scope .notification-inbox-specimen > .tidal-notification-inbox {\\n  max-width: none;\\n}\\n\\n.tidal-scope .notification-inbox-demo-footer {\\n  display: grid;\\n  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.55fr);\\n  gap: 12px;\\n  margin-top: 13px;\\n}\\n\\n.tidal-scope .notification-inbox-demo-detail,\\n.tidal-scope .notification-inbox-demo-status {\\n  min-width: 0;\\n  margin: 0;\\n  border: 1px solid var(--t-border);\\n  border-radius: 11px;\\n  background: var(--t-surface);\\n}\\n\\n.tidal-scope .notification-inbox-demo-detail {\\n  padding: 15px 16px;\\n  scroll-margin-block: 15px;\\n}\\n\\n.tidal-scope .notification-inbox-demo-detail > strong {\\n  display: block;\\n  margin-top: 7px;\\n  color: var(--t-ink);\\n  font-size: 11px;\\n  font-weight: 600;\\n  line-height: 1.45;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .notification-inbox-demo-detail > p,\\n.tidal-scope .notification-inbox-demo-status {\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.6;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .notification-inbox-demo-detail > p {\\n  margin: 5px 0 0;\\n}\\n\\n.tidal-scope .notification-inbox-demo-status {\\n  display: flex;\\n  align-items: center;\\n  padding: 15px 16px;\\n}\\n\\n@container (max-width: 520px) {\\n  .tidal-scope .notification-inbox-demo-footer {\\n    grid-template-columns: 1fr;\\n  }\\n}\\n\\n@media (max-width: 390px) {\\n  .tidal-scope .notification-inbox-specimen {\\n    padding: 10px;\\n  }\\n\\n  .tidal-scope .notification-inbox-demo-header {\\n    align-items: flex-start;\\n    flex-direction: column;\\n  }\\n\\n  .tidal-scope .notification-inbox-demo-header > button {\\n    width: 100%;\\n  }\\n}\\n\\n@media (prefers-reduced-motion: no-preference) {\\n  .tidal-scope .notification-inbox-demo-header,\\n  .tidal-scope .notification-inbox-demo-footer {\\n    animation: notification-inbox-demo-enter 420ms var(--t-ease-out) both;\\n  }\\n\\n  .tidal-scope .notification-inbox-demo-footer {\\n    animation-delay: 120ms;\\n  }\\n}\\n\\n@keyframes notification-inbox-demo-enter {\\n  from {\\n    opacity: 0;\\n    transform: translateY(6px);\\n  }\\n  to {\\n    opacity: 1;\\n    transform: none;\\n  }\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n  .tidal-scope .notification-inbox-demo-header > button {\\n    transition-duration: 0.01ms;\\n  }\\n\\n  .tidal-scope .notification-inbox-demo-header > button:active {\\n    transform: none;\\n  }\\n}\";\n\nconst INITIAL_ITEMS = [\n  {\n    id: \"launch-brief\",\n    title: \"Lena Ortiz assigned the launch brief\",\n    description: \"Review the final sections before the local sample deadline.\",\n    timestamp: \"4 min ago\",\n    dateTime: \"2026-10-14T18:24:00-05:00\",\n    category: \"Assignment\",\n    read: false,\n    avatar: { src: tidalExampleAvatarDataUri(\"01\"), alt: \"\" },\n    detail: { label: \"View brief\", href: \"#notification-demo-detail\" },\n    action: { id: \"review\", label: \"Review update\" },\n  },\n  {\n    id: \"website-note\",\n    title: \"Noah Kim mentioned you in Website notes\",\n    description: \"The navigation copy is ready for a local review.\",\n    timestamp: \"18 min ago\",\n    dateTime: \"2026-10-14T18:10:00-05:00\",\n    category: \"Mention\",\n    read: false,\n    avatar: { src: tidalExampleAvatarDataUri(\"02\"), alt: \"\" },\n    detail: { label: \"Read note\", href: \"#notification-demo-detail\" },\n  },\n  {\n    id: \"agenda-file\",\n    title: \"Casey Morgan added the weekly agenda\",\n    description: \"A fictional meeting document is listed in this preview.\",\n    timestamp: \"42 min ago\",\n    dateTime: \"2026-10-14T17:46:00-05:00\",\n    category: \"File\",\n    read: true,\n    avatar: { src: tidalExampleAvatarDataUri(\"03\"), alt: \"\" },\n    detail: { label: \"View details\", href: \"#notification-demo-detail\" },\n  },\n  {\n    id: \"campaign-review\",\n    title: \"Priya Shah moved Campaign to review\",\n    description: \"The local board now shows the project in its review column.\",\n    timestamp: \"1 hr ago\",\n    dateTime: \"2026-10-14T17:22:00-05:00\",\n    category: \"Project\",\n    read: false,\n    avatar: { src: tidalExampleAvatarDataUri(\"04\"), alt: \"\" },\n    detail: { label: \"View project\", href: \"#notification-demo-detail\" },\n  },\n  {\n    id: \"workspace-settings\",\n    title: \"Workspace settings were updated\",\n    description: \"Notification preferences changed in this fictional sample.\",\n    timestamp: \"2 hr ago\",\n    dateTime: \"2026-10-14T16:12:00-05:00\",\n    category: \"System\",\n    read: true,\n    icon: <Settings2 size={17} />,\n    detail: { label: \"View summary\", href: \"#notification-demo-detail\" },\n  },\n  {\n    id: \"feedback-request\",\n    title: \"Jordan Lee requested feedback\",\n    description: \"Two layout decisions are ready for local review.\",\n    timestamp: \"Yesterday\",\n    dateTime: \"2026-10-13T15:35:00-05:00\",\n    category: \"Review\",\n    read: false,\n    avatar: { src: tidalExampleAvatarDataUri(\"05\"), alt: \"\" },\n    detail: { label: \"View request\", href: \"#notification-demo-detail\" },\n    action: { id: \"review\", label: \"Review update\" },\n  },\n  {\n    id: \"comment-resolved\",\n    title: \"Maya Chen resolved three comments\",\n    description:\n      \"The resolved notes remain available in the local detail view.\",\n    timestamp: \"Yesterday\",\n    dateTime: \"2026-10-13T11:08:00-05:00\",\n    category: \"Comment\",\n    read: true,\n    avatar: { src: tidalExampleAvatarDataUri(\"06\"), alt: \"\" },\n    detail: { label: \"View comments\", href: \"#notification-demo-detail\" },\n  },\n] satisfies TidalNotificationInboxItem[];\n\nfunction isPlainPrimaryClick(event: MouseEvent<HTMLAnchorElement>) {\n  return (\n    event.button === 0 &&\n    !event.metaKey &&\n    !event.ctrlKey &&\n    !event.altKey &&\n    !event.shiftKey\n  );\n}\n\nexport function NotificationInboxDemo() {\n  const [items, setItems] = useState<TidalNotificationInboxItem[]>(() =>\n    INITIAL_ITEMS.map((item) => ({ ...item })),\n  );\n  const [selectedId, setSelectedId] = useState(INITIAL_ITEMS[0].id);\n  const [handled, setHandled] = useState<Set<string>>(() => new Set());\n  const [status, setStatus] = useState(\n    \"Fictional local updates. No service is connected.\",\n  );\n  const selected =\n    items.find((item) => item.id === selectedId) ?? items[0] ?? null;\n\n  const displayItems = items.map((item) => ({\n    ...item,\n    detail: item.detail\n      ? {\n          ...item.detail,\n          linkProps: {\n            onClick: (event: MouseEvent<HTMLAnchorElement>) => {\n              if (!event.defaultPrevented && isPlainPrimaryClick(event)) {\n                event.preventDefault();\n                setSelectedId(item.id);\n                setStatus(`Showing ${item.title} in the local detail panel.`);\n              }\n            },\n          },\n        }\n      : undefined,\n    action: item.action\n      ? {\n          ...item.action,\n          label: handled.has(item.id) ? \"Reviewed\" : item.action.label,\n          icon: handled.has(item.id) ? (\n            <Check size={15} />\n          ) : (\n            <ClipboardCheck size={15} />\n          ),\n          buttonProps: { disabled: handled.has(item.id) },\n        }\n      : undefined,\n  }));\n\n  function reset() {\n    setItems(INITIAL_ITEMS.map((item) => ({ ...item })));\n    setSelectedId(INITIAL_ITEMS[0].id);\n    setHandled(new Set());\n    setStatus(\"Fictional local updates reset. No service is connected.\");\n  }\n\n  return (\n    <section className=\"notification-inbox-specimen\">\n      <header className=\"notification-inbox-demo-header\">\n        <div>\n          <strong>Fictional local updates</strong>\n        </div>\n        <button type=\"button\" onClick={reset}>\n          <RotateCcw size={15} aria-hidden=\"true\" />\n          Reset sample\n        </button>\n      </header>\n\n      <TidalNotificationInbox\n        title=\"Updates\"\n        description=\"Project activity and requests\"\n        items={displayItems}\n        onReadChange={(id, read) => {\n          setItems((current) =>\n            current.map((item) => (item.id === id ? { ...item, read } : item)),\n          );\n          const item = items.find((candidate) => candidate.id === id);\n          setStatus(\n            `${item?.title ?? \"Update\"} marked ${read ? \"read\" : \"unread\"} locally.`,\n          );\n        }}\n        onMarkAllRead={(ids) => {\n          const idSet = new Set(ids);\n          setItems((current) =>\n            current.map((item) =>\n              idSet.has(item.id) ? { ...item, read: true } : item,\n            ),\n          );\n          setStatus(\n            `${ids.length} fictional ${ids.length === 1 ? \"update\" : \"updates\"} marked read locally.`,\n          );\n        }}\n        onAction={(itemId) => {\n          setHandled((current) => new Set(current).add(itemId));\n          setSelectedId(itemId);\n          setStatus(\"Review state updated locally. No request was sent.\");\n        }}\n      />\n\n      <div className=\"notification-inbox-demo-footer\">\n        <div\n          className=\"notification-inbox-demo-detail\"\n          id=\"notification-demo-detail\"\n        >\n          <span>SELECTED UPDATE</span>\n          {selected ? (\n            <>\n              <strong>{selected.title}</strong>\n              <p>{selected.description}</p>\n            </>\n          ) : (\n            <p>No local update selected.</p>\n          )}\n        </div>\n        <p className=\"notification-inbox-demo-status\" role=\"status\">\n          {status}\n        </p>\n      </div>\n    </section>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <NotificationInboxDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/notification-inbox.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [],
  "events": [
    {
      "name": "onAction",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onClick",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onMarkAllRead",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onReadChange",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": false,
    "names": [],
    "expectedFormData": {},
    "submitBehavior": "No form submit is present in the existing demo.",
    "resetBehavior": "No reset control is present in the existing demo.",
    "disabledBehavior": "Disabled controls remain excluded from successful native form submission.",
    "readOnlyBehavior": "Read-only controls retain their value and remain inspectable by the consumer."
  },
  "accessibility": {
    "labelSource": "Consumer-provided label remains required where the component API requires one.",
    "semantics": "Preserve the component's native element and the semantics demonstrated by the source fixture.",
    "keyboard": [
      "Tab and Shift+Tab",
      "Enter or Space for native activation",
      "Arrow keys where the component exposes a composite control"
    ],
    "focusReturn": "Preserve browser focus order and visible focus.",
    "errorAnnouncement": "No error announcement path is present in this demo; the consumer owns validation messaging.",
    "reducedMotion": "Verify prefers-reduced-motion with the existing component transition path.",
    "forcedColors": "Verify visible borders, text, and focus in forced-colors mode."
  },
  "responsive": {
    "widths": [
      320,
      390,
      768,
      1260
    ],
    "shortViewport": "Check the example at a 300px viewport height with keyboard or portal content visible.",
    "overflow": "The page should not gain horizontal overflow; component-local scrolling must remain intentional.",
    "touchTargetMinPx": 44,
    "coarseInputFontPx": 16
  },
  "errors": [
    {
      "fixture": "Exercise the existing demo's error, empty, loading, or invalid fixture.",
      "visibleResult": "The consumer-visible result must remain explicit and must not be replaced by a silent console error.",
      "focusResult": "Focus must remain on the triggering control or move to the announced error according to the native pattern.",
      "ownership": "Consumer-owned sample state only; no network request or customer data is used."
    }
  ],
  "verification": {
    "commands": [
      "npx tsc --noEmit",
      "npx vite build"
    ],
    "lockfile": "Use the consumer project's committed lockfile.",
    "browser": [
      "Chromium 1260x800",
      "Chromium 390x844",
      "Keyboard and reduced-motion pass"
    ]
  },
  "validation": {
    "consumerFixture": {
      "tsc": "pass",
      "viteBuild": "pass",
      "resourceModel": "Generated usage plus only the component files and CSS delivered by the primary item and listed registry dependencies."
    },
    "registryArtifact": "server-gated"
  },
  "exceptions": []
}
