{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "typography",
  "type": "registry:ui",
  "title": "Typography",
  "description": "Consistent text styling with semantic variants and gradient effects.",
  "devDependencies": [
    "class-variance-authority"
  ],
  "files": [
    {
      "path": "registry/new-york/ui/typography.tsx",
      "content": "import { cva, type VariantProps } from \"class-variance-authority\"\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\n\nconst typographyVariants = cva(\"\", {\n  variants: {\n    variant: {\n      h1: \"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl\",\n      h2: \"scroll-m-20 text-3xl font-semibold tracking-tight\",\n      h3: \"scroll-m-20 text-2xl font-semibold tracking-tight\",\n      h4: \"scroll-m-20 text-xl font-semibold tracking-tight\",\n      p: \"leading-7\",\n      lead: \"text-xl text-muted-foreground\",\n      large: \"text-lg font-semibold\",\n      small: \"text-sm font-medium leading-none\",\n      muted: \"text-sm text-muted-foreground\",\n      blockquote: \"mt-6 border-l-2 pl-6 italic\",\n      code: \"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold\",\n      gradient:\n        \"bg-gradient-to-r from-primary via-purple-500 to-pink-500 bg-clip-text text-transparent\",\n      highlight:\n        \"bg-gradient-to-r from-yellow-200 via-yellow-300 to-yellow-200 dark:from-yellow-500/30 dark:via-yellow-400/30 dark:to-yellow-500/30 px-1 rounded\",\n    },\n    affects: {\n      default: \"\",\n      removePMargin: \"[&:not(:first-child)]:mt-0\",\n      withPMargin: \"[&:not(:first-child)]:mt-6\",\n    },\n  },\n  defaultVariants: {\n    variant: \"p\",\n    affects: \"default\",\n  },\n})\n\ntype TypographyElement =\n  | \"h1\"\n  | \"h2\"\n  | \"h3\"\n  | \"h4\"\n  | \"p\"\n  | \"span\"\n  | \"blockquote\"\n  | \"code\"\n\nconst variantElementMap: Record<string, TypographyElement> = {\n  h1: \"h1\",\n  h2: \"h2\",\n  h3: \"h3\",\n  h4: \"h4\",\n  p: \"p\",\n  lead: \"p\",\n  large: \"p\",\n  small: \"p\",\n  muted: \"p\",\n  blockquote: \"blockquote\",\n  code: \"code\",\n  gradient: \"span\",\n  highlight: \"span\",\n}\n\ninterface TypographyProps\n  extends React.HTMLAttributes<HTMLElement>,\n    VariantProps<typeof typographyVariants> {\n  as?: TypographyElement\n}\n\nfunction Typography({\n  className,\n  variant,\n  affects,\n  as,\n  children,\n  ...props\n}: TypographyProps) {\n  const Comp = as || variantElementMap[variant || \"p\"] || \"p\"\n\n  return React.createElement(\n    Comp,\n    {\n      className: cn(typographyVariants({ variant, affects, className })),\n      ...props,\n    },\n    children,\n  )\n}\n\nexport { Typography, typographyVariants }\n",
      "type": "registry:ui"
    }
  ]
}