{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "reasoning",
  "title": "Reasoning",
  "description": "The agent’s thinking, folded away behind how long it took.",
  "registryDependencies": [
    "https://creance.pages.dev/r/creance-base.json"
  ],
  "files": [
    {
      "path": "reasoning/Reasoning.css",
      "content": ".cr-reasoning {\n  color: var(--cr-color-text-default);\n  font-family: var(--cr-font-family-sans);\n}\n\n.cr-reasoning__summary {\n  display: inline-flex;\n  align-items: center;\n  gap: var(--cr-space-2);\n  padding: 6px var(--cr-space-3) 6px 10px;\n  border-radius: var(--cr-radius-full);\n  background: var(--cr-color-bg-subtle);\n  color: var(--cr-color-text-secondary);\n  font-size: var(--cr-font-size-sm);\n  font-weight: var(--cr-font-weight-semibold);\n  list-style: none;\n  cursor: pointer;\n}\n\n.cr-reasoning__summary::-webkit-details-marker {\n  display: none;\n}\n\n.cr-reasoning__summary:hover {\n  color: var(--cr-color-text-default);\n}\n\n.cr-reasoning__summary:focus-visible {\n  outline: var(--cr-focus-width) solid var(--cr-color-focus);\n  outline-offset: var(--cr-focus-offset);\n}\n\n.cr-reasoning__chevron {\n  color: var(--cr-color-text-muted);\n  transition: transform var(--cr-motion-duration-fast) var(--cr-motion-easing-standard);\n}\n\n.cr-reasoning[open] .cr-reasoning__chevron {\n  transform: rotate(90deg);\n}\n\n.cr-reasoning__body {\n  display: flex;\n  flex-direction: column;\n  gap: var(--cr-space-2);\n  margin-top: var(--cr-space-2);\n  padding: var(--cr-space-3) var(--cr-space-4);\n  border-radius: var(--cr-radius-lg);\n  background: var(--cr-color-bg-subtle);\n  color: var(--cr-color-text-secondary);\n  font-size: var(--cr-font-size-sm);\n  line-height: 1.55;\n}\n\n.cr-reasoning__body > p {\n  margin: 0;\n}\n",
      "type": "registry:file",
      "target": "@components/creance/reasoning/Reasoning.css"
    },
    {
      "path": "reasoning/Reasoning.tsx",
      "content": "import type { ReactNode } from 'react';\nimport { cx } from '@/lib/creance/cx';\nimport { ChevronIcon, SparkIcon } from '@/lib/creance/icons';\nimport './Reasoning.css';\n\nexport interface ReasoningProps {\n  /** How long the agent thought, in seconds. Shown as \"Thought for 8 seconds\". */\n  seconds?: number;\n  /** Still thinking: shown as \"Thinking\" in place of a duration. */\n  thinking?: boolean;\n  /** Replaces the default summary text. */\n  summary?: ReactNode;\n  /** Open when first shown. Default closed. */\n  defaultOpen?: boolean;\n  /** The thinking. Shown in a quieter tone than the answer. */\n  children: ReactNode;\n  className?: string;\n}\n\n/** The agent's thinking, folded away behind how long it took. A native `<details>`, so it opens with Enter or Space. */\nexport function Reasoning({ seconds, thinking, summary, defaultOpen, children, className }: ReasoningProps) {\n  const text = summary ?? (thinking ? 'Thinking' : seconds === undefined ? 'Thought' : `Thought for ${seconds} ${seconds === 1 ? 'second' : 'seconds'}`);\n  return (\n    <details className={cx('cr-reasoning', className)} open={defaultOpen}>\n      <summary className=\"cr-reasoning__summary\">\n        <SparkIcon />\n        {text}\n        <ChevronIcon className=\"cr-icon cr-reasoning__chevron\" />\n      </summary>\n      <div className=\"cr-reasoning__body\">{children}</div>\n    </details>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@components/creance/reasoning/Reasoning.tsx"
    }
  ],
  "categories": [
    "molecule",
    "chat"
  ],
  "type": "registry:ui"
}