{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "agent-steps",
  "type": "registry:component",
  "title": "Agent Steps",
  "description": "A vertical plan or trace with pending, active, done and failed steps joined by a connector line that fills as steps complete.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "agent-kit",
    "steps",
    "plan",
    "trace",
    "progress",
    "timeline",
    "agent"
  ],
  "docs": "https://hyperblur.dev/effects/agent-steps",
  "files": [
    {
      "path": "registry/hyperblur/agent-steps.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/agent-steps.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface AgentStep {\n  id: string;\n  title: string;\n  detail?: string;\n  status?: \"pending\" | \"active\" | \"done\" | \"failed\";\n}\n\nexport interface AgentStepsProps extends Omit<React.HTMLAttributes<HTMLOListElement>, \"children\"> {\n  steps?: AgentStep[];\n  activeIndex?: number;\n  color?: string;\n  compact?: boolean;\n}\n\nconst css = `\n@keyframes hb-as-spin { to { transform: rotate(360deg); } }\n@keyframes hb-as-draw { from { stroke-dashoffset: 16; } to { stroke-dashoffset: 0; } }\n@keyframes hb-as-pulse {\n  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hb-as-color, #2f7bff) 45%, transparent); }\n  50% { box-shadow: 0 0 0 5px transparent; }\n}\n.hb-as {\n  display: flex;\n  flex-direction: column;\n  margin: 0;\n  padding: 0;\n  list-style: none;\n  color: #ededed;\n  font-family: var(--font-sans), ui-sans-serif, system-ui, sans-serif;\n  font-size: 13px;\n  line-height: 1.45;\n}\n.hb-as-item {\n  position: relative;\n  display: grid;\n  grid-template-columns: 20px minmax(0, 1fr);\n  gap: 10px;\n  padding-bottom: 16px;\n}\n.hb-as-item:last-child { padding-bottom: 0; }\n.hb-as[data-compact=\"true\"] .hb-as-item { gap: 8px; padding-bottom: 9px; }\n.hb-as[data-compact=\"true\"] { font-size: 12px; }\n.hb-as-line {\n  position: absolute;\n  top: 24px;\n  bottom: 4px;\n  left: 9px;\n  width: 2px;\n  overflow: hidden;\n  border-radius: 1px;\n  background: #262626;\n}\n.hb-as[data-compact=\"true\"] .hb-as-line { top: 22px; bottom: 2px; }\n.hb-as-line::after {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  background: var(--hb-as-color, #2f7bff);\n  transform: scaleY(0);\n  transform-origin: top;\n  transition: transform .6s cubic-bezier(.2, .9, .2, 1);\n}\n.hb-as-item[data-status=\"done\"] .hb-as-line::after { transform: scaleY(1); }\n.hb-as-mark {\n  position: relative;\n  display: grid;\n  place-items: center;\n  box-sizing: border-box;\n  width: 20px;\n  height: 20px;\n  border: 1.5px solid #333333;\n  border-radius: 50%;\n  color: #ffffff;\n  background: #111111;\n  transition: background .3s ease, border-color .3s ease;\n}\n.hb-as[data-compact=\"true\"] .hb-as-mark { width: 18px; height: 18px; }\n.hb-as[data-compact=\"true\"] .hb-as-line { left: 8px; }\n.hb-as[data-compact=\"true\"] .hb-as-item { grid-template-columns: 18px minmax(0, 1fr); }\n.hb-as-item[data-status=\"done\"] .hb-as-mark {\n  border-color: var(--hb-as-color, #2f7bff);\n  background: var(--hb-as-color, #2f7bff);\n}\n.hb-as-item[data-status=\"failed\"] .hb-as-mark { border-color: #ef4444; background: #ef4444; }\n.hb-as-item[data-status=\"active\"] .hb-as-mark {\n  border-color: color-mix(in srgb, var(--hb-as-color, #2f7bff) 30%, transparent);\n  animation: hb-as-pulse 1.8s ease-in-out infinite;\n}\n.hb-as-spin {\n  position: absolute;\n  inset: -1.5px;\n  border: 1.5px solid transparent;\n  border-top-color: var(--hb-as-color, #2f7bff);\n  border-radius: 50%;\n  animation: hb-as-spin .8s linear infinite;\n}\n.hb-as-mark svg { width: 11px; height: 11px; }\n.hb-as-check { stroke-dasharray: 16; animation: hb-as-draw .4s ease both; }\n.hb-as-dot { width: 5px; height: 5px; border-radius: 50%; background: #444444; }\n.hb-as-body { min-width: 0; padding-top: 1px; }\n.hb-as-title { margin: 0; font-weight: 500; color: #ededed; overflow-wrap: anywhere; }\n.hb-as-item[data-status=\"pending\"] .hb-as-title { color: #8f8f8f; font-weight: 400; }\n.hb-as-item[data-status=\"failed\"] .hb-as-title { color: #f87171; }\n.hb-as-detail { margin: 2px 0 0; color: #8f8f8f; font-size: .92em; overflow-wrap: anywhere; }\n.hb-as-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  overflow: hidden;\n  clip-path: inset(50%);\n  white-space: nowrap;\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-as-spin { animation-duration: 2.4s; }\n  .hb-as-item[data-status=\"active\"] .hb-as-mark { animation: none; }\n  .hb-as-check { animation: none; }\n  .hb-as-line::after, .hb-as-mark { transition: none; }\n}\n`;\n\nconst LABELS = { pending: \"Pending\", active: \"In progress\", done: \"Done\", failed: \"Failed\" } as const;\n\nexport function AgentSteps({\n  steps = [],\n  activeIndex,\n  color = \"#2f7bff\",\n  compact = false,\n  className = \"\",\n  style,\n  ...rest\n}: AgentStepsProps) {\n  return (\n    <ol\n      className={`hb-as ${className}`}\n      style={{ \"--hb-as-color\": color, ...style } as React.CSSProperties}\n      data-compact={compact}\n      aria-label=\"Progress\"\n      {...rest}\n    >\n      <style href=\"hb-agent-steps\" precedence=\"default\">{css}</style>\n      {steps.map((step, i) => {\n        const status: NonNullable<AgentStep[\"status\"]> =\n          step.status ??\n          (activeIndex === undefined ? \"pending\" : i < activeIndex ? \"done\" : i === activeIndex ? \"active\" : \"pending\");\n        return (\n          <li\n            key={step.id}\n            className=\"hb-as-item\"\n            data-status={status}\n            aria-current={status === \"active\" ? \"step\" : undefined}\n          >\n            {i < steps.length - 1 ? <span className=\"hb-as-line\" aria-hidden=\"true\" /> : null}\n            <span className=\"hb-as-mark\" aria-hidden=\"true\">\n              {status === \"active\" ? <span className=\"hb-as-spin\" /> : null}\n              {status === \"done\" ? (\n                <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n                  <path className=\"hb-as-check\" d=\"M3 8.5l3.2 3.2L13 4.8\" />\n                </svg>\n              ) : status === \"failed\" ? (\n                <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\">\n                  <path d=\"M4 4l8 8M12 4l-8 8\" />\n                </svg>\n              ) : status === \"pending\" ? (\n                <span className=\"hb-as-dot\" />\n              ) : null}\n            </span>\n            <div className=\"hb-as-body\">\n              <p className=\"hb-as-title\">\n                {step.title}\n                <span className=\"hb-as-sr\"> ({LABELS[status]})</span>\n              </p>\n              {step.detail ? <p className=\"hb-as-detail\">{step.detail}</p> : null}\n            </div>\n          </li>\n        );\n      })}\n    </ol>\n  );\n}\n"
    }
  ]
}