{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "utils",
  "type": "registry:lib",
  "title": "cn()",
  "description": "clsx + tailwind-merge configured for the ws-* token scales. Every Wideset component imports it.",
  "dependencies": [
    "clsx@^2.1.1",
    "tailwind-merge@^3.4.0"
  ],
  "files": [
    {
      "path": "src/lib/utils.ts",
      "type": "registry:lib",
      "target": "lib/wideset/utils.ts",
      "content": "import { type ClassValue, clsx } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\n// Every Wideset token class carries the `ws` prefix (`p-ws-4`, `rounded-ws-control-md`,\n// `shadow-ws-low`, `z-ws-modal`, …) — see prefix-tokens.cjs. tw-merge only knows Tailwind's\n// default scales, so without these validators it keeps both classes of a conflicting pair.\nconst isWs = (value: string) => value.startsWith('ws-');\nconst isWsFontSize = (value: string) => /^ws-(\\d+|[a-z0-9]+-desktop)$/.test(value);\nconst isWsFontWeight = (value: string) =>\n  /^ws-(thin|extralight|light|normal|medium|semibold|bold|extrabold|black|md)$/.test(value);\nconst isWsFontFamily = (value: string) => /^ws-(sans|heading|body)$/.test(value);\n\nconst twMerge = extendTailwindMerge<string>({\n  extend: {\n    theme: {\n      spacing: [isWs],\n      radius: [isWs],\n      // Shadow utilities from src/styles/utilities/shadow.css.\n      shadow: [isWs],\n      'drop-shadow': [isWs],\n      text: [isWsFontSize],\n      'font-weight': [isWsFontWeight],\n      font: [isWsFontFamily],\n      tracking: [isWs],\n      leading: [isWs],\n    },\n    classGroups: {\n      // Wideset z-index scale from src/styles/utilities/z-index.css.\n      z: [{ z: [isWs] }],\n      // tw-merge's max-h group lacks `none`, and `max-h-ws-*` sorts after `max-h-none` in the\n      // stylesheet, so the pair must be merged (MultiSelect tagsGrow).\n      'max-h': [{ 'max-h': ['none'] }],\n    },\n    orderSensitiveModifiers: [],\n  },\n});\n\nexport const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));\n"
    }
  ],
  "meta": {
    "version": "1.0.0",
    "commit": "8bb3627"
  }
}
