{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "utils",
  "type": "registry:lib",
  "title": "cn",
  "description": "A helper that merges class names, using clsx and tailwind-merge. It is the same as the one in shadcn/ui, so installing it changes nothing if you already have it.",
  "dependencies": [
    "clsx@^2.1.1",
    "tailwind-merge@^3.7.0"
  ],
  "files": [
    {
      "path": "src/lib/utils.ts",
      "type": "registry:lib",
      "target": "lib/utils.ts",
      "content": "/**\n * `cn` — the single class-merging helper every Facade UI component uses.\n *\n * clsx resolves conditionals; tailwind-merge resolves Tailwind conflicts so a\n * caller's `className` always wins over a component's defaults.\n *\n * Deliberately identical to shadcn/ui's `lib/utils.ts` so that installing a\n * Facade item into an existing shadcn project overwrites nothing meaningful.\n *\n * Dependencies: clsx, tailwind-merge.\n */\n\nimport { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]): string {\n  return twMerge(clsx(inputs))\n}\n\n/**\n * Turns heading text into a stable DOM id for `aria-labelledby`.\n *\n * Sections are server components, so `useId()` is unavailable — and a hydration-\n * stable id derived from content is preferable anyway. Pass an explicit `id` to\n * a section when two headings on one page would otherwise slugify identically.\n */\nexport function slugId(text: string, prefix = \"facade\"): string {\n  const slug = text\n    .normalize(\"NFKD\")\n    .replace(/[\\u0300-\\u036f]/g, \"\")\n    .toLowerCase()\n    .replace(/[^a-z0-9]+/g, \"-\")\n    .replace(/^-+|-+$/g, \"\")\n    .slice(0, 48)\n  return slug ? `${prefix}-${slug}` : `${prefix}-section`\n}\n"
    }
  ],
  "docs": "Import styles/facade-tokens.css in your global stylesheet, after @import \"tailwindcss\". Docs: https://facadeui.dev/components/utils"
}
