{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ascii-wordmark",
  "title": "ASCII Wordmark",
  "description": "FIGlet-style big text from a built-in 3×5 pixel font.",
  "dependencies": [],
  "registryDependencies": [
    "@atroui/utils"
  ],
  "files": [
    {
      "path": "registry/default/ui/ascii-wordmark.tsx",
      "content": "import * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\n\nexport type AsciiWordmarkProps = {\n  /** Text to spell. Uppercased; glyphs exist for A–Z, 0–9 and a few marks. */\n  text?: string\n  /** Character for solid ink (\"on\" cells). */\n  ink?: string\n  /** Character for the paper between cells (\"off\" cells). */\n  void?: string\n  /** Each pixel doubled horizontally for a chunky CRT feel. */\n  fat?: boolean\n  /** Accessible text. Defaults to the spelled text. */\n  label?: string\n  className?: string\n}\n\n/**\n * 3×5 pixel glyphs (\"#\" = on). Widths stay uniform for a tabular wordmark.\n */\nconst GLYPHS: Record<string, string[]> = {\n  A: [\".#.\", \"#.#\", \"###\", \"#.#\", \"#.#\"],\n  B: [\"##.\", \"#.#\", \"##.\", \"#.#\", \"##.\"],\n  C: [\".##\", \"#..\", \"#..\", \"#..\", \".##\"],\n  D: [\"##.\", \"#.#\", \"#.#\", \"#.#\", \"##.\"],\n  E: [\"###\", \"#..\", \"##.\", \"#..\", \"###\"],\n  F: [\"###\", \"#..\", \"##.\", \"#..\", \"#..\"],\n  G: [\".##\", \"#..\", \"#.#\", \"#.#\", \".##\"],\n  H: [\"#.#\", \"#.#\", \"###\", \"#.#\", \"#.#\"],\n  I: [\"###\", \".#.\", \".#.\", \".#.\", \"###\"],\n  J: [\"..#\", \"..#\", \"..#\", \"#.#\", \".#.\"],\n  K: [\"#.#\", \"#.#\", \"##.\", \"#.#\", \"#.#\"],\n  L: [\"#..\", \"#..\", \"#..\", \"#..\", \"###\"],\n  M: [\"#.#\", \"###\", \"#.#\", \"#.#\", \"#.#\"],\n  N: [\"#.#\", \"###\", \"###\", \"###\", \"#.#\"],\n  O: [\".#.\", \"#.#\", \"#.#\", \"#.#\", \".#.\"],\n  P: [\"##.\", \"#.#\", \"##.\", \"#..\", \"#..\"],\n  Q: [\".#.\", \"#.#\", \"#.#\", \"##.\", \".##\"],\n  R: [\"##.\", \"#.#\", \"##.\", \"#.#\", \"#.#\"],\n  S: [\".##\", \"#..\", \".#.\", \"..#\", \"##.\"],\n  T: [\"###\", \".#.\", \".#.\", \".#.\", \".#.\"],\n  U: [\"#.#\", \"#.#\", \"#.#\", \"#.#\", \".#.\"],\n  V: [\"#.#\", \"#.#\", \"#.#\", \".#.\", \".#.\"],\n  W: [\"#.#\", \"#.#\", \"###\", \"###\", \"#.#\"],\n  X: [\"#.#\", \"#.#\", \".#.\", \"#.#\", \"#.#\"],\n  Y: [\"#.#\", \"#.#\", \".#.\", \".#.\", \".#.\"],\n  Z: [\"###\", \"..#\", \".#.\", \"#..\", \"###\"],\n  \"0\": [\".##\", \"#.#\", \"#.#\", \"#.#\", \"##.\"],\n  \"1\": [\".#.\", \"##.\", \".#.\", \".#.\", \"###\"],\n  \"2\": [\"##.\", \"..#\", \".#.\", \"#..\", \"###\"],\n  \"3\": [\"##.\", \"..#\", \".##\", \"..#\", \"##.\"],\n  \"4\": [\"#.#\", \"#.#\", \"###\", \"..#\", \"..#\"],\n  \"5\": [\"###\", \"#..\", \"##.\", \"..#\", \"##.\"],\n  \"6\": [\".##\", \"#..\", \"##.\", \"#.#\", \".#.\"],\n  \"7\": [\"###\", \"..#\", \".#.\", \".#.\", \".#.\"],\n  \"8\": [\".#.\", \"#.#\", \".#.\", \"#.#\", \".#.\"],\n  \"9\": [\".#.\", \"#.#\", \".##\", \"..#\", \"##.\"],\n  \" \": [\"..\", \"..\", \"..\", \"..\", \"..\"],\n  \"-\": [\"...\", \"...\", \"###\", \"...\", \"...\"],\n  \".\": [\"...\", \"...\", \"...\", \"...\", \".#.\"],\n  \":\": [\"...\", \".#.\", \"...\", \".#.\", \"...\"],\n  \"!\": [\".#.\", \".#.\", \".#.\", \"...\", \".#.\"],\n  \"?\": [\"##.\", \"..#\", \".#.\", \"...\", \".#.\"],\n  \"+\": [\"...\", \".#.\", \"###\", \".#.\", \"...\"],\n  \"&\": [\".#.\", \"#.#\", \".#.\", \"#.#\", \".##\"],\n}\n\nfunction charsFor(\n  ch: string,\n  ink: string,\n  void_: string,\n  fat: boolean\n): string[] {\n  const glyph = GLYPHS[ch.toUpperCase()] ?? GLYPHS[\"?\"]!\n  return glyph.map((row) =>\n    Array.from(row)\n      .map((px) => {\n        const c = px === \"#\" ? ink : void_\n        return fat ? c + c : c\n      })\n      .join(\"\")\n  )\n}\n\n/**\n * ASCII Wordmark — FIGlet-style lettering from a 3×5 pixel font, each on\n * cell drawn in `ink`, doubled horizontally for a chunky CRT feel. Pure\n * render: no client JS, just text you can paste straight into a hero.\n */\nexport function AsciiWordmark({\n  text = \"ATROUI\",\n  ink = \"█\",\n  void: void_ = \" \",\n  fat = true,\n  label,\n  className,\n}: AsciiWordmarkProps) {\n  const spelled = Array.from(text.toUpperCase()).slice(0, 24)\n  const rows = [0, 1, 2, 3, 4].map((r) =>\n    spelled.map((ch) => charsFor(ch, ink, void_, fat)[r]).join(\"  \")\n  )\n\n  return (\n    <pre\n      role=\"img\"\n      aria-label={label ?? text}\n      className={cn(\n        \"m-0 select-none whitespace-pre font-mono text-[10px] leading-[1.12] text-primary sm:text-[13px]\",\n        className\n      )}\n    >\n      {rows.join(\"\\n\")}\n    </pre>\n  )\n}\n",
      "type": "registry:ui",
      "target": "components/ui/ascii-wordmark.tsx"
    }
  ],
  "type": "registry:ui"
}