{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "activity-feed",
  "title": "Activity Feed",
  "description": "A team activity feed grouped by day: comments with @mentions, status changes shown as from → to pills, file uploads, deploys and new members, emoji reactions you can toggle, inline replies, filter tabs with counts, unread dots with Mark all as read, and a pill that collects new activity until you choose to show it.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/activity-feed/activity-feed.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\nexport type ActivityKind = \"comment\" | \"status\" | \"file\" | \"mention\" | \"join\" | \"deploy\";\n\nexport interface ActivityItem {\n  id: string;\n  kind: ActivityKind;\n  actor: { name: string; avatar?: string };\n  /** Short verb phrase, e.g. \"commented on\". */\n  action: string;\n  target: string;\n  /** ISO time. */\n  time: string;\n  comment?: string;\n  from?: string;\n  to?: string;\n  file?: { name: string; size: string };\n  reactions?: Record<string, number>;\n  unread?: boolean;\n}\n\nexport interface ActivityFeedProps {\n  title?: string;\n  items?: ActivityItem[];\n  /** Items that arrive while the feed is open (demo). They queue behind a \"new activity\" pill. */\n  incoming?: ActivityItem[];\n  /** Milliseconds between incoming items. */\n  interval?: number;\n  /** Now, for relative times. */\n  now?: string;\n  currentUser?: string;\n  onReply?: (id: string, text: string) => 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)\", card: \"#121212\", border: \"rgba(255,255,255,0.09)\", chip: \"rgba(255,255,255,0.06)\", hover: \"rgba(255,255,255,0.03)\", on: \"#F5F4F1\", onText: \"#0A0A0A\", accent: \"#FB923C\", quote: \"rgba(255,255,255,0.04)\", ring: \"rgba(245,244,241,0.6)\", input: \"#0D0D0D\" },\n  light: { bg: \"#FAFAF8\", text: \"#0A0A0A\", muted: \"rgba(10,10,10,0.62)\", faint: \"rgba(10,10,10,0.4)\", card: \"#FFFFFF\", border: \"rgba(10,10,10,0.09)\", chip: \"rgba(10,10,10,0.05)\", hover: \"rgba(10,10,10,0.02)\", on: \"#0A0A0A\", onText: \"#FAFAF8\", accent: \"#EA580C\", quote: \"rgba(10,10,10,0.03)\", ring: \"rgba(10,10,10,0.5)\", input: \"#FAFAF8\" },\n};\nconst KIND: Record<ActivityKind, { color: string; label: string }> = {\n  comment: { color: \"#60A5FA\", label: \"Comment\" },\n  status: { color: \"#A78BFA\", label: \"Update\" },\n  file: { color: \"#FBBF24\", label: \"File\" },\n  mention: { color: \"#FB923C\", label: \"Mention\" },\n  join: { color: \"#4ADE80\", label: \"Team\" },\n  deploy: { color: \"#2DD4BF\", label: \"Deploy\" },\n};\nconst STATUS_COLOR: Record<string, string> = { Todo: \"#9CA3AF\", \"In progress\": \"#60A5FA\", \"In review\": \"#FBBF24\", Done: \"#4ADE80\", Blocked: \"#F87171\" };\n\nconst at = (min: number) => new Date(Date.parse(\"2026-11-01T15:00:00Z\") - min * 60000).toISOString();\nconst DEFAULT_ITEMS: ActivityItem[] = [\n  { id: \"a1\", kind: \"mention\", actor: { name: \"Mara Okafor\", avatar: \"/demo/44.webp\" }, action: \"mentioned you in\", target: \"Q4 launch plan\", time: at(4), comment: \"@you can you double-check the pricing copy before Thursday? The annual discount still says 15%.\", reactions: { \"👀\": 2 }, unread: true },\n  { id: \"a2\", kind: \"status\", actor: { name: \"Daniel Reyes\", avatar: \"/demo/42.webp\" }, action: \"moved\", target: \"Checkout redesign\", time: at(26), from: \"In review\", to: \"Done\", unread: true },\n  { id: \"a3\", kind: \"file\", actor: { name: \"Lena Brandt\", avatar: \"/demo/55.webp\" }, action: \"uploaded a file to\", target: \"Brand refresh\", time: at(58), file: { name: \"logo-variants-v3.fig\", size: \"18.4 MB\" }, reactions: { \"🔥\": 4, \"👍\": 1 } },\n  { id: \"a4\", kind: \"comment\", actor: { name: \"Tomás Ferreira\", avatar: \"/demo/43.webp\" }, action: \"commented on\", target: \"API rate limits\", time: at(95), comment: \"Burst limit of 50 req/s works for every customer we checked. Shipping it behind a flag first.\", reactions: { \"👍\": 3 } },\n  { id: \"a5\", kind: \"deploy\", actor: { name: \"ci-deploy\" }, action: \"deployed\", target: \"web v3.8.2 to production\", time: at(140) },\n  { id: \"a6\", kind: \"status\", actor: { name: \"Mara Okafor\", avatar: \"/demo/44.webp\" }, action: \"moved\", target: \"Onboarding emails\", time: at(60 * 20), from: \"Todo\", to: \"In progress\" },\n  { id: \"a7\", kind: \"join\", actor: { name: \"Noor Haddad\", avatar: \"/demo/46.webp\" }, action: \"joined\", target: \"the Design team\", time: at(60 * 23), reactions: { \"👋\": 6 } },\n  { id: \"a8\", kind: \"comment\", actor: { name: \"Lena Brandt\", avatar: \"/demo/55.webp\" }, action: \"commented on\", target: \"Brand refresh\", time: at(60 * 26), comment: \"Option B reads better at small sizes. Let's test it on the app icon too.\" },\n  { id: \"a9\", kind: \"status\", actor: { name: \"Daniel Reyes\", avatar: \"/demo/42.webp\" }, action: \"marked\", target: \"Payment retries\", time: at(60 * 50), from: \"In progress\", to: \"Blocked\" },\n];\nconst DEFAULT_INCOMING: ActivityItem[] = [\n  { id: \"n1\", kind: \"comment\", actor: { name: \"Noor Haddad\", avatar: \"/demo/46.webp\" }, action: \"commented on\", target: \"Checkout redesign\", time: at(0), comment: \"Looks great on mobile. One nit: the coupon field jumps when it validates.\", unread: true },\n  { id: \"n2\", kind: \"file\", actor: { name: \"Tomás Ferreira\", avatar: \"/demo/43.webp\" }, action: \"uploaded a file to\", target: \"API rate limits\", time: at(0), file: { name: \"load-test-results.csv\", size: \"240 KB\" }, unread: true },\n  { id: \"n3\", kind: \"status\", actor: { name: \"Lena Brandt\", avatar: \"/demo/55.webp\" }, action: \"moved\", target: \"Brand refresh\", time: at(0), from: \"In progress\", to: \"In review\", unread: true },\n];\n\nfunction rel(iso: string, now: string) {\n  const m = Math.max(0, Math.round((Date.parse(now) - Date.parse(iso)) / 60000));\n  if (m < 1) return \"just now\";\n  if (m < 60) return `${m}m ago`;\n  const h = Math.round(m / 60);\n  if (h < 24) return `${h}h ago`;\n  return `${Math.round(h / 24)}d ago`;\n}\nfunction dayLabel(iso: string, now: string) {\n  const d = Math.floor(Date.parse(now) / 864e5) - Math.floor(Date.parse(iso) / 864e5);\n  if (d <= 0) return \"Today\";\n  if (d === 1) return \"Yesterday\";\n  const dt = new Date(iso);\n  return `${dt.getUTCDate()} ${[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"][dt.getUTCMonth()]}`;\n}\n\ntype Tab = \"all\" | \"comment\" | \"status\" | \"mention\";\n\nexport function ActivityFeed({ title = \"Activity\", items, incoming = DEFAULT_INCOMING, interval = 3500, now: nowProp = \"2026-11-01T15:00:00Z\", currentUser = \"You\", onReply, theme = \"dark\", className }: ActivityFeedProps) {\n  const p = PALETTES[theme];\n  const reduce = !!useReducedMotion();\n  const uid = React.useId();\n  const [list, setList] = React.useState<ActivityItem[]>(() => items ?? DEFAULT_ITEMS);\n  const [queue, setQueue] = React.useState<ActivityItem[]>([]);\n  const [tab, setTab] = React.useState<Tab>(\"all\");\n  const [mine, setMine] = React.useState<Record<string, string[]>>({});\n  const [replyOpen, setReplyOpen] = React.useState<string | null>(null);\n  const [replies, setReplies] = React.useState<Record<string, string[]>>({});\n  const [fresh, setFresh] = React.useState<string[]>([]);\n  const [now, setNow] = React.useState(nowProp);\n  const sent = React.useRef(0);\n\n  React.useEffect(() => {\n    if (!incoming.length) return;\n    const t = setInterval(() => {\n      const next = incoming[sent.current];\n      if (!next) return clearInterval(t);\n      sent.current += 1;\n      setNow((n) => new Date(Date.parse(n) + 60000).toISOString());\n      setQueue((q) => [{ ...next, id: `${next.id}-${sent.current}` }, ...q]);\n    }, interval);\n    return () => clearInterval(t);\n  }, [incoming, interval]);\n\n  const showNew = () => {\n    const stamped = queue.map((q) => ({ ...q, time: now }));\n    setFresh(stamped.map((q) => q.id));\n    setList((l) => [...stamped, ...l]);\n    setQueue([]);\n  };\n  const unread = list.filter((x) => x.unread).length;\n  const match = (x: ActivityItem) => tab === \"all\" || x.kind === tab || (tab === \"comment\" && x.kind === \"mention\");\n  const rows = list.filter(match);\n  const groups: { day: string; items: ActivityItem[] }[] = [];\n  rows.forEach((x) => {\n    const d = dayLabel(x.time, now);\n    const g = groups[groups.length - 1];\n    if (g && g.day === d) g.items.push(x);\n    else groups.push({ day: d, items: [x] });\n  });\n  const counts: Record<Tab, number> = { all: list.length, comment: list.filter((x) => x.kind === \"comment\" || x.kind === \"mention\").length, status: list.filter((x) => x.kind === \"status\").length, mention: list.filter((x) => x.kind === \"mention\").length };\n\n  const react = (id: string, emoji: string) => setMine((m) => ({ ...m, [id]: (m[id] ?? []).includes(emoji) ? (m[id] ?? []).filter((e) => e !== emoji) : [...(m[id] ?? []), emoji] }));\n  const focusReply = React.useCallback((el: HTMLInputElement | null) => el?.focus({ preventScroll: true }), []);\n\n  const ring = { [\"--tw-ring-color\" as string]: p.ring, [\"--tw-ring-offset-color\" as string]: p.card } as React.CSSProperties;\n  const focus = \"outline-none focus-visible:ring-2 focus-visible:ring-offset-2\";\n  const avatar = (a: ActivityItem[\"actor\"], size = 32) =>\n    a.avatar ? (\n      // eslint-disable-next-line @next/next/no-img-element\n      <img src={a.avatar} alt=\"\" width={size} height={size} className=\"shrink-0 rounded-full object-cover\" style={{ width: size, height: size }} />\n    ) : (\n      <span className=\"flex shrink-0 items-center justify-center rounded-full text-[11px] font-semibold\" style={{ width: size, height: size, background: p.chip, color: p.muted }} aria-hidden=\"true\">\n        {a.name\n          .split(/[\\s-]/)\n          .map((w) => w[0])\n          .join(\"\")\n          .slice(0, 2)\n          .toUpperCase()}\n      </span>\n    );\n  const statusPill = (s: string) => (\n    <span className=\"inline-flex items-center gap-1.5 rounded-full border px-2 py-0.5 text-[12px]\" style={{ borderColor: p.border }}>\n      <span className=\"h-1.5 w-1.5 rounded-full\" style={{ background: STATUS_COLOR[s] ?? p.faint }} aria-hidden=\"true\" />\n      {s}\n    </span>\n  );\n\n  return (\n    <section className={cn(\"@container w-full\", className)} style={{ background: p.bg, color: p.text }}>\n      <div className=\"mx-auto max-w-2xl px-4 py-10 @[640px]:px-6 @[640px]:py-14\">\n        <div className=\"overflow-hidden rounded-2xl border\" style={{ background: p.card, borderColor: p.border }}>\n          <div className=\"flex items-center justify-between gap-3 px-5 pt-5\">\n            <h2 className=\"m-0 flex items-center gap-2 text-[18px] font-semibold tracking-[-0.01em]\">\n              {title}\n              {unread > 0 && (\n                <span className=\"rounded-full px-1.5 py-px text-[11px] font-semibold tabular-nums\" style={{ background: p.accent, color: \"#0A0A0A\" }}>\n                  {unread}\n                  <span className=\"sr-only\"> unread</span>\n                </span>\n              )}\n            </h2>\n            <button type=\"button\" disabled={!unread} onClick={() => setList((l) => l.map((x) => ({ ...x, unread: false })))} className={cn(\"cursor-pointer rounded-md border-0 bg-transparent px-1.5 py-1 text-[12.5px] disabled:cursor-default disabled:opacity-40\", focus)} style={{ color: p.muted, ...ring }}>\n              Mark all as read\n            </button>\n          </div>\n          <div role=\"tablist\" aria-label=\"Filter activity\" className=\"mt-3 flex gap-1 overflow-x-auto border-b px-4\" style={{ borderColor: p.border }}>\n            {(\n              [\n                [\"all\", \"All\"],\n                [\"comment\", \"Comments\"],\n                [\"status\", \"Updates\"],\n                [\"mention\", \"Mentions\"],\n              ] as [Tab, string][]\n            ).map(([id, label]) => (\n              <button key={id} type=\"button\" role=\"tab\" aria-selected={tab === id} onClick={() => setTab(id)} className={cn(\"relative shrink-0 cursor-pointer border-0 bg-transparent px-2.5 pt-1 pb-2.5 text-[13px]\", focus)} style={{ color: tab === id ? p.text : p.muted, ...ring }}>\n                {label} <span className=\"tabular-nums\" style={{ color: p.faint }}>{counts[id]}</span>\n                {tab === id && <motion.span layoutId={`${uid}-tab`} className=\"absolute inset-x-1.5 -bottom-px h-[2px] rounded-full\" style={{ background: p.on }} transition={reduce ? { duration: 0 } : { type: \"spring\", stiffness: 500, damping: 38 }} />}\n              </button>\n            ))}\n          </div>\n\n          <div className=\"relative\">\n            <AnimatePresence>\n              {queue.length > 0 && (\n                <motion.div initial={reduce ? false : { opacity: 0, y: -8 }} animate={{ opacity: 1, y: 0 }} exit={reduce ? undefined : { opacity: 0, y: -8 }} className=\"pointer-events-none absolute inset-x-0 top-3 z-10 flex justify-center\">\n                  <button type=\"button\" onClick={showNew} className={cn(\"pointer-events-auto flex h-8 cursor-pointer items-center gap-2 rounded-full border-0 pr-3.5 pl-1.5 text-[12.5px] font-medium shadow-lg\", focus)} style={{ background: p.on, color: p.onText, ...ring }} aria-live=\"polite\">\n                    <span className=\"flex -space-x-1.5\">\n                      {queue.slice(0, 3).map((q) => (\n                        <span key={q.id} className=\"rounded-full ring-2\" style={{ [\"--tw-ring-color\" as string]: p.on }}>\n                          {avatar(q.actor, 20)}\n                        </span>\n                      ))}\n                    </span>\n                    {queue.length} new {queue.length === 1 ? \"activity\" : \"activities\"}\n                    <svg width=\"11\" height=\"11\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden=\"true\">\n                      <path d=\"M8 13V3m0 0L4 7m4-4 4 4\" />\n                    </svg>\n                  </button>\n                </motion.div>\n              )}\n            </AnimatePresence>\n\n            <div className=\"px-5 pt-2 pb-4\">\n              {groups.map((g) => (\n                <section key={g.day} aria-label={g.day}>\n                  <h3 className=\"m-0 pt-4 pb-1 text-[11.5px] font-medium tracking-wide uppercase\" style={{ color: p.faint }}>\n                    {g.day}\n                  </h3>\n                  <ol className=\"m-0 list-none p-0\">\n                    <AnimatePresence initial={false}>\n                      {g.items.map((x, i) => {\n                        const k = KIND[x.kind];\n                        const my = mine[x.id] ?? [];\n                        const reacts = { ...(x.reactions ?? {}) };\n                        my.forEach((e) => (reacts[e] = (reacts[e] ?? 0) + 1));\n                        const last = i === g.items.length - 1;\n                        return (\n                          <motion.li key={x.id} layout={!reduce} initial={reduce ? false : { opacity: 0, height: 0 }} animate={{ opacity: 1, height: \"auto\" }} exit={reduce ? undefined : { opacity: 0, height: 0 }} transition={{ duration: 0.3 }} className=\"relative overflow-hidden\">\n                            <motion.div className=\"relative -mx-2 flex gap-3 rounded-xl px-2 py-3\" initial={fresh.includes(x.id) && !reduce ? { backgroundColor: p.chip } : false} animate={{ backgroundColor: \"rgba(0,0,0,0)\" }} transition={{ duration: 2 }}>\n                              {!last && <span className=\"absolute top-12 bottom-0 left-[25px] w-px\" style={{ background: p.border }} aria-hidden=\"true\" />}\n                              <span className=\"relative h-8 shrink-0 self-start\">\n                                {avatar(x.actor)}\n                                <span className=\"absolute -right-1 -bottom-1 flex h-4 w-4 items-center justify-center rounded-full border-2\" style={{ background: k.color, borderColor: p.card }} title={k.label} aria-hidden=\"true\" />\n                              </span>\n                              <div className=\"min-w-0 flex-1\">\n                                <p className=\"m-0 text-[13.5px] leading-[1.5]\" style={{ color: p.muted }}>\n                                  <span className=\"font-semibold\" style={{ color: p.text }}>\n                                    {x.actor.name}\n                                  </span>{\" \"}\n                                  {x.action}{\" \"}\n                                  <a href=\"#\" onClick={(e) => e.preventDefault()} className={cn(\"rounded font-medium underline-offset-2 hover:underline\", focus)} style={{ color: p.text, ...ring }}>\n                                    {x.target}\n                                  </a>\n                                  <span className=\"ml-2 text-[12px] whitespace-nowrap\" style={{ color: p.faint }}>\n                                    <time dateTime={x.time}>{rel(x.time, now)}</time>\n                                  </span>\n                                  {x.unread && <span className=\"ml-2 inline-block h-1.5 w-1.5 rounded-full align-middle\" style={{ background: p.accent }} aria-label=\"Unread\" />}\n                                </p>\n                                {x.from && x.to && (\n                                  <div className=\"mt-2 flex flex-wrap items-center gap-1.5 text-[12px]\" style={{ color: p.text }}>\n                                    {statusPill(x.from)}\n                                    <svg width=\"12\" height=\"12\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-label=\"to\" style={{ color: p.faint }}>\n                                      <path d=\"M3 8h10m-4-4 4 4-4 4\" />\n                                    </svg>\n                                    {statusPill(x.to)}\n                                  </div>\n                                )}\n                                {x.comment && (\n                                  <blockquote className=\"m-0 mt-2 rounded-xl px-3.5 py-2.5 text-[13.5px] leading-[1.55]\" style={{ background: p.quote, color: p.text }}>\n                                    {x.comment.split(/(@\\w+)/).map((s, j) =>\n                                      s.startsWith(\"@\") ? (\n                                        <span key={j} className=\"rounded px-0.5 font-medium\" style={{ color: p.accent }}>\n                                          {s === \"@you\" ? `@${currentUser}` : s}\n                                        </span>\n                                      ) : (\n                                        s\n                                      ),\n                                    )}\n                                  </blockquote>\n                                )}\n                                {x.file && (\n                                  <a href=\"#\" onClick={(e) => e.preventDefault()} className={cn(\"mt-2 flex w-fit max-w-full items-center gap-2.5 rounded-xl border px-3 py-2\", focus)} style={{ borderColor: p.border, color: p.text, ...ring }}>\n                                    <span className=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg font-mono text-[9.5px] font-bold uppercase\" style={{ background: p.chip, color: KIND.file.color }} aria-hidden=\"true\">\n                                      {x.file.name.split(\".\").pop()}\n                                    </span>\n                                    <span className=\"min-w-0\">\n                                      <span className=\"block truncate text-[13px] font-medium\">{x.file.name}</span>\n                                      <span className=\"block text-[11.5px]\" style={{ color: p.faint }}>\n                                        {x.file.size}\n                                      </span>\n                                    </span>\n                                  </a>\n                                )}\n                                {(replies[x.id] ?? []).map((r, j) => (\n                                  <div key={j} className=\"mt-2 flex items-start gap-2 text-[13px]\">\n                                    <span className=\"flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-[9px] font-semibold\" style={{ background: p.chip, color: p.muted }} aria-hidden=\"true\">\n                                      {currentUser[0]}\n                                    </span>\n                                    <p className=\"m-0\" style={{ color: p.text }}>\n                                      <span className=\"font-semibold\">{currentUser}</span> <span style={{ color: p.muted }}>{r}</span>\n                                    </p>\n                                  </div>\n                                ))}\n                                <div className=\"mt-2 flex flex-wrap items-center gap-1\">\n                                  {Object.entries(reacts).map(([e, n]) => (\n                                    <button key={e} type=\"button\" aria-pressed={my.includes(e)} aria-label={`${e} ${n}`} onClick={() => react(x.id, e)} className={cn(\"flex h-6 cursor-pointer items-center gap-1 rounded-full border px-2 text-[12px] tabular-nums\", focus)} style={{ borderColor: my.includes(e) ? p.accent : p.border, background: my.includes(e) ? p.chip : \"transparent\", color: p.text, ...ring }}>\n                                      <span aria-hidden=\"true\">{e}</span>\n                                      {n}\n                                    </button>\n                                  ))}\n                                  {!reacts[\"👍\"] && (\n                                    <button type=\"button\" aria-label=\"React with thumbs up\" onClick={() => react(x.id, \"👍\")} className={cn(\"flex h-6 w-7 cursor-pointer items-center justify-center rounded-full border-0 bg-transparent text-[12px]\", focus)} style={{ color: p.faint, ...ring }}>\n                                      <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                                        <circle cx=\"12\" cy=\"12\" r=\"9\" />\n                                        <path d=\"M8.5 14a4 4 0 0 0 7 0M9 9.5h.01M15 9.5h.01M18 3v4M16 5h4\" />\n                                      </svg>\n                                    </button>\n                                  )}\n                                  {(x.kind === \"comment\" || x.kind === \"mention\") && (\n                                    <button type=\"button\" aria-expanded={replyOpen === x.id} onClick={() => setReplyOpen((r) => (r === x.id ? null : x.id))} className={cn(\"h-6 cursor-pointer rounded-full border-0 bg-transparent px-2 text-[12px]\", focus)} style={{ color: p.muted, ...ring }}>\n                                      Reply\n                                    </button>\n                                  )}\n                                </div>\n                                <AnimatePresence initial={false}>\n                                  {replyOpen === x.id && (\n                                    <motion.form\n                                      initial={reduce ? false : { opacity: 0, height: 0 }}\n                                      animate={{ opacity: 1, height: \"auto\" }}\n                                      exit={reduce ? undefined : { opacity: 0, height: 0 }}\n                                      className=\"overflow-hidden\"\n                                      onSubmit={(e) => {\n                                        e.preventDefault();\n                                        const input = e.currentTarget.elements.namedItem(\"reply\") as HTMLInputElement;\n                                        const text = input.value.trim();\n                                        if (!text) return;\n                                        setReplies((r) => ({ ...r, [x.id]: [...(r[x.id] ?? []), text] }));\n                                        onReply?.(x.id, text);\n                                        setReplyOpen(null);\n                                      }}\n                                    >\n                                      <div className=\"mt-2 flex gap-2\">\n                                        <input ref={focusReply} name=\"reply\" aria-label={`Reply to ${x.actor.name}`} placeholder=\"Write a reply…\" onKeyDown={(e) => e.key === \"Escape\" && setReplyOpen(null)} className={cn(\"h-9 min-w-0 flex-1 rounded-lg border px-3 text-[13px]\", focus)} style={{ borderColor: p.border, background: p.input, color: p.text, ...ring }} />\n                                        <button type=\"submit\" className={cn(\"h-9 shrink-0 cursor-pointer rounded-lg border-0 px-3 text-[13px] font-medium\", focus)} style={{ background: p.on, color: p.onText, ...ring }}>\n                                          Send\n                                        </button>\n                                      </div>\n                                    </motion.form>\n                                  )}\n                                </AnimatePresence>\n                              </div>\n                            </motion.div>\n                          </motion.li>\n                        );\n                      })}\n                    </AnimatePresence>\n                  </ol>\n                </section>\n              ))}\n              {rows.length === 0 && (\n                <p className=\"m-0 py-12 text-center text-[14px]\" style={{ color: p.muted }}>\n                  Nothing here yet.\n                </p>\n              )}\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n\nexport default ActivityFeed;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}