{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sidebar-preview",
  "title": "Sidebar Preview",
  "description": "Composed workspace sidebar on a card, for previews and layouts.",
  "dependencies": [
    "lucide-react@^1.27.0"
  ],
  "registryDependencies": [
    "@pestoui/badge",
    "@pestoui/brand-icons",
    "@pestoui/style",
    "@pestoui/utils"
  ],
  "files": [
    {
      "path": "pestoui/components/sidebar-preview.tsx",
      "content": "import {\n  ArrowUpRight,\n  ChevronsLeft,\n  CircleUserRound,\n  Copy,\n  Folder,\n  Loader,\n  MessagesSquare,\n  Plus,\n  WalletCards,\n} from \"lucide-react\"\n\nimport { Badge } from \"@/components/ui/badge\"\nimport { LogoMark } from \"@/components/brand-icons\"\nimport { cn } from \"@/lib/utils\"\n\nfunction NavItem({\n  icon,\n  label,\n  active = false,\n  badge,\n  external = false,\n  className,\n}: {\n  icon: React.ReactNode\n  label: string\n  active?: boolean\n  badge?: number\n  external?: boolean\n  className?: string\n}) {\n  return (\n    /* Motion: restraint, because there are eleven of these on screen. The\n       highlight resolves at the instant duration — a pointer-tracking highlight\n       is one of the few places where fast beats smooth — and the press is a\n       one-percent settle on the press spring, which on a row this wide is a few\n       pixels of give rather than anything anyone would call an animation. */\n    <button\n      type=\"button\"\n      className={cn(\n        \"group/nav-item flex h-11 w-full items-center gap-3 rounded-lg px-3 text-left text-body font-medium text-sidebar-foreground transition-all duration-instant ease-out-expo outline-none hover:bg-sidebar-accent focus-visible:ring-3 focus-visible:ring-ring/50 active:scale-99 active:duration-spring-press active:ease-spring-press\",\n        active && \"bg-sidebar-accent\",\n        className\n      )}\n    >\n      <span className=\"flex size-5 shrink-0 items-center justify-center text-foreground/75 [&_svg]:size-5\">\n        {icon}\n      </span>\n      <span className=\"flex-1 truncate\">{label}</span>\n      {badge !== undefined && <Badge variant=\"count\">{badge}</Badge>}\n      {/* The one row that leaves the app says so on approach: the arrow steps a\n          pixel along its own diagonal, which is the direction it is pointing. */}\n      {external && (\n        <ArrowUpRight className=\"size-4.5 text-muted-foreground transition-transform duration-base ease-out-expo group-hover/nav-item:translate-x-px group-hover/nav-item:-translate-y-px\" />\n      )}\n    </button>\n  )\n}\n\nfunction WorkspaceRow({\n  label,\n  icon,\n  loading = false,\n  indent = false,\n}: {\n  label: string\n  icon?: React.ReactNode\n  loading?: boolean\n  indent?: boolean\n}) {\n  return (\n    <button\n      type=\"button\"\n      className={cn(\n        \"flex h-10 w-full items-center gap-3 rounded-lg px-3 text-left text-body text-sidebar-foreground/90 transition-all duration-instant ease-out-expo outline-none hover:bg-sidebar-accent focus-visible:ring-3 focus-visible:ring-ring/50 active:scale-99 active:duration-spring-press active:ease-spring-press\",\n        indent && \"pl-[42px]\"\n      )}\n    >\n      {icon && (\n        <span className=\"flex size-5 shrink-0 items-center justify-center text-foreground/75 [&_svg]:size-5\">\n          {icon}\n        </span>\n      )}\n      <span className=\"flex-1 truncate\">{label}</span>\n      {loading && (\n        <Loader className=\"size-4 animate-spin text-muted-foreground [animation-duration:2s]\" />\n      )}\n    </button>\n  )\n}\n\n/* Composed workspace sidebar — white card floating on the warm background */\nexport function SidebarPreview({ className }: { className?: string }) {\n  return (\n    <div\n      className={cn(\n        \"w-[290px] rounded-2xl bg-sidebar p-4 shadow-card ring-1 ring-foreground/[0.04]\",\n        className\n      )}\n    >\n      <div className=\"flex items-center justify-between px-2 pt-1\">\n        <LogoMark className=\"size-6\" />\n        <ChevronsLeft className=\"size-5 text-muted-foreground\" />\n      </div>\n\n      <nav className=\"mt-7 space-y-0.5\">\n        <NavItem icon={<Plus />} label=\"New chat\" />\n        <NavItem icon={<LogoMark className=\"size-4.5\" />} label=\"Discover\" />\n        <NavItem icon={<Copy />} label=\"Feed\" badge={4} />\n        <NavItem icon={<WalletCards />} label=\"Agents\" />\n        <NavItem icon={<CircleUserRound />} label=\"Org\" />\n        <NavItem icon={<MessagesSquare />} label=\"Messages\" active external />\n      </nav>\n\n      <div className=\"mt-7 mb-2 px-3 text-caption font-medium text-muted-foreground\">\n        Workspace\n      </div>\n      <div className=\"space-y-0.5 pb-1\">\n        <WorkspaceRow icon={<Folder />} label=\"Email & Notifications\" loading />\n        <WorkspaceRow label=\"Agent #1\" indent loading />\n        <WorkspaceRow label=\"Agent #2\" indent />\n        <WorkspaceRow label=\"Agent #3\" indent />\n        <WorkspaceRow label=\"Agent #4\" indent loading />\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}