{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "kit-sidebar",
  "type": "registry:lib",
  "title": "Kit sidebar",
  "description": "Helpers shared by the sidebar blocks.",
  "dependencies": [
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/avatar.json",
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/button.json",
    "https://ui.klarhimmel.com/r/editing.json",
    "https://ui.klarhimmel.com/r/sidebar.json"
  ],
  "files": [
    {
      "path": "src/blocks/_shared/sidebar-kit.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/_shared/sidebar-kit.tsx",
      "content": "// The app sidebars as chrome (app-sidebar-grouped, -flat, -rail; KB-426): the Sidebar primitive drawn bare, so a host's SidebarLayout\n// places it beside the page, with no demo frame around it (app-shell-sidebar is the framed, foldable demo). Places are written from the\n// product's pages by parts/nav.ts, so a swap between them keeps every page.\nimport { Text } from '../../editing';\nimport { Avatar } from '../../ui/avatar';\nimport { safeHref } from '../../ui/button';\nimport { SidebarFooter, SidebarItem } from '../../ui/sidebar';\nimport { Icon, useEditing } from './kit';\nimport type { SidebarItemProps } from './sidebar-schema';\nimport type { PropPath } from '../../editing';\n\n/** One place: its icon, its name (a tooltip on the rail) and its count; the current page is marked with aria-current. */\nexport function Place({ it, path, active }: { it: SidebarItemProps; path: PropPath; active: string }) {\n  const editing = useEditing();\n  if (!it.label && !editing) return null; // an empty label means the link is not drawn\n  return (\n    <SidebarItem\n      href={safeHref(it.href)}\n      current={!!it.label && it.label === active}\n      tooltip={it.label}\n      icon={<Icon name={it.icon} className=\"size-5 shrink-0\" />}\n      badge={(it.badge || editing) ? <Text path={[...path, 'badge']} value={it.badge ?? ''} as=\"span\" /> : undefined}\n    >\n      <Text path={[...path, 'label']} value={it.label} as=\"span\" />\n    </SidebarItem>\n  );\n}\n\n/** The signed-in person at the sidebar's foot; drawn only with a name. */\nexport function Account({ name }: { name: string }) {\n  const editing = useEditing();\n  if (!name.trim() && !editing) return null;\n  return (\n    <SidebarFooter>\n      <span className=\"flex min-w-0 items-center gap-2 px-1\">\n        <Avatar name={name || ' '} size=\"sm\" decorative />\n        <Text path={['account']} value={name} as=\"span\" className=\"truncate text-kh-small text-kh-ink-2\" />\n      </span>\n    </SidebarFooter>\n  );\n}\n"
    },
    {
      "path": "src/blocks/_shared/sidebar-schema.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/_shared/sidebar-schema.ts",
      "content": "// One place in an app sidebar (app-sidebar-grouped, -flat, -rail), as data with no React, so the specs stay importable by the worker and MCP.\nimport { z } from 'zod';\nimport { icon, t } from './schema';\n\nexport const sidebarItem = z.object({ label: t(30), icon, href: t(300), badge: t(6).optional() });\nexport type SidebarItemProps = z.infer<typeof sidebarItem>;\n"
    }
  ]
}
