@remotion/cli 3.3.81 → 3.3.83
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/cloudrun-command.d.ts +1 -0
- package/dist/cloudrun-command.js +27 -0
- package/dist/codemods/update-default-props.js +7 -8
- package/dist/color-math.d.ts +1 -0
- package/dist/color-math.js +12 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +3 -0
- package/dist/config/jpeg-quality.d.ts +2 -0
- package/dist/config/jpeg-quality.js +17 -0
- package/dist/config/user-agent.d.ts +4 -0
- package/dist/config/user-agent.js +12 -0
- package/dist/editor/components/Canvas.js +1 -4
- package/dist/editor/components/CheckerboardProvider.d.ts +4 -0
- package/dist/editor/components/CheckerboardProvider.js +24 -0
- package/dist/editor/components/MediaVolumeProvider.d.ts +4 -0
- package/dist/editor/components/MediaVolumeProvider.js +25 -0
- package/dist/editor/components/Modals.js +1 -1
- package/dist/editor/components/ModalsProvider.d.ts +4 -0
- package/dist/editor/components/ModalsProvider.js +17 -0
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +8 -0
- package/dist/editor/components/NewComposition/RemInputTypeColor.js +53 -0
- package/dist/editor/components/PlayerEmitterContext.d.ts +4 -0
- package/dist/editor/components/PlayerEmitterContext.js +11 -0
- package/dist/editor/components/RenderButton.js +1 -1
- package/dist/editor/components/RenderModal/JpegQualitySetting.d.ts +2 -2
- package/dist/editor/components/RenderModal/JpegQualitySetting.js +4 -4
- package/dist/editor/components/RenderModal/RenderModal.d.ts +1 -1
- package/dist/editor/components/RenderModal/RenderModal.js +14 -13
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +2 -0
- package/dist/editor/components/RenderModal/RenderModalData.d.ts +1 -1
- package/dist/editor/components/RenderModal/RenderModalData.js +50 -6
- package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.d.ts +1 -0
- package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.js +22 -2
- package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +2 -2
- package/dist/editor/components/RenderModal/RenderModalPicture.js +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +2 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.js +1 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +12 -4
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.d.ts +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.js +108 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +0 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +4 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.d.ts +15 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +45 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +8 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.d.ts +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.js +45 -0
- package/dist/editor/components/RenderModal/SchemaEditor/create-zod-values.d.ts +2 -0
- package/dist/editor/components/RenderModal/SchemaEditor/create-zod-values.js +153 -0
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
- package/dist/editor/components/RenderQueue/actions.d.ts +5 -4
- package/dist/editor/components/RenderQueue/actions.js +11 -5
- package/dist/editor/components/RenderToolbarIcon.js +4 -2
- package/dist/editor/components/RendersTab.js +3 -3
- package/dist/editor/components/RightPanel.js +3 -8
- package/dist/editor/components/SetTimelineInOutProvider.d.ts +4 -0
- package/dist/editor/components/SetTimelineInOutProvider.js +19 -0
- package/dist/editor/components/SidebarCollapserControls.d.ts +2 -0
- package/dist/editor/components/SidebarCollapserControls.js +122 -0
- package/dist/editor/components/SizeSelector.js +1 -1
- package/dist/editor/components/Tabs/index.d.ts +1 -0
- package/dist/editor/components/Tabs/index.js +12 -5
- package/dist/editor/components/Tabs/vertical.d.ts +12 -0
- package/dist/editor/components/Tabs/vertical.js +57 -0
- package/dist/editor/components/ZoomGesturesProvider.d.ts +4 -0
- package/dist/editor/components/ZoomGesturesProvider.js +24 -0
- package/dist/editor/helpers/render-modal-sections.d.ts +1 -0
- package/dist/ffmpeg.js +2 -2
- package/dist/get-cli-options.js +1 -0
- package/dist/parse-command-line.d.ts +1 -0
- package/dist/parse-command-line.js +3 -0
- package/dist/preview-server/api-routes.js +2 -0
- package/dist/preview-server/api-types.d.ts +2 -1
- package/dist/preview-server/render-queue/job.d.ts +13 -4
- package/dist/preview-server/render-queue/make-retry-payload.js +2 -2
- package/dist/preview-server/render-queue/process-still.js +1 -1
- package/dist/preview-server/render-queue/process-video.js +1 -1
- package/dist/preview-server/routes/add-render.js +2 -2
- package/dist/preview-server/routes/can-update-default-props.d.ts +4 -0
- package/dist/preview-server/routes/can-update-default-props.js +39 -0
- package/dist/preview-server/routes/update-default-props.js +3 -1
- package/dist/render-flows/render.d.ts +2 -2
- package/dist/render-flows/render.js +3 -3
- package/dist/render-flows/still.d.ts +2 -2
- package/dist/render-flows/still.js +2 -2
- package/package.json +6 -6
- package/dist/editor/components/CollapsedSidebarExpander.d.ts +0 -5
- package/dist/editor/components/CollapsedSidebarExpander.js +0 -41
- package/dist/editor/components/RenderModal/SchemaEditor/schema-serialization.d.ts +0 -2
- package/dist/editor/components/RenderModal/SchemaEditor/schema-serialization.js +0 -21
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createZodValues = void 0;
|
|
4
|
+
const remotion_1 = require("remotion");
|
|
5
|
+
const createZodValues = (schema) => {
|
|
6
|
+
if (!schema) {
|
|
7
|
+
throw new Error('Invalid zod schema');
|
|
8
|
+
}
|
|
9
|
+
const def = schema._def;
|
|
10
|
+
const typeName = def.typeName;
|
|
11
|
+
switch (typeName) {
|
|
12
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodString:
|
|
13
|
+
return '';
|
|
14
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodNumber:
|
|
15
|
+
return 0;
|
|
16
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodBigInt:
|
|
17
|
+
return BigInt(0);
|
|
18
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodBoolean:
|
|
19
|
+
return false;
|
|
20
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodNaN:
|
|
21
|
+
return NaN;
|
|
22
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodDate:
|
|
23
|
+
return new Date();
|
|
24
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodSymbol:
|
|
25
|
+
return Symbol('remotion');
|
|
26
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodUndefined:
|
|
27
|
+
return undefined;
|
|
28
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodNull:
|
|
29
|
+
return null;
|
|
30
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodAny:
|
|
31
|
+
throw new Error('Cannot create a value for type z.any()');
|
|
32
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodUnknown:
|
|
33
|
+
throw new Error('Cannot create a value for type z.unknown()');
|
|
34
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodNever:
|
|
35
|
+
throw new Error('Cannot create a value for type z.never()');
|
|
36
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodVoid:
|
|
37
|
+
return undefined;
|
|
38
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodObject: {
|
|
39
|
+
const shape = def.shape();
|
|
40
|
+
const keys = Object.keys(shape);
|
|
41
|
+
const returnValue = keys.reduce((existing, key) => {
|
|
42
|
+
existing[key] = (0, exports.createZodValues)(shape[key]);
|
|
43
|
+
return existing;
|
|
44
|
+
}, {});
|
|
45
|
+
return returnValue;
|
|
46
|
+
}
|
|
47
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodArray: {
|
|
48
|
+
return [(0, exports.createZodValues)(def.type)];
|
|
49
|
+
}
|
|
50
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodUnion: {
|
|
51
|
+
const firstOptions = def.options[0];
|
|
52
|
+
return firstOptions ? (0, exports.createZodValues)(firstOptions) : undefined;
|
|
53
|
+
}
|
|
54
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodDiscriminatedUnion: {
|
|
55
|
+
const options = def.options[0];
|
|
56
|
+
return (0, exports.createZodValues)(options);
|
|
57
|
+
}
|
|
58
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodLiteral: {
|
|
59
|
+
return def.value;
|
|
60
|
+
}
|
|
61
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodEffects: {
|
|
62
|
+
if (schema._def.description === remotion_1.Internals.REMOTION_COLOR_BRAND) {
|
|
63
|
+
return '#ffffff';
|
|
64
|
+
}
|
|
65
|
+
return (0, exports.createZodValues)(def.schema);
|
|
66
|
+
}
|
|
67
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodIntersection: {
|
|
68
|
+
const { left, right } = def;
|
|
69
|
+
const leftValue = (0, exports.createZodValues)(left);
|
|
70
|
+
if (typeof leftValue !== 'object') {
|
|
71
|
+
throw new Error('Cannot create value for type z.intersection: Left side is not an object');
|
|
72
|
+
}
|
|
73
|
+
const rightValue = (0, exports.createZodValues)(right);
|
|
74
|
+
if (typeof rightValue !== 'object') {
|
|
75
|
+
throw new Error('Cannot create value for type z.intersection: Right side is not an object');
|
|
76
|
+
}
|
|
77
|
+
return { ...leftValue, ...rightValue };
|
|
78
|
+
}
|
|
79
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodTuple: {
|
|
80
|
+
const items = def.items.map((item) => (0, exports.createZodValues)(item));
|
|
81
|
+
return items;
|
|
82
|
+
}
|
|
83
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodRecord: {
|
|
84
|
+
const values = (0, exports.createZodValues)(def.valueType);
|
|
85
|
+
return { key: values };
|
|
86
|
+
}
|
|
87
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodMap: {
|
|
88
|
+
const defType = def;
|
|
89
|
+
const values = (0, exports.createZodValues)(defType.valueType);
|
|
90
|
+
const key = (0, exports.createZodValues)(defType.keyType);
|
|
91
|
+
return new Map([[key, values]]);
|
|
92
|
+
}
|
|
93
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodLazy: {
|
|
94
|
+
const defType = def;
|
|
95
|
+
const type = defType.getter();
|
|
96
|
+
return (0, exports.createZodValues)(type);
|
|
97
|
+
}
|
|
98
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodSet: {
|
|
99
|
+
const defType = def;
|
|
100
|
+
const values = (0, exports.createZodValues)(defType.valueType);
|
|
101
|
+
return new Set([values]);
|
|
102
|
+
}
|
|
103
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodFunction: {
|
|
104
|
+
throw new Error('Cannot create a value for type function');
|
|
105
|
+
}
|
|
106
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodEnum: {
|
|
107
|
+
const { values } = def;
|
|
108
|
+
return values[0];
|
|
109
|
+
}
|
|
110
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodNativeEnum: {
|
|
111
|
+
return 0;
|
|
112
|
+
}
|
|
113
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodOptional: {
|
|
114
|
+
const defType = def;
|
|
115
|
+
const value = (0, exports.createZodValues)(defType.innerType);
|
|
116
|
+
return value;
|
|
117
|
+
}
|
|
118
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodNullable: {
|
|
119
|
+
const defType = def;
|
|
120
|
+
const value = (0, exports.createZodValues)(defType.innerType);
|
|
121
|
+
return value;
|
|
122
|
+
}
|
|
123
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodDefault: {
|
|
124
|
+
const defType = def;
|
|
125
|
+
return defType.defaultValue();
|
|
126
|
+
}
|
|
127
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodCatch: {
|
|
128
|
+
const defType = def;
|
|
129
|
+
const value = (0, exports.createZodValues)(defType.innerType);
|
|
130
|
+
return value;
|
|
131
|
+
}
|
|
132
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodPromise: {
|
|
133
|
+
const defType = def;
|
|
134
|
+
const value = (0, exports.createZodValues)(defType.type);
|
|
135
|
+
return Promise.resolve(value);
|
|
136
|
+
}
|
|
137
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodBranded: {
|
|
138
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
139
|
+
const defType = def;
|
|
140
|
+
const value = (0, exports.createZodValues)(defType.type);
|
|
141
|
+
return value;
|
|
142
|
+
}
|
|
143
|
+
case remotion_1.z.ZodFirstPartyTypeKind.ZodPipeline: {
|
|
144
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
145
|
+
const defType = def;
|
|
146
|
+
const value = (0, exports.createZodValues)(defType.out);
|
|
147
|
+
return value;
|
|
148
|
+
}
|
|
149
|
+
default:
|
|
150
|
+
throw new Error('Not implemented: ' + typeName);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
exports.createZodValues = createZodValues;
|
|
@@ -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) => "GIF" | "AAC" | "MP3" | "H.264" | "H.264 Matroska" | "H.265" | "ProRes" | "WebM VP8" | "WebM VP9" | "Waveform" | undefined;
|
|
@@ -3,11 +3,11 @@ import type { ApiRoutes } from '../../../preview-server/api-types';
|
|
|
3
3
|
import type { RenderJob } from '../../../preview-server/render-queue/job';
|
|
4
4
|
import type { RequiredChromiumOptions } from '../../../required-chromium-options';
|
|
5
5
|
export declare const callApi: <Endpoint extends keyof ApiRoutes>(endpoint: Endpoint, body: ApiRoutes[Endpoint]["Request"]) => Promise<ApiRoutes[Endpoint]["Response"]>;
|
|
6
|
-
export declare const addStillRenderJob: ({ compositionId, outName, imageFormat,
|
|
6
|
+
export declare const addStillRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, }: {
|
|
7
7
|
compositionId: string;
|
|
8
8
|
outName: string;
|
|
9
9
|
imageFormat: StillImageFormat;
|
|
10
|
-
|
|
10
|
+
jpegQuality: number | null;
|
|
11
11
|
frame: number;
|
|
12
12
|
scale: number;
|
|
13
13
|
verbose: boolean;
|
|
@@ -16,11 +16,11 @@ export declare const addStillRenderJob: ({ compositionId, outName, imageFormat,
|
|
|
16
16
|
envVariables: Record<string, string>;
|
|
17
17
|
inputProps: unknown;
|
|
18
18
|
}) => Promise<undefined>;
|
|
19
|
-
export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat,
|
|
19
|
+
export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, }: {
|
|
20
20
|
compositionId: string;
|
|
21
21
|
outName: string;
|
|
22
22
|
imageFormat: VideoImageFormat;
|
|
23
|
-
|
|
23
|
+
jpegQuality: number | null;
|
|
24
24
|
scale: number;
|
|
25
25
|
verbose: boolean;
|
|
26
26
|
codec: Codec;
|
|
@@ -57,3 +57,4 @@ export declare const openInFileExplorer: ({ directory }: {
|
|
|
57
57
|
export declare const removeRenderJob: (job: RenderJob) => Promise<undefined>;
|
|
58
58
|
export declare const cancelRenderJob: (job: RenderJob) => Promise<import("../../../preview-server/render-queue/job").CancelRenderResponse>;
|
|
59
59
|
export declare const updateDefaultProps: (compositionId: string, defaultProps: unknown) => Promise<void>;
|
|
60
|
+
export declare const canUpdateDefaultProps: (compositionId: string) => Promise<import("../../../preview-server/render-queue/job").CanUpdateDefaultPropsResponse>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateDefaultProps = exports.cancelRenderJob = exports.removeRenderJob = exports.openInFileExplorer = exports.subscribeToFileExistenceWatcher = exports.unsubscribeFromFileExistenceWatcher = exports.addVideoRenderJob = exports.addStillRenderJob = exports.callApi = void 0;
|
|
3
|
+
exports.canUpdateDefaultProps = exports.updateDefaultProps = exports.cancelRenderJob = exports.removeRenderJob = exports.openInFileExplorer = exports.subscribeToFileExistenceWatcher = exports.unsubscribeFromFileExistenceWatcher = exports.addVideoRenderJob = exports.addStillRenderJob = exports.callApi = void 0;
|
|
4
4
|
const date_serialization_1 = require("../RenderModal/SchemaEditor/date-serialization");
|
|
5
5
|
const callApi = (endpoint, body) => {
|
|
6
6
|
return new Promise((resolve, reject) => {
|
|
@@ -26,13 +26,13 @@ const callApi = (endpoint, body) => {
|
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
28
|
exports.callApi = callApi;
|
|
29
|
-
const addStillRenderJob = ({ compositionId, outName, imageFormat,
|
|
29
|
+
const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, }) => {
|
|
30
30
|
return (0, exports.callApi)('/api/render', {
|
|
31
31
|
compositionId,
|
|
32
32
|
type: 'still',
|
|
33
33
|
outName,
|
|
34
34
|
imageFormat,
|
|
35
|
-
|
|
35
|
+
jpegQuality,
|
|
36
36
|
frame,
|
|
37
37
|
scale,
|
|
38
38
|
verbose,
|
|
@@ -43,13 +43,13 @@ const addStillRenderJob = ({ compositionId, outName, imageFormat, quality, frame
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
exports.addStillRenderJob = addStillRenderJob;
|
|
46
|
-
const addVideoRenderJob = ({ compositionId, outName, imageFormat,
|
|
46
|
+
const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, }) => {
|
|
47
47
|
return (0, exports.callApi)('/api/render', {
|
|
48
48
|
compositionId,
|
|
49
49
|
type: 'video',
|
|
50
50
|
outName,
|
|
51
51
|
imageFormat,
|
|
52
|
-
|
|
52
|
+
jpegQuality,
|
|
53
53
|
scale,
|
|
54
54
|
verbose,
|
|
55
55
|
codec,
|
|
@@ -112,3 +112,9 @@ const updateDefaultProps = (compositionId, defaultProps) => {
|
|
|
112
112
|
});
|
|
113
113
|
};
|
|
114
114
|
exports.updateDefaultProps = updateDefaultProps;
|
|
115
|
+
const canUpdateDefaultProps = (compositionId) => {
|
|
116
|
+
return (0, exports.callApi)('/api/can-update-default-props', {
|
|
117
|
+
compositionId,
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
exports.canUpdateDefaultProps = canUpdateDefaultProps;
|
|
@@ -7,6 +7,7 @@ const remotion_1 = require("remotion");
|
|
|
7
7
|
const get_default_out_name_1 = require("../../get-default-out-name");
|
|
8
8
|
const get_default_video_contexts_1 = require("../../preview-server/render-queue/get-default-video-contexts");
|
|
9
9
|
const client_id_1 = require("../helpers/client-id");
|
|
10
|
+
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
10
11
|
const render_1 = require("../icons/render");
|
|
11
12
|
const modals_1 = require("../state/modals");
|
|
12
13
|
const ControlButton_1 = require("./ControlButton");
|
|
@@ -20,8 +21,9 @@ const RenderButton = () => {
|
|
|
20
21
|
},
|
|
21
22
|
};
|
|
22
23
|
}, []);
|
|
24
|
+
const shortcut = (0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? '' : '(R)';
|
|
23
25
|
const tooltip = type === 'connected'
|
|
24
|
-
? 'Export the current composition'
|
|
26
|
+
? 'Export the current composition ' + shortcut
|
|
25
27
|
: 'Connect to the preview server to render';
|
|
26
28
|
const video = remotion_1.Internals.useVideo();
|
|
27
29
|
const frame = (0, remotion_1.useCurrentFrame)();
|
|
@@ -50,7 +52,7 @@ const RenderButton = () => {
|
|
|
50
52
|
defaultExtension: isVideo ? 'mp4' : 'png',
|
|
51
53
|
type: 'asset',
|
|
52
54
|
}),
|
|
53
|
-
|
|
55
|
+
initialJpegQuality: defaults.jpegQuality,
|
|
54
56
|
initialScale: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.scale) !== null && _b !== void 0 ? _b : 1,
|
|
55
57
|
initialVerbose: defaults.logLevel === 'verbose',
|
|
56
58
|
initialVideoCodecForAudioTab: initialAudioCodec,
|
|
@@ -11,14 +11,14 @@ const row = {
|
|
|
11
11
|
display: 'flex',
|
|
12
12
|
flexDirection: 'row',
|
|
13
13
|
fontSize: 14,
|
|
14
|
-
justifyContent: 'center',
|
|
15
14
|
color: 'inherit',
|
|
16
15
|
alignItems: 'center',
|
|
16
|
+
flex: 1,
|
|
17
17
|
};
|
|
18
18
|
const badge = {
|
|
19
19
|
height: 16,
|
|
20
20
|
width: 16,
|
|
21
|
-
borderRadius:
|
|
21
|
+
borderRadius: 3,
|
|
22
22
|
fontSize: 10,
|
|
23
23
|
display: 'inline-flex',
|
|
24
24
|
justifyContent: 'center',
|
|
@@ -38,6 +38,6 @@ const RendersTab = ({ selected, onClick }) => {
|
|
|
38
38
|
borderColor: colors_1.LIGHT_TEXT,
|
|
39
39
|
};
|
|
40
40
|
}, [failedJobs]);
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: selected, onClick: onClick, children: (0, jsx_runtime_1.jsxs)("div", { style: row, children: ["Renders", jobCount > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: selected, onClick: onClick, children: (0, jsx_runtime_1.jsxs)("div", { style: row, children: ["Renders", jobCount > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Flex, {}), (0, jsx_runtime_1.jsx)("div", { style: badgeStyle, children: jobCount })] })) : null] }) }));
|
|
42
42
|
};
|
|
43
43
|
exports.RendersTab = RendersTab;
|
|
@@ -4,7 +4,6 @@ exports.RightPanel = exports.rightSidebarTabs = exports.persistSelectedPanel = v
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
|
-
const colors_1 = require("../helpers/colors");
|
|
8
7
|
const RenderModalData_1 = require("./RenderModal/RenderModalData");
|
|
9
8
|
const RenderQueue_1 = require("./RenderQueue");
|
|
10
9
|
const RendersTab_1 = require("./RendersTab");
|
|
@@ -19,8 +18,6 @@ const container = {
|
|
|
19
18
|
const PropsEditor = ({ composition }) => {
|
|
20
19
|
var _a;
|
|
21
20
|
const { props, updateProps } = (0, react_1.useContext)(remotion_1.Internals.EditorPropsContext);
|
|
22
|
-
// TODO: Warn if inputProps were specified to the CLI, then
|
|
23
|
-
// they take priority over defaultProps
|
|
24
21
|
const setInputProps = (0, react_1.useCallback)((newProps) => {
|
|
25
22
|
updateProps({
|
|
26
23
|
id: composition.id,
|
|
@@ -28,7 +25,7 @@ const PropsEditor = ({ composition }) => {
|
|
|
28
25
|
newProps: newProps,
|
|
29
26
|
});
|
|
30
27
|
}, [composition.defaultProps, composition.id, updateProps]);
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(RenderModalData_1.RenderModalData, { composition: composition, inputProps: (_a = props[composition.id]) !== null && _a !== void 0 ? _a : composition.defaultProps, setInputProps: setInputProps, compact: true,
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(RenderModalData_1.RenderModalData, { composition: composition, inputProps: (_a = props[composition.id]) !== null && _a !== void 0 ? _a : composition.defaultProps, setInputProps: setInputProps, compact: true, mayShowSaveButton: true }));
|
|
32
29
|
};
|
|
33
30
|
const localStorageKey = 'remotion.sidebarPanel';
|
|
34
31
|
const getSelectedPanel = () => {
|
|
@@ -38,9 +35,7 @@ const getSelectedPanel = () => {
|
|
|
38
35
|
}
|
|
39
36
|
return 'input-props';
|
|
40
37
|
};
|
|
41
|
-
const tabsContainer = {
|
|
42
|
-
borderBottom: `1px solid ${colors_1.BORDER_COLOR}`,
|
|
43
|
-
};
|
|
38
|
+
const tabsContainer = {};
|
|
44
39
|
const persistSelectedPanel = (panel) => {
|
|
45
40
|
localStorage.setItem(localStorageKey, panel);
|
|
46
41
|
};
|
|
@@ -76,6 +71,6 @@ const RightPanel = () => {
|
|
|
76
71
|
if (composition === null) {
|
|
77
72
|
return null;
|
|
78
73
|
}
|
|
79
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: "css-reset", children: [(0, jsx_runtime_1.jsx)("div", { style: tabsContainer, children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: panel === 'input-props', onClick: onCompositionsSelected, children: "
|
|
74
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: "css-reset", children: [(0, jsx_runtime_1.jsx)("div", { style: tabsContainer, children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: panel === 'input-props', onClick: onCompositionsSelected, children: "Props" }), (0, jsx_runtime_1.jsx)(RendersTab_1.RendersTab, { onClick: onRendersSelected, selected: panel === 'renders' })] }) }), panel === 'renders' ? ((0, jsx_runtime_1.jsx)(RenderQueue_1.RenderQueue, {})) : ((0, jsx_runtime_1.jsx)(PropsEditor, { composition: composition }))] }));
|
|
80
75
|
};
|
|
81
76
|
exports.RightPanel = RightPanel;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetTimelineInOutProvider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const in_out_1 = require("../state/in-out");
|
|
7
|
+
const SetTimelineInOutProvider = ({ children }) => {
|
|
8
|
+
const [inAndOutFrames, setInAndOutFrames] = (0, react_1.useState)({
|
|
9
|
+
inFrame: null,
|
|
10
|
+
outFrame: null,
|
|
11
|
+
});
|
|
12
|
+
const setTimelineInOutContextValue = (0, react_1.useMemo)(() => {
|
|
13
|
+
return {
|
|
14
|
+
setInAndOutFrames,
|
|
15
|
+
};
|
|
16
|
+
}, []);
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(in_out_1.TimelineInOutContext.Provider, { value: inAndOutFrames, children: (0, jsx_runtime_1.jsx)(in_out_1.SetTimelineInOutContext.Provider, { value: setTimelineInOutContextValue, children: children }) }));
|
|
18
|
+
};
|
|
19
|
+
exports.SetTimelineInOutProvider = SetTimelineInOutProvider;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SidebarCollapserControls = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const ShortcutHint_1 = require("../../preview-server/error-overlay/remotion-overlay/ShortcutHint");
|
|
7
|
+
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
8
|
+
const sidebar_1 = require("../state/sidebar");
|
|
9
|
+
const InlineAction_1 = require("./InlineAction");
|
|
10
|
+
const layout_1 = require("./layout");
|
|
11
|
+
const TopPanel_1 = require("./TopPanel");
|
|
12
|
+
const style = {
|
|
13
|
+
width: 16,
|
|
14
|
+
height: 16,
|
|
15
|
+
border: '1px solid white',
|
|
16
|
+
borderRadius: 3,
|
|
17
|
+
position: 'relative',
|
|
18
|
+
};
|
|
19
|
+
const SidebarCollapserControls = () => {
|
|
20
|
+
const { setSidebarCollapsedState, sidebarCollapsedStateRight } = (0, react_1.useContext)(sidebar_1.SidebarContext);
|
|
21
|
+
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
22
|
+
const leftSidebarStatus = (0, TopPanel_1.useResponsiveSidebarStatus)();
|
|
23
|
+
const leftIcon = (0, react_1.useMemo)(() => {
|
|
24
|
+
return {
|
|
25
|
+
width: '35%',
|
|
26
|
+
height: '100%',
|
|
27
|
+
borderRight: '1px solid white',
|
|
28
|
+
background: leftSidebarStatus === 'expanded' ? 'white' : 'transparent',
|
|
29
|
+
};
|
|
30
|
+
}, [leftSidebarStatus]);
|
|
31
|
+
const rightIcon = (0, react_1.useMemo)(() => {
|
|
32
|
+
return {
|
|
33
|
+
width: '35%',
|
|
34
|
+
height: '100%',
|
|
35
|
+
right: 0,
|
|
36
|
+
position: 'absolute',
|
|
37
|
+
borderLeft: '1px solid white',
|
|
38
|
+
background: sidebarCollapsedStateRight === 'expanded' ? 'white' : 'transparent',
|
|
39
|
+
};
|
|
40
|
+
}, [sidebarCollapsedStateRight]);
|
|
41
|
+
const toggleLeft = (0, react_1.useCallback)(() => {
|
|
42
|
+
setSidebarCollapsedState({
|
|
43
|
+
left: (s) => {
|
|
44
|
+
if (s === 'responsive') {
|
|
45
|
+
return leftSidebarStatus === 'collapsed' ? 'expanded' : 'collapsed';
|
|
46
|
+
}
|
|
47
|
+
return s === 'collapsed' ? 'expanded' : 'collapsed';
|
|
48
|
+
},
|
|
49
|
+
right: null,
|
|
50
|
+
});
|
|
51
|
+
}, [leftSidebarStatus, setSidebarCollapsedState]);
|
|
52
|
+
const toggleRight = (0, react_1.useCallback)(() => {
|
|
53
|
+
setSidebarCollapsedState({
|
|
54
|
+
right: (s) => (s === 'collapsed' ? 'expanded' : 'collapsed'),
|
|
55
|
+
left: null,
|
|
56
|
+
});
|
|
57
|
+
}, [setSidebarCollapsedState]);
|
|
58
|
+
const toggleBoth = (0, react_1.useCallback)(() => {
|
|
59
|
+
if (sidebarCollapsedStateRight === leftSidebarStatus) {
|
|
60
|
+
setSidebarCollapsedState({
|
|
61
|
+
left: (s) => {
|
|
62
|
+
if (s === 'responsive') {
|
|
63
|
+
return leftSidebarStatus === 'collapsed' ? 'expanded' : 'collapsed';
|
|
64
|
+
}
|
|
65
|
+
return s === 'collapsed' ? 'expanded' : 'collapsed';
|
|
66
|
+
},
|
|
67
|
+
right: (s) => (s === 'collapsed' ? 'expanded' : 'collapsed'),
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
else if (sidebarCollapsedStateRight === 'expanded') {
|
|
71
|
+
toggleRight();
|
|
72
|
+
}
|
|
73
|
+
else if (leftSidebarStatus === 'expanded') {
|
|
74
|
+
toggleLeft();
|
|
75
|
+
}
|
|
76
|
+
}, [
|
|
77
|
+
leftSidebarStatus,
|
|
78
|
+
setSidebarCollapsedState,
|
|
79
|
+
sidebarCollapsedStateRight,
|
|
80
|
+
toggleLeft,
|
|
81
|
+
toggleRight,
|
|
82
|
+
]);
|
|
83
|
+
(0, react_1.useEffect)(() => {
|
|
84
|
+
const left = keybindings.registerKeybinding({
|
|
85
|
+
event: 'keydown',
|
|
86
|
+
key: 'b',
|
|
87
|
+
commandCtrlKey: true,
|
|
88
|
+
callback: toggleLeft,
|
|
89
|
+
preventDefault: true,
|
|
90
|
+
triggerIfInputFieldFocused: false,
|
|
91
|
+
});
|
|
92
|
+
const right = keybindings.registerKeybinding({
|
|
93
|
+
event: 'keydown',
|
|
94
|
+
key: 'j',
|
|
95
|
+
commandCtrlKey: true,
|
|
96
|
+
callback: toggleRight,
|
|
97
|
+
preventDefault: true,
|
|
98
|
+
triggerIfInputFieldFocused: false,
|
|
99
|
+
});
|
|
100
|
+
const zen = keybindings.registerKeybinding({
|
|
101
|
+
event: 'keydown',
|
|
102
|
+
key: 'g',
|
|
103
|
+
commandCtrlKey: true,
|
|
104
|
+
callback: toggleBoth,
|
|
105
|
+
preventDefault: true,
|
|
106
|
+
triggerIfInputFieldFocused: false,
|
|
107
|
+
});
|
|
108
|
+
return () => {
|
|
109
|
+
left.unregister();
|
|
110
|
+
right.unregister();
|
|
111
|
+
zen.unregister();
|
|
112
|
+
};
|
|
113
|
+
}, [keybindings, toggleBoth, toggleLeft, toggleRight]);
|
|
114
|
+
const toggleLeftTooltip = (0, use_keybinding_1.areKeyboardShortcutsDisabled)()
|
|
115
|
+
? 'Toggle Left Sidebar'
|
|
116
|
+
: `Toggle Left Sidebar (${ShortcutHint_1.cmdOrCtrlCharacter}+B)`;
|
|
117
|
+
const toggleRightTooltip = (0, use_keybinding_1.areKeyboardShortcutsDisabled)()
|
|
118
|
+
? 'Toggle Right Sidebar'
|
|
119
|
+
: `Toggle Right Sidebar (${ShortcutHint_1.cmdOrCtrlCharacter}+J)`;
|
|
120
|
+
return ((0, jsx_runtime_1.jsxs)(layout_1.Row, { children: [(0, jsx_runtime_1.jsx)(InlineAction_1.InlineAction, { onClick: toggleLeft, children: (0, jsx_runtime_1.jsx)("div", { style: style, title: toggleLeftTooltip, children: (0, jsx_runtime_1.jsx)("div", { style: leftIcon }) }) }), (0, jsx_runtime_1.jsx)(InlineAction_1.InlineAction, { onClick: toggleRight, children: (0, jsx_runtime_1.jsx)("div", { style: style, title: toggleRightTooltip, children: (0, jsx_runtime_1.jsx)("div", { style: rightIcon }) }) })] }));
|
|
121
|
+
};
|
|
122
|
+
exports.SidebarCollapserControls = SidebarCollapserControls;
|
|
@@ -84,7 +84,7 @@ const SizeSelector = () => {
|
|
|
84
84
|
},
|
|
85
85
|
type: 'item',
|
|
86
86
|
value: newSize.size,
|
|
87
|
-
keyHint: newSize.size ===
|
|
87
|
+
keyHint: newSize.size === 'auto' ? '0' : null,
|
|
88
88
|
leftItem: String(size.size) === String(newSize.size) ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null,
|
|
89
89
|
subMenu: null,
|
|
90
90
|
quickSwitcherLabel: null,
|
|
@@ -3,6 +3,7 @@ export declare const Tabs: React.FC<{
|
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
style?: React.CSSProperties;
|
|
5
5
|
}>;
|
|
6
|
+
export declare const selectorButton: React.CSSProperties;
|
|
6
7
|
export declare const Tab: React.FC<{
|
|
7
8
|
children: React.ReactNode;
|
|
8
9
|
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Tab = exports.Tabs = void 0;
|
|
3
|
+
exports.Tab = exports.selectorButton = exports.Tabs = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
@@ -19,11 +19,16 @@ const Tabs = ({ children, style }) => {
|
|
|
19
19
|
return (0, jsx_runtime_1.jsx)("div", { style: definiteStyle, children: children });
|
|
20
20
|
};
|
|
21
21
|
exports.Tabs = Tabs;
|
|
22
|
-
|
|
22
|
+
exports.selectorButton = {
|
|
23
23
|
border: 'none',
|
|
24
24
|
flex: 1,
|
|
25
25
|
padding: 8,
|
|
26
|
+
paddingLeft: 16,
|
|
27
|
+
display: 'flex',
|
|
28
|
+
flexDirection: 'row',
|
|
26
29
|
fontSize: 14,
|
|
30
|
+
color: 'inherit',
|
|
31
|
+
alignItems: 'center',
|
|
27
32
|
};
|
|
28
33
|
const Tab = ({ children, onClick, style, selected }) => {
|
|
29
34
|
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
@@ -36,13 +41,15 @@ const Tab = ({ children, onClick, style, selected }) => {
|
|
|
36
41
|
}, []);
|
|
37
42
|
const definiteStyle = (0, react_1.useMemo)(() => {
|
|
38
43
|
return {
|
|
39
|
-
...selectorButton,
|
|
44
|
+
...exports.selectorButton,
|
|
40
45
|
backgroundColor: selected
|
|
41
|
-
?
|
|
46
|
+
? 'transparent'
|
|
42
47
|
: hovered
|
|
43
48
|
? colors_1.CLEAR_HOVER
|
|
44
|
-
:
|
|
49
|
+
: colors_1.INPUT_BACKGROUND,
|
|
45
50
|
color: selected ? 'white' : colors_1.LIGHT_TEXT,
|
|
51
|
+
borderTop: selected ? '2px solid var(--blue)' : '2px solid transparent',
|
|
52
|
+
boxShadow: selected ? 'none' : undefined,
|
|
46
53
|
...style,
|
|
47
54
|
};
|
|
48
55
|
}, [hovered, selected, style]);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const VerticalTabs: React.FC<{
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const selectorButton: React.CSSProperties;
|
|
7
|
+
export declare const VerticalTab: React.FC<{
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
selected: boolean;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerticalTab = exports.selectorButton = exports.VerticalTabs = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const colors_1 = require("../../helpers/colors");
|
|
7
|
+
const z_index_1 = require("../../state/z-index");
|
|
8
|
+
const tabsContainer = {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flexDirection: 'row',
|
|
11
|
+
};
|
|
12
|
+
const VerticalTabs = ({ children, style }) => {
|
|
13
|
+
const definiteStyle = (0, react_1.useMemo)(() => {
|
|
14
|
+
return {
|
|
15
|
+
...tabsContainer,
|
|
16
|
+
...style,
|
|
17
|
+
};
|
|
18
|
+
}, [style]);
|
|
19
|
+
return (0, jsx_runtime_1.jsx)("div", { style: definiteStyle, children: children });
|
|
20
|
+
};
|
|
21
|
+
exports.VerticalTabs = VerticalTabs;
|
|
22
|
+
exports.selectorButton = {
|
|
23
|
+
border: 'none',
|
|
24
|
+
flex: 1,
|
|
25
|
+
padding: 8,
|
|
26
|
+
paddingLeft: 16,
|
|
27
|
+
display: 'flex',
|
|
28
|
+
flexDirection: 'row',
|
|
29
|
+
fontSize: 14,
|
|
30
|
+
color: 'inherit',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
};
|
|
33
|
+
const VerticalTab = ({ children, onClick, style, selected }) => {
|
|
34
|
+
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
35
|
+
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
36
|
+
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
37
|
+
setHovered(true);
|
|
38
|
+
}, []);
|
|
39
|
+
const onPointerLeave = (0, react_1.useCallback)(() => {
|
|
40
|
+
setHovered(false);
|
|
41
|
+
}, []);
|
|
42
|
+
const definiteStyle = (0, react_1.useMemo)(() => {
|
|
43
|
+
return {
|
|
44
|
+
...exports.selectorButton,
|
|
45
|
+
backgroundColor: selected
|
|
46
|
+
? colors_1.SELECTED_BACKGROUND
|
|
47
|
+
: hovered
|
|
48
|
+
? colors_1.CLEAR_HOVER
|
|
49
|
+
: 'transparent',
|
|
50
|
+
color: selected ? 'white' : colors_1.LIGHT_TEXT,
|
|
51
|
+
boxShadow: selected ? 'none' : undefined,
|
|
52
|
+
...style,
|
|
53
|
+
};
|
|
54
|
+
}, [hovered, selected, style]);
|
|
55
|
+
return ((0, jsx_runtime_1.jsx)("button", { style: definiteStyle, type: "button", onClick: onClick, tabIndex: tabIndex, onPointerLeave: onPointerLeave, onPointerEnter: onPointerEnter, children: children }));
|
|
56
|
+
};
|
|
57
|
+
exports.VerticalTab = VerticalTab;
|