{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "score-ring",
  "type": "registry:ui",
  "title": "Score Ring",
  "description": "A bounded score with a readable caption; unassessed stays distinct from zero.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/theme.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/ui/score-ring.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/ui/score-ring.tsx",
      "content": "import type { ReactNode } from 'react';\nimport { cn } from '../lib/utils';\n\n/** A bounded score, not progress. null means unassessed; zero is a real score. */\nexport function ScoreRing({ value, label, unavailable = 'Not assessed', className }: {\n  value: number | null; label: ReactNode; unavailable?: ReactNode; className?: string;\n}) {\n  const score = value === null || !Number.isFinite(value) ? null : Math.round(Math.max(0, Math.min(100, value)));\n  return (\n    <figure className={cn('m-0 inline-flex flex-col items-center gap-3 text-kh-ink', className)}>\n      <div className=\"relative size-32 shrink-0\" aria-hidden=\"true\">\n        <svg viewBox=\"0 0 120 120\" className=\"size-full -rotate-90\" fill=\"none\">\n          <circle cx=\"60\" cy=\"60\" r=\"50\" strokeWidth=\"8\" className=\"stroke-kh-line\" />\n          {score !== null && <circle cx=\"60\" cy=\"60\" r=\"50\" strokeWidth=\"8\" pathLength=\"100\" strokeDasharray={`${score} 100`} strokeLinecap={score === 0 ? 'butt' : 'round'} className=\"stroke-kh-accent\" />}\n        </svg>\n        <span className=\"absolute inset-0 flex items-center justify-center font-kh-mono text-kh-title font-semibold tabular-nums\">{score ?? '—'}</span>\n      </div>\n      <figcaption className=\"text-center text-kh-small\">\n        <span className=\"block font-medium\">{label}</span>\n        <span className=\"block text-kh-muted\">{score === null ? unavailable : `${score} / 100`}</span>\n      </figcaption>\n    </figure>\n  );\n}\n"
    }
  ]
}
