{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "logs-viewer",
  "type": "registry:component",
  "title": "Logs viewer",
  "description": "A Tailwind log viewer with a filter input and a scrollable monospace list of timestamped entries tagged info, warn or error. Focusable for keyboard scroll.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.minidev.pro/r/badge.json",
    "https://ui.minidev.pro/r/input.json"
  ],
  "files": [
    {
      "path": "registry/blocks/logs-viewer.tsx",
      "type": "registry:ui",
      "target": "components/ui/logs-viewer.tsx",
      "content": "\"use client\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Input } from \"@/components/ui/input\"\n\nconst LOGS = [\n  { level: \"info\", msg: \"audit.pass gallery/premium-motion\", time: \"12:01:04\" },\n  { level: \"warn\", msg: \"axe.contrast mid-animation skipped (transform-only)\", time: \"12:01:02\" },\n  { level: \"info\", msg: \"registry.refresh items=468\", time: \"12:00:58\" },\n  { level: \"error\", msg: \"retry.ok after stub type mismatch\", time: \"11:59:41\" },\n]\n\nfunction LogsViewer() {\n  return (\n    <div data-slot=\"logs-viewer\" className=\"overflow-hidden rounded-2xl border border-border bg-surface shadow-highlight\">\n      <div className=\"flex flex-wrap items-center gap-2 border-b border-border px-4 py-3\">\n        <h3 className=\"mr-auto text-sm font-medium text-fg\">Logs</h3>\n        <Input className=\"h-8 w-48\" placeholder=\"Filter…\" />\n      </div>\n      <ul className=\"max-h-72 overflow-auto font-mono text-xs\" tabIndex={0}>\n        {LOGS.map((l) => (\n          <li key={l.time + l.msg} className=\"flex gap-3 border-b border-border px-4 py-2 last:border-b-0\">\n            <span className=\"tabular-nums text-fg-muted\">{l.time}</span>\n            <Badge variant=\"outline\">{l.level}</Badge>\n            <span className=\"text-fg\">{l.msg}</span>\n          </li>\n        ))}\n      </ul>\n    </div>\n  )\n}\nexport { LogsViewer }\n"
    }
  ]
}
