{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "analytics-04",
  "type": "registry:block",
  "description": "A content report with top pages table and visit patterns.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button"
  ],
  "files": [
    {
      "path": "registry/designali/blocks/analytics/analytics-04.tsx",
      "content": "import {\n  Download,\n} from \"@designali/icons\"\n\nimport { Button } from \"@workspace/ui/components/button\"\n\nconst pages = [\n  { path: \"/pricing\", views: 48210, bounce: 32, time: \"2m 41s\" },\n  { path: \"/blogs/design-to-code-with-nextjs\", views: 31877, bounce: 41, time: \"4m 12s\" },\n  { path: \"/templates\", views: 27304, bounce: 28, time: \"3m 05s\" },\n  { path: \"/docs\", views: 19982, bounce: 22, time: \"5m 37s\" },\n  { path: \"/icons\", views: 12450, bounce: 47, time: \"1m 58s\" },\n  { path: \"/work\", views: 8761, bounce: 55, time: \"1m 12s\" },\n]\n\nconst days = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"]\nconst heat = [\n  [2, 3, 5, 7, 6, 4],\n  [3, 4, 6, 8, 7, 5],\n  [3, 5, 7, 9, 8, 5],\n  [2, 4, 6, 8, 9, 6],\n  [2, 3, 5, 6, 5, 3],\n  [1, 2, 2, 3, 3, 2],\n  [1, 1, 2, 3, 2, 2],\n]\nconst slots = [\"00\", \"04\", \"08\", \"12\", \"16\", \"20\"]\n\nexport default function Analytics04() {\n  const maxViews = pages[0]?.views ?? 1\n\n  return (\n    <section className=\"w-full bg-background py-16 text-foreground md:py-24\">\n      <div className=\"mx-auto max-w-6xl px-6\">\n        <div className=\"mb-8 flex flex-col justify-between gap-4 border-b border-border pb-6 sm:flex-row sm:items-center\">\n          <div>\n            <h2 className=\"text-2xl font-medium tracking-tight\">designali.com content report</h2>\n            <p className=\"text-sm text-muted-foreground\">\n              Top pages and visit patterns for November 1 – 14\n            </p>\n          </div>\n          <Button variant=\"outline\" size=\"md\">\n            <Download />\n            Export CSV\n          </Button>\n        </div>\n\n        <div className=\"grid gap-10 lg:grid-cols-5\">\n          <div className=\"overflow-x-auto lg:col-span-3\">\n            <table className=\"w-full min-w-[480px] text-sm\">\n              <thead>\n                <tr className=\"border-b border-border text-left text-xs text-muted-foreground\">\n                  <th className=\"py-3 font-normal\">Page</th>\n                  <th className=\"py-3 text-right font-normal\">Views</th>\n                  <th className=\"py-3 text-right font-normal\">Bounce</th>\n                  <th className=\"py-3 text-right font-normal\">Avg. time</th>\n                </tr>\n              </thead>\n              <tbody>\n                {pages.map((page) => (\n                  <tr key={page.path} className=\"border-b border-border\">\n                    <td className=\"relative py-3 pr-4\">\n                      <div\n                        className=\"absolute inset-y-1 left-0 bg-muted\"\n                        style={{ width: `${(page.views / maxViews) * 100}%` }}\n                      />\n                      <span className=\"relative font-sans text-xs\">{page.path}</span>\n                    </td>\n                    <td className=\"py-3 text-right tabular-nums\">\n                      {page.views.toLocaleString()}\n                    </td>\n                    <td className=\"py-3 text-right tabular-nums text-muted-foreground\">\n                      {page.bounce}%\n                    </td>\n                    <td className=\"py-3 text-right tabular-nums text-muted-foreground\">\n                      {page.time}\n                    </td>\n                  </tr>\n                ))}\n              </tbody>\n            </table>\n          </div>\n\n          <div className=\"lg:col-span-2\">\n            <p className=\"mb-4 text-sm font-medium\">Busiest hours (UTC)</p>\n            <div className=\"grid grid-cols-[auto_repeat(6,1fr)] gap-1 text-[10px] text-muted-foreground\">\n              <span />\n              {slots.map((slot) => (\n                <span key={slot} className=\"text-center\">\n                  {slot}h\n                </span>\n              ))}\n              {days.map((day, row) => (\n                <div key={day} className=\"contents\">\n                  <span className=\"pr-2 leading-8\">{day}</span>\n                  {heat[row]?.map((level, col) => (\n                    <div\n                      key={col}\n                      className=\"h-8 bg-primary\"\n                      style={{ opacity: 0.08 + level * 0.1 }}\n                      title={`${day} ${slots[col]}:00 – intensity ${level}`}\n                    />\n                  ))}\n                </div>\n              ))}\n            </div>\n            <div className=\"mt-4 flex items-center gap-2 text-[10px] text-muted-foreground\">\n              Less\n              {[1, 3, 5, 7, 9].map((level) => (\n                <span\n                  key={level}\n                  className=\"size-3 bg-primary\"\n                  style={{ opacity: 0.08 + level * 0.1 }}\n                />\n              ))}\n              More\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "800px"
  },
  "categories": [
    "analytics"
  ]
}