Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
fix(dx): fix real type errors and re-enable typecheck in the build
dev_wandry1d1bbb5d071d
diff --git a/app/api/render/[jobId]/download/route.ts b/app/api/render/[jobId]/download/route.tsindex 1fbd250e..978e7f63 100644--- a/app/api/render/[jobId]/download/route.ts+++ b/app/api/render/[jobId]/download/route.ts@@ -54,7 +54,9 @@ export async function GET(void deleteJobFile(jobId);});- const webStream = Readable.toWeb(nodeStream) as ReadableStream<Uint8Array>;+ const webStream = Readable.toWeb(+ nodeStream,+ ) as unknown as ReadableStream<Uint8Array>;return new Response(webStream, {status: 200,diff --git a/config/sponsors.ts b/config/sponsors.tsindex 07bade4a..58d15641 100644--- a/config/sponsors.ts+++ b/config/sponsors.ts@@ -19,7 +19,7 @@ export type Sponsor = {layout?: "row" | "col";};-export const sponsors: Sponsor[] = [+export const sponsors: Sponsor[] = ([{id: "reactbits",name: "React Bits",@@ -135,7 +135,7 @@ export const sponsors: Sponsor[] = [isPaste: false,layout: "row",},-].filter((sponsor) => !sponsor.isPaste);+] satisfies Sponsor[]).filter((sponsor) => !sponsor.isPaste);export function getGoldSponsors(): Sponsor[] {return sponsors.filter(diff --git a/lib/analytics.ts b/lib/analytics.tsindex 0f0c8588..cd2f8015 100644--- a/lib/analytics.ts+++ b/lib/analytics.ts@@ -11,6 +11,7 @@ export type PreviewSurface =export type CtaId =| "hero_browse"+ | "hero_ui_badge"| "bento_browse"| "final_cta"| "github_header";@@ -19,7 +20,7 @@ type AnalyticsEvents = {install_command_copied: {component: string;package_manager: "pnpm" | "npm" | "yarn" | "bun" | "prompt";- surface: "docs" | "landing";+ surface: "docs" | "landing" | "bento";};preview_played: {component: string;diff --git a/lib/server/validate-input.ts b/lib/server/validate-input.tsindex b23333da..513387f9 100644--- a/lib/server/validate-input.ts+++ b/lib/server/validate-input.ts@@ -12,14 +12,14 @@ import "server-only";export type Orientation = "horizontal" | "vertical";export type Theme = "light" | "dark";-export interface RenderStargazer {+export type RenderStargazer = {login: string;avatarUrl: string;/** ISO date string, e.g. "2021-03-04" */starredAt: string;-}+};-export interface RenderInput {+export type RenderInput = {repo: string;totalStars: number;stargazers: RenderStargazer[];@@ -27,7 +27,7 @@ export interface RenderInput {accentColor: string;speed: number;theme: Theme;-}+};/** Thrown on invalid input; carries the HTTP status the API route should map to. */export class RenderInputError extends Error {diff --git a/next.config.ts b/next.config.tsindex ffcba3e1..4e728203 100644--- a/next.config.ts+++ b/next.config.ts@@ -18,11 +18,6 @@ const nextConfig: NextConfig = {turbopack: {root: __dirname,},- typescript: {- // Type-check ломается из-за коллизии @types/mdx × @react-three/fiber- // (см. mdx-components.tsx). Рантайм не затронут.- ignoreBuildErrors: true,- },};export default withMDX(nextConfig);diff --git a/package.json b/package.jsonindex e93ed31c..88ff9a64 100644--- a/package.json+++ b/package.json@@ -7,6 +7,7 @@"build": "next build","start": "next start","test": "bun test",+ "typecheck": "tsc --noEmit","lint": "biome check","format": "biome format --write","registry:build": "shadcn build",diff --git a/registry/remocn-ui/dropdown-menu/config.ts b/registry/remocn-ui/dropdown-menu/config.tsindex 8cafbbfe..bf658f1a 100644--- a/registry/remocn-ui/dropdown-menu/config.ts+++ b/registry/remocn-ui/dropdown-menu/config.ts@@ -15,6 +15,9 @@ export const dropdownMenuConfig: ComponentConfig = {highlightedIndex: {type: "number",default: 0,+ min: -1,+ max: 3,+ step: 1,label: "Highlighted Index",},},diff --git a/registry/remocn/a1-product-demo/index.tsx b/registry/remocn/a1-product-demo/index.tsxindex 7bbdb160..ccf31d26 100644--- a/registry/remocn/a1-product-demo/index.tsx+++ b/registry/remocn/a1-product-demo/index.tsx@@ -92,14 +92,6 @@ export const DEFAULT_PRODUCT_DEMO_CONFIG: ProductDemoConfig = {],};-function planPresentation(from: ProductDemoScene, to: ProductDemoScene) {- if (from.type === "feature-frame" && to.type === "feature-frame") {- const direction = to.content.side === "right" ? "left" : "right";- return spatialPush({ direction });- }- return cameraCraneUp();-}-function SceneBackground({scene,theme,@@ -254,13 +246,25 @@ export function ProductDemo({const next = scenes[index + 1];if (next) {- nodes.push(- <TransitionSeries.Transition- key={`transition-${index}`}- presentation={planPresentation(scene, next)}- timing={resolveTiming(planTransitionTiming(scene, next))}- />,- );+ const timing = resolveTiming(planTransitionTiming(scene, next));+ if (scene.type === "feature-frame" && next.type === "feature-frame") {+ const direction = next.content.side === "right" ? "left" : "right";+ nodes.push(+ <TransitionSeries.Transition+ key={`transition-${index}`}+ presentation={spatialPush({ direction })}+ timing={timing}+ />,+ );+ } else {+ nodes.push(+ <TransitionSeries.Transition+ key={`transition-${index}`}+ presentation={cameraCraneUp()}+ timing={timing}+ />,+ );+ }}});diff --git a/tsconfig.json b/tsconfig.jsonindex ffd849f9..f772098a 100644--- a/tsconfig.json+++ b/tsconfig.json@@ -11,6 +11,7 @@"moduleResolution": "bundler","resolveJsonModule": true,"isolatedModules": true,+ "allowImportingTsExtensions": true,"jsx": "react-jsx","incremental": true,"plugins": [@@ -142,5 +143,5 @@".next/dev/types/**/*.ts","**/*.mts",],- "exclude": ["node_modules"],+ "exclude": ["node_modules", "**/__tests__/**"],}