{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "landing-code-showcase",
"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",
"content": "\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport {\n AbsoluteFill,\n Freeze,\n interpolate,\n Sequence,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { DashboardPopulate } from \"@/registry/remocn/dashboard-populate\";\nimport { FrostedGlassWipe } from \"@/registry/remocn/frosted-glass-wipe\";\nimport { SpatialPush } from \"@/registry/remocn/spatial-push\";\nimport { TerminalToBrowserDeploy } from \"@/registry/remocn/terminal-to-browser-deploy\";\n\nexport interface LandingCodeShowcaseProps {\n accentColor?: string;\n speed?: number;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\nconst MONO_FAMILY =\n \"var(--font-geist-mono), ui-monospace, SFMono-Regular, Menlo, monospace\";\n\n/* -------------------------------------------------------------------------- */\n/* Tokens */\n/* -------------------------------------------------------------------------- */\n\nconst PEACH = \"#FFB38E\";\nconst LAVENDER = \"#D4B3FF\";\nconst MINT = \"#A1EEBD\";\nconst STAGE_BG = \"#0A090E\";\nconst PANEL_BG = \"#141318\";\n\n/* -------------------------------------------------------------------------- */\n/* Timeline schedule */\n/* -------------------------------------------------------------------------- */\n/*\n Frame layout (30fps base):\n 0 ────────────────────────────► 90 BlurReveal\n 70 ────► 130 SpatialPush overlay\n 130 ────────────► 240 Dashboard\n 230 ────► 290 FrostedGlassWipe overlay\n 290 ────────────► 410 MaskedSlideReveal\n 400 ────► 460 KineticTypeMask overlay\n 460 ────────────────► 640 TerminalToBrowserDeploy\n*/\n\ninterface SceneWindow {\n start: number;\n duration: number;\n}\n\nconst SCENES = {\n blur: { start: 0, duration: 90 } as SceneWindow,\n push1: { start: 70, duration: 60 } as SceneWindow,\n dashboard: { start: 130, duration: 110 } as SceneWindow,\n glassWipe: { start: 230, duration: 60 } as SceneWindow,\n maskedSlide: { start: 290, duration: 120 } as SceneWindow,\n push2: { start: 400, duration: 60 } as SceneWindow,\n terminal: { start: 460, duration: 180 } as SceneWindow,\n // Quiet hold at the very end so the loop never restarts mid-action.\n endHold: 80,\n};\n\nconst TOTAL_DURATION =\n SCENES.terminal.start + SCENES.terminal.duration + SCENES.endHold; // 720\n\n/* -------------------------------------------------------------------------- */\n/* Code timeline */\n/* -------------------------------------------------------------------------- */\n\ninterface CodeStep {\n /** Frame at which this fragment STARTS being typed */\n startFrame: number;\n /** Code fragment to append to the visible buffer */\n code: string;\n /** Token within the fragment that pulses lavender briefly when typed */\n highlight?: string;\n}\n\nconst HEADER = `import { BlurReveal, DashboardPopulate, MaskedSlideReveal,\n TerminalToBrowserDeploy, Transition } from \"@/components/remocn\";\n\nexport default function Scene() {\n return (\n <>\n`;\n\nconst FOOTER = ` >\n );\n}`;\n\nconst STEPS: CodeStep[] = [\n {\n startFrame: 4,\n code: `