Skip to content

🎥 Make videos programmatically with React

memoize timeline inner

JonnyBurgerd9ba5608dd69
diff --git a/bun.lock b/bun.lock
index fb242ab5d7..676ac3ef92 100644
--- a/bun.lock
+++ b/bun.lock
@@ -11,7 +11,7 @@
"typescript": "5.9.3",
},
"devDependencies": {
- "@types/babel__standalone": "^7.1.9",
+ "@types/babel__standalone": "7.1.9",
"@types/bun": "catalog:",
"@types/deno": "2.0.0",
"@types/react": "catalog:",
@@ -190,10 +190,10 @@
"@remotion/skia": "workspace:*",
"@remotion/tailwind-v4": "workspace:*",
"@remotion/zod-types": "workspace:*",
- "@types/minimist": "^1.2.2",
+ "@types/minimist": "1.2.2",
"@types/node": "catalog:",
- "@types/prettier": "^2.7.2",
- "@types/prompts": "^2.4.1",
+ "@types/prettier": "2.7.2",
+ "@types/prompts": "2.4.9",
"@typescript/native-preview": "catalog:",
"eslint": "catalog:",
"react": "catalog:",
@@ -280,21 +280,21 @@
"@mediabunny/ac3": "catalog:",
"@mediabunny/flac-encoder": "catalog:",
"@mediabunny/mp3-encoder": "catalog:",
- "@mediafox/core": "^1.0.4",
- "@mediafox/react": "^1.0.4",
- "@mux/upchunk": "^3.5.0",
- "@radix-ui/react-checkbox": "^1.1.2",
- "@radix-ui/react-dialog": "^1.1.0",
- "@radix-ui/react-label": "^2.1.0",
- "@radix-ui/react-radio-group": "^1.2.2",
- "@radix-ui/react-scroll-area": "^1.1.0",
- "@radix-ui/react-separator": "^1.1.0",
- "@radix-ui/react-slider": "^1.2.0",
- "@radix-ui/react-slot": "^1.1.0",
- "@radix-ui/react-tabs": "^1.1.0",
- "@remix-run/node": "^2.15.2",
- "@remix-run/react": "^2.15.2",
- "@remix-run/serve": "^2.15.2",
+ "@mediafox/core": "1.0.4",
+ "@mediafox/react": "1.0.4",
+ "@mux/upchunk": "3.5.0",
+ "@radix-ui/react-checkbox": "1.1.2",
+ "@radix-ui/react-dialog": "1.1.15",
+ "@radix-ui/react-label": "2.1.7",
+ "@radix-ui/react-radio-group": "1.2.2",
+ "@radix-ui/react-scroll-area": "1.1.0",
+ "@radix-ui/react-separator": "1.1.0",
+ "@radix-ui/react-slider": "1.3.6",
+ "@radix-ui/react-slot": "1.2.4",
+ "@radix-ui/react-tabs": "1.1.13",
+ "@remix-run/node": "2.15.2",
+ "@remix-run/react": "2.15.2",
+ "@remix-run/serve": "2.15.2",
"@remotion/captions": "workspace:*",
"@remotion/design": "workspace:*",
"@remotion/layout-utils": "workspace:*",
@@ -302,25 +302,25 @@
"@remotion/player": "workspace:*",
"@remotion/shapes": "workspace:*",
"@remotion/whisper-web": "workspace:*",
- "@vercel/remix": "^2.15.2",
+ "@vercel/remix": "2.15.2",
"@vidstack/react": "1.12.13",
- "class-variance-authority": "^0.7.0",
+ "class-variance-authority": "0.7.1",
"clsx": "2.1.1",
"fast-average-color": "9.4.0",
- "hls.js": "^1.6.15",
+ "hls.js": "1.6.15",
"isbot": "4.1.0",
"lucide-react": "0.439.0",
"mediabunny": "catalog:",
"react": "catalog:",
"react-dom": "catalog:",
- "react-hot-toast": "^2.4.1",
+ "react-hot-toast": "2.6.0",
"remotion": "workspace:*",
- "shikiji": "^0.6.10",
+ "shikiji": "0.6.13",
"tailwind-merge": "2.5.2",
- "tailwindcss-animate": "^1.0.7",
+ "tailwindcss-animate": "1.0.7",
},
"devDependencies": {
- "@remix-run/dev": "^2.15.2",
+ "@remix-run/dev": "2.15.2",
"@remotion/eslint-config-internal": "workspace:*",
"@tailwindcss/postcss": "4.2.0",
"@types/dom-webcodecs": "catalog:",
@@ -328,7 +328,7 @@
"postcss": "8.5.10",
"tailwindcss": "4.2.0",
"vite": "6.4.2",
- "vite-tsconfig-paths": "^4.2.1",
+ "vite-tsconfig-paths": "4.3.2",
},
},
"packages/core": {
@@ -369,7 +369,7 @@
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
"@types/minimist": "1.2.2",
- "@types/prompts": "^2.0.12",
+ "@types/prompts": "2.4.9",
"@types/tar": "6.1.1",
"@typescript/native-preview": "catalog:",
"eslint": "catalog:",
@@ -381,12 +381,12 @@
"version": "4.0.460",
"dependencies": {
"@radix-ui/react-select": "2.1.1",
- "@radix-ui/react-slot": "^1.2.4",
- "@radix-ui/react-tabs": "^1.1.0",
+ "@radix-ui/react-slot": "1.2.4",
+ "@radix-ui/react-tabs": "1.1.13",
"@remotion/paths": "workspace:*",
"@remotion/shapes": "workspace:*",
"@remotion/svg-3d-engine": "workspace:*",
- "clsx": "^2.1.1",
+ "clsx": "2.1.1",
"lucide-react": "0.439.0",
"remotion": "workspace:*",
},
@@ -398,7 +398,7 @@
"eslint": "catalog:",
"react": "catalog:",
"react-dom": "catalog:",
- "tailwind-merge": "^2.6.0",
+ "tailwind-merge": "2.6.0",
"tailwindcss": "4.2.0",
},
"peerDependencies": {
@@ -415,7 +415,7 @@
"version": "4.0.460",
"dependencies": {
"@aws-sdk/s3-request-presigner": "catalog:",
- "@babel/plugin-transform-modules-commonjs": "^7.15.4",
+ "@babel/plugin-transform-modules-commonjs": "7.27.1",
"@docusaurus/core": "3.9.2",
"@docusaurus/faster": "3.9.2",
"@docusaurus/plugin-content-blog": "3.9.2",
@@ -424,7 +424,7 @@
"@docusaurus/types": "3.9.2",
"@mdx-js/react": "3.0.1",
"@mediabunny/ac3": "catalog:",
- "@radix-ui/react-dropdown-menu": "^2.1.16",
+ "@radix-ui/react-dropdown-menu": "2.1.16",
"@react-three/fiber": "catalog:",
"@remotion-dev/cube-presentation": "https://www.remotion.pro/pkg/cube-transition/1.0.2/docs",
"@remotion/animated-emoji": "workspace:*",
@@ -481,53 +481,53 @@
"@rive-app/canvas-advanced": "2.31.5",
"@shikijs/twoslash": "3.22.0",
"@shopify/react-native-skia": "2.0.0",
- "@swc/core": "^1.3.80",
+ "@swc/core": "1.13.5",
"@turf/turf": "7.3.2",
- "@types/uuid": "^8.3.4",
- "@vercel/config": "^0.0.28",
- "@vercel/functions": "^3.1.4",
+ "@types/uuid": "8.3.4",
+ "@vercel/config": "0.0.28",
+ "@vercel/functions": "3.4.1",
"@vercel/sandbox": "1.6.0",
"chalk": "4.1.2",
- "clipboard": "^2.0.8",
- "clsx": "^1.1.1",
+ "clipboard": "2.0.11",
+ "clsx": "1.2.1",
"color-namer": "1.4.0",
- "copy-text-to-clipboard": "^2",
- "crawlchat-client": "^1.2.1",
+ "copy-text-to-clipboard": "2.2.0",
+ "crawlchat-client": "1.2.1",
"create-video": "workspace:*",
"eslint": "catalog:",
- "hls.js": "^0.14.17",
- "https-proxy-agent": "^7.0.2",
+ "hls.js": "0.14.17",
+ "https-proxy-agent": "7.0.6",
"lottie-web": "5.13.0",
"maplibre-gl": "5.24.0",
"mediabunny": "catalog:",
- "mux-embed": "^4.16.0",
+ "mux-embed": "4.30.0",
"next": "catalog:",
"plyr": "3.7.3",
"polished": "4.1.2",
"react": "catalog:",
"react-dom": "catalog:",
- "remark-shiki-twoslash": "^3.1.3",
+ "remark-shiki-twoslash": "3.1.3",
"remotion": "workspace:*",
"shiki": "3.22.0",
"three": "catalog:",
"twoslash": "0.3.6",
- "uuid": "^8.3.2",
+ "uuid": "8.3.2",
"zod": "catalog:",
},
"devDependencies": {
- "@docusaurus/module-type-aliases": "^3.9.2",
- "@docusaurus/theme-classic": "^3.9.2",
+ "@docusaurus/module-type-aliases": "3.9.2",
+ "@docusaurus/theme-classic": "3.9.2",
"@react-three/fiber": "catalog:",
- "@tsconfig/docusaurus": "^1.0.5",
+ "@tsconfig/docusaurus": "1.0.7",
"@types/bun": "catalog:",
- "@types/color-namer": "^1.3.0",
- "@types/hls.js": "^0.13.3",
+ "@types/color-namer": "1.3.3",
+ "@types/hls.js": "0.13.3",
"@types/node": "catalog:",
"@types/three": "catalog:",
- "@types/unist": "^2.0.0",
- "lodash.sortby": "^4.7.0",
+ "@types/unist": "2.0.11",
+ "lodash.sortby": "4.7.0",
"openai": "catalog:",
- "url-loader": "^4.1.1",
+ "url-loader": "4.1.1",
},
},
"packages/docusaurus-plugin": {
@@ -537,11 +537,11 @@
"@docusaurus/types": "3.6.0",
"@shikijs/twoslash": "3.22.0",
"@types/dom-webcodecs": "catalog:",
- "fenceparser": "^2.2.0",
+ "fenceparser": "2.2.0",
"shiki": "3.22.0",
"twoslash": "0.3.6",
- "unified": "^11.0.5",
- "unist-util-visit": "^5.0.0",
+ "unified": "11.0.5",
+ "unist-util-visit": "5.1.0",
},
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
@@ -665,8 +665,8 @@
"name": "@remotion/example",
"version": "4.0.460",
"dependencies": {
- "@mdx-js/loader": "^2.3.0",
- "@mdx-js/react": "^2.3.0",
+ "@mdx-js/loader": "2.3.0",
+ "@mdx-js/react": "2.3.0",
"@mediabunny/ac3": "catalog:",
"@react-three/drei": "10.0.7",
"@react-three/fiber": "catalog:",
@@ -715,20 +715,20 @@
"@remotion/zod-types": "workspace:*",
"@remotion/zod-types-v3": "workspace:*",
"@shopify/react-native-skia": "2.0.0",
- "@types/express": "^4.17.11",
- "@types/hls.js": "^0.13.3",
- "@types/opentype.js": "^1.3.4",
+ "@types/express": "4.17.23",
+ "@types/hls.js": "0.13.3",
+ "@types/opentype.js": "1.3.4",
"@types/styled-components": "5.1.34",
"@types/three": "catalog:",
"@types/web": "catalog:",
- "babel-loader": "^8.2.2",
+ "babel-loader": "8.2.2",
"css-loader": "5.2.7",
"dotenv": "17.3.1",
- "hls.js": "^0.14.17",
+ "hls.js": "0.14.17",
"lottie-web": "5.13.0",
"mediabunny": "catalog:",
- "opentype.js": "^1.3.4",
- "polished": "^4.0.5",
+ "opentype.js": "1.3.4",
+ "polished": "4.3.1",
"react": "catalog:",
"react-dom": "catalog:",
"react-is": "19.0.0",
@@ -739,8 +739,8 @@
"styled-components": "6.1.13",
"tailwindcss": "4.2.0",
"three": "catalog:",
- "ts-unused-exports": "^7.0.1",
- "use-asset": "^1.0.4",
+ "ts-unused-exports": "7.0.3",
+ "use-asset": "1.0.4",
"zod": "catalog:",
},
"devDependencies": {
@@ -811,7 +811,7 @@
},
"devDependencies": {
"@types/css-font-loading-module": "0.0.14",
- "@types/prettier": "^2.7.1",
+ "@types/prettier": "2.7.2",
"@typescript/native-preview": "catalog:",
"postcss": "8.5.10",
},
@@ -863,7 +863,7 @@
"@remotion/webcodecs": "workspace:*",
"@remotion/zod-types": "workspace:*",
"@types/node": "catalog:",
- "@types/sharp": "^0.28.5",
+ "@types/sharp": "0.28.6",
"create-video": "workspace:*",
"execa": "5.1.1",
"remotion": "workspace:*",
@@ -897,7 +897,7 @@
"@remotion/bundler": "workspace:*",
"@remotion/compositor-linux-arm64-gnu": "workspace:*",
"@remotion/eslint-config-internal": "workspace:*",
- "@types/express": "^5.0.0",
+ "@types/express": "5.0.1",
"@types/mime-types": "2.1.1",
"@types/minimist": "1.2.2",
"@types/node": "catalog:",
@@ -927,7 +927,7 @@
"@aws-sdk/s3-request-presigner": "catalog:",
"@remotion/eslint-config-internal": "workspace:*",
"@remotion/serverless-client": "workspace:*",
- "@types/express": "^5.0.0",
+ "@types/express": "5.0.1",
"@types/mime-types": "2.1.1",
"@typescript/native-preview": "catalog:",
"eslint": "catalog:",
@@ -987,7 +987,7 @@
"@remotion/eslint-config-internal": "workspace:*",
"@typescript/native-preview": "catalog:",
"eslint": "catalog:",
- "msw": "^2.7.1",
+ "msw": "2.12.7",
"remotion": "workspace:*",
},
},
@@ -1042,7 +1042,7 @@
},
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
- "@types/command-line-args": "^5.2.3",
+ "@types/command-line-args": "5.2.3",
"@typescript/native-preview": "catalog:",
"eslint": "catalog:",
},
@@ -1165,7 +1165,7 @@
"@remotion/eslint-config-internal": "workspace:*",
"@testing-library/react": "16.1.0",
"@typescript/native-preview": "catalog:",
- "csstype": "^3.1.1",
+ "csstype": "3.2.3",
"eslint": "catalog:",
"react": "catalog:",
"react-dom": "catalog:",
@@ -1235,7 +1235,7 @@
"@mediabunny/ac3": "catalog:",
"@mediabunny/flac-encoder": "catalog:",
"@mediabunny/mp3-encoder": "catalog:",
- "@mux/upchunk": "^3.5.0",
+ "@mux/upchunk": "3.5.0",
"@remotion/animated-emoji": "workspace:*",
"@remotion/design": "workspace:*",
"@remotion/lottie": "workspace:*",
@@ -1293,7 +1293,7 @@
"react": "18.3.1",
"react-dom": "18.3.1",
"vitest": "catalog:",
- "vitest-browser-react": "^2.0.2",
+ "vitest-browser-react": "2.0.2",
},
"peerDependencies": {
"react": ">=18.0.0",
@@ -1309,7 +1309,7 @@
"execa": "5.1.1",
"extract-zip": "2.0.1",
"remotion": "workspace:*",
- "source-map": "^0.8.0-beta.0",
+ "source-map": "0.8.0-beta.0",
"ws": "8.17.1",
},
"devDependencies": {
@@ -1437,7 +1437,7 @@
"@remotion/bundler": "workspace:*",
"@remotion/eslint-config-internal": "workspace:*",
"@shopify/react-native-skia": "2.0.0",
- "@types/react-native": "^0.69.2",
+ "@types/react-native": "0.69.2",
"@typescript/native-preview": "catalog:",
"canvaskit-wasm": "0.40.0",
"eslint": "catalog:",
@@ -1510,7 +1510,7 @@
"@remotion/zod-types": "workspace:*",
"mediabunny": "catalog:",
"memfs": "3.4.3",
- "open": "^8.4.2",
+ "open": "8.4.2",
"remotion": "workspace:*",
"semver": "7.5.3",
"source-map": "0.7.3",
@@ -1518,7 +1518,7 @@
},
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
- "@types/semver": "^7.3.4",
+ "@types/semver": "7.5.3",
"@typescript/native-preview": "catalog:",
"eslint": "catalog:",
"react": "catalog:",
@@ -1539,7 +1539,7 @@
"@remotion/renderer": "workspace:*",
"@remotion/studio-shared": "workspace:*",
"memfs": "3.4.3",
- "open": "^8.4.2",
+ "open": "8.4.2",
"prettier": "catalog:",
"recast": "0.23.11",
"remotion": "workspace:*",
@@ -1549,7 +1549,7 @@
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
"@types/node": "catalog:",
- "@types/semver": "^7.3.4",
+ "@types/semver": "7.5.3",
"@typescript/native-preview": "catalog:",
"ast-types": "0.16.1",
"eslint": "catalog:",
@@ -1587,8 +1587,8 @@
"dependencies": {
"autoprefixer": "10.4.20",
"postcss": "8.5.10",
- "postcss-loader": "^7.3.0",
- "postcss-preset-env": "^8.3.2",
+ "postcss-loader": "7.3.4",
+ "postcss-preset-env": "8.3.2",
"style-loader": "4.0.0",
"tailwindcss": "3.4.13",
},
@@ -1707,10 +1707,10 @@
"ws": "8.17.1",
},
"devDependencies": {
- "@electron-forge/cli": "^7.11.1",
- "@electron-forge/plugin-vite": "^7.11.1",
+ "@electron-forge/cli": "7.11.1",
+ "@electron-forge/plugin-vite": "7.11.1",
"@remotion/eslint-config-flat": "workspace:*",
- "@tailwindcss/postcss": "^4.2.1",
+ "@tailwindcss/postcss": "4.2.1",
"@types/node": "20.12.14",
"@types/react": "19.2.7",
"@types/react-dom": "19.2.3",
@@ -1719,9 +1719,9 @@
"electron": "40.8.5",
"eslint": "9.19.0",
"prettier": "3.8.1",
- "tailwindcss": "^4.2.1",
+ "tailwindcss": "4.2.1",
"typescript": "5.9.3",
- "vite": "^6.4.2",
+ "vite": "6.4.2",
},
"optionalDependencies": {
"@remotion/compositor-darwin-arm64": "workspace:*",
@@ -1939,7 +1939,7 @@
"@radix-ui/react-dialog": "1.1.15",
"@radix-ui/react-select": "2.2.6",
"@radix-ui/react-slot": "1.2.4",
- "@radix-ui/react-tooltip": "^1.2.8",
+ "@radix-ui/react-tooltip": "1.2.8",
"@react-three/fiber": "9.1.0",
"@remotion/animated-emoji": "workspace:*",
"@remotion/bundler": "workspace:*",
@@ -1988,7 +1988,7 @@
"eslint-config-next": "15.1.6",
"postcss": "8.5.10",
"prettier": "3.8.1",
- "raw-loader": "^4.0.2",
+ "raw-loader": "4.0.2",
"tailwindcss": "4.2.0",
"tw-animate-css": "1.4.0",
"typescript": "5.9.3",
@@ -2011,23 +2011,23 @@
"zod": "4.3.6",
},
"devDependencies": {
- "@elevenlabs/elevenlabs-js": "^2.20.0",
+ "@elevenlabs/elevenlabs-js": "2.20.0",
"@remotion/eslint-config-flat": "workspace:*",
- "@types/prompts": "^2.4.9",
+ "@types/prompts": "2.4.9",
"@types/react": "19.2.7",
- "@types/uuid": "^11.0.0",
+ "@types/uuid": "11.0.0",
"@types/web": "0.0.166",
- "@types/yargs": "^17.0.33",
- "chalk": "^5.6.2",
+ "@types/yargs": "17.0.33",
+ "chalk": "5.6.2",
"dotenv": "17.3.1",
"eslint": "9.19.0",
- "ora": "^9.0.0",
+ "ora": "9.0.0",
"prettier": "3.8.1",
- "prompts": "^2.4.2",
- "tsx": "^4.20.6",
+ "prompts": "2.4.2",
+ "tsx": "4.20.6",
"typescript": "5.9.3",
- "uuid": "^13.0.0",
- "yargs": "^18.0.0",
+ "uuid": "13.0.0",
+ "yargs": "18.0.0",
},
},
"packages/template-react-router": {
@@ -2053,7 +2053,7 @@
"tailwind-merge": "3.0.1",
"tailwindcss": "4.2.0",
"vite": "6.4.2",
- "vite-tsconfig-paths": "^4.2.1",
+ "vite-tsconfig-paths": "4.3.2",
"zod": "4.3.6",
},
"devDependencies": {
@@ -2292,7 +2292,7 @@
"@remotion/vercel": "workspace:*",
"@types/bun": "1.3.3",
"@vercel/blob": "2.3.0",
- "@vercel/functions": "^3.4.1",
+ "@vercel/functions": "3.4.1",
"@vercel/sandbox": "1.6.0",
"clsx": "2.1.1",
"next": "16.2.3",
@@ -2450,7 +2450,7 @@
"react-dom": "catalog:",
"three": "catalog:",
"vitest": "catalog:",
- "vitest-browser-react": "^2.0.2",
+ "vitest-browser-react": "2.0.2",
"zod": "catalog:",
},
"peerDependencies": {
diff --git a/packages/studio/src/components/Timeline/TimelineHeightContainer.tsx b/packages/studio/src/components/Timeline/TimelineHeightContainer.tsx
index 2d1cb22319..b629c84d66 100644
--- a/packages/studio/src/components/Timeline/TimelineHeightContainer.tsx
+++ b/packages/studio/src/components/Timeline/TimelineHeightContainer.tsx
@@ -9,7 +9,7 @@ const baseStyle: React.CSSProperties = {
overflowX: 'hidden',
};
-export const TimelineHeightContainer: React.FC<{
+const TimelineHeightContainerInner: React.FC<{
readonly shown: TrackWithHash[];
readonly hasBeenCut: boolean;
readonly children: React.ReactNode;
@@ -23,3 +23,5 @@ export const TimelineHeightContainer: React.FC<{
return <div style={style}>{children}</div>;
};
+
+export const TimelineHeightContainer = React.memo(TimelineHeightContainerInner);