{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "multiplayer-cursors",
  "title": "Multiplayer Cursors",
  "description": "Collaborator cursors drop stickies, select cards and comment on a shared board.",
  "dependencies": ["remotion", "@remotion/google-fonts"],
  "registryDependencies": ["@remocn/gsh"],
  "files": [
    {
      "path": "registry/remocn/multiplayer-cursors/index.tsx",
      "content": "\"use client\";\n\nimport { loadFont as loadFigtree } from \"@remotion/google-fonts/Figtree\";\nimport type React from \"react\";\nimport {\n  AbsoluteFill,\n  Easing,\n  interpolate,\n  spring,\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 figtree = loadFigtree(\"normal\", {\n  weights: [\"300\", \"400\"],\n  subsets: [\"latin\"],\n});\n\nexport interface Collaborator {\n  name: string;\n  color: string;\n}\n\nexport interface MultiplayerCursorsProps {\n  /** Four collaborators. In order they: drop a sticky, select a card, drag a shape, leave a comment. */\n  collaborators?: Collaborator[];\n  boardTitle?: string;\n  /** Large line above the board in the 9:16 layout. */\n  headline?: string;\n  stickyText?: string;\n  commentText?: string;\n  theme?: \"light\" | \"dark\";\n  accent?: string;\n  speed?: number;\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n}\n\nconst DEFAULT_COLLABORATORS: Collaborator[] = [\n  { name: \"Maya\", color: \"#E5484D\" },\n  { name: \"Leo\", color: \"#12A594\" },\n  { name: \"Priya\", color: \"#D6409F\" },\n  { name: \"Sam\", color: \"#E8730C\" },\n];\n\nconst HEAVY = { mass: 1, damping: 26, stiffness: 120 };\nconst CARD = { mass: 0.8, damping: 18, stiffness: 160 };\nconst CHIP = { mass: 0.5, damping: 12, stiffness: 200 };\nconst MORPH = { damping: 200 };\nconst HAND = { mass: 0.9, damping: 22, stiffness: 140 };\nconst ENTER = Easing.bezier(0.32, 0.72, 0, 1);\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\") {\n  const dark = theme === \"dark\";\n  return {\n    dark,\n    canvas: dark ? \"#17181B\" : \"#F6F5F2\",\n    dot: dark ? \"rgba(255,255,255,0.08)\" : \"rgba(30,28,24,0.13)\",\n    panel: dark ? \"#222327\" : \"#FFFFFF\",\n    text: dark ? \"#EDEDEF\" : \"#1C1B19\",\n    muted: dark ? \"#9C9DA3\" : \"#6E6B65\",\n    faint: dark ? \"#66676D\" : \"#A9A6A0\",\n    card: dark ? \"#202125\" : \"#FFFFFF\",\n    rule: dark ? \"rgba(255,255,255,0.08)\" : \"rgba(30,28,24,0.08)\",\n    sticky: dark ? \"#EBCB55\" : \"#FFE27A\",\n    stickyText: \"#2B2410\",\n    shape: dark ? \"#9FE3BE\" : \"#B8F0CF\",\n    shapeText: \"#14432A\",\n    window: dark\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(20,22,30,0.06), 0 2px 4px rgba(20,22,30,0.04), 0 40px 90px -24px rgba(40,34,20,0.3)\",\n    raised: dark\n      ? \"0 0 0 1px rgba(255,255,255,0.08), 0 8px 20px -8px rgba(0,0,0,0.5)\"\n      : \"0 0 0 1px rgba(30,28,24,0.06), 0 1px 2px rgba(30,28,24,0.05), 0 8px 20px -8px rgba(30,28,24,0.14)\",\n    cardDepth: dark\n      ? \"0 0 0 1px rgba(255,255,255,0.07)\"\n      : \"0 0 0 1px rgba(30,28,24,0.07), 0 1px 2px rgba(30,28,24,0.04)\",\n  };\n}\ntype Pal = ReturnType<typeof palette>;\n\ninterface Key {\n  f: number;\n  x: number;\n  y: number;\n}\ninterface Actor {\n  keys: Key[];\n  presses: [number, number][];\n  seed: number;\n}\ninterface Box {\n  x: number;\n  y: number;\n  w: number;\n  h: number;\n}\ninterface Card extends Box {\n  title: string;\n  meta: string;\n}\n\nconst COLUMNS = [\"Hook\", \"Product\", \"Proof\", \"CTA\"];\nconst CARD_COPY: [number, string, string][] = [\n  [0, \"Cold open: 3s logo sting\", \"0:03\"],\n  [1, \"Hero demo walkthrough\", \"0:45\"],\n  [1, \"Captions pass\", \"0:20\"],\n  [2, \"Three customer quotes\", \"0:20\"],\n  [2, \"Logo wall: 12 teams\", \"0:06\"],\n  [3, \"End card and install line\", \"0:05\"],\n];\n\nfunction layout(tall: boolean) {\n  if (tall) {\n    const colX = [44, 288];\n    const headY = [108, 410];\n    const at = (col: number) => ({ x: colX[col % 2], y: headY[col >> 1] });\n    const rows = [\n      { x: 44, y: 140, w: 228, h: 96 },\n      { x: 288, y: 140, w: 228, h: 96 },\n      { x: 288, y: 248, w: 228, h: 76 },\n      { x: 44, y: 442, w: 228, h: 96 },\n      { x: 44, y: 550, w: 228, h: 76 },\n      { x: 288, y: 442, w: 228, h: 96 },\n    ];\n    return {\n      stage: { w: 720, h: 1280 },\n      win: { x: 80, y: 290, w: 560, h: 900 },\n      frame: { x: 24, y: 92, w: 512, h: 650 },\n      heads: COLUMNS.map((_, i) => at(i)),\n      colW: 228,\n      cards: rows,\n      sticky: { x: 44, y: 250, w: 168, h: 148 },\n      shape: { x: 168, y: 690, r: 50 },\n      pin: { x: 236, y: 722 },\n      loose: { x: 276, y: 128 },\n      actors: [\n        {\n          keys: [\n            { f: 6, x: -60, y: 520 },\n            { f: 30, x: 0, y: 860 },\n            { f: 38, x: 0, y: 860 },\n            { f: 62, x: 120, y: 270 },\n            { f: 70, x: 120, y: 270 },\n            { f: 88, x: 168, y: 330 },\n            { f: 188, x: 168, y: 330 },\n            { f: 212, x: 130, y: 300 },\n          ],\n          presses: [\n            [32, 35],\n            [64, 67],\n          ],\n          seed: 1,\n        },\n        {\n          keys: [\n            { f: 20, x: 300, y: -50 },\n            { f: 48, x: 276, y: 128 },\n            { f: 52, x: 276, y: 128 },\n            { f: 80, x: 528, y: 248 },\n            { f: 112, x: 528, y: 248 },\n            { f: 136, x: 470, y: 196 },\n            { f: 192, x: 470, y: 196 },\n            { f: 216, x: 430, y: 300 },\n          ],\n          presses: [[52, 80]],\n          seed: 2,\n        },\n        {\n          keys: [\n            { f: 44, x: 640, y: 780 },\n            { f: 72, x: 186, y: 700 },\n            { f: 78, x: 186, y: 700 },\n            { f: 110, x: 420, y: 600 },\n            { f: 150, x: 420, y: 600 },\n            { f: 176, x: 460, y: 640 },\n          ],\n          presses: [[78, 110]],\n          seed: 3,\n        },\n        {\n          keys: [\n            { f: 78, x: 320, y: 980 },\n            { f: 106, x: 236, y: 722 },\n            { f: 160, x: 236, y: 722 },\n            { f: 184, x: 190, y: 770 },\n            { f: 210, x: 210, y: 780 },\n            { f: 232, x: 262, y: 740 },\n          ],\n          presses: [[109, 112]],\n          seed: 4,\n        },\n      ] as Actor[],\n    };\n  }\n  const colX = (i: number) => 60 + i * 222;\n  return {\n    stage: { w: 1280, h: 720 },\n    win: { x: 140, y: 70, w: 1000, h: 580 },\n    frame: { x: 40, y: 92, w: 920, h: 360 },\n    heads: COLUMNS.map((_, i) => ({ x: colX(i), y: 108 })),\n    colW: 200,\n    cards: [\n      { x: colX(0), y: 140, w: 200, h: 96 },\n      { x: colX(1), y: 140, w: 200, h: 96 },\n      { x: colX(1), y: 248, w: 200, h: 76 },\n      { x: colX(2), y: 140, w: 200, h: 96 },\n      { x: colX(2), y: 248, w: 200, h: 76 },\n      { x: colX(3), y: 140, w: 200, h: 96 },\n    ],\n    sticky: { x: 72, y: 250, w: 168, h: 148 },\n    shape: { x: 470, y: 396, r: 50 },\n    pin: { x: 628, y: 432 },\n    loose: { x: 268, y: 128 },\n    actors: [\n      {\n        keys: [\n          { f: 6, x: -70, y: 420 },\n          { f: 30, x: 0, y: 540 },\n          { f: 38, x: 0, y: 540 },\n          { f: 62, x: 148, y: 270 },\n          { f: 70, x: 148, y: 270 },\n          { f: 88, x: 196, y: 330 },\n          { f: 188, x: 196, y: 330 },\n          { f: 212, x: 150, y: 300 },\n        ],\n        presses: [\n          [32, 35],\n          [64, 67],\n        ],\n        seed: 1,\n      },\n      {\n        keys: [\n          { f: 20, x: 440, y: -50 },\n          { f: 48, x: 268, y: 128 },\n          { f: 52, x: 268, y: 128 },\n          { f: 80, x: 496, y: 248 },\n          { f: 112, x: 496, y: 248 },\n          { f: 136, x: 440, y: 196 },\n          { f: 192, x: 440, y: 196 },\n          { f: 216, x: 400, y: 300 },\n        ],\n        presses: [[52, 80]],\n        seed: 2,\n      },\n      {\n        keys: [\n          { f: 44, x: 1080, y: 480 },\n          { f: 72, x: 486, y: 406 },\n          { f: 78, x: 486, y: 406 },\n          { f: 110, x: 842, y: 310 },\n          { f: 150, x: 842, y: 310 },\n          { f: 176, x: 886, y: 350 },\n        ],\n        presses: [[78, 110]],\n        seed: 3,\n      },\n      {\n        keys: [\n          { f: 78, x: 700, y: 660 },\n          { f: 106, x: 628, y: 432 },\n          { f: 160, x: 628, y: 432 },\n          { f: 184, x: 560, y: 480 },\n          { f: 210, x: 548, y: 486 },\n          { f: 232, x: 600, y: 440 },\n        ],\n        presses: [[109, 112]],\n        seed: 4,\n      },\n    ] as Actor[],\n  };\n}\n\nfunction along(keys: Key[], f: number, fps: number) {\n  let x = keys[0].x;\n  let y = keys[0].y;\n  for (let i = 1; i < keys.length; i++) {\n    const a = keys[i - 1];\n    const b = keys[i];\n    if (f < a.f) break;\n    const p = spring({\n      frame: f - a.f,\n      fps,\n      config: HAND,\n      durationInFrames: b.f - a.f,\n    });\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(46, d * 0.14);\n    x = a.x + dx * p + (dy / d) * arc * (i % 2 ? 1 : -1);\n    y = a.y + dy * p - (dx / d) * arc * (i % 2 ? 1 : -1);\n  }\n  return { x, y };\n}\n\nfunction pressAt(windows: [number, number][], f: number, fps: number) {\n  let p = 0;\n  for (const [d, u] of windows) {\n    const down = spring({\n      frame: f - d + 2,\n      fps,\n      config: { mass: 0.4, damping: 14, stiffness: 420 },\n    });\n    const up = spring({\n      frame: f - u,\n      fps,\n      config: { mass: 0.4, damping: 14, stiffness: 420 },\n    });\n    p = Math.max(p, down - up);\n  }\n  return p;\n}\n\nfunction cursorAt(a: Actor, f: number, fps: number) {\n  const base = along(a.keys, f, fps);\n  const p0 = along(a.keys, f - 1, fps);\n  const p1 = along(a.keys, f + 1, fps);\n  const spd = Math.hypot(p1.x - p0.x, p1.y - p0.y) / 2;\n  const press = pressAt(a.presses, f, fps);\n  const idle = clamp(1 - spd / 2.2) * (1 - clamp(press));\n  const s = a.seed * 1.7;\n  const dx = 3.4 * (Math.sin(f * 0.055 + s) + 0.5 * Math.sin(f * 0.13 + s * 2));\n  const dy = 2.8 * (Math.cos(f * 0.047 + s * 1.3) + 0.5 * Math.sin(f * 0.11));\n  return { x: base.x + dx * idle, y: base.y + dy * idle, press };\n}\n\nfunction FigCursor({ color, name, press }: Collaborator & { press: number }) {\n  return (\n    <div style={{ position: \"absolute\", left: -3, top: -2 }}>\n      <svg\n        width={22}\n        height={22}\n        viewBox=\"0 0 22 22\"\n        style={{\n          transformOrigin: \"3px 2px\",\n          transform: `scale(${1 - 0.1 * clamp(press)})`,\n          filter: \"drop-shadow(0 2px 3px rgba(0,0,0,0.25))\",\n          overflow: \"visible\",\n        }}\n      >\n        <path\n          d=\"M3 2 L19 8.6 L11.4 11.4 L8.6 19 Z\"\n          fill={color}\n          stroke=\"#FFFFFF\"\n          strokeWidth={1.5}\n          strokeLinejoin=\"round\"\n        />\n      </svg>\n      <div\n        style={{\n          position: \"absolute\",\n          left: 16,\n          top: 20,\n          background: color,\n          color: \"#fff\",\n          fontSize: 14,\n          lineHeight: \"18px\",\n          padding: \"3px 9px\",\n          borderRadius: \"4px 10px 10px 10px\",\n          whiteSpace: \"nowrap\",\n          boxShadow:\n            \"0 1px 2px rgba(0,0,0,0.16), 0 4px 10px -2px rgba(0,0,0,0.18)\",\n        }}\n      >\n        {name}\n      </div>\n    </div>\n  );\n}\n\nfunction Avatar({\n  name,\n  color,\n  size,\n  ring,\n}: {\n  name: string;\n  color: string;\n  size: number;\n  ring: string;\n}) {\n  return (\n    <div\n      style={{\n        width: size,\n        height: size,\n        borderRadius: \"50%\",\n        background: color,\n        color: \"#fff\",\n        fontSize: size * 0.44,\n        display: \"flex\",\n        alignItems: \"center\",\n        justifyContent: \"center\",\n        boxShadow: `0 0 0 2px ${ring}`,\n      }}\n    >\n      {name.slice(0, 1).toUpperCase()}\n    </div>\n  );\n}\n\nconst ICONS: Record<string, string> = {\n  select:\n    \"M6.5 4.5 L6.5 17 L9.8 13.9 L12 18.8 L14 17.9 L11.8 13.1 L16.2 13.1 Z\",\n  hand: \"M8 11V6.2a1.3 1.3 0 0 1 2.6 0V10m0-.5V5a1.3 1.3 0 0 1 2.6 0v5m0-3.6a1.3 1.3 0 0 1 2.6 0v4.2M15.8 9a1.3 1.3 0 0 1 2.6 0v4.6a5.6 5.6 0 0 1-5.6 5.6h-.9a5.6 5.6 0 0 1-4.4-2.2L5 13.9a1.4 1.4 0 0 1 2.1-1.8l.9.9\",\n  pen: \"M5 19 L6 15 L15.5 5.5 L18.5 8.5 L9 18 Z\",\n  sticky: \"M5 5 H19 V14 L14 19 H5 Z M14 19 V14 H19\",\n  shape: \"M9.5 4.5 A5 5 0 1 1 9.4 4.5 Z M12 12 H19.5 V19.5 H12 Z\",\n  text: \"M6 6 H18 M12 6 V19\",\n  section: \"M5 8 V5 H8 M16 5 H19 V8 M19 16 V19 H16 M8 19 H5 V16\",\n  table: \"M5 5 H19 V19 H5 Z M5 10 H19 M10.5 10 V19\",\n};\nconst TOOL_SLOTS: [string, number][] = [\n  [\"select\", 8],\n  [\"hand\", 48],\n  [\"pen\", 101],\n  [\"sticky\", 141],\n  [\"shape\", 181],\n  [\"text\", 234],\n  [\"section\", 274],\n  [\"table\", 314],\n];\nconst TOOLBAR_W = 358;\nconst TOOLBAR_H = 52;\n\nfunction Toolbar({\n  pal,\n  accent,\n  stickyActive,\n  x,\n  y,\n}: {\n  pal: Pal;\n  accent: string;\n  stickyActive: number;\n  x: number;\n  y: number;\n}) {\n  return (\n    <div\n      style={{\n        position: \"absolute\",\n        left: x,\n        top: y,\n        width: TOOLBAR_W,\n        height: TOOLBAR_H,\n        borderRadius: 14,\n        background: pal.panel,\n        boxShadow: pal.raised,\n      }}\n    >\n      {TOOL_SLOTS.map(([name, sx]) => {\n        const on =\n          name === \"select\"\n            ? 1 - stickyActive\n            : name === \"sticky\"\n              ? stickyActive\n              : 0;\n        return (\n          <div\n            key={name}\n            style={{\n              position: \"absolute\",\n              left: sx,\n              top: 8,\n              width: 36,\n              height: 36,\n              borderRadius: 9,\n              background: withAlpha(accent, on),\n              display: \"flex\",\n              alignItems: \"center\",\n              justifyContent: \"center\",\n            }}\n          >\n            <svg\n              width={22}\n              height={22}\n              viewBox=\"0 0 24 24\"\n              fill=\"none\"\n              stroke={on > 0.5 ? \"#fff\" : pal.text}\n              strokeWidth={1.5}\n              strokeLinecap=\"round\"\n              strokeLinejoin=\"round\"\n            >\n              <path d={ICONS[name]} />\n            </svg>\n          </div>\n        );\n      })}\n      {[92, 225].map((sx) => (\n        <div\n          key={sx}\n          style={{\n            position: \"absolute\",\n            left: sx,\n            top: 14,\n            width: 1,\n            height: 24,\n            background: pal.rule,\n          }}\n        />\n      ))}\n    </div>\n  );\n}\n\nfunction BoardCard({\n  card,\n  pal,\n  outline,\n}: {\n  card: Card;\n  pal: Pal;\n  outline?: string;\n}) {\n  return (\n    <div\n      style={{\n        position: \"absolute\",\n        left: card.x,\n        top: card.y,\n        width: card.w,\n        height: card.h,\n        boxSizing: \"border-box\",\n        background: pal.card,\n        borderRadius: 10,\n        boxShadow: outline ? `0 0 0 1.5px ${outline}` : pal.cardDepth,\n        padding: \"12px 14px\",\n        display: \"flex\",\n        flexDirection: \"column\",\n        justifyContent: \"space-between\",\n      }}\n    >\n      <div\n        style={{\n          fontSize: 16,\n          lineHeight: \"21px\",\n          color: pal.text,\n          letterSpacing: \"-0.01em\",\n        }}\n      >\n        {card.title}\n      </div>\n      <div\n        style={{\n          fontSize: 14,\n          color: pal.muted,\n          fontVariantNumeric: \"tabular-nums\",\n        }}\n      >\n        {card.meta}\n      </div>\n    </div>\n  );\n}\n\nexport function MultiplayerCursors({\n  collaborators = DEFAULT_COLLABORATORS,\n  boardTitle = \"Launch plan\",\n  headline = \"Plan the launch together\",\n  stickyText = \"Record the hero demo by Friday\",\n  commentText = \"Love this. Ship it Friday.\",\n  theme = \"light\",\n  accent = \"#3B5BFD\",\n  speed = 1,\n  ground,\n  groundParams,\n}: MultiplayerCursorsProps) {\n  const frame = useCurrentFrame() * speed;\n  const { width, height, fps } = useVideoConfig();\n  const tall = height > width;\n  const L = layout(tall);\n  const u = Math.min(width / L.stage.w, height / L.stage.h);\n  const pal = palette(theme);\n  const WIN = L.win;\n  const people = L.actors.map(\n    (_, i) =>\n      collaborators[i] ??\n      DEFAULT_COLLABORATORS[i % DEFAULT_COLLABORATORS.length],\n  );\n  const sp = (at: number, config: Partial<typeof CARD>) =>\n    spring({ frame: frame - at, fps, config });\n\n  const tbX = (WIN.w - TOOLBAR_W) / 2;\n  const tbY = WIN.h - 16 - TOOLBAR_H;\n  const stickySlot = { x: tbX + 141 + 20, y: tbY + 28 };\n  const actors = L.actors.map((a, i) =>\n    i === 0\n      ? {\n          ...a,\n          keys: a.keys.map((k, j) =>\n            j === 1 || j === 2 ? { ...k, ...stickySlot } : k,\n          ),\n        }\n      : a,\n  );\n  const cur = actors.map((a) => cursorAt(a, frame, fps));\n\n  const win = sp(0, HEAVY);\n  const winFade = interpolate(frame, [0, 12], [0, 1], { ...CL, easing: ENTER });\n  const cam = interpolate(frame, [20, 260], [1, 1.04], {\n    ...CL,\n    easing: CAMERA,\n  });\n  const camO = { x: WIN.w / 2, y: WIN.h * 0.45 };\n  const toScreen = (p: { x: number; y: number }) => ({\n    x: camO.x + (p.x - camO.x) * cam,\n    y: camO.y + (p.y - camO.y) * cam,\n  });\n\n  const cards: Card[] = CARD_COPY.map(([, title, meta], i) => ({\n    ...L.cards[i],\n    title,\n    meta,\n  }));\n  const SELECTED = cards[1];\n\n  const stickyIn = sp(65, CARD);\n  const ghost = frame >= 36 && frame < 65;\n  const stickyChars = Array.from(stickyText);\n  const commentChars = Array.from(commentText);\n  const typed = Math.floor(\n    interpolate(frame, [80, 124], [0, stickyChars.length], CL),\n  );\n  const caretOn = frame >= 72 && frame < 136 && Math.floor(frame / 8) % 2 === 0;\n\n  const leo = along(actors[1].keys, frame, fps);\n  const marquee = frame >= 52 && frame < 82;\n  const snap = sp(80, MORPH);\n  const selOn = frame >= 80;\n  const loose = {\n    ...L.loose,\n    w: actors[1].keys[3].x - L.loose.x,\n    h: actors[1].keys[3].y - L.loose.y,\n  };\n  const selBox = {\n    x: interpolate(snap, [0, 1], [loose.x, SELECTED.x]),\n    y: interpolate(snap, [0, 1], [loose.y, SELECTED.y]),\n    w: interpolate(snap, [0, 1], [loose.w, SELECTED.w]),\n    h: interpolate(snap, [0, 1], [loose.h, SELECTED.h]),\n  };\n\n  const pri = actors[2];\n  const grab = along(pri.keys, 78, fps);\n  const held = along(pri.keys, clamp(frame, 78, 110), fps);\n  const dragging = frame >= 78 && frame <= 112;\n  const drop = sp(110, CHIP);\n  const SH = L.shape;\n  const shapeX = SH.x + held.x - grab.x;\n  const shapeY = SH.y + held.y - grab.y;\n  const lift = dragging ? 1 : 1 - drop;\n  const shapeScale = 1 + 0.05 * lift;\n\n  const pinIn = sp(111, CHIP);\n  const bubbleIn = sp(118, CARD);\n  const bubbleFade = interpolate(frame, [118, 126], [0, 1], {\n    ...CL,\n    easing: ENTER,\n  });\n  const commentTyped = Math.floor(\n    interpolate(frame, [124, 152], [0, commentChars.length], CL),\n  );\n  const joinAt = actors.map((a) => a.keys[0].f + 10);\n  const headIn = interpolate(frame, [4, 20], [0, 1], { ...CL, easing: ENTER });\n  const stickyTool = interpolate(frame, [31, 34, 60, 66], [0, 1, 1, 0], CL);\n\n  const chrome: React.CSSProperties = {\n    position: \"absolute\",\n    top: 16,\n    height: 44,\n    display: \"flex\",\n    alignItems: \"center\",\n    borderRadius: 12,\n    background: pal.panel,\n    boxShadow: pal.raised,\n    fontSize: 15,\n  };\n\n  return (\n    <AbsoluteFill\n      style={{\n        fontFamily: figtree.fontFamily,\n        WebkitFontSmoothing: \"antialiased\",\n        overflow: \"hidden\",\n      }}\n    >\n      <GshGround\n        preset={ground ?? (pal.dark ? \"charcoal-satin\" : \"paper-crease\")}\n        params={\n          groundParams ??\n          (pal.dark || ground\n            ? undefined\n            : {\n                colors: [\"#f4c2a0\", \"#f9e0cc\", \"#f1ebe3\", \"#cdb8a3\"],\n                background: \"#efebe4\",\n              })\n        }\n        timeOffset={pal.dark ? 4 : 3}\n        timeScale={0.35}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          left: (width - L.stage.w * u) / 2,\n          top: (height - L.stage.h * u) / 2,\n          width: L.stage.w,\n          height: L.stage.h,\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 ? \"#F2F2F4\" : \"#1C1B19\",\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            opacity: winFade,\n            transformOrigin: \"50% 45%\",\n            transform: `translateY(${(1 - win) * 60}px) scale(${0.96 + 0.04 * win})`,\n          }}\n        >\n          <div\n            style={{\n              position: \"absolute\",\n              inset: 0,\n              borderRadius: 18,\n              overflow: \"hidden\",\n              background: pal.canvas,\n              boxShadow: pal.window,\n            }}\n          >\n            <div\n              style={{\n                position: \"absolute\",\n                inset: 0,\n                transform: `scale(${cam})`,\n                transformOrigin: `${camO.x}px ${camO.y}px`,\n              }}\n            >\n              <div\n                style={{\n                  position: \"absolute\",\n                  inset: -120,\n                  backgroundImage: `radial-gradient(circle, ${pal.dot} 1px, transparent 1.4px)`,\n                  backgroundSize: \"22px 22px\",\n                }}\n              />\n\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: L.frame.x,\n                  top: L.frame.y,\n                  width: L.frame.w,\n                  height: L.frame.h,\n                  boxSizing: \"border-box\",\n                  background: withAlpha(accent, pal.dark ? 0.06 : 0.035),\n                  boxShadow: `inset 0 0 0 1px ${withAlpha(accent, 0.4)}`,\n                  borderRadius: 12,\n                }}\n              />\n              {COLUMNS.map((c, i) => (\n                <div\n                  key={c}\n                  style={{\n                    position: \"absolute\",\n                    left: L.heads[i].x + 2,\n                    top: L.heads[i].y,\n                    fontSize: 15,\n                    color: pal.muted,\n                  }}\n                >\n                  {c}\n                </div>\n              ))}\n              {cards.map((card) => (\n                <BoardCard\n                  key={card.title}\n                  card={card}\n                  pal={pal}\n                  outline={\n                    card === SELECTED && selOn ? people[1].color : undefined\n                  }\n                />\n              ))}\n              {marquee ? (\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: Math.min(loose.x, leo.x),\n                    top: Math.min(loose.y, leo.y),\n                    width: Math.abs(leo.x - loose.x),\n                    height: Math.abs(leo.y - loose.y),\n                    background: withAlpha(people[1].color, 0.08),\n                    boxShadow: `inset 0 0 0 1px ${people[1].color}`,\n                  }}\n                />\n              ) : null}\n              {selOn ? (\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: selBox.x,\n                    top: selBox.y,\n                    width: selBox.w,\n                    height: selBox.h,\n                    boxShadow: `inset 0 0 0 1.5px ${people[1].color}`,\n                    borderRadius: interpolate(snap, [0, 1], [0, 10]),\n                  }}\n                >\n                  {[\n                    [0, 0],\n                    [1, 0],\n                    [0, 1],\n                    [1, 1],\n                  ].map(([hx, hy]) => (\n                    <div\n                      key={`${hx}${hy}`}\n                      style={{\n                        position: \"absolute\",\n                        left: `calc(${hx * 100}% - 4px)`,\n                        top: `calc(${hy * 100}% - 4px)`,\n                        width: 8,\n                        height: 8,\n                        background: \"#fff\",\n                        boxShadow: `inset 0 0 0 1.5px ${people[1].color}`,\n                        borderRadius: 2,\n                        transform: `scale(${snap})`,\n                      }}\n                    />\n                  ))}\n                </div>\n              ) : null}\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: shapeX - SH.r,\n                  top: shapeY - SH.r,\n                  width: SH.r * 2,\n                  height: SH.r * 2,\n                  borderRadius: \"50%\",\n                  background: pal.shape,\n                  boxShadow: `inset 0 0 0 ${dragging ? 2 : 1}px ${dragging ? people[2].color : \"rgba(20,67,42,0.25)\"}, 0 ${2 + 12 * lift}px ${6 + 20 * lift}px -4px rgba(0,0,0,${0.1 + 0.14 * lift})`,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  justifyContent: \"center\",\n                  fontSize: 15,\n                  color: pal.shapeText,\n                  transform: `scale(${shapeScale})`,\n                }}\n              >\n                Launch day\n              </div>\n              {ghost || frame >= 65 ? (\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: ghost ? cur[0].x - 76 : L.sticky.x,\n                    top: ghost ? cur[0].y - 20 : L.sticky.y,\n                    width: L.sticky.w,\n                    height: L.sticky.h,\n                    background: pal.sticky,\n                    opacity: ghost ? 0.6 : 1,\n                    transform: ghost\n                      ? \"scale(0.82) rotate(-4deg)\"\n                      : `scale(${0.86 + 0.14 * stickyIn}) rotate(${-5 + 3.5 * stickyIn}deg)`,\n                    transformOrigin: \"76px 20px\",\n                    borderRadius: 3,\n                    boxShadow:\n                      \"0 1px 2px rgba(0,0,0,0.08), 0 12px 22px -10px rgba(60,40,0,0.35)\",\n                    padding: 16,\n                    boxSizing: \"border-box\",\n                    display: \"flex\",\n                    flexDirection: \"column\",\n                  }}\n                >\n                  <div\n                    style={{\n                      fontSize: 18,\n                      lineHeight: 1.28,\n                      color: pal.stickyText,\n                      letterSpacing: \"-0.01em\",\n                    }}\n                  >\n                    {stickyChars.slice(0, typed).join(\"\")}\n                    <span\n                      style={{\n                        display: \"inline-block\",\n                        width: 1.5,\n                        height: 19,\n                        marginLeft: 1,\n                        verticalAlign: -3,\n                        background: caretOn ? pal.stickyText : \"transparent\",\n                      }}\n                    />\n                  </div>\n                  <div\n                    style={{\n                      marginTop: \"auto\",\n                      fontSize: 14,\n                      color: \"rgba(43,36,16,0.6)\",\n                    }}\n                  >\n                    {people[0].name}\n                  </div>\n                </div>\n              ) : null}\n              {frame >= 111 ? (\n                <>\n                  <div\n                    style={{\n                      position: \"absolute\",\n                      left: L.pin.x + 26,\n                      top: L.pin.y - 66,\n                      width: 214,\n                      background: pal.panel,\n                      borderRadius: 14,\n                      boxShadow: pal.raised,\n                      padding: \"11px 14px 13px\",\n                      opacity: bubbleFade,\n                      transform: `translateX(${(1 - bubbleIn) * -12}px) scale(${0.92 + 0.08 * bubbleIn})`,\n                      transformOrigin: \"0 100%\",\n                      boxSizing: \"border-box\",\n                    }}\n                  >\n                    <div\n                      style={{\n                        display: \"flex\",\n                        gap: 8,\n                        alignItems: \"baseline\",\n                      }}\n                    >\n                      <span style={{ fontSize: 15, color: pal.text }}>\n                        {people[3].name}\n                      </span>\n                      <span style={{ fontSize: 13, color: pal.muted }}>\n                        Just now\n                      </span>\n                    </div>\n                    <div\n                      style={{\n                        marginTop: 3,\n                        fontSize: 15,\n                        lineHeight: \"20px\",\n                        color: pal.text,\n                        minHeight: 20,\n                      }}\n                    >\n                      {commentChars.slice(0, commentTyped).join(\"\")}\n                    </div>\n                  </div>\n                  <div\n                    style={{\n                      position: \"absolute\",\n                      left: L.pin.x,\n                      top: L.pin.y - 34,\n                      transform: `scale(${pinIn})`,\n                      transformOrigin: \"0 100%\",\n                      borderRadius: \"50% 50% 50% 0\",\n                      padding: 2,\n                      background: pal.panel,\n                      boxShadow: \"0 3px 8px rgba(0,0,0,0.22)\",\n                    }}\n                  >\n                    <Avatar\n                      name={people[3].name}\n                      color={people[3].color}\n                      size={30}\n                      ring=\"transparent\"\n                    />\n                  </div>\n                </>\n              ) : null}\n            </div>\n            <div style={{ ...chrome, left: 16, gap: 8, padding: \"0 14px\" }}>\n              <span style={{ color: pal.muted }}>Drafts</span>\n              <span style={{ color: pal.faint }}>/</span>\n              <span style={{ color: pal.text }}>{boardTitle}</span>\n            </div>\n            <div\n              style={{ ...chrome, right: 16, gap: 12, padding: \"0 6px 0 12px\" }}\n            >\n              <div style={{ display: \"flex\", alignItems: \"center\" }}>\n                {[...people].reverse().map((p, ri) => {\n                  const i = people.length - 1 - ri;\n                  const s = sp(joinAt[i], CHIP);\n                  return (\n                    <div\n                      key={p.name}\n                      style={{\n                        width: 22 * clamp(s),\n                        height: 28,\n                        position: \"relative\",\n                      }}\n                    >\n                      <div\n                        style={{\n                          position: \"absolute\",\n                          left: 0,\n                          top: 0,\n                          transform: `scale(${s})`,\n                        }}\n                      >\n                        <Avatar\n                          name={p.name}\n                          color={p.color}\n                          size={28}\n                          ring={pal.panel}\n                        />\n                      </div>\n                    </div>\n                  );\n                })}\n                <div style={{ width: 28 }}>\n                  <Avatar\n                    name=\"Eli\"\n                    color={pal.dark ? \"#55565C\" : \"#3D3C39\"}\n                    size={28}\n                    ring={pal.panel}\n                  />\n                </div>\n              </div>\n              <div\n                style={{\n                  background: accent,\n                  color: \"#fff\",\n                  fontSize: 15,\n                  padding: \"6px 14px\",\n                  borderRadius: 8,\n                  boxShadow: \"inset 0 1px 0 rgba(255,255,255,0.2)\",\n                }}\n              >\n                Share\n              </div>\n            </div>\n            <Toolbar\n              pal={pal}\n              accent={accent}\n              stickyActive={stickyTool}\n              x={tbX}\n              y={tbY}\n            />\n          </div>\n          {cur.map((c, i) => {\n            const a = actors[i];\n            const vis = interpolate(\n              frame,\n              [a.keys[0].f, a.keys[0].f + 6],\n              [0, 1],\n              CL,\n            );\n            const s = toScreen(c);\n            const k = i === 0 ? interpolate(frame, [38, 62], [0, 1], CL) : 1;\n            return (\n              <div\n                key={people[i].name}\n                style={{\n                  position: \"absolute\",\n                  left: c.x + (s.x - c.x) * k,\n                  top: c.y + (s.y - c.y) * k,\n                  opacity: vis,\n                  zIndex: 20,\n                }}\n              >\n                <FigCursor {...people[i]} press={c.press} />\n              </div>\n            );\n          })}\n        </div>\n      </div>\n    </AbsoluteFill>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/remocn/multiplayer-cursors.tsx"
    }
  ],
  "type": "registry:component"
}
