{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero-terminal",
  "type": "registry:component",
  "title": "Hero Terminal",
  "description": "A developer hero led by a large terminal that types a command and plays a deploy session line by line, with a filling progress bar, check marks and a live URL, then loops. A copyable command sits above it.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "hero",
    "hero",
    "terminal",
    "cli",
    "developer",
    "deploy",
    "typing"
  ],
  "docs": "https://hyperblur.dev/effects/hero-terminal",
  "files": [
    {
      "path": "registry/hyperblur/hero-terminal.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/hero-terminal.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface HeroTerminalAction {\n  label: string;\n  href: string;\n}\n\nexport interface HeroTerminalLine {\n  kind: \"command\" | \"info\" | \"progress\" | \"success\" | \"link\";\n  text: string;\n  meta?: string;\n  wait?: number;\n}\n\nexport interface HeroTerminalProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  command?: string;\n  script?: HeroTerminalLine[];\n  windowTitle?: string;\n  primaryCta?: HeroTerminalAction | null;\n  secondaryCta?: HeroTerminalAction | null;\n  accent?: string;\n  loop?: boolean;\n  headingAs?: \"h1\" | \"h2\";\n}\n\nconst css = `\n.hb-vb7 {\n  --hb-vb7-accent: #3ddc97;\n  position: relative;\n  box-sizing: border-box;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  width: 100%;\n  min-height: 640px;\n  padding: 56px clamp(16px, 5cqi, 48px) 0;\n  overflow: hidden;\n  isolation: isolate;\n  container-type: inline-size;\n  background:\n    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 100% 32px,\n    #070707;\n  color: #ededed;\n  font-family: inherit;\n  text-align: center;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-vb7 *, .hb-vb7 *::before, .hb-vb7 *::after { box-sizing: border-box; }\n.hb-vb7::after {\n  content: \"\";\n  position: absolute;\n  left: 50%;\n  bottom: -30%;\n  z-index: -1;\n  width: 80%;\n  height: 70%;\n  transform: translateX(-50%);\n  background: radial-gradient(closest-side, color-mix(in srgb, var(--hb-vb7-accent) 18%, transparent), transparent);\n  pointer-events: none;\n}\n.hb-vb7-in { animation: hb-vb7-up .8s cubic-bezier(.16, 1, .3, 1) both; animation-delay: var(--hb-vb7-d, 0ms); }\n@keyframes hb-vb7-up {\n  from { opacity: 0; transform: translate3d(0, 12px, 0); }\n  to { opacity: 1; transform: none; }\n}\n.hb-vb7-eyebrow {\n  margin: 0;\n  color: var(--hb-vb7-accent);\n  font-family: var(--font-mono, ui-monospace, monospace);\n  font-size: 12px;\n  letter-spacing: .02em;\n}\n.hb-vb7-eyebrow::before { content: \"~/\"; margin-right: 6px; color: rgba(237, 237, 237, .35); }\n.hb-vb7-title {\n  max-width: 780px;\n  margin: 14px 0 0;\n  color: #f5f5f5;\n  font-size: clamp(32px, 5.4cqi, 56px);\n  font-weight: 640;\n  line-height: 1.04;\n  letter-spacing: -.045em;\n  text-wrap: balance;\n}\n.hb-vb7-sub { max-width: 540px; margin: 14px 0 0; color: rgba(237, 237, 237, .55); font-size: clamp(14.5px, 1.6cqi, 16px); line-height: 1.55; }\n.hb-vb7-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; }\n.hb-vb7-cmd {\n  display: inline-flex;\n  align-items: center;\n  gap: 10px;\n  min-height: 42px;\n  padding: 0 6px 0 14px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 10px;\n  background: #0f0f10;\n  color: #ededed;\n  font-family: var(--font-mono, ui-monospace, monospace);\n  font-size: 13px;\n}\n.hb-vb7-cmd > span::before { content: \"$ \"; color: var(--hb-vb7-accent); }\n.hb-vb7-copy {\n  display: inline-grid;\n  place-items: center;\n  width: 30px;\n  height: 30px;\n  border: 0;\n  border-radius: 7px;\n  background: rgba(255, 255, 255, .06);\n  color: rgba(237, 237, 237, .7);\n  cursor: pointer;\n  transition: background .2s ease, color .2s ease;\n}\n.hb-vb7-copy:hover { background: rgba(255, 255, 255, .12); color: #fff; }\n.hb-vb7-copy:focus-visible, .hb-vb7-btn:focus-visible { outline: 2px solid var(--hb-vb7-accent); outline-offset: 2px; }\n.hb-vb7-copy[data-done] { color: var(--hb-vb7-accent); }\n.hb-vb7-btn {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  min-height: 42px;\n  padding: 0 18px;\n  border: 1px solid rgba(255, 255, 255, .12);\n  border-radius: 10px;\n  color: #ededed;\n  font: inherit;\n  font-size: 14px;\n  font-weight: 550;\n  text-decoration: none;\n  white-space: nowrap;\n  transition: background .2s ease, border-color .2s ease, transform .2s cubic-bezier(.2, .8, .2, 1);\n}\n.hb-vb7-btn:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .24); transform: translateY(-1px); }\n.hb-vb7-btn[data-primary] { border-color: transparent; background: var(--hb-vb7-accent); color: #04120b; }\n.hb-vb7-btn[data-primary]:hover { background: color-mix(in srgb, var(--hb-vb7-accent) 85%, #ffffff); }\n.hb-vb7-win {\n  width: 100%;\n  max-width: 780px;\n  margin-top: 36px;\n  overflow: hidden;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-bottom: 0;\n  border-radius: 14px 14px 0 0;\n  background: linear-gradient(180deg, #111112, #0b0b0c);\n  box-shadow: 0 -1px 0 rgba(255, 255, 255, .04) inset, 0 40px 100px -20px rgba(0, 0, 0, .9), 0 0 0 6px rgba(255, 255, 255, .015);\n  text-align: left;\n}\n.hb-vb7-chrome {\n  display: flex;\n  align-items: center;\n  gap: 14px;\n  height: 38px;\n  padding: 0 14px;\n  border-bottom: 1px solid rgba(255, 255, 255, .06);\n  color: rgba(237, 237, 237, .45);\n  font-family: var(--font-mono, ui-monospace, monospace);\n  font-size: 11.5px;\n}\n.hb-vb7-lights { display: flex; gap: 6px; }\n.hb-vb7-lights span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .12); }\n.hb-vb7-tab { padding: 4px 10px; border-radius: 6px; background: rgba(255, 255, 255, .05); color: rgba(237, 237, 237, .8); }\n.hb-vb7-branch { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }\n.hb-vb7-branch::before { content: \"\"; width: 6px; height: 6px; border-radius: 50%; background: #f5a524; }\n.hb-vb7-body {\n  min-height: 250px;\n  margin: 0;\n  padding: 16px 18px 22px;\n  color: rgba(237, 237, 237, .82);\n  font-family: var(--font-mono, ui-monospace, monospace);\n  font-size: 13px;\n  line-height: 1.85;\n  list-style: none;\n}\n.hb-vb7-line { display: flex; align-items: center; gap: 10px; min-width: 0; white-space: nowrap; animation: hb-vb7-line .35s cubic-bezier(.16, 1, .3, 1) both; }\n@keyframes hb-vb7-line {\n  from { opacity: 0; transform: translate3d(-4px, 0, 0); }\n  to { opacity: 1; transform: none; }\n}\n.hb-vb7-line[data-kind=\"command\"] { color: #fafafa; animation: none; }\n.hb-vb7-line[data-kind=\"command\"]::before { content: \"$\"; color: var(--hb-vb7-accent); }\n.hb-vb7-line[data-kind=\"info\"] { color: rgba(237, 237, 237, .6); }\n.hb-vb7-line[data-kind=\"info\"]::before { content: \"\\\\203A\"; color: rgba(237, 237, 237, .35); }\n.hb-vb7-line[data-kind=\"success\"] svg, .hb-vb7-line[data-kind=\"link\"] svg { flex: none; color: var(--hb-vb7-accent); }\n.hb-vb7-text { overflow: hidden; text-overflow: ellipsis; }\n.hb-vb7-meta { margin-left: auto; padding-left: 16px; color: rgba(237, 237, 237, .35); }\n.hb-vb7-line[data-kind=\"link\"] .hb-vb7-text { color: #fff; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--hb-vb7-accent) 70%, transparent); text-underline-offset: 3px; }\n.hb-vb7-track { position: relative; flex: 0 1 220px; height: 6px; overflow: hidden; border-radius: 6px; background: rgba(255, 255, 255, .07); }\n.hb-vb7-track::after {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  border-radius: inherit;\n  background: linear-gradient(90deg, color-mix(in srgb, var(--hb-vb7-accent) 50%, transparent), var(--hb-vb7-accent));\n  transform-origin: 0 50%;\n  animation: hb-vb7-fill var(--hb-vb7-w, 1.2s) cubic-bezier(.65, 0, .35, 1) both;\n}\n@keyframes hb-vb7-fill {\n  from { transform: scaleX(0); }\n  to { transform: scaleX(1); }\n}\n.hb-vb7-caret {\n  display: inline-block;\n  width: .6em;\n  height: 1.15em;\n  margin-left: 1px;\n  background: var(--hb-vb7-accent);\n  vertical-align: -.2em;\n  animation: hb-vb7-blink 1.05s steps(1) infinite;\n}\n@keyframes hb-vb7-blink {\n  50% { opacity: 0; }\n}\n.hb-vb7-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }\n@container (max-width: 560px) {\n  .hb-vb7-body { font-size: 11.5px; padding: 12px 12px 18px; }\n  .hb-vb7-meta, .hb-vb7-branch { display: none; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-vb7-in, .hb-vb7-line, .hb-vb7-track::after, .hb-vb7-caret { animation: none; }\n  .hb-vb7-copy, .hb-vb7-btn { transition: none; }\n}\n`;\n\nconst defaultScript: HeroTerminalLine[] = [\n  { kind: \"command\", text: \"npx shadcn@latest add https://hyperblur.dev/r/hero-terminal.json\", wait: 500 },\n  { kind: \"info\", text: \"Checking registry\", meta: \"0.3s\", wait: 450 },\n  { kind: \"progress\", text: \"Updating files\", meta: \"0.6s\", wait: 1100 },\n  { kind: \"success\", text: \"Created src/components/hyperblur/hero-terminal.tsx\", meta: \"0.1s\", wait: 600 },\n  { kind: \"link\", text: \"https://hyperblur.dev/effects/hero-terminal\", meta: \"docs\", wait: 0 },\n];\n\nconst defaultPrimary: HeroTerminalAction = { label: \"Read the quickstart\", href: \"#\" };\n\nfunction d(ms: number) {\n  return { \"--hb-vb7-d\": `${ms}ms` } as React.CSSProperties;\n}\n\nfunction Check() {\n  return (\n    <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n      <path d=\"M5 12.5l4.5 4.5L19 7.5\" />\n    </svg>\n  );\n}\n\nfunction Globe() {\n  return (\n    <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden=\"true\">\n      <circle cx=\"12\" cy=\"12\" r=\"9\" />\n      <path d=\"M3 12h18M12 3c3 3.5 3 14.5 0 18M12 3c-3 3.5-3 14.5 0 18\" />\n    </svg>\n  );\n}\n\nexport function HeroTerminal({\n  eyebrow = \"free, MIT licensed, no dependencies\",\n  title = \"From zero to a live effect in one command\",\n  subtitle = \"Hyperblur adds the component to your project as plain source you own, with no runtime and no lock-in.\",\n  command = \"npx shadcn@latest add https://hyperblur.dev/r/hero-terminal.json\",\n  script = defaultScript,\n  windowTitle = \"zsh · my-app\",\n  primaryCta = defaultPrimary,\n  secondaryCta = null,\n  accent = \"#3ddc97\",\n  loop = true,\n  headingAs = \"h1\",\n  className = \"\",\n  style,\n  ...rest\n}: HeroTerminalProps) {\n  const Heading = headingAs;\n  const vars = { \"--hb-vb7-accent\": accent, ...style } as React.CSSProperties;\n  const [state, setState] = React.useState({ line: 0, chars: 0 });\n  const [copied, setCopied] = React.useState(false);\n  const root = React.useRef<HTMLElement>(null);\n  const [visible, setVisible] = React.useState(true);\n\n  React.useEffect(() => {\n    const node = root.current;\n    if (!node || typeof IntersectionObserver === \"undefined\") return;\n    const io = new IntersectionObserver(([entry]) => setVisible(entry.isIntersecting));\n    io.observe(node);\n    return () => io.disconnect();\n  }, []);\n\n  React.useEffect(() => {\n    const reduce = typeof window !== \"undefined\" && window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n    if (reduce) {\n      const t = window.setTimeout(() => setState({ line: script.length, chars: 0 }), 0);\n      return () => window.clearTimeout(t);\n    }\n    if (!visible) return;\n    const current = script[state.line];\n    let t: number;\n    if (!current) {\n      if (!loop) return;\n      t = window.setTimeout(() => setState({ line: 0, chars: 0 }), 4200);\n    } else if (current.kind === \"command\" && state.chars < current.text.length) {\n      t = window.setTimeout(() => setState((s) => ({ ...s, chars: s.chars + 1 })), 38 + (state.chars % 5) * 9);\n    } else {\n      t = window.setTimeout(() => setState((s) => ({ line: s.line + 1, chars: 0 })), current.wait ?? 500);\n    }\n    return () => window.clearTimeout(t);\n  }, [state, script, loop, visible]);\n\n  const copy = () => {\n    navigator.clipboard?.writeText(command).then(\n      () => {\n        setCopied(true);\n        window.setTimeout(() => setCopied(false), 1600);\n      },\n      () => undefined,\n    );\n  };\n\n  const done = state.line >= script.length;\n\n  return (\n    <section ref={root} className={`hb-vb7 ${className}`} style={vars} {...rest}>\n      <style href=\"hb-hero-terminal\" precedence=\"default\">{css}</style>\n      {eyebrow ? (\n        <p className=\"hb-vb7-eyebrow hb-vb7-in\" style={d(40)}>\n          {eyebrow}\n        </p>\n      ) : null}\n      <Heading className=\"hb-vb7-title hb-vb7-in\" style={d(120)}>\n        {title}\n      </Heading>\n      {subtitle ? (\n        <p className=\"hb-vb7-sub hb-vb7-in\" style={d(200)}>\n          {subtitle}\n        </p>\n      ) : null}\n      <div className=\"hb-vb7-row hb-vb7-in\" style={d(280)}>\n        {command ? (\n          <span className=\"hb-vb7-cmd\">\n            <span>{command}</span>\n            <button type=\"button\" className=\"hb-vb7-copy\" data-done={copied ? \"\" : undefined} onClick={copy} aria-label={copied ? \"Copied\" : \"Copy command\"}>\n              {copied ? (\n                <Check />\n              ) : (\n                <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                  <rect x=\"8\" y=\"8\" width=\"12\" height=\"12\" rx=\"2.5\" />\n                  <path d=\"M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2\" />\n                </svg>\n              )}\n            </button>\n          </span>\n        ) : null}\n        {primaryCta ? (\n          <a className=\"hb-vb7-btn\" data-primary=\"\" href={primaryCta.href}>\n            {primaryCta.label}\n          </a>\n        ) : null}\n        {secondaryCta ? (\n          <a className=\"hb-vb7-btn\" href={secondaryCta.href}>\n            {secondaryCta.label}\n          </a>\n        ) : null}\n      </div>\n      <div className=\"hb-vb7-win hb-vb7-in\" style={d(380)}>\n        <div className=\"hb-vb7-chrome\" aria-hidden=\"true\">\n          <span className=\"hb-vb7-lights\">\n            <span />\n            <span />\n            <span />\n          </span>\n          <span className=\"hb-vb7-tab\">{windowTitle}</span>\n          <span className=\"hb-vb7-branch\">main</span>\n        </div>\n        <ol className=\"hb-vb7-body\" aria-live=\"off\">\n          <li className=\"hb-vb7-sr\">{script.map((line) => line.text).join(\". \")}</li>\n          {script.slice(0, Math.min(state.line + 1, script.length)).map((line, i) => {\n            const active = i === state.line;\n            if (line.kind === \"command\") {\n              return (\n                <li key={i} className=\"hb-vb7-line\" data-kind=\"command\" aria-hidden=\"true\">\n                  <span className=\"hb-vb7-text\">{active ? line.text.slice(0, state.chars) : line.text}</span>\n                  {active ? <span className=\"hb-vb7-caret\" /> : null}\n                </li>\n              );\n            }\n            return (\n              <li key={i} className=\"hb-vb7-line\" data-kind={line.kind} aria-hidden=\"true\">\n                {line.kind === \"success\" ? <Check /> : null}\n                {line.kind === \"link\" ? <Globe /> : null}\n                <span className=\"hb-vb7-text\">{line.text}</span>\n                {line.kind === \"progress\" ? <span className=\"hb-vb7-track\" style={{ \"--hb-vb7-w\": `${line.wait ?? 1200}ms` } as React.CSSProperties} /> : null}\n                {line.meta ? <span className=\"hb-vb7-meta\">{line.meta}</span> : null}\n              </li>\n            );\n          })}\n          {done ? (\n            <li className=\"hb-vb7-line\" data-kind=\"command\" aria-hidden=\"true\">\n              <span className=\"hb-vb7-caret\" />\n            </li>\n          ) : null}\n        </ol>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}