Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: added stars deprecation notice
dev_wandry4b960836abd3
diff --git a/app/(home)/components/sections/hero-scroll-video.tsx b/app/(home)/components/sections/hero-scroll-video.tsxindex daad6314..487e0785 100644--- a/app/(home)/components/sections/hero-scroll-video.tsx+++ b/app/(home)/components/sections/hero-scroll-video.tsx@@ -1,19 +1,12 @@"use client";-import { Pause, Play } from "lucide-react";import {motion,useReducedMotion,useScroll,useTransform,} from "motion/react";-import {- type RefObject,- useCallback,- useEffect,- useRef,- useState,-} from "react";+import { type RefObject, useEffect, useRef, useState } from "react";const REST_MAX_WIDTH = 1120;const REST_WIDTH_RATIO = 0.92;@@ -28,22 +21,9 @@ type Viewport = { w: number; h: number };export function HeroScrollVideo() {const sectionRef = useRef<HTMLDivElement>(null);const videoRef = useRef<HTMLVideoElement>(null);- const [playing, setPlaying] = useState(true);const [viewport, setViewport] = useState<Viewport | null>(null);const reduceMotion = useReducedMotion();- const togglePlay = useCallback(() => {- const v = videoRef.current;- if (!v) return;- if (v.paused) {- void v.play();- setPlaying(true);- } else {- v.pause();- setPlaying(false);- }- }, []);-useEffect(() => {const update = () =>setViewport({ w: window.innerWidth, h: window.innerHeight });@@ -61,8 +41,6 @@ export function HeroScrollVideo() {<div className="w-full max-w-[1120px]"><VideoCardvideoRef={videoRef}- playing={playing}- onToggle={togglePlay}className="aspect-video rounded-2xl sm:rounded-3xl"/></div>@@ -76,8 +54,6 @@ export function HeroScrollVideo() {sectionRef={sectionRef}videoRef={videoRef}viewport={viewport}- playing={playing}- onToggle={togglePlay}/>);}@@ -86,14 +62,10 @@ function ScrollStage({sectionRef,videoRef,viewport,- playing,- onToggle,}: {sectionRef: RefObject<HTMLDivElement | null>;videoRef: RefObject<HTMLVideoElement | null>;viewport: Viewport;- playing: boolean;- onToggle: () => void;}) {const { scrollYProgress } = useScroll({target: sectionRef,@@ -139,12 +111,7 @@ function ScrollStage({}}className="group relative overflow-hidden will-change-transform">- <VideoCard- videoRef={videoRef}- playing={playing}- onToggle={onToggle}- className="h-full w-full"- />+ <VideoCard videoRef={videoRef} className="h-full w-full" /><motion.divaria-hiddenstyle={{ borderRadius, opacity: frameOpacity }}@@ -158,17 +125,13 @@ function ScrollStage({function VideoCard({videoRef,- playing,- onToggle,className,}: {videoRef: RefObject<HTMLVideoElement | null>;- playing: boolean;- onToggle: () => void;className?: string;}) {return (- <div className={`group relative overflow-hidden ${className ?? ""}`}>+ <div className={`relative overflow-hidden ${className ?? ""}`}><videoref={videoRef}src="/introducing-remocn.mp4"@@ -180,24 +143,6 @@ function VideoCard({poster="/introducing-remocn-poster.jpg"className="block h-full w-full object-cover"/>- <button- type="button"- onClick={onToggle}- aria-label={playing ? "Pause preview" : "Play preview"}- className="absolute inset-0 flex items-center justify-center bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40"- >- <span- aria-hidden- data-show={!playing}- className="pointer-events-none flex size-14 items-center justify-center rounded-full bg-background/70 text-foreground opacity-0 backdrop-blur-md transition-opacity duration-200 group-hover:opacity-100 motion-reduce:transition-none data-[show=true]:opacity-100"- >- {playing ? (- <Pause className="size-5" />- ) : (- <Play className="size-5 translate-x-0.5" />- )}- </span>- </button></div>);}diff --git a/app/(home)/stars/components/stargazers-deprecated-notice.tsx b/app/(home)/stars/components/stargazers-deprecated-notice.tsxnew file mode 100644index 00000000..33029af2--- /dev/null+++ b/app/(home)/stars/components/stargazers-deprecated-notice.tsx@@ -0,0 +1,90 @@+import { ArrowUpRight } from "lucide-react";+import Link from "next/link";+import { buttonVariants } from "@/components/ui/button";+import {+ Empty,+ EmptyContent,+ EmptyDescription,+ EmptyHeader,+ EmptyMedia,+ EmptyTitle,+} from "@/components/ui/empty";+import { cn } from "@/lib/utils";++const STARWALL_URL = "https://starwall.radiumcoders.com/";+const AUTHOR_X_URL = "https://x.com/radiumcoders";++export function StargazersDeprecatedNotice() {+ return (+ <div className="flex min-h-[70vh] flex-col items-center justify-center">+ <Empty className="max-w-xl gap-6">+ <EmptyHeader className="max-w-md gap-3">+ <EmptyMedia className="mb-1">+ <GitHubIcon className="size-10 text-muted-foreground" />+ </EmptyMedia>+ <EmptyTitle className="text-2xl tracking-tight text-balance sm:text-3xl">+ GitHub turned off the public stargazers API+ </EmptyTitle>+ <EmptyDescription className="max-w-[52ch] text-base text-pretty">+ Reading stargazers now requires authentication, so this tool can no+ longer build your video.{" "}+ <Link href={STARWALL_URL} target="_blank" rel="noreferrer">+ Starwall+ </Link>{" "}+ by Jay does it for you.+ </EmptyDescription>+ </EmptyHeader>++ <EmptyContent className="gap-3">+ <Link+ href={STARWALL_URL}+ target="_blank"+ rel="noreferrer"+ className={cn(buttonVariants({ size: "lg" }), "w-full py-2 pr-3 pl-4")}+ >+ Open Starwall+ <ArrowUpRight className="size-4" />+ </Link>++ <p className="text-sm text-muted-foreground">+ Starwall is built entirely by {" "}+ <Link+ href={AUTHOR_X_URL}+ target="_blank"+ rel="noreferrer"+ className="inline-flex items-center gap-1 font-medium text-foreground underline underline-offset-4 hover:text-primary"+ >+ @radiumcoders+ </Link>+ </p>+ </EmptyContent>+ </Empty>+ </div>+ );+}++const GitHubIcon = ({ className }: { className?: string }) => (+ <svg+ viewBox="0 0 24 24"+ className={cn("shrink-0", className)}+ fill="currentColor"+ role="img"+ aria-label="GitHub"+ >+ <title>GitHub</title>+ <path d="M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.56 0-.27-.01-1-.02-1.96-3.2.69-3.87-1.54-3.87-1.54-.52-1.33-1.28-1.69-1.28-1.69-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.55-.29-5.24-1.28-5.24-5.71 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.47.11-3.06 0 0 .97-.31 3.18 1.18a11 11 0 0 1 5.79 0c2.21-1.49 3.18-1.18 3.18-1.18.63 1.59.23 2.77.11 3.06.74.81 1.19 1.84 1.19 3.1 0 4.44-2.7 5.41-5.27 5.7.41.36.78 1.06.78 2.14 0 1.55-.01 2.8-.01 3.18 0 .31.21.68.8.56C20.21 21.39 23.5 17.08 23.5 12 23.5 5.65 18.35.5 12 .5Z" />+ </svg>+);++const XIcon = ({ className }: { className?: string }) => (+ <svg+ viewBox="0 0 24 24"+ className={cn("shrink-0", className)}+ fill="currentColor"+ role="img"+ aria-label="X"+ >+ <title>X</title>+ <path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />+ </svg>+);diff --git a/app/(home)/stars/page.tsx b/app/(home)/stars/page.tsxindex ba548427..7c7c45e1 100644--- a/app/(home)/stars/page.tsx+++ b/app/(home)/stars/page.tsx@@ -1,6 +1,5 @@import type { Metadata } from "next";-import { Suspense } from "react";-import { StarsTool } from "./components/stars-tool";+import { StargazersDeprecatedNotice } from "./components/stargazers-deprecated-notice";export const metadata: Metadata = {title: "GitHub Stars Video Generator",@@ -13,12 +12,16 @@ export const metadata: Metadata = {},};-// The (home) layout already wraps pages in PageShell + SiteHeader + SiteFooter,-// so this server shell only supplies metadata and mounts the client tool.export default function StarsPage() {return (- <Suspense>- <StarsTool />- </Suspense>+ <section className="relative overflow-hidden pt-10 pb-16 sm:pt-16 sm:pb-24">+ <div aria-hidden className="absolute inset-0 -z-10">+ <div className="absolute inset-0 bg-grid-fade" />+ </div>++ <div className="section">+ <StargazersDeprecatedNotice />+ </div>+ </section>);}