{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "spotlight-search-panel",
  "title": "Spotlight Search Panel",
  "description": "A global search overlay for an app: one field that searches pages, people, files and actions with fuzzy matching and highlighted letters, scope tabs with live counts that Tab cycles through, grouped results driven by the keyboard, a rich preview of the highlighted result, and recent searches.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/spotlight-search-panel/spotlight-search-panel.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nfunction cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\ntype Kind = \"page\" | \"person\" | \"file\" | \"action\";\ntype Scope = \"all\" | Kind;\nexport interface SpotlightItem {\n  id: string;\n  kind: Kind;\n  title: string;\n  subtitle: string;\n  meta?: Record<string, string>;\n  shortcut?: string[];\n  color?: string;\n}\n\nexport interface SpotlightSearchPanelProps {\n  items?: SpotlightItem[];\n  recent?: string[];\n  defaultOpen?: boolean;\n  onSelect?: (item: SpotlightItem) => void;\n  theme?: \"dark\" | \"light\";\n  className?: string;\n}\n\nconst PALETTES = {\n  dark: { bg: \"#0A0A0A\", text: \"#F5F4F1\", muted: \"rgba(245,244,241,0.62)\", faint: \"rgba(245,244,241,0.36)\", panel: \"#141414\", side: \"#101010\", border: \"rgba(255,255,255,0.09)\", active: \"rgba(255,255,255,0.07)\", mark: \"#F5F4F1\", chip: \"rgba(255,255,255,0.06)\", on: \"#F5F4F1\", onText: \"#0A0A0A\", accent: \"#60A5FA\", ring: \"rgba(245,244,241,0.6)\", scrim: \"rgba(0,0,0,0.55)\", ghost: \"rgba(255,255,255,0.04)\" },\n  light: { bg: \"#F4F4F1\", text: \"#0A0A0A\", muted: \"rgba(10,10,10,0.62)\", faint: \"rgba(10,10,10,0.42)\", panel: \"#FFFFFF\", side: \"#FAFAF8\", border: \"rgba(10,10,10,0.09)\", active: \"rgba(10,10,10,0.05)\", mark: \"#0A0A0A\", chip: \"rgba(10,10,10,0.05)\", on: \"#0A0A0A\", onText: \"#FAFAF8\", accent: \"#2563EB\", ring: \"rgba(10,10,10,0.5)\", scrim: \"rgba(10,10,10,0.25)\", ghost: \"rgba(10,10,10,0.04)\" },\n};\n\nconst ITEMS: SpotlightItem[] = [\n  { id: \"p1\", kind: \"page\", title: \"Revenue overview\", subtitle: \"Dashboards / Finance\", meta: { Updated: \"2h ago\", Owner: \"Daniel Reyes\", Snippet: \"MRR grew 8.6% in October, led by expansion in the Team plan.\" } },\n  { id: \"p2\", kind: \"page\", title: \"Churn analysis\", subtitle: \"Dashboards / Growth\", meta: { Updated: \"Yesterday\", Owner: \"Mia Okafor\", Snippet: \"Logo churn fell to 1.1%. Most cancellations cite missing SSO.\" } },\n  { id: \"p3\", kind: \"page\", title: \"Release notes 4.2\", subtitle: \"Docs / Changelog\", meta: { Updated: \"Nov 6\", Owner: \"Lena Brandt\", Snippet: \"Saved views, faster exports and audit log search.\" } },\n  { id: \"p4\", kind: \"page\", title: \"Onboarding checklist\", subtitle: \"Docs / Customers\", meta: { Updated: \"Oct 28\", Owner: \"Tomás Ferreira\", Snippet: \"Seven steps every new workspace should finish in week one.\" } },\n  { id: \"u1\", kind: \"person\", title: \"Lena Brandt\", subtitle: \"Head of Product\", color: \"#60A5FA\", meta: { Email: \"lena@nexora.io\", Team: \"Product\", Local: \"10:42 Berlin\" } },\n  { id: \"u2\", kind: \"person\", title: \"Daniel Reyes\", subtitle: \"Finance Lead\", color: \"#F472B6\", meta: { Email: \"daniel@nexora.io\", Team: \"Finance\", Local: \"04:42 New York\" } },\n  { id: \"u3\", kind: \"person\", title: \"Mia Okafor\", subtitle: \"Product Designer\", color: \"#A78BFA\", meta: { Email: \"mia@nexora.io\", Team: \"Design\", Local: \"09:42 Lagos\" } },\n  { id: \"f1\", kind: \"file\", title: \"Q4-revenue-forecast.xlsx\", subtitle: \"Spreadsheet · 248 KB\", color: \"#34D399\", meta: { Modified: \"Today, 09:14\", Owner: \"Daniel Reyes\", Folder: \"Finance / 2026\" } },\n  { id: \"f2\", kind: \"file\", title: \"brand-guidelines.pdf\", subtitle: \"PDF · 4.1 MB\", color: \"#F87171\", meta: { Modified: \"Oct 30\", Owner: \"Mia Okafor\", Folder: \"Design / Brand\" } },\n  { id: \"f3\", kind: \"file\", title: \"roadmap-q1-2027.key\", subtitle: \"Presentation · 12 MB\", color: \"#FBBF24\", meta: { Modified: \"Nov 10\", Owner: \"Lena Brandt\", Folder: \"Product / Planning\" } },\n  { id: \"a1\", kind: \"action\", title: \"Create new report\", subtitle: \"Start from a blank report or a template\", shortcut: [\"N\"] },\n  { id: \"a2\", kind: \"action\", title: \"Invite teammates\", subtitle: \"Send invites by email or share a link\", shortcut: [\"⌘\", \"I\"] },\n  { id: \"a3\", kind: \"action\", title: \"Switch to light theme\", subtitle: \"Change how Nexora looks on this device\", shortcut: [\"⌘\", \"⇧\", \"L\"] },\n];\nconst RECENT = [\"churn\", \"Daniel\", \"forecast\"];\nconst SCOPES: { id: Scope; label: string }[] = [\n  { id: \"all\", label: \"All\" },\n  { id: \"page\", label: \"Pages\" },\n  { id: \"person\", label: \"People\" },\n  { id: \"file\", label: \"Files\" },\n  { id: \"action\", label: \"Actions\" },\n];\nconst GROUP: Record<Kind, string> = { page: \"Pages\", person: \"People\", file: \"Files\", action: \"Actions\" };\nconst ICON: Record<Kind, string> = {\n  page: \"M7 3h7l5 5v13H7zM14 3v5h5M10 13h6M10 17h6\",\n  person: \"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-7 9a7 7 0 0 1 14 0\",\n  file: \"M6 3h8l4 4v14H6zM14 3v4h4\",\n  action: \"M13 3 4 14h7l-1 7 9-11h-7l1-7Z\",\n};\n\n/** Subsequence match: every query letter in order. Returns matched indexes and a score (lower is better). */\nfunction fuzzy(text: string, q: string) {\n  if (!q) return { score: 0, hits: [] as number[] };\n  const t = text.toLowerCase();\n  const query = q.toLowerCase().replace(/\\s+/g, \"\");\n  const hits: number[] = [];\n  let from = 0;\n  for (const ch of query) {\n    const i = t.indexOf(ch, from);\n    if (i < 0) return null;\n    hits.push(i);\n    from = i + 1;\n  }\n  const spread = hits[hits.length - 1] - hits[0];\n  return { score: spread + hits[0] * 0.5 - (t.startsWith(query) ? 10 : 0), hits };\n}\nconst initials = (n: string) =>\n  n\n    .split(\" \")\n    .map((w) => w[0])\n    .join(\"\");\n\nexport function SpotlightSearchPanel({ items = ITEMS, recent: recent0 = RECENT, defaultOpen = true, onSelect, theme = \"dark\", className }: SpotlightSearchPanelProps) {\n  const p = PALETTES[theme];\n  const reduce = !!useReducedMotion();\n  const uid = React.useId();\n  const [open, setOpen] = React.useState(defaultOpen);\n  const [query, setQuery] = React.useState(\"\");\n  const [scope, setScope] = React.useState<Scope>(\"all\");\n  const [active, setActive] = React.useState(0);\n  const [recent, setRecent] = React.useState(recent0);\n  const [toast, setToast] = React.useState<string | null>(null);\n  const listRef = React.useRef<HTMLDivElement>(null);\n  const inputRef = React.useRef<HTMLInputElement>(null);\n  const focusOnce = React.useCallback((el: HTMLInputElement | null) => {\n    inputRef.current = el;\n    el?.focus({ preventScroll: true });\n  }, []);\n\n  React.useEffect(() => {\n    const onKey = (e: KeyboardEvent) => {\n      if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === \"k\") {\n        e.preventDefault();\n        setOpen((o) => !o);\n      }\n    };\n    document.addEventListener(\"keydown\", onKey);\n    return () => document.removeEventListener(\"keydown\", onKey);\n  }, []);\n  React.useEffect(() => {\n    if (!toast) return;\n    const t = setTimeout(() => setToast(null), 2000);\n    return () => clearTimeout(t);\n  }, [toast]);\n\n  const q = query.trim();\n  const results = items\n    .filter((i) => scope === \"all\" || i.kind === scope)\n    .map((i) => ({ item: i, m: fuzzy(i.title, q) }))\n    .filter((r): r is { item: SpotlightItem; m: { score: number; hits: number[] } } => r.m !== null)\n    .sort((a, b) => (q ? a.m.score - b.m.score : 0));\n  // Keep groups in a fixed order; flatten for keyboard movement.\n  const groups = ([\"page\", \"person\", \"file\", \"action\"] as Kind[]).map((k) => ({ kind: k, rows: results.filter((r) => r.item.kind === k).slice(0, scope === \"all\" ? 3 : 8) })).filter((g) => g.rows.length);\n  const flat = groups.flatMap((g) => g.rows);\n  const current = flat[Math.min(active, flat.length - 1)]?.item;\n  const counts = Object.fromEntries(SCOPES.map((s) => [s.id, items.filter((i) => (s.id === \"all\" || i.kind === s.id) && fuzzy(i.title, q)).length]));\n\n  React.useEffect(() => {\n    listRef.current?.querySelector<HTMLElement>(`[data-index=\"${active}\"]`)?.scrollIntoView({ block: \"nearest\" });\n  }, [active]);\n\n  const choose = (item: SpotlightItem) => {\n    if (q) setRecent((r) => [q, ...r.filter((x) => x.toLowerCase() !== q.toLowerCase())].slice(0, 4));\n    setToast(item.kind === \"action\" ? `${item.title}…` : `Opened ${item.title}`);\n    onSelect?.(item);\n    setOpen(false);\n    setQuery(\"\");\n    setScope(\"all\");\n    setActive(0);\n  };\n  const onKeyDown = (e: React.KeyboardEvent) => {\n    if (e.key === \"ArrowDown\" || e.key === \"ArrowUp\") {\n      e.preventDefault();\n      if (!flat.length) return;\n      setActive((a) => (a + (e.key === \"ArrowDown\" ? 1 : -1) + flat.length) % flat.length);\n    } else if (e.key === \"Enter\" && current) {\n      e.preventDefault();\n      choose(current);\n    } else if (e.key === \"Tab\") {\n      e.preventDefault();\n      const i = SCOPES.findIndex((s) => s.id === scope);\n      setScope(SCOPES[(i + (e.shiftKey ? -1 : 1) + SCOPES.length) % SCOPES.length].id);\n      setActive(0);\n    } else if (e.key === \"Escape\") {\n      if (query) setQuery(\"\");\n      else setOpen(false);\n    }\n  };\n\n  const ring = { [\"--tw-ring-color\" as string]: p.ring, [\"--tw-ring-offset-color\" as string]: p.panel } as React.CSSProperties;\n  const focus = \"outline-none focus-visible:ring-2 focus-visible:ring-offset-2\";\n  const highlight = (text: string, hits: number[]) =>\n    hits.length\n      ? [...text].map((ch, i) =>\n          hits.includes(i) ? (\n            <span key={i} className=\"font-semibold underline decoration-2 underline-offset-[3px]\" style={{ color: p.mark, textDecorationColor: `${p.accent}99` }}>\n              {ch}\n            </span>\n          ) : (\n            <React.Fragment key={i}>{ch}</React.Fragment>\n          ),\n        )\n      : text;\n  const glyph = (it: SpotlightItem, size = 30) =>\n    it.kind === \"person\" ? (\n      <span className=\"grid shrink-0 place-items-center rounded-full font-semibold\" style={{ width: size, height: size, fontSize: size * 0.36, background: `${it.color}2e`, color: it.color }}>\n        {initials(it.title)}\n      </span>\n    ) : (\n      <span className=\"grid shrink-0 place-items-center rounded-lg\" style={{ width: size, height: size, background: it.color ? `${it.color}22` : p.chip, color: it.color ?? p.muted }}>\n        <svg width={size * 0.5} height={size * 0.5} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n          <path d={ICON[it.kind]} />\n        </svg>\n      </span>\n    );\n\n  return (\n    <section className={cn(\"@container relative min-h-[600px] w-full overflow-hidden\", className)} style={{ background: p.bg, color: p.text }}>\n      {/* Faded app behind */}\n      <div className=\"flex h-14 items-center gap-3 border-b px-4 @[640px]:px-6\" style={{ borderColor: p.border }} aria-hidden={open}>\n        <span className=\"grid h-7 w-7 place-items-center rounded-md text-[12px] font-bold text-white\" style={{ background: \"#6366F1\" }}>\n          N\n        </span>\n        <button type=\"button\" onClick={() => setOpen(true)} className={cn(\"ml-auto flex h-9 w-full max-w-[280px] cursor-pointer items-center gap-2 rounded-lg border px-3 text-left text-[13px]\", focus)} style={{ borderColor: p.border, background: p.panel, color: p.faint, ...ring }}>\n          <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden=\"true\">\n            <circle cx=\"11\" cy=\"11\" r=\"7\" />\n            <path d=\"m20 20-3.5-3.5\" />\n          </svg>\n          Search everything\n          <kbd className=\"ml-auto rounded border px-1.5 font-sans text-[11px]\" style={{ borderColor: p.border }}>\n            ⌘K\n          </kbd>\n        </button>\n      </div>\n      <div className=\"grid grid-cols-1 gap-4 p-4 @[640px]:grid-cols-3 @[640px]:p-6\" aria-hidden=\"true\">\n        {[0, 1, 2, 3, 4, 5].map((i) => (\n          <div key={i} className={cn(\"h-32 rounded-xl\", i === 0 && \"@[640px]:col-span-2\")} style={{ background: p.ghost }} />\n        ))}\n      </div>\n\n      <AnimatePresence>\n        {toast && (\n          <motion.div key={toast} role=\"status\" initial={reduce ? false : { opacity: 0, y: 8 }} animate={{ opacity: 1, y: 0 }} exit={reduce ? undefined : { opacity: 0 }} className=\"absolute bottom-6 left-1/2 z-10 -translate-x-1/2 rounded-full border px-3.5 py-1.5 text-[12.5px]\" style={{ background: p.panel, borderColor: p.border }}>\n            {toast}\n          </motion.div>\n        )}\n      </AnimatePresence>\n\n      <AnimatePresence>\n        {open && (\n          <motion.div\n            key=\"scrim\"\n            initial={reduce ? false : { opacity: 0 }}\n            animate={{ opacity: 1 }}\n            exit={reduce ? undefined : { opacity: 0 }}\n            transition={{ duration: 0.15 }}\n            className=\"absolute inset-0 z-20 flex items-start justify-center px-3 pt-10 @[640px]:pt-16\"\n            style={{ background: p.scrim }}\n            onMouseDown={(e) => {\n              if (e.target === e.currentTarget) setOpen(false);\n            }}\n          >\n            <motion.div\n              role=\"dialog\"\n              aria-modal=\"true\"\n              aria-label=\"Search\"\n              initial={reduce ? false : { opacity: 0, y: -10, scale: 0.98 }}\n              animate={{ opacity: 1, y: 0, scale: 1 }}\n              exit={reduce ? undefined : { opacity: 0, y: -6, scale: 0.98 }}\n              transition={{ type: \"spring\", stiffness: 520, damping: 40 }}\n              className=\"flex max-h-[520px] w-full max-w-[760px] flex-col overflow-hidden rounded-2xl border shadow-[0_24px_60px_-20px_rgba(0,0,0,0.6)]\"\n              style={{ background: p.panel, borderColor: p.border }}\n              onKeyDown={onKeyDown}\n            >\n              {/* Input */}\n              <div className=\"flex items-center gap-3 border-b px-4\" style={{ borderColor: p.border }}>\n                <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke={p.faint} strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden=\"true\">\n                  <circle cx=\"11\" cy=\"11\" r=\"7\" />\n                  <path d=\"m20 20-3.5-3.5\" />\n                </svg>\n                <input\n                  ref={focusOnce}\n                  value={query}\n                  onChange={(e) => {\n                    setQuery(e.target.value);\n                    setActive(0);\n                  }}\n                  placeholder=\"Search everything\"\n                  role=\"combobox\"\n                  aria-expanded\n                  aria-controls={`${uid}-list`}\n                  aria-activedescendant={current ? `${uid}-${current.id}` : undefined}\n                  aria-autocomplete=\"list\"\n                  className=\"h-14 min-w-0 flex-1 bg-transparent text-[16px] outline-none\"\n                  style={{ color: p.text }}\n                />\n                <kbd className=\"rounded border px-1.5 py-0.5 font-sans text-[11px]\" style={{ borderColor: p.border, color: p.faint }}>\n                  esc\n                </kbd>\n              </div>\n              {/* Scopes */}\n              <div role=\"tablist\" aria-label=\"Search in\" className=\"flex gap-1 overflow-x-auto border-b px-3 py-2\" style={{ borderColor: p.border, scrollbarWidth: \"none\" }}>\n                {SCOPES.map((s) => (\n                  <button\n                    key={s.id}\n                    type=\"button\"\n                    role=\"tab\"\n                    aria-selected={scope === s.id}\n                    tabIndex={-1}\n                    onClick={() => {\n                      setScope(s.id);\n                      setActive(0);\n                      inputRef.current?.focus();\n                    }}\n                    className={cn(\"relative flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full border-0 bg-transparent px-3 text-[12.5px]\", focus)}\n                    style={{ color: scope === s.id ? p.onText : p.muted, ...ring }}\n                  >\n                    {scope === s.id && <motion.span layoutId={`${uid}-scope`} className=\"absolute inset-0 rounded-full\" style={{ background: p.on }} transition={reduce ? { duration: 0 } : { type: \"spring\", stiffness: 520, damping: 38 }} />}\n                    <span className=\"relative font-medium\">{s.label}</span>\n                    <span className=\"relative tabular-nums text-[11px] opacity-70\">{counts[s.id]}</span>\n                  </button>\n                ))}\n              </div>\n\n              <div className=\"flex min-h-0 flex-1\">\n                {/* Results */}\n                <div ref={listRef} id={`${uid}-list`} role=\"listbox\" aria-label=\"Results\" className=\"min-h-[280px] min-w-0 flex-1 overflow-y-auto p-2\">\n                  {!q && recent.length > 0 && scope === \"all\" && (\n                    <div className=\"mb-2 px-2 pt-1\">\n                      <p className=\"m-0 mb-1.5 text-[11px] font-medium tracking-[0.04em] uppercase\" style={{ color: p.faint }}>\n                        Recent\n                      </p>\n                      <div className=\"flex flex-wrap gap-1.5\">\n                        {recent.map((r) => (\n                          <span key={r} className=\"flex items-center gap-1 rounded-full py-0.5 pr-0.5 pl-2.5 text-[12px]\" style={{ background: p.chip }}>\n                            <button type=\"button\" tabIndex={-1} onClick={() => setQuery(r)} className=\"cursor-pointer border-0 bg-transparent p-0 text-[12px]\" style={{ color: p.text }}>\n                              {r}\n                            </button>\n                            <button type=\"button\" tabIndex={-1} onClick={() => setRecent((x) => x.filter((y) => y !== r))} aria-label={`Remove ${r} from recent`} className=\"grid h-5 w-5 cursor-pointer place-items-center rounded-full border-0 bg-transparent text-[13px]\" style={{ color: p.faint }}>\n                              ×\n                            </button>\n                          </span>\n                        ))}\n                      </div>\n                    </div>\n                  )}\n                  {groups.map((g) => (\n                    <div key={g.kind} role=\"group\" aria-label={GROUP[g.kind]} className=\"mb-1\">\n                      <p className=\"m-0 px-2 pt-2 pb-1 text-[11px] font-medium tracking-[0.04em] uppercase\" style={{ color: p.faint }}>\n                        {GROUP[g.kind]}\n                      </p>\n                      {g.rows.map((r) => {\n                        const index = flat.indexOf(r);\n                        const on = index === Math.min(active, flat.length - 1);\n                        return (\n                          <div key={r.item.id} id={`${uid}-${r.item.id}`} data-index={index} role=\"option\" aria-selected={on} onMouseMove={() => active !== index && setActive(index)} onClick={() => choose(r.item)} className=\"relative flex cursor-pointer items-center gap-3 rounded-lg px-2 py-2\">\n                            {on && <motion.span layoutId={`${uid}-active`} className=\"absolute inset-0 rounded-lg\" style={{ background: p.active }} transition={reduce ? { duration: 0 } : { type: \"spring\", stiffness: 700, damping: 45 }} />}\n                            <span className=\"relative\">{glyph(r.item)}</span>\n                            <span className=\"relative min-w-0 flex-1\">\n                              <span className=\"block truncate text-[13.5px]\" style={{ color: p.text }}>\n                                {highlight(r.item.title, r.m.hits)}\n                              </span>\n                              <span className=\"block truncate text-[12px]\" style={{ color: p.faint }}>\n                                {r.item.subtitle}\n                              </span>\n                            </span>\n                            {r.item.shortcut && <span className=\"relative hidden gap-1 @[480px]:flex\">{r.item.shortcut.map((k) => <kbd key={k} className=\"grid h-5 min-w-5 place-items-center rounded border px-1 font-sans text-[10.5px]\" style={{ borderColor: p.border, color: p.muted }}>{k}</kbd>)}</span>}\n                            {on && (\n                              <span className=\"relative text-[12px]\" style={{ color: p.faint }} aria-hidden=\"true\">\n                                ↵\n                              </span>\n                            )}\n                          </div>\n                        );\n                      })}\n                    </div>\n                  ))}\n                  {!flat.length && (\n                    <div className=\"px-4 py-12 text-center\">\n                      <p className=\"m-0 text-[13.5px]\">No results for “{q}”</p>\n                      <p className=\"m-0 mt-1 text-[12.5px]\" style={{ color: p.faint }}>\n                        {scope !== \"all\" ? \"Try searching all categories with Tab.\" : \"Check the spelling or try a shorter word.\"}\n                      </p>\n                    </div>\n                  )}\n                </div>\n\n                {/* Preview */}\n                <aside className=\"hidden w-[260px] shrink-0 border-l p-4 @[700px]:block\" style={{ borderColor: p.border, background: p.side }} aria-live=\"polite\" aria-label=\"Preview\">\n                  <AnimatePresence mode=\"popLayout\" initial={false}>\n                    {current && (\n                      <motion.div key={current.id} initial={reduce ? false : { opacity: 0, y: 6 }} animate={{ opacity: 1, y: 0 }} exit={reduce ? undefined : { opacity: 0 }} transition={{ duration: 0.14 }}>\n                        {current.kind === \"file\" ? (\n                          <div className=\"mb-4 grid h-28 place-items-center rounded-xl\" style={{ background: `${current.color}18` }}>\n                            {glyph(current, 44)}\n                          </div>\n                        ) : (\n                          <div className=\"mb-3\">{glyph(current, current.kind === \"person\" ? 52 : 40)}</div>\n                        )}\n                        <p className=\"m-0 text-[14.5px] font-semibold break-words\">{current.title}</p>\n                        <p className=\"m-0 mt-0.5 text-[12.5px]\" style={{ color: p.muted }}>\n                          {current.subtitle}\n                        </p>\n                        {current.meta?.Snippet && (\n                          <p className=\"m-0 mt-3 rounded-lg p-2.5 text-[12.5px] leading-[1.5]\" style={{ background: p.chip, color: p.muted }}>\n                            {current.meta.Snippet}\n                          </p>\n                        )}\n                        {current.meta && (\n                          <dl className=\"m-0 mt-3 grid grid-cols-[72px_1fr] gap-y-1.5 text-[12px]\">\n                            {Object.entries(current.meta)\n                              .filter(([k]) => k !== \"Snippet\")\n                              .map(([k, val]) => (\n                                <React.Fragment key={k}>\n                                  <dt style={{ color: p.faint }}>{k}</dt>\n                                  <dd className=\"m-0 truncate\">{val}</dd>\n                                </React.Fragment>\n                              ))}\n                          </dl>\n                        )}\n                        {current.shortcut && (\n                          <p className=\"m-0 mt-3 flex items-center gap-1.5 text-[12px]\" style={{ color: p.faint }}>\n                            Shortcut {current.shortcut.map((k) => <kbd key={k} className=\"grid h-5 min-w-5 place-items-center rounded border px-1 font-sans text-[10.5px]\" style={{ borderColor: p.border, color: p.text }}>{k}</kbd>)}\n                          </p>\n                        )}\n                        <button type=\"button\" tabIndex={-1} onClick={() => choose(current)} className=\"mt-4 h-8 w-full cursor-pointer rounded-lg border-0 text-[12.5px] font-medium\" style={{ background: p.on, color: p.onText }}>\n                          {current.kind === \"person\" ? \"View profile\" : current.kind === \"file\" ? \"Open file\" : current.kind === \"action\" ? \"Run action\" : \"Open page\"}\n                        </button>\n                      </motion.div>\n                    )}\n                  </AnimatePresence>\n                </aside>\n              </div>\n\n              {/* Footer */}\n              <div className=\"hidden items-center gap-4 border-t px-4 py-2.5 text-[11.5px] @[560px]:flex\" style={{ borderColor: p.border, color: p.faint }}>\n                {[\n                  [\"↑↓\", \"navigate\"],\n                  [\"↵\", \"open\"],\n                  [\"tab\", \"switch scope\"],\n                  [\"esc\", \"clear or close\"],\n                ].map(([k, l]) => (\n                  <span key={l} className=\"flex items-center gap-1.5\">\n                    <kbd className=\"rounded border px-1 font-sans text-[10.5px]\" style={{ borderColor: p.border, color: p.muted }}>\n                      {k}\n                    </kbd>\n                    {l}\n                  </span>\n                ))}\n              </div>\n            </motion.div>\n          </motion.div>\n        )}\n      </AnimatePresence>\n    </section>\n  );\n}\n\nexport default SpotlightSearchPanel;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}