@remotion/cli 4.0.0-alpha.115 → 4.0.0-alpha.130
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.
- package/dist/codemods/update-default-props.js +21 -6
- package/dist/config/image-format.d.ts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/log.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -0
- package/dist/editor/components/RenderModal/SchemaEditor/schema-serialization.d.ts +2 -0
- package/dist/editor/components/RenderModal/SchemaEditor/schema-serialization.js +21 -0
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
- package/dist/editor/components/TopPanel.js +1 -1
- package/dist/editor/helpers/colors.d.ts +1 -1
- package/dist/get-cli-options.d.ts +2 -2
- package/dist/index.d.ts +8 -8
- package/package.json +7 -7
|
@@ -47,13 +47,24 @@ const findStarter = ({ input, compositionId, }) => {
|
|
|
47
47
|
}
|
|
48
48
|
throw new Error(`Could not find composition ID ${compositionId} in file`);
|
|
49
49
|
};
|
|
50
|
+
const findEndPosition = (input, currentPosition) => {
|
|
51
|
+
const asConstVersion = input
|
|
52
|
+
.slice(currentPosition + 1)
|
|
53
|
+
.search(/as\sconst[ \t\n\r]+\}/);
|
|
54
|
+
if (asConstVersion !== -1) {
|
|
55
|
+
const nextEnd = input.indexOf('}', asConstVersion + currentPosition + 1);
|
|
56
|
+
return nextEnd - 1;
|
|
57
|
+
}
|
|
58
|
+
const next = input.indexOf('}}', currentPosition + 1);
|
|
59
|
+
if (next !== -1) {
|
|
60
|
+
return next;
|
|
61
|
+
}
|
|
62
|
+
throw new Error('Could not find end of defaultProps');
|
|
63
|
+
};
|
|
50
64
|
const findEnder = (input, position, maxPosition) => {
|
|
51
65
|
let currentPosition = position;
|
|
52
66
|
while (currentPosition < maxPosition) {
|
|
53
|
-
const next = input
|
|
54
|
-
if (next === -1) {
|
|
55
|
-
throw new Error('Could not find end of defaultProps');
|
|
56
|
-
}
|
|
67
|
+
const next = findEndPosition(input, currentPosition);
|
|
57
68
|
currentPosition = next;
|
|
58
69
|
const nextChar = input[next + 1];
|
|
59
70
|
if (nextChar === ',') {
|
|
@@ -80,10 +91,14 @@ const stringifyDefaultProps = (props) => {
|
|
|
80
91
|
if (this[key] instanceof Date) {
|
|
81
92
|
return `__REMOVEQUOTE__new Date('${new Date(this[key]).toISOString()}')__REMOVEQUOTE__`;
|
|
82
93
|
}
|
|
94
|
+
if (typeof this[key] === 'string') {
|
|
95
|
+
return `${this[key]}__ADD_AS_CONST__`;
|
|
96
|
+
}
|
|
83
97
|
return value;
|
|
84
98
|
})
|
|
85
|
-
.replace(
|
|
86
|
-
.replace(
|
|
99
|
+
.replace(/"__REMOVEQUOTE__/g, '')
|
|
100
|
+
.replace(/__REMOVEQUOTE__"/g, '')
|
|
101
|
+
.replace(/__ADD_AS_CONST__"/g, '" as const');
|
|
87
102
|
};
|
|
88
103
|
// TODO: Add more sanity checks
|
|
89
104
|
// TODO: better error messages
|
|
@@ -2,4 +2,4 @@ import type { StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
|
2
2
|
export declare const setStillImageFormat: (format: StillImageFormat) => void;
|
|
3
3
|
export declare const setVideoImageFormat: (format: VideoImageFormat) => void;
|
|
4
4
|
export declare const getUserPreferredStillImageFormat: () => "png" | "jpeg" | "pdf" | "webp" | undefined;
|
|
5
|
-
export declare const getUserPreferredVideoImageFormat: () => "
|
|
5
|
+
export declare const getUserPreferredVideoImageFormat: () => "none" | "png" | "jpeg" | undefined;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -261,7 +261,7 @@ export declare const ConfigInternals: {
|
|
|
261
261
|
getShouldOutputImageSequence: (frameRange: FrameRange | null) => boolean;
|
|
262
262
|
getDotEnvLocation: () => string | null;
|
|
263
263
|
getUserPreferredStillImageFormat: () => "png" | "jpeg" | "pdf" | "webp" | undefined;
|
|
264
|
-
getUserPreferredVideoImageFormat: () => "
|
|
264
|
+
getUserPreferredVideoImageFormat: () => "none" | "png" | "jpeg" | undefined;
|
|
265
265
|
getWebpackOverrideFn: () => WebpackOverrideFn;
|
|
266
266
|
getWebpackCaching: () => boolean;
|
|
267
267
|
getOutputLocation: () => string | null;
|
package/dist/config/log.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
-
export declare const getLogLevel: () => "
|
|
2
|
+
export declare const getLogLevel: () => "error" | "verbose" | "info" | "warn";
|
|
3
3
|
export declare const setLogLevel: (newLogLevel: LogLevel) => void;
|
|
@@ -11,6 +11,6 @@ export declare const getInputBorderColor: ({ status, isFocused, isHovered, }: {
|
|
|
11
11
|
status: 'error' | 'warning' | 'ok';
|
|
12
12
|
isFocused: boolean;
|
|
13
13
|
isHovered: boolean;
|
|
14
|
-
}) => "
|
|
14
|
+
}) => "rgba(0, 0, 0, 0.6)" | "#ff3232" | "hsla(0, 0%, 100%, 0.15)" | "rgba(255, 255, 255, 0.05)" | "#f1c40f";
|
|
15
15
|
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | "status" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
16
16
|
export {};
|
|
@@ -13,6 +13,7 @@ const SchemaLabel_1 = require("./SchemaLabel");
|
|
|
13
13
|
const container = {
|
|
14
14
|
width: '100%',
|
|
15
15
|
};
|
|
16
|
+
// TODO: Long values break the layout
|
|
16
17
|
const ZodEnumEditor = ({ schema, jsonPath, compact, setValue: updateValue, defaultValue, value, onSave, showSaveButton, onRemove, }) => {
|
|
17
18
|
const [localValue, setLocalValue] = (0, react_1.useState)(() => {
|
|
18
19
|
return {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deserializeJSONWithSchema = exports.serializeJSONWithSchema = void 0;
|
|
4
|
+
const serializeJSONWithSchema = (data, indent) => {
|
|
5
|
+
return JSON.stringify(data, function (key, value) {
|
|
6
|
+
if (this[key] instanceof Date) {
|
|
7
|
+
return `remotion-date:${this[key].toISOString()}`;
|
|
8
|
+
}
|
|
9
|
+
return value;
|
|
10
|
+
}, indent);
|
|
11
|
+
};
|
|
12
|
+
exports.serializeJSONWithSchema = serializeJSONWithSchema;
|
|
13
|
+
const deserializeJSONWithSchema = (data) => {
|
|
14
|
+
return JSON.parse(data, (_, value) => {
|
|
15
|
+
if (typeof value === 'string' && value.startsWith('remotion-date:')) {
|
|
16
|
+
return new Date(value.replace('remotion-date:', ''));
|
|
17
|
+
}
|
|
18
|
+
return value;
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
exports.deserializeJSONWithSchema = deserializeJSONWithSchema;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Codec } from '@remotion/renderer';
|
|
2
|
-
export declare const humanReadableCodec: (codec: Codec) => "
|
|
2
|
+
export declare const humanReadableCodec: (codec: Codec) => "AAC" | "MP3" | "GIF" | "H.264" | "H.264 Matroska" | "H.265" | "ProRes" | "WebM VP8" | "WebM VP9" | "Waveform" | undefined;
|
|
@@ -71,6 +71,6 @@ const TopPanel = () => {
|
|
|
71
71
|
const onExpandRight = (0, react_1.useCallback)(() => {
|
|
72
72
|
setSidebarCollapsedStateRight('expanded');
|
|
73
73
|
}, [setSidebarCollapsedStateRight]);
|
|
74
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(InitialCompositionLoader_1.InitialCompositionLoader, {}), (0, jsx_runtime_1.jsx)(MenuToolbar_1.MenuToolbar, {}), (0, jsx_runtime_1.jsxs)("div", { style: row, children: [actualStateLeft === 'collapsed' ? ((0, jsx_runtime_1.jsx)(CollapsedSidebarExpander_1.CollapsedSidebarExpander, { direction: "right", onExpand: onExpandLeft })) : null, (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style: leftContainer, className: "css-reset", children: (0, jsx_runtime_1.jsx)(CompositionSelector_1.CompositionSelector, {}) }) })) : null, actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, (0, jsx_runtime_1.jsxs)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: [(0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, id: "canvas-to-right-sidebar", orientation: "vertical", children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style: canvasContainer, children: (0, jsx_runtime_1.jsx)(Canvas_1.Canvas, {}) }) }), actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsx)(RightPanel_1.RightPanel, {}) })) : null] }), actualStateRight === 'collapsed' ? ((0, jsx_runtime_1.jsx)(CollapsedSidebarExpander_1.CollapsedSidebarExpander, { direction: "left", onExpand: onExpandRight })) : null] })] })] }), (0, jsx_runtime_1.jsx)(PreviewToolbar_1.PreviewToolbar, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.CurrentCompositionKeybindings, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.TitleUpdater, {})] }));
|
|
74
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(InitialCompositionLoader_1.InitialCompositionLoader, {}), (0, jsx_runtime_1.jsx)(MenuToolbar_1.MenuToolbar, {}), (0, jsx_runtime_1.jsxs)("div", { style: row, children: [actualStateLeft === 'collapsed' ? ((0, jsx_runtime_1.jsx)(CollapsedSidebarExpander_1.CollapsedSidebarExpander, { direction: "right", onExpand: onExpandLeft })) : null, (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style: leftContainer, className: "css-reset", children: (0, jsx_runtime_1.jsx)(CompositionSelector_1.CompositionSelector, {}) }) }), (0, jsx_runtime_1.jsx)(CollapsedSidebarExpander_1.CollapsedSidebarExpander, { direction: "left", onExpand: onCollapseLeft })] })) : null, actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, (0, jsx_runtime_1.jsxs)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: [(0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, id: "canvas-to-right-sidebar", orientation: "vertical", children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style: canvasContainer, children: (0, jsx_runtime_1.jsx)(Canvas_1.Canvas, {}) }) }), actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(CollapsedSidebarExpander_1.CollapsedSidebarExpander, { direction: "right", onExpand: onCollapseRight }), (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsx)(RightPanel_1.RightPanel, {}) })] })) : null] }), actualStateRight === 'collapsed' ? ((0, jsx_runtime_1.jsx)(CollapsedSidebarExpander_1.CollapsedSidebarExpander, { direction: "left", onExpand: onExpandRight })) : null] })] })] }), (0, jsx_runtime_1.jsx)(PreviewToolbar_1.PreviewToolbar, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.CurrentCompositionKeybindings, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.TitleUpdater, {})] }));
|
|
75
75
|
};
|
|
76
76
|
exports.TopPanel = TopPanel;
|
|
@@ -15,4 +15,4 @@ export declare const WARNING_COLOR = "#f1c40f";
|
|
|
15
15
|
export declare const getBackgroundFromHoverState: ({ selected, hovered, }: {
|
|
16
16
|
selected: boolean;
|
|
17
17
|
hovered: boolean;
|
|
18
|
-
}) => "transparent" | "hsla(0, 0%, 100%, 0.15)" | "
|
|
18
|
+
}) => "transparent" | "hsla(0, 0%, 100%, 0.15)" | "rgba(255, 255, 255, 0.06)" | "hsla(0, 0%, 100%, 0.25)";
|
|
@@ -20,7 +20,7 @@ export declare const getCliOptions: (options: {
|
|
|
20
20
|
numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
|
|
21
21
|
stillFrame: number;
|
|
22
22
|
browserExecutable: BrowserExecutable;
|
|
23
|
-
logLevel: "
|
|
23
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
24
24
|
scale: number;
|
|
25
25
|
chromiumOptions: ChromiumOptions;
|
|
26
26
|
overwrite: boolean;
|
|
@@ -33,5 +33,5 @@ export declare const getCliOptions: (options: {
|
|
|
33
33
|
videoBitrate: string | null;
|
|
34
34
|
height: number | null;
|
|
35
35
|
width: number | null;
|
|
36
|
-
configFileImageFormat: "
|
|
36
|
+
configFileImageFormat: "none" | "png" | "jpeg" | undefined;
|
|
37
37
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -64,17 +64,17 @@ export declare const CliInternals: {
|
|
|
64
64
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
65
65
|
verboseAdvanced: (options: {
|
|
66
66
|
indent: boolean;
|
|
67
|
-
logLevel: "
|
|
67
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
68
68
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
69
69
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
70
70
|
infoAdvanced: (options: {
|
|
71
71
|
indent: boolean;
|
|
72
|
-
logLevel: "
|
|
72
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
73
73
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
74
74
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
75
75
|
warnAdvanced: (options: {
|
|
76
76
|
indent: boolean;
|
|
77
|
-
logLevel: "
|
|
77
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
78
78
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
79
79
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
80
80
|
};
|
|
@@ -98,7 +98,7 @@ export declare const CliInternals: {
|
|
|
98
98
|
numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
|
|
99
99
|
stillFrame: number;
|
|
100
100
|
browserExecutable: import("@remotion/renderer").BrowserExecutable;
|
|
101
|
-
logLevel: "
|
|
101
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
102
102
|
scale: number;
|
|
103
103
|
chromiumOptions: import("@remotion/renderer").ChromiumOptions;
|
|
104
104
|
overwrite: boolean;
|
|
@@ -111,7 +111,7 @@ export declare const CliInternals: {
|
|
|
111
111
|
videoBitrate: string | null;
|
|
112
112
|
height: number | null;
|
|
113
113
|
width: number | null;
|
|
114
|
-
configFileImageFormat: "
|
|
114
|
+
configFileImageFormat: "none" | "png" | "jpeg" | undefined;
|
|
115
115
|
}>;
|
|
116
116
|
loadConfig: (remotionRoot: string) => Promise<string | null>;
|
|
117
117
|
initializeCli: (remotionRoot: string) => Promise<void>;
|
|
@@ -132,7 +132,7 @@ export declare const CliInternals: {
|
|
|
132
132
|
downloadName: string | null;
|
|
133
133
|
outName: string | null;
|
|
134
134
|
configImageFormat: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
135
|
-
cliFlag: "
|
|
135
|
+
cliFlag: "none" | "png" | "jpeg" | "pdf" | "webp" | null;
|
|
136
136
|
isLambda: boolean;
|
|
137
137
|
fromUi: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
138
138
|
}) => {
|
|
@@ -151,8 +151,8 @@ export declare const CliInternals: {
|
|
|
151
151
|
};
|
|
152
152
|
getVideoImageFormat: ({ codec, uiImageFormat, }: {
|
|
153
153
|
codec: import("@remotion/renderer").CodecOrUndefined;
|
|
154
|
-
uiImageFormat: "
|
|
155
|
-
}) => "
|
|
154
|
+
uiImageFormat: "none" | "png" | "jpeg" | null;
|
|
155
|
+
}) => "none" | "png" | "jpeg";
|
|
156
156
|
printCompositions: (compositions: import("remotion").AnyCompMetadata[]) => void;
|
|
157
157
|
getFinalOutputCodec: ({ cliFlag, configFile, downloadName, outName, uiCodec, }: {
|
|
158
158
|
cliFlag: import("@remotion/renderer").CodecOrUndefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.130+167d9bb7f",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
35
35
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@remotion/bundler": "4.0.0-alpha.
|
|
38
|
-
"@remotion/media-utils": "4.0.0-alpha.
|
|
39
|
-
"@remotion/player": "4.0.0-alpha.
|
|
40
|
-
"@remotion/renderer": "4.0.0-alpha.
|
|
37
|
+
"@remotion/bundler": "4.0.0-alpha.130+167d9bb7f",
|
|
38
|
+
"@remotion/media-utils": "4.0.0-alpha.130+167d9bb7f",
|
|
39
|
+
"@remotion/player": "4.0.0-alpha.130+167d9bb7f",
|
|
40
|
+
"@remotion/renderer": "4.0.0-alpha.130+167d9bb7f",
|
|
41
41
|
"dotenv": "9.0.2",
|
|
42
42
|
"memfs": "3.4.3",
|
|
43
43
|
"minimist": "1.2.6",
|
|
44
44
|
"open": "^8.4.2",
|
|
45
45
|
"prompts": "2.4.1",
|
|
46
|
-
"remotion": "4.0.0-alpha.
|
|
46
|
+
"remotion": "4.0.0-alpha.130+167d9bb7f",
|
|
47
47
|
"semver": "7.3.5",
|
|
48
48
|
"source-map": "0.6.1"
|
|
49
49
|
},
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "167d9bb7fc36e3cb939dec0e904be7a19a8eebb2"
|
|
87
87
|
}
|