@remotion/cli 4.0.515 → 4.0.517

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ import type { StudioElementLibrary } from '@remotion/studio-shared';
2
+ export type AddElementLibraryOptions = {
3
+ readonly url: string;
4
+ readonly displayName?: string;
5
+ };
6
+ export declare const addElementLibrary: (options: AddElementLibraryOptions) => void;
7
+ export declare const getElementLibraries: () => readonly StudioElementLibrary[];
8
+ export declare const resetElementLibraries: () => void;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resetElementLibraries = exports.getElementLibraries = exports.addElementLibrary = void 0;
4
+ let elementLibraries = [];
5
+ const addElementLibrary = (options) => {
6
+ var _a;
7
+ if (typeof options !== 'object' ||
8
+ options === null ||
9
+ Array.isArray(options)) {
10
+ const receivedType = Array.isArray(options) ? 'an array' : typeof options;
11
+ throw new Error(`Config.addElementLibrary() expects an object, got ${receivedType}`);
12
+ }
13
+ const { url, displayName } = options;
14
+ if (typeof url !== 'string') {
15
+ throw new Error(`Config.addElementLibrary() expects "url" to be a string, got ${typeof url}`);
16
+ }
17
+ let parsedUrl;
18
+ try {
19
+ parsedUrl = new URL(url);
20
+ }
21
+ catch (_b) {
22
+ throw new Error(`Config.addElementLibrary() expects an absolute URL, got ${JSON.stringify(url)}`);
23
+ }
24
+ if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
25
+ throw new Error(`Config.addElementLibrary() only supports HTTP and HTTPS URLs, got ${JSON.stringify(url)}`);
26
+ }
27
+ if (displayName !== undefined && typeof displayName !== 'string') {
28
+ throw new Error(`Config.addElementLibrary() expects the display name to be a string, got ${typeof displayName}`);
29
+ }
30
+ const trimmedDisplayName = (_a = displayName === null || displayName === void 0 ? void 0 : displayName.trim()) !== null && _a !== void 0 ? _a : null;
31
+ if (trimmedDisplayName === '') {
32
+ throw new Error('Config.addElementLibrary() expects the display name to not be empty');
33
+ }
34
+ elementLibraries.push({
35
+ displayName: trimmedDisplayName,
36
+ url: parsedUrl.href,
37
+ });
38
+ };
39
+ exports.addElementLibrary = addElementLibrary;
40
+ const getElementLibraries = () => elementLibraries;
41
+ exports.getElementLibraries = getElementLibraries;
42
+ const resetElementLibraries = () => {
43
+ elementLibraries = [];
44
+ };
45
+ exports.resetElementLibraries = resetElementLibraries;
@@ -2,7 +2,8 @@ import type { BundlerOverrideFn, RspackConfiguration, RspackOverrideFn, WebpackC
2
2
  import type { BrowserExecutable, ChromeMode, CodecOrUndefined, ColorSpace, Crf, DefaultCodingAgent, DefaultEditor, DeleteAfter, FrameRange, NumberOfGifLoops, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
3
3
  import type { HardwareAccelerationOption } from '@remotion/renderer/client';
4
4
  import type { Concurrency } from './concurrency';
5
- export type { BundlerOverrideFn, Concurrency, RspackConfiguration, RspackOverrideFn, WebpackConfiguration, WebpackOverrideFn, };
5
+ import type { AddElementLibraryOptions } from './element-libraries';
6
+ export type { AddElementLibraryOptions, BundlerOverrideFn, Concurrency, RspackConfiguration, RspackOverrideFn, WebpackConfiguration, WebpackOverrideFn, };
6
7
  declare global {
7
8
  interface RemotionBundlingOptions {
8
9
  /**
@@ -380,6 +381,10 @@ declare global {
380
381
  }
381
382
  }
382
383
  type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
384
+ /**
385
+ * Add an Element library to the Remotion Studio.
386
+ */
387
+ addElementLibrary: (options: AddElementLibraryOptions) => void;
383
388
  /**
384
389
  * Set the audio codec to use for the output video.
385
390
  * See the Encoding guide in the docs for defaults and available options.
@@ -509,6 +514,7 @@ export declare const ConfigInternals: {
509
514
  getEntryPoint: () => string | null;
510
515
  getWebpackPolling: () => number | null;
511
516
  getBufferStateDelayInMilliseconds: () => number | null;
517
+ getElementLibraries: () => readonly import("@remotion/studio-shared").StudioElementLibrary[];
512
518
  getOutputCodecOrUndefined: () => CodecOrUndefined;
513
519
  resetConfigOptions: () => void;
514
520
  };
@@ -6,6 +6,7 @@ const studio_server_1 = require("@remotion/studio-server");
6
6
  const browser_1 = require("./browser");
7
7
  const buffer_state_delay_in_milliseconds_1 = require("./buffer-state-delay-in-milliseconds");
8
8
  const concurrency_1 = require("./concurrency");
9
+ const element_libraries_1 = require("./element-libraries");
9
10
  const entry_point_1 = require("./entry-point");
10
11
  const env_file_1 = require("./env-file");
11
12
  const ffmpeg_override_1 = require("./ffmpeg-override");
@@ -37,6 +38,7 @@ exports.Config = {
37
38
  get Puppeteer() {
38
39
  throw new Error('The config format has changed. Change `Config.Puppeteer.*()` calls to `Config.*()` in your config file.');
39
40
  },
41
+ addElementLibrary: element_libraries_1.addElementLibrary,
40
42
  setMaxTimelineTracks: studio_server_1.StudioServerInternals.setMaxTimelineTracks,
41
43
  setKeyboardShortcutsEnabled: keyboardShortcutsOption.setConfig,
42
44
  setInteractivityEnabled: interactivityOption.setConfig,
@@ -169,6 +171,7 @@ const resetConfigOptions = () => {
169
171
  resetBrowserSafeConfigOptions();
170
172
  studio_server_1.StudioServerInternals.resetMaxTimelineTracks();
171
173
  (0, buffer_state_delay_in_milliseconds_1.resetBufferStateDelayInMilliseconds)();
174
+ (0, element_libraries_1.resetElementLibraries)();
172
175
  (0, entry_point_1.resetEntryPoint)();
173
176
  (0, ffmpeg_override_1.resetFfmpegOverrideFunction)();
174
177
  (0, metadata_1.resetMetadata)();
@@ -201,6 +204,7 @@ exports.ConfigInternals = {
201
204
  getEntryPoint: entry_point_1.getEntryPoint,
202
205
  getWebpackPolling: webpack_poll_1.getWebpackPolling,
203
206
  getBufferStateDelayInMilliseconds: buffer_state_delay_in_milliseconds_1.getBufferStateDelayInMilliseconds,
207
+ getElementLibraries: element_libraries_1.getElementLibraries,
204
208
  getOutputCodecOrUndefined: client_1.BrowserSafeApis.getOutputCodecOrUndefined,
205
209
  resetConfigOptions,
206
210
  };
@@ -12,6 +12,7 @@ exports.listOfRemotionPackages = [
12
12
  '@remotion/brand',
13
13
  '@remotion/bundler',
14
14
  '@remotion/browser-studio',
15
+ '@remotion/canvas',
15
16
  '@remotion/claude-code-plugin',
16
17
  '@remotion/cli',
17
18
  '@remotion/cloudrun',
@@ -39,6 +40,7 @@ exports.listOfRemotionPackages = [
39
40
  '@remotion/fonts',
40
41
  '@remotion/gif',
41
42
  '@remotion/google-fonts',
43
+ '@remotion/gsap',
42
44
  '@remotion/install-whisper-cpp',
43
45
  '@remotion/it-tests',
44
46
  '@remotion/react18-tests',
package/dist/studio.js CHANGED
@@ -83,6 +83,7 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
83
83
  askAIEnabled: askAIOption.getValue({
84
84
  commandLine: parsed_cli_1.parsedCli,
85
85
  }).value,
86
+ elementLibraries: config_1.ConfigInternals.getElementLibraries(),
86
87
  interactivityEnabled: interactivityOption.getValue({
87
88
  commandLine: parsed_cli_1.parsedCli,
88
89
  }).value,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/cli"
4
4
  },
5
5
  "name": "@remotion/cli",
6
- "version": "4.0.515",
6
+ "version": "4.0.517",
7
7
  "description": "Control Remotion features using the `npx remotion` command",
8
8
  "main": "dist/index.js",
9
9
  "bin": {
@@ -37,18 +37,18 @@
37
37
  "license": "SEE LICENSE IN LICENSE.md",
38
38
  "dependencies": {
39
39
  "@babel/parser": "7.24.1",
40
- "@remotion/bundler": "4.0.515",
41
- "@remotion/media-utils": "4.0.515",
42
- "@remotion/player": "4.0.515",
43
- "@remotion/renderer": "4.0.515",
44
- "@remotion/studio-shared": "4.0.515",
45
- "@remotion/studio-server": "4.0.515",
46
- "@remotion/studio": "4.0.515",
40
+ "@remotion/bundler": "4.0.517",
41
+ "@remotion/media-utils": "4.0.517",
42
+ "@remotion/player": "4.0.517",
43
+ "@remotion/renderer": "4.0.517",
44
+ "@remotion/studio-shared": "4.0.517",
45
+ "@remotion/studio-server": "4.0.517",
46
+ "@remotion/studio": "4.0.517",
47
47
  "dotenv": "17.3.1",
48
48
  "minimist": "1.2.6",
49
49
  "prompts": "2.4.2",
50
50
  "semver": "7.5.3",
51
- "remotion": "4.0.515"
51
+ "remotion": "4.0.517"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": ">=16.8.0",
@@ -60,14 +60,14 @@
60
60
  "@types/prettier": "2.7.2",
61
61
  "@types/semver": "7.5.3",
62
62
  "@types/node": "20.12.14",
63
- "@remotion/zod-types": "4.0.515",
64
- "@remotion/tailwind-v4": "4.0.515",
65
- "@remotion/enable-scss": "4.0.515",
66
- "@remotion/skia": "4.0.515",
63
+ "@remotion/zod-types": "4.0.517",
64
+ "@remotion/tailwind-v4": "4.0.517",
65
+ "@remotion/enable-scss": "4.0.517",
66
+ "@remotion/skia": "4.0.517",
67
67
  "react": "19.2.3",
68
68
  "react-dom": "19.2.3",
69
69
  "zod": "4.4.3",
70
- "@remotion/eslint-config-internal": "4.0.515",
70
+ "@remotion/eslint-config-internal": "4.0.517",
71
71
  "eslint": "9.19.0",
72
72
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
73
73
  },
@@ -1,4 +0,0 @@
1
- export declare const getVideoImageFormat: ({ codec, uiImageFormat, }: {
2
- codec: import("@remotion/renderer").CodecOrUndefined;
3
- uiImageFormat: "jpeg" | "none" | "png" | null;
4
- }) => "jpeg" | "none" | "png";
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getVideoImageFormat = void 0;
4
- const client_1 = require("@remotion/renderer/client");
5
- const pure_1 = require("@remotion/renderer/pure");
6
- const parsed_cli_1 = require("./parsed-cli");
7
- const getVideoImageFormat = ({ codec, uiImageFormat, }) => {
8
- if (uiImageFormat !== null) {
9
- return uiImageFormat;
10
- }
11
- const configured = client_1.BrowserSafeApis.options.videoImageFormatOption.getValue({
12
- commandLine: parsed_cli_1.parsedCli,
13
- }).value;
14
- if (configured !== null) {
15
- return configured;
16
- }
17
- if (pure_1.NoReactAPIs.isAudioCodec(codec)) {
18
- return 'none';
19
- }
20
- if (codec === 'h264' ||
21
- codec === 'h264-mkv' ||
22
- codec === 'h264-ts' ||
23
- codec === 'h265' ||
24
- codec === 'av1' ||
25
- codec === 'vp8' ||
26
- codec === 'vp9' ||
27
- codec === 'prores' ||
28
- codec === 'gif') {
29
- return 'jpeg';
30
- }
31
- if (codec === undefined) {
32
- return 'png';
33
- }
34
- throw new Error('Unrecognized codec ' + codec);
35
- };
36
- exports.getVideoImageFormat = getVideoImageFormat;