{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "whats-new-modal",
  "title": "Whats New Modal",
  "description": "A product dashboard dims behind a What is new modal with a CTA.",
  "dependencies": ["remotion", "@remotion/google-fonts"],
  "registryDependencies": ["@remocn/gsh"],
  "files": [
    {
      "path": "registry/remocn/whats-new-modal/index.tsx",
      "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/Figtree\";\nimport { loadFont as loadMono } from \"@remotion/google-fonts/GeistMono\";\nimport type React from \"react\";\nimport {\n  AbsoluteFill,\n  Easing,\n  Img,\n  interpolate,\n  spring,\n  staticFile,\n  useCurrentFrame,\n  useVideoConfig,\n} from \"remotion\";\nimport type { GradientParams } from \"@/lib/remocn/gsh/gradient-engine\";\nimport { GshGround } from \"@/lib/remocn/gsh/gsh-ground\";\nimport type { GshPresetId } from \"@/lib/remocn/gsh/presets\";\n\nconst { fontFamily } = loadFont(\"normal\", {\n  weights: [\"300\", \"400\"],\n  subsets: [\"latin\"],\n});\nconst mono = loadMono(\"normal\", { weights: [\"400\"], subsets: [\"latin\"] });\n\nexport interface WhatsNewSlide {\n  eyebrow: string;\n  title: string;\n  body: string;\n  cta?: string;\n  /** Custom header art. Falls back to `src`, then to a built-in illustration. */\n  illustration?: React.ReactNode;\n  src?: string;\n}\n\nexport interface WhatsNewModalProps {\n  slides?: WhatsNewSlide[];\n  brand?: string;\n  userName?: string;\n  /** Your own app behind the modal. Falls back to `src`, then to a dashboard mock. */\n  children?: React.ReactNode;\n  src?: string;\n  /** Pictures used by the built-in art and the dashboard mock. */\n  images?: string[];\n  theme?: \"light\" | \"dark\";\n  accent?: string;\n  speed?: number;\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n}\n\nconst DEFAULT_SLIDES: WhatsNewSlide[] = [\n  {\n    eyebrow: \"New in 2.0\",\n    title: \"Launch videos, built from components\",\n    body: \"Drop product UI, charts and captions into a scene. Every piece is a React component you own.\",\n  },\n  {\n    eyebrow: \"Timeline\",\n    title: \"Retime every beat in one place\",\n    body: \"Trim, reorder and stretch scenes. Springs stay in sync at any length.\",\n  },\n  {\n    eyebrow: \"Cloud render\",\n    title: \"Render in 4K, share in one click\",\n    body: \"Export from the browser and send a review link before your coffee gets cold.\",\n    cta: \"Try it now\",\n  },\n];\nconst DEFAULT_IMAGES = [1, 4, 5, 6].map((i) =>\n  staticFile(`reel/reel-${i}.jpg`),\n);\n\nconst SPR = {\n  heavy: { mass: 1, damping: 26, stiffness: 120 },\n  card: { mass: 0.8, damping: 18, stiffness: 160 },\n  chip: { mass: 0.5, damping: 12, stiffness: 200 },\n  morph: { damping: 200 },\n};\nconst EASE = {\n  enter: Easing.bezier(0.32, 0.72, 0, 1),\n  soft: Easing.bezier(0.22, 1, 0.36, 1),\n  move: Easing.bezier(0.65, 0, 0.35, 1),\n  exit: Easing.bezier(0.55, 0, 1, 0.45),\n  camera: Easing.bezier(0.87, 0, 0.13, 1),\n};\nconst CL = { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" } as const;\nconst clamp01 = (v: number) => Math.min(1, Math.max(0, v));\nconst tween = (\n  f: number,\n  from: number,\n  len: number,\n  easing: (t: number) => number,\n) => interpolate(f, [from, from + len], [0, 1], { ...CL, easing });\n\nconst FIRST = 10;\nconst DWELL = 66;\nconst ART_H = 272;\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\ninterface Pal {\n  dark: boolean;\n  win: string;\n  modal: string;\n  art: string;\n  surface: string;\n  line: string;\n  text: string;\n  muted: string;\n  faint: string;\n  tint: string;\n  winShadow: string;\n  modalShadow: string;\n  raised: string;\n}\nfunction palette(dark: boolean): Pal {\n  return dark\n    ? {\n        dark,\n        win: \"#0F1012\",\n        modal: \"#17181B\",\n        art: \"#1D1E22\",\n        surface: \"#26272C\",\n        line: \"rgba(255,255,255,0.07)\",\n        text: \"#EDEDEF\",\n        muted: \"#8E9097\",\n        faint: \"#55575E\",\n        tint: \"rgba(255,255,255,0.05)\",\n        winShadow:\n          \"0 0 0 1px rgba(255,255,255,0.08), 0 40px 90px -30px rgba(0,0,0,0.7)\",\n        modalShadow:\n          \"0 0 0 1px rgba(255,255,255,0.09), inset 0 1px 0 rgba(255,255,255,0.06), 0 36px 80px -20px rgba(0,0,0,0.75)\",\n        raised:\n          \"0 0 0 1px rgba(255,255,255,0.08), inset 0 1px 0 rgba(255,255,255,0.05), 0 12px 28px -10px rgba(0,0,0,0.6)\",\n      }\n    : {\n        dark,\n        win: \"#FCFCFB\",\n        modal: \"#FFFFFF\",\n        art: \"#F4F4F2\",\n        surface: \"#FFFFFF\",\n        line: \"rgba(24,24,27,0.08)\",\n        text: \"#18181B\",\n        muted: \"#71717A\",\n        faint: \"#A1A1AA\",\n        tint: \"rgba(24,24,27,0.045)\",\n        winShadow:\n          \"0 0 0 1px rgba(24,24,27,0.06), 0 40px 90px -30px rgba(24,24,40,0.35)\",\n        modalShadow:\n          \"0 0 0 1px rgba(24,24,27,0.06), 0 2px 4px rgba(24,24,27,0.04), 0 36px 80px -20px rgba(24,24,40,0.35)\",\n        raised:\n          \"0 0 0 1px rgba(24,24,27,0.06), 0 1px 2px rgba(24,24,27,0.04), 0 12px 28px -10px rgba(24,24,40,0.22)\",\n      };\n}\n\nfunction Icon({\n  d,\n  size = 18,\n  color,\n}: {\n  d: string;\n  size?: number;\n  color: string;\n}) {\n  return (\n    <svg\n      width={size}\n      height={size}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke={color}\n      strokeWidth={1.5}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden\n      style={{ display: \"block\", flexShrink: 0 }}\n    >\n      <path d={d} />\n    </svg>\n  );\n}\n\nconst ICON = {\n  caption: \"M4 6.5h16v11H4zM7.5 14h4M13.5 14h3M7.5 11h9\",\n  chart: \"M5 19V11M10 19V6M15 19v-5M20 19V9\",\n  window: \"M4 5.5h16v13H4zM4 9.5h16\",\n  film: \"M4 5.5h16v13H4zM8 5.5v13M16 5.5v13M4 12h4M16 12h4\",\n  link: \"M10 14a4 4 0 005.66 0l3-3a4 4 0 00-5.66-5.66l-1 1M14 10a4 4 0 00-5.66 0l-3 3a4 4 0 005.66 5.66l1-1\",\n  check: \"M5.5 12.5l4 4 9-9.5\",\n  close: \"M6.5 6.5l11 11M17.5 6.5l-11 11\",\n  arrow: \"M5 12h13M13 7l5 5-5 5\",\n};\n\nfunction Art({\n  variant,\n  t,\n  frame,\n  w,\n  accent,\n  pal,\n  images,\n}: {\n  variant: number;\n  t: number;\n  frame: number;\n  w: number;\n  accent: string;\n  pal: Pal;\n  images: string[];\n}) {\n  const pop = (d: number, config = SPR.card) =>\n    spring({ frame: t - d, fps: 30, config });\n  const cx = w / 2;\n  if (variant === 0) {\n    const chips: [keyof typeof ICON, string][] = [\n      [\"window\", \"Product UI\"],\n      [\"chart\", \"Bar chart\"],\n      [\"caption\", \"Captions\"],\n    ];\n    const pw = 292;\n    const ph = 164;\n    const left = cx - (pw + 24 + 168) / 2;\n    const p = pop(0);\n    const play = ((frame * 0.8) % 120) / 120;\n    return (\n      <>\n        <div\n          style={{\n            position: \"absolute\",\n            left,\n            top: (ART_H - ph) / 2,\n            width: pw,\n            height: ph,\n            borderRadius: 12,\n            overflow: \"hidden\",\n            boxShadow: pal.raised,\n            opacity: clamp01(p * 2),\n            transform: `translateY(${(1 - p) * 16}px) scale(${0.96 + 0.04 * p})`,\n          }}\n        >\n          <Img\n            src={images[0]}\n            style={{ width: \"100%\", height: \"100%\", objectFit: \"cover\" }}\n          />\n          <div\n            style={{\n              position: \"absolute\",\n              inset: 0,\n              background:\n                \"linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.55) 100%)\",\n            }}\n          />\n          <div\n            style={{\n              position: \"absolute\",\n              left: 14,\n              bottom: 18,\n              fontSize: 22,\n              letterSpacing: \"-0.02em\",\n              color: \"#FFFFFF\",\n            }}\n          >\n            Launch day\n          </div>\n          <div\n            style={{\n              position: \"absolute\",\n              left: 14,\n              right: 14,\n              bottom: 9,\n              height: 2,\n              borderRadius: 1,\n              background: \"rgba(255,255,255,0.3)\",\n            }}\n          >\n            <div\n              style={{\n                width: `${play * 100}%`,\n                height: 2,\n                background: \"#FFFFFF\",\n              }}\n            />\n          </div>\n          <div\n            style={{\n              position: \"absolute\",\n              inset: 0,\n              borderRadius: 12,\n              boxShadow: \"inset 0 0 0 1px rgba(255,255,255,0.1)\",\n            }}\n          />\n        </div>\n        {chips.map(([icon, label], i) => {\n          const c = pop(8 + i * 4, SPR.chip);\n          return (\n            <div\n              key={label}\n              style={{\n                position: \"absolute\",\n                left: left + pw + 24,\n                top: ART_H / 2 - 74 + i * 52,\n                width: 168,\n                height: 42,\n                borderRadius: 21,\n                background: pal.surface,\n                boxShadow: pal.raised,\n                display: \"flex\",\n                alignItems: \"center\",\n                gap: 9,\n                padding: \"0 14px\",\n                boxSizing: \"border-box\",\n                fontSize: 16,\n                color: pal.text,\n                opacity: clamp01(c * 2),\n                transform: `translateX(${(1 - c) * 24}px) scale(${0.9 + 0.1 * c})`,\n              }}\n            >\n              <Icon\n                d={ICON[icon]}\n                size={18}\n                color={i === 0 ? accent : pal.muted}\n              />\n              {label}\n            </div>\n          );\n        })}\n      </>\n    );\n  }\n  if (variant === 1) {\n    const pw = Math.min(w - 56, 470);\n    const left = cx - pw / 2;\n    const p = pop(0);\n    const stretch = spring({ frame: t - 22, fps: 30, config: SPR.morph });\n    const head = interpolate(t, [6, 60], [0.08, 0.86], {\n      ...CL,\n      easing: EASE.move,\n    });\n    const scale = (pw - 32) / 15;\n    const rows: [string, number, number, boolean][][] = [\n      [\n        [\"Intro\", 0, 2.6, false],\n        [\"Product UI\", 2.8, 4.6 + 1.2 * stretch, true],\n        [\"Pricing\", 7.6 + 1.2 * stretch, 3.4, false],\n      ],\n      [[\"Voiceover\", 0.6, 9.4 + 1.2 * stretch, false]],\n      [[\"Music\", 0, 14.6, false]],\n    ];\n    return (\n      <div\n        style={{\n          position: \"absolute\",\n          left,\n          top: 36,\n          width: pw,\n          height: ART_H - 72,\n          borderRadius: 14,\n          background: pal.surface,\n          boxShadow: pal.raised,\n          opacity: clamp01(p * 2),\n          transform: `translateY(${(1 - p) * 16}px)`,\n          overflow: \"hidden\",\n        }}\n      >\n        <div\n          style={{\n            position: \"absolute\",\n            left: 16,\n            top: 12,\n            right: 16,\n            display: \"flex\",\n            justifyContent: \"space-between\",\n            fontFamily: mono.fontFamily,\n            fontSize: 15,\n            color: pal.faint,\n          }}\n        >\n          {[\"0:00\", \"0:05\", \"0:10\", \"0:15\"].map((tc) => (\n            <span key={tc}>{tc}</span>\n          ))}\n        </div>\n        {rows.map((row, r) =>\n          row.map(([label, x, len, hero], i) => {\n            const grow = pop(4 + r * 3 + i * 2, SPR.card);\n            return (\n              <div\n                key={label}\n                style={{\n                  position: \"absolute\",\n                  left: 16 + x * scale,\n                  top: 46 + r * 46,\n                  width: Math.max(0, len * scale * clamp01(grow) - 4),\n                  height: 36,\n                  borderRadius: 8,\n                  background: hero\n                    ? accent\n                    : r === 0\n                      ? withAlpha(accent, pal.dark ? 0.28 : 0.14)\n                      : pal.tint,\n                  boxShadow: hero\n                    ? \"inset 0 1px 0 rgba(255,255,255,0.16)\"\n                    : `inset 0 0 0 1px ${pal.line}`,\n                  color: hero ? \"#FFFFFF\" : pal.text,\n                  fontSize: 16,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  padding: \"0 10px\",\n                  boxSizing: \"border-box\",\n                  whiteSpace: \"nowrap\",\n                  overflow: \"hidden\",\n                }}\n              >\n                {label}\n              </div>\n            );\n          }),\n        )}\n        <div\n          style={{\n            position: \"absolute\",\n            left: 16 + head * (pw - 32),\n            top: 36,\n            width: 1.5,\n            bottom: 10,\n            background: pal.text,\n            opacity: 0.8,\n          }}\n        />\n      </div>\n    );\n  }\n  const prog = interpolate(t, [8, 46], [0, 1], { ...CL, easing: EASE.move });\n  const done = spring({ frame: t - 47, fps: 30, config: SPR.chip });\n  const link = pop(52);\n  const pw = Math.min(w - 64, 440);\n  const left = cx - pw / 2;\n  const p = pop(0);\n  return (\n    <>\n      <div\n        style={{\n          position: \"absolute\",\n          left,\n          top: 40,\n          width: pw,\n          height: 104,\n          borderRadius: 14,\n          background: pal.surface,\n          boxShadow: pal.raised,\n          opacity: clamp01(p * 2),\n          transform: `translateY(${(1 - p) * 16}px)`,\n        }}\n      >\n        <div\n          style={{\n            position: \"absolute\",\n            left: 16,\n            top: 16,\n            width: 40,\n            height: 40,\n            borderRadius: 10,\n            background: withAlpha(accent, pal.dark ? 0.2 : 0.1),\n            display: \"flex\",\n            alignItems: \"center\",\n            justifyContent: \"center\",\n          }}\n        >\n          <Icon d={ICON.film} size={20} color={accent} />\n        </div>\n        <div\n          style={{\n            position: \"absolute\",\n            left: 70,\n            top: 15,\n            fontSize: 17,\n            color: pal.text,\n          }}\n        >\n          launch-video.mp4\n        </div>\n        <div\n          style={{\n            position: \"absolute\",\n            left: 70,\n            top: 38,\n            fontFamily: mono.fontFamily,\n            fontSize: 15,\n            color: pal.muted,\n            fontVariantNumeric: \"tabular-nums\",\n          }}\n        >\n          3840×2160 · 0:42 · {Math.round(prog * 100)}%\n        </div>\n        <div\n          style={{\n            position: \"absolute\",\n            right: 18,\n            top: 22,\n            width: 26,\n            height: 26,\n            borderRadius: 13,\n            background: accent,\n            display: \"flex\",\n            alignItems: \"center\",\n            justifyContent: \"center\",\n            transform: `scale(${done})`,\n          }}\n        >\n          <Icon d={ICON.check} size={16} color=\"#FFFFFF\" />\n        </div>\n        <div\n          style={{\n            position: \"absolute\",\n            left: 16,\n            right: 16,\n            bottom: 18,\n            height: 3,\n            borderRadius: 2,\n            background: pal.tint,\n            overflow: \"hidden\",\n          }}\n        >\n          <div\n            style={{ width: `${prog * 100}%`, height: 3, background: accent }}\n          />\n        </div>\n      </div>\n      <div\n        style={{\n          position: \"absolute\",\n          left: left + 28,\n          top: 164,\n          width: pw - 56,\n          height: 52,\n          borderRadius: 26,\n          background: pal.surface,\n          boxShadow: pal.raised,\n          display: \"flex\",\n          alignItems: \"center\",\n          gap: 10,\n          padding: \"0 6px 0 18px\",\n          boxSizing: \"border-box\",\n          fontSize: 16,\n          color: pal.text,\n          opacity: clamp01(link * 2),\n          transform: `translateY(${(1 - link) * 14}px) scale(${0.96 + 0.04 * link})`,\n        }}\n      >\n        <Icon d={ICON.link} size={18} color={pal.muted} />\n        <span style={{ flex: 1 }}>remocn.dev/v/launch</span>\n        <span\n          style={{\n            height: 40,\n            padding: \"0 16px\",\n            borderRadius: 20,\n            background: pal.dark ? \"#EDEDEF\" : \"#18181B\",\n            color: pal.dark ? \"#141518\" : \"#FFFFFF\",\n            display: \"flex\",\n            alignItems: \"center\",\n            fontSize: 16,\n          }}\n        >\n          Copy\n        </span>\n      </div>\n    </>\n  );\n}\n\nfunction DashboardMock({\n  pal,\n  brand,\n  userName,\n  images,\n  tall,\n}: {\n  pal: Pal;\n  brand: string;\n  userName: string;\n  images: string[];\n  tall: boolean;\n}) {\n  const stats = [\n    [\"Renders this week\", \"128\"],\n    [\"Minutes exported\", \"46.2\"],\n    [\"Components used\", \"312\"],\n  ];\n  const videos = [\"Product tour\", \"Changelog 42\", \"Pricing teaser\"];\n  return (\n    <div\n      style={{\n        position: \"absolute\",\n        inset: 0,\n        background: pal.win,\n        padding: tall ? \"36px 28px\" : \"40px 44px\",\n      }}\n    >\n      <div style={{ fontSize: 16, color: pal.muted }}>\n        {brand} · Thursday, October 23\n      </div>\n      <div\n        style={{\n          fontSize: 34,\n          letterSpacing: \"-0.025em\",\n          color: pal.text,\n          marginTop: 6,\n        }}\n      >\n        Good afternoon, {userName.split(\" \")[0]}\n      </div>\n      <div\n        style={{\n          display: \"grid\",\n          gridTemplateColumns: `repeat(${tall ? 2 : 3}, 1fr)`,\n          gap: 16,\n          marginTop: 30,\n        }}\n      >\n        {stats.slice(0, tall ? 2 : 3).map(([l, v]) => (\n          <div\n            key={l}\n            style={{\n              height: 112,\n              borderRadius: 14,\n              padding: 18,\n              boxSizing: \"border-box\",\n              boxShadow: `inset 0 0 0 1px ${pal.line}`,\n            }}\n          >\n            <div style={{ fontSize: 16, color: pal.muted }}>{l}</div>\n            <div\n              style={{\n                fontSize: 36,\n                letterSpacing: \"-0.02em\",\n                color: pal.text,\n                marginTop: 14,\n                fontVariantNumeric: \"tabular-nums\",\n              }}\n            >\n              {v}\n            </div>\n          </div>\n        ))}\n      </div>\n      <div style={{ fontSize: 18, color: pal.text, marginTop: 30 }}>\n        Recent videos\n      </div>\n      <div\n        style={{\n          display: \"grid\",\n          gridTemplateColumns: `repeat(${tall ? 2 : 3}, 1fr)`,\n          gap: 16,\n          marginTop: 14,\n        }}\n      >\n        {videos.slice(0, tall ? 2 : 3).map((v, i) => (\n          <div key={v}>\n            <div\n              style={{\n                height: tall ? 140 : 150,\n                borderRadius: 12,\n                overflow: \"hidden\",\n              }}\n            >\n              <Img\n                src={images[(i + 1) % images.length]}\n                style={{ width: \"100%\", height: \"100%\", objectFit: \"cover\" }}\n              />\n            </div>\n            <div style={{ fontSize: 17, color: pal.text, marginTop: 10 }}>\n              {v}\n            </div>\n          </div>\n        ))}\n      </div>\n    </div>\n  );\n}\n\nexport function WhatsNewModal({\n  slides = DEFAULT_SLIDES,\n  brand = \"remocn\",\n  userName = \"Maya Chen\",\n  children,\n  src,\n  images = DEFAULT_IMAGES,\n  theme = \"light\",\n  accent = \"#3B5BFD\",\n  speed = 1,\n  ground,\n  groundParams,\n}: WhatsNewModalProps) {\n  const frame = useCurrentFrame() * speed;\n  const { width, height, fps } = useVideoConfig();\n  const tall = height > width;\n  const SW = tall ? 600 : 1280;\n  const SH = tall ? (600 * height) / width : 720;\n  const k = width / SW;\n  const dark = theme === \"dark\";\n  const pal = palette(dark);\n  const sp = (at: number, config: Record<string, number>) =>\n    spring({ frame: frame - at, fps, config });\n\n  const n = Math.max(1, slides.length);\n  const swipeAt = Array.from({ length: n }, (_, i) => FIRST + i * DWELL);\n  const endAt = swipeAt[n - 1] + DWELL - 10;\n  const PRESS = endAt + 20;\n  const pos = swipeAt.slice(1).reduce((acc, t) => acc + sp(t, SPR.heavy), 0);\n  const active = Math.min(n - 1, swipeAt.filter((t) => frame >= t).length - 1);\n\n  const MW = tall ? SW - 88 : 540;\n  const MH = 584;\n  const mx = (SW - MW) / 2;\n  const my = (SH - MH) / 2;\n  const WIN = tall\n    ? { x: 20, y: 56, w: SW - 40, h: SH }\n    : { x: 120, y: 56, w: SW - 240, h: 608 };\n\n  const winIn = sp(0, SPR.heavy);\n  const winOp = tween(frame, 0, 10, EASE.enter);\n  const dim = tween(frame, 4, 14, EASE.soft);\n  const modalIn = sp(6, SPR.card);\n  const modalOp = tween(frame, 6, 8, EASE.enter);\n  const fan = sp(12, SPR.card);\n  const kick = swipeAt\n    .slice(1)\n    .reduce((acc, t) => acc + Math.sin(clamp01((frame - t) / 16) * Math.PI), 0);\n  const cam = 1 + 0.03 * tween(frame, 6, PRESS, EASE.camera);\n\n  const ctaW = slides[n - 1]?.cta ? 148 : 112;\n  const ctaPt = { x: mx + MW - 28 - ctaW / 2 + 6, y: my + MH - 46 };\n  const start = tall ? { x: 660, y: 1120 } : { x: 1360, y: 800 };\n  const legP = sp(endAt, SPR.heavy);\n  const dxx = ctaPt.x - start.x;\n  const dyy = ctaPt.y - start.y;\n  const len = Math.hypot(dxx, dyy) || 1;\n  const bend = Math.sin(clamp01(legP) * Math.PI) * Math.min(70, len * 0.15);\n  const cur = {\n    x: start.x + dxx * legP + (dyy / len) * bend,\n    y: start.y + dyy * legP - (dxx / len) * bend,\n  };\n  const press = clamp01(sp(PRESS - 2, SPR.chip) - sp(PRESS + 3, SPR.chip));\n  const pressed = frame >= PRESS;\n  const hoverCta = tween(frame, PRESS - 8, 6, EASE.enter);\n  const cursorOp = tween(frame, endAt, 6, EASE.enter);\n  const cta = slides[active]?.cta ?? \"Next\";\n\n  return (\n    <AbsoluteFill\n      style={{\n        fontFamily,\n        overflow: \"hidden\",\n        WebkitFontSmoothing: \"antialiased\",\n      }}\n    >\n      <GshGround\n        preset={ground ?? (dark ? \"projector\" : \"glasswork\")}\n        params={groundParams}\n        timeOffset={3}\n        timeScale={0.5}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          left: 0,\n          top: 0,\n          width: SW,\n          height: SH,\n          transformOrigin: \"0 0\",\n          transform: `scale(${k})`,\n        }}\n      >\n        <div\n          style={{\n            position: \"absolute\",\n            inset: 0,\n            transform: `scale(${cam})`,\n            transformOrigin: `${SW / 2}px ${SH / 2}px`,\n          }}\n        >\n          <div\n            style={{\n              position: \"absolute\",\n              left: WIN.x,\n              top: WIN.y,\n              width: WIN.w,\n              height: WIN.h,\n              borderRadius: 18,\n              overflow: \"hidden\",\n              boxShadow: pal.winShadow,\n              opacity: winOp,\n              transform: `translateY(${(1 - winIn) * 36}px) scale(${1 - 0.015 * dim})`,\n            }}\n          >\n            <div\n              style={{\n                position: \"absolute\",\n                inset: 0,\n                filter: `blur(${3 * dim}px)`,\n              }}\n            >\n              {children ??\n                (src ? (\n                  <Img\n                    src={src}\n                    style={{\n                      width: \"100%\",\n                      height: \"100%\",\n                      objectFit: \"cover\",\n                    }}\n                  />\n                ) : (\n                  <DashboardMock\n                    pal={pal}\n                    brand={brand}\n                    userName={userName}\n                    images={images}\n                    tall={tall}\n                  />\n                ))}\n            </div>\n            <div\n              style={{\n                position: \"absolute\",\n                inset: 0,\n                background: dark ? \"rgba(0,0,0,0.45)\" : \"rgba(24,24,27,0.18)\",\n                opacity: dim,\n              }}\n            />\n          </div>\n          {[-1, 1].map((side) => {\n            const off = (26 + 10 * kick) * fan;\n            return (\n              <div\n                key={side}\n                style={{\n                  position: \"absolute\",\n                  left: mx,\n                  top: my + 26,\n                  width: MW,\n                  height: MH - 52,\n                  borderRadius: 24,\n                  background: pal.dark ? \"#1E1F23\" : \"#F7F7F5\",\n                  boxShadow: pal.raised,\n                  opacity: clamp01(fan * 1.5) * modalOp,\n                  transform: `translateX(${side * off}px) rotate(${side * (2.6 + 1.2 * kick) * fan}deg) scale(0.94)`,\n                }}\n              />\n            );\n          })}\n          <div\n            style={{\n              position: \"absolute\",\n              left: mx,\n              top: my,\n              width: MW,\n              height: MH,\n              borderRadius: 24,\n              overflow: \"hidden\",\n              background: pal.modal,\n              boxShadow: pal.modalShadow,\n              opacity: modalOp,\n              transform: `translateY(${(1 - modalIn) * 20}px) scale(${0.96 + 0.04 * modalIn})`,\n            }}\n          >\n            <div\n              style={{\n                position: \"absolute\",\n                left: 8,\n                top: 8,\n                width: MW - 16,\n                height: ART_H,\n                borderRadius: 16,\n                background: pal.art,\n                overflow: \"hidden\",\n              }}\n            >\n              {slides.map((s, i) => {\n                const x = (i - pos) * (MW - 16);\n                if (Math.abs(x) > MW + 10) return null;\n                const t = frame - (i === 0 ? FIRST : swipeAt[i] - 2);\n                return (\n                  <div\n                    key={s.title}\n                    style={{\n                      position: \"absolute\",\n                      left: x,\n                      top: 0,\n                      width: MW - 16,\n                      height: ART_H,\n                    }}\n                  >\n                    {s.illustration ??\n                      (s.src ? (\n                        <Img\n                          src={s.src}\n                          style={{\n                            width: \"100%\",\n                            height: \"100%\",\n                            objectFit: \"cover\",\n                          }}\n                        />\n                      ) : (\n                        <Art\n                          variant={i % 3}\n                          t={t}\n                          frame={frame}\n                          w={MW - 16}\n                          accent={accent}\n                          pal={pal}\n                          images={images}\n                        />\n                      ))}\n                  </div>\n                );\n              })}\n            </div>\n            <div\n              style={{\n                position: \"absolute\",\n                right: 20,\n                top: 20,\n                width: 34,\n                height: 34,\n                borderRadius: 17,\n                background: pal.dark\n                  ? \"rgba(23,24,27,0.7)\"\n                  : \"rgba(255,255,255,0.85)\",\n                boxShadow: `0 0 0 1px ${pal.line}`,\n                display: \"flex\",\n                alignItems: \"center\",\n                justifyContent: \"center\",\n              }}\n            >\n              <Icon d={ICON.close} size={16} color={pal.muted} />\n            </div>\n            {slides.map((s, i) => {\n              const inAt = i === 0 ? FIRST + 2 : swipeAt[i] + 4;\n              const tin = tween(frame, inAt, 14, EASE.enter);\n              const tout =\n                i < n - 1 ? tween(frame, swipeAt[i + 1], 6, EASE.exit) : 0;\n              if (tout >= 1 || tin <= 0) return null;\n              const line = (d: number) => {\n                const p = tween(frame, inAt + d, 14, EASE.enter);\n                return {\n                  opacity: p * (1 - tout),\n                  transform: `translateX(${(1 - p) * 26 - tout * 22}px)`,\n                };\n              };\n              return (\n                <div\n                  key={`t-${s.title}`}\n                  style={{\n                    position: \"absolute\",\n                    left: 32,\n                    top: ART_H + 36,\n                    width: MW - 64,\n                  }}\n                >\n                  <div style={{ fontSize: 16, color: pal.muted, ...line(0) }}>\n                    {s.eyebrow}\n                  </div>\n                  <div\n                    style={{\n                      fontSize: 31,\n                      lineHeight: 1.12,\n                      letterSpacing: \"-0.025em\",\n                      color: pal.text,\n                      textWrap: \"balance\",\n                      marginTop: 10,\n                      ...line(2),\n                    }}\n                  >\n                    {s.title}\n                  </div>\n                  <div\n                    style={{\n                      fontSize: 17,\n                      lineHeight: 1.5,\n                      color: pal.muted,\n                      textWrap: \"pretty\",\n                      marginTop: 12,\n                      ...line(4),\n                    }}\n                  >\n                    {s.body}\n                  </div>\n                </div>\n              );\n            })}\n            <div\n              style={{\n                position: \"absolute\",\n                left: 32,\n                bottom: 42,\n                display: \"flex\",\n                alignItems: \"center\",\n                gap: 6,\n              }}\n            >\n              {slides.map((s, i) => {\n                const a = clamp01(1 - Math.abs(pos - i));\n                const fill =\n                  i < active\n                    ? 1\n                    : interpolate(\n                        frame,\n                        [swipeAt[i], swipeAt[i] + DWELL - 4],\n                        [0, 1],\n                        CL,\n                      );\n                return (\n                  <div\n                    key={`d-${s.title}`}\n                    style={{\n                      width: 8 + 24 * a,\n                      height: 8,\n                      borderRadius: 4,\n                      background: pal.dark\n                        ? \"rgba(255,255,255,0.16)\"\n                        : \"rgba(24,24,27,0.12)\",\n                      overflow: \"hidden\",\n                    }}\n                  >\n                    <div\n                      style={{\n                        width: `${fill * 100}%`,\n                        height: \"100%\",\n                        background: pal.text,\n                        opacity: a,\n                      }}\n                    />\n                  </div>\n                );\n              })}\n            </div>\n            <div\n              style={{\n                position: \"absolute\",\n                right: 28,\n                bottom: 24,\n                display: \"flex\",\n                alignItems: \"center\",\n                gap: 8,\n              }}\n            >\n              <div\n                style={{\n                  height: 44,\n                  padding: \"0 14px\",\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  fontSize: 16,\n                  color: pal.muted,\n                }}\n              >\n                Skip\n              </div>\n              <div\n                style={{\n                  height: 44,\n                  width: ctaW,\n                  boxSizing: \"border-box\",\n                  borderRadius: 12,\n                  background: pressed\n                    ? `linear-gradient(rgba(0,0,0,0.14), rgba(0,0,0,0.14)), ${accent}`\n                    : accent,\n                  color: \"#FFFFFF\",\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  justifyContent: \"center\",\n                  gap: 8,\n                  fontSize: 16,\n                  boxShadow: \"inset 0 1px 0 rgba(255,255,255,0.16)\",\n                  transform: `scale(${1 - 0.04 * press})`,\n                  whiteSpace: \"nowrap\",\n                }}\n              >\n                {cta}\n                <div style={{ transform: `translateX(${2 * hoverCta}px)` }}>\n                  <Icon d={ICON.arrow} size={16} color=\"#FFFFFF\" />\n                </div>\n              </div>\n            </div>\n          </div>\n          <svg\n            width={24}\n            height={28}\n            viewBox=\"0 0 20 24\"\n            aria-hidden\n            style={{\n              position: \"absolute\",\n              left: cur.x - 2,\n              top: cur.y - 2,\n              opacity: cursorOp,\n              transformOrigin: \"2px 2px\",\n              transform: `scale(${1 - 0.04 * press})`,\n              filter: \"drop-shadow(0 2px 3px rgba(0,0,0,0.3))\",\n              overflow: \"visible\",\n            }}\n          >\n            <path\n              d=\"M2 2 L2 19.5 L6.6 15.4 L9.8 22.4 L12.9 21 L9.8 14.2 L16 14.2 Z\"\n              fill=\"#FFFFFF\"\n              stroke=\"#16171A\"\n              strokeWidth={1.1}\n              strokeLinejoin=\"round\"\n            />\n          </svg>\n        </div>\n      </div>\n    </AbsoluteFill>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/remocn/whats-new-modal.tsx"
    }
  ],
  "type": "registry:component"
}
