{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "chat-composer",
  "type": "registry:ui",
  "title": "Chat Composer",
  "description": "The chat-composer primitive.",
  "dependencies": [
    "lucide-react@^1.49.0"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/menu.json",
    "https://ui.klarhimmel.com/r/theme.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/ui/chat-composer.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/ui/chat-composer.tsx",
      "content": "// ChatComposer: the one chat input every Klarhimmel app uses (Felix 2026-10-22 18:37 on the /ws assistant: \"make the chat input\n// smaller and use the prefered design\"; 18:48 the reference: Gemini's pill, + left, model picker and mic right, fully rounded).\n// Also measured, one capture pass 18:4x: ChatGPT (one 52 px pill row, two rows once the text wraps), Lovable (text over a tool row).\n// - One pill row: + | text | tools | send. Send keeps its place but shows only once there is text (or while answering).\n// - Two rows (text over + , tools, send; a 28 px corner) when the text wraps, with chips, or with tools in a narrow box (< 28rem).\n//   It stays two rows until the text is cleared, so it never flips back and forth while typing.\n// - Grows with the text up to maxRows, then scrolls. No resize handle, no hint text under it.\n// - Enter sends, Shift+Enter adds a line, a keystroke inside an IME composition is left alone.\n// - Right side: the app's tools, a model picker (model), a mic for dictation (dictation) where send will be; send shows with text.\n// - While the answer streams (busy) send becomes a quiet stop square (Felix 18:49, Gemini loading). Near maxLength a count shows; over it, send waits.\n// Product logic (queueing while busy, pasted text as chips, drafts) stays in the app: it passes chips and tools in.\nimport { useEffect, useId, useLayoutEffect, useRef, useState, type ClipboardEvent, type ReactNode, type Ref } from 'react';\nimport { ArrowUp, ChevronDown, ChevronUp, Mic, Plus, Square, X } from 'lucide-react';\nimport { cn } from '../lib/utils';\nimport { Menu, MenuContent, MenuItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuTrigger } from './menu';\n\n/** One line in the + menu: an action, or a submenu (items). Files picks files through the composer's own file input. */\n/** The model picker on the right: the current model's short name, a menu of models, and an optional thinking level. */\nexport interface ComposerModel {\n  value: string;\n  onChange: (value: string) => void;\n  options: { value: string; label: string; short?: string; description?: string; tag?: string }[];\n  thinking?: { label?: string; value: string; onChange: (value: string) => void; options: { value: string; label: string }[] };\n}\n/** `keepFocus`: the item moves focus elsewhere (an editor, a frame): `onSelect` runs once the menu has closed, and focus is not returned to the +. */\nexport type ComposerMenuItem = { label: string; icon?: ReactNode; onSelect?: () => void; files?: boolean; items?: ComposerMenuItem[]; disabled?: boolean; keepFocus?: boolean };\n\nconst useIsoLayoutEffect = typeof window === 'undefined' ? useEffect : useLayoutEffect;\n\nexport interface ChatComposerLabels { send: string; stop: string; working: string; attach: string; more: string; model: string; thinking: string; dictate: string; stopDictating: string; count: (n: number, max: number) => string }\nconst EN: ChatComposerLabels = { send: 'Send', stop: 'Stop', working: 'Working', attach: 'Add files', more: 'Add files and more', model: 'Model', thinking: 'Thinking level', dictate: 'Dictate', stopDictating: 'Stop dictating', count: (n, max) => `${n} of ${max}` };\n\nexport interface ChatComposerProps {\n  /** Required: names the text box (not shown). */\n  label: string;\n  value: string;\n  onChange: (value: string) => void;\n  /** Enter or the send button, with text that may be sent. The app clears `value`. */\n  onSend: (text: string) => void;\n  placeholder?: string;\n  /** An answer is streaming: send becomes stop (or a quiet Working without onStop). Typing goes on. */\n  busy?: boolean;\n  onStop?: () => void;\n  disabled?: boolean;\n  /** Shows a count from 90 % of it; over it, send waits. */\n  maxLength?: number;\n  /** Rows it grows to before it scrolls. */\n  maxRows?: number;\n  /** Shows + at the start (a real file input). The app shows what was picked as chips. */\n  attach?: { onFiles: (files: File[]) => void; accept?: string; multiple?: boolean };\n  /** With it, + opens a menu above the box (+ turns into X while open): groups of the app's own items, a line between groups,\n   *  submenus with a chevron. An item with `files: true` opens the file picker (needs attach). Without it, + opens the picker. */\n  menu?: ComposerMenuItem[][];\n  /** The model, shown and changed on the right (Felix 18:53). Models and levels come from the app. */\n  model?: ComposerModel;\n  /** A mic for dictation (the browser's speech recognition writes into the box; no audio is kept). Hidden where the browser has none.\n   *  `lang` is a BCP 47 tag (\"sv-SE\"); default: the page's language. */\n  dictation?: boolean | { lang?: string };\n  /** Above the text, inside the box: attachments, what is open beside the chat, a long paste (ComposerChip). */\n  chips?: ReactNode;\n  /** Send works with no typed text, because the app has something else to send (an attachment picked as a chip; Klar Agent KA-155).\n   *  The app decides: a chip that only says what is open beside the chat is not a message. */\n  canSendEmpty?: boolean;\n  /** Before send: a model picker, a mode toggle, a mic (ComposerTool). In the pill's row; below the text in a narrow box. */\n  tools?: ReactNode;\n  autoFocus?: boolean;\n  inputRef?: Ref<HTMLTextAreaElement>;\n  onPaste?: (e: ClipboardEvent<HTMLTextAreaElement>) => void;\n  /** One small line under the box: a disclaimer (\"Answers can be wrong.\"), a privacy link. */\n  note?: ReactNode;\n  labels?: Partial<ChatComposerLabels>;\n  className?: string;\n}\n\nconst iconBtn = 'inline-flex size-10 shrink-0 items-center justify-center rounded-kh-pill transition-[background-color,color,opacity] duration-(--kh-dur) pointer-coarse:size-11 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--kh-focus)';\n\n// The grid's two layouts, written out so the class names are static. Row: + | text | tools | send. Stacked: text, then + … tools send (model and mic stay right, Felix 18:53).\nconst ROW = { grid: 'rounded-kh-pill', attach: 'col-start-1 row-start-1', text: 'col-start-2 row-start-1 col-span-1 self-center px-1.5', tools: 'col-start-3 row-start-1', send: 'col-start-4 row-start-1' };\nconst STACK = { grid: 'rounded-[1.75rem]', attach: 'col-start-1 row-start-2', text: 'col-start-1 row-start-1 col-span-4 px-2.5 pt-1.5', tools: 'col-start-3 row-start-2', send: 'col-start-4 row-start-2' };\n// Tools in a narrow box: stacked below 28rem, one row from there.\nconst NARROW = {\n  grid: 'rounded-[1.75rem] @md:rounded-kh-pill',\n  attach: 'col-start-1 row-start-2 @md:row-start-1',\n  text: 'col-start-1 row-start-1 col-span-4 px-2.5 pt-1.5 @md:col-start-2 @md:col-span-1 @md:self-center @md:px-1.5 @md:pt-0',\n  tools: 'col-start-3 row-start-2 @md:row-start-1',\n  send: 'col-start-4 row-start-2 @md:row-start-1',\n};\n\n/** A chat input: one pill row that grows into two, + and tools inside, send and stop at the end. */\nexport function ChatComposer({ label, value, onChange, onSend, placeholder, busy, onStop, disabled, maxLength, maxRows = 8, attach, chips, canSendEmpty, tools, autoFocus, inputRef, onPaste, note, menu, model, dictation, labels, className }: ChatComposerProps) {\n  const w = { ...EN, ...labels };\n  const id = useId();\n  const ta = useRef<HTMLTextAreaElement | null>(null);\n  const file = useRef<HTMLInputElement>(null);\n  const [wrapped, setWrapped] = useState(false);\n  const [menuOpen, setMenuOpen] = useState(false);\n  const away = useRef(false);\n  const [composing, setComposing] = useState(false);\n  const speech = useDictation(dictation, value, onChange);\n  const setRef = (el: HTMLTextAreaElement | null) => {\n    ta.current = el;\n    if (typeof inputRef === 'function') inputRef(el);\n    else if (inputRef) inputRef.current = el;\n  };\n  const length = value.length;\n  const over = !!maxLength && length > maxLength;\n  const near = !!maxLength && length >= maxLength * 0.9;\n  const typed = value.trim() !== '';\n  const ready = typed || !!canSendEmpty;\n  const canSend = !disabled && !busy && !over && ready;\n  const stacked = wrapped || !!chips;\n  const L = stacked ? STACK : tools || model ? NARROW : ROW;\n\n  // Grow with the text up to maxRows; once it wraps in the row, stacked until it is cleared. Not measured while it is not rendered\n  // (inside a display:none tab, scrollHeight is 0 and a 0px height stayed after the tab showed: nothing could be typed, Klar Agent\n  // 10-23 at 390); a width change, including becoming visible, measures again.\n  const fit = useRef<() => void>(() => {});\n  fit.current = () => {\n    const el = ta.current;\n    if (!el) return;\n    if (!value) setWrapped(false);\n    if (el.getClientRects().length === 0) { el.style.height = ''; return; }\n    el.style.height = 'auto';\n    const line = parseFloat(getComputedStyle(el).lineHeight) || 24;\n    const max = line * maxRows;\n    el.style.height = `${Math.min(el.scrollHeight, max)}px`;\n    el.style.overflowY = el.scrollHeight > max ? 'auto' : 'hidden';\n    if (el.scrollHeight <= max) el.scrollTop = 0; // a scroll left from the moment it outgrew one row would clip the first line\n    if (value && !stacked && el.scrollHeight > line * 1.5) setWrapped(true);\n  };\n  useIsoLayoutEffect(() => fit.current(), [value, stacked, maxRows]);\n  useEffect(() => {\n    const el = ta.current;\n    if (!el || typeof ResizeObserver === 'undefined') return;\n    let width = -1;\n    const ro = new ResizeObserver(([e]) => {\n      const w = Math.round(e?.contentRect.width ?? 0);\n      if (w !== width) { width = w; fit.current(); }\n    });\n    ro.observe(el);\n    return () => ro.disconnect();\n  }, []);\n\n  const send = () => { if (canSend) { speech.stop(); onSend(value); } ta.current?.focus(); };\n  const hasTools = !!tools || !!model;\n\n  return (\n    <div className={cn('@container min-w-0', className)}>\n      <form\n        onSubmit={(e) => { e.preventDefault(); send(); }}\n        className={cn(\n          'grid min-w-0 grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-x-1 gap-y-1 border bg-kh-surface p-2 shadow-kh-2 transition-[border-color] duration-(--kh-dur)',\n          over ? 'border-kh-danger' : 'border-kh-line hover:border-kh-line-strong focus-within:border-kh-line-strong',\n          // The field's focus ring sits on the shell, as InputGroup's does: the textarea itself draws none (KA-113).\n          'has-[textarea:focus-visible]:outline-2 has-[textarea:focus-visible]:outline-offset-2 has-[textarea:focus-visible]:outline-(--kh-focus)',\n          disabled && 'bg-kh-surface-2 opacity-70',\n          L.grid,\n        )}\n      >\n        {chips && <div className=\"col-span-4 row-start-1 flex flex-wrap gap-1.5 px-1 pt-0.5\">{chips}</div>}\n        {attach || menu ? (\n          <div className={cn('flex', L.attach, chips && 'row-start-3')}>\n            {menu ? (\n              <Menu open={menuOpen} onOpenChange={setMenuOpen}>\n                <MenuTrigger asChild>\n                  <button type=\"button\" aria-label={w.more} title={menuOpen ? undefined : w.more} disabled={disabled}\n                    className={cn(iconBtn, 'text-kh-ink-2 hover:bg-(--kh-bubble) hover:text-kh-ink disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-(--kh-bubble) data-[state=open]:text-kh-ink')}>\n                    {menuOpen ? <X aria-hidden className=\"size-5\" /> : <Plus aria-hidden className=\"size-5\" />}\n                  </button>\n                </MenuTrigger>\n                <MenuContent side=\"top\" align=\"start\" className=\"min-w-64 rounded-[1.5rem] p-2\"\n                  onCloseAutoFocus={(e) => { if (away.current) { away.current = false; e.preventDefault(); } }}>\n                  {menu.filter((g) => g.length).map((group, gi) => (\n                    <div key={gi}>\n                      {gi > 0 && <MenuSeparator />}\n                      {group.map((it) => <ComposerMenuLine key={it.label} it={it} pickFiles={() => file.current?.click()} away={away} />)}\n                    </div>\n                  ))}\n                </MenuContent>\n              </Menu>\n            ) : (\n              <button type=\"button\" aria-label={w.attach} title={w.attach} disabled={disabled} onClick={() => file.current?.click()}\n                className={cn(iconBtn, 'text-kh-ink-2 hover:bg-(--kh-bubble) hover:text-kh-ink disabled:pointer-events-none disabled:opacity-50')}>\n                <Plus aria-hidden className=\"size-5\" />\n              </button>\n            )}\n            {attach && <input ref={file} type=\"file\" tabIndex={-1} aria-hidden aria-label={w.attach} accept={attach.accept} multiple={attach.multiple} className=\"sr-only\"\n              onChange={(e) => { const files = [...(e.currentTarget.files ?? [])]; e.currentTarget.value = ''; if (files.length) attach.onFiles(files); ta.current?.focus(); }} />}\n          </div>\n        ) : <span className={cn('w-1', L.attach, chips && 'row-start-3')} />}\n        {/* The placeholder is drawn here, not by the textarea: 3 px right of the caret so the caret never sits on its first letter, and\n            gone the moment there is text or an IME composition starts (Felix 19:24 \"placeholder text overlap issues\", cmux WebKit). */}\n        {placeholder && !value && !composing && (\n          <span aria-hidden className={cn('pointer-events-none ml-[3px] min-w-0 truncate text-kh-body leading-6 text-kh-muted', L.text, chips && 'row-start-2')}>{placeholder}</span>\n        )}\n        <textarea\n          ref={setRef}\n          rows={1}\n          aria-label={label}\n          aria-invalid={over || undefined}\n          aria-describedby={near ? `${id}-n` : undefined}\n          value={value}\n          aria-placeholder={placeholder || undefined}\n          disabled={disabled}\n          autoFocus={autoFocus}\n          onCompositionStart={() => setComposing(true)}\n          onCompositionEnd={() => setComposing(false)}\n          onChange={(e) => onChange(e.target.value)}\n          onPaste={onPaste}\n          onKeyDown={(e) => { if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) { e.preventDefault(); send(); } }}\n          className={cn('min-w-0 resize-none bg-transparent py-0 text-kh-body leading-6 text-kh-ink outline-none placeholder:text-kh-muted', L.text, chips && 'row-start-2')}\n        />\n        {hasTools && <div className={cn('flex min-w-0 flex-wrap items-center gap-0.5', L.tools, chips && 'row-start-3')}>{tools}{model && <ModelPicker model={model} w={w} />}</div>}\n        <div className={cn('flex items-center gap-1', L.send, chips && 'row-start-3')}>\n          {near && maxLength && <span id={`${id}-n`} className={cn('shrink-0 px-1 text-kh-caption tabular-nums', over ? 'font-medium text-kh-danger' : 'text-kh-muted')}>{w.count(length, maxLength)}</span>}\n          {speech.supported && !busy && (speech.on || !ready) ? (\n            <button type=\"button\" aria-label={speech.on ? w.stopDictating : w.dictate} title={speech.on ? w.stopDictating : w.dictate} aria-pressed={speech.on} disabled={disabled} onClick={speech.toggle}\n              className={cn(iconBtn, speech.on ? 'bg-kh-ink text-kh-on-ink' : 'text-kh-ink-2 hover:bg-(--kh-bubble) hover:text-kh-ink')}>\n              <Mic aria-hidden className={cn('size-5', speech.on && 'motion-safe:animate-pulse')} />\n            </button>\n          ) : busy ? (\n            <button type=\"button\" aria-label={onStop ? w.stop : w.working} title={onStop ? w.stop : w.working} disabled={!onStop} onClick={onStop}\n              className={cn(iconBtn, 'bg-(--kh-bubble) text-kh-ink hover:bg-kh-line disabled:opacity-60')}>\n              {onStop ? <Square aria-hidden className=\"size-3 rounded-[2px] fill-current\" /> : <span aria-hidden className=\"size-1.5 animate-pulse rounded-kh-pill bg-current\" />}\n            </button>\n          ) : (\n            // Kept in place while empty (no jump when it shows), hidden from sight and from the tab order.\n            <button type=\"submit\" aria-label={w.send} title={w.send} disabled={!canSend} aria-hidden={!ready || undefined} tabIndex={ready ? undefined : -1}\n              className={cn(iconBtn, canSend ? 'bg-[var(--kh-chat-accent,var(--kh-ink))] text-[var(--kh-chat-on-accent,var(--kh-on-ink))] hover:opacity-85' : 'bg-(--kh-bubble) text-kh-muted', !ready && 'invisible')}>\n              <ArrowUp aria-hidden className=\"size-5\" strokeWidth={2.25} />\n            </button>\n          )}\n        </div>\n      </form>\n      {note && <p className=\"mt-2 px-4 text-center text-kh-caption text-kh-muted [&_a]:underline [&_a]:underline-offset-2 [&_a:hover]:text-kh-ink\">{note}</p>}\n    </div>\n  );\n}\n\nfunction ModelPicker({ model, w }: { model: ComposerModel; w: ChatComposerLabels }) {\n  const [open, setOpen] = useState(false);\n  const current = model.options.find((o) => o.value === model.value);\n  const levels = model.thinking;\n  return (\n    <Menu open={open} onOpenChange={setOpen}>\n      <MenuTrigger asChild>\n        <button type=\"button\" aria-label={`${w.model}: ${current?.label ?? model.value}`}\n          className=\"inline-flex h-10 items-center gap-1.5 rounded-kh-pill px-3 text-kh-small text-kh-ink-2 transition-colors duration-(--kh-dur) hover:bg-(--kh-bubble) hover:text-kh-ink pointer-coarse:h-11 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--kh-focus) data-[state=open]:bg-(--kh-bubble) data-[state=open]:text-kh-ink\">\n          <span className=\"max-w-32 truncate\">{current?.short ?? current?.label ?? model.value}</span>\n          {open ? <ChevronUp aria-hidden className=\"size-4\" /> : <ChevronDown aria-hidden className=\"size-4\" />}\n        </button>\n      </MenuTrigger>\n      <MenuContent side=\"top\" align=\"end\" className=\"min-w-64 rounded-[1.5rem] p-2\">\n        <MenuRadioGroup value={model.value} onValueChange={model.onChange}>\n          {model.options.map((o) => <MenuRadioItem key={o.value} value={o.value} description={o.description} badge={o.tag} checkAt=\"start\" closes>{o.label}</MenuRadioItem>)}\n        </MenuRadioGroup>\n        {levels && levels.options.length > 0 && <>\n          <MenuSeparator />\n          <MenuSub label={levels.label ?? w.thinking}>\n            <MenuRadioGroup value={levels.value} onValueChange={levels.onChange}>\n              {levels.options.map((o) => <MenuRadioItem key={o.value} value={o.value} checkAt=\"start\" closes>{o.label}</MenuRadioItem>)}\n            </MenuRadioGroup>\n          </MenuSub>\n        </>}\n      </MenuContent>\n    </Menu>\n  );\n}\n\n// The browser's speech recognition (Chrome, Edge, Safari) writes what is said after the text already in the box, live.\ntype Recognition = { lang: string; continuous: boolean; interimResults: boolean; start(): void; stop(): void; abort(): void;\n  onresult: ((e: { results: ArrayLike<ArrayLike<{ transcript: string }>> }) => void) | null; onend: (() => void) | null; onerror: (() => void) | null };\nfunction useDictation(opt: ChatComposerProps['dictation'], value: string, onChange: (v: string) => void) {\n  const [supported, setSupported] = useState(false);\n  const [on, setOn] = useState(false);\n  const rec = useRef<Recognition | null>(null);\n  const live = useRef({ value, onChange });\n  live.current = { value, onChange };\n  useEffect(() => {\n    const Ctor = typeof window === 'undefined' ? undefined : ((window as unknown as Record<string, unknown>).SpeechRecognition ?? (window as unknown as Record<string, unknown>).webkitSpeechRecognition) as (new () => Recognition) | undefined;\n    setSupported(!!opt && !!Ctor);\n    return () => rec.current?.abort();\n  }, [opt]);\n  const stop = () => { rec.current?.stop(); };\n  const toggle = () => {\n    if (on) { stop(); return; }\n    const Ctor = ((window as unknown as Record<string, unknown>).SpeechRecognition ?? (window as unknown as Record<string, unknown>).webkitSpeechRecognition) as new () => Recognition;\n    const r = new Ctor();\n    r.lang = (typeof opt === 'object' && opt.lang) || document.documentElement.lang || 'en';\n    r.continuous = true;\n    r.interimResults = true;\n    const base = live.current.value;\n    const sep = base && !/\\s$/.test(base) ? ' ' : '';\n    r.onresult = (e) => {\n      let said = '';\n      for (let i = 0; i < e.results.length; i++) said += e.results[i]![0]!.transcript;\n      live.current.onChange(base + sep + said.trimStart());\n    };\n    r.onend = () => { setOn(false); rec.current = null; };\n    r.onerror = () => { setOn(false); rec.current = null; };\n    rec.current = r;\n    r.start();\n    setOn(true);\n  };\n  return { supported, on, toggle, stop };\n}\n\nfunction ComposerMenuLine({ it, pickFiles, away }: { it: ComposerMenuItem; pickFiles: () => void; away: { current: boolean } }) {\n  if (it.items?.length) return <MenuSub icon={it.icon} label={it.label}>{it.items.map((x) => <ComposerMenuLine key={x.label} it={x} pickFiles={pickFiles} away={away} />)}</MenuSub>;\n  // The file picker opens after the menu has closed and handed focus back, or the browser drops the click.\n  return <MenuItem icon={it.icon} disabled={it.disabled} onSelect={() => { if (it.files) setTimeout(pickFiles, 0); if (!it.keepFocus) return it.onSelect?.(); away.current = true; setTimeout(() => it.onSelect?.(), 0); }}>{it.label}</MenuItem>;\n}\n\n/** One chip inside the composer: a file, what is open beside the chat, a long paste. Remove takes it out. */\nexport function ComposerChip({ icon, children, onRemove, removeLabel = 'Remove', title }: { icon?: ReactNode; children: ReactNode; onRemove?: () => void; removeLabel?: string; title?: string }) {\n  return (\n    <span title={title} className={cn('inline-flex min-h-8 max-w-full items-center gap-1.5 rounded-kh-pill bg-(--kh-bubble) pl-2.5 text-kh-caption text-kh-ink', !onRemove && 'pr-2.5')}>\n      {icon && <span aria-hidden className=\"shrink-0 text-kh-muted [&>svg]:size-3.5\">{icon}</span>}\n      <span className=\"min-w-0 truncate\">{children}</span>\n      {onRemove && (\n        <button type=\"button\" aria-label={removeLabel} onClick={onRemove}\n          className=\"inline-flex size-8 shrink-0 items-center justify-center rounded-kh-pill text-kh-muted hover:bg-kh-line hover:text-kh-ink focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-(--kh-focus)\">\n          <X aria-hidden className=\"size-3.5\" />\n        </button>\n      )}\n    </span>\n  );\n}\n\n/** A quiet tool in the composer: a picker's trigger (text + chevron, like Gemini's model picker), a toggle (pressed), or an icon (a mic). */\nexport function ComposerTool({ icon, children, pressed, onClick, label, end }: { icon?: ReactNode; children?: ReactNode; pressed?: boolean; onClick?: () => void; label?: string; end?: ReactNode }) {\n  return (\n    <button type=\"button\" aria-pressed={pressed} aria-label={label} title={label} onClick={onClick}\n      className={cn('inline-flex h-10 items-center gap-1.5 rounded-kh-pill px-3 text-kh-small transition-colors duration-(--kh-dur) pointer-coarse:h-11 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--kh-focus) [&_svg]:size-4',\n        pressed ? 'bg-(--kh-bubble) text-kh-ink' : 'text-kh-ink-2 hover:bg-(--kh-bubble) hover:text-kh-ink', !children && 'w-10 justify-center px-0 pointer-coarse:w-11 [&_svg]:size-5')}>\n      {icon}{children}{end}\n    </button>\n  );\n}\n"
    }
  ]
}
