Skip to content

🎥 Make videos programmatically with React

alright

JonnyBurger35eb6d0e7b76
diff --git a/bun.lock b/bun.lock
index 101f910f6e..d1609c5759 100644
--- a/bun.lock
+++ b/bun.lock
@@ -18,7 +18,7 @@
},
"packages/ai-improvements": {
"name": "ai-improvements",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@babel/types": "7.24.0",
"openai": "4.67.1",
@@ -27,7 +27,7 @@
},
"packages/animated-emoji": {
"name": "@remotion/animated-emoji",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"remotion": "workspace:*",
},
@@ -38,7 +38,7 @@
},
"packages/animation-utils": {
"name": "@remotion/animation-utils",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"remotion": "workspace:*",
},
@@ -53,7 +53,7 @@
},
"packages/astro-example": {
"name": "@remotion/astro-example",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@astrojs/react": "4.0.0",
"@remotion/gif": "workspace:*",
@@ -72,7 +72,7 @@
},
"packages/babel-loader": {
"name": "@remotion/babel-loader",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@babel/core": "7.23.2",
"@babel/plugin-proposal-class-properties": "7.14.5",
@@ -95,7 +95,7 @@
},
"packages/bundler": {
"name": "@remotion/bundler",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@remotion/media-parser": "workspace:*",
"@remotion/studio": "workspace:*",
@@ -121,7 +121,7 @@
},
"packages/captions": {
"name": "@remotion/captions",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
"eslint": "9.19.0",
@@ -129,7 +129,7 @@
},
"packages/cli": {
"name": "@remotion/cli",
- "version": "4.0.358",
+ "version": "4.0.359",
"bin": {
"remotion": "remotion-cli.js",
"remotionb": "remotionb-cli.js",
@@ -170,7 +170,7 @@
},
"packages/cloudrun": {
"name": "@remotion/cloudrun",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@google-cloud/artifact-registry": "3.5.1",
"@google-cloud/functions-framework": "3.4.6",
@@ -195,39 +195,39 @@
},
"packages/compositor": {
"name": "@remotion/compositor",
- "version": "4.0.358",
+ "version": "4.0.359",
},
"packages/compositor-darwin-arm64": {
"name": "@remotion/compositor-darwin-arm64",
- "version": "4.0.358",
+ "version": "4.0.359",
},
"packages/compositor-darwin-x64": {
"name": "@remotion/compositor-darwin-x64",
- "version": "4.0.358",
+ "version": "4.0.359",
},
"packages/compositor-linux-arm64-gnu": {
"name": "@remotion/compositor-linux-arm64-gnu",
- "version": "4.0.358",
+ "version": "4.0.359",
},
"packages/compositor-linux-arm64-musl": {
"name": "@remotion/compositor-linux-arm64-musl",
- "version": "4.0.358",
+ "version": "4.0.359",
},
"packages/compositor-linux-x64-gnu": {
"name": "@remotion/compositor-linux-x64-gnu",
- "version": "4.0.358",
+ "version": "4.0.359",
},
"packages/compositor-linux-x64-musl": {
"name": "@remotion/compositor-linux-x64-musl",
- "version": "4.0.358",
+ "version": "4.0.359",
},
"packages/compositor-win32-x64-msvc": {
"name": "@remotion/compositor-win32-x64-msvc",
- "version": "4.0.358",
+ "version": "4.0.359",
},
"packages/convert": {
"name": "@remotion/convert",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@radix-ui/react-checkbox": "^1.1.2",
"@radix-ui/react-dialog": "^1.1.0",
@@ -270,7 +270,7 @@
},
"packages/core": {
"name": "remotion",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"@happy-dom/global-registrator": "14.5.1",
"@remotion/eslint-config-internal": "workspace:*",
@@ -291,7 +291,7 @@
},
"packages/create-video": {
"name": "create-video",
- "version": "4.0.358",
+ "version": "4.0.359",
"bin": {
"create-video": "bin.js",
},
@@ -313,11 +313,11 @@
},
"packages/discord-poster": {
"name": "@remotion/discord-poster",
- "version": "4.0.358",
+ "version": "4.0.359",
},
"packages/docs": {
"name": "docs",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@algora/sdk": "^0.1.2",
"@aws-sdk/s3-request-presigner": "3.787.0",
@@ -416,7 +416,7 @@
},
"packages/docusaurus-plugin": {
"name": "@remotion/docusaurus-plugin",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@docusaurus/types": "3.6.0",
"@types/dom-webcodecs": "0.1.11",
@@ -434,7 +434,7 @@
},
"packages/enable-scss": {
"name": "@remotion/enable-scss",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"css-loader": "5.2.7",
"sass-loader": "14.2.1",
@@ -451,7 +451,7 @@
},
"packages/eslint-config": {
"name": "@remotion/eslint-config",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
"@remotion/eslint-plugin": "workspace:*",
@@ -467,7 +467,7 @@
},
"packages/eslint-config-flat": {
"name": "@remotion/eslint-config-flat",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"typescript-eslint": "8.21.0",
},
@@ -485,7 +485,7 @@
},
"packages/eslint-config-internal": {
"name": "@remotion/eslint-config-internal",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@eslint/compat": "1.2.2",
"@eslint/eslintrc": "3.1.0",
@@ -503,7 +503,7 @@
},
"packages/eslint-plugin": {
"name": "@remotion/eslint-plugin",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@typescript-eslint/utils": "5.19.0",
},
@@ -517,7 +517,7 @@
},
"packages/example": {
"name": "@remotion/example",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@mdx-js/loader": "^2.3.0",
"@mdx-js/react": "^2.3.0",
@@ -598,7 +598,7 @@
},
"packages/example-videos": {
"name": "@remotion/example-videos",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
"dotenv": "9.0.2",
@@ -607,7 +607,7 @@
},
"packages/example-without-zod": {
"name": "@remotion/example-without-zod",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@remotion/cli": "workspace:*",
"react": "19.0.0",
@@ -617,7 +617,7 @@
},
"packages/fonts": {
"name": "@remotion/fonts",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"remotion": "workspace:*",
},
@@ -628,7 +628,7 @@
},
"packages/gif": {
"name": "@remotion/gif",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"remotion": "workspace:*",
},
@@ -647,7 +647,7 @@
},
"packages/google-fonts": {
"name": "@remotion/google-fonts",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"remotion": "workspace:*",
},
@@ -660,7 +660,7 @@
},
"packages/install-whisper-cpp": {
"name": "@remotion/install-whisper-cpp",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@remotion/captions": "workspace:*",
},
@@ -671,7 +671,7 @@
},
"packages/it-tests": {
"name": "@remotion/it-tests",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"@remotion/bundler": "workspace:*",
"@remotion/captions": "workspace:*",
@@ -713,7 +713,7 @@
},
"packages/lambda": {
"name": "@remotion/lambda",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@aws-sdk/client-cloudwatch-logs": "3.787.0",
"@aws-sdk/client-iam": "3.787.0",
@@ -756,7 +756,7 @@
},
"packages/lambda-client": {
"name": "@remotion/lambda-client",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@aws-sdk/client-cloudwatch-logs": "3.787.0",
"@aws-sdk/client-iam": "3.787.0",
@@ -781,25 +781,25 @@
},
"packages/lambda-go": {
"name": "@remotion/lambda-go",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"remotion": "workspace:*",
},
},
"packages/lambda-go-example": {
"name": "@remotion/lambda-go-example",
- "version": "4.0.358",
+ "version": "4.0.359",
},
"packages/lambda-php": {
"name": "@remotion/lambda-php",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"remotion": "workspace:*",
},
},
"packages/lambda-python": {
"name": "@remotion/lambda-python",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"dotenv": "9.0.2",
},
@@ -809,14 +809,14 @@
},
"packages/lambda-ruby": {
"name": "@remotion/lambda-ruby",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"remotion": "workspace:*",
},
},
"packages/layout-utils": {
"name": "@remotion/layout-utils",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
"eslint": "9.19.0",
@@ -824,7 +824,7 @@
},
"packages/licensing": {
"name": "@remotion/licensing",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
"eslint": "9.19.0",
@@ -832,7 +832,7 @@
},
"packages/lottie": {
"name": "@remotion/lottie",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"remotion": "workspace:*",
},
@@ -851,7 +851,7 @@
},
"packages/mcp": {
"name": "@remotion/mcp",
- "version": "4.0.358",
+ "version": "4.0.359",
"bin": {
"remotion-mcp": "./dist/esm/index.mjs",
},
@@ -867,7 +867,7 @@
},
"packages/media": {
"name": "@remotion/media",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"mediabunny": "1.23.0",
"remotion": "workspace:*",
@@ -888,7 +888,7 @@
},
"packages/media-parser": {
"name": "@remotion/media-parser",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
"@remotion/example-videos": "workspace:*",
@@ -900,7 +900,7 @@
},
"packages/media-utils": {
"name": "@remotion/media-utils",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"remotion": "workspace:*",
},
@@ -915,7 +915,7 @@
},
"packages/motion-blur": {
"name": "@remotion/motion-blur",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"remotion": "workspace:*",
},
@@ -933,7 +933,7 @@
},
"packages/noise": {
"name": "@remotion/noise",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"remotion": "workspace:*",
"simplex-noise": "4.0.1",
@@ -945,7 +945,7 @@
},
"packages/openai-whisper": {
"name": "@remotion/openai-whisper",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@remotion/captions": "workspace:*",
},
@@ -957,7 +957,7 @@
},
"packages/paths": {
"name": "@remotion/paths",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
"eslint": "9.19.0",
@@ -965,7 +965,7 @@
},
"packages/player": {
"name": "@remotion/player",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"remotion": "workspace:*",
},
@@ -987,7 +987,7 @@
},
"packages/player-example": {
"name": "@remotion/player-example",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@remotion/bundler": "workspace:*",
"@remotion/eslint-config-flat": "workspace:*",
@@ -1006,7 +1006,7 @@
},
"packages/preload": {
"name": "@remotion/preload",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
"eslint": "9.19.0",
@@ -1014,7 +1014,7 @@
},
"packages/promo-pages": {
"name": "@remotion/promo-pages",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@remotion/animated-emoji": "workspace:*",
"@remotion/lambda": "workspace:*",
@@ -1049,7 +1049,7 @@
},
"packages/renderer": {
"name": "@remotion/renderer",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@remotion/streaming": "workspace:*",
"execa": "5.1.1",
@@ -1086,7 +1086,7 @@
},
"packages/rive": {
"name": "@remotion/rive",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@rive-app/canvas-advanced": "2.31.5",
"remotion": "workspace:*",
@@ -1102,9 +1102,21 @@
"react-dom": ">=18.2.0",
},
},
+ "packages/rounded-text-box": {
+ "name": "@remotion/rounded-text-box",
+ "version": "4.0.359",
+ "dependencies": {
+ "@remotion/layout-utils": "workspace:*",
+ "@remotion/paths": "workspace:*",
+ },
+ "devDependencies": {
+ "@remotion/eslint-config-internal": "workspace:*",
+ "eslint": "9.19.0",
+ },
+ },
"packages/serverless": {
"name": "@remotion/serverless",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@remotion/bundler": "workspace:*",
"@remotion/licensing": "workspace:*",
@@ -1118,7 +1130,7 @@
},
"packages/serverless-client": {
"name": "@remotion/serverless-client",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
"@remotion/renderer": "workspace:*",
@@ -1129,7 +1141,7 @@
},
"packages/shapes": {
"name": "@remotion/shapes",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@remotion/paths": "workspace:*",
},
@@ -1148,7 +1160,7 @@
},
"packages/skia": {
"name": "@remotion/skia",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"remotion": "workspace:*",
},
@@ -1171,7 +1183,7 @@
},
"packages/streaming": {
"name": "@remotion/streaming",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
"eslint": "9.19.0",
@@ -1179,7 +1191,7 @@
},
"packages/studio": {
"name": "@remotion/studio",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@remotion/media-parser": "workspace:*",
"@remotion/media-utils": "workspace:*",
@@ -1210,7 +1222,7 @@
},
"packages/studio-server": {
"name": "@remotion/studio-server",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@babel/parser": "7.24.1",
"@remotion/bundler": "workspace:*",
@@ -1235,7 +1247,7 @@
},
"packages/studio-shared": {
"name": "@remotion/studio-shared",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"remotion": "workspace:*",
},
@@ -1247,7 +1259,7 @@
},
"packages/svg-3d-engine": {
"name": "@remotion/svg-3d-engine",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@remotion/paths": "workspace:*",
},
@@ -1258,7 +1270,7 @@
},
"packages/tailwind": {
"name": "@remotion/tailwind",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"autoprefixer": "10.4.20",
"css-loader": "5.2.7",
@@ -1280,7 +1292,7 @@
},
"packages/tailwind-v4": {
"name": "@remotion/tailwind-v4",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@tailwindcss/postcss": "4.1.1",
"css-loader": "5.2.7",
@@ -1866,7 +1878,7 @@
},
"packages/test-utils": {
"name": "@remotion/test-utils",
- "version": "4.0.358",
+ "version": "4.0.359",
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
"eslint": "9.19.0",
@@ -1877,7 +1889,7 @@
},
"packages/three": {
"name": "@remotion/three",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"remotion": "workspace:*",
},
@@ -1903,7 +1915,7 @@
},
"packages/transitions": {
"name": "@remotion/transitions",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@remotion/paths": "workspace:*",
"@remotion/shapes": "workspace:*",
@@ -1926,7 +1938,7 @@
},
"packages/web-renderer": {
"name": "@remotion/web-renderer",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"remotion": "workspace:*",
},
@@ -1943,7 +1955,7 @@
},
"packages/webcodecs": {
"name": "@remotion/webcodecs",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@remotion/licensing": "workspace:*",
"@remotion/media-parser": "workspace:*",
@@ -1960,7 +1972,7 @@
},
"packages/whisper-web": {
"name": "@remotion/whisper-web",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"@remotion/captions": "workspace:*",
},
@@ -1971,7 +1983,7 @@
},
"packages/zod-types": {
"name": "@remotion/zod-types",
- "version": "4.0.358",
+ "version": "4.0.359",
"dependencies": {
"remotion": "workspace:*",
},
@@ -3217,6 +3229,8 @@
"@remotion/rive": ["@remotion/rive@workspace:packages/rive"],
+ "@remotion/rounded-text-box": ["@remotion/rounded-text-box@workspace:packages/rounded-text-box"],
+
"@remotion/serverless": ["@remotion/serverless@workspace:packages/serverless"],
"@remotion/serverless-client": ["@remotion/serverless-client@workspace:packages/serverless-client"],
@@ -4135,7 +4149,7 @@
"bun": ["[email protected]", "", { "optionalDependencies": { "@oven/bun-darwin-aarch64": "1.3.0", "@oven/bun-darwin-x64": "1.3.0", "@oven/bun-darwin-x64-baseline": "1.3.0", "@oven/bun-linux-aarch64": "1.3.0", "@oven/bun-linux-aarch64-musl": "1.3.0", "@oven/bun-linux-x64": "1.3.0", "@oven/bun-linux-x64-baseline": "1.3.0", "@oven/bun-linux-x64-musl": "1.3.0", "@oven/bun-linux-x64-musl-baseline": "1.3.0", "@oven/bun-windows-x64": "1.3.0", "@oven/bun-windows-x64-baseline": "1.3.0" }, "os": [ "linux", "win32", "darwin", ], "cpu": [ "x64", "arm64", ], "bin": { "bun": "bin/bun.exe", "bunx": "bin/bunx.exe" } }, "sha512-YI7mFs7iWc/VsGsh2aw6eAPD2cjzn1j+LKdYVk09x1CrdTWKYIHyd+dG5iQoN9//3hCDoZj8U6vKpZzEf5UARA=="],
- "bun-plugin-tailwind": ["[email protected]", "", { "dependencies": { "tailwindcss": "4.0.0-beta.9" }, "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-rTbzx+pK3F3cqgbtfbYibfWfKSWdcMNjdPTHgm+BbPhZWzMkBR6NpGqmKExJuIvdKRZgqoA0vd2/lke6rwZqMA=="],
+ "bun-plugin-tailwind": ["[email protected]", "", { "peerDependencies": { "typescript": "5.8.2" } }, "sha512-qtAXMNGG4R0UGGI8zWrqm2B7BdXqx48vunJXBPzfDOHPA5WkRUZdTSbE7TFwO4jLhYqSE23YMWsM9NhE6ovobw=="],
"bun-types": ["[email protected]", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-u8X0thhx+yJ0KmkxuEo9HAtdfgCBaM/aI9K90VQcQioAmkVp3SG3FkwWGibUFz3WdXAdcsqOcbU40lK7tbHdkQ=="],
@@ -7705,8 +7719,6 @@
"@remotion/media/vitest": ["[email protected]", "", { "dependencies": { "@types/chai": "5.2.2", "@vitest/expect": "3.2.4", "@vitest/mocker": "3.2.4", "@vitest/pretty-format": "3.2.4", "@vitest/runner": "3.2.4", "@vitest/snapshot": "3.2.4", "@vitest/spy": "3.2.4", "@vitest/utils": "3.2.4", "chai": "5.3.3", "debug": "4.4.1", "expect-type": "1.2.2", "magic-string": "0.30.17", "pathe": "2.0.3", "picomatch": "4.0.2", "std-env": "3.9.0", "tinybench": "2.9.0", "tinyexec": "0.3.2", "tinyglobby": "0.2.14", "tinypool": "1.1.1", "tinyrainbow": "2.0.0", "vite": "5.4.20", "vite-node": "3.2.4", "why-is-node-running": "2.3.0" }, "peerDependencies": { "@vitest/browser": "3.2.4" }, "optionalPeers": ["@vitest/browser"], "bin": { "vitest": "vitest.mjs" } }, "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A=="],
- "@remotion/promo-pages/bun-plugin-tailwind": ["[email protected]", "", { "peerDependencies": { "typescript": "5.8.2" } }, "sha512-qtAXMNGG4R0UGGI8zWrqm2B7BdXqx48vunJXBPzfDOHPA5WkRUZdTSbE7TFwO4jLhYqSE23YMWsM9NhE6ovobw=="],
-
"@remotion/promo-pages/hls.js": ["[email protected]", "", {}, "sha512-C020dKWEJcyvLnrqsFKW4q6D/6IEzKWdhktIS5bgoyEFE8lHgrFBq4RIngdy113abJOlIruhv8qjg7UX8hwxOw=="],
"@remotion/promo-pages/tailwindcss": ["[email protected]", "", {}, "sha512-QNbdmeS979Efzim2g/bEvfuh+fTcIdp1y7gA+sb6OYSW74rt7Cr7M78AKdf6HqWT3d5AiTb7SwTT3sLQxr4/qw=="],
@@ -7997,8 +8009,6 @@
"browserify-zlib/pako": ["[email protected]", "", {}, "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA=="],
- "bun-plugin-tailwind/tailwindcss": ["[email protected]", "", {}, "sha512-96KpsfQi+/sFIOfyFnGzyy5pobuzf1iMBD9NVtelerPM/lPI2XUS4Kikw9yuKRniXXw77ov1sl7gCSKLsn6CJA=="],
-
"cacache/fs-minipass": ["[email protected]", "", { "dependencies": { "minipass": "7.1.2" } }, "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw=="],
"cacache/lru-cache": ["[email protected]", "", {}, "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA=="],
diff --git a/packages/STATS.md b/packages/STATS.md
index 40549c9137..455c177794 100644
--- a/packages/STATS.md
+++ b/packages/STATS.md
@@ -42,6 +42,7 @@ Monthly downloads of Remotion packages
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/preload.svg?style=flat&color=black&label=@remotion/preload)](https://npmcharts.com/compare/@remotion/preload?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/renderer.svg?style=flat&color=black&label=@remotion/renderer)](https://npmcharts.com/compare/@remotion/renderer?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/rive.svg?style=flat&color=black&label=@remotion/rive)](https://npmcharts.com/compare/@remotion/rive?minimal=true)
+[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/rounded-text-box.svg?style=flat&color=black&label=@remotion/rounded-text-box)](https://npmcharts.com/compare/@remotion/rounded-text-box?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/serverless.svg?style=flat&color=black&label=@remotion/serverless)](https://npmcharts.com/compare/@remotion/serverless?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/shapes.svg?style=flat&color=black&label=@remotion/shapes)](https://npmcharts.com/compare/@remotion/shapes?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/skia.svg?style=flat&color=black&label=@remotion/skia)](https://npmcharts.com/compare/@remotion/skia?minimal=true)
diff --git a/packages/cli/src/list-of-remotion-packages.ts b/packages/cli/src/list-of-remotion-packages.ts
index e1e38c8e40..338e19e4e4 100644
--- a/packages/cli/src/list-of-remotion-packages.ts
+++ b/packages/cli/src/list-of-remotion-packages.ts
@@ -42,6 +42,7 @@ export const listOfRemotionPackages = [
'@remotion/lambda',
'@remotion/lambda-client',
'@remotion/layout-utils',
+ '@remotion/rounded-text-box',
'@remotion/licensing',
'@remotion/lottie',
'@remotion/mcp',
diff --git a/packages/create-video/src/list-of-remotion-packages.ts b/packages/create-video/src/list-of-remotion-packages.ts
index e1e38c8e40..338e19e4e4 100644
--- a/packages/create-video/src/list-of-remotion-packages.ts
+++ b/packages/create-video/src/list-of-remotion-packages.ts
@@ -42,6 +42,7 @@ export const listOfRemotionPackages = [
'@remotion/lambda',
'@remotion/lambda-client',
'@remotion/layout-utils',
+ '@remotion/rounded-text-box',
'@remotion/licensing',
'@remotion/lottie',
'@remotion/mcp',
diff --git a/packages/eslint-plugin/bundle.ts b/packages/eslint-plugin/bundle.ts
index 91999f2a86..3de1ce4bf5 100644
--- a/packages/eslint-plugin/bundle.ts
+++ b/packages/eslint-plugin/bundle.ts
@@ -9,7 +9,7 @@ await buildPackage({
entrypoints: [
{
path: 'src/index.ts',
- target: 'node',
+ target: 'browser',
},
],
});
diff --git a/packages/rounded-text-box/.npmignore b/packages/rounded-text-box/.npmignore
new file mode 100644
index 0000000000..67f87e147f
--- /dev/null
+++ b/packages/rounded-text-box/.npmignore
@@ -0,0 +1,8 @@
+dist/test/**
+src
+.eslintrc
+tsconfig.tsbuildinfo
+*.tgz
+.turbo
+tsconfig.json
+.prettierrc.js
diff --git a/packages/rounded-text-box/README.md b/packages/rounded-text-box/README.md
new file mode 100644
index 0000000000..7aec878fc8
--- /dev/null
+++ b/packages/rounded-text-box/README.md
@@ -0,0 +1,18 @@
+# @remotion/rounded-text-box
+
+Create a TikTok-like multiline text box SVG path with rounded corners
+
+[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/rounded-text-box.svg?style=flat&color=black&label=Downloads)](https://npmcharts.com/compare/@remotion/rounded-text-box?minimal=true)
+
+## Installation
+
+```bash
+npm install @remotion/rounded-text-box --save-exact
+```
+
+When installing a Remotion package, make sure to align the version of all `remotion` and `@remotion/*` packages to the same version.
+Remove the `^` character from the version number to use the exact version.
+
+## Usage
+
+See the [documentation](https://www.remotion.dev/docs/rounded-text-box) for more information.
diff --git a/packages/rounded-text-box/bundle.ts b/packages/rounded-text-box/bundle.ts
new file mode 100644
index 0000000000..e70582dbb4
--- /dev/null
+++ b/packages/rounded-text-box/bundle.ts
@@ -0,0 +1,15 @@
+import {buildPackage} from '../.monorepo/builder';
+
+await buildPackage({
+ formats: {
+ cjs: 'build',
+ esm: 'build',
+ },
+ external: ['@remotion/layout-utils', '@remotion/paths'],
+ entrypoints: [
+ {
+ path: 'src/index.ts',
+ target: 'node',
+ },
+ ],
+});
diff --git a/packages/rounded-text-box/eslint.config.mjs b/packages/rounded-text-box/eslint.config.mjs
new file mode 100644
index 0000000000..04fd4fac11
--- /dev/null
+++ b/packages/rounded-text-box/eslint.config.mjs
@@ -0,0 +1,7 @@
+import {remotionFlatConfig} from '@remotion/eslint-config-internal';
+
+const config = remotionFlatConfig({react: false});
+
+export default {
+ ...config,
+};
diff --git a/packages/rounded-text-box/package.json b/packages/rounded-text-box/package.json
new file mode 100644
index 0000000000..bf21bf1542
--- /dev/null
+++ b/packages/rounded-text-box/package.json
@@ -0,0 +1,51 @@
+{
+ "repository": {
+ "url": "https://github.com/remotion-dev/remotion/tree/main/packages/rounded-text-box"
+ },
+ "name": "@remotion/rounded-text-box",
+ "version": "4.0.359",
+ "description": "Create a TikTok-like multiline text box SVG path with rounded corners",
+ "main": "dist/cjs/index.js",
+ "types": "dist/cjs/index.d.ts",
+ "module": "dist/esm/index.mjs",
+ "sideEffects": false,
+ "scripts": {
+ "formatting": "prettier --experimental-cli src --check",
+ "lint": "eslint src",
+ "make": "tsc -d && bun --env-file=../.env.bundle bundle.ts"
+ },
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "types": "./dist/cjs/index.d.ts",
+ "require": "./dist/cjs/index.js",
+ "module": "./dist/esm/index.mjs",
+ "import": "./dist/esm/index.mjs"
+ }
+ },
+ "dependencies": {
+ "@remotion/layout-utils": "workspace:*",
+ "@remotion/paths": "workspace:*"
+ },
+ "devDependencies": {
+ "@remotion/eslint-config-internal": "workspace:*",
+ "eslint": "9.19.0"
+ },
+ "author": "Jonny Burger <[email protected]>",
+ "maintainers": [
+ "Jonny Burger <[email protected]>"
+ ],
+ "contributors": [],
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/remotion-dev/remotion/issues"
+ },
+ "keywords": [
+ "remotion",
+ "svg"
+ ],
+ "publishConfig": {
+ "access": "public"
+ },
+ "homepage": "https://www.remotion.dev/docs/rounded-text-box"
+}
diff --git a/packages/rounded-text-box/src/create-rounded-text-box.ts b/packages/rounded-text-box/src/create-rounded-text-box.ts
new file mode 100644
index 0000000000..c8a5483d8f
--- /dev/null
+++ b/packages/rounded-text-box/src/create-rounded-text-box.ts
@@ -0,0 +1,260 @@
+import type {Dimensions} from '@remotion/layout-utils';
+import type {Instruction} from '@remotion/paths';
+import {
+ PathInternals,
+ reduceInstructions,
+ serializeInstructions,
+} from '@remotion/paths';
+
+const clamp = (val: number, min: number, max: number) => {
+ return Math.min(Math.max(val, min), max);
+};
+
+export type TextAlign = 'left' | 'center' | 'right';
+
+export type CreateRoundedTextBoxProps = {
+ textMeasurements: Dimensions[];
+ textAlign: TextAlign;
+ horizontalPadding: number;
+ cornerRadius: number;
+};
+
+export const createRoundedTextBox = ({
+ textMeasurements,
+ textAlign,
+ horizontalPadding,
+ cornerRadius: unclampedMaxCornerRadius,
+}: CreateRoundedTextBoxProps) => {
+ const instructions: Instruction[] = [];
+
+ let maxWidth = 0;
+ for (const cornerRounding of textMeasurements) {
+ maxWidth = Math.max(maxWidth, cornerRounding.width + horizontalPadding * 2);
+ }
+
+ let yOffset = 0;
+
+ for (let i = 0; i < textMeasurements.length; i++) {
+ const prevCornerRounding = textMeasurements[i - 1];
+ const cornerRounding = textMeasurements[i];
+ const nextCornerRounding = textMeasurements[i + 1];
+ let xOffset = 0;
+ if (textAlign === 'center') {
+ xOffset = (maxWidth - (cornerRounding.width + horizontalPadding * 2)) / 2;
+ } else if (textAlign === 'right') {
+ xOffset = maxWidth - (cornerRounding.width + horizontalPadding * 2);
+ }
+
+ const maxCornerRadius = clamp(
+ unclampedMaxCornerRadius,
+ 0,
+ cornerRounding.height / 2,
+ );
+
+ if (i === 0) {
+ instructions.push({
+ type: 'M',
+ x: xOffset + maxCornerRadius,
+ y: yOffset,
+ });
+ }
+
+ const topRightCornerRadius = clamp(
+ prevCornerRounding
+ ? textAlign === 'right'
+ ? 0
+ : textAlign === 'left'
+ ? (prevCornerRounding.width - cornerRounding.width) / 2
+ : (prevCornerRounding.width - cornerRounding.width) / 4
+ : -Infinity,
+ -maxCornerRadius,
+ maxCornerRadius,
+ );
+ // Top Right Corner
+ if (topRightCornerRadius !== 0) {
+ instructions.push({
+ type: 'L',
+ x:
+ xOffset +
+ cornerRounding.width +
+ horizontalPadding * 2 +
+ topRightCornerRadius,
+ y: yOffset,
+ });
+ // Arc for rounded corner (top right)
+ instructions.push({
+ type: 'A',
+ rx: Math.abs(topRightCornerRadius),
+ ry: Math.abs(topRightCornerRadius),
+ xAxisRotation: 0,
+ largeArcFlag: false,
+ sweepFlag: topRightCornerRadius < 0,
+ x: xOffset + cornerRounding.width + horizontalPadding * 2,
+ y: yOffset + Math.abs(topRightCornerRadius),
+ });
+ } else {
+ instructions.push({
+ type: 'L',
+ x: xOffset + cornerRounding.width + horizontalPadding * 2,
+ y: yOffset,
+ });
+ }
+
+ const bottomRightCornerRadius = clamp(
+ nextCornerRounding
+ ? textAlign === 'right'
+ ? 0
+ : textAlign === 'left'
+ ? (nextCornerRounding.width - cornerRounding.width) / 2
+ : (nextCornerRounding.width - cornerRounding.width) / 4
+ : -Infinity,
+ -maxCornerRadius,
+ maxCornerRadius,
+ );
+
+ // Bottom Right Corner
+ if (bottomRightCornerRadius !== 0) {
+ instructions.push({
+ type: 'L',
+ x: xOffset + cornerRounding.width + horizontalPadding * 2,
+ y: yOffset + cornerRounding.height - Math.abs(bottomRightCornerRadius),
+ });
+ // Arc for rounded corner (bottom right)
+ instructions.push({
+ type: 'A',
+ rx: Math.abs(bottomRightCornerRadius),
+ ry: Math.abs(bottomRightCornerRadius),
+ xAxisRotation: 0,
+ largeArcFlag: false,
+ sweepFlag: bottomRightCornerRadius < 0,
+ x:
+ xOffset +
+ cornerRounding.width +
+ horizontalPadding * 2 +
+ bottomRightCornerRadius,
+ y: yOffset + cornerRounding.height,
+ });
+ } else {
+ instructions.push({
+ type: 'L',
+ x: xOffset + cornerRounding.width + horizontalPadding * 2,
+ y: yOffset + cornerRounding.height,
+ });
+ }
+
+ yOffset += cornerRounding.height;
+ }
+
+ for (let i = textMeasurements.length - 1; i >= 0; i--) {
+ const cornerRounding = textMeasurements[i];
+ const prevCornerRounding = textMeasurements[i + 1];
+ const nextCornerRounding = textMeasurements[i - 1];
+ let xOffset = 0;
+ if (textAlign === 'center') {
+ xOffset = (maxWidth - (cornerRounding.width + horizontalPadding * 2)) / 2;
+ } else if (textAlign === 'right') {
+ xOffset = maxWidth - (cornerRounding.width + horizontalPadding * 2);
+ }
+
+ const bottomLeftWidthDifference = prevCornerRounding
+ ? prevCornerRounding.width - cornerRounding.width
+ : -Infinity;
+
+ const maxCornerRadius = clamp(
+ unclampedMaxCornerRadius,
+ 0,
+ cornerRounding.height / 2,
+ );
+
+ const bottomLeftCornerRadius = clamp(
+ prevCornerRounding
+ ? textAlign === 'left'
+ ? 0
+ : textAlign === 'right'
+ ? bottomLeftWidthDifference / 2
+ : bottomLeftWidthDifference / 4
+ : -Infinity,
+ -maxCornerRadius,
+ maxCornerRadius,
+ );
+
+ // Bottom Left Corner
+ if (bottomLeftCornerRadius !== 0) {
+ instructions.push({
+ type: 'L',
+ x: xOffset - bottomLeftCornerRadius,
+ y: yOffset,
+ });
+ // Arc for rounded corner (bottom left)
+ instructions.push({
+ type: 'A',
+ rx: Math.abs(bottomLeftCornerRadius),
+ ry: Math.abs(bottomLeftCornerRadius),
+ xAxisRotation: 0,
+ largeArcFlag: false,
+ sweepFlag: bottomLeftCornerRadius < 0,
+ x: xOffset,
+ y: yOffset - Math.abs(bottomLeftCornerRadius),
+ });
+ } else {
+ instructions.push({
+ type: 'L',
+ x: xOffset,
+ y: yOffset,
+ });
+ }
+
+ const topLeftWidthDifference = nextCornerRounding
+ ? nextCornerRounding.width - cornerRounding.width
+ : -Infinity;
+ const topLeftCornerRadius = clamp(
+ nextCornerRounding
+ ? textAlign === 'left'
+ ? 0
+ : textAlign === 'right'
+ ? topLeftWidthDifference / 2
+ : topLeftWidthDifference / 4
+ : -Infinity,
+ -maxCornerRadius,
+ maxCornerRadius,
+ );
+
+ // Top Left Corner
+ if (topLeftCornerRadius !== 0) {
+ instructions.push({
+ type: 'L',
+ x: xOffset,
+ y: yOffset - cornerRounding.height + Math.abs(topLeftCornerRadius),
+ });
+ // Arc for rounded corner (top left)
+ instructions.push({
+ type: 'A',
+ rx: Math.abs(topLeftCornerRadius),
+ ry: Math.abs(topLeftCornerRadius),
+ xAxisRotation: 0,
+ largeArcFlag: false,
+ sweepFlag: topLeftCornerRadius < 0,
+ x: xOffset - topLeftCornerRadius,
+ y: yOffset - cornerRounding.height,
+ });
+ } else {
+ instructions.push({
+ type: 'L',
+ x: xOffset,
+ y: yOffset - cornerRounding.height,
+ });
+ }
+
+ yOffset -= cornerRounding.height;
+ }
+
+ instructions.push({
+ type: 'Z',
+ });
+
+ const reduced = reduceInstructions(instructions);
+
+ PathInternals.getBoundingBoxFromInstructions(reduced);
+
+ return serializeInstructions(reduced);
+};
diff --git a/packages/rounded-text-box/src/index.ts b/packages/rounded-text-box/src/index.ts
new file mode 100644
index 0000000000..867f1dc3df
--- /dev/null
+++ b/packages/rounded-text-box/src/index.ts
@@ -0,0 +1,5 @@
+export {
+ createRoundedTextBox,
+ type CreateRoundedTextBoxProps,
+ type TextAlign,
+} from './create-rounded-text-box';
diff --git a/packages/rounded-text-box/tsconfig.json b/packages/rounded-text-box/tsconfig.json
new file mode 100644
index 0000000000..fe046539de
--- /dev/null
+++ b/packages/rounded-text-box/tsconfig.json
@@ -0,0 +1,14 @@
+{
+ "extends": "../tsconfig.settings.json",
+ "compilerOptions": {
+ "rootDir": "src",
+ "outDir": "dist/cjs",
+ "skipLibCheck": true
+ },
+ "include": ["src"],
+ "references": [
+ {
+ "path": "../core"
+ }
+ ]
+}
diff --git a/packages/studio-shared/src/package-info.ts b/packages/studio-shared/src/package-info.ts
index e9e2b7fc39..ac2371d722 100644
--- a/packages/studio-shared/src/package-info.ts
+++ b/packages/studio-shared/src/package-info.ts
@@ -41,6 +41,7 @@ export const packages = [
'lambda',
'lambda-client',
'layout-utils',
+ 'rounded-text-box',
'licensing',
'lottie',
'mcp',
@@ -100,6 +101,8 @@ export const descriptions: {[key in Pkgs]: string | null} = {
lottie: 'Include Lottie animations in Remotion',
licensing: 'Manage your Remotion.pro license',
'layout-utils': 'Utilities for working with layouts',
+ 'rounded-text-box':
+ 'Create a TikTok-like multiline text box SVG path with rounded corners',
noise: 'Noise generation functions',
'motion-blur': 'Motion blur effect for Remotion',
preload: 'Preloads assets for use in Remotion',
@@ -213,6 +216,7 @@ export const installableMap: {[key in Pkgs]: boolean} = {
lambda: true,
mcp: true,
'layout-utils': true,
+ 'rounded-text-box': true,
licensing: true,
lottie: true,
'media-utils': true,
@@ -267,6 +271,7 @@ export const apiDocs: {[key in Pkgs]: string | null} = {
lottie: 'https://www.remotion.dev/docs/lottie',
licensing: 'https://www.remotion.dev/docs/licensing',
'layout-utils': 'https://www.remotion.dev/docs/layout-utils',
+ 'rounded-text-box': 'https://www.remotion.dev/docs/rounded-text-box',
noise: 'https://www.remotion.dev/docs/noise',
mcp: 'https://www.remotion.dev/docs/ai/mcp',
'motion-blur': 'https://www.remotion.dev/docs/motion-blur',