{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "primitive",
  "title": "primitive",
  "description": "Shared helpers: composeTailwindRenderProps, focus ring, the color tone system (adds brand/success/warning/info tokens) and the structural tokens (radius levels, border width, field chrome, shadows, density, type) every component reads.",
  "registryDependencies": [
    "utils"
  ],
  "files": [
    {
      "path": "packages/ui/src/lib/primitive.ts",
      "content": "import { cn } from \"@/lib/utils\";\n\n/*\n * No \"use client\" and no react-aria import: this module is safe to import from\n * server components (Badge, Card, Spinner read `tones` during server rendering).\n */\n\n/** Merge a React Aria `className` (string or render-prop fn) with Tailwind classes. */\nexport function composeTailwindRenderProps<T>(\n  className: string | ((values: T) => string) | undefined,\n  tw: string,\n): string | ((values: T) => string) {\n  return typeof className === \"function\"\n    ? (values: T) => cn(tw, className(values))\n    : cn(tw, className);\n}\n\n/** Keyboard focus ring: a soft colored glow (applied on `data-focus-visible`). */\nexport const focusRing =\n  \"outline-none data-focus-visible:ring-(length:--ring-width) data-focus-visible:ring-ring/25\";\n\n/**\n * Tones set `--tone` / `--tone-fg` CSS variables. Components style themselves with\n * `bg-(--tone)`, `text-(--tone)`, `bg-(--tone)/10`, … so one set of variant styles\n * works for every color.\n */\nexport const tones = {\n  primary: \"[--tone-fg:var(--primary-foreground)] [--tone:var(--primary)]\",\n  brand: \"[--tone-fg:var(--brand-foreground)] [--tone:var(--brand)]\",\n  neutral: \"[--tone-fg:var(--background)] [--tone:var(--foreground)]\",\n  danger:\n    \"[--tone-fg:var(--destructive-foreground)] [--tone:var(--destructive)]\",\n  success: \"[--tone-fg:var(--success-foreground)] [--tone:var(--success)]\",\n  warning: \"[--tone-fg:var(--warning-foreground)] [--tone:var(--warning)]\",\n  info: \"[--tone-fg:var(--info-foreground)] [--tone:var(--info)]\",\n} as const;\n\nexport type Tone = keyof typeof tones;\n",
      "type": "registry:lib"
    }
  ],
  "cssVars": {
    "theme": {
      "color-brand": "var(--brand)",
      "color-brand-foreground": "var(--brand-foreground)",
      "color-destructive-foreground": "var(--destructive-foreground)",
      "color-success": "var(--success)",
      "color-success-foreground": "var(--success-foreground)",
      "color-warning": "var(--warning)",
      "color-warning-foreground": "var(--warning-foreground)",
      "color-info": "var(--info)",
      "color-info-foreground": "var(--info-foreground)"
    },
    "light": {
      "brand": "oklch(0.54 0.21 277)",
      "brand-foreground": "oklch(0.99 0.005 277)",
      "destructive-foreground": "oklch(0.99 0 0)",
      "success": "oklch(0.62 0.16 150)",
      "success-foreground": "oklch(0.99 0 0)",
      "warning": "oklch(0.76 0.16 70)",
      "warning-foreground": "oklch(0.25 0.06 70)",
      "info": "oklch(0.6 0.16 240)",
      "info-foreground": "oklch(0.99 0 0)",
      "radius-control": "calc(var(--radius) - 2px)",
      "radius-box": "calc(var(--radius) + 4px)",
      "radius-overlay": "var(--radius)",
      "radius-badge": "calc(var(--radius) - 2px)",
      "radius-checkbox": "4px",
      "radius-pill": "calc(infinity * 1px)",
      "border-width": "1px",
      "field-bg": "var(--card)",
      "field-border": "var(--input)",
      "field-shadow": "0 1px 2px 0 rgb(0 0 0 / 0.05)",
      "shadow-control": "0 1px 2px 0 rgb(0 0 0 / 0.05)",
      "shadow-solid": "inset 0 1px 0 rgb(255 255 255 / 0.14), 0 1px 2px rgb(0 0 0 / 0.12)",
      "shadow-box": "0 1px 2px rgb(0 0 0 / 0.04)",
      "shadow-elevated": "0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px -8px rgb(0 0 0 / 0.08)",
      "shadow-overlay": "0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05)",
      "shadow-dialog": "0 25px 50px -12px rgb(0 0 0 / 0.1)",
      "ring-width": "3px",
      "heading-weight": "600",
      "heading-tracking": "-0.025em",
      "title-weight": "500",
      "button-weight": "500",
      "control-h-xs": "1.5rem",
      "control-h-sm": "1.75rem",
      "control-h-md": "2rem",
      "control-h-lg": "2.5rem",
      "control-px-xs": "0.5rem",
      "control-px-sm": "0.625rem",
      "control-px-md": "0.75rem",
      "control-px-lg": "1rem",
      "cell-px": "0.75rem",
      "cell-py": "0.625rem"
    },
    "dark": {
      "brand": "oklch(0.67 0.18 277)",
      "brand-foreground": "oklch(0.99 0.005 277)",
      "destructive-foreground": "oklch(0.99 0 0)",
      "success": "oklch(0.72 0.15 150)",
      "success-foreground": "oklch(0.2 0.05 150)",
      "warning": "oklch(0.8 0.15 75)",
      "warning-foreground": "oklch(0.25 0.06 70)",
      "info": "oklch(0.7 0.14 240)",
      "info-foreground": "oklch(0.2 0.05 240)",
      "field-bg": "color-mix(in oklab, var(--input) 20%, transparent)",
      "field-border": "var(--input)",
      "shadow-box": "0 0 #0000",
      "shadow-elevated": "0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -8px rgb(0 0 0 / 0.3)",
      "shadow-overlay": "0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3)"
    }
  },
  "type": "registry:lib"
}