Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "reels-feed",
"title": "Reels Feed",
"description": "A vertical reels feed with a double-tap heart over a launch story frame.",
"dependencies": ["remotion", "@remotion/google-fonts"],
"registryDependencies": ["@remocn/gsh"],
"files": [
{
"path": "registry/remocn/reels-feed/index.tsx",
"content": "\"use client\";\n\nimport { loadFont as loadManrope } from \"@remotion/google-fonts/Manrope\";\nimport { loadFont } from \"@remotion/google-fonts/Onest\";\nimport type React from \"react\";\nimport { useId } from \"react\";\nimport {\n AbsoluteFill,\n Easing,\n Img,\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 { fontFamily } = loadFont(\"normal\", {\n weights: [\"300\", \"400\"],\n subsets: [\"latin\"],\n});\n\nconst manrope = loadManrope(\"normal\", {\n weights: [\"600\"],\n subsets: [\"latin\"],\n});\n\nexport interface ReelsStory {\n src?: string;\n}\n\nexport interface ReelsFeedProps {\n account?: string;\n stories?: ReelsStory[];\n reelSrc?: string;\n pollQuestion?: string;\n pollOptions?: [string, string];\n likes?: [string, string];\n accent?: string;\n speed?: number;\n theme?: \"light\" | \"dark\";\n lines?: [string, string, string];\n ground?: GshPresetId;\n groundParams?: Partial<GradientParams>;\n}\n\nconst SW = 393;\nconst SH = 852;\nconst BEZEL = 11;\nconst BW = SW + BEZEL * 2;\nconst BH = SH + BEZEL * 2;\n\nconst TAP_STORY = 34;\nconst OPEN = 37;\nconst SEG = [44, 96, 144, 200];\nconst POLL_TAP = 170;\nconst SWIPE = 200;\nconst REEL = 214;\nconst DT = 240;\n\nconst clamp = { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" } as const;\nconst glide = Easing.bezier(0.65, 0, 0.35, 1);\nconst ENTER = Easing.bezier(0.32, 0.72, 0, 1);\nconst EXIT = Easing.bezier(0.55, 0, 1, 0.45);\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 };\n\nconst REMOCN_R_PATH =\n \"M 0.01 0.81 C 0.01 1.73, 0.36 2.79, 1.09 4.13 C 4.91 11.04, 13.45 17.16, 21.7 18.9 C 22.94 19.16, 23.18 19.16, 51.39 19.27 C 76.07 19.36, 80.02 19.4, 81.32 19.57 C 89.89 20.69, 96.2 24.68, 99.38 31.01 C 103.19 38.56, 102.53 50.1, 97.91 57.07 C 94.66 61.96, 89.68 64.99, 83.26 66 C 82.81 66.07, 70.18 66.83, 55.2 67.69 C 24.82 69.43, 27.03 69.23, 24.18 70.4 C 19.9 72.15, 14.84 75.7, 10.65 79.89 C 4.86 85.68, 1.3 91.91, 0.25 98.13 C 0.12 98.85, 0.08 103.13, 0.04 116.66 L 0 134.26 9.5 134.26 L 19 134.26 19.05 119.41 C 19.1 103.27, 19.08 103.82, 19.82 101.04 C 21.79 93.65, 27.86 88.75, 36.45 87.63 C 37.23 87.53, 39.41 87.5, 43.57 87.53 C 50.12 87.59, 50.75 87.65, 53.22 88.45 C 56.61 89.56, 59.67 91.86, 62.02 95.07 C 62.52 95.76, 69.35 103.85, 77.2 113.07 C 85.04 122.28, 91.63 130.04, 91.85 130.32 C 92.07 130.59, 92.5 131.34, 92.82 131.97 C 93.52 133.35, 94.11 133.93, 95.06 134.13 C 95.5 134.23, 98.97 134.26, 106.36 134.23 L 117.01 134.19 100.82 113.07 C 91.91 101.45, 84.52 91.78, 84.39 91.57 C 83.36 89.89, 83.66 87.53, 85.09 86 C 85.79 85.25, 86.36 84.94, 88.07 84.38 C 96.18 81.72, 104.15 76.62, 109.97 70.36 C 120.59 58.93, 124.06 44.32, 119.44 30.43 C 114.59 15.81, 101.93 4.02, 87.64 0.83 C 83.93 0.01, 88.09 0.08, 41.85 0.04 L 0.01 0 0.01 0.81 Z\";\n\nconst P = {\n heart:\n \"M12 20.3s-7.6-4.6-9.4-9.5C1.3 7.4 3.5 4 7.1 4c2.1 0 3.7 1.1 4.9 2.9C13.2 5.1 14.8 4 16.9 4c3.6 0 5.8 3.4 4.5 6.8-1.8 4.9-9.4 9.5-9.4 9.5z\",\n comment: \"M20.6 16.6a9 9 0 1 0-3.7 3.6L21.6 21.6z\",\n send: \"M21.6 2.6L2.6 9.2l7.6 3.6 3.4 7.8zM21.6 2.6L10.2 12.8\",\n repost:\n \"M16.5 2.5L20 6l-3.5 3.5M20 6H8.5A4.5 4.5 0 0 0 4 10.5V11M7.5 21.5L4 18l3.5-3.5M4 18h11.5a4.5 4.5 0 0 0 4.5-4.5V13\",\n bookmark: \"M19 21l-7-6-7 6V3h14z\",\n plus: \"M12 4v16M4 12h16\",\n home: \"M3.5 10.3L12 3l8.5 7.3V21h-6v-6.2h-5V21h-6z\",\n reels:\n \"M4 4h16v16H4zM4 8.8h16M9 4l3 4.8M14.2 4l3 4.8M10.4 12.3v5.3l4.6-2.65z\",\n search: \"M10.5 18a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15zM16 16l5.3 5.3\",\n close: \"M6 6l12 12M18 6L6 18\",\n music:\n \"M9 17.5V5.5l10-2v11.5M9 17.5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0zM19 15a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z\",\n link: \"M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1\",\n sliders: \"M4 7h9M17 7h3M4 17h3M11 17h9M15 5v4M9 15v4\",\n};\n\nfunction hash(n: number) {\n const x = Math.sin(n * 127.1 + 311.7) * 43758.5453;\n return x - Math.floor(x);\n}\n\ntype Mood = \"sunset\" | \"dusk\" | \"golden\" | \"alpine\";\nconst MOODS: Record<\n Mood,\n { sky: string[]; sun: string; ridges: string[]; water: string; sunY: number }\n> = {\n sunset: {\n sky: [\"#1d2550\", \"#4c3f7c\", \"#b9677c\", \"#ee9a68\", \"#fbd393\"],\n sun: \"#fff0c4\",\n ridges: [\"#9a7290\", \"#6a4f74\", \"#3d2f52\", \"#1b1730\"],\n water: \"#221c38\",\n sunY: 0.78,\n },\n dusk: {\n sky: [\"#070b1d\", \"#16224a\", \"#2f4a82\", \"#7488b8\", \"#d4b3b5\"],\n sun: \"#ffe2c0\",\n ridges: [\"#4d5c88\", \"#2f3b63\", \"#1b2443\", \"#0c1126\"],\n water: \"#0d1328\",\n sunY: 0.9,\n },\n golden: {\n sky: [\"#5d8fc8\", \"#9dbfe0\", \"#efd5a8\", \"#f5b475\", \"#ee9361\"],\n sun: \"#fff6dc\",\n ridges: [\"#b9a19c\", \"#8b7684\", \"#5b4f66\", \"#2e2a3a\"],\n water: \"#3a3446\",\n sunY: 0.72,\n },\n alpine: {\n sky: [\"#2a64ad\", \"#4f8bcb\", \"#8cb7e0\", \"#cfe1f0\", \"#eef3f6\"],\n sun: \"#ffffff\",\n ridges: [\"#a8bfd8\", \"#7894b5\", \"#48618a\", \"#233650\"],\n water: \"#2a3f5c\",\n sunY: 0.35,\n },\n};\n\nconst rgb = (hex: string) =>\n [1, 3, 5].map((i) => Number.parseInt(hex.slice(i, i + 2), 16) / 255);\nconst mix = (a: string, b: string, t: number) => {\n const [x, y] = [rgb(a), rgb(b)];\n return `rgb(${x.map((v, i) => Math.round((v + (y[i] - v) * t) * 255)).join(\",\")})`;\n};\n\nfunction noise1(x: number) {\n const i = Math.floor(x);\n const t = x - i;\n const u = t * t * (3 - 2 * t);\n return hash(i) * (1 - u) + hash(i + 1) * u;\n}\n\nfunction ridgePath(seed: number, base: number, amp: number, sharp: number) {\n const pts: string[] = [];\n for (let i = 0; i <= 80; i++) {\n const x = (i / 80) * 400;\n const n =\n 0.6 * (1 - Math.abs(noise1(x / 80 + seed) * 2 - 1) * sharp) +\n 0.27 * noise1(x / 26 + seed * 3.1) +\n 0.13 * noise1(x / 8 + seed * 7.3);\n pts.push(`${x.toFixed(1)} ${(base - amp * n).toFixed(1)}`);\n }\n return `M0 500L${pts.join(\"L\")}L400 500Z`;\n}\n\nfunction treePath(seed: number, base: number) {\n const pts: string[] = [];\n for (let i = 0; i <= 200; i++) {\n const x = i * 2;\n const tree = noise1(x / 3.2 + seed) ** 3 * 13;\n const swell = noise1(x / 40 + seed * 2) * 9;\n pts.push(`${x} ${(base - 3 - swell - tree).toFixed(1)}`);\n }\n return `M0 500L${pts.join(\"L\")}L400 500Z`;\n}\n\nfunction Photo({\n mood = \"sunset\",\n seed = 1,\n zoom = 1,\n}: {\n mood?: Mood;\n seed?: number;\n zoom?: number;\n}) {\n const id = `ph${useId().replace(/[^a-zA-Z0-9_-]/g, \"\")}`;\n const m = MOODS[mood];\n const HZ = 300;\n const sunX = 110 + hash(seed * 5) * 180;\n const sunY = HZ * m.sunY;\n const [cr, cg, cb] = rgb(m.sun);\n const ridges = m.ridges.map((col, i) => ({\n col,\n top: mix(col, m.sky[3], 0.35 - i * 0.08),\n d: ridgePath(\n seed + i * 1.7,\n HZ - 6 + i * 3,\n [120, 84, 52, 30][i],\n 0.9 - i * 0.15,\n ),\n blur: [1.4, 0.8, 0.4, 0][i],\n }));\n const trees = treePath(seed * 3, HZ);\n const land = (reflect: boolean) => (\n <>\n {ridges.map((r, i) => (\n <path\n key={r.col}\n d={r.d}\n fill={`url(#${id}m${i})`}\n filter={r.blur && !reflect ? `url(#${id}r${i})` : undefined}\n />\n ))}\n <path d={trees} fill={mix(m.ridges[3], \"#000000\", 0.35)} />\n </>\n );\n const sky = (\n <>\n <rect width={400} height={HZ} fill={`url(#${id}s)`} />\n <rect\n width={400}\n height={HZ}\n filter={`url(#${id}cl)`}\n mask={`url(#${id}cm)`}\n />\n <circle cx={sunX} cy={sunY} r={190} fill={`url(#${id}g)`} />\n <circle\n cx={sunX}\n cy={sunY}\n r={15}\n fill={m.sun}\n filter={`url(#${id}b1)`}\n />\n </>\n );\n return (\n <svg\n viewBox=\"0 0 400 500\"\n preserveAspectRatio=\"xMidYMid slice\"\n width=\"100%\"\n height=\"100%\"\n style={{ display: \"block\", position: \"absolute\", inset: 0 }}\n >\n <defs>\n <linearGradient id={`${id}s`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n {m.sky.map((s, i) => (\n <stop key={s} offset={i / (m.sky.length - 1)} stopColor={s} />\n ))}\n </linearGradient>\n {ridges.map((r, i) => (\n <linearGradient\n key={r.col}\n id={`${id}m${i}`}\n x1=\"0\"\n y1=\"0\"\n x2=\"0\"\n y2=\"1\"\n >\n <stop offset=\"0.55\" stopColor={r.top} />\n <stop offset=\"0.75\" stopColor={r.col} />\n </linearGradient>\n ))}\n <radialGradient id={`${id}g`}>\n <stop offset=\"0\" stopColor={m.sun} stopOpacity={0.8} />\n <stop offset=\"0.12\" stopColor={m.sun} stopOpacity={0.35} />\n <stop offset=\"0.45\" stopColor={m.sun} stopOpacity={0.08} />\n <stop offset=\"1\" stopColor={m.sun} stopOpacity={0} />\n </radialGradient>\n <linearGradient id={`${id}w`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0\" stopColor={m.water} stopOpacity={0.3} />\n <stop offset=\"1\" stopColor={m.water} stopOpacity={0.9} />\n </linearGradient>\n <linearGradient id={`${id}cmg`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0\" stopColor=\"#fff\" stopOpacity={0.9} />\n <stop offset=\"0.75\" stopColor=\"#fff\" stopOpacity={0.5} />\n <stop offset=\"1\" stopColor=\"#fff\" stopOpacity={0} />\n </linearGradient>\n <mask id={`${id}cm`}>\n <rect width={400} height={HZ} fill={`url(#${id}cmg)`} />\n </mask>\n <radialGradient id={`${id}v`} cx=\"0.5\" cy=\"0.45\" r=\"0.75\">\n <stop offset=\"0.55\" stopColor=\"#000\" stopOpacity={0} />\n <stop offset=\"1\" stopColor=\"#000\" stopOpacity={0.42} />\n </radialGradient>\n <filter id={`${id}cl`} x=\"0\" y=\"0\" width=\"1\" height=\"1\">\n <feTurbulence\n type=\"fractalNoise\"\n baseFrequency=\"0.0035 0.02\"\n numOctaves={4}\n seed={seed}\n />\n <feColorMatrix\n values={`0 0 0 0 ${cr} 0 0 0 0 ${cg} 0 0 0 0 ${cb} 2.4 0 0 0 -1.05`}\n />\n <feGaussianBlur stdDeviation={0.6} />\n </filter>\n <filter id={`${id}b1`} x=\"-1\" y=\"-1\" width=\"3\" height=\"3\">\n <feGaussianBlur stdDeviation={2.5} />\n </filter>\n <filter id={`${id}gl`} x=\"-1\" y=\"-1\" width=\"3\" height=\"3\">\n <feGaussianBlur stdDeviation=\"5 10\" />\n </filter>\n {ridges.map((r, i) => (\n <filter\n key={r.col}\n id={`${id}r${i}`}\n x=\"-0.1\"\n y=\"-0.2\"\n width=\"1.2\"\n height=\"1.4\"\n >\n <feGaussianBlur stdDeviation={r.blur} />\n </filter>\n ))}\n <clipPath id={`${id}c`}>\n <rect y={HZ} width={400} height={200} />\n </clipPath>\n <filter id={`${id}rip`} x=\"0\" y=\"0\" width=\"1\" height=\"1\">\n <feTurbulence\n type=\"fractalNoise\"\n baseFrequency=\"0.003 0.12\"\n numOctaves={2}\n seed={seed}\n />\n <feDisplacementMap\n in=\"SourceGraphic\"\n scale={14}\n xChannelSelector=\"R\"\n yChannelSelector=\"G\"\n />\n <feGaussianBlur stdDeviation=\"0.8 1.6\" />\n </filter>\n <filter id={`${id}n`} x=\"0\" y=\"0\" width=\"1\" height=\"1\">\n <feTurbulence\n type=\"fractalNoise\"\n baseFrequency={0.9}\n numOctaves={2}\n seed={seed + 3}\n />\n <feColorMatrix values=\"0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.16 0\" />\n </filter>\n </defs>\n <g transform={`translate(200 250) scale(${zoom}) translate(-200 -250)`}>\n {sky}\n {land(false)}\n <g clipPath={`url(#${id}c)`} filter={`url(#${id}rip)`}>\n <g transform={`translate(0 ${HZ * 2}) scale(1 -1)`}>\n {sky}\n {land(true)}\n </g>\n <rect y={HZ} width={400} height={200} fill={`url(#${id}w)`} />\n <ellipse\n cx={sunX}\n cy={HZ + 70}\n rx={9}\n ry={70}\n fill={m.sun}\n opacity={0.35}\n filter={`url(#${id}gl)`}\n />\n </g>\n </g>\n <rect\n width={400}\n height={500}\n filter={`url(#${id}n)`}\n style={{ mixBlendMode: \"overlay\" }}\n />\n <rect width={400} height={500} fill={`url(#${id}v)`} />\n </svg>\n );\n}\n\nfunction Icon({\n d,\n size = 24,\n color,\n sw = 1.9,\n fill = \"none\",\n}: {\n d: string;\n size?: number;\n color: string;\n sw?: number;\n fill?: string;\n}) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <path\n d={d}\n fill={fill}\n stroke={color}\n strokeWidth={sw}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nconst ACCOUNTS = [\n { name: \"kitebase\", bg: \"#5f7f86\", glyph: \"M12 3l6 9-6 9-6-9z\" },\n {\n name: \"lumen.app\",\n bg: \"#b98a5e\",\n glyph: \"M12 7a5 5 0 1 0 0 10 5 5 0 0 0 0-10z\",\n },\n {\n name: \"fernway\",\n bg: \"#7d8b63\",\n glyph: \"M6 18C6 10 11 5 19 5c0 8-5 13-13 13zM6 18l7-7\",\n },\n { name: \"quarry.hq\", bg: \"#7a7487\", glyph: \"M5 5h14v14H5z\" },\n];\n\nfunction Avatar({\n size,\n bg,\n glyph,\n play,\n}: {\n size: number;\n bg: string;\n glyph?: string;\n play?: boolean;\n}) {\n const seed = (glyph ?? bg)\n .split(\"\")\n .reduce((n, ch) => n + ch.charCodeAt(0), 0);\n const moods: Mood[] = [\"golden\", \"dusk\", \"alpine\", \"sunset\"];\n return (\n <div\n style={{\n position: \"relative\",\n width: size,\n height: size,\n borderRadius: size / 2,\n background: play ? bg : \"#222\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexShrink: 0,\n overflow: \"hidden\",\n }}\n >\n {play ? (\n <svg viewBox=\"0 0 124.06 134.26\" height={size * 0.4} aria-hidden>\n <path fill=\"#fff\" d={REMOCN_R_PATH} />\n </svg>\n ) : (\n <Photo mood={moods[seed % 4]} seed={seed % 17} zoom={1.6} />\n )}\n </div>\n );\n}\n\nfunction Ring({\n size,\n children,\n seen,\n gap,\n color,\n}: {\n size: number;\n children: React.ReactNode;\n seen?: boolean;\n gap: string;\n color: string;\n}) {\n return (\n <div\n style={{\n width: size,\n height: size,\n borderRadius: size / 2,\n padding: seen ? 1.5 : 3,\n boxSizing: \"border-box\",\n background: seen ? \"#c7c7cc\" : color,\n }}\n >\n <div\n style={{\n width: \"100%\",\n height: \"100%\",\n borderRadius: \"50%\",\n padding: seen ? 3 : 3,\n boxSizing: \"border-box\",\n background: gap,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n {children}\n </div>\n </div>\n );\n}\n\nfunction StatusBar({ color }: { color: string }) {\n return (\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n height: 54,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n padding: \"6px 32px 0 52px\",\n zIndex: 30,\n color,\n }}\n >\n <span style={{ fontSize: 17, fontWeight: 400 }}>9:41</span>\n <div style={{ display: \"flex\", gap: 6, alignItems: \"center\" }}>\n <svg width=\"18\" height=\"12\" viewBox=\"0 0 18 12\">\n {[0, 1, 2, 3].map((i) => (\n <rect\n key={i}\n x={i * 4.6}\n y={9 - i * 3}\n width={3.2}\n height={3 + i * 3}\n rx={0.8}\n fill={color}\n />\n ))}\n </svg>\n <svg width=\"16\" height=\"12\" viewBox=\"0 0 16 12\">\n <path d=\"M8 11.5l2.4-2.9a3.6 3.6 0 0 0-4.8 0z\" fill={color} />\n <path\n d=\"M3.6 6.3a6.6 6.6 0 0 1 8.8 0\"\n stroke={color}\n strokeWidth={1.7}\n fill=\"none\"\n strokeLinecap=\"round\"\n />\n <path\n d=\"M1 3.4a10.4 10.4 0 0 1 14 0\"\n stroke={color}\n strokeWidth={1.7}\n fill=\"none\"\n strokeLinecap=\"round\"\n />\n </svg>\n <div\n style={{\n width: 25,\n height: 12,\n borderRadius: 3.5,\n border: `1px solid ${color}`,\n padding: 1.5,\n boxSizing: \"border-box\",\n opacity: 0.95,\n }}\n >\n <div\n style={{\n width: \"80%\",\n height: \"100%\",\n borderRadius: 2,\n background: color,\n }}\n />\n </div>\n </div>\n </div>\n );\n}\n\nfunction Phone({ children }: { children: React.ReactNode }) {\n const btn = (side: \"left\" | \"right\", top: number, h: number) => (\n <div\n style={{\n position: \"absolute\",\n [side]: -3,\n top,\n width: 4,\n height: h,\n borderRadius: 2,\n background: \"#3A3A3D\",\n }}\n />\n );\n return (\n <div style={{ position: \"relative\", width: BW, height: BH }}>\n {btn(\"left\", 150, 32)}\n {btn(\"left\", 210, 62)}\n {btn(\"left\", 284, 62)}\n {btn(\"right\", 236, 98)}\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n borderRadius: 68,\n background: \"#0B0B0C\",\n boxShadow: \"inset 0 0 0 1.5px #6E6E73, inset 0 0 0 3px #1C1C1E\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: BEZEL,\n top: BEZEL,\n width: SW,\n height: SH,\n borderRadius: 56,\n overflow: \"hidden\",\n background: \"#000\",\n }}\n >\n {children}\n <div\n style={{\n position: \"absolute\",\n top: 11,\n left: (SW - 126) / 2,\n width: 126,\n height: 37,\n borderRadius: 19,\n background: \"#000\",\n zIndex: 40,\n }}\n />\n </div>\n </div>\n );\n}\n\nfunction Ticker({\n from,\n to,\n p,\n style,\n}: {\n from: string;\n to: string;\n p: number;\n style: React.CSSProperties;\n}) {\n const q = p < 0.5 ? p * 2 : (p - 0.5) * 2;\n return (\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n fontVariantNumeric: \"tabular-nums\",\n ...style,\n }}\n >\n {to.split(\"\").map((ch, i) => {\n const prev = from[i] ?? \"\";\n if (prev === ch) return <span key={`${i}-${ch}`}>{ch}</span>;\n const out = p < 0.5;\n return (\n <span\n key={`${i}-${ch}`}\n style={{\n display: \"inline-block\",\n transform: `translateY(${out ? -q * 5 : (1 - q) * 5}px)`,\n opacity: out ? 1 - q : q,\n }}\n >\n {out ? prev : ch}\n </span>\n );\n })}\n </div>\n );\n}\n\nfunction ProductScene({ t, accent }: { t: number; accent: string }) {\n const { fps } = useVideoConfig();\n const inn = spring({\n frame: t,\n fps,\n config: HEAVY,\n });\n const txt = spring({\n frame: t - 6,\n fps,\n config: CARD,\n });\n const tracks = [\n { x: 8, w: 46, c: accent, o: 1 },\n { x: 30, w: 52, c: accent, o: 0.6 },\n { x: 4, w: 30, c: \"#ffffff\", o: 0.35 },\n { x: 40, w: 50, c: accent, o: 0.4 },\n ];\n return (\n <AbsoluteFill\n style={{\n background:\n \"linear-gradient(170deg, #0b0c10 0%, #15171f 60%, #1c1f2a 100%)\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 26,\n top: 128,\n color: \"#fff\",\n fontSize: 38,\n fontWeight: 400,\n letterSpacing: \"-0.035em\",\n lineHeight: 1.1,\n opacity: txt,\n transform: `translateY(${(1 - txt) * 20}px)`,\n }}\n >\n Launch videos,\n <br />\n <span style={{ color: \"rgba(255,255,255,0.55)\" }}>\n written in code.\n </span>\n </div>\n <div\n style={{\n position: \"absolute\",\n left: 24,\n top: 290,\n width: 345,\n height: 250,\n borderRadius: 14,\n background: \"#0f1117\",\n boxShadow:\n \"0 30px 60px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.08)\",\n transform: `rotate(-3deg) translateY(${(1 - inn) * 80 + Math.sin(t / 14) * 3}px)`,\n opacity: inn,\n overflow: \"hidden\",\n }}\n >\n <div\n style={{\n padding: \"9px 12px\",\n fontSize: 12,\n color: \"rgba(255,255,255,0.55)\",\n }}\n >\n launch.tsx\n </div>\n <div\n style={{\n margin: \"0 12px\",\n height: 118,\n borderRadius: 8,\n position: \"relative\",\n overflow: \"hidden\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: \"#fff\",\n fontSize: 30,\n fontWeight: 400,\n letterSpacing: \"-0.045em\",\n }}\n >\n <Photo mood=\"dusk\" seed={9} zoom={1 + t * 0.002} />\n <span\n style={{\n position: \"relative\",\n textShadow: \"0 2px 12px rgba(0,0,0,0.3)\",\n }}\n >\n remocn\n </span>\n </div>\n <div style={{ margin: \"10px 12px 0\", position: \"relative\" }}>\n {tracks.map((tr, i) => (\n <div\n key={`${tr.x}-${tr.w}`}\n style={{\n height: 14,\n marginBottom: 5,\n borderRadius: 4,\n background: \"rgba(255,255,255,0.05)\",\n position: \"relative\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: `${tr.x}%`,\n width: `${tr.w}%`,\n top: 0,\n bottom: 0,\n borderRadius: 4,\n background: tr.c,\n opacity: tr.o,\n transform: `scaleX(${interpolate(t, [8 + i * 4, 24 + i * 4], [0, 1], clamp)})`,\n transformOrigin: \"left\",\n }}\n />\n </div>\n ))}\n <div\n style={{\n position: \"absolute\",\n top: -4,\n bottom: 0,\n width: 2,\n background: \"#fff\",\n left: `${interpolate(t, [0, 46], [10, 74], clamp)}%`,\n }}\n />\n </div>\n </div>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: 600,\n transform: `translateX(-50%) rotate(-2deg) scale(${0.9 + 0.1 * spring({ frame: t - 14, fps, config: CHIP })})`,\n opacity: interpolate(t, [14, 18], [0, 1], clamp),\n background: \"#fff\",\n borderRadius: 10,\n padding: \"9px 14px\",\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n color: accent,\n fontSize: 16,\n fontWeight: 400,\n boxShadow: \"0 1px 2px rgba(0,0,0,0.12), 0 6px 20px rgba(0,0,0,0.2)\",\n }}\n >\n <Icon d={P.link} size={18} color={accent} sw={2.4} />\n remocn.dev\n </div>\n </AbsoluteFill>\n );\n}\n\nfunction LaunchScene({ t, accent }: { t: number; accent: string }) {\n const { fps } = useVideoConfig();\n const card = spring({\n frame: t - 2,\n fps,\n config: CARD,\n });\n return (\n <AbsoluteFill style={{ background: \"#0b0d18\" }}>\n <Photo mood=\"dusk\" seed={2} zoom={1.06 + t * 0.0015} />\n <div\n style={{\n position: \"absolute\",\n left: 46,\n top: 200,\n width: 300,\n height: 330,\n borderRadius: 30,\n background: \"#fff\",\n boxShadow: \"0 1px 2px rgba(0,0,0,0.12), 0 24px 60px rgba(0,0,0,0.35)\",\n transform: `rotate(${-6 + (1 - card) * -8}deg) scale(${0.92 + card * 0.08})`,\n opacity: Math.min(1, card * 2),\n padding: 26,\n boxSizing: \"border-box\",\n }}\n >\n <div\n style={{\n fontSize: 140,\n fontWeight: 300,\n letterSpacing: \"-0.06em\",\n lineHeight: \"130px\",\n marginTop: 6,\n color: accent,\n }}\n >\n v2\n </div>\n <div\n style={{\n fontSize: 44,\n fontWeight: 400,\n letterSpacing: \"-0.04em\",\n color: \"#111\",\n marginTop: -6,\n }}\n >\n is live.\n </div>\n <div\n style={{\n fontSize: 15,\n color: \"#6e6e76\",\n marginTop: 18,\n fontWeight: 400,\n }}\n >\n 200+ components · remocn.dev\n </div>\n </div>\n </AbsoluteFill>\n );\n}\n\nfunction PollScene({\n t,\n accent,\n question,\n options,\n vote,\n}: {\n t: number;\n accent: string;\n question: string;\n options: [string, string];\n vote: number;\n}) {\n const { fps } = useVideoConfig();\n const pop = spring({\n frame: t - 4,\n fps,\n config: CARD,\n });\n const pct = [82, 18];\n return (\n <AbsoluteFill style={{ background: \"#2e2a3a\" }}>\n <Photo mood=\"golden\" seed={6} zoom={1.04 + t * 0.0015} />\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n top: 170,\n textAlign: \"center\",\n color: \"#fff\",\n fontSize: 30,\n fontWeight: 400,\n letterSpacing: \"-0.03em\",\n textShadow: \"0 1px 12px rgba(0,0,0,0.25)\",\n }}\n >\n Launch week\n <br />\n <span style={{ fontSize: 17, fontWeight: 400, opacity: 0.9 }}>\n @remocn\n </span>\n </div>\n <div\n style={{\n position: \"absolute\",\n left: 40,\n right: 40,\n top: 320,\n background: \"#fff\",\n borderRadius: 24,\n padding: \"18px 12px 12px\",\n boxShadow:\n \"0 1px 2px rgba(0,0,0,0.1), 0 18px 40px rgba(40,20,30,0.25)\",\n transform: `scale(${0.9 + pop * 0.1}) rotate(-1.5deg)`,\n opacity: Math.min(1, pop * 2),\n }}\n >\n <div\n style={{\n fontSize: 19,\n fontWeight: 400,\n color: \"#111\",\n textAlign: \"center\",\n lineHeight: \"24px\",\n marginBottom: 14,\n letterSpacing: -0.3,\n }}\n >\n {question}\n </div>\n {options.map((o, i) => {\n const w = vote * pct[i];\n return (\n <div\n key={o}\n style={{\n position: \"relative\",\n height: 46,\n borderRadius: 12,\n background: \"#efeff2\",\n marginTop: i ? 8 : 0,\n overflow: \"hidden\",\n display: \"flex\",\n alignItems: \"center\",\n padding: \"0 18px\",\n fontSize: 16,\n fontWeight: 400,\n color: \"#111\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n bottom: 0,\n width: `${w}%`,\n background: i === 0 ? accent : \"#d6d6dc\",\n }}\n />\n <span\n style={{\n position: \"relative\",\n flex: 1,\n color: i === 0 && vote > 0.3 ? \"#fff\" : \"#111\",\n textAlign: vote > 0.05 ? \"left\" : \"center\",\n }}\n >\n {o}\n </span>\n <span\n style={{\n position: \"relative\",\n opacity: vote,\n color: i === 0 && w > 80 ? \"#fff\" : \"#3a3a40\",\n fontVariantNumeric: \"tabular-nums\",\n }}\n >\n {Math.round(w)}%\n </span>\n </div>\n );\n })}\n </div>\n </AbsoluteFill>\n );\n}\n\nfunction ReelScene({ t }: { t: number }) {\n const { fps } = useVideoConfig();\n const words = [\"Ship\", \"your\", \"launch\", \"video.\", \"Today.\"];\n const idx = Math.min(words.length - 1, Math.max(0, Math.floor(t / 13)));\n const w = spring({\n frame: t - idx * 13,\n fps,\n config: CHIP,\n });\n return (\n <AbsoluteFill style={{ background: \"#07070c\" }}>\n <Photo mood=\"alpine\" seed={12} zoom={1.08 + t * 0.0012} />\n <AbsoluteFill style={{ background: \"rgba(5,8,16,0.38)\" }} />\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n top: 330,\n textAlign: \"center\",\n color: \"#fff\",\n fontSize: 76,\n fontWeight: 300,\n letterSpacing: \"-0.045em\",\n transform: `scale(${0.92 + w * 0.08}) translateY(${(1 - w) * 14}px)`,\n opacity: Math.min(1, w * 2),\n textShadow: \"0 2px 24px rgba(0,0,0,0.3)\",\n }}\n >\n {words[idx]}\n </div>\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n top: 430,\n textAlign: \"center\",\n color: \"rgba(255,255,255,0.8)\",\n fontSize: 13,\n fontWeight: 400,\n letterSpacing: \"0.14em\",\n }}\n >\n REMOCN V2\n </div>\n </AbsoluteFill>\n );\n}\n\nfunction Scene({ src, children }: { src?: string; children: React.ReactNode }) {\n return src ? (\n <Img\n src={src}\n style={{\n position: \"absolute\",\n inset: 0,\n width: \"100%\",\n height: \"100%\",\n objectFit: \"cover\",\n }}\n />\n ) : (\n children\n );\n}\n\nexport function ReelsFeed({\n account = \"remocn\",\n stories = [],\n reelSrc,\n pollQuestion = \"Shipping a launch video this week?\",\n pollOptions = [\"Yes, this week\", \"Not yet\"],\n likes = [\"12.4K\", \"12.5K\"],\n accent = \"#3B5BFD\",\n speed = 1,\n theme = \"light\",\n lines,\n ground,\n groundParams,\n}: ReelsFeedProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n const uid = useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n const f = frame * speed;\n const dark = theme === \"dark\";\n const c = dark\n ? {\n bg: \"#000\",\n text: \"#f5f5f5\",\n muted: \"#a8a8a8\",\n line: \"#262626\",\n over: \"#FFF6EE\",\n overMuted: \"rgba(255,240,228,0.62)\",\n }\n : {\n bg: \"#fff\",\n text: \"#0c0c0d\",\n muted: \"#737373\",\n line: \"#dbdbdb\",\n over: \"#1D1714\",\n overMuted: \"rgba(40,28,22,0.6)\",\n };\n const tall = height > width;\n const k = tall ? (height * 0.6) / BH : (height * 0.9) / BH;\n const phoneC = tall\n ? { x: width / 2, y: height * 0.36 }\n : { x: width * 0.69, y: height / 2 };\n const u = width / (tall ? 1080 : 1280);\n const rise = spring({ frame: f, fps, config: HEAVY });\n const sp = (at: number, config: typeof CARD) =>\n spring({ frame: f - at, fps, config });\n const copy = lines ?? [\n \"Your launch, in their stories.\",\n \"Ask the room before you ship.\",\n `${likes[1]} likes by lunch.`,\n ];\n const chapters = [\"Story\", \"Poll\", \"Reel\"];\n const beats = [\n [0, 136],\n [136, 206],\n [206, 1e9],\n ];\n const lineEls = copy.map((line, i) => {\n const [a, b] = beats[i];\n const inn = interpolate(f, [a + (i ? 4 : 14), a + (i ? 20 : 30)], [0, 1], {\n ...clamp,\n easing: ENTER,\n });\n const out = interpolate(f, [b, b + 8], [0, 1], {\n ...clamp,\n easing: EXIT,\n });\n if (inn <= 0 || out >= 1) return null;\n return (\n <div\n key={chapters[i]}\n style={{ position: \"absolute\", left: 0, right: 0, top: 0 }}\n >\n <div\n style={{\n fontSize: (tall ? 28 : 20) * u,\n color: c.overMuted,\n fontVariantNumeric: \"tabular-nums\",\n opacity: inn * (1 - out),\n }}\n >\n 0{i + 1} <span style={{ opacity: 0.5 }}>/</span> {chapters[i]}\n </div>\n <div style={{ overflow: \"hidden\", paddingBottom: 10 * u }}>\n <div\n style={{\n marginTop: 12 * u,\n fontSize: (tall ? 88 : 64) * u,\n fontWeight: 300,\n lineHeight: 1.02,\n letterSpacing: \"-0.045em\",\n color: c.over,\n textWrap: \"balance\",\n transform: `translateY(${(1 - inn) * 105 - out * 40}%)`,\n opacity: 1 - out,\n }}\n >\n {line}\n </div>\n </div>\n </div>\n );\n });\n\n const RING = 86;\n const ringX = 12 + 1 * 98 + RING / 2;\n const ringY = 106 + RING / 2;\n const ringPress = interpolate(\n f,\n [TAP_STORY - 1, TAP_STORY + 2, TAP_STORY + 8],\n [1, 0.96, 1],\n clamp,\n );\n const open = interpolate(f, [OPEN, OPEN + 16], [0, 1], {\n ...clamp,\n easing: ENTER,\n });\n const seg = SEG.findIndex((s, i) => f >= s && f < (SEG[i + 1] ?? 1e9));\n const storyIdx = Math.max(0, Math.min(2, seg));\n const segT = f - SEG[storyIdx];\n const swipe = interpolate(f, [SWIPE, REEL], [0, 1], {\n ...clamp,\n easing: ENTER,\n });\n const vote = interpolate(f, [POLL_TAP + 1, POLL_TAP + 16], [0, 1], {\n ...clamp,\n easing: Easing.bezier(0.22, 1, 0.36, 1),\n });\n\n const burst = sp(DT + 6, CHIP);\n const burstOut = interpolate(f, [DT + 26, DT + 40], [0, 1], {\n ...clamp,\n easing: EXIT,\n });\n const liked = sp(DT + 7, CHIP);\n const tick = interpolate(f, [DT + 8, DT + 16], [0, 1], {\n ...clamp,\n easing: Easing.bezier(0.22, 1, 0.36, 1),\n });\n\n const keys = [\n { t: 20, x: 300, y: 420 },\n { t: TAP_STORY - 2, x: ringX, y: ringY },\n { t: POLL_TAP - 16, x: ringX, y: ringY },\n { t: POLL_TAP - 2, x: 120, y: 456 },\n { t: SWIPE - 6, x: 200, y: 700 },\n { t: SWIPE, x: 200, y: 700 },\n { t: REEL - 2, x: 200, y: 300 },\n { t: DT - 10, x: 196, y: 410 },\n ];\n let tap = keys[0];\n for (let i = 0; i < keys.length - 1; i++) {\n const a = keys[i];\n const b = keys[i + 1];\n const e = glide(Math.min(1, Math.max(0, (f - a.t) / (b.t - a.t))));\n const arc = Math.hypot(b.x - a.x, b.y - a.y) * 0.18 * Math.sin(Math.PI * e);\n if (f >= a.t)\n tap = {\n t: f,\n x: a.x + (b.x - a.x) * e + arc * 0.6,\n y: a.y + (b.y - a.y) * e - arc,\n };\n }\n const show = (a: number, b: number) =>\n interpolate(f, [a, a + 6, b, b + 6], [0, 1, 1, 0], clamp);\n const tapOpacity = Math.max(\n show(20, TAP_STORY + 4),\n show(POLL_TAP - 14, POLL_TAP + 4),\n show(SWIPE - 8, REEL),\n show(DT - 12, DT + 12),\n );\n const bump = (at: number) =>\n interpolate(f, [at - 1, at + 2, at + 7], [0, 1, 0], clamp);\n const tapScale =\n 1 -\n 0.2 *\n Math.max(\n bump(TAP_STORY),\n bump(POLL_TAP),\n bump(DT),\n bump(DT + 6),\n f >= SWIPE - 2 && f < REEL ? 1 : 0,\n );\n\n const storyHeader = (\n <div\n style={{ position: \"absolute\", left: 12, right: 12, top: 58, zIndex: 5 }}\n >\n <div style={{ display: \"flex\", gap: 4 }}>\n {[0, 1, 2].map((i) => {\n const p =\n i < storyIdx\n ? 1\n : i > storyIdx\n ? 0\n : interpolate(segT, [0, SEG[i + 1] - SEG[i]], [0, 1], clamp);\n return (\n <div\n key={i}\n style={{\n flex: 1,\n height: 2.5,\n borderRadius: 2,\n background: \"rgba(255,255,255,0.35)\",\n overflow: \"hidden\",\n }}\n >\n <div\n style={{\n width: `${p * 100}%`,\n height: \"100%\",\n background: \"#fff\",\n }}\n />\n </div>\n );\n })}\n </div>\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 9,\n marginTop: 10,\n color: \"#fff\",\n }}\n >\n <Avatar size={32} bg={accent} play />\n <span style={{ fontSize: 14, fontWeight: 400 }}>{account}</span>\n <span style={{ fontSize: 14, color: \"rgba(255,255,255,0.7)\" }}>2h</span>\n <div style={{ flex: 1 }} />\n <svg width=\"22\" height=\"22\" viewBox=\"0 0 24 24\">\n {[5, 12, 19].map((x) => (\n <circle key={x} cx={x} cy={12} r={1.7} fill=\"#fff\" />\n ))}\n </svg>\n <Icon d={P.close} size={26} color=\"#fff\" sw={2} />\n </div>\n </div>\n );\n\n const actions = [\n { d: P.heart, n: \"\" },\n { d: P.comment, n: \"318\" },\n { d: P.repost, n: \"1,204\" },\n { d: P.send, n: \"2,871\" },\n ];\n\n return (\n <AbsoluteFill\n style={{\n fontFamily,\n overflow: \"hidden\",\n }}\n >\n <GshGround\n preset={ground ?? (dark ? \"static-sunset\" : \"paper-crease\")}\n params={\n groundParams ??\n (dark\n ? undefined\n : {\n colors: [\"#f29a6b\", \"#f6c3a0\", \"#efdccf\", \"#3a2430\"],\n background: \"#f1ebe4\",\n })\n }\n timeOffset={6}\n timeScale={0.35}\n />\n <AbsoluteFill\n style={{\n background: dark\n ? tall\n ? \"linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(8,4,2,0.55) 100%)\"\n : \"linear-gradient(90deg, rgba(8,4,2,0.55) 0%, rgba(8,4,2,0) 55%)\"\n : \"transparent\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n ...(tall\n ? { left: 80 * u, right: 80 * u, top: height * 0.71 }\n : { left: 92 * u, width: 470 * u, top: height / 2 - 110 * u }),\n }}\n >\n {lineEls}\n </div>\n <div\n style={{\n position: \"absolute\",\n left: phoneC.x - BW / 2,\n top: phoneC.y - BH / 2,\n width: BW,\n height: BH,\n transform: `translateY(${(1 - rise) * height * 0.8}px) scale(${k * (1 + 0.02 * (f / 300))})`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n borderRadius: 68,\n boxShadow: dark\n ? \"0 50px 100px -20px rgba(0,0,0,0.75)\"\n : \"0 2px 6px rgba(60,30,20,0.12), 0 50px 100px -30px rgba(80,40,20,0.45)\",\n }}\n />\n <Phone>\n {f < OPEN + 16 && (\n <AbsoluteFill style={{ background: c.bg, color: c.text }}>\n <StatusBar color={c.text} />\n <div\n style={{\n position: \"absolute\",\n top: 54,\n left: 16,\n right: 16,\n height: 46,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n }}\n >\n <Icon d={P.plus} size={27} color={c.text} sw={2} />\n <span\n style={{\n display: \"flex\",\n alignItems: \"baseline\",\n fontFamily: manrope.fontFamily,\n fontSize: 24,\n fontWeight: 600,\n letterSpacing: \"-0.025em\",\n lineHeight: 1,\n }}\n >\n <svg\n viewBox=\"0 0 124.06 134.26\"\n style={{ height: \"0.76em\", width: \"auto\" }}\n aria-hidden\n >\n <path fill=\"currentColor\" d={REMOCN_R_PATH} />\n </svg>\n <span style={{ marginLeft: \"0.04em\" }}>emocn</span>\n </span>\n <div style={{ position: \"relative\" }}>\n <Icon d={P.heart} size={27} color={c.text} sw={2} />\n <div\n style={{\n position: \"absolute\",\n right: -1,\n top: 0,\n width: 9,\n height: 9,\n borderRadius: 5,\n background: \"#ff3040\",\n border: `2px solid ${c.bg}`,\n }}\n />\n </div>\n </div>\n <div\n style={{\n position: \"absolute\",\n top: 106,\n left: 12,\n display: \"flex\",\n gap: 12,\n }}\n >\n {[\n {\n name: \"Your story\",\n bg: \"#9ca3af\",\n glyph:\n \"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4.5 21a7.5 7.5 0 0 1 15 0\",\n },\n { name: account, bg: accent, play: true },\n ...ACCOUNTS,\n ].map((a, i) => (\n <div\n key={a.name}\n style={{\n width: RING,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n transform: i === 1 ? `scale(${ringPress})` : undefined,\n }}\n >\n <div style={{ position: \"relative\" }}>\n {i === 0 ? (\n <div\n style={{\n width: RING,\n height: RING,\n padding: 4,\n boxSizing: \"border-box\",\n }}\n >\n <Avatar\n size={RING - 8}\n bg={a.bg}\n glyph={\"glyph\" in a ? a.glyph : undefined}\n />\n </div>\n ) : (\n <Ring\n size={RING}\n gap={c.bg}\n seen={i > 3}\n color={accent}\n >\n <Avatar\n size={RING - 12}\n bg={a.bg}\n glyph={\"glyph\" in a ? a.glyph : undefined}\n play={\"play\" in a}\n />\n </Ring>\n )}\n {i === 0 && (\n <div\n style={{\n position: \"absolute\",\n right: 2,\n bottom: 2,\n width: 26,\n height: 26,\n borderRadius: 13,\n background: c.text,\n border: `3px solid ${c.bg}`,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <Icon d={P.plus} size={14} color={c.bg} sw={3} />\n </div>\n )}\n </div>\n <span\n style={{\n fontSize: 12,\n marginTop: 5,\n color: i === 0 ? c.muted : c.text,\n whiteSpace: \"nowrap\",\n }}\n >\n {a.name}\n </span>\n </div>\n ))}\n </div>\n <div\n style={{\n position: \"absolute\",\n top: 222,\n left: 0,\n right: 0,\n borderTop: `0.5px solid ${c.line}`,\n }}\n >\n <div\n style={{\n height: 56,\n display: \"flex\",\n alignItems: \"center\",\n gap: 10,\n padding: \"0 12px\",\n }}\n >\n <Ring size={36} gap={c.bg} color={accent}>\n <Avatar size={28} bg=\"#5f7f86\" glyph={ACCOUNTS[0].glyph} />\n </Ring>\n <div style={{ flex: 1, lineHeight: \"17px\" }}>\n <div style={{ fontSize: 14, fontWeight: 400 }}>\n kitebase\n </div>\n <div style={{ fontSize: 12 }}>Lisbon, Portugal</div>\n </div>\n <svg width=\"22\" height=\"22\" viewBox=\"0 0 24 24\">\n {[5, 12, 19].map((x) => (\n <circle key={x} cx={x} cy={12} r={1.6} fill={c.text} />\n ))}\n </svg>\n </div>\n <div\n style={{\n position: \"relative\",\n width: SW,\n height: SW * 1.25,\n overflow: \"hidden\",\n }}\n >\n <Photo mood=\"sunset\" seed={4} />\n </div>\n <div\n style={{\n height: 48,\n display: \"flex\",\n alignItems: \"center\",\n gap: 16,\n padding: \"0 14px\",\n }}\n >\n <Icon d={P.heart} size={26} color={c.text} />\n <Icon d={P.comment} size={25} color={c.text} />\n <Icon d={P.repost} size={25} color={c.text} />\n <Icon d={P.send} size={25} color={c.text} />\n <div style={{ flex: 1 }} />\n <Icon d={P.bookmark} size={25} color={c.text} />\n </div>\n <div\n style={{\n padding: \"0 14px\",\n fontSize: 14,\n lineHeight: \"19px\",\n }}\n >\n <span>2,184 likes</span>\n <div>\n <span>kitebase</span> Our launch film is out. Cut it in an\n afternoon with remocn\n </div>\n </div>\n </div>\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n bottom: 0,\n height: 84,\n background: c.bg,\n borderTop: `0.5px solid ${c.line}`,\n display: \"flex\",\n justifyContent: \"space-around\",\n paddingTop: 12,\n boxSizing: \"border-box\",\n }}\n >\n {[P.home, P.reels, P.send, P.search].map((d, i) => (\n <Icon\n key={d}\n d={d}\n size={27}\n color={c.text}\n sw={i === 0 ? 2.3 : 1.9}\n fill={i === 0 ? c.text : \"none\"}\n />\n ))}\n <Avatar\n size={27}\n bg=\"#e879a6\"\n glyph=\"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8z\"\n />\n </div>\n <AbsoluteFill\n style={{ background: \"#000\", opacity: open * 0.7 }}\n />\n </AbsoluteFill>\n )}\n\n {f >= OPEN && (\n <AbsoluteFill\n style={{\n background: \"#000\",\n overflow: \"hidden\",\n borderRadius: (1 - open) * 120 + 56,\n opacity:\n interpolate(open, [0, 0.12], [0, 1], clamp) *\n (1 - swipe * 0.7),\n transform: `translate(${(ringX - SW / 2) * (1 - open)}px, ${(ringY - SH / 2) * (1 - open) - swipe * SH * 0.35}px) scale(${(0.18 + 0.82 * open) * (1 - swipe * 0.08)})`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n top: 50,\n height: 718,\n borderRadius: 10,\n overflow: \"hidden\",\n }}\n >\n <Scene src={stories[storyIdx]?.src}>\n {storyIdx === 0 && (\n <ProductScene t={segT + 22} accent={accent} />\n )}\n {storyIdx === 1 && <LaunchScene t={segT} accent={accent} />}\n {storyIdx === 2 && (\n <PollScene\n t={segT}\n accent={accent}\n question={pollQuestion}\n options={pollOptions}\n vote={vote}\n />\n )}\n </Scene>\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n top: 0,\n height: 120,\n background:\n \"linear-gradient(rgba(0,0,0,0.35), transparent)\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"#fff\",\n opacity: interpolate(segT, [0, 5], [0, 0], clamp),\n }}\n />\n </div>\n {storyHeader}\n <div\n style={{\n position: \"absolute\",\n left: 12,\n right: 12,\n top: 780,\n height: 44,\n display: \"flex\",\n alignItems: \"center\",\n gap: 16,\n }}\n >\n <div\n style={{\n flex: 1,\n height: 44,\n borderRadius: 22,\n border: \"1px solid rgba(255,255,255,0.55)\",\n color: \"#fff\",\n display: \"flex\",\n alignItems: \"center\",\n padding: \"0 18px\",\n fontSize: 15,\n }}\n >\n Send message\n </div>\n <Icon d={P.heart} size={27} color=\"#fff\" />\n <Icon d={P.send} size={26} color=\"#fff\" />\n </div>\n </AbsoluteFill>\n )}\n\n {f >= SWIPE && (\n <AbsoluteFill\n style={{\n background: \"#000\",\n transform: `translateY(${(1 - swipe) * SH}px)`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n top: 0,\n bottom: 84,\n overflow: \"hidden\",\n }}\n >\n <Scene src={reelSrc}>\n <ReelScene t={f - SWIPE} />\n </Scene>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n background:\n \"linear-gradient(rgba(0,0,0,0.3), transparent 18%, transparent 70%, rgba(0,0,0,0.55))\",\n }}\n />\n </div>\n <div\n style={{\n position: \"absolute\",\n top: 58,\n left: 16,\n right: 16,\n display: \"flex\",\n alignItems: \"center\",\n color: \"#fff\",\n }}\n >\n <Icon d={P.plus} size={27} color=\"#fff\" sw={2} />\n <div\n style={{\n flex: 1,\n display: \"flex\",\n justifyContent: \"center\",\n gap: 14,\n fontSize: 21,\n fontWeight: 400,\n letterSpacing: -0.3,\n }}\n >\n <span>Reels</span>\n <span style={{ opacity: 0.6 }}>Friends</span>\n </div>\n <Icon d={P.sliders} size={26} color=\"#fff\" sw={2} />\n </div>\n <div\n style={{\n position: \"absolute\",\n right: 10,\n bottom: 116,\n width: 52,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n gap: 18,\n color: \"#fff\",\n fontSize: 13,\n fontWeight: 400,\n fontVariantNumeric: \"tabular-nums\",\n }}\n >\n {actions.map((a, i) => (\n <div\n key={a.d}\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n gap: 4,\n }}\n >\n {i === 0 ? (\n <div\n style={{\n transform: `scale(${1 + (liked > 0.01 ? Math.sin(Math.min(1, liked) * Math.PI) * 0.35 : 0)})`,\n }}\n >\n <Icon\n d={P.heart}\n size={30}\n color={liked > 0.02 ? \"#ff3040\" : \"#fff\"}\n fill={liked > 0.02 ? \"#ff3040\" : \"none\"}\n sw={2}\n />\n </div>\n ) : (\n <Icon d={a.d} size={28} color=\"#fff\" sw={2} />\n )}\n {i === 0 ? (\n <Ticker\n from={likes[0]}\n to={likes[1]}\n p={tick}\n style={{ height: 16, lineHeight: \"16px\" }}\n />\n ) : (\n <span>{a.n}</span>\n )}\n </div>\n ))}\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n {[5, 12, 19].map((x) => (\n <circle key={x} cx={x} cy={12} r={1.8} fill=\"#fff\" />\n ))}\n </svg>\n <div\n style={{\n width: 28,\n height: 28,\n borderRadius: 7,\n border: \"2px solid #fff\",\n position: \"relative\",\n overflow: \"hidden\",\n }}\n >\n <Photo mood=\"alpine\" seed={12} />\n </div>\n </div>\n <div\n style={{\n position: \"absolute\",\n left: 14,\n right: 76,\n bottom: 100,\n color: \"#fff\",\n }}\n >\n <div style={{ display: \"flex\", alignItems: \"center\", gap: 9 }}>\n <Avatar size={32} bg={accent} play />\n <span style={{ fontSize: 14, fontWeight: 400 }}>\n {account}\n </span>\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\">\n <path\n d=\"M12 1.5l2.6 1.9 3.2-.1 1 3 2.6 1.9-1 3 1 3-2.6 1.9-1 3-3.2-.1L12 22.5l-2.6-1.9-3.2.1-1-3L2.6 15.8l1-3-1-3 2.6-1.9 1-3 3.2.1z\"\n fill=\"#3897f0\"\n />\n <path\n d=\"M8 12.2l2.7 2.6L16 9.5\"\n stroke=\"#fff\"\n strokeWidth={2.2}\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n <span\n style={{\n marginLeft: 4,\n border: \"1px solid rgba(255,255,255,0.6)\",\n borderRadius: 8,\n padding: \"4px 10px\",\n fontSize: 13,\n fontWeight: 400,\n }}\n >\n Follow\n </span>\n </div>\n <div\n style={{ fontSize: 14, marginTop: 10, lineHeight: \"19px\" }}\n >\n v2 is live. 200+ components for launch videos\n </div>\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n marginTop: 8,\n fontSize: 13,\n opacity: 0.92,\n }}\n >\n <Icon d={P.music} size={13} color=\"#fff\" sw={2} />\n <span>{account} · Original audio</span>\n </div>\n </div>\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n bottom: 84,\n height: 2,\n background: \"rgba(255,255,255,0.25)\",\n }}\n >\n <div\n style={{\n width: `${interpolate(f, [REEL, REEL + 120], [4, 60], clamp)}%`,\n height: \"100%\",\n background: \"#fff\",\n }}\n />\n </div>\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n bottom: 0,\n height: 84,\n background: \"#000\",\n display: \"flex\",\n justifyContent: \"space-around\",\n paddingTop: 12,\n boxSizing: \"border-box\",\n }}\n >\n {[P.home, P.reels, P.send, P.search].map((d, i) => (\n <Icon\n key={d}\n d={d}\n size={27}\n color=\"#fff\"\n sw={i === 1 ? 2.4 : 1.9}\n />\n ))}\n <Avatar\n size={27}\n bg=\"#e879a6\"\n glyph=\"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8z\"\n />\n </div>\n {f >= DT + 6 && (\n <div\n style={{\n position: \"absolute\",\n left: SW / 2 - 70,\n top: 340,\n width: 140,\n height: 140,\n transform: `translateY(${-burstOut * 40}px) scale(${(0.6 + burst * 0.4) * (1 - burstOut * 0.15)}) rotate(${-8 + (1 - burst) * 12}deg)`,\n opacity: Math.min(1, burst * 3) * (1 - burstOut),\n }}\n >\n <svg\n width=\"140\"\n height=\"140\"\n viewBox=\"0 0 24 24\"\n style={{\n filter: \"drop-shadow(0 6px 16px rgba(0,0,0,0.28))\",\n }}\n >\n <defs>\n <linearGradient\n id={`${uid}heart`}\n x1=\"0\"\n y1=\"0\"\n x2=\"1\"\n y2=\"1\"\n >\n <stop offset=\"0\" stopColor=\"#ff6a6a\" />\n <stop offset=\"1\" stopColor=\"#ff1e56\" />\n </linearGradient>\n </defs>\n <path d={P.heart} fill={`url(#${uid}heart)`} />\n </svg>\n </div>\n )}\n </AbsoluteFill>\n )}\n\n {f >= OPEN + 8 && <StatusBar color=\"#fff\" />}\n <div\n style={{\n position: \"absolute\",\n left: tap.x - 22,\n top: tap.y - 22,\n width: 44,\n height: 44,\n borderRadius: 22,\n background: \"rgba(40,40,48,0.28)\",\n border: \"2px solid rgba(255,255,255,0.9)\",\n boxShadow: \"0 4px 14px rgba(0,0,0,0.25)\",\n opacity: tapOpacity,\n transform: `scale(${tapScale})`,\n zIndex: 35,\n }}\n />\n <div\n style={{\n position: \"absolute\",\n bottom: 8,\n left: (SW - 136) / 2,\n width: 136,\n height: 5,\n borderRadius: 3,\n background: f >= OPEN + 4 || dark ? \"#fff\" : \"#111\",\n zIndex: 36,\n }}\n />\n </Phone>\n </div>\n </AbsoluteFill>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/reels-feed.tsx"
}
],
"type": "registry:component"
}