{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "review-12",
  "title": "Agent question",
  "description": "The agent stops to ask with the reason why, choices you pick with the number keys or answer in your own words, and the card folds into one line that says what you answered, with Change.",
  "dependencies": [
    "motion"
  ],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/agent-run.json",
    "https://ui.ndekocode.dev/r/animated-size.json",
    "https://ui.ndekocode.dev/r/button.json",
    "https://ui.ndekocode.dev/r/demonstration.json",
    "https://ui.ndekocode.dev/r/drawn-check.json",
    "https://ui.ndekocode.dev/r/icons.json",
    "https://ui.ndekocode.dev/r/kbd.json",
    "https://ui.ndekocode.dev/r/live-region.json",
    "https://ui.ndekocode.dev/r/mesh-tile.json",
    "https://ui.ndekocode.dev/r/motion-presets.json",
    "https://ui.ndekocode.dev/r/theme.json",
    "https://ui.ndekocode.dev/r/use-autoplay.json",
    "https://ui.ndekocode.dev/r/use-kept-height.json",
    "https://ui.ndekocode.dev/r/use-prefers-reduced-motion.json",
    "https://ui.ndekocode.dev/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/ndeko/components/review/review-12.tsx",
      "content": "'use client';\n\nimport { AnimatePresence, motion } from 'motion/react';\nimport { useId, useImperativeHandle, useRef, useState } from 'react';\n\nimport {\n  typingSteps,\n  useAutoplay,\n  type AutoplayStep,\n} from '@/registry/ndeko/hooks/use-autoplay';\nimport { useKeptHeight } from '@/registry/ndeko/hooks/use-kept-height';\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { seriesColorOf, type RunAgent } from '@/registry/ndeko/lib/agent-run';\nimport {\n  hold,\n  PRESS_LEAD_MS,\n  pressedSolidOf,\n  spokenUnless,\n  usePress,\n} from '@/registry/ndeko/lib/demonstration';\nimport {\n  PencilIcon,\n  RotateCcwIcon,\n  TriangleAlertIcon,\n} from '@/registry/ndeko/lib/icons';\nimport { fadePresence } from '@/registry/ndeko/lib/motion-presets';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { AnimatedSize } from '@/registry/ndeko/ui/animated-size';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { DrawnCheck } from '@/registry/ndeko/ui/drawn-check';\nimport { Kbd } from '@/registry/ndeko/ui/kbd';\nimport { LiveRegion } from '@/registry/ndeko/ui/live-region';\nimport { MeshTile } from '@/registry/ndeko/ui/mesh-tile';\n\nimport { SettledLine } from './_parts/settled-line';\nimport { useFocusHandOff } from './_parts/use-focus-hand-off';\n\nexport type QuestionChoice = {\n  id: string;\n  title: string;\n  description: string;\n};\n\nexport type QuestionAnswer = {\n  choiceIds: string[];\n  other: string;\n};\n\n/** The control a demonstration holds down: Send answer, Change, or a choice by its id. */\nexport type AgentQuestionPress = 'submit' | 'reopen' | `choice-${string}`;\n\nexport type AgentQuestionHandle = {\n  pick: (choiceId: string) => void;\n  submit: () => void;\n  reopen: () => void;\n};\n\nconst DIGIT_KEY = /^[1-9]$/;\n\nconst ROW = [\n  'group/row hairline-ring ring-foreground/10 relative flex cursor-pointer gap-3 rounded-lg p-2.5',\n  'transition-[background-color,box-shadow,scale] duration-150 ease-(--ease-out-strong)',\n  'hover:bg-foreground/[0.03] has-[:checked]:bg-primary/[0.06] has-[:checked]:ring-primary/40',\n  'has-[:focus-visible]:ring-[3px] has-[:focus-visible]:ring-ring/25',\n].join(' ');\n\nconst MARK =\n  'hairline-ring ring-foreground/25 bg-card text-primary-foreground flex size-4 shrink-0 items-center justify-center transition-[background-color,box-shadow] duration-150 group-has-[:checked]/row:bg-primary group-has-[:checked]/row:ring-primary';\n\nconst ROW_PRESSED = 'scale-[0.985] bg-foreground/[0.06]';\n\nfunction rowPressedOf(isPressed: boolean) {\n  if (isPressed) {\n    return ROW_PRESSED;\n  }\n  return undefined;\n}\n\nfunction isTextField(target: EventTarget) {\n  if (!(target instanceof HTMLElement)) {\n    return false;\n  }\n  return target.matches('input[type=\"text\"], textarea');\n}\n\nfunction isButtonTarget(target: EventTarget) {\n  if (!(target instanceof HTMLElement)) {\n    return false;\n  }\n  return target.closest('button') !== null;\n}\n\nfunction toggled(ids: string[], id: string) {\n  if (ids.includes(id)) {\n    return ids.filter((entry) => entry !== id);\n  }\n  return [...ids, id];\n}\n\nfunction activeIdsOf(ids: string[], other: string, isMultiple: boolean) {\n  const hasOther = other.trim() !== '';\n  const hidesChoices = hasOther && !isMultiple;\n  if (hidesChoices) {\n    return [];\n  }\n  return ids;\n}\n\nfunction titleOf(choices: QuestionChoice[], id: string) {\n  const choice = choices.find((entry) => entry.id === id);\n  return choice?.title ?? id;\n}\n\nfunction answerTextOf(answer: QuestionAnswer, choices: QuestionChoice[]) {\n  const parts = answer.choiceIds.map((id) => titleOf(choices, id));\n  if (answer.other !== '') {\n    parts.push(`“${answer.other}”`);\n  }\n  return parts.join(', ');\n}\n\nfunction inputTypeOf(isMultiple: boolean) {\n  if (isMultiple) {\n    return 'checkbox';\n  }\n  return 'radio';\n}\n\nfunction handOffOf(isStop: boolean) {\n  if (isStop) {\n    return '';\n  }\n  return undefined;\n}\n\nfunction phaseOf(answer: QuestionAnswer | null) {\n  if (answer) {\n    return 'answered';\n  }\n  return 'asking';\n}\n\nfunction shakeOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return { x: 0 };\n  }\n  return { x: [0, -4, 4, -2, 0] };\n}\n\nfunction keysHintOf(count: number, isMultiple: boolean) {\n  const range = rangeOf(count);\n  if (isMultiple) {\n    return `${range} tick or untick`;\n  }\n  return `${range} pick`;\n}\n\nfunction rangeOf(count: number) {\n  if (count === 1) {\n    return '1';\n  }\n  return `1 to ${count}`;\n}\n\nfunction CheckBoxMark() {\n  return (\n    <span aria-hidden='true' className={cn(MARK, 'mt-0.5 rounded-[5px]')}>\n      <svg viewBox='0 0 12 12' className='size-3'>\n        <path\n          d='M2.6 6.4 4.9 8.7 9.5 3.6'\n          pathLength={1}\n          fill='none'\n          stroke='currentColor'\n          strokeWidth='1.9'\n          strokeLinecap='round'\n          strokeLinejoin='round'\n          className='transition-[stroke-dashoffset] duration-200 [stroke-dasharray:1] [stroke-dashoffset:1] group-has-[:checked]/row:[stroke-dashoffset:0]'\n        />\n      </svg>\n    </span>\n  );\n}\n\nfunction RadioMark() {\n  return (\n    <span aria-hidden='true' className={cn(MARK, 'mt-0.5 rounded-full')}>\n      <span className='block size-1.5 scale-0 rounded-full bg-current transition-transform duration-150 ease-(--ease-out-strong) group-has-[:checked]/row:scale-100' />\n    </span>\n  );\n}\n\ntype ChoiceRowProps = {\n  choice: QuestionChoice;\n  number: number;\n  name: string;\n  isMultiple: boolean;\n  isChecked: boolean;\n  isHandOffStop: boolean;\n  isPressed: boolean;\n  onPick: (choiceId: string) => void;\n};\n\nfunction ChoiceRow({\n  choice,\n  number,\n  name,\n  isMultiple,\n  isChecked,\n  isHandOffStop,\n  isPressed,\n  onPick,\n}: ChoiceRowProps) {\n  const inputType = inputTypeOf(isMultiple);\n  const handOff = handOffOf(isHandOffStop);\n\n  return (\n    <label className={cn(ROW, rowPressedOf(isPressed))}>\n      <input\n        type={inputType}\n        name={name}\n        checked={isChecked}\n        data-hand-off={handOff}\n        onChange={() => onPick(choice.id)}\n        className='sr-only'\n      />\n      {isMultiple && <CheckBoxMark />}\n      {!isMultiple && <RadioMark />}\n      <span className='flex min-w-0 flex-1 flex-col'>\n        <span className='text-[13px] font-medium'>{choice.title}</span>\n        <span className='text-muted-foreground text-xs leading-5'>\n          {choice.description}\n        </span>\n      </span>\n      <Kbd aria-hidden='true' className='hidden @sm:inline-flex'>\n        {number}\n      </Kbd>\n    </label>\n  );\n}\n\nfunction otherToneOf(isChosen: boolean) {\n  if (isChosen) {\n    return 'bg-primary/[0.06] ring-primary/40';\n  }\n  return undefined;\n}\n\nfunction otherMarkToneOf(isChosen: boolean) {\n  if (isChosen) {\n    return 'bg-primary ring-primary';\n  }\n  return undefined;\n}\n\ntype OtherRowProps = {\n  value: string;\n  placeholder: string;\n  isChosen: boolean;\n  onChange: (text: string) => void;\n};\n\nfunction OtherRow({ value, placeholder, isChosen, onChange }: OtherRowProps) {\n  function changeText(event: React.ChangeEvent<HTMLInputElement>) {\n    onChange(event.target.value);\n  }\n\n  return (\n    <label className={cn(ROW, 'items-center', otherToneOf(isChosen))}>\n      <span\n        aria-hidden='true'\n        className={cn(MARK, 'rounded-full', otherMarkToneOf(isChosen))}\n      >\n        <PencilIcon className='size-2.5' />\n      </span>\n      <input\n        type='text'\n        value={value}\n        placeholder={placeholder}\n        autoComplete='off'\n        onChange={changeText}\n        className='placeholder:text-muted-foreground/75 min-w-0 flex-1 bg-transparent text-base outline-none md:text-[13px]'\n      />\n    </label>\n  );\n}\n\ntype KeysHintProps = {\n  text: string;\n  nudges: number;\n  isMissing: boolean;\n};\n\nfunction KeysHint({ text, nudges, isMissing }: KeysHintProps) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const shake = shakeOf(shouldReduceMotion);\n\n  if (!isMissing) {\n    return (\n      <p className='text-muted-foreground flex items-center gap-1 text-xs'>\n        {text}, <Kbd>Enter</Kbd> sends\n      </p>\n    );\n  }\n  return (\n    <motion.p\n      key={nudges}\n      animate={shake}\n      transition={{ duration: 0.24 }}\n      className='text-warning-foreground flex items-center gap-1.5 text-xs'\n    >\n      <TriangleAlertIcon className='size-3.5' />\n      Pick an answer or write your own first\n    </motion.p>\n  );\n}\n\nexport type AgentQuestionProps = {\n  agent: Pick<RunAgent, 'name' | 'series'>;\n  question: string;\n  /** One line on why the agent asks before it goes on. */\n  reason: string;\n  choices: QuestionChoice[];\n  /** Several choices can be ticked together. One is picked by default. */\n  isMultiple?: boolean;\n  /** What a person wrote as another answer. */\n  other: string;\n  onOtherChange: (text: string) => void;\n  otherPlaceholder?: string;\n  /** Choices ticked when the card first shows. */\n  defaultChoiceIds?: string[];\n  onAnswer?: (answer: QuestionAnswer) => void;\n  onReopen?: () => void;\n  /** Putting the card back to its first state: change this number. */\n  resetToken?: number;\n  /** Picks and sends from outside, for a demonstration or a shortcut of the page. */\n  handleRef?: React.Ref<AgentQuestionHandle>;\n  pressed?: AgentQuestionPress | null;\n  /** A demonstration is not read aloud. */\n  isDemonstrating?: boolean;\n  className?: string;\n};\n\nconst NO_CHOICES: string[] = [];\n\nexport function AgentQuestion({\n  agent,\n  question,\n  reason,\n  choices,\n  isMultiple = false,\n  other,\n  onOtherChange,\n  otherPlaceholder = 'Something else',\n  defaultChoiceIds = NO_CHOICES,\n  onAnswer,\n  onReopen,\n  resetToken = 0,\n  handleRef,\n  pressed = null,\n  isDemonstrating = false,\n  className,\n}: AgentQuestionProps) {\n  const [choiceIds, setChoiceIds] = useState(defaultChoiceIds);\n  const [answer, setAnswer] = useState<QuestionAnswer | null>(null);\n  const [nudges, setNudges] = useState(0);\n  const [notice, setNotice] = useState('');\n  const [seenToken, setSeenToken] = useState(resetToken);\n  const groupName = useId();\n  const titleId = useId();\n  const fade = fadePresence();\n  const phase = phaseOf(answer);\n  const { rootRef, markIfFocusInside } = useFocusHandOff(phase);\n  const activeIds = activeIdsOf(choiceIds, other, isMultiple);\n  const trimmedOther = other.trim();\n  const hasOther = trimmedOther !== '';\n  const hasAnswer = activeIds.length > 0 || hasOther;\n  const isMissing = nudges > 0 && !hasAnswer;\n  const stopId = activeIds[0] ?? choices[0]?.id;\n  const keysHint = keysHintOf(Math.min(choices.length, 9), isMultiple);\n\n  if (seenToken !== resetToken) {\n    setSeenToken(resetToken);\n    setChoiceIds(defaultChoiceIds);\n    setAnswer(null);\n    setNudges(0);\n  }\n\n  function pick(choiceId: string) {\n    if (isMultiple) {\n      setChoiceIds((current) => toggled(current, choiceId));\n      return;\n    }\n    setChoiceIds([choiceId]);\n    if (other !== '') {\n      onOtherChange('');\n    }\n  }\n\n  function submit() {\n    if (!hasAnswer) {\n      setNudges((current) => current + 1);\n      setNotice('Pick an answer or write your own first');\n      return;\n    }\n    markIfFocusInside();\n    const next = { choiceIds: activeIds, other: trimmedOther };\n    setAnswer(next);\n    setNudges(0);\n    setNotice(`You answered: ${answerTextOf(next, choices)}`);\n    onAnswer?.(next);\n  }\n\n  function reopen() {\n    markIfFocusInside();\n    setAnswer(null);\n    setNotice('The question is open again');\n    onReopen?.();\n  }\n\n  useImperativeHandle(handleRef, () => ({ pick, submit, reopen }));\n\n  function handleKeys(event: React.KeyboardEvent<HTMLDivElement>) {\n    const isComposing = event.nativeEvent.isComposing;\n    const hasModifier = event.metaKey || event.ctrlKey || event.altKey;\n    const isBlocked = isComposing || hasModifier;\n    if (isBlocked) {\n      return;\n    }\n    const isDigit = DIGIT_KEY.test(event.key);\n    const canPickByNumber = isDigit && !isTextField(event.target);\n    if (canPickByNumber) {\n      const choice = choices[Number(event.key) - 1];\n      if (choice) {\n        event.preventDefault();\n        pick(choice.id);\n      }\n      return;\n    }\n    const isEnter = event.key === 'Enter';\n    if (isEnter && !isButtonTarget(event.target)) {\n      event.preventDefault();\n      submit();\n    }\n  }\n\n  return (\n    <div\n      ref={rootRef}\n      className={cn(\n        'surface-raised @container overflow-hidden rounded-xl',\n        className\n      )}\n    >\n      <AnimatedSize>\n        <AnimatePresence initial={false} mode='popLayout'>\n          <motion.div key={phase} {...fade}>\n            {answer && (\n              <SettledLine\n                icon={<DrawnCheck tone='success' entrance='draw' />}\n                actionLabel='Change'\n                actionIcon={<RotateCcwIcon />}\n                onAction={reopen}\n                isActionPressed={pressed === 'reopen'}\n              >\n                <span className='text-muted-foreground'>You answered: </span>\n                <span className='font-medium'>\n                  {answerTextOf(answer, choices)}\n                </span>\n              </SettledLine>\n            )}\n            {!answer && (\n              <div\n                role='group'\n                aria-labelledby={titleId}\n                onKeyDown={handleKeys}\n                className='flex flex-col gap-3 p-4'\n              >\n                <div className='text-muted-foreground flex items-center gap-2 text-xs'>\n                  <MeshTile\n                    seed={agent.name}\n                    color={seriesColorOf(agent.series)}\n                  />\n                  <span>\n                    <span className='text-foreground font-medium'>\n                      {agent.name}\n                    </span>{' '}\n                    needs an answer before it goes on\n                  </span>\n                </div>\n                <div className='flex flex-col gap-1'>\n                  <p id={titleId} className='text-sm font-medium text-balance'>\n                    {question}\n                  </p>\n                  <p className='text-muted-foreground text-xs leading-5'>\n                    <span className='text-foreground font-medium'>\n                      Why it asks{' '}\n                    </span>\n                    {reason}\n                  </p>\n                </div>\n                <fieldset className='flex min-w-0 flex-col gap-1.5'>\n                  <legend className='sr-only'>{question}</legend>\n                  {choices.map((choice, index) => (\n                    <ChoiceRow\n                      key={choice.id}\n                      choice={choice}\n                      number={index + 1}\n                      name={groupName}\n                      isMultiple={isMultiple}\n                      isChecked={activeIds.includes(choice.id)}\n                      isHandOffStop={choice.id === stopId}\n                      isPressed={pressed === `choice-${choice.id}`}\n                      onPick={pick}\n                    />\n                  ))}\n                  <OtherRow\n                    value={other}\n                    placeholder={otherPlaceholder}\n                    isChosen={hasOther}\n                    onChange={onOtherChange}\n                  />\n                </fieldset>\n                <div className='flex flex-wrap items-center gap-x-3 gap-y-2'>\n                  <Button\n                    type='button'\n                    size='sm'\n                    onClick={submit}\n                    className={pressedSolidOf(pressed === 'submit')}\n                  >\n                    Send answer\n                  </Button>\n                  <KeysHint\n                    text={keysHint}\n                    nudges={nudges}\n                    isMissing={isMissing}\n                  />\n                </div>\n              </div>\n            )}\n          </motion.div>\n        </AnimatePresence>\n      </AnimatedSize>\n      <LiveRegion message={spokenUnless(isDemonstrating, notice)} />\n    </div>\n  );\n}\n\nconst PLANNER: Pick<RunAgent, 'name' | 'series'> = {\n  name: 'Planner',\n  series: 1,\n};\n\nconst CHOICES: QuestionChoice[] = [\n  {\n    id: 'production',\n    title: 'Run it in production',\n    description: 'Applies the change to the live orders table in one go',\n  },\n  {\n    id: 'staging',\n    title: 'Staging first',\n    description: 'Runs on the copy, compares row counts, then asks you again',\n  },\n  {\n    id: 'night',\n    title: 'Wait for the quiet window',\n    description: 'Schedules it for 02:00, when the shop is least busy',\n  },\n];\n\nconst RESTING_CHOICES = ['staging'];\n\nconst OTHER_ANSWER = 'Staging, orders table only';\n\nfunction restingChoicesOf(isResting: boolean) {\n  if (isResting) {\n    return RESTING_CHOICES;\n  }\n  return NO_CHOICES;\n}\n\nfunction QuestionDemo({ isResting }: { isResting: boolean }) {\n  const [other, setOther] = useState('');\n  const [round, setRound] = useState(0);\n  const card = useRef<AgentQuestionHandle>(null);\n  const { pressed, press } = usePress<AgentQuestionPress>();\n\n  function resetDemo() {\n    setOther('');\n    setRound((current) => current + 1);\n  }\n\n  const steps: AutoplayStep[] = [\n    { after: 1500, run: () => press('choice-staging') },\n    { after: PRESS_LEAD_MS, run: () => card.current?.pick('staging') },\n    { after: 1100, run: () => press('submit') },\n    { after: PRESS_LEAD_MS, run: () => card.current?.submit() },\n    { after: 2200, run: () => press('reopen') },\n    { after: PRESS_LEAD_MS, run: () => card.current?.reopen() },\n    ...typingSteps(OTHER_ANSWER, setOther, {\n      startAfter: 1100,\n      characterMs: 45,\n    }),\n    { after: 900, run: () => press('submit') },\n    { after: PRESS_LEAD_MS, run: () => card.current?.submit() },\n    { after: 2400, run: hold },\n  ];\n  const { ref, isAutoplaying } = useAutoplay(steps, {\n    loopAfter: 2200,\n    onReset: resetDemo,\n  });\n\n  useKeptHeight(ref);\n\n  return (\n    <div ref={ref} className='flex min-h-[26rem] w-full max-w-[28rem] flex-col'>\n      <AgentQuestion\n        agent={PLANNER}\n        question='Where should the orders migration run first?'\n        reason='It cannot be rolled back once it reaches production'\n        choices={CHOICES}\n        other={other}\n        onOtherChange={setOther}\n        defaultChoiceIds={restingChoicesOf(isResting)}\n        resetToken={round}\n        handleRef={card}\n        pressed={pressed}\n        isDemonstrating={isAutoplaying}\n      />\n    </div>\n  );\n}\n\nexport default function Review12() {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const restKey = String(shouldReduceMotion);\n\n  return <QuestionDemo key={restKey} isResting={shouldReduceMotion} />;\n}\n",
      "type": "registry:component",
      "target": "components/review/review-12.tsx"
    },
    {
      "path": "registry/ndeko/components/review/_parts/settled-line.tsx",
      "content": "'use client';\n\nimport { pressedQuietOf } from '@/registry/ndeko/lib/demonstration';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { Button } from '@/registry/ndeko/ui/button';\n\ntype SettledLineProps = {\n  icon: React.ReactNode;\n  actionLabel: string;\n  actionIcon?: React.ReactNode;\n  onAction: () => void;\n  /** Shows the action held down, for a demonstration that presses it. */\n  isActionPressed?: boolean;\n  children: React.ReactNode;\n  className?: string;\n};\n\n/** What a card becomes once it is settled: one line that says what happened, and the way back. */\nexport function SettledLine({\n  icon,\n  actionLabel,\n  actionIcon,\n  onAction,\n  isActionPressed = false,\n  children,\n  className,\n}: SettledLineProps) {\n  return (\n    <div\n      className={cn(\n        'flex items-start gap-2.5 py-2.5 ps-3.5 pe-2.5 text-[13px]',\n        className\n      )}\n    >\n      <span className='mt-1 flex shrink-0 items-center'>{icon}</span>\n      <p className='min-w-0 flex-1 py-1 leading-5'>{children}</p>\n      <Button\n        type='button'\n        variant='ghost'\n        size='sm'\n        data-hand-off=''\n        onClick={onAction}\n        className={cn(\n          'text-muted-foreground shrink-0',\n          pressedQuietOf(isActionPressed)\n        )}\n      >\n        {actionIcon}\n        {actionLabel}\n      </Button>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/review/_parts/settled-line.tsx"
    },
    {
      "path": "registry/ndeko/components/review/_parts/use-focus-hand-off.ts",
      "content": "'use client';\n\nimport { useCallback, useEffect, useRef } from 'react';\n\n/**\n * When a card turns into another view, the control a person just used is gone and focus would fall\n * to the page. If focus was inside the card, it goes to the last element marked `data-hand-off`\n * once the new view is in place; a demonstration never had focus there, so it never moves it.\n */\nexport function useFocusHandOff(phase: string) {\n  const rootRef = useRef<HTMLDivElement>(null);\n  const isPending = useRef(false);\n\n  const markIfFocusInside = useCallback(() => {\n    const root = rootRef.current;\n    if (!root) {\n      return;\n    }\n    isPending.current = root.contains(document.activeElement);\n  }, []);\n\n  useEffect(() => {\n    if (!isPending.current) {\n      return;\n    }\n    isPending.current = false;\n    const root = rootRef.current;\n    if (!root) {\n      return;\n    }\n    const targets = root.querySelectorAll<HTMLElement>('[data-hand-off]');\n    const target = targets[targets.length - 1];\n    target?.focus();\n  }, [phase]);\n\n  return { rootRef, markIfFocusInside };\n}\n",
      "type": "registry:component",
      "target": "components/review/_parts/use-focus-hand-off.ts"
    }
  ],
  "categories": [
    "components",
    "review"
  ],
  "type": "registry:component"
}