{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "reasoning-indicator",
  "title": "Reasoning Indicator",
  "description": "An expandable request progress indicator with active steps, completion and error states.",
  "dependencies": [
    "motion",
    "lucide-react",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/reasoning-indicator/reasoning-indicator.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { Check, ChevronDown, CircleAlert } from \"lucide-react\";\nimport { motion, useReducedMotion } from \"motion/react\";\nimport { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport interface ReasoningIndicatorProps {\n  steps?: string[];\n  activeStep?: number;\n  status?: \"thinking\" | \"complete\" | \"error\";\n  defaultExpanded?: boolean;\n  theme?: \"dark\" | \"light\";\n  className?: string;\n}\n\n/** Display application-provided progress summaries, rather than model-internal reasoning. */\nexport function ReasoningIndicator({ steps = [\"Understanding your request\", \"Reviewing relevant context\", \"Preparing a response\"], activeStep = 1, status = \"thinking\", defaultExpanded = true, theme = \"dark\", className }: ReasoningIndicatorProps) {\n  const [expanded, setExpanded] = React.useState(defaultExpanded);\n  const id = React.useId();\n  const reduced = useReducedMotion();\n  const index = Math.min(Math.max(0, activeStep), Math.max(0, steps.length - 1));\n  const label = status === \"complete\" ? \"Response ready\" : status === \"error\" ? \"Something went wrong\" : \"Putting it together\";\n  const palette = { \"--ai-accent\": theme === \"dark\" ? \"#b5a1ff\" : \"#7052bd\" } as React.CSSProperties;\n  return <section style={palette} className={twMerge(clsx(\"mx-auto w-full max-w-[460px] rounded-[24px] border border-current/[0.09] overflow-hidden p-5 sm:p-6 font-sans antialiased [font-family:Inter,ui-sans-serif,system-ui,sans-serif]\", theme === \"dark\" ? \"bg-[#0a0a0a] text-[#f2f2f2]\" : \"bg-[#fafafa] text-[#171717]\", className))}>\n    <button type=\"button\" aria-expanded={expanded} aria-controls={id} onClick={() => setExpanded(!expanded)} className=\"flex w-full items-center gap-3.5 rounded-xl text-left focus-visible:outline-2 focus-visible:outline-[var(--ai-accent)]\">\n      <span aria-hidden=\"true\" className=\"relative flex size-9 shrink-0 items-center justify-center\">\n        <span className=\"absolute inset-0 rounded-full bg-[conic-gradient(#9b7bff50,#7cf3ff30,#ff7bd530,#9b7bff50)] blur-lg\" />\n        <svg viewBox=\"0 0 32 32\" className=\"relative size-8 text-current\">{Array.from({ length: 49 }, (_, i) => { const x = i % 7 - 3; const y = Math.floor(i / 7) - 3; const d = Math.hypot(x, y); return d <= 3.2 ? <circle key={i} cx={16 + x * 4} cy={16 + y * 4} r={Number((1.05 - d * 0.13).toFixed(4))} fill=\"currentColor\" opacity={Number((0.9 - d * 0.17).toFixed(4))} /> : null; })}</svg>\n      </span>\n      <span className=\"flex-1\"><span role=\"status\" className=\"block text-[15px] font-medium tracking-[-0.025em]\">{label}</span><span className=\"mt-1 block text-[11px] opacity-45\">{status === \"thinking\" ? \"A thoughtful answer starts with the right context.\" : status === \"complete\" ? \"All steps completed.\" : \"Please try your request again.\"}</span></span>\n      <ChevronDown size={15} className={clsx(\"transition-transform motion-reduce:transition-none\", expanded && \"rotate-180\")} />\n    </button>\n    {expanded && <ol id={id} aria-label=\"Request progress\" className=\"relative mt-6 space-y-1\">{steps.map((step, i) => {\n      const done = status === \"complete\" || i < index;\n      const active = i === index && status === \"thinking\";\n      return <li key={`${i}-${step}`} aria-current={active ? \"step\" : undefined} className={clsx(\"relative flex min-h-12 items-center gap-3 rounded-xl px-3 text-[12px]\", active && \"bg-current/[0.045]\")}>\n        <span className={clsx(\"flex size-6 shrink-0 items-center justify-center rounded-full border border-current/10\", theme === \"dark\" ? \"bg-[#0a0a0a]\" : \"bg-white\", done ? \"text-current/55\" : active ? \"text-[var(--ai-accent)]\" : \"text-current/25\")}>\n          {done ? <Check size={12} /> : status === \"error\" && i === index ? <CircleAlert size={12} className=\"text-red-400\" /> : <motion.span className=\"size-2 rounded-full bg-current\" animate={active && !reduced ? { opacity: [0.35, 1, 0.35], scale: [0.8, 1.2, 0.8] } : { opacity: 0.5 }} transition={{ duration: 1.7, repeat: Infinity }} />}\n        </span><span className={active || done ? \"opacity-85\" : \"opacity-35\"}>{step}</span>{active && <span className=\"ml-auto shrink-0 rounded-full border border-current/10 px-2 py-1 text-[9px] opacity-50\">Working</span>}\n      </li>;\n    })}</ol>}\n    <div className=\"mt-5 flex items-center gap-3 border-t border-current/[0.07] pt-4\">\n      <div aria-hidden=\"true\" className=\"flex flex-1 gap-1\">{steps.map((_, i) => <span key={i} className={clsx(\"h-[3px] flex-1 rounded-full\", status === \"complete\" || i < index ? \"bg-current/55\" : i === index && status === \"thinking\" ? \"bg-[var(--ai-accent)]\" : \"bg-current/10\")} />)}</div>\n      <span className=\"text-[10px] tabular-nums opacity-40\">{status === \"complete\" ? steps.length : Math.min(index, steps.length)} / {steps.length} complete</span>\n    </div>\n  </section>;\n}\nexport default ReasoningIndicator;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}