{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "tilt-settle-list",
  "title": "Tilt Settle List",
  "description": "A tilted player card settles beside a ranked list of top scenes.",
  "dependencies": ["remotion", "@remotion/google-fonts"],
  "registryDependencies": ["@remocn/gsh"],
  "files": [
    {
      "path": "registry/remocn/tilt-settle-list/index.tsx",
      "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/Figtree\";\nimport { loadFont as loadMono } from \"@remotion/google-fonts/GeistMono\";\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 figtree = loadFont(\"normal\", {\n  weights: [\"300\", \"400\"],\n  subsets: [\"latin\"],\n});\nconst mono = loadMono(\"normal\", { weights: [\"400\"], subsets: [\"latin\"] });\n\nexport interface ListRow {\n  title: string;\n  meta: string;\n  src?: string;\n}\n\nexport interface TiltSettleListProps {\n  title?: string;\n  accentWord?: number;\n  heroTitle?: string;\n  heroMeta?: string;\n  heroSrc?: string;\n  lines?: string[];\n  rows?: ListRow[];\n  theme?: \"dark\" | \"light\";\n  accent?: string;\n  ink?: string;\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n}\n\nconst THEMES = {\n  dark: {\n    ink: \"#eefaf5\",\n    sub: \"rgba(238,250,245,0.56)\",\n    faint: \"rgba(238,250,245,0.34)\",\n    accent: \"#6ff0c0\",\n    ground: \"polar\" as GshPresetId | undefined,\n    groundParams: undefined as Partial<GradientParams> | undefined,\n    card: \"linear-gradient(180deg, rgba(30,36,38,0.94) 0%, rgba(15,19,21,0.94) 100%)\",\n    cardLine: \"rgba(255,255,255,0.07)\",\n    cardTop: \"rgba(255,255,255,0.08)\",\n    track: \"rgba(255,255,255,0.14)\",\n    divider: \"rgba(255,255,255,0.1)\",\n    play: \"#f4fbf8\",\n    playIcon: \"#0b1512\",\n    shadowRgb: \"0,6,6\",\n    shadowK: 1,\n  },\n  light: {\n    ink: \"#13151c\",\n    sub: \"rgba(19,21,28,0.56)\",\n    faint: \"rgba(19,21,28,0.3)\",\n    accent: \"#3552ff\",\n    ground: \"glasswork\" as GshPresetId | undefined,\n    groundParams: { seed: 3 } as Partial<GradientParams> | undefined,\n    card: \"linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%)\",\n    cardLine: \"rgba(19,21,40,0.07)\",\n    cardTop: \"rgba(255,255,255,1)\",\n    track: \"rgba(19,21,40,0.1)\",\n    divider: \"rgba(19,21,40,0.08)\",\n    play: \"#13151c\",\n    playIcon: \"#ffffff\",\n    shadowRgb: \"30,36,80\",\n    shadowK: 0.45,\n  },\n};\n\nconst DEFAULT_LINES = [\n  \"Open on the product\",\n  \"Type the headline\",\n  \"Zoom blur to the demo\",\n  \"Show the editor\",\n  \"Cut to pricing\",\n  \"Fan the formats\",\n  \"Land the logo\",\n  \"Fade to the URL\",\n];\nconst DEFAULT_ROWS: ListRow[] = [\n  {\n    title: \"Text Reveal\",\n    meta: \"1.2k renders\",\n    src: \"templates/brand-guidelines/ceramics.jpg\",\n  },\n  {\n    title: \"Logo Orbit\",\n    meta: \"980 renders\",\n    src: \"templates/launch-anything/earth.jpg\",\n  },\n  { title: \"Card Fan\", meta: \"740 renders\", src: \"reel/reel-2.jpg\" },\n];\n\nconst BEATS = [\n  { id: \"title\", at: -6 },\n  { id: \"card\", at: -2 },\n  { id: \"lines\", at: 10 },\n  { id: \"rows\", at: 30 },\n  { id: \"step\", at: 24 },\n  { id: \"end\", at: 126 },\n] as const;\nconst beat = (id: (typeof BEATS)[number][\"id\"]) =>\n  BEATS.find((b) => b.id === id)?.at ?? 0;\nconst STEP = 14;\nconst VISIBLE = 6;\nconst ROW_TIMES = [0, 6, 11];\n\nconst EASE_ENTER = Easing.bezier(0.32, 0.72, 0, 1);\nconst EASE_MOVE = Easing.bezier(0.65, 0, 0.35, 1);\nconst EASE_CAMERA = Easing.bezier(0.87, 0, 0.13, 1);\nconst SPRING_SWING = { mass: 1, damping: 17, stiffness: 110 };\nconst SPRING_HEAVY = { mass: 1, damping: 26, stiffness: 120 };\nconst SPRING_CARD = { mass: 0.8, damping: 18, stiffness: 160 };\nconst SPRING_CHIP = { mass: 0.5, damping: 12, stiffness: 200 };\nconst CLAMP = {\n  extrapolateLeft: \"clamp\",\n  extrapolateRight: \"clamp\",\n} as const;\n\nfunction Reveal({\n  frame,\n  at,\n  children,\n}: {\n  frame: number;\n  at: number;\n  children: React.ReactNode;\n}) {\n  const p = interpolate(frame, [at, at + 12], [0, 1], {\n    ...CLAMP,\n    easing: EASE_ENTER,\n  });\n  return (\n    <div\n      style={{\n        overflow: \"hidden\",\n        padding: \"0.04em 0.04em 0.16em\",\n        margin: \"-0.04em -0.04em -0.16em\",\n      }}\n    >\n      <div\n        style={{\n          transform: `translateY(${(1 - p) * 140}%)`,\n          filter: `blur(${(1 - p) * 4}px)`,\n        }}\n      >\n        {children}\n      </div>\n    </div>\n  );\n}\n\nexport function TiltSettleList({\n  title = \"Your top scenes\",\n  accentWord = 1,\n  heroTitle = \"Zoom Blur\",\n  heroMeta = \"Transition · 2.4k renders\",\n  heroSrc,\n  lines = DEFAULT_LINES,\n  rows,\n  theme = \"dark\",\n  accent,\n  ink,\n  ground,\n  groundParams,\n}: TiltSettleListProps) {\n  const frame = useCurrentFrame();\n  const { width: W, height: H, fps } = useVideoConfig();\n  const t = THEMES[theme];\n  const light = theme === \"light\";\n  const fg = ink ?? t.ink;\n  const acc = accent ?? t.accent;\n  const preset = ground ?? (groundParams ? undefined : t.ground);\n  const gParams = groundParams ?? (ground ? undefined : t.groundParams);\n  const portrait = H > W;\n  const S = Math.min(W, H);\n  const k = t.shadowK;\n  const cover = heroSrc ?? staticFile(\"templates/launch-anything/horizon.jpg\");\n  const list = (\n    rows ?? DEFAULT_ROWS.map((r) => ({ ...r, src: staticFile(r.src ?? \"\") }))\n  ).slice(0, 4);\n\n  const titleSize = portrait ? W * 0.085 : W * 0.046;\n  const titleY = portrait ? H * 0.09 : H * 0.115;\n\n  const cardW = portrait ? W * 0.88 : W * 0.55;\n  const cardH = portrait ? H * 0.42 : H * 0.66;\n  const cardX = portrait ? W * 0.06 : W * 0.035;\n  const cardY = portrait ? H * 0.16 : H * 0.235;\n  const pad = S * 0.04;\n  const coverS = portrait ? cardW * 0.42 : cardH * 0.56;\n  const lineSize = portrait ? W * 0.036 : S * 0.04;\n  const lineH = lineSize * 1.42;\n\n  const swing = spring({\n    frame: frame - beat(\"card\"),\n    fps,\n    config: SPRING_SWING,\n  });\n  const swingPrev = spring({\n    frame: frame - beat(\"card\") - 1,\n    fps,\n    config: SPRING_SWING,\n  });\n  const fly = 1 - swing;\n  const mb = Math.min(10, Math.abs(swing - swingPrev) * H * 0.5 * 0.1);\n  const settleRY = portrait ? 0 : 12;\n  const settleRX = portrait ? 6 : 3;\n  const rz = -16 * fly;\n  const rx = settleRX + 40 * fly;\n  const ry = settleRY - 18 * fly;\n  const ty = H * 0.5 * fly;\n  const tx = -W * 0.06 * fly;\n  const sc = 1 + 0.12 * fly;\n\n  const push = interpolate(frame, [0, beat(\"end\")], [1, 1.04], {\n    ...CLAMP,\n    easing: EASE_CAMERA,\n  });\n  const steps = Math.max(\n    0,\n    Math.min(lines.length - 1, Math.floor((frame - beat(\"step\")) / STEP) + 1),\n  );\n  const scrollP = spring({\n    frame: frame - (beat(\"step\") + (steps - 1) * STEP),\n    fps,\n    config: SPRING_HEAVY,\n  });\n  const maxScroll = Math.max(0, lines.length - VISIBLE);\n  const scrollTo = Math.min(maxScroll, Math.max(0, steps - 1));\n  const scrollFrom = Math.min(maxScroll, Math.max(0, steps - 2));\n  const scrollIdx = scrollFrom + (scrollTo - scrollFrom) * scrollP;\n  const progress = interpolate(frame, [0, beat(\"end\")], [0.08, 0.72], {\n    ...CLAMP,\n    easing: EASE_MOVE,\n  });\n\n  const listX = portrait ? W * 0.08 : W * 0.635;\n  const listW = portrait ? W * 0.84 : W * 0.32;\n  const listY = portrait ? H * 0.63 : H * 0.33;\n  const rowH = portrait ? H * 0.085 : H * 0.15;\n  const thumb = portrait ? W * 0.13 : S * 0.085;\n  const rowTitle = portrait ? W * 0.045 : S * 0.033;\n  const rowMeta = portrait ? W * 0.032 : S * 0.024;\n  const rankW = portrait ? W * 0.07 : S * 0.05;\n  const playS = portrait ? W * 0.085 : S * 0.056;\n\n  const titleWords = title.split(\" \");\n  const fmt = (s: number) => `0:${String(Math.floor(s)).padStart(2, \"0\")}`;\n\n  return (\n    <AbsoluteFill style={{ overflow: \"hidden\" }}>\n      <GshGround\n        preset={preset}\n        params={gParams}\n        timeOffset={light ? 2 : 4}\n        timeScale={0.7}\n      />\n      <svg width=\"0\" height=\"0\" style={{ position: \"absolute\" }} aria-hidden>\n        <filter id=\"tsl-mb\" x=\"-20%\" y=\"-30%\" width=\"140%\" height=\"160%\">\n          <feGaussianBlur stdDeviation={`${mb * 0.3} ${mb}`} />\n        </filter>\n      </svg>\n      <AbsoluteFill style={{ transform: `scale(${push})` }}>\n        <div\n          style={{\n            position: \"absolute\",\n            left: 0,\n            width: W,\n            top: titleY - titleSize * 0.55,\n            display: \"flex\",\n            justifyContent: \"center\",\n            columnGap: \"0.24em\",\n            fontFamily: figtree.fontFamily,\n            fontWeight: 300,\n            fontSize: titleSize,\n            letterSpacing: \"-0.04em\",\n            lineHeight: 1.1,\n            color: fg,\n          }}\n        >\n          {titleWords.map((word, i) => {\n            const s = beat(\"title\") + i * 3;\n            const p = interpolate(frame, [s, s + 12], [0, 1], {\n              ...CLAMP,\n              easing: EASE_ENTER,\n            });\n            return (\n              <span\n                key={`${word}-${i}`}\n                style={{\n                  display: \"inline-block\",\n                  overflow: \"hidden\",\n                  padding: \"0.04em 0.04em 0.16em\",\n                  margin: \"-0.04em -0.04em -0.16em\",\n                }}\n              >\n                <span\n                  style={{\n                    display: \"inline-block\",\n                    transform: `translateY(${(1 - p) * 140}%)`,\n                    filter: `blur(${(1 - p) * 6}px)`,\n                    color: i === accentWord ? acc : undefined,\n                    fontWeight: i === accentWord ? 400 : 300,\n                  }}\n                >\n                  {word}\n                </span>\n              </span>\n            );\n          })}\n        </div>\n        <AbsoluteFill style={{ perspective: portrait ? 2000 : 1300 }}>\n          <div\n            style={{\n              position: \"absolute\",\n              left: cardX,\n              top: cardY,\n              width: cardW,\n              height: cardH,\n              borderRadius: S * 0.034,\n              backgroundImage: t.card,\n              boxShadow: `inset 0 1px 0 ${t.cardTop}, inset 0 0 0 1px ${t.cardLine}, 0 2px 6px rgba(${t.shadowRgb},${0.3 * k}), 0 ${S * 0.04}px ${S * 0.1}px rgba(${t.shadowRgb},${0.4 * k}), 0 ${S * 0.1}px ${S * 0.24}px rgba(${t.shadowRgb},${0.4 * k})`,\n              transformOrigin: \"30% 100%\",\n              transform: `translate(${tx}px, ${ty}px) rotateX(${rx}deg) rotateY(${ry}deg) rotateZ(${rz}deg) scale(${sc})`,\n              filter: mb > 0.4 ? \"url(#tsl-mb)\" : undefined,\n              overflow: \"hidden\",\n              fontFamily: figtree.fontFamily,\n              color: fg,\n            }}\n          >\n            <div\n              style={{\n                position: \"absolute\",\n                left: pad,\n                top: pad,\n                width: coverS,\n                height: coverS,\n                borderRadius: S * 0.016,\n                overflow: \"hidden\",\n                boxShadow: `0 ${S * 0.012}px ${S * 0.03}px rgba(${t.shadowRgb},${0.4 * k})`,\n              }}\n            >\n              <Img\n                src={cover}\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: \"inherit\",\n                  boxShadow: \"inset 0 0 0 1px rgba(255,255,255,0.12)\",\n                }}\n              />\n            </div>\n            <div\n              style={{\n                position: \"absolute\",\n                left: pad,\n                top: pad + coverS + pad * 0.6,\n                width: coverS,\n              }}\n            >\n              <Reveal frame={frame} at={beat(\"lines\") - 2}>\n                <div\n                  style={{\n                    fontSize: lineSize * 1.12,\n                    fontWeight: 400,\n                    letterSpacing: \"-0.025em\",\n                    lineHeight: 1.15,\n                  }}\n                >\n                  {heroTitle}\n                </div>\n              </Reveal>\n              <Reveal frame={frame} at={beat(\"lines\")}>\n                <div\n                  style={{\n                    fontSize: lineSize * 0.74,\n                    fontWeight: 300,\n                    color: t.sub,\n                    marginTop: lineSize * 0.2,\n                    whiteSpace: \"nowrap\",\n                  }}\n                >\n                  {heroMeta}\n                </div>\n              </Reveal>\n            </div>\n            <div\n              style={{\n                position: \"absolute\",\n                left: pad * 2 + coverS,\n                right: pad,\n                top: pad,\n                height: lineH * VISIBLE,\n                overflow: \"hidden\",\n                maskImage:\n                  \"linear-gradient(180deg, transparent 0%, #000 16%, #000 100%)\",\n              }}\n            >\n              <div\n                style={{\n                  transform: `translateY(${-scrollIdx * lineH}px)`,\n                }}\n              >\n                {lines.map((line, i) => {\n                  const on = interpolate(\n                    frame,\n                    [\n                      beat(\"step\") + (i - 1) * STEP,\n                      beat(\"step\") + (i - 1) * STEP + 6,\n                      beat(\"step\") + i * STEP,\n                      beat(\"step\") + i * STEP + 6,\n                    ],\n                    [0, 1, 1, i === lines.length - 1 ? 1 : 0],\n                    { ...CLAMP, easing: EASE_MOVE },\n                  );\n                  return (\n                    <div\n                      key={line}\n                      style={{\n                        height: lineH,\n                        display: \"flex\",\n                        alignItems: \"center\",\n                      }}\n                    >\n                      <Reveal frame={frame} at={beat(\"lines\") + i * 2}>\n                        <div\n                          style={{\n                            fontSize: lineSize,\n                            fontWeight: 300,\n                            letterSpacing: \"-0.02em\",\n                            whiteSpace: \"nowrap\",\n                            color: fg,\n                            opacity: 0.34 + 0.66 * on,\n                          }}\n                        >\n                          {line}\n                        </div>\n                      </Reveal>\n                    </div>\n                  );\n                })}\n              </div>\n            </div>\n            <div\n              style={{\n                position: \"absolute\",\n                left: pad * 2 + coverS,\n                right: pad,\n                bottom: pad,\n                fontFamily: mono.fontFamily,\n                fontSize: Math.max(S * 0.022, lineSize * 0.6),\n                color: t.sub,\n              }}\n            >\n              <div\n                style={{\n                  height: Math.max(3, S * 0.005),\n                  borderRadius: 99,\n                  backgroundColor: t.track,\n                  position: \"relative\",\n                }}\n              >\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 0,\n                    top: 0,\n                    bottom: 0,\n                    width: `${progress * 100}%`,\n                    borderRadius: 99,\n                    backgroundColor: fg,\n                  }}\n                />\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: `${progress * 100}%`,\n                    top: \"50%\",\n                    width: S * 0.016,\n                    height: S * 0.016,\n                    marginLeft: -S * 0.008,\n                    marginTop: -S * 0.008,\n                    borderRadius: 99,\n                    backgroundColor: fg,\n                  }}\n                />\n              </div>\n              <div\n                style={{\n                  display: \"flex\",\n                  justifyContent: \"space-between\",\n                  marginTop: S * 0.014,\n                }}\n              >\n                <span>{fmt(progress * 6)}</span>\n                <span>-{fmt(6 - progress * 6)}</span>\n              </div>\n            </div>\n          </div>\n        </AbsoluteFill>\n        <div\n          style={{\n            position: \"absolute\",\n            left: listX,\n            top: listY,\n            width: listW,\n            fontFamily: figtree.fontFamily,\n            color: fg,\n          }}\n        >\n          {list.map((row, i) => {\n            const at = beat(\"rows\") + (ROW_TIMES[i] ?? i * 5);\n            const slide = spring({\n              frame: frame - at,\n              fps,\n              config: SPRING_CARD,\n            });\n            const thumbP = spring({\n              frame: frame - at - 2,\n              fps,\n              config: SPRING_CHIP,\n            });\n            const playP = spring({\n              frame: frame - at - 6,\n              fps,\n              config: SPRING_CHIP,\n            });\n            const divider = interpolate(frame, [at + 4, at + 18], [0, 1], {\n              ...CLAMP,\n              easing: EASE_MOVE,\n            });\n            return (\n              <div\n                key={row.title}\n                style={{\n                  position: \"relative\",\n                  height: rowH,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  gap: S * 0.022,\n                  transform: `translateX(${(1 - slide) * S * 0.16}px)`,\n                  opacity: Math.min(1, slide * 2.5),\n                }}\n              >\n                <div\n                  style={{\n                    width: rankW,\n                    flexShrink: 0,\n                    fontFamily: mono.fontFamily,\n                    fontSize: rowTitle,\n                    color: t.sub,\n                    textAlign: \"right\",\n                  }}\n                >\n                  {i + 2}\n                </div>\n                <div\n                  style={{\n                    width: thumb,\n                    height: thumb,\n                    flexShrink: 0,\n                    borderRadius: thumb * 0.16,\n                    overflow: \"hidden\",\n                    transform: `scale(${thumbP})`,\n                    boxShadow: `0 ${thumb * 0.08}px ${thumb * 0.2}px rgba(${t.shadowRgb},${0.4 * k}), inset 0 0 0 1px rgba(255,255,255,0.1)`,\n                  }}\n                >\n                  <Img\n                    src={row.src ?? cover}\n                    style={{\n                      width: \"100%\",\n                      height: \"100%\",\n                      objectFit: \"cover\",\n                      display: \"block\",\n                    }}\n                  />\n                </div>\n                <div style={{ flex: 1, minWidth: 0 }}>\n                  <Reveal frame={frame} at={at + 3}>\n                    <div\n                      style={{\n                        fontSize: rowTitle,\n                        fontWeight: 400,\n                        letterSpacing: \"-0.02em\",\n                        lineHeight: 1.15,\n                        whiteSpace: \"nowrap\",\n                      }}\n                    >\n                      {row.title}\n                    </div>\n                  </Reveal>\n                  <Reveal frame={frame} at={at + 5}>\n                    <div\n                      style={{\n                        fontSize: rowMeta,\n                        fontWeight: 300,\n                        color: t.sub,\n                        marginTop: rowMeta * 0.2,\n                        whiteSpace: \"nowrap\",\n                      }}\n                    >\n                      {row.meta}\n                    </div>\n                  </Reveal>\n                </div>\n                <div\n                  style={{\n                    width: playS,\n                    height: playS,\n                    flexShrink: 0,\n                    borderRadius: 99,\n                    backgroundColor: t.play,\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    justifyContent: \"center\",\n                    transform: `scale(${playP})`,\n                    boxShadow: `0 ${playS * 0.1}px ${playS * 0.3}px rgba(${t.shadowRgb},${0.35 * k})`,\n                  }}\n                >\n                  <svg\n                    width={playS * 0.4}\n                    height={playS * 0.4}\n                    viewBox=\"0 0 24 24\"\n                    aria-hidden\n                  >\n                    <path d=\"M8 5.5v13l10.5-6.5z\" fill={t.playIcon} />\n                  </svg>\n                </div>\n                {i < list.length - 1 ? (\n                  <div\n                    style={{\n                      position: \"absolute\",\n                      left: rankW + S * 0.022,\n                      right: 0,\n                      bottom: 0,\n                      height: 1,\n                      backgroundColor: t.divider,\n                      transformOrigin: \"0 50%\",\n                      transform: `scaleX(${divider})`,\n                    }}\n                  />\n                ) : null}\n              </div>\n            );\n          })}\n        </div>\n      </AbsoluteFill>\n    </AbsoluteFill>\n  );\n}\n\nexport default TiltSettleList;\n",
      "type": "registry:component",
      "target": "components/remocn/tilt-settle-list.tsx"
    }
  ],
  "type": "registry:component"
}
