🎥 Make videos programmatically with React
ok
JonnyBurgercad132cfd02e
diff --git a/packages/STATS.md b/packages/STATS.mdindex a3134f5f93..38ab007bce 100644--- a/packages/STATS.md+++ b/packages/STATS.md@@ -18,6 +18,7 @@ Monthly downloads of Remotion packages[](https://npmcharts.com/compare/remotion?minimal=true)[](https://npmcharts.com/compare/create-video?minimal=true)[](https://npmcharts.com/compare/@remotion/design?minimal=true)+[](https://npmcharts.com/compare/@remotion/effects?minimal=true)[](https://npmcharts.com/compare/@remotion/elevenlabs?minimal=true)[](https://npmcharts.com/compare/@remotion/enable-scss?minimal=true)[](https://npmcharts.com/compare/@remotion/eslint-config?minimal=true)diff --git a/packages/cli/src/list-of-remotion-packages.ts b/packages/cli/src/list-of-remotion-packages.tsindex d38a2c2d1d..f48335388a 100644--- a/packages/cli/src/list-of-remotion-packages.ts+++ b/packages/cli/src/list-of-remotion-packages.ts@@ -91,4 +91,5 @@ export const listOfRemotionPackages = ['@remotion/starburst','@remotion/vercel','@remotion/sfx',+ '@remotion/effects',];diff --git a/packages/create-video/src/list-of-remotion-packages.ts b/packages/create-video/src/list-of-remotion-packages.tsindex d38a2c2d1d..f48335388a 100644--- a/packages/create-video/src/list-of-remotion-packages.ts+++ b/packages/create-video/src/list-of-remotion-packages.ts@@ -91,4 +91,5 @@ export const listOfRemotionPackages = ['@remotion/starburst','@remotion/vercel','@remotion/sfx',+ '@remotion/effects',];diff --git a/packages/effects/README.md b/packages/effects/README.mdindex c95846fa4f..bde0e261d6 100644--- a/packages/effects/README.md+++ b/packages/effects/README.md@@ -1,13 +1,7 @@# @remotion/effects-**Experimental and undocumented.** Presets for Remotion's canvas effect hooks; behavior and exports may change in any release.+Experimental presets for Remotion canvas effect hooks-The package is published on npm (`publishConfig.access: public`) for early adopters. There is no stable documentation page; refer to the source under [`packages/effects`](https://github.com/remotion-dev/remotion/tree/main/packages/effects) in the Remotion repo.+## Usage-## Installation--```bash-npm install @remotion/effects --save-exact-```--Align the version of `remotion` and all `@remotion/*` packages to the same release (pin exact versions in `package.json`).+This is an internal package and has no documentation.diff --git a/packages/effects/bundle.ts b/packages/effects/bundle.tsindex dbcb9970e2..f7b114c5c3 100644--- a/packages/effects/bundle.ts+++ b/packages/effects/bundle.ts@@ -1,18 +1,34 @@+import path from 'path';import {build} from 'bun';if (process.env.NODE_ENV !== 'production') {throw new Error('This script must be run using NODE_ENV=production');}+console.time('Generated.');const output = await build({entrypoints: ['src/index.ts'],naming: '[name].mjs',- external: ['react/jsx-runtime', 'react', 'react-dom', 'remotion'],+ external: [+ 'remotion',+ 'remotion/no-react',+ 'react',+ 'react/jsx-runtime',+ 'react/jsx-dev-runtime',+ 'react-dom',+ ],});-const [file] = output.outputs;-const text = await file.text();+if (!output.success) {+ console.log(output.logs.join('\n'));+ process.exit(1);+}++for (const file of output.outputs) {+ const str = await file.text();+ const out = path.join('dist', 'esm', file.path);-await Bun.write('dist/esm/index.mjs', text);+ await Bun.write(out, str);+}-export {};+console.timeEnd('Generated.');diff --git a/packages/effects/eslint.config.mjs b/packages/effects/eslint.config.mjsindex ab29acaba0..04fd4fac11 100644--- a/packages/effects/eslint.config.mjs+++ b/packages/effects/eslint.config.mjs@@ -1,6 +1,6 @@import {remotionFlatConfig} from '@remotion/eslint-config-internal';-const config = remotionFlatConfig({react: true});+const config = remotionFlatConfig({react: false});export default {...config,diff --git a/packages/effects/package.json b/packages/effects/package.jsonindex 49eb24b3bc..737019b6c8 100644--- a/packages/effects/package.json+++ b/packages/effects/package.json@@ -1,54 +1,51 @@{+ "name": "@remotion/effects",+ "version": "4.0.454",+ "description": "Experimental presets for Remotion canvas effect hooks",+ "main": "dist/index.js",+ "types": "dist/index.d.ts",+ "module": "dist/esm/index.mjs","repository": {"url": "https://github.com/remotion-dev/remotion/tree/main/packages/effects"},- "name": "@remotion/effects",- "version": "4.0.451",- "private": false,- "description": "Experimental, undocumented presets for Remotion's canvas effect hooks; APIs may change without notice.",- "main": "dist/index.js","sideEffects": false,+ "type": "module","scripts": {"formatting": "oxfmt src --check","format": "oxfmt src","lint": "eslint src",- "make": "tsgo -d && bun --env-file=../.env.bundle bundle.ts"+ "watch": "tsgo -w",+ "make": "tsgo && bun --env-file=../.env.bundle bundle.ts"},- "types": "dist/index.d.ts",- "module": "dist/esm/index.mjs","author": "Jonny Burger <[email protected]>",+ "contributors": [],"license": "UNLICENSED","bugs": {"url": "https://github.com/remotion-dev/remotion/issues"},+ "dependencies": {+ "remotion": "workspace:*"+ },"exports": {- "./package.json": "./package.json",".": {"types": "./dist/index.d.ts","module": "./dist/esm/index.mjs",- "import": "./dist/esm/index.mjs",- "require": "./dist/index.js"- }+ "import": "./dist/esm/index.mjs"+ },+ "./package.json": "./package.json"},"devDependencies": {- "react": "catalog:","@remotion/eslint-config-internal": "workspace:*","eslint": "catalog:","@typescript/native-preview": "catalog:"},"keywords": [- "canvas",+ "remotion","effects",- "experimental","webgl",- "remotion"+ "canvas"],"publishConfig": {"access": "public"- },- "peerDependencies": {- "react": ">=16.8.0",- "remotion": "workspace:*"- },- "dependencies": {}+ }}diff --git a/packages/effects/tsconfig.json b/packages/effects/tsconfig.jsonindex 949f1fdbf5..143a0d2e89 100644--- a/packages/effects/tsconfig.json+++ b/packages/effects/tsconfig.json@@ -1,13 +1,15 @@{"extends": "../tsconfig.settings.json","compilerOptions": {- "rootDir": "./src",- "outDir": "./dist"+ "rootDir": "src",+ "outDir": "dist",+ "skipLibCheck": true,+ "target": "ES2022",+ "module": "es2020",+ "moduleResolution": "bundler",+ "declaration": true,+ "emitDeclarationOnly": true},"include": ["src"],- "references": [- {- "path": "../core"- }- ]+ "references": [{"path": "../core"}]}diff --git a/packages/studio-shared/src/package-info.ts b/packages/studio-shared/src/package-info.tsindex 7670ea3ddf..9a16f23de5 100644--- a/packages/studio-shared/src/package-info.ts+++ b/packages/studio-shared/src/package-info.ts@@ -90,6 +90,7 @@ export const packages = ['starburst','vercel','sfx',+ 'effects',] as const;export type Pkgs = (typeof packages)[number];@@ -220,6 +221,7 @@ export const descriptions: {[key in Pkgs]: string | null} = {starburst: 'Starburst ray effect for Remotion',vercel: 'Render Remotion videos on Vercel Sandbox',sfx: 'Sound effect library',+ effects: 'Experimental presets for Remotion canvas effect hooks',};export const installableMap: {[key in Pkgs]: boolean} = {'svg-3d-engine': false,@@ -313,6 +315,7 @@ export const installableMap: {[key in Pkgs]: boolean} = {starburst: true,vercel: true,sfx: true,+ effects: true,};export const apiDocs: {[key in Pkgs]: string | null} = {@@ -410,4 +413,5 @@ export const apiDocs: {[key in Pkgs]: string | null} = {starburst: 'https://www.remotion.dev/docs/starburst',vercel: 'https://www.remotion.dev/docs/vercel/api',sfx: 'https://www.remotion.dev/docs/sfx',+ effects: null,};