{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero-dot-text",
  "type": "registry:component",
  "title": "Hero Dot Text",
  "description": "The word itself is the hero: a giant poster word made of black dots that flies in, forms and drifts, repelling from the cursor, on off-white paper. Minimal mono text bar, small subtitle and CTA below.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "hero",
    "hero",
    "text",
    "typography",
    "canvas",
    "dots"
  ],
  "docs": "https://hyperblur.dev/effects/hero-dot-text",
  "files": [
    {
      "path": "registry/hyperblur/hero-dot-text.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/hero-dot-text.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface HeroDotTextLink {\n  label: string;\n  href: string;\n}\n\nexport interface HeroDotTextProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  title?: string;\n  subtitle?: string;\n  caption?: string;\n  command?: string;\n  primaryCta?: HeroDotTextLink | null;\n  brand?: string;\n  nav?: HeroDotTextLink[];\n  navCta?: HeroDotTextLink | null;\n  learnMore?: HeroDotTextLink | null;\n  accent?: string;\n  density?: number;\n  speed?: number;\n  word?: string;\n  depth?: number;\n  swing?: number;\n  headingAs?: \"h1\" | \"h2\";\n  onSearch?: () => void;\n}\n\nconst css = `\n@keyframes hb-hh7-up {\n  from { opacity: 0; transform: translate3d(0, 12px, 0); }\n  to { opacity: 1; transform: translate3d(0, 0, 0); }\n}\n.hb-hh7 {\n  --hb-hh7-accent: #0d0d0d;\n  --hb-hh7-ink: #f4f1ea;\n  --hb-hh7-mono: var(--font-mono, ui-monospace), \"Geist Mono\", SFMono-Regular, Menlo, Consolas, monospace;\n  position: relative;\n  isolation: isolate;\n  box-sizing: border-box;\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  min-height: 680px;\n  overflow: hidden;\n  container-type: inline-size;\n  background: #f4f1ea;\n  color: #0d0d0d;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-hh7 *, .hb-hh7 *::before, .hb-hh7 *::after { box-sizing: border-box; }\n.hb-hh7-canvas {\n  position: absolute;\n  inset: 0;\n  z-index: 0;\n  display: block;\n  width: 100%;\n  height: 100%;\n  pointer-events: none;\n}\n.hb-hh7-bar {\n  position: relative;\n  z-index: 3;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  margin: 0 clamp(16px, 2.5cqw, 36px);\n  padding: 18px 0 14px;\n  border-bottom: 1px solid rgba(13, 13, 13, 0.16);\n  font-family: var(--hb-hh7-mono);\n  font-size: 11.5px;\n  letter-spacing: 0.08em;\n  text-transform: uppercase;\n}\n.hb-hh7-brand {\n  color: #0d0d0d;\n  font-weight: 700;\n  text-decoration: none;\n}\n.hb-hh7-mid, .hb-hh7-end {\n  display: flex;\n  align-items: center;\n  gap: clamp(14px, 2.4cqw, 32px);\n}\n.hb-hh7-links {\n  display: flex;\n  align-items: center;\n  gap: clamp(14px, 2.4cqw, 32px);\n  margin: 0;\n  padding: 0;\n  list-style: none;\n}\n.hb-hh7-link, .hb-hh7-search {\n  appearance: none;\n  border: 0;\n  background: none;\n  padding: 2px 0;\n  color: rgba(13, 13, 13, 0.62);\n  font: inherit;\n  letter-spacing: inherit;\n  text-transform: inherit;\n  text-decoration: none;\n  white-space: nowrap;\n  cursor: pointer;\n  transition: color 0.16s ease;\n}\n.hb-hh7-link:hover, .hb-hh7-search:hover { color: #0d0d0d; }\n.hb-hh7-link:focus-visible, .hb-hh7-search:focus-visible, .hb-hh7-brand:focus-visible, .hb-hh7-cta:focus-visible, .hb-hh7-copybtn:focus-visible, .hb-hh7-more:focus-visible {\n  outline: 2px solid #0d0d0d;\n  outline-offset: 3px;\n  border-radius: 4px;\n}\n.hb-hh7-stage {\n  position: relative;\n  z-index: 1;\n  flex: 1 1 auto;\n  min-height: 300px;\n  margin: 0 clamp(8px, 1.4cqw, 20px);\n}\n.hb-hh7-foot {\n  position: relative;\n  z-index: 2;\n  display: flex;\n  flex-wrap: wrap;\n  align-items: flex-end;\n  justify-content: space-between;\n  gap: 24px 48px;\n  padding: 8px clamp(16px, 2.5cqw, 36px) clamp(24px, 3cqw, 40px);\n}\n.hb-hh7-copy {\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n  animation: hb-hh7-up 0.8s 1.2s ease both;\n}\n.hb-hh7-title {\n  max-width: 22ch;\n  margin: 0;\n  color: #0d0d0d;\n  font-size: clamp(22px, 2.4cqw, 34px);\n  font-weight: 650;\n  line-height: 1.08;\n  letter-spacing: -0.035em;\n  text-wrap: balance;\n}\n.hb-hh7-sub {\n  max-width: 46ch;\n  margin: 0;\n  color: rgba(13, 13, 13, 0.66);\n  font-size: clamp(14px, 1.1cqw, 16px);\n  line-height: 1.5;\n}\n.hb-hh7-side {\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  gap: 14px;\n  animation: hb-hh7-up 0.8s 1.35s ease both;\n}\n.hb-hh7-caption {\n  margin: 0;\n  color: rgba(13, 13, 13, 0.55);\n  font-family: var(--hb-hh7-mono);\n  font-size: 11px;\n  letter-spacing: 0.08em;\n  text-transform: uppercase;\n}\n.hb-hh7-row {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  gap: 10px;\n}\n.hb-hh7-cta {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  padding: 13px 20px;\n  border-radius: 8px;\n  background: var(--hb-hh7-accent);\n  color: var(--hb-hh7-ink);\n  font-size: 14px;\n  font-weight: 650;\n  text-decoration: none;\n  transition: transform 0.18s ease, opacity 0.18s ease;\n}\n.hb-hh7-cta:hover { transform: translateY(-2px); opacity: 0.9; }\n.hb-hh7-cmd {\n  display: inline-flex;\n  align-items: center;\n  gap: 10px;\n  max-width: 100%;\n  padding: 5px 5px 5px 13px;\n  border: 1px solid rgba(13, 13, 13, 0.3);\n  border-radius: 8px;\n  color: #0d0d0d;\n  font-family: var(--hb-hh7-mono);\n  font-size: 12.5px;\n}\n.hb-hh7-prompt { opacity: 0.5; }\n.hb-hh7-code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.hb-hh7-copybtn {\n  appearance: none;\n  display: grid;\n  place-items: center;\n  width: 30px;\n  height: 30px;\n  flex: none;\n  border: 0;\n  border-radius: 6px;\n  background: rgba(13, 13, 13, 0.08);\n  color: #0d0d0d;\n  cursor: pointer;\n  transition: background 0.16s ease;\n}\n.hb-hh7-copybtn:hover { background: rgba(13, 13, 13, 0.16); }\n.hb-hh7-more {\n  color: #0d0d0d;\n  font-size: 13.5px;\n  font-weight: 600;\n  text-decoration: underline;\n  text-underline-offset: 4px;\n}\n.hb-hh7-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  overflow: hidden;\n  clip: rect(0 0 0 0);\n  white-space: nowrap;\n}\n@container (max-width: 640px) {\n  .hb-hh7 { min-height: 720px; }\n  .hb-hh7-bar { font-size: 10.5px; letter-spacing: 0.05em; gap: 10px; }\n  .hb-hh7-end .hb-hh7-link { display: none; }\n  .hb-hh7-links { gap: 12px; }\n  .hb-hh7-stage { min-height: 230px; }\n  .hb-hh7-foot { flex-direction: column; align-items: flex-start; }\n  .hb-hh7-cmd { font-size: 12px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-hh7-copy, .hb-hh7-side { animation: none; }\n  .hb-hh7-link, .hb-hh7-search, .hb-hh7-copybtn, .hb-hh7-cta { transition: none; }\n}\n`;\n\nconst defaultNav: HeroDotTextLink[] = [\n  { label: \"Fonts\", href: \"#\" },\n  { label: \"Showcase\", href: \"#\" },\n  { label: \"Pricing\", href: \"#\" },\n];\nconst defaultNavCta: HeroDotTextLink = { label: \"Log in\", href: \"#\" };\nconst defaultPrimary: HeroDotTextLink = { label: \"Get the kit\", href: \"#\" };\nconst defaultMore: HeroDotTextLink = { label: \"How it works\", href: \"#\" };\n\nconst TAU = Math.PI * 2;\nconst FONT = '\"Inter Tight\", \"Helvetica Neue\", Helvetica, Arial, sans-serif';\n\nfunction hash(n: number, salt: number) {\n  const s = Math.sin(n * 127.1 + salt * 311.7) * 43758.5453;\n  return s - Math.floor(s);\n}\n\nfunction hexRgb(value: string): [number, number, number] | null {\n  const m = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(value.trim());\n  if (!m) return null;\n  let h = m[1];\n  if (h.length === 3) h = h.split(\"\").map((c) => c + c).join(\"\");\n  return [parseInt(h.slice(0, 2), 16), parseInt(h.slice(2, 4), 16), parseInt(h.slice(4, 6), 16)];\n}\n\nfunction toRgb(value: string, ctx: CanvasRenderingContext2D): [number, number, number] {\n  const hex = hexRgb(value);\n  if (hex) return hex;\n  ctx.fillStyle = \"#0d0d0d\";\n  ctx.fillStyle = value;\n  const out = String(ctx.fillStyle);\n  const h2 = hexRgb(out);\n  if (h2) return h2;\n  const nums = out.match(/[\\d.]+/g);\n  if (nums && nums.length >= 3) return [Number(nums[0]), Number(nums[1]), Number(nums[2])];\n  return [13, 13, 13];\n}\n\nfunction inkFor(accent: string) {\n  const rgb = hexRgb(accent);\n  if (!rgb) return \"#f4f1ea\";\n  const lum = (0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]) / 255;\n  return lum > 0.55 ? \"#0d0d0d\" : \"#f4f1ea\";\n}\n\nfunction ease(x: number) {\n  if (x <= 0) return 0;\n  if (x >= 1) return 1;\n  return 1 - Math.pow(1 - x, 3);\n}\n\ninterface Cloud {\n  tx: Float32Array;\n  ty: Float32Array;\n  bx: Float32Array;\n  by: Float32Array;\n  delay: Float32Array;\n  phase: Float32Array;\n  ox: Float32Array;\n  oy: Float32Array;\n  tone: Uint8Array;\n  count: number;\n  step: number;\n  fontSize: number;\n}\n\nexport function HeroDotText({\n  title = \"Type that floats off the page.\",\n  subtitle = \"Turn any word into a living field of dots. One canvas, no dependencies.\",\n  caption = \"Any word · MIT licensed\",\n  command = \"npx shadcn@latest add https://hyperblur.dev/r/hero-dot-text.json\",\n  primaryCta = defaultPrimary,\n  brand = \"Glyphwork\",\n  nav = defaultNav,\n  navCta = defaultNavCta,\n  learnMore = defaultMore,\n  accent = \"#0d0d0d\",\n  density = 1,\n  speed = 1,\n  word = \"HYPERBLUR\",\n  depth = 0.18,\n  swing = 32,\n  headingAs = \"h1\",\n  onSearch,\n  className = \"\",\n  style,\n  ...rest\n}: HeroDotTextProps) {\n  const rootRef = React.useRef<HTMLElement>(null);\n  const canvasRef = React.useRef<HTMLCanvasElement>(null);\n  const stageRef = React.useRef<HTMLDivElement>(null);\n  const timerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n  const [copied, setCopied] = React.useState(false);\n\n  React.useEffect(() => {\n    const root = rootRef.current;\n    const canvas = canvasRef.current;\n    const stage = stageRef.current;\n    const ctx = canvas?.getContext(\"2d\");\n    if (!root || !canvas || !stage || !ctx) return;\n    const reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n    const mult = Math.min(2, Math.max(0.4, Number.isFinite(density) ? density : 1));\n    const pace = Math.max(0, Number.isFinite(speed) ? speed : 1);\n    const push = Math.min(1, Math.max(0.02, Number.isFinite(depth) ? depth : 0.18));\n    const sway = Math.min(80, Math.max(0, Number.isFinite(swing) ? swing : 32)) / 32;\n    const text = (typeof word === \"string\" && word.trim() ? word.trim() : \"WORD\").toUpperCase();\n    const rgb = toRgb(accent, ctx);\n    const solid = `rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`;\n    const soft = `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, 0.42)`;\n\n    let cloud: Cloud | null = null;\n    let w = 0;\n    let h = 0;\n    let dpr = 1;\n    let raf = 0;\n    let visible = true;\n    let start = 0;\n    let mx = 0;\n    let my = 0;\n    let active = false;\n    let rad0 = 0;\n\n    const build = () => {\n      const rr = root.getBoundingClientRect();\n      const sr = stage.getBoundingClientRect();\n      w = Math.max(1, rr.width);\n      h = Math.max(1, rr.height);\n      dpr = Math.min(2, window.devicePixelRatio || 1);\n      canvas.width = Math.round(w * dpr);\n      canvas.height = Math.round(h * dpr);\n      const sx = sr.left - rr.left;\n      const sy = sr.top - rr.top;\n      const sw = Math.max(40, sr.width);\n      const sh = Math.max(40, sr.height);\n      const narrow = w < 640;\n      let lines = [text];\n      if (narrow) {\n        const parts = text.split(/\\s+/);\n        if (parts.length > 1) {\n          const mid = Math.ceil(parts.length / 2);\n          lines = [parts.slice(0, mid).join(\" \"), parts.slice(mid).join(\" \")];\n        } else if (text.length > 5) {\n          const mid = Math.ceil(text.length / 2);\n          lines = [text.slice(0, mid), text.slice(mid)];\n        }\n      }\n      const probe = document.createElement(\"canvas\");\n      probe.width = Math.round(sw);\n      probe.height = Math.round(sh);\n      const pc = probe.getContext(\"2d\", { willReadFrequently: true });\n      if (!pc) return;\n      pc.font = `900 100px ${FONT}`;\n      let maxW = 1;\n      for (const ln of lines) maxW = Math.max(maxW, pc.measureText(ln).width);\n      const lh = 0.84;\n      const capH = 0.72;\n      const byWidth = (sw * 0.985 * 100) / maxW;\n      const fs = Math.min(byWidth, (sh * 0.94) / ((lines.length - 1) * lh + capH));\n      const vs = Math.max(1, Math.min(lines.length > 1 ? 1.5 : 2, (sh * 0.9) / (((lines.length - 1) * lh + capH) * fs)));\n      pc.font = `900 ${fs}px ${FONT}`;\n      pc.textAlign = \"center\";\n      pc.textBaseline = \"alphabetic\";\n      pc.fillStyle = \"#000\";\n      pc.setTransform(1, 0, 0, vs, 0, 0);\n      const total = ((lines.length - 1) * lh * fs + capH * fs) * vs;\n      const top = ((sh - total) / 2 + capH * fs * vs) / vs;\n      lines.forEach((ln, i) => pc.fillText(ln, sw / 2, top + i * lh * fs));\n      const img = pc.getImageData(0, 0, probe.width, probe.height).data;\n      let step = Math.max(narrow ? 4.4 : 6, (fs * 0.036) / mult);\n      let xs: number[] = [];\n      let ys: number[] = [];\n      for (let pass = 0; pass < 3; pass++) {\n        xs = [];\n        ys = [];\n        const rowH = step * 0.866;\n        for (let j = 0, y = step * 0.5; y < sh; j++, y += rowH) {\n          const off = (j % 2) * step * 0.5;\n          for (let x = step * 0.5 + off; x < sw; x += step) {\n            const px = Math.min(probe.width - 1, Math.round(x));\n            const py = Math.min(probe.height - 1, Math.round(y));\n            if (img[(py * probe.width + px) * 4 + 3] > 140) {\n              xs.push(sx + x);\n              ys.push(sy + y);\n            }\n          }\n        }\n        if (xs.length <= 6500) break;\n        step *= 1.25;\n      }\n      const n = xs.length;\n      const c: Cloud = {\n        tx: Float32Array.from(xs),\n        ty: Float32Array.from(ys),\n        bx: new Float32Array(n),\n        by: new Float32Array(n),\n        delay: new Float32Array(n),\n        phase: new Float32Array(n),\n        ox: new Float32Array(n),\n        oy: new Float32Array(n),\n        tone: new Uint8Array(n),\n        count: n,\n        step,\n        fontSize: fs,\n      };\n      const cxm = sx + sw / 2;\n      const cym = sy + sh / 2;\n      const reach = Math.max(w, h);\n      for (let k = 0; k < n; k++) {\n        const a = hash(k, 31) * TAU;\n        const d = (0.45 + hash(k, 32) * 0.7) * reach * 0.6;\n        c.bx[k] = cxm + Math.cos(a) * d;\n        c.by[k] = cym + Math.sin(a) * d * 0.7;\n        c.delay[k] = ((c.tx[k] - sx) / sw) * 0.7 + hash(k, 33) * 0.45;\n        c.phase[k] = hash(k, 34) * TAU;\n        c.tone[k] = hash(k, 35) > 0.82 ? 1 : 0;\n      }\n      cloud = c;\n      rad0 = step * 0.37;\n    };\n\n    const draw = (now: number) => {\n      const c = cloud;\n      ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n      ctx.clearRect(0, 0, w, h);\n      if (!c) return;\n      const sec = reduce ? 99 : ((now - start) / 1000) * pace;\n      const real = (now - start) / 1000;\n      const live = !reduce;\n      const R = c.fontSize * 0.55;\n      const amp = c.step * 0.4 * sway;\n      for (let tone = 0; tone < 2; tone++) {\n        ctx.fillStyle = tone === 0 ? solid : soft;\n        ctx.beginPath();\n        for (let k = 0; k < c.count; k++) {\n          if (c.tone[k] !== tone) continue;\n          const p = reduce ? 1 : ease((real * Math.max(0.35, pace) - c.delay[k]) / 1.5);\n          if (p <= 0) continue;\n          let x = c.bx[k] + (c.tx[k] - c.bx[k]) * p;\n          let y = c.by[k] + (c.ty[k] - c.by[k]) * p;\n          let rad = rad0 * (0.35 + 0.65 * p);\n          if (live && p >= 1) {\n            const wob = Math.sin(c.tx[k] * 0.0065 + sec * 0.85 + c.phase[k] * 0.15);\n            x += Math.cos(sec * 0.6 + c.phase[k]) * amp * 0.45;\n            y += wob * amp + Math.sin(sec * 0.7 + c.phase[k]) * amp * 0.3;\n            const sweep = Math.sin(c.tx[k] * 0.0075 - sec * 1.5);\n            if (sweep > 0.85) rad *= 1 + (sweep - 0.85) * 2.4;\n            let tox = 0;\n            let toy = 0;\n            if (active) {\n              const dx = c.tx[k] - mx;\n              const dy = c.ty[k] - my;\n              const d = Math.hypot(dx, dy);\n              if (d < R && d > 0.001) {\n                const f = (1 - d / R) * (1 - d / R);\n                tox = (dx / d) * f * R * push * 1.6;\n                toy = (dy / d) * f * R * push * 1.6;\n                rad *= 1 + f * 0.5;\n              }\n            }\n            c.ox[k] += (tox - c.ox[k]) * 0.12;\n            c.oy[k] += (toy - c.oy[k]) * 0.12;\n            x += c.ox[k];\n            y += c.oy[k];\n          }\n          ctx.moveTo(x + rad, y);\n          ctx.arc(x, y, rad, 0, TAU);\n        }\n        ctx.fill();\n      }\n    };\n\n    const frame = (now: number) => {\n      raf = 0;\n      draw(now);\n      if (visible && !document.hidden) raf = requestAnimationFrame(frame);\n    };\n    const schedule = () => {\n      if (reduce || raf) return;\n      raf = requestAnimationFrame(frame);\n    };\n    const stop = () => {\n      if (raf) cancelAnimationFrame(raf);\n      raf = 0;\n    };\n    const onMove = (e: PointerEvent) => {\n      const r = root.getBoundingClientRect();\n      mx = e.clientX - r.left;\n      my = e.clientY - r.top;\n      active = true;\n    };\n    const onLeave = () => {\n      active = false;\n    };\n    const onVisibility = () => {\n      if (document.hidden) stop();\n      else schedule();\n    };\n\n    let ready = false;\n    const rebuild = () => {\n      build();\n      draw(performance.now());\n    };\n    start = performance.now();\n    rebuild();\n    if (document.fonts?.ready) {\n      document.fonts.ready.then(() => {\n        if (!ready) rebuild();\n      });\n    }\n    const ro = new ResizeObserver(() => rebuild());\n    ro.observe(root);\n    ro.observe(stage);\n    const io = new IntersectionObserver((entries) => {\n      visible = entries[0]?.isIntersecting ?? true;\n      if (visible) schedule();\n      else stop();\n    });\n    io.observe(root);\n    if (!reduce) {\n      root.addEventListener(\"pointermove\", onMove);\n      root.addEventListener(\"pointerleave\", onLeave);\n    }\n    document.addEventListener(\"visibilitychange\", onVisibility);\n    schedule();\n\n    return () => {\n      ready = true;\n      stop();\n      ro.disconnect();\n      io.disconnect();\n      root.removeEventListener(\"pointermove\", onMove);\n      root.removeEventListener(\"pointerleave\", onLeave);\n      document.removeEventListener(\"visibilitychange\", onVisibility);\n    };\n  }, [accent, density, speed, word, depth, swing]);\n\n  React.useEffect(() => {\n    return () => {\n      if (timerRef.current) clearTimeout(timerRef.current);\n    };\n  }, []);\n\n  function copy() {\n    navigator.clipboard?.writeText(command).catch(() => undefined);\n    setCopied(true);\n    if (timerRef.current) clearTimeout(timerRef.current);\n    timerRef.current = setTimeout(() => setCopied(false), 1600);\n  }\n\n  const Heading = headingAs;\n  const vars = { \"--hb-hh7-accent\": accent, \"--hb-hh7-ink\": inkFor(accent), ...style } as React.CSSProperties;\n\n  return (\n    <section ref={rootRef} className={`hb-hh7 ${className}`} style={vars} {...rest}>\n      <style href=\"hb-hero-dot-text\" precedence=\"default\">{css}</style>\n      <canvas ref={canvasRef} className=\"hb-hh7-canvas\" aria-hidden=\"true\" />\n      <header className=\"hb-hh7-bar\">\n        <a className=\"hb-hh7-brand\" href=\"#\">\n          {brand}\n        </a>\n        {nav.length ? (\n          <nav className=\"hb-hh7-mid\" aria-label=\"Primary\">\n            <ul className=\"hb-hh7-links\">\n              {nav.map((item) => (\n                <li key={item.label}>\n                  <a className=\"hb-hh7-link\" href={item.href}>\n                    {item.label}\n                  </a>\n                </li>\n              ))}\n            </ul>\n          </nav>\n        ) : null}\n        <div className=\"hb-hh7-end\">\n          <button type=\"button\" className=\"hb-hh7-search\" onClick={onSearch}>\n            Search\n          </button>\n          {navCta ? (\n            <a className=\"hb-hh7-link\" href={navCta.href}>\n              {navCta.label}\n            </a>\n          ) : null}\n        </div>\n      </header>\n      <div ref={stageRef} className=\"hb-hh7-stage\" aria-hidden=\"true\" />\n      <div className=\"hb-hh7-foot\">\n        <div className=\"hb-hh7-copy\">\n          <Heading className=\"hb-hh7-title\">{title}</Heading>\n          {subtitle ? <p className=\"hb-hh7-sub\">{subtitle}</p> : null}\n        </div>\n        {caption || command || primaryCta || learnMore ? (\n          <div className=\"hb-hh7-side\">\n            {caption ? <p className=\"hb-hh7-caption\">{caption}</p> : null}\n            {command || primaryCta ? (\n              <div className=\"hb-hh7-row\">\n                {primaryCta ? (\n                  <a className=\"hb-hh7-cta\" href={primaryCta.href}>\n                    {primaryCta.label}\n                    <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                      <path d=\"M5 12h14M13 6l6 6-6 6\" />\n                    </svg>\n                  </a>\n                ) : null}\n                {command ? (\n                  <div className=\"hb-hh7-cmd\">\n                    <span className=\"hb-hh7-prompt\" aria-hidden=\"true\">$</span>\n                    <code className=\"hb-hh7-code\">{command}</code>\n                    <button type=\"button\" className=\"hb-hh7-copybtn\" onClick={copy} aria-label={copied ? \"Copied\" : \"Copy command\"}>\n                      {copied ? (\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                          <path d=\"M5 12.5l4.5 4.5L19 7.5\" />\n                        </svg>\n                      ) : (\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.9\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                          <rect x=\"8.5\" y=\"8.5\" width=\"11\" height=\"11\" rx=\"2\" />\n                          <path d=\"M15.5 8.5V6.7a2.2 2.2 0 0 0-2.2-2.2H6.7a2.2 2.2 0 0 0-2.2 2.2v6.6a2.2 2.2 0 0 0 2.2 2.2h1.8\" />\n                        </svg>\n                      )}\n                      <span className=\"hb-hh7-sr\" aria-live=\"polite\">{copied ? \"Copied\" : \"\"}</span>\n                    </button>\n                  </div>\n                ) : null}\n              </div>\n            ) : null}\n            {learnMore ? (\n              <a className=\"hb-hh7-more\" href={learnMore.href}>\n                {learnMore.label}\n              </a>\n            ) : null}\n          </div>\n        ) : null}\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}