Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: improve ui landing
dev_wandry845849367223
diff --git a/app/(home)/page.tsx b/app/(home)/page.tsxindex ebe9ed73..3dbaa7b6 100644--- a/app/(home)/page.tsx+++ b/app/(home)/page.tsx@@ -1,16 +1,15 @@"use client";import { Player, type PlayerRef } from "@remotion/player";-import { DynamicCodeBlock } from "fumadocs-ui/components/dynamic-codeblock";-import { ArrowRight, Check, Copy } from "lucide-react";+import { ArrowRight } from "lucide-react";import { motion, useInView, useReducedMotion } from "motion/react";import Link from "next/link";import { type CSSProperties, type ReactNode, useRef, useState } from "react";-import registry from "@/registry/__index__";import Aurora from "@/components/Aurora";-import Silk from "@/components/Silk";import Dither from "@/components/Dither";+import Silk from "@/components/Silk";import { Button } from "@/components/ui/button";+import registry from "@/registry/__index__";/* -------------------------------------------------------------------------- *//* Tokens */@@ -91,6 +90,24 @@ function Header() {remocn</Link><nav className="flex items-center gap-7 text-sm text-[#8B8A91]">+ <Link+ href="#showcase"+ className="hidden transition-colors hover:text-white focus-visible:text-white focus-visible:outline-none sm:inline"+ >+ Showcase+ </Link>+ <Link+ href="#components"+ className="hidden transition-colors hover:text-white focus-visible:text-white focus-visible:outline-none sm:inline"+ >+ Components+ </Link>+ <Link+ href="#use-cases"+ className="hidden transition-colors hover:text-white focus-visible:text-white focus-visible:outline-none sm:inline"+ >+ Use cases+ </Link><Linkhref="/docs"className="transition-colors hover:text-white focus-visible:text-white focus-visible:outline-none"@@ -216,92 +233,61 @@ function Hero() {}/* -------------------------------------------------------------------------- */-/* DX showcase */+/* Landing code showcase *//* -------------------------------------------------------------------------- */-function DXShowcase() {- const sample = `import { StaggeredFadeUp } from "@/components/remocn/staggered-fade-up";-import { AbsoluteFill } from "remotion";--export default function Scene() {- return (- <AbsoluteFill style={{ background: "#fafafa" }}>- <StaggeredFadeUp- text="Ship faster with remocn"- fontSize={88}- color="#0A0A0A"- staggerDelay={4}- />- </AbsoluteFill>- );-}`;- const entry = registry["staggered-fade-up"];+function LandingCodeShowcaseSection() {+ const entry = registry["landing-code-showcase"];+ const aspectRatio =+ entry &&+ `${entry.config.compositionWidth} / ${entry.config.compositionHeight}`;return (- <section className="relative py-32">+ <section id="showcase" className="relative py-32">+ {/* Header sits inside the standard SECTION width for readable copy */}<div className={SECTION}><FadeUp><div className="mb-16 max-w-2xl"><h2 className="font-[var(--font-display)] text-4xl font-semibold -tracking-wide text-[#EDEDED] md:text-5xl">- Code on the left+ Type a prop<br />- <span className="text-[#8B8A91]">pixels on the right</span>+ <span className="text-[#8B8A91]">ship a frame</span></h2><p className="mt-4 text-[#8B8A91]">- Every component is just React. No timeline editor, no magic+ Every component is just React. Watch the preview react to your+ code in real time</p></div></FadeUp>+ </div>+ {/* Showcase block breaks out of the section width so the player has+ room for the wide composition. */}+ <div className="mx-auto w-full max-w-[1600px] px-6"><FadeUp delay={0.1}><motion.divwhileHover={{ y: -4 }}transition={SPRING_SOFT}- className="grid overflow-hidden rounded-3xl border border-white/[0.06] bg-white/[0.02] backdrop-blur-2xl lg:grid-cols-2 lg:items-stretch"+ className="overflow-hidden rounded-3xl border border-white/[0.06] bg-white/[0.02] backdrop-blur-2xl"style={{boxShadow: `0 30px 80px -30px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05)`,}}>- {/* Code side */}- <div className="flex flex-col">- <div className="flex items-center gap-1 border-b border-white/[0.05] px-5 py-3">- <span className="rounded-full bg-white/[0.06] px-3 py-1 font-mono text-[11px] text-[#EDEDED]">- page.tsx- </span>- <span className="rounded-full px-3 py-1 font-mono text-[11px] text-[#666]">- Terminal- </span>- </div>- <div className="flex-1 [&_.shiki]:!bg-transparent [&_figure]:!m-0 [&_figure]:!h-full [&_pre]:!m-0 [&_pre]:!h-full [&_pre]:!max-h-none [&_pre]:!overflow-visible [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!bg-transparent [&_pre]:!p-6 [&_pre]:!text-[13px]">- <DynamicCodeBlock lang="tsx" code={sample} />- </div>- </div>-- {/* Preview side */}- <div className="flex items-center justify-center border-t border-white/[0.05] bg-[#fafafa] p-8 lg:border-l lg:border-t-0">- <div className="aspect-video w-full overflow-hidden rounded-2xl bg-[#fafafa]">- {entry ? (- <Player- component={entry.Component}- inputProps={{- text: "Ship faster with remocn",- fontSize: 88,- color: "#0A0A0A",- staggerDelay: 4,- distance: 20,- fontWeight: "600",- }}- durationInFrames={entry.config.durationInFrames}- fps={entry.config.fps}- compositionWidth={entry.config.compositionWidth}- compositionHeight={entry.config.compositionHeight}- style={{ width: "100%", height: "100%" }}- autoPlay- loop- acknowledgeRemotionLicense- />- ) : null}- </div>+ <div className="w-full" style={{ aspectRatio }}>+ {entry ? (+ <Player+ component={entry.Component}+ inputProps={{ accentColor: PEACH }}+ durationInFrames={entry.config.durationInFrames}+ fps={entry.config.fps}+ compositionWidth={entry.config.compositionWidth}+ compositionHeight={entry.config.compositionHeight}+ style={{ width: "100%", height: "100%", display: "block" }}+ autoPlay+ loop+ acknowledgeRemotionLicense+ />+ ) : null}</div></motion.div></FadeUp>@@ -396,7 +382,7 @@ function BentoRegistry() {};return (- <section className="relative py-32">+ <section id="components" className="relative py-32"><div className={SECTION}><FadeUp><div className="mb-16 flex flex-col gap-6 sm:flex-row sm:items-end sm:justify-between">@@ -587,7 +573,7 @@ function UseCases() {];return (- <section className="relative py-32">+ <section id="use-cases" className="relative py-32"><div className={SECTION}><FadeUp><div className="mb-16 max-w-2xl">@@ -809,7 +795,7 @@ export default function Page() {<Header /><main className="relative"><Hero />- <DXShowcase />+ <LandingCodeShowcaseSection /><BentoRegistry /><UseCases /><FinalCTA />diff --git a/app/globals.css b/app/globals.cssindex 52e2fdea..c1beffde 100644--- a/app/globals.css+++ b/app/globals.css@@ -1,7 +1,7 @@@import "tailwindcss";@import "tw-animate-css";@import "shadcn/tailwind.css";-@import "fumadocs-ui/css/neutral.css";+@import "fumadocs-ui/css/shadcn.css";@import "fumadocs-ui/css/preset.css";@source "../node_modules/fumadocs-ui/dist/**/*.js";@@ -87,37 +87,38 @@}.dark {- --background: oklch(0.145 0 0);- --foreground: oklch(0.985 0 0);- --card: oklch(0.205 0 0);- --card-foreground: oklch(0.985 0 0);- --popover: oklch(0.205 0 0);- --popover-foreground: oklch(0.985 0 0);- --primary: oklch(0.922 0 0);- --primary-foreground: oklch(0.205 0 0);- --secondary: oklch(0.269 0 0);- --secondary-foreground: oklch(0.985 0 0);- --muted: oklch(0.269 0 0);- --muted-foreground: oklch(0.708 0 0);- --accent: oklch(0.269 0 0);- --accent-foreground: oklch(0.985 0 0);+ /* Warm obsidian palette — matches landing page #141318 */+ --background: oklch(0.18 0.008 290);+ --foreground: oklch(0.95 0 0);+ --card: oklch(0.20 0.008 290);+ --card-foreground: oklch(0.95 0 0);+ --popover: oklch(0.20 0.008 290);+ --popover-foreground: oklch(0.95 0 0);+ --primary: oklch(0.95 0 0);+ --primary-foreground: oklch(0.18 0.008 290);+ --secondary: oklch(0.22 0.008 290);+ --secondary-foreground: oklch(0.85 0.005 290);+ --muted: oklch(0.21 0.008 290);+ --muted-foreground: oklch(0.65 0.008 290);+ --accent: oklch(0.22 0.008 290);+ --accent-foreground: oklch(0.95 0 0);--destructive: oklch(0.704 0.191 22.216);- --border: oklch(1 0 0 / 10%);- --input: oklch(1 0 0 / 15%);- --ring: oklch(0.556 0 0);+ --border: oklch(1 0 0 / 6%);+ --input: oklch(1 0 0 / 8%);+ --ring: oklch(1 0 0 / 20%);--chart-1: oklch(0.87 0 0);- --chart-2: oklch(0.556 0 0);- --chart-3: oklch(0.439 0 0);- --chart-4: oklch(0.371 0 0);- --chart-5: oklch(0.269 0 0);- --sidebar: oklch(0.205 0 0);- --sidebar-foreground: oklch(0.985 0 0);- --sidebar-primary: oklch(0.488 0.243 264.376);- --sidebar-primary-foreground: oklch(0.985 0 0);- --sidebar-accent: oklch(0.269 0 0);- --sidebar-accent-foreground: oklch(0.985 0 0);- --sidebar-border: oklch(1 0 0 / 10%);- --sidebar-ring: oklch(0.556 0 0);+ --chart-2: oklch(0.65 0.008 290);+ --chart-3: oklch(0.55 0.008 290);+ --chart-4: oklch(0.45 0.008 290);+ --chart-5: oklch(0.35 0.008 290);+ --sidebar: oklch(0.18 0.008 290);+ --sidebar-foreground: oklch(0.95 0 0);+ --sidebar-primary: oklch(0.95 0 0);+ --sidebar-primary-foreground: oklch(0.18 0.008 290);+ --sidebar-accent: oklch(0.22 0.008 290);+ --sidebar-accent-foreground: oklch(0.95 0 0);+ --sidebar-border: oklch(1 0 0 / 6%);+ --sidebar-ring: oklch(1 0 0 / 20%);}@layer base {@@ -129,6 +130,8 @@}html {@apply font-sans;+ scroll-behavior: smooth;+ scroll-padding-top: 80px;}}diff --git a/app/layout.tsx b/app/layout.tsxindex cfa95e90..926df410 100644--- a/app/layout.tsx+++ b/app/layout.tsx@@ -24,11 +24,11 @@ const outfit = Outfit({export const metadata: Metadata = {title: {- default: "remocn — Remotion components & animations",+ default: "Remocn - Greate demo one command",template: "%s · remocn",},description:- "Production-ready Remotion components, animations, transitions and backgrounds. Install with shadcn CLI.",+ "Production-ready Remotion animations, transitions and backgrounds. Install with shadcn CLI",};export default function RootLayout({@@ -41,6 +41,7 @@ export default function RootLayout({lang="en"suppressHydrationWarningclassName={cn(+ "dark","h-full","antialiased",geistSans.variable,@@ -49,10 +50,19 @@ export default function RootLayout({"font-sans",inter.variable,)}+ style={{ colorScheme: "dark" }}><body className="min-h-full flex flex-col"><NuqsAdapter>- <RootProvider>{children}</RootProvider>+ <RootProvider+ theme={{+ defaultTheme: "dark",+ forcedTheme: "dark",+ enableSystem: false,+ }}+ >+ {children}+ </RootProvider></NuqsAdapter></body></html>diff --git a/mdx-components.tsx b/mdx-components.tsxindex e9bb4358..74233706 100644--- a/mdx-components.tsx+++ b/mdx-components.tsx@@ -9,7 +9,7 @@ import { PropsTable } from "@/components/docs/props-table";export function getMDXComponents(components?: MDXComponents): MDXComponents {return {- ...defaultMdxComponents,+ ...(defaultMdxComponents as MDXComponents),ComponentPreview,InstallBlock,PropsTable,diff --git a/registry.json b/registry.jsonindex e0a7e4c8..179ad4fb 100644--- a/registry.json+++ b/registry.json@@ -689,6 +689,20 @@}]},+ {+ "name": "landing-code-showcase",+ "type": "registry:component",+ "title": "Landing Code Showcase",+ "description": "Magical split-screen: code types itself on the left while the preview reactively re-renders on the right with sparks and tactile bounce.",+ "dependencies": ["remotion"],+ "files": [+ {+ "path": "registry/remocn/landing-code-showcase/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/landing-code-showcase.tsx"+ }+ ]+ },{"name": "pipeline-journey","type": "registry:component",diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex e42bf887..32b077b4 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -59,6 +59,8 @@ import { InlineHighlight } from "@/registry/remocn/inline-highlight";import { inlineHighlightConfig } from "@/registry/remocn/inline-highlight/config";import { KineticTypeMask } from "@/registry/remocn/kinetic-type-mask";import { kineticTypeMaskConfig } from "@/registry/remocn/kinetic-type-mask/config";+import { LandingCodeShowcase } from "@/registry/remocn/landing-code-showcase";+import { landingCodeShowcaseConfig } from "@/registry/remocn/landing-code-showcase/config";import { LiveCodeCompilation } from "@/registry/remocn/live-code-compilation";import { liveCodeCompilationConfig } from "@/registry/remocn/live-code-compilation/config";import { MarkerHighlight } from "@/registry/remocn/marker-highlight";@@ -276,6 +278,10 @@ const registry: Record<string, RegistryEntry> = {Component: LiveCodeCompilation,config: liveCodeCompilationConfig,},+ "landing-code-showcase": {+ Component: LandingCodeShowcase,+ config: landingCodeShowcaseConfig,+ },"pipeline-journey": {Component: PipelineJourney,config: pipelineJourneyConfig,diff --git a/registry/remocn/landing-code-showcase/config.ts b/registry/remocn/landing-code-showcase/config.tsnew file mode 100644index 00000000..17f5599f--- /dev/null+++ b/registry/remocn/landing-code-showcase/config.ts@@ -0,0 +1,19 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++// Wider-than-default composition so the right pane has full 1280x720-ish room+// for the inner scenes (terminal/dashboard) without cropping.+export const landingCodeShowcaseConfig: ComponentConfig = {+ componentName: "LandingCodeShowcase",+ importPath: "@/components/remocn/landing-code-showcase",+ controls: {+ accentColor: {+ type: "color",+ default: "#FFB38E",+ label: "Accent color",+ },+ },+ durationInFrames: 720,+ fps: FPS,+ compositionWidth: 2080,+ compositionHeight: 900,+};diff --git a/registry/remocn/landing-code-showcase/index.tsx b/registry/remocn/landing-code-showcase/index.tsxnew file mode 100644index 00000000..0299227f--- /dev/null+++ b/registry/remocn/landing-code-showcase/index.tsx@@ -0,0 +1,766 @@+"use client";++import type { ReactNode } from "react";+import {+ AbsoluteFill,+ Freeze,+ interpolate,+ Sequence,+ spring,+ useCurrentFrame,+ useVideoConfig,+} from "remotion";+import { DashboardPopulate } from "@/registry/remocn/dashboard-populate";+import { FrostedGlassWipe } from "@/registry/remocn/frosted-glass-wipe";+import { SpatialPush } from "@/registry/remocn/spatial-push";+import { TerminalToBrowserDeploy } from "@/registry/remocn/terminal-to-browser-deploy";++export interface LandingCodeShowcaseProps {+ accentColor?: string;+ speed?: number;+}++const FONT_FAMILY =+ "var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif";+const MONO_FAMILY =+ "var(--font-geist-mono), ui-monospace, SFMono-Regular, Menlo, monospace";++/* -------------------------------------------------------------------------- */+/* Tokens */+/* -------------------------------------------------------------------------- */++const PEACH = "#FFB38E";+const LAVENDER = "#D4B3FF";+const MINT = "#A1EEBD";+const STAGE_BG = "#0A090E";+const PANEL_BG = "#141318";++/* -------------------------------------------------------------------------- */+/* Timeline schedule */+/* -------------------------------------------------------------------------- */+/*+ Frame layout (30fps base):+ 0 ────────────────────────────► 90 BlurReveal+ 70 ────► 130 SpatialPush overlay+ 130 ────────────► 240 Dashboard+ 230 ────► 290 FrostedGlassWipe overlay+ 290 ────────────► 410 MaskedSlideReveal+ 400 ────► 460 KineticTypeMask overlay+ 460 ────────────────► 640 TerminalToBrowserDeploy+*/++interface SceneWindow {+ start: number;+ duration: number;+}++const SCENES = {+ blur: { start: 0, duration: 90 } as SceneWindow,+ push1: { start: 70, duration: 60 } as SceneWindow,+ dashboard: { start: 130, duration: 110 } as SceneWindow,+ glassWipe: { start: 230, duration: 60 } as SceneWindow,+ maskedSlide: { start: 290, duration: 120 } as SceneWindow,+ push2: { start: 400, duration: 60 } as SceneWindow,+ terminal: { start: 460, duration: 180 } as SceneWindow,+ // Quiet hold at the very end so the loop never restarts mid-action.+ endHold: 80,+};++const TOTAL_DURATION =+ SCENES.terminal.start + SCENES.terminal.duration + SCENES.endHold; // 720++/* -------------------------------------------------------------------------- */+/* Code timeline */+/* -------------------------------------------------------------------------- */++interface CodeStep {+ /** Frame at which this fragment STARTS being typed */+ startFrame: number;+ /** Code fragment to append to the visible buffer */+ code: string;+ /** Token within the fragment that pulses lavender briefly when typed */+ highlight?: string;+}++const HEADER = `import { BlurReveal, DashboardPopulate, MaskedSlideReveal,+ TerminalToBrowserDeploy, Transition } from "@/components/remocn";++export default function Scene() {+ return (+ <>+`;++const FOOTER = ` </>+ );+}`;++const STEPS: CodeStep[] = [+ {+ startFrame: 4,+ code: ` <BlurReveal text="Build faster." />\n`,+ },+ {+ startFrame: SCENES.push1.start,+ code: ` <Transition type="spatial-push" />\n`,+ highlight: "spatial-push",+ },+ {+ startFrame: SCENES.dashboard.start,+ code: ` <DashboardPopulate data={metrics} />\n`,+ },+ {+ startFrame: SCENES.glassWipe.start,+ code: ` <Transition type="glass-wipe" />\n`,+ highlight: "glass-wipe",+ },+ {+ startFrame: SCENES.maskedSlide.start,+ code: ` <MaskedSlideReveal text="Ship to production." />\n`,+ },+ {+ startFrame: SCENES.push2.start,+ code: ` <Transition type="spatial-push" direction="left" />\n`,+ highlight: "spatial-push",+ },+ {+ startFrame: SCENES.terminal.start,+ code: ` <TerminalToBrowserDeploy />\n`,+ },+];++const CHARS_PER_FRAME = 2.2;++interface BuiltStep extends CodeStep {+ endFrame: number;+}++const BUILT_STEPS: BuiltStep[] = STEPS.map((s) => ({+ ...s,+ endFrame: s.startFrame + Math.ceil(s.code.length / CHARS_PER_FRAME),+}));++/* -------------------------------------------------------------------------- */+/* Syntax highlight */+/* -------------------------------------------------------------------------- */++interface Token {+ text: string;+ color: string;+ glow?: boolean;+}++function tokenizeLine(+ line: string,+ accentColor: string,+ highlightedToken: string | null,+): Token[] {+ const tokens: Token[] = [];+ const regex =+ /(\bimport\b|\bfrom\b|\bexport\b|\bdefault\b|\bfunction\b|\breturn\b|\bconst\b)|("[^"]*")|(\b[A-Z][a-zA-Z0-9_]*)|(\b[a-zA-Z_][a-zA-Z0-9_]*)(?==)|(\{|\}|\(|\)|<|>|\/|;)|([0-9]+)/g;+ let lastIndex = 0;+ let m: RegExpExecArray | null = regex.exec(line);+ while (m !== null) {+ if (m.index > lastIndex) {+ tokens.push({+ text: line.slice(lastIndex, m.index),+ color: "#e4e4e7",+ });+ }+ if (m[1]) tokens.push({ text: m[1], color: LAVENDER });+ else if (m[2]) {+ // String literal — check if it matches the active highlight+ const inner = m[2].slice(1, -1);+ if (highlightedToken && inner === highlightedToken) {+ tokens.push({ text: m[2], color: LAVENDER, glow: true });+ } else {+ tokens.push({ text: m[2], color: MINT });+ }+ } else if (m[3]) tokens.push({ text: m[3], color: PEACH });+ else if (m[4]) tokens.push({ text: m[4], color: accentColor });+ else if (m[5]) tokens.push({ text: m[5], color: "#71717a" });+ else if (m[6]) tokens.push({ text: m[6], color: "#fbbf24" });+ lastIndex = regex.lastIndex;+ m = regex.exec(line);+ }+ if (lastIndex < line.length) {+ tokens.push({ text: line.slice(lastIndex), color: "#e4e4e7" });+ }+ return tokens;+}++/* -------------------------------------------------------------------------- */+/* Code editor */+/* -------------------------------------------------------------------------- */++function CodeEditor({+ frame,+ accentColor,+}: {+ frame: number;+ accentColor: string;+}) {+ // Compose the visible code: header + per-step typed amounts + footer (only when fully typed)+ const dynamicChunks: string[] = [];+ let activeHighlight: string | null = null;++ for (const step of BUILT_STEPS) {+ if (frame < step.startFrame) break;+ const elapsed = frame - step.startFrame;+ const charsTyped = Math.min(+ step.code.length,+ Math.floor(elapsed * CHARS_PER_FRAME),+ );+ dynamicChunks.push(step.code.slice(0, charsTyped));++ // Lavender pulse: active for ~24 frames after fragment finishes typing+ if (step.highlight) {+ const sinceStart = frame - step.startFrame;+ if (sinceStart >= 0 && sinceStart < 60) {+ activeHighlight = step.highlight;+ }+ }+ }++ const allTyped = dynamicChunks.join("");+ const lastStep = BUILT_STEPS[BUILT_STEPS.length - 1];+ const showFooter = frame > lastStep.endFrame + 4;+ const visibleCode = HEADER + allTyped + (showFooter ? FOOTER : "");+ const lines = visibleCode.split("\n");+ const lastLineIdx = lines.length - 1;+ const caretOn = Math.floor(frame / 12) % 2 === 0;++ return (+ <div+ style={{+ width: "100%",+ maxWidth: 540,+ position: "relative",+ borderRadius: 16,+ padding: 1,+ background:+ "linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.02) 50%, rgba(255,255,255,0.06) 100%)",+ boxShadow: "0 40px 90px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.4)",+ }}+ >+ <div+ style={{+ borderRadius: 15,+ background: "rgba(12,12,14,0.9)",+ backdropFilter: "blur(20px)",+ overflow: "hidden",+ }}+ >+ {/* Title bar */}+ <div+ style={{+ height: 40,+ display: "flex",+ alignItems: "center",+ padding: "0 16px",+ borderBottom: "1px solid rgba(255,255,255,0.06)",+ gap: 8,+ }}+ >+ {["#ff5f57", "#febc2e", "#28c840"].map((c) => (+ <div+ key={c}+ style={{+ width: 11,+ height: 11,+ borderRadius: 6,+ background: c,+ opacity: 0.65,+ }}+ />+ ))}+ <div+ style={{+ marginLeft: 12,+ fontSize: 12,+ color: "rgba(255,255,255,0.5)",+ fontFamily: MONO_FAMILY,+ }}+ >+ scene.tsx+ </div>+ </div>++ {/* Code body */}+ <div+ style={{+ padding: "20px 22px",+ fontFamily: MONO_FAMILY,+ fontSize: 12.5,+ lineHeight: 1.7,+ color: "#e4e4e7",+ minHeight: 480,+ boxShadow: "inset 0 1px 0 rgba(255,255,255,0.04)",+ }}+ >+ {lines.map((line, i) => {+ const tokens = tokenizeLine(line, accentColor, activeHighlight);+ const isLast = i === lastLineIdx;+ return (+ <div+ // biome-ignore lint/suspicious/noArrayIndexKey: stable per frame+ key={i}+ style={{ display: "flex", whiteSpace: "pre" }}+ >+ <span+ style={{+ width: 26,+ color: "rgba(255,255,255,0.18)",+ userSelect: "none",+ flexShrink: 0,+ }}+ >+ {i + 1}+ </span>+ <span>+ {tokens.length === 0 ? (+ <span> </span>+ ) : (+ tokens.map((t, j) => (+ <span+ // biome-ignore lint/suspicious/noArrayIndexKey: stable per line+ key={j}+ style={{+ color: t.color,+ textShadow: t.glow+ ? `0 0 12px ${LAVENDER}, 0 0 24px ${LAVENDER}80`+ : undefined,+ }}+ >+ {t.text}+ </span>+ ))+ )}+ {isLast && caretOn && (+ <span+ style={{+ display: "inline-block",+ width: 7,+ height: 14,+ marginLeft: 1,+ verticalAlign: "text-bottom",+ background: accentColor,+ }}+ />+ )}+ </span>+ </div>+ );+ })}+ </div>+ </div>+ </div>+ );+}++/* -------------------------------------------------------------------------- */+/* Soft pastel scene wrappers */+/* -------------------------------------------------------------------------- */++/** Warm pastel canvas — the dark stage every scene sits on */+function PastelStage({+ background = STAGE_BG,+ children,+}: {+ background?: string;+ children: ReactNode;+}) {+ return (+ <div+ style={{+ position: "absolute",+ inset: 0,+ background,+ overflow: "hidden",+ }}+ >+ <div+ style={{+ position: "absolute",+ inset: 0,+ background:+ "radial-gradient(ellipse at 20% 30%, rgba(255,179,142,0.08), transparent 60%), radial-gradient(ellipse at 80% 70%, rgba(212,179,255,0.06), transparent 60%)",+ }}+ />+ {children}+ </div>+ );+}++/* -------------------------------------------------------------------------- */+/* Scene factories */+/* -------------------------------------------------------------------------- */+/*+ Note: BlurReveal and MaskedSlideReveal primitives bake in a `background:+ white` div. To keep the warm-dark stage we re-implement just the visual+ here (not a fork — both effects are simple text + filter). The orchestrator+ advertises the primitives in code; the rendered output is faithful to them.+*/++function BlurRevealScene() {+ const frame = useCurrentFrame();+ const opacity = interpolate(frame, [0, 50], [0, 1], {+ extrapolateRight: "clamp",+ });+ const blurAmount = interpolate(frame, [0, 50], [22, 0], {+ extrapolateRight: "clamp",+ });+ return (+ <div+ style={{+ position: "absolute",+ inset: 0,+ display: "flex",+ alignItems: "center",+ justifyContent: "center",+ }}+ >+ <span+ style={{+ opacity,+ filter: `blur(${blurAmount}px)`,+ fontSize: 96,+ fontWeight: 600,+ color: PEACH,+ letterSpacing: "-0.04em",+ fontFamily: FONT_FAMILY,+ textShadow: `0 0 60px ${PEACH}40`,+ }}+ >+ Build faster.+ </span>+ </div>+ );+}++function DashboardScene() {+ return (+ <div style={{ position: "absolute", inset: 0 }}>+ <DashboardPopulate accentColor={PEACH} />+ </div>+ );+}++function MaskedSlideScene() {+ const frame = useCurrentFrame();+ const { fps } = useVideoConfig();+ const words = "Ship to production.".split(" ");+ return (+ <div+ style={{+ position: "absolute",+ inset: 0,+ display: "flex",+ alignItems: "center",+ justifyContent: "center",+ }}+ >+ <span+ style={{+ fontSize: 92,+ fontWeight: 700,+ color: MINT,+ letterSpacing: "-0.03em",+ fontFamily: FONT_FAMILY,+ textShadow: `0 0 40px ${MINT}30`,+ }}+ >+ {words.map((word, i) => {+ const t = spring({+ frame: frame - i * 4,+ fps,+ config: { damping: 18, stiffness: 120 },+ });+ return (+ <span+ // biome-ignore lint/suspicious/noArrayIndexKey: stable word list+ key={i}+ style={{+ display: "inline-block",+ overflow: "hidden",+ verticalAlign: "bottom",+ lineHeight: 1.05,+ marginRight: "0.25em",+ }}+ >+ <span+ style={{+ display: "inline-block",+ transform: `translateY(${(1 - t) * 110}%)`,+ }}+ >+ {word}+ </span>+ </span>+ );+ })}+ </span>+ </div>+ );+}++function TerminalScene() {+ return (+ <div style={{ position: "absolute", inset: 0 }}>+ <TerminalToBrowserDeploy accentColor={MINT} siteUrl="remocn.dev" />+ </div>+ );+}++/* -------------------------------------------------------------------------- */+/* Right pane */+/* -------------------------------------------------------------------------- */++function RightPane() {+ return (+ <div+ style={{+ position: "relative",+ width: "100%",+ height: "100%",+ background: STAGE_BG,+ overflow: "hidden",+ borderRadius: 18,+ }}+ >+ {/* ── BASE LAYER: each scene runs in its own Sequence so its+ internal useCurrentFrame() starts at 0 within the window. ── */}++ <Sequence+ from={SCENES.blur.start}+ durationInFrames={SCENES.blur.duration + SCENES.push1.duration}+ >+ <PastelStage>+ <BlurRevealScene />+ </PastelStage>+ </Sequence>++ <Sequence+ from={SCENES.dashboard.start}+ durationInFrames={SCENES.dashboard.duration + SCENES.glassWipe.duration}+ >+ <PastelStage>+ <DashboardScene />+ </PastelStage>+ </Sequence>++ <Sequence+ from={SCENES.maskedSlide.start}+ durationInFrames={SCENES.maskedSlide.duration + SCENES.push2.duration}+ >+ <PastelStage>+ <MaskedSlideScene />+ </PastelStage>+ </Sequence>++ <Sequence+ from={SCENES.terminal.start}+ durationInFrames={SCENES.terminal.duration + SCENES.endHold}+ >+ <PastelStage>+ <TerminalScene />+ </PastelStage>+ </Sequence>++ {/* ── TRANSITION OVERLAYS: each one displays the previous scene's+ end-state (Freeze) while wiping in the next scene's start-state. ── */}++ <Sequence+ from={SCENES.push1.start}+ durationInFrames={SCENES.push1.duration}+ >+ <SpatialPush+ transitionStart={0}+ transitionDuration={SCENES.push1.duration}+ direction="up"+ from={+ <Freeze frame={SCENES.push1.start - SCENES.blur.start - 1}>+ <PastelStage>+ <BlurRevealScene />+ </PastelStage>+ </Freeze>+ }+ to={+ <Freeze frame={0}>+ <PastelStage>+ <DashboardScene />+ </PastelStage>+ </Freeze>+ }+ />+ </Sequence>++ <Sequence+ from={SCENES.glassWipe.start}+ durationInFrames={SCENES.glassWipe.duration}+ >+ <FrostedGlassWipe+ transitionStart={0}+ transitionDuration={SCENES.glassWipe.duration}+ glassBlur={28}+ from={+ <Freeze frame={SCENES.dashboard.duration - 1}>+ <PastelStage>+ <DashboardScene />+ </PastelStage>+ </Freeze>+ }+ to={+ <Freeze frame={0}>+ <PastelStage>+ <MaskedSlideScene />+ </PastelStage>+ </Freeze>+ }+ />+ </Sequence>++ <Sequence+ from={SCENES.push2.start}+ durationInFrames={SCENES.push2.duration}+ >+ <SpatialPush+ transitionStart={0}+ transitionDuration={SCENES.push2.duration}+ direction="left"+ from={+ <Freeze frame={SCENES.maskedSlide.duration - 1}>+ <PastelStage>+ <MaskedSlideScene />+ </PastelStage>+ </Freeze>+ }+ to={+ <Freeze frame={0}>+ <PastelStage>+ <TerminalScene />+ </PastelStage>+ </Freeze>+ }+ />+ </Sequence>+ </div>+ );+}++/* -------------------------------------------------------------------------- */+/* Main */+/* -------------------------------------------------------------------------- */++export function LandingCodeShowcase({+ accentColor = "#FFB38E",+ speed = 1,+}: LandingCodeShowcaseProps) {+ const rawFrame = useCurrentFrame();+ const frame = rawFrame * speed;++ /* ---- Final "deploy success" glow on both panes ---- */+ const successGlow = interpolate(+ frame,+ [SCENES.terminal.start + 70, SCENES.terminal.start + 100],+ [0, 1],+ { extrapolateLeft: "clamp", extrapolateRight: "clamp" },+ );++ return (+ <AbsoluteFill+ style={{+ background: PANEL_BG,+ fontFamily: FONT_FAMILY,+ overflow: "hidden",+ }}+ >+ {/* Backdrop wash */}+ <div+ style={{+ position: "absolute",+ inset: 0,+ background:+ "radial-gradient(ellipse at 20% 30%, rgba(255,179,142,0.06), transparent 55%), radial-gradient(ellipse at 80% 70%, rgba(212,179,255,0.06), transparent 55%)",+ }}+ />++ {/* ---------------- LEFT: code editor ---------------- */}+ <div+ style={{+ position: "absolute",+ left: 0,+ top: 0,+ bottom: 0,+ width: "38%",+ display: "flex",+ alignItems: "center",+ justifyContent: "center",+ padding: 48,+ }}+ >+ <CodeEditor frame={frame} accentColor={accentColor} />+ </div>++ {/* ---------------- RIGHT: live preview ---------------- */}+ <div+ style={{+ position: "absolute",+ right: 0,+ top: 0,+ bottom: 0,+ width: "62%",+ borderLeft: "1px solid rgba(255,255,255,0.05)",+ }}+ >+ {/* Preview label */}+ <div+ style={{+ position: "absolute",+ top: 22,+ left: 24,+ display: "flex",+ alignItems: "center",+ gap: 8,+ zIndex: 5,+ }}+ >+ <div+ style={{+ width: 8,+ height: 8,+ borderRadius: 4,+ background: MINT,+ boxShadow: `0 0 ${10 + successGlow * 12}px ${MINT}`,+ }}+ />+ <div+ style={{+ fontSize: 11,+ fontFamily: MONO_FAMILY,+ color: "rgba(255,255,255,0.5)",+ textTransform: "uppercase",+ letterSpacing: "0.1em",+ }}+ >+ Preview · HMR+ </div>+ </div>++ <div+ style={{+ position: "absolute",+ inset: 0,+ overflow: "hidden",+ boxShadow: `inset 0 0 ${60 * successGlow}px rgba(161,238,189,${successGlow * 0.45})`,+ }}+ >+ <RightPane />+ </div>+ </div>+ </AbsoluteFill>+ );+}++// Re-export the schedule so config.ts (or callers) can read the canonical+// total length without duplicating constants.+export const LANDING_CODE_SHOWCASE_DURATION = TOTAL_DURATION;