{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "log-preview",
  "title": "Log Preview",
  "description": "Recent log entries band with view-all link.",
  "dependencies": [
    "next"
  ],
  "files": [
    {
      "path": "registry/default/blocks/log-preview.tsx",
      "content": "import Link from \"next/link\"\n\n/** Edit entries and labels after install. */\nconst CONTENT = {\n  stamp: \"Log\",\n  viewAllHref: \"/log\",\n  viewAllLabel: \"view all →\",\n}\n\nconst ENTRIES = [\n  {\n    date: \"2026-08-01\",\n    content: \"Shipped a narrow personal site kit for the registry.\",\n    tags: [\"ship\"],\n  },\n  {\n    date: \"2026-07-18\",\n    content: \"Tightened token mapping for hairline lists and mono stamps.\",\n    tags: [\"design\"],\n  },\n  {\n    date: \"2026-07-04\",\n    content: \"Added command menu and countdown building blocks.\",\n    tags: [\"build\"],\n  },\n]\n\nfunction formatDate(iso: string) {\n  const d = new Date(iso.length <= 10 ? `${iso}T00:00:00Z` : iso)\n  return new Intl.DateTimeFormat(\"en-US\", {\n    month: \"short\",\n    day: \"2-digit\",\n    timeZone: \"UTC\",\n  }).format(d)\n}\n\nexport function LogPreview({\n  stamp = CONTENT.stamp,\n  viewAllHref = CONTENT.viewAllHref,\n  viewAllLabel = CONTENT.viewAllLabel,\n  entries = ENTRIES,\n  limit = 5,\n  className,\n}: {\n  stamp?: string\n  viewAllHref?: string\n  viewAllLabel?: string\n  entries?: Array<{ date: string; content: string; tags?: string[] }>\n  limit?: number\n  className?: string\n} = {}) {\n  const shown = entries.slice(0, limit)\n  if (shown.length === 0) return null\n\n  return (\n    <section className={className ?? \"mx-auto max-w-[640px]\"}>\n      <div className=\"mb-3 flex items-baseline justify-between\">\n        <h2 className=\"font-mono text-[10.5px] tracking-[0.12em] text-muted-foreground uppercase\">\n          {stamp}\n        </h2>\n        <Link\n          href={viewAllHref}\n          className=\"font-mono text-[11px] text-muted-foreground hover:text-foreground\"\n        >\n          {viewAllLabel}\n        </Link>\n      </div>\n\n      <ul className=\"divide-y divide-border-subtle\">\n        {shown.map((entry, i) => (\n          <li\n            key={`${entry.date}-${i}`}\n            className=\"flex gap-4 py-[11px] sm:gap-5\"\n          >\n            <time\n              dateTime={entry.date}\n              className=\"w-[56px] shrink-0 pt-[3px] font-mono text-[11px] text-muted-foreground\"\n            >\n              {formatDate(entry.date)}\n            </time>\n            <div className=\"min-w-0 flex-1\">\n              <p className=\"text-[14.5px] leading-[1.6] text-foreground\">\n                {entry.content}\n              </p>\n              {entry.tags && entry.tags.length > 0 ? (\n                <div className=\"mt-1.5 flex flex-wrap gap-1\">\n                  {entry.tags.map((t) => (\n                    <span\n                      key={t}\n                      className=\"inline-flex items-center rounded-[3px] bg-muted px-1.5 py-[1px] font-mono text-[10.5px] text-muted-foreground\"\n                    >\n                      {t}\n                    </span>\n                  ))}\n                </div>\n              ) : null}\n            </div>\n          </li>\n        ))}\n      </ul>\n    </section>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/blocks/log-preview.tsx"
    }
  ],
  "type": "registry:block"
}