{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "utils",
  "title": "Utils",
  "description": "cn() class merger, extended with the custom text-* font-size scale from globals.css so tailwind-merge doesn't drop it.",
  "dependencies": [
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "src/lib/utils.ts",
      "content": "import { clsx, type ClassValue } from \"clsx\";\nimport { extendTailwindMerge } from \"tailwind-merge\";\n\n/**\n * tailwind-merge doesn't know about the custom `--text-*` font-size scale\n * defined in globals.css — it only recognizes Tailwind's own default scale\n * (xs/sm/base/lg/...) as the `font-size` group. Without this, a custom\n * size like `text-meta` gets\n * misclassified as a `text-color` utility (they share the `text-` prefix)\n * and silently dropped whenever a class list also sets a real text color\n * (e.g. `cn(\"text-meta\", \"text-muted-foreground\")` loses `text-meta`,\n * falling back to whatever font-size an ancestor/base class set).\n */\nconst twMerge = extendTailwindMerge({\n  extend: {\n    theme: {\n      text: [\n        \"display\",\n        \"title\",\n        \"lede\",\n        \"body\",\n        \"control\",\n        \"caption\",\n        \"minor\",\n        \"label\",\n        \"2xs\",\n        \"meta\",\n        \"micro\",\n      ],\n    },\n  },\n});\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n",
      "type": "registry:lib"
    }
  ],
  "type": "registry:lib"
}