{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "channel-reactions",
  "title": "Channel Reactions",
  "description": "A team chat channel where a launch message collects emoji reactions and replies.",
  "dependencies": ["remotion", "@remotion/google-fonts"],
  "registryDependencies": ["@remocn/gsh"],
  "files": [
    {
      "path": "registry/remocn/channel-reactions/index.tsx",
      "content": "\"use client\";\n\nimport { loadFont as loadOnest } from \"@remotion/google-fonts/Onest\";\nimport type React from \"react\";\nimport {\n  AbsoluteFill,\n  Easing,\n  Img,\n  interpolate,\n  spring,\n  staticFile,\n  useCurrentFrame,\n  useVideoConfig,\n} from \"remotion\";\nimport type { GradientParams } from \"@/lib/remocn/gsh/gradient-engine\";\nimport { GshGround } from \"@/lib/remocn/gsh/gsh-ground\";\nimport type { GshPresetId } from \"@/lib/remocn/gsh/presets\";\n\nconst onest = loadOnest(\"normal\", {\n  weights: [\"300\", \"400\"],\n  subsets: [\"latin\"],\n});\n\nexport interface ChannelAuthor {\n  name: string;\n  color: string;\n}\n\nexport interface ChannelReaction {\n  emoji: string;\n  count: number;\n}\n\nexport interface ChannelReply {\n  author: ChannelAuthor;\n  text: string;\n}\n\nexport interface ChannelReactionsProps {\n  author?: ChannelAuthor;\n  message?: string;\n  link?: { url: string; title: string; description: string; site: string };\n  /** Unfurl image. */\n  image?: string;\n  reactions?: ChannelReaction[];\n  replies?: ChannelReply[];\n  /** Final \"N replies\" count on the thread line. */\n  replyCount?: number;\n  workspace?: string;\n  channel?: string;\n  /** Large line above the window in the 9:16 layout. */\n  headline?: string;\n  theme?: \"light\" | \"dark\";\n  accent?: string;\n  speed?: number;\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n}\n\nconst PEOPLE = {\n  maya: { name: \"Maya Chen\", color: \"#B4577E\" },\n  leo: { name: \"Leo Park\", color: \"#3E7F62\" },\n  priya: { name: \"Priya Raman\", color: \"#B26B2C\" },\n  sam: { name: \"Sam Ortiz\", color: \"#4A6FA8\" },\n};\n\nconst DEFAULT_REACTIONS: ChannelReaction[] = [\n  { emoji: \"🚀\", count: 48 },\n  { emoji: \"🔥\", count: 36 },\n  { emoji: \"🎉\", count: 27 },\n  { emoji: \"👏\", count: 19 },\n  { emoji: \"🙌\", count: 12 },\n];\n\nconst HISTORY: { person: ChannelAuthor; time: string; text: string }[] = [\n  {\n    person: PEOPLE.sam,\n    time: \"9:48 AM\",\n    text: \"Launch checklist is pinned. Shout if anything is still blocked.\",\n  },\n  {\n    person: PEOPLE.leo,\n    time: \"10:02 AM\",\n    text: \"Final cut is rendering now, about five minutes to go.\",\n  },\n  {\n    person: PEOPLE.priya,\n    time: \"10:06 AM\",\n    text: \"Changelog is merged and the docs are live.\",\n  },\n];\n\nconst DEFAULT_REPLIES: ChannelReply[] = [\n  {\n    author: PEOPLE.leo,\n    text: \"Already rebuilding our onboarding video with it.\",\n  },\n  { author: PEOPLE.priya, text: \"The captions tab alone is worth it.\" },\n];\n\nconst CARD = { mass: 0.8, damping: 18, stiffness: 160 };\nconst HEAVY = { mass: 1, damping: 26, stiffness: 120 };\nconst CHIP = { mass: 0.5, damping: 12, stiffness: 200 };\nconst MORPH = { damping: 200 };\nconst PRESS = { mass: 0.4, damping: 14, stiffness: 420 };\nconst HAND = { mass: 0.9, damping: 22, stiffness: 140 };\nconst ENTER = Easing.bezier(0.32, 0.72, 0, 1);\nconst LIGHT = Easing.bezier(0.22, 1, 0.36, 1);\nconst EXIT = Easing.bezier(0.55, 0, 1, 0.45);\nconst CAMERA = Easing.bezier(0.87, 0, 0.13, 1);\nconst CL = { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" } as const;\nconst clamp = (v: number, lo = 0, hi = 1) => Math.min(hi, Math.max(lo, v));\n\nfunction withAlpha(color: string, alpha: number) {\n  const hex = color.replace(\"#\", \"\");\n  const full = hex.length === 3 ? hex.replace(/(.)/g, \"$1$1\") : hex;\n  if (!/^[0-9a-fA-F]{6}$/.test(full)) return color;\n  const n = Number.parseInt(full, 16);\n  return `rgba(${(n >> 16) & 255}, ${(n >> 8) & 255}, ${n & 255}, ${alpha})`;\n}\n\nfunction palette(theme: \"light\" | \"dark\", accent: string) {\n  const d = theme === \"dark\";\n  return {\n    dark: d,\n    window: d ? \"#141518\" : \"#FFFFFF\",\n    side: d ? \"#101114\" : \"#F7F5F1\",\n    text: d ? \"#DADBDE\" : \"#2A2926\",\n    strong: d ? \"#F4F4F5\" : \"#151412\",\n    muted: d ? \"#8E9097\" : \"#7A766F\",\n    rule: d ? \"rgba(255,255,255,0.07)\" : \"rgba(30,28,24,0.08)\",\n    pill: d ? \"rgba(255,255,255,0.06)\" : \"rgba(30,28,24,0.05)\",\n    link: d ? \"#9DB4FF\" : accent,\n    hover: d ? \"rgba(255,255,255,0.035)\" : \"rgba(30,28,24,0.03)\",\n    panel: d ? \"#1E1F23\" : \"#FFFFFF\",\n    depth: d\n      ? \"0 0 0 1px rgba(255,255,255,0.09), 0 12px 24px -12px rgba(0,0,0,0.6), 0 40px 90px -24px rgba(0,0,0,0.7)\"\n      : \"0 0 0 1px rgba(30,20,10,0.06), 0 2px 4px rgba(30,20,10,0.04), 0 40px 90px -24px rgba(90,40,10,0.32)\",\n    raised: d\n      ? \"0 0 0 1px rgba(255,255,255,0.09), 0 8px 18px -8px rgba(0,0,0,0.6)\"\n      : \"0 0 0 1px rgba(30,28,24,0.07), 0 1px 2px rgba(30,28,24,0.05), 0 8px 18px -8px rgba(30,28,24,0.16)\",\n    outline: d ? \"rgba(255,255,255,0.1)\" : \"rgba(0,0,0,0.1)\",\n  };\n}\ntype Pal = ReturnType<typeof palette>;\n\nfunction Avatar({ person, size }: { person: ChannelAuthor; size: number }) {\n  const initials = person.name\n    .split(\" \")\n    .map((w) => w[0])\n    .join(\"\")\n    .slice(0, size < 30 ? 1 : 2);\n  return (\n    <div\n      style={{\n        width: size,\n        height: size,\n        flexShrink: 0,\n        borderRadius: size * 0.28,\n        background: person.color,\n        color: \"rgba(255,255,255,0.95)\",\n        fontSize: size * (size < 30 ? 0.46 : 0.38),\n        display: \"flex\",\n        alignItems: \"center\",\n        justifyContent: \"center\",\n        letterSpacing: \"0.02em\",\n      }}\n    >\n      {initials}\n    </div>\n  );\n}\n\nfunction Count({ value }: { value: number }) {\n  return (\n    <span style={{ fontVariantNumeric: \"tabular-nums\" }}>\n      {Math.max(1, Math.floor(value))}\n    </span>\n  );\n}\n\nfunction Grow({ p, children }: { p: number; children: React.ReactNode }) {\n  return (\n    <div style={{ display: \"grid\", gridTemplateRows: `${clamp(p, 0, 1)}fr` }}>\n      <div\n        style={{ minHeight: 0, overflow: p >= 0.999 ? \"visible\" : \"hidden\" }}\n      >\n        {children}\n      </div>\n    </div>\n  );\n}\n\nfunction Message({\n  person,\n  time,\n  pal,\n  children,\n  context,\n  bg,\n  pad,\n}: {\n  person: ChannelAuthor;\n  time: string;\n  pal: Pal;\n  children: React.ReactNode;\n  context?: string;\n  bg?: string;\n  pad: number;\n}) {\n  return (\n    <div\n      style={{\n        display: \"flex\",\n        gap: 12,\n        padding: `10px ${pad}px`,\n        background: bg,\n        position: \"relative\",\n      }}\n    >\n      <Avatar person={person} size={38} />\n      <div style={{ flex: 1, minWidth: 0 }}>\n        {context ? (\n          <div style={{ fontSize: 14, color: pal.muted, marginBottom: 2 }}>\n            replied to a thread: {context}\n          </div>\n        ) : null}\n        <div style={{ display: \"flex\", alignItems: \"baseline\", gap: 8 }}>\n          <span style={{ fontSize: 16, color: pal.strong }}>{person.name}</span>\n          <span style={{ fontSize: 14, color: pal.muted }}>{time}</span>\n        </div>\n        <div\n          style={{\n            fontSize: 16,\n            lineHeight: \"24px\",\n            color: pal.text,\n            marginTop: 1,\n          }}\n        >\n          {children}\n        </div>\n      </div>\n    </div>\n  );\n}\n\nfunction MacCursor({ press }: { press: number }) {\n  return (\n    <svg\n      width={22}\n      height={26}\n      viewBox=\"0 0 20 24\"\n      style={{\n        transformOrigin: \"2px 2px\",\n        transform: `scale(${1 - 0.12 * press})`,\n        filter: \"drop-shadow(0 2px 4px rgba(0,0,0,0.3))\",\n        overflow: \"visible\",\n      }}\n    >\n      <path\n        d=\"M2 2 L2 19.5 L6.6 15.4 L9.8 22.4 L12.9 21 L9.8 14.2 L16 14.2 Z\"\n        fill=\"#FFFFFF\"\n        stroke=\"#111114\"\n        strokeWidth={1.1}\n        strokeLinejoin=\"round\"\n      />\n    </svg>\n  );\n}\n\nconst I = {\n  emoji:\n    \"M12 20 A8 8 0 1 1 12 4 A8 8 0 0 1 12 20 Z M9 10 H9.01 M15 10 H15.01 M8.5 14 C10 16 14 16 15.5 14\",\n  reply: \"M5 6 H19 V16 H11 L7 19 V16 H5 Z\",\n  dots: \"M12 6 H12.01 M12 12 H12.01 M12 18 H12.01\",\n  plus: \"M12 6 V18 M6 12 H18\",\n  send: \"M4 12 L20 5 L15 20 L11 13 Z\",\n  hash: \"M9.5 4 L8 20 M16 4 L14.5 20 M5 9 H19.5 M4.5 15 H19\",\n  chev: \"M7 10 L12 15 L17 10\",\n};\nconst ic = (d: string, color: string, size = 18) => (\n  <svg\n    width={size}\n    height={size}\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke={color}\n    strokeWidth={1.5}\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n    style={{ flexShrink: 0 }}\n  >\n    <path d={d} />\n  </svg>\n);\n\nconst CHANNELS = [\"general\", \"design\", \"launch\", \"marketing\"];\n\nfunction Sidebar({\n  pal,\n  workspace,\n  channel,\n}: {\n  pal: Pal;\n  workspace: string;\n  channel: string;\n}) {\n  return (\n    <div\n      style={{\n        width: 220,\n        flexShrink: 0,\n        background: pal.side,\n        boxShadow: `inset -1px 0 0 ${pal.rule}`,\n        padding: \"18px 12px\",\n        boxSizing: \"border-box\",\n      }}\n    >\n      <div\n        style={{\n          fontSize: 17,\n          color: pal.strong,\n          padding: \"0 10px 18px\",\n          display: \"flex\",\n          alignItems: \"center\",\n          gap: 4,\n          letterSpacing: \"-0.01em\",\n        }}\n      >\n        {workspace}\n        {ic(I.chev, pal.muted, 16)}\n      </div>\n      <div style={{ fontSize: 14, color: pal.muted, padding: \"0 10px 8px\" }}>\n        Channels\n      </div>\n      {CHANNELS.map((ch) => {\n        const active = ch === \"launch\";\n        const label = active ? channel : ch;\n        return (\n          <div\n            key={ch}\n            style={{\n              display: \"flex\",\n              alignItems: \"center\",\n              gap: 8,\n              height: 34,\n              padding: \"0 10px\",\n              borderRadius: 8,\n              fontSize: 15,\n              background: active ? pal.pill : undefined,\n              color: active ? pal.strong : pal.muted,\n            }}\n          >\n            {ic(I.hash, active ? pal.strong : pal.muted, 15)}\n            {label}\n          </div>\n        );\n      })}\n    </div>\n  );\n}\n\nexport function ChannelReactions({\n  author = PEOPLE.maya,\n  message = \"remocn v2 is live. Thirty new components, a captions tab, and a studio that renders right in your browser. Take it for a spin:\",\n  link = {\n    url: \"remocn.dev/v2\",\n    site: \"remocn.dev\",\n    title: \"remocn 2.0: launch videos from components\",\n    description:\n      \"Copy-paste Remotion components for every beat of your launch video.\",\n  },\n  image,\n  reactions = DEFAULT_REACTIONS,\n  replies = DEFAULT_REPLIES,\n  replyCount = 14,\n  workspace = \"remocn\",\n  channel = \"launch\",\n  headline = \"Launch day, live\",\n  theme = \"light\",\n  accent = \"#3B5BFD\",\n  speed = 1,\n  ground,\n  groundParams,\n}: ChannelReactionsProps) {\n  const frame = useCurrentFrame() * speed;\n  const { width, height, fps } = useVideoConfig();\n  const tall = height > width;\n  const SW = tall ? 720 : 1280;\n  const SH = tall ? 1280 : 720;\n  const u = Math.min(width / SW, height / SH);\n  const pal = palette(theme, accent);\n  const sp = (at: number, config: Partial<typeof CARD>, dur?: number) =>\n    spring({ frame: frame - at, fps, config, durationInFrames: dur });\n  const ease = (a: number, b: number, easing = ENTER) =>\n    interpolate(frame, [a, b], [0, 1], { ...CL, easing });\n\n  const WIN = tall\n    ? { x: 80, y: 290, w: 560, h: 880 }\n    : { x: 140, y: 64, w: 1000, h: 592 };\n  const SIDE = tall ? 0 : 220;\n  const PAD = tall ? 18 : 24;\n  const mainW = WIN.w - SIDE;\n\n  const win = sp(0, HEAVY);\n  const winFade = ease(0, 12);\n  const cam = interpolate(frame, [0, 220], [1, 1.03], {\n    ...CL,\n    easing: CAMERA,\n  });\n  const headIn = ease(4, 20);\n\n  const msgIn = sp(16, MORPH, 16);\n  const msgFade = ease(16, 26);\n  const unfurl = sp(30, MORPH, 16);\n  const unfurlFade = ease(32, 44);\n\n  const barW = 268;\n  const barX = mainW - PAD - barW;\n  const target = { x: barX + 24, y: -6 };\n  const cursorKeys = [\n    { f: 44, x: mainW + 40, y: 300 },\n    { f: 76, x: target.x, y: target.y },\n    { f: 86, x: target.x, y: target.y },\n    { f: 112, x: mainW + 60, y: 380 },\n  ];\n  let cx = cursorKeys[0].x;\n  let cy = cursorKeys[0].y;\n  for (let i = 1; i < cursorKeys.length; i++) {\n    const a = cursorKeys[i - 1];\n    const b = cursorKeys[i];\n    if (frame < a.f) break;\n    const p = sp(a.f, HAND, b.f - a.f);\n    const dx = b.x - a.x;\n    const dy = b.y - a.y;\n    const d = Math.hypot(dx, dy) || 1;\n    const arc = Math.sin(clamp(p) * Math.PI) * Math.min(50, d * 0.16);\n    cx = a.x + dx * p + (dy / d) * arc;\n    cy = a.y + dy * p - (dx / d) * arc;\n  }\n  const press = sp(76, PRESS) - sp(81, PRESS);\n  const cursorOpacity = ease(44, 52) * (1 - ease(104, 112, EXIT));\n  const hover = ease(56, 64) * (1 - ease(92, 100, EXIT));\n  const barIn = sp(58, CARD);\n  const barOut = 1 - ease(90, 98, EXIT);\n\n  const popAt = reactions.map((_, i) => (i === 0 ? 80 : 86 + i * 6));\n  const rowIn = sp(78, MORPH, 12);\n  const threadIn = sp(104, MORPH, 14);\n  const replyAt = replies.map((_, i) => 120 + i * 24);\n  const threadAvatars = [PEOPLE.leo, PEOPLE.priya, PEOPLE.sam, PEOPLE.maya];\n  const typing = 1 - ease(12, 18, EXIT);\n\n  return (\n    <AbsoluteFill\n      style={{\n        fontFamily: onest.fontFamily,\n        WebkitFontSmoothing: \"antialiased\",\n        overflow: \"hidden\",\n      }}\n    >\n      <GshGround\n        preset={ground ?? (pal.dark ? \"hearth\" : \"paper-crease\")}\n        params={\n          groundParams ??\n          (pal.dark || ground\n            ? undefined\n            : {\n                colors: [\"#ff9a5c\", \"#ffc9a3\", \"#f6e3d3\", \"#a8553a\"],\n                background: \"#f3ece4\",\n              })\n        }\n        timeOffset={pal.dark ? 4 : 5}\n        timeScale={0.35}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          left: (width - SW * u) / 2,\n          top: (height - SH * u) / 2,\n          width: SW,\n          height: SH,\n          transform: `scale(${u})`,\n          transformOrigin: \"0 0\",\n        }}\n      >\n        {tall ? (\n          <div\n            style={{\n              position: \"absolute\",\n              left: WIN.x,\n              top: 150,\n              width: WIN.w,\n              fontSize: 52,\n              fontWeight: 300,\n              letterSpacing: \"-0.035em\",\n              lineHeight: 1.04,\n              color: pal.dark ? \"#F6F2EE\" : \"#1E1A16\",\n              opacity: headIn,\n              transform: `translateY(${(1 - headIn) * 18}px)`,\n            }}\n          >\n            {headline}\n          </div>\n        ) : null}\n        <div\n          style={{\n            position: \"absolute\",\n            left: WIN.x,\n            top: WIN.y,\n            width: WIN.w,\n            height: WIN.h,\n            borderRadius: 18,\n            overflow: \"hidden\",\n            display: \"flex\",\n            background: pal.window,\n            boxShadow: pal.depth,\n            opacity: winFade,\n            transformOrigin: \"50% 50%\",\n            transform: `translateY(${(1 - win) * 60}px) scale(${(0.96 + 0.04 * win) * cam})`,\n          }}\n        >\n          {SIDE ? (\n            <Sidebar pal={pal} workspace={workspace} channel={channel} />\n          ) : null}\n          <div\n            style={{\n              flex: 1,\n              display: \"flex\",\n              flexDirection: \"column\",\n              minWidth: 0,\n            }}\n          >\n            <div\n              style={{\n                height: 60,\n                flexShrink: 0,\n                display: \"flex\",\n                alignItems: \"center\",\n                padding: `0 ${PAD}px`,\n                boxShadow: `inset 0 -1px 0 ${pal.rule}`,\n              }}\n            >\n              <span\n                style={{\n                  fontSize: 18,\n                  color: pal.strong,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  gap: 6,\n                  letterSpacing: \"-0.01em\",\n                }}\n              >\n                {ic(I.hash, pal.muted, 17)}\n                {channel}\n              </span>\n              <div\n                style={{\n                  marginLeft: \"auto\",\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  gap: 8,\n                  color: pal.muted,\n                  fontSize: 15,\n                }}\n              >\n                <svg\n                  width={18}\n                  height={18}\n                  viewBox=\"0 0 24 24\"\n                  fill=\"none\"\n                  stroke={pal.muted}\n                  strokeWidth={1.5}\n                  strokeLinecap=\"round\"\n                >\n                  <path d=\"M9 11 A3.5 3.5 0 1 0 9 4 A3.5 3.5 0 0 0 9 11 Z M3 20 C3 16.5 5.7 14 9 14 C12.3 14 15 16.5 15 20 M16 4.3 A3.5 3.5 0 0 1 16 10.7 M18 14.3 C19.9 15 21 17.2 21 20\" />\n                </svg>\n                <span style={{ fontVariantNumeric: \"tabular-nums\" }}>24</span>\n              </div>\n            </div>\n            <div\n              style={{\n                flex: 1,\n                position: \"relative\",\n                overflow: \"hidden\",\n                maskImage:\n                  \"linear-gradient(to bottom, transparent, black 40px)\",\n              }}\n            >\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 0,\n                  right: 0,\n                  bottom: 6,\n                  display: \"flex\",\n                  flexDirection: \"column\",\n                }}\n              >\n                {HISTORY.map((h) => (\n                  <Message\n                    key={h.time}\n                    person={h.person}\n                    time={h.time}\n                    pal={pal}\n                    pad={PAD}\n                  >\n                    {h.text}\n                  </Message>\n                ))}\n                <Grow p={msgIn}>\n                  <div\n                    style={{\n                      position: \"relative\",\n                      zIndex: 2,\n                      opacity: msgFade,\n                      transform: `translateY(${(1 - msgFade) * 16}px)`,\n                    }}\n                  >\n                    <Message\n                      person={author}\n                      time=\"10:30 AM\"\n                      pal={pal}\n                      pad={PAD}\n                      bg={\n                        hover > 0\n                          ? withAlpha(\n                              pal.dark ? \"#ffffff\" : \"#1e1c18\",\n                              (pal.dark ? 0.035 : 0.03) * hover,\n                            )\n                          : undefined\n                      }\n                    >\n                      {message}{\" \"}\n                      <span style={{ color: pal.link }}>{link.url}</span>\n                      <Grow p={unfurl}>\n                        <div style={{ opacity: unfurlFade, paddingTop: 10 }}>\n                          <div\n                            style={{\n                              display: \"flex\",\n                              flexDirection: tall ? \"column\" : \"row\",\n                              gap: tall ? 10 : 16,\n                              maxWidth: tall ? 420 : 620,\n                              paddingLeft: 14,\n                              boxShadow: `inset 3px 0 0 ${pal.rule}`,\n                            }}\n                          >\n                            <div style={{ flex: 1, minWidth: 0 }}>\n                              <div style={{ fontSize: 14, color: pal.muted }}>\n                                {link.site}\n                              </div>\n                              <div\n                                style={{\n                                  fontSize: 16,\n                                  color: pal.link,\n                                  marginTop: 3,\n                                  lineHeight: \"22px\",\n                                }}\n                              >\n                                {link.title}\n                              </div>\n                              {tall ? null : (\n                                <div\n                                  style={{\n                                    fontSize: 15,\n                                    color: pal.text,\n                                    marginTop: 3,\n                                    lineHeight: \"21px\",\n                                  }}\n                                >\n                                  {link.description}\n                                </div>\n                              )}\n                            </div>\n                            <div\n                              style={{\n                                width: tall ? 300 : 192,\n                                height: tall ? 158 : 101,\n                                borderRadius: 10,\n                                overflow: \"hidden\",\n                                flexShrink: 0,\n                                position: \"relative\",\n                                background: \"#05141f\",\n                              }}\n                            >\n                              <Img\n                                src={image ?? staticFile(\"hero.png\")}\n                                style={{\n                                  width: \"100%\",\n                                  height: \"100%\",\n                                  objectFit: \"cover\",\n                                  display: \"block\",\n                                }}\n                              />\n                              <div\n                                style={{\n                                  position: \"absolute\",\n                                  inset: 0,\n                                  borderRadius: 10,\n                                  boxShadow: `inset 0 0 0 1px ${pal.outline}`,\n                                }}\n                              />\n                            </div>\n                          </div>\n                        </div>\n                      </Grow>\n                      <Grow p={rowIn}>\n                        <div\n                          style={{\n                            display: \"flex\",\n                            flexWrap: \"wrap\",\n                            gap: 6,\n                            paddingTop: 10,\n                            alignItems: \"center\",\n                          }}\n                        >\n                          {reactions.map((r, i) => {\n                            const s = sp(popAt[i], CHIP);\n                            const self = i === 0;\n                            const start = popAt[i] + 4;\n                            const v = interpolate(\n                              frame,\n                              [start, start + 62 + i * 3],\n                              [1, r.count],\n                              { ...CL, easing: LIGHT },\n                            );\n                            return (\n                              <div\n                                key={r.emoji}\n                                style={{\n                                  display: \"inline-flex\",\n                                  alignItems: \"center\",\n                                  gap: 6,\n                                  height: 30,\n                                  padding: \"0 10px 0 8px\",\n                                  borderRadius: 15,\n                                  boxSizing: \"border-box\",\n                                  background: self\n                                    ? withAlpha(accent, pal.dark ? 0.2 : 0.09)\n                                    : pal.pill,\n                                  boxShadow: self\n                                    ? `inset 0 0 0 1px ${withAlpha(accent, 0.7)}`\n                                    : undefined,\n                                  color: self ? pal.link : pal.text,\n                                  fontSize: 15,\n                                  transform: `scale(${s})`,\n                                  transformOrigin: \"30% 60%\",\n                                }}\n                              >\n                                <span\n                                  style={{ fontSize: 16, lineHeight: \"18px\" }}\n                                >\n                                  {r.emoji}\n                                </span>\n                                <Count value={frame < start ? 1 : v} />\n                              </div>\n                            );\n                          })}\n                          <div\n                            style={{\n                              height: 30,\n                              width: 38,\n                              borderRadius: 15,\n                              background: pal.pill,\n                              display: \"flex\",\n                              alignItems: \"center\",\n                              justifyContent: \"center\",\n                              opacity: ease(\n                                popAt[popAt.length - 1] + 4,\n                                popAt[popAt.length - 1] + 14,\n                              ),\n                            }}\n                          >\n                            {ic(I.emoji, pal.muted, 17)}\n                          </div>\n                        </div>\n                      </Grow>\n                      <Grow p={threadIn}>\n                        <div\n                          style={{\n                            display: \"flex\",\n                            alignItems: \"center\",\n                            gap: 10,\n                            paddingTop: 10,\n                            fontSize: 15,\n                          }}\n                        >\n                          <div style={{ display: \"flex\", gap: 4 }}>\n                            {threadAvatars.map((p, i) => {\n                              const s = sp(104 + i * 6, CHIP);\n                              return (\n                                <div\n                                  key={p.name}\n                                  style={{\n                                    width: 24 * clamp(s),\n                                    transform: `scale(${s})`,\n                                  }}\n                                >\n                                  <Avatar person={p} size={24} />\n                                </div>\n                              );\n                            })}\n                          </div>\n                          <span\n                            style={{\n                              color: pal.link,\n                              display: \"inline-flex\",\n                              gap: 5,\n                            }}\n                          >\n                            <Count\n                              value={interpolate(\n                                frame,\n                                [104, 176],\n                                [1, replyCount],\n                                { ...CL, easing: LIGHT },\n                              )}\n                            />\n                            replies\n                          </span>\n                          {tall ? null : (\n                            <span style={{ color: pal.muted }}>\n                              Last reply just now\n                            </span>\n                          )}\n                        </div>\n                      </Grow>\n                    </Message>\n                    <div\n                      style={{\n                        position: \"absolute\",\n                        left: barX,\n                        top: -18,\n                        width: barW,\n                        height: 38,\n                        boxSizing: \"border-box\",\n                        display: \"flex\",\n                        alignItems: \"center\",\n                        gap: 2,\n                        padding: \"0 5px\",\n                        borderRadius: 10,\n                        background: pal.panel,\n                        boxShadow: pal.raised,\n                        opacity: frame >= 58 ? clamp(barIn) * barOut : 0,\n                        transform: `translateY(${(1 - barIn) * 6}px)`,\n                        fontSize: 15,\n                        color: pal.text,\n                      }}\n                    >\n                      {[reactions[0]?.emoji ?? \"🚀\", \"👀\", \"🙌\"].map((e, i) => (\n                        <div\n                          key={e}\n                          style={{\n                            width: 30,\n                            height: 30,\n                            borderRadius: 7,\n                            display: \"flex\",\n                            alignItems: \"center\",\n                            justifyContent: \"center\",\n                            fontSize: 16,\n                            background:\n                              i === 0\n                                ? withAlpha(\n                                    pal.dark ? \"#ffffff\" : \"#1e1c18\",\n                                    0.07 * ease(68, 74),\n                                  )\n                                : undefined,\n                          }}\n                        >\n                          {e}\n                        </div>\n                      ))}\n                      <div\n                        style={{\n                          width: 1,\n                          height: 20,\n                          background: pal.rule,\n                          margin: \"0 4px\",\n                        }}\n                      />\n                      <div\n                        style={{\n                          display: \"flex\",\n                          alignItems: \"center\",\n                          gap: 5,\n                          padding: \"0 6px\",\n                        }}\n                      >\n                        {ic(I.emoji, pal.muted, 16)}React\n                      </div>\n                      <div\n                        style={{\n                          display: \"flex\",\n                          alignItems: \"center\",\n                          gap: 5,\n                          padding: \"0 6px\",\n                        }}\n                      >\n                        {ic(I.reply, pal.muted, 16)}Reply\n                      </div>\n                    </div>\n                    <div\n                      style={{\n                        position: \"absolute\",\n                        left: cx,\n                        top: cy,\n                        opacity: cursorOpacity,\n                        zIndex: 5,\n                      }}\n                    >\n                      <MacCursor press={clamp(press)} />\n                    </div>\n                  </div>\n                </Grow>\n                {replies.map((r, i) => {\n                  const p = sp(replyAt[i], MORPH, 14);\n                  const o = ease(replyAt[i], replyAt[i] + 10);\n                  return (\n                    <Grow key={r.text} p={p}>\n                      <div\n                        style={{\n                          opacity: o,\n                          transform: `translateY(${(1 - o) * 12}px)`,\n                        }}\n                      >\n                        <Message\n                          person={r.author}\n                          time=\"10:31 AM\"\n                          pal={pal}\n                          pad={PAD}\n                          context={\n                            tall ? undefined : `${message.slice(0, 18)}…`\n                          }\n                        >\n                          {r.text}\n                        </Message>\n                      </div>\n                    </Grow>\n                  );\n                })}\n              </div>\n            </div>\n            <div style={{ padding: `0 ${PAD}px 8px`, flexShrink: 0 }}>\n              <div\n                style={{\n                  borderRadius: 12,\n                  height: 52,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  gap: 12,\n                  padding: \"0 14px\",\n                  boxSizing: \"border-box\",\n                  boxShadow: `inset 0 0 0 1px ${pal.rule}`,\n                }}\n              >\n                {ic(I.plus, pal.muted, 18)}\n                <span style={{ fontSize: 16, color: pal.muted, flex: 1 }}>\n                  Message #{channel}\n                </span>\n                {ic(I.send, pal.muted, 18)}\n              </div>\n              <div\n                style={{\n                  height: 22,\n                  fontSize: 14,\n                  color: pal.muted,\n                  paddingTop: 4,\n                  opacity: typing,\n                }}\n              >\n                <span style={{ color: pal.text }}>{author.name}</span> is\n                typing…\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </AbsoluteFill>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/remocn/channel-reactions.tsx"
    }
  ],
  "type": "registry:component"
}
