{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "retro-typography",
  "title": "RetroText",
  "description": "Mac OS 9 typography: RetroText variants plus semantic RetroH1–H4, RetroP, RetroLead, RetroBlockquote, RetroList, RetroInlineCode, RetroLarge, RetroSmall and RetroMuted.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "https://nostalgia-ui.com/r/nostalgia-theme.json"
  ],
  "files": [
    {
      "path": "registry/new-york/ui/retro-typography.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst retroTextVariants = cva(\"text-os9-black\", {\n  variants: {\n    variant: {\n      editorial: [\n        \"font-[family-name:'Apple_Garamond',Georgia,serif]\",\n        \"text-[24px]\",\n        \"font-normal\",\n        \"leading-[1.2]\",\n      ],\n      headline: [\n        \"font-[family-name:var(--os9-font-heading)]\",\n        \"text-[12px]\",\n        \"tracking-[0.42px]\",\n        \"leading-[0.98]\",\n      ],\n      smallHeadline: [\n        \"font-[family-name:var(--os9-font-heading)]\",\n        \"text-[10px]\",\n        \"tracking-[0.42px]\",\n        \"leading-[0.98]\",\n      ],\n      body: [\n        \"font-[family-name:var(--os9-font-sans)]\",\n        \"text-[10px]\",\n        \"leading-[1.3]\",\n      ],\n      bodySmall: [\n        \"font-[family-name:var(--os9-font-sans)]\",\n        \"text-[9px]\",\n        \"leading-[1.3]\",\n      ],\n      bodyBold: [\n        \"font-[family-name:var(--os9-font-sans)]\",\n        \"text-[9px]\",\n        \"font-bold\",\n        \"leading-[1.3]\",\n      ],\n      bodySlanted: [\n        \"font-[family-name:var(--os9-font-sans)]\",\n        \"text-[9px]\",\n        \"italic\",\n        \"leading-[1.3]\",\n      ],\n      mono: [\n        \"font-[family-name:var(--os9-font-mono)]\",\n        \"text-[10px]\",\n        \"leading-[1.3]\",\n      ],\n    },\n  },\n  defaultVariants: {\n    variant: \"body\",\n  },\n})\n\ntype RetroTextProps = React.ComponentPropsWithoutRef<\"p\"> &\n  VariantProps<typeof retroTextVariants> & {\n    as?: React.ElementType\n  }\n\nfunction RetroText(\n  { as: Comp = \"p\", variant, className, ...props }: RetroTextProps,\n  ref: React.ForwardedRef<HTMLElement>\n) {\n  return (\n    <Comp\n      className={cn(retroTextVariants({ variant }), className)}\n      ref={ref}\n      {...props}\n    />\n  )\n}\n\nconst ForwardedRetroText = React.forwardRef(RetroText)\nForwardedRetroText.displayName = \"RetroText\"\n\n/* ------------------------------------------------------------------ */\n/*  shadcn-typography-style primitives                                 */\n/*  Semantic elements with the OS9 type scale baked in: Charcoal for   */\n/*  headings, Geneva for prose, Monaco for code.                       */\n/* ------------------------------------------------------------------ */\n\nconst HEADING = \"font-[family-name:var(--os9-font-heading)] text-os9-black tracking-[0.42px] scroll-m-20\"\n\nconst RetroH1 = React.forwardRef<HTMLHeadingElement, React.ComponentProps<\"h1\">>(\n  function RetroH1({ className, ...props }, ref) {\n    return (\n      <h1\n        ref={ref}\n        className={cn(HEADING, \"text-[24px] leading-[1.1] text-balance\", className)}\n        {...props}\n      />\n    )\n  }\n)\nRetroH1.displayName = \"RetroH1\"\n\nconst RetroH2 = React.forwardRef<HTMLHeadingElement, React.ComponentProps<\"h2\">>(\n  function RetroH2({ className, ...props }, ref) {\n    return (\n      <h2\n        ref={ref}\n        className={cn(\n          HEADING,\n          \"pb-[4px] text-[18px] leading-[1.15] first:mt-0\",\n          // Etched rule under section headings (dark line + light line)\n          \"border-b border-os9-gray-700 shadow-[0_1px_0_var(--os9-white)]\",\n          className\n        )}\n        {...props}\n      />\n    )\n  }\n)\nRetroH2.displayName = \"RetroH2\"\n\nconst RetroH3 = React.forwardRef<HTMLHeadingElement, React.ComponentProps<\"h3\">>(\n  function RetroH3({ className, ...props }, ref) {\n    return (\n      <h3\n        ref={ref}\n        className={cn(HEADING, \"text-[14px] leading-[1.2]\", className)}\n        {...props}\n      />\n    )\n  }\n)\nRetroH3.displayName = \"RetroH3\"\n\nconst RetroH4 = React.forwardRef<HTMLHeadingElement, React.ComponentProps<\"h4\">>(\n  function RetroH4({ className, ...props }, ref) {\n    return (\n      <h4\n        ref={ref}\n        className={cn(HEADING, \"text-[12px] leading-[1.2]\", className)}\n        {...props}\n      />\n    )\n  }\n)\nRetroH4.displayName = \"RetroH4\"\n\nconst RetroP = React.forwardRef<HTMLParagraphElement, React.ComponentProps<\"p\">>(\n  function RetroP({ className, ...props }, ref) {\n    return (\n      <p\n        ref={ref}\n        className={cn(\n          \"font-[family-name:var(--os9-font-sans)] text-[11px] leading-[1.6] text-os9-black\",\n          \"[&:not(:first-child)]:mt-[10px]\",\n          className\n        )}\n        {...props}\n      />\n    )\n  }\n)\nRetroP.displayName = \"RetroP\"\n\nconst RetroLead = React.forwardRef<HTMLParagraphElement, React.ComponentProps<\"p\">>(\n  function RetroLead({ className, ...props }, ref) {\n    return (\n      <p\n        ref={ref}\n        className={cn(\n          \"font-[family-name:var(--os9-font-sans)] text-[14px] leading-[1.5] text-os9-gray-800\",\n          className\n        )}\n        {...props}\n      />\n    )\n  }\n)\nRetroLead.displayName = \"RetroLead\"\n\nconst RetroBlockquote = React.forwardRef<\n  HTMLQuoteElement,\n  React.ComponentProps<\"blockquote\">\n>(function RetroBlockquote({ className, ...props }, ref) {\n  return (\n    <blockquote\n      ref={ref}\n      className={cn(\n        \"mt-[12px] border-l-[3px] border-os9-gray-600 pl-[12px]\",\n        \"font-[family-name:var(--os9-font-sans)] text-[11px] leading-[1.6] italic text-os9-gray-800\",\n        className\n      )}\n      {...props}\n    />\n  )\n})\nRetroBlockquote.displayName = \"RetroBlockquote\"\n\ntype RetroListProps = React.ComponentProps<\"ul\"> & {\n  /** Render a numbered <ol> instead of a bulleted <ul>. */\n  ordered?: boolean\n}\n\nconst RetroList = React.forwardRef<HTMLUListElement, RetroListProps>(\n  function RetroList({ className, ordered = false, ...props }, ref) {\n    const Comp = (ordered ? \"ol\" : \"ul\") as \"ul\"\n    return (\n      <Comp\n        ref={ref}\n        className={cn(\n          \"my-[10px] ml-[20px]\",\n          ordered ? \"list-decimal\" : \"list-[square]\",\n          \"font-[family-name:var(--os9-font-sans)] text-[11px] leading-[1.6] text-os9-black\",\n          \"[&>li]:mt-[3px] marker:text-os9-gray-700\",\n          className\n        )}\n        {...props}\n      />\n    )\n  }\n)\nRetroList.displayName = \"RetroList\"\n\nconst RetroInlineCode = React.forwardRef<HTMLElement, React.ComponentProps<\"code\">>(\n  function RetroInlineCode({ className, ...props }, ref) {\n    return (\n      <code\n        ref={ref}\n        className={cn(\n          \"relative px-[3px] py-[1px]\",\n          \"border border-os9-gray-500 bg-os9-white\",\n          \"font-[family-name:var(--os9-font-mono)] text-[10px] text-os9-black\",\n          className\n        )}\n        {...props}\n      />\n    )\n  }\n)\nRetroInlineCode.displayName = \"RetroInlineCode\"\n\nconst RetroLarge = React.forwardRef<HTMLDivElement, React.ComponentProps<\"div\">>(\n  function RetroLarge({ className, ...props }, ref) {\n    return (\n      <div\n        ref={ref}\n        className={cn(\n          \"font-[family-name:var(--os9-font-heading)] text-[14px] tracking-[0.42px] leading-[1.2] text-os9-black\",\n          className\n        )}\n        {...props}\n      />\n    )\n  }\n)\nRetroLarge.displayName = \"RetroLarge\"\n\nconst RetroSmall = React.forwardRef<HTMLElement, React.ComponentProps<\"small\">>(\n  function RetroSmall({ className, ...props }, ref) {\n    return (\n      <small\n        ref={ref}\n        className={cn(\n          \"font-[family-name:var(--os9-font-sans)] text-[9px] leading-none font-bold text-os9-black\",\n          className\n        )}\n        {...props}\n      />\n    )\n  }\n)\nRetroSmall.displayName = \"RetroSmall\"\n\nconst RetroMuted = React.forwardRef<HTMLParagraphElement, React.ComponentProps<\"p\">>(\n  function RetroMuted({ className, ...props }, ref) {\n    return (\n      <p\n        ref={ref}\n        className={cn(\n          \"font-[family-name:var(--os9-font-sans)] text-[10px] leading-[1.4] text-os9-gray-700\",\n          className\n        )}\n        {...props}\n      />\n    )\n  }\n)\nRetroMuted.displayName = \"RetroMuted\"\n\nexport {\n  ForwardedRetroText as RetroText,\n  retroTextVariants,\n  RetroH1,\n  RetroH2,\n  RetroH3,\n  RetroH4,\n  RetroP,\n  RetroLead,\n  RetroBlockquote,\n  RetroList,\n  RetroInlineCode,\n  RetroLarge,\n  RetroSmall,\n  RetroMuted,\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}