{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero-gradient-mesh",
  "type": "registry:block",
  "title": "Hero Gradient Mesh Block",
  "description": "A Hero Gradient Mesh Block component for displaying a hero section.",
  "files": [
    {
      "path": "src/registry/blocks/hero-gradient-mesh.tsx",
      "type": "registry:block",
      "content": "\"use client\";\n\nimport { useEffect, useId, useRef, useState, type ComponentProps } from \"react\";\nimport { Check, Copy } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\ntype TerminalLine =\n  | { kind: \"command\"; text: string }\n  | { kind: \"step\"; text: string; detail?: string }\n  | { kind: \"success\"; text: string }\n  | { kind: \"log\"; text: string };\n\nexport type HeroGradientMeshProps = {\n  eyebrow?: string;\n  title?: string;\n  description?: string;\n  installCommand?: string;\n  docsLink?: { label: string; href: string };\n  windowTitle?: string;\n  lines?: TerminalLine[];\n} & ComponentProps<\"section\">;\n\nconst DEFAULTS = {\n  eyebrow: \"Pallet CLI · v1.8\",\n  title: \"Deploy from the terminal you already have open.\",\n  description:\n    \"Pallet turns any folder with a Dockerfile into a running service. One command, a URL back, and logs streaming before you've switched windows.\",\n  installCommand: \"curl -fsSL pallet.sh/install | sh\",\n  docsLink: { label: \"Read the docs\", href: \"#\" },\n  windowTitle: \"~/code/orders-api — zsh\",\n  lines: [\n    { kind: \"command\", text: \"pallet deploy\" },\n    { kind: \"step\", text: \"Found Dockerfile (node 22)\" },\n    { kind: \"step\", text: \"Building image\", detail: \"14.2s\" },\n    { kind: \"step\", text: \"Pushing to fra-1\", detail: \"3.1s\" },\n    { kind: \"step\", text: \"Health check on /healthz\", detail: \"200\" },\n    { kind: \"success\", text: \"Live at https://orders-api.pallet.run\" },\n    { kind: \"command\", text: \"pallet logs --follow\" },\n    { kind: \"log\", text: \"12:04:11  GET  /orders        200  18ms\" },\n    { kind: \"log\", text: \"12:04:12  POST /orders        201  42ms\" },\n    { kind: \"log\", text: \"12:04:15  GET  /orders/8812   200  11ms\" },\n  ] satisfies TerminalLine[],\n};\n\nexport default function HeroGradientMesh({\n  eyebrow = DEFAULTS.eyebrow,\n  title = DEFAULTS.title,\n  description = DEFAULTS.description,\n  installCommand = DEFAULTS.installCommand,\n  docsLink = DEFAULTS.docsLink,\n  windowTitle = DEFAULTS.windowTitle,\n  lines = DEFAULTS.lines,\n  className,\n  ...props\n}: HeroGradientMeshProps) {\n  const headingId = useId();\n  const [copied, setCopied] = useState(false);\n  const timeoutRef = useRef<ReturnType<typeof setTimeout>>(undefined);\n\n  useEffect(() => () => clearTimeout(timeoutRef.current), []);\n\n  const copy = async () => {\n    try {\n      await navigator.clipboard.writeText(installCommand);\n    } catch {\n      return;\n    }\n    setCopied(true);\n    clearTimeout(timeoutRef.current);\n    timeoutRef.current = setTimeout(() => setCopied(false), 1800);\n  };\n\n  return (\n    <section\n      data-slot=\"hero-gradient-mesh\"\n      aria-labelledby={headingId}\n      className={cn(\"w-full bg-background text-foreground\", className)}\n      {...props}\n    >\n      <div className=\"mx-auto max-w-6xl px-6 py-20 md:py-28\">\n        <p className=\"font-mono text-xs uppercase tracking-wider text-muted-foreground\">\n          {eyebrow}\n        </p>\n        <h1\n          id={headingId}\n          className=\"mt-8 max-w-4xl text-5xl font-semibold leading-[0.95] tracking-[-0.045em] text-balance sm:text-6xl md:text-7xl\"\n        >\n          {title}\n        </h1>\n\n        <div className=\"mt-14 grid grid-cols-1 gap-10 md:grid-cols-12\">\n          <div className=\"min-w-0 md:col-span-5\">\n            <p className=\"max-w-md text-base leading-relaxed text-muted-foreground\">\n              {description}\n            </p>\n\n            <div className=\"mt-8 flex max-w-md items-stretch border font-mono text-sm\">\n              <span aria-hidden className=\"border-r px-3 py-2.5 text-muted-foreground\">\n                $\n              </span>\n              <code className=\"min-w-0 flex-1 overflow-x-auto px-3 py-2.5 whitespace-nowrap\">\n                {installCommand}\n              </code>\n              <button\n                type=\"button\"\n                onClick={copy}\n                aria-label={copied ? \"Copied\" : \"Copy install command\"}\n                className=\"flex w-11 shrink-0 items-center justify-center border-l text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring\"\n              >\n                {copied ? <Check className=\"size-4\" /> : <Copy className=\"size-4\" />}\n              </button>\n            </div>\n            <p aria-live=\"polite\" className=\"sr-only\">\n              {copied ? \"Install command copied\" : \"\"}\n            </p>\n            <a\n              href={docsLink.href}\n              className=\"mt-3 inline-flex min-h-11 items-center text-sm font-medium underline decoration-1 underline-offset-[6px] hover:text-muted-foreground\"\n            >\n              {docsLink.label}\n            </a>\n          </div>\n\n          <figure className=\"min-w-0 border bg-card md:col-span-7\" aria-label=\"Example terminal session\">\n            <div className=\"flex items-center gap-3 border-b px-4 py-2.5\">\n              <span aria-hidden className=\"flex gap-1.5\">\n                <span className=\"size-2.5 border\" />\n                <span className=\"size-2.5 border\" />\n                <span className=\"size-2.5 border\" />\n              </span>\n              <span className=\"flex-1 text-center font-mono text-xs text-muted-foreground\">\n                {windowTitle}\n              </span>\n            </div>\n            <pre className=\"overflow-x-auto p-5 font-mono text-[13px] leading-6\">\n              <code>\n                {lines.map((line, i) => (\n                  <TerminalRow key={i} line={line} />\n                ))}\n                <span className=\"text-muted-foreground\">$ </span>\n                <span\n                  aria-hidden\n                  className=\"inline-block h-4 w-2 translate-y-0.5 animate-pulse bg-foreground motion-reduce:animate-none\"\n                />\n              </code>\n            </pre>\n          </figure>\n        </div>\n      </div>\n    </section>\n  );\n}\n\nfunction TerminalRow({ line }: { line: TerminalLine }) {\n  switch (line.kind) {\n    case \"command\":\n      return (\n        <span className=\"block\">\n          <span className=\"text-muted-foreground\">$ </span>\n          {line.text}\n        </span>\n      );\n    case \"step\":\n      return (\n        <span className=\"flex justify-between gap-6 text-muted-foreground\">\n          <span>→ {line.text}</span>\n          {line.detail && <span className=\"tabular-nums\">{line.detail}</span>}\n        </span>\n      );\n    case \"success\":\n      return (\n        <span className=\"mb-4 block\">\n          <span className=\"text-primary\">✓</span> {line.text}\n        </span>\n      );\n    case \"log\":\n      return <span className=\"block text-muted-foreground\">{line.text}</span>;\n  }\n}\n"
    }
  ],
  "dependencies": [
    "lucide-react"
  ]
}
