{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"cta","title":"Call to action","description":"Call to Action Section Block for React. The closing call to action: one line to want it, an email to start with, and the queue it promises to clear, resolving beside it.","type":"registry:block","author":"Detent","dependencies":["motion"],"registryDependencies":["https://detentui.com/r/theme.json"],"files":[{"path":"components/detent/blocks/cta/CTA.tsx","target":"components/detent/blocks/cta/CTA.tsx","type":"registry:block","content":"'use client'\n\nimport { useLayoutEffect, useRef, useState } from 'react'\nimport { motion, useAnimationControls, useAnimationFrame, useInView, useMotionValue, useReducedMotion } from 'motion/react'\nimport { press, dur, ease } from '@/components/detent/lib/motion'\nimport { tap } from '@/components/detent/lib/feel'\nimport { Count } from '@/components/detent/ui/Count'\nimport { DrawnCheck } from '@/components/detent/ui/Outcome'\nimport { Orb } from '@/components/detent/ui/Orb'\nimport { ProductMark } from '@/components/detent/ui/DetentMark'\nimport { Spinner } from '@/components/detent/ui/Spinner'\nimport { ArrowRight, Check, Lock, Shield } from '@/components/detent/blocks/kit/icons'\nimport { btn } from '@/components/detent/blocks/kit/primitives'\nimport { useDirector } from '@/components/detent/blocks/kit/director'\nimport { accentVars } from '@/components/detent/blocks/kit/props'\nimport type { BlockProps } from '@/components/detent/blocks/kit/props'\n\nexport type Ticket = { from: string; hue: number; text: string; outcome: string; handed?: boolean }\n\nconst TICKETS: Ticket[] = [\n  { from: 'Dana Ruiz', hue: 20, text: 'Where’s my order #4471?', outcome: 'Answered · 8s' },\n  { from: 'Leo Martin', hue: 330, text: 'I was charged twice this month', outcome: 'Refunded' },\n  { from: 'Aiko Tanaka', hue: 150, text: 'How do I reset my password?', outcome: 'Answered · 6s' },\n  { from: 'Omar Haddad', hue: 45, text: 'Can I add a gift note?', outcome: 'Answered · 11s' },\n  { from: 'Grace Liu', hue: 160, text: 'It says delivered, but it isn’t here', outcome: 'With Maya', handed: true },\n  { from: 'Noah Kim', hue: 210, text: 'Do you ship to Canada?', outcome: 'Answered · 7s' },\n  { from: 'Sam Ito', hue: 90, text: 'The jacket runs small. Can I swap it?', outcome: 'Swap sent' },\n  { from: 'Priya Nair', hue: 260, text: 'Is the 20% code still valid?', outcome: 'Answered · 9s' },\n  { from: 'Mia Novak', hue: 180, text: 'Cancel my subscription, please', outcome: 'Answered · 12s' },\n  { from: 'Ethan Brooks', hue: 240, text: 'Can I change my delivery address?', outcome: 'Updated · 10s' },\n]\n\nexport type CTAProps = BlockProps & {\n  product?: string\n  title?: [string, string]\n  subline?: string\n  placeholder?: string\n  action?: string\n  note?: string\n  tickets?: Ticket[]\n  assurances?: { label: string; icon?: 'shield' | 'lock' | 'check' }[]\n  queueLabel?: string\n  resolved?: number\n  sentTitle?: string\n  sentLine?: string\n  failed?: string\n  onSubmit?: (email: string) => Promise<void> | void\n}\n\nconst MARK = { shield: Shield, lock: Lock, check: Check }\n\nconst EMAIL = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]{2,}$/\n\nexport function CTA({\n  autoplay = false,\n  accent,\n  product = 'Detent',\n  title = ['Give it your queue.', 'Keep your weekends.'],\n  subline,\n  placeholder = 'you@company.com',\n  action = 'Start free',\n  note = 'Free for 500 conversations a month. No card needed.',\n  tickets = TICKETS,\n  assurances = [],\n  queueLabel = 'Example queue',\n  resolved,\n  sentTitle = 'You’re on the list',\n  sentLine = 'We’ll be in touch at',\n  failed = 'That didn’t go through. Try again in a moment.',\n  onSubmit,\n  className = '',\n}: CTAProps) {\n  const calls = useRef({ onSubmit })\n  useLayoutEffect(() => {\n    calls.current = { onSubmit }\n  })\n  const handed = useRef(!autoplay)\n  const [email, setEmail] = useState('')\n  const [phase, setPhase] = useState<'idle' | 'sending' | 'sent'>('idle')\n  const [bad, setBad] = useState(false)\n  const [error, setError] = useState(false)\n  const [pressed, setPressed] = useState(false)\n  const shake = useAnimationControls()\n\n  const submit = async () => {\n    if (phase !== 'idle') return\n    if (!EMAIL.test(email)) {\n      setBad(true)\n      shake.start({ x: [0, -6, 5, -3, 2, 0], transition: { duration: 0.38, ease: ease.out } })\n      return\n    }\n    setPhase('sending')\n    setError(false)\n    try {\n      await Promise.all([handed.current ? calls.current.onSubmit?.(email) : undefined, new Promise((r) => setTimeout(r, 900))])\n      setPhase('sent')\n    } catch {\n      setPhase('idle')\n      setError(true)\n    }\n  }\n  const latest = useRef(submit)\n  useLayoutEffect(() => {\n    latest.current = submit\n  })\n  const reset = () => {\n    setPhase('idle')\n    setEmail('')\n    setBad(false)\n  }\n\n  const director = useDirector(\n    async (wait) => {\n      await wait(1800)\n      for (const ch of 'dana@fieldwork.co') {\n        setEmail((e) => e + ch)\n        await wait(55)\n      }\n      await wait(500)\n      setPressed(true)\n      await wait(140)\n      setPressed(false)\n      await latest.current()\n      await wait(4200)\n      reset()\n      await wait(1200)\n    },\n    autoplay,\n    () => (handed.current = true),\n  )\n\n  const cell = (on: boolean) => `col-start-1 row-start-1 transition-[opacity,visibility] ease-detent duration-300 ${on ? '' : 'invisible opacity-0'}`\n\n  return (\n    <div className={`pro-app @container h-full w-full overflow-y-auto overflow-x-hidden bg-surface text-ink [scrollbar-width:thin] ${className}`} style={accentVars(accent)} onPointerDownCapture={director.onPointerDownCapture} onPointerUpCapture={director.onPointerUpCapture} onKeyDownCapture={director.onKeyDownCapture}>\n      <div className=\"flex min-h-full items-center\">\n        <section className=\"mx-auto w-full max-w-[1180px] px-5 py-12 @3xl:px-8 @3xl:py-16\">\n          <div className=\"relative grid grid-cols-[minmax(0,1fr)] overflow-hidden rounded-[28px] bg-[var(--dt-card)] shadow-[0_0_0_1px_var(--line)] @4xl:grid-cols-[minmax(0,1fr)_400px]\">\n            <span aria-hidden className=\"pointer-events-none absolute inset-0\" style={{ background: 'radial-gradient(70% 90% at 0% 100%, color-mix(in oklch, var(--dt-accent) 12%, transparent), transparent 70%)' }} />\n\n            <div className=\"relative flex flex-col justify-center p-7 @3xl:p-12\">\n              <h2 className=\"text-[clamp(30px,4.6cqi,52px)] font-normal leading-[1.04] tracking-[-0.045em] text-ink\">\n                {title[0]}\n                <span className=\"block text-[color-mix(in_oklch,var(--ink)_42%,transparent)]\">{title[1]}</span>\n              </h2>\n              <p className=\"mt-5 max-w-[460px] text-[15px] leading-[23px] text-ink-2\">{subline ?? `${product} answers what it can, asks before it acts, and hands your team the rest. Set it up this afternoon.`}</p>\n\n              <div className=\"mt-8 grid max-w-[460px] grid-cols-[minmax(0,1fr)]\">\n                <motion.form\n                  noValidate\n                  animate={shake}\n                  aria-hidden={phase === 'sent'}\n                  onSubmit={(e) => {\n                    e.preventDefault()\n                    tap()\n                    submit()\n                  }}\n                  className={`${cell(phase !== 'sent')} flex h-12 items-center rounded-full bg-surface p-1 pl-5 transition-shadow ease-detent ${bad ? 'shadow-[var(--elev-raised),0_0_0_3px_color-mix(in_oklch,var(--warn)_30%,transparent)]' : 'shadow-raised focus-within:shadow-[var(--elev-raised),0_0_0_3px_color-mix(in_oklch,var(--dt-accent)_22%,transparent)]'}`}\n                >\n                  <input\n                    type=\"email\"\n                    value={email}\n                    onChange={(e) => {\n                      setEmail(e.target.value)\n                      setBad(false)\n                      setError(false)\n                    }}\n                    placeholder={placeholder}\n                    aria-label=\"Work email\"\n                    aria-invalid={bad}\n                    autoComplete=\"email\"\n                    readOnly={phase !== 'idle'}\n                    className=\"h-full min-w-0 flex-1 bg-transparent text-callout text-ink outline-none placeholder:text-ink-3\"\n                  />\n                  <motion.button type=\"submit\" whileTap={press} animate={{ scale: pressed ? press.scale : 1 }} className=\"ring-focus h-10 shrink-0 rounded-full bg-ink px-5 text-callout font-medium text-surface shadow-[inset_0_1px_0_rgb(255_255_255/0.16)]\" transition={{ duration: dur.enter, ease: ease.out }}>\n                    <span className=\"grid place-items-center\">\n                      <span className={`col-start-1 row-start-1 flex items-center gap-1.5 transition-opacity ease-detent ${phase === 'sending' ? 'opacity-0' : ''}`}>\n                        {action} <ArrowRight size={15} />\n                      </span>\n                      <span className={`col-start-1 row-start-1 transition-opacity ease-detent ${phase === 'sending' ? '' : 'opacity-0'}`}>\n                        <Spinner size={16} />\n                      </span>\n                    </span>\n                  </motion.button>\n                </motion.form>\n                <div aria-live=\"polite\" className={`${cell(phase === 'sent')} flex min-h-12 items-center gap-3`}>\n                  <span className=\"grid size-9 shrink-0 place-items-center rounded-full bg-[var(--ok)] text-white\">{phase === 'sent' && <DrawnCheck size={15} strokeWidth={3} />}</span>\n                  <span className=\"min-w-0 flex-1\">\n                    <span className=\"block text-callout font-medium text-ink\">{sentTitle}</span>\n                    <span className=\"block text-footnote text-ink-2 @3xl:truncate\">\n                      {sentLine} <span className=\"text-ink\">{email}</span>\n                    </span>\n                  </span>\n                  <button type=\"button\" tabIndex={phase === 'sent' ? 0 : -1} onClick={() => (tap(), reset())} className={`${btn.ghost} shrink-0`}>\n                    Change\n                  </button>\n                </div>\n              </div>\n              <p className=\"mt-3 min-h-5 text-caption @4xl:h-5 @4xl:px-5\">{bad || error ? <span role={error ? 'alert' : undefined} className=\"text-[color-mix(in_oklch,var(--warn)_70%,var(--ink))]\">{bad ? 'That doesn’t look like an email yet.' : failed}</span> : <span className=\"text-ink-3\">{note}</span>}</p>\n\n              {assurances.length > 0 && (\n                <ul className=\"mt-8 flex flex-col gap-x-5 gap-y-2.5 text-footnote leading-5 text-ink-3 @md:flex-row @md:flex-wrap [&_svg]:shrink-0\">\n                  {assurances.map(({ label, icon = 'check' }) => {\n                    const Icon = MARK[icon]\n                    return (\n                      <li key={label} className=\"flex items-center gap-1.5\">\n                        <Icon size={15} /> {label}\n                      </li>\n                    )\n                  })}\n                </ul>\n              )}\n            </div>\n\n            <Queue tickets={tickets} product={product} label={queueLabel} resolved={resolved} />\n          </div>\n        </section>\n      </div>\n    </div>\n  )\n}\n\nconst ROW = 48\nconst AREA = 336\nconst LINE = 176\nconst SPEED = 26\n\nfunction Queue({ tickets, product, label, resolved }: { tickets: Ticket[]; product: string; label: string; resolved?: number }) {\n  const reduce = useReducedMotion()\n  const box = useRef<HTMLDivElement>(null)\n  const seen = useInView(box)\n  const y = useMotionValue(0)\n  const dist = useRef(0)\n  const loop = tickets.length * ROW\n  const over = (d: number) => Math.floor((LINE + d - 20) / ROW)\n  const last = useRef(over(0))\n  const [count, setCount] = useState(resolved ?? 0)\n  useAnimationFrame((_, delta) => {\n    if (reduce || !seen) return\n    dist.current += (Math.min(delta, 64) * SPEED) / 1000\n    y.set(-(dist.current % loop))\n    const c = over(dist.current)\n    if (c !== last.current) {\n      setCount((n) => n + c - last.current)\n      last.current = c\n    }\n  })\n  const list = [...tickets, ...tickets]\n  const fade = 'color-mix(in oklch, var(--ink) 2.5%, var(--dt-card))'\n  return (\n    <div className=\"relative flex flex-col shadow-[inset_0_1px_0_var(--line)] @4xl:shadow-[inset_1px_0_0_var(--line)]\" style={{ background: fade }}>\n      <div className=\"flex h-12 items-center justify-between px-5 text-footnote\">\n        <span className=\"text-ink-3\">\n          {label}\n          {resolved !== undefined && (\n            <span className=\"tnum ml-1.5 font-medium text-ink\">\n              <Count value={count} format={(n) => Math.round(n).toLocaleString('en-US')} duration={0.4} />\n            </span>\n          )}\n        </span>\n        {resolved !== undefined && (\n          <span className=\"flex items-center gap-1.5 text-caption text-ink-3\">\n            <span className=\"size-1.5 rounded-full bg-[var(--ok)] motion-safe:animate-pulse\" /> Live\n          </span>\n        )}\n      </div>\n      <div ref={box} aria-hidden className=\"relative my-auto overflow-hidden\" style={{ height: AREA }}>\n        <div className=\"absolute inset-x-0 top-0 overflow-hidden\" style={{ height: LINE }}>\n          <motion.ul className=\"absolute inset-x-0 top-0 pl-12 pr-5\" style={{ y }}>\n            {list.map((t, i) => (\n              <Chip key={i} t={t} done />\n            ))}\n          </motion.ul>\n        </div>\n        <div className=\"absolute inset-x-0 bottom-0 overflow-hidden\" style={{ top: LINE }}>\n          <motion.ul className=\"absolute inset-x-0 pl-12 pr-5\" style={{ top: -LINE, y }}>\n            {list.map((t, i) => (\n              <Chip key={i} t={t} />\n            ))}\n          </motion.ul>\n        </div>\n        <div className=\"pointer-events-none absolute inset-x-0\" style={{ top: LINE }}>\n          <span className=\"absolute left-5 right-0 top-0 h-px\" style={{ background: 'linear-gradient(90deg, var(--dt-accent), color-mix(in oklch, var(--dt-accent) 15%, transparent))' }} />\n          <span className=\"absolute left-[14px] top-0 -translate-y-1/2 rounded-full shadow-[0_0_0_3px_var(--dt-card),0_0_14px_color-mix(in_oklch,var(--dt-accent)_45%,transparent)]\">\n            <ProductMark name={product} size={18} round />\n          </span>\n        </div>\n        <span className=\"pointer-events-none absolute inset-x-0 top-0 h-16\" style={{ background: `linear-gradient(${fade}, transparent)` }} />\n        <span className=\"pointer-events-none absolute inset-x-0 bottom-0 h-16\" style={{ background: `linear-gradient(transparent, ${fade})` }} />\n      </div>\n    </div>\n  )\n}\n\nfunction Chip({ t, done = false }: { t: Ticket; done?: boolean }) {\n  return (\n    <li className=\"mb-2 flex h-10 items-center gap-2.5 rounded-[12px] bg-surface pl-2.5 pr-3 shadow-raised\">\n      <Orb seed={t.from} hue={t.hue} size={20} className={done ? 'opacity-55' : ''} />\n      <span className={`min-w-0 flex-1 truncate text-footnote ${done ? 'text-ink-3' : 'text-ink'}`}>{t.text}</span>\n      {done ? (\n        <span className={`flex shrink-0 items-center gap-1 text-caption font-medium ${t.handed ? 'text-ink-2' : 'text-[color-mix(in_oklch,var(--ok)_76%,var(--ink))]'}`}>\n          {t.handed ? <Orb seed=\"Maya Chen\" hue={150} size={12} /> : <Check size={13} strokeWidth={2.4} />}\n          {t.outcome}\n        </span>\n      ) : (\n        <span className=\"flex shrink-0 items-center gap-1.5 text-caption text-ink-3\">\n          <span className=\"size-1.5 rounded-full bg-[var(--warn)]\" /> Waiting\n        </span>\n      )}\n    </li>\n  )\n}\n"},{"path":"components/detent/ui/Count.tsx","target":"components/detent/ui/Count.tsx","type":"registry:block","content":"'use client'\n\nimport { useEffect, useState } from 'react'\nimport { animate, useMotionValue, useMotionValueEvent } from 'motion/react'\nimport { ease } from '@/components/detent/lib/motion'\n\nexport function Count({ value, format = (n) => String(Math.round(n)), duration = 0.7 }: { value: number; format?: (n: number) => string; duration?: number }) {\n  const mv = useMotionValue(value)\n  const [text, setText] = useState(() => format(value))\n  useMotionValueEvent(mv, 'change', (v) => setText(format(v)))\n  useEffect(() => {\n    const c = animate(mv, value, { duration, ease: ease.out })\n    return () => c.stop()\n  }, [value, mv, duration])\n  return <span className=\"tnum\">{text}</span>\n}\n"},{"path":"components/detent/blocks/kit/props.tsx","target":"components/detent/blocks/kit/props.tsx","type":"registry:block","content":"'use client'\n\nimport { createContext, useContext } from 'react'\nimport type { CSSProperties } from 'react'\n\nexport type BlockProps = {\n  autoplay?: boolean\n  accent?: string\n  className?: string\n}\n\nexport const Names = createContext({ assistant: 'Detent', product: 'Detent' })\nexport const useNames = () => useContext(Names)\n\nexport const handle = (s: string) => s.toLowerCase().replace(/[^a-z0-9]+/g, '-')\n\nexport function accentVars(accent?: string): CSSProperties | undefined {\n  if (!accent) return undefined\n  return {\n    ['--dt-accent' as string]: accent,\n    ['--dt-accent-ink' as string]: `light-dark(color-mix(in oklch, ${accent} 82%, black), color-mix(in oklch, ${accent} 60%, white))`,\n  }\n}\n"},{"path":"components/detent/ui/DetentMark.tsx","target":"components/detent/ui/DetentMark.tsx","type":"registry:block","content":"import { Orb } from '@/components/detent/ui/Orb'\n\nexport function DetentMark({ size = 28, round = false, className = '' }: { size?: number; round?: boolean; className?: string }) {\n  return (\n    <svg aria-hidden width={size} height={size} viewBox=\"0 0 24 24\" className={`shrink-0 ${className}`}>\n      <rect width=\"24\" height=\"24\" rx={round ? 12 : 7} fill=\"var(--ink)\" />\n      <g transform={`translate(12 12) scale(${round ? 0.54 : 0.6}) translate(-12 -12)`} fill=\"var(--surface)\">\n        <rect x=\"3.75\" y=\"3\" width=\"5.5\" height=\"18\" rx=\"1.1\" />\n        <path d=\"M11.25 3a9 9 0 0 1 0 18z\" />\n      </g>\n    </svg>\n  )\n}\n\nexport function ProductMark({ name, size = 20, round = false, hue = 250, className = '' }: { name: string; size?: number; round?: boolean; hue?: number; className?: string }) {\n  return name === 'Detent' ? <DetentMark size={size} round={round} className={className} /> : <Orb seed={name} hue={hue} size={size} className={className} />\n}\n"},{"path":"components/detent/lib/motion.ts","target":"components/detent/lib/motion.ts","type":"registry:block","content":"export const ease = {\n  out: [0.2, 0.9, 0.25, 1] as const,\n  inOut: [0.6, 0, 0.3, 1] as const,\n}\n\nexport const dur = {\n  exit: 0.12,\n  hover: 0.15,\n  enter: 0.2,\n  swap: 0.24,\n  panel: 0.34,\n}\n\nexport const spring = {\n  snappy: { type: 'spring', stiffness: 560, damping: 42, mass: 0.6 } as const,\n  smooth: { type: 'spring', bounce: 0, duration: 0.36 } as const,\n  soft: { type: 'spring', bounce: 0.12, duration: 0.5 } as const,\n  release: { type: 'spring', stiffness: 320, damping: 32 } as const,\n  move: { type: 'spring', stiffness: 420, damping: 38 } as const,\n  data: { type: 'spring', stiffness: 170, damping: 26 } as const,\n  pop: { type: 'spring', bounce: 0.3, duration: 0.4 } as const,\n}\n\nexport const appear = {\n  initial: { opacity: 0, scale: 0.96 },\n  animate: { opacity: 1, scale: 1, transition: { duration: dur.swap, ease: ease.out } },\n  exit: { opacity: 0, scale: 0.97, transition: { duration: dur.exit, ease: ease.out } },\n}\n\nexport const slide = {\n  enter: (dir: number) => ({ x: dir * 24, opacity: 0 }),\n  center: { x: 0, opacity: 1 },\n  exit: (dir: number) => ({ x: dir * -24, opacity: 0 }),\n}\n\nexport const press = { scale: 0.97 }\n\nexport const staggerFor = (count: number) => Math.min(0.04, 0.2 / Math.max(1, count))\n"},{"path":"components/detent/lib/feel.ts","target":"components/detent/lib/feel.ts","type":"registry:block","content":"export const tap = () => {\n  if (typeof window !== 'undefined') window.dispatchEvent(new Event('detent:tap'))\n}\n\nlet keyed = true\nif (typeof window !== 'undefined') {\n  window.addEventListener('keydown', () => void (keyed = true), true)\n  window.addEventListener('pointerdown', () => void (keyed = false), true)\n}\nexport const byKey = () => keyed\n"},{"path":"components/detent/ui/Outcome.tsx","target":"components/detent/ui/Outcome.tsx","type":"registry:block","content":"'use client'\n\nimport { AnimatePresence, motion } from 'motion/react'\nimport { ease } from '@/components/detent/lib/motion'\n\nexport function Bloom({ k, color = 'var(--ok)', radius, spread = 12, delay = 0 }: { k: string | number | null; color?: string; radius: number | string; spread?: number; delay?: number }) {\n  if (k === null) return null\n  return <span key={k} aria-hidden className=\"bloom pointer-events-none absolute inset-0\" style={{ borderRadius: radius, animationDelay: `${delay}s`, ['--bloom' as string]: color, ['--bloom-spread' as string]: `${spread}px` }} />\n}\n\nexport function DrawnCheck({ size = 13, delay = 0.12, strokeWidth = 3 }: { size?: number; delay?: number; strokeWidth?: number }) {\n  return (\n    <svg aria-hidden width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={strokeWidth} strokeLinecap=\"round\" strokeLinejoin=\"round\">\n      <motion.path d=\"M5 12.5l4.5 4.5L19 7.5\" initial={{ pathLength: 0 }} animate={{ pathLength: 1 }} transition={{ duration: 0.32, ease: ease.out, delay }} />\n    </svg>\n  )\n}\n\nexport function Sweep({ k, color = 'var(--ok)', delay = 0, axis = 'x' }: { k: string | number | null; color?: string; delay?: number; axis?: 'x' | 'y' }) {\n  const across = axis === 'x'\n  const band = (deg: number) => `linear-gradient(${deg}deg, transparent 15%, color-mix(in oklch, ${color} 26%, transparent) 42%, color-mix(in oklch, ${color} 40%, rgb(255 255 255 / 0.5)) 50%, color-mix(in oklch, ${color} 26%, transparent) 58%, transparent 85%)`\n  return (\n    <span aria-hidden className=\"pointer-events-none absolute inset-0 overflow-hidden motion-reduce:hidden\" style={{ borderRadius: 'inherit' }}>\n      <AnimatePresence>\n        {k !== null && (\n          <motion.span\n            key={k}\n            className={across ? 'absolute inset-y-0 left-0 w-1/2' : 'absolute inset-x-0 top-0 h-1/2'}\n            style={{ background: band(across ? 100 : 180) }}\n            initial={across ? { x: '-110%' } : { y: '-110%' }}\n            animate={across ? { x: '230%' } : { y: '230%' }}\n            exit={{ opacity: 0 }}\n            transition={{ duration: across ? 0.85 : 0.9, ease: ease.inOut, delay }}\n          />\n        )}\n      </AnimatePresence>\n    </span>\n  )\n}\n"},{"path":"components/detent/ui/Orb.tsx","target":"components/detent/ui/Orb.tsx","type":"registry:block","content":"import type { CSSProperties } from 'react'\n\nfunction hash(s: string) {\n  let h = 2166136261\n  for (let i = 0; i < s.length; i++) h = Math.imul(h ^ s.charCodeAt(i), 16777619)\n  return h >>> 0\n}\n\nconst at = (r: number, deg: number) => {\n  const a = (deg * Math.PI) / 180\n  return `${(50 + r * Math.cos(a)).toFixed(1)}% ${(50 + r * Math.sin(a)).toFixed(1)}%`\n}\n\nexport function Orb({ seed, hue, size = 32, quiet = false, className = '', style }: { seed: string; hue?: number; size?: number; quiet?: boolean; className?: string; style?: CSSProperties }) {\n  const n = hash(seed)\n  const h = hue ?? n % 360\n  const turn = n % 360\n  const comp = (h + 160 + (n % 40)) % 360\n  const warm = (h + 30 + ((n >> 6) % 30)) % 360\n  const glint = (h + 190 + ((n >> 11) % 40)) % 360\n  const c = (v: number) => (quiet ? v * 0.32 : v).toFixed(3)\n  return (\n    <span aria-hidden className={`relative block shrink-0 overflow-hidden rounded-full ${className}`} style={{ width: size, height: size, ...style }}>\n      <span\n        className=\"absolute -inset-[18%] block\"\n        style={{\n          background: [\n            `radial-gradient(circle at 46% 42%, oklch(0.84 ${c(0.15)} ${h}) 0%, transparent 60%)`,\n            `radial-gradient(circle at ${at(50, turn + 165)}, oklch(0.84 ${c(0.15)} ${comp}) 0%, transparent 40%)`,\n            `radial-gradient(circle at ${at(50, turn + 45)}, oklch(${quiet ? 0.66 : 0.7} ${c(0.19)} ${warm}) 0%, transparent 42%)`,\n            `radial-gradient(circle at ${at(52, turn - 65)}, oklch(0.88 ${c(0.1)} ${glint}) 0%, transparent 28%)`,\n            `oklch(${quiet ? 0.72 : 0.78} ${c(0.15)} ${h})`,\n          ].join(', '),\n          filter: `blur(${Math.max(1.5, size * 0.1)}px)`,\n        }}\n      />\n      <span\n        className=\"absolute inset-0 block rounded-full\"\n        style={{\n          background: 'radial-gradient(circle at 34% 26%, rgb(255 255 255 / 0.42) 0%, rgb(255 255 255 / 0.12) 26%, transparent 46%)',\n          boxShadow: `inset 0 ${-size * 0.1}px ${size * 0.22}px oklch(0.4 0.12 ${h} / 0.2), inset 0 0 0 0.5px rgb(0 0 0 / 0.07)`,\n        }}\n      />\n    </span>\n  )\n}\n"},{"path":"components/detent/ui/Spinner.tsx","target":"components/detent/ui/Spinner.tsx","type":"registry:block","content":"'use client'\n\nexport function Spinner({ size = 16, className = '' }: { size?: number; className?: string }) {\n  return (\n    <svg width={size} height={size} viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden className={`motion-safe:animate-spin ${className}`} style={{ animationDuration: '0.7s' }}>\n      <circle cx=\"8\" cy=\"8\" r=\"6.25\" stroke=\"currentColor\" strokeOpacity=\"0.22\" strokeWidth=\"1.75\" />\n      <path d=\"M14.25 8A6.25 6.25 0 0 0 8 1.75\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\" />\n    </svg>\n  )\n}\n"},{"path":"components/detent/blocks/kit/icons.tsx","target":"components/detent/blocks/kit/icons.tsx","type":"registry:block","content":"import { useId } from 'react'\nimport type { SVGProps } from 'react'\n\ntype P = SVGProps<SVGSVGElement> & { size?: number }\n\nfunction Svg({ size = 18, children, ...rest }: P) {\n  return (\n    <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.5} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden {...rest}>\n      {children}\n    </svg>\n  )\n}\n\nexport const Check = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M5 12.5l4.5 4.5L19 7.5\" />\n  </Svg>\n)\n\nexport const ChevronDown = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M6.5 9.5 12 15l5.5-5.5\" />\n  </Svg>\n)\n\nexport const ChevronRight = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M9.5 6.5 15 12l-5.5 5.5\" />\n  </Svg>\n)\n\nexport const ChevronLeft = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M14.5 6.5 9 12l5.5 5.5\" />\n  </Svg>\n)\n\nexport const Reset = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M4.5 12a7.5 7.5 0 1 0 2.2-5.3\" />\n    <path d=\"M4.5 4.5v4h4\" />\n  </Svg>\n)\n\nexport const Close = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M6.5 6.5l11 11M17.5 6.5l-11 11\" />\n  </Svg>\n)\n\nexport const Plus = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M12 5.5v13M5.5 12h13\" />\n  </Svg>\n)\n\nexport const Search = (p: P) => (\n  <Svg {...p}>\n    <circle cx=\"11\" cy=\"11\" r=\"6.25\" />\n    <path d=\"m15.75 15.75 3.75 3.75\" />\n  </Svg>\n)\n\nexport const Orbit = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M18.06 8.5A7 7 0 1 1 15.5 5.94\" />\n    <circle cx=\"16.95\" cy=\"7.05\" r=\"1.9\" fill=\"currentColor\" stroke=\"none\" />\n  </Svg>\n)\n\nexport const Refresh = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M19.5 12a7.5 7.5 0 1 1-2.2-5.3\" />\n    <path d=\"M19.5 4.5v4h-4\" />\n  </Svg>\n)\n\nexport const Note = (p: P) => (\n  <Svg {...p}>\n    <rect x=\"5\" y=\"3.5\" width=\"14\" height=\"17\" rx=\"2.5\" />\n    <path d=\"M8.75 8.5h6.5M8.75 12h6.5M8.75 15.5h3.5\" />\n  </Svg>\n)\n\nexport const FilePage = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M13.5 3.5H8A2.5 2.5 0 0 0 5.5 6v12A2.5 2.5 0 0 0 8 20.5h8a2.5 2.5 0 0 0 2.5-2.5V8.5Z\" />\n    <path d=\"M13.5 3.5v5h5\" />\n  </Svg>\n)\n\nexport const Copy = (p: P) => (\n  <Svg {...p}>\n    <rect x=\"8.5\" y=\"8.5\" width=\"11\" height=\"11\" rx=\"2.5\" />\n    <path d=\"M15.5 8.5v-2a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h2\" />\n  </Svg>\n)\n\nexport const ArrowUp = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M12 19V5.5M6.5 11 12 5.5l5.5 5.5\" />\n  </Svg>\n)\n\nexport const ArrowRight = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M5 12h13.5M13 6.5l5.5 5.5-5.5 5.5\" />\n  </Svg>\n)\n\nexport const ArrowLeft = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M19 12H5.5M11 6.5 5.5 12l5.5 5.5\" />\n  </Svg>\n)\n\nexport const Return = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M18.5 5.5V11a3 3 0 0 1-3 3H5.5M10 9.5 5.5 14l4.5 4.5\" />\n  </Svg>\n)\n\nexport const ArrowUpRight = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M7.5 16.5l9-9M9 7.5h7.5V15\" />\n  </Svg>\n)\n\nexport const Pencil = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M11.5 4.5H7A2.5 2.5 0 0 0 4.5 7v10A2.5 2.5 0 0 0 7 19.5h10a2.5 2.5 0 0 0 2.5-2.5v-4.5\" />\n    <path d=\"M17.6 3.9a1.9 1.9 0 0 1 2.7 2.7l-7.8 7.8-3.5.8.8-3.5Z\" />\n  </Svg>\n)\n\nexport const Folder = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M3.5 7.5A2.5 2.5 0 0 1 6 5h3.4c.6 0 1.1.2 1.5.6l1.2 1.2c.4.4.9.6 1.5.6H18a2.5 2.5 0 0 1 2.5 2.5v6.6A2.5 2.5 0 0 1 18 19H6a2.5 2.5 0 0 1-2.5-2.5Z\" />\n  </Svg>\n)\n\nexport const Code = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M8.5 7.5 4 12l4.5 4.5M15.5 7.5 20 12l-4.5 4.5\" />\n  </Svg>\n)\n\nexport const Download = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M12 4.5v11M7.5 11l4.5 4.5 4.5-4.5M5 19.5h14\" />\n  </Svg>\n)\n\nexport const Upload = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M12 15.5v-11M7.5 9 12 4.5 16.5 9M5 19.5h14\" />\n  </Svg>\n)\n\nexport const Thumb = ({ down, ...p }: P & { down?: boolean }) => (\n  <Svg {...p} style={{ transform: down ? 'scale(1, -1)' : undefined, ...p.style }}>\n    <path d=\"M7.5 10.5 11 4a1.8 1.8 0 0 1 3.3 1.3l-.8 3.7h4.9a2 2 0 0 1 2 2.4l-1.2 6.4a2 2 0 0 1-2 1.7H7.5Z\" />\n    <path d=\"M4.5 10.5h3v9h-3a1 1 0 0 1-1-1v-7a1 1 0 0 1 1-1Z\" />\n  </Svg>\n)\n\nexport const Sun = (p: P) => (\n  <Svg {...p}>\n    <circle cx=\"12\" cy=\"12\" r=\"4\" />\n    <path d=\"M12 3v1.5M12 19.5V21M3 12h1.5M19.5 12H21M5.6 5.6l1.1 1.1M17.3 17.3l1.1 1.1M5.6 18.4l1.1-1.1M17.3 6.7l1.1-1.1\" />\n  </Svg>\n)\n\nexport const Moon = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M19.5 14.5A7.5 7.5 0 0 1 9.5 4.5a7.5 7.5 0 1 0 10 10Z\" />\n  </Svg>\n)\n\nexport const Stop = (p: P) => (\n  <Svg {...p}>\n    <rect x=\"7\" y=\"7\" width=\"10\" height=\"10\" rx=\"2.25\" fill=\"currentColor\" stroke=\"none\" />\n  </Svg>\n)\n\nexport const Pause = (p: P) => (\n  <Svg {...p} strokeWidth={p.strokeWidth ?? 2}>\n    <path d=\"M9 7v10M15 7v10\" />\n  </Svg>\n)\n\nexport const Mail = (p: P) => (\n  <Svg {...p}>\n    <rect x=\"3.5\" y=\"5.5\" width=\"17\" height=\"13\" rx=\"2.5\" />\n    <path d=\"m4.5 7.5 7.5 5.25 7.5-5.25\" />\n  </Svg>\n)\n\nexport const Expand = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M14.5 4.5h5v5M9.5 19.5h-5v-5M19.5 4.5l-6 6M4.5 19.5l6-6\" />\n  </Svg>\n)\n\nexport const Card = (p: P) => (\n  <Svg {...p}>\n    <rect x=\"3.5\" y=\"5.5\" width=\"17\" height=\"13\" rx=\"2.5\" />\n    <path d=\"M3.5 10h17M7 15h3\" />\n  </Svg>\n)\n\nexport const Bolt = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M13 3.5 5.5 13.5h6l-1 7 7.5-10h-6Z\" />\n  </Svg>\n)\n\nexport const People = (p: P) => (\n  <Svg {...p}>\n    <circle cx=\"9\" cy=\"8.5\" r=\"3\" />\n    <path d=\"M3.5 19a5.5 5.5 0 0 1 11 0\" />\n    <path d=\"M15.5 5.6a3 3 0 0 1 0 5.8M17.5 14.3a5.5 5.5 0 0 1 3 4.7\" />\n  </Svg>\n)\n\nexport const Person = (p: P) => (\n  <Svg {...p}>\n    <circle cx=\"12\" cy=\"8\" r=\"3.5\" />\n    <path d=\"M5 19.5a7 7 0 0 1 14 0\" />\n  </Svg>\n)\n\nexport const Sliders = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M4.5 7.5h8.5M17 7.5h2.5M4.5 16.5H7M11 16.5h8.5\" />\n    <circle cx=\"15\" cy=\"7.5\" r=\"2\" />\n    <circle cx=\"9\" cy=\"16.5\" r=\"2\" />\n  </Svg>\n)\n\nexport const Key = (p: P) => (\n  <Svg {...p}>\n    <circle cx=\"8\" cy=\"15.5\" r=\"3.75\" />\n    <path d=\"M10.7 12.8 19 4.5M16 7.5l2.5 2.5M13.75 9.75l2 2\" />\n  </Svg>\n)\n\nexport const Shield = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M12 3.5 5 6.5v5c0 4.3 3 7.6 7 9 4-1.4 7-4.7 7-9v-5Z\" />\n    <path d=\"m9.25 12 2 2 3.5-3.75\" />\n  </Svg>\n)\n\nexport const Lock = (p: P) => (\n  <Svg {...p}>\n    <rect x=\"5.5\" y=\"10.5\" width=\"13\" height=\"9.5\" rx=\"2.5\" />\n    <path d=\"M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5\" />\n  </Svg>\n)\n\nexport const Sidebar = (p: P) => (\n  <Svg {...p}>\n    <rect x=\"3.5\" y=\"4.5\" width=\"17\" height=\"15\" rx=\"3\" />\n    <path d=\"M9.5 4.5v15\" />\n  </Svg>\n)\n\nexport const PullRequest = (p: P) => (\n  <Svg {...p}>\n    <circle cx=\"6.5\" cy=\"6\" r=\"2\" />\n    <circle cx=\"6.5\" cy=\"18\" r=\"2\" />\n    <circle cx=\"17.5\" cy=\"18\" r=\"2\" />\n    <path d=\"M6.5 8v8M17.5 16v-6.5a3 3 0 0 0-3-3H11\" />\n    <path d=\"m13 4.5-2 2 2 2\" />\n  </Svg>\n)\n\nexport const Clock = (p: P) => (\n  <Svg {...p}>\n    <circle cx=\"12\" cy=\"12\" r=\"8\" />\n    <path d=\"M12 7.5V12l3 2\" />\n  </Svg>\n)\n\nexport const Terminal = (p: P) => (\n  <Svg {...p}>\n    <rect x=\"3.5\" y=\"4.5\" width=\"17\" height=\"15\" rx=\"3\" />\n    <path d=\"m7.5 9.5 2.5 2.5-2.5 2.5M12.5 14.5h4\" />\n  </Svg>\n)\n\nexport const Filter = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M4.5 7h15M7.5 12h9M10.5 17h3\" />\n  </Svg>\n)\n\nexport const Mic = (p: P) => (\n  <Svg {...p}>\n    <rect x=\"9\" y=\"3.5\" width=\"6\" height=\"11\" rx=\"3\" />\n    <path d=\"M5.5 11.5a6.5 6.5 0 0 0 13 0M12 18v2.5\" />\n  </Svg>\n)\n\nexport const MicOff = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M15 9.5V6.5a3 3 0 0 0-5.6-1.5M9 9v2.5a3 3 0 0 0 4.9 2.3\" />\n    <path d=\"M5.5 11.5a6.5 6.5 0 0 0 10.6 5M18.4 13a6.5 6.5 0 0 0 .1-1.5M12 18v2.5M4 4l16 16\" />\n  </Svg>\n)\n\nexport const Captions = (p: P) => (\n  <Svg {...p}>\n    <rect x=\"3.5\" y=\"5.5\" width=\"17\" height=\"13\" rx=\"3\" />\n    <path d=\"M7.5 13.5h5M14.5 13.5h2M7.5 10.5h2M11.5 10.5h5\" />\n  </Svg>\n)\n\nfunction Solid({ size = 22, children, ...rest }: P) {\n  return (\n    <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden {...rest}>\n      {children}\n    </svg>\n  )\n}\n\nconst HANDSET = 'M2.75 12.9C2.75 9.55 6.9 7.6 12 7.6S21.25 9.55 21.25 12.9v1.55c0 .95-.8 1.65-1.75 1.5l-2.6-.4a1.6 1.6 0 0 1-1.35-1.58v-1.4A12.6 12.6 0 0 0 12 11.9c-1.25 0-2.4.18-3.55.67v1.4a1.6 1.6 0 0 1-1.35 1.58l-2.6.4c-.95.15-1.75-.55-1.75-1.5Z'\n\nexport const MicSolid = (p: P) => (\n  <Solid {...p}>\n    <rect x=\"8.25\" y=\"2.5\" width=\"7.5\" height=\"12.5\" rx=\"3.75\" />\n    <path d=\"M5.25 11.25a6.75 6.75 0 0 0 13.5 0M12 18v3.25\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.9} strokeLinecap=\"round\" />\n  </Solid>\n)\n\nexport function MicOffSolid(p: P) {\n  const id = useId()\n  return (\n    <Solid {...p}>\n      <mask id={id}>\n        <rect width=\"24\" height=\"24\" fill=\"#fff\" />\n        <path d=\"M4.5 3.5 19.5 20.5\" stroke=\"#000\" strokeWidth={5} strokeLinecap=\"round\" />\n      </mask>\n      <g mask={`url(#${id})`}>\n        <rect x=\"8.25\" y=\"2.5\" width=\"7.5\" height=\"12.5\" rx=\"3.75\" />\n        <path d=\"M5.25 11.25a6.75 6.75 0 0 0 13.5 0M12 18v3.25\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.9} strokeLinecap=\"round\" />\n      </g>\n      <path d=\"M4.5 3.5 19.5 20.5\" stroke=\"currentColor\" strokeWidth={1.9} strokeLinecap=\"round\" />\n    </Solid>\n  )\n}\n\nexport const Handset = (p: P) => (\n  <Solid {...p}>\n    <path d={HANDSET} />\n  </Solid>\n)\n\nexport function CaptionsSolid(p: P) {\n  const id = useId()\n  return (\n    <Solid {...p}>\n      <mask id={id}>\n        <rect width=\"24\" height=\"24\" fill=\"#fff\" />\n        <path d=\"M6.75 10.25h3.5M12.25 10.25h5M6.75 13.75h7.5M16.25 13.75h1\" stroke=\"#000\" strokeWidth={1.9} strokeLinecap=\"round\" />\n      </mask>\n      <rect x=\"3\" y=\"5.5\" width=\"18\" height=\"13\" rx=\"3.75\" mask={`url(#${id})`} />\n    </Solid>\n  )\n}\n\nexport const Calendar = (p: P) => (\n  <Svg {...p}>\n    <rect x=\"4\" y=\"5.5\" width=\"16\" height=\"14.5\" rx=\"3\" />\n    <path d=\"M4 10h16M8.5 3.5v4M15.5 3.5v4\" />\n  </Svg>\n)\n\nexport const Undo = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M9 14 4.5 9.5 9 5\" />\n    <path d=\"M4.5 9.5H14a5.5 5.5 0 0 1 0 11h-3\" />\n  </Svg>\n)\n\nexport const Chart = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M5 19.5v-7M10 19.5v-15M15 19.5v-9M20 19.5v-12\" />\n  </Svg>\n)\n\nexport const Chats = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M7.5 4.5h9A2.5 2.5 0 0 1 19 7v6.5a2.5 2.5 0 0 1-2.5 2.5H10.5L6.5 19.5V16A2.5 2.5 0 0 1 5 13.5V7a2.5 2.5 0 0 1 2.5-2.5Z\" />\n  </Svg>\n)\n\nexport const Share = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M12 14V3.5M8.25 7.25 12 3.5l3.75 3.75\" />\n    <path d=\"M8.5 10.5h-1A2.5 2.5 0 0 0 5 13v4.5A2.5 2.5 0 0 0 7.5 20h9a2.5 2.5 0 0 0 2.5-2.5V13a2.5 2.5 0 0 0-2.5-2.5h-1\" />\n  </Svg>\n)\n\nexport const Link = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M10.5 13.5a3.5 3.5 0 0 0 5 0l3-3a3.5 3.5 0 0 0-5-5l-1 1\" />\n    <path d=\"M13.5 10.5a3.5 3.5 0 0 0-5 0l-3 3a3.5 3.5 0 0 0 5 5l1-1\" />\n  </Svg>\n)\n\nexport const Trash = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M4.5 7h15M9.5 7V5.5a1.5 1.5 0 0 1 1.5-1.5h2a1.5 1.5 0 0 1 1.5 1.5V7M6.5 7l.8 11a2 2 0 0 0 2 1.9h5.4a2 2 0 0 0 2-1.9l.8-11\" />\n  </Svg>\n)\n\nexport const LogOut = (p: P) => (\n  <Svg {...p}>\n    <path d=\"M14 4.5H7A2.5 2.5 0 0 0 4.5 7v10A2.5 2.5 0 0 0 7 19.5h7M10.5 12h9M16.5 8.5 20 12l-3.5 3.5\" />\n  </Svg>\n)\n\nexport const Help = (p: P) => (\n  <Svg {...p}>\n    <circle cx=\"12\" cy=\"12\" r=\"8\" />\n    <path d=\"M9.75 9.75a2.25 2.25 0 1 1 3.1 2.08c-.5.2-.85.68-.85 1.22v.45\" />\n    <path d=\"M12 16.5h.01\" strokeWidth={2.2} />\n  </Svg>\n)\n\nexport const Grid = (p: P) => (\n  <Svg {...p}>\n    <rect x=\"4.5\" y=\"4.5\" width=\"6\" height=\"6\" rx=\"1.75\" />\n    <rect x=\"13.5\" y=\"4.5\" width=\"6\" height=\"6\" rx=\"1.75\" />\n    <rect x=\"4.5\" y=\"13.5\" width=\"6\" height=\"6\" rx=\"1.75\" />\n    <rect x=\"13.5\" y=\"13.5\" width=\"6\" height=\"6\" rx=\"1.75\" />\n  </Svg>\n)\n\nexport const Paperclip = (p: P) => (\n  <Svg {...p}>\n    <path d=\"m19 11.5-7.1 7.1a4.5 4.5 0 0 1-6.4-6.4l7.6-7.6a3 3 0 0 1 4.25 4.25l-7.4 7.4a1.5 1.5 0 0 1-2.1-2.1l6.7-6.7\" />\n  </Svg>\n)\n\nexport const Photo = (p: P) => (\n  <Svg {...p}>\n    <rect x=\"4\" y=\"5\" width=\"16\" height=\"14\" rx=\"3\" />\n    <circle cx=\"9\" cy=\"10\" r=\"1.5\" />\n    <path d=\"m20 15.5-4.2-4.2a1.5 1.5 0 0 0-2.1 0L6 19\" />\n  </Svg>\n)\n\nexport const Plan = (p: P) => (\n  <Svg {...p}>\n    <path d=\"m4.5 7 1.5 1.5L8.75 5.75M4.5 15l1.5 1.5 2.75-2.75M11.5 7.5h8M11.5 15.5h8\" />\n  </Svg>\n)\n\nexport const At = (p: P) => (\n  <Svg {...p}>\n    <circle cx=\"12\" cy=\"12\" r=\"3.25\" />\n    <path d=\"M15.25 12v1.5a2.25 2.25 0 0 0 4.5 0V12a7.75 7.75 0 1 0-3.1 6.2\" />\n  </Svg>\n)\n\nexport const Slash = (p: P) => (\n  <Svg {...p}>\n    <rect x=\"4\" y=\"4\" width=\"16\" height=\"16\" rx=\"4.5\" />\n    <path d=\"m14 8-4 8\" />\n  </Svg>\n)\n"},{"path":"components/detent/blocks/kit/primitives.tsx","target":"components/detent/blocks/kit/primitives.tsx","type":"registry:block","content":"'use client'\n\nimport { useEffect, useLayoutEffect, useRef, useState } from 'react'\nimport type { ReactNode } from 'react'\nimport { motion, useReducedMotion } from 'motion/react'\nimport type { Tone } from '@/components/detent/ui/Intelligence'\nimport { ease, press, spring } from '@/components/detent/lib/motion'\n\nexport { Hover } from '@/components/detent/ui/Hover'\n\nexport const wash = (hue: number) => ({\n  background: `light-dark(oklch(0.94 0.04 ${hue}), oklch(0.26 0.065 ${hue}))`,\n  color: `light-dark(oklch(0.47 0.13 ${hue}), oklch(0.86 0.08 ${hue}))`,\n  boxShadow: `inset 0 0 0 1px light-dark(transparent, oklch(0.75 0.12 ${hue} / 0.38))`,\n})\n\nexport function Name({ title, tone = 'loud' }: { title: string | null; tone?: Tone }) {\n  const [born] = useState(title)\n  const reduce = useReducedMotion()\n  if (!title) return <span className=\"text-ink-3\">New chat</span>\n  if (born !== null || reduce) return <>{title}</>\n  const letters = [...title]\n  const settle = 0.25 + letters.length * 0.022\n  return (\n    <span className=\"relative inline-block max-w-full truncate align-bottom\">\n      <span className=\"sr-only\">{title}</span>\n      <motion.span aria-hidden className=\"block truncate\" initial={{ opacity: 0 }} animate={{ opacity: 1 }} transition={{ delay: settle, duration: 0.7, ease: ease.out }}>\n        {title}\n      </motion.span>\n      <motion.span aria-hidden className={`absolute inset-0 block truncate ${tone === 'loud' ? 'ai-text' : 'text-ink-3'}`} initial={{ opacity: 1 }} animate={{ opacity: 0 }} transition={{ delay: settle, duration: 0.7, ease: ease.out }}>\n        {letters.map((c, i) => (\n          <motion.span key={i} initial={{ opacity: 0 }} animate={{ opacity: 1 }} transition={{ delay: i * 0.022, duration: 0.18, ease: ease.out }}>\n            {c}\n          </motion.span>\n        ))}\n      </motion.span>\n    </span>\n  )\n}\n\nexport function Caret({ tone, small = false }: { tone: Tone; small?: boolean }) {\n  return (\n    <span\n      aria-hidden\n      className={`ml-[3px] inline-block w-[2px] translate-y-[3px] rounded-full motion-safe:animate-[caret_1.05s_infinite] ${small ? 'h-[15px]' : 'h-[17px]'} ${tone === 'loud' ? 'bg-[linear-gradient(to_bottom,var(--ai-ink-1),var(--ai-ink-3))] shadow-[0_0_10px_var(--ai-2)]' : 'bg-ink-2'}`}\n    />\n  )\n}\n\nexport function LiveDot({ tone, label }: { tone: Tone; label?: string }) {\n  return <span aria-label={label} className={`size-1.5 shrink-0 rounded-full motion-safe:animate-pulse ${tone === 'loud' ? 'bg-[linear-gradient(135deg,var(--ai-1),var(--ai-3))] shadow-[0_0_8px_var(--ai-2)]' : 'bg-ink-3'}`} />\n}\n\nexport function Bars({ hue, level = 2, small = true }: { hue: number; level?: number; small?: boolean }) {\n  const h = small ? [4, 6, 8, 10] : [7, 11, 15, 19]\n  return (\n    <span aria-hidden className={`flex items-end ${small ? 'h-2.5 gap-[1.5px]' : 'h-[19px] gap-[3px]'}`}>\n      {h.map((px, i) => (\n        <span key={i} className={`rounded-full ${small ? 'w-[2.5px]' : 'w-[5px]'}`} style={{ height: px, background: i <= level ? `light-dark(oklch(0.56 0.16 ${hue}), oklch(0.76 0.12 ${hue}))` : 'var(--surface-3)' }} />\n      ))}\n    </span>\n  )\n}\n\nexport type MenuItem = { id: string; label: string; note?: string; icon?: ReactNode; trail?: ReactNode }\n\nexport function Menu({ items, active, onActive, onPick, title, className = '', plate }: { items: MenuItem[]; active: number; onActive: (i: number) => void; onPick: (i: number) => void; title?: string; className?: string; plate: string }) {\n  const [via, setVia] = useState<'pointer' | 'keys'>('keys')\n  useEffect(() => {\n    const keys = () => setVia('keys')\n    window.addEventListener('keydown', keys, true)\n    return () => window.removeEventListener('keydown', keys, true)\n  }, [])\n  return (\n    <motion.div\n      role=\"listbox\"\n      className={`absolute z-30 origin-bottom-left rounded-[11px] bg-surface p-1.5 shadow-modal ${className}`}\n      initial={{ opacity: 0, y: 6, scale: 0.98 }}\n      animate={{ opacity: 1, y: 0, scale: 1 }}\n      exit={{ opacity: 0, y: 4, scale: 0.98, transition: { duration: 0.12, ease: ease.out } }}\n      transition={spring.snappy}\n      onPointerDown={(e) => e.preventDefault()}\n    >\n      {title && <p className=\"px-2.5 pb-1 pt-1.5 text-caption text-ink-3\">{title}</p>}\n      {items.length === 0 && <p className=\"px-2.5 py-2 text-footnote text-ink-3\">Nothing matches</p>}\n      {items.map((it, i) => (\n        <button key={it.id} type=\"button\" role=\"option\" aria-selected={i === active} onPointerEnter={() => (setVia('pointer'), onActive(i))} onClick={() => onPick(i)} className=\"relative flex w-full items-center gap-2.5 rounded-[7px] px-2.5 py-2 text-left\">\n          {i === active && <motion.span layoutId={plate} className=\"absolute inset-0 rounded-[7px] bg-surface-2\" transition={via === 'pointer' ? spring.snappy : { duration: 0 }} />}\n          {it.icon && <span className=\"relative flex shrink-0\">{it.icon}</span>}\n          <span className=\"relative min-w-0 flex-1\">\n            <span className=\"block truncate text-callout text-ink\">{it.label}</span>\n            {it.note && <span className=\"block truncate text-caption text-ink-3\">{it.note}</span>}\n          </span>\n          {it.trail && <span className=\"relative shrink-0\">{it.trail}</span>}\n        </button>\n      ))}\n    </motion.div>\n  )\n}\n\nexport function Popover({ onClose, children }: { onClose: () => void; children: ReactNode }) {\n  const box = useRef<HTMLDivElement>(null)\n  useEffect(() => {\n    const down = (e: PointerEvent) => !box.current?.parentElement?.contains(e.target as Node) && onClose()\n    const key = (e: KeyboardEvent) => e.key === 'Escape' && onClose()\n    window.addEventListener('pointerdown', down)\n    window.addEventListener('keydown', key)\n    return () => {\n      window.removeEventListener('pointerdown', down)\n      window.removeEventListener('keydown', key)\n    }\n  }, [onClose])\n  return <div ref={box}>{children}</div>\n}\n\nexport function Act({ label, on, onClick, children, className = '' }: { label: string; on?: boolean; onClick: () => void; children: ReactNode; className?: string }) {\n  return (\n    <motion.button type=\"button\" whileTap={press} aria-label={label} aria-pressed={on} title={label} onClick={onClick} className={`ring-focus flex size-8 items-center justify-center rounded-full transition-colors ease-detent duration-150 hover:bg-surface-2 hover:text-ink ${on ? 'text-ink' : ''} ${className}`}>\n      {children}\n    </motion.button>\n  )\n}\n\nexport function Status({ tone, children, live }: { tone: 'ok' | 'warn' | 'danger' | 'ink' | 'ai'; children: ReactNode; live?: Tone }) {\n  const c = tone === 'ok' ? 'var(--ok)' : tone === 'warn' ? 'var(--warn-ink)' : tone === 'danger' ? 'var(--danger)' : 'var(--ink-2)'\n  const bg = tone === 'ok' ? 'var(--ok)' : tone === 'warn' ? 'var(--warn)' : tone === 'danger' ? 'var(--danger)' : 'var(--ink)'\n  return (\n    <span className={`chip inline-flex h-6 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full px-2 text-caption font-medium ${tone === 'ai' ? 'chip-plain' : ''}`} style={{ color: tone === 'ai' ? 'var(--ink-2)' : c, ['--chip' as string]: bg }}>\n      {tone === 'ai' ? <LiveDot tone={live ?? 'quiet'} /> : <span className=\"size-1.5 rounded-full\" style={{ background: bg }} />}\n      {children}\n    </span>\n  )\n}\n\nexport function useLatest<T>(v: T) {\n  const r = useRef(v)\n  useLayoutEffect(() => {\n    r.current = v\n  })\n  return r\n}\n\nexport const btn = {\n  primary: 'ring-focus inline-flex h-8 pointer-coarse:h-9 items-center justify-center gap-1.5 rounded-[7px] bg-ink px-3 text-footnote font-medium text-surface shadow-[inset_0_1px_0_rgb(255_255_255/0.14),0_1px_2px_rgb(0_0_0/0.18)] transition-opacity ease-detent hover:opacity-90 disabled:opacity-40',\n  secondary: 'lit ring-focus inline-flex h-8 pointer-coarse:h-9 items-center justify-center gap-1.5 rounded-[7px] bg-[color-mix(in_oklch,var(--ink)_5.5%,transparent)] px-3 text-footnote font-medium text-ink transition-colors ease-detent hover:bg-[color-mix(in_oklch,var(--ink)_9%,transparent)] disabled:text-ink-3',\n  ghost: 'ring-focus inline-flex h-8 pointer-coarse:h-9 items-center justify-center gap-1.5 rounded-[7px] px-2.5 text-footnote font-medium text-ink-2 transition-colors ease-detent hover:bg-surface-2 hover:text-ink',\n}\n\nexport const selectedRow = 'lit bg-[color-mix(in_oklch,var(--dt-accent)_11%,transparent)]'\nexport const selectedText = 'text-[var(--dt-accent-ink)]'\n"},{"path":"components/detent/blocks/kit/director.ts","target":"components/detent/blocks/kit/director.ts","type":"registry:block","content":"'use client'\n\nimport { createContext, useContext, useEffect, useLayoutEffect, useRef, useState } from 'react'\nimport type { PointerEvent } from 'react'\nimport { pressed } from '@/components/detent/lib/hand'\n\nexport const STOP = Symbol('stop')\nexport type Wait = (ms: number) => Promise<void>\n\nexport const InPlay = createContext(true)\n\nexport function useDirector(script: (wait: Wait, pass: number) => Promise<void>, autoplay = true, onTakeOver?: () => void) {\n  const play = useContext(InPlay)\n  const touched = useRef(!autoplay)\n  const latest = useRef(script)\n  useLayoutEffect(() => {\n    latest.current = script\n  })\n  const [begun, setBegun] = useState(play)\n  if (play && !begun) setBegun(true)\n  const gate = useRef(play)\n  const held = useRef<(() => void)[]>([])\n  useLayoutEffect(() => {\n    gate.current = play\n    if (!play) return\n    const resume = held.current\n    held.current = []\n    resume.forEach((go) => go())\n  }, [play])\n  useEffect(() => {\n    if (!autoplay || !begun) return\n    let on = true\n    const wait: Wait = (ms) =>\n      new Promise((r, x) => {\n        const go = () => (!on || touched.current ? x(STOP) : gate.current ? r() : held.current.push(go))\n        setTimeout(go, ms)\n      })\n    ;(async () => {\n      for (let pass = 0; ; pass++) await latest.current(wait, pass)\n    })().catch(() => {})\n    return () => {\n      on = false\n    }\n  }, [autoplay, begun])\n  const takeOver = () => {\n    if (!touched.current) onTakeOver?.()\n    touched.current = true\n  }\n  // Build the press handlers per event so takeOver is only handed over outside render.\n  const onPointerDownCapture = (e?: PointerEvent) => pressed(takeOver).onPointerDownCapture(e)\n  const onPointerUpCapture = (e?: PointerEvent) => pressed(takeOver).onPointerUpCapture(e)\n  return { onPointerDownCapture, onPointerUpCapture, onKeyDownCapture: takeOver, touched }\n}\n\nexport const sleeper = (ok: () => boolean) => (ms: number) => new Promise<void>((r, x) => setTimeout(() => (ok() ? r() : x(STOP)), ms))\n"},{"path":"components/detent/ui/Intelligence.tsx","target":"components/detent/ui/Intelligence.tsx","type":"registry:block","content":"'use client'\n\nimport { useLayoutEffect, useRef, useState } from 'react'\nimport { AnimatePresence, motion } from 'motion/react'\nimport type { MotionStyle } from 'motion/react'\nimport { ease } from '@/components/detent/lib/motion'\n\nexport type Tone = 'loud' | 'quiet'\n\nconst ended = new Map<string, number>()\n\nexport function useTone(on: boolean, surface: string, rest = 120_000): Tone {\n  const [tone, setTone] = useState<Tone>('loud')\n  const was = useRef(false)\n  useLayoutEffect(() => {\n    if (on && !was.current) {\n      const last = ended.get(surface)\n      setTone(last === undefined || performance.now() - last > rest ? 'loud' : 'quiet')\n    }\n    if (!on && was.current) ended.set(surface, performance.now())\n    was.current = on\n    return () => {\n      if (was.current) ended.set(surface, performance.now())\n    }\n  }, [on, surface, rest])\n  return tone\n}\n\nexport function Glow({\n  on,\n  layer,\n  radius,\n  style,\n  className = '',\n  tone = 'loud',\n}: {\n  on: boolean\n  layer: 'halo' | 'ring'\n  radius: number | string\n  style?: MotionStyle\n  className?: string\n  tone?: Tone\n}) {\n  return (\n    <AnimatePresence>\n      {on && !(layer === 'halo' && tone === 'quiet') && (\n        <motion.span\n          aria-hidden\n          className={`${layer === 'halo' ? 'ai-halo' : 'ai-ring'} ${tone === 'quiet' ? 'ai-quiet' : ''} ${className}`}\n          style={{ borderRadius: radius, ...style }}\n          initial={{ opacity: 0 }}\n          animate={{ opacity: 1, transition: { duration: 0.5, ease: ease.out } }}\n          exit={{ opacity: 0, transition: { duration: 0.9, ease: [0.4, 0, 0.2, 1] } }}\n        />\n      )}\n    </AnimatePresence>\n  )\n}\n\nconst INKS = ['var(--ai-ink-1)', 'var(--ai-ink-2)', 'var(--ai-ink-3)', 'var(--ai-ink-4)']\n\nexport const aiInk = (t: number) => {\n  const x = Math.min(0.9999, Math.max(0, t)) * (INKS.length - 1)\n  const k = Math.floor(x)\n  const f = Math.round((x - k) * 100)\n  return `color-mix(in oklch, ${INKS[k]} ${100 - f}%, ${INKS[k + 1]})`\n}\n\nexport const aiWord = (n: number) => INKS[n % INKS.length]\n\nexport const aiText = (tone: Tone) => (tone === 'loud' ? 'ai-text' : 'ai-text ai-quiet')\nexport const aiWords = (tone: Tone) => (tone === 'loud' ? 'word-in ai-warm' : 'word-in')\n"},{"path":"components/detent/ui/Hover.tsx","target":"components/detent/ui/Hover.tsx","type":"registry:block","content":"'use client'\n\nimport { useRef, useState } from 'react'\nimport type { ReactNode } from 'react'\nimport { motion } from 'motion/react'\nimport { ease } from '@/components/detent/lib/motion'\n\nexport function Hover({ children, className = '', radius = 7, as: Tag = 'div', label }: { children: ReactNode; className?: string; radius?: number; as?: 'div' | 'nav' | 'ul'; label?: string }) {\n  const box = useRef<HTMLElement>(null)\n  const [at, setAt] = useState<{ x: number; y: number; w: number; h: number; jump: boolean } | null>(null)\n  const move = (e: React.PointerEvent) => {\n    const el = box.current\n    const row = (e.target as HTMLElement).closest('[data-row]') as HTMLElement | null\n    if (!el || !row || !el.contains(row)) return\n    const b = el.getBoundingClientRect()\n    const r = row.getBoundingClientRect()\n    const s = b.width / (el.offsetWidth || b.width || 1)\n    const next = { x: (r.left - b.left) / s + el.scrollLeft, y: (r.top - b.top) / s + el.scrollTop, w: r.width / s, h: r.height / s }\n    setAt((a) => (a && a.x === next.x && a.y === next.y && a.w === next.w && a.h === next.h ? a : { ...next, jump: !a }))\n  }\n  const leave = () => setAt(null)\n  const instant = !at || at.jump\n  return (\n    <Tag ref={box as never} aria-label={label} className={`relative ${className}`} onPointerMove={move} onPointerLeave={leave}>\n      <motion.span\n        aria-hidden\n        className=\"pointer-events-none absolute left-0 top-0 bg-[color-mix(in_oklch,var(--ink)_5%,transparent)]\"\n        style={{ borderRadius: radius }}\n        initial={false}\n        animate={at ? { x: at.x, y: at.y, width: at.w, height: at.h, opacity: 1 } : { opacity: 0 }}\n        transition={instant ? { duration: 0, opacity: { duration: 0.12, ease: ease.out } } : { type: 'spring', stiffness: 620, damping: 46, opacity: { duration: 0.12, ease: ease.out } }}\n      />\n      {children}\n    </Tag>\n  )\n}\n"},{"path":"components/detent/lib/hand.ts","target":"components/detent/lib/hand.ts","type":"registry:block","content":"import type { PointerEvent, RefObject } from 'react'\n\nconst HOLD = 3000\nconst CONTROL = 'button,a,input,textarea,select,label,[role=\"button\"],[role=\"tab\"],[role=\"option\"],[role=\"slider\"],[role=\"switch\"],[contenteditable],[draggable]'\nconst timers = new WeakMap<object, ReturnType<typeof setTimeout>>()\nlet downAt: [number, number] | null = null\n\nexport const hover = (held: RefObject<boolean>) => ({\n  onPointerEnter: (e: PointerEvent) => {\n    if (e.pointerType === 'touch') return\n    held.current = true\n    clearTimeout(timers.get(held))\n    timers.set(held, setTimeout(() => (held.current = false), HOLD))\n  },\n  onPointerLeave: () => {\n    clearTimeout(timers.get(held))\n    held.current = false\n  },\n})\n\nexport const pressed = (take: () => void) => ({\n  onPointerDownCapture: (e?: PointerEvent) => {\n    if (e?.pointerType === 'touch') downAt = [e.clientX, e.clientY]\n    else take()\n  },\n  onPointerUpCapture: (e?: PointerEvent) => {\n    if (e?.pointerType !== 'touch' || !downAt) return\n    const moved = Math.hypot(e.clientX - downAt[0], e.clientY - downAt[1]) > 10\n    downAt = null\n    if (moved || (e.target as Element).closest?.(CONTROL)) take()\n  },\n})\n"}],"docs":"Usage, props and when to use it: https://detentui.com/blocks/cta.md . Wrap your root layout once in <MotionConfig reducedMotion=\"user\"> from motion/react so the motion respects reduced-motion settings.","meta":{"tier":"free","docs":"https://detentui.com/blocks/cta.md"}}